Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/core / / ToolSecretsAccessor
Interface: ToolSecretsAccessor
Defined in: packages/core/src/contracts/tool.ts:254
Per-call secrets accessor surface. Implemented by the executor; the tool author calls require(...) to obtain a SecretValue wrapper.
The accessor is intentionally narrow — the ACL enforcement happens inside require(...), so the tool author never accidentally unwraps a secret outside the tool's permitted set.
Stable
Methods
require()
Call Signature
require(key, options?): Promise<SecretValue>;Defined in: packages/core/src/contracts/tool.ts:261
Resolve a secret by key. Throws SecretAccessDeniedError if the key is not in the tool's secretsAllowed allowlist; throws SecretRequiredError (or returns null when optional: true) if the key resolves to no value.
Parameters
| Parameter | Type |
|---|---|
key | string |
options? | { optional?: false; } |
options.optional? | false |
Returns
Promise<SecretValue>
Call Signature
require(key, options): Promise<SecretValue | null>;Defined in: packages/core/src/contracts/tool.ts:265
Parameters
| Parameter | Type |
|---|---|
key | string |
options | { optional: true; } |
options.optional | true |
Returns
Promise<SecretValue | null>