@deepseek-ai/dsh-subagent 0.2.1-alpha.1 → 0.2.1-alpha.3
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 +40 -34
- package/README.md +43 -26
- package/README.zh.md +43 -26
- package/lib/index.js +1480 -1349
- package/lib/typert.host.js +230 -76
- package/lib/typert.remote-client.d.ts +6 -2
- package/lib/typert.remote-client.js +82 -28
- package/lib/types/activation.d.ts +114 -0
- package/lib/types/activation.js +112 -0
- package/lib/types/catalog.d.ts +14 -6
- package/lib/types/catalog.js +34 -30
- package/lib/types/child-agent.d.ts +16 -32
- package/lib/types/child-agent.js +25 -30
- package/lib/types/continuation-messages.d.ts +4 -3
- package/lib/types/continuation-messages.js +13 -5
- package/lib/types/control-types.d.ts +7 -0
- package/lib/types/descriptor.d.ts +7 -46
- package/lib/types/descriptor.js +20 -21
- package/lib/types/index.d.ts +52 -51
- package/lib/types/index.js +81 -98
- package/lib/types/internal.d.ts +1 -1
- package/lib/types/lifecycle.d.ts +28 -58
- package/lib/types/lifecycle.js +9 -74
- package/lib/types/list-children.js +1 -1
- package/lib/types/manager.d.ts +247 -0
- package/lib/types/manager.js +1316 -0
- package/lib/types/out-of-process.d.ts +3 -29
- package/lib/types/out-of-process.js +5 -47
- package/lib/types/projection-types.d.ts +3 -0
- package/lib/types/structured.d.ts +49 -0
- package/lib/types/structured.js +130 -0
- package/lib/types/types.d.ts +66 -100
- package/lib/types/types.js +1 -1
- package/locale/en.json +5 -0
- package/locale/zh.json +6 -0
- package/package.json +56 -53
- package/lib/types/continuation-activation.d.ts +0 -267
- package/lib/types/continuation-activation.js +0 -700
- package/lib/types/continuation.d.ts +0 -124
- package/lib/types/continuation.js +0 -455
- package/lib/types/inbox.d.ts +0 -43
- package/lib/types/inbox.js +0 -61
- package/lib/types/run-settlement.d.ts +0 -17
- package/lib/types/run-settlement.js +0 -70
package/lib/typert.host.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
+
import { createTypertRemoteInfo } from '@deepseek-ai/dsh-typert-protocol/remote-info'
|
|
5
|
+
|
|
4
6
|
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema$value
|
|
5
|
-
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema$value ??= z.
|
|
7
|
+
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema$value ??= z.string())
|
|
6
8
|
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema$value
|
|
7
|
-
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema$value ??= z.
|
|
9
|
+
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema$value ??= z.string())
|
|
8
10
|
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema$value
|
|
9
11
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema$value ??= z.literal("continuable"))
|
|
10
12
|
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema$value
|
|
@@ -13,11 +15,11 @@ const _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema = () =
|
|
|
13
15
|
}))
|
|
14
16
|
let _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema$value
|
|
15
17
|
const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema = () => (_deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema$value ??= z.object({
|
|
16
|
-
'requestId': z.
|
|
17
|
-
'parentSessionId': z.
|
|
18
|
-
'childSessionId': z.
|
|
19
|
-
'mode': z.literal("continuable").readonly(),
|
|
20
|
-
'delivery': z.union([z.literal("queue"), z.literal("steer")]).readonly(),
|
|
18
|
+
'requestId': z.string().readonly().describe('Identity persisted on the accepted message, minted before the call.'),
|
|
19
|
+
'parentSessionId': z.string().readonly(),
|
|
20
|
+
'childSessionId': z.string().readonly(),
|
|
21
|
+
'mode': z.literal("continuable").readonly().describe('Required discriminator retained from the browser control address.'),
|
|
22
|
+
'delivery': z.union([z.literal("queue"), z.literal("steer")]).readonly().describe('Whether this message queues a later turn or targets the nearest step.'),
|
|
21
23
|
'content': z.array(z.union([z.object({
|
|
22
24
|
'type': z.literal("text").readonly(),
|
|
23
25
|
'text': z.string().readonly(),
|
|
@@ -26,55 +28,95 @@ const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema = () => (_de
|
|
|
26
28
|
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
27
29
|
'data': z.string().readonly(),
|
|
28
30
|
'name': z.string().readonly().optional(),
|
|
29
|
-
})])).readonly(),
|
|
30
|
-
'clientTimeZone': z.string().readonly().optional(),
|
|
31
|
+
})])).readonly().describe('Browser prompt parts delivered as the child\'s user message. The Host admits and persists image parts before delivery, so the wire never carries a durable attachment reference the caller could fabricate.'),
|
|
32
|
+
'clientTimeZone': z.string().readonly().optional().describe('Optional browser zone sampled for this exact human prompt.'),
|
|
31
33
|
}))
|
|
32
34
|
let _deepseek_ai_dsh_subagent_subagents_prompt_result$schema$value
|
|
33
35
|
const _deepseek_ai_dsh_subagent_subagents_prompt_result$schema = () => (_deepseek_ai_dsh_subagent_subagents_prompt_result$schema$value ??= z.object({
|
|
34
|
-
'messageId': z.
|
|
36
|
+
'messageId': z.string().readonly(),
|
|
37
|
+
}))
|
|
38
|
+
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0_strict$schema$value
|
|
39
|
+
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0_strict$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0_strict$schema$value ??= z.string())
|
|
40
|
+
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1_strict$schema$value
|
|
41
|
+
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1_strict$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1_strict$schema$value ??= z.string())
|
|
42
|
+
let _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2_strict$schema$value
|
|
43
|
+
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2_strict$schema = () => (_deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2_strict$schema$value ??= z.literal("continuable"))
|
|
44
|
+
let _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0_strict$schema$value
|
|
45
|
+
const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0_strict$schema = () => (_deepseek_ai_dsh_subagent_subagents_prompt_parameter_0_strict$schema$value ??= z.strictObject({
|
|
46
|
+
'requestId': z.string().readonly().describe('Identity persisted on the accepted message, minted before the call.'),
|
|
47
|
+
'parentSessionId': z.string().readonly(),
|
|
48
|
+
'childSessionId': z.string().readonly(),
|
|
49
|
+
'mode': z.literal("continuable").readonly().describe('Required discriminator retained from the browser control address.'),
|
|
50
|
+
'delivery': z.union([z.literal("queue"), z.literal("steer")]).readonly().describe('Whether this message queues a later turn or targets the nearest step.'),
|
|
51
|
+
'content': z.array(z.union([z.strictObject({
|
|
52
|
+
'type': z.literal("text").readonly(),
|
|
53
|
+
'text': z.string().readonly(),
|
|
54
|
+
}), z.strictObject({
|
|
55
|
+
'type': z.literal("image").readonly(),
|
|
56
|
+
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]).readonly(),
|
|
57
|
+
'data': z.string().readonly(),
|
|
58
|
+
'name': z.string().readonly().optional(),
|
|
59
|
+
})])).readonly().describe('Browser prompt parts delivered as the child\'s user message. The Host admits and persists image parts before delivery, so the wire never carries a durable attachment reference the caller could fabricate.'),
|
|
60
|
+
'clientTimeZone': z.string().readonly().optional().describe('Optional browser zone sampled for this exact human prompt.'),
|
|
35
61
|
}))
|
|
36
62
|
|
|
37
|
-
|
|
63
|
+
const $remote = createTypertRemoteInfo({
|
|
38
64
|
package: '@deepseek-ai/dsh-subagent',
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
],
|
|
42
|
-
invocations: [
|
|
43
|
-
{
|
|
44
|
-
id: '@deepseek-ai/dsh-subagent#subagents/interruptByParent',
|
|
65
|
+
methods: {
|
|
66
|
+
'subagents/interruptByParent': {
|
|
45
67
|
service: 'subagents',
|
|
46
|
-
|
|
47
|
-
method: 'interruptByParent',
|
|
68
|
+
description: 'Remote face of {@link interrupt} under one durable parent address. No catalog, history, persistence, or parent Agent lookup runs: the core primitive alone authorizes the address against the live Activation, which is what keeps a live child interruptible while its parent Agent is offline. Absent, idle, and already-completed targets are accepted no-ops there.',
|
|
48
69
|
invocation: { kind: 'direct' },
|
|
49
70
|
parameters: [
|
|
50
71
|
{
|
|
51
72
|
name: 'childSessionId',
|
|
52
|
-
|
|
73
|
+
description: 'durable child session id to interrupt.',
|
|
53
74
|
source: 'json',
|
|
54
75
|
codec: {
|
|
55
76
|
mode: 'strict',
|
|
56
77
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
57
78
|
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema,
|
|
79
|
+
jsonSchema: {"type":"string"},
|
|
80
|
+
},
|
|
81
|
+
strictCodec: {
|
|
82
|
+
mode: 'strict',
|
|
83
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
84
|
+
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0_strict$schema,
|
|
85
|
+
jsonSchema: {"type":"string"},
|
|
58
86
|
},
|
|
59
87
|
},
|
|
60
88
|
{
|
|
61
89
|
name: 'parentSessionId',
|
|
62
|
-
|
|
90
|
+
description: 'durable direct parent whose authority is claimed.',
|
|
63
91
|
source: 'json',
|
|
64
92
|
codec: {
|
|
65
93
|
mode: 'strict',
|
|
66
94
|
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
67
95
|
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema,
|
|
96
|
+
jsonSchema: {"type":"string"},
|
|
97
|
+
},
|
|
98
|
+
strictCodec: {
|
|
99
|
+
mode: 'strict',
|
|
100
|
+
typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
|
|
101
|
+
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1_strict$schema,
|
|
102
|
+
jsonSchema: {"type":"string"},
|
|
68
103
|
},
|
|
69
104
|
},
|
|
70
105
|
{
|
|
71
106
|
name: 'mode',
|
|
72
|
-
|
|
107
|
+
description: 'required continuable-address discriminator.',
|
|
73
108
|
source: 'json',
|
|
74
109
|
codec: {
|
|
75
110
|
mode: 'strict',
|
|
76
111
|
typeSymbol: '@deepseek-ai/dsh-subagent#subagents/interruptByParent:mode',
|
|
77
112
|
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema,
|
|
113
|
+
jsonSchema: {"type":"string","const":"continuable"},
|
|
114
|
+
},
|
|
115
|
+
strictCodec: {
|
|
116
|
+
mode: 'strict',
|
|
117
|
+
typeSymbol: '@deepseek-ai/dsh-subagent#subagents/interruptByParent:mode',
|
|
118
|
+
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2_strict$schema,
|
|
119
|
+
jsonSchema: {"type":"string","const":"continuable"},
|
|
78
120
|
},
|
|
79
121
|
},
|
|
80
122
|
],
|
|
@@ -82,24 +124,31 @@ export const TYPERT = {
|
|
|
82
124
|
mode: 'strict',
|
|
83
125
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
|
|
84
126
|
create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
|
|
127
|
+
description: 'acknowledgement that the cancel signal was admitted, not that the target is quiescent.',
|
|
128
|
+
jsonSchema: {"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":true},
|
|
85
129
|
},
|
|
86
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
130
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":517,"column":3},
|
|
87
131
|
},
|
|
88
|
-
{
|
|
89
|
-
id: '@deepseek-ai/dsh-subagent#subagents/prompt',
|
|
132
|
+
'subagents/prompt': {
|
|
90
133
|
service: 'subagents',
|
|
91
|
-
|
|
92
|
-
method: 'prompt',
|
|
134
|
+
description: '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. Success identifies the message the child\'s inbox accepted; later execution is independent of this call. Queue delivery targets a later turn; steer delivery targets the nearest step and retains the Agent loop\'s best-effort fallback semantics. Image parts are admitted and persisted through the attachment store before delivery, and the child\'s model must accept image input. Cold resume at capacity rejects with `subagent/delivery-unavailable`.',
|
|
93
135
|
invocation: { kind: 'direct' },
|
|
94
136
|
parameters: [
|
|
95
137
|
{
|
|
96
138
|
name: 'request',
|
|
97
|
-
|
|
139
|
+
description: 'durable address, delivery, minted identity, content, and optional browser zone.',
|
|
98
140
|
source: 'json',
|
|
99
141
|
codec: {
|
|
100
142
|
mode: 'strict',
|
|
101
143
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptRequest',
|
|
102
144
|
create: _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema,
|
|
145
|
+
jsonSchema: {"type":"object","properties":{"requestId":{"type":"string","description":"Identity persisted on the accepted message, minted before the call."},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","const":"continuable","description":"Required discriminator retained from the browser control address."},"delivery":{"type":"string","enum":["queue","steer"],"description":"Whether this message queues a later turn or targets the nearest step."},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":true},{"type":"object","properties":{"type":{"type":"string","const":"image"},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"},"name":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":true}]},"description":"Browser prompt parts delivered as the child's user message. The Host admits and persists image parts before delivery, so the wire never carries a durable attachment reference the caller could fabricate."},"clientTimeZone":{"type":"string","description":"Optional browser zone sampled for this exact human prompt."}},"required":["requestId","parentSessionId","childSessionId","mode","delivery","content"],"additionalProperties":true},
|
|
146
|
+
},
|
|
147
|
+
strictCodec: {
|
|
148
|
+
mode: 'strict',
|
|
149
|
+
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptRequest',
|
|
150
|
+
create: _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0_strict$schema,
|
|
151
|
+
jsonSchema: {"type":"object","properties":{"requestId":{"type":"string","description":"Identity persisted on the accepted message, minted before the call."},"parentSessionId":{"type":"string"},"childSessionId":{"type":"string"},"mode":{"type":"string","const":"continuable","description":"Required discriminator retained from the browser control address."},"delivery":{"type":"string","enum":["queue","steer"],"description":"Whether this message queues a later turn or targets the nearest step."},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"mediaType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"},"name":{"type":"string"}},"required":["type","mediaType","data"],"additionalProperties":false}]},"description":"Browser prompt parts delivered as the child's user message. The Host admits and persists image parts before delivery, so the wire never carries a durable attachment reference the caller could fabricate."},"clientTimeZone":{"type":"string","description":"Optional browser zone sampled for this exact human prompt."}},"required":["requestId","parentSessionId","childSessionId","mode","delivery","content"],"additionalProperties":false},
|
|
103
152
|
},
|
|
104
153
|
},
|
|
105
154
|
],
|
|
@@ -108,17 +157,27 @@ export const TYPERT = {
|
|
|
108
157
|
mode: 'strict',
|
|
109
158
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
|
|
110
159
|
create: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
|
|
160
|
+
description: 'the accepted message\'s inbox identity.',
|
|
161
|
+
jsonSchema: {"type":"object","properties":{"messageId":{"type":"string"}},"required":["messageId"],"additionalProperties":true},
|
|
111
162
|
},
|
|
112
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
163
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":448,"column":9},
|
|
113
164
|
},
|
|
165
|
+
},
|
|
166
|
+
}, z)
|
|
167
|
+
|
|
168
|
+
export const TYPERT = {
|
|
169
|
+
package: '@deepseek-ai/dsh-subagent',
|
|
170
|
+
face: 'host',
|
|
171
|
+
schemas: [
|
|
114
172
|
],
|
|
173
|
+
get invocations() { return $remote.descriptors },
|
|
115
174
|
model: {
|
|
116
175
|
"services": [
|
|
117
176
|
{
|
|
118
|
-
"description": "Named provider registry with
|
|
119
|
-
"summary": "Named provider registry with
|
|
177
|
+
"description": "Named provider registry with managed activations, durable discovery, and local child messaging.",
|
|
178
|
+
"summary": "Named provider registry with managed activations, durable discovery, and local child messaging.",
|
|
120
179
|
"tags": [],
|
|
121
|
-
"jsDoc": "/** Named provider registry with
|
|
180
|
+
"jsDoc": "/** Named provider registry with managed activations, durable discovery, and local child messaging. */",
|
|
122
181
|
"key": "subagents",
|
|
123
182
|
"exportName": "SubagentRuntime",
|
|
124
183
|
"members": [
|
|
@@ -131,10 +190,24 @@ export const TYPERT = {
|
|
|
131
190
|
},
|
|
132
191
|
{
|
|
133
192
|
"kind": "method",
|
|
134
|
-
"name": "
|
|
135
|
-
"signature": "
|
|
136
|
-
"summary": "
|
|
137
|
-
"jsDoc": "/**\n *
|
|
193
|
+
"name": "startActivation",
|
|
194
|
+
"signature": "startActivation(spec: SubagentActivationSpec & { readonly childId: SessionId }): Promise<SubagentActivation & { readonly messageId: MessageId }>",
|
|
195
|
+
"summary": "Start a local child under its reserved identity.",
|
|
196
|
+
"jsDoc": "/**\n * Start a local child under its reserved identity.\n * @param spec - local task, reserved child id, and result recipient.\n * @returns activation with its accepted initial message id.\n */"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "method",
|
|
200
|
+
"name": "startActivation",
|
|
201
|
+
"signature": "startActivation(spec: SubagentActivationSpec): Promise<SubagentActivation>",
|
|
202
|
+
"summary": "Start a local or external child.",
|
|
203
|
+
"jsDoc": "/**\n * Start a local or external child.\n * @param spec - task, backend, and result recipient.\n * @returns activation with a message id only for local children.\n */"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "method",
|
|
207
|
+
"name": "waitForChildren",
|
|
208
|
+
"signature": "async waitForChildren(parent: Agent): Promise<boolean>",
|
|
209
|
+
"summary": "Join progressing descendants without cancelling them.",
|
|
210
|
+
"jsDoc": "/**\n * Join progressing descendants without cancelling them. Idle descendants whose\n * inboxes require a later wake stay resident and do not delay host completion.\n * @param parent - the exact parent whose descendant work is observed.\n * @returns whether work was joined; hosts recheck parent idle after true.\n */"
|
|
138
211
|
},
|
|
139
212
|
{
|
|
140
213
|
"kind": "method",
|
|
@@ -147,22 +220,22 @@ export const TYPERT = {
|
|
|
147
220
|
"kind": "method",
|
|
148
221
|
"name": "interrupt",
|
|
149
222
|
"signature": "interrupt(targetSessionId: SessionId, authority: SubagentInterruptAuthority): void",
|
|
150
|
-
"summary": "Interrupt one live
|
|
151
|
-
"jsDoc": "/**\n * Interrupt one live
|
|
223
|
+
"summary": "Interrupt one live child's current execution under a human parent address or an exact live ancestor Agent.",
|
|
224
|
+
"jsDoc": "/**\n * Interrupt one live child's current execution 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 Agent is idle, a waking send resumes the parked FIFO\n * queue. External backends stop their single execution. An absent target\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 */"
|
|
152
225
|
},
|
|
153
226
|
{
|
|
154
227
|
"kind": "method",
|
|
155
|
-
"name": "
|
|
156
|
-
"signature": "async
|
|
157
|
-
"summary": "Close
|
|
158
|
-
"jsDoc": "/**\n * Close
|
|
228
|
+
"name": "drainDescendants",
|
|
229
|
+
"signature": "async drainDescendants(parents: readonly Agent[]): Promise<void>",
|
|
230
|
+
"summary": "Close subagent admission below exact live parent Agents, stop only their visible descendant Activations synchronously, then await admitted scoped materializations and release those forests child-first.",
|
|
231
|
+
"jsDoc": "/**\n * Close subagent 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 execution handle.\n * @throws an aggregate error after all branches settle when any failed.\n */"
|
|
159
232
|
},
|
|
160
233
|
{
|
|
161
234
|
"kind": "method",
|
|
162
|
-
"name": "
|
|
163
|
-
"signature": "async
|
|
164
|
-
"summary": "Release selected resident
|
|
165
|
-
"jsDoc": "/**\n * Release selected resident
|
|
235
|
+
"name": "drainChildren",
|
|
236
|
+
"signature": "async drainChildren(parent: Agent, childIds: readonly SessionId[]): Promise<void>",
|
|
237
|
+
"summary": "Release selected resident direct children of one exact live parent.",
|
|
238
|
+
"jsDoc": "/**\n * Release selected resident 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 execution handle.\n * @throws {SubagentError} `UNAUTHORIZED` when a resident target belongs to a\n * different parent or the supplied parent identity is stale.\n */"
|
|
166
239
|
},
|
|
167
240
|
{
|
|
168
241
|
"kind": "method",
|
|
@@ -176,7 +249,7 @@ export const TYPERT = {
|
|
|
176
249
|
"name": "listDescendants",
|
|
177
250
|
"signature": "listDescendants(rootSessionId: SessionId, signal?: AbortSignal): Promise<SubagentDescendantListEntry[]>",
|
|
178
251
|
"summary": "Recursively list reachable parent catalogs in stable pre-order, preserving each catalog's event order.",
|
|
179
|
-
"jsDoc": "/**\n * Recursively list reachable parent catalogs in stable pre-order, preserving\n * each catalog's event order. Each row carries its catalog parent and depth;\n * one-shot and unknown-mode children remain traversal nodes. Unknown modes\n * produce unsupported diagnostics. Unreadable child catalogs produce corrupt\n * or unavailable diagnostics and stop only that branch. Root read failures,\n * missing services or projections, and cancellation reject the whole listing.\n * Each catalog is observed once and released before the next read. No Agent\n * is loaded or resumed; Sessions absent from reachable catalogs are omitted.\n * @param rootSessionId - session whose catalog starts descendant discovery.\n * @param signal - cancellation forwarded to and checked around each catalog read.\n * @returns children and branch diagnostics in parent-catalog pre-order.\n * @throws {@link SubagentError} when listing dependencies are unavailable or the caller cancels.\n * @throws SessionQueryError when the root catalog cannot be read.\n */"
|
|
252
|
+
"jsDoc": "/**\n * Recursively list reachable parent catalogs in stable pre-order, preserving\n * each catalog's event order. Each row carries its catalog parent and depth;\n * external children are leaves; one-shot and unknown-mode children remain\n * traversal nodes. Unknown modes\n * produce unsupported diagnostics. Unreadable child catalogs produce corrupt\n * or unavailable diagnostics and stop only that branch. Root read failures,\n * missing services or projections, and cancellation reject the whole listing.\n * Each catalog is observed once and released before the next read. No Agent\n * is loaded or resumed; Sessions absent from reachable catalogs are omitted.\n * @param rootSessionId - session whose catalog starts descendant discovery.\n * @param signal - cancellation forwarded to and checked around each catalog read.\n * @returns children and branch diagnostics in parent-catalog pre-order.\n * @throws {@link SubagentError} when listing dependencies are unavailable or the caller cancels.\n * @throws SessionQueryError when the root catalog cannot be read.\n */"
|
|
180
253
|
},
|
|
181
254
|
{
|
|
182
255
|
"kind": "method",
|
|
@@ -197,7 +270,7 @@ export const TYPERT = {
|
|
|
197
270
|
"name": "registerProvider",
|
|
198
271
|
"signature": "registerProvider(provider: SubagentProvider): () => void",
|
|
199
272
|
"summary": "Register a provider under its name.",
|
|
200
|
-
"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 */"
|
|
273
|
+
"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. Providers without either execution\n * method are rejected with UNSUPPORTED_CAPABILITY before registration.\n * @param provider - the trusted provider implementation.\n * @returns the exact Cordis effect disposer.\n */"
|
|
201
274
|
},
|
|
202
275
|
{
|
|
203
276
|
"kind": "method",
|
|
@@ -212,13 +285,6 @@ export const TYPERT = {
|
|
|
212
285
|
"signature": "list(): string[]",
|
|
213
286
|
"summary": "List registered provider names in insertion order.",
|
|
214
287
|
"jsDoc": "/**\n * List registered provider names in insertion order.\n * @returns the registered names.\n */"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"kind": "method",
|
|
218
|
-
"name": "start",
|
|
219
|
-
"signature": "async start(name: string, request: SubagentStartRequest): Promise<SubagentRun>",
|
|
220
|
-
"summary": "Establish a published child on the named provider.",
|
|
221
|
-
"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 * A catalog append failure disposes the run and handles its result rejection;\n * the caller receives the catalog error even if disposal also fails.\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 */"
|
|
222
288
|
}
|
|
223
289
|
],
|
|
224
290
|
"types": [
|
|
@@ -246,6 +312,10 @@ export const TYPERT = {
|
|
|
246
312
|
"name": "AgentStatus",
|
|
247
313
|
"declaration": "export type AgentStatus = 'idle' | 'running';"
|
|
248
314
|
},
|
|
315
|
+
{
|
|
316
|
+
"name": "AllowedModelRoute",
|
|
317
|
+
"declaration": "export interface AllowedModelRoute {\n readonly provider: string;\n readonly model: string;\n}"
|
|
318
|
+
},
|
|
249
319
|
{
|
|
250
320
|
"name": "ApprovalOutcome",
|
|
251
321
|
"declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
|
|
@@ -332,20 +402,12 @@ export const TYPERT = {
|
|
|
332
402
|
},
|
|
333
403
|
{
|
|
334
404
|
"name": "ContinuableCreateRequest",
|
|
335
|
-
"declaration": "export interface ContinuableCreateRequest {\n readonly sessionId: SessionId;\n readonly parent: Agent;\n readonly signal: AbortSignal;\n}"
|
|
405
|
+
"declaration": "export interface ContinuableCreateRequest {\n readonly cwd: string;\n readonly sessionId: SessionId;\n readonly parent: Agent;\n readonly signal: AbortSignal;\n}"
|
|
336
406
|
},
|
|
337
407
|
{
|
|
338
408
|
"name": "ContinuableCreateSpec",
|
|
339
409
|
"declaration": "export interface ContinuableCreateSpec {\n readonly seed?: readonly SessionEvent[];\n}"
|
|
340
410
|
},
|
|
341
|
-
{
|
|
342
|
-
"name": "ContinuableStart",
|
|
343
|
-
"declaration": "export interface ContinuableStart {\n readonly childId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"name": "ContinuableStartSpec",
|
|
347
|
-
"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}"
|
|
348
|
-
},
|
|
349
411
|
{
|
|
350
412
|
"name": "ContinuableSubagentDescriptorData",
|
|
351
413
|
"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}"
|
|
@@ -454,6 +516,30 @@ export const TYPERT = {
|
|
|
454
516
|
"name": "InboxTarget",
|
|
455
517
|
"declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
|
|
456
518
|
},
|
|
519
|
+
{
|
|
520
|
+
"name": "JobId",
|
|
521
|
+
"declaration": "export type JobId = Branded<'JobId'>;"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "JobOutcome",
|
|
525
|
+
"declaration": "export interface JobOutcome {\n status: 'completed' | 'killed' | 'failed';\n detail?: string;\n result?: string;\n}"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "JobRegisteredData",
|
|
529
|
+
"declaration": "export interface JobRegisteredData {\n readonly jobId: JobId;\n readonly owner: SessionId;\n readonly kind: string;\n readonly label: string;\n readonly startedAt: number;\n readonly toolCall?: JobToolCall;\n}"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"name": "JobSettleCause",
|
|
533
|
+
"declaration": "export type JobSettleCause = 'producer' | 'kill' | 'teardown';"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "JobSettledData",
|
|
537
|
+
"declaration": "export interface JobSettledData extends JobRegisteredData {\n readonly finishedAt: number;\n readonly status: JobOutcome['status'];\n readonly cause: JobSettleCause;\n readonly producerReported: boolean;\n readonly detail?: string;\n}"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"name": "JobToolCall",
|
|
541
|
+
"declaration": "export interface JobToolCall {\n readonly callId: SessionEventMap['tool/call']['callId'];\n readonly rootCallId: SessionEventMap['tool/call']['callId'];\n}"
|
|
542
|
+
},
|
|
457
543
|
{
|
|
458
544
|
"name": "JsonSchemaNode",
|
|
459
545
|
"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}"
|
|
@@ -492,12 +578,16 @@ export const TYPERT = {
|
|
|
492
578
|
},
|
|
493
579
|
{
|
|
494
580
|
"name": "LlmCallConfig",
|
|
495
|
-
"declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n
|
|
581
|
+
"declaration": "export interface LlmCallConfig extends LlmCallControls {\n provider: string;\n model: string;\n}"
|
|
496
582
|
},
|
|
497
583
|
{
|
|
498
584
|
"name": "LlmCallConfigAdapterDefaults",
|
|
499
585
|
"declaration": "export interface LlmCallConfigAdapterDefaults {\n reasoningEffort?: true;\n maxTokens?: true;\n}"
|
|
500
586
|
},
|
|
587
|
+
{
|
|
588
|
+
"name": "LlmCallControls",
|
|
589
|
+
"declaration": "export interface LlmCallControls {\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
|
|
590
|
+
},
|
|
501
591
|
{
|
|
502
592
|
"name": "LlmFailure",
|
|
503
593
|
"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 readonly offloadImages?: number;\n}"
|
|
@@ -552,7 +642,7 @@ export const TYPERT = {
|
|
|
552
642
|
},
|
|
553
643
|
{
|
|
554
644
|
"name": "MessageSourceMap",
|
|
555
|
-
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n '
|
|
645
|
+
"declaration": "export interface MessageSourceMap {\n user: { kind: 'user'; };\n model: ModelMessageSource;\n tool: ToolMessageSource;\n 'system-prompt': SystemPromptMessageSource;\n 'model-selection': { kind: 'model-selection'; } & ContextFormed;\n 'runtime-context': { kind: 'runtime-context'; } & ContextFormed;\n 'working-directory': { kind: 'working-directory'; };\n 'user-approval': { kind: 'user-approval'; } & ContextFormed;\n 'ptc-mode': { kind: 'ptc-mode'; };\n 'tool-registry': { kind: 'tool-registry'; };\n 'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; principal?: Principal; };\n 'agent-message': AgentMessageSource;\n 'subagent-settled': SubagentSettledMessageSource;\n 'skill-invocation': SkillInvocationSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'cordis-host-runner': { kind: 'cordis-host-runner'; };\n 'team-message': TeamMessageSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n 'plan-mode': { kind: 'plan-mode'; } & ContextFormed;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n webhook: { readonly kind: 'webhook'; readonly provider: string; readonly source: WebhookSourceId; readonly deliveryId: WebhookDeliveryId; readonly ruleId: WebhookRuleId; readonly form: 'notice'; readonly summary: string; };\n}"
|
|
556
646
|
},
|
|
557
647
|
{
|
|
558
648
|
"name": "ModelMessageSource",
|
|
@@ -578,6 +668,14 @@ export const TYPERT = {
|
|
|
578
668
|
"name": "OptionalSessionSeq",
|
|
579
669
|
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
580
670
|
},
|
|
671
|
+
{
|
|
672
|
+
"name": "Principal",
|
|
673
|
+
"declaration": "export type Principal = PrincipalMap[keyof PrincipalMap];"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
"name": "PrincipalMap",
|
|
677
|
+
"declaration": "export interface PrincipalMap {\n owner: { readonly kind: 'owner'; };\n}"
|
|
678
|
+
},
|
|
581
679
|
{
|
|
582
680
|
"name": "PromptContentPart",
|
|
583
681
|
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
|
|
@@ -588,7 +686,7 @@ export const TYPERT = {
|
|
|
588
686
|
},
|
|
589
687
|
{
|
|
590
688
|
"name": "PtcDispatchEventData",
|
|
591
|
-
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
689
|
+
"declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n isError: boolean;\n content: ContentBlock[];\n meta?: JsonValue;\n error?: { name: string; code: string; reason?: string; };\n}"
|
|
592
690
|
},
|
|
593
691
|
{
|
|
594
692
|
"name": "PtcDispatchStartEventData",
|
|
@@ -616,7 +714,7 @@ export const TYPERT = {
|
|
|
616
714
|
},
|
|
617
715
|
{
|
|
618
716
|
"name": "ResolvedSubagentStartRequest",
|
|
619
|
-
"declaration": "export interface ResolvedSubagentStartRequest extends SubagentStartRequest {\n readonly
|
|
717
|
+
"declaration": "export interface ResolvedSubagentStartRequest extends SubagentStartRequest {\n readonly cwd: string;\n}"
|
|
620
718
|
},
|
|
621
719
|
{
|
|
622
720
|
"name": "RetryId",
|
|
@@ -656,7 +754,7 @@ export const TYPERT = {
|
|
|
656
754
|
},
|
|
657
755
|
{
|
|
658
756
|
"name": "SessionEventMap",
|
|
659
|
-
"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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\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; reason?: 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 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\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/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-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('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n '
|
|
757
|
+
"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 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\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; reason?: 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 'working-directory/change': { cwd: string; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\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/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'job/registered': JobRegisteredData;\n 'job/settled': JobSettledData;\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'permission/preset': { preset: string; };\n 'subagent/descriptor': SubagentDescriptorData;\n 'subagent/catalog': SubagentCatalogEvent;\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 'feedback/record': FeedbackRecord;\n 'llm/retry': LlmRetryEventData;\n 'llm/retry-started': LlmRetryStartedEventData;\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 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'plan/mode': { active: boolean; };\n 'schedule/change': ScheduleChange;\n 'subagent/model-selection-policy': { allowedModels: AllowedModelRoute[]; };\n 'workspace/changes': { turn: number; };\n}"
|
|
660
758
|
},
|
|
661
759
|
{
|
|
662
760
|
"name": "SessionEventType",
|
|
@@ -714,21 +812,29 @@ export const TYPERT = {
|
|
|
714
812
|
"name": "StreamChunk",
|
|
715
813
|
"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; };"
|
|
716
814
|
},
|
|
815
|
+
{
|
|
816
|
+
"name": "SubagentActivation",
|
|
817
|
+
"declaration": "export interface SubagentActivation {\n readonly childId: SessionId;\n readonly messageId?: MessageId;\n readonly result: Promise<SubagentResult>;\n dispose(): Promise<void>;\n}"
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
"name": "SubagentActivationSpec",
|
|
821
|
+
"declaration": "export interface SubagentActivationSpec {\n readonly provider: string;\n readonly label: string;\n readonly childId?: SessionId;\n readonly request: Omit<SubagentStartRequest, 'label' | 'signal'>;\n readonly signal: AbortSignal;\n readonly delivery: 'parent' | 'caller';\n}"
|
|
822
|
+
},
|
|
717
823
|
{
|
|
718
824
|
"name": "SubagentCapabilities",
|
|
719
|
-
"declaration": "export interface SubagentCapabilities {\n readonly agentOptions: boolean;\n readonly
|
|
825
|
+
"declaration": "export interface SubagentCapabilities {\n readonly agentOptions: boolean;\n readonly agentPreset: boolean;\n readonly outputSchema: boolean;\n readonly depthLimit: boolean;\n}"
|
|
720
826
|
},
|
|
721
827
|
{
|
|
722
828
|
"name": "SubagentCatalogEntry",
|
|
723
|
-
"declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'unknown'; readonly label?: string; });"
|
|
829
|
+
"declaration": "export type SubagentCatalogEntry = { readonly id: SessionId; readonly createdAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'external'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; } | { readonly mode: 'unknown'; readonly label?: string; });"
|
|
724
830
|
},
|
|
725
831
|
{
|
|
726
832
|
"name": "SubagentCatalogEvent",
|
|
727
|
-
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
|
|
833
|
+
"declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })) | { readonly version: 2; readonly mode: 'external'; readonly label?: string; });"
|
|
728
834
|
},
|
|
729
835
|
{
|
|
730
836
|
"name": "SubagentCatalogRow",
|
|
731
|
-
"declaration": "export type SubagentCatalogRow = { readonly id: SessionId; readonly activity: 'running' | 'inactive'; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
|
|
837
|
+
"declaration": "export type SubagentCatalogRow = { readonly id: SessionId; readonly activity: 'running' | 'inactive'; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'external'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
|
|
732
838
|
},
|
|
733
839
|
{
|
|
734
840
|
"name": "SubagentDescendantListEntry",
|
|
@@ -768,7 +874,7 @@ export const TYPERT = {
|
|
|
768
874
|
},
|
|
769
875
|
{
|
|
770
876
|
"name": "SubagentProvider",
|
|
771
|
-
"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}"
|
|
877
|
+
"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}"
|
|
772
878
|
},
|
|
773
879
|
{
|
|
774
880
|
"name": "SubagentResult",
|
|
@@ -776,7 +882,7 @@ export const TYPERT = {
|
|
|
776
882
|
},
|
|
777
883
|
{
|
|
778
884
|
"name": "SubagentRun",
|
|
779
|
-
"declaration": "export interface SubagentRun {\n readonly id: SessionId;\n readonly
|
|
885
|
+
"declaration": "export interface SubagentRun {\n readonly id: SessionId;\n readonly result: Promise<SubagentResult>;\n dispose(): Promise<void>;\n}"
|
|
780
886
|
},
|
|
781
887
|
{
|
|
782
888
|
"name": "SubagentSendMessageOptions",
|
|
@@ -788,7 +894,7 @@ export const TYPERT = {
|
|
|
788
894
|
},
|
|
789
895
|
{
|
|
790
896
|
"name": "SubagentStartRequest",
|
|
791
|
-
"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
|
|
897
|
+
"declaration": "export interface SubagentStartRequest {\n readonly cwd?: string;\n readonly agentPreset?: string;\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}"
|
|
792
898
|
},
|
|
793
899
|
{
|
|
794
900
|
"name": "SubagentStopReason",
|
|
@@ -822,6 +928,42 @@ export const TYPERT = {
|
|
|
822
928
|
"name": "SystemPromptUpdate",
|
|
823
929
|
"declaration": "export type SystemPromptUpdate = 'in-history';"
|
|
824
930
|
},
|
|
931
|
+
{
|
|
932
|
+
"name": "TeamId",
|
|
933
|
+
"declaration": "export type TeamId = Branded<'TeamId'>;"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "TeamMemberPhase",
|
|
937
|
+
"declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
"name": "TeamMemberSnapshot",
|
|
941
|
+
"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}"
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
"name": "TeamMessageId",
|
|
945
|
+
"declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"name": "TeamMessageSnapshot",
|
|
949
|
+
"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}"
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"name": "TeamMessageSource",
|
|
953
|
+
"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}"
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
"name": "TeamTaskId",
|
|
957
|
+
"declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"name": "TeamTaskSnapshot",
|
|
961
|
+
"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}"
|
|
962
|
+
},
|
|
963
|
+
{
|
|
964
|
+
"name": "TeamTaskStatus",
|
|
965
|
+
"declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
|
|
966
|
+
},
|
|
825
967
|
{
|
|
826
968
|
"name": "TextBlock",
|
|
827
969
|
"declaration": "export interface TextBlock {\n type: 'text';\n text: string;\n}"
|
|
@@ -885,6 +1027,18 @@ export const TYPERT = {
|
|
|
885
1027
|
{
|
|
886
1028
|
"name": "UserMessage",
|
|
887
1029
|
"declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
"name": "WebhookDeliveryId",
|
|
1033
|
+
"declaration": "export type WebhookDeliveryId = Branded<'WebhookDeliveryId'>;"
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
"name": "WebhookRuleId",
|
|
1037
|
+
"declaration": "export type WebhookRuleId = Branded<'WebhookRuleId'>;"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"name": "WebhookSourceId",
|
|
1041
|
+
"declaration": "export type WebhookSourceId = Branded<'WebhookSourceId'>;"
|
|
888
1042
|
}
|
|
889
1043
|
]
|
|
890
1044
|
}
|