@deepseek-ai/dsh-cordis-host-runner 0.1.6-alpha.2 → 0.1.7-alpha.2

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/lib/index.js CHANGED
@@ -1079,53 +1079,6 @@ var DynamicCordisRegistry = class {
1079
1079
  * closure, with its own facade.
1080
1080
  * @module @deepseek-ai/dsh-cordis-host-runner/sandbox
1081
1081
  */
1082
- /** Exact Host closure symbols exposed by the sandbox and guarded Context. */
1083
- const HOST_BUILTIN_INSPECTION = [
1084
- {
1085
- name: "ctx",
1086
- description: "Restricted Cordis Context. Prefer ctx.get(name) with an undefined check; use inject for hard dependencies.",
1087
- signatures: [
1088
- "ctx.get(name: string): unknown | undefined",
1089
- "ctx.on(name: string, listener: Function): () => void",
1090
- "ctx.provide(name: string, value: unknown): () => void",
1091
- "ctx.effect(callback: Function, label?: string): () => void"
1092
- ]
1093
- },
1094
- {
1095
- name: "harness",
1096
- description: "Host helpers for Package-private Client RPC and model-visible dynamic Tools.",
1097
- signatures: [
1098
- "harness.handle(method: string, handler: (args: JsonValue) => JsonValue | Promise<JsonValue>): () => void",
1099
- "harness.defineTool(definition: ToolDefinition): ToolDefinition",
1100
- "harness.registerTool(ctx: Context, tool: ToolDefinition): () => void"
1101
- ]
1102
- },
1103
- {
1104
- name: "console",
1105
- description: "Package-tagged Host logging.",
1106
- signatures: ["console.log(...values): void", "console.error(...values): void"]
1107
- },
1108
- {
1109
- name: "btoa",
1110
- description: "Encode UTF-8 text as base64.",
1111
- signatures: ["btoa(value: string): string"]
1112
- },
1113
- {
1114
- name: "atob",
1115
- description: "Decode base64 as UTF-8 text.",
1116
- signatures: ["atob(value: string): string"]
1117
- },
1118
- {
1119
- name: "TextEncoder",
1120
- description: "Standard UTF-8 encoder constructor.",
1121
- signatures: ["new TextEncoder()"]
1122
- },
1123
- {
1124
- name: "TextDecoder",
1125
- description: "Standard text decoder constructor.",
1126
- signatures: ["new TextDecoder(label?: string)"]
1127
- }
1128
- ];
1129
1082
  /**
1130
1083
  * A write-through console for one package, tagging every line with the package
1131
1084
  * id. Write-through (host stdout/stderr), NOT buffered into the tool result:
@@ -2399,10 +2352,7 @@ let DynamicCordisRunnerService = (() => {
2399
2352
  type: "text",
2400
2353
  text
2401
2354
  }],
2402
- source: {
2403
- kind: "plugin",
2404
- plugin: "cordis-host-runner"
2405
- }
2355
+ source: { kind: "cordis-host-runner" }
2406
2356
  }));
2407
2357
  }
2408
2358
  steerRenderFailure(agent, plugin, definition, pluginRunId, failure) {
@@ -2411,10 +2361,7 @@ let DynamicCordisRunnerService = (() => {
2411
2361
  type: "text",
2412
2362
  text: `Cordis Client UI ${plugin.pluginId}/${definition.packageId} (${pluginRunId}) failed while rendering Slot "${failure.slot}" after activation.\n${formatErrorDetails(failure)}\nentryAbdicated: ${failure.abdicated}\nReport the Client render failure to the user; the definition can be stopped through the Cordis panel.`
2413
2363
  }],
2414
- source: {
2415
- kind: "plugin",
2416
- plugin: "cordis-host-runner"
2417
- }
2364
+ source: { kind: "cordis-host-runner" }
2418
2365
  }));
2419
2366
  }
2420
2367
  steerHostHandlerFailure(plugin, run, method, failure) {
@@ -2427,10 +2374,7 @@ let DynamicCordisRunnerService = (() => {
2427
2374
  type: "text",
2428
2375
  text: `Cordis Host handler ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) failed when the Client called host.call(${JSON.stringify(method)}).\n${formatErrorDetails(failure)}\nThe Plugin remains running. Report the Host handler failure to the user. If the handler needs a Service, either declare that Service in the returned Plugin inject list or read it with ctx.get(name) and handle undefined.`
2429
2376
  }],
2430
- source: {
2431
- kind: "plugin",
2432
- plugin: "cordis-host-runner"
2433
- }
2377
+ source: { kind: "cordis-host-runner" }
2434
2378
  }));
2435
2379
  }
2436
2380
  steerGuardFailure(plugin, run, platform, failure) {
@@ -2443,10 +2387,7 @@ let DynamicCordisRunnerService = (() => {
2443
2387
  type: "text",
2444
2388
  text: `Cordis ${platform} guard rejected runtime code in ${plugin.pluginId}/${run.packageId} (${run.pluginRunId}) after activation.\n${formatErrorDetails(failure)}\nThe Plugin remains running. Report the guard rejection to the user; it can be stopped through the Cordis panel.`
2445
2389
  }],
2446
- source: {
2447
- kind: "plugin",
2448
- plugin: "cordis-host-runner"
2449
- }
2390
+ source: { kind: "cordis-host-runner" }
2450
2391
  }));
2451
2392
  }
2452
2393
  claimRuntimeFailure(plugin, run, key) {
@@ -2473,10 +2414,7 @@ let DynamicCordisRunnerService = (() => {
2473
2414
  type: "text",
2474
2415
  text
2475
2416
  }],
2476
- source: {
2477
- kind: "plugin",
2478
- plugin: "cordis-host-runner"
2479
- }
2417
+ source: { kind: "cordis-host-runner" }
2480
2418
  }));
2481
2419
  }
2482
2420
  cancelPending(pluginId, message) {
@@ -2593,4 +2531,4 @@ function cloneAttempt(attempt) {
2593
2531
  };
2594
2532
  }
2595
2533
  //#endregion
2596
- export { ApprovalRequestId, CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, CordisInspectRegistryService, DynamicCordisRunnerService, DynamicCordisRunnerService as default, HOST_BUILTIN_INSPECTION };
2534
+ export { ApprovalRequestId, CordisDynamicPackageId, CordisDynamicPluginId, CordisDynamicPluginRunId, CordisInspectRegistryService, DynamicCordisRunnerService, DynamicCordisRunnerService as default };
@@ -44,16 +44,16 @@ const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$s
44
44
  'pluginRunId': z.intersection(z.string(), z.unknown()),
45
45
  'packageId': z.intersection(z.string(), z.unknown()),
46
46
  'mode': z.union([z.literal("run"), z.literal("update")]),
47
- 'status': z.union([z.literal("running"), z.literal("failed"), z.literal("rejected"), z.literal("awaiting-approval"), z.literal("cancelled"), z.literal("starting-host"), z.literal("client-pending"), z.literal("waiting"), z.literal("stopped")]),
47
+ 'status': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("running"), z.literal("rejected"), z.literal("awaiting-approval"), z.literal("starting-host"), z.literal("client-pending"), z.literal("waiting"), z.literal("stopped")]),
48
48
  'approvalRequestId': z.intersection(z.string(), z.unknown()).optional(),
49
49
  'requiresApproval': z.boolean().optional(),
50
50
  'host': z.object({
51
- 'status': z.union([z.literal("pending"), z.literal("running"), z.literal("failed"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
51
+ 'status': z.union([z.literal("failed"), z.literal("running"), z.literal("pending"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
52
52
  'waitingFor': z.array(z.string()),
53
53
  'error': z.string().optional(),
54
54
  }),
55
55
  'client': z.object({
56
- 'status': z.union([z.literal("pending"), z.literal("running"), z.literal("failed"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
56
+ 'status': z.union([z.literal("failed"), z.literal("running"), z.literal("pending"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
57
57
  'waitingFor': z.array(z.string()),
58
58
  'error': z.string().optional(),
59
59
  }),
@@ -207,7 +207,7 @@ const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_resu
207
207
  'mode': z.union([z.literal("run"), z.literal("update")]),
208
208
  }), z.object({
209
209
  'ok': z.literal(false),
210
- 'reason': z.union([z.literal("plugin-missing"), z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed"), z.literal("package-missing"), z.literal("invalid-mode"), z.literal("transition-in-flight"), z.literal("cancelled"), z.literal("not-running")]),
210
+ 'reason': z.union([z.literal("cancelled"), z.literal("plugin-missing"), z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed"), z.literal("package-missing"), z.literal("invalid-mode"), z.literal("transition-in-flight"), z.literal("not-running")]),
211
211
  'message': z.string(),
212
212
  'stack': z.string().optional(),
213
213
  })]))
@@ -304,7 +304,7 @@ export const TYPERT = {
304
304
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisClientSource',
305
305
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_result$schema,
306
306
  },
307
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":384,"column":3},
307
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":389,"column":3},
308
308
  },
309
309
  {
310
310
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory',
@@ -319,7 +319,7 @@ export const TYPERT = {
319
319
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory:result',
320
320
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$schema,
321
321
  },
322
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":525,"column":3},
322
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":530,"column":3},
323
323
  },
324
324
  {
325
325
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/invoke',
@@ -374,7 +374,7 @@ export const TYPERT = {
374
374
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisInvokeResult',
375
375
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_result$schema,
376
376
  },
377
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":741,"column":9},
377
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":746,"column":9},
378
378
  },
379
379
  {
380
380
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure',
@@ -434,7 +434,7 @@ export const TYPERT = {
434
434
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure:result',
435
435
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_result$schema,
436
436
  },
437
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":718,"column":9},
437
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":723,"column":9},
438
438
  },
439
439
  {
440
440
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure',
@@ -494,7 +494,7 @@ export const TYPERT = {
494
494
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure:result',
495
495
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_result$schema,
496
496
  },
497
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":684,"column":9},
497
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":689,"column":9},
498
498
  },
499
499
  {
500
500
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveInspectQuery',
@@ -544,7 +544,7 @@ export const TYPERT = {
544
544
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisInspectResolveAck',
545
545
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_result$schema,
546
546
  },
547
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":511,"column":3},
547
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":516,"column":3},
548
548
  },
549
549
  {
550
550
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveRequestRun',
@@ -579,7 +579,7 @@ export const TYPERT = {
579
579
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisResolveAck',
580
580
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_result$schema,
581
581
  },
582
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":413,"column":9},
582
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":418,"column":9},
583
583
  },
584
584
  {
585
585
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/runHostHalf',
@@ -659,7 +659,7 @@ export const TYPERT = {
659
659
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisHostHalfResult',
660
660
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_result$schema,
661
661
  },
662
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":325,"column":9},
662
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":330,"column":9},
663
663
  },
664
664
  {
665
665
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/settleUserRun',
@@ -709,7 +709,7 @@ export const TYPERT = {
709
709
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRunResponse',
710
710
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_result$schema,
711
711
  },
712
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":438,"column":9},
712
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":443,"column":9},
713
713
  },
714
714
  {
715
715
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/stopFromPanel',
@@ -749,7 +749,7 @@ export const TYPERT = {
749
749
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisStopResponse',
750
750
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_result$schema,
751
751
  },
752
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":480,"column":9},
752
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":485,"column":9},
753
753
  },
754
754
  {
755
755
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest',
@@ -774,7 +774,7 @@ export const TYPERT = {
774
774
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest:result',
775
775
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_result$schema,
776
776
  },
777
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":498,"column":3},
777
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":503,"column":3},
778
778
  },
779
779
  {
780
780
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/undefineFromPanel',
@@ -814,7 +814,7 @@ export const TYPERT = {
814
814
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisUndefineReceipt',
815
815
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_result$schema,
816
816
  },
817
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":227,"column":9},
817
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":232,"column":9},
818
818
  },
819
819
  ],
820
820
  model: {
@@ -898,7 +898,7 @@ export const TYPERT = {
898
898
  },
899
899
  {
900
900
  "name": "AssistantMessage",
901
- "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
901
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
902
902
  },
903
903
  {
904
904
  "name": "AssistantProviderMetadata",
@@ -936,6 +936,10 @@ export const TYPERT = {
936
936
  "name": "CommandSourceMap",
937
937
  "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
938
938
  },
939
+ {
940
+ "name": "CompactionCheckpointSource",
941
+ "declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
942
+ },
939
943
  {
940
944
  "name": "CompactionId",
941
945
  "declaration": "export type CompactionId = Branded<'CompactionId'>;"
@@ -946,7 +950,7 @@ export const TYPERT = {
946
950
  },
947
951
  {
948
952
  "name": "ContentBlockMap",
949
- "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
953
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
950
954
  },
951
955
  {
952
956
  "name": "ContentBlockType",
@@ -992,9 +996,13 @@ export const TYPERT = {
992
996
  "name": "CordisInspectResolveAck",
993
997
  "declaration": "export interface CordisInspectResolveAck {\n accepted: boolean;\n}"
994
998
  },
999
+ {
1000
+ "name": "DeveloperMessage",
1001
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
1002
+ },
995
1003
  {
996
1004
  "name": "EpochHeader",
997
- "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
1005
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
998
1006
  },
999
1007
  {
1000
1008
  "name": "FeedbackCategory",
@@ -1096,6 +1104,10 @@ export const TYPERT = {
1096
1104
  "name": "JsonValue",
1097
1105
  "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
1098
1106
  },
1107
+ {
1108
+ "name": "KnownCatalogMode",
1109
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
1110
+ },
1099
1111
  {
1100
1112
  "name": "LlmCallConfig",
1101
1113
  "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
@@ -1110,7 +1122,11 @@ export const TYPERT = {
1110
1122
  },
1111
1123
  {
1112
1124
  "name": "Message",
1113
- "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
1125
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
1126
+ },
1127
+ {
1128
+ "name": "MessageBase",
1129
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
1114
1130
  },
1115
1131
  {
1116
1132
  "name": "MessageFeedbackDelete",
@@ -1136,13 +1152,17 @@ export const TYPERT = {
1136
1152
  "name": "MessageId",
1137
1153
  "declaration": "export type MessageId = Branded<'MessageId'>;"
1138
1154
  },
1155
+ {
1156
+ "name": "MessageRoleMap",
1157
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
1158
+ },
1139
1159
  {
1140
1160
  "name": "MessageSource",
1141
1161
  "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
1142
1162
  },
1143
1163
  {
1144
1164
  "name": "MessageSourceMap",
1145
- "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}"
1165
+ "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 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
1146
1166
  },
1147
1167
  {
1148
1168
  "name": "ModelMessageSource",
@@ -1198,7 +1218,7 @@ export const TYPERT = {
1198
1218
  },
1199
1219
  {
1200
1220
  "name": "Session",
1201
- "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1221
+ "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 readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1202
1222
  },
1203
1223
  {
1204
1224
  "name": "SessionEvent",
@@ -1206,7 +1226,7 @@ export const TYPERT = {
1206
1226
  },
1207
1227
  {
1208
1228
  "name": "SessionEventMap",
1209
- "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 '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 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n '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}"
1229
+ "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 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n '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}"
1210
1230
  },
1211
1231
  {
1212
1232
  "name": "SessionEventType",
@@ -1266,7 +1286,7 @@ export const TYPERT = {
1266
1286
  },
1267
1287
  {
1268
1288
  "name": "SubagentCatalogEvent",
1269
- "declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
1289
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
1270
1290
  },
1271
1291
  {
1272
1292
  "name": "SubagentDescriptorBase",
@@ -1282,7 +1302,7 @@ export const TYPERT = {
1282
1302
  },
1283
1303
  {
1284
1304
  "name": "SurfaceEventType",
1285
- "declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
1305
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
1286
1306
  },
1287
1307
  {
1288
1308
  "name": "SurfaceIntent",
@@ -1294,7 +1314,11 @@ export const TYPERT = {
1294
1314
  },
1295
1315
  {
1296
1316
  "name": "SystemMessage",
1297
- "declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
1317
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
1318
+ },
1319
+ {
1320
+ "name": "SystemPromptMessageSource",
1321
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
1298
1322
  },
1299
1323
  {
1300
1324
  "name": "SystemPromptUpdate",
@@ -1348,6 +1372,10 @@ export const TYPERT = {
1348
1372
  "name": "TokenUsage",
1349
1373
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
1350
1374
  },
1375
+ {
1376
+ "name": "ToolAdditionBlock",
1377
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
1378
+ },
1351
1379
  {
1352
1380
  "name": "ToolCallBlock",
1353
1381
  "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
@@ -1361,20 +1389,20 @@ export const TYPERT = {
1361
1389
  "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
1362
1390
  },
1363
1391
  {
1364
- "name": "ToolRestriction",
1365
- "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
1392
+ "name": "ToolRemovalBlock",
1393
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
1366
1394
  },
1367
1395
  {
1368
- "name": "ToolResultBlock",
1369
- "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
1396
+ "name": "ToolRestriction",
1397
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
1370
1398
  },
1371
1399
  {
1372
1400
  "name": "ToolResultMessage",
1373
- "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
1401
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
1374
1402
  },
1375
1403
  {
1376
1404
  "name": "ToolSchema",
1377
- "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
1405
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
1378
1406
  },
1379
1407
  {
1380
1408
  "name": "TurnEndCancelCause",
@@ -1386,11 +1414,11 @@ export const TYPERT = {
1386
1414
  },
1387
1415
  {
1388
1416
  "name": "TurnEndReasonMap",
1389
- "declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n}"
1417
+ "declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
1390
1418
  },
1391
1419
  {
1392
1420
  "name": "UserMessage",
1393
- "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
1421
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
1394
1422
  }
1395
1423
  ]
1396
1424
  },
@@ -1589,7 +1617,7 @@ export const TYPERT = {
1589
1617
  },
1590
1618
  {
1591
1619
  "name": "AssistantMessage",
1592
- "declaration": "export interface AssistantMessage extends Message {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1620
+ "declaration": "export interface AssistantMessage extends MessageBase {\n readonly role: 'assistant';\n readonly source: ModelMessageSource;\n}"
1593
1621
  },
1594
1622
  {
1595
1623
  "name": "AssistantProviderMetadata",
@@ -1627,6 +1655,10 @@ export const TYPERT = {
1627
1655
  "name": "CommandSourceMap",
1628
1656
  "declaration": "export interface CommandSourceMap {\n user: { kind: 'user'; };\n}"
1629
1657
  },
1658
+ {
1659
+ "name": "CompactionCheckpointSource",
1660
+ "declaration": "export type CompactionCheckpointSource = typeof COMPACT_CHECKPOINT_MARKER & { readonly compactionId: CompactionId; readonly sourceCommandId?: CommandId; };"
1661
+ },
1630
1662
  {
1631
1663
  "name": "CompactionId",
1632
1664
  "declaration": "export type CompactionId = Branded<'CompactionId'>;"
@@ -1637,7 +1669,7 @@ export const TYPERT = {
1637
1669
  },
1638
1670
  {
1639
1671
  "name": "ContentBlockMap",
1640
- "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-result': ToolResultBlock;\n}"
1672
+ "declaration": "export interface ContentBlockMap {\n text: TextBlock;\n reasoning: ReasoningBlock;\n image: ImageBlock;\n file: FileBlock;\n 'tool-call': ToolCallBlock;\n 'tool-addition': ToolAdditionBlock;\n 'tool-removal': ToolRemovalBlock;\n}"
1641
1673
  },
1642
1674
  {
1643
1675
  "name": "ContentBlockType",
@@ -1707,6 +1739,10 @@ export const TYPERT = {
1707
1739
  "name": "CordisRunStatus",
1708
1740
  "declaration": "export type CordisRunStatus = 'awaiting-approval' | 'starting-host' | 'client-pending' | 'running' | 'waiting' | 'rejected' | 'failed' | 'cancelled' | 'stopped';"
1709
1741
  },
1742
+ {
1743
+ "name": "DeveloperMessage",
1744
+ "declaration": "export interface DeveloperMessage extends MessageBase {\n readonly role: 'developer';\n}"
1745
+ },
1710
1746
  {
1711
1747
  "name": "DynamicCordisClientSource",
1712
1748
  "declaration": "export interface DynamicCordisClientSource {\n code: string;\n name: string;\n pluginId: CordisDynamicPluginId;\n packageId: CordisDynamicPackageId;\n pluginRunId: CordisDynamicPluginRunId;\n}"
@@ -1781,7 +1817,7 @@ export const TYPERT = {
1781
1817
  },
1782
1818
  {
1783
1819
  "name": "EpochHeader",
1784
- "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n}"
1820
+ "declaration": "export interface EpochHeader {\n config: LlmCallConfig;\n adapterDefaults?: LlmCallConfigAdapterDefaults;\n tools?: ToolSchema[];\n system?: never;\n}"
1785
1821
  },
1786
1822
  {
1787
1823
  "name": "FeedbackCategory",
@@ -1875,6 +1911,10 @@ export const TYPERT = {
1875
1911
  "name": "JsonValue",
1876
1912
  "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
1877
1913
  },
1914
+ {
1915
+ "name": "KnownCatalogMode",
1916
+ "declaration": "export type KnownCatalogMode = { readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; };"
1917
+ },
1878
1918
  {
1879
1919
  "name": "LlmCallConfig",
1880
1920
  "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n}"
@@ -1889,7 +1929,11 @@ export const TYPERT = {
1889
1929
  },
1890
1930
  {
1891
1931
  "name": "Message",
1892
- "declaration": "export interface Message {\n readonly id: MessageId;\n readonly role: 'system' | 'user' | 'assistant';\n readonly content: ContentBlock[];\n readonly source: MessageSource;\n}"
1932
+ "declaration": "export type Message = MessageRoleMap[keyof MessageRoleMap];"
1933
+ },
1934
+ {
1935
+ "name": "MessageBase",
1936
+ "declaration": "export interface MessageBase {\n readonly id: MessageId;\n readonly content: readonly ContentBlock[];\n readonly source: MessageSource;\n}"
1893
1937
  },
1894
1938
  {
1895
1939
  "name": "MessageFeedbackDelete",
@@ -1915,13 +1959,17 @@ export const TYPERT = {
1915
1959
  "name": "MessageId",
1916
1960
  "declaration": "export type MessageId = Branded<'MessageId'>;"
1917
1961
  },
1962
+ {
1963
+ "name": "MessageRoleMap",
1964
+ "declaration": "export interface MessageRoleMap {\n system: SystemMessage;\n developer: DeveloperMessage;\n user: UserMessage;\n assistant: AssistantMessage;\n tool: ToolResultMessage;\n}"
1965
+ },
1918
1966
  {
1919
1967
  "name": "MessageSource",
1920
1968
  "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
1921
1969
  },
1922
1970
  {
1923
1971
  "name": "MessageSourceMap",
1924
- "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}"
1972
+ "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 'team-message': TeamMessageSource;\n goal: GoalMessageSource;\n 'compact-checkpoint': CompactionCheckpointSource;\n 'session-reference': SessionReferenceSource;\n}"
1925
1973
  },
1926
1974
  {
1927
1975
  "name": "ModelMessageSource",
@@ -1977,7 +2025,7 @@ export const TYPERT = {
1977
2025
  },
1978
2026
  {
1979
2027
  "name": "Session",
1980
- "declaration": "export class Session {\n get surface(): SessionSurface;\n readonly header: SessionHeader;\n readonly inheritedEventCount: SessionLogOffset;\n get id(): SessionId;\n readonly firstLiveSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
2028
+ "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 readonly firstLifecycleSeq: SessionLogOffset;\n eventAt(seq: SessionSeq): SessionEvent | undefined;\n snapshotEvents(fromSeq: SessionLogOffset = SessionLogOffset(0), toSeqExclusive: SessionLogOffset = this.seq): readonly SessionEvent[];\n ownEvents(): readonly SessionEvent[];\n isOwnSeq(seq: SessionSeq): boolean;\n get seq(): SessionLogOffset;\n append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent<T>] : []): SessionEvent<T>;\n requestHeader(): EpochHeader | undefined;\n requestContext(): RequestContext | undefined;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
1981
2029
  },
1982
2030
  {
1983
2031
  "name": "SessionEvent",
@@ -1985,7 +2033,7 @@ export const TYPERT = {
1985
2033
  },
1986
2034
  {
1987
2035
  "name": "SessionEventMap",
1988
- "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 '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 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n '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}"
2036
+ "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 'feedback/record': FeedbackRecord;\n 'team/member': { version: 2; teamId: TeamId; member: TeamMemberSnapshot; };\n 'team/task': { version: 2; teamId: TeamId; task: TeamTaskSnapshot; };\n 'team/message/queued': { version: 2; teamId: TeamId; message: TeamMessageSnapshot; };\n 'team/message/delivered': { version: 2; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n '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}"
1989
2037
  },
1990
2038
  {
1991
2039
  "name": "SessionEventType",
@@ -2045,7 +2093,7 @@ export const TYPERT = {
2045
2093
  },
2046
2094
  {
2047
2095
  "name": "SubagentCatalogEvent",
2048
- "declaration": "export type SubagentCatalogEvent = { readonly version: 0; readonly childId: SessionId; readonly childCreatedAt: number; } & ({ readonly mode: 'one-shot'; readonly label?: string; } | { readonly mode: 'continuable'; readonly label: string; });"
2096
+ "declaration": "export type SubagentCatalogEvent = { readonly childId: SessionId; readonly childCreatedAt: number; } & (({ readonly version: 0; } & KnownCatalogMode) | ({ readonly version: 1; } & (KnownCatalogMode | { readonly mode: 'unknown'; readonly label?: string; })));"
2049
2097
  },
2050
2098
  {
2051
2099
  "name": "SubagentDescriptorBase",
@@ -2061,7 +2109,7 @@ export const TYPERT = {
2061
2109
  },
2062
2110
  {
2063
2111
  "name": "SurfaceEventType",
2064
- "declaration": "export type SurfaceEventType = 'system/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2112
+ "declaration": "export type SurfaceEventType = 'system/message' | 'developer/message' | 'user/message' | 'assistant/message' | 'tool/result';"
2065
2113
  },
2066
2114
  {
2067
2115
  "name": "SurfaceIntent",
@@ -2073,7 +2121,11 @@ export const TYPERT = {
2073
2121
  },
2074
2122
  {
2075
2123
  "name": "SystemMessage",
2076
- "declaration": "export interface SystemMessage extends Message {\n readonly role: 'system';\n readonly source: MessageSourceMap['plugin'];\n}"
2124
+ "declaration": "export interface SystemMessage extends MessageBase {\n readonly role: 'system';\n readonly source: MessageSourceMap['system-prompt'];\n}"
2125
+ },
2126
+ {
2127
+ "name": "SystemPromptMessageSource",
2128
+ "declaration": "export interface SystemPromptMessageSource {\n kind: 'system-prompt';\n}"
2077
2129
  },
2078
2130
  {
2079
2131
  "name": "SystemPromptUpdate",
@@ -2127,6 +2179,10 @@ export const TYPERT = {
2127
2179
  "name": "TokenUsage",
2128
2180
  "declaration": "export interface TokenUsage {\n inputTokens: number;\n outputTokens: number;\n totalTokens?: number;\n cacheReadTokens?: number;\n cacheWriteTokens?: number;\n reasoningTokens?: number;\n}"
2129
2181
  },
2182
+ {
2183
+ "name": "ToolAdditionBlock",
2184
+ "declaration": "export interface ToolAdditionBlock {\n type: 'tool-addition';\n toolName: string;\n tool?: never;\n}"
2185
+ },
2130
2186
  {
2131
2187
  "name": "ToolCallBlock",
2132
2188
  "declaration": "export interface ToolCallBlock {\n type: 'tool-call';\n id: ToolCallId;\n name: string;\n arguments: string;\n}"
@@ -2140,20 +2196,20 @@ export const TYPERT = {
2140
2196
  "declaration": "export interface ToolMessageSource {\n kind: 'tool';\n callId: ToolCallId;\n}"
2141
2197
  },
2142
2198
  {
2143
- "name": "ToolRestriction",
2144
- "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2199
+ "name": "ToolRemovalBlock",
2200
+ "declaration": "export interface ToolRemovalBlock {\n type: 'tool-removal';\n toolName: string;\n}"
2145
2201
  },
2146
2202
  {
2147
- "name": "ToolResultBlock",
2148
- "declaration": "export interface ToolResultBlock {\n type: 'tool-result';\n toolCallId: ToolCallId;\n content: ContentBlock[];\n isError?: boolean;\n}"
2203
+ "name": "ToolRestriction",
2204
+ "declaration": "export interface ToolRestriction {\n readonly allow?: readonly string[];\n readonly deny?: readonly string[];\n}"
2149
2205
  },
2150
2206
  {
2151
2207
  "name": "ToolResultMessage",
2152
- "declaration": "export interface ToolResultMessage extends Message {\n readonly role: 'user';\n readonly content: [ToolResultBlock];\n readonly source: ToolMessageSource;\n}"
2208
+ "declaration": "export interface ToolResultMessage extends MessageBase {\n readonly role: 'tool';\n readonly source: ToolMessageSource;\n readonly toolCallId: ToolCallId;\n readonly isError?: boolean;\n}"
2153
2209
  },
2154
2210
  {
2155
2211
  "name": "ToolSchema",
2156
- "declaration": "export interface ToolSchema {\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2212
+ "declaration": "export interface ToolSchema {\n deferLoading?: true;\n name: string;\n description: string;\n parameters: Record<string, unknown>;\n}"
2157
2213
  },
2158
2214
  {
2159
2215
  "name": "TurnEndCancelCause",
@@ -2165,11 +2221,11 @@ export const TYPERT = {
2165
2221
  },
2166
2222
  {
2167
2223
  "name": "TurnEndReasonMap",
2168
- "declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n}"
2224
+ "declaration": "export interface TurnEndReasonMap {\n completed: { kind: 'completed'; };\n aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n blocked: { kind: 'blocked'; };\n error: { kind: 'error'; error: LlmFailure; };\n 'max-tokens': { kind: 'max-tokens'; };\n interrupted: { kind: 'interrupted'; };\n forked: { kind: 'forked'; };\n}"
2169
2225
  },
2170
2226
  {
2171
2227
  "name": "UserMessage",
2172
- "declaration": "export interface UserMessage extends Message {\n readonly role: 'user';\n}"
2228
+ "declaration": "export interface UserMessage extends MessageBase {\n readonly role: 'user';\n}"
2173
2229
  }
2174
2230
  ]
2175
2231
  }
@@ -44,16 +44,16 @@ const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$s
44
44
  'pluginRunId': z.intersection(z.string(), z.unknown()),
45
45
  'packageId': z.intersection(z.string(), z.unknown()),
46
46
  'mode': z.union([z.literal("run"), z.literal("update")]),
47
- 'status': z.union([z.literal("running"), z.literal("failed"), z.literal("rejected"), z.literal("awaiting-approval"), z.literal("cancelled"), z.literal("starting-host"), z.literal("client-pending"), z.literal("waiting"), z.literal("stopped")]),
47
+ 'status': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("running"), z.literal("rejected"), z.literal("awaiting-approval"), z.literal("starting-host"), z.literal("client-pending"), z.literal("waiting"), z.literal("stopped")]),
48
48
  'approvalRequestId': z.intersection(z.string(), z.unknown()).optional(),
49
49
  'requiresApproval': z.boolean().optional(),
50
50
  'host': z.object({
51
- 'status': z.union([z.literal("pending"), z.literal("running"), z.literal("failed"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
51
+ 'status': z.union([z.literal("failed"), z.literal("running"), z.literal("pending"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
52
52
  'waitingFor': z.array(z.string()),
53
53
  'error': z.string().optional(),
54
54
  }),
55
55
  'client': z.object({
56
- 'status': z.union([z.literal("pending"), z.literal("running"), z.literal("failed"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
56
+ 'status': z.union([z.literal("failed"), z.literal("running"), z.literal("pending"), z.literal("waiting"), z.literal("stopped"), z.literal("absent")]),
57
57
  'waitingFor': z.array(z.string()),
58
58
  'error': z.string().optional(),
59
59
  }),
@@ -207,7 +207,7 @@ const _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_resu
207
207
  'mode': z.union([z.literal("run"), z.literal("update")]),
208
208
  }), z.object({
209
209
  'ok': z.literal(false),
210
- 'reason': z.union([z.literal("plugin-missing"), z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed"), z.literal("package-missing"), z.literal("invalid-mode"), z.literal("transition-in-flight"), z.literal("cancelled"), z.literal("not-running")]),
210
+ 'reason': z.union([z.literal("cancelled"), z.literal("plugin-missing"), z.literal("rejected"), z.literal("host-half-failed"), z.literal("client-half-failed"), z.literal("package-missing"), z.literal("invalid-mode"), z.literal("transition-in-flight"), z.literal("not-running")]),
211
211
  'message': z.string(),
212
212
  'stack': z.string().optional(),
213
213
  })]))
@@ -301,7 +301,7 @@ export const TYPERT_REMOTE = {
301
301
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisClientSource',
302
302
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_getClientCode_result$schema,
303
303
  },
304
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":384,"column":3},
304
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":389,"column":3},
305
305
  },
306
306
  {
307
307
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory',
@@ -316,7 +316,7 @@ export const TYPERT_REMOTE = {
316
316
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/inventory:result',
317
317
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_inventory_result$schema,
318
318
  },
319
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":525,"column":3},
319
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":530,"column":3},
320
320
  },
321
321
  {
322
322
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/invoke',
@@ -371,7 +371,7 @@ export const TYPERT_REMOTE = {
371
371
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisInvokeResult',
372
372
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_invoke_result$schema,
373
373
  },
374
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":741,"column":9},
374
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":746,"column":9},
375
375
  },
376
376
  {
377
377
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure',
@@ -431,7 +431,7 @@ export const TYPERT_REMOTE = {
431
431
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportClientGuardFailure:result',
432
432
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportClientGuardFailure_result$schema,
433
433
  },
434
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":718,"column":9},
434
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":723,"column":9},
435
435
  },
436
436
  {
437
437
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure',
@@ -491,7 +491,7 @@ export const TYPERT_REMOTE = {
491
491
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/reportRenderFailure:result',
492
492
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_reportRenderFailure_result$schema,
493
493
  },
494
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":684,"column":9},
494
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":689,"column":9},
495
495
  },
496
496
  {
497
497
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveInspectQuery',
@@ -541,7 +541,7 @@ export const TYPERT_REMOTE = {
541
541
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#CordisInspectResolveAck',
542
542
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveInspectQuery_result$schema,
543
543
  },
544
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":511,"column":3},
544
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":516,"column":3},
545
545
  },
546
546
  {
547
547
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/resolveRequestRun',
@@ -576,7 +576,7 @@ export const TYPERT_REMOTE = {
576
576
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisResolveAck',
577
577
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_resolveRequestRun_result$schema,
578
578
  },
579
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":413,"column":9},
579
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":418,"column":9},
580
580
  },
581
581
  {
582
582
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/runHostHalf',
@@ -656,7 +656,7 @@ export const TYPERT_REMOTE = {
656
656
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisHostHalfResult',
657
657
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_runHostHalf_result$schema,
658
658
  },
659
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":325,"column":9},
659
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":330,"column":9},
660
660
  },
661
661
  {
662
662
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/settleUserRun',
@@ -706,7 +706,7 @@ export const TYPERT_REMOTE = {
706
706
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisRunResponse',
707
707
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_settleUserRun_result$schema,
708
708
  },
709
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":438,"column":9},
709
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":443,"column":9},
710
710
  },
711
711
  {
712
712
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/stopFromPanel',
@@ -746,7 +746,7 @@ export const TYPERT_REMOTE = {
746
746
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisStopResponse',
747
747
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_stopFromPanel_result$schema,
748
748
  },
749
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":480,"column":9},
749
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":485,"column":9},
750
750
  },
751
751
  {
752
752
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest',
@@ -771,7 +771,7 @@ export const TYPERT_REMOTE = {
771
771
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/syncInspectManifest:result',
772
772
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_syncInspectManifest_result$schema,
773
773
  },
774
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":498,"column":3},
774
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":503,"column":3},
775
775
  },
776
776
  {
777
777
  id: '@deepseek-ai/dsh-cordis-host-runner#dynamicCordisRunner/undefineFromPanel',
@@ -811,7 +811,7 @@ export const TYPERT_REMOTE = {
811
811
  typeSymbol: '@deepseek-ai/dsh-cordis-host-runner/types#DynamicCordisUndefineReceipt',
812
812
  create: _deepseek_ai_dsh_cordis_host_runner_dynamicCordisRunner_undefineFromPanel_result$schema,
813
813
  },
814
- sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":227,"column":9},
814
+ sourceLocation: {"file":"packages/extensions/cordis-host-runner/src/index.ts","line":232,"column":9},
815
815
  },
816
816
  ],
817
817
  }
@@ -7,6 +7,13 @@ import { Context } from '@deepseek-ai/cordis';
7
7
  import type { Fiber } from '@deepseek-ai/cordis';
8
8
  import z from '@deepseek-ai/schemastery';
9
9
  import type { Agent } from '@deepseek-ai/dsh-agent';
10
+ declare module '@deepseek-ai/dsh-llm' {
11
+ interface MessageSourceMap {
12
+ 'cordis-host-runner': {
13
+ kind: 'cordis-host-runner';
14
+ };
15
+ }
16
+ }
10
17
  import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
11
18
  import type { JsonValue } from '@deepseek-ai/dsh-util-values';
12
19
  import type { DynamicCordisDefineReceipt, DynamicCordisDefineRequest, DynamicCordisPackageInspection, DynamicCordisPluginInspection, DynamicCordisReference } from './registry.ts';
@@ -15,7 +22,6 @@ export type * from './types.ts';
15
22
  export type { DynamicCordisDefineReceipt, DynamicCordisDefineRequest, DynamicCordisDefinition, DynamicCordisHandler, DynamicCordisPackageInspection, DynamicCordisPlugin, DynamicCordisPluginInspection, DynamicCordisReference, DynamicCordisRun, } from './registry.ts';
16
23
  export { CordisInspectRegistryService } from './inspect-registry.ts';
17
24
  export type { HostCordisInspectProviderRegistration } from './inspect-registry.ts';
18
- export { HOST_BUILTIN_INSPECTION } from './sandbox.ts';
19
25
  /**
20
26
  * Brand a Host-minted Plugin ID.
21
27
  * @param id - opaque identifier minted by the Host registry.
@@ -46,7 +46,6 @@ import { missingServices, startHostHalf } from "./lifecycle.js";
46
46
  import { DynamicCordisRegistry } from "./registry.js";
47
47
  import { createSandbox, evaluateHostCode, precheckCode } from "./sandbox.js";
48
48
  export { CordisInspectRegistryService } from "./inspect-registry.js";
49
- export { HOST_BUILTIN_INSPECTION } from "./sandbox.js";
50
49
  /**
51
50
  * Brand a Host-minted Plugin ID.
52
51
  * @param id - opaque identifier minted by the Host registry.
@@ -949,7 +948,7 @@ let DynamicCordisRunnerService = (() => {
949
948
  }
950
949
  agent.steer(createUserMessage({
951
950
  content: [{ type: 'text', text }],
952
- source: { kind: 'plugin', plugin: 'cordis-host-runner' },
951
+ source: { kind: 'cordis-host-runner' },
953
952
  }));
954
953
  }
955
954
  steerRenderFailure(agent, plugin, definition, pluginRunId, failure) {
@@ -962,7 +961,7 @@ let DynamicCordisRunnerService = (() => {
962
961
  + `entryAbdicated: ${failure.abdicated}\n`
963
962
  + 'Report the Client render failure to the user; the definition can be stopped through the Cordis panel.',
964
963
  }],
965
- source: { kind: 'plugin', plugin: 'cordis-host-runner' },
964
+ source: { kind: 'cordis-host-runner' },
966
965
  }));
967
966
  }
968
967
  steerHostHandlerFailure(plugin, run, method, failure) {
@@ -982,7 +981,7 @@ let DynamicCordisRunnerService = (() => {
982
981
  + 'The Plugin remains running. Report the Host handler failure to the user. If the handler needs a Service, either declare '
983
982
  + 'that Service in the returned Plugin inject list or read it with ctx.get(name) and handle undefined.',
984
983
  }],
985
- source: { kind: 'plugin', plugin: 'cordis-host-runner' },
984
+ source: { kind: 'cordis-host-runner' },
986
985
  }));
987
986
  }
988
987
  /* jscpd:ignore-start */
@@ -1001,7 +1000,7 @@ let DynamicCordisRunnerService = (() => {
1001
1000
  + `(${run.pluginRunId}) after activation.\n${formatErrorDetails(failure)}\n`
1002
1001
  + 'The Plugin remains running. Report the guard rejection to the user; it can be stopped through the Cordis panel.',
1003
1002
  }],
1004
- source: { kind: 'plugin', plugin: 'cordis-host-runner' },
1003
+ source: { kind: 'cordis-host-runner' },
1005
1004
  }));
1006
1005
  }
1007
1006
  /* jscpd:ignore-end */
@@ -1038,7 +1037,7 @@ let DynamicCordisRunnerService = (() => {
1038
1037
  return;
1039
1038
  agent.inject(createUserMessage({
1040
1039
  content: [{ type: 'text', text }],
1041
- source: { kind: 'plugin', plugin: 'cordis-host-runner' },
1040
+ source: { kind: 'cordis-host-runner' },
1042
1041
  }));
1043
1042
  }
1044
1043
  cancelPending(pluginId, message) {
@@ -10,36 +10,6 @@
10
10
  * closure, with its own facade.
11
11
  * @module @deepseek-ai/dsh-cordis-host-runner/sandbox
12
12
  */
13
- /** Exact Host closure symbols exposed by the sandbox and guarded Context. */
14
- export declare const HOST_BUILTIN_INSPECTION: readonly [{
15
- readonly name: "ctx";
16
- readonly description: "Restricted Cordis Context. Prefer ctx.get(name) with an undefined check; use inject for hard dependencies.";
17
- readonly signatures: readonly ["ctx.get(name: string): unknown | undefined", "ctx.on(name: string, listener: Function): () => void", "ctx.provide(name: string, value: unknown): () => void", "ctx.effect(callback: Function, label?: string): () => void"];
18
- }, {
19
- readonly name: "harness";
20
- readonly description: "Host helpers for Package-private Client RPC and model-visible dynamic Tools.";
21
- readonly signatures: readonly ["harness.handle(method: string, handler: (args: JsonValue) => JsonValue | Promise<JsonValue>): () => void", "harness.defineTool(definition: ToolDefinition): ToolDefinition", "harness.registerTool(ctx: Context, tool: ToolDefinition): () => void"];
22
- }, {
23
- readonly name: "console";
24
- readonly description: "Package-tagged Host logging.";
25
- readonly signatures: readonly ["console.log(...values): void", "console.error(...values): void"];
26
- }, {
27
- readonly name: "btoa";
28
- readonly description: "Encode UTF-8 text as base64.";
29
- readonly signatures: readonly ["btoa(value: string): string"];
30
- }, {
31
- readonly name: "atob";
32
- readonly description: "Decode base64 as UTF-8 text.";
33
- readonly signatures: readonly ["atob(value: string): string"];
34
- }, {
35
- readonly name: "TextEncoder";
36
- readonly description: "Standard UTF-8 encoder constructor.";
37
- readonly signatures: readonly ["new TextEncoder()"];
38
- }, {
39
- readonly name: "TextDecoder";
40
- readonly description: "Standard text decoder constructor.";
41
- readonly signatures: readonly ["new TextDecoder(label?: string)"];
42
- }];
43
13
  /**
44
14
  * Build the vm context one host half evaluates in: the tagged console, the
45
15
  * `harness` registration helpers, the encoding primitives, the Node-API traps,
@@ -12,33 +12,6 @@
12
12
  */
13
13
  import { createContext, runInContext, Script } from 'node:vm';
14
14
  import { sandboxDefineTool, sandboxRegisterTool } from "./guard.js";
15
- /** Exact Host closure symbols exposed by the sandbox and guarded Context. */
16
- export const HOST_BUILTIN_INSPECTION = [
17
- {
18
- name: 'ctx',
19
- description: 'Restricted Cordis Context. Prefer ctx.get(name) with an undefined check; use inject for hard dependencies.',
20
- signatures: [
21
- 'ctx.get(name: string): unknown | undefined',
22
- 'ctx.on(name: string, listener: Function): () => void',
23
- 'ctx.provide(name: string, value: unknown): () => void',
24
- 'ctx.effect(callback: Function, label?: string): () => void',
25
- ],
26
- },
27
- {
28
- name: 'harness',
29
- description: 'Host helpers for Package-private Client RPC and model-visible dynamic Tools.',
30
- signatures: [
31
- 'harness.handle(method: string, handler: (args: JsonValue) => JsonValue | Promise<JsonValue>): () => void',
32
- 'harness.defineTool(definition: ToolDefinition): ToolDefinition',
33
- 'harness.registerTool(ctx: Context, tool: ToolDefinition): () => void',
34
- ],
35
- },
36
- { name: 'console', description: 'Package-tagged Host logging.', signatures: ['console.log(...values): void', 'console.error(...values): void'] },
37
- { name: 'btoa', description: 'Encode UTF-8 text as base64.', signatures: ['btoa(value: string): string'] },
38
- { name: 'atob', description: 'Decode base64 as UTF-8 text.', signatures: ['atob(value: string): string'] },
39
- { name: 'TextEncoder', description: 'Standard UTF-8 encoder constructor.', signatures: ['new TextEncoder()'] },
40
- { name: 'TextDecoder', description: 'Standard text decoder constructor.', signatures: ['new TextDecoder(label?: string)'] },
41
- ];
42
15
  /**
43
16
  * A write-through console for one package, tagging every line with the package
44
17
  * id. Write-through (host stdout/stderr), NOT buffered into the tool result:
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.1.6-alpha.2",
4
+ "version": "0.1.7-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -45,28 +45,28 @@
45
45
  "license": "MIT",
46
46
  "dependencies": {
47
47
  "zod": "^4.4.3",
48
- "@deepseek-ai/dsh-util-values": "^0.1.6-alpha.2",
49
- "@deepseek-ai/schemastery": "^3.18.2"
48
+ "@deepseek-ai/dsh-util-values": "0.1.7-alpha.2",
49
+ "@deepseek-ai/schemastery": "~3.18.4"
50
50
  },
51
51
  "peerDependencies": {
52
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
53
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
54
- "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2",
55
- "@deepseek-ai/dsh-scope": "^0.1.6-alpha.2",
56
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
57
- "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.2",
58
- "@deepseek-ai/cordis": "^4.0.2",
59
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2"
52
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
53
+ "@deepseek-ai/dsh-brand": "0.1.7-alpha.2",
54
+ "@deepseek-ai/dsh-llm": "0.1.7-alpha.2",
55
+ "@deepseek-ai/dsh-scope": "0.1.7-alpha.2",
56
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
57
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
58
+ "@deepseek-ai/cordis": "~4.0.4",
59
+ "@deepseek-ai/dsh-typert-protocol": "0.1.7-alpha.2"
60
60
  },
61
61
  "devDependencies": {
62
- "@deepseek-ai/cordis-plugin-timer": "^1.1.4",
63
- "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
64
- "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2",
65
- "@deepseek-ai/cordis": "^4.0.2",
66
- "@deepseek-ai/dsh-scope": "^0.1.6-alpha.2",
67
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
68
- "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
69
- "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
70
- "@deepseek-ai/dsh-typert-protocol": "^0.1.6-alpha.2"
62
+ "@deepseek-ai/cordis": "~4.0.4",
63
+ "@deepseek-ai/cordis-plugin-timer": "~1.1.6",
64
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
65
+ "@deepseek-ai/dsh-brand": "0.1.7-alpha.2",
66
+ "@deepseek-ai/dsh-llm": "0.1.7-alpha.2",
67
+ "@deepseek-ai/dsh-scope": "0.1.7-alpha.2",
68
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
69
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
70
+ "@deepseek-ai/dsh-typert-protocol": "0.1.7-alpha.2"
71
71
  }
72
72
  }