@deepseek-insight/dsi 0.8.2 → 0.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/build/client/_app/immutable/assets/0.DyOAkKS-.css +2 -0
  2. package/build/client/_app/immutable/chunks/{CAoCg_fG.js → BoHeiMOU.js} +1 -1
  3. package/build/client/_app/immutable/chunks/C9QAOGL1.js +2 -0
  4. package/build/client/_app/immutable/chunks/QJuSx3RG.js +1 -0
  5. package/build/client/_app/immutable/chunks/sC_8Ss7w.js +1 -0
  6. package/build/client/_app/immutable/entry/{app.DIq2Q3OX.js → app.S_mxIoOg.js} +2 -2
  7. package/build/client/_app/immutable/entry/start.BPQAB3iV.js +1 -0
  8. package/build/client/_app/immutable/nodes/{1.DKIIO5Pq.js → 1.D20V6eTe.js} +1 -1
  9. package/build/client/_app/immutable/nodes/{2.CpOJSq6u.js → 2.BHcBdFqH.js} +77 -77
  10. package/build/client/_app/version.json +1 -1
  11. package/build/handler.js +4 -4
  12. package/build/index.js +4 -4
  13. package/build/server/chunks/chunks/{dsh-events.js-CGuF_had.js → dsh-events.js-BUkLR6ZV.js} +13 -1
  14. package/build/server/chunks/chunks/{git-probe.js-Cn_ugqcH.js → git-probe.js-CLF37SRh.js} +2 -2
  15. package/build/server/chunks/chunks/{internal2.js-DFG0wDsP.js → internal2.js-Ba5p8uFM.js} +2 -2
  16. package/build/server/chunks/chunks/{registry.js-BC-TNdmn.js → registry.js-C2MdrfNv.js} +388 -50
  17. package/build/server/chunks/chunks/{state.js-Dki_Bq11.js → state.js-BSiAgink.js} +2 -2
  18. package/build/server/chunks/chunks/{watcher.js-f54CFvdI.js → watcher.js-BVKnoQUw.js} +2 -2
  19. package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-DN0zl7cz.js → _server.ts.js-3kQCQuHT.js} +3 -3
  20. package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-C3byr74D.js → _server.ts.js-BUBTCLFn.js} +3 -3
  21. package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/_server.ts.js-CogDOHKu.js +45 -0
  22. package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-BKChU9D7.js → _server.ts.js-xOt7LnS1.js} +2 -2
  23. package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/_server.ts.js-CSmVPvSM.js +44 -0
  24. package/build/server/chunks/entries/endpoints/api/browser/_id_/element/_server.ts.js-BA40oCDW.js +43 -0
  25. package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-CUFYX5kg.js → _server.ts.js-EX7eVzjp.js} +5 -4
  26. package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-fg2eb_ZY.js → _server.ts.js-B_EcmyFt.js} +2 -2
  27. package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-Dt1n31IP.js → _server.ts.js-C3dYbyS3.js} +11 -7
  28. package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/_server.ts.js-CMhJJO25.js +45 -0
  29. package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-DIF8juwJ.js → _server.ts.js-DIW4uI2S.js} +4 -3
  30. package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-BFdXJdhd.js → _server.ts.js-CIPIlq5X.js} +2 -2
  31. package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/_server.ts.js-CoEdOiml.js +34 -0
  32. package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-BIF_7OHe.js → _server.ts.js-CdELUoGT.js} +6 -4
  33. package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-B7yjEF1N.js → _server.ts.js-ea6HpNGh.js} +14 -4
  34. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-lBsxHSo6.js → _server.ts.js-BzP30TXW.js} +2 -2
  35. package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-BrEgFdCF.js → _server.ts.js-B7YRQhuJ.js} +2 -2
  36. package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-BRhlbYEe.js → _server.ts.js-B-5YihUA.js} +3 -3
  37. package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-B9YI66ZL.js → _server.ts.js-DT5jRZFE.js} +3 -3
  38. package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-DSvXRZQL.js → _server.ts.js-DtW-utrd.js} +3 -3
  39. package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-8A0skdlM.js → _server.ts.js-8AIAo9jX.js} +3 -3
  40. package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-Bc6J3t3m.js → _server.ts.js-CMw96vjY.js} +3 -3
  41. package/build/server/chunks/entries/endpoints/api/workspace/write-gate/{_server.ts.js-CfL8Por5.js → _server.ts.js-DKufa14_.js} +3 -3
  42. package/build/server/chunks/entries/pages/{_error.svelte.js-EnDLC3Jj.js → _error.svelte.js-D8-G0evO.js} +3 -3
  43. package/build/server/chunks/entries/pages/{_page.server.ts.js-ar1DbW1v.js → _page.server.ts.js-7x6ZfGoB.js} +2 -2
  44. package/build/server/chunks/entries/pages/{_page.svelte.js-CQUo8VGL.js → _page.svelte.js-7xWLRsiZ.js} +212 -101
  45. package/build/server/chunks/{handler-BBp0LoYK.js → handler-BedQ0jP-.js} +3 -3
  46. package/build/server/chunks/{index.js-S4257Wcs.js → index.js-BF6tPPQs.js} +2 -2
  47. package/build/server/chunks/{manifest.js-DajiWH1H.js → manifest.js-3c0p7QAl.js} +58 -23
  48. package/build/server/chunks/nodes/{0.js-DtkNHIFx.js → 0.js-B3i7sGR_.js} +3 -3
  49. package/build/server/chunks/nodes/1.js-eUf50uxI.js +9 -0
  50. package/build/server/chunks/nodes/{2.js-BORDEffk.js → 2.js-CgnRGwm6.js} +5 -5
  51. package/package.json +2 -7
  52. package/template/.dsi/prompts.sqlite-shm +0 -0
  53. package/template/.dsi/prompts.sqlite-wal +0 -0
  54. package/build/client/_app/immutable/assets/0.DBVVEjy9.css +0 -2
  55. package/build/client/_app/immutable/chunks/BHodvdRc.js +0 -1
  56. package/build/client/_app/immutable/chunks/D-jXFTzB.js +0 -1
  57. package/build/client/_app/immutable/chunks/TTdBFs3C.js +0 -2
  58. package/build/client/_app/immutable/entry/start.E6P3Z7tx.js +0 -1
  59. package/build/server/chunks/nodes/1.js-OAvYMTzU.js +0 -9
  60. /package/build/client/_app/immutable/nodes/{0.Dm_ry-Pr.js → 0.6dTmg1Xv.js} +0 -0
@@ -0,0 +1,45 @@
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
+ import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
+ import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
+ import '../../../../../../chunks/config.js-vThvQeMn.js';
5
+ import '../../../../../../chunks/settings-document.js-Gw1puaik.js';
6
+ import 'node:fs';
7
+ import 'node:path';
8
+ import 'node:os';
9
+ import 'yaml';
10
+ import '../../../../../../chunks/settings-home2.js-f75-B6RI.js';
11
+ import 'node:child_process';
12
+ import 'node:crypto';
13
+ import 'playwright-core';
14
+ import '../../../../../../chunks/shared.js-HQ0rfhm4.js';
15
+ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
16
+
17
+ //#region src/routes/api/browser/[id]/activate/+server.ts
18
+ /**
19
+ * /api/browser/[id]/activate — move the glass's face to another tab
20
+ * (ADR-0040 D1/D2/D4): lazy attach, per-switch first-frame seed, pointer
21
+ * move. The answer IS the boundary frame (seq + jpeg) so the panel never
22
+ * waits on a blank paint; the SSE then resumes from that seq.
23
+ */
24
+ var POST = async (ctx) => {
25
+ if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
26
+ let body;
27
+ try {
28
+ body = await ctx.request.json();
29
+ } catch {
30
+ return json({ error: "BAD_REQUEST" }, { status: 400 });
31
+ }
32
+ if (typeof body.targetId !== "string" || !body.targetId) return json({ error: "BAD_REQUEST" }, { status: 400 });
33
+ try {
34
+ return json(await browserRegistry.activate(ctx.params.id, body.targetId));
35
+ } catch (err) {
36
+ if (err instanceof BrowserRegistryRefusal) return json({
37
+ error: err.code,
38
+ reason: err.message
39
+ }, { status: err.code === "NO_SESSION" ? 404 : err.code === "NO_TARGET" ? 404 : 409 });
40
+ throw err;
41
+ }
42
+ };
43
+
44
+ export { POST };
45
+ //# sourceMappingURL=_server.ts.js-CogDOHKu.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -29,4 +29,4 @@ var POST = async (ctx) => {
29
29
  };
30
30
 
31
31
  export { POST };
32
- //# sourceMappingURL=_server.ts.js-BKChU9D7.js.map
32
+ //# sourceMappingURL=_server.ts.js-xOt7LnS1.js.map
@@ -0,0 +1,44 @@
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
+ import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
+ import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
+ import '../../../../../../chunks/config.js-vThvQeMn.js';
5
+ import '../../../../../../chunks/settings-document.js-Gw1puaik.js';
6
+ import 'node:fs';
7
+ import 'node:path';
8
+ import 'node:os';
9
+ import 'yaml';
10
+ import '../../../../../../chunks/settings-home2.js-f75-B6RI.js';
11
+ import 'node:child_process';
12
+ import 'node:crypto';
13
+ import 'playwright-core';
14
+ import '../../../../../../chunks/shared.js-HQ0rfhm4.js';
15
+ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
16
+
17
+ //#region src/routes/api/browser/[id]/closetab/+server.ts
18
+ /**
19
+ * /api/browser/[id]/closetab — close ONE tab (the strip ✕, BUGFIX round 3).
20
+ * Body { targetId }. Closing the LAST tab is refused (NO_TARGET): session
21
+ * death belongs to the kill ladder (trash / reaper), never to a tab ✕.
22
+ */
23
+ var POST = async (ctx) => {
24
+ if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
25
+ let body;
26
+ try {
27
+ body = await ctx.request.json();
28
+ } catch {
29
+ return json({ error: "BAD_REQUEST" }, { status: 400 });
30
+ }
31
+ if (typeof body.targetId !== "string" || !body.targetId) return json({ error: "BAD_REQUEST" }, { status: 400 });
32
+ try {
33
+ return json(await browserRegistry.closeTab(ctx.params.id, body.targetId));
34
+ } catch (err) {
35
+ if (err instanceof BrowserRegistryRefusal) return json({
36
+ error: err.code,
37
+ reason: err.message
38
+ }, { status: err.code === "NO_SESSION" ? 404 : err.code === "NO_TARGET" ? 404 : 409 });
39
+ throw err;
40
+ }
41
+ };
42
+
43
+ export { POST };
44
+ //# sourceMappingURL=_server.ts.js-CSmVPvSM.js.map
@@ -0,0 +1,43 @@
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
+ import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
+ import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
+ import '../../../../../../chunks/config.js-vThvQeMn.js';
5
+ import '../../../../../../chunks/settings-document.js-Gw1puaik.js';
6
+ import 'node:fs';
7
+ import 'node:path';
8
+ import 'node:os';
9
+ import 'yaml';
10
+ import '../../../../../../chunks/settings-home2.js-f75-B6RI.js';
11
+ import 'node:child_process';
12
+ import 'node:crypto';
13
+ import 'playwright-core';
14
+ import '../../../../../../chunks/shared.js-HQ0rfhm4.js';
15
+ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
16
+
17
+ //#region src/routes/api/browser/[id]/element/+server.ts
18
+ /**
19
+ * /api/browser/[id]/element — what the page has under viewport coords
20
+ * (BUGFIX 2026-10-25): the glass context menu's data pass. Chrome's NATIVE
21
+ * right-click menu is browser UI and never renders in the screencast, so
22
+ * DSI renders its own; this answers href/src/text under the point.
23
+ */
24
+ var POST = async (ctx) => {
25
+ if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
26
+ let body;
27
+ try {
28
+ body = await ctx.request.json();
29
+ } catch {
30
+ return json({ error: "BAD_REQUEST" }, { status: 400 });
31
+ }
32
+ if (typeof body.x !== "number" || typeof body.y !== "number" || !Number.isFinite(body.x) || !Number.isFinite(body.y)) return json({ error: "BAD_REQUEST" }, { status: 400 });
33
+ const targetId = typeof body.targetId === "string" && body.targetId ? body.targetId : void 0;
34
+ try {
35
+ return json(await browserRegistry.elementAt(ctx.params.id, body.x, body.y, targetId));
36
+ } catch (err) {
37
+ if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" || err.code === "NO_TARGET" ? 404 : 409 });
38
+ throw err;
39
+ }
40
+ };
41
+
42
+ export { POST };
43
+ //# sourceMappingURL=_server.ts.js-BA40oCDW.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -65,14 +65,15 @@ var POST = async (ctx) => {
65
65
  const input = validate(body);
66
66
  if (!input) return json({ error: "BAD_INPUT" }, { status: 400 });
67
67
  try {
68
- await browserRegistry.dispatch(ctx.params.id, input);
68
+ const tid = body.targetId;
69
+ await browserRegistry.dispatch(ctx.params.id, input, typeof tid === "string" && tid ? tid : void 0);
69
70
  return json({ ok: true });
70
71
  } catch (err) {
71
- if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" ? 404 : 409 });
72
+ if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" || err.code === "NO_TARGET" ? 404 : 409 });
72
73
  if (err.name === "RelayClosedError") return json({ error: "CLOSED" }, { status: 409 });
73
74
  throw err;
74
75
  }
75
76
  };
76
77
 
77
78
  export { POST };
78
- //# sourceMappingURL=_server.ts.js-CUFYX5kg.js.map
79
+ //# sourceMappingURL=_server.ts.js-EX7eVzjp.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -47,4 +47,4 @@ var GET = (ctx) => {
47
47
  };
48
48
 
49
49
  export { GET };
50
- //# sourceMappingURL=_server.ts.js-fg2eb_ZY.js.map
50
+ //# sourceMappingURL=_server.ts.js-B_EcmyFt.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -35,19 +35,23 @@ var POST = async (ctx) => {
35
35
  } catch {
36
36
  return json({ error: "BAD_REQUEST" }, { status: 400 });
37
37
  }
38
+ const targetId = typeof body.targetId === "string" && body.targetId ? body.targetId : void 0;
38
39
  if (!("url" in body) === !("action" in body)) return json({ error: "BAD_REQUEST" }, { status: 400 });
39
40
  try {
40
41
  if ("url" in body) {
41
42
  if (typeof body.url !== "string" || !URL_OK.test(body.url)) return json({ error: "BAD_URL" }, { status: 400 });
42
- await browserRegistry.navigate(ctx.params.id, body.url, { waitLoad: true });
43
+ await browserRegistry.navigate(ctx.params.id, body.url, {
44
+ waitLoad: true,
45
+ targetId
46
+ });
43
47
  return json({
44
- ...await browserRegistry.pageInfo(ctx.params.id),
45
- ...await browserRegistry.navInfo(ctx.params.id)
48
+ ...await browserRegistry.pageInfo(ctx.params.id, targetId),
49
+ ...await browserRegistry.navInfo(ctx.params.id, targetId)
46
50
  });
47
51
  }
48
52
  if (typeof body.action !== "string" || !ACTIONS.has(body.action)) return json({ error: "BAD_ACTION" }, { status: 400 });
49
- if (body.action === "reload") return json(await browserRegistry.reload(ctx.params.id));
50
- const info = await browserRegistry.pageHistory(ctx.params.id, body.action);
53
+ if (body.action === "reload") return json(await browserRegistry.reload(ctx.params.id, targetId));
54
+ const info = await browserRegistry.pageHistory(ctx.params.id, body.action, targetId);
51
55
  return json(info);
52
56
  } catch (err) {
53
57
  if (err instanceof BrowserRegistryRefusal) return json({
@@ -59,4 +63,4 @@ var POST = async (ctx) => {
59
63
  };
60
64
 
61
65
  export { POST };
62
- //# sourceMappingURL=_server.ts.js-Dt1n31IP.js.map
66
+ //# sourceMappingURL=_server.ts.js-C3dYbyS3.js.map
@@ -0,0 +1,45 @@
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
+ import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
+ import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
+ import '../../../../../../chunks/config.js-vThvQeMn.js';
5
+ import '../../../../../../chunks/settings-document.js-Gw1puaik.js';
6
+ import 'node:fs';
7
+ import 'node:path';
8
+ import 'node:os';
9
+ import 'yaml';
10
+ import '../../../../../../chunks/settings-home2.js-f75-B6RI.js';
11
+ import 'node:child_process';
12
+ import 'node:crypto';
13
+ import 'playwright-core';
14
+ import '../../../../../../chunks/shared.js-HQ0rfhm4.js';
15
+ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
16
+
17
+ //#region src/routes/api/browser/[id]/opentab/+server.ts
18
+ /**
19
+ * /api/browser/[id]/opentab — open a NEW tab in the glass and make it the
20
+ * active face (the context menu's 'open in new tab' verbs, BUGFIX
21
+ * 2026-10-25). Body { url } — http(s) or data: like navigate.
22
+ */
23
+ var URL_OK = /^https?:\/\/|^data:text\/html/;
24
+ var POST = async (ctx) => {
25
+ if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
26
+ let body;
27
+ try {
28
+ body = await ctx.request.json();
29
+ } catch {
30
+ return json({ error: "BAD_REQUEST" }, { status: 400 });
31
+ }
32
+ if (typeof body.url !== "string" || !URL_OK.test(body.url)) return json({ error: "BAD_URL" }, { status: 400 });
33
+ try {
34
+ return json(await browserRegistry.openTab(ctx.params.id, body.url));
35
+ } catch (err) {
36
+ if (err instanceof BrowserRegistryRefusal) return json({
37
+ error: err.code,
38
+ reason: err.message
39
+ }, { status: err.code === "NO_SESSION" ? 404 : err.code === "NO_TARGET" ? 404 : 409 });
40
+ throw err;
41
+ }
42
+ };
43
+
44
+ export { POST };
45
+ //# sourceMappingURL=_server.ts.js-CMhJJO25.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -22,7 +22,8 @@ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
22
22
  var GET = async (ctx) => {
23
23
  if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
24
24
  try {
25
- return json(await browserRegistry.pageInfo(ctx.params.id));
25
+ const tid = ctx.url.searchParams.get("targetId") ?? void 0;
26
+ return json(await browserRegistry.pageInfo(ctx.params.id, tid || void 0));
26
27
  } catch (err) {
27
28
  if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" ? 404 : 409 });
28
29
  throw err;
@@ -30,4 +31,4 @@ var GET = async (ctx) => {
30
31
  };
31
32
 
32
33
  export { GET };
33
- //# sourceMappingURL=_server.ts.js-DIF8juwJ.js.map
34
+ //# sourceMappingURL=_server.ts.js-DIW4uI2S.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -71,4 +71,4 @@ var GET = (ctx) => {
71
71
  };
72
72
 
73
73
  export { GET };
74
- //# sourceMappingURL=_server.ts.js-BFdXJdhd.js.map
74
+ //# sourceMappingURL=_server.ts.js-CIPIlq5X.js.map
@@ -0,0 +1,34 @@
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
+ import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
+ import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
+ import '../../../../../../chunks/config.js-vThvQeMn.js';
5
+ import '../../../../../../chunks/settings-document.js-Gw1puaik.js';
6
+ import 'node:fs';
7
+ import 'node:path';
8
+ import 'node:os';
9
+ import 'yaml';
10
+ import '../../../../../../chunks/settings-home2.js-f75-B6RI.js';
11
+ import 'node:child_process';
12
+ import 'node:crypto';
13
+ import 'playwright-core';
14
+ import '../../../../../../chunks/shared.js-HQ0rfhm4.js';
15
+ import '../../../../../../chunks/uneval.js-BJ9Qq2SF.js';
16
+
17
+ //#region src/routes/api/browser/[id]/tabs/+server.ts
18
+ /**
19
+ * /api/browser/[id]/tabs — enumerate the glass context's pages (ADR-0040
20
+ * D5): the tab strip's feed. type:page only; read-only, never attaches,
21
+ * never streams (D1 — only the active tab streams).
22
+ */
23
+ var GET = async (ctx) => {
24
+ if (browserRegistry.isClosed(ctx.params.id)) return json({ error: "CLOSED" }, { status: 409 });
25
+ try {
26
+ return json({ tabs: await browserRegistry.listTabs(ctx.params.id) });
27
+ } catch (err) {
28
+ if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" ? 404 : 409 });
29
+ throw err;
30
+ }
31
+ };
32
+
33
+ export { GET };
34
+ //# sourceMappingURL=_server.ts.js-CoEdOiml.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../../../chunks/config.js-vThvQeMn.js';
@@ -30,13 +30,15 @@ var POST = async (ctx) => {
30
30
  }
31
31
  if (typeof body.width !== "number" || typeof body.height !== "number" || !Number.isFinite(body.width) || !Number.isFinite(body.height)) return json({ error: "BAD_REQUEST" }, { status: 400 });
32
32
  try {
33
- await browserRegistry.setViewport(ctx.params.id, body.width, body.height);
33
+ const targetId = typeof body.targetId === "string" && body.targetId ? body.targetId : void 0;
34
+ if (targetId) await browserRegistry.setViewport(ctx.params.id, body.width, body.height, targetId);
35
+ else await browserRegistry.setViewport(ctx.params.id, body.width, body.height);
34
36
  return json({ ok: true });
35
37
  } catch (err) {
36
- if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" ? 404 : 409 });
38
+ if (err instanceof BrowserRegistryRefusal) return json({ error: err.code }, { status: err.code === "NO_SESSION" || err.code === "NO_TARGET" ? 404 : 409 });
37
39
  throw err;
38
40
  }
39
41
  };
40
42
 
41
43
  export { POST };
42
- //# sourceMappingURL=_server.ts.js-BIF_7OHe.js.map
44
+ //# sourceMappingURL=_server.ts.js-CdELUoGT.js.map
@@ -1,4 +1,4 @@
1
- import { b as browserRegistry } from '../../../../chunks/registry.js-BC-TNdmn.js';
1
+ import { b as browserRegistry } from '../../../../chunks/registry.js-C2MdrfNv.js';
2
2
  import { j as json } from '../../../../chunks/utils.js-CAdNO8Tu.js';
3
3
  import '../../../../chunks/insight-config.js-Dp_2gB5J.js';
4
4
  import '../../../../chunks/config.js-vThvQeMn.js';
@@ -21,9 +21,19 @@ import '../../../../chunks/uneval.js-BJ9Qq2SF.js';
21
21
  * returns { id, port }. The registry owns every refusal.
22
22
  */
23
23
  var GET = () => json({ sessions: browserRegistry.list() });
24
- var POST = async () => {
24
+ var POST = async (event) => {
25
25
  try {
26
- const info = await browserRegistry.open();
26
+ let width;
27
+ let height;
28
+ try {
29
+ const body = event?.request ? await event.request.json() : {};
30
+ if (typeof body.width === "number" && body.width >= 200) width = Math.round(body.width);
31
+ if (typeof body.height === "number" && body.height >= 120) height = Math.round(body.height);
32
+ } catch {}
33
+ const info = await browserRegistry.open({
34
+ width,
35
+ height
36
+ });
27
37
  return json(info);
28
38
  } catch (e) {
29
39
  return json({
@@ -34,4 +44,4 @@ var POST = async () => {
34
44
  };
35
45
 
36
46
  export { GET, POST };
37
- //# sourceMappingURL=_server.ts.js-B7yjEF1N.js.map
47
+ //# sourceMappingURL=_server.ts.js-ea6HpNGh.js.map
@@ -1,5 +1,5 @@
1
1
  import { g as getDshConnection, s as statusFor, m as mapRpcFailure } from '../../../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { h as historyToEvents, e as eventsToEntries, a as entryForEvent } from '../../../../../../../chunks/dsh-events.js-CGuF_had.js';
2
+ import { h as historyToEvents, e as eventsToEntries, a as entryForEvent } from '../../../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
3
3
  import { f as filterKnobEvents, p as permissionFromProjection } from '../../../../../../../chunks/permission-state.js-B7UpAHBv.js';
4
4
  import { i as imageLimitsFromProjection } from '../../../../../../../chunks/image-limits.js-CUdJ0f7r.js';
5
5
  import { g as goalFromProjection } from '../../../../../../../chunks/goal-projection.js-0_34t60K.js';
@@ -217,4 +217,4 @@ var GET = async ({ params, url, setHeaders }) => {
217
217
  };
218
218
 
219
219
  export { GET };
220
- //# sourceMappingURL=_server.ts.js-lBsxHSo6.js.map
220
+ //# sourceMappingURL=_server.ts.js-BzP30TXW.js.map
@@ -1,5 +1,5 @@
1
1
  import { g as getDshConnection, s as statusFor, m as mapRpcFailure } from '../../../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { h as historyToEvents, e as eventsToEntries } from '../../../../../../../chunks/dsh-events.js-CGuF_had.js';
2
+ import { h as historyToEvents, e as eventsToEntries } from '../../../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
3
3
  import { j as json } from '../../../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../../../chunks/insight-config.js-Dp_2gB5J.js';
5
5
  import '../../../../../../../chunks/config.js-vThvQeMn.js';
@@ -55,4 +55,4 @@ var GET = async ({ params, url, setHeaders }) => {
55
55
  };
56
56
 
57
57
  export { GET };
58
- //# sourceMappingURL=_server.ts.js-BrEgFdCF.js.map
58
+ //# sourceMappingURL=_server.ts.js-B7YRQhuJ.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { g as gitGateEnabled, i as isInsideRoot } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { g as gitGateEnabled, i as isInsideRoot } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import { promises } from 'node:fs';
5
5
  import * as nodePath from 'node:path';
@@ -9,7 +9,7 @@ import '../../../../../chunks/settings-document.js-Gw1puaik.js';
9
9
  import 'node:os';
10
10
  import 'yaml';
11
11
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
12
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
12
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
13
13
  import '../../../../../chunks/merge.js-yMwW440S.js';
14
14
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
15
15
  import 'node:child_process';
@@ -108,4 +108,4 @@ var POST = async ({ request }) => {
108
108
  };
109
109
 
110
110
  export { POST };
111
- //# sourceMappingURL=_server.ts.js-BRhlbYEe.js.map
111
+ //# sourceMappingURL=_server.ts.js-B-5YihUA.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { g as gitGateEnabled, i as isInsideRoot, a as gitStatus, p as parsePorcelainStatus } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { g as gitGateEnabled, i as isInsideRoot, a as gitStatus, p as parsePorcelainStatus } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import { watch } from 'node:fs';
5
5
  import { join } from 'node:path';
@@ -10,7 +10,7 @@ import '../../../../../chunks/settings-document.js-Gw1puaik.js';
10
10
  import 'node:os';
11
11
  import 'yaml';
12
12
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
13
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
13
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
14
14
  import '../../../../../chunks/merge.js-yMwW440S.js';
15
15
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
16
16
  import '../../../../../chunks/shared.js-HQ0rfhm4.js';
@@ -312,4 +312,4 @@ var GET = async ({ url, request }) => {
312
312
  };
313
313
 
314
314
  export { GET };
315
- //# sourceMappingURL=_server.ts.js-B9YI66ZL.js.map
315
+ //# sourceMappingURL=_server.ts.js-DT5jRZFE.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { r as resolveEnclosingRepo, i as isInsideRoot, b as gitFileHead, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { r as resolveEnclosingRepo, i as isInsideRoot, b as gitFileHead, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../chunks/insight-config.js-Dp_2gB5J.js';
5
5
  import '../../../../../chunks/config.js-vThvQeMn.js';
@@ -9,7 +9,7 @@ import 'node:path';
9
9
  import 'node:os';
10
10
  import 'yaml';
11
11
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
12
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
12
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
13
13
  import '../../../../../chunks/merge.js-yMwW440S.js';
14
14
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
15
15
  import 'node:child_process';
@@ -77,4 +77,4 @@ var GET = async ({ url }) => {
77
77
  };
78
78
 
79
79
  export { GET };
80
- //# sourceMappingURL=_server.ts.js-DSvXRZQL.js.map
80
+ //# sourceMappingURL=_server.ts.js-DtW-utrd.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { d as detectRepos } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { d as detectRepos } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../chunks/insight-config.js-Dp_2gB5J.js';
5
5
  import '../../../../../chunks/config.js-vThvQeMn.js';
@@ -9,7 +9,7 @@ import 'node:path';
9
9
  import 'node:os';
10
10
  import 'yaml';
11
11
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
12
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
12
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
13
13
  import '../../../../../chunks/merge.js-yMwW440S.js';
14
14
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
15
15
  import 'node:child_process';
@@ -65,4 +65,4 @@ var GET = async ({ url }) => {
65
65
  };
66
66
 
67
67
  export { GET };
68
- //# sourceMappingURL=_server.ts.js-8A0skdlM.js.map
68
+ //# sourceMappingURL=_server.ts.js-8AIAo9jX.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { i as isInsideRoot, a as gitStatus, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { i as isInsideRoot, a as gitStatus, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../chunks/insight-config.js-Dp_2gB5J.js';
5
5
  import '../../../../../chunks/config.js-vThvQeMn.js';
@@ -9,7 +9,7 @@ import 'node:path';
9
9
  import 'node:os';
10
10
  import 'yaml';
11
11
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
12
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
12
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
13
13
  import '../../../../../chunks/merge.js-yMwW440S.js';
14
14
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
15
15
  import 'node:child_process';
@@ -70,4 +70,4 @@ var GET = async ({ url }) => {
70
70
  };
71
71
 
72
72
  export { GET };
73
- //# sourceMappingURL=_server.ts.js-Bc6J3t3m.js.map
73
+ //# sourceMappingURL=_server.ts.js-CMw96vjY.js.map
@@ -1,5 +1,5 @@
1
1
  import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { g as gitGateEnabled } from '../../../../../chunks/git-probe.js-Cn_ugqcH.js';
2
+ import { g as gitGateEnabled } from '../../../../../chunks/git-probe.js-CLF37SRh.js';
3
3
  import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
4
4
  import '../../../../../chunks/insight-config.js-Dp_2gB5J.js';
5
5
  import '../../../../../chunks/config.js-vThvQeMn.js';
@@ -9,7 +9,7 @@ import 'node:path';
9
9
  import 'node:os';
10
10
  import 'yaml';
11
11
  import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
12
- import '../../../../../chunks/dsh-events.js-CGuF_had.js';
12
+ import '../../../../../chunks/dsh-events.js-BUkLR6ZV.js';
13
13
  import '../../../../../chunks/merge.js-yMwW440S.js';
14
14
  import '../../../../../chunks/permission-state.js-B7UpAHBv.js';
15
15
  import 'node:child_process';
@@ -52,4 +52,4 @@ var GET = async ({ url }) => {
52
52
  };
53
53
 
54
54
  export { GET };
55
- //# sourceMappingURL=_server.ts.js-CfL8Por5.js.map
55
+ //# sourceMappingURL=_server.ts.js-DKufa14_.js.map
@@ -1,9 +1,9 @@
1
1
  import { V as head, W as escape_html, M as derived } from '../../chunks/server.js-B1bDXhHu.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-Dki_Bq11.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-BSiAgink.js';
3
3
  import '../../chunks/uneval.js-BJ9Qq2SF.js';
4
4
  import '../../chunks/index-server.js-DmIEbDVz.js';
5
5
  import '../../chunks/shared.js-HQ0rfhm4.js';
6
- import '../../chunks/internal2.js-DFG0wDsP.js';
6
+ import '../../chunks/internal2.js-Ba5p8uFM.js';
7
7
  import '../../chunks/exports.js-DH_tjtdv.js';
8
8
  import '../../chunks/config.js-vThvQeMn.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-EnDLC3Jj.js.map
44
+ //# sourceMappingURL=_error.svelte.js-D8-G0evO.js.map
@@ -1,5 +1,5 @@
1
1
  import { g as getDshConnection, D as DshRpcError, i as isSubagentRejection } from '../../chunks/dsh-connection.js-BgeraFA2.js';
2
- import { h as historyToEvents, e as eventsToEntries } from '../../chunks/dsh-events.js-CGuF_had.js';
2
+ import { h as historyToEvents, e as eventsToEntries } from '../../chunks/dsh-events.js-BUkLR6ZV.js';
3
3
  import { p as permissionFromProjection, f as filterKnobEvents } from '../../chunks/permission-state.js-B7UpAHBv.js';
4
4
  import { i as imageLimitsFromProjection } from '../../chunks/image-limits.js-CUdJ0f7r.js';
5
5
  import { d as deliverablesFromEvents } from '../../chunks/deliverables.js-Dg6XzNkW.js';
@@ -88,4 +88,4 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
88
88
  });
89
89
 
90
90
  export { _page_server_ts as _ };
91
- //# sourceMappingURL=_page.server.ts.js-ar1DbW1v.js.map
91
+ //# sourceMappingURL=_page.server.ts.js-7x6ZfGoB.js.map