@xneog/dsh-subagent 0.1.0 → 0.1.3-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +108 -76
- package/README.zh.md +112 -80
- package/lib/index.js +1258 -718
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +923 -0
- package/lib/typert.remote-client.d.ts +27 -0
- package/lib/typert.remote-client.js +159 -0
- package/lib/types/assistant-output.d.ts +3 -3
- package/lib/types/assistant-output.js +8 -4
- package/lib/types/child-agent.d.ts +16 -5
- package/lib/types/child-agent.js +51 -13
- package/lib/types/client.d.ts +2 -1
- package/lib/types/client.js +1 -1
- package/lib/types/continuation.d.ts +100 -72
- package/lib/types/continuation.js +439 -169
- package/lib/types/control-types.d.ts +144 -0
- package/lib/types/control-types.js +9 -0
- package/lib/types/control.d.ts +67 -0
- package/lib/types/control.js +115 -0
- package/lib/types/descriptor-seed.d.ts +1 -1
- package/lib/types/descriptor-seed.js +1 -1
- package/lib/types/descriptor.d.ts +6 -1
- package/lib/types/descriptor.js +6 -2
- package/lib/types/index.d.ts +103 -69
- package/lib/types/index.js +436 -287
- package/lib/types/internal.d.ts +59 -0
- package/lib/types/internal.js +58 -0
- package/lib/types/lifecycle.js +4 -3
- package/lib/types/list-children.d.ts +12 -59
- package/lib/types/list-children.js +166 -101
- package/lib/types/out-of-process.d.ts +5 -2
- package/lib/types/out-of-process.js +42 -4
- package/lib/types/projection-types.d.ts +4 -3
- package/lib/types/projection.d.ts +55 -8
- package/lib/types/projection.js +33 -17
- package/lib/types/run-settlement.js +17 -6
- package/lib/types/types.d.ts +25 -0
- package/package.json +67 -37
- package/lib/types/activation-setup-registry.d.ts +0 -57
- package/lib/types/activation-setup-registry.js +0 -148
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
/* Generated by @xneog/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
|
+
import { z } from 'zod'
|
|
3
|
+
|
|
4
|
+
const _xneog_dsh_subagent_subagents_interruptByParent_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
5
|
+
const _xneog_dsh_subagent_subagents_interruptByParent_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
6
|
+
const _xneog_dsh_subagent_subagents_interruptByParent_parameter_2$schema = z.literal("continuable")
|
|
7
|
+
const _xneog_dsh_subagent_subagents_interruptByParent_result$schema = z.object({
|
|
8
|
+
'accepted': z.literal(true).readonly(),
|
|
9
|
+
})
|
|
10
|
+
const _xneog_dsh_subagent_subagents_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
11
|
+
const _xneog_dsh_subagent_subagents_list_result$schema = z.object({
|
|
12
|
+
'entries': z.array(z.union([z.intersection(z.object({
|
|
13
|
+
'kind': z.literal("child").readonly(),
|
|
14
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
15
|
+
'activity': z.union([z.literal("running"), z.literal("inactive")]).readonly(),
|
|
16
|
+
'hasChildren': z.boolean().readonly(),
|
|
17
|
+
}), z.object({
|
|
18
|
+
'mode': z.literal("one-shot").readonly(),
|
|
19
|
+
'label': z.string().readonly().optional(),
|
|
20
|
+
})), z.intersection(z.object({
|
|
21
|
+
'kind': z.literal("child").readonly(),
|
|
22
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
23
|
+
'activity': z.union([z.literal("running"), z.literal("inactive")]).readonly(),
|
|
24
|
+
'hasChildren': z.boolean().readonly(),
|
|
25
|
+
}), z.object({
|
|
26
|
+
'mode': z.literal("continuable").readonly(),
|
|
27
|
+
'label': z.string().readonly(),
|
|
28
|
+
})), z.object({
|
|
29
|
+
'kind': z.literal("diagnostic").readonly(),
|
|
30
|
+
'id': z.intersection(z.string(), z.unknown()).readonly(),
|
|
31
|
+
'reason': z.union([z.literal("corrupt"), z.literal("unsupported"), z.literal("unavailable")]).readonly(),
|
|
32
|
+
})])).readonly(),
|
|
33
|
+
'parentAvailable': z.boolean().readonly(),
|
|
34
|
+
})
|
|
35
|
+
const _xneog_dsh_subagent_subagents_prompt_parameter_0$schema = z.object({
|
|
36
|
+
'requestId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
37
|
+
'parentSessionId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
38
|
+
'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
39
|
+
'mode': z.literal("continuable").readonly(),
|
|
40
|
+
'content': z.array(z.union([z.object({
|
|
41
|
+
'type': z.literal("text").readonly(),
|
|
42
|
+
'text': z.string().readonly(),
|
|
43
|
+
}), z.object({
|
|
44
|
+
'type': z.literal("image").readonly(),
|
|
45
|
+
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
46
|
+
'data': z.string().readonly(),
|
|
47
|
+
'name': z.string().readonly().optional(),
|
|
48
|
+
})])).readonly(),
|
|
49
|
+
'clientTimeZone': z.string().readonly().optional(),
|
|
50
|
+
})
|
|
51
|
+
const _xneog_dsh_subagent_subagents_prompt_result$schema = z.object({
|
|
52
|
+
'messageId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
export const TYPERT = {
|
|
56
|
+
package: '@xneog/dsh-subagent',
|
|
57
|
+
face: 'host',
|
|
58
|
+
schemas: [
|
|
59
|
+
],
|
|
60
|
+
invocations: [
|
|
61
|
+
{
|
|
62
|
+
id: '@xneog/dsh-subagent#subagents/interruptByParent',
|
|
63
|
+
service: 'subagents',
|
|
64
|
+
namespace: 'subagents',
|
|
65
|
+
method: 'interruptByParent',
|
|
66
|
+
invocation: { kind: 'direct' },
|
|
67
|
+
parameters: [
|
|
68
|
+
{
|
|
69
|
+
name: 'childSessionId',
|
|
70
|
+
wire: 'childSessionId',
|
|
71
|
+
source: 'json',
|
|
72
|
+
codec: {
|
|
73
|
+
mode: 'strict',
|
|
74
|
+
typeSymbol: '@xneog/dsh-session/types#SessionId',
|
|
75
|
+
schema: _xneog_dsh_subagent_subagents_interruptByParent_parameter_0$schema,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: 'parentSessionId',
|
|
80
|
+
wire: 'parentSessionId',
|
|
81
|
+
source: 'json',
|
|
82
|
+
codec: {
|
|
83
|
+
mode: 'strict',
|
|
84
|
+
typeSymbol: '@xneog/dsh-session/types#SessionId',
|
|
85
|
+
schema: _xneog_dsh_subagent_subagents_interruptByParent_parameter_1$schema,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'mode',
|
|
90
|
+
wire: 'mode',
|
|
91
|
+
source: 'json',
|
|
92
|
+
codec: {
|
|
93
|
+
mode: 'strict',
|
|
94
|
+
typeSymbol: '@xneog/dsh-subagent#subagents/interruptByParent:mode',
|
|
95
|
+
schema: _xneog_dsh_subagent_subagents_interruptByParent_parameter_2$schema,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
result: {
|
|
100
|
+
mode: 'strict',
|
|
101
|
+
typeSymbol: '@xneog/dsh-subagent/client#SubagentInterruptReceipt',
|
|
102
|
+
schema: _xneog_dsh_subagent_subagents_interruptByParent_result$schema,
|
|
103
|
+
},
|
|
104
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":480,"column":3},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: '@xneog/dsh-subagent#subagents/list',
|
|
108
|
+
service: 'subagents',
|
|
109
|
+
namespace: 'subagents',
|
|
110
|
+
method: 'list',
|
|
111
|
+
implementation: 'remoteExportList',
|
|
112
|
+
invocation: { kind: 'direct' },
|
|
113
|
+
parameters: [
|
|
114
|
+
{
|
|
115
|
+
name: 'parentSessionId',
|
|
116
|
+
wire: 'parentSessionId',
|
|
117
|
+
source: 'json',
|
|
118
|
+
codec: {
|
|
119
|
+
mode: 'strict',
|
|
120
|
+
typeSymbol: '@xneog/dsh-session/types#SessionId',
|
|
121
|
+
schema: _xneog_dsh_subagent_subagents_list_parameter_0$schema,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
cancellation: { parameter: 'signal' },
|
|
126
|
+
result: {
|
|
127
|
+
mode: 'strict',
|
|
128
|
+
typeSymbol: '@xneog/dsh-subagent/client#SubagentCatalog',
|
|
129
|
+
schema: _xneog_dsh_subagent_subagents_list_result$schema,
|
|
130
|
+
},
|
|
131
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":387,"column":9},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: '@xneog/dsh-subagent#subagents/prompt',
|
|
135
|
+
service: 'subagents',
|
|
136
|
+
namespace: 'subagents',
|
|
137
|
+
method: 'prompt',
|
|
138
|
+
invocation: { kind: 'direct' },
|
|
139
|
+
parameters: [
|
|
140
|
+
{
|
|
141
|
+
name: 'request',
|
|
142
|
+
wire: 'request',
|
|
143
|
+
source: 'json',
|
|
144
|
+
codec: {
|
|
145
|
+
mode: 'strict',
|
|
146
|
+
typeSymbol: '@xneog/dsh-subagent/client#SubagentPromptRequest',
|
|
147
|
+
schema: _xneog_dsh_subagent_subagents_prompt_parameter_0$schema,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
cancellation: { parameter: 'signal' },
|
|
152
|
+
result: {
|
|
153
|
+
mode: 'strict',
|
|
154
|
+
typeSymbol: '@xneog/dsh-subagent/client#SubagentPromptReceipt',
|
|
155
|
+
schema: _xneog_dsh_subagent_subagents_prompt_result$schema,
|
|
156
|
+
},
|
|
157
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":413,"column":9},
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
model: {
|
|
161
|
+
"services": [
|
|
162
|
+
{
|
|
163
|
+
"description": "Named provider registry with one-shot runs, durable discovery, and continuable-child operations.",
|
|
164
|
+
"summary": "Named provider registry with one-shot runs, durable discovery, and continuable-child operations.",
|
|
165
|
+
"tags": [],
|
|
166
|
+
"jsDoc": "/** Named provider registry with one-shot runs, durable discovery, and continuable-child operations. */",
|
|
167
|
+
"key": "subagents",
|
|
168
|
+
"exportName": "SubagentRuntime",
|
|
169
|
+
"members": [
|
|
170
|
+
{
|
|
171
|
+
"kind": "method",
|
|
172
|
+
"name": "startContinuable",
|
|
173
|
+
"signature": "async startContinuable(spec: ContinuableStartSpec): Promise<ContinuableStart>",
|
|
174
|
+
"summary": "Establish one durable continuable child and deliver its initial prompt.",
|
|
175
|
+
"jsDoc": "/**\n * Establish one durable continuable child and deliver its initial prompt.\n * Resolves when the child's inbox accepts that prompt, without waiting for the\n * turn to start or for the message to reach the Session log; any earlier\n * failure rejects with no ids and rolls back the child entirely.\n * @param spec - provider, delegation request, and caller cancellation.\n * @returns the durable child id and the accepted prompt's message id.\n * @throws when continuation services are unavailable or materialization fails.\n */"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"kind": "method",
|
|
179
|
+
"name": "sendMessage",
|
|
180
|
+
"signature": "async sendMessage( sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions, ): Promise<MessageId>",
|
|
181
|
+
"summary": "Steer one model-authored message to the sender's direct parent or direct continuable child.",
|
|
182
|
+
"jsDoc": "/**\n * Steer one model-authored message to the sender's direct parent or direct\n * continuable child. A running target admits it at the nearest step boundary;\n * an idle target starts a turn, and an absent direct child cold-resumes from\n * persistence. The service derives durable sender attribution from the exact\n * live sender. Caller cancellation stops only pre-acceptance work.\n * @param sender - exact live Agent authorizing and originating the message.\n * @param targetId - durable direct-parent or direct-child session id.\n * @param content - model-authored content to deliver.\n * @param options - caller cancellation before inbox acceptance.\n * @returns the accepted message's inbox id.\n * @throws when continuation services are unavailable, adjacency is rejected,\n * or the message was not admitted.\n */"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "method",
|
|
186
|
+
"name": "interrupt",
|
|
187
|
+
"signature": "interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void",
|
|
188
|
+
"summary": "Interrupt one live continuable child's current turn under a human parent address or an exact live ancestor Agent.",
|
|
189
|
+
"jsDoc": "/**\n * Interrupt one live continuable child's current turn under a human parent\n * address or an exact live ancestor Agent. Fire-and-return: the cancel\n * signal is issued before this returns, but the target may keep running\n * until it observes the signal. Unclaimed pending inbox work, the Activation,\n * and published descendants are preserved; claimed work is not requeued.\n * Once the interrupted driver is idle, a waking send resumes the parked FIFO\n * queue. An absent target — including a one-shot or unknown id —\n * is an accepted no-op, as is a manager-less composition, which cannot own a\n * live Activation.\n * @param targetSessionId - the durable child session id to interrupt.\n * @param authority - the human parent address or exact live ancestor Agent.\n * @throws {SubagentError} `UNAUTHORIZED` when the authority does not own the\n * live target.\n */"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"kind": "method",
|
|
193
|
+
"name": "drainContinuableDescendants",
|
|
194
|
+
"signature": "async drainContinuableDescendants(parents: readonly Agent[]): Promise<void>",
|
|
195
|
+
"summary": "Close continuable admission below exact live parent Agents, stop only their visible descendant Activations synchronously, then await admitted scoped materializations and release those forests child-first.",
|
|
196
|
+
"jsDoc": "/**\n * Close continuable admission below exact live parent Agents, stop only their\n * visible descendant Activations synchronously, then await admitted scoped\n * materializations and release those forests child-first. The scoped cutoff\n * lasts until each exact parent leaves the registry; unrelated parent trees\n * remain live.\n * @param parents - exact host-owned parent Agents entering teardown.\n * @returns once every retained descendant Activation released its `AgentHandle`.\n * @throws an aggregate error after all branches settle when any failed.\n */"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "method",
|
|
200
|
+
"name": "drainContinuableChildren",
|
|
201
|
+
"signature": "async drainContinuableChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>",
|
|
202
|
+
"summary": "Release selected resident continuable direct children of one exact live parent.",
|
|
203
|
+
"jsDoc": "/**\n * Release selected resident continuable direct children of one exact live\n * parent. Other children of the same parent remain admitted and resident.\n * Absent targets and a manager-less composition are accepted no-ops.\n * @param parent - exact live direct parent authorizing the selected release.\n * @param childIds - durable direct-child ids to release when resident.\n * @returns once every selected Activation released its `AgentHandle`.\n * @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a\n * different parent or the supplied parent identity is stale.\n */"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "method",
|
|
207
|
+
"name": "listChildren",
|
|
208
|
+
"signature": "listChildren(parentSessionId: SessionId, signal?: AbortSignal): Promise<SubagentListEntry[]>",
|
|
209
|
+
"summary": "Enumerate the parent's direct session-backed subagents without loading or resuming an Agent.",
|
|
210
|
+
"jsDoc": "/**\n * Enumerate the parent's direct session-backed subagents without loading or\n * resuming an Agent. The Session query service supplies one live-preferred\n * corpus and shared point observations; the projection cache supplies\n * immutable descriptor hits without opening cold logs. The registered\n * `subagent` projection remains the sole mode/label classifier.\n *\n * Every query receives `signal`, and the listing rechecks cancellation\n * around each await. Read rejections that settle\n * after an abort become a stable `SubagentError` with code `CANCELLED`.\n * @param parentSessionId - parent session whose direct children are listed.\n * @param signal - caller-owned cancellation forwarded to Session queries\n * and observed around every read await.\n * @returns children and per-child diagnostics ordered by `createdAt`, then id.\n * @throws {@link SubagentError} when the projection registry or the session\n * store is not mounted, or the caller cancels the listing.\n */"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"kind": "method",
|
|
214
|
+
"name": "listDescendants",
|
|
215
|
+
"signature": "listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>",
|
|
216
|
+
"summary": "Enumerate the root's complete session-backed subagent tree in stable pre-order from one live-preferred corpus, without loading or resuming an Agent.",
|
|
217
|
+
"jsDoc": "/**\n * Enumerate the root's complete session-backed subagent tree in stable\n * pre-order from one live-preferred corpus, without loading or resuming an\n * Agent. Ordinary sessions and one-shot children remain traversal nodes so\n * continuable descendants below them are discovered; each returned entry\n * adds its durable `parentId` and root-relative `depth`. Identity resolution,\n * diagnostics, optional persistence, and cancellation follow the same\n * projection-backed contract as {@link listChildren}.\n * @param rootSessionId - session whose complete descendant tree is listed.\n * @param signal - caller-owned cancellation forwarded to persistence reads\n * and observed around every read await.\n * @returns children and per-candidate diagnostics with tree position, in\n * stable pre-order.\n * @throws {@link SubagentError} under the same conditions as {@link listChildren}.\n */"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"kind": "method",
|
|
221
|
+
"name": "remoteExportList",
|
|
222
|
+
"signature": "@Remote('list') async remoteExportList(parentSessionId: SessionId, signal: AbortSignal): Promise<SubagentCatalog>",
|
|
223
|
+
"summary": "Remote face of {@link listChildren} for one browser: the durable listing plus live Agent activity and the delivery-time parent availability hint.",
|
|
224
|
+
"jsDoc": "/**\n * Remote face of {@link listChildren} for one browser: the durable listing\n * plus live Agent activity and the delivery-time parent availability hint.\n * Parent availability is a hint; {@link prompt} performs the authoritative\n * check. Named apart from the provider-name {@link list}, which owns the\n * member.\n * @param parentSessionId - parent session whose direct children are listed.\n * @param signal - carrier cancellation forwarded to Session queries.\n * @returns the catalog view for that parent.\n * @throws {RemoteError} `gateway/bad-request` for an empty parent id,\n * `gateway/cancelled` for an aborted read, `subagent/projections-unavailable` when\n * the deployment has no projection registry, otherwise `gateway/internal`.\n */"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"kind": "method",
|
|
228
|
+
"name": "prompt",
|
|
229
|
+
"signature": "@Remote('prompt') async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>",
|
|
230
|
+
"summary": "Deliver one browser-authored message to a continuable child through the exact live direct parent, retaining the caller-minted request identity and validated browser zone on the accepted message.",
|
|
231
|
+
"jsDoc": "/**\n * Deliver one browser-authored message to a continuable child through the\n * exact live direct parent, retaining the caller-minted request identity and\n * validated browser zone on the accepted message. Success identifies the\n * message the child's FIFO inbox accepted; later execution is independent of\n * this call.\n * Image parts are admitted and persisted through the attachment store\n * before delivery, and the child's model must accept image input.\n * @param request - durable address, minted identity, content, and optional browser zone.\n * @param signal - carrier cancellation, owning the call until inbox acceptance.\n * @returns the accepted message's inbox identity.\n * @throws {RemoteError} `gateway/bad-request`, `subagent/attachment-invalid`,\n * `subagent/invalid-time-zone`, `subagent/parent-unavailable`,\n * `subagent/not-resumable`, `subagent/unauthorized`,\n * `subagent/delivery-unavailable`, `gateway/cancelled`, or `gateway/internal`.\n */"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"kind": "method",
|
|
235
|
+
"name": "interruptByParent",
|
|
236
|
+
"signature": "@Remote('interruptByParent') interruptByParent( childSessionId: SessionId, parentSessionId: SessionId, mode: 'continuable', ): SubagentInterruptReceipt",
|
|
237
|
+
"summary": "Remote face of {@link interrupt} under one durable parent address.",
|
|
238
|
+
"jsDoc": "/**\n * Remote face of {@link interrupt} under one durable parent address. No\n * catalog, history, persistence, or parent Agent lookup runs: the core\n * primitive alone authorizes the address against the live Activation, which\n * is what keeps a live child interruptible while its parent Agent is offline.\n * Absent, idle, and already-completed targets are accepted no-ops there.\n * @param childSessionId - durable child session id to interrupt.\n * @param parentSessionId - durable direct parent whose authority is claimed.\n * @param mode - required continuable-address discriminator.\n * @returns acknowledgement that the cancel signal was admitted, not that the target is quiescent.\n * @throws {RemoteError} `gateway/bad-request` for an empty id,\n * `subagent/unauthorized` when the address does not own the live target,\n * otherwise `gateway/internal`.\n */"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"kind": "method",
|
|
242
|
+
"name": "registerProvider",
|
|
243
|
+
"signature": "registerProvider(provider: SubagentProvider): () => void",
|
|
244
|
+
"summary": "Register a provider under its name.",
|
|
245
|
+
"jsDoc": "/**\n * Register a provider under its name. Registration is effect-scoped and HMR\n * safe; removing a provider blocks new starts but does not revoke runs that\n * were already returned to their holders.\n * @param provider - the trusted provider implementation.\n * @returns the exact Cordis effect disposer.\n */"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"kind": "method",
|
|
249
|
+
"name": "getProvider",
|
|
250
|
+
"signature": "getProvider(name: string): SubagentProvider | undefined",
|
|
251
|
+
"summary": "Look up a provider by name.",
|
|
252
|
+
"jsDoc": "/**\n * Look up a provider by name.\n * @param name - the provider name.\n * @returns the provider, or undefined when absent.\n */"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"kind": "method",
|
|
256
|
+
"name": "list",
|
|
257
|
+
"signature": "list(): string[]",
|
|
258
|
+
"summary": "List registered provider names in insertion order.",
|
|
259
|
+
"jsDoc": "/**\n * List registered provider names in insertion order.\n * @returns the registered names.\n */"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "method",
|
|
263
|
+
"name": "start",
|
|
264
|
+
"signature": "async start(name: string, request: SubagentStartRequest): Promise<SubagentRun>",
|
|
265
|
+
"summary": "Establish a published child on the named provider.",
|
|
266
|
+
"jsDoc": "/**\n * Establish a published child on the named provider. Capability and semantic\n * checks run before delegation. Provider ownership lasts until its promise\n * fulfills; a rejection therefore has no run for the caller to dispose and\n * emits no run lifecycle events. Post-publication turn and infrastructure\n * failures settle through the returned run.\n * @param name - the provider to use.\n * @param request - child label, prompt, parent, signal, and optional capabilities.\n * @returns the published holder-owned run.\n */"
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"types": [
|
|
270
|
+
{
|
|
271
|
+
"name": "Agent",
|
|
272
|
+
"declaration": "export interface Agent {\n readonly id: SessionId;\n readonly options: AgentOptions;\n readonly session: Session;\n readonly inbox: Inbox;\n readonly status: AgentStatus;\n readonly ctx: Context;\n cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n whenIdle(): Promise<void>;\n runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n followup(message: UserMessage): void;\n steer(message: UserMessage): void;\n inject(message: UserMessage): void;\n}"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "AgentCancelCause",
|
|
276
|
+
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "AgentMessageSource",
|
|
280
|
+
"declaration": "export interface AgentMessageSource {\n readonly kind: 'agent-message';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "AgentOptions",
|
|
284
|
+
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "AgentStatus",
|
|
288
|
+
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"name": "ApprovalOutcome",
|
|
292
|
+
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "ApprovalPolicy",
|
|
296
|
+
"declaration": "export type ApprovalPolicy = 'ask' | 'never';"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "ApprovalRequestId",
|
|
300
|
+
"declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"name": "AssistantMessage",
|
|
304
|
+
"declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "AssistantProvenance",
|
|
308
|
+
"declaration": "export interface AssistantProvenance {\n provider: string;\n model: string;\n replayState?: unknown;\n}"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "AssistantStreamRecord",
|
|
312
|
+
"declaration": "export type AssistantStreamRecord = { readonly type: 'text-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'reasoning-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly texts: readonly string[]; } | { readonly type: 'tool-call-chunks'; readonly time0: number; readonly index: number; readonly dt: readonly number[]; readonly id: ToolCallId; readonly name?: string; readonly args: readonly string[]; } | { readonly type: 'chunk'; readonly time: number; readonly chunk: StreamChunk; };"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"name": "AttachmentId",
|
|
316
|
+
"declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "Branded",
|
|
320
|
+
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"name": "BrandedNumber",
|
|
324
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "CancelOptions",
|
|
328
|
+
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "CommandId",
|
|
332
|
+
"declaration": "export type CommandId = Branded<'CommandId'>;"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"name": "CommandSource",
|
|
336
|
+
"declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "CommandSourceMap",
|
|
340
|
+
"declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"name": "CompactionId",
|
|
344
|
+
"declaration": "export type CompactionId = Branded<'CompactionId'>;"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "ContentBlock",
|
|
348
|
+
"declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"name": "ContentBlockMap",
|
|
352
|
+
"declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "ContentBlockType",
|
|
356
|
+
"declaration": "export type ContentBlockType = keyof ContentBlockMap;"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "ContextFormed",
|
|
360
|
+
"declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "ContextSnapshotSection",
|
|
364
|
+
"declaration": "export interface ContextSnapshotSection {\n readonly name: string;\n readonly text: string;\n}"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"name": "ContinuableCreateRequest",
|
|
368
|
+
"declaration": "export interface ContinuableCreateRequest {\n readonly sessionId: SessionId;\n readonly parent: Agent;\n readonly signal: AbortSignal;\n}"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"name": "ContinuableCreateSpec",
|
|
372
|
+
"declaration": "export interface ContinuableCreateSpec {\n readonly seed?: readonly SessionEvent[];\n}"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "ContinuableStart",
|
|
376
|
+
"declaration": "export interface ContinuableStart {\n readonly childId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "ContinuableStartSpec",
|
|
380
|
+
"declaration": "export interface ContinuableStartSpec {\n readonly provider: string;\n readonly label: string;\n readonly childId?: SessionId;\n readonly request: Omit<SubagentStartRequest, 'label' | 'signal' | 'outputSchema'>;\n readonly signal: AbortSignal;\n}"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"name": "ContinuableSubagentDescriptorData",
|
|
384
|
+
"declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'continuable';\n readonly label: string;\n readonly agentProvider?: string;\n readonly agentModel?: string;\n readonly agentReasoningEffort?: ReasoningEffortId;\n readonly persona?: string;\n readonly toolFilter?: ToolRestriction;\n}"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "EpochHeader",
|
|
388
|
+
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n system?: string;\n tools?: ToolSchema[];\n}"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"name": "FileAttachmentRef",
|
|
392
|
+
"declaration": "export interface FileAttachmentRef {\n attachmentId: AttachmentId;\n name: string;\n bytes: number;\n}"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"name": "FileBlock",
|
|
396
|
+
"declaration": "export interface FileBlock {\n type: 'file';\n attachment: FileAttachmentRef;\n}"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"name": "FinishReason",
|
|
400
|
+
"declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "FinishReasonMap",
|
|
404
|
+
"declaration": "export interface FinishReasonMap {\n stop: { kind: 'stop'; };\n 'tool-calls': { kind: 'tool-calls'; };\n 'max-tokens': { kind: 'max-tokens'; };\n aborted: { kind: 'aborted'; failure: LlmFailure; };\n error: { kind: 'error'; failure: LlmFailure; };\n}"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"name": "GoalBlockReason",
|
|
408
|
+
"declaration": "export interface GoalBlockReason {\n readonly code: string;\n readonly message: string;\n}"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"name": "GoalChangeMeta",
|
|
412
|
+
"declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"name": "GoalClearChangeMeta",
|
|
416
|
+
"declaration": "export interface GoalClearChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: 'clear';\n readonly cleared: GoalRef;\n readonly clearedAt: number;\n}"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"name": "GoalId",
|
|
420
|
+
"declaration": "export type GoalId = Branded<'GoalId'>;"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"name": "GoalMessageSource",
|
|
424
|
+
"declaration": "export interface GoalMessageSource {\n readonly kind: 'goal';\n readonly goalId: GoalId;\n readonly revision: number;\n readonly round: number;\n}"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "GoalOperation",
|
|
428
|
+
"declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"name": "GoalPhase",
|
|
432
|
+
"declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "GoalRef",
|
|
436
|
+
"declaration": "export interface GoalRef {\n readonly id: GoalId;\n readonly revision: number;\n}"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "GoalSnapshot",
|
|
440
|
+
"declaration": "export interface GoalSnapshot extends GoalRef {\n readonly objective: string;\n readonly phase: GoalPhase;\n readonly blockedReason?: GoalBlockReason;\n readonly maxGoalRounds: number;\n}"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"name": "GoalSnapshotChangeMeta",
|
|
444
|
+
"declaration": "export interface GoalSnapshotChangeMeta {\n readonly kind: 'goal/change';\n readonly version: 1;\n readonly operation: Exclude<GoalOperation, 'clear'>;\n readonly goal: GoalSnapshot;\n readonly roundsStarted: number;\n readonly createdAt: number;\n readonly updatedAt: number;\n}"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "ImageAttachmentRef",
|
|
448
|
+
"declaration": "export interface ImageAttachmentRef {\n attachmentId: AttachmentId;\n mediaType: ImageMediaType;\n bytes: number;\n width: number;\n height: number;\n name?: string;\n originalDimensions?: { width: number; height: number; };\n}"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "ImageBlock",
|
|
452
|
+
"declaration": "export interface ImageBlock {\n type: 'image';\n attachment: ImageAttachmentRef;\n}"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"name": "ImageMediaType",
|
|
456
|
+
"declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "Inbox",
|
|
460
|
+
"declaration": "export class Inbox {\n get nextTurn(): readonly UserMessage[];\n get nextStep(): readonly UserMessage[];\n get hasPending(): boolean;\n clear(): void;\n claim(target: InboxTarget, turn: number): UserMessage[];\n append(target: InboxTarget, message: UserMessage): void;\n prepend(target: InboxTarget, message: UserMessage): void;\n replace(messageId: MessageId, newMessage: UserMessage): boolean;\n remove(messageId: MessageId): boolean;\n splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"name": "InboxTarget",
|
|
464
|
+
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"name": "JsonSchemaNode",
|
|
468
|
+
"declaration": "export interface JsonSchemaNode {\n type?: JsonSchemaType;\n oneOf?: JsonSchemaNode[];\n properties?: Record<string, JsonSchemaNode>;\n required?: string[];\n additionalProperties?: boolean;\n items?: JsonSchemaNode;\n enum?: JsonSchemaScalar[];\n const?: JsonSchemaScalar;\n description?: string;\n title?: string;\n default?: JsonValue;\n examples?: JsonValue;\n}"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "JsonSchemaScalar",
|
|
472
|
+
"declaration": "export type JsonSchemaScalar = string | number | boolean | null;"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "JsonSchemaType",
|
|
476
|
+
"declaration": "export type JsonSchemaType = 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "JsonValue",
|
|
480
|
+
"declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "LlmCallConfig",
|
|
484
|
+
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "LlmCallConfigAdapterDefaults",
|
|
488
|
+
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"name": "LlmFailure",
|
|
492
|
+
"declaration": "export interface LlmFailure {\n readonly message: string;\n readonly code: string;\n readonly status?: number;\n readonly providerRetryAfterMs?: number;\n readonly requestId?: ProviderRequestId;\n}"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "Message",
|
|
496
|
+
"declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"name": "MessageId",
|
|
500
|
+
"declaration": "export type MessageId = Branded<'MessageId'>;"
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
"name": "MessageSource",
|
|
504
|
+
"declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"name": "MessageSourceMap",
|
|
508
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'session-reference': SessionReferenceSource;\n}"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "ModelMessageSource",
|
|
512
|
+
"declaration": "export interface ModelMessageSource extends AssistantProvenance {\n kind: 'model';\n}"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "ModelSelection",
|
|
516
|
+
"declaration": "export interface ModelSelection {\n readonly provider: string;\n readonly model: string;\n readonly reasoningEffort?: string;\n}"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "ObjectJsonSchema",
|
|
520
|
+
"declaration": "export type ObjectJsonSchema = JsonSchemaNode & { type: 'object'; };"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "OneShotSubagentDescriptorData",
|
|
524
|
+
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "OptionalSessionSeq",
|
|
528
|
+
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "PromptContentPart",
|
|
532
|
+
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "ProviderRequestId",
|
|
536
|
+
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"name": "PtcDispatchEventData",
|
|
540
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n}"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"name": "PtcDispatchStartEventData",
|
|
544
|
+
"declaration": "export interface PtcDispatchStartEventData {\n rootCallId: ToolCallId;\n parentCallId: ToolCallId;\n subCallId: ToolCallId;\n name: string;\n arguments: unknown;\n}"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "ReasoningBlock",
|
|
548
|
+
"declaration": "export interface ReasoningBlock {\n type: 'reasoning';\n text: string;\n}"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"name": "ReasoningEffortId",
|
|
552
|
+
"declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "ReplayEnvelope",
|
|
556
|
+
"declaration": "export interface ReplayEnvelope {\n response: unknown;\n blocks?: readonly unknown[];\n}"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "RequestContext",
|
|
560
|
+
"declaration": "export interface RequestContext {\n provider: string;\n model: string;\n contextWindow?: number;\n}"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"name": "RequestHeaderReason",
|
|
564
|
+
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "ResolvedSubagentStartRequest",
|
|
568
|
+
"declaration": "export interface ResolvedSubagentStartRequest extends SubagentStartRequest {\n readonly descriptor: SubagentDescriptorData;\n}"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "SandboxMode",
|
|
572
|
+
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "Session",
|
|
576
|
+
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "SessionEvent",
|
|
580
|
+
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: SessionSeq; time: number; data: SessionEventMap[K]; ignorable?: true; } & (K extends SurfaceEventType ? { sourceEventSeqs?: SessionSeq[]; surfaceOp?: SurfaceOp; } : object) }[T];"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "SessionEventMap",
|
|
584
|
+
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/code-dispatch-start': PtcDispatchStartEventData;\n 'tool/code-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@xneog/dsh-session/types').SessionSeq; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n 'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n 'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n 'compaction/prune': { shadowedRange: { start: SessionSeq; end: SessionSeq; }; shadowedSeqs: SessionSeq[]; shadowedTokenCount: number; };\n}"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"name": "SessionEventType",
|
|
588
|
+
"declaration": "export type SessionEventType = keyof SessionEventMap;"
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
"name": "SessionHeader",
|
|
592
|
+
"declaration": "export interface SessionHeader {\n readonly version: typeof SESSION_FORMAT_VERSION;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly isSeeded: boolean;\n readonly origin?: 'subagent';\n readonly delegationDepth?: number;\n readonly agentPreset?: string;\n}"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"name": "SessionId",
|
|
596
|
+
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"name": "SessionLogOffset",
|
|
600
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "SessionReferenceSource",
|
|
604
|
+
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedFormatVersion?: number; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"name": "SessionRequestId",
|
|
608
|
+
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"name": "SessionSeq",
|
|
612
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "SessionSurface",
|
|
616
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "SessionTitleEventData",
|
|
620
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
"name": "SessionTitleModelProvenance",
|
|
624
|
+
"declaration": "export interface SessionTitleModelProvenance {\n readonly provider: string;\n readonly model: string;\n}"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "SessionTitleProviderId",
|
|
628
|
+
"declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "SessionTitleSource",
|
|
632
|
+
"declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"name": "SkillInvocationSource",
|
|
636
|
+
"declaration": "export interface SkillInvocationSource {\n readonly kind: 'skill-invocation';\n readonly name: string;\n readonly form: 'instructions';\n}"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "StreamChunk",
|
|
640
|
+
"declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"name": "SubagentCapabilities",
|
|
644
|
+
"declaration": "export interface SubagentCapabilities {\n readonly agentOptions: boolean;\n readonly outputSchema: boolean;\n readonly depthLimit: boolean;\n readonly toolFilter: boolean;\n readonly persona: boolean;\n}"
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
"name": "SubagentCatalog",
|
|
648
|
+
"declaration": "export interface SubagentCatalog {\n readonly entries: readonly SubagentListEntry[];\n readonly parentAvailable: boolean;\n}"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "SubagentDescendantListEntry",
|
|
652
|
+
"declaration": "export type SubagentDescendantListEntry = SubagentListEntry & { readonly parentId: SessionId; readonly depth: number; };"
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"name": "SubagentDescriptorBase",
|
|
656
|
+
"declaration": "export interface SubagentDescriptorBase {\n readonly version: number;\n readonly mode: 'one-shot' | 'continuable';\n readonly provider: string;\n}"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"name": "SubagentDescriptorData",
|
|
660
|
+
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
"name": "SubagentInterruptAuthority",
|
|
664
|
+
"declaration": "export type SubagentInterruptAuthority = { readonly kind: 'user'; readonly parentSessionId: SessionId; } | { readonly kind: 'ancestor'; readonly agent: Agent; };"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"name": "SubagentInterruptReceipt",
|
|
668
|
+
"declaration": "export interface SubagentInterruptReceipt {\n readonly accepted: true;\n}"
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
"name": "SubagentListEntry",
|
|
672
|
+
"declaration": "export type SubagentListEntry = { readonly kind: 'child'; readonly id: SessionId; readonly activity: 'running' | 'inactive'; readonly hasChildren: boolean; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; }) | { readonly kind: 'diagnostic'; readonly id: SessionId; readonly reason: 'corrupt' | 'unsupported' | 'unavailable'; };"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"name": "SubagentPromptReceipt",
|
|
676
|
+
"declaration": "export interface SubagentPromptReceipt {\n readonly messageId: MessageId;\n}"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
"name": "SubagentPromptRequest",
|
|
680
|
+
"declaration": "export interface SubagentPromptRequest {\n readonly requestId: SubagentPromptRequestId;\n readonly parentSessionId: SessionId;\n readonly childSessionId: SessionId;\n readonly mode: 'continuable';\n readonly content: readonly PromptContentPart[];\n readonly clientTimeZone?: string;\n}"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"name": "SubagentPromptRequestId",
|
|
684
|
+
"declaration": "export type SubagentPromptRequestId = Branded<'session-request-id'>;"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"name": "SubagentProvider",
|
|
688
|
+
"declaration": "export interface SubagentProvider {\n readonly name: string;\n readonly capabilities: SubagentCapabilities;\n readonly inheritsParentContext: boolean;\n readonly agentRouteDefaults?: Readonly<{ provider: string; model: string; }>;\n start(request: ResolvedSubagentStartRequest): Promise<SubagentRun>;\n prepareContinuable?(request: ContinuableCreateRequest): Promise<ContinuableCreateSpec>;\n}"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"name": "SubagentResult",
|
|
692
|
+
"declaration": "export interface SubagentResult {\n readonly output: ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "SubagentRun",
|
|
696
|
+
"declaration": "export interface SubagentRun {\n readonly id: SessionId;\n readonly localAgent: Agent | undefined;\n readonly result: Promise<SubagentResult>;\n dispose(): Promise<void>;\n}"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"name": "SubagentSendMessageOptions",
|
|
700
|
+
"declaration": "export interface SubagentSendMessageOptions {\n readonly signal: AbortSignal;\n}"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"name": "SubagentSettledMessageSource",
|
|
704
|
+
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"name": "SubagentStartRequest",
|
|
708
|
+
"declaration": "export interface SubagentStartRequest {\n readonly label?: string;\n readonly prompt: ContentBlock[];\n readonly parent: Agent;\n readonly signal: AbortSignal;\n readonly agentOptions?: AgentOptions;\n readonly outputSchema?: ObjectJsonSchema;\n readonly maxDepth?: number;\n readonly toolFilter?: ToolRestriction;\n readonly persona?: string;\n}"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"name": "SubagentStopReason",
|
|
712
|
+
"declaration": "export type SubagentStopReason = SubagentStopReasonMap[keyof SubagentStopReasonMap];"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"name": "SubagentStopReasonMap",
|
|
716
|
+
"declaration": "export interface SubagentStopReasonMap {\n completed: 'completed';\n aborted: 'aborted';\n error: 'error';\n 'max-tokens': 'max-tokens';\n refusal: 'refusal';\n}"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "SurfaceEventType",
|
|
720
|
+
"declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"name": "SurfaceIntent",
|
|
724
|
+
"declaration": "export type SurfaceIntent<T extends SurfaceEventType = SurfaceEventType> = { surfaceOp: SurfaceOp; } & (T extends 'assistant/message' ? { sourceEventSeqs?: never; } : { sourceEventSeqs?: SessionSeq[]; });"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"name": "SurfaceOp",
|
|
728
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: SessionSeq; end: SessionSeq; };"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"name": "TeamId",
|
|
732
|
+
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
"name": "TeamMemberPhase",
|
|
736
|
+
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"name": "TeamMemberSnapshot",
|
|
740
|
+
"declaration": "export interface TeamMemberSnapshot {\n readonly id: SessionId;\n readonly name: string;\n readonly description: string;\n readonly provider: string;\n readonly context: 'fresh' | 'fork';\n readonly phase: TeamMemberPhase;\n readonly error?: string;\n}"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"name": "TeamMessageId",
|
|
744
|
+
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "TeamMessageSnapshot",
|
|
748
|
+
"declaration": "export interface TeamMessageSnapshot {\n readonly id: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n readonly targetId: SessionId;\n readonly content: ContentBlock[];\n}"
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"name": "TeamMessageSource",
|
|
752
|
+
"declaration": "export interface TeamMessageSource {\n readonly kind: 'team-message';\n readonly teamId: TeamId;\n readonly messageId: TeamMessageId;\n readonly senderId: SessionId;\n readonly senderName: string;\n}"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "TeamTaskId",
|
|
756
|
+
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"name": "TeamTaskSnapshot",
|
|
760
|
+
"declaration": "export interface TeamTaskSnapshot {\n readonly id: TeamTaskId;\n readonly revision: number;\n readonly subject: string;\n readonly description: string;\n readonly status: TeamTaskStatus;\n readonly ownerId?: SessionId;\n readonly blockedBy: TeamTaskId[];\n readonly writeScopes: string[];\n}"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "TeamTaskStatus",
|
|
764
|
+
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"name": "TextBlock",
|
|
768
|
+
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"name": "TodoItem",
|
|
772
|
+
"declaration": "export interface TodoItem {\n content: string;\n status: 'pending' | 'in_progress' | 'completed';\n}"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"name": "TokenUsage",
|
|
776
|
+
"declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"name": "ToolCallBlock",
|
|
780
|
+
"declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "ToolCallId",
|
|
784
|
+
"declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"name": "ToolMessageSource",
|
|
788
|
+
"declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"name": "ToolRestriction",
|
|
792
|
+
"declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "ToolResultBlock",
|
|
796
|
+
"declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"name": "ToolResultMessage",
|
|
800
|
+
"declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"name": "ToolSchema",
|
|
804
|
+
"declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"name": "TurnEndCancelCause",
|
|
808
|
+
"declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"name": "TurnEndReason",
|
|
812
|
+
"declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "TurnEndReasonMap",
|
|
816
|
+
"declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n}"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "UserMessage",
|
|
820
|
+
"declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
|
|
821
|
+
}
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
"events": [
|
|
826
|
+
{
|
|
827
|
+
"description": "A published child settled. Scope-filtered dispatch uses the same delegating parent carrier as `subagent/start`, so the lifecycle pair reaches the same scoped audience.",
|
|
828
|
+
"summary": "A published child settled.",
|
|
829
|
+
"tags": [
|
|
830
|
+
{
|
|
831
|
+
"name": "param",
|
|
832
|
+
"argument": "info",
|
|
833
|
+
"comment": "- the run identity and terminal outcome.",
|
|
834
|
+
"text": "@param info - the run identity and terminal outcome.\n *"
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "dshScopeScan",
|
|
838
|
+
"comment": "unsupported",
|
|
839
|
+
"text": "@dshScopeScan unsupported\n *"
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"name": "mode",
|
|
843
|
+
"comment": "emit",
|
|
844
|
+
"text": "@mode emit"
|
|
845
|
+
}
|
|
846
|
+
],
|
|
847
|
+
"jsDoc": "/**\n * A published child settled. Scope-filtered dispatch uses the same delegating\n * parent carrier as `subagent/start`, so the lifecycle pair reaches the\n * same scoped audience.\n * @param info - the run identity and terminal outcome.\n * @dshScopeScan unsupported\n * @mode emit\n */",
|
|
848
|
+
"name": "subagent/end",
|
|
849
|
+
"mode": "emit",
|
|
850
|
+
"signature": "'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"description": "A provider became resolvable in the registry.",
|
|
854
|
+
"summary": "A provider became resolvable in the registry.",
|
|
855
|
+
"tags": [
|
|
856
|
+
{
|
|
857
|
+
"name": "param",
|
|
858
|
+
"argument": "provider",
|
|
859
|
+
"comment": "- the registered provider.",
|
|
860
|
+
"text": "@param provider - the registered provider.\n *"
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
"name": "mode",
|
|
864
|
+
"comment": "emit",
|
|
865
|
+
"text": "@mode emit"
|
|
866
|
+
}
|
|
867
|
+
],
|
|
868
|
+
"jsDoc": "/**\n * A provider became resolvable in the registry.\n * @param provider - the registered provider.\n * @mode emit\n */",
|
|
869
|
+
"name": "subagent/provider-added",
|
|
870
|
+
"mode": "emit",
|
|
871
|
+
"signature": "'subagent/provider-added'(provider: SubagentProvider): void"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"description": "A provider left the registry. Accepted runs remain holder-owned.",
|
|
875
|
+
"summary": "A provider left the registry.",
|
|
876
|
+
"tags": [
|
|
877
|
+
{
|
|
878
|
+
"name": "param",
|
|
879
|
+
"argument": "name",
|
|
880
|
+
"comment": "- the provider name that no longer resolves.",
|
|
881
|
+
"text": "@param name - the provider name that no longer resolves.\n *"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"name": "mode",
|
|
885
|
+
"comment": "emit",
|
|
886
|
+
"text": "@mode emit"
|
|
887
|
+
}
|
|
888
|
+
],
|
|
889
|
+
"jsDoc": "/**\n * A provider left the registry. Accepted runs remain holder-owned.\n * @param name - the provider name that no longer resolves.\n * @mode emit\n */",
|
|
890
|
+
"name": "subagent/provider-removed",
|
|
891
|
+
"mode": "emit",
|
|
892
|
+
"signature": "'subagent/provider-removed'(name: string): void"
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"description": "A provider established a published child. For in-process providers, `ctx.agents.get(info.id)` resolves during this notification. Scope-filtered dispatch keys the carrier by the delegating parent, so a parent-scoped listener observes only its own delegations. Paired with `subagent/end`.",
|
|
896
|
+
"summary": "A provider established a published child.",
|
|
897
|
+
"tags": [
|
|
898
|
+
{
|
|
899
|
+
"name": "param",
|
|
900
|
+
"argument": "info",
|
|
901
|
+
"comment": "- the provider and published child identity.",
|
|
902
|
+
"text": "@param info - the provider and published child identity.\n *"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"name": "dshScopeScan",
|
|
906
|
+
"comment": "unsupported",
|
|
907
|
+
"text": "@dshScopeScan unsupported\n *"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"name": "mode",
|
|
911
|
+
"comment": "emit",
|
|
912
|
+
"text": "@mode emit"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"jsDoc": "/**\n * A provider established a published child. For in-process providers,\n * `ctx.agents.get(info.id)` resolves during this notification.\n * Scope-filtered dispatch keys the carrier by the delegating parent, so a\n * parent-scoped listener observes only its own delegations. Paired with\n * `subagent/end`.\n * @param info - the provider and published child identity.\n * @dshScopeScan unsupported\n * @mode emit\n */",
|
|
916
|
+
"name": "subagent/start",
|
|
917
|
+
"mode": "emit",
|
|
918
|
+
"signature": "'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void"
|
|
919
|
+
}
|
|
920
|
+
],
|
|
921
|
+
"objects": []
|
|
922
|
+
},
|
|
923
|
+
}
|