@deepseek-ai/dsh-subagent 0.1.2-alpha.2 → 0.1.2-alpha.4
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 +12 -11
- package/README.zh.md +12 -11
- package/lib/index.js +238 -324
- package/lib/typert.host.js +52 -157
- package/lib/typert.remote-client.js +8 -91
- package/lib/types/child-agent.d.ts +2 -2
- package/lib/types/child-agent.js +3 -3
- package/lib/types/continuation.d.ts +50 -69
- package/lib/types/continuation.js +173 -105
- package/lib/types/control-types.d.ts +11 -27
- package/lib/types/control.d.ts +1 -17
- package/lib/types/control.js +6 -24
- package/lib/types/descriptor-seed.d.ts +1 -1
- package/lib/types/descriptor-seed.js +1 -1
- package/lib/types/index.d.ts +32 -43
- package/lib/types/index.js +51 -50
- package/lib/types/internal.d.ts +46 -0
- package/lib/types/internal.js +45 -0
- package/lib/types/lifecycle.js +4 -3
- package/lib/types/list-children.d.ts +6 -5
- package/lib/types/list-children.js +23 -22
- package/lib/types/projection-types.d.ts +4 -3
- package/lib/types/projection.js +3 -2
- package/package.json +48 -44
- package/lib/types/activation-setup-registry.d.ts +0 -57
- package/lib/types/activation-setup-registry.js +0 -148
package/lib/typert.host.js
CHANGED
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
const ToolResultBlockRemoteCodec$schema = z.object({
|
|
5
|
-
'type': z.literal("tool-result"),
|
|
6
|
-
'toolCallId': z.intersection(z.string(), z.unknown()),
|
|
7
|
-
'content': z.array(z.union([z.object({
|
|
8
|
-
'type': z.literal("text"),
|
|
9
|
-
'text': z.string(),
|
|
10
|
-
}), z.object({
|
|
11
|
-
'type': z.literal("image"),
|
|
12
|
-
'attachment': z.object({
|
|
13
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
14
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
15
|
-
'bytes': z.number(),
|
|
16
|
-
'width': z.number(),
|
|
17
|
-
'height': z.number(),
|
|
18
|
-
'name': z.string().optional(),
|
|
19
|
-
'originalDimensions': z.object({
|
|
20
|
-
'width': z.number(),
|
|
21
|
-
'height': z.number(),
|
|
22
|
-
}).optional(),
|
|
23
|
-
}),
|
|
24
|
-
}), z.object({
|
|
25
|
-
'type': z.literal("reasoning"),
|
|
26
|
-
'text': z.string(),
|
|
27
|
-
}), z.object({
|
|
28
|
-
'type': z.literal("tool-call"),
|
|
29
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
30
|
-
'name': z.string(),
|
|
31
|
-
'arguments': z.string(),
|
|
32
|
-
}), z.lazy(() => ToolResultBlockRemoteCodec$schema)])),
|
|
33
|
-
'isError': z.boolean().optional(),
|
|
34
|
-
})
|
|
35
4
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
36
5
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
37
6
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema = z.literal("continuable")
|
|
@@ -69,65 +38,13 @@ const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema = z.object({
|
|
|
69
38
|
'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
70
39
|
'mode': z.literal("continuable").readonly(),
|
|
71
40
|
'content': z.array(z.union([z.object({
|
|
72
|
-
'type': z.literal("text"),
|
|
73
|
-
'text': z.string(),
|
|
74
|
-
}), z.object({
|
|
75
|
-
'type': z.literal("image"),
|
|
76
|
-
'attachment': z.object({
|
|
77
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
78
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
79
|
-
'bytes': z.number(),
|
|
80
|
-
'width': z.number(),
|
|
81
|
-
'height': z.number(),
|
|
82
|
-
'name': z.string().optional(),
|
|
83
|
-
'originalDimensions': z.object({
|
|
84
|
-
'width': z.number(),
|
|
85
|
-
'height': z.number(),
|
|
86
|
-
}).optional(),
|
|
87
|
-
}),
|
|
88
|
-
}), z.object({
|
|
89
|
-
'type': z.literal("reasoning"),
|
|
90
|
-
'text': z.string(),
|
|
91
|
-
}), z.object({
|
|
92
|
-
'type': z.literal("tool-call"),
|
|
93
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
94
|
-
'name': z.string(),
|
|
95
|
-
'arguments': z.string(),
|
|
96
|
-
}), z.object({
|
|
97
|
-
'type': z.literal("tool-result"),
|
|
98
|
-
'toolCallId': z.intersection(z.string(), z.unknown()),
|
|
99
|
-
'content': z.array(z.union([z.object({
|
|
100
|
-
'type': z.literal("text"),
|
|
101
|
-
'text': z.string(),
|
|
102
|
-
}), z.object({
|
|
103
|
-
'type': z.literal("image"),
|
|
104
|
-
'attachment': z.object({
|
|
105
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
106
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
107
|
-
'bytes': z.number(),
|
|
108
|
-
'width': z.number(),
|
|
109
|
-
'height': z.number(),
|
|
110
|
-
'name': z.string().optional(),
|
|
111
|
-
'originalDimensions': z.object({
|
|
112
|
-
'width': z.number(),
|
|
113
|
-
'height': z.number(),
|
|
114
|
-
}).optional(),
|
|
115
|
-
}),
|
|
116
|
-
}), z.object({
|
|
117
|
-
'type': z.literal("reasoning"),
|
|
118
|
-
'text': z.string(),
|
|
119
|
-
}), z.object({
|
|
120
|
-
'type': z.literal("tool-call"),
|
|
121
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
122
|
-
'name': z.string(),
|
|
123
|
-
'arguments': z.string(),
|
|
124
|
-
}), z.lazy(() => ToolResultBlockRemoteCodec$schema)])),
|
|
125
|
-
'isError': z.boolean().optional(),
|
|
41
|
+
'type': z.literal("text").readonly(),
|
|
42
|
+
'text': z.string().readonly(),
|
|
126
43
|
}), z.object({
|
|
127
44
|
'type': z.literal("image").readonly(),
|
|
128
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
129
|
-
'data': z.string(),
|
|
130
|
-
'name': z.string().optional(),
|
|
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(),
|
|
131
48
|
})])).readonly(),
|
|
132
49
|
'clientTimeZone': z.string().readonly().optional(),
|
|
133
50
|
})
|
|
@@ -184,7 +101,7 @@ export const TYPERT = {
|
|
|
184
101
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
|
|
185
102
|
schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
|
|
186
103
|
},
|
|
187
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
104
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":476,"column":3},
|
|
188
105
|
},
|
|
189
106
|
{
|
|
190
107
|
id: '@deepseek-ai/dsh-subagent#subagents/list',
|
|
@@ -211,7 +128,7 @@ export const TYPERT = {
|
|
|
211
128
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentCatalog',
|
|
212
129
|
schema: _deepseek_ai_dsh_subagent_subagents_list_result$schema,
|
|
213
130
|
},
|
|
214
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
131
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":384,"column":9},
|
|
215
132
|
},
|
|
216
133
|
{
|
|
217
134
|
id: '@deepseek-ai/dsh-subagent#subagents/prompt',
|
|
@@ -237,7 +154,7 @@ export const TYPERT = {
|
|
|
237
154
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
|
|
238
155
|
schema: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
|
|
239
156
|
},
|
|
240
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
157
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":410,"column":9},
|
|
241
158
|
},
|
|
242
159
|
],
|
|
243
160
|
model: {
|
|
@@ -259,10 +176,10 @@ export const TYPERT = {
|
|
|
259
176
|
},
|
|
260
177
|
{
|
|
261
178
|
"kind": "method",
|
|
262
|
-
"name": "
|
|
263
|
-
"signature": "async
|
|
264
|
-
"summary": "
|
|
265
|
-
"jsDoc": "/**\n *
|
|
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 */"
|
|
266
183
|
},
|
|
267
184
|
{
|
|
268
185
|
"kind": "method",
|
|
@@ -271,20 +188,6 @@ export const TYPERT = {
|
|
|
271
188
|
"summary": "Interrupt one live continuable child's current turn under a human parent address or an exact live ancestor Agent.",
|
|
272
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 */"
|
|
273
190
|
},
|
|
274
|
-
{
|
|
275
|
-
"kind": "method",
|
|
276
|
-
"name": "reportFrom",
|
|
277
|
-
"signature": "async reportFrom( child: Agent, content: ContentBlock[], options: SubagentReportOptions, ): Promise<MessageId>",
|
|
278
|
-
"summary": "Deliver selected content from one live continuable child to its durable direct parent.",
|
|
279
|
-
"jsDoc": "/**\n * Deliver selected content from one live continuable child to its durable\n * direct parent. The child is the authority credential; callers cannot name a\n * recipient. Reporting does not conclude the child's turn or Activation.\n * @param child - exact live reporting child.\n * @param content - selected model-facing content.\n * @param options - parent scheduling and pre-acceptance cancellation.\n * @returns the stable identity of the parent-accepted message.\n * @throws when continuation services are unavailable, sender authorization\n * fails, or the direct parent is not live.\n */"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"kind": "method",
|
|
283
|
-
"name": "registerContinuableSetup",
|
|
284
|
-
"signature": "registerContinuableSetup(contribution: ContinuableSetupContribution): () => void",
|
|
285
|
-
"summary": "Compose one deployment capability into every continuable child's unpublished creation context on fresh creation and cold resume.",
|
|
286
|
-
"jsDoc": "/**\n * Compose one deployment capability into every continuable child's\n * unpublished creation context on fresh creation and cold resume. Grants wait\n * for the next Activation; removing the contribution revokes every resident\n * installation immediately.\n * @param contribution - synchronous child-scope installer.\n * @returns the exact Cordis effect disposer.\n */"
|
|
287
|
-
},
|
|
288
191
|
{
|
|
289
192
|
"kind": "method",
|
|
290
193
|
"name": "drainContinuableDescendants",
|
|
@@ -325,7 +228,7 @@ export const TYPERT = {
|
|
|
325
228
|
"name": "prompt",
|
|
326
229
|
"signature": "@Remote('prompt') async prompt(request: SubagentPromptRequest, signal: AbortSignal): Promise<SubagentPromptReceipt>",
|
|
327
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.",
|
|
328
|
-
"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 * @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-
|
|
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 */"
|
|
329
232
|
},
|
|
330
233
|
{
|
|
331
234
|
"kind": "method",
|
|
@@ -372,6 +275,10 @@ export const TYPERT = {
|
|
|
372
275
|
"name": "AgentCancelCause",
|
|
373
276
|
"declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
|
|
374
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
|
+
},
|
|
375
282
|
{
|
|
376
283
|
"name": "AgentOptions",
|
|
377
284
|
"declaration": "export interface AgentOptions {\n provider?: string;\n model?: string;\n reasoningEffort?: ReasoningEffortId;\n maxTokens?: number;\n subagentDepth?: number;\n}"
|
|
@@ -408,6 +315,10 @@ export const TYPERT = {
|
|
|
408
315
|
"name": "Branded",
|
|
409
316
|
"declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
|
|
410
317
|
},
|
|
318
|
+
{
|
|
319
|
+
"name": "BrandedNumber",
|
|
320
|
+
"declaration": "export type BrandedNumber<B extends string> = number & { readonly [BRAND]: B; };"
|
|
321
|
+
},
|
|
411
322
|
{
|
|
412
323
|
"name": "CancelOptions",
|
|
413
324
|
"declaration": "export interface CancelOptions {\n keepInbox?: boolean | undefined;\n}"
|
|
@@ -456,10 +367,6 @@ export const TYPERT = {
|
|
|
456
367
|
"name": "ContinuableCreateSpec",
|
|
457
368
|
"declaration": "export interface ContinuableCreateSpec {\n readonly seed?: readonly SessionEvent[];\n}"
|
|
458
369
|
},
|
|
459
|
-
{
|
|
460
|
-
"name": "ContinuableSetupContribution",
|
|
461
|
-
"declaration": "export type ContinuableSetupContribution = (childCtx: Context) => () => void;"
|
|
462
|
-
},
|
|
463
370
|
{
|
|
464
371
|
"name": "ContinuableStart",
|
|
465
372
|
"declaration": "export interface ContinuableStart {\n readonly childId: SessionId;\n readonly messageId: MessageId;\n}"
|
|
@@ -472,18 +379,6 @@ export const TYPERT = {
|
|
|
472
379
|
"name": "ContinuableSubagentDescriptorData",
|
|
473
380
|
"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}"
|
|
474
381
|
},
|
|
475
|
-
{
|
|
476
|
-
"name": "CoordinatorMessageSource",
|
|
477
|
-
"declaration": "export interface CoordinatorMessageSource {\n readonly kind: 'coordinator';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"name": "EncodedImageAttachment",
|
|
481
|
-
"declaration": "export interface EncodedImageAttachment {\n mediaType: ImageMediaType;\n data: string;\n name?: string;\n}"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
"name": "EncodedImagePromptBlock",
|
|
485
|
-
"declaration": "export interface EncodedImagePromptBlock extends EncodedImageAttachment {\n readonly type: 'image';\n}"
|
|
486
|
-
},
|
|
487
382
|
{
|
|
488
383
|
"name": "EpochHeader",
|
|
489
384
|
"declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n system?: string;\n tools?: ToolSchema[];\n}"
|
|
@@ -598,7 +493,7 @@ export const TYPERT = {
|
|
|
598
493
|
},
|
|
599
494
|
{
|
|
600
495
|
"name": "MessageSourceMap",
|
|
601
|
-
"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
|
|
496
|
+
"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}"
|
|
602
497
|
},
|
|
603
498
|
{
|
|
604
499
|
"name": "ModelMessageSource",
|
|
@@ -616,6 +511,14 @@ export const TYPERT = {
|
|
|
616
511
|
"name": "OneShotSubagentDescriptorData",
|
|
617
512
|
"declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n readonly mode: 'one-shot';\n readonly label?: string;\n}"
|
|
618
513
|
},
|
|
514
|
+
{
|
|
515
|
+
"name": "OptionalSessionSeq",
|
|
516
|
+
"declaration": "export type OptionalSessionSeq = SessionSeq | null;"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"name": "PromptContentPart",
|
|
520
|
+
"declaration": "export type PromptContentPart = { readonly type: 'text'; readonly text: string; } | { readonly type: 'image'; readonly mediaType: ImageMediaType; readonly data: string; readonly name?: string; };"
|
|
521
|
+
},
|
|
619
522
|
{
|
|
620
523
|
"name": "ProviderRequestId",
|
|
621
524
|
"declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
|
|
@@ -658,15 +561,15 @@ export const TYPERT = {
|
|
|
658
561
|
},
|
|
659
562
|
{
|
|
660
563
|
"name": "Session",
|
|
661
|
-
"declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n get id(): SessionId;\n readonly firstLiveSeq:
|
|
564
|
+
"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] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
|
|
662
565
|
},
|
|
663
566
|
{
|
|
664
567
|
"name": "SessionEvent",
|
|
665
|
-
"declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq:
|
|
568
|
+
"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];"
|
|
666
569
|
},
|
|
667
570
|
{
|
|
668
571
|
"name": "SessionEventMap",
|
|
669
|
-
"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/chunk': { turn: number; step: number; chunk: StreamChunk; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\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': Record<string, never>;\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 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?:
|
|
572
|
+
"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/chunk': { turn: number; step: number; chunk: StreamChunk; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\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': Record<string, never>;\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 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\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 'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 1; 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}"
|
|
670
573
|
},
|
|
671
574
|
{
|
|
672
575
|
"name": "SessionEventType",
|
|
@@ -674,27 +577,35 @@ export const TYPERT = {
|
|
|
674
577
|
},
|
|
675
578
|
{
|
|
676
579
|
"name": "SessionHeader",
|
|
677
|
-
"declaration": "export interface SessionHeader {\n readonly version: number;\n readonly id: SessionId;\n readonly createdAt: number;\n readonly cwd?: string;\n readonly parentSession?: SessionId;\n readonly
|
|
580
|
+
"declaration": "export interface SessionHeader {\n readonly version: number;\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}"
|
|
678
581
|
},
|
|
679
582
|
{
|
|
680
583
|
"name": "SessionId",
|
|
681
584
|
"declaration": "export type SessionId = Branded<'SessionId'>;"
|
|
682
585
|
},
|
|
586
|
+
{
|
|
587
|
+
"name": "SessionLogOffset",
|
|
588
|
+
"declaration": "export type SessionLogOffset = BrandedNumber<'SessionLogOffset'>;"
|
|
589
|
+
},
|
|
683
590
|
{
|
|
684
591
|
"name": "SessionReferenceSource",
|
|
685
|
-
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq:
|
|
592
|
+
"declaration": "export interface SessionReferenceSource {\n kind: 'session-reference';\n form: 'recall';\n version: 1;\n references: { sessionId: string; label: string; capturedThroughSeq: OptionalSessionSeq; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
|
|
686
593
|
},
|
|
687
594
|
{
|
|
688
595
|
"name": "SessionRequestId",
|
|
689
596
|
"declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
|
|
690
597
|
},
|
|
598
|
+
{
|
|
599
|
+
"name": "SessionSeq",
|
|
600
|
+
"declaration": "export type SessionSeq = BrandedNumber<'SessionSeq'>;"
|
|
601
|
+
},
|
|
691
602
|
{
|
|
692
603
|
"name": "SessionSurface",
|
|
693
|
-
"declaration": "export interface SessionSurface {\n readonly nodes: readonly
|
|
604
|
+
"declaration": "export interface SessionSurface {\n readonly nodes: readonly SessionSeq[];\n readonly replaceGeneration: number;\n}"
|
|
694
605
|
},
|
|
695
606
|
{
|
|
696
607
|
"name": "SessionTitleEventData",
|
|
697
|
-
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs:
|
|
608
|
+
"declaration": "export interface SessionTitleEventData {\n readonly title: string;\n readonly messageSeqs: SessionSeq[];\n readonly source: SessionTitleSource;\n}"
|
|
698
609
|
},
|
|
699
610
|
{
|
|
700
611
|
"name": "SessionTitleModelProvenance",
|
|
@@ -736,10 +647,6 @@ export const TYPERT = {
|
|
|
736
647
|
"name": "SubagentDescriptorData",
|
|
737
648
|
"declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
|
|
738
649
|
},
|
|
739
|
-
{
|
|
740
|
-
"name": "SubagentFollowupOptions",
|
|
741
|
-
"declaration": "export interface SubagentFollowupOptions {\n readonly source: MessageSource;\n readonly signal: AbortSignal;\n}"
|
|
742
|
-
},
|
|
743
650
|
{
|
|
744
651
|
"name": "SubagentInterruptAuthority",
|
|
745
652
|
"declaration": "export type SubagentInterruptAuthority = { readonly kind: 'user'; readonly parentSessionId: SessionId; } | { readonly kind: 'ancestor'; readonly agent: Agent; };"
|
|
@@ -752,17 +659,13 @@ export const TYPERT = {
|
|
|
752
659
|
"name": "SubagentListEntry",
|
|
753
660
|
"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'; };"
|
|
754
661
|
},
|
|
755
|
-
{
|
|
756
|
-
"name": "SubagentPromptContentPart",
|
|
757
|
-
"declaration": "export type SubagentPromptContentPart = ContentBlock | EncodedImagePromptBlock;"
|
|
758
|
-
},
|
|
759
662
|
{
|
|
760
663
|
"name": "SubagentPromptReceipt",
|
|
761
664
|
"declaration": "export interface SubagentPromptReceipt {\n readonly messageId: MessageId;\n}"
|
|
762
665
|
},
|
|
763
666
|
{
|
|
764
667
|
"name": "SubagentPromptRequest",
|
|
765
|
-
"declaration": "export interface SubagentPromptRequest {\n readonly requestId: SubagentPromptRequestId;\n readonly parentSessionId: SessionId;\n readonly childSessionId: SessionId;\n readonly mode: 'continuable';\n readonly content: readonly
|
|
668
|
+
"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}"
|
|
766
669
|
},
|
|
767
670
|
{
|
|
768
671
|
"name": "SubagentPromptRequestId",
|
|
@@ -772,18 +675,6 @@ export const TYPERT = {
|
|
|
772
675
|
"name": "SubagentProvider",
|
|
773
676
|
"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}"
|
|
774
677
|
},
|
|
775
|
-
{
|
|
776
|
-
"name": "SubagentReportDelivery",
|
|
777
|
-
"declaration": "export type SubagentReportDelivery = 'quiet' | 'next-step';"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"name": "SubagentReportMessageSource",
|
|
781
|
-
"declaration": "export interface SubagentReportMessageSource {\n readonly kind: 'subagent-report';\n readonly form: 'relay';\n readonly senderSessionId: SessionId;\n}"
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
"name": "SubagentReportOptions",
|
|
785
|
-
"declaration": "export interface SubagentReportOptions {\n readonly delivery: SubagentReportDelivery;\n readonly signal: AbortSignal;\n}"
|
|
786
|
-
},
|
|
787
678
|
{
|
|
788
679
|
"name": "SubagentResult",
|
|
789
680
|
"declaration": "export interface SubagentResult {\n readonly output: ContentBlock[];\n readonly structured?: unknown;\n readonly diagnostic?: string;\n readonly stopReason: SubagentStopReason;\n}"
|
|
@@ -792,6 +683,10 @@ export const TYPERT = {
|
|
|
792
683
|
"name": "SubagentRun",
|
|
793
684
|
"declaration": "export interface SubagentRun {\n readonly id: SessionId;\n readonly localAgent: Agent | undefined;\n readonly result: Promise<SubagentResult>;\n dispose(): Promise<void>;\n}"
|
|
794
685
|
},
|
|
686
|
+
{
|
|
687
|
+
"name": "SubagentSendMessageOptions",
|
|
688
|
+
"declaration": "export interface SubagentSendMessageOptions {\n readonly signal: AbortSignal;\n}"
|
|
689
|
+
},
|
|
795
690
|
{
|
|
796
691
|
"name": "SubagentSettledMessageSource",
|
|
797
692
|
"declaration": "export interface SubagentSettledMessageSource {\n readonly kind: 'subagent-settled';\n readonly form: 'notice';\n readonly summary: string;\n readonly senderSessionId: SessionId;\n}"
|
|
@@ -814,11 +709,11 @@ export const TYPERT = {
|
|
|
814
709
|
},
|
|
815
710
|
{
|
|
816
711
|
"name": "SurfaceIntent",
|
|
817
|
-
"declaration": "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?:
|
|
712
|
+
"declaration": "export interface SurfaceIntent {\n surfaceOp: SurfaceOp;\n sourceEventSeqs?: SessionSeq[];\n}"
|
|
818
713
|
},
|
|
819
714
|
{
|
|
820
715
|
"name": "SurfaceOp",
|
|
821
|
-
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start:
|
|
716
|
+
"declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: SessionSeq; end: SessionSeq; };"
|
|
822
717
|
},
|
|
823
718
|
{
|
|
824
719
|
"name": "TeamId",
|
|
@@ -1,37 +1,6 @@
|
|
|
1
1
|
/* Generated by @deepseek-ai/dsh-typert-generator from the Host FaceModel — do not edit. */
|
|
2
2
|
import { z } from 'zod'
|
|
3
3
|
|
|
4
|
-
const ToolResultBlockRemoteCodec$schema = z.object({
|
|
5
|
-
'type': z.literal("tool-result"),
|
|
6
|
-
'toolCallId': z.intersection(z.string(), z.unknown()),
|
|
7
|
-
'content': z.array(z.union([z.object({
|
|
8
|
-
'type': z.literal("text"),
|
|
9
|
-
'text': z.string(),
|
|
10
|
-
}), z.object({
|
|
11
|
-
'type': z.literal("image"),
|
|
12
|
-
'attachment': z.object({
|
|
13
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
14
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
15
|
-
'bytes': z.number(),
|
|
16
|
-
'width': z.number(),
|
|
17
|
-
'height': z.number(),
|
|
18
|
-
'name': z.string().optional(),
|
|
19
|
-
'originalDimensions': z.object({
|
|
20
|
-
'width': z.number(),
|
|
21
|
-
'height': z.number(),
|
|
22
|
-
}).optional(),
|
|
23
|
-
}),
|
|
24
|
-
}), z.object({
|
|
25
|
-
'type': z.literal("reasoning"),
|
|
26
|
-
'text': z.string(),
|
|
27
|
-
}), z.object({
|
|
28
|
-
'type': z.literal("tool-call"),
|
|
29
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
30
|
-
'name': z.string(),
|
|
31
|
-
'arguments': z.string(),
|
|
32
|
-
}), z.lazy(() => ToolResultBlockRemoteCodec$schema)])),
|
|
33
|
-
'isError': z.boolean().optional(),
|
|
34
|
-
})
|
|
35
4
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_0$schema = z.intersection(z.string(), z.unknown())
|
|
36
5
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_1$schema = z.intersection(z.string(), z.unknown())
|
|
37
6
|
const _deepseek_ai_dsh_subagent_subagents_interruptByParent_parameter_2$schema = z.literal("continuable")
|
|
@@ -69,65 +38,13 @@ const _deepseek_ai_dsh_subagent_subagents_prompt_parameter_0$schema = z.object({
|
|
|
69
38
|
'childSessionId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
70
39
|
'mode': z.literal("continuable").readonly(),
|
|
71
40
|
'content': z.array(z.union([z.object({
|
|
72
|
-
'type': z.literal("text"),
|
|
73
|
-
'text': z.string(),
|
|
74
|
-
}), z.object({
|
|
75
|
-
'type': z.literal("image"),
|
|
76
|
-
'attachment': z.object({
|
|
77
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
78
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
79
|
-
'bytes': z.number(),
|
|
80
|
-
'width': z.number(),
|
|
81
|
-
'height': z.number(),
|
|
82
|
-
'name': z.string().optional(),
|
|
83
|
-
'originalDimensions': z.object({
|
|
84
|
-
'width': z.number(),
|
|
85
|
-
'height': z.number(),
|
|
86
|
-
}).optional(),
|
|
87
|
-
}),
|
|
88
|
-
}), z.object({
|
|
89
|
-
'type': z.literal("reasoning"),
|
|
90
|
-
'text': z.string(),
|
|
91
|
-
}), z.object({
|
|
92
|
-
'type': z.literal("tool-call"),
|
|
93
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
94
|
-
'name': z.string(),
|
|
95
|
-
'arguments': z.string(),
|
|
96
|
-
}), z.object({
|
|
97
|
-
'type': z.literal("tool-result"),
|
|
98
|
-
'toolCallId': z.intersection(z.string(), z.unknown()),
|
|
99
|
-
'content': z.array(z.union([z.object({
|
|
100
|
-
'type': z.literal("text"),
|
|
101
|
-
'text': z.string(),
|
|
102
|
-
}), z.object({
|
|
103
|
-
'type': z.literal("image"),
|
|
104
|
-
'attachment': z.object({
|
|
105
|
-
'attachmentId': z.intersection(z.string(), z.unknown()),
|
|
106
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
107
|
-
'bytes': z.number(),
|
|
108
|
-
'width': z.number(),
|
|
109
|
-
'height': z.number(),
|
|
110
|
-
'name': z.string().optional(),
|
|
111
|
-
'originalDimensions': z.object({
|
|
112
|
-
'width': z.number(),
|
|
113
|
-
'height': z.number(),
|
|
114
|
-
}).optional(),
|
|
115
|
-
}),
|
|
116
|
-
}), z.object({
|
|
117
|
-
'type': z.literal("reasoning"),
|
|
118
|
-
'text': z.string(),
|
|
119
|
-
}), z.object({
|
|
120
|
-
'type': z.literal("tool-call"),
|
|
121
|
-
'id': z.intersection(z.string(), z.unknown()),
|
|
122
|
-
'name': z.string(),
|
|
123
|
-
'arguments': z.string(),
|
|
124
|
-
}), z.lazy(() => ToolResultBlockRemoteCodec$schema)])),
|
|
125
|
-
'isError': z.boolean().optional(),
|
|
41
|
+
'type': z.literal("text").readonly(),
|
|
42
|
+
'text': z.string().readonly(),
|
|
126
43
|
}), z.object({
|
|
127
44
|
'type': z.literal("image").readonly(),
|
|
128
|
-
'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
|
|
129
|
-
'data': z.string(),
|
|
130
|
-
'name': z.string().optional(),
|
|
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(),
|
|
131
48
|
})])).readonly(),
|
|
132
49
|
'clientTimeZone': z.string().readonly().optional(),
|
|
133
50
|
})
|
|
@@ -181,7 +98,7 @@ export const TYPERT_REMOTE = {
|
|
|
181
98
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
|
|
182
99
|
schema: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
|
|
183
100
|
},
|
|
184
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
101
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":476,"column":3},
|
|
185
102
|
},
|
|
186
103
|
{
|
|
187
104
|
id: '@deepseek-ai/dsh-subagent#subagents/list',
|
|
@@ -208,7 +125,7 @@ export const TYPERT_REMOTE = {
|
|
|
208
125
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentCatalog',
|
|
209
126
|
schema: _deepseek_ai_dsh_subagent_subagents_list_result$schema,
|
|
210
127
|
},
|
|
211
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
128
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":384,"column":9},
|
|
212
129
|
},
|
|
213
130
|
{
|
|
214
131
|
id: '@deepseek-ai/dsh-subagent#subagents/prompt',
|
|
@@ -234,7 +151,7 @@ export const TYPERT_REMOTE = {
|
|
|
234
151
|
typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
|
|
235
152
|
schema: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
|
|
236
153
|
},
|
|
237
|
-
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":
|
|
154
|
+
sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":410,"column":9},
|
|
238
155
|
},
|
|
239
156
|
],
|
|
240
157
|
}
|
|
@@ -64,10 +64,10 @@ export declare function resolveChildAgentOptions(parent: Agent, requested: Agent
|
|
|
64
64
|
* child never had.
|
|
65
65
|
* @param parent - the delegating parent agent.
|
|
66
66
|
* @param childDepth - the resolved delegation depth to persist.
|
|
67
|
-
* @param
|
|
67
|
+
* @param isSeeded - whether this child inherits a parent-log prefix, including an explicitly empty one.
|
|
68
68
|
* @returns the `meta` for `ctx.agents.create()`.
|
|
69
69
|
*/
|
|
70
|
-
export declare function childSessionMeta(parent: Agent, childDepth: number,
|
|
70
|
+
export declare function childSessionMeta(parent: Agent, childDepth: number, isSeeded: boolean): NonNullable<CreateAgentOptions['meta']>;
|
|
71
71
|
/** The scoped composition a child agent's creation window applies. */
|
|
72
72
|
export interface ChildComposition {
|
|
73
73
|
/** Per-child persona shadowing the deployment persona. */
|
package/lib/types/child-agent.js
CHANGED
|
@@ -105,22 +105,22 @@ export function resolveChildAgentOptions(parent, requested, childDepth) {
|
|
|
105
105
|
* child never had.
|
|
106
106
|
* @param parent - the delegating parent agent.
|
|
107
107
|
* @param childDepth - the resolved delegation depth to persist.
|
|
108
|
-
* @param
|
|
108
|
+
* @param isSeeded - whether this child inherits a parent-log prefix, including an explicitly empty one.
|
|
109
109
|
* @returns the `meta` for `ctx.agents.create()`.
|
|
110
110
|
*/
|
|
111
|
-
export function childSessionMeta(parent, childDepth,
|
|
111
|
+
export function childSessionMeta(parent, childDepth, isSeeded) {
|
|
112
112
|
const parentHeader = parent.session.header;
|
|
113
113
|
const agentPreset = parent.ctx.get('agentPresets')?.composedPreset(parent.ctx);
|
|
114
114
|
return {
|
|
115
115
|
...parentHeader.cwd !== undefined ? { cwd: parentHeader.cwd } : {},
|
|
116
116
|
...agentPreset === undefined ? {} : { agentPreset },
|
|
117
117
|
parentSession: parentHeader.id,
|
|
118
|
+
isSeeded,
|
|
118
119
|
// Navigation classification only; the descriptor remains the authority
|
|
119
120
|
// for mode and continuation capability.
|
|
120
121
|
origin: 'subagent',
|
|
121
122
|
// Durable: the recursion budget must survive persistence and resume.
|
|
122
123
|
delegationDepth: childDepth,
|
|
123
|
-
...lineageSeedLength > 0 ? { seedLength: lineageSeedLength } : {},
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
/**
|