Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/security / / EnvSecretsStore

Class: EnvSecretsStore ​

Defined in: packages/security/src/secrets/stores/env.ts:45

Stable

SecretsStore backed by process.env. Read-only by default - enabling allowMutation: true keeps the API workable for tests but still emits a single console.warn per mutation.

Implements ​

Constructors ​

Constructor ​

ts
new EnvSecretsStore(opts?): EnvSecretsStore;

Defined in: packages/security/src/secrets/stores/env.ts:50

Parameters ​

ParameterType
optsEnvSecretsStoreOptions

Returns ​

EnvSecretsStore

Properties ​

PropertyModifierTypeDefined in
kindreadonly"env"packages/security/src/secrets/stores/env.ts:46

Methods ​

delete() ​

ts
delete(key, _scope?): Promise<void>;

Defined in: packages/security/src/secrets/stores/env.ts:126

Parameters ​

ParameterType
keystring
_scope?SessionScope

Returns ​

Promise&lt;void&gt;

Implementation of ​

SecretsStore.delete


get() ​

ts
get(key, _scope?): Promise<SecretValue | null>;

Defined in: packages/security/src/secrets/stores/env.ts:56

Returns the secret if it exists, null otherwise.

Parameters ​

ParameterType
keystring
_scope?SessionScope

Returns ​

Promise&lt;SecretValue | null&gt;

Implementation of ​

SecretsStore.get


list() ​

ts
list(_scope?): Promise<readonly SecretMetadata[]>;

Defined in: packages/security/src/secrets/stores/env.ts:157

Returns metadata about every key - never the values themselves.

Parameters ​

ParameterType
_scope?SessionScope

Returns ​

Promise&lt;readonly SecretMetadata[]&gt;

Implementation of ​

SecretsStore.list


require() ​

ts
require(key, _scope?): Promise<SecretValue>;

Defined in: packages/security/src/secrets/stores/env.ts:77

Returns the secret or throws. Implementations enforce the per-tool secretsAllowed ACL: if the current tool context disallows key, throw SecretAccessDeniedError.

Parameters ​

ParameterType
keystring
_scope?SessionScope

Returns ​

Promise&lt;SecretValue&gt;

Implementation of ​

SecretsStore.require


set() ​

ts
set(
   key, 
   value, 
_opts?): Promise<void>;

Defined in: packages/security/src/secrets/stores/env.ts:89

Persist a secret. Implementations auto-wrap a plain string into a SecretValue so callers don't have to.

Parameters ​

ParameterType
keystring
value| string | SecretValue
_opts?SecretsSetOptions

Returns ​

Promise&lt;void&gt;

Implementation of ​

SecretsStore.set