@deepseek-insight/dsi 0.11.0 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -30
- package/bin/dsi-chassis.mjs +371 -0
- package/bin/dsi.mjs +22 -5
- package/build/client/_app/immutable/chunks/{e-3PBXxJ.js → BXbGQv0I.js} +1 -1
- package/build/client/_app/immutable/chunks/{UPlr67N1.js → CLf6wcwo.js} +2 -2
- package/build/client/_app/immutable/chunks/DXwjOJ3W.js +1 -0
- package/build/client/_app/immutable/chunks/FP3OKgFQ.js +1 -0
- package/build/client/_app/immutable/entry/{app.ezxtVZch.js → app.wTcqn7d3.js} +2 -2
- package/build/client/_app/immutable/entry/start.Bo2gqLX-.js +1 -0
- package/build/client/_app/immutable/nodes/{1.CGppLUrN.js → 1.5Yu0dCHp.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.9BE7-E5x.js → 2.DAzLHFNq.js} +107 -107
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +4 -4
- package/build/index.js +4 -4
- package/build/server/chunks/chunks/{internal2.js-Cu5N8_4R.js → internal2.js-D_dNqBcA.js} +2 -2
- package/build/server/chunks/chunks/{registry.js-Bwc2MNSZ.js → registry.js-Cnmd1vW3.js} +194 -19
- package/build/server/chunks/chunks/{state.js-CRPhnJJH.js → state.js-BIGPexgb.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-BxfB-QXT.js → _server.ts.js-DlbbO3RF.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-DT6rU-EU.js → _server.ts.js-B85bLw4w.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-Cwu4C98Y.js → _server.ts.js-Dt5Bxv2-.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-B55tx3-S.js → _server.ts.js-uJ5BnGUA.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-D2ft7u0s.js → _server.ts.js-CVCoWk2n.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-BO1uO6i3.js → _server.ts.js-CmhQ7zGO.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-zOccgfJZ.js → _server.ts.js-CFtpmSCd.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-DgyR0sLf.js → _server.ts.js-BH8MNt9W.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-CPCIL2MG.js → _server.ts.js-uIrK0T8h.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-Cjvr5nEt.js → _server.ts.js-Bg5yHS9F.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-Bb3DkB-H.js → _server.ts.js-DG6xvUsm.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-DVcq1pYf.js → _server.ts.js-RiXP45mV.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-D1xgkwTO.js → _server.ts.js-w9MNQddQ.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-DFo94fTq.js → _server.ts.js-BoXDoshV.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-0Gye8oLN.js → _server.ts.js-pQmJm_Io.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-CJ9RHd_3.js → _error.svelte.js-MpJVAPPn.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-DlLAziUY.js → _page.svelte.js-tSeYvTqX.js} +111 -10
- package/build/server/chunks/{handler-BRlzTcii.js → handler-CdfDULha.js} +3 -3
- package/build/server/chunks/{index.js-D2umW-Cg.js → index.js-CAZuEVlJ.js} +2 -2
- package/build/server/chunks/{manifest.js-CaT4HRXz.js → manifest.js-Bq-QTetg.js} +19 -19
- package/build/server/chunks/nodes/1.js-CKR9qKW9.js +9 -0
- package/build/server/chunks/nodes/{2.js-CF_m1q-z.js → 2.js-BuwXpGsh.js} +3 -3
- package/package.json +1 -1
- package/skills/dsi-host-drive/SKILL.md +96 -0
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/build/client/_app/immutable/chunks/Dj8AK3pr.js +0 -1
- package/build/client/_app/immutable/chunks/WySTHi46.js +0 -1
- package/build/client/_app/immutable/entry/start.DdPLwPDt.js +0 -1
- package/build/server/chunks/nodes/1.js-cXTCbvze.js +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1794185400867"}
|
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-
|
|
6
|
-
import './server/chunks/index.js-
|
|
7
|
-
import './server/chunks/manifest.js-
|
|
5
|
+
export { h as handler } from './server/chunks/handler-CdfDULha.js';
|
|
6
|
+
import './server/chunks/index.js-CAZuEVlJ.js';
|
|
7
|
+
import './server/chunks/manifest.js-Bq-QTetg.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-
|
|
22
|
+
import './server/chunks/chunks/internal2.js-D_dNqBcA.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-
|
|
4
|
+
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-CdfDULha.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-
|
|
17
|
+
import './server/chunks/index.js-CAZuEVlJ.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-
|
|
21
|
+
import './server/chunks/chunks/internal2.js-D_dNqBcA.js';
|
|
22
22
|
import './server/chunks/chunks/exports.js-D5zA1U7A.js';
|
|
23
|
-
import './server/chunks/manifest.js-
|
|
23
|
+
import './server/chunks/manifest.js-Bq-QTetg.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: "
|
|
583
|
+
version_hash: "2dfz9b"
|
|
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-
|
|
606
|
+
//# sourceMappingURL=internal2.js-D_dNqBcA.js.map
|
|
@@ -1,10 +1,54 @@
|
|
|
1
1
|
import { d as readBrowserConfig } from './insight-config.js-ylYA2CXm.js';
|
|
2
|
-
import { mkdirSync,
|
|
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() {
|
|
@@ -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
|
-
|
|
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 =
|
|
903
|
+
const profileDir = disposableProfilePath(cfg.profileRoot, id);
|
|
865
904
|
mkdirSync(profileDir, { recursive: true });
|
|
866
|
-
|
|
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",
|
|
@@ -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-
|
|
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-
|
|
3
|
+
import './internal2.js-D_dNqBcA.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-
|
|
307
|
+
//# sourceMappingURL=state.js-BIGPexgb.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
45
|
+
//# sourceMappingURL=_server.ts.js-DlbbO3RF.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry } from '../../../../../../chunks/registry.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-
|
|
32
|
+
//# sourceMappingURL=_server.ts.js-B85bLw4w.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
51
|
+
//# sourceMappingURL=_server.ts.js-Dt5Bxv2-.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
43
|
+
//# sourceMappingURL=_server.ts.js-uJ5BnGUA.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
61
|
+
//# sourceMappingURL=_server.ts.js-CVCoWk2n.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
79
|
+
//# sourceMappingURL=_server.ts.js-CmhQ7zGO.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
50
|
+
//# sourceMappingURL=_server.ts.js-CFtpmSCd.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
66
|
+
//# sourceMappingURL=_server.ts.js-BH8MNt9W.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
47
|
+
//# sourceMappingURL=_server.ts.js-uIrK0T8h.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
34
|
+
//# sourceMappingURL=_server.ts.js-Bg5yHS9F.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
103
|
+
//# sourceMappingURL=_server.ts.js-DG6xvUsm.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
34
|
+
//# sourceMappingURL=_server.ts.js-RiXP45mV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry, B as BrowserRegistryRefusal } from '../../../../../../chunks/registry.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-
|
|
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-
|
|
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-
|
|
62
|
+
//# sourceMappingURL=_server.ts.js-BoXDoshV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as browserRegistry } from '../../../../chunks/registry.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-
|
|
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-
|
|
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-BIGPexgb.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-
|
|
6
|
+
import '../../chunks/internal2.js-D_dNqBcA.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-
|
|
44
|
+
//# sourceMappingURL=_error.svelte.js-MpJVAPPn.js.map
|