Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/tools / / buildToolExecutionContext
Function: buildToolExecutionContext()
ts
function buildToolExecutionContext<TDeps>(opts): ToolExecutionContext<TDeps>;Defined in: packages/tools/src/executor/tool-context.ts:70
Build a ToolExecutionContext for one invocation. The returned context honours the tool's secretsAllowed ACL — calls to ctx.secrets.require(...) for keys outside the allowlist throw SecretAccessDeniedError.
The context also wires the streaming surface: ctx.reportProgress
ctx.streamContentare no-ops when the tool's__streamingHintisfalse.
Type Parameters
| Type Parameter | Default type |
|---|---|
TDeps | unknown |
Parameters
| Parameter | Type |
|---|---|
opts | ToolContextOptions<TDeps> |
Returns
ToolExecutionContext<TDeps>