@deepseek-insight/dsi 0.10.0 → 0.10.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 (58) hide show
  1. package/.agents/skills/glass-dsi/scripts/_connect.mjs +49 -9
  2. package/.agents/skills/glass-dsi/scripts/glass.mjs +6 -5
  3. package/.agents/skills/glass-url/scripts/_connect.mjs +56 -9
  4. package/.agents/skills/glass-url/scripts/glass-url.mjs +5 -4
  5. package/README.md +21 -0
  6. package/bin/dsi.mjs +44 -7
  7. package/bin/lib/dev-mode.mjs +8 -5
  8. package/bin/lib/glass-browser-bootstrap.mjs +115 -0
  9. package/bin/lib/mcp-banner.mjs +26 -0
  10. package/build/client/_app/immutable/assets/0.CxUWwepa.css +2 -0
  11. package/build/client/_app/immutable/assets/{2.D0QOh44D.css → 2.CSFboNRO.css} +1 -1
  12. package/build/client/_app/immutable/chunks/C4M9oU_3.js +1 -0
  13. package/build/client/_app/immutable/chunks/CNT-CapI.js +1 -0
  14. package/build/client/_app/immutable/chunks/DttyJZuo.js +2 -0
  15. package/build/client/_app/immutable/chunks/{Bu2owQS4.js → UcxQDPMg.js} +1 -1
  16. package/build/client/_app/immutable/entry/{app.DjLAWmJH.js → app.GxH1nznH.js} +2 -2
  17. package/build/client/_app/immutable/entry/start.P-LmBYpD.js +1 -0
  18. package/build/client/_app/immutable/nodes/{1.w6Hz6-dJ.js → 1.BVvBJtMj.js} +1 -1
  19. package/build/client/_app/immutable/nodes/{2.CFmqEODJ.js → 2.D0JzdegJ.js} +107 -107
  20. package/build/client/_app/version.json +1 -1
  21. package/build/handler.js +4 -4
  22. package/build/index.js +4 -4
  23. package/build/server/chunks/chunks/{internal2.js-DRFhzPda.js → internal2.js-BRzR_ZGp.js} +2 -2
  24. package/build/server/chunks/chunks/{registry.js-CWnRQ4vx.js → registry.js-6St5Biiy.js} +96 -10
  25. package/build/server/chunks/chunks/{state.js-kZHonU4N.js → state.js-Ct6h8rMl.js} +2 -2
  26. package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-sXqf-okw.js → _server.ts.js-DYvCel9L.js} +2 -2
  27. package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-Byj9ApJh.js → _server.ts.js-CDNbpOqu.js} +2 -2
  28. package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-DOIsrzvg.js → _server.ts.js-C8UZMTcb.js} +2 -2
  29. package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-Cq3gmRfE.js → _server.ts.js-CERwttQS.js} +2 -2
  30. package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-BGSLIV0t.js → _server.ts.js-DtVkS-mH.js} +2 -2
  31. package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-8slca75-.js → _server.ts.js-C85umKKr.js} +2 -2
  32. package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-CpbdTYds.js → _server.ts.js-CrTtygPQ.js} +2 -2
  33. package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-Bls9LtLY.js → _server.ts.js-DgJ6DXVr.js} +2 -2
  34. package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-DqNi_iW_.js → _server.ts.js-Bj9bKEEv.js} +2 -2
  35. package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-DuXWwo7i.js → _server.ts.js--1WTGEfT.js} +2 -2
  36. package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-DXfqBDEw.js → _server.ts.js-D8hQe810.js} +2 -2
  37. package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-Bgnl8lYs.js → _server.ts.js-CSYYFlm2.js} +2 -2
  38. package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-FHmQVbrv.js → _server.ts.js-KJjT8zXH.js} +2 -2
  39. package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-BV4cBtSA.js → _server.ts.js-DQtzgPeG.js} +2 -2
  40. package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-4vgkwh7v.js → _server.ts.js-DSkCBGRA.js} +6 -3
  41. package/build/server/chunks/entries/pages/{_error.svelte.js-BKhpJygh.js → _error.svelte.js-BXD7Pthk.js} +3 -3
  42. package/build/server/chunks/entries/pages/{_page.svelte.js-BlbGdGej.js → _page.svelte.js-DaZfwP76.js} +234 -24
  43. package/build/server/chunks/{handler-BtG6aVza.js → handler-C5_-AjlT.js} +3 -3
  44. package/build/server/chunks/{index.js-rGfUdWOY.js → index.js-BECscw6k.js} +2 -2
  45. package/build/server/chunks/{manifest.js-DwQ7BEt1.js → manifest.js-aksIjogg.js} +20 -20
  46. package/build/server/chunks/nodes/{0.js-Cum-Y-us.js → 0.js-xX4GZsu5.js} +3 -3
  47. package/build/server/chunks/nodes/1.js-BaNGyV1A.js +9 -0
  48. package/build/server/chunks/nodes/{2.js-ButkUErW.js → 2.js-CBdFoBFK.js} +4 -4
  49. package/package.json +1 -1
  50. package/template/.dsi/prompts.sqlite-shm +0 -0
  51. package/template/.dsi/prompts.sqlite-wal +0 -0
  52. package/build/client/_app/immutable/assets/0.uhYTRapi.css +0 -2
  53. package/build/client/_app/immutable/chunks/0Uk2rkmL.js +0 -1
  54. package/build/client/_app/immutable/chunks/BaH6C3xD.js +0 -2
  55. package/build/client/_app/immutable/chunks/DXba8Dom.js +0 -1
  56. package/build/client/_app/immutable/entry/start.D-t6KuoK.js +0 -1
  57. package/build/server/chunks/nodes/1.js-D0EwPqp_.js +0 -9
  58. /package/build/client/_app/immutable/nodes/{0.DeDuCaDD.js → 0.CfpMgVS-.js} +0 -0
@@ -1 +1 @@
1
- {"version":"1793848049390"}
1
+ {"version":"1793892955715"}
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-BtG6aVza.js';
6
- import './server/chunks/index.js-rGfUdWOY.js';
7
- import './server/chunks/manifest.js-DwQ7BEt1.js';
5
+ export { h as handler } from './server/chunks/handler-C5_-AjlT.js';
6
+ import './server/chunks/index.js-BECscw6k.js';
7
+ import './server/chunks/manifest.js-aksIjogg.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-DRFhzPda.js';
22
+ import './server/chunks/chunks/internal2.js-BRzR_ZGp.js';
23
23
  import './server/chunks/chunks/exports.js-DH_tjtdv.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-BtG6aVza.js';
4
+ import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-C5_-AjlT.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-rGfUdWOY.js';
17
+ import './server/chunks/index.js-BECscw6k.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-DRFhzPda.js';
21
+ import './server/chunks/chunks/internal2.js-BRzR_ZGp.js';
22
22
  import './server/chunks/chunks/exports.js-DH_tjtdv.js';
23
- import './server/chunks/manifest.js-DwQ7BEt1.js';
23
+ import './server/chunks/manifest.js-aksIjogg.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: "1gjqxay"
583
+ version_hash: "1h3cpc"
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-DRFhzPda.js.map
606
+ //# sourceMappingURL=internal2.js-BRzR_ZGp.js.map
@@ -1,5 +1,5 @@
1
1
  import { d as readBrowserConfig } from './insight-config.js-C5-Rhh5A.js';
2
- import { mkdirSync, rmSync, readdirSync } from 'node:fs';
2
+ import { mkdirSync, writeFileSync, rmSync, 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';
@@ -180,6 +180,14 @@ function clampZoom(z) {
180
180
  if (z < .5 || z > 1.25) return null;
181
181
  return z;
182
182
  }
183
+ /** The plain-open identity spoofs (ADR-0046 D3 reasoning, kept for plain
184
+ * launches;
185
+ * ADR-0047 D3). */
186
+ var PLAIN_IDENTITY = {
187
+ userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
188
+ timezoneId: "America/New_York",
189
+ locale: "en-US"
190
+ };
183
191
  /** The reaper's ONLY test — pure: a session is reaper-eligible when nobody
184
192
  * watches its stream AND its last MCP tool traffic is older than idleMs.
185
193
  * An active agent (traffic younger than idleMs) is NEVER eligible (D2). */
@@ -304,11 +312,35 @@ function state() {
304
312
  * close (crash, kill -9, reaper miss). keep = prefixes of LIVE entries —
305
313
  * a module hot reload re-runs state() init against a process-global map
306
314
  * that may hold live sessions, and this sweep must never delete one. */
315
+ var OWNER_MARKER = ".dsi-owner.json";
316
+ /** Fix 2026-11-05 (browser-proxy-verbs profile-dir flake): every profile dir
317
+ * open() creates carries an OWNER MARKER (the creating process's pid). Under
318
+ * vitest, parallel workers boot at staggered times and an empty keep-set
319
+ * would rmSync a SIBLING worker's LIVE profile dir mid-test (the sibling's
320
+ * entry map is invisible here) — existsSync then flips false between open()
321
+ * and the leak-guard assertion. The marker makes ownership visible across
322
+ * processes: a dir whose marker pid is STILL ALIVE and is not ours is a live
323
+ * foreign session and must be skipped; a dead-pid marker (crashed worker) or
324
+ * no marker (the mop pins this arm — legacy/production leftovers) is swept
325
+ * exactly as before. Production (one registry per machine) is unaffected:
326
+ * markers only exist for pids this rule would protect, and dead owners sweep. */
327
+ function foreignLiveOwner(dir) {
328
+ try {
329
+ const raw = readFileSync(join(dir, OWNER_MARKER), "utf8");
330
+ const pid = JSON.parse(raw).pid;
331
+ if (typeof pid !== "number" || pid === process.pid) return false;
332
+ process.kill(pid, 0);
333
+ return true;
334
+ } catch {
335
+ return false;
336
+ }
337
+ }
307
338
  function sweepOrphanProfiles(keep) {
308
339
  try {
309
340
  const root = readBrowserConfig().profileRoot;
310
341
  for (const name of readdirSync(root)) {
311
342
  if (keep.has(name)) continue;
343
+ if (foreignLiveOwner(join(root, name))) continue;
312
344
  if (!process.env.VITEST) killOrphanChrome(name, {
313
345
  listPids: () => spawnSync("ps", ["axo", "pid=,command="], {
314
346
  encoding: "utf8",
@@ -375,11 +407,46 @@ function evictBrainPort(brainPort, exceptId) {
375
407
  await brain.connection?.close?.();
376
408
  } catch {}
377
409
  })();
410
+ e.mcpInProcess?.release?.();
378
411
  e.mcpInProcess = null;
379
412
  e.mcpHealth = "down";
380
413
  e.mcpError = "brain re-homed to a newer glass";
381
414
  }
382
415
  }
416
+ /** A6 D7e — the built floor now carries the brain, so a LATE failure must
417
+ * demote the brain, never kill the floor. Two guards per brain:
418
+ * 1. an 'error' listener on the sibling http listener (node's default for a
419
+ * stray server error event is a process exit — that default is fatal to a
420
+ * production floor);
421
+ * 2. a scoped unhandledRejection guard for the brain's lifetime, filtering
422
+ * to brain-sourced rejections (playwright/mcp or MCP-SDK frames in the
423
+ * stack) so unrelated crashes still surface loudly. release() removes the
424
+ * process-level guard at teardown (evict + D8 close call it). */
425
+ function attachBrainGuards(entry) {
426
+ const brain = entry.mcpInProcess;
427
+ if (!brain) return;
428
+ const demote = (what, err) => {
429
+ entry.mcpHealth = "down";
430
+ entry.mcpError = what + ": " + (err instanceof Error ? err.message : String(err));
431
+ entry.mcpInProcess = null;
432
+ release();
433
+ };
434
+ const isBrainSourced = (reason) => {
435
+ const stack = reason instanceof Error ? reason.stack ?? "" : String(reason);
436
+ return stack.includes("@playwright/mcp") || stack.includes("modelcontextprotocol") || stack.includes("startInProcessMcp");
437
+ };
438
+ const rejectionGuard = (reason) => {
439
+ if (entry.mcpInProcess !== brain) return;
440
+ if (isBrainSourced(reason)) demote("unhandled rejection", reason);
441
+ };
442
+ const release = () => {
443
+ process.off("unhandledRejection", rejectionGuard);
444
+ if (entry.mcpInProcess === brain) brain.release = void 0;
445
+ };
446
+ process.prependListener("unhandledRejection", rejectionGuard);
447
+ brain.release = release;
448
+ brain.httpServer.on?.("error", (e) => demote("brain listener", e));
449
+ }
383
450
  /** The in-process brain (D7): createConnection attached to the SAME headed
384
451
  * browser via cdpEndpoint, served over a SIBLING http listener (SSE +
385
452
  * messages endpoints) so a streamable-http MCP client (the DSH agent) can
@@ -473,6 +540,7 @@ var BrowserRegistry = class {
473
540
  profileDir: e.profileDir,
474
541
  createdAt: e.createdAt,
475
542
  ownerSessionId: e.ownerSessionId ?? null,
543
+ headedOpen: e.headedOpen === true,
476
544
  mcp: e.mcpChild ? "child" : e.mcpInProcess ? "in-process" : "none",
477
545
  mcpHealth: e.mcpHealth,
478
546
  mcpError: e.mcpError
@@ -792,16 +860,24 @@ var BrowserRegistry = class {
792
860
  const cfg = readBrowserConfig();
793
861
  const id = randomUUID();
794
862
  const port = freePort(options.port);
863
+ const headless = options.headedOpen ? false : options.headless ?? cfg.headless;
795
864
  const profileDir = join(cfg.profileRoot, id.slice(0, 8));
796
865
  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 {}
797
872
  const ignoreDefaultArgs = [
798
873
  "--enable-automation",
799
874
  "--mute-audio",
800
875
  "--hide-scrollbars"
801
876
  ];
877
+ const identity = PLAIN_IDENTITY;
802
878
  const launch = (useChrome) => chromium.launchPersistentContext(profileDir, {
803
879
  ...useChrome ? { channel: "chrome" } : {},
804
- headless: options.headless ?? cfg.headless,
880
+ headless,
805
881
  ignoreDefaultArgs,
806
882
  args: [
807
883
  "--no-first-run",
@@ -815,19 +891,23 @@ var BrowserRegistry = class {
815
891
  "--autoplay-policy=no-user-gesture-required",
816
892
  "--window-size=" + (Math.max(200, Math.min(1920, options.width ?? 730)) + 6) + "," + (Math.max(120, Math.min(1080, options.height ?? 830)) + 70)
817
893
  ],
818
- viewport: options.headless ?? cfg.headless ? {
894
+ viewport: headless ? {
819
895
  width: Math.max(200, Math.min(1920, options.width ?? 730)),
820
896
  height: Math.max(120, Math.min(1080, options.height ?? 830))
821
897
  } : null,
822
- userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
823
- timezoneId: "America/New_York",
824
- locale: "en-US"
898
+ ...{ userAgent: identity.userAgent } ,
899
+ ...{ timezoneId: identity.timezoneId } ,
900
+ ...{ locale: identity.locale }
825
901
  });
826
902
  let context;
827
903
  try {
828
904
  context = await launch(true);
829
905
  } catch (chromeErr) {
830
- context = await launch(false);
906
+ try {
907
+ context = await launch(false);
908
+ } catch (chromiumErr) {
909
+ throw new Error("Glass browser: no browser binary. System Google Chrome failed (" + String(chromeErr?.message ?? chromeErr).slice(0, 120) + ") and the bundled chromium is missing (" + String(chromiumErr?.message ?? chromiumErr).slice(0, 120) + "). Cures: install Google Chrome, or run `npx playwright@<playwright-core version from package.json> install chromium` (the revision must match this playwright-core pin).");
910
+ }
831
911
  }
832
912
  context.browser();
833
913
  const pid = pidOfPort(port);
@@ -897,7 +977,8 @@ var BrowserRegistry = class {
897
977
  height: Math.max(120, Math.min(1080, options.height ?? 830))
898
978
  },
899
979
  zoom: cfg.contentZoom,
900
- headless: options.headless ?? cfg.headless,
980
+ headless,
981
+ headedOpen: options.headedOpen === true,
901
982
  port,
902
983
  pid,
903
984
  profileDir,
@@ -980,6 +1061,7 @@ var BrowserRegistry = class {
980
1061
  entry.mcpInProcess = await startInProcessMcp(entry.port, brainPort, () => {
981
1062
  entry.lastMcpActivity = Date.now();
982
1063
  });
1064
+ attachBrainGuards(entry);
983
1065
  } catch (e) {
984
1066
  entry.mcpHealth = "down";
985
1067
  entry.mcpError = e.message;
@@ -992,6 +1074,7 @@ var BrowserRegistry = class {
992
1074
  pid,
993
1075
  profileDir,
994
1076
  createdAt: entry.createdAt,
1077
+ headedOpen: entry.headedOpen === true,
995
1078
  ownerSessionId: entry.ownerSessionId,
996
1079
  mcp: entry.mcpChild ? "child" : entry.mcpInProcess ? "in-process" : "none",
997
1080
  mcpHealth: entry.mcpHealth,
@@ -1051,6 +1134,7 @@ var BrowserRegistry = class {
1051
1134
  setTimeout(res, 2e3);
1052
1135
  });
1053
1136
  await brain.connection?.close?.();
1137
+ brain.release?.();
1054
1138
  entry.mcpInProcess = null;
1055
1139
  } catch (e) {
1056
1140
  errs.push(e);
@@ -1072,10 +1156,12 @@ var BrowserRegistry = class {
1072
1156
  errs.push(e);
1073
1157
  }
1074
1158
  try {
1075
- rmSync(entry.profileDir, {
1159
+ const disposableRoot = readBrowserConfig().profileRoot;
1160
+ if (entry.profileDir.startsWith(disposableRoot)) rmSync(entry.profileDir, {
1076
1161
  recursive: true,
1077
1162
  force: true
1078
1163
  });
1164
+ else errs.push(/* @__PURE__ */ new Error("profile cleanup skipped - dir outside disposable root: " + entry.profileDir));
1079
1165
  } catch (e) {
1080
1166
  errs.push(e);
1081
1167
  }
@@ -1698,4 +1784,4 @@ var BrowserRegistry = class {
1698
1784
  var browserRegistry = new BrowserRegistry();
1699
1785
 
1700
1786
  export { BrowserRegistryRefusal as B, browserRegistry as b, clampZoom as c };
1701
- //# sourceMappingURL=registry.js-CWnRQ4vx.js.map
1787
+ //# sourceMappingURL=registry.js-6St5Biiy.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-DRFhzPda.js';
3
+ import './internal2.js-BRzR_ZGp.js';
4
4
  import './exports.js-DH_tjtdv.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-kZHonU4N.js.map
307
+ //# sourceMappingURL=state.js-Ct6h8rMl.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-sXqf-okw.js.map
45
+ //# sourceMappingURL=_server.ts.js-DYvCel9L.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-Byj9ApJh.js.map
32
+ //# sourceMappingURL=_server.ts.js-CDNbpOqu.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-DOIsrzvg.js.map
51
+ //# sourceMappingURL=_server.ts.js-C8UZMTcb.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-Cq3gmRfE.js.map
43
+ //# sourceMappingURL=_server.ts.js-CERwttQS.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-BGSLIV0t.js.map
61
+ //# sourceMappingURL=_server.ts.js-DtVkS-mH.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-8slca75-.js.map
79
+ //# sourceMappingURL=_server.ts.js-C85umKKr.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-CpbdTYds.js.map
50
+ //# sourceMappingURL=_server.ts.js-CrTtygPQ.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-Bls9LtLY.js.map
66
+ //# sourceMappingURL=_server.ts.js-DgJ6DXVr.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-DqNi_iW_.js.map
47
+ //# sourceMappingURL=_server.ts.js-Bj9bKEEv.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-DuXWwo7i.js.map
34
+ //# sourceMappingURL=_server.ts.js--1WTGEfT.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-DXfqBDEw.js.map
103
+ //# sourceMappingURL=_server.ts.js-D8hQe810.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-Bgnl8lYs.js.map
34
+ //# sourceMappingURL=_server.ts.js-CSYYFlm2.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-C5-Rhh5A.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-FHmQVbrv.js.map
44
+ //# sourceMappingURL=_server.ts.js-KJjT8zXH.js.map
@@ -1,5 +1,5 @@
1
1
  import { d as readBrowserConfig } from '../../../../../../chunks/insight-config.js-C5-Rhh5A.js';
2
- import { b as browserRegistry, c as clampZoom, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-CWnRQ4vx.js';
2
+ import { b as browserRegistry, c as clampZoom, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-6St5Biiy.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-DxKURfc_.js';
@@ -59,4 +59,4 @@ var GET = async (ctx) => {
59
59
  };
60
60
 
61
61
  export { GET, POST };
62
- //# sourceMappingURL=_server.ts.js-BV4cBtSA.js.map
62
+ //# sourceMappingURL=_server.ts.js-DQtzgPeG.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../chunks/registry.js-CWnRQ4vx.js';
1
+ import { b as browserRegistry } from '../../../../chunks/registry.js-6St5Biiy.js';
2
2
  import { j as json } from '../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../chunks/insight-config.js-C5-Rhh5A.js';
4
4
  import '../../../../chunks/config.js-r_jw_bQQ.js';
@@ -26,16 +26,19 @@ var POST = async (event) => {
26
26
  let width;
27
27
  let height;
28
28
  let ownerSessionId;
29
+ let headedOpen;
29
30
  try {
30
31
  const body = event?.request ? await event.request.json() : {};
31
32
  if (typeof body.width === "number" && body.width >= 200) width = Math.round(body.width);
32
33
  if (typeof body.height === "number" && body.height >= 120) height = Math.round(body.height);
33
34
  if (typeof body.ownerSessionId === "string" && body.ownerSessionId) ownerSessionId = body.ownerSessionId;
35
+ if (body.headedOpen === true) headedOpen = true;
34
36
  } catch {}
35
37
  const info = await browserRegistry.open({
36
38
  width,
37
39
  height,
38
- ownerSessionId
40
+ ownerSessionId,
41
+ headedOpen
39
42
  });
40
43
  return json(info);
41
44
  } catch (e) {
@@ -47,4 +50,4 @@ var POST = async (event) => {
47
50
  };
48
51
 
49
52
  export { GET, POST };
50
- //# sourceMappingURL=_server.ts.js-4vgkwh7v.js.map
53
+ //# sourceMappingURL=_server.ts.js-DSkCBGRA.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-kZHonU4N.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-Ct6h8rMl.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-DRFhzPda.js';
6
+ import '../../chunks/internal2.js-BRzR_ZGp.js';
7
7
  import '../../chunks/exports.js-DH_tjtdv.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-BKhpJygh.js.map
44
+ //# sourceMappingURL=_error.svelte.js-BXD7Pthk.js.map