@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.
- package/lib/{command-errors-CnbcOM1a.js → command-errors-vCFKCJFq.js} +12 -12
- package/lib/{command-trees-CU7BxVJo.js → command-trees-N2_LR4f-.js} +2 -2
- package/lib/{component-identity-kZK1_hFy.js → component-identity-CaV_MmmE.js} +3 -3
- package/lib/{extension-events-hLxwPvpg.js → extension-events-B5qKP0-X.js} +20 -20
- package/lib/{host-access-kT-u85k_.js → host-access-BRXW3V8i.js} +1 -1
- package/lib/{keymap-DS1M8sDo.js → keymap-BYjklwli.js} +2 -2
- package/lib/{plugin-BccFcAte.js → plugin-VYAv2o0K.js} +497 -347
- package/lib/{scenes-DG6T8t-A.js → scenes-B-iDMpgW.js} +3 -3
- package/lib/{settings-sections-2SuE0biI.js → settings-sections-CYCrZKUk.js} +3 -3
- package/lib/{statusBarSettings-B2MEAwnI.js → statusBarSettings-Cu-b_o4Q.js} +3 -3
- package/lib/{themes-DUO7kGW-.js → themes-DC9GpV6q.js} +12 -12
- package/lib/tui-compat-command-trees.js +1 -1
- package/lib/tui-compat-extensions.js +3 -3
- package/lib/tui-compat-plugin-host.js +5 -5
- package/lib/tui-compat-scenes.js +1 -1
- package/lib/tui-compat-settings-sections.js +1 -1
- package/lib/tui-compat-working-activity.js +1 -1
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +6 -6
- package/lib/{workspaces-CLOkL_yE.js → workspaces-BchdRzlw.js} +2 -2
- package/package.json +25 -25
- package/runtime/manifest.json +1 -1
- package/runtime/node_modules/@chatcode/runtime-client/README.md +11 -8
- package/runtime/node_modules/@chatcode/runtime-client/index.d.ts +6 -12
- package/runtime/node_modules/@chatcode/runtime-client/package.json +1 -1
- package/runtime/node_modules/@chatcode/runtime-client/runtime-connector.mjs +16 -16
- package/runtime/node_modules/@chatcode/runtime-client/session-browser.mjs +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-agent-loop/lib/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-agent-preset-registry/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +14 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/client.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +23 -10
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +23 -13
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +5 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +8 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +9 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-terminal-controller/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-client-file-upload/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/client.js +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-host-runner/lib/typert.host.js +6 -6
- package/runtime/node_modules/@deepseek-ai/dsh-goal/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/index.js +17 -1
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.host.js +6 -6
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/typert.remote-client.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/call-config.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/index.js +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm/lib/types/types.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js +7 -0
- package/runtime/node_modules/@deepseek-ai/dsh-llm-pi-ai/lib/index.js +15 -4
- package/runtime/node_modules/@deepseek-ai/dsh-permission-presets/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/lib/index.js +16 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/index.js +12 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.js +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/known-event-types.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/types.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/worker.cjs +22 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-reference/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/index.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/typert.host.js +3 -3
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/child-agent.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tmux-context/lib/index.js +16 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +83 -20
- package/runtime/node_modules/@deepseek-ai/node-addon-system/lib/.tsbuildinfo +1 -1
package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js
CHANGED
|
@@ -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(),
|
|
@@ -139,9 +139,10 @@ export declare class ApiSessionAgentController {
|
|
|
139
139
|
* @param existingOnly - refuse a cold identity that does not exist instead of creating it.
|
|
140
140
|
* @param provider - optional provider override for the model selection.
|
|
141
141
|
* @param model - optional model override for the model selection.
|
|
142
|
+
* @param appId - application identity for new Sessions.
|
|
142
143
|
* @returns the matching live ordinary Agent.
|
|
143
144
|
*/
|
|
144
|
-
ensureSession(sessionId: SessionId, cwd: string | undefined, checkPersistedIdentity: boolean, presetId?: string, existingOnly?: boolean, provider?: string, model?: string): Promise<Agent>;
|
|
145
|
+
ensureSession(sessionId: SessionId, cwd: string | undefined, checkPersistedIdentity: boolean, presetId?: string, existingOnly?: boolean, provider?: string, model?: string, appId?: string): Promise<Agent>;
|
|
145
146
|
/**
|
|
146
147
|
* Install or return the Session-local model selection used by prompt assembly.
|
|
147
148
|
* @param agent - live Agent that owns the selection.
|
|
@@ -417,15 +417,16 @@ export class ApiSessionAgentController {
|
|
|
417
417
|
* @param existingOnly - refuse a cold identity that does not exist instead of creating it.
|
|
418
418
|
* @param provider - optional provider override for the model selection.
|
|
419
419
|
* @param model - optional model override for the model selection.
|
|
420
|
+
* @param appId - application identity for new Sessions.
|
|
420
421
|
* @returns the matching live ordinary Agent.
|
|
421
422
|
*/
|
|
422
|
-
async ensureSession(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly = false, provider, model) {
|
|
423
|
+
async ensureSession(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly = false, provider, model, appId) {
|
|
423
424
|
const releasing = this.releases.get(sessionId);
|
|
424
425
|
if (releasing !== undefined)
|
|
425
426
|
await releasing;
|
|
426
427
|
let creation = this.creations.get(sessionId);
|
|
427
428
|
if (creation === undefined) {
|
|
428
|
-
creation = this.createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model)
|
|
429
|
+
creation = this.createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model, appId)
|
|
429
430
|
.catch((error) => {
|
|
430
431
|
const live = this.ctx.agents.get(sessionId);
|
|
431
432
|
if (live !== undefined) {
|
|
@@ -624,7 +625,7 @@ export class ApiSessionAgentController {
|
|
|
624
625
|
setup: composition.setup,
|
|
625
626
|
}))).agent;
|
|
626
627
|
}
|
|
627
|
-
async createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model) {
|
|
628
|
+
async createOrAdopt(sessionId, cwd, checkPersistedIdentity, presetId, existingOnly, provider, model, appId) {
|
|
628
629
|
const attached = this.ctx.sessions.get(sessionId);
|
|
629
630
|
const live = this.ctx.agents.get(sessionId);
|
|
630
631
|
if (attached !== undefined && hasApiSessionSubagentOwner(this.ctx, attached, live)) {
|
|
@@ -682,6 +683,7 @@ export class ApiSessionAgentController {
|
|
|
682
683
|
agentOptions: this.agentOptions(provider, model),
|
|
683
684
|
meta: {
|
|
684
685
|
cwd,
|
|
686
|
+
...(appId === undefined ? {} : { appId }),
|
|
685
687
|
...(composition.agentPreset === undefined ? {} : { agentPreset: composition.agentPreset }),
|
|
686
688
|
},
|
|
687
689
|
setup: composition.setup,
|
|
@@ -105,6 +105,9 @@ export class SessionCommandController {
|
|
|
105
105
|
* @returns the Session identity and resolved preset when configured.
|
|
106
106
|
*/
|
|
107
107
|
async create(request) {
|
|
108
|
+
if (request.appId !== undefined && (typeof request.appId !== 'string' || !/^[\x21-\x7e]{1,128}$/u.test(request.appId))) {
|
|
109
|
+
throw new RemoteError('gateway/bad-request', 'appId must contain 1 to 128 visible ASCII characters', {});
|
|
110
|
+
}
|
|
108
111
|
if (request.resumeOnly === true && !request.sessionId) {
|
|
109
112
|
throw new RemoteError('gateway/bad-request', 'resumeOnly requires a sessionId', {});
|
|
110
113
|
}
|
|
@@ -125,7 +128,7 @@ export class SessionCommandController {
|
|
|
125
128
|
const cwd = workspace?.path ?? request.cwd ?? this.defaultCwd;
|
|
126
129
|
let adopted;
|
|
127
130
|
try {
|
|
128
|
-
adopted = await this.agents.ensureSession(sessionId, cwd, request.sessionId !== undefined, request.agentPreset, request.resumeOnly === true, request.provider, request.model);
|
|
131
|
+
adopted = await this.agents.ensureSession(sessionId, cwd, request.sessionId !== undefined, request.agentPreset, request.resumeOnly === true, request.provider, request.model, request.appId);
|
|
129
132
|
}
|
|
130
133
|
catch (error) {
|
|
131
134
|
this.rejectCreation(sessionId, error);
|
|
@@ -139,7 +142,8 @@ export class SessionCommandController {
|
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
const agentPreset = this.agents.presetForSession(adopted.session);
|
|
142
|
-
|
|
145
|
+
const appId = adopted.session.appId;
|
|
146
|
+
return { sessionId, ...(agentPreset === undefined ? {} : { agentPreset }), ...(appId === undefined ? {} : { appId }) };
|
|
143
147
|
}
|
|
144
148
|
/**
|
|
145
149
|
* Validate against the live registry and persist the default, then install one
|
|
@@ -566,6 +570,7 @@ export class SessionCommandController {
|
|
|
566
570
|
const current = selection.current;
|
|
567
571
|
return {
|
|
568
572
|
sessionId,
|
|
573
|
+
...(agent.session.appId === undefined ? {} : { appId: agent.session.appId }),
|
|
569
574
|
selected: {
|
|
570
575
|
provider: current.provider,
|
|
571
576
|
model: current.model,
|
|
@@ -666,7 +671,7 @@ function validatePromptModelConfig(request) {
|
|
|
666
671
|
throw invalidModelConfig('modelConfig');
|
|
667
672
|
const object = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
668
673
|
if (config === undefined || !object(config) || !isJsonValue(config)
|
|
669
|
-
|| Object.keys(config).some(key => !['provider', 'model', 'protocol', 'options', 'protocolOptions', 'apiKey'].includes(key))
|
|
674
|
+
|| Object.keys(config).some(key => !['provider', 'model', 'protocol', 'options', 'protocolOptions', 'apiKey', 'baseUrl'].includes(key))
|
|
670
675
|
|| Buffer.byteLength(JSON.stringify(config)) > 16_384)
|
|
671
676
|
throw invalidModelConfig('modelConfig');
|
|
672
677
|
for (const key of ['provider', 'model', 'protocol']) {
|
package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/history/controller.js
CHANGED
|
@@ -246,7 +246,7 @@ export class HistoryController {
|
|
|
246
246
|
export function validateObservationAddress(address, observation) {
|
|
247
247
|
if (observation.header.cwd === undefined)
|
|
248
248
|
rejectNotFound(address);
|
|
249
|
-
validateAddress(address, observation.header, observation.inheritedEventCount, observation.projections);
|
|
249
|
+
validateAddress(address, observation.header, observation.inheritedEventCount, observation.projections, address.kind === 'subagent' && observation.source === 'live' && !observation.events.some(event => event.seq >= observation.inheritedEventCount && event.type === 'subagent/descriptor'));
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Convert a borrowed observation to one page without acquiring or retaining it.
|
|
@@ -698,7 +698,7 @@ let SessionController = (() => {
|
|
|
698
698
|
* @returns Supported model configuration version.
|
|
699
699
|
*/
|
|
700
700
|
promptModelConfig() {
|
|
701
|
-
return { version: 1, requestApiKey: true, unifiedOptions: true };
|
|
701
|
+
return { version: 1, requestApiKey: true, unifiedOptions: true, requestBaseUrl: true };
|
|
702
702
|
}
|
|
703
703
|
/**
|
|
704
704
|
* Admit one prompt after explicitly resuming its Session.
|
|
@@ -8,6 +8,7 @@ const SEARCH_PROVIDER_CALL_LIMIT = 100;
|
|
|
8
8
|
const SESSION_SEARCH_QUERY_MAX_CHARS = 500;
|
|
9
9
|
const MESSAGE_TYPES = new Set(['user/message', 'assistant/message']);
|
|
10
10
|
const sessionListMetadataSchema = z.object({
|
|
11
|
+
appId: z.string().optional(),
|
|
11
12
|
hasUserPrompt: z.boolean().default(false),
|
|
12
13
|
blank: z.boolean(),
|
|
13
14
|
lastPromptAt: z.number().nullable(),
|
|
@@ -32,9 +33,10 @@ export function applySessionListMetadata(state, event) {
|
|
|
32
33
|
const lastPromptAt = event.type === 'user/message' && event.data.source.kind === 'user'
|
|
33
34
|
? event.time
|
|
34
35
|
: state.lastPromptAt;
|
|
35
|
-
|
|
36
|
+
const appId = state.appId ?? (event.type === 'session/application' ? event.data.appId : undefined);
|
|
37
|
+
return appId === state.appId && blank === state.blank && lastPromptAt === state.lastPromptAt && hasUserPrompt === state.hasUserPrompt
|
|
36
38
|
? state
|
|
37
|
-
: { blank, lastPromptAt, hasUserPrompt };
|
|
39
|
+
: { blank, lastPromptAt, hasUserPrompt, ...(appId === undefined ? {} : { appId }) };
|
|
38
40
|
}
|
|
39
41
|
/** User-origin text or media is conversation input; injected context is not. */
|
|
40
42
|
function hasHumanInput(event) {
|
|
@@ -76,7 +78,7 @@ export class ApiSessionList {
|
|
|
76
78
|
init: () => ({ blank: true, lastPromptAt: null, hasUserPrompt: false }),
|
|
77
79
|
apply: applySessionListMetadata,
|
|
78
80
|
wire: { viewSchema: sessionListMetadataSchema, view: state => state },
|
|
79
|
-
stateVersion:
|
|
81
|
+
stateVersion: 3,
|
|
80
82
|
});
|
|
81
83
|
ctx.effect(() => async () => {
|
|
82
84
|
this.backfillAbort.abort();
|
|
@@ -115,6 +117,7 @@ export class ApiSessionList {
|
|
|
115
117
|
running: this.ctx.agents.get(session.id)?.status === 'running',
|
|
116
118
|
blank: metadata?.blank ?? session.seq === 0,
|
|
117
119
|
...listFields(session.header),
|
|
120
|
+
...(session.appId === undefined ? {} : { appId: session.appId }),
|
|
118
121
|
...(projections === undefined ? {} : { projections }),
|
|
119
122
|
};
|
|
120
123
|
}
|
|
@@ -165,6 +168,7 @@ export class ApiSessionList {
|
|
|
165
168
|
// A large, metadata-less, or inaccessible cache miss remains unknown and visible.
|
|
166
169
|
blank: metadata?.blank ?? false,
|
|
167
170
|
...listFields(header),
|
|
171
|
+
...(metadata?.appId === undefined ? {} : { appId: metadata.appId }),
|
|
168
172
|
...(projections === undefined ? {} : { projections }),
|
|
169
173
|
};
|
|
170
174
|
}
|
|
@@ -37,6 +37,7 @@ declare module '@deepseek-ai/dsh-session/types' {
|
|
|
37
37
|
}
|
|
38
38
|
/** Persisted hints used to summarize a cold Session. */
|
|
39
39
|
export interface SessionListMetadata {
|
|
40
|
+
readonly appId?: string | undefined;
|
|
40
41
|
/** Real user input exists in this prefix; absent in older cached views. */
|
|
41
42
|
readonly hasUserPrompt?: boolean;
|
|
42
43
|
/** Whether the folded prefix contains no turn. */
|
|
@@ -171,6 +172,8 @@ export type QueueAction = {
|
|
|
171
172
|
};
|
|
172
173
|
/** One Session list entry. */
|
|
173
174
|
export interface SessionSummary {
|
|
175
|
+
/** Application originally recorded in the Session log; absent for legacy Sessions. */
|
|
176
|
+
readonly appId?: string;
|
|
174
177
|
/** Whether this Session currently owns a live Agent. */
|
|
175
178
|
readonly agentAvailable: boolean;
|
|
176
179
|
readonly sessionId: SessionId;
|
|
@@ -344,6 +347,8 @@ export interface SessionSearchValue {
|
|
|
344
347
|
}
|
|
345
348
|
/** Session creation or explicit-id adoption request. */
|
|
346
349
|
export interface SessionCreateRequest {
|
|
350
|
+
/** Application metadata supplied by the SDK; no application authorization is performed. */
|
|
351
|
+
readonly appId?: string;
|
|
347
352
|
/** Refuse a missing explicit identity instead of creating a replacement Session. */
|
|
348
353
|
readonly resumeOnly?: boolean;
|
|
349
354
|
readonly workspaceId?: WorkspaceId;
|
|
@@ -357,6 +362,8 @@ export interface SessionCreateRequest {
|
|
|
357
362
|
}
|
|
358
363
|
/** Session creation response value. */
|
|
359
364
|
export interface SessionCreateValue {
|
|
365
|
+
/** Application originally recorded in the Session log; absent for legacy Sessions. */
|
|
366
|
+
readonly appId?: string;
|
|
360
367
|
readonly sessionId: SessionId;
|
|
361
368
|
readonly agentPreset?: string;
|
|
362
369
|
}
|
|
@@ -390,6 +397,8 @@ export interface SessionResumeRequest {
|
|
|
390
397
|
}
|
|
391
398
|
/** Session resume response value. */
|
|
392
399
|
export interface SessionResumeValue {
|
|
400
|
+
/** Application originally recorded in the Session log; absent for legacy Sessions. */
|
|
401
|
+
readonly appId?: string;
|
|
393
402
|
readonly sessionId: SessionId;
|
|
394
403
|
/** The resolved model selection for this Session. */
|
|
395
404
|
readonly selected: ModelSelection;
|
|
@@ -927,7 +927,7 @@ export const TYPERT = {
|
|
|
927
927
|
},
|
|
928
928
|
{
|
|
929
929
|
"name": "LlmCallConfig",
|
|
930
|
-
"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}"
|
|
930
|
+
"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}"
|
|
931
931
|
},
|
|
932
932
|
{
|
|
933
933
|
"name": "LlmCallConfigAdapterDefaults",
|
|
@@ -1059,7 +1059,7 @@ export const TYPERT = {
|
|
|
1059
1059
|
},
|
|
1060
1060
|
{
|
|
1061
1061
|
"name": "Session",
|
|
1062
|
-
"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}"
|
|
1062
|
+
"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}"
|
|
1063
1063
|
},
|
|
1064
1064
|
{
|
|
1065
1065
|
"name": "SessionEvent",
|
|
@@ -1067,7 +1067,7 @@ export const TYPERT = {
|
|
|
1067
1067
|
},
|
|
1068
1068
|
{
|
|
1069
1069
|
"name": "SessionEventMap",
|
|
1070
|
-
"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}"
|
|
1070
|
+
"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}"
|
|
1071
1071
|
},
|
|
1072
1072
|
{
|
|
1073
1073
|
"name": "SessionEventType",
|
|
@@ -378,7 +378,7 @@ export const TYPERT = {
|
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
380
|
"name": "LlmCallConfig",
|
|
381
|
-
"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}"
|
|
381
|
+
"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}"
|
|
382
382
|
},
|
|
383
383
|
{
|
|
384
384
|
"name": "LlmCallConfigAdapterDefaults",
|
|
@@ -514,7 +514,7 @@ export const TYPERT = {
|
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
"name": "Session",
|
|
517
|
-
"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}"
|
|
517
|
+
"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}"
|
|
518
518
|
},
|
|
519
519
|
{
|
|
520
520
|
"name": "SessionEvent",
|
|
@@ -522,7 +522,7 @@ export const TYPERT = {
|
|
|
522
522
|
},
|
|
523
523
|
{
|
|
524
524
|
"name": "SessionEventMap",
|
|
525
|
-
"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}"
|
|
525
|
+
"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}"
|
|
526
526
|
},
|
|
527
527
|
{
|
|
528
528
|
"name": "SessionEventType",
|
|
@@ -4125,7 +4125,7 @@ window.__ModuleLoader__.load({
|
|
|
4125
4125
|
for (const listener of listeners) listener();
|
|
4126
4126
|
};
|
|
4127
4127
|
/** @returns the client identity for one account call, read at call time so it carries the language and zone in effect then. */
|
|
4128
|
-
const client = () => accountClientMetadata(ctx.locale.getSnapshot().active, "3.0.6-rc.
|
|
4128
|
+
const client = () => accountClientMetadata(ctx.locale.getSnapshot().active, "3.0.6-rc.3");
|
|
4129
4129
|
const notices = createBonusNoticeController({
|
|
4130
4130
|
ackRetryDelayMs: config.bonusAckRetryDelayMs,
|
|
4131
4131
|
ackRetryMaxDelayMs: config.bonusAckRetryMaxDelayMs,
|
|
@@ -4256,7 +4256,7 @@ window.__ModuleLoader__.load({
|
|
|
4256
4256
|
refreshAccount,
|
|
4257
4257
|
contactUs() {
|
|
4258
4258
|
const url = contactUrl(config, {
|
|
4259
|
-
version: "3.0.6-rc.
|
|
4259
|
+
version: "3.0.6-rc.3",
|
|
4260
4260
|
locale: ctx.locale.getSnapshot().active === "zh" ? "zh-CN" : "en",
|
|
4261
4261
|
width: window.screen.width,
|
|
4262
4262
|
height: window.screen.height,
|
package/runtime/node_modules/@deepseek-ai/dsh-client-ui-settings-account/lib/types/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
27
27
|
bonusAckRetryDelayMs: z<number, number, "defined">;
|
|
28
28
|
bonusAckRetryMaxDelayMs: z<number, number, "defined">;
|
|
29
29
|
version: z<1, 1, "volatile-defined">;
|
|
30
|
-
step: z<"
|
|
30
|
+
step: z<"purpose" | "process" | "welcome" | "credit" | "done", "purpose" | "process" | "welcome" | "credit" | "done", "volatile-defined">;
|
|
31
31
|
purpose: z<"office" | "development" | "both" | null, "office" | "development" | "both" | null, "volatile">;
|
|
32
32
|
process: z<"compact" | "standard" | "detailed" | null, "compact" | "standard" | "detailed" | null, "volatile">;
|
|
33
33
|
completion: z<"completed" | "skipped" | "api-key" | null, "completed" | "skipped" | "api-key" | null, "volatile">;
|
|
@@ -39,7 +39,7 @@ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
39
39
|
bonusAckRetryDelayMs: z<number, number, "defined">;
|
|
40
40
|
bonusAckRetryMaxDelayMs: z<number, number, "defined">;
|
|
41
41
|
version: z<1, 1, "volatile-defined">;
|
|
42
|
-
step: z<"
|
|
42
|
+
step: z<"purpose" | "process" | "welcome" | "credit" | "done", "purpose" | "process" | "welcome" | "credit" | "done", "volatile-defined">;
|
|
43
43
|
purpose: z<"office" | "development" | "both" | null, "office" | "development" | "both" | null, "volatile">;
|
|
44
44
|
process: z<"compact" | "standard" | "detailed" | null, "compact" | "standard" | "detailed" | null, "volatile">;
|
|
45
45
|
completion: z<"completed" | "skipped" | "api-key" | null, "completed" | "skipped" | "api-key" | null, "volatile">;
|
|
@@ -657,7 +657,7 @@ window.__ModuleLoader__.load({
|
|
|
657
657
|
function CurrentVersionRow({ t }) {
|
|
658
658
|
return (0, react_jsx_runtime.jsx)("div", {
|
|
659
659
|
className: CurrentVersionRow_module_css_default.row,
|
|
660
|
-
children: t("general.currentVersion", { version: "3.0.6-rc.
|
|
660
|
+
children: t("general.currentVersion", { version: "3.0.6-rc.3" })
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
@@ -167,7 +167,7 @@ window.__ModuleLoader__.load({
|
|
|
167
167
|
const SCROLLBAR_LINGER_MS = 2e3;
|
|
168
168
|
/** Format complete-build metadata for the local brand badge. */
|
|
169
169
|
function localBuildVersion() {
|
|
170
|
-
return `3.0.6-rc.
|
|
170
|
+
return `3.0.6-rc.3-aa3ef7a-dirty`;
|
|
171
171
|
}
|
|
172
172
|
/** Each panel row subscribes only to its own selection state. */
|
|
173
173
|
function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {
|
|
@@ -462,7 +462,7 @@ export const TYPERT = {
|
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
464
|
"name": "LlmCallConfig",
|
|
465
|
-
"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}"
|
|
465
|
+
"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}"
|
|
466
466
|
},
|
|
467
467
|
{
|
|
468
468
|
"name": "LlmCallConfigAdapterDefaults",
|
|
@@ -594,7 +594,7 @@ export const TYPERT = {
|
|
|
594
594
|
},
|
|
595
595
|
{
|
|
596
596
|
"name": "Session",
|
|
597
|
-
"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}"
|
|
597
|
+
"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}"
|
|
598
598
|
},
|
|
599
599
|
{
|
|
600
600
|
"name": "SessionEvent",
|
|
@@ -602,7 +602,7 @@ export const TYPERT = {
|
|
|
602
602
|
},
|
|
603
603
|
{
|
|
604
604
|
"name": "SessionEventMap",
|
|
605
|
-
"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}"
|
|
605
|
+
"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}"
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
608
|
"name": "SessionEventType",
|
|
@@ -1142,7 +1142,7 @@ export const TYPERT = {
|
|
|
1142
1142
|
},
|
|
1143
1143
|
{
|
|
1144
1144
|
"name": "LlmCallConfig",
|
|
1145
|
-
"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}"
|
|
1145
|
+
"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}"
|
|
1146
1146
|
},
|
|
1147
1147
|
{
|
|
1148
1148
|
"name": "LlmCallConfigAdapterDefaults",
|
|
@@ -1274,7 +1274,7 @@ export const TYPERT = {
|
|
|
1274
1274
|
},
|
|
1275
1275
|
{
|
|
1276
1276
|
"name": "Session",
|
|
1277
|
-
"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}"
|
|
1277
|
+
"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}"
|
|
1278
1278
|
},
|
|
1279
1279
|
{
|
|
1280
1280
|
"name": "SessionEvent",
|
|
@@ -1282,7 +1282,7 @@ export const TYPERT = {
|
|
|
1282
1282
|
},
|
|
1283
1283
|
{
|
|
1284
1284
|
"name": "SessionEventMap",
|
|
1285
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n '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}"
|
|
1285
|
+
"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}"
|
|
1286
1286
|
},
|
|
1287
1287
|
{
|
|
1288
1288
|
"name": "SessionEventType",
|
|
@@ -1973,7 +1973,7 @@ export const TYPERT = {
|
|
|
1973
1973
|
},
|
|
1974
1974
|
{
|
|
1975
1975
|
"name": "LlmCallConfig",
|
|
1976
|
-
"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}"
|
|
1976
|
+
"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}"
|
|
1977
1977
|
},
|
|
1978
1978
|
{
|
|
1979
1979
|
"name": "LlmCallConfigAdapterDefaults",
|
|
@@ -2105,7 +2105,7 @@ export const TYPERT = {
|
|
|
2105
2105
|
},
|
|
2106
2106
|
{
|
|
2107
2107
|
"name": "Session",
|
|
2108
|
-
"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}"
|
|
2108
|
+
"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}"
|
|
2109
2109
|
},
|
|
2110
2110
|
{
|
|
2111
2111
|
"name": "SessionEvent",
|
|
@@ -2113,7 +2113,7 @@ export const TYPERT = {
|
|
|
2113
2113
|
},
|
|
2114
2114
|
{
|
|
2115
2115
|
"name": "SessionEventMap",
|
|
2116
|
-
"declaration": "export interface SessionEventMap {\n 'turn/start': { turn: number; };\n 'turn/end': { turn: number; reason: TurnEndReason; };\n 'step/start': { turn: number; step: number; };\n 'step/end': { turn: number; step: number; };\n 'user/message': UserMessage;\n 'developer/message': { turn: number; step: number; message: DeveloperMessage; headerSeq?: SessionSeq; };\n 'system/message': { turn: number; step: number; message: SystemMessage; };\n 'assistant/message': { turn: number; step: number; message: AssistantMessage; stream: AssistantStreamRecord[]; usage?: TokenUsage; interrupted?: true; };\n 'assistant/attempt': { turn: number; step: number; stream: AssistantStreamRecord[]; };\n 'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n 'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; reason?: string; }; meta?: JsonValue; };\n 'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n 'request/context': RequestContext;\n 'session/end-seed': { inherited?: true; };\n 'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n 'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n 'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n 'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n 'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n 'tool/ptc-dispatch-start': PtcDispatchStartEventData;\n 'tool/ptc-dispatch': PtcDispatchEventData;\n 'agent-preset/selected': { agentPreset: string; };\n 'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n 'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: import('@deepseek-ai/dsh-session/types').SessionSeq; };\n 'image/offload': { targets: ImageOffloadTarget[]; };\n 'session/title': SessionTitleEventData;\n 'todo/write': { todos: TodoItem[]; };\n 'model/selection': ModelSelection;\n 'subagent/descriptor': SubagentDescriptorData;\n 'permission/preset': { preset: string; };\n 'subagent/catalog': SubagentCatalogEvent;\n '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}"
|
|
2116
|
+
"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}"
|
|
2117
2117
|
},
|
|
2118
2118
|
{
|
|
2119
2119
|
"name": "SessionEventType",
|