@chatcode/chatcode-cli 3.0.4-rc.1 → 3.0.4-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{command-errors-BkCHTQHj.js → command-errors-CScdshCl.js} +12 -12
- package/lib/{command-trees-5HFyC5sI.js → command-trees-Dc17MYfV.js} +2 -2
- package/lib/{component-identity-De91VHwW.js → component-identity-DFJD_d-P.js} +3 -3
- package/lib/{dist-CsDWUvQ4.js → dist-w_sIm4VD.js} +231 -231
- package/lib/{extension-events-CdYCRP0o.js → extension-events-qXmhzmHo.js} +26 -26
- package/lib/{frames-DOX-Jgk8.js → frames-B89znn_0.js} +4 -4
- package/lib/{host-access-Bk4xps5E.js → host-access-B0CRAwsX.js} +1 -1
- package/lib/{keymap-CJ1kvLR2.js → keymap-CIoVICBI.js} +2 -2
- package/lib/{plugin-XR7ncbnW.js → plugin-BKQsL2xn.js} +1638 -1363
- package/lib/{scenes-CAmWncZD.js → scenes-BRf-zMpF.js} +3 -3
- package/lib/{settings-sections-CakcvBv9.js → settings-sections-4gMhveN_.js} +3 -3
- package/lib/{statusBarSettings-BPPS_Usm.js → statusBarSettings-CnmdSHkO.js} +3 -3
- package/lib/{supports-color-DyChQwlI.js → supports-color-CcW-FGjr.js} +2 -2
- package/lib/{themes-OjcUpZzw.js → themes-Ce97Zsri.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 +4 -4
- package/lib/tui-compat-workspaces.js +1 -1
- package/lib/tui-compat.js +5 -5
- package/lib/{workspaces-XY7UdfXp.js → workspaces-1xrm-e3V.js} +2 -2
- package/package.json +29 -28
- package/runtime/manifest.json +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/index.js +118 -22
- package/runtime/node_modules/@deepseek-ai/dsh-agent-default-model/lib/types/index.d.ts +20 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/client.js +113 -39
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.d.ts +3 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-remotes/lib/types/remote-events.js +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/index.js +173 -34
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.host.js +48 -28
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/typert.remote-client.js +24 -19
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.d.ts +9 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/agent.js +36 -6
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/archived-session-gate.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/catalog.js +4 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/client/sessions/service.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/commands.js +24 -8
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.d.ts +4 -3
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/index.js +31 -14
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.d.ts +6 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/list.js +89 -4
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/remote-events.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-session-controller/lib/types/types.d.ts +18 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/client.js +30 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/index.js +83 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.host.js +104 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.d.ts +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/typert.remote-client.js +78 -11
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.d.ts +14 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/model.js +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/client/service.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/commands.js +44 -2
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.d.ts +13 -1
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/index.js +22 -0
- package/runtime/node_modules/@deepseek-ai/dsh-api-workspace-controller/lib/types/types.d.ts +17 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/client.js +931 -7
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/index.js +57 -19
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/client/index.d.ts +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/config.d.ts +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/events.d.ts +4 -4
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/lib/types/index.d.ts +3 -8
- package/runtime/node_modules/@deepseek-ai/dsh-client-hmr/package.json +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +10 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/types/client/present-open.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +8 -4
- 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-general/lib/client.js +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1917 -206
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/ArchivedSessions.d.ts +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/contract/slots.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/locales.d.ts +40 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/recent.d.ts +11 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/RecentList.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/rows/Rows.d.ts +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/session-actions/DeleteSession.d.ts +24 -0
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/stores.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/types/client/tree.d.ts +15 -13
- package/runtime/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/index.js +16 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.host.js +7 -3
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/typert.remote-client.js +6 -2
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/index.js +20 -0
- package/runtime/node_modules/@deepseek-ai/dsh-commands/lib/types/types.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-cordis-client-runner/lib/client.js +5 -2
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/index.js +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.host.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/typert.remote-client.js +5 -5
- package/runtime/node_modules/@deepseek-ai/dsh-schedule/lib/types/index.js +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session/lib/types/index.d.ts +21 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/index.js +12 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence/lib/types/index.d.ts +15 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/index.js +95 -2
- package/runtime/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/lib/types/index.d.ts +3 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/index.js +25 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/lib/types/index.d.ts +1 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/index.js +13 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query/lib/types/observation.d.ts +5 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/lib/index.js +26 -0
- package/runtime/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/index.js +5 -1
- package/runtime/node_modules/@deepseek-ai/dsh-storage-domain/lib/types/domain.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-subagent/lib/types/control.d.ts +1 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/index.js +106 -56
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/config.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/index.d.ts +2 -1
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/services/tianti/config.d.ts +4 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/lib/types/tools.d.ts +2 -2
- package/runtime/node_modules/@deepseek-ai/dsh-tianti/package.json +2 -0
- package/runtime/node_modules/@deepseek-ai/dsh-tool-cordis/lib/types/api-catalog.js +103 -12
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/index.js +215 -4
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/invariant.js +6 -1
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.d.ts +31 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/index.js +219 -2
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.d.ts +4 -0
- package/runtime/node_modules/@deepseek-ai/dsh-workspace/lib/types/spec.js +4 -0
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { statSync } from "node:fs";
|
|
2
|
+
import WebSocket, { WebSocketServer } from "ws";
|
|
2
3
|
import z from "@deepseek-ai/schemastery";
|
|
3
4
|
//#region lib/types/events.js
|
|
4
|
-
/** System
|
|
5
|
+
/** System endpoint pushing graph/rebuilt frames (wire protocol constant). */
|
|
5
6
|
const EVENTS_ENDPOINT = "/plugins/events";
|
|
6
7
|
EVENTS_ENDPOINT.slice(1);
|
|
7
8
|
//#endregion
|
|
9
|
+
//#region lib/types/config.js
|
|
10
|
+
/** Shared Host polling and browser reconnection configuration. */
|
|
11
|
+
/** Validate both halves against the same defaults. */
|
|
12
|
+
const Config = z.object({
|
|
13
|
+
pollIntervalMs: z.number().step(1).min(1).default(500),
|
|
14
|
+
reconnectDelayMs: z.number().step(1).min(1).default(1e3)
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
8
17
|
//#region lib/types/index.js
|
|
9
18
|
/**
|
|
10
19
|
* Host transport for Web client graph changes and rebuilt bundles. One interval
|
|
11
20
|
* stat-polls every graph row's client bundle (polling by design: network mounts
|
|
12
21
|
* deliver no inotify events), reports changes through
|
|
13
|
-
* `clientModules.rebuilt(id)`, and serves
|
|
22
|
+
* `clientModules.rebuilt(id)`, and serves `/plugins/events` over WebSocket
|
|
23
|
+
* (with the legacy SSE route retained)
|
|
14
24
|
* broadcasting graph/rebuilt frames to the browser half (src/client/).
|
|
15
25
|
* The Web composition mounts this transport for live graph updates;
|
|
16
26
|
* a development rebuild watcher also supplies bundle changes.
|
|
@@ -19,7 +29,6 @@ EVENTS_ENDPOINT.slice(1);
|
|
|
19
29
|
const name = "client-hmr";
|
|
20
30
|
/** Required services: the client graph and Web route registry. */
|
|
21
31
|
const inject = ["clientModules", "webServer"];
|
|
22
|
-
const Config = z.object({ pollIntervalMs: z.number().step(1).min(1).default(500) });
|
|
23
32
|
/** Serialize one frame as an SSE data line. */
|
|
24
33
|
function sseData(frame) {
|
|
25
34
|
return `data: ${JSON.stringify(frame)}\n\n`;
|
|
@@ -38,7 +47,7 @@ function sameBundleStat(left, right) {
|
|
|
38
47
|
return left.mtimeMs === right.mtimeMs && left.ctimeMs === right.ctimeMs && left.size === right.size;
|
|
39
48
|
}
|
|
40
49
|
/**
|
|
41
|
-
* Mount bundle watches and graph/rebuilt SSE
|
|
50
|
+
* Mount bundle watches and authenticated graph/rebuilt WebSocket delivery, retaining legacy SSE clients.
|
|
42
51
|
* @param ctx - host plugin context carrying clientModules and webServer.
|
|
43
52
|
* @param config - validated {@link Config}.
|
|
44
53
|
*/
|
|
@@ -114,12 +123,17 @@ function apply(ctx, config) {
|
|
|
114
123
|
};
|
|
115
124
|
}, "client-hmr: bundle watches");
|
|
116
125
|
const connections = /* @__PURE__ */ new Set();
|
|
126
|
+
let sockets;
|
|
127
|
+
const broadcast = (frame) => {
|
|
128
|
+
const json = JSON.stringify(frame);
|
|
129
|
+
for (const res of connections) res.write(`data: ${json}\n\n`);
|
|
130
|
+
for (const socket of sockets.clients) if (socket.readyState === WebSocket.OPEN) socket.send(json);
|
|
131
|
+
};
|
|
117
132
|
const publishGraph = () => {
|
|
118
|
-
|
|
133
|
+
broadcast({
|
|
119
134
|
type: "graph",
|
|
120
135
|
graph: ctx.clientModules.graph()
|
|
121
136
|
});
|
|
122
|
-
for (const res of connections) res.write(line);
|
|
123
137
|
};
|
|
124
138
|
const connect = (res) => {
|
|
125
139
|
res.writeHead(200, {
|
|
@@ -137,8 +151,40 @@ function apply(ctx, config) {
|
|
|
137
151
|
connections.delete(res);
|
|
138
152
|
});
|
|
139
153
|
};
|
|
140
|
-
ctx.effect(()
|
|
141
|
-
|
|
154
|
+
ctx.effect(function* () {
|
|
155
|
+
sockets = new WebSocketServer({ noServer: true });
|
|
156
|
+
yield async () => {
|
|
157
|
+
for (const res of connections) res.destroy();
|
|
158
|
+
connections.clear();
|
|
159
|
+
for (const socket of sockets.clients) socket.terminate();
|
|
160
|
+
await new Promise((resolve, reject) => {
|
|
161
|
+
sockets.close((error) => {
|
|
162
|
+
if (error === void 0) resolve();
|
|
163
|
+
else reject(error);
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
yield ctx.webServer.registerUpgrade({
|
|
168
|
+
path: EVENTS_ENDPOINT,
|
|
169
|
+
handler(req, socket, head) {
|
|
170
|
+
const connection = ctx.get("connection");
|
|
171
|
+
const rejection = connection === void 0 ? 403 : connection.requestRejection(req);
|
|
172
|
+
if (rejection !== void 0) {
|
|
173
|
+
socket.end(`HTTP/1.1 ${String(rejection)} Rejected\r\nConnection: close\r\nContent-Length: 0\r\n\r\n`);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
sockets.handleUpgrade(req, socket, head, (client) => {
|
|
177
|
+
client.on("error", () => {
|
|
178
|
+
client.terminate();
|
|
179
|
+
});
|
|
180
|
+
client.send(JSON.stringify({
|
|
181
|
+
type: "graph",
|
|
182
|
+
graph: ctx.clientModules.graph()
|
|
183
|
+
}));
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
yield ctx.webServer.register({
|
|
142
188
|
kind: "exact",
|
|
143
189
|
path: EVENTS_ENDPOINT,
|
|
144
190
|
handler: (req, res) => {
|
|
@@ -150,22 +196,14 @@ function apply(ctx, config) {
|
|
|
150
196
|
connect(res);
|
|
151
197
|
}
|
|
152
198
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
199
|
+
yield ctx.clientModules.onGraphChanged(publishGraph);
|
|
200
|
+
yield ctx.clientModules.onRebuilt((id, rev) => {
|
|
201
|
+
broadcast({
|
|
156
202
|
type: "rebuilt",
|
|
157
203
|
id,
|
|
158
204
|
rev
|
|
159
205
|
});
|
|
160
|
-
for (const res of connections) res.write(line);
|
|
161
206
|
});
|
|
162
|
-
return () => {
|
|
163
|
-
unsubscribeGraph();
|
|
164
|
-
unsubscribe();
|
|
165
|
-
disposeRoute();
|
|
166
|
-
for (const res of connections) res.destroy();
|
|
167
|
-
connections.clear();
|
|
168
|
-
};
|
|
169
207
|
}, "client-hmr: /plugins/events channel");
|
|
170
208
|
}
|
|
171
209
|
//#endregion
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** WebSocket transport for page-owned client entry reconciliation and rebuilt code replacement. */
|
|
2
2
|
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
import { Config } from '../config.ts';
|
|
3
4
|
export type { PluginsEventFrame } from '../events.ts';
|
|
5
|
+
export { Config } from '../config.ts';
|
|
4
6
|
/** Cordis plugin name. */
|
|
5
7
|
export declare const name = "client-hmr";
|
|
6
8
|
/** Required service: the client module system whose entry controller handles received frames. */
|
|
@@ -8,6 +10,7 @@ export declare const inject: string[];
|
|
|
8
10
|
/**
|
|
9
11
|
* Forward graph snapshots and rebuilds to the page's shared serial controller.
|
|
10
12
|
* @param ctx - Plugin context with the client module system.
|
|
13
|
+
* @param config - validated browser reconnection timing.
|
|
11
14
|
*/
|
|
12
|
-
export declare function apply(ctx: Context): void;
|
|
15
|
+
export declare function apply(ctx: Context, config: Config): void;
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Shared Host polling and browser reconnection configuration. */
|
|
2
|
+
import z from '@deepseek-ai/schemastery';
|
|
3
|
+
/** Timing controls for the plugin reload transport. */
|
|
4
|
+
export interface Config {
|
|
5
|
+
/** Bundle stat-poll interval in milliseconds. Default: 500. */
|
|
6
|
+
pollIntervalMs?: number;
|
|
7
|
+
/** Browser WebSocket reconnection delay in milliseconds. Default: 1000. */
|
|
8
|
+
reconnectDelayMs?: number;
|
|
9
|
+
}
|
|
10
|
+
/** Validate both halves against the same defaults. */
|
|
11
|
+
export declare const Config: z<Config, Required<Config>>;
|
|
12
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Wire protocol of the `/plugins/events` SSE channel — single source for
|
|
2
|
+
* Wire protocol of the `/plugins/events` WebSocket and legacy SSE channel — single source for
|
|
3
3
|
* both halves of this package. Frames still cross a wire boundary: the
|
|
4
4
|
* browser half validates them at its JSON parse point; sharing the type keeps
|
|
5
5
|
* the two ends from drifting, not from parsing.
|
|
6
6
|
*/
|
|
7
7
|
import type { WebBootGraph } from '@deepseek-ai/dsh-client-modules';
|
|
8
|
-
/** One
|
|
8
|
+
/** One JSON frame: the settled graph on connection or change, or one rebuilt bundle notice. */
|
|
9
9
|
export type PluginsEventFrame = {
|
|
10
10
|
type: 'graph';
|
|
11
11
|
graph: WebBootGraph;
|
|
@@ -30,11 +30,11 @@ export type PluginsEventParseResult = {
|
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* Validate the frame envelope; the module controller parses the complete graph before updating its index.
|
|
33
|
-
* @param value - Parsed JSON value from the
|
|
33
|
+
* @param value - Parsed JSON value from the transport message.
|
|
34
34
|
* @returns the known frame, an unknown-type marker, or an invalid marker.
|
|
35
35
|
*/
|
|
36
36
|
export declare function parsePluginsEventFrame(value: unknown): PluginsEventParseResult;
|
|
37
|
-
/** System
|
|
37
|
+
/** System endpoint pushing graph/rebuilt frames (wire protocol constant). */
|
|
38
38
|
export declare const EVENTS_ENDPOINT = "/plugins/events";
|
|
39
39
|
/**
|
|
40
40
|
* Document-relative form of {@link EVENTS_ENDPOINT} used by the browser half.
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import type { Context } from '@deepseek-ai/cordis';
|
|
2
|
-
import
|
|
2
|
+
import { Config } from './config.ts';
|
|
3
3
|
export type { PluginsEventFrame } from './events.ts';
|
|
4
4
|
export { EVENTS_ENDPOINT } from './events.ts';
|
|
5
|
+
export { Config } from './config.ts';
|
|
5
6
|
/** Cordis plugin name. */
|
|
6
7
|
export declare const name = "client-hmr";
|
|
7
8
|
/** Required services: the client graph and Web route registry. */
|
|
8
9
|
export declare const inject: string[];
|
|
9
|
-
/** Plugin config, validated by the same-named schemastery schema. */
|
|
10
|
-
export interface Config {
|
|
11
|
-
/** Bundle stat-poll interval in milliseconds (default 500, the build-side watcher's polling default). */
|
|
12
|
-
pollIntervalMs?: number;
|
|
13
|
-
}
|
|
14
|
-
export declare const Config: z<Config>;
|
|
15
10
|
/**
|
|
16
|
-
* Mount bundle watches and graph/rebuilt SSE
|
|
11
|
+
* Mount bundle watches and authenticated graph/rebuilt WebSocket delivery, retaining legacy SSE clients.
|
|
17
12
|
* @param ctx - host plugin context carrying clientModules and webServer.
|
|
18
13
|
* @param config - validated {@link Config}.
|
|
19
14
|
*/
|
|
@@ -40,12 +40,16 @@
|
|
|
40
40
|
},
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@deepseek-ai/schemastery": "workspace:~"
|
|
43
|
+
"@deepseek-ai/schemastery": "workspace:~",
|
|
44
|
+
"ws": "^8.21.0"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
|
-
"@deepseek-ai/cordis": "workspace:~"
|
|
47
|
+
"@deepseek-ai/cordis": "workspace:~",
|
|
48
|
+
"@deepseek-ai/dsh-client-connection": "workspace:*"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
51
|
+
"@deepseek-ai/dsh-client-connection": "workspace:*",
|
|
52
|
+
"@types/ws": "^8.18.1",
|
|
49
53
|
"@deepseek-ai/cordis-plugin-loader": "workspace:~",
|
|
50
54
|
"@deepseek-ai/dsh-client-modules": "workspace:*",
|
|
51
55
|
"@deepseek-ai/dsh-host-webserver": "workspace:*",
|
|
@@ -883,11 +883,21 @@ window.__ModuleLoader__.load({
|
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
const visible = rows.filter((c) => req.position === "leading" || c.hint === void 0);
|
|
886
|
+
const exact = req.position === "leading" ? this.directory.resolve(session.sessionId, req.query) : void 0;
|
|
887
|
+
if (exact?.input?.suggestions?.length) return exact.input.suggestions.map((suggestion) => ({
|
|
888
|
+
name: `${exact.name} ${suggestion.value}`,
|
|
889
|
+
description: suggestion.description,
|
|
890
|
+
value: exact.name
|
|
891
|
+
}));
|
|
886
892
|
return req.query === "" ? sectionRows(visible, this.t) : (0, _deepseek_ai_dsh_client_ui_primitives.rankByName)(visible, req.query);
|
|
887
893
|
}
|
|
888
894
|
/** Decision table, menu column: contribution/decorated-host → popup or action; host input → claim; host bare → detached execute. */
|
|
889
895
|
dispatch(pick) {
|
|
890
896
|
const name = pick.candidate.name;
|
|
897
|
+
if (pick.position === "leading" && pick.candidate.value !== void 0) {
|
|
898
|
+
const command = this.directory.resolve(pick.session.sessionId, pick.candidate.value);
|
|
899
|
+
if (command?.input?.suggestions?.find((item) => `${command.name} ${item.value}` === name) !== void 0) return { text: `/${name} ` };
|
|
900
|
+
}
|
|
891
901
|
const contribution = this.live.contributions.get(name);
|
|
892
902
|
if (contribution !== void 0 && contribution.available(pick.session)) {
|
|
893
903
|
this.invoke(name, contribution.ui, pick.session, {
|
|
@@ -13,7 +13,7 @@ export declare class PresentedOpenController {
|
|
|
13
13
|
/** File action URLs key the state across Sessions, turns, and both clickable surfaces. */
|
|
14
14
|
readonly state: import("@deepseek-ai/dsh-client-store").SnapshotStore<Record<string, PresentedOpenPhase | undefined>>;
|
|
15
15
|
/** Native destination metadata, or a retryable read failure. */
|
|
16
|
-
readonly host: import("@deepseek-ai/dsh-client-store").SnapshotStore<"error" |
|
|
16
|
+
readonly host: import("@deepseek-ai/dsh-client-store").SnapshotStore<PresentedHost | "error" | null>;
|
|
17
17
|
private readonly expiry;
|
|
18
18
|
private loading;
|
|
19
19
|
private metadata;
|
|
@@ -252,6 +252,7 @@ window.__ModuleLoader__.load({
|
|
|
252
252
|
});
|
|
253
253
|
return result;
|
|
254
254
|
}
|
|
255
|
+
if (this.catalog.store.getSnapshot().value?.selectionScope === "process") this.catalog.refresh();
|
|
255
256
|
this.store.update((s) => {
|
|
256
257
|
s.status = "ready";
|
|
257
258
|
s.pending = null;
|
|
@@ -289,7 +290,7 @@ window.__ModuleLoader__.load({
|
|
|
289
290
|
if (this.disposed) return;
|
|
290
291
|
const catalog = this.catalog.store.getSnapshot();
|
|
291
292
|
const projected = modelSelectionProjection(this.projected.getSnapshot());
|
|
292
|
-
const intended = projected?.next ?? catalog.value?.default;
|
|
293
|
+
const intended = catalog.value?.selectionScope === "process" ? catalog.value.default : projected?.next ?? catalog.value?.default;
|
|
293
294
|
const reasoning = intended === void 0 ? void 0 : this.catalog.reasoningFor(intended);
|
|
294
295
|
const effort = intended?.reasoningEffort ?? reasoning?.defaultEffort;
|
|
295
296
|
const retainedEffort = effort === void 0 ? void 0 : reasoning?.efforts.find((level) => level.id === effort)?.name ?? effort;
|
|
@@ -307,10 +308,10 @@ window.__ModuleLoader__.load({
|
|
|
307
308
|
});
|
|
308
309
|
return;
|
|
309
310
|
}
|
|
310
|
-
const selection =
|
|
311
|
+
const selection = intended ?? catalog.value.default;
|
|
311
312
|
const routable = catalog.value.groups.some((group) => group.id === selection.provider && group.models.some((model) => model.id === selection.model));
|
|
312
313
|
this.store.set({
|
|
313
|
-
current: selection,
|
|
314
|
+
current: selection.provider === "" || selection.model === "" ? null : selection,
|
|
314
315
|
...catalog.value.savedDisplayName === void 0 ? {} : { savedDisplayName: catalog.value.savedDisplayName },
|
|
315
316
|
...retainedEffort === void 0 ? {} : { retainedEffort },
|
|
316
317
|
routable,
|
|
@@ -364,6 +365,9 @@ window.__ModuleLoader__.load({
|
|
|
364
365
|
ctx.remote.$on("llm/adapters-updated", () => {
|
|
365
366
|
this.catalog.refresh();
|
|
366
367
|
});
|
|
368
|
+
ctx.remote.$on("api-session/model-updated", () => {
|
|
369
|
+
this.catalog.refresh();
|
|
370
|
+
});
|
|
367
371
|
ctx.remote.$on("settings/document-updated", () => {
|
|
368
372
|
this.catalog.refresh();
|
|
369
373
|
});
|
|
@@ -706,7 +710,7 @@ window.__ModuleLoader__.load({
|
|
|
706
710
|
};
|
|
707
711
|
const choose = (selection) => {
|
|
708
712
|
if (state.current?.provider === selection.provider && state.current.model === selection.model) {
|
|
709
|
-
|
|
713
|
+
submit({ ...state.current });
|
|
710
714
|
return;
|
|
711
715
|
}
|
|
712
716
|
submit(selection);
|
|
@@ -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.4-rc.
|
|
4128
|
+
const client = () => accountClientMetadata(ctx.locale.getSnapshot().active, "3.0.4-rc.2");
|
|
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.4-rc.
|
|
4259
|
+
version: "3.0.4-rc.2",
|
|
4260
4260
|
locale: ctx.locale.getSnapshot().active === "zh" ? "zh-CN" : "en",
|
|
4261
4261
|
width: window.screen.width,
|
|
4262
4262
|
height: window.screen.height,
|
|
@@ -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.4-rc.
|
|
660
|
+
children: t("general.currentVersion", { version: "3.0.4-rc.2" })
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
@@ -167,7 +167,9 @@ 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
|
-
|
|
170
|
+
const commit = "4d610ce";
|
|
171
|
+
const dirty = {}.CHATCODE_CLI_CLIENT_GIT_DIRTY ?? {}["DSH_CLIENT_GIT_DIRTY"];
|
|
172
|
+
return `3.0.4-rc.2-${commit}` + (dirty === "true" ? "-dirty" : "");
|
|
171
173
|
}
|
|
172
174
|
/** Each panel row subscribes only to its own selection state. */
|
|
173
175
|
function PanelRow({ id, label, wide, usePanelInfo, selectPanel, renderSlot }) {
|