@chatcode/chatcode-cli 3.0.6-rc.1 → 3.0.6-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/lib/{command-errors-CnbcOM1a.js → command-errors-vCFKCJFq.js} +12 -12
  2. package/lib/{command-trees-CU7BxVJo.js → command-trees-N2_LR4f-.js} +2 -2
  3. package/lib/{component-identity-kZK1_hFy.js → component-identity-CaV_MmmE.js} +3 -3
  4. package/lib/{extension-events-hLxwPvpg.js → extension-events-B5qKP0-X.js} +20 -20
  5. package/lib/{host-access-kT-u85k_.js → host-access-BRXW3V8i.js} +1 -1
  6. package/lib/{keymap-DS1M8sDo.js → keymap-BYjklwli.js} +2 -2
  7. package/lib/{plugin-BccFcAte.js → plugin-VYAv2o0K.js} +497 -347
  8. package/lib/{scenes-DG6T8t-A.js → scenes-B-iDMpgW.js} +3 -3
  9. package/lib/{settings-sections-2SuE0biI.js → settings-sections-CYCrZKUk.js} +3 -3
  10. package/lib/{statusBarSettings-B2MEAwnI.js → statusBarSettings-Cu-b_o4Q.js} +3 -3
  11. package/lib/{themes-DUO7kGW-.js → themes-DC9GpV6q.js} +12 -12
  12. package/lib/tui-compat-command-trees.js +1 -1
  13. package/lib/tui-compat-extensions.js +3 -3
  14. package/lib/tui-compat-plugin-host.js +5 -5
  15. package/lib/tui-compat-scenes.js +1 -1
  16. package/lib/tui-compat-settings-sections.js +1 -1
  17. package/lib/tui-compat-working-activity.js +1 -1
  18. package/lib/tui-compat-workspaces.js +1 -1
  19. package/lib/tui-compat.js +6 -6
  20. package/lib/{workspaces-CLOkL_yE.js → workspaces-BchdRzlw.js} +2 -2
  21. package/package.json +25 -25
  22. package/runtime/manifest.json +1 -1
  23. package/runtime/node_modules/@chatcode/runtime-client/README.md +11 -8
  24. package/runtime/node_modules/@chatcode/runtime-client/index.d.ts +6 -12
  25. package/runtime/node_modules/@chatcode/runtime-client/package.json +1 -1
  26. package/runtime/node_modules/@chatcode/runtime-client/runtime-connector.mjs +16 -16
  27. package/runtime/node_modules/@chatcode/runtime-client/session-browser.mjs +1 -0
  28. package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +1 -1
  29. package/runtime/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +3 -3
  30. package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +14 -4
  31. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +1 -0
  32. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +23 -10
  33. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +23 -13
  34. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.d.ts +2 -2
  35. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +10 -0
  36. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +2 -1
  37. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +5 -3
  38. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +8 -3
  39. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +1 -1
  40. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +1 -0
  41. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +1 -1
  42. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +7 -3
  43. package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +9 -0
  44. package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +3 -3
  45. package/runtime/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +3 -3
  46. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
  47. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
  48. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
  49. package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
  50. package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +3 -3
  51. package/runtime/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +6 -6
  52. package/runtime/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +3 -3
  53. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/index.js +17 -1
  54. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +6 -6
  55. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
  56. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.d.ts +4 -0
  57. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.js +1 -0
  58. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +24 -0
  59. package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/types.d.ts +2 -0
  60. package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +7 -0
  61. package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +15 -4
  62. package/runtime/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +3 -3
  63. package/runtime/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +16 -1
  64. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/index.js +12 -1
  65. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +2 -0
  66. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +13 -1
  67. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
  68. package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/types.d.ts +5 -0
  69. package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +22 -1
  70. package/runtime/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +3 -3
  71. package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -0
  72. package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +3 -3
  73. package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +1 -0
  74. package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
  75. package/runtime/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +16 -1
  76. package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +83 -20
  77. package/runtime/node_modules/@deepseek-ai/node-addon-system/lib/.tsbuildinfo +1 -1
@@ -1222,7 +1222,7 @@ var ReactLoopAgent = class {
1222
1222
  }, () => Promise.resolve(seedConfig));
1223
1223
  signal.throwIfAborted();
1224
1224
  if (!proposedConfig.provider || !proposedConfig.model) throw new Error(`agent "${this.id}" has no provider/model: set AgentOptions.provider and AgentOptions.model or supply both via the agent/request waterfall`);
1225
- if (promptApiKey !== void 0 && (proposedConfig.provider !== promptConfig?.provider || proposedConfig.model !== promptConfig.model)) throw new LlmError("A prompt API key can only be used with its submitted model route", "INVALID_REQUEST");
1225
+ if (promptApiKey !== void 0 && (proposedConfig.provider !== promptConfig?.provider || proposedConfig.model !== promptConfig.model || proposedConfig.baseUrl !== promptConfig.baseUrl)) throw new LlmError("A prompt API key can only be used with its submitted model route", "INVALID_REQUEST");
1226
1226
  let config;
1227
1227
  let preparedCall;
1228
1228
  try {
@@ -496,7 +496,7 @@ export const TYPERT = {
496
496
  },
497
497
  {
498
498
  "name": "LlmCallConfig",
499
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
499
+ "declaration": "export interface LlmCallConfig {\n baseUrl?: string;\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
500
500
  },
501
501
  {
502
502
  "name": "LlmCallConfigAdapterDefaults",
@@ -636,7 +636,7 @@ export const TYPERT = {
636
636
  },
637
637
  {
638
638
  "name": "Session",
639
- "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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
639
+ "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 get appId(): string | undefined;\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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
640
640
  },
641
641
  {
642
642
  "name": "SessionEvent",
@@ -644,7 +644,7 @@ export const TYPERT = {
644
644
  },
645
645
  {
646
646
  "name": "SessionEventMap",
647
- "declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n 'feedback/record': FeedbackRecord;\n 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
647
+ "declaration": "export interface SessionEventMap {\n 'session/application': { appId: string; };\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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
648
648
  },
649
649
  {
650
650
  "name": "SessionEventType",
@@ -6986,7 +6986,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6986
6986
  },
6987
6987
  sourceLocation: {
6988
6988
  "file": "packages/llm/llm/src/index.ts",
6989
- "line": 712,
6989
+ "line": 713,
6990
6990
  "column": 9
6991
6991
  }
6992
6992
  },
@@ -7004,7 +7004,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7004
7004
  },
7005
7005
  sourceLocation: {
7006
7006
  "file": "packages/llm/llm/src/index.ts",
7007
- "line": 624,
7007
+ "line": 625,
7008
7008
  "column": 3
7009
7009
  }
7010
7010
  },
@@ -7022,7 +7022,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
7022
7022
  },
7023
7023
  sourceLocation: {
7024
7024
  "file": "packages/llm/llm/src/index.ts",
7025
- "line": 552,
7025
+ "line": 553,
7026
7026
  "column": 3
7027
7027
  }
7028
7028
  }
@@ -9799,6 +9799,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9799
9799
  ])
9800
9800
  }))]).optional(),
9801
9801
  "sessionListMetadata": object({
9802
+ "appId": union([_undefined(), string()]).readonly().optional(),
9802
9803
  "hasUserPrompt": boolean().readonly().optional(),
9803
9804
  "blank": boolean().readonly(),
9804
9805
  "lastPromptAt": union([literal(null), number()]).readonly()
@@ -9920,6 +9921,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9920
9921
  }))]);
9921
9922
  let _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value;
9922
9923
  const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema = () => _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value ??= object({
9924
+ "appId": string().readonly().optional(),
9923
9925
  "resumeOnly": boolean().readonly().optional(),
9924
9926
  "workspaceId": intersection(string(), unknown()).readonly().optional(),
9925
9927
  "cwd": string().readonly().optional(),
@@ -9930,6 +9932,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
9930
9932
  });
9931
9933
  let _deepseek_ai_dsh_api_session_controller_session_create_result$schema$value;
9932
9934
  const _deepseek_ai_dsh_api_session_controller_session_create_result$schema = () => _deepseek_ai_dsh_api_session_controller_session_create_result$schema$value ??= object({
9935
+ "appId": string().readonly().optional(),
9933
9936
  "sessionId": intersection(string(), unknown()).readonly(),
9934
9937
  "agentPreset": string().readonly().optional()
9935
9938
  });
@@ -10078,6 +10081,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10078
10081
  ])
10079
10082
  }))]).optional(),
10080
10083
  "sessionListMetadata": object({
10084
+ "appId": union([_undefined(), string()]).readonly().optional(),
10081
10085
  "hasUserPrompt": boolean().readonly().optional(),
10082
10086
  "blank": boolean().readonly(),
10083
10087
  "lastPromptAt": union([literal(null), number()]).readonly()
@@ -10257,6 +10261,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10257
10261
  const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema = () => _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema$value ??= object({ "cursor": string().readonly().optional() });
10258
10262
  let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value;
10259
10263
  const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () => _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value ??= object({ "items": array(object({
10264
+ "appId": string().readonly().optional(),
10260
10265
  "agentAvailable": boolean().readonly(),
10261
10266
  "sessionId": intersection(string(), unknown()).readonly(),
10262
10267
  "updatedAt": number().readonly(),
@@ -10300,6 +10305,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10300
10305
  ])
10301
10306
  }))]).optional(),
10302
10307
  "sessionListMetadata": object({
10308
+ "appId": union([_undefined(), string()]).readonly().optional(),
10303
10309
  "hasUserPrompt": boolean().readonly().optional(),
10304
10310
  "blank": boolean().readonly(),
10305
10311
  "lastPromptAt": union([literal(null), number()]).readonly()
@@ -10553,6 +10559,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10553
10559
  ])
10554
10560
  }))]).optional(),
10555
10561
  "sessionListMetadata": object({
10562
+ "appId": union([_undefined(), string()]).readonly().optional(),
10556
10563
  "hasUserPrompt": boolean().readonly().optional(),
10557
10564
  "blank": boolean().readonly(),
10558
10565
  "lastPromptAt": union([literal(null), number()]).readonly()
@@ -10691,6 +10698,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10691
10698
  "provider": string().readonly(),
10692
10699
  "model": string().readonly(),
10693
10700
  "protocol": string().readonly().optional(),
10701
+ "baseUrl": string().readonly().optional(),
10694
10702
  "apiKey": string().readonly().optional(),
10695
10703
  "options": record(string(), union([
10696
10704
  literal(null),
@@ -10718,7 +10726,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10718
10726
  const _deepseek_ai_dsh_api_session_controller_session_promptModelConfig_result$schema = () => _deepseek_ai_dsh_api_session_controller_session_promptModelConfig_result$schema$value ??= object({
10719
10727
  "version": literal(1),
10720
10728
  "requestApiKey": literal(true),
10721
- "unifiedOptions": literal(true)
10729
+ "unifiedOptions": literal(true),
10730
+ "requestBaseUrl": literal(true)
10722
10731
  });
10723
10732
  let _deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema$value;
10724
10733
  const _deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema = () => _deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema$value ??= object({
@@ -10781,6 +10790,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
10781
10790
  });
10782
10791
  let _deepseek_ai_dsh_api_session_controller_session_resume_result$schema$value;
10783
10792
  const _deepseek_ai_dsh_api_session_controller_session_resume_result$schema = () => _deepseek_ai_dsh_api_session_controller_session_resume_result$schema$value ??= object({
10793
+ "appId": string().readonly().optional(),
10784
10794
  "sessionId": intersection(string(), unknown()).readonly(),
10785
10795
  "selected": object({
10786
10796
  "provider": string().readonly(),
@@ -167,6 +167,7 @@ window.__ModuleLoader__.load({
167
167
  "sandbox/mode",
168
168
  "schedule/change",
169
169
  "session-log-deepseek/delivery-accepted",
170
+ "session/application",
170
171
  "session/end-seed",
171
172
  "session/title",
172
173
  "session/title-llm-request",
@@ -388,14 +388,15 @@ var ApiSessionAgentController = class {
388
388
  * @param existingOnly - refuse a cold identity that does not exist instead of creating it.
389
389
  * @param provider - optional provider override for the model selection.
390
390
  * @param model - optional model override for the model selection.
391
+ * @param appId - application identity for new Sessions.
391
392
  * @returns the matching live ordinary Agent.
392
393
  */
393
- async ensureSession(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly = false, provider, model) {
394
+ async ensureSession(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly = false, provider, model, appId) {
394
395
  const releasing = this.releases.get(sessionId);
395
396
  if (releasing !== void 0) await releasing;
396
397
  let creation = this.creations.get(sessionId);
397
398
  if (creation === void 0) {
398
- creation = this.createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model).catch((error) => {
399
+ creation = this.createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model, appId).catch((error) => {
399
400
  const live = this.ctx.agents.get(sessionId);
400
401
  if (live !== void 0) {
401
402
  if (hasApiSessionSubagentOwner(this.ctx, live.session, live)) throw new ApiSessionSubagentOwnership(sessionId);
@@ -556,7 +557,7 @@ var ApiSessionAgentController = class {
556
557
  setup: composition.setup
557
558
  }))).agent;
558
559
  }
559
- async createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model) {
560
+ async createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model, appId) {
560
561
  const attached = this.ctx.sessions.get(sessionId);
561
562
  const live = this.ctx.agents.get(sessionId);
562
563
  if (attached !== void 0 && hasApiSessionSubagentOwner(this.ctx, attached, live)) throw new ApiSessionSubagentOwnership(sessionId);
@@ -601,6 +602,7 @@ var ApiSessionAgentController = class {
601
602
  agentOptions: this.agentOptions(provider, model),
602
603
  meta: {
603
604
  cwd,
605
+ ...appId === void 0 ? {} : { appId },
604
606
  ...composition.agentPreset === void 0 ? {} : { agentPreset: composition.agentPreset }
605
607
  },
606
608
  setup: composition.setup
@@ -857,6 +859,7 @@ var SessionCommandController = class {
857
859
  * @returns the Session identity and resolved preset when configured.
858
860
  */
859
861
  async create(request) {
862
+ if (request.appId !== void 0 && (typeof request.appId !== "string" || !/^[\x21-\x7e]{1,128}$/u.test(request.appId))) throw new RemoteError("gateway/bad-request", "appId must contain 1 to 128 visible ASCII characters", {});
860
863
  if (request.resumeOnly === true && !request.sessionId) throw new RemoteError("gateway/bad-request", "resumeOnly requires a sessionId", {});
861
864
  if (request.workspaceId !== void 0 && request.cwd !== void 0) throw new RemoteError("gateway/bad-request", "session.create accepts workspaceId or cwd, not both", {});
862
865
  this.ctx.logger.info("session-controller.commands: create", {
@@ -873,7 +876,7 @@ var SessionCommandController = class {
873
876
  const cwd = workspace?.path ?? request.cwd ?? this.defaultCwd;
874
877
  let adopted;
875
878
  try {
876
- adopted = await this.agents.ensureSession(sessionId, cwd, request.sessionId !== void 0, request.agentPreset, request.resumeOnly === true, request.provider, request.model);
879
+ adopted = await this.agents.ensureSession(sessionId, cwd, request.sessionId !== void 0, request.agentPreset, request.resumeOnly === true, request.provider, request.model, request.appId);
877
880
  } catch (error) {
878
881
  this.rejectCreation(sessionId, error);
879
882
  }
@@ -886,9 +889,11 @@ var SessionCommandController = class {
886
889
  });
887
890
  }
888
891
  const agentPreset = this.agents.presetForSession(adopted.session);
892
+ const appId = adopted.session.appId;
889
893
  return {
890
894
  sessionId,
891
- ...agentPreset === void 0 ? {} : { agentPreset }
895
+ ...agentPreset === void 0 ? {} : { agentPreset },
896
+ ...appId === void 0 ? {} : { appId }
892
897
  };
893
898
  }
894
899
  /**
@@ -1259,6 +1264,7 @@ var SessionCommandController = class {
1259
1264
  const current = selection.current;
1260
1265
  return {
1261
1266
  sessionId,
1267
+ ...agent.session.appId === void 0 ? {} : { appId: agent.session.appId },
1262
1268
  selected: {
1263
1269
  provider: current.provider,
1264
1270
  model: current.model,
@@ -1348,7 +1354,8 @@ function validatePromptModelConfig(request) {
1348
1354
  "protocol",
1349
1355
  "options",
1350
1356
  "protocolOptions",
1351
- "apiKey"
1357
+ "apiKey",
1358
+ "baseUrl"
1352
1359
  ].includes(key)) || Buffer.byteLength(JSON.stringify(config)) > 16384) throw invalidModelConfig("modelConfig");
1353
1360
  for (const key of [
1354
1361
  "provider",
@@ -2197,6 +2204,7 @@ const SEARCH_PROVIDER_CALL_LIMIT = 100;
2197
2204
  const SESSION_SEARCH_QUERY_MAX_CHARS = 500;
2198
2205
  const MESSAGE_TYPES = new Set(["user/message", "assistant/message"]);
2199
2206
  const sessionListMetadataSchema = z$1.object({
2207
+ appId: z$1.string().optional(),
2200
2208
  hasUserPrompt: z$1.boolean().default(false),
2201
2209
  blank: z$1.boolean(),
2202
2210
  lastPromptAt: z$1.number().nullable()
@@ -2219,10 +2227,12 @@ function applySessionListMetadata(state, event) {
2219
2227
  const blank = state.blank && event.type !== "turn/start";
2220
2228
  const hasUserPrompt = state.hasUserPrompt === true || hasHumanInput(event);
2221
2229
  const lastPromptAt = event.type === "user/message" && event.data.source.kind === "user" ? event.time : state.lastPromptAt;
2222
- return blank === state.blank && lastPromptAt === state.lastPromptAt && hasUserPrompt === state.hasUserPrompt ? state : {
2230
+ const appId = state.appId ?? (event.type === "session/application" ? event.data.appId : void 0);
2231
+ return appId === state.appId && blank === state.blank && lastPromptAt === state.lastPromptAt && hasUserPrompt === state.hasUserPrompt ? state : {
2223
2232
  blank,
2224
2233
  lastPromptAt,
2225
- hasUserPrompt
2234
+ hasUserPrompt,
2235
+ ...appId === void 0 ? {} : { appId }
2226
2236
  };
2227
2237
  }
2228
2238
  /** User-origin text or media is conversation input; injected context is not. */
@@ -2271,7 +2281,7 @@ var ApiSessionList = class {
2271
2281
  viewSchema: sessionListMetadataSchema,
2272
2282
  view: (state) => state
2273
2283
  },
2274
- stateVersion: 2
2284
+ stateVersion: 3
2275
2285
  });
2276
2286
  ctx.effect(() => async () => {
2277
2287
  this.backfillAbort.abort();
@@ -2309,6 +2319,7 @@ var ApiSessionList = class {
2309
2319
  running: this.ctx.agents.get(session.id)?.status === "running",
2310
2320
  blank: metadata?.blank ?? session.seq === 0,
2311
2321
  ...listFields(session.header),
2322
+ ...session.appId === void 0 ? {} : { appId: session.appId },
2312
2323
  ...projections === void 0 ? {} : { projections }
2313
2324
  };
2314
2325
  }
@@ -2353,6 +2364,7 @@ var ApiSessionList = class {
2353
2364
  running: false,
2354
2365
  blank: metadata?.blank ?? false,
2355
2366
  ...listFields(header),
2367
+ ...metadata?.appId === void 0 ? {} : { appId: metadata.appId },
2356
2368
  ...projections === void 0 ? {} : { projections }
2357
2369
  };
2358
2370
  }
@@ -3894,7 +3906,8 @@ let SessionController = (() => {
3894
3906
  return {
3895
3907
  version: 1,
3896
3908
  requestApiKey: true,
3897
- unifiedOptions: true
3909
+ unifiedOptions: true,
3910
+ requestBaseUrl: true
3898
3911
  };
3899
3912
  }
3900
3913
  /**
@@ -77,6 +77,7 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
77
77
  'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
78
78
  }))]).optional(),
79
79
  'sessionListMetadata': z.object({
80
+ 'appId': z.union([z.undefined(), z.string()]).readonly().optional(),
80
81
  'hasUserPrompt': z.boolean().readonly().optional(),
81
82
  'blank': z.boolean().readonly(),
82
83
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
@@ -169,6 +170,7 @@ const _deepseek_ai_dsh_api_session_controller_session_control_result$schema = ()
169
170
  }))]))
170
171
  let _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value
171
172
  const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema = () => (_deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema$value ??= z.object({
173
+ 'appId': z.string().readonly().optional(),
172
174
  'resumeOnly': z.boolean().readonly().optional(),
173
175
  'workspaceId': z.intersection(z.string(), z.unknown()).readonly().optional(),
174
176
  'cwd': z.string().readonly().optional(),
@@ -179,6 +181,7 @@ const _deepseek_ai_dsh_api_session_controller_session_create_parameter_0$schema
179
181
  }))
180
182
  let _deepseek_ai_dsh_api_session_controller_session_create_result$schema$value
181
183
  const _deepseek_ai_dsh_api_session_controller_session_create_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_create_result$schema$value ??= z.object({
184
+ 'appId': z.string().readonly().optional(),
182
185
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
183
186
  'agentPreset': z.string().readonly().optional(),
184
187
  }))
@@ -253,6 +256,7 @@ const _deepseek_ai_dsh_api_session_controller_session_follow_result$schema = ()
253
256
  'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
254
257
  }))]).optional(),
255
258
  'sessionListMetadata': z.object({
259
+ 'appId': z.union([z.undefined(), z.string()]).readonly().optional(),
256
260
  'hasUserPrompt': z.boolean().readonly().optional(),
257
261
  'blank': z.boolean().readonly(),
258
262
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
@@ -393,6 +397,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_parameter_0$schema =
393
397
  let _deepseek_ai_dsh_api_session_controller_session_list_result$schema$value
394
398
  const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_list_result$schema$value ??= z.object({
395
399
  'items': z.array(z.object({
400
+ 'appId': z.string().readonly().optional(),
396
401
  'agentAvailable': z.boolean().readonly(),
397
402
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
398
403
  'updatedAt': z.number().readonly(),
@@ -416,6 +421,7 @@ const _deepseek_ai_dsh_api_session_controller_session_list_result$schema = () =>
416
421
  'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
417
422
  }))]).optional(),
418
423
  'sessionListMetadata': z.object({
424
+ 'appId': z.union([z.undefined(), z.string()]).readonly().optional(),
419
425
  'hasUserPrompt': z.boolean().readonly().optional(),
420
426
  'blank': z.boolean().readonly(),
421
427
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
@@ -602,6 +608,7 @@ const _deepseek_ai_dsh_api_session_controller_session_projections_result$schema
602
608
  'status': z.union([z.literal("completed"), z.literal("pending"), z.literal("in_progress")]),
603
609
  }))]).optional(),
604
610
  'sessionListMetadata': z.object({
611
+ 'appId': z.union([z.undefined(), z.string()]).readonly().optional(),
605
612
  'hasUserPrompt': z.boolean().readonly().optional(),
606
613
  'blank': z.boolean().readonly(),
607
614
  'lastPromptAt': z.union([z.literal(null), z.number()]).readonly(),
@@ -707,6 +714,7 @@ const _deepseek_ai_dsh_api_session_controller_session_prompt_parameter_0$schema
707
714
  'provider': z.string().readonly(),
708
715
  'model': z.string().readonly(),
709
716
  'protocol': z.string().readonly().optional(),
717
+ 'baseUrl': z.string().readonly().optional(),
710
718
  'apiKey': z.string().readonly().optional(),
711
719
  'options': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2()))])).readonly().readonly(),
712
720
  'protocolOptions': z.record(z.string(), z.union([z.literal(null), z.string(), z.number(), z.literal(false), z.literal(true), z.array(z.lazy(() => JsonValueRemoteCodec$schema2())), z.record(z.string(), z.lazy(() => JsonValueRemoteCodec$schema2()))])).readonly().readonly().optional(),
@@ -721,6 +729,7 @@ const _deepseek_ai_dsh_api_session_controller_session_promptModelConfig_result$s
721
729
  'version': z.literal(1),
722
730
  'requestApiKey': z.literal(true),
723
731
  'unifiedOptions': z.literal(true),
732
+ 'requestBaseUrl': z.literal(true),
724
733
  }))
725
734
  let _deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema$value
726
735
  const _deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_refreshModelCatalog_result$schema$value ??= z.object({
@@ -787,6 +796,7 @@ const _deepseek_ai_dsh_api_session_controller_session_resume_parameter_0$schema
787
796
  }))
788
797
  let _deepseek_ai_dsh_api_session_controller_session_resume_result$schema$value
789
798
  const _deepseek_ai_dsh_api_session_controller_session_resume_result$schema = () => (_deepseek_ai_dsh_api_session_controller_session_resume_result$schema$value ??= z.object({
799
+ 'appId': z.string().readonly().optional(),
790
800
  'sessionId': z.intersection(z.string(), z.unknown()).readonly(),
791
801
  'selected': z.object({
792
802
  'provider': z.string().readonly(),
@@ -1802,7 +1812,7 @@ export const TYPERT = {
1802
1812
  {
1803
1813
  "kind": "method",
1804
1814
  "name": "promptModelConfig",
1805
- "signature": "@Remote('promptModelConfig') promptModelConfig(): { version: 1; requestApiKey: true; unifiedOptions: true }",
1815
+ "signature": "@Remote('promptModelConfig') promptModelConfig(): { version: 1; requestApiKey: true; unifiedOptions: true; requestBaseUrl: true }",
1806
1816
  "summary": "Advertise support for request-local model configuration.",
1807
1817
  "jsDoc": "/**\n * Advertise support for request-local model configuration.\n * @returns Supported model configuration version.\n */"
1808
1818
  },
@@ -2134,7 +2144,7 @@ export const TYPERT = {
2134
2144
  },
2135
2145
  {
2136
2146
  "name": "LlmCallConfig",
2137
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
2147
+ "declaration": "export interface LlmCallConfig {\n baseUrl?: string;\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
2138
2148
  },
2139
2149
  {
2140
2150
  "name": "LlmCallConfigAdapterDefaults",
@@ -2146,7 +2156,7 @@ export const TYPERT = {
2146
2156
  },
2147
2157
  {
2148
2158
  "name": "LlmPromptModelConfig",
2149
- "declaration": "export interface LlmPromptModelConfig {\n readonly provider: string;\n readonly model: string;\n readonly protocol?: string;\n readonly apiKey?: string;\n readonly options: Readonly<Record<string, JsonValue>>;\n readonly protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
2159
+ "declaration": "export interface LlmPromptModelConfig {\n readonly provider: string;\n readonly model: string;\n readonly protocol?: string;\n readonly baseUrl?: string;\n readonly apiKey?: string;\n readonly options: Readonly<Record<string, JsonValue>>;\n readonly protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
2150
2160
  },
2151
2161
  {
2152
2162
  "name": "Message",
@@ -2330,7 +2340,7 @@ export const TYPERT = {
2330
2340
  },
2331
2341
  {
2332
2342
  "name": "Session",
2333
- "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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
2343
+ "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 get appId(): string | undefined;\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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
2334
2344
  },
2335
2345
  {
2336
2346
  "name": "SessionActivity",
@@ -2398,11 +2408,11 @@ export const TYPERT = {
2398
2408
  },
2399
2409
  {
2400
2410
  "name": "SessionCreateRequest",
2401
- "declaration": "export interface SessionCreateRequest {\n readonly resumeOnly?: boolean;\n readonly workspaceId?: WorkspaceId;\n readonly cwd?: string;\n readonly sessionId?: SessionId;\n readonly agentPreset?: string;\n readonly provider?: string;\n readonly model?: string;\n}"
2411
+ "declaration": "export interface SessionCreateRequest {\n readonly appId?: string;\n readonly resumeOnly?: boolean;\n readonly workspaceId?: WorkspaceId;\n readonly cwd?: string;\n readonly sessionId?: SessionId;\n readonly agentPreset?: string;\n readonly provider?: string;\n readonly model?: string;\n}"
2402
2412
  },
2403
2413
  {
2404
2414
  "name": "SessionCreateValue",
2405
- "declaration": "export interface SessionCreateValue {\n readonly sessionId: SessionId;\n readonly agentPreset?: string;\n}"
2415
+ "declaration": "export interface SessionCreateValue {\n readonly appId?: string;\n readonly sessionId: SessionId;\n readonly agentPreset?: string;\n}"
2406
2416
  },
2407
2417
  {
2408
2418
  "name": "SessionEvent",
@@ -2414,7 +2424,7 @@ export const TYPERT = {
2414
2424
  },
2415
2425
  {
2416
2426
  "name": "SessionEventMap",
2417
- "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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
2427
+ "declaration": "export interface SessionEventMap {\n 'session/application': { appId: string; };\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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
2418
2428
  },
2419
2429
  {
2420
2430
  "name": "SessionEventType",
@@ -2454,7 +2464,7 @@ export const TYPERT = {
2454
2464
  },
2455
2465
  {
2456
2466
  "name": "SessionListMetadata",
2457
- "declaration": "export interface SessionListMetadata {\n readonly hasUserPrompt?: boolean;\n readonly blank: boolean;\n readonly lastPromptAt: number | null;\n}"
2467
+ "declaration": "export interface SessionListMetadata {\n readonly appId?: string | undefined;\n readonly hasUserPrompt?: boolean;\n readonly blank: boolean;\n readonly lastPromptAt: number | null;\n}"
2458
2468
  },
2459
2469
  {
2460
2470
  "name": "SessionListRequest",
@@ -2546,7 +2556,7 @@ export const TYPERT = {
2546
2556
  },
2547
2557
  {
2548
2558
  "name": "SessionResumeValue",
2549
- "declaration": "export interface SessionResumeValue {\n readonly sessionId: SessionId;\n readonly selected: ModelSelection;\n}"
2559
+ "declaration": "export interface SessionResumeValue {\n readonly appId?: string;\n readonly sessionId: SessionId;\n readonly selected: ModelSelection;\n}"
2550
2560
  },
2551
2561
  {
2552
2562
  "name": "SessionSearchItem",
@@ -2590,7 +2600,7 @@ export const TYPERT = {
2590
2600
  },
2591
2601
  {
2592
2602
  "name": "SessionSummary",
2593
- "declaration": "export interface SessionSummary {\n readonly agentAvailable: boolean;\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
2603
+ "declaration": "export interface SessionSummary {\n readonly appId?: string;\n readonly agentAvailable: boolean;\n readonly sessionId: SessionId;\n readonly updatedAt: number;\n readonly running: boolean;\n readonly blank: boolean;\n readonly parentSessionId?: SessionId;\n readonly origin?: 'subagent';\n readonly cwd?: string;\n readonly projections?: SessionProjectionHints;\n}"
2594
2604
  },
2595
2605
  {
2596
2606
  "name": "SessionSurface",
@@ -3025,7 +3035,7 @@ export const TYPERT = {
3025
3035
  },
3026
3036
  {
3027
3037
  "name": "LlmCallConfig",
3028
- "declaration": "export interface LlmCallConfig {\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
3038
+ "declaration": "export interface LlmCallConfig {\n baseUrl?: string;\n provider: string;\n model: string;\n reasoningEffort?: ReasoningEffortId;\n temperature?: number;\n maxTokens?: number;\n stop?: string[];\n contextWindow?: number;\n protocol?: string;\n protocolOptions?: Readonly<Record<string, JsonValue>>;\n}"
3029
3039
  },
3030
3040
  {
3031
3041
  "name": "LlmCallConfigAdapterDefaults",
@@ -3157,7 +3167,7 @@ export const TYPERT = {
3157
3167
  },
3158
3168
  {
3159
3169
  "name": "Session",
3160
- "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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
3170
+ "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 get appId(): string | undefined;\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 toolHistory(): ToolHistory;\n deriveMessages(): Message[];\n deriveEventMessage(event: SessionEvent): Message | null;\n}"
3161
3171
  },
3162
3172
  {
3163
3173
  "name": "SessionEvent",
@@ -3165,7 +3175,7 @@ export const TYPERT = {
3165
3175
  },
3166
3176
  {
3167
3177
  "name": "SessionEventMap",
3168
- "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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
3178
+ "declaration": "export interface SessionEventMap {\n 'session/application': { appId: string; };\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 'goal/change': GoalChangeMeta;\n 'feedback/message-put': MessageFeedbackPut;\n 'feedback/message-delete': MessageFeedbackDelete;\n 'schedule/change': ScheduleChange;\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}"
3169
3179
  },
3170
3180
  {
3171
3181
  "name": "SessionEventType",
@@ -28,7 +28,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
28
28
  page: (request: SessionPageRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionPage>>
29
29
  projections: (request: SessionProjectionsRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionProjectionsValue>>
30
30
  prompt: (request: SessionPromptRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionPromptValue>>
31
- promptModelConfig: () => Promise<RemoteResult<{ version: 1; requestApiKey: true; unifiedOptions: true; }>>
31
+ promptModelConfig: () => Promise<RemoteResult<{ version: 1; requestApiKey: true; unifiedOptions: true; requestBaseUrl: true; }>>
32
32
  refreshModelCatalog: () => Promise<RemoteResult<ModelCatalog>>
33
33
  release: (request: SessionCancelRequest) => Promise<RemoteResult<{ readonly released: true; }>>
34
34
  rename: (request: SessionRenameRequest) => Promise<RemoteResult<SessionRenameValue>>
@@ -62,7 +62,7 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
62
62
  'session/page': (request: SessionPageRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionPage>>
63
63
  'session/projections': (request: SessionProjectionsRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionProjectionsValue>>
64
64
  'session/prompt': (request: SessionPromptRequest, signal?: AbortSignal) => Promise<RemoteResult<SessionPromptValue>>
65
- 'session/promptModelConfig': () => Promise<RemoteResult<{ version: 1; requestApiKey: true; unifiedOptions: true; }>>
65
+ 'session/promptModelConfig': () => Promise<RemoteResult<{ version: 1; requestApiKey: true; unifiedOptions: true; requestBaseUrl: true; }>>
66
66
  'session/refreshModelCatalog': () => Promise<RemoteResult<ModelCatalog>>
67
67
  'session/release': (request: SessionCancelRequest) => Promise<RemoteResult<{ readonly released: true; }>>
68
68
  'session/rename': (request: SessionRenameRequest) => Promise<RemoteResult<SessionRenameValue>>