@deepseek-insight/dsi 0.5.18 → 0.5.20
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/dsi-adr/SKILL.md +121 -0
- package/.agents/skills/dsi-i18n-migrate/SKILL.md +87 -0
- package/.agents/skills/dsi-ov-setup/SKILL.md +114 -0
- package/.agents/skills/dsi-release/SKILL.md +175 -0
- package/.agents/skills/dsi-spcheck/SKILL.md +188 -0
- package/.agents/skills/dsi-spec/SKILL.md +310 -0
- package/.agents/skills/dsi-spec/references/mermaid-pattern.md +160 -0
- package/.agents/skills/dsi-spec/references/tasks-json-template.md +125 -0
- package/.agents/skills/dsi-task/SKILL.md +287 -0
- package/README.md +5 -23
- package/bin/dsi.mjs +129 -17
- package/bin/lib/mirror-skills.mjs +56 -0
- package/build/client/_app/immutable/assets/0.C4pk9RsQ.css +2 -0
- package/build/client/_app/immutable/assets/{2.GTtLKMiQ.css → 2.Dk-hwaP_.css} +1 -1
- package/build/client/_app/immutable/chunks/CodI3RGj.js +1 -0
- package/build/client/_app/immutable/chunks/{CLNDb8QN.js → CxmtCU9s.js} +1 -1
- package/build/client/_app/immutable/chunks/{Bx7fD5zN.js → DKDzTags.js} +2 -2
- package/build/client/_app/immutable/chunks/{DWBqt9Io.js → azDKH4zi.js} +1 -1
- package/build/client/_app/immutable/chunks/qIBjcgkE.js +1 -0
- package/build/client/_app/immutable/entry/{app.CnWnvioB.js → app.CqYGeqRv.js} +2 -2
- package/build/client/_app/immutable/entry/start.CIXiL_7f.js +1 -0
- package/build/client/_app/immutable/nodes/{0.B3qXb7lb.js → 0.u99aBgpL.js} +1 -1
- package/build/client/_app/immutable/nodes/{1.DdjrT3tT.js → 1.qcRcZCY6.js} +1 -1
- package/build/client/_app/immutable/nodes/2.GgqfB5rv.js +171 -0
- 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/{app-config.svelte.js-rN4N5yAI.js → app-config.svelte.js-CFb4kaFl.js} +7 -3
- package/build/server/chunks/chunks/{db.js-DbbYS9o8.js → db.js-9wP1ySFv.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-BQWa7bEG.js → db2.js-B_Un4Zvq.js} +7 -5
- package/build/server/chunks/chunks/{dsh-connection.js-CpcCtA42.js → dsh-connection.js-CwL9I98w.js} +4 -3
- package/build/server/chunks/chunks/{git-probe.js-CvkToKO4.js → git-probe.js-C7z6xDzg.js} +3 -3
- package/build/server/chunks/chunks/{insight-config.js-Dw_Qi0fO.js → insight-config.js-COS9LOWZ.js} +13 -4
- package/build/server/chunks/chunks/{internal.js-DKO0SoY7.js → internal.js-Bf2uRIVS.js} +2 -2
- package/build/server/chunks/chunks/{permission-state.js-yvwUSnug.js → permission-state.js-BoJAoWqi.js} +18 -15
- package/build/server/chunks/chunks/settings-home.js-CqnqJVOu.js +9 -0
- package/build/server/chunks/chunks/settings-home2.js-f75-B6RI.js +102 -0
- package/build/server/chunks/chunks/{state.js-C7gJT4Un.js → state.js-OWX1K3Yj.js} +2 -2
- package/build/server/chunks/chunks/{watcher.js-C97Xyorx.js → watcher.js-Dc9hzRLI.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-Cqh1iqgu.js → _server.ts.js-0rfV7w20.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-DNKD4rZu.js → _server.ts.js-DX0DUIja.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-CJ-FwkrZ.js → _server.ts.js-zB-V9Naa.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-CMM4kYVx.js → _server.ts.js-Bo4VgIna.js} +5 -3
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-epVplzwB.js → _server.ts.js-_Wc4NU0Q.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-bXHb97gT.js → _server.ts.js-CvoINUYy.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-BNOHhtzy.js → _server.ts.js-B4UwZ8nd.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-BBi6jeVj.js → _server.ts.js-Hml2J0Bq.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-N0nKPuqL.js → _server.ts.js-CsZ2u8cs.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-VGFCPAbs.js → _server.ts.js-BhF1Nzig.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-na_sUb0Z.js → _server.ts.js-BGXjV_Ak.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-CeNf028P.js → _server.ts.js-BF4vBIja.js} +5 -4
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-DfqO-GO4.js → _server.ts.js-B2OwrEQD.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-Dj9GYNl7.js → _server.ts.js-DboY_7cp.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-DqShsRl9.js → _server.ts.js-BpioYdnc.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-BQSBUf70.js → _server.ts.js-CLrgUoq0.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/path/{_server.ts.js-CeCKDyKB.js → _server.ts.js-BlZr_mA6.js} +3 -2
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-CadTCNUJ.js → _server.ts.js-BiU_IgYD.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-BXzgi8xX.js → _server.ts.js-FV-4ougZ.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-BfD5FXiL.js → _server.ts.js-ChxB0XU5.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-CiDPC9TY.js → _server.ts.js-DkSydg_X.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-DGcZgN96.js → _server.ts.js-Wbuf-vse.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-DnU1CCOw.js → _server.ts.js-B-BfCKKL.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-BZ0UV1n2.js → _server.ts.js-fKfv5g19.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file-bytes/{_server.ts.js-lxLpuPFL.js → _server.ts.js-DZpRzvas.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-Cw3vl704.js → _server.ts.js-Hn5-fnsU.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-KKnR2UO4.js → _server.ts.js-CtPDRjV7.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-I1eSZn60.js → _server.ts.js-DOp3nIcK.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-B0zqAKnV.js → _server.ts.js-DiwcZfK9.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-C-QN0enK.js → _server.ts.js-SoNSMvWj.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-CwTGUPIp.js → _server.ts.js-DIZiiHk-.js} +12 -4
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-Bvotxm37.js → _server.ts.js-CbsUk0fk.js} +4 -3
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-CRRLXk0y.js → _server.ts.js-DCeIpzKT.js} +3 -2
- package/build/server/chunks/entries/endpoints/api/settings-home/file/_server.ts.js-C1gSFX1P.js +68 -0
- package/build/server/chunks/entries/endpoints/api/settings-home/file-write/_server.ts.js-Dx0glK_q.js +68 -0
- package/build/server/chunks/entries/endpoints/api/settings-home/tree/_server.ts.js-CAmn2SKB.js +61 -0
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/{_server.ts.js-DY_NDlYl.js → _server.ts.js-Blw1UFX2.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/{_server.ts.js-DHEaymrG.js → _server.ts.js-yflU8VH2.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/{_server.ts.js-AQgNkfCV.js → _server.ts.js-q9jXuJ1p.js} +10 -18
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/{_server.ts.js-C9vxPbB3.js → _server.ts.js-YjwnbPfG.js} +12 -20
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/{_server.ts.js-BlMRR11v.js → _server.ts.js-DRQay15h.js} +12 -20
- package/build/server/chunks/entries/endpoints/api/workspace/write-gate/_server.ts.js-BiCzLyNH.js +54 -0
- package/build/server/chunks/entries/pages/{_error.svelte.js-C73uxSol.js → _error.svelte.js-DkmmDHjP.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.server.ts.js-ze2dUhXW.js → _page.server.ts.js-BHW1mzYQ.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-C1cGitkt.js → _page.svelte.js-BSt3-Adz.js} +993 -532
- package/build/server/chunks/{handler-CTOEBU52.js → handler-CEAxnB4f.js} +3 -3
- package/build/server/chunks/{index.js-Bifh9-nS.js → index.js-B-3rUYGC.js} +2 -2
- package/build/server/chunks/{manifest.js-Da5_i6lM.js → manifest.js--ZDTDlzU.js} +71 -43
- package/build/server/chunks/nodes/{0.js-DIgCB7dX.js → 0.js-BQXxAZac.js} +3 -3
- package/build/server/chunks/nodes/1.js-DMcugevB.js +9 -0
- package/build/server/chunks/nodes/{2.js-DXw1-iEf.js → 2.js-BrT7uCAN.js} +9 -8
- package/package.json +3 -2
- package/template/.dsi/config.json +2 -2
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- package/template/.dsi/settings.yaml +2 -1
- package/build/client/_app/immutable/assets/0.BQjO3ESU.css +0 -2
- package/build/client/_app/immutable/chunks/CAZxZSEb.js +0 -1
- package/build/client/_app/immutable/chunks/DvLq-YzL.js +0 -1
- package/build/client/_app/immutable/entry/start.DrunaWOx.js +0 -1
- package/build/client/_app/immutable/nodes/2.o9KKAujP.js +0 -170
- package/build/server/chunks/nodes/1.js-DPBXm0Gt.js +0 -9
package/build/server/chunks/entries/endpoints/api/settings-home/file/_server.ts.js-C1gSFX1P.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { i as isSettingsHome, S as SettingsHomeRefusal } from '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
2
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import 'node:fs';
|
|
4
|
+
import 'node:path';
|
|
5
|
+
import 'node:os';
|
|
6
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
7
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
8
|
+
|
|
9
|
+
//#region src/routes/api/settings-home/file/+server.ts
|
|
10
|
+
/**
|
|
11
|
+
* api-settings-home — GET /api/settings-home/file?home=dsi|dsh&path=<rel>
|
|
12
|
+
* Read one TEXT file of a settings home (the explorer file tab).
|
|
13
|
+
*
|
|
14
|
+
* The Settings Tree ADR (2026-09-18, D2): the DSI-LOCAL data plane for a
|
|
15
|
+
* session-less settings explorer. Containment refusals map to 400;
|
|
16
|
+
* missing paths to 404; everything else is a 500 with the reason.
|
|
17
|
+
*/
|
|
18
|
+
var GET = async ({ url }) => {
|
|
19
|
+
const home = url.searchParams.get("home");
|
|
20
|
+
const rel = url.searchParams.get("path");
|
|
21
|
+
if (!isSettingsHome(home)) return json({
|
|
22
|
+
ok: false,
|
|
23
|
+
error: {
|
|
24
|
+
code: "bad-home",
|
|
25
|
+
message: "home must be dsi or dsh"
|
|
26
|
+
}
|
|
27
|
+
}, { status: 400 });
|
|
28
|
+
if (rel === null || rel.length === 0) return json({
|
|
29
|
+
ok: false,
|
|
30
|
+
error: {
|
|
31
|
+
code: "bad-path",
|
|
32
|
+
message: "path is required"
|
|
33
|
+
}
|
|
34
|
+
}, { status: 400 });
|
|
35
|
+
try {
|
|
36
|
+
const { readSettingsHomeFile } = await import('../../../../../chunks/settings-home.js-CqnqJVOu.js');
|
|
37
|
+
const file = await readSettingsHomeFile(home, rel);
|
|
38
|
+
return json({
|
|
39
|
+
ok: true,
|
|
40
|
+
file
|
|
41
|
+
});
|
|
42
|
+
} catch (err) {
|
|
43
|
+
if (err instanceof SettingsHomeRefusal) return json({
|
|
44
|
+
ok: false,
|
|
45
|
+
error: {
|
|
46
|
+
code: err.code,
|
|
47
|
+
message: err.message
|
|
48
|
+
}
|
|
49
|
+
}, { status: 400 });
|
|
50
|
+
if ((err.code ?? "io-error") === "ENOENT") return json({
|
|
51
|
+
ok: false,
|
|
52
|
+
error: {
|
|
53
|
+
code: "not-found",
|
|
54
|
+
message: "no such file"
|
|
55
|
+
}
|
|
56
|
+
}, { status: 404 });
|
|
57
|
+
return json({
|
|
58
|
+
ok: false,
|
|
59
|
+
error: {
|
|
60
|
+
code: "io-error",
|
|
61
|
+
message: String(err.message ?? err)
|
|
62
|
+
}
|
|
63
|
+
}, { status: 500 });
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { GET };
|
|
68
|
+
//# sourceMappingURL=_server.ts.js-C1gSFX1P.js.map
|
package/build/server/chunks/entries/endpoints/api/settings-home/file-write/_server.ts.js-Dx0glK_q.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { i as isSettingsHome, S as SettingsHomeRefusal } from '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
2
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import 'node:fs';
|
|
4
|
+
import 'node:path';
|
|
5
|
+
import 'node:os';
|
|
6
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
7
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
8
|
+
|
|
9
|
+
//#region src/routes/api/settings-home/file-write/+server.ts
|
|
10
|
+
/**
|
|
11
|
+
* api-settings-home — POST /api/settings-home/file-write
|
|
12
|
+
* { home, path, content } — save one TEXT file of a settings home.
|
|
13
|
+
*
|
|
14
|
+
* The Settings Tree ADR (2026-09-18, D2): the DSI-LOCAL data plane for a
|
|
15
|
+
* session-less settings explorer. Containment refusals map to 400;
|
|
16
|
+
* missing paths to 404; everything else is a 500 with the reason.
|
|
17
|
+
*/
|
|
18
|
+
var POST = async ({ request }) => {
|
|
19
|
+
let body;
|
|
20
|
+
try {
|
|
21
|
+
body = await request.json();
|
|
22
|
+
} catch {
|
|
23
|
+
return json({
|
|
24
|
+
ok: false,
|
|
25
|
+
error: {
|
|
26
|
+
code: "bad-json",
|
|
27
|
+
message: "body must be JSON"
|
|
28
|
+
}
|
|
29
|
+
}, { status: 400 });
|
|
30
|
+
}
|
|
31
|
+
if (!isSettingsHome(body.home)) return json({
|
|
32
|
+
ok: false,
|
|
33
|
+
error: {
|
|
34
|
+
code: "bad-home",
|
|
35
|
+
message: "home must be dsi or dsh"
|
|
36
|
+
}
|
|
37
|
+
}, { status: 400 });
|
|
38
|
+
if (typeof body.path !== "string" || body.path.length === 0) return json({
|
|
39
|
+
ok: false,
|
|
40
|
+
error: {
|
|
41
|
+
code: "bad-path",
|
|
42
|
+
message: "path is required"
|
|
43
|
+
}
|
|
44
|
+
}, { status: 400 });
|
|
45
|
+
try {
|
|
46
|
+
const { writeSettingsHomeFile } = await import('../../../../../chunks/settings-home.js-CqnqJVOu.js');
|
|
47
|
+
await writeSettingsHomeFile(body.home, body.path, body.content);
|
|
48
|
+
return json({ ok: true });
|
|
49
|
+
} catch (err) {
|
|
50
|
+
if (err instanceof SettingsHomeRefusal) return json({
|
|
51
|
+
ok: false,
|
|
52
|
+
error: {
|
|
53
|
+
code: err.code,
|
|
54
|
+
message: err.message
|
|
55
|
+
}
|
|
56
|
+
}, { status: 400 });
|
|
57
|
+
return json({
|
|
58
|
+
ok: false,
|
|
59
|
+
error: {
|
|
60
|
+
code: "io-error",
|
|
61
|
+
message: String(err.message ?? err)
|
|
62
|
+
}
|
|
63
|
+
}, { status: 500 });
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export { POST };
|
|
68
|
+
//# sourceMappingURL=_server.ts.js-Dx0glK_q.js.map
|
package/build/server/chunks/entries/endpoints/api/settings-home/tree/_server.ts.js-CAmn2SKB.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as isSettingsHome, S as SettingsHomeRefusal } from '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
2
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import 'node:fs';
|
|
4
|
+
import 'node:path';
|
|
5
|
+
import 'node:os';
|
|
6
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
7
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
8
|
+
|
|
9
|
+
//#region src/routes/api/settings-home/tree/+server.ts
|
|
10
|
+
/**
|
|
11
|
+
* api-settings-home — GET /api/settings-home/tree?home=dsi|dsh&path=<rel>
|
|
12
|
+
* One directory level of a settings home for the session-less explorer.
|
|
13
|
+
*
|
|
14
|
+
* The Settings Tree ADR (2026-09-18, D2): the DSI-LOCAL data plane for a
|
|
15
|
+
* session-less settings explorer. Containment refusals map to 400;
|
|
16
|
+
* missing paths to 404; everything else is a 500 with the reason.
|
|
17
|
+
*/
|
|
18
|
+
var GET = async ({ url }) => {
|
|
19
|
+
const home = url.searchParams.get("home");
|
|
20
|
+
const rel = url.searchParams.get("path") ?? "";
|
|
21
|
+
if (!isSettingsHome(home)) return json({
|
|
22
|
+
ok: false,
|
|
23
|
+
error: {
|
|
24
|
+
code: "bad-home",
|
|
25
|
+
message: "home must be dsi or dsh"
|
|
26
|
+
}
|
|
27
|
+
}, { status: 400 });
|
|
28
|
+
try {
|
|
29
|
+
const { listSettingsHomeDir } = await import('../../../../../chunks/settings-home.js-CqnqJVOu.js');
|
|
30
|
+
const listing = await listSettingsHomeDir(home, rel);
|
|
31
|
+
return json({
|
|
32
|
+
ok: true,
|
|
33
|
+
listing
|
|
34
|
+
});
|
|
35
|
+
} catch (err) {
|
|
36
|
+
if (err instanceof SettingsHomeRefusal) return json({
|
|
37
|
+
ok: false,
|
|
38
|
+
error: {
|
|
39
|
+
code: err.code,
|
|
40
|
+
message: err.message
|
|
41
|
+
}
|
|
42
|
+
}, { status: 400 });
|
|
43
|
+
if ((err.code ?? "io-error") === "ENOENT") return json({
|
|
44
|
+
ok: false,
|
|
45
|
+
error: {
|
|
46
|
+
code: "not-found",
|
|
47
|
+
message: "no such directory"
|
|
48
|
+
}
|
|
49
|
+
}, { status: 404 });
|
|
50
|
+
return json({
|
|
51
|
+
ok: false,
|
|
52
|
+
error: {
|
|
53
|
+
code: "io-error",
|
|
54
|
+
message: String(err.message ?? err)
|
|
55
|
+
}
|
|
56
|
+
}, { status: 500 });
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export { GET };
|
|
61
|
+
//# sourceMappingURL=_server.ts.js-CAmn2SKB.js.map
|
|
@@ -1,15 +1,16 @@
|
|
|
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-CwL9I98w.js';
|
|
2
|
+
import { g as gitGateEnabled, i as isInsideRoot } from '../../../../../chunks/git-probe.js-C7z6xDzg.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
6
|
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
7
|
-
import '../../../../../chunks/insight-config.js-
|
|
7
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
8
8
|
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
9
9
|
import 'node:os';
|
|
10
10
|
import 'yaml';
|
|
11
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
11
12
|
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
12
|
-
import '../../../../../chunks/permission-state.js-
|
|
13
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
13
14
|
import 'node:child_process';
|
|
14
15
|
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
15
16
|
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
@@ -106,4 +107,4 @@ var POST = async ({ request }) => {
|
|
|
106
107
|
};
|
|
107
108
|
|
|
108
109
|
export { POST };
|
|
109
|
-
//# sourceMappingURL=_server.ts.js-
|
|
110
|
+
//# sourceMappingURL=_server.ts.js-Blw1UFX2.js.map
|
|
@@ -1,16 +1,17 @@
|
|
|
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-CwL9I98w.js';
|
|
2
|
+
import { g as gitGateEnabled, i as isInsideRoot, a as gitStatus, p as parsePorcelainStatus } from '../../../../../chunks/git-probe.js-C7z6xDzg.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
7
|
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
8
|
-
import '../../../../../chunks/insight-config.js-
|
|
8
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
9
9
|
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
10
10
|
import 'node:os';
|
|
11
11
|
import 'yaml';
|
|
12
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
12
13
|
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
13
|
-
import '../../../../../chunks/permission-state.js-
|
|
14
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
14
15
|
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
15
16
|
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
16
17
|
|
|
@@ -292,4 +293,4 @@ var GET = async ({ url, request }) => {
|
|
|
292
293
|
};
|
|
293
294
|
|
|
294
295
|
export { GET };
|
|
295
|
-
//# sourceMappingURL=_server.ts.js-
|
|
296
|
+
//# sourceMappingURL=_server.ts.js-yflU8VH2.js.map
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { s as statusFor
|
|
2
|
-
import {
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-CwL9I98w.js';
|
|
2
|
+
import { r as resolveEnclosingRepo, i as isInsideRoot, b as gitFileHead, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-C7z6xDzg.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
4
|
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
5
|
-
import '../../../../../chunks/insight-config.js-
|
|
5
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
6
6
|
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
10
10
|
import 'yaml';
|
|
11
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
11
12
|
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
12
|
-
import '../../../../../chunks/permission-state.js-
|
|
13
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
13
14
|
import 'node:child_process';
|
|
14
15
|
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
15
16
|
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
@@ -20,9 +21,10 @@ import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
|
20
21
|
*
|
|
21
22
|
* The File Eye's "before" side (ADR The File Eye 2026-09-12, D2): the
|
|
22
23
|
* DSI server resolves the file's enclosing repo and runs a READ-ONLY
|
|
23
|
-
* git show HEAD:<rel>,
|
|
24
|
-
*
|
|
25
|
-
* no
|
|
24
|
+
* git show HEAD:<rel>, DESK-INDEPENDENT (The Always Tabs ADR 2026-09-16,
|
|
25
|
+
* D2 — a point-in-time read answers on every access mode). head is null
|
|
26
|
+
* when git has no version of the path (untracked / newly added) — the
|
|
27
|
+
* honest no-before-version, never an error. Containment over realpaths.
|
|
26
28
|
*/
|
|
27
29
|
var GET = async ({ url }) => {
|
|
28
30
|
const sessionId = url.searchParams.get("sessionId");
|
|
@@ -35,16 +37,6 @@ var GET = async ({ url }) => {
|
|
|
35
37
|
message: "sessionId, root and path are required"
|
|
36
38
|
}
|
|
37
39
|
}, { status: 400 });
|
|
38
|
-
let enabled;
|
|
39
|
-
try {
|
|
40
|
-
enabled = await gitGateEnabled(sessionId);
|
|
41
|
-
} catch (err) {
|
|
42
|
-
return json(mapRpcFailure(err), { status: statusFor(err) });
|
|
43
|
-
}
|
|
44
|
-
if (!enabled) return json({
|
|
45
|
-
ok: true,
|
|
46
|
-
enabled: false
|
|
47
|
-
});
|
|
48
40
|
const enclosing = await resolveEnclosingRepo(root, path);
|
|
49
41
|
if (enclosing === null) return json({
|
|
50
42
|
ok: false,
|
|
@@ -84,4 +76,4 @@ var GET = async ({ url }) => {
|
|
|
84
76
|
};
|
|
85
77
|
|
|
86
78
|
export { GET };
|
|
87
|
-
//# sourceMappingURL=_server.ts.js-
|
|
79
|
+
//# sourceMappingURL=_server.ts.js-q9jXuJ1p.js.map
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { s as statusFor
|
|
2
|
-
import {
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-CwL9I98w.js';
|
|
2
|
+
import { d as detectRepos } from '../../../../../chunks/git-probe.js-C7z6xDzg.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
4
|
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
5
|
-
import '../../../../../chunks/insight-config.js-
|
|
5
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
6
6
|
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
10
10
|
import 'yaml';
|
|
11
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
11
12
|
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
12
|
-
import '../../../../../chunks/permission-state.js-
|
|
13
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
13
14
|
import 'node:child_process';
|
|
14
15
|
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
15
16
|
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
@@ -21,11 +22,12 @@ import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
|
21
22
|
* Per-level repo flags for the workspace explorer (Git Eye ADR 2026-09-12,
|
|
22
23
|
* D1/D3): which immediate child directories host a .git entry, and whether
|
|
23
24
|
* the level itself does. Detection lives in $lib/server/git-probe and is
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* DESK-INDEPENDENT (The Always Tabs ADR 2026-09-16, D2 — superseding the
|
|
26
|
+
* Git Eye's gate here): a point-in-time READ answers on every access mode,
|
|
27
|
+
* the same read class as the workspace-tree listing. The watcher stream
|
|
28
|
+
* (git-events) and the write route keep their gates. Errors keep the
|
|
29
|
+
* explorer's honest failure face: a vanished directory is 404 not-found, a
|
|
30
|
+
* forbidden one 403, anything else the shared status mapping.
|
|
29
31
|
*/
|
|
30
32
|
function errnoStatus(err) {
|
|
31
33
|
const code = err?.code;
|
|
@@ -43,16 +45,6 @@ var GET = async ({ url }) => {
|
|
|
43
45
|
message: "sessionId and dir are required"
|
|
44
46
|
}
|
|
45
47
|
}, { status: 400 });
|
|
46
|
-
let enabled;
|
|
47
|
-
try {
|
|
48
|
-
enabled = await gitGateEnabled(sessionId);
|
|
49
|
-
} catch (err) {
|
|
50
|
-
return json(mapRpcFailure(err), { status: statusFor(err) });
|
|
51
|
-
}
|
|
52
|
-
if (!enabled) return json({
|
|
53
|
-
ok: true,
|
|
54
|
-
enabled: false
|
|
55
|
-
});
|
|
56
48
|
try {
|
|
57
49
|
const map = await detectRepos(dir);
|
|
58
50
|
return json({
|
|
@@ -72,4 +64,4 @@ var GET = async ({ url }) => {
|
|
|
72
64
|
};
|
|
73
65
|
|
|
74
66
|
export { GET };
|
|
75
|
-
//# sourceMappingURL=_server.ts.js-
|
|
67
|
+
//# sourceMappingURL=_server.ts.js-YjwnbPfG.js.map
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { s as statusFor
|
|
2
|
-
import {
|
|
1
|
+
import { s as statusFor } from '../../../../../chunks/dsh-connection.js-CwL9I98w.js';
|
|
2
|
+
import { i as isInsideRoot, a as gitStatus, G as GitUnavailableError } from '../../../../../chunks/git-probe.js-C7z6xDzg.js';
|
|
3
3
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
4
|
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
5
|
-
import '../../../../../chunks/insight-config.js-
|
|
5
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
6
6
|
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
7
7
|
import 'node:fs';
|
|
8
8
|
import 'node:path';
|
|
9
9
|
import 'node:os';
|
|
10
10
|
import 'yaml';
|
|
11
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
11
12
|
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
12
|
-
import '../../../../../chunks/permission-state.js-
|
|
13
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
13
14
|
import 'node:child_process';
|
|
14
15
|
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
15
16
|
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
@@ -19,11 +20,12 @@ import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
|
19
20
|
* api-workspace — GET /api/workspace/git-status?sessionId=…&root=…&repo=…
|
|
20
21
|
*
|
|
21
22
|
* Working-tree changes for ONE repo root, grouped view source (Git Eye ADR
|
|
22
|
-
* 2026-09-12, D5): the DSI server runs a READ-ONLY git status,
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* 2026-09-12, D5): the DSI server runs a READ-ONLY git status, DESK-
|
|
24
|
+
* INDEPENDENT (The Always Tabs ADR 2026-09-16, D2 — superseding the Git
|
|
25
|
+
* Eye's gate for point-in-time reads). The repo must BE the explorer's
|
|
26
|
+
* workspace root or live inside it — realpath containment, refused 403
|
|
27
|
+
* outside-workspace. A missing git binary is a VISIBLE failure
|
|
28
|
+
* ({ ok:false, code: 'git-unavailable' }), never a blank pane.
|
|
27
29
|
*/
|
|
28
30
|
var GET = async ({ url }) => {
|
|
29
31
|
const sessionId = url.searchParams.get("sessionId");
|
|
@@ -36,16 +38,6 @@ var GET = async ({ url }) => {
|
|
|
36
38
|
message: "sessionId, root and repo are required"
|
|
37
39
|
}
|
|
38
40
|
}, { status: 400 });
|
|
39
|
-
let enabled;
|
|
40
|
-
try {
|
|
41
|
-
enabled = await gitGateEnabled(sessionId);
|
|
42
|
-
} catch (err) {
|
|
43
|
-
return json(mapRpcFailure(err), { status: statusFor(err) });
|
|
44
|
-
}
|
|
45
|
-
if (!enabled) return json({
|
|
46
|
-
ok: true,
|
|
47
|
-
enabled: false
|
|
48
|
-
});
|
|
49
41
|
if (!await isInsideRoot(root, repo)) return json({
|
|
50
42
|
ok: false,
|
|
51
43
|
error: {
|
|
@@ -77,4 +69,4 @@ var GET = async ({ url }) => {
|
|
|
77
69
|
};
|
|
78
70
|
|
|
79
71
|
export { GET };
|
|
80
|
-
//# sourceMappingURL=_server.ts.js-
|
|
72
|
+
//# sourceMappingURL=_server.ts.js-DRQay15h.js.map
|
package/build/server/chunks/entries/endpoints/api/workspace/write-gate/_server.ts.js-BiCzLyNH.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { s as statusFor, m as mapRpcFailure } from '../../../../../chunks/dsh-connection.js-CwL9I98w.js';
|
|
2
|
+
import { g as gitGateEnabled } from '../../../../../chunks/git-probe.js-C7z6xDzg.js';
|
|
3
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
4
|
+
import '../../../../../chunks/config.js-iG_1bK3r.js';
|
|
5
|
+
import '../../../../../chunks/insight-config.js-COS9LOWZ.js';
|
|
6
|
+
import '../../../../../chunks/settings-document.js-BKnRkLVq.js';
|
|
7
|
+
import 'node:fs';
|
|
8
|
+
import 'node:path';
|
|
9
|
+
import 'node:os';
|
|
10
|
+
import 'yaml';
|
|
11
|
+
import '../../../../../chunks/settings-home2.js-f75-B6RI.js';
|
|
12
|
+
import '../../../../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
13
|
+
import '../../../../../chunks/permission-state.js-BoJAoWqi.js';
|
|
14
|
+
import 'node:child_process';
|
|
15
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
16
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
17
|
+
|
|
18
|
+
//#region src/routes/api/workspace/write-gate/+server.ts
|
|
19
|
+
/**
|
|
20
|
+
* api-workspace — GET /api/workspace/write-gate?sessionId=…
|
|
21
|
+
*
|
|
22
|
+
* The file panel's WRITE gate, named as such (Always Tabs follow-up
|
|
23
|
+
* 2026-09-16): git-map went desk-independent (Always Tabs D2 — a
|
|
24
|
+
* point-in-time read answers on every access mode), so its `enabled`
|
|
25
|
+
* no longer means "may write". The panel still owes its Save verb, its
|
|
26
|
+
* editor lock, and its Edit/View toggle label to the FRESH full-access
|
|
27
|
+
* gate — the same `gitGateEnabled` the watcher stream and the write
|
|
28
|
+
* route resolve — so this route is that answer, and nothing more.
|
|
29
|
+
* No filesystem touch: the gate resolves from the ledger tail and the
|
|
30
|
+
* live projections, exactly like git-events' connect-time check.
|
|
31
|
+
*/
|
|
32
|
+
var GET = async ({ url }) => {
|
|
33
|
+
const sessionId = url.searchParams.get("sessionId");
|
|
34
|
+
if (sessionId === null || sessionId.trim().length === 0) return json({
|
|
35
|
+
ok: false,
|
|
36
|
+
error: {
|
|
37
|
+
code: "bad-params",
|
|
38
|
+
message: "sessionId is required"
|
|
39
|
+
}
|
|
40
|
+
}, { status: 400 });
|
|
41
|
+
let enabled;
|
|
42
|
+
try {
|
|
43
|
+
enabled = await gitGateEnabled(sessionId);
|
|
44
|
+
} catch (err) {
|
|
45
|
+
return json(mapRpcFailure(err), { status: statusFor(err) });
|
|
46
|
+
}
|
|
47
|
+
return json({
|
|
48
|
+
ok: true,
|
|
49
|
+
enabled
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export { GET };
|
|
54
|
+
//# sourceMappingURL=_server.ts.js-BiCzLyNH.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { V as head, W as escape_html, y as derived } from '../../chunks/server.js-11-pxAWV.js';
|
|
2
2
|
import { c as getLocale } from '../../chunks/runtime.js-BPLc5RLR.js';
|
|
3
|
-
import { t, p as page } from '../../chunks/state.js-
|
|
3
|
+
import { t, p as page } from '../../chunks/state.js-OWX1K3Yj.js';
|
|
4
4
|
import '../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
5
|
-
import '../../chunks/internal.js-
|
|
5
|
+
import '../../chunks/internal.js-Bf2uRIVS.js';
|
|
6
6
|
import '../../chunks/shared.js-HQ0rfhm4.js';
|
|
7
7
|
import '../../chunks/exports.js-DH_tjtdv.js';
|
|
8
8
|
import '../../chunks/config.js-iG_1bK3r.js';
|
|
@@ -180,4 +180,4 @@ function _error($$renderer, $$props) {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
export { _error as default };
|
|
183
|
-
//# sourceMappingURL=_error.svelte.js-
|
|
183
|
+
//# sourceMappingURL=_error.svelte.js-DkmmDHjP.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
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-CwL9I98w.js';
|
|
2
2
|
import { h as historyToEvents, e as eventsToEntries } from '../../chunks/dsh-events.js-BtDxaV6Q.js';
|
|
3
|
-
import { p as permissionFromProjection, f as filterKnobEvents } from '../../chunks/permission-state.js-
|
|
3
|
+
import { p as permissionFromProjection, f as filterKnobEvents } from '../../chunks/permission-state.js-BoJAoWqi.js';
|
|
4
4
|
import { i as imageLimitsFromProjection } from '../../chunks/image-limits.js-CUdJ0f7r.js';
|
|
5
5
|
import { v as error } from '../../chunks/utils.js-CAdNO8Tu.js';
|
|
6
6
|
|
|
@@ -83,4 +83,4 @@ var _page_server_ts = /*#__PURE__*/Object.freeze({
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
export { _page_server_ts as _ };
|
|
86
|
-
//# sourceMappingURL=_page.server.ts.js-
|
|
86
|
+
//# sourceMappingURL=_page.server.ts.js-BHW1mzYQ.js.map
|