Agent Runtime
Agent Runtime
Run complete agent systems through vendor-neutral drivers, sessions, events, policies, and results
AgentBusyError class
📍 src/agent-runtime/errors.ts:46
Constructor
constructor
constructor(message: string = 'Agent session already has an active run')
Parameters:
message:string(optional) (default:'Agent session already has an active run')
AgentCapabilityUnsupportedError class
📍 src/agent-runtime/errors.ts:23
Constructor
constructor
constructor(capability: string, reason?: string)
Parameters:
capability:stringreason:string | undefined(optional)
AgentDriverConfigurationError class
📍 src/agent-runtime/errors.ts:17
Constructor
constructor
constructor(message: string, cause?: Error)
Parameters:
message:stringcause:Error | undefined(optional)
AgentDriverNotFoundError class
📍 src/agent-runtime/errors.ts:11
Constructor
constructor
constructor(driverId: string)
Parameters:
driverId:string
AgentEventHistoryExpiredError class
📍 src/agent-runtime/errors.ts:52
Constructor
constructor
constructor(runId: string)
Parameters:
runId:string
AgentEventSubscriberOverflowError class
📍 src/agent-runtime/errors.ts:58
Constructor
constructor
constructor(runId: string)
Parameters:
runId:string
AgentNativeExecutionError class
📍 src/agent-runtime/errors.ts:75
Constructor
constructor
constructor(driverId: string, message: string, cause?: Error)
Parameters:
driverId:stringmessage:stringcause:Error | undefined(optional)
AgentPolicyUnsupportedError class
📍 src/agent-runtime/errors.ts:34
Constructor
constructor
constructor(message: string)
Parameters:
message:string
AgentRuntime class
📍 src/agent-runtime/AgentRuntime.ts:20
Constructor
constructor
constructor(options: AgentRuntimeOptions)
Parameters:
options:AgentRuntimeOptions
Methods
agent()
agent(spec: RuntimeAgentSpec): RuntimeAgent
Parameters:
spec:RuntimeAgentSpec
Returns: RuntimeAgent
createAgent()
createAgent(definition: RuntimeAgentDefinition): RuntimeDefinitionAgent
Parameters:
definition:RuntimeAgentDefinition
Returns: RuntimeDefinitionAgent
resumeSession()
async resumeSession(reference: RuntimeSessionReference, options: RuntimeResumeOptions): Promise<RuntimeSession>
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<RuntimeSession>
deleteSession()
async deleteSession(reference: RuntimeSessionReference, options: RuntimeResumeOptions): Promise<void>
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<void>
destroy()
async destroy(): Promise<void>
Returns: Promise<void>
AgentRuntimeDependencyError class
📍 src/agent-runtime/errors.ts:81
Constructor
constructor
constructor(dependency: string, message?: string, cause?: Error)
Parameters:
dependency:stringmessage:string | undefined(optional)cause:Error | undefined(optional)
AgentRunTimeoutError class
📍 src/agent-runtime/errors.ts:69
Constructor
constructor
constructor(timeoutMs: number)
Parameters:
timeoutMs:number
AgentSessionRecoveryError class
📍 src/agent-runtime/errors.ts:100
Observation/admission uncertainty carries a locator; it is never a terminal native result.
Constructor
constructor
constructor(message: string, readonly reference: import('./types.js').RuntimeSessionReference, readonly runId?: string)
Parameters:
message:stringreference:RuntimeSessionReferencerunId:string | undefined(optional)
AgentStructuredOutputError class
📍 src/agent-runtime/errors.ts:93
Constructor
constructor
constructor(message: string, cause?: Error)
Parameters:
message:stringcause:Error | undefined(optional)
AgentWorkspaceError class
📍 src/agent-runtime/errors.ts:40
Constructor
constructor
constructor(message: string, cause?: Error)
Parameters:
message:stringcause:Error | undefined(optional)
ClaudeAgentSdkDriver class
📍 src/agent-runtime/drivers/ClaudeAgentSdkDriver.ts:27
Local, tools-only profile. No native shell, file, web, delegation or ambient plugins.
Constructor
constructor
constructor(private readonly options: ClaudeAgentSdkDriverOptions = {})
Parameters:
options:ClaudeAgentSdkDriverOptions(optional) (default:{})
Methods
inspect()
async inspect(request: Parameters<AgentDriver['inspect']>[0])
Parameters:
request:DriverInspectionContext
Returns: Promise<{ inspection: { toolNamePrefix: string; enforcement: { nativeFilesystem: "native"; nativeCommands: "native"; sandboxNetwork: "native"; providerWebSearch: "native"; }; notes: string[]; }; capabilities: { driverId: string; configuration: { reasoning?: RuntimeReasoningConfig | undefined; model: string; }; capabilities: { [k: string]: { constraints?: { nativeTools: never[]; profile: string; } | undefined; id: string; support: "native"; }; }; }; }>
openSession()
async openSession(request: DriverOpenSessionRequest): Promise<DriverSession>
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()
async restoreSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<{ session: DriverSession }>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; }>
deleteSession()
async deleteSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<void>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
id: "anthropic.agent.sdk" |
- |
ClaudeManagedDriver class
📍 src/agent-runtime/drivers/ClaudeManagedDriver.ts:32
Constructor
constructor
constructor(private readonly options: ClaudeManagedDriverOptions = {})
Parameters:
options:ClaudeManagedDriverOptions(optional) (default:{})
Methods
inspect()
async inspect(request: Parameters<AgentDriver['inspect']>[0])
Parameters:
request:DriverInspectionContext
Returns: Promise<{ inspection: { toolNamePrefix: string; enforcement: { nativeFilesystem: "native"; nativeCommands: "native"; sandboxNetwork: "native"; providerWebSearch: "native"; }; notes: string[]; }; capabilities: { driverId: string; configuration: { reasoning?: RuntimeReasoningConfig | undefined; model: string; }; capabilities: { 'event.reasoning': { id: string; support: "unsupported"; reason: string; }; }; }; }>
openSession()
async openSession(request: DriverOpenSessionRequest): Promise<DriverSession>
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()
async restoreSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<{ session: DriverSession; activeRun?: DriverRun }>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; activeRun?: DriverRun | undefined; }>
deleteSession()
async deleteSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<void>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
id: "anthropic.managed.api" |
- |
CodexSdkDriver class
📍 src/agent-runtime/drivers/CodexSdkDriver.ts:93
Constructor
constructor
constructor(private readonly options: CodexSdkDriverOptions = {})
Parameters:
options:CodexSdkDriverOptions(optional) (default:{})
Methods
inspect()
async inspect(context: Parameters<AgentDriver['inspect']>[0]): Promise<DriverDescriptor>
Parameters:
context:DriverInspectionContext
Returns: Promise<DriverDescriptor>
openSession()
async openSession(request: DriverOpenSessionRequest): Promise<DriverSession>
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()
async restoreSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<{ session: DriverSession }>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; }>
deleteSession()
async deleteSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<void>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
id: "openai.codex.sdk" |
- |
FileRuntimeSessionStorage class
📍 src/agent-runtime/RuntimeSessionStorage.ts:51
Single-host exclusive writer, atomic rename and acknowledged file+directory fsync.
Constructor
constructor
constructor(private readonly directory: string, private readonly maxRecordBytes = 4 * 1024 * 1024)
Parameters:
directory:stringmaxRecordBytes:number(optional) (default:4 * 1024 * 1024)
Methods
acquire()
async acquire(id: string, context: TrustedRuntimeContext): Promise<RuntimeSessionLease>
Parameters:
id:stringcontext:TrustedRuntimeContext
Returns: Promise<RuntimeSessionLease>
Properties
| Property | Type | Description |
|---|---|---|
durability |
durability: "durable" |
- |
InMemoryRuntimeSessionStorage class
📍 src/agent-runtime/RuntimeSessionStorage.ts:26
Constructor
constructor
constructor(private readonly maxRecordBytes = 4 * 1024 * 1024)
Parameters:
maxRecordBytes:number(optional) (default:4 * 1024 * 1024)
Methods
acquire()
async acquire(id: string, context: TrustedRuntimeContext): Promise<RuntimeSessionLease>
Parameters:
id:stringcontext:TrustedRuntimeContext
Returns: Promise<RuntimeSessionLease>
Properties
| Property | Type | Description |
|---|---|---|
durability |
durability: "process" |
- |
LocalExecutionBackend class
📍 src/agent-runtime/LocalExecutionBackend.ts:63
Constructor
constructor
constructor(private readonly options: LocalExecutionBackendOptions)
Parameters:
options:LocalExecutionBackendOptions
Methods
inspect()
async inspect(
spec: Readonly<RuntimeAgentSpec>,
request: AgentInspectionRequest = {},
): Promise<ResolvedAgentCapabilities>
Parameters:
spec:Readonly<RuntimeAgentSpec>request:AgentInspectionRequest(optional) (default:{})
Returns: Promise<ResolvedAgentCapabilities>
openSession()
async openSession(
spec: Readonly<RuntimeAgentSpec>,
options: OpenAgentSessionOptions,
): Promise<AgentSession>
Parameters:
spec:Readonly<RuntimeAgentSpec>options:OpenAgentSessionOptions
Returns: Promise<AgentSession>
resumeSession()
async resumeSession(reference: import('./types.js').RuntimeSessionReference, options: import('./types.js').RuntimeResumeOptions): Promise<import('./types.js').RuntimeSession>
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<RuntimeSession>
deleteSession()
async deleteSession(reference: import('./types.js').RuntimeSessionReference, options: import('./types.js').RuntimeResumeOptions): Promise<void>
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<void>
destroy()
async destroy(): Promise<void>
Returns: Promise<void>
OneRingAIDriver class
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:99
Constructor
constructor
constructor(private readonly options: OneRingAIDriverOptions = {})
Parameters:
options:OneRingAIDriverOptions(optional) (default:{})
Methods
inspect()
async inspect(context: Parameters<AgentDriver['inspect']>[0]): Promise<DriverDescriptor>
Parameters:
context:DriverInspectionContext
Returns: Promise<DriverDescriptor>
openSession()
async openSession(request: DriverOpenSessionRequest): Promise<DriverSession>
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()
async restoreSession(request: DriverOpenSessionRequest & { checkpoint: import('../types.js').JsonObject }): Promise<{ session: DriverSession }>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; }>
Properties
| Property | Type | Description |
|---|---|---|
id |
id: "oneringai.agent" |
- |
OpenAIManagedDriver class
📍 src/agent-runtime/drivers/OpenAIManagedDriver.ts:29
Official managed Codex harness. This is distinct from the client-side OpenAI Agents SDK.
Constructor
constructor
constructor(private readonly options: OpenAIManagedDriverOptions = {})
Parameters:
options:OpenAIManagedDriverOptions(optional) (default:{})
Methods
inspect()
async inspect(request: Parameters<AgentDriver['inspect']>[0])
Parameters:
request:DriverInspectionContext
Returns: Promise<{ inspection: { toolNamePrefix: string; enforcement: { nativeFilesystem: "native"; nativeCommands: "native"; sandboxNetwork: "native"; providerWebSearch: "native"; }; notes: string[]; }; capabilities: { driverId: string; configuration: { reasoning?: RuntimeReasoningConfig | undefined; model: string; }; capabilities: { [k: string]: { constraints?: { profile: string; environment: string; nativeDelegation: boolean; memory: boolean; format: string; } | undefined; id: string; support: "native" | "emulated"; }; }; }; }>
openSession()
async openSession(request: DriverOpenSessionRequest): Promise<DriverSession>
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()
async restoreSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<{ session: DriverSession; activeRun?: DriverRun }>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; activeRun?: DriverRun | undefined; }>
deleteSession()
async deleteSession(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<void>
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
id: "openai.agents.api" |
- |
RuntimeControl class
📍 src/agent-runtime/RuntimeSessionStorage.ts:126
One serialized writer shared by admission, checkpoints and the tool-result outbox.
Constructor
constructor
constructor(readonly lease: RuntimeSessionLease, private record: RuntimeSessionRecord)
Parameters:
lease:RuntimeSessionLeaserecord:RuntimeSessionRecord
Methods
update()
update(change: (data: JsonObject) => void): Promise<void>
Parameters:
change:(data: JsonObject) => void
Returns: Promise<void>
release()
async release(): Promise<void>
Returns: Promise<void>
delete()
async delete(): Promise<void>
Returns: Promise<void>
outbox()
outbox(callId: string, action: () => Promise<JsonObject>, digest = '', recover?: (originalCall?: JsonObject) => Promise<JsonObject | undefined>, admission?: JsonObject): Promise<JsonObject>
Parameters:
callId:stringaction:() => Promise<JsonObject>digest:string(optional) (default:'')recover:((originalCall?: JsonObject | undefined) => Promise<JsonObject | undefined>) | undefined(optional)admission:JsonObject | undefined(optional)
Returns: Promise<JsonObject>
RuntimeHostTools class
📍 src/agent-runtime/RuntimeHostTools.ts:48
Serialized blocking execution through the existing manager, not a second tool pipeline.
Constructor
constructor
constructor(readonly resolution: RuntimeToolResolution, private readonly context: TrustedRuntimeContext, private readonly connectorRegistry?: IConnectorRegistry)
Parameters:
resolution:RuntimeToolResolutioncontext:TrustedRuntimeContextconnectorRegistry:IConnectorRegistry | undefined(optional)
Methods
attachNative()
Called by the native driver after complete Agent construction.
attachNative(agent: Agent): void
Parameters:
agent:Agent
Returns: void
beginRun()
async beginRun(id: string, signal: AbortSignal, stop?: (error: Error) => void, input?: string): Promise<void>
Parameters:
id:stringsignal:AbortSignalstop:((error: Error) => void) | undefined(optional)input:string | undefined(optional)
Returns: Promise<void>
endRun()
async endRun(result: ExternalExecutionResult = {}): Promise<void>
Parameters:
result:ExternalExecutionResult(optional) (default:{})
Returns: Promise<void>
execute()
execute(name: string, args: unknown, callId: string): Promise<RuntimeHostToolResult>
Parameters:
name:stringargs:unknowncallId:string
Returns: Promise<RuntimeHostToolResult>
reconcilePending()
Reconcile retained effects even when a stopped native turn no longer requests their results.
async reconcilePending(reconcile = this.resolution.reconcile): Promise<void>
Parameters:
reconcile:((call: { name: string; args: unknown; callId: string; runId: string; runtimeRunId?: string | undefined; }, context: TrustedRuntimeContext) => Promise<ToolExecutionReport<unknown> | undefined>) | undefined(optional) (default:this.resolution.reconcile)
Returns: Promise<void>
retainedObservation()
Host-only recovery inspection; never serialize this raw source into credentials/control config.
retainedObservation(callId: string): ToolExecutionReport | undefined
Parameters:
callId:string
Returns: ToolExecutionReport<unknown> | undefined
close()
async close(): Promise<void>
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
definitions |
definitions: readonly { name: string; description: string; parameters: JsonObject; }[] |
- |
fingerprint |
fingerprint: string |
- |
control? |
`control: RuntimeControl | undefined` |
AgentCapability interface
📍 src/agent-runtime/types.ts:40
Properties
| Property | Type | Description |
|---|---|---|
id |
id: AgentCapabilityId; |
- |
support |
support: CapabilitySupport; |
- |
constraints? |
constraints?: JsonObject; |
- |
reason? |
reason?: string; |
- |
AgentCapabilityRequirement interface
📍 src/agent-runtime/types.ts:47
Properties
| Property | Type | Description |
|---|---|---|
id |
id: AgentCapabilityId; |
- |
minimum? |
minimum?: Exclude<CapabilitySupport, 'unsupported'>; |
- |
AgentDriver interface
📍 src/agent-runtime/AgentDriver.ts:129
Methods
inspect()
inspect(context: DriverInspectionContext): Promise<DriverDescriptor>;
Parameters:
context:DriverInspectionContext
Returns: Promise<DriverDescriptor>
openSession()
openSession(request: DriverOpenSessionRequest): Promise<DriverSession>;
Parameters:
request:DriverOpenSessionRequest
Returns: Promise<DriverSession>
restoreSession()?
restoreSession?(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<{
session: DriverSession;
activeRun?: DriverRun;
}>;
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<{ session: DriverSession; activeRun?: DriverRun | undefined; }>
deleteSession()?
deleteSession?(request: DriverOpenSessionRequest & { checkpoint: JsonObject }): Promise<void>;
Parameters:
request:DriverOpenSessionRequest & { checkpoint: JsonObject; }
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
readonly id: string; |
- |
AgentEventSubscriptionOptions interface
📍 src/agent-runtime/types.ts:230
Properties
| Property | Type | Description |
|---|---|---|
afterSequence? |
afterSequence?: number; |
Replay only events after this sequence. Throws when that history was evicted. |
AgentExecutionBackend interface
📍 src/agent-runtime/AgentExecutionBackend.ts:13
Methods
inspect()
inspect(
spec: Readonly<RuntimeAgentSpec>,
request?: AgentInspectionRequest,
): Promise<ResolvedAgentCapabilities>;
Parameters:
spec:Readonly<RuntimeAgentSpec>request:AgentInspectionRequest | undefined(optional)
Returns: Promise<ResolvedAgentCapabilities>
openSession()
openSession(
spec: Readonly<RuntimeAgentSpec>,
options: OpenAgentSessionOptions,
): Promise<AgentSession>;
Parameters:
spec:Readonly<RuntimeAgentSpec>options:OpenAgentSessionOptions
Returns: Promise<AgentSession>
resumeSession()?
resumeSession?(reference: RuntimeSessionReference, options: RuntimeResumeOptions): Promise<RuntimeSession>;
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<RuntimeSession>
deleteSession()?
deleteSession?(reference: RuntimeSessionReference, options: RuntimeResumeOptions): Promise<void>;
Parameters:
reference:RuntimeSessionReferenceoptions:RuntimeResumeOptions
Returns: Promise<void>
AgentExecutionPolicy interface
📍 src/agent-runtime/types.ts:115
Properties
| Property | Type | Description |
|---|---|---|
filesystem |
`filesystem: 'denied' | 'read-only' |
commands |
`commands: 'denied' | 'sandboxed';` |
sandboxNetwork |
`sandboxNetwork: 'denied' | 'allowed';` |
providerWebSearch |
`providerWebSearch: 'denied' | 'allowed';` |
approvals |
`approvals: 'deny' | 'interactive';` |
limits? |
`limits?: { |
wallTimeMs?: number;
eventBufferBytes?: number;
outputBytes?: number;
artifactBytes?: number;
};` | - |
AgentInspectionRequest interface
📍 src/agent-runtime/types.ts:129
Properties
| Property | Type | Description |
|---|---|---|
context? |
context?: TrustedRuntimeContext; |
- |
workspace? |
workspace?: WorkspaceRequest; |
- |
policy? |
policy?: AgentExecutionPolicy; |
- |
requiredCapabilities? |
requiredCapabilities?: AgentCapabilityRequirement[]; |
- |
AgentInteractionResponse interface
📍 src/agent-runtime/types.ts:235
Properties
| Property | Type | Description |
|---|---|---|
decision? |
`decision?: 'accept' | 'accept-for-session' |
value? |
value?: JsonValue; |
- |
AgentObservationOptions interface
📍 src/agent-runtime/types.ts:150
Properties
| Property | Type | Description |
|---|---|---|
mode? |
`mode?: 'live' | 'final-only';` |
detail? |
`detail?: 'status' | 'activity' |
AgentRun interface
📍 src/agent-runtime/types.ts:289
Methods
events()
events(options?: AgentEventSubscriptionOptions): AsyncIterable<AgentRunEvent>;
Parameters:
options:AgentEventSubscriptionOptions | undefined(optional)
Returns: AsyncIterable<AgentRunEvent>
cancel()
cancel(reason?: string): Promise<void>;
Parameters:
reason:string | undefined(optional)
Returns: Promise<void>
steer()
steer(input: AgentRunInput): Promise<void>;
Parameters:
input:AgentRunInput
Returns: Promise<void>
respondToInteraction()
respondToInteraction(interactionId: string, response: AgentInteractionResponse): Promise<void>;
Parameters:
interactionId:stringresponse:AgentInteractionResponse
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
readonly id: string; |
- |
sessionId |
readonly sessionId: string; |
- |
result |
readonly result: Promise<AgentRunResult>; |
- |
AgentRunErrorInfo interface
📍 src/agent-runtime/types.ts:250
Properties
| Property | Type | Description |
|---|---|---|
code |
code: string; |
- |
message |
message: string; |
- |
retryable? |
retryable?: boolean; |
- |
details? |
details?: JsonObject; |
- |
AgentRunEvent interface
📍 src/agent-runtime/types.ts:221
Properties
| Property | Type | Description |
|---|---|---|
runId |
readonly runId: string; |
- |
sessionId |
readonly sessionId: string; |
- |
sequence |
readonly sequence: number; |
- |
timestamp |
readonly timestamp: string; |
- |
type |
readonly type: AgentRunEventType; |
- |
data |
readonly data: Readonly<JsonObject>; |
- |
AgentRunOptions interface
📍 src/agent-runtime/types.ts:178
Properties
| Property | Type | Description |
|---|---|---|
signal? |
signal?: AbortSignal; |
- |
model? |
model?: string; |
Per-run override. The driver must advertise run.model_override. |
reasoning? |
reasoning?: RuntimeReasoningConfig; |
Per-run override. The driver must advertise run.reasoning_override. |
responseFormat? |
responseFormat?: RuntimeResponseFormat; |
JSON Schema output requires the driver to advertise run.structured_output. |
metadata? |
metadata?: JsonObject; |
- |
AgentRunResult interface
📍 src/agent-runtime/types.ts:271
Properties
| Property | Type | Description |
|---|---|---|
runId |
runId: string; |
- |
sessionId |
sessionId: string; |
- |
status |
status: AgentRunStatus; |
- |
outputText |
outputText: string; |
- |
outputParsed? |
outputParsed?: JsonValue; |
- |
artifacts |
artifacts: AgentArtifact[]; |
- |
usage? |
usage?: RuntimeUsage; |
- |
finishReason? |
finishReason?: string; |
- |
error? |
error?: AgentRunErrorInfo; |
- |
configuration? |
configuration?: ResolvedAgentConfiguration; |
- |
enforcement? |
`enforcement?: Record<string, 'native' | 'emulated'>;` |
native? |
`native?: { |
driver: string;
sanitized: JsonValue;
};` | - |
AgentRuntimeOptions interface
📍 src/agent-runtime/AgentRuntime.ts:15
Properties
| Property | Type | Description |
|---|---|---|
backend |
backend: AgentExecutionBackend; |
- |
backendOwnership? |
`backendOwnership?: 'owned' | 'borrowed';` |
AgentSession interface
📍 src/agent-runtime/types.ts:300
Methods
run()
run(input: AgentRunInput, options?: AgentRunOptions): Promise<AgentRun>;
Parameters:
input:AgentRunInputoptions:AgentRunOptions | undefined(optional)
Returns: Promise<AgentRun>
cancelActiveRun()
cancelActiveRun(reason?: string): Promise<void>;
Parameters:
reason:string | undefined(optional)
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
id |
readonly id: string; |
- |
agentId |
readonly agentId: string; |
- |
capabilities |
readonly capabilities: ResolvedAgentCapabilities; |
- |
state |
readonly state: AgentSessionState; |
- |
ClaudeAgentSdkDriverOptions interface
📍 src/agent-runtime/drivers/ClaudeAgentSdkDriver.ts:17
Properties
| Property | Type | Description |
|---|---|---|
verifyNativeCheckpoint? |
verifyNativeCheckpoint?: NativeCheckpointVerifier; |
Required before restoring idle native history after observer/process restart. |
loadSdk? |
loadSdk?: () => Promise<ClaudeSdk>; |
- |
modelEfforts? |
`modelEfforts?: Readonly<Record<string, readonly ('low' | 'medium' |
ClaudeManagedDriverOptions interface
📍 src/agent-runtime/drivers/ClaudeManagedDriver.ts:22
Properties
| Property | Type | Description |
|---|---|---|
createClient? |
createClient?: (options: ClientOptions) => Anthropic; |
- |
nativeTools? |
nativeTools?: readonly NativeTool[]; |
- |
environmentIds? |
environmentIds?: readonly string[]; |
- |
workspaceId? |
workspaceId?: string; |
- |
modelEfforts? |
modelEfforts?: Readonly<Record<string, readonly string[]>>; |
- |
maxReconnects? |
maxReconnects?: number; |
- |
CodexSdkDriverOptions interface
📍 src/agent-runtime/drivers/CodexSdkDriver.ts:76
Properties
| Property | Type | Description |
|---|---|---|
verifyNativeCheckpoint? |
verifyNativeCheckpoint?: NativeCheckpointVerifier; |
Required before restoring an idle native thread with prior history. |
loadSdk? |
loadSdk?: () => Promise<{ Codex: CodexConstructor }>; |
Test/embedding seam. Ordinary applications should use the bundled SDK loader. |
modelReasoningEfforts? |
modelReasoningEfforts?: Readonly<Record<string, readonly ModelReasoningEffort[]>>; |
Verified model/effort combinations for models newer than the bundled map. |
| Explicit efforts fail closed when a model has no verified entry. |
DriverDescriptor interface
📍 src/agent-runtime/AgentDriver.ts:36
Properties
| Property | Type | Description |
|---|---|---|
capabilities |
capabilities: ResolvedAgentCapabilities; |
- |
inspection? |
`inspection?: { |
toolNamePrefix?: string;
enforcement?: Record<string, 'native' | 'host' | 'unknown'>;
notes?: string[];
};` | - |
DriverEvent interface
📍 src/agent-runtime/AgentDriver.ts:68
Properties
| Property | Type | Description |
|---|---|---|
type |
`type: |
| 'agent.message.delta'
| 'agent.message.completed'
| 'reasoning.delta'
| 'reasoning.completed'
| 'plan.updated'
| 'agent.iteration.completed'
| 'command.started'
| 'command.output.delta'
| 'command.completed'
| 'file.change.started'
| 'file.changed'
| 'tool.started'
| 'tool.progress'
| 'tool.completed'
| 'interaction.requested'
| 'interaction.resolved'
| 'usage.updated'
| 'diagnostic';` | - |
| data | data: JsonObject; | - |
| timestamp? | timestamp?: string; | - |
DriverInspectionContext interface
📍 src/agent-runtime/AgentDriver.ts:26
Properties
| Property | Type | Description |
|---|---|---|
spec |
spec: Readonly<RuntimeAgentSpec>; |
- |
context? |
context?: TrustedRuntimeContext; |
- |
workspace? |
workspace?: ResolvedWorkspace; |
- |
policy? |
policy?: AgentExecutionPolicy; |
- |
requiredCapabilities |
requiredCapabilities: AgentCapabilityRequirement[]; |
- |
connectorRegistry |
connectorRegistry: IConnectorRegistry; |
- |
durability? |
`durability?: 'process' | 'durable';` |
DriverOpenSessionRequest interface
📍 src/agent-runtime/AgentDriver.ts:45
Properties
| Property | Type | Description |
|---|---|---|
spec |
spec: Readonly<RuntimeAgentSpec>; |
- |
sessionId? |
sessionId?: string; |
- |
control? |
control?: RuntimeControl; |
- |
durability? |
`durability?: 'process' | 'durable';` |
context |
context: TrustedRuntimeContext; |
- |
workspace? |
workspace?: ResolvedWorkspace; |
- |
policy |
policy: AgentExecutionPolicy; |
- |
requiredCapabilities |
requiredCapabilities: AgentCapabilityRequirement[]; |
- |
connectorRegistry |
connectorRegistry: IConnectorRegistry; |
- |
metadata? |
metadata?: JsonObject; |
- |
hostTools? |
hostTools?: RuntimeHostTools; |
- |
DriverRun interface
📍 src/agent-runtime/AgentDriver.ts:105
Methods
cancel()
Requests cancellation; callers confirm termination through result and event completion.
cancel(reason?: string): Promise<void>;
Parameters:
reason:string | undefined(optional)
Returns: Promise<void>
steer()?
steer?(input: AgentRunInput): Promise<void>;
Parameters:
input:AgentRunInput
Returns: Promise<void>
respondToInteraction()?
respondToInteraction?(interactionId: string, response: AgentInteractionResponse): Promise<void>;
Parameters:
interactionId:stringresponse:AgentInteractionResponse
Returns: Promise<void>
Properties
| Property | Type | Description |
|---|---|---|
events |
readonly events: AsyncIterable<DriverEvent>; |
- |
result |
readonly result: Promise<DriverRunResult>; |
Settles only after native execution is terminal and can no longer mutate its workspace. |
DriverRunRequest interface
📍 src/agent-runtime/AgentDriver.ts:59
Properties
| Property | Type | Description |
|---|---|---|
input |
input: AgentRunInput; |
- |
model? |
model?: string; |
- |
reasoning? |
reasoning?: RuntimeReasoningConfig; |
- |
responseFormat? |
responseFormat?: RuntimeResponseFormat; |
- |
signal |
signal: AbortSignal; |
- |
metadata? |
metadata?: JsonObject; |
- |
DriverRunResult interface
📍 src/agent-runtime/AgentDriver.ts:92
Properties
| Property | Type | Description |
|---|---|---|
status |
status: AgentRunStatus; |
- |
outputText |
outputText: string; |
- |
outputParsed? |
outputParsed?: JsonValue; |
- |
artifacts? |
artifacts?: AgentArtifact[]; |
- |
usage? |
usage?: RuntimeUsage; |
- |
finishReason? |
finishReason?: string; |
- |
error? |
error?: AgentRunErrorInfo; |
- |
configuration? |
configuration?: ResolvedAgentConfiguration; |
- |
enforcement? |
`enforcement?: Record<string, 'native' | 'emulated'>;` |
native? |
native?: JsonValue; |
- |
DriverSession interface
📍 src/agent-runtime/AgentDriver.ts:115
Methods
run()
run(request: DriverRunRequest): Promise<DriverRun>;
Parameters:
request:DriverRunRequest
Returns: Promise<DriverRun>
cancelActiveRun()
cancelActiveRun(reason?: string): Promise<void>;
Parameters:
reason:string | undefined(optional)
Returns: Promise<void>
checkpoint()?
checkpoint?(): Promise<JsonObject>;
Returns: Promise<JsonObject>
inspectState()?
inspectState?(): Promise<RuntimeSessionSnapshot>;
Returns: Promise<RuntimeSessionSnapshot>
detach()?
detach?(): Promise<void>;
Returns: Promise<void>
uploadFile()?
uploadFile?(file: { name: string; data: Uint8Array; mediaType: string }): Promise<AgentArtifact>;
Parameters:
file:{ name: string; data: Uint8Array<ArrayBufferLike>; mediaType: string; }
Returns: Promise<AgentArtifact>
downloadArtifact()?
downloadArtifact?(reference: string, limits: { maxBytes: number; mediaTypes: readonly string[] }): Promise<Response>;
Parameters:
reference:stringlimits:{ maxBytes: number; mediaTypes: readonly string[]; }
Returns: Promise<Response>
Properties
| Property | Type | Description |
|---|---|---|
observationIndependent? |
readonly observationIndependent?: boolean; |
Managed native work survives observation loss; only explicit cancellation stops it. |
nativeSessionId? |
readonly nativeSessionId?: string; |
- |
IRuntimeSessionStorage interface
📍 src/agent-runtime/RuntimeSessionStorage.ts:19
Methods
acquire()
acquire(id: string, context: TrustedRuntimeContext): Promise<RuntimeSessionLease>;
Parameters:
id:stringcontext:TrustedRuntimeContext
Returns: Promise<RuntimeSessionLease>
Properties
| Property | Type | Description |
|---|---|---|
durability |
`readonly durability: 'process' | 'durable';` |
LocalAgentFactoryContext interface
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:60
Properties
| Property | Type | Description |
|---|---|---|
spec |
spec: Readonly<RuntimeAgentSpec>; |
- |
context |
context: TrustedRuntimeContext; |
- |
workspaceRoot? |
workspaceRoot?: string; |
- |
policy |
policy: DriverOpenSessionRequest['policy']; |
- |
LocalExecutionBackendOptions interface
📍 src/agent-runtime/LocalExecutionBackend.ts:52
Properties
| Property | Type | Description |
|---|---|---|
drivers |
drivers: AgentDriver[]; |
- |
connectorRegistry? |
connectorRegistry?: IConnectorRegistry; |
- |
maxSessionJournalBytes? |
maxSessionJournalBytes?: number; |
- |
resolveTools? |
resolveTools?: RuntimeToolResolver; |
- |
sessionStorage? |
sessionStorage?: IRuntimeSessionStorage; |
- |
fileTransfer? |
`fileTransfer?: (context: Readonly<import('./types.js').TrustedRuntimeContext>) => RuntimeFileTransferAccess | Promise<RuntimeFileTransferAccess>;` |
OneRingAgentBinding interface
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:67
Properties
| Property | Type | Description |
|---|---|---|
agent |
agent: Agent; |
- |
ownership? |
`ownership?: 'borrowed' | 'owned';` |
OneRingAIDriverOptions interface
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:81
Properties
| Property | Type | Description |
|---|---|---|
definitionStorage? |
definitionStorage?: IAgentDefinitionStorage; |
- |
bindings? |
bindings?: Record<string, OneRingAgentBinding>; |
- |
factories? |
`factories?: Record<string, (context: LocalAgentFactoryContext) => Agent | Promise<Agent>>;` |
modelReasoningControls? |
modelReasoningControls?: Readonly<Record<string, OneRingModelReasoningControls>>; |
Verified controls for models not covered by the bundled map. |
trustAgentPolicy? |
trustAgentPolicy?: boolean; |
Explicit host assertion that every supplied/stored agent's tools and |
| PermissionPolicyManager already enforce the runtime policy. | ||
configurationRevision? |
configurationRevision?: string; |
Complete native-only configuration before Agent initialization. Definition/binding fields remain protected. |
configureAgent? |
configureAgent?: (config: AgentConfig, request: DriverOpenSessionRequest) => AgentConfig; |
- |
additionalToolNames? |
additionalToolNames?: readonly string[]; |
Explicit host-approved plugin/native tool additions for definition mode. |
OneRingModelReasoningControls interface
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:72
Properties
| Property | Type | Description |
|---|---|---|
efforts? |
efforts?: readonly RuntimeReasoningEffort[]; |
Verified model-specific effort values accepted by the underlying provider. |
supportsDisabled? |
supportsDisabled?: boolean; |
True only when thinking.enabled: false is natively enforceable. |
supportsBudgetTokens? |
supportsBudgetTokens?: boolean; |
True only when a fixed reasoning-token budget is natively enforced. |
OpenAgentSessionOptions interface
📍 src/agent-runtime/types.ts:136
Properties
| Property | Type | Description |
|---|---|---|
context |
context: TrustedRuntimeContext; |
- |
workspace? |
workspace?: WorkspaceRequest; |
- |
policy |
policy: AgentExecutionPolicy; |
- |
observation? |
observation?: AgentObservationOptions; |
Live observation is independent from approvals and intervention. |
controlMode? |
controlMode?: AgentControlMode; |
Observe-only is the portable default; steerable sessions require run.steer. |
requiredCapabilities? |
requiredCapabilities?: AgentCapabilityRequirement[]; |
- |
metadata? |
metadata?: JsonObject; |
- |
OpenAIManagedDriverOptions interface
📍 src/agent-runtime/drivers/OpenAIManagedDriver.ts:19
Properties
| Property | Type | Description |
|---|---|---|
createClient? |
createClient?: (options: ClientOptions) => OpenAI; |
- |
modelEfforts? |
modelEfforts?: Readonly<Record<string, readonly string[]>>; |
Endpoint-specific host assertions for models beyond the documented quickstart. |
environmentTemplates? |
environmentTemplates?: readonly string[]; |
Trusted hosted templates whose inherited provisioning configuration was reviewed by the host. |
maxReconnects? |
maxReconnects?: number; |
- |
ResolvedAgentCapabilities interface
📍 src/agent-runtime/types.ts:52
Properties
| Property | Type | Description |
|---|---|---|
driverId |
driverId: string; |
- |
capabilities |
capabilities: Record<string, AgentCapability>; |
- |
configuration? |
configuration?: ResolvedAgentConfiguration; |
- |
inspection? |
inspection?: RuntimeInspectionDetails; |
Present for common definitions; legacy capability descriptors remain unchanged. |
ResolvedAgentConfiguration interface
📍 src/agent-runtime/types.ts:77
Properties
| Property | Type | Description |
|---|---|---|
model? |
model?: string; |
- |
reasoning? |
reasoning?: RuntimeReasoningConfig; |
- |
ResolvedWorkspace interface
📍 src/agent-runtime/types.ts:109
Properties
| Property | Type | Description |
|---|---|---|
type |
type: 'local-directory'; |
- |
root |
root: string; |
- |
identity |
identity: string; |
- |
RuntimeAgent interface
📍 src/agent-runtime/types.ts:310
Methods
inspect()
inspect(request?: AgentInspectionRequest): Promise<ResolvedAgentCapabilities>;
Parameters:
request:AgentInspectionRequest | undefined(optional)
Returns: Promise<ResolvedAgentCapabilities>
openSession()
openSession(options: OpenAgentSessionOptions): Promise<AgentSession>;
Parameters:
options:OpenAgentSessionOptions
Returns: Promise<AgentSession>
Properties
| Property | Type | Description |
|---|---|---|
spec |
readonly spec: Readonly<RuntimeAgentSpec>; |
- |
RuntimeAgentDefinition interface
📍 src/agent-runtime/types.ts:318
A harness-independent task definition. Tools are exact host-resolved names.
Properties
| Property | Type | Description |
|---|---|---|
id |
id: string; |
- |
revision? |
revision?: string; |
- |
name? |
name?: string; |
- |
instructions |
instructions: string; |
- |
tools? |
tools?: readonly string[]; |
- |
requiredCapabilities? |
requiredCapabilities?: readonly AgentCapabilityRequirement[]; |
- |
metadata? |
metadata?: JsonObject; |
- |
RuntimeAgentSpec interface
📍 src/agent-runtime/types.ts:82
Properties
| Property | Type | Description |
|---|---|---|
id |
id: string; |
- |
name? |
name?: string; |
- |
definition? |
definition?: RuntimeAgentDefinition; |
Opt-in logical definition; legacy specs are unchanged. |
environment? |
environment?: RuntimeEnvironmentRequest; |
- |
driver |
driver: string; |
- |
connector? |
connector?: string; |
- |
model? |
model?: string; |
- |
reasoning? |
reasoning?: RuntimeReasoningConfig; |
- |
instructions? |
instructions?: string; |
- |
driverConfig? |
driverConfig?: JsonObject; |
- |
requiredCapabilities? |
requiredCapabilities?: AgentCapabilityRequirement[]; |
- |
metadata? |
metadata?: JsonObject; |
- |
RuntimeArtifactDownload interface
📍 src/agent-runtime/types.ts:392
Properties
| Property | Type | Description |
|---|---|---|
reference |
reference: string; |
- |
path |
path: string; |
New relative file within the host-authorized transfer directory; never overwritten. |
RuntimeDefinitionAgent interface
📍 src/agent-runtime/types.ts:375
Methods
inspect()
inspect(options: RuntimeSessionOptions): Promise<RuntimeInspection>;
Parameters:
options:RuntimeSessionOptions
Returns: Promise<RuntimeInspection>
openSession()
openSession(options: RuntimeSessionOptions): Promise<RuntimeSession>;
Parameters:
options:RuntimeSessionOptions
Returns: Promise<RuntimeSession>
Properties
| Property | Type | Description |
|---|---|---|
definition |
readonly definition: Readonly<RuntimeAgentDefinition>; |
- |
RuntimeExecutionBinding interface
📍 src/agent-runtime/types.ts:327
Properties
| Property | Type | Description |
|---|---|---|
driver |
driver: string; |
- |
connector |
connector: string; |
- |
model |
model: string; |
- |
reasoning? |
reasoning?: RuntimeReasoningConfig; |
- |
driverConfig? |
driverConfig?: JsonObject; |
- |
RuntimeFileTransferAccess interface
📍 src/agent-runtime/RuntimeFileTransfers.ts:8
Properties
| Property | Type | Description |
|---|---|---|
root |
root: string; |
Existing directory owned by the host; keep other processes from renaming its parents. |
maxBytes? |
maxBytes?: number; |
Positive bound, at most 16 MiB; default 1 MiB. |
mediaTypes |
mediaTypes: readonly string[]; |
Exact MIME allowlist, applied to upload declarations and download response headers. |
RuntimeFileUpload interface
📍 src/agent-runtime/types.ts:385
Properties
| Property | Type | Description |
|---|---|---|
path |
path: string; |
Relative path within the host-authorized transfer directory. |
name? |
name?: string; |
Single portable filename, defaulting to the source filename. |
mediaType |
mediaType: string; |
- |
RuntimeHostToolResult interface
📍 src/agent-runtime/RuntimeHostTools.ts:31
Properties
| Property | Type | Description |
|---|---|---|
modelText |
modelText: string; |
- |
outcome |
outcome: ToolExecutionReport['outcome']; |
- |
evidence? |
evidence?: ToolExecutionReport['evidence']; |
- |
rawResult? |
rawResult?: unknown; |
Ephemeral raw return; durable replay uses only the acknowledged model payload. |
RuntimeInspection interface
📍 src/agent-runtime/types.ts:352
Properties
| Property | Type | Description |
|---|---|---|
definitionDigest |
definitionDigest: string; |
- |
recovery |
`recovery: 'process' | 'durable';` |
RuntimeInspectionDetails interface
📍 src/agent-runtime/types.ts:342
Properties
| Property | Type | Description |
|---|---|---|
executionDigest |
executionDigest: string; |
- |
tools |
tools: { name: string; schemaDigest: string; transportName?: string }[]; |
- |
environment |
`environment: RuntimeEnvironmentRequest | { type: 'unspecified' };` |
enforcement |
`enforcement: Record<string, 'native' | 'host' |
accountAccess |
accountAccess: 'unknown'; |
- |
usageCoverage |
usageCoverage: 'native-reported-partial'; |
- |
activityReplay |
activityReplay: 'bounded-process-history'; |
- |
notes |
notes: string[]; |
- |
RuntimeReasoningConfig interface
📍 src/agent-runtime/types.ts:70
Properties
| Property | Type | Description |
|---|---|---|
enabled? |
enabled?: boolean; |
Defaults to true when a reasoning object is supplied. |
effort? |
effort?: RuntimeReasoningEffort; |
- |
budgetTokens? |
budgetTokens?: number; |
- |
RuntimeResumeOptions interface
📍 src/agent-runtime/types.ts:380
Properties
| Property | Type | Description |
|---|---|---|
context |
context: TrustedRuntimeContext; |
- |
observation? |
observation?: AgentObservationOptions; |
- |
RuntimeRunOptions interface
📍 src/agent-runtime/types.ts:364
Properties
| Property | Type | Description |
|---|---|---|
requestId? |
requestId?: string |
- |
RuntimeSession interface
📍 src/agent-runtime/types.ts:365
Methods
run()
run(input: AgentRunInput, options?: RuntimeRunOptions): Promise<AgentRun>;
Parameters:
input:AgentRunInputoptions:RuntimeRunOptions | undefined(optional)
Returns: Promise<AgentRun>
reference()
reference(): RuntimeSessionReference;
Returns: RuntimeSessionReference
inspectState()
inspectState(): Promise<RuntimeSessionSnapshot>;
Returns: Promise<RuntimeSessionSnapshot>
getRun()
getRun(runId: string): Promise<AgentRun>;
Parameters:
runId:string
Returns: Promise<AgentRun>
detach()
detach(): Promise<void>;
Returns: Promise<void>
uploadFile()
Host-only transfers within the backend's explicitly authorized directory.
uploadFile(request: RuntimeFileUpload): Promise<AgentArtifact>;
Parameters:
request:RuntimeFileUpload
Returns: Promise<AgentArtifact>
downloadArtifact()
downloadArtifact(request: RuntimeArtifactDownload): Promise<{ path: string; bytes: number; mediaType: string }>;
Parameters:
request:RuntimeArtifactDownload
Returns: Promise<{ path: string; bytes: number; mediaType: string; }>
RuntimeSessionLease interface
📍 src/agent-runtime/RuntimeSessionStorage.ts:12
Methods
read()
read(): Promise<RuntimeSessionRecord | undefined>;
Returns: Promise<RuntimeSessionRecord | undefined>
write()
expectedRevision is 0 for creation. Revision conflicts never overwrite another writer.
write(data: JsonObject, expectedRevision: number): Promise<RuntimeSessionRecord>;
Parameters:
data:JsonObjectexpectedRevision:number
Returns: Promise<RuntimeSessionRecord>
delete()
delete(): Promise<void>;
Returns: Promise<void>
release()
release(): Promise<void>;
Returns: Promise<void>
RuntimeSessionOptions interface
📍 src/agent-runtime/types.ts:338
Properties
| Property | Type | Description |
|---|---|---|
execution |
execution: RuntimeExecutionBinding; |
- |
environment? |
environment?: RuntimeEnvironmentRequest; |
- |
RuntimeSessionRecord interface
📍 src/agent-runtime/RuntimeSessionStorage.ts:11
Acknowledged control snapshots, separate from tool evidence and token activity.
Properties
| Property | Type | Description |
|---|---|---|
version |
version: 1; |
- |
id |
id: string; |
- |
revision |
revision: number; |
- |
scope |
scope: string; |
- |
data |
data: JsonObject |
- |
RuntimeSessionReference interface
📍 src/agent-runtime/types.ts:356
Properties
| Property | Type | Description |
|---|---|---|
version |
version: 1; |
- |
id |
id: string |
- |
RuntimeSessionSnapshot interface
📍 src/agent-runtime/types.ts:357
Properties
| Property | Type | Description |
|---|---|---|
connection |
`connection: 'attached' | 'reconnecting';` |
activity |
`activity: 'ready' | 'running' |
activeRunId? |
activeRunId?: string; |
- |
waitReason? |
waitReason?: string; |
- |
unresolvedEffects |
unresolvedEffects: boolean; |
- |
RuntimeToolResolution interface
📍 src/agent-runtime/RuntimeHostTools.ts:17
Executable host objects never enter a saved definition or provider request.
Properties
| Property | Type | Description |
|---|---|---|
tools |
tools: readonly ToolFunction[]; |
- |
fingerprint |
fingerprint: string; |
Includes host authorization, connector selections, implementation and evidence revisions. |
manager? |
manager?: ToolManager; |
Retain an existing C7 manager and its evidence handle; never clone its proxies. |
owner? |
owner?: Agent; |
- |
ownership? |
`ownership?: 'owned' | 'borrowed';` |
permissionManager? |
permissionManager?: PermissionPolicyManager; |
- |
toolContext? |
`toolContext?: Omit<ToolContext, 'userId' | 'signal'>;` |
reconcile? |
`reconcile?: (call: { name: string; args: unknown; callId: string; runId: string; runtimeRunId?: string }, context: TrustedRuntimeContext) => Promise<ToolExecutionReport | undefined>;` |
onRetainedObservation? |
onRetainedObservation?: (callId: string, report: ToolExecutionReport) => void; |
- |
RuntimeUsage interface
📍 src/agent-runtime/types.ts:240
Properties
| Property | Type | Description |
|---|---|---|
inputTokens? |
inputTokens?: number; |
- |
cachedInputTokens? |
cachedInputTokens?: number; |
- |
cacheWriteInputTokens? |
cacheWriteInputTokens?: number; |
- |
outputTokens? |
outputTokens?: number; |
- |
reasoningTokens? |
reasoningTokens?: number; |
- |
totalTokens? |
totalTokens?: number; |
- |
native? |
native?: JsonObject; |
- |
TrustedRuntimeContext interface
📍 src/agent-runtime/types.ts:98
Properties
| Property | Type | Description |
|---|---|---|
tenantId? |
tenantId?: string; |
- |
userId? |
userId?: string; |
- |
groupId? |
groupId?: string; |
- |
metadata? |
metadata?: JsonObject; |
- |
AgentArtifact type
📍 src/agent-runtime/types.ts:257
type AgentArtifact = | {
type: 'workspace-change';
path: string;
change: 'created' | 'modified' | 'deleted';
patch?: string;
}
| {
type: 'reference';
name: string;
mediaType?: string;
reference: string;
}
AgentCapabilityId type
📍 src/agent-runtime/types.ts:13
type AgentCapabilityId = | 'session.continue'
| 'session.restore'
| 'run.cancel'
| 'run.structured_output'
| 'run.model_override'
| 'run.reasoning_override'
| 'run.interaction'
| 'run.approval'
| 'run.user_input'
| 'run.steer'
| 'input.image'
| 'event.live'
| 'event.message'
| 'event.reasoning'
| 'event.plan'
| 'event.command'
| 'event.command_output'
| 'event.file_change'
| 'event.tool'
| 'event.tool_progress'
| 'isolation.workspace'
| 'isolation.tenant'
| (string & {})
AgentControlMode type
📍 src/agent-runtime/types.ts:148
type AgentControlMode = 'observe-only' | 'steerable'
AgentInputPart type
📍 src/agent-runtime/types.ts:164
type AgentInputPart = | { type: 'text'; text: string }
/** Local image input; requires the driver to advertise input.image. */
| { type: 'workspace-file'; path: string; mediaType?: string }
AgentRunEventType type
📍 src/agent-runtime/types.ts:199
type AgentRunEventType = | 'run.started'
| 'agent.message.delta'
| 'agent.message.completed'
| 'reasoning.delta'
| 'reasoning.completed'
| 'plan.updated'
| 'agent.iteration.completed'
| 'command.started'
| 'command.output.delta'
| 'command.completed'
| 'file.change.started'
| 'file.changed'
| 'tool.started'
| 'tool.progress'
| 'tool.completed'
| 'interaction.requested'
| 'interaction.resolved'
| 'usage.updated'
| 'diagnostic'
| 'run.finished'
AgentRunInput type
📍 src/agent-runtime/types.ts:157
type AgentRunInput = | string
| {
parts: AgentInputPart[];
metadata?: JsonObject;
}
AgentRunStatus type
📍 src/agent-runtime/types.ts:197
type AgentRunStatus = 'completed' | 'failed' | 'cancelled' | 'incomplete'
AgentSessionState type
📍 src/agent-runtime/types.ts:189
type AgentSessionState = | 'opening'
| 'ready'
| 'running'
| 'failed'
| 'destroying'
| 'destroyed'
CapabilitySupport type
📍 src/agent-runtime/types.ts:38
type CapabilitySupport = 'native' | 'emulated' | 'unsupported'
JsonObject type
📍 src/agent-runtime/types.ts:11
type JsonObject = { [key: string]: JsonValue }
JsonValue type
📍 src/agent-runtime/types.ts:3
type JsonValue = | null
| boolean
| number
| string
| JsonValue[]
| { [key: string]: JsonValue }
NativeCheckpointVerifier type
📍 src/agent-runtime/NativeStateDirectory.ts:29
Trusted host assertion of complete native transcript/dependency recovery; never send a task to probe.
type NativeCheckpointVerifier = (state: { directory: string; nativeSessionId: string }, request: import('./AgentDriver.js').DriverOpenSessionRequest) => Promise<void>
OneRingAgentSource type
📍 src/agent-runtime/drivers/OneRingAIDriver.ts:55
type OneRingAgentSource = | { type: 'stored-definition'; agentId: string }
| { type: 'binding'; name: string }
| { type: 'factory'; name: string }
RuntimeEnvironmentRequest type
📍 src/agent-runtime/types.ts:334
type RuntimeEnvironmentRequest = | { type: 'none' }
| { type: 'local-directory'; path: string }
| { type: 'provider-managed'; reference?: string }
RuntimeReasoningEffort type
📍 src/agent-runtime/types.ts:60
type RuntimeReasoningEffort = | 'none'
| 'minimal'
| 'low'
| 'medium'
| 'high'
| 'xhigh'
| 'max'
| 'ultra'
RuntimeResponseFormat type
📍 src/agent-runtime/types.ts:169
type RuntimeResponseFormat = | { type: 'text' }
| {
type: 'json_schema';
name?: string;
schema: JsonObject;
strict?: boolean;
}
RuntimeToolResolver type
📍 src/agent-runtime/RuntimeHostTools.ts:38
type RuntimeToolResolver = (
names: readonly string[],
context: Readonly<TrustedRuntimeContext>,
) => RuntimeToolResolution | Promise<RuntimeToolResolution>
WorkspaceRequest type
📍 src/agent-runtime/types.ts:105
type WorkspaceRequest = | { type: 'local-directory'; path: string }
| { type: 'managed'; reference: string }