Interface: ServiceSession<THandle>
Defined in: ports/service-session.ts:13
Live background daemon session spawned from a ServiceASTNode within an isolation scope.
Exposes interaction tools unlocked while the service is mounted and a deterministic stop() lifecycle method invoked when the owning skill completes or the step quiesces.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
THandle | unknown | Runtime handle type of the active isolation scope. |
Methods
invokeTool()
invokeTool(
toolName,
args,
ctx
): Promise<ToolExecutionResult>;Defined in: ports/service-session.ts:30
Invokes one of the service session's exposed interaction tools by name.
Executes the interaction request against the running daemon and returns the formatted tool result.
Parameters
| Parameter | Type | Description |
|---|---|---|
toolName | string | Name of the service interaction tool to invoke. |
args | unknown | Tool call arguments supplied by the model. |
ctx | StepExecutionContext<THandle> | Active step execution context. |
Returns
Promise<ToolExecutionResult>
Tool execution result string and error status.
stop()
stop(): Promise<void>;Defined in: ports/service-session.ts:43
Stops the background daemon process, drains open sockets, and releases its daemon runner slot.
Called deterministically when the enclosing skill completes, the step finishes, or the actor suspends.
Returns
Promise<void>
Resolves once the daemon session has terminated cleanly.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
id | readonly | string | Unique identifier of the service AST node that spawned this session. | ports/service-session.ts:15 |
tools | readonly | readonly BuiltInToolASTNode<THandle>[] | Interaction tool AST nodes exposed to the agent while this service session is active. | ports/service-session.ts:17 |