@deepseek-ai/dsh-subagent 0.2.0-rc.1 → 0.2.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -54,8 +54,8 @@
54
54
  en: 7384d01be46a2f0a
55
55
  zh: 83373486ad10d6d5
56
56
  /deepseek-ai-dsh-subagent/further-exploration:
57
- en: d1c1e87fc59ebfe5
58
- zh: b7ec9b870b514911
57
+ en: 5b0f408dd901d90a
58
+ zh: e11866d5fd878327
59
59
  /deepseek-ai-dsh-subagent/model-experience:
60
60
  en: 215e7ba838619b7b
61
61
  zh: a311da3843709f90
package/README.md CHANGED
@@ -130,7 +130,7 @@ Successful local child creation appends a `subagent/catalog` fact to the parent
130
130
  Read these pages when the package-level contract is not enough. They move from the shared seam to the backends, the model-facing tools, and the design decisions.
131
131
 
132
132
  - [Subagent subsystem](../../../docs/subsystems/subagent.md) — the service contract, provider contract, and terminal result semantics.
133
- - [Subagent capability seam](../../../.agents/notes/implemented/feature/2026-06-21-subagent-capability-seam.md) — the design record for the delegation capability family.
133
+ - [historical Subagent capability seam](../../../.agents/notes/archived/feature/2026-06-21-subagent-capability-seam.md) — the design record for the delegation capability family.
134
134
  - [Continuable subagents](../../../.agents/notes/implemented/feature/2026-07-28-continuable-subagent-conversations.md) — durable children that accept follow-up turns.
135
135
  - [In-process spawn backend](../subagent-spawn-in-process/README.md) — the simplest provider to compose.
136
136
  - [Auto review](../../experimental/auto-review/README.md) — the current-session authorization mode inherited only by in-process DSH children.
package/README.zh.md CHANGED
@@ -130,7 +130,7 @@ kind: "package-reference"
130
130
  当包级约定不够用时阅读以下页面。它们从共享 seam 逐步进入后端、面向模型的工具与设计决策。
131
131
 
132
132
  - [Subagent 子系统](../../../docs/subsystems/subagent.zh.md)——服务约定、提供方约定与终态结果语义。
133
- - [Subagent 能力 seam](../../../.agents/notes/implemented/feature/2026-06-21-subagent-capability-seam.zh.md)——委派能力家族的设计记录。
133
+ - [历史Subagent 能力 seam](../../../.agents/notes/archived/feature/2026-06-21-subagent-capability-seam.md)——委派能力家族的设计记录。
134
134
  - [可继续的 subagent](../../../.agents/notes/implemented/feature/2026-07-28-continuable-subagent-conversations.zh.md)——接受后续轮次的持久子级。
135
135
  - [进程内 spawn 后端](../subagent-spawn-in-process/README.zh.md)——最容易组合的提供方。
136
136
  - [Auto review](../../experimental/auto-review/README.zh.md)——只有进程内 DSH 子级继承的当前会话授权模式。
@@ -83,7 +83,7 @@ export const TYPERT = {
83
83
  typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
84
84
  create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
85
85
  },
86
- sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":483,"column":3},
86
+ sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":481,"column":3},
87
87
  },
88
88
  {
89
89
  id: '@deepseek-ai/dsh-subagent#subagents/prompt',
@@ -109,7 +109,7 @@ export const TYPERT = {
109
109
  typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
110
110
  create: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
111
111
  },
112
- sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":416,"column":9},
112
+ sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":414,"column":9},
113
113
  },
114
114
  ],
115
115
  model: {
@@ -502,6 +502,14 @@ export const TYPERT = {
502
502
  "name": "LlmFailure",
503
503
  "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}"
504
504
  },
505
+ {
506
+ "name": "LlmRetryEventData",
507
+ "declaration": "export type LlmRetryEventData = { retryId: RetryId; turn: number; step: number; provider: string; mode: 'normal'; policyKey: string; retry: number; maxRetries: number; delayMs: number; failure: LlmFailure; } | { retryId: RetryId; turn: number; step: number; provider: string; mode: 'always'; policyKey: string; retry: number; delayMs: number; failure: LlmFailure; };"
508
+ },
509
+ {
510
+ "name": "LlmRetryStartedEventData",
511
+ "declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
512
+ },
505
513
  {
506
514
  "name": "Message",
507
515
  "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
@@ -544,7 +552,7 @@ export const TYPERT = {
544
552
  },
545
553
  {
546
554
  "name": "MessageSourceMap",
547
- "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 goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
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 'compact-checkpoint': CompactionCheckpointSource;\n 'user-question-reply': { kind: 'user-question-reply'; callId: ToolCallId; outcome: 'answered'; };\n goal: GoalMessageSource;\n schedule: { kind: 'schedule'; } & ContextFormed;\n 'session-reference': SessionReferenceSource;\n}"
548
556
  },
549
557
  {
550
558
  "name": "ModelMessageSource",
@@ -610,6 +618,10 @@ export const TYPERT = {
610
618
  "name": "ResolvedSubagentStartRequest",
611
619
  "declaration": "export interface ResolvedSubagentStartRequest extends SubagentStartRequest {\n readonly descriptor: SubagentDescriptorData;\n}"
612
620
  },
621
+ {
622
+ "name": "RetryId",
623
+ "declaration": "export type RetryId = Branded<'RetryId'>;"
624
+ },
613
625
  {
614
626
  "name": "SandboxMode",
615
627
  "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
@@ -644,7 +656,7 @@ export const TYPERT = {
644
656
  },
645
657
  {
646
658
  "name": "SessionEventMap",
647
- "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 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
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 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\n}"
648
660
  },
649
661
  {
650
662
  "name": "SessionEventType",
@@ -888,18 +900,13 @@ export const TYPERT = {
888
900
  "comment": "- the run identity and terminal outcome.",
889
901
  "text": "@param info - the run identity and terminal outcome.\n *"
890
902
  },
891
- {
892
- "name": "dshScopeScan",
893
- "comment": "unsupported",
894
- "text": "@dshScopeScan unsupported\n *"
895
- },
896
903
  {
897
904
  "name": "mode",
898
905
  "comment": "emit",
899
906
  "text": "@mode emit"
900
907
  }
901
908
  ],
902
- "jsDoc": "/**\n * A published child settled. Scope-filtered dispatch uses the same delegating\n * parent carrier as `subagent/start`, so the lifecycle pair reaches the\n * same scoped audience.\n * @param info - the run identity and terminal outcome.\n * @dshScopeScan unsupported\n * @mode emit\n */",
909
+ "jsDoc": "/**\n * A published child settled. Scope-filtered dispatch uses the same delegating\n * parent carrier as `subagent/start`, so the lifecycle pair reaches the\n * same scoped audience.\n * @param info - the run identity and terminal outcome.\n * @mode emit\n */",
903
910
  "name": "subagent/end",
904
911
  "mode": "emit",
905
912
  "signature": "'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void"
@@ -956,18 +963,13 @@ export const TYPERT = {
956
963
  "comment": "- the provider and published child identity.",
957
964
  "text": "@param info - the provider and published child identity.\n *"
958
965
  },
959
- {
960
- "name": "dshScopeScan",
961
- "comment": "unsupported",
962
- "text": "@dshScopeScan unsupported\n *"
963
- },
964
966
  {
965
967
  "name": "mode",
966
968
  "comment": "emit",
967
969
  "text": "@mode emit"
968
970
  }
969
971
  ],
970
- "jsDoc": "/**\n * A provider established a published child. For in-process providers,\n * `ctx.agents.get(info.id)` resolves during this notification.\n * Scope-filtered dispatch keys the carrier by the delegating parent, so a\n * parent-scoped listener observes only its own delegations. Paired with\n * `subagent/end`.\n * @param info - the provider and published child identity.\n * @dshScopeScan unsupported\n * @mode emit\n */",
972
+ "jsDoc": "/**\n * A provider established a published child. For in-process providers,\n * `ctx.agents.get(info.id)` resolves during this notification.\n * Scope-filtered dispatch keys the carrier by the delegating parent, so a\n * parent-scoped listener observes only its own delegations. Paired with\n * `subagent/end`.\n * @param info - the provider and published child identity.\n * @mode emit\n */",
971
973
  "name": "subagent/start",
972
974
  "mode": "emit",
973
975
  "signature": "'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void"
@@ -80,7 +80,7 @@ export const TYPERT_REMOTE = {
80
80
  typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentInterruptReceipt',
81
81
  create: _deepseek_ai_dsh_subagent_subagents_interruptByParent_result$schema,
82
82
  },
83
- sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":483,"column":3},
83
+ sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":481,"column":3},
84
84
  },
85
85
  {
86
86
  id: '@deepseek-ai/dsh-subagent#subagents/prompt',
@@ -106,7 +106,7 @@ export const TYPERT_REMOTE = {
106
106
  typeSymbol: '@deepseek-ai/dsh-subagent/client#SubagentPromptReceipt',
107
107
  create: _deepseek_ai_dsh_subagent_subagents_prompt_result$schema,
108
108
  },
109
- sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":416,"column":9},
109
+ sourceLocation: {"file":"packages/subagent/subagent/src/index.ts","line":414,"column":9},
110
110
  },
111
111
  ],
112
112
  }
@@ -83,7 +83,6 @@ declare module '@deepseek-ai/cordis' {
83
83
  * parent-scoped listener observes only its own delegations. Paired with
84
84
  * `subagent/end`.
85
85
  * @param info - the provider and published child identity.
86
- * @dshScopeScan unsupported
87
86
  * @mode emit
88
87
  */
89
88
  'subagent/start'(this: Scoped<SubagentRuntime>, info: SubagentRunInfo): void;
@@ -92,7 +91,6 @@ declare module '@deepseek-ai/cordis' {
92
91
  * parent carrier as `subagent/start`, so the lifecycle pair reaches the
93
92
  * same scoped audience.
94
93
  * @param info - the run identity and terminal outcome.
95
- * @dshScopeScan unsupported
96
94
  * @mode emit
97
95
  */
98
96
  'subagent/end'(this: Scoped<SubagentRuntime>, info: SubagentRunEndInfo): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-subagent",
3
3
  "description": "Abstract subagent seam (ctx.subagents): named-provider registry for delegating to child agents",
4
- "version": "0.2.0-rc.1",
4
+ "version": "0.2.1-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -22,10 +22,6 @@
22
22
  "types": "./lib/types/internal.d.ts",
23
23
  "default": "./lib/types/internal.js"
24
24
  },
25
- "./invariant": {
26
- "types": "./lib/types/invariant.d.ts",
27
- "default": "./lib/invariant.js"
28
- },
29
25
  "./client": {
30
26
  "types": "./lib/types/client.d.ts",
31
27
  "default": "./lib/types/client.js"
@@ -43,7 +39,6 @@
43
39
  },
44
40
  "files": [
45
41
  "lib/index.js",
46
- "lib/invariant.js",
47
42
  "lib/types/**/*.js",
48
43
  "lib/types/**/*.d.ts",
49
44
  "lib/typert.host.js",
@@ -54,33 +49,32 @@
54
49
  "license": "MIT",
55
50
  "dependencies": {
56
51
  "zod": "^4.4.3",
57
- "@deepseek-ai/dsh-brand": "0.2.0-rc.1",
58
- "@deepseek-ai/dsh-chunked-list": "0.2.0-rc.1",
59
- "@deepseek-ai/dsh-util-values": "0.2.0-rc.1",
60
- "@deepseek-ai/schemastery": "~3.18.4"
52
+ "@deepseek-ai/dsh-chunked-list": "0.2.1-alpha.1",
53
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.1",
54
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.1",
55
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.1"
61
56
  },
62
57
  "peerDependencies": {
63
- "@deepseek-ai/cordis": "~4.0.4",
64
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1",
65
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.1",
66
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.1",
67
- "@deepseek-ai/dsh-invariants": "0.2.0-rc.1",
68
- "@deepseek-ai/dsh-jobs": "0.2.0-rc.1",
69
- "@deepseek-ai/dsh-llm": "0.2.0-rc.1",
70
- "@deepseek-ai/dsh-sandbox": "0.2.0-rc.1",
71
- "@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.1",
72
- "@deepseek-ai/dsh-scope": "0.2.0-rc.1",
73
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
74
- "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.1",
75
- "@deepseek-ai/dsh-session-projection": "0.2.0-rc.1",
76
- "@deepseek-ai/dsh-session-query": "0.2.0-rc.1",
77
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.1",
78
- "@deepseek-ai/dsh-tools": "0.2.0-rc.1",
79
- "@deepseek-ai/dsh-user-approval": "0.2.0-rc.1",
80
- "@deepseek-ai/dsh-permission-presets": "0.2.0-rc.1",
81
- "@deepseek-ai/dsh-workspace": "0.2.0-rc.1",
82
- "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
83
- "@deepseek-ai/dsh-util-time": "0.2.0-rc.1"
58
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
59
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
60
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.1",
61
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
62
+ "@deepseek-ai/dsh-jobs": "0.2.1-alpha.1",
63
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
64
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.1",
65
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.1",
66
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
67
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
68
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.1",
69
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
70
+ "@deepseek-ai/dsh-session-query": "0.2.1-alpha.1",
71
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
72
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
73
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1",
74
+ "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.1",
75
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.1",
76
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
77
+ "@deepseek-ai/dsh-util-time": "0.2.1-alpha.1"
84
78
  },
85
79
  "peerDependenciesMeta": {
86
80
  "@deepseek-ai/dsh-agent-preset-registry": {
@@ -118,30 +112,25 @@
118
112
  }
119
113
  },
120
114
  "devDependencies": {
121
- "@deepseek-ai/cordis": "~4.0.4",
122
- "@deepseek-ai/dsh-agent": "0.2.0-rc.1",
123
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.1",
124
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.1",
125
- "@deepseek-ai/dsh-invariants": "0.2.0-rc.1",
126
- "@deepseek-ai/dsh-jobs": "0.2.0-rc.1",
127
- "@deepseek-ai/dsh-llm": "0.2.0-rc.1",
128
- "@deepseek-ai/dsh-sandbox": "0.2.0-rc.1",
129
- "@deepseek-ai/dsh-schedule": "0.2.0-rc.1",
130
- "@deepseek-ai/dsh-scope": "0.2.0-rc.1",
131
- "@deepseek-ai/dsh-session": "0.2.0-rc.1",
132
- "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.1",
133
- "@deepseek-ai/dsh-sandbox-policy": "0.2.0-rc.1",
134
- "@deepseek-ai/dsh-session-projection": "0.2.0-rc.1",
135
- "@deepseek-ai/dsh-session-query": "0.2.0-rc.1",
136
- "@deepseek-ai/dsh-storage": "0.2.0-rc.1",
137
- "@deepseek-ai/dsh-storage-domain": "0.2.0-rc.1",
138
- "@deepseek-ai/dsh-storage-json": "0.2.0-rc.1",
139
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.1",
140
- "@deepseek-ai/dsh-tools": "0.2.0-rc.1",
141
- "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.1",
142
- "@deepseek-ai/dsh-user-approval": "0.2.0-rc.1",
143
- "@deepseek-ai/dsh-util-time": "0.2.0-rc.1",
144
- "@deepseek-ai/dsh-permission-presets": "0.2.0-rc.1",
145
- "@deepseek-ai/dsh-workspace": "0.2.0-rc.1"
115
+ "@deepseek-ai/cordis": "~4.0.5-alpha.1",
116
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.1",
117
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
118
+ "@deepseek-ai/dsh-attachment": "0.2.1-alpha.1",
119
+ "@deepseek-ai/dsh-jobs": "0.2.1-alpha.1",
120
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
121
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.1",
122
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.1",
123
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
124
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
125
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.1",
126
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
127
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
128
+ "@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1",
129
+ "@deepseek-ai/dsh-user-approval": "0.2.1-alpha.1",
130
+ "@deepseek-ai/dsh-util-time": "0.2.1-alpha.1",
131
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
132
+ "@deepseek-ai/dsh-permission-presets": "0.2.1-alpha.1",
133
+ "@deepseek-ai/dsh-workspace": "0.2.1-alpha.1",
134
+ "@deepseek-ai/dsh-session-query": "0.2.1-alpha.1"
146
135
  }
147
136
  }
package/lib/invariant.js DELETED
@@ -1,76 +0,0 @@
1
- //#region lib/types/invariant.js
2
- /** Package-owned subagent registry and lifecycle invariants. @module @deepseek-ai/dsh-subagent/invariant */
3
- const PACKAGE_NAME = "@deepseek-ai/dsh-subagent";
4
- /** Cordis companion plugin name. */
5
- const name = "subagent-invariant";
6
- /** Service required before the companion can reserve package ownership. */
7
- const inject = ["invariants"];
8
- /** Assert that a terminal lifecycle payload matches its start identity. */
9
- function validateRunEnd(start, end, fail) {
10
- if (start.provider !== end.provider || start.id !== end.id || start.local !== end.local) fail(`subagent/end identity diverges from subagent/start for run ${JSON.stringify(end.runId)}`);
11
- }
12
- /** Install provider-registry and start/end pairing checks. */
13
- const install = Object.assign((ctx, fail) => {
14
- const providers = new Set(ctx.subagents.list());
15
- const runs = /* @__PURE__ */ new Map();
16
- const stagedProviders = /* @__PURE__ */ new WeakSet();
17
- const stagedRemovals = /* @__PURE__ */ new Set();
18
- const stagedStarts = /* @__PURE__ */ new WeakSet();
19
- const stagedEnds = /* @__PURE__ */ new WeakSet();
20
- ctx.on("internal/dispatch", (_mode, eventName, args) => {
21
- if (eventName === "subagent/provider-added") {
22
- const provider = args[0];
23
- if (provider.name.length === 0) fail("subagent provider names must be non-empty");
24
- if (providers.has(provider.name)) fail(`subagent/provider-added repeated ${JSON.stringify(provider.name)}`);
25
- stagedProviders.add(provider);
26
- return;
27
- }
28
- if (eventName === "subagent/provider-removed") {
29
- const providerName = args[0];
30
- if (!providers.has(providerName)) fail(`subagent/provider-removed names unknown provider ${JSON.stringify(providerName)}`);
31
- stagedRemovals.add(providerName);
32
- return;
33
- }
34
- if (eventName === "subagent/start") {
35
- const info = args[0];
36
- if (info.provider.length === 0 || String(info.runId).length === 0 || String(info.id).length === 0) fail("subagent/start provider, runId, and child id must be non-empty");
37
- if (runs.has(info.runId)) fail(`subagent/start repeated run id ${JSON.stringify(info.runId)}`);
38
- stagedStarts.add(info);
39
- return;
40
- }
41
- if (eventName !== "subagent/end") return;
42
- const info = args[0];
43
- const start = runs.get(info.runId);
44
- if (start === void 0) fail(`subagent/end has no matching subagent/start for run ${JSON.stringify(info.runId)}`);
45
- validateRunEnd(start, info, fail);
46
- stagedEnds.add(info);
47
- }, { global: true });
48
- ctx.on("subagent/provider-added", (provider) => {
49
- /* v8 ignore next -- internal/dispatch stages the same provider object */
50
- if (!stagedProviders.delete(provider)) return;
51
- providers.add(provider.name);
52
- }, { global: true });
53
- ctx.on("subagent/provider-removed", (providerName) => {
54
- /* v8 ignore next -- internal/dispatch stages the same provider name */
55
- if (!stagedRemovals.delete(providerName)) return;
56
- providers.delete(providerName);
57
- }, { global: true });
58
- ctx.on("subagent/start", (info) => {
59
- /* v8 ignore next -- internal/dispatch stages the same lifecycle object */
60
- if (!stagedStarts.delete(info)) return;
61
- runs.set(info.runId, info);
62
- }, { global: true });
63
- ctx.on("subagent/end", (info) => {
64
- /* v8 ignore next -- internal/dispatch stages the same lifecycle object */
65
- if (!stagedEnds.delete(info)) return;
66
- runs.delete(info.runId);
67
- }, { global: true });
68
- }, { inject: ["subagents"] });
69
- /**
70
- * Register the subagent invariant companion.
71
- * @param ctx - Cordis context carrying the invariant service.
72
- * @returns the installed registration's disposer after setup succeeds.
73
- */
74
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
75
- //#endregion
76
- export { apply, inject, name };
@@ -1,13 +0,0 @@
1
- /** Package-owned subagent registry and lifecycle invariants. @module @deepseek-ai/dsh-subagent/invariant */
2
- import type { Context } from '@deepseek-ai/cordis';
3
- /** Cordis companion plugin name. */
4
- export declare const name = "subagent-invariant";
5
- /** Service required before the companion can reserve package ownership. */
6
- export declare const inject: string[];
7
- /**
8
- * Register the subagent invariant companion.
9
- * @param ctx - Cordis context carrying the invariant service.
10
- * @returns the installed registration's disposer after setup succeeds.
11
- */
12
- export declare const apply: (ctx: Context) => Promise<() => void>;
13
- //# sourceMappingURL=invariant.d.ts.map
@@ -1,91 +0,0 @@
1
- /** Package-owned subagent registry and lifecycle invariants. @module @deepseek-ai/dsh-subagent/invariant */
2
- const PACKAGE_NAME = '@deepseek-ai/dsh-subagent';
3
- /** Cordis companion plugin name. */
4
- export const name = 'subagent-invariant';
5
- /** Service required before the companion can reserve package ownership. */
6
- export const inject = ['invariants'];
7
- /** Assert that a terminal lifecycle payload matches its start identity. */
8
- function validateRunEnd(start, end, fail) {
9
- if (start.provider !== end.provider || start.id !== end.id || start.local !== end.local) {
10
- fail(`subagent/end identity diverges from subagent/start for run ${JSON.stringify(end.runId)}`);
11
- }
12
- }
13
- /** Install provider-registry and start/end pairing checks. */
14
- const install = Object.assign((ctx, fail) => {
15
- const providers = new Set(ctx.subagents.list());
16
- const runs = new Map();
17
- const stagedProviders = new WeakSet();
18
- const stagedRemovals = new Set();
19
- const stagedStarts = new WeakSet();
20
- const stagedEnds = new WeakSet();
21
- ctx.on('internal/dispatch', (_mode, eventName, args) => {
22
- if (eventName === 'subagent/provider-added') {
23
- const provider = args[0];
24
- if (provider.name.length === 0)
25
- fail('subagent provider names must be non-empty');
26
- if (providers.has(provider.name))
27
- fail(`subagent/provider-added repeated ${JSON.stringify(provider.name)}`);
28
- stagedProviders.add(provider);
29
- return;
30
- }
31
- if (eventName === 'subagent/provider-removed') {
32
- const providerName = args[0];
33
- if (!providers.has(providerName))
34
- fail(`subagent/provider-removed names unknown provider ${JSON.stringify(providerName)}`);
35
- stagedRemovals.add(providerName);
36
- return;
37
- }
38
- if (eventName === 'subagent/start') {
39
- const info = args[0];
40
- // Provider availability is an admission-time relationship. A published
41
- // one-shot run may outlive provider removal, and a cold-resumed Activation
42
- // records the initial provider name without dispatching through it.
43
- if (info.provider.length === 0 || String(info.runId).length === 0 || String(info.id).length === 0) {
44
- fail('subagent/start provider, runId, and child id must be non-empty');
45
- }
46
- if (runs.has(info.runId))
47
- fail(`subagent/start repeated run id ${JSON.stringify(info.runId)}`);
48
- stagedStarts.add(info);
49
- return;
50
- }
51
- if (eventName !== 'subagent/end')
52
- return;
53
- const info = args[0];
54
- const start = runs.get(info.runId);
55
- if (start === undefined)
56
- fail(`subagent/end has no matching subagent/start for run ${JSON.stringify(info.runId)}`);
57
- validateRunEnd(start, info, fail);
58
- stagedEnds.add(info);
59
- }, { global: true });
60
- ctx.on('subagent/provider-added', (provider) => {
61
- /* v8 ignore next -- internal/dispatch stages the same provider object */
62
- if (!stagedProviders.delete(provider))
63
- return;
64
- providers.add(provider.name);
65
- }, { global: true });
66
- ctx.on('subagent/provider-removed', (providerName) => {
67
- /* v8 ignore next -- internal/dispatch stages the same provider name */
68
- if (!stagedRemovals.delete(providerName))
69
- return;
70
- providers.delete(providerName);
71
- }, { global: true });
72
- ctx.on('subagent/start', (info) => {
73
- /* v8 ignore next -- internal/dispatch stages the same lifecycle object */
74
- if (!stagedStarts.delete(info))
75
- return;
76
- runs.set(info.runId, info);
77
- }, { global: true });
78
- ctx.on('subagent/end', (info) => {
79
- /* v8 ignore next -- internal/dispatch stages the same lifecycle object */
80
- if (!stagedEnds.delete(info))
81
- return;
82
- runs.delete(info.runId);
83
- }, { global: true });
84
- }, { inject: ['subagents'] });
85
- /**
86
- * Register the subagent invariant companion.
87
- * @param ctx - Cordis context carrying the invariant service.
88
- * @returns the installed registration's disposer after setup succeeds.
89
- */
90
- export const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
91
- //# sourceMappingURL=invariant.js.map