@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,9 +1,9 @@
|
|
|
1
|
-
import { B as readTerminalConfig } from '../../../../chunks/insight-config.js-
|
|
2
|
-
import { t as terminalRegistry } from '../../../../chunks/registry2.js-
|
|
1
|
+
import { B as readTerminalConfig } from '../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
2
|
+
import { t as terminalRegistry } from '../../../../chunks/registry2.js-BZfrwsOy.js';
|
|
3
3
|
import { j as json } from '../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
4
|
import { homedir } from 'node:os';
|
|
5
5
|
import '../../../../chunks/config.js-r_jw_bQQ.js';
|
|
6
|
-
import '../../../../chunks/settings-document.js-
|
|
6
|
+
import '../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'yaml';
|
|
@@ -73,4 +73,4 @@ var POST = async ({ request }) => {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
export { GET, POST };
|
|
76
|
-
//# sourceMappingURL=_server.ts.js-
|
|
76
|
+
//# sourceMappingURL=_server.ts.js-v1ixRdpN.js.map
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { t as terminalRegistry, T as TerminalRegistryRefusal } from '../../../../../chunks/registry2.js-BZfrwsOy.js';
|
|
2
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import 'node:path';
|
|
4
|
+
import 'node:os';
|
|
5
|
+
import 'node:child_process';
|
|
6
|
+
import 'node:crypto';
|
|
7
|
+
import 'node:fs/promises';
|
|
8
|
+
import 'node:events';
|
|
9
|
+
import 'node-pty';
|
|
10
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
11
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
12
|
+
|
|
13
|
+
//#region src/routes/api/terminal/stream/+server.ts
|
|
14
|
+
/**
|
|
15
|
+
* /api/terminal/stream — the ONE multiplexed SSE hub (ADR-0053 Wave 1).
|
|
16
|
+
*
|
|
17
|
+
* Plain terms: instead of one private pipe per terminal row (the browser's
|
|
18
|
+
* 6-per-host HTTP/1.1 budget — RCA 2026-11-07), this endpoint carries every
|
|
19
|
+
* subscribed session's frames down ONE stream, each frame labelled with its
|
|
20
|
+
* sessionId; the client hub fans them back out by id.
|
|
21
|
+
*
|
|
22
|
+
* Wire: GET ?ids=<url-encoded JSON array>&resume=<url-encoded JSON object
|
|
23
|
+
* mapping id -> byte offset>. EventSource cannot POST, so both ride the
|
|
24
|
+
* query string (ADR-0053 constraint). Per id:
|
|
25
|
+
* - tail replay via registry.readFrom(id, resume[id] ?? 0) — the FIRST
|
|
26
|
+
* output frame carries nextOffset/lossy/spillPath (same shape as the
|
|
27
|
+
* per-session endpoint, plus the sessionId tag);
|
|
28
|
+
* - live subscription via registry.events(id), frames tagged sessionId;
|
|
29
|
+
* - a dead/unknown id is NOT fatal to the hub: it emits one per-session
|
|
30
|
+
* error frame (NO_SESSION) and keeps serving the rest (AC5).
|
|
31
|
+
*
|
|
32
|
+
* Cancel arm (crash RCA 2026-09-24, AC7): a client going away cancels the
|
|
33
|
+
* ReadableStream — ALL per-session listeners are dropped there so no live
|
|
34
|
+
* PTY can enqueue into a dead controller. Each session's own closed frame
|
|
35
|
+
* drops only that id's listener; the hub keeps serving the other ids.
|
|
36
|
+
*
|
|
37
|
+
* The per-session endpoint /api/terminal/[id]/stream stays untouched as
|
|
38
|
+
* the fallback (ADR-0053 D6).
|
|
39
|
+
*/
|
|
40
|
+
var SSE_HEADERS = {
|
|
41
|
+
"content-type": "text/event-stream",
|
|
42
|
+
"cache-control": "no-store",
|
|
43
|
+
connection: "keep-alive",
|
|
44
|
+
"x-accel-buffering": "no"
|
|
45
|
+
};
|
|
46
|
+
function sseFrame(event, data) {
|
|
47
|
+
return "event: " + event + "\ndata: " + JSON.stringify(data) + "\n\n";
|
|
48
|
+
}
|
|
49
|
+
/** Parse the ids query param — a JSON array of session ids (deduped). */
|
|
50
|
+
function parseIds(raw) {
|
|
51
|
+
if (!raw) return [];
|
|
52
|
+
try {
|
|
53
|
+
const parsed = JSON.parse(raw);
|
|
54
|
+
if (!Array.isArray(parsed)) return [];
|
|
55
|
+
return [...new Set(parsed.filter((v) => typeof v === "string" && v.length > 0))];
|
|
56
|
+
} catch {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/** Parse the resume query param — a JSON object mapping id -> byte offset. */
|
|
61
|
+
function parseResume(raw) {
|
|
62
|
+
if (!raw) return {};
|
|
63
|
+
try {
|
|
64
|
+
const parsed = JSON.parse(raw);
|
|
65
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
66
|
+
const out = {};
|
|
67
|
+
for (const [id, value] of Object.entries(parsed)) if (typeof value === "number" && Number.isFinite(value) && value >= 0) out[id] = value;
|
|
68
|
+
return out;
|
|
69
|
+
} catch {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
var GET = (ctx) => {
|
|
74
|
+
const ids = parseIds(ctx.url.searchParams.get("ids"));
|
|
75
|
+
const resume = parseResume(ctx.url.searchParams.get("resume"));
|
|
76
|
+
if (ids.length === 0) return json({ error: "NO_IDS" }, { status: 400 });
|
|
77
|
+
const encoder = new TextEncoder();
|
|
78
|
+
const state = { closed: false };
|
|
79
|
+
const detachFns = [];
|
|
80
|
+
const stream = new ReadableStream({
|
|
81
|
+
start(controller) {
|
|
82
|
+
const enqueue = (chunk) => {
|
|
83
|
+
if (state.closed) return;
|
|
84
|
+
try {
|
|
85
|
+
controller.enqueue(encoder.encode(chunk));
|
|
86
|
+
} catch {
|
|
87
|
+
state.closed = true;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
const makeOnEvent = (id) => {
|
|
91
|
+
return (event) => {
|
|
92
|
+
if (event.type === "output") {
|
|
93
|
+
enqueue(sseFrame("output", {
|
|
94
|
+
sessionId: id,
|
|
95
|
+
text: event.bytes,
|
|
96
|
+
nextOffset: event.nextOffset,
|
|
97
|
+
lossy: false
|
|
98
|
+
}));
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (event.type === "settled") {
|
|
102
|
+
enqueue(sseFrame("settled", {
|
|
103
|
+
sessionId: id,
|
|
104
|
+
reason: event.reason
|
|
105
|
+
}));
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (event.type === "exit") {
|
|
109
|
+
enqueue(sseFrame("exit", {
|
|
110
|
+
sessionId: id,
|
|
111
|
+
outcome: event.outcome
|
|
112
|
+
}));
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (event.type === "closed") {
|
|
116
|
+
enqueue(sseFrame("closed", {
|
|
117
|
+
sessionId: id,
|
|
118
|
+
quiescent: event.quiescent,
|
|
119
|
+
lingeringPids: event.lingeringPids
|
|
120
|
+
}));
|
|
121
|
+
detachFns.find((fn) => fn === detach.get(id))?.();
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
const detach = /* @__PURE__ */ new Map();
|
|
126
|
+
for (const id of ids) {
|
|
127
|
+
try {
|
|
128
|
+
terminalRegistry.peek(id);
|
|
129
|
+
} catch (err) {
|
|
130
|
+
if (err instanceof TerminalRegistryRefusal) {
|
|
131
|
+
enqueue(sseFrame("error", {
|
|
132
|
+
sessionId: id,
|
|
133
|
+
error: err.code
|
|
134
|
+
}));
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
throw err;
|
|
138
|
+
}
|
|
139
|
+
const session = terminalRegistry.events(id);
|
|
140
|
+
if (!session) {
|
|
141
|
+
enqueue(sseFrame("error", {
|
|
142
|
+
sessionId: id,
|
|
143
|
+
error: "NO_SESSION"
|
|
144
|
+
}));
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
const fromByte = resume[id] ?? 0;
|
|
148
|
+
const read = terminalRegistry.readFrom(id, fromByte);
|
|
149
|
+
enqueue(sseFrame("output", {
|
|
150
|
+
sessionId: id,
|
|
151
|
+
text: read.text,
|
|
152
|
+
nextOffset: read.nextOffset,
|
|
153
|
+
lossy: read.lossy,
|
|
154
|
+
spillPath: read.spillPath
|
|
155
|
+
}));
|
|
156
|
+
const onEvent = makeOnEvent(id);
|
|
157
|
+
session.on("event", onEvent);
|
|
158
|
+
const off = () => {
|
|
159
|
+
session.off("event", onEvent);
|
|
160
|
+
detach.delete(id);
|
|
161
|
+
const idx = detachFns.indexOf(off);
|
|
162
|
+
if (idx >= 0) detachFns.splice(idx, 1);
|
|
163
|
+
};
|
|
164
|
+
detach.set(id, off);
|
|
165
|
+
detachFns.push(off);
|
|
166
|
+
if (session.isExited() && terminalRegistry.exitOutcome(id) !== null && !terminalRegistry.list().some((s) => s.id === id)) {
|
|
167
|
+
enqueue(sseFrame("error", {
|
|
168
|
+
sessionId: id,
|
|
169
|
+
error: "NO_SESSION"
|
|
170
|
+
}));
|
|
171
|
+
off();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
cancel() {
|
|
176
|
+
state.closed = true;
|
|
177
|
+
for (const off of [...detachFns]) off();
|
|
178
|
+
detachFns.length = 0;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
return new Response(stream, { headers: SSE_HEADERS });
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export { GET };
|
|
185
|
+
//# sourceMappingURL=_server.ts.js-BQOQyT7o.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { g as gitGateEnabled, i as isInsideRoot } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { g as gitGateEnabled, i as isInsideRoot } from '../../../../../chunks/git-probe.js-BIieYqLU.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';
|
|
6
|
-
import '../../../../../chunks/insight-config.js-
|
|
6
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
7
7
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
8
|
-
import '../../../../../chunks/settings-document.js-
|
|
8
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
9
9
|
import 'node:os';
|
|
10
10
|
import 'yaml';
|
|
11
11
|
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
@@ -108,4 +108,4 @@ var POST = async ({ request }) => {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
export { POST };
|
|
111
|
-
//# sourceMappingURL=_server.ts.js-
|
|
111
|
+
//# sourceMappingURL=_server.ts.js-CjU6bLOf.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { g as gitGateEnabled, i as isInsideRoot, a as gitStatus, p as parsePorcelainStatus } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { g as gitGateEnabled, i as isInsideRoot, a as gitStatus, p as parsePorcelainStatus } from '../../../../../chunks/git-probe.js-BIieYqLU.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';
|
|
6
6
|
import { execFileSync } from 'node:child_process';
|
|
7
|
-
import '../../../../../chunks/insight-config.js-
|
|
7
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
8
8
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
9
|
-
import '../../../../../chunks/settings-document.js-
|
|
9
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'yaml';
|
|
12
12
|
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
@@ -312,4 +312,4 @@ var GET = async ({ url, request }) => {
|
|
|
312
312
|
};
|
|
313
313
|
|
|
314
314
|
export { GET };
|
|
315
|
-
//# sourceMappingURL=_server.ts.js-
|
|
315
|
+
//# sourceMappingURL=_server.ts.js-CYU0btiH.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { r as resolveEnclosingRepo, i as isInsideRoot, b as gitFileHead, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { r as resolveEnclosingRepo, i as isInsideRoot, b as gitFileHead, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-BIieYqLU.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
|
-
import '../../../../../chunks/insight-config.js-
|
|
4
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
5
5
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
6
|
-
import '../../../../../chunks/settings-document.js-
|
|
6
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
@@ -77,4 +77,4 @@ var GET = async ({ url }) => {
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
export { GET };
|
|
80
|
-
//# sourceMappingURL=_server.ts.js-
|
|
80
|
+
//# sourceMappingURL=_server.ts.js-Du9YcwLw.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { d as detectRepos } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { d as detectRepos } from '../../../../../chunks/git-probe.js-BIieYqLU.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
|
-
import '../../../../../chunks/insight-config.js-
|
|
4
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
5
5
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
6
|
-
import '../../../../../chunks/settings-document.js-
|
|
6
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
@@ -65,4 +65,4 @@ var GET = async ({ url }) => {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export { GET };
|
|
68
|
-
//# sourceMappingURL=_server.ts.js-
|
|
68
|
+
//# sourceMappingURL=_server.ts.js-BdV_KDjb.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { i as isInsideRoot, a as gitStatus, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { i as isInsideRoot, a as gitStatus, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-BIieYqLU.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
|
-
import '../../../../../chunks/insight-config.js-
|
|
4
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
5
5
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
6
|
-
import '../../../../../chunks/settings-document.js-
|
|
6
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
@@ -70,4 +70,4 @@ var GET = async ({ url }) => {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export { GET };
|
|
73
|
-
//# sourceMappingURL=_server.ts.js-
|
|
73
|
+
//# sourceMappingURL=_server.ts.js-C-C84Yzu.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-
|
|
2
|
-
import { g as gitGateEnabled } from '../../../../../chunks/git-probe.js-
|
|
1
|
+
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
|
+
import { g as gitGateEnabled } from '../../../../../chunks/git-probe.js-BIieYqLU.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
|
-
import '../../../../../chunks/insight-config.js-
|
|
4
|
+
import '../../../../../chunks/insight-config.js-ylYA2CXm.js';
|
|
5
5
|
import '../../../../../chunks/config.js-r_jw_bQQ.js';
|
|
6
|
-
import '../../../../../chunks/settings-document.js-
|
|
6
|
+
import '../../../../../chunks/settings-document.js-BIxaivJ1.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
@@ -52,4 +52,4 @@ var GET = async ({ url }) => {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export { GET };
|
|
55
|
-
//# sourceMappingURL=_server.ts.js-
|
|
55
|
+
//# sourceMappingURL=_server.ts.js-D9uFvZya.js.map
|
package/build/server/chunks/entries/{hooks.server.js-CU2RE5vs.js → hooks.server.js-YJQlamhk.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { U as UI_LOCALES } from '../chunks/config.js-r_jw_bQQ.js';
|
|
2
|
-
import { r as readSettingsDocument } from '../chunks/settings-document.js-
|
|
2
|
+
import { r as readSettingsDocument } from '../chunks/settings-document.js-BIxaivJ1.js';
|
|
3
3
|
import { g as getServerAsyncLocalStorage, i as isExcludedByRouteStrategy, s as serverAsyncLocalStorage, a as getStrategyForUrl, b as shouldRedirect, d as deLocalizeUrl, o as overwriteServerAsyncLocalStorage } from '../chunks/runtime.js-CCJi3XaY.js';
|
|
4
4
|
import { parse } from 'yaml';
|
|
5
5
|
import 'node:fs';
|
|
@@ -304,4 +304,4 @@ var handle = async ({ event, resolve }) => {
|
|
|
304
304
|
};
|
|
305
305
|
|
|
306
306
|
export { handle };
|
|
307
|
-
//# sourceMappingURL=hooks.server.js-
|
|
307
|
+
//# sourceMappingURL=hooks.server.js-YJQlamhk.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
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-D5zsYmjz.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-
|
|
7
|
-
import '../../chunks/exports.js-
|
|
6
|
+
import '../../chunks/internal2.js-XxZ8wzRE.js';
|
|
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';
|
|
10
10
|
import '../../chunks/utils.js-CAdNO8Tu.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-TrOSxb0e.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getDshConnection, D as DshRpcError, i as isSubagentRejection } from '../../chunks/dsh-connection.js-
|
|
1
|
+
import { g as getDshConnection, D as DshRpcError, i as isSubagentRejection } from '../../chunks/dsh-connection.js-Dcdxqp52.js';
|
|
2
2
|
import { h as historyToEvents, e as eventsToEntries } from '../../chunks/dsh-events.js-BHf0lLZ5.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';
|
|
@@ -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-
|
|
91
|
+
//# sourceMappingURL=_page.server.ts.js-BFDPRDEm.js.map
|