Graphorin API reference v0.12.1
Graphorin API reference / @graphorin/server / registry / ServerAgentLike
Interface: ServerAgentLike
Defined in: packages/server/src/registry/index.ts:28
Minimal shape the server needs from an Agent. Compatible with the Agent interface from @graphorin/agent but kept structurally so we avoid the peer dependency.
Stable
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
id | readonly | string | packages/server/src/registry/index.ts:29 |
Methods
deserializeState()?
optional deserializeState(serialized): unknown;Defined in: packages/server/src/registry/index.ts:72
Parameters
| Parameter | Type |
|---|---|
serialized | string |
Returns
unknown
run()
run(input, options?): Promise<unknown>;Defined in: packages/server/src/registry/index.ts:30
Parameters
| Parameter | Type | Description |
|---|---|---|
input | unknown | - |
options? | { directive?: { approvals?: readonly { granted: boolean; reason?: string; subRunToolCallId?: string; toolCallId: string; }[]; }; sessionId?: string; signal?: AbortSignal; userId?: string; } | - |
options.directive? | { approvals?: readonly { granted: boolean; reason?: string; subRunToolCallId?: string; toolCallId: string; }[]; } | C3/W-119: HITL resume directive forwarded by POST /runs/:runId/resume. Mirrors the agent package's ResumeDirective structurally. |
options.directive.approvals? | readonly { granted: boolean; reason?: string; subRunToolCallId?: string; toolCallId: string; }[] | - |
options.sessionId? | string | - |
options.signal? | AbortSignal | - |
options.userId? | string | - |
Returns
Promise<unknown>
serializeState()?
optional serializeState(state): string;Defined in: packages/server/src/registry/index.ts:71
Durable-suspension codec (migration 038). @graphorin/agent agents always carry both; optional here so plain run-only fixtures keep working - without them a suspended run stays in-memory only (no restart survival) and a hydrated string state cannot resume.
Parameters
| Parameter | Type |
|---|---|
state | unknown |
Returns
string
stream()?
optional stream(input, options?): AsyncIterable<unknown>;Defined in: packages/server/src/registry/index.ts:57
Streaming surface (IP-2). @graphorin/agent agents satisfy this structurally; POST /agents/:id/stream consumes it and emits every event onto the run's WS subject. Optional so plain run-only fixtures keep working (they emit a single terminal frame).
Parameters
| Parameter | Type |
|---|---|
input | unknown |
options? | { sessionId?: string; signal?: AbortSignal; userId?: string; } |
options.sessionId? | string |
options.signal? | AbortSignal |
options.userId? | string |
Returns
AsyncIterable<unknown>