@deepseek-insight/dsi 0.5.8 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -60
- package/bin/dsi.mjs +108 -8
- package/build/client/_app/immutable/assets/0.B-x78bUH.css +2 -0
- package/build/client/_app/immutable/assets/2.DHY7FpOZ.css +1 -0
- package/build/client/_app/immutable/chunks/{CJ_zvTBg.js → 1KjP5PPV.js} +1 -1
- package/build/client/_app/immutable/chunks/{BAZKJuQw.js → 4BUyCMHs.js} +1 -1
- package/build/client/_app/immutable/chunks/{qEGLx2Wc.js → 5BuKkouu.js} +1 -1
- package/build/client/_app/immutable/chunks/{Cj-Zm41R.js → 5W1abxrJ.js} +1 -1
- package/build/client/_app/immutable/chunks/{DlQrSOw4.js → 7Qwz4TD3.js} +1 -1
- package/build/client/_app/immutable/chunks/{2irkVCIh.js → B3Lta-Nn.js} +1 -1
- package/build/client/_app/immutable/chunks/{Dr0pcX_F.js → B5bIZjCh.js} +1 -1
- package/build/client/_app/immutable/chunks/{CZXl7qUb.js → BDws8KMN.js} +1 -1
- package/build/client/_app/immutable/chunks/{CmbEK4CY.js → BFYiBR8b.js} +1 -1
- package/build/client/_app/immutable/chunks/{BI4pMaIG.js → BK9wQfnJ.js} +1 -1
- package/build/client/_app/immutable/chunks/{Beo7Z46k.js → BKMUCRSB.js} +1 -1
- package/build/client/_app/immutable/chunks/BLOKPG58.js +1 -0
- package/build/client/_app/immutable/chunks/{D16vkywU.js → BNCXVe_Y.js} +1 -1
- package/build/client/_app/immutable/chunks/{DtBGId5S.js → BO15_-NJ.js} +1 -1
- package/build/client/_app/immutable/chunks/{CfZ7uSQe.js → BOGXkyy3.js} +1 -1
- package/build/client/_app/immutable/chunks/{BhNEBkk_.js → BP1EDRMh.js} +1 -1
- package/build/client/_app/immutable/chunks/{Bn9NRi0R.js → BQFPW2iU.js} +1 -1
- package/build/client/_app/immutable/chunks/{D7fX-3xy.js → BS84xqUl.js} +1 -1
- package/build/client/_app/immutable/chunks/{DVXVVWkX.js → BhMqa9V0.js} +1 -1
- package/build/client/_app/immutable/chunks/{OmE6SGvs.js → BnEcDyty.js} +1 -1
- package/build/client/_app/immutable/chunks/{D4gq_dik.js → BoJ5ww2X.js} +1 -1
- package/build/client/_app/immutable/chunks/{BnF5Jm-h.js → BtWgux0k.js} +1 -1
- package/build/client/_app/immutable/chunks/BuVjHIij.js +1 -0
- package/build/client/_app/immutable/chunks/{CA_WNCsl.js → C7xeaPF2.js} +1 -1
- package/build/client/_app/immutable/chunks/{GBaNblmo.js → CA7VtFsM.js} +1 -1
- package/build/client/_app/immutable/chunks/{9TvT6fta.js → CIZRvqf3.js} +1 -1
- package/build/client/_app/immutable/chunks/{DuM1hSCa.js → CKk3hDrH.js} +1 -1
- package/build/client/_app/immutable/chunks/CM2YlsBZ.js +1 -0
- package/build/client/_app/immutable/chunks/CNIDhcUc.js +2 -0
- package/build/client/_app/immutable/chunks/{DzVMo6mB.js → CQNMOuVz.js} +1 -1
- package/build/client/_app/immutable/chunks/{wFIeY1Cf.js → CVJBb63S.js} +1 -1
- package/build/client/_app/immutable/chunks/CWCyOfZL.js +1 -0
- package/build/client/_app/immutable/chunks/{Dg_UWGX7.js → CWJVj28H.js} +1 -1
- package/build/client/_app/immutable/chunks/{sIEmSkn6.js → CWRt23V2.js} +1 -1
- package/build/client/_app/immutable/chunks/{DWDfcLfy.js → CXDjw6BI.js} +1 -1
- package/build/client/_app/immutable/chunks/{BBKpNcUe.js → CbmGLQlS.js} +1 -1
- package/build/client/_app/immutable/chunks/{raVGrKQy.js → CfKp2keY.js} +4 -4
- package/build/client/_app/immutable/chunks/{LWre5GKl.js → CfPrYC2A.js} +1 -1
- package/build/client/_app/immutable/chunks/{zpcgJjUg.js → CfqeI44h.js} +1 -1
- package/build/client/_app/immutable/chunks/{BJL7RCQE.js → CjMviqoD.js} +1 -1
- package/build/client/_app/immutable/chunks/Ct7xT-0E.js +1 -0
- package/build/client/_app/immutable/chunks/{DGarjVZC.js → CwpTIVX4.js} +1 -1
- package/build/client/_app/immutable/chunks/{C1JXY9b5.js → D-p2gaJO.js} +1 -1
- package/build/client/_app/immutable/chunks/{CWVpRRWx.js → D2Punuji.js} +1 -1
- package/build/client/_app/immutable/chunks/{CWKM3f5q.js → D9XozwcM.js} +1 -1
- package/build/client/_app/immutable/chunks/DChUx8Ds.js +1 -0
- package/build/client/_app/immutable/chunks/DFZg0vdm.js +8 -0
- package/build/client/_app/immutable/chunks/{BOfSXrr7.js → DHChdxxK.js} +1 -1
- package/build/client/_app/immutable/chunks/DKLs56Hm.js +1 -0
- package/build/client/_app/immutable/chunks/{D0I62FkS.js → DTVIMflS.js} +1 -1
- package/build/client/_app/immutable/chunks/{D8-5qLJg.js → DVsJyQaB.js} +1 -1
- package/build/client/_app/immutable/chunks/{Btk-1DaX.js → D_4vyw9k.js} +1 -1
- package/build/client/_app/immutable/chunks/{CPgSxomx.js → Da0rl5Rb.js} +1 -1
- package/build/client/_app/immutable/chunks/{DPKol_4Z.js → DfxnqpU2.js} +1 -1
- package/build/client/_app/immutable/chunks/DnA33f7e.js +3 -0
- package/build/client/_app/immutable/chunks/{6GKQw8m6.js → DrLWFO8Z.js} +1 -1
- package/build/client/_app/immutable/chunks/{DITEY8D_.js → DtdNJetN.js} +1 -1
- package/build/client/_app/immutable/chunks/{DLOOos_8.js → Dufckt0T.js} +1 -1
- package/build/client/_app/immutable/chunks/{DAS1CLuE.js → DzNl4lTU.js} +1 -1
- package/build/client/_app/immutable/chunks/E-1cXrsM.js +1 -0
- package/build/client/_app/immutable/chunks/{DYqsupvX.js → FDKaBHdO.js} +1 -1
- package/build/client/_app/immutable/chunks/FmeCgKwk.js +1 -0
- package/build/client/_app/immutable/chunks/{BrTsmS-o.js → KCYBrblk.js} +5 -5
- package/build/client/_app/immutable/chunks/N_z8g1dA.js +1 -0
- package/build/client/_app/immutable/chunks/{DbcKN35_.js → NxBjh70M.js} +1 -1
- package/build/client/_app/immutable/chunks/{B1YSaoU7.js → T453H1uG.js} +1 -1
- package/build/client/_app/immutable/chunks/{DqwfDHZH.js → XM-sjL-p.js} +1 -1
- package/build/client/_app/immutable/chunks/{CcL1k2On.js → _OxPZn8v.js} +1 -1
- package/build/client/_app/immutable/chunks/{DvCMcJ3P.js → dg-Ik0Xp.js} +1 -1
- package/build/client/_app/immutable/chunks/{Cd6K7Y8m.js → eNqKaSDb.js} +1 -1
- package/build/client/_app/immutable/chunks/{mVHw7KEX.js → hFCLiR2C.js} +1 -1
- package/build/client/_app/immutable/chunks/{Rh9cy7xg.js → pRzztTzl.js} +1 -1
- package/build/client/_app/immutable/chunks/{Cb1pwoev.js → qDr7l6ST.js} +1 -1
- package/build/client/_app/immutable/chunks/{nDMCpPkF.js → tziyL5EM.js} +1 -1
- package/build/client/_app/immutable/chunks/{UNxFjlik.js → wRPKccfz.js} +1 -1
- package/build/client/_app/immutable/entry/app.BQBFBQPC.js +2 -0
- package/build/client/_app/immutable/entry/start.Cz8Ti8Dy.js +1 -0
- package/build/client/_app/immutable/nodes/0.Cl1RKBMO.js +1 -0
- package/build/client/_app/immutable/nodes/1.D8GGUpeE.js +1 -0
- package/build/client/_app/immutable/nodes/2.LG4wpZ6R.js +174 -0
- package/build/client/_app/immutable/workers/settings-css-worker-DRH2OcAG.js +93 -0
- package/build/client/_app/immutable/workers/settings-html-worker-DQLddT9h.js +506 -0
- package/build/client/_app/immutable/workers/settings-json-worker-D_Dqrls5.js +62 -0
- package/build/client/_app/immutable/workers/settings-ts-worker-DkYoA6bF.js +67738 -0
- package/build/client/_app/version.json +1 -1
- package/build/env.js +2 -2
- package/build/handler.js +9 -9
- package/build/index.js +9 -9
- package/build/server/chunks/chunks/{app-config.svelte.js-Co9jacqT.js → app-config.svelte.js-BkhuJ9bF.js} +2 -2
- package/build/server/chunks/chunks/{config.js-BBYogCe7.js → config.js-D2vQdial.js} +9 -2
- package/build/server/chunks/chunks/{db.js-C4EPtpZT.js → db.js-Cya8uRCD.js} +2 -2
- package/build/server/chunks/chunks/{db2.js-BYr2lzQs.js → db2.js-CPqi0hcH.js} +2 -2
- package/build/server/chunks/chunks/{dsh-connection.js-D52KwDXm.js → dsh-connection.js-DlwhJZaV.js} +3 -3
- package/build/server/chunks/chunks/{exports.js-DMiPee3x.js → exports.js-DH_tjtdv.js} +4 -4
- package/build/server/chunks/chunks/git-probe.js-nfLEa58f.js +219 -0
- package/build/server/chunks/chunks/image-limits.js-CUdJ0f7r.js +41 -0
- package/build/server/chunks/chunks/{insight-config.js-BAitz0O1.js → insight-config.js-BwcV3Bct.js} +5 -159
- package/build/server/chunks/chunks/{internal.js-CLhwhxSl.js → internal.js-Cuz_sBks.js} +6 -5
- package/build/server/chunks/chunks/{internal2.js-D-DAuSVh.js → internal2.js-BcS47nI-.js} +2 -2
- package/build/server/chunks/chunks/{image-limits.js-BMPZ55kJ.js → permission-state.js-yvwUSnug.js} +8 -41
- package/build/server/chunks/chunks/runtime.js-BPLc5RLR.js +854 -0
- package/build/server/chunks/chunks/{server.js-DoCd0fEo.js → server.js-11-pxAWV.js} +73 -2
- package/build/server/chunks/chunks/settings-document.js-BIwLIxnE.js +162 -0
- package/build/server/chunks/chunks/{shared.js-C4-Py8s_.js → shared.js-HQ0rfhm4.js} +4 -4
- package/build/server/chunks/chunks/{state.js-Ct3UbrbR.js → state.js-CwHEPfXH.js} +42 -10
- package/build/server/chunks/chunks/{utils.js-tOWCe9Wk.js → utils.js-CAdNO8Tu.js} +6 -6
- package/build/server/chunks/chunks/{watcher.js-CZl6B1Gm.js → watcher.js-CmpeTgh-.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/a2a/_id_/{_server.ts.js-BiJNs-w9.js → _server.ts.js-D5AWBpBQ.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/a2a/{_server.ts.js-DpYiPNfK.js → _server.ts.js-BZvM0qV8.js} +9 -8
- package/build/server/chunks/entries/endpoints/api/a2a/register/{_server.ts.js-hsrqtyai.js → _server.ts.js-CwQ8v1Gr.js} +9 -8
- package/build/server/chunks/entries/endpoints/api/config/{_server.ts.js-C22-pOYW.js → _server.ts.js-DRFbC3XB.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/dsh/directory/{_server.ts.js-GB8GCnt9.js → _server.ts.js-1NUslX2J.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/pick-directory/{_server.ts.js-1f1lp4p6.js → _server.ts.js-BaNBBHLR.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/presets/{_server.ts.js-bQ6fWiaE.js → _server.ts.js-CW2NY_YQ.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/attachment/{_server.ts.js-Dpn0vlL4.js → _server.ts.js-QA9zJsqt.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/cancel/{_server.ts.js-BCKU6r0e.js → _server.ts.js-CVXZhV9H.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/catalog/{_server.ts.js-B6CP7Ox-.js → _server.ts.js-Cit4Casr.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/command/{_server.ts.js-CuIGYst7.js → _server.ts.js-CyjB1woG.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/events/{_server.ts.js-BJk9GfEb.js → _server.ts.js-DllJ8vBI.js} +9 -7
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/fork/{_server.ts.js-BRjJibko.js → _server.ts.js-BNnAmzy2.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/goal/{_server.ts.js-Du0XmI7X.js → _server.ts.js-BM_jJMFG.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/history/{_server.ts.js-BmxbonR_.js → _server.ts.js-qKiwUxSN.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/models/{_server.ts.js-B03gh2aZ.js → _server.ts.js-CZ0zXTiV.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/permission/{_server.ts.js-BO9Iy5Ki.js → _server.ts.js-3o3S3pHm.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/prompt/{_server.ts.js-qr2peU-n.js → _server.ts.js-DsCnz_8J.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/rename/{_server.ts.js-D4PIEynR.js → _server.ts.js-6QBc29c0.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/respond/{_server.ts.js-CcBAtZWB.js → _server.ts.js-Cur_rwoa.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/session/_sessionId_/select-model/{_server.ts.js-CE1gTwwX.js → _server.ts.js-BBRIvxEV.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/sessions/{_server.ts.js-GugaguYO.js → _server.ts.js-HXmuGYk_.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/{_server.ts.js-D7ZCMRXo.js → _server.ts.js-BtF78EDX.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file-bytes/{_server.ts.js-BeLFfBNx.js → _server.ts.js-DaxAqI2r.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-tree/{_server.ts.js-CUMrE1yT.js → _server.ts.js-Cp3JRhml.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/{_server.ts.js-CPTg8pND.js → _server.ts.js-DCHNOxOw.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/delete/{_server.ts.js-ikZ2NK35.js → _server.ts.js-CTCYuknC.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/dsh/workspaces/_workspaceId_/rename/{_server.ts.js-DO-sihfI.js → _server.ts.js-B1O7CmG7.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/prompts/_id_/{_server.ts.js-CtWIL8u1.js → _server.ts.js-CMAYot0u.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/prompts/{_server.ts.js-CCV5F65b.js → _server.ts.js-Bk-I6Cmq.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/prompts/use/{_server.ts.js-5zjPgL0k.js → _server.ts.js-CWdigZaS.js} +7 -6
- package/build/server/chunks/entries/endpoints/api/settings/{_server.ts.js-DGy6xjPE.js → _server.ts.js-BgZ3eon4.js} +6 -5
- package/build/server/chunks/entries/endpoints/api/workspace/file-write/_server.ts.js-CMDHM8Ts.js +109 -0
- package/build/server/chunks/entries/endpoints/api/workspace/git-events/_server.ts.js-DsrelTvu.js +295 -0
- package/build/server/chunks/entries/endpoints/api/workspace/git-file-head/_server.ts.js-Bjo1hSe3.js +87 -0
- package/build/server/chunks/entries/endpoints/api/workspace/git-map/_server.ts.js-kbPAnTV6.js +75 -0
- package/build/server/chunks/entries/endpoints/api/workspace/git-status/_server.ts.js-CGSk5JWn.js +80 -0
- package/build/server/chunks/entries/hooks.server.js-B7FsvqtT.js +307 -0
- package/build/server/chunks/entries/pages/_error.svelte.js-BcGj5uWu.js +183 -0
- package/build/server/chunks/entries/pages/{_page.server.ts.js-BGXwU4Ay.js → _page.server.ts.js-CNU4x-f1.js} +5 -4
- package/build/server/chunks/entries/pages/{_page.svelte.js-BxAPMhC5.js → _page.svelte.js-vy-eThLC.js} +5297 -392
- package/build/server/chunks/{handler-D4tuQz0Q.js → handler-uNq08tmU.js} +8 -8
- package/build/server/chunks/{index.js-Bj9XVTa8.js → index.js-vyc3xio1.js} +35 -35
- package/build/server/chunks/{manifest.js-zxk8d3d8.js → manifest.js-Cx3f-cHu.js} +72 -44
- package/build/server/chunks/nodes/{0.js-DCyDo8-C.js → 0.js-BRdcKR1I.js} +3 -3
- package/build/server/chunks/nodes/1.js-Dp8B4lMj.js +9 -0
- package/build/server/chunks/nodes/2.js-D_OTrlKi.js +26 -0
- package/package.json +6 -3
- package/build/client/_app/immutable/assets/0.DqFt8jIM.css +0 -2
- package/build/client/_app/immutable/assets/2.dKbN8ToR.css +0 -1
- package/build/client/_app/immutable/chunks/BoyJtMif.js +0 -1
- package/build/client/_app/immutable/chunks/Bp4uuUjI.js +0 -3
- package/build/client/_app/immutable/chunks/CDt9a7EA.js +0 -2
- package/build/client/_app/immutable/chunks/CV7-m-Xm.js +0 -1
- package/build/client/_app/immutable/chunks/CsHVnZCH.js +0 -1
- package/build/client/_app/immutable/chunks/D1qzYj9m.js +0 -1
- package/build/client/_app/immutable/chunks/DXeGLmed.js +0 -8
- package/build/client/_app/immutable/chunks/ESmLJICu.js +0 -1
- package/build/client/_app/immutable/chunks/PaZBB01u.js +0 -1
- package/build/client/_app/immutable/chunks/UmdltqoE.js +0 -1
- package/build/client/_app/immutable/chunks/i0VQdJtv.js +0 -1
- package/build/client/_app/immutable/entry/app.CQ41dis3.js +0 -2
- package/build/client/_app/immutable/entry/start.DjPg9fbN.js +0 -1
- package/build/client/_app/immutable/nodes/0.B_ZEZy7b.js +0 -1
- package/build/client/_app/immutable/nodes/1.-77Wm-KY.js +0 -1
- package/build/client/_app/immutable/nodes/2.B4TGPB8b.js +0 -69
- package/build/server/chunks/entries/endpoints/api/dsh/workspace-file/save/_server.ts.js-CO9iOVa4.js +0 -110
- package/build/server/chunks/entries/pages/_error.svelte.js-B6WyZdis.js +0 -41
- package/build/server/chunks/nodes/1.js-DK1imDS5.js +0 -9
- package/build/server/chunks/nodes/2.js-YT-YLp-v.js +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1789306139847"}
|
package/build/env.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import nodePath__default from 'node:path';
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
|
|
5
5
|
// since env.js is an entrypoint, `dir` will point to the output directory
|
|
6
|
-
const dir =
|
|
6
|
+
const dir = nodePath__default.dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
|
|
8
8
|
const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']);
|
|
9
9
|
|
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-uNq08tmU.js';
|
|
6
|
+
import './server/chunks/index.js-vyc3xio1.js';
|
|
7
|
+
import './server/chunks/manifest.js-Cx3f-cHu.js';
|
|
8
8
|
import './env.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -12,12 +12,12 @@ import 'node:http';
|
|
|
12
12
|
import 'node:timers';
|
|
13
13
|
import 'node:querystring';
|
|
14
14
|
import 'node:stream';
|
|
15
|
-
import './server/chunks/chunks/shared.js-
|
|
15
|
+
import './server/chunks/chunks/shared.js-HQ0rfhm4.js';
|
|
16
16
|
import './server/chunks/chunks/uneval.js-BJ9Qq2SF.js';
|
|
17
|
-
import './server/chunks/chunks/utils.js-
|
|
17
|
+
import './server/chunks/chunks/utils.js-CAdNO8Tu.js';
|
|
18
18
|
import 'node:url';
|
|
19
|
-
import './server/chunks/chunks/internal.js-
|
|
20
|
-
import './server/chunks/chunks/server.js-
|
|
21
|
-
import './server/chunks/chunks/internal2.js-
|
|
22
|
-
import './server/chunks/chunks/exports.js-
|
|
19
|
+
import './server/chunks/chunks/internal.js-Cuz_sBks.js';
|
|
20
|
+
import './server/chunks/chunks/server.js-11-pxAWV.js';
|
|
21
|
+
import './server/chunks/chunks/internal2.js-BcS47nI-.js';
|
|
22
|
+
import './server/chunks/chunks/exports.js-DH_tjtdv.js';
|
|
23
23
|
//# 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-uNq08tmU.js';
|
|
5
5
|
import { env, timeout_env } from './env.js';
|
|
6
6
|
import { rm } from 'node:fs/promises';
|
|
7
7
|
import './shims.js';
|
|
@@ -11,15 +11,15 @@ import 'node:path';
|
|
|
11
11
|
import 'node:timers';
|
|
12
12
|
import 'node:querystring';
|
|
13
13
|
import 'node:stream';
|
|
14
|
-
import './server/chunks/chunks/shared.js-
|
|
14
|
+
import './server/chunks/chunks/shared.js-HQ0rfhm4.js';
|
|
15
15
|
import './server/chunks/chunks/uneval.js-BJ9Qq2SF.js';
|
|
16
|
-
import './server/chunks/chunks/utils.js-
|
|
17
|
-
import './server/chunks/index.js-
|
|
18
|
-
import './server/chunks/chunks/internal.js-
|
|
19
|
-
import './server/chunks/chunks/server.js-
|
|
20
|
-
import './server/chunks/chunks/internal2.js-
|
|
21
|
-
import './server/chunks/chunks/exports.js-
|
|
22
|
-
import './server/chunks/manifest.js-
|
|
16
|
+
import './server/chunks/chunks/utils.js-CAdNO8Tu.js';
|
|
17
|
+
import './server/chunks/index.js-vyc3xio1.js';
|
|
18
|
+
import './server/chunks/chunks/internal.js-Cuz_sBks.js';
|
|
19
|
+
import './server/chunks/chunks/server.js-11-pxAWV.js';
|
|
20
|
+
import './server/chunks/chunks/internal2.js-BcS47nI-.js';
|
|
21
|
+
import './server/chunks/chunks/exports.js-DH_tjtdv.js';
|
|
22
|
+
import './server/chunks/manifest.js-Cx3f-cHu.js';
|
|
23
23
|
import 'node:url';
|
|
24
24
|
|
|
25
25
|
const path = env('SOCKET_PATH', false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DEFAULT_SIDEBAR_PLACEMENT, a as DEFAULT_PANEL_MAX_ZOOM, b as DEFAULT_PANEL_MIN_ZOOM, c as DEFAULT_A2A_WATCH_TIMEOUT_MS, d as DEFAULT_A2A_FAST_POLL_MS, e as DEFAULT_HOME_REFRESH_MS, f as DEFAULT_STATS_BAR_MODE, g as DEFAULT_POLL_IDLE_MS, h as DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS } from './config.js-
|
|
1
|
+
import { D as DEFAULT_SIDEBAR_PLACEMENT, a as DEFAULT_PANEL_MAX_ZOOM, b as DEFAULT_PANEL_MIN_ZOOM, c as DEFAULT_A2A_WATCH_TIMEOUT_MS, d as DEFAULT_A2A_FAST_POLL_MS, e as DEFAULT_HOME_REFRESH_MS, f as DEFAULT_STATS_BAR_MODE, g as DEFAULT_POLL_IDLE_MS, h as DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS } from './config.js-D2vQdial.js';
|
|
2
2
|
|
|
3
3
|
//#region src/lib/services/config/app-config.svelte.ts
|
|
4
4
|
function freshDefault() {
|
|
@@ -49,4 +49,4 @@ function appConfig() {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export { appConfig as a };
|
|
52
|
-
//# sourceMappingURL=app-config.svelte.js-
|
|
52
|
+
//# sourceMappingURL=app-config.svelte.js-BkhuJ9bF.js.map
|
|
@@ -30,6 +30,13 @@ function resolveConversationFlags(v) {
|
|
|
30
30
|
progressiveFold: typeof rec.progressiveFold === "boolean" ? rec.progressiveFold : false
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
/** The UI locale fleet — ADR D5. A fourth language is one catalog file
|
|
34
|
+
* plus one entry here and in project.inlang/settings.json. */
|
|
35
|
+
var UI_LOCALES = [
|
|
36
|
+
"en",
|
|
37
|
+
"zh",
|
|
38
|
+
"id"
|
|
39
|
+
];
|
|
33
40
|
/** `home.refreshMs` default — home list + spine refresh cadence (BC-7). */
|
|
34
41
|
var DEFAULT_HOME_REFRESH_MS = 5e3;
|
|
35
42
|
/** `a2a.fastPollMs` default — LIST-lane tick (ONE batched session.list for
|
|
@@ -119,5 +126,5 @@ function isConfigRecord(v) {
|
|
|
119
126
|
return typeof v === "object" && v !== null && !Array.isArray(v);
|
|
120
127
|
}
|
|
121
128
|
|
|
122
|
-
export { DEFAULT_SIDEBAR_PLACEMENT as D, DEFAULT_PANEL_MAX_ZOOM as a, DEFAULT_PANEL_MIN_ZOOM as b, DEFAULT_A2A_WATCH_TIMEOUT_MS as c, DEFAULT_A2A_FAST_POLL_MS as d, DEFAULT_HOME_REFRESH_MS as e, DEFAULT_STATS_BAR_MODE as f, DEFAULT_POLL_IDLE_MS as g, DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS as h,
|
|
123
|
-
//# sourceMappingURL=config.js-
|
|
129
|
+
export { DEFAULT_SIDEBAR_PLACEMENT as D, UI_LOCALES as U, DEFAULT_PANEL_MAX_ZOOM as a, DEFAULT_PANEL_MIN_ZOOM as b, DEFAULT_A2A_WATCH_TIMEOUT_MS as c, DEFAULT_A2A_FAST_POLL_MS as d, DEFAULT_HOME_REFRESH_MS as e, DEFAULT_STATS_BAR_MODE as f, DEFAULT_POLL_IDLE_MS as g, DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS as h, isConfigRecord as i, resolveSidebarPlacement as j, resolveWidthBounds as k, resolveZoomBounds as l, intWithin as m, resolveConversationFlags as n, resolveStatsBarMode as o, dshBaseUrl as p, resolveA2aConfig as r };
|
|
130
|
+
//# sourceMappingURL=config.js-D2vQdial.js.map
|
|
@@ -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-BwcV3Bct.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-Cya8uRCD.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readPromptsConfig, D as DSI_CONFIG_PATH } from './insight-config.js-
|
|
1
|
+
import { i as readPromptsConfig, D as DSI_CONFIG_PATH } from './insight-config.js-BwcV3Bct.js';
|
|
2
2
|
import { mkdirSync } from 'node:fs';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
4
|
import { DatabaseSync } from 'node:sqlite';
|
|
@@ -761,4 +761,4 @@ function updatePrompt(id, fields) {
|
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
export { renamePromptLabel as a, createPrompt as c, deletePrompt as d, findPromptByText as f, listPrompts as l, recordPromptUse as r, searchPrompts as s, updatePrompt as u };
|
|
764
|
-
//# sourceMappingURL=db2.js-
|
|
764
|
+
//# sourceMappingURL=db2.js-CPqi0hcH.js.map
|
package/build/server/chunks/chunks/{dsh-connection.js-D52KwDXm.js → dsh-connection.js-DlwhJZaV.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as dshBaseUrl } from './config.js-
|
|
2
|
-
import { r as readDshPresetEnglishConfig, a as readDshAuthConfig, b as readServerConfig } from './insight-config.js-
|
|
1
|
+
import { p as dshBaseUrl } from './config.js-D2vQdial.js';
|
|
2
|
+
import { r as readDshPresetEnglishConfig, a as readDshAuthConfig, b as readServerConfig } from './insight-config.js-BwcV3Bct.js';
|
|
3
3
|
|
|
4
4
|
//#region src/lib/server/dsh-rpc.ts
|
|
5
5
|
/**
|
|
@@ -1954,4 +1954,4 @@ function normalizePreset(row, overlayEnglish = true) {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
|
|
1956
1956
|
export { DshRpcError as D, isPromptImageMediaType as a, buildPromptContent as b, getDshConnection as g, isSubagentRejection as i, mapRpcFailure as m, statusFor as s };
|
|
1957
|
-
//# sourceMappingURL=dsh-connection.js-
|
|
1957
|
+
//# sourceMappingURL=dsh-connection.js-DlwhJZaV.js.map
|
|
@@ -112,7 +112,7 @@ function allow_nodejs_console_log(url) {
|
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.56.10_vite@8.2.2_@
|
|
115
|
+
//#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/hash.js
|
|
116
116
|
/**
|
|
117
117
|
* Hash using djb2
|
|
118
118
|
* @param {import('types').StrictBody[]} values
|
|
@@ -130,7 +130,7 @@ function hash(...values) {
|
|
|
130
130
|
return (hash >>> 0).toString(36);
|
|
131
131
|
}
|
|
132
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_@
|
|
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
134
|
/**
|
|
135
135
|
* @param {RegExpMatchArray} match
|
|
136
136
|
* @param {import('types').RouteParam[]} params
|
|
@@ -191,7 +191,7 @@ function find_route(path, routes, matchers) {
|
|
|
191
191
|
return null;
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
|
-
//#region node_modules/.pnpm/@sveltejs+kit@2.70.3_@sveltejs+vite-plugin-svelte@7.3.0_svelte@5.56.10_vite@8.2.2_@
|
|
194
|
+
//#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/exports.js
|
|
195
195
|
/**
|
|
196
196
|
* @param {Set<string>} expected
|
|
197
197
|
*/
|
|
@@ -260,4 +260,4 @@ var validate_layout_server_exports = validator(valid_layout_server_exports);
|
|
|
260
260
|
var validate_page_server_exports = validator(valid_page_server_exports);
|
|
261
261
|
|
|
262
262
|
export { disable_search as a, validate_layout_exports as b, validate_page_server_exports as c, decode_pathname as d, validate_page_exports as e, find_route as f, hash as h, make_trackable as m, normalize_path as n, resolve as r, validate_layout_server_exports as v };
|
|
263
|
-
//# sourceMappingURL=exports.js-
|
|
263
|
+
//# sourceMappingURL=exports.js-DH_tjtdv.js.map
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { g as getDshConnection } from './dsh-connection.js-DlwhJZaV.js';
|
|
2
|
+
import { h as historyToEvents } from './dsh-events.js-BtDxaV6Q.js';
|
|
3
|
+
import { a as foldKnobs, f as filterKnobEvents, F as FULL_ACCESS_PRESET } from './permission-state.js-yvwUSnug.js';
|
|
4
|
+
import { promises } from 'node:fs';
|
|
5
|
+
import * as nodePath from 'node:path';
|
|
6
|
+
import { execFile } from 'node:child_process';
|
|
7
|
+
|
|
8
|
+
//#region src/lib/server/git-probe.ts
|
|
9
|
+
/**
|
|
10
|
+
* git-probe — the DSI server's gated git eye (ADR 2026-09-12, The Git Eye,
|
|
11
|
+
* D1/D2/D5): the ONE place that looks at the filesystem on the browser's
|
|
12
|
+
* behalf. Detection is pure node:fs over a SINGLE directory level (a
|
|
13
|
+
* .git file flags like a .git directory — the worktree/submodule form);
|
|
14
|
+
* status is a read-only `git status --porcelain=v1 -z` child run with a
|
|
15
|
+
* bounded result. Every entry point routes through the gate: the owning
|
|
16
|
+
* session's sandbox mode must be danger-full-access, resolved FRESH per
|
|
17
|
+
* call from the ledger tail (folded knob events first, the projections
|
|
18
|
+
* baseline second) — the gate is never cached, and callers must treat a
|
|
19
|
+
* closed gate as final (the route answers enabled:false without touching
|
|
20
|
+
* the filesystem). The DSH host is never asked: no git RPC exists there
|
|
21
|
+
* and this module deliberately does not add one (ADR D1).
|
|
22
|
+
*/
|
|
23
|
+
/** git status ran and the git binary is not installed on this machine. */
|
|
24
|
+
var GitUnavailableError = class extends Error {
|
|
25
|
+
constructor() {
|
|
26
|
+
super("the git binary is not available on the DSI server machine");
|
|
27
|
+
this.name = "GitUnavailableError";
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Path containment for the status route: the requested repo must BE the
|
|
32
|
+
* workspace root or live inside it, compared over REALPATHS (a symlinked
|
|
33
|
+
* checkout cannot smuggle a path out). Best-effort: a root that cannot be
|
|
34
|
+
* real-pathed (vanished mid-request) counts as outside — refuse, never
|
|
35
|
+
* guess.
|
|
36
|
+
*/
|
|
37
|
+
async function isInsideRoot(root, repo) {
|
|
38
|
+
try {
|
|
39
|
+
const [rootReal, repoReal] = await Promise.all([promises.realpath(root), promises.realpath(repo)]);
|
|
40
|
+
return repoReal === rootReal || repoReal.startsWith(rootReal + nodePath.sep);
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/** Wall-clock cap on one git child run. */
|
|
46
|
+
var GIT_TIMEOUT_MS = 1e4;
|
|
47
|
+
/** Output cap on one git child run (porcelain is ~100 bytes/entry; generous). */
|
|
48
|
+
var GIT_MAX_BUFFER = 4194304;
|
|
49
|
+
/**
|
|
50
|
+
* The gate (ADR D2): the owning session's effective sandbox mode must be
|
|
51
|
+
* danger-full-access. Resolved fresh per call — owner session first (a
|
|
52
|
+
* sub-agent id is refused by the host, the same as the tree route), then
|
|
53
|
+
* the ledger tail: the folded sandbox/mode knob wins; without one, the
|
|
54
|
+
* tail projections' permissions.currentValue is the baseline (the Access
|
|
55
|
+
* chip's own source). No signal at all closes the gate.
|
|
56
|
+
*/
|
|
57
|
+
async function gitGateEnabled(sessionId) {
|
|
58
|
+
const conn = getDshConnection();
|
|
59
|
+
const owner = await conn.workspaceOwnerSessionId(sessionId);
|
|
60
|
+
conn.ensureDownlinks();
|
|
61
|
+
conn.subscribe(owner);
|
|
62
|
+
const [page, live] = await Promise.all([conn.history(owner), conn.waitForProjections(owner).catch(() => null)]);
|
|
63
|
+
const knobs = foldKnobs(filterKnobEvents(historyToEvents(page.events)));
|
|
64
|
+
if (knobs.sandbox !== null) return knobs.sandbox === FULL_ACCESS_PRESET;
|
|
65
|
+
const permissions = (live?.values ?? page.projections?.values ?? {})["permissions"];
|
|
66
|
+
return typeof permissions?.currentValue === "string" && permissions.currentValue === "danger-full-access";
|
|
67
|
+
}
|
|
68
|
+
/** Does this directory contain a .git entry (file OR directory)? */
|
|
69
|
+
async function isRepo(dir) {
|
|
70
|
+
try {
|
|
71
|
+
await promises.stat(nodePath.join(dir, ".git"));
|
|
72
|
+
return true;
|
|
73
|
+
} catch {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Detect repos under ONE directory level: the directory itself plus each
|
|
79
|
+
* immediate child that is a directory (symlinks resolved — a linked
|
|
80
|
+
* checkout flags like a real one). A child whose stat fails (permissions,
|
|
81
|
+
* race) is simply not a repo; a detection answer is never an error.
|
|
82
|
+
*/
|
|
83
|
+
async function detectRepos(dir) {
|
|
84
|
+
const dirents = await promises.readdir(dir, { withFileTypes: true });
|
|
85
|
+
const repos = {};
|
|
86
|
+
for (const dirent of dirents) {
|
|
87
|
+
if (dirent.isDirectory()) {
|
|
88
|
+
repos[dirent.name] = await isRepo(nodePath.join(dir, dirent.name));
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (dirent.isSymbolicLink()) try {
|
|
92
|
+
if ((await promises.stat(nodePath.join(dir, dirent.name))).isDirectory()) repos[dirent.name] = await isRepo(nodePath.join(dir, dirent.name));
|
|
93
|
+
} catch {}
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
rootIsRepo: await isRepo(dir),
|
|
97
|
+
repos
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The repo that directly contains a root-relative workspace path: the
|
|
102
|
+
* root itself when it is a repo, else the DEEPEST ancestor directory of
|
|
103
|
+
* the path that hosts a .git entry. Null when no repo encloses the path
|
|
104
|
+
* — the route answers honestly, the browser guesses nothing.
|
|
105
|
+
*/
|
|
106
|
+
async function resolveEnclosingRepo(root, relPath) {
|
|
107
|
+
const parts = relPath.split("/").filter((p) => p.length > 0);
|
|
108
|
+
if (parts.length === 0) return null;
|
|
109
|
+
if (await isRepo(root)) return {
|
|
110
|
+
repo: root,
|
|
111
|
+
rel: parts.join("/")
|
|
112
|
+
};
|
|
113
|
+
for (let i = parts.length - 1; i >= 1; i--) {
|
|
114
|
+
const dir = nodePath.join(root, ...parts.slice(0, i));
|
|
115
|
+
if (await isRepo(dir)) return {
|
|
116
|
+
repo: dir,
|
|
117
|
+
rel: parts.slice(i).join("/")
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Read-only HEAD blob text for one repo-relative path: git show
|
|
124
|
+
* HEAD:rel with the same child-run caps as status. A path git does not
|
|
125
|
+
* know in HEAD (untracked or newly added) resolves to NULL — an honest
|
|
126
|
+
* "no before-version", never an error. Traversal attempts (.. segments,
|
|
127
|
+
* absolute, empty) throw before git runs. A missing git binary raises
|
|
128
|
+
* GitUnavailableError.
|
|
129
|
+
*/
|
|
130
|
+
async function gitFileHead(repo, rel) {
|
|
131
|
+
if (rel.length === 0 || rel.startsWith("/") || rel.split("/").includes("..")) throw new Error("rel must be a non-empty repo-relative path without traversal");
|
|
132
|
+
return new Promise((resolve, reject) => {
|
|
133
|
+
execFile("git", [
|
|
134
|
+
"-C",
|
|
135
|
+
repo,
|
|
136
|
+
"show",
|
|
137
|
+
"HEAD:" + rel
|
|
138
|
+
], {
|
|
139
|
+
timeout: GIT_TIMEOUT_MS,
|
|
140
|
+
maxBuffer: GIT_MAX_BUFFER
|
|
141
|
+
}, (err, out) => {
|
|
142
|
+
if (err === null) {
|
|
143
|
+
resolve(out);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const code = err.code;
|
|
147
|
+
if (code === "ENOENT") {
|
|
148
|
+
reject(new GitUnavailableError());
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (String(code) === "128") {
|
|
152
|
+
resolve(null);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
reject(err);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Porcelain parser shared by gitStatus and git-watch's baseline seed
|
|
161
|
+
* (Index Pulse: the watcher's verify-by-status-diff must compare EXACTLY
|
|
162
|
+
* what the route serves).
|
|
163
|
+
*/
|
|
164
|
+
function parsePorcelainStatus(stdout) {
|
|
165
|
+
const fields = stdout.split("\0");
|
|
166
|
+
const files = [];
|
|
167
|
+
let truncated = false;
|
|
168
|
+
for (let i = 0; i < fields.length - 1; i++) {
|
|
169
|
+
const field = fields[i];
|
|
170
|
+
if (field.length < 4) continue;
|
|
171
|
+
if (files.length >= 500) {
|
|
172
|
+
truncated = true;
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
const code = field.slice(0, 2);
|
|
176
|
+
const filePath = field.slice(3);
|
|
177
|
+
if (code.includes("R") || code.includes("C")) i++;
|
|
178
|
+
files.push({
|
|
179
|
+
code,
|
|
180
|
+
path: filePath
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
truncated,
|
|
185
|
+
files
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Read-only working-tree status for one repo root: `git status
|
|
190
|
+
* --porcelain=v1 -z`, NUL-separated so spaces in paths need no unquoting.
|
|
191
|
+
* Rename/copy entries carry the ORIGIN path as a second NUL field — the
|
|
192
|
+
* origin is skipped (the NEW path is what the explorer opens). At
|
|
193
|
+
* MAX_STATUS_ENTRIES the result truncates honestly. A missing git binary
|
|
194
|
+
* raises GitUnavailableError; any other child failure propagates.
|
|
195
|
+
*/
|
|
196
|
+
async function gitStatus(repo) {
|
|
197
|
+
return parsePorcelainStatus(await new Promise((resolve, reject) => {
|
|
198
|
+
execFile("git", [
|
|
199
|
+
"-C",
|
|
200
|
+
repo,
|
|
201
|
+
"status",
|
|
202
|
+
"--porcelain=v1",
|
|
203
|
+
"-z"
|
|
204
|
+
], {
|
|
205
|
+
timeout: GIT_TIMEOUT_MS,
|
|
206
|
+
maxBuffer: GIT_MAX_BUFFER
|
|
207
|
+
}, (err, out) => {
|
|
208
|
+
if (err) {
|
|
209
|
+
if (err.code === "ENOENT") reject(new GitUnavailableError());
|
|
210
|
+
else reject(err);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
resolve(out);
|
|
214
|
+
});
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
|
|
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-nfLEa58f.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/lib/services/conversation/image-limits.ts
|
|
2
|
+
/** DSH documented defaults (fallback when no projection rides the tail). */
|
|
3
|
+
var DEFAULT_IMAGE_LIMITS = {
|
|
4
|
+
maxImageBytes: 20971520,
|
|
5
|
+
maxImagesPerMessage: 20,
|
|
6
|
+
maxMessageImageBytes: 209715200,
|
|
7
|
+
maxImagePixels: 64e6,
|
|
8
|
+
maxImageDimension: 8192,
|
|
9
|
+
mediaTypes: [
|
|
10
|
+
"image/png",
|
|
11
|
+
"image/jpeg",
|
|
12
|
+
"image/webp",
|
|
13
|
+
"image/gif"
|
|
14
|
+
]
|
|
15
|
+
};
|
|
16
|
+
function isPositiveInt(value) {
|
|
17
|
+
return typeof value === "number" && Number.isInteger(value) && value > 0;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Validate the projections block's imageLimits value.
|
|
21
|
+
*
|
|
22
|
+
* @param raw - the projection value (projections.values.imageLimits), untyped.
|
|
23
|
+
* @returns the six-field limits, or null when absent/malformed — the caller
|
|
24
|
+
* then falls back to DEFAULT_IMAGE_LIMITS (BC-A6).
|
|
25
|
+
*/
|
|
26
|
+
function imageLimitsFromProjection(raw) {
|
|
27
|
+
if (!raw || typeof raw !== "object") return null;
|
|
28
|
+
const value = raw;
|
|
29
|
+
if (!isPositiveInt(value.maxImageBytes) || !isPositiveInt(value.maxImagesPerMessage) || !isPositiveInt(value.maxMessageImageBytes) || !isPositiveInt(value.maxImagePixels) || !isPositiveInt(value.maxImageDimension) || !Array.isArray(value.mediaTypes) || value.mediaTypes.length === 0 || !value.mediaTypes.every((t) => typeof t === "string" && t.length > 0)) return null;
|
|
30
|
+
return {
|
|
31
|
+
maxImageBytes: value.maxImageBytes,
|
|
32
|
+
maxImagesPerMessage: value.maxImagesPerMessage,
|
|
33
|
+
maxMessageImageBytes: value.maxMessageImageBytes,
|
|
34
|
+
maxImagePixels: value.maxImagePixels,
|
|
35
|
+
maxImageDimension: value.maxImageDimension,
|
|
36
|
+
mediaTypes: [...value.mediaTypes]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { DEFAULT_IMAGE_LIMITS as D, imageLimitsFromProjection as i };
|
|
41
|
+
//# sourceMappingURL=image-limits.js-CUdJ0f7r.js.map
|
package/build/server/chunks/chunks/{insight-config.js-BAitz0O1.js → insight-config.js-BwcV3Bct.js}
RENAMED
|
@@ -1,163 +1,9 @@
|
|
|
1
|
-
import { r as resolveA2aConfig,
|
|
2
|
-
import {
|
|
1
|
+
import { r as resolveA2aConfig, j as resolveSidebarPlacement, k as resolveWidthBounds, l as resolveZoomBounds, m as intWithin, n as resolveConversationFlags, o as resolveStatsBarMode, i as isConfigRecord, D as DEFAULT_SIDEBAR_PLACEMENT, a as DEFAULT_PANEL_MAX_ZOOM, b as DEFAULT_PANEL_MIN_ZOOM, c as DEFAULT_A2A_WATCH_TIMEOUT_MS, d as DEFAULT_A2A_FAST_POLL_MS, e as DEFAULT_HOME_REFRESH_MS, f as DEFAULT_STATS_BAR_MODE, g as DEFAULT_POLL_IDLE_MS, h as DEFAULT_ACCESS_CONFIRM_TIMEOUT_MS } from './config.js-D2vQdial.js';
|
|
2
|
+
import { e as ensureDsiHome, m as migrateLegacyDsiConfig, p as parseYamlSettings } from './settings-document.js-BIwLIxnE.js';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
3
4
|
import { dirname, join } from 'node:path';
|
|
4
5
|
import { homedir } from 'node:os';
|
|
5
|
-
import { parseDocument, stringify, parse } from 'yaml';
|
|
6
6
|
|
|
7
|
-
//#region src/lib/server/settings-document.ts
|
|
8
|
-
/**
|
|
9
|
-
* Settings document — raw-document access to DSI's and DSH's settings
|
|
10
|
-
* files for the settings editor panel (ADR The Settings Panel, 2026-09-07,
|
|
11
|
-
* D1/D2/D5). The YAML file is the authority: this module reads raw text,
|
|
12
|
-
* gates saves on a YAML parse, and writes atomically. It owns the one-time
|
|
13
|
-
* migration from DSI's legacy `~/.dsi/config.json` (D1): convert
|
|
14
|
-
* once, never touch the legacy file again, never run twice (a second
|
|
15
|
-
* resolve sees settings.yaml present and no-ops).
|
|
16
|
-
*
|
|
17
|
-
* Section readers (insight-config.ts) keep their own clamps and no-cache
|
|
18
|
-
* contract; they trigger the migration through this module and parse the
|
|
19
|
-
* same YAML home. The browser never learns a filesystem path — the API
|
|
20
|
-
* route (wave 2) is the only consumer of these functions.
|
|
21
|
-
*/
|
|
22
|
-
/** `~/.dsi/settings.yaml` — DSI's settings home (post-migration). */
|
|
23
|
-
var DSI_SETTINGS_PATH = join(homedir(), ".dsi", "settings.yaml");
|
|
24
|
-
/** `~/.dsh/settings.yaml` — the harness's settings home (DSH-owned). */
|
|
25
|
-
var DSH_SETTINGS_PATH = join(homedir(), ".dsh", "settings.yaml");
|
|
26
|
-
/** Resolve the DSI settings path: explicit arg → env override → default. */
|
|
27
|
-
function dsiSettingsPath(configPath) {
|
|
28
|
-
return process.env.DSI_CONFIG_PATH ?? DSI_SETTINGS_PATH;
|
|
29
|
-
}
|
|
30
|
-
/** Resolve the DSH settings path: explicit arg → env override → default. */
|
|
31
|
-
function dshSettingsPath(configPath) {
|
|
32
|
-
return configPath ?? process.env.DSH_SETTINGS_PATH ?? DSH_SETTINGS_PATH;
|
|
33
|
-
}
|
|
34
|
-
/** Resolve a target to its settings path (unknown targets are a bug at the
|
|
35
|
-
* caller — the route validates before this point; this switch is total). */
|
|
36
|
-
function resolveSettingsPath(target, configPath) {
|
|
37
|
-
switch (target) {
|
|
38
|
-
case "dsi": return dsiSettingsPath();
|
|
39
|
-
case "dsh": return dshSettingsPath(configPath);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/** Parse failure carrying the YAML parser's own position (line 1-based,
|
|
43
|
-
* column 0-based — surfaced verbatim to the editor banner). */
|
|
44
|
-
var SettingsParseError = class extends Error {
|
|
45
|
-
line;
|
|
46
|
-
column;
|
|
47
|
-
constructor(message, line, column) {
|
|
48
|
-
super(message);
|
|
49
|
-
this.line = line;
|
|
50
|
-
this.column = column;
|
|
51
|
-
this.name = "SettingsParseError";
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* One-time DSI migration (ADR D1): when settings.yaml is absent and the
|
|
56
|
-
* legacy config.json exists, parse the JSON and write it as YAML —
|
|
57
|
-
* atomically, so a crash mid-migration never leaves a torn file. The
|
|
58
|
-
* legacy file is READ ONLY here, never written, never read again once
|
|
59
|
-
* settings.yaml exists (a second resolve no-ops — the migration cannot
|
|
60
|
-
* run twice by construction).
|
|
61
|
-
* @param settingsPath - the resolved settings.yaml path.
|
|
62
|
-
* @param legacyPath - the legacy config.json path (same directory).
|
|
63
|
-
*/
|
|
64
|
-
function migrateLegacyDsiConfig(settingsPath, legacyPath) {
|
|
65
|
-
if (existsSync(settingsPath)) return;
|
|
66
|
-
const legacy = join(dirname(settingsPath), "config.json");
|
|
67
|
-
if (!existsSync(legacy)) return;
|
|
68
|
-
let parsed;
|
|
69
|
-
try {
|
|
70
|
-
parsed = JSON.parse(readFileSync(legacy, "utf-8"));
|
|
71
|
-
} catch {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
writeAtomic(settingsPath, stringify(parsed));
|
|
75
|
-
}
|
|
76
|
-
/** Resolve the template home: explicit arg → `DSI_TEMPLATE_PATH` env (set
|
|
77
|
-
* by bin/dsi.mjs from the package root) → `template/.dsi` under the cwd
|
|
78
|
-
* (dev runs). */
|
|
79
|
-
function templateHomePath(templatePath) {
|
|
80
|
-
return process.env.DSI_TEMPLATE_PATH ?? join(process.cwd(), "template", ".dsi");
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* First-start home bootstrap (template/.dsi): when the DSI home directory is
|
|
84
|
-
* absent, clone the shipped template (settings.yaml, prompts.sqlite seed,
|
|
85
|
-
* a2a.sqlite ledger) into place. An existing home is NEVER touched; a missing
|
|
86
|
-
* template is a silent no-op so builds without one degrade to the defaults
|
|
87
|
-
* contract.
|
|
88
|
-
* @param homePath - test seam overriding the operator home directory.
|
|
89
|
-
* @param templatePath - test seam overriding the template directory.
|
|
90
|
-
* @returns `exists` (home present), `cloned` (template copied), or
|
|
91
|
-
* `no-template` (nothing to copy from).
|
|
92
|
-
*/
|
|
93
|
-
function ensureDsiHome(homePath, templatePath) {
|
|
94
|
-
const home = homePath ?? dirname(DSI_SETTINGS_PATH);
|
|
95
|
-
if (existsSync(home)) return "exists";
|
|
96
|
-
const template = templateHomePath();
|
|
97
|
-
if (!existsSync(template)) return "no-template";
|
|
98
|
-
cpSync(template, home, { recursive: true });
|
|
99
|
-
return "cloned";
|
|
100
|
-
}
|
|
101
|
-
/** Atomic write: temp file in the target directory, then rename. */
|
|
102
|
-
function writeAtomic(path, text) {
|
|
103
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
104
|
-
const temp = join(dirname(path), `.${basenameOf(path)}.${process.pid}.tmp`);
|
|
105
|
-
writeFileSync(temp, text, "utf-8");
|
|
106
|
-
renameSync(temp, path);
|
|
107
|
-
}
|
|
108
|
-
function basenameOf(path) {
|
|
109
|
-
const parts = path.split(/[\\/]/);
|
|
110
|
-
return parts[parts.length - 1] || path;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Read a settings document as raw text, running the DSI migration first
|
|
114
|
-
* (dsi target only — DSH owns its own file lifecycle).
|
|
115
|
-
* @param target - which document to read.
|
|
116
|
-
* @param configPath - test seam overriding the resolved path.
|
|
117
|
-
*/
|
|
118
|
-
function readSettingsDocument(target, configPath) {
|
|
119
|
-
const path = resolveSettingsPath(target, configPath);
|
|
120
|
-
if (target === "dsi") {
|
|
121
|
-
ensureDsiHome(dirname(path));
|
|
122
|
-
migrateLegacyDsiConfig(path);
|
|
123
|
-
}
|
|
124
|
-
if (!existsSync(path)) return {
|
|
125
|
-
text: "",
|
|
126
|
-
missing: true
|
|
127
|
-
};
|
|
128
|
-
return {
|
|
129
|
-
text: readFileSync(path, "utf-8"),
|
|
130
|
-
missing: false
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Validate and atomically save a settings document. A parse failure throws
|
|
135
|
-
* {@link SettingsParseError} and writes NOTHING (ADR D5).
|
|
136
|
-
* @param target - which document to save.
|
|
137
|
-
* @param text - the whole edited document text.
|
|
138
|
-
* @param configPath - test seam overriding the resolved path.
|
|
139
|
-
*/
|
|
140
|
-
function saveSettingsDocument(target, text, configPath) {
|
|
141
|
-
const path = resolveSettingsPath(target, configPath);
|
|
142
|
-
const error = parseDocument(text, { strict: false }).errors[0];
|
|
143
|
-
if (error !== void 0) {
|
|
144
|
-
const pos = error.linePos?.[0];
|
|
145
|
-
throw new SettingsParseError(error.message, pos?.line ?? null, pos?.col ?? null);
|
|
146
|
-
}
|
|
147
|
-
writeAtomic(path, text);
|
|
148
|
-
}
|
|
149
|
-
/** Parse YAML into a record for section readers (JSON is a YAML subset, so
|
|
150
|
-
* the same parse serves both shapes). Null on missing/invalid. */
|
|
151
|
-
function parseYamlSettings(text) {
|
|
152
|
-
if (text.trim() === "") return null;
|
|
153
|
-
try {
|
|
154
|
-
const parsed = parse(text);
|
|
155
|
-
return isConfigRecord(parsed) ? parsed : null;
|
|
156
|
-
} catch {
|
|
157
|
-
return null;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
//#endregion
|
|
161
7
|
//#region src/lib/server/insight-config.ts
|
|
162
8
|
/**
|
|
163
9
|
* Insight config — DSI's operator-tunable settings
|
|
@@ -358,5 +204,5 @@ function readPromptsConfig(configPath) {
|
|
|
358
204
|
};
|
|
359
205
|
}
|
|
360
206
|
|
|
361
|
-
export { DSI_CONFIG_PATH as D,
|
|
362
|
-
//# sourceMappingURL=insight-config.js-
|
|
207
|
+
export { DSI_CONFIG_PATH as D, readDshAuthConfig as a, readServerConfig as b, readA2aConfig as c, readSidebarConfig as d, readPanelConfig as e, readHomeConfig as f, readConversationConfig as g, readChatConfig as h, readPromptsConfig as i, DEFAULT_DSH_PRESET_ENGLISH as j, DEFAULT_SERVER_CONFIG as k, DEFAULT_PROMPTS_CONFIG as l, DEFAULT_SIDEBAR_CONFIG as m, DEFAULT_PANEL_CONFIG as n, DEFAULT_A2A_CONFIG as o, DEFAULT_HOME_CONFIG as p, DEFAULT_CONVERSATION_CONFIG as q, readDshPresetEnglishConfig as r, DEFAULT_CHAT_CONFIG as s };
|
|
208
|
+
//# sourceMappingURL=insight-config.js-BwcV3Bct.js.map
|