Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / / MemorySecretsStore
Class: MemorySecretsStore
Defined in: packages/security/src/secrets/stores/memory.ts:22
In-memory SecretsStore for tests. Refuses to start in production mode unless explicitly opted in.
Stable
Implements
Constructors
Constructor
new MemorySecretsStore(opts?): MemorySecretsStore;Defined in: packages/security/src/secrets/stores/memory.ts:27
Parameters
| Parameter | Type |
|---|---|
opts | { forceProduction?: boolean; } |
opts.forceProduction? | boolean |
Returns
MemorySecretsStore
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
kind | readonly | "memory" | Stable identifier — surfaced in getSecretsStoreStatus(). | packages/security/src/secrets/stores/memory.ts:24 |
Accessors
size
Get Signature
get size(): number;Defined in: packages/security/src/secrets/stores/memory.ts:34
Whether this store has any keys at all.
Returns
number
Methods
delete()
delete(key, scope?): Promise<void>;Defined in: packages/security/src/secrets/stores/memory.ts:82
Parameters
| Parameter | Type |
|---|---|
key | string |
scope? | SessionScope |
Returns
Promise<void>
Implementation of
get()
get(key, scope?): Promise<SecretValue | null>;Defined in: packages/security/src/secrets/stores/memory.ts:38
Returns the secret if it exists, null otherwise.
Parameters
| Parameter | Type |
|---|---|
key | string |
scope? | SessionScope |
Returns
Promise<SecretValue | null>
Implementation of
list()
list(scope?): Promise<readonly SecretMetadata[]>;Defined in: packages/security/src/secrets/stores/memory.ts:88
Returns metadata about every key — never the values themselves.
Parameters
| Parameter | Type |
|---|---|
scope? | SessionScope |
Returns
Promise<readonly SecretMetadata[]>
Implementation of
require()
require(key, scope?): Promise<SecretValue>;Defined in: packages/security/src/secrets/stores/memory.ts:50
Returns the secret or throws. Implementations enforce the per-tool secretsAllowed ACL: if the current tool context disallows key, throw SecretAccessDeniedError.
Parameters
| Parameter | Type |
|---|---|
key | string |
scope? | SessionScope |
Returns
Promise<SecretValue>
Implementation of
set()
set(
key,
value,
opts?): Promise<void>;Defined in: packages/security/src/secrets/stores/memory.ts:58
Persist a secret. Implementations auto-wrap a plain string into a SecretValue so callers don't have to.
Parameters
| Parameter | Type |
|---|---|
key | string |
value | | string | SecretValue |
opts | SecretsSetOptions |
Returns
Promise<void>