@deepseek-insight/dsi 0.10.2 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +49 -5
  2. package/bin/dsi-chassis.mjs +371 -0
  3. package/bin/dsi.mjs +43 -15
  4. package/bin/lib/plugin-chain.mjs +6 -5
  5. package/build/client/_app/immutable/assets/0.Bjw4vcZl.css +2 -0
  6. package/build/client/_app/immutable/chunks/{D17XAauH.js → CgYTrsc7.js} +2 -2
  7. package/build/client/_app/immutable/chunks/DAVs74W8.js +1 -0
  8. package/build/client/_app/immutable/chunks/{BodLd2is.js → DxK-AwFF.js} +1 -1
  9. package/build/client/_app/immutable/chunks/EyZgnsOk.js +1 -0
  10. package/build/client/_app/immutable/entry/{app.ClaEF2lH.js → app.BrbZICAs.js} +2 -2
  11. package/build/client/_app/immutable/entry/start.D0ra5p5U.js +1 -0
  12. package/build/client/_app/immutable/nodes/{1.CSTMQTZ7.js → 1.BpeytF2X.js} +1 -1
  13. package/build/client/_app/immutable/nodes/{2.CdbJFHUF.js → 2.BeOldRUA.js} +3 -3
  14. package/build/client/_app/version.json +1 -1
  15. package/build/handler.js +4 -4
  16. package/build/index.js +4 -4
  17. package/build/server/chunks/chunks/{internal2.js-XxZ8wzRE.js → internal2.js-BmeTE2qk.js} +2 -2
  18. package/build/server/chunks/chunks/{registry.js-ClhrzR6O.js → registry.js-Cnmd1vW3.js} +196 -21
  19. package/build/server/chunks/chunks/{state.js-D5zsYmjz.js → state.js-D-A2xekV.js} +2 -2
  20. package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-B-Ns5pyR.js → _server.ts.js-DlbbO3RF.js} +2 -2
  21. package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-CzXe-sTr.js → _server.ts.js-B85bLw4w.js} +2 -2
  22. package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-Ct465_rt.js → _server.ts.js-Dt5Bxv2-.js} +2 -2
  23. package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-6mdytkvM.js → _server.ts.js-uJ5BnGUA.js} +2 -2
  24. package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-BwUPVQGx.js → _server.ts.js-CVCoWk2n.js} +2 -2
  25. package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-8Nq3JxSo.js → _server.ts.js-CmhQ7zGO.js} +2 -2
  26. package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-B9eKtj1-.js → _server.ts.js-CFtpmSCd.js} +2 -2
  27. package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-CHJs9Qbl.js → _server.ts.js-BH8MNt9W.js} +2 -2
  28. package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-B32Ow0Y2.js → _server.ts.js-uIrK0T8h.js} +2 -2
  29. package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-Cpv4BolN.js → _server.ts.js-Bg5yHS9F.js} +2 -2
  30. package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-DJqJImSI.js → _server.ts.js-DG6xvUsm.js} +2 -2
  31. package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-Bm6IAZF6.js → _server.ts.js-RiXP45mV.js} +2 -2
  32. package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-B1VVzfCk.js → _server.ts.js-w9MNQddQ.js} +2 -2
  33. package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-CoUpqHeq.js → _server.ts.js-BoXDoshV.js} +2 -2
  34. package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-D9hK0CG8.js → _server.ts.js-pQmJm_Io.js} +2 -2
  35. package/build/server/chunks/entries/pages/{_error.svelte.js-TrOSxb0e.js → _error.svelte.js-CL7qPUQ1.js} +3 -3
  36. package/build/server/chunks/entries/pages/{_page.svelte.js-BUuXoaje.js → _page.svelte.js-nXReJwZQ.js} +4 -4
  37. package/build/server/chunks/{handler-BOqY82LA.js → handler-DiVCAgmr.js} +3 -3
  38. package/build/server/chunks/{index.js-M1GginY2.js → index.js-DW6Zd84U.js} +2 -2
  39. package/build/server/chunks/{manifest.js-BEmwisii.js → manifest.js-DXLiUOif.js} +20 -20
  40. package/build/server/chunks/nodes/{0.js-Do4ZKaKe.js → 0.js-B8ciwPSu.js} +3 -3
  41. package/build/server/chunks/nodes/1.js-BX_MW_nG.js +9 -0
  42. package/build/server/chunks/nodes/{2.js-BFX_zPfJ.js → 2.js-darOh5z6.js} +3 -3
  43. package/package.json +1 -1
  44. package/skills/dsi-host-drive/SKILL.md +96 -0
  45. package/template/.dsi/prompts.sqlite +0 -0
  46. package/template/.dsi/prompts.sqlite-shm +0 -0
  47. package/template/.dsi/prompts.sqlite-wal +0 -0
  48. package/build/client/_app/immutable/assets/0.B2rul4Mk.css +0 -2
  49. package/build/client/_app/immutable/chunks/Cy4hfhN-.js +0 -1
  50. package/build/client/_app/immutable/chunks/FY34R_78.js +0 -1
  51. package/build/client/_app/immutable/entry/start.CU6iOT39.js +0 -1
  52. package/build/server/chunks/nodes/1.js-CRbdbfof.js +0 -9
  53. /package/build/client/_app/immutable/nodes/{0.CYP0vr1_.js → 0.DopnsZUT.js} +0 -0
@@ -1 +1 @@
1
- {"version":"1794104267615"}
1
+ {"version":"1794157304351"}
package/build/handler.js CHANGED
@@ -2,9 +2,9 @@ import './shims.js';
2
2
  import 'node:fs';
3
3
  import 'node:path';
4
4
  import 'node:process';
5
- export { h as handler } from './server/chunks/handler-BOqY82LA.js';
6
- import './server/chunks/index.js-M1GginY2.js';
7
- import './server/chunks/manifest.js-BEmwisii.js';
5
+ export { h as handler } from './server/chunks/handler-DiVCAgmr.js';
6
+ import './server/chunks/index.js-DW6Zd84U.js';
7
+ import './server/chunks/manifest.js-DXLiUOif.js';
8
8
  import './env.js';
9
9
  import 'node:buffer';
10
10
  import 'node:crypto';
@@ -19,6 +19,6 @@ import 'node:url';
19
19
  import './server/chunks/chunks/index-server.js-CPkVoRxB.js';
20
20
  import './server/chunks/chunks/server.js-Dijo7DtV.js';
21
21
  import './server/chunks/chunks/internal.js-BcS47nI-.js';
22
- import './server/chunks/chunks/internal2.js-XxZ8wzRE.js';
22
+ import './server/chunks/chunks/internal2.js-BmeTE2qk.js';
23
23
  import './server/chunks/chunks/exports.js-D5zA1U7A.js';
24
24
  //# sourceMappingURL=handler.js.map
package/build/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import http from 'node:http';
2
2
  import fs__default from 'node:fs';
3
3
  import process from 'node:process';
4
- import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-BOqY82LA.js';
4
+ import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-DiVCAgmr.js';
5
5
  import { env, timeout_env } from './env.js';
6
6
  import { rm } from 'node:fs/promises';
7
7
  import './shims.js';
@@ -14,13 +14,13 @@ import 'node:stream';
14
14
  import './server/chunks/chunks/shared.js-HQ0rfhm4.js';
15
15
  import './server/chunks/chunks/uneval.js-BJ9Qq2SF.js';
16
16
  import './server/chunks/chunks/utils.js-CAdNO8Tu.js';
17
- import './server/chunks/index.js-M1GginY2.js';
17
+ import './server/chunks/index.js-DW6Zd84U.js';
18
18
  import './server/chunks/chunks/index-server.js-CPkVoRxB.js';
19
19
  import './server/chunks/chunks/server.js-Dijo7DtV.js';
20
20
  import './server/chunks/chunks/internal.js-BcS47nI-.js';
21
- import './server/chunks/chunks/internal2.js-XxZ8wzRE.js';
21
+ import './server/chunks/chunks/internal2.js-BmeTE2qk.js';
22
22
  import './server/chunks/chunks/exports.js-D5zA1U7A.js';
23
- import './server/chunks/manifest.js-BEmwisii.js';
23
+ import './server/chunks/manifest.js-DXLiUOif.js';
24
24
  import 'node:url';
25
25
 
26
26
  const path = env('SOCKET_PATH', false);
@@ -580,7 +580,7 @@ var options = {
580
580
  app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"%paraglide.locale%\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <script>\n /* The Three-State Lamp pre-paint (ADR-0023 D3, 2026-10-11): resolve\n * the choice and set html[data-theme] BEFORE the bundle paints —\n * no flash of light on a dark reload. The key 'dsi-theme' is\n * pinned identical to src/lib/utils/theme-prefs.svelte.ts by\n * tests/unit/theme-prefs.test.ts; change both together. */\n try {\n var m = location.search.match(/[?&]profile=([^&]*)/);\n var prof = m ? m[1].replace(/[^A-Za-z0-9_-]/g, '').slice(0, 40) : '';\n var k = 'dsi-theme' + (prof ? '_' + prof : '');\n var t = localStorage.getItem(k);\n if (t !== 'light' && t !== 'dark' && t !== 'system') t = 'system';\n document.documentElement.dataset.theme =\n t === 'dark' || (t === 'system' && window.matchMedia && matchMedia('(prefers-color-scheme: dark)').matches)\n ? 'dark'\n : 'light';\n } catch (e) {\n document.documentElement.dataset.theme = 'light';\n }\n <\/script>\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"tap\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
581
581
  error: error_template_default
582
582
  },
583
- version_hash: "1uhloe2"
583
+ version_hash: "15fhu59"
584
584
  };
585
585
  async function get_hooks() {
586
586
  let handle;
@@ -603,4 +603,4 @@ async function get_hooks() {
603
603
  }
604
604
 
605
605
  export { set_public_env as a, set_read_implementation as b, get_hooks as g, options as o, public_env as p, read_implementation as r, set_private_env as s };
606
- //# sourceMappingURL=internal2.js-XxZ8wzRE.js.map
606
+ //# sourceMappingURL=internal2.js-BmeTE2qk.js.map
@@ -1,10 +1,54 @@
1
1
  import { d as readBrowserConfig } from './insight-config.js-ylYA2CXm.js';
2
- import { mkdirSync, writeFileSync, rmSync, readdirSync, readFileSync } from 'node:fs';
2
+ import { mkdirSync, rmSync, writeFileSync, readdirSync, readFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { spawn, spawnSync } from 'node:child_process';
5
5
  import { randomUUID } from 'node:crypto';
6
6
  import { chromium } from 'playwright-core';
7
7
 
8
+ //#region src/lib/server/browser/chassis-shared.ts
9
+ /**
10
+ * Glass Chassis SHARED birth rules (ADR-0054 D3 / spec 2026-11-08 Glass
11
+ * Chassis Remote CDP task 1.2): the ONE copy of the rules of birth —
12
+ * disposable-profile dir naming, the owner marker, and the pid-of-port
13
+ * probe. Imported by BOTH registry.ts (local births) and bin/dsi-chassis.mjs
14
+ * (the host companion births) so the machine boundary never forks the
15
+ * house rules. Plain typed ESM over node: builtins only — the companion
16
+ * is executed by plain `node`, which strips these types natively
17
+ * (Node >= 23.6), so no build step sits between the two consumers.
18
+ */
19
+ /** The owner marker file name (fix 2026-11-05): written into every
20
+ * profile dir so a sibling process's boot sweep can tell a LIVE session
21
+ * from an orphan (registry.foreignLiveOwner). */
22
+ var OWNER_MARKER = ".dsi-owner.json";
23
+ /** The disposable profile dir for session id `id` under the root: the
24
+ * first 8 id chars, exactly the naming registry.open() has always used —
25
+ * a host-born glass and a local one are indistinguishable by name. */
26
+ function disposableProfilePath(profileRoot, id) {
27
+ return join(profileRoot, id.slice(0, 8));
28
+ }
29
+ /** Write the owner marker (best-effort): lets the creating process's pid
30
+ * be seen across processes. A failed write must never fail the open —
31
+ * a missing marker just sweeps like any legacy leftover. */
32
+ function writeOwnerMarker(profileDir, pid = process.pid) {
33
+ try {
34
+ writeFileSync(join(profileDir, OWNER_MARKER), JSON.stringify({
35
+ pid,
36
+ at: Date.now()
37
+ }));
38
+ } catch {}
39
+ }
40
+ /** The pid holding a LISTENING tcp port (lsof), or null — the same probe
41
+ * registry.open() uses to recover the browser pid persistent contexts do
42
+ * not expose, and the companion uses to report its births. */
43
+ function pidOfPort(port) {
44
+ const p = spawnSync("lsof", [
45
+ "-ti",
46
+ "tcp:" + port,
47
+ "-sTCP:LISTEN"
48
+ ], { stdio: "pipe" });
49
+ return p.status === 0 ? Number(p.stdout.toString().trim().split("\n")[0]) : null;
50
+ }
51
+ //#endregion
8
52
  //#region src/lib/server/browser/relay.ts
9
53
  var RelayClosedError = class extends Error {
10
54
  constructor() {
@@ -156,7 +200,7 @@ var BrowserRelay = class {
156
200
  if (cdp && this.started) cdp.send("Page.stopScreencast").catch(() => void 0);
157
201
  }
158
202
  };
159
- Number(process.env.DSI_MCP_PORT ?? 9515);
203
+ Number(process.env.GLASS_PORT ?? 9515);
160
204
  /** Layout-scale zoom (ADR-0041 amendment, 2026-10-31): the zoom knob is
161
205
  * LAYOUT SCALE — the emulated viewport is the panel box divided by the
162
206
  * zoom, and the mirror's contain-fit does the visual shrinking. The page
@@ -311,8 +355,9 @@ function state() {
311
355
  /** Boot-time sweep of profile dirs left by sessions that died without a
312
356
  * close (crash, kill -9, reaper miss). keep = prefixes of LIVE entries —
313
357
  * a module hot reload re-runs state() init against a process-global map
314
- * that may hold live sessions, and this sweep must never delete one. */
315
- var OWNER_MARKER = ".dsi-owner.json";
358
+ * that may hold live sessions, and this sweep must never delete one.
359
+ * OWNER_MARKER lives in ./chassis-shared.js (task 1.2, one copy of the
360
+ * birth rules shared with the chassis companion). */
316
361
  /** Fix 2026-11-05 (browser-proxy-verbs profile-dir flake): every profile dir
317
362
  * open() creates carries an OWNER MARKER (the creating process's pid). Under
318
363
  * vitest, parallel workers boot at staggered times and an empty keep-set
@@ -511,14 +556,6 @@ var listen = (server, port) => new Promise((res, rej) => {
511
556
  server.once("listening", onListen);
512
557
  server.listen(port, "127.0.0.1");
513
558
  });
514
- function pidOfPort(port) {
515
- const p = spawnSync("lsof", [
516
- "-ti",
517
- "tcp:" + port,
518
- "-sTCP:LISTEN"
519
- ], { stdio: "pipe" });
520
- return p.status === 0 ? Number(p.stdout.toString().trim().split("\n")[0]) : null;
521
- }
522
559
  function portFree(port) {
523
560
  return spawnSync("lsof", [
524
561
  "-ti",
@@ -858,17 +895,14 @@ var BrowserRegistry = class {
858
895
  }
859
896
  async open(options = {}) {
860
897
  const cfg = readBrowserConfig();
898
+ const chassisUrl = process.env.GLASS_CHASSIS_URL;
899
+ if (chassisUrl) return this.openViaChassis(chassisUrl, options, cfg);
861
900
  const id = randomUUID();
862
901
  const port = freePort(options.port);
863
902
  const headless = options.headedOpen ? false : options.headless ?? cfg.headless;
864
- const profileDir = join(cfg.profileRoot, id.slice(0, 8));
903
+ const profileDir = disposableProfilePath(cfg.profileRoot, id);
865
904
  mkdirSync(profileDir, { recursive: true });
866
- try {
867
- writeFileSync(join(profileDir, OWNER_MARKER), JSON.stringify({
868
- pid: process.pid,
869
- at: Date.now()
870
- }));
871
- } catch {}
905
+ writeOwnerMarker(profileDir);
872
906
  const ignoreDefaultArgs = [
873
907
  "--enable-automation",
874
908
  "--mute-audio",
@@ -962,7 +996,7 @@ var BrowserRegistry = class {
962
996
  }).catch(() => null) === 0) throw new Error("glass scrollbar gate: bar footprint is 0 in a headless launch — --hide-scrollbars leaked past ignoreDefaultArgs (RCA 2026-10-28)");
963
997
  }
964
998
  }
965
- const brainPort = Number(process.env.DSI_MCP_PORT ?? cfg.brainPort);
999
+ const brainPort = Number(process.env.GLASS_PORT ?? cfg.brainPort);
966
1000
  if (cfg.enabled) this.ensureReaper(cfg.idleMs);
967
1001
  const entry = {
968
1002
  id,
@@ -1081,6 +1115,138 @@ var BrowserRegistry = class {
1081
1115
  mcpError: entry.mcpError
1082
1116
  };
1083
1117
  }
1118
+ /**
1119
+ * ADR-0054 D2 — the chassis branch of open(): the glass is born on the
1120
+ * machine the stamp names. The companion enforces the birth rules on the
1121
+ * host side (disposable profile, one owner, writer-held); this side
1122
+ * attaches the SAME relay/screencast the local branch uses, so the
1123
+ * panel, tabs, zoom and stream modules move unchanged. Failures are
1124
+ * HONEST: an unreachable or refusing chassis throws a message naming
1125
+ * the chassis — never a silent local fallback (the operator stamped a
1126
+ * topology; hiding it would lie about where their glass lives).
1127
+ */
1128
+ async openViaChassis(chassisUrl, options, cfg) {
1129
+ const base = chassisUrl.replace(/\/+$/, "");
1130
+ let res;
1131
+ try {
1132
+ res = await fetch(base + "/open", {
1133
+ method: "POST",
1134
+ headers: { "content-type": "application/json" },
1135
+ body: JSON.stringify({
1136
+ width: options.width,
1137
+ height: options.height,
1138
+ ownerSessionId: options.ownerSessionId,
1139
+ headless: options.headedOpen ? false : options.headless ?? cfg.headless
1140
+ })
1141
+ });
1142
+ } catch (cause) {
1143
+ throw new Error("glass chassis unreachable at " + chassisUrl + ": " + (cause instanceof Error ? cause.message : String(cause)) + " — the floor is chassis-stamped, so no local birth was attempted (ADR-0054)");
1144
+ }
1145
+ if (!res.ok) {
1146
+ const body = await res.json().catch(() => null);
1147
+ throw new Error("glass chassis (" + chassisUrl + ") refused open: " + res.status + (body?.message ? " — " + body.message : ""));
1148
+ }
1149
+ const remote = await res.json();
1150
+ const id = remote.id;
1151
+ const browser = await chromium.connectOverCDP(remote.cdpTarget);
1152
+ const context = browser.contexts()[0] ?? await browser.newContext();
1153
+ const page = context.pages()[0] ?? await context.newPage();
1154
+ const cdp = await context.newCDPSession(page);
1155
+ if (options.headedOpen !== true) try {
1156
+ await cdp.send("Emulation.setDeviceMetricsOverride", {
1157
+ width: Math.max(200, Math.min(1920, options.width ?? 730)),
1158
+ height: Math.max(120, Math.min(1080, options.height ?? 830)),
1159
+ deviceScaleFactor: 1,
1160
+ mobile: false
1161
+ });
1162
+ } catch {}
1163
+ const relay = new BrowserRelay(cdp, cfg.screencastQuality, cfg.screencastMaxFps);
1164
+ const tabs = /* @__PURE__ */ new Map();
1165
+ let activeTargetId = null;
1166
+ try {
1167
+ activeTargetId = (await cdp.send("Target.getTargetInfo")).targetInfo?.targetId ?? null;
1168
+ } catch {}
1169
+ const tabIds = /* @__PURE__ */ new Map();
1170
+ let nextTabId = 1;
1171
+ if (activeTargetId) {
1172
+ tabIds.set(1, activeTargetId);
1173
+ nextTabId = 2;
1174
+ tabs.set(activeTargetId, {
1175
+ targetId: activeTargetId,
1176
+ tabId: 1,
1177
+ cdp,
1178
+ relay,
1179
+ page
1180
+ });
1181
+ }
1182
+ await relay.start().catch(() => void 0);
1183
+ const start = options.url ?? "data:text/html,<title>Glass Browser</title><body style=\"font-family:system-ui;color:gray;display:grid;place-items:center;height:100vh;margin:0\">Glass Browser — waiting for the agent</body>";
1184
+ await cdp.send("Page.enable").catch(() => void 0);
1185
+ await cdp.send("Page.navigate", { url: start }).catch(() => void 0);
1186
+ await new Promise((r) => setTimeout(r, 600));
1187
+ if (relay.latestFrame() === null) for (let i = 0; i < 10 && relay.latestFrame() === null; i += 1) await new Promise((r) => setTimeout(r, 100));
1188
+ if (relay.latestFrame() === null) {
1189
+ const shot = await cdp.send("Page.captureScreenshot", {
1190
+ format: "jpeg",
1191
+ quality: cfg.screencastQuality
1192
+ }).catch(() => null);
1193
+ if (shot) relay.seed({
1194
+ seq: 0,
1195
+ jpeg: shot.data,
1196
+ metadata: { seeded: true }
1197
+ });
1198
+ }
1199
+ if (cfg.enabled) this.ensureReaper(cfg.idleMs);
1200
+ const port = Number(new URL(remote.cdpTarget).port) || 0;
1201
+ const entry = {
1202
+ id,
1203
+ context,
1204
+ tabs,
1205
+ activeTargetId,
1206
+ tabOrder: activeTargetId ? [activeTargetId] : [],
1207
+ tabIds,
1208
+ nextTabId,
1209
+ viewport: {
1210
+ width: Math.max(200, Math.min(1920, options.width ?? 730)),
1211
+ height: Math.max(120, Math.min(1080, options.height ?? 830))
1212
+ },
1213
+ zoom: cfg.contentZoom,
1214
+ headless: options.headedOpen !== true,
1215
+ headedOpen: options.headedOpen === true,
1216
+ port,
1217
+ pid: remote.pid ?? null,
1218
+ profileDir: remote.profileDir,
1219
+ brainPort: Number(process.env.GLASS_PORT ?? cfg.brainPort),
1220
+ streamSubscribers: 0,
1221
+ lastMcpActivity: Date.now(),
1222
+ mcpChild: null,
1223
+ mcpInProcess: null,
1224
+ mcpHealth: "down",
1225
+ mcpError: "glass born on the chassis machine — the local brain does not attach across the bridge (ADR-0054)",
1226
+ closed: false,
1227
+ ownerSessionId: options.ownerSessionId ?? null,
1228
+ ownBirths: /* @__PURE__ */ new Set(),
1229
+ chassisUrl,
1230
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
1231
+ };
1232
+ state().entries.set(id, entry);
1233
+ await this.applyPanelViewport(entry, {
1234
+ cdp,
1235
+ relay
1236
+ }).catch(() => void 0);
1237
+ return {
1238
+ id,
1239
+ port,
1240
+ pid: entry.pid,
1241
+ profileDir: entry.profileDir,
1242
+ createdAt: entry.createdAt,
1243
+ headedOpen: true,
1244
+ ownerSessionId: entry.ownerSessionId,
1245
+ mcp: "none",
1246
+ mcpHealth: entry.mcpHealth,
1247
+ mcpError: entry.mcpError
1248
+ };
1249
+ }
1084
1250
  /** Wave 3 (3.1) owns the real arg matrix; Wave 1 wires the spawn so close
1085
1251
  * ordering (mcp child → cdp → browser) is pinned from day one. */
1086
1252
  spawnMcpChild(entry, mcpPin) {
@@ -1155,6 +1321,15 @@ var BrowserRegistry = class {
1155
1321
  } catch (e) {
1156
1322
  errs.push(e);
1157
1323
  }
1324
+ if (entry.chassisUrl) try {
1325
+ await fetch(entry.chassisUrl.replace(/\/+$/, "") + "/close", {
1326
+ method: "POST",
1327
+ headers: { "content-type": "application/json" },
1328
+ body: JSON.stringify({ id: entry.id })
1329
+ });
1330
+ } catch (e) {
1331
+ errs.push(e);
1332
+ }
1158
1333
  try {
1159
1334
  const disposableRoot = readBrowserConfig().profileRoot;
1160
1335
  if (entry.profileDir.startsWith(disposableRoot)) rmSync(entry.profileDir, {
@@ -1787,4 +1962,4 @@ var BrowserRegistry = class {
1787
1962
  var browserRegistry = new BrowserRegistry();
1788
1963
 
1789
1964
  export { BrowserRegistryRefusal as B, browserRegistry as b, clampZoom as c };
1790
- //# sourceMappingURL=registry.js-ClhrzR6O.js.map
1965
+ //# sourceMappingURL=registry.js-Cnmd1vW3.js.map
@@ -1,6 +1,6 @@
1
1
  import { i as index_server_exports } from './index-server.js-CPkVoRxB.js';
2
2
  import './shared.js-HQ0rfhm4.js';
3
- import './internal2.js-XxZ8wzRE.js';
3
+ import './internal2.js-BmeTE2qk.js';
4
4
  import './exports.js-D5zA1U7A.js';
5
5
  import { U as snapshot, g as getContext, n as noop } from './server.js-Dijo7DtV.js';
6
6
  import { U as UI_LOCALES } from './config.js-r_jw_bQQ.js';
@@ -304,4 +304,4 @@ var page = {
304
304
  };
305
305
 
306
306
  export { afterNavigate as a, backtoworkspace2 as b, currentLocale as c, dshunreachable1 as d, replaceState as e, page as p, reapednote1 as r, sessionnotfound2 as s, t, unexpectederror1 as u };
307
- //# sourceMappingURL=state.js-D5zsYmjz.js.map
307
+ //# sourceMappingURL=state.js-D-A2xekV.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -42,4 +42,4 @@ var POST = async (ctx) => {
42
42
  };
43
43
 
44
44
  export { POST };
45
- //# sourceMappingURL=_server.ts.js-B-Ns5pyR.js.map
45
+ //# sourceMappingURL=_server.ts.js-DlbbO3RF.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -29,4 +29,4 @@ var POST = async (ctx) => {
29
29
  };
30
30
 
31
31
  export { POST };
32
- //# sourceMappingURL=_server.ts.js-CzXe-sTr.js.map
32
+ //# sourceMappingURL=_server.ts.js-B85bLw4w.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -48,4 +48,4 @@ var POST = async (ctx) => {
48
48
  };
49
49
 
50
50
  export { POST };
51
- //# sourceMappingURL=_server.ts.js-Ct465_rt.js.map
51
+ //# sourceMappingURL=_server.ts.js-Dt5Bxv2-.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -40,4 +40,4 @@ var POST = async (ctx) => {
40
40
  };
41
41
 
42
42
  export { POST };
43
- //# sourceMappingURL=_server.ts.js-6mdytkvM.js.map
43
+ //# sourceMappingURL=_server.ts.js-uJ5BnGUA.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -58,4 +58,4 @@ var POST = async (ctx) => {
58
58
  };
59
59
 
60
60
  export { GET, POST };
61
- //# sourceMappingURL=_server.ts.js-BwUPVQGx.js.map
61
+ //# sourceMappingURL=_server.ts.js-CVCoWk2n.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -76,4 +76,4 @@ var POST = async (ctx) => {
76
76
  };
77
77
 
78
78
  export { POST };
79
- //# sourceMappingURL=_server.ts.js-8Nq3JxSo.js.map
79
+ //# sourceMappingURL=_server.ts.js-CmhQ7zGO.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -47,4 +47,4 @@ var GET = (ctx) => {
47
47
  };
48
48
 
49
49
  export { GET };
50
- //# sourceMappingURL=_server.ts.js-B9eKtj1-.js.map
50
+ //# sourceMappingURL=_server.ts.js-CFtpmSCd.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -63,4 +63,4 @@ var POST = async (ctx) => {
63
63
  };
64
64
 
65
65
  export { POST };
66
- //# sourceMappingURL=_server.ts.js-CHJs9Qbl.js.map
66
+ //# sourceMappingURL=_server.ts.js-BH8MNt9W.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -44,4 +44,4 @@ var POST = async (ctx) => {
44
44
  };
45
45
 
46
46
  export { POST };
47
- //# sourceMappingURL=_server.ts.js-B32Ow0Y2.js.map
47
+ //# sourceMappingURL=_server.ts.js-uIrK0T8h.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -31,4 +31,4 @@ var GET = async (ctx) => {
31
31
  };
32
32
 
33
33
  export { GET };
34
- //# sourceMappingURL=_server.ts.js-Cpv4BolN.js.map
34
+ //# sourceMappingURL=_server.ts.js-Bg5yHS9F.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -100,4 +100,4 @@ var GET = (ctx) => {
100
100
  };
101
101
 
102
102
  export { GET };
103
- //# sourceMappingURL=_server.ts.js-DJqJImSI.js.map
103
+ //# sourceMappingURL=_server.ts.js-DG6xvUsm.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -31,4 +31,4 @@ var GET = async (ctx) => {
31
31
  };
32
32
 
33
33
  export { GET };
34
- //# sourceMappingURL=_server.ts.js-Bm6IAZF6.js.map
34
+ //# sourceMappingURL=_server.ts.js-RiXP45mV.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
@@ -41,4 +41,4 @@ var POST = async (ctx) => {
41
41
  };
42
42
 
43
43
  export { POST };
44
- //# sourceMappingURL=_server.ts.js-B1VVzfCk.js.map
44
+ //# sourceMappingURL=_server.ts.js-w9MNQddQ.js.map
@@ -1,5 +1,5 @@
1
1
  import { d as readBrowserConfig } from '../../../../../../chunks/insight-config.js-ylYA2CXm.js';
2
- import { b as browserRegistry, c as clampZoom, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-ClhrzR6O.js';
2
+ import { b as browserRegistry, c as clampZoom, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-Cnmd1vW3.js';
3
3
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../../chunks/config.js-r_jw_bQQ.js';
5
5
  import '../../../../../../chunks/settings-document.js-BIxaivJ1.js';
@@ -59,4 +59,4 @@ var GET = async (ctx) => {
59
59
  };
60
60
 
61
61
  export { GET, POST };
62
- //# sourceMappingURL=_server.ts.js-CoUpqHeq.js.map
62
+ //# sourceMappingURL=_server.ts.js-BoXDoshV.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../chunks/registry.js-ClhrzR6O.js';
1
+ import { b as browserRegistry } from '../../../../chunks/registry.js-Cnmd1vW3.js';
2
2
  import { j as json } from '../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../chunks/insight-config.js-ylYA2CXm.js';
4
4
  import '../../../../chunks/config.js-r_jw_bQQ.js';
@@ -50,4 +50,4 @@ var POST = async (event) => {
50
50
  };
51
51
 
52
52
  export { GET, POST };
53
- //# sourceMappingURL=_server.ts.js-D9hK0CG8.js.map
53
+ //# sourceMappingURL=_server.ts.js-pQmJm_Io.js.map
@@ -1,9 +1,9 @@
1
1
  import { V as head, W as escape_html, M as derived } from '../../chunks/server.js-Dijo7DtV.js';
2
- import { t, p as page, s as sessionnotfound2, r as reapednote1, d as dshunreachable1, u as unexpectederror1, b as backtoworkspace2 } from '../../chunks/state.js-D5zsYmjz.js';
2
+ import { t, p as page, s as sessionnotfound2, r as reapednote1, d as dshunreachable1, u as unexpectederror1, b as backtoworkspace2 } from '../../chunks/state.js-D-A2xekV.js';
3
3
  import '../../chunks/uneval.js-BJ9Qq2SF.js';
4
4
  import '../../chunks/index-server.js-CPkVoRxB.js';
5
5
  import '../../chunks/shared.js-HQ0rfhm4.js';
6
- import '../../chunks/internal2.js-XxZ8wzRE.js';
6
+ import '../../chunks/internal2.js-BmeTE2qk.js';
7
7
  import '../../chunks/exports.js-D5zA1U7A.js';
8
8
  import '../../chunks/config.js-r_jw_bQQ.js';
9
9
  import '../../chunks/runtime.js-CCJi3XaY.js';
@@ -41,4 +41,4 @@ function _error($$renderer, $$props) {
41
41
  }
42
42
 
43
43
  export { _error as default };
44
- //# sourceMappingURL=_error.svelte.js-TrOSxb0e.js.map
44
+ //# sourceMappingURL=_error.svelte.js-CL7qPUQ1.js.map
@@ -9,7 +9,7 @@ import { D as DEFAULT_IMAGE_LIMITS } from '../../chunks/image-limits.js-CUdJ0f7r
9
9
  import { s as sanitizeWorkspaceProfile, d as dsiKey, t as themePrefs } from '../../chunks/theme-prefs.svelte.js-8CaWz46g.js';
10
10
  import { a as appConfig, p as previewSegments, b as parseTagWords, i as isValidTagWord, s as shouldRecordPrompt, g as getTrigger, t as triggerMode, c as searchKey, d as textPreviewOf } from '../../chunks/app-config.svelte.js-BXjvTmJu.js';
11
11
  import { c as getLocale } from '../../chunks/runtime.js-CCJi3XaY.js';
12
- import { p as page, a as afterNavigate, t, c as currentLocale, e as replaceState, u as unexpectederror1, s as sessionnotfound2, r as reapednote1, d as dshunreachable1, b as backtoworkspace2 } from '../../chunks/state.js-D5zsYmjz.js';
12
+ import { p as page, a as afterNavigate, t, c as currentLocale, e as replaceState, u as unexpectederror1, s as sessionnotfound2, r as reapednote1, d as dshunreachable1, b as backtoworkspace2 } from '../../chunks/state.js-D-A2xekV.js';
13
13
  import 'yaml';
14
14
  import 'html-to-image';
15
15
  import hljs from 'highlight.js/lib/core';
@@ -21,7 +21,7 @@ import xml from 'highlight.js/lib/languages/xml';
21
21
  import css from 'highlight.js/lib/languages/css';
22
22
  import '../../chunks/uneval.js-BJ9Qq2SF.js';
23
23
  import '../../chunks/shared.js-HQ0rfhm4.js';
24
- import '../../chunks/internal2.js-XxZ8wzRE.js';
24
+ import '../../chunks/internal2.js-BmeTE2qk.js';
25
25
  import '../../chunks/utils.js-CAdNO8Tu.js';
26
26
 
27
27
  //#region src/lib/paraglide/messages/abort.js
@@ -19220,7 +19220,7 @@ function ThemeToggle($$renderer, $$props) {
19220
19220
  }
19221
19221
  //#endregion
19222
19222
  //#region package.json
19223
- var version = "0.10.2";
19223
+ var version = "0.11.1";
19224
19224
  var dsh = { "webVersion": "0.2.2-rc.1" };
19225
19225
  //#endregion
19226
19226
  //#region src/lib/version.ts
@@ -39394,4 +39394,4 @@ function _page($$renderer, $$props) {
39394
39394
  }
39395
39395
 
39396
39396
  export { _page as default };
39397
- //# sourceMappingURL=_page.svelte.js-BUuXoaje.js.map
39397
+ //# sourceMappingURL=_page.svelte.js-nXReJwZQ.js.map
@@ -9,8 +9,8 @@ import * as qs from 'node:querystring';
9
9
  import { Readable } from 'node:stream';
10
10
  import { S as SvelteKitError } from './chunks/shared.js-HQ0rfhm4.js';
11
11
  import './chunks/utils.js-CAdNO8Tu.js';
12
- import { S as Server } from './index.js-M1GginY2.js';
13
- import { m as manifest } from './manifest.js-BEmwisii.js';
12
+ import { S as Server } from './index.js-DW6Zd84U.js';
13
+ import { m as manifest } from './manifest.js-DXLiUOif.js';
14
14
  import { env, dir, env_prefix } from '../../env.js';
15
15
  import { format } from 'node:url';
16
16
 
@@ -1732,4 +1732,4 @@ const handler = sequence(
1732
1732
  );
1733
1733
 
1734
1734
  export { format_listening_address as f, handler as h, polka as p };
1735
- //# sourceMappingURL=handler-BOqY82LA.js.map
1735
+ //# sourceMappingURL=handler-DiVCAgmr.js.map