@deepseek-ai/dsh-cordis-host-runner 0.2.0-rc.2 → 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 +6 -6
- package/README.md +2 -4
- package/README.zh.md +2 -4
- package/lib/typert.host.js +28 -4
- package/package.json +21 -21
package/README.i18n.yaml
CHANGED
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
en: d1a8777f171d22bb
|
|
31
31
|
zh: 7f6aa4c2680557b1
|
|
32
32
|
/deepseek-ai-dsh-cordis-host-runner/use-this-package/trust-stance:
|
|
33
|
-
en:
|
|
34
|
-
zh:
|
|
33
|
+
en: af859a1591c02386
|
|
34
|
+
zh: 46d3c82713fa9055
|
|
35
35
|
/deepseek-ai-dsh-cordis-host-runner/understand-the-implementation:
|
|
36
36
|
en: b0a536c0d00cbdb8
|
|
37
37
|
zh: 08e5d813aa6a612a
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
en: 40d63d9a75d233e6
|
|
46
46
|
zh: 96954bf346c6d9e6
|
|
47
47
|
/deepseek-ai-dsh-cordis-host-runner/further-exploration:
|
|
48
|
-
en:
|
|
49
|
-
zh:
|
|
48
|
+
en: 86c7f132478aa682
|
|
49
|
+
zh: 4c0729a12b8e5b66
|
|
50
50
|
/deepseek-ai-dsh-cordis-host-runner/model-experience:
|
|
51
51
|
en: 215e7ba838619b7b
|
|
52
52
|
zh: a311da3843709f90
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
en: 1f10688ae249a077
|
|
67
67
|
zh: ab2ff597e1769b81
|
|
68
68
|
/deepseek-ai-dsh-cordis-host-runner/known-limitations-and-deferred-work/dev-note:
|
|
69
|
-
en:
|
|
70
|
-
zh:
|
|
69
|
+
en: e67f633dc6fe7773
|
|
70
|
+
zh: 3bb0c20c93f16f98
|
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ Definitions are session-scoped and process-local: other sessions read them as ab
|
|
|
59
59
|
|
|
60
60
|
### Trust stance
|
|
61
61
|
|
|
62
|
-
The sandbox isolates globals but is not a security boundary: Node globals are absent or redirect to Cordis services (`ctx.fs`, `ctx.web`, `ctx.bash`, the timer helpers), and a host half receives a façade without framework internals, yet the services it declares reach the live runtime. Treat a dynamic package like bash access — see the [self-referential toolset
|
|
62
|
+
The sandbox isolates globals but is not a security boundary: Node globals are absent or redirect to Cordis services (`ctx.fs`, `ctx.web`, `ctx.bash`, the timer helpers), and a host half receives a façade without framework internals, yet the services it declares reach the live runtime. Treat a dynamic package like bash access — see the [self-referential toolset reference](README.md).
|
|
63
63
|
|
|
64
64
|
-----
|
|
65
65
|
|
|
@@ -105,7 +105,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
105
105
|
- [UI package](../ui-cordis/README.md) — the panel users approve and operate runs with.
|
|
106
106
|
- [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-cordis-host-runner) — every accepted config field.
|
|
107
107
|
- [Extensions subsystem](../../../docs/subsystems/extensions.md) — the generated `ctx.cordisInspect` and `ctx.dynamicCordisRunner` API and `cordis/*` events.
|
|
108
|
-
- [Self-referential Cordis toolset Agent Note](../../../.agents/notes/
|
|
108
|
+
- [historical Self-referential Cordis toolset Agent Note](../../../.agents/notes/archived/feature/2026-07-08-self-referential-cordis-toolset.md) — sandbox semantics, lifecycle, and composition rationale.
|
|
109
109
|
|
|
110
110
|
-----
|
|
111
111
|
|
|
@@ -150,5 +150,3 @@ These limits define when the runner needs special care. They are current package
|
|
|
150
150
|
None.
|
|
151
151
|
|
|
152
152
|
</details>
|
|
153
|
-
|
|
154
|
-
**Runtime invariant:** No companion is published. The definition registry is process memory with no event stream to observe, and its one owned relation (a running definition owns a settled host-half fiber and its handler table) is established and unwound inside single awaited verbs, so package tests assert it directly.
|
package/README.zh.md
CHANGED
|
@@ -59,7 +59,7 @@ Client 查询在 `clientInspectTimeoutMs` 内接受首个有效页面响应。
|
|
|
59
59
|
|
|
60
60
|
### 信任立场
|
|
61
61
|
|
|
62
|
-
沙箱隔离全局变量,但不是安全边界:Node 全局变量不存在,或重定向到 Cordis 服务(`ctx.fs`、`ctx.web`、`ctx.bash` 与定时器 helper),host 半收到的是不含框架内部机制的 façade,但它声明的服务仍会触达存活运行时。对待动态包要像对待 bash 访问一样,参见[自引用工具集
|
|
62
|
+
沙箱隔离全局变量,但不是安全边界:Node 全局变量不存在,或重定向到 Cordis 服务(`ctx.fs`、`ctx.web`、`ctx.bash` 与定时器 helper),host 半收到的是不含框架内部机制的 façade,但它声明的服务仍会触达存活运行时。对待动态包要像对待 bash 访问一样,参见[自引用工具集 参考](README.zh.md)。
|
|
63
63
|
|
|
64
64
|
-----
|
|
65
65
|
|
|
@@ -105,7 +105,7 @@ runner 基于两项职责划分。**注册表与沙箱是同一个服务。** `D
|
|
|
105
105
|
- [UI 包](../ui-cordis/README.zh.md)——用户批准并操作运行的面板。
|
|
106
106
|
- [生成的配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-cordis-host-runner)——每个受支持配置字段。
|
|
107
107
|
- [extensions 子系统](../../../docs/subsystems/extensions.zh.md)——生成的 `ctx.cordisInspect` 与 `ctx.dynamicCordisRunner` API 及 `cordis/*` 事件。
|
|
108
|
-
- [
|
|
108
|
+
- [历史自引用 Cordis 工具集 Agent Note](../../../.agents/notes/archived/feature/2026-07-08-self-referential-cordis-toolset.md)——沙箱语义、生命周期与组合的理由。
|
|
109
109
|
|
|
110
110
|
-----
|
|
111
111
|
|
|
@@ -150,5 +150,3 @@ runner 基于两项职责划分。**注册表与沙箱是同一个服务。** `D
|
|
|
150
150
|
无。
|
|
151
151
|
|
|
152
152
|
</details>
|
|
153
|
-
|
|
154
|
-
**运行时不变式:** 不发布伴生入口。definition registry 位于进程内存中且没有可观察的事件流;它唯一负责的关系是运行中的 definition 拥有已结算的 host-half fiber 及其 handler table,该关系在单个等待完成的操作中建立和解除,因此由包测试直接断言。
|
package/lib/typert.host.js
CHANGED
|
@@ -1152,6 +1152,14 @@ export const TYPERT = {
|
|
|
1152
1152
|
"name": "LlmFailure",
|
|
1153
1153
|
"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}"
|
|
1154
1154
|
},
|
|
1155
|
+
{
|
|
1156
|
+
"name": "LlmRetryEventData",
|
|
1157
|
+
"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; };"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"name": "LlmRetryStartedEventData",
|
|
1161
|
+
"declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
|
|
1162
|
+
},
|
|
1155
1163
|
{
|
|
1156
1164
|
"name": "Message",
|
|
1157
1165
|
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
@@ -1194,7 +1202,7 @@ export const TYPERT = {
|
|
|
1194
1202
|
},
|
|
1195
1203
|
{
|
|
1196
1204
|
"name": "MessageSourceMap",
|
|
1197
|
-
"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
|
|
1205
|
+
"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}"
|
|
1198
1206
|
},
|
|
1199
1207
|
{
|
|
1200
1208
|
"name": "ModelMessageSource",
|
|
@@ -1248,6 +1256,10 @@ export const TYPERT = {
|
|
|
1248
1256
|
"name": "RequestHeaderReason",
|
|
1249
1257
|
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
1250
1258
|
},
|
|
1259
|
+
{
|
|
1260
|
+
"name": "RetryId",
|
|
1261
|
+
"declaration": "export type RetryId = Branded<'RetryId'>;"
|
|
1262
|
+
},
|
|
1251
1263
|
{
|
|
1252
1264
|
"name": "SandboxMode",
|
|
1253
1265
|
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
@@ -1282,7 +1294,7 @@ export const TYPERT = {
|
|
|
1282
1294
|
},
|
|
1283
1295
|
{
|
|
1284
1296
|
"name": "SessionEventMap",
|
|
1285
|
-
"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}"
|
|
1297
|
+
"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}"
|
|
1286
1298
|
},
|
|
1287
1299
|
{
|
|
1288
1300
|
"name": "SessionEventType",
|
|
@@ -1983,6 +1995,14 @@ export const TYPERT = {
|
|
|
1983
1995
|
"name": "LlmFailure",
|
|
1984
1996
|
"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}"
|
|
1985
1997
|
},
|
|
1998
|
+
{
|
|
1999
|
+
"name": "LlmRetryEventData",
|
|
2000
|
+
"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; };"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "LlmRetryStartedEventData",
|
|
2004
|
+
"declaration": "export interface LlmRetryStartedEventData {\n retryId: RetryId;\n turn: number;\n step: number;\n retry: number;\n}"
|
|
2005
|
+
},
|
|
1986
2006
|
{
|
|
1987
2007
|
"name": "Message",
|
|
1988
2008
|
"declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
|
|
@@ -2025,7 +2045,7 @@ export const TYPERT = {
|
|
|
2025
2045
|
},
|
|
2026
2046
|
{
|
|
2027
2047
|
"name": "MessageSourceMap",
|
|
2028
|
-
"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
|
|
2048
|
+
"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}"
|
|
2029
2049
|
},
|
|
2030
2050
|
{
|
|
2031
2051
|
"name": "ModelMessageSource",
|
|
@@ -2079,6 +2099,10 @@ export const TYPERT = {
|
|
|
2079
2099
|
"name": "RequestHeaderReason",
|
|
2080
2100
|
"declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
|
|
2081
2101
|
},
|
|
2102
|
+
{
|
|
2103
|
+
"name": "RetryId",
|
|
2104
|
+
"declaration": "export type RetryId = Branded<'RetryId'>;"
|
|
2105
|
+
},
|
|
2082
2106
|
{
|
|
2083
2107
|
"name": "SandboxMode",
|
|
2084
2108
|
"declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
|
|
@@ -2113,7 +2137,7 @@ export const TYPERT = {
|
|
|
2113
2137
|
},
|
|
2114
2138
|
{
|
|
2115
2139
|
"name": "SessionEventMap",
|
|
2116
|
-
"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}"
|
|
2140
|
+
"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}"
|
|
2117
2141
|
},
|
|
2118
2142
|
{
|
|
2119
2143
|
"name": "SessionEventType",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-cordis-host-runner",
|
|
3
3
|
"description": "Dynamic package definition registry, host-half sandbox lifecycle, and invoke handler table for model-mounted dual-half packages",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -45,29 +45,29 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"zod": "^4.4.3",
|
|
48
|
-
"@deepseek-ai/
|
|
49
|
-
"@deepseek-ai/
|
|
48
|
+
"@deepseek-ai/schemastery": "~3.18.5-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-alpha.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@deepseek-ai/
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-scope": "0.2.
|
|
56
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/
|
|
52
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
|
|
53
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
|
|
54
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
|
|
56
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
57
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
|
|
58
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1",
|
|
59
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
63
|
-
"@deepseek-ai/cordis-plugin-timer": "~1.1.
|
|
64
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
62
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1",
|
|
63
|
+
"@deepseek-ai/cordis-plugin-timer": "~1.1.7-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-gateway": "0.2.1-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.1-alpha.1"
|
|
72
72
|
}
|
|
73
73
|
}
|