Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/security / / BridgedSourceOptions
Interface: BridgedSourceOptions
Defined in: packages/security/src/sandbox/bridged-source.ts:52
Options for runBridgedSource.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
abortGraceMs? | readonly | number | Grace (ms) after abort before forcible terminate(). Default 100. | packages/security/src/sandbox/bridged-source.ts:81 |
allowedTools | readonly | readonly string[] | Names the script may call as tools.<name>(args). | packages/security/src/sandbox/bridged-source.ts:60 |
dispatch | readonly | (call) => Promise<unknown> | Host bridge invoked for each tools.<name>(args) call. Resolve with the tool's output (structured-clone safe) or reject to surface an error to the script. Calls for a name not in allowedTools are rejected by the runner before dispatch is consulted. | packages/security/src/sandbox/bridged-source.ts:67 |
maxMemoryMb? | readonly | number | Memory ceiling (MB) for the worker. Omitted ⇒ Node default. | packages/security/src/sandbox/bridged-source.ts:71 |
maxToolCalls? | readonly | number | Ceiling on bridged tool calls per run. Default 64. | packages/security/src/sandbox/bridged-source.ts:79 |
noFilesystem? | readonly | boolean | Block filesystem (node:fs/…) imports. Default true. | packages/security/src/sandbox/bridged-source.ts:75 |
noNetwork? | readonly | boolean | Block outbound network (fetch + node:http/net/…). Default true. | packages/security/src/sandbox/bridged-source.ts:73 |
signal? | readonly | AbortSignal | Cancellation signal; aborts the run and terminates the worker. | packages/security/src/sandbox/bridged-source.ts:77 |
source | readonly | string | Model-written JavaScript, evaluated as the body of an async (tools) => { … } function. A top-level return yields the final result; the value must be structured-clone safe. | packages/security/src/sandbox/bridged-source.ts:58 |
timeoutMs? | readonly | number | Hard wall-clock timeout (ms) for the whole script. Default 30000. | packages/security/src/sandbox/bridged-source.ts:69 |
warn? | readonly | (message) => void | Optional WARN logger. | packages/security/src/sandbox/bridged-source.ts:83 |