Graphorin API reference v0.7.0
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
run()
ts
run(input, options?): Promise<unknown>;Defined in: packages/server/src/registry/index.ts:30
Parameters
| Parameter | Type |
|---|---|
input | unknown |
options? | { sessionId?: string; signal?: AbortSignal; userId?: string; } |
options.sessionId? | string |
options.signal? | AbortSignal |
options.userId? | string |
Returns
Promise<unknown>
stream()?
ts
optional stream(input, options?): AsyncIterable<unknown>;Defined in: packages/server/src/registry/index.ts:44
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>