@deepseek-insight/dsi 0.10.0 → 0.10.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/.agents/skills/glass-dsi/scripts/_connect.mjs +68 -9
- package/.agents/skills/glass-dsi/scripts/glass.mjs +6 -5
- package/.agents/skills/glass-url/scripts/_connect.mjs +59 -10
- package/.agents/skills/glass-url/scripts/glass-url.mjs +5 -4
- package/README.md +44 -15
- package/bin/dsi.mjs +44 -7
- package/bin/lib/dev-mode.mjs +8 -5
- package/bin/lib/glass-browser-bootstrap.mjs +132 -0
- package/bin/lib/mcp-banner.mjs +26 -0
- package/bin/lib/zai-patch.mjs +3 -1
- package/build/client/_app/immutable/assets/0.B2rul4Mk.css +2 -0
- package/build/client/_app/immutable/assets/2.glyfXGzi.css +1 -0
- package/build/client/_app/immutable/chunks/{Bu2owQS4.js → BodLd2is.js} +1 -1
- package/build/client/_app/immutable/chunks/Cy4hfhN-.js +1 -0
- package/build/client/_app/immutable/chunks/D17XAauH.js +2 -0
- package/build/client/_app/immutable/chunks/FY34R_78.js +1 -0
- package/build/client/_app/immutable/entry/{app.DjLAWmJH.js → app.ClaEF2lH.js} +2 -2
- package/build/client/_app/immutable/entry/start.CU6iOT39.js +1 -0
- package/build/client/_app/immutable/nodes/{1.w6Hz6-dJ.js → 1.CSTMQTZ7.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.CFmqEODJ.js → 2.CdbJFHUF.js} +197 -199
- package/build/client/_app/version.json +1 -1
- package/build/handler.js +5 -5
- package/build/index.js +5 -5
- package/build/server/chunks/chunks/{db.js-f2PmBjyD.js → db.js-BGSxIVb3.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-DkwY64WO.js → db2.js-vQNFcVO7.js} +2 -2
- package/build/server/chunks/chunks/{dsh-connection.js-BW07Aicl.js → dsh-connection.js-Dcdxqp52.js} +27 -7
- package/build/server/chunks/chunks/{exports.js-DH_tjtdv.js → exports.js-D5zA1U7A.js} +42 -4
- package/build/server/chunks/chunks/{git-probe.js-CQqTV7XX.js → git-probe.js-BIieYqLU.js} +2 -2
- package/build/server/chunks/chunks/{insight-config.js-C5-Rhh5A.js → insight-config.js-ylYA2CXm.js} +2 -2
- package/build/server/chunks/chunks/{internal2.js-DRFhzPda.js → internal2.js-XxZ8wzRE.js} +3 -3
- package/build/server/chunks/chunks/{registry.js-CWnRQ4vx.js → registry.js-ClhrzR6O.js} +145 -56
- package/build/server/chunks/chunks/{registry2.js-CFzpvj9c.js → registry2.js-BZfrwsOy.js} +20 -1
- package/build/server/chunks/chunks/{settings-document.js-DxKURfc_.js → settings-document.js-BIxaivJ1.js} +23 -8
- package/build/server/chunks/chunks/{state.js-kZHonU4N.js → state.js-D5zsYmjz.js} +3 -3
- package/build/server/chunks/chunks/{watcher.js-DvlNn8X0.js → watcher.js-Bcm29AuA.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-DItDXV23.js → _server.ts.js-BbIEpZB5.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-Hor8QZb1.js → _server.ts.js-Daho1I-l.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-CEvvsa8B.js → _server.ts.js-C5X77Uef.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/browser/_id_/activate/{_server.ts.js-sXqf-okw.js → _server.ts.js-B-Ns5pyR.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/close/{_server.ts.js-Byj9ApJh.js → _server.ts.js-CzXe-sTr.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/closetab/{_server.ts.js-DOIsrzvg.js → _server.ts.js-Ct465_rt.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/element/{_server.ts.js-Cq3gmRfE.js → _server.ts.js-6mdytkvM.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/history/{_server.ts.js-BGSLIV0t.js → _server.ts.js-BwUPVQGx.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/input/{_server.ts.js-8slca75-.js → _server.ts.js-8Nq3JxSo.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/mcp/{_server.ts.js-CpbdTYds.js → _server.ts.js-B9eKtj1-.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/navigate/{_server.ts.js-Bls9LtLY.js → _server.ts.js-CHJs9Qbl.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/opentab/{_server.ts.js-DqNi_iW_.js → _server.ts.js-B32Ow0Y2.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/page/{_server.ts.js-DuXWwo7i.js → _server.ts.js-Cpv4BolN.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/stream/{_server.ts.js-DXfqBDEw.js → _server.ts.js-DJqJImSI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/tabs/{_server.ts.js-Bgnl8lYs.js → _server.ts.js-Bm6IAZF6.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/viewport/{_server.ts.js-FHmQVbrv.js → _server.ts.js-B1VVzfCk.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/_id_/zoom/{_server.ts.js-BV4cBtSA.js → _server.ts.js-CoUpqHeq.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/browser/{_server.ts.js-4vgkwh7v.js → _server.ts.js-D9hK0CG8.js} +8 -5
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-C_9kwANR.js → _server.ts.js-DqPIv-gn.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-h1OTHcL4.js → _server.ts.js-DzFVVhO_.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/jobs/{_server.ts.js-B6nih9Sd.js → _server.ts.js-DvuZUgbK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/jobs/follow/{_server.ts.js-Cf17SVmD.js → _server.ts.js-D6brRlYZ.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-DjNwMbdS.js → _server.ts.js-8nNlcikK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-Cz5aaEhC.js → _server.ts.js-C8AZBt63.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-BFBy5O9Y.js → _server.ts.js-BFfr6uJh.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-CgEdCo3T.js → _server.ts.js-DSSgbD87.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-Bo_aEnHh.js → _server.ts.js-DYtrYC2P.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/changes/{_server.ts.js-Bd2G_GaH.js → _server.ts.js-HxI5M4jg.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-DL64FyRw.js → _server.ts.js-Ch0dMm33.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-MhOGB66D.js → _server.ts.js-BG5C--Ok.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-MjPgXgGO.js → _server.ts.js-B64YyaFI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-BUjDae5H.js → _server.ts.js-0RtL-9Zr.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-dTKd7Hsv.js → _server.ts.js-C4k-RTIw.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-B82rvKoI.js → _server.ts.js-CU38DxMt.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/path/{_server.ts.js-Cqijsi-c.js → _server.ts.js-BXphf5ux.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-CL_vVv2p.js → _server.ts.js-DQ5FG9Pc.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-WS4W9Ly4.js → _server.ts.js-In3bXhUO.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-B72KGRGh.js → _server.ts.js-Bd0KF8Qm.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-DK5xb2b5.js → _server.ts.js-4Y-KAw2r.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-lhT87EQu.js → _server.ts.js-zXYA1AJD.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-CMhfhbkN.js → _server.ts.js-vh7lFV0n.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/subagents/{_server.ts.js-BLvcFsg6.js → _server.ts.js-DH7OEWm0.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-D_rw2Uq6.js → _server.ts.js-CDwgBp7D.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-DfXpMMpw.js → _server.ts.js-CtFxC_yV.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-2mJCJVxk.js → _server.ts.js-DRNzGdAj.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-BCx0Lzjf.js → _server.ts.js-DIjNfN0d.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-DECaSjwp.js → _server.ts.js-CtV7JhrK.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-i_ciJzlb.js → _server.ts.js-Cg9zHbUP.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-BO1pScn7.js → _server.ts.js-DOHmlKvl.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-Buhpf7WE.js → _server.ts.js-COVyy224.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-DngUQzcT.js → _server.ts.js-HjpfRAaT.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/delete/_server.ts.js-D9UU6xR6.js +42 -0
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/output/{_server.ts.js-DLETP4yQ.js → _server.ts.js-BqJRMRsb.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/reattach/{_server.ts.js-uWl6oxPS.js → _server.ts.js-D6bMXeOk.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/send/{_server.ts.js-DYNmXaAd.js → _server.ts.js-BRgsqPFM.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/_id_/stream/{_server.ts.js-C5m3Ktho.js → _server.ts.js-EWo4sSmg.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/terminal/{_server.ts.js-DoTNvcOa.js → _server.ts.js-v1ixRdpN.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/terminal/stream/_server.ts.js-BQOQyT7o.js +185 -0
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-BzYOJSkI.js → _server.ts.js-CjU6bLOf.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-xcNesei9.js → _server.ts.js-CYU0btiH.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-DsJWYdxt.js → _server.ts.js-Du9YcwLw.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-CNCku9BR.js → _server.ts.js-BdV_KDjb.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-nLsNjOxj.js → _server.ts.js-C-C84Yzu.js} +5 -5
- package/build/server/chunks/entries/endpoints/api/workspace/write-gate/{_server.ts.js-urQk2-ds.js → _server.ts.js-D9uFvZya.js} +5 -5
- package/build/server/chunks/entries/{hooks.server.js-CU2RE5vs.js → hooks.server.js-YJQlamhk.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-BKhpJygh.js → _error.svelte.js-TrOSxb0e.js} +4 -4
- package/build/server/chunks/entries/pages/{_page.server.ts.js-BK3Y6eff.js → _page.server.ts.js-BFDPRDEm.js} +2 -2
- package/build/server/chunks/entries/pages/{_page.svelte.js-BlbGdGej.js → _page.svelte.js-BUuXoaje.js} +706 -158
- package/build/server/chunks/{handler-BtG6aVza.js → handler-BOqY82LA.js} +3 -3
- package/build/server/chunks/{index.js-rGfUdWOY.js → index.js-M1GginY2.js} +3 -44
- package/build/server/chunks/{manifest.js-DwQ7BEt1.js → manifest.js-BEmwisii.js} +81 -67
- package/build/server/chunks/nodes/{0.js-Cum-Y-us.js → 0.js-Do4ZKaKe.js} +3 -3
- package/build/server/chunks/nodes/1.js-CRbdbfof.js +9 -0
- package/build/server/chunks/nodes/{2.js-ButkUErW.js → 2.js-BFX_zPfJ.js} +8 -8
- package/package.json +1 -1
- package/skills/dsi-drive-terminal/SKILL.md +23 -1
- package/skills/dsi-spec/SKILL.md +8 -0
- package/skills/dsi-task/SKILL.md +34 -0
- package/skills/dsi-token-spent/SKILL.md +122 -0
- package/template/.dsi/prompts.sqlite +0 -0
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/build/client/_app/immutable/assets/0.uhYTRapi.css +0 -2
- package/build/client/_app/immutable/assets/2.D0QOh44D.css +0 -1
- package/build/client/_app/immutable/chunks/0Uk2rkmL.js +0 -1
- package/build/client/_app/immutable/chunks/BaH6C3xD.js +0 -2
- package/build/client/_app/immutable/chunks/DXba8Dom.js +0 -1
- package/build/client/_app/immutable/entry/start.D-t6KuoK.js +0 -1
- package/build/server/chunks/nodes/1.js-D0EwPqp_.js +0 -9
- /package/build/client/_app/immutable/nodes/{0.DeDuCaDD.js → 0.CYP0vr1_.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1794104267615"}
|
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-BOqY82LA.js';
|
|
6
|
+
import './server/chunks/index.js-M1GginY2.js';
|
|
7
|
+
import './server/chunks/manifest.js-BEmwisii.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-
|
|
23
|
-
import './server/chunks/chunks/exports.js-
|
|
22
|
+
import './server/chunks/chunks/internal2.js-XxZ8wzRE.js';
|
|
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-BOqY82LA.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-M1GginY2.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-
|
|
22
|
-
import './server/chunks/chunks/exports.js-
|
|
23
|
-
import './server/chunks/manifest.js-
|
|
21
|
+
import './server/chunks/chunks/internal2.js-XxZ8wzRE.js';
|
|
22
|
+
import './server/chunks/chunks/exports.js-D5zA1U7A.js';
|
|
23
|
+
import './server/chunks/manifest.js-BEmwisii.js';
|
|
24
24
|
import 'node:url';
|
|
25
25
|
|
|
26
26
|
const path = env('SOCKET_PATH', false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DSI_CONFIG_PATH } from './insight-config.js-
|
|
1
|
+
import { D as DSI_CONFIG_PATH } from './insight-config.js-ylYA2CXm.js';
|
|
2
2
|
import { mkdirSync } from 'node:fs';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
4
|
import { DatabaseSync } from 'node:sqlite';
|
|
@@ -117,4 +117,4 @@ function pruneTerminalBefore(cutoffMs, db = openA2aDb()) {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export { listRecent as a, getRow as g, insertWaiting as i, listWaiting as l, openA2aDb as o, pruneTerminalBefore as p, settleRow as s };
|
|
120
|
-
//# sourceMappingURL=db.js-
|
|
120
|
+
//# sourceMappingURL=db.js-BGSxIVb3.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as readPromptsConfig, D as DSI_CONFIG_PATH, j as joinTagWords, p as parseTagWords } from './insight-config.js-
|
|
1
|
+
import { e as readPromptsConfig, D as DSI_CONFIG_PATH, j as joinTagWords, p as parseTagWords } from './insight-config.js-ylYA2CXm.js';
|
|
2
2
|
import { mkdirSync } from 'node:fs';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
4
|
import { DatabaseSync } from 'node:sqlite';
|
|
@@ -762,4 +762,4 @@ function updatePrompt(id, fields) {
|
|
|
762
762
|
}
|
|
763
763
|
|
|
764
764
|
export { countPromptUse as a, renamePromptLabel as b, createPrompt as c, deletePrompt as d, listPrompts as l, resolvePromptsDbPath as r, searchPrompts as s, updatePrompt as u };
|
|
765
|
-
//# sourceMappingURL=db2.js-
|
|
765
|
+
//# sourceMappingURL=db2.js-vQNFcVO7.js.map
|
package/build/server/chunks/chunks/{dsh-connection.js-BW07Aicl.js → dsh-connection.js-Dcdxqp52.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as readDshAuthConfig, a as readServerConfig, b as readDshPresetEnglishConfig } from './insight-config.js-
|
|
1
|
+
import { r as readDshAuthConfig, a as readServerConfig, b as readDshPresetEnglishConfig } from './insight-config.js-ylYA2CXm.js';
|
|
2
2
|
import { z as dshBaseUrl } from './config.js-r_jw_bQQ.js';
|
|
3
3
|
|
|
4
4
|
//#region src/lib/server/dsh-rpc.ts
|
|
@@ -1914,12 +1914,18 @@ var RpcRelay = class {
|
|
|
1914
1914
|
};
|
|
1915
1915
|
}
|
|
1916
1916
|
/**
|
|
1917
|
-
* POC-2 W3 — session.create
|
|
1917
|
+
* POC-2 W3 — session.create → {sessionId, …}.
|
|
1918
1918
|
* Live-probed round-trip 2026-08-21 (probe7 → real session id).
|
|
1919
|
+
* Birth Workspace Attach (2026-11-06, The Frozen Roster amendment D5):
|
|
1920
|
+
* the location is EITHER workspaceId OR cwd — never both (the host
|
|
1921
|
+
* refuses the pair gateway/bad-request; commands.js:113-115). With
|
|
1922
|
+
* workspaceId the host derives the cwd from the workspace row and
|
|
1923
|
+
* attaches the session to the roster at birth.
|
|
1919
1924
|
*/
|
|
1920
|
-
async createSession(cwd, agentPreset) {
|
|
1925
|
+
async createSession(cwd, agentPreset, workspaceId) {
|
|
1926
|
+
const location = workspaceId !== void 0 ? { workspaceId } : cwd === void 0 ? {} : { cwd };
|
|
1921
1927
|
return await this.conn.rpc(DSH_METHODS.create, DSH_ARGS.create({
|
|
1922
|
-
...
|
|
1928
|
+
...location,
|
|
1923
1929
|
...agentPreset === void 0 ? {} : { agentPreset }
|
|
1924
1930
|
}));
|
|
1925
1931
|
}
|
|
@@ -2571,9 +2577,23 @@ var DshConnection = class {
|
|
|
2571
2577
|
async historyPage(sessionId, beforeSeq) {
|
|
2572
2578
|
return this.relay.historyPage(sessionId, beforeSeq);
|
|
2573
2579
|
}
|
|
2574
|
-
/**
|
|
2580
|
+
/**
|
|
2581
|
+
* session.create {cwd?|workspaceId?, agentPreset?} — Birth Workspace
|
|
2582
|
+
* Attach (2026-11-06, The Frozen Roster amendment D5/D6): an exact
|
|
2583
|
+
* canonical-path match between the requested cwd and a registered
|
|
2584
|
+
* workspace sends {workspaceId} so the host ATTACHES the session to
|
|
2585
|
+
* the roster at birth (the cwd is omitted — the host derives it from
|
|
2586
|
+
* the row). No match, empty registry, or a LOOKUP failure falls back
|
|
2587
|
+
* to {cwd} exactly as before — resolution failure never fails the
|
|
2588
|
+
* create (D6: no match is a silent fallback, never an auto-adopt).
|
|
2589
|
+
*/
|
|
2575
2590
|
async createSession(cwd, agentPreset) {
|
|
2576
|
-
|
|
2591
|
+
let workspaceId;
|
|
2592
|
+
if (cwd !== void 0) try {
|
|
2593
|
+
const { items } = await this.listWorkspaces();
|
|
2594
|
+
workspaceId = items.find((w) => w.path === cwd)?.workspaceId;
|
|
2595
|
+
} catch {}
|
|
2596
|
+
return this.relay.createSession(cwd, agentPreset, workspaceId);
|
|
2577
2597
|
}
|
|
2578
2598
|
/** session/fork — the fork child. */
|
|
2579
2599
|
async forkSession(sessionId, atSeq) {
|
|
@@ -2636,4 +2656,4 @@ var DshConnection = class {
|
|
|
2636
2656
|
};
|
|
2637
2657
|
|
|
2638
2658
|
export { DshRpcError as D, isPromptImageMediaType as a, buildPromptContent as b, getDshConnection as g, isSubagentRejection as i, mapRpcFailure as m, statusFor as s };
|
|
2639
|
-
//# sourceMappingURL=dsh-connection.js-
|
|
2659
|
+
//# sourceMappingURL=dsh-connection.js-Dcdxqp52.js.map
|
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.56.10_vite@8.2.2_@type_60f7eb265b11a32382764d70df8bbe24/node_modules/@sveltejs/kit/src/runtime/pathname.js
|
|
2
|
+
var DATA_SUFFIX = "/__data.json";
|
|
3
|
+
var HTML_DATA_SUFFIX = ".html__data.json";
|
|
4
|
+
/** @param {string} pathname */
|
|
5
|
+
function has_data_suffix(pathname) {
|
|
6
|
+
return pathname.endsWith(DATA_SUFFIX) || pathname.endsWith(HTML_DATA_SUFFIX);
|
|
7
|
+
}
|
|
8
|
+
/** @param {string} pathname */
|
|
9
|
+
function add_data_suffix(pathname) {
|
|
10
|
+
if (pathname.endsWith(".html")) return pathname.replace(/\.html$/, HTML_DATA_SUFFIX);
|
|
11
|
+
return pathname.replace(/\/$/, "") + DATA_SUFFIX;
|
|
12
|
+
}
|
|
13
|
+
/** @param {string} pathname */
|
|
14
|
+
function strip_data_suffix(pathname) {
|
|
15
|
+
if (pathname.endsWith(HTML_DATA_SUFFIX)) return pathname.slice(0, -16) + ".html";
|
|
16
|
+
return pathname.slice(0, -12);
|
|
17
|
+
}
|
|
18
|
+
var ROUTE_SUFFIX = "/__route.js";
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} pathname
|
|
21
|
+
* @returns {boolean}
|
|
22
|
+
*/
|
|
23
|
+
function has_resolution_suffix(pathname) {
|
|
24
|
+
return pathname.endsWith(ROUTE_SUFFIX);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Convert a regular URL to a route to send to SvelteKit's server-side route resolution endpoint
|
|
28
|
+
* @param {string} pathname
|
|
29
|
+
* @returns {string}
|
|
30
|
+
*/
|
|
31
|
+
function add_resolution_suffix(pathname) {
|
|
32
|
+
return pathname.replace(/\/$/, "") + ROUTE_SUFFIX;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @param {string} pathname
|
|
36
|
+
* @returns {string}
|
|
37
|
+
*/
|
|
38
|
+
function strip_resolution_suffix(pathname) {
|
|
39
|
+
return pathname.slice(0, -11);
|
|
40
|
+
}
|
|
1
41
|
var internal = new URL("sveltekit-internal://");
|
|
2
42
|
/**
|
|
3
43
|
* @param {string} base
|
|
@@ -129,8 +169,6 @@ function hash(...values) {
|
|
|
129
169
|
} else throw new TypeError("value must be a string or TypedArray");
|
|
130
170
|
return (hash >>> 0).toString(36);
|
|
131
171
|
}
|
|
132
|
-
//#endregion
|
|
133
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.56.10_vite@8.2.2_@type_60f7eb265b11a32382764d70df8bbe24/node_modules/@sveltejs/kit/src/utils/routing.js
|
|
134
172
|
/**
|
|
135
173
|
* @param {RegExpMatchArray} match
|
|
136
174
|
* @param {import('types').RouteParam[]} params
|
|
@@ -259,5 +297,5 @@ var validate_page_exports = validator(valid_page_exports);
|
|
|
259
297
|
var validate_layout_server_exports = validator(valid_layout_server_exports);
|
|
260
298
|
var validate_page_server_exports = validator(valid_page_server_exports);
|
|
261
299
|
|
|
262
|
-
export {
|
|
263
|
-
//# sourceMappingURL=exports.js-
|
|
300
|
+
export { has_data_suffix as a, strip_data_suffix as b, add_data_suffix as c, decode_pathname as d, add_resolution_suffix as e, find_route as f, disable_search as g, has_resolution_suffix as h, validate_layout_exports as i, validate_page_server_exports as j, validate_page_exports as k, hash as l, make_trackable as m, normalize_path as n, resolve as r, strip_resolution_suffix as s, validate_layout_server_exports as v };
|
|
301
|
+
//# sourceMappingURL=exports.js-D5zA1U7A.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDshConnection } from './dsh-connection.js-
|
|
1
|
+
import { g as getDshConnection } from './dsh-connection.js-Dcdxqp52.js';
|
|
2
2
|
import { h as historyToEvents } from './dsh-events.js-BHf0lLZ5.js';
|
|
3
3
|
import { a as foldKnobs, f as filterKnobEvents, F as FULL_ACCESS_PRESET } from './permission-state.js-B7UpAHBv.js';
|
|
4
4
|
import { promises } from 'node:fs';
|
|
@@ -216,4 +216,4 @@ async function gitStatus(repo) {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
export { GitUnavailableError as G, gitStatus as a, gitFileHead as b, detectRepos as d, gitGateEnabled as g, isInsideRoot as i, parsePorcelainStatus as p, resolveEnclosingRepo as r };
|
|
219
|
-
//# sourceMappingURL=git-probe.js-
|
|
219
|
+
//# sourceMappingURL=git-probe.js-BIieYqLU.js.map
|
package/build/server/chunks/chunks/{insight-config.js-C5-Rhh5A.js → insight-config.js-ylYA2CXm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as resolveA2aConfig, n as intWithin, i as isConfigRecord, D as DEFAULT_PROMPT_TAGS, o as resolveSidebarPlacement, p as resolveWidthBounds, q as resolvePanelPresets, s as resolveZoomBounds, t as resolveConversationFlags, u as resolveStatsBarMode, a as DEFAULT_SIDEBAR_PLACEMENT, c as DEFAULT_PANEL_MAX_ZOOM, d as DEFAULT_PANEL_MIN_ZOOM, e as DEFAULT_A2A_WATCH_TIMEOUT_MS, f as DEFAULT_A2A_FAST_POLL_MS, h as DEFAULT_HOME_REFRESH_MS, j as DEFAULT_HEARTBEAT_TYPE, k as DEFAULT_STATS_BAR_MODE, l as DEFAULT_POLL_IDLE_MS, m as DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS, v as DEFAULT_TERMINAL_IDLE_MS, w as DEFAULT_TERMINAL_GRACE_MS, x as DEFAULT_TERMINAL_SPILL_BYTES, y as DEFAULT_TERMINAL_TAIL_BYTES } from './config.js-r_jw_bQQ.js';
|
|
2
|
-
import { e as ensureDsiHome, m as migrateLegacyDsiConfig, p as parseYamlSettings } from './settings-document.js-
|
|
2
|
+
import { e as ensureDsiHome, m as migrateLegacyDsiConfig, p as parseYamlSettings } from './settings-document.js-BIxaivJ1.js';
|
|
3
3
|
import { s as settingsHomeDir } from './settings-home2.js-f75-B6RI.js';
|
|
4
4
|
import { readFileSync } from 'node:fs';
|
|
5
5
|
import { dirname, join } from 'node:path';
|
|
@@ -353,4 +353,4 @@ function readBrowserConfig(configPath) {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
export { DEFAULT_CHAT_CONFIG as A, readTerminalConfig as B, DSI_CONFIG_PATH as D, readServerConfig as a, readDshPresetEnglishConfig as b, readA2aConfig as c, readBrowserConfig as d, readPromptsConfig as e, readSettingsHomes as f, readJobsConfig as g, readSidebarConfig as h, readPanelPresets as i, joinTagWords as j, readPanelConfig as k, readHomeConfig as l, readConversationConfig as m, readChatConfig as n, readDshSessionsRootConfig as o, parseTagWords as p, isValidTagWord as q, readDshAuthConfig as r, DEFAULT_DSH_PRESET_ENGLISH as s, DEFAULT_SERVER_CONFIG as t, DEFAULT_PROMPTS_CONFIG as u, DEFAULT_SIDEBAR_CONFIG as v, DEFAULT_PANEL_CONFIG as w, DEFAULT_A2A_CONFIG as x, DEFAULT_HOME_CONFIG as y, DEFAULT_CONVERSATION_CONFIG as z };
|
|
356
|
-
//# sourceMappingURL=insight-config.js-
|
|
356
|
+
//# sourceMappingURL=insight-config.js-ylYA2CXm.js.map
|
|
@@ -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: "1uhloe2"
|
|
584
584
|
};
|
|
585
585
|
async function get_hooks() {
|
|
586
586
|
let handle;
|
|
@@ -588,7 +588,7 @@ async function get_hooks() {
|
|
|
588
588
|
let handleError;
|
|
589
589
|
let handleValidationError;
|
|
590
590
|
let init;
|
|
591
|
-
({handle, handleFetch, handleError, handleValidationError, init} = await import('../entries/hooks.server.js-
|
|
591
|
+
({handle, handleFetch, handleError, handleValidationError, init} = await import('../entries/hooks.server.js-YJQlamhk.js'));
|
|
592
592
|
let reroute;
|
|
593
593
|
let transport;
|
|
594
594
|
return {
|
|
@@ -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-XxZ8wzRE.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as readBrowserConfig } from './insight-config.js-
|
|
2
|
-
import { mkdirSync, rmSync, readdirSync } from 'node:fs';
|
|
1
|
+
import { d as readBrowserConfig } from './insight-config.js-ylYA2CXm.js';
|
|
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
|
|
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:
|
|
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:
|
|
823
|
-
timezoneId:
|
|
824
|
-
locale:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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 console.warn("profile cleanup skipped - dir outside disposable root: " + entry.profileDir);
|
|
1079
1165
|
} catch (e) {
|
|
1080
1166
|
errs.push(e);
|
|
1081
1167
|
}
|
|
@@ -1313,54 +1399,57 @@ var BrowserRegistry = class {
|
|
|
1313
1399
|
w: cw,
|
|
1314
1400
|
h: ch
|
|
1315
1401
|
};
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1402
|
+
if (e.headedOpen === true) console.log("[surface] headed session — bounce+flash skipped (ADR-0041 Amendment 5)");
|
|
1403
|
+
else {
|
|
1404
|
+
await race(anyCdp.send("Browser.setWindowBounds", {
|
|
1405
|
+
windowId: win.windowId,
|
|
1406
|
+
bounds: { windowState: "minimized" }
|
|
1407
|
+
}), null);
|
|
1408
|
+
await race(anyCdp.send("Browser.setWindowBounds", {
|
|
1409
|
+
windowId: win.windowId,
|
|
1410
|
+
bounds: { windowState: "normal" }
|
|
1411
|
+
}), null);
|
|
1412
|
+
await race(anyCdp.send("Browser.setWindowBounds", {
|
|
1413
|
+
windowId: win.windowId,
|
|
1414
|
+
bounds: {
|
|
1415
|
+
width: Math.max(200, want.w + cw),
|
|
1416
|
+
height: Math.max(120, want.h + ch),
|
|
1417
|
+
windowState: "normal"
|
|
1418
|
+
}
|
|
1419
|
+
}), null);
|
|
1420
|
+
await new Promise((r) => setTimeout(r, 300));
|
|
1421
|
+
for (let i = 0; i < 10 && !matched(); i += 1) await new Promise((r) => setTimeout(r, 100));
|
|
1422
|
+
if (matched()) return;
|
|
1423
|
+
const parked = {
|
|
1327
1424
|
width: Math.max(200, want.w + cw),
|
|
1328
1425
|
height: Math.max(120, want.h + ch),
|
|
1329
1426
|
windowState: "normal"
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
}), null);
|
|
1357
|
-
await new Promise((r) => setTimeout(r, 300));
|
|
1358
|
-
for (let i = 0; i < 10 && !matched(); i += 1) await new Promise((r) => setTimeout(r, 100));
|
|
1359
|
-
if (matched()) return;
|
|
1360
|
-
console.log("[surface] ladder exhausted: bounce+flash ran, stream frames still", (() => {
|
|
1361
|
-
const d = dimsOf(handle.relay.latestFrame());
|
|
1362
|
-
return d ? d.w + "x" + d.h : "unknown";
|
|
1363
|
-
})());
|
|
1427
|
+
};
|
|
1428
|
+
await race(anyCdp.send("Browser.setWindowBounds", {
|
|
1429
|
+
windowId: win.windowId,
|
|
1430
|
+
bounds: {
|
|
1431
|
+
...parked,
|
|
1432
|
+
left: 10,
|
|
1433
|
+
top: 10
|
|
1434
|
+
}
|
|
1435
|
+
}), null);
|
|
1436
|
+
await new Promise((r) => setTimeout(r, 400));
|
|
1437
|
+
await race(anyCdp.send("Browser.setWindowBounds", {
|
|
1438
|
+
windowId: win.windowId,
|
|
1439
|
+
bounds: {
|
|
1440
|
+
...parked,
|
|
1441
|
+
left: -32e3,
|
|
1442
|
+
top: -32e3
|
|
1443
|
+
}
|
|
1444
|
+
}), null);
|
|
1445
|
+
await new Promise((r) => setTimeout(r, 300));
|
|
1446
|
+
for (let i = 0; i < 10 && !matched(); i += 1) await new Promise((r) => setTimeout(r, 100));
|
|
1447
|
+
if (matched()) return;
|
|
1448
|
+
console.log("[surface] ladder exhausted: bounce+flash ran, stream frames still", (() => {
|
|
1449
|
+
const d = dimsOf(handle.relay.latestFrame());
|
|
1450
|
+
return d ? d.w + "x" + d.h : "unknown";
|
|
1451
|
+
})());
|
|
1452
|
+
}
|
|
1364
1453
|
}
|
|
1365
1454
|
}
|
|
1366
1455
|
const cfg = readBrowserConfig();
|
|
@@ -1698,4 +1787,4 @@ var BrowserRegistry = class {
|
|
|
1698
1787
|
var browserRegistry = new BrowserRegistry();
|
|
1699
1788
|
|
|
1700
1789
|
export { BrowserRegistryRefusal as B, browserRegistry as b, clampZoom as c };
|
|
1701
|
-
//# sourceMappingURL=registry.js-
|
|
1790
|
+
//# sourceMappingURL=registry.js-ClhrzR6O.js.map
|
|
@@ -529,6 +529,25 @@ var TerminalRegistry = class {
|
|
|
529
529
|
lingeringPids: result.lingeringPids
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
+
/** Destroy: run the close ladder, then PRUNE the entry (ADR amendment
|
|
533
|
+
* 2026-11-07, D2 extension). The desk's clear chord is the caller —
|
|
534
|
+
* an exited session prunes without re-killing (close is idempotent
|
|
535
|
+
* on a settled session); the fence applies like every tokened verb. */
|
|
536
|
+
async destroy(sessionId, token) {
|
|
537
|
+
const entry = this.entries.get(sessionId);
|
|
538
|
+
if (!entry) throw new TerminalRegistryRefusal("NO_SESSION", "no such terminal session");
|
|
539
|
+
if (entry.token !== token) throw new TerminalRegistryRefusal("FOREIGN_SESSION", "this tab does not own the terminal");
|
|
540
|
+
const result = await entry.session.close();
|
|
541
|
+
this.entries.delete(sessionId);
|
|
542
|
+
return result.quiescent ? {
|
|
543
|
+
quiescent: true,
|
|
544
|
+
pruned: true
|
|
545
|
+
} : {
|
|
546
|
+
quiescent: false,
|
|
547
|
+
lingeringPids: result.lingeringPids,
|
|
548
|
+
pruned: true
|
|
549
|
+
};
|
|
550
|
+
}
|
|
532
551
|
readFrom(sessionId, fromByte) {
|
|
533
552
|
const entry = this.entries.get(sessionId);
|
|
534
553
|
if (!entry) throw new TerminalRegistryRefusal("NO_SESSION", "no such terminal session");
|
|
@@ -558,4 +577,4 @@ var TerminalRegistry = class {
|
|
|
558
577
|
var terminalRegistry = new TerminalRegistry();
|
|
559
578
|
|
|
560
579
|
export { TerminalRegistryRefusal as T, TerminalSendRefusal as a, terminalRegistry as t };
|
|
561
|
-
//# sourceMappingURL=registry2.js-
|
|
580
|
+
//# sourceMappingURL=registry2.js-BZfrwsOy.js.map
|