@deepseek-insight/dsi 0.5.24 → 0.5.25
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 +3 -3
- package/.agents/skills/dsi-ov-setup/SKILL.md +6 -1
- package/.agents/skills/dsi-skill-shelf/SKILL.md +46 -0
- package/.agents/skills/dsi-skill-shelf/shelf.mjs +511 -0
- package/.agents/skills/dsi-spec/SKILL.md +4 -4
- package/.agents/skills/dsi-spec/references/tasks-json-template.md +1 -1
- package/build/client/_app/immutable/assets/0.DoqT6ojN.css +2 -0
- package/build/client/_app/immutable/assets/2.DqAZaZ6x.css +1 -0
- package/build/client/_app/immutable/chunks/C1BIbywb.js +1 -0
- package/build/client/_app/immutable/chunks/CN_lPpCU.js +1 -0
- package/build/client/_app/immutable/chunks/{xNyHdy4Z.js → DEg6k2po.js} +1 -1
- package/build/client/_app/immutable/chunks/{BFAx3hqQ.js → QV2fW_C7.js} +2 -2
- package/build/client/_app/immutable/entry/{app.BfVt8pR9.js → app.CkwTkkSM.js} +2 -2
- package/build/client/_app/immutable/entry/start.DxUGjIjy.js +1 -0
- package/build/client/_app/immutable/nodes/1.8K25GLCS.js +1 -0
- package/build/client/_app/immutable/nodes/2.CZgpKf5S.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/engine.js-DzJkajy7.js +90 -0
- package/build/server/chunks/chunks/{internal.js-nJTGYhdX.js → internal.js-1R9PHQNf.js} +3 -3
- package/build/server/chunks/chunks/{state.js-D0-EDcsi.js → state.js-vRL4xZQO.js} +163 -3
- package/build/server/chunks/entries/endpoints/api/skills/install/_server.ts.js-Dvoz59-b.js +47 -0
- package/build/server/chunks/entries/endpoints/api/skills/reload/_server.ts.js-fUUcvsn3.js +33 -0
- package/build/server/chunks/entries/endpoints/api/skills/snapshot/_server.ts.js-C4AvWpBK.js +37 -0
- package/build/server/chunks/entries/endpoints/api/skills/uninstall/_server.ts.js-qqFlorKD.js +47 -0
- package/build/server/chunks/entries/endpoints/api/skills/voice/_server.ts.js-yiGBLufB.js +72 -0
- package/build/server/chunks/entries/pages/_error.svelte.js-CtYKjJrf.js +43 -0
- package/build/server/chunks/entries/pages/{_page.svelte.js-D63btYnK.js → _page.svelte.js-CZV29jqi.js} +9625 -3397
- package/build/server/chunks/{handler-DiaR2DmJ.js → handler-BcFykRDA.js} +3 -3
- package/build/server/chunks/{index.js-trwV04zl.js → index.js-CYc5jGBw.js} +2 -2
- package/build/server/chunks/{manifest.js-B2sb3fMn.js → manifest.js-CgPn3jEA.js} +40 -5
- package/build/server/chunks/nodes/{0.js-CcvNYltc.js → 0.js-DO4F8XMq.js} +3 -3
- package/build/server/chunks/nodes/1.js-B3lmNFSp.js +9 -0
- package/build/server/chunks/nodes/{2.js-CEsSSgY6.js → 2.js-DVa5udLN.js} +4 -4
- package/package.json +1 -1
- package/template/.dsi/prompts.sqlite +0 -0
- package/template/.dsi/resources/skills-reff.md +8 -0
- package/build/client/_app/immutable/assets/0.C4pk9RsQ.css +0 -2
- package/build/client/_app/immutable/assets/2.BpERqkk_.css +0 -1
- package/build/client/_app/immutable/chunks/BjB44r24.js +0 -1
- package/build/client/_app/immutable/chunks/as89y6ti.js +0 -1
- package/build/client/_app/immutable/entry/start.BOYIplSn.js +0 -1
- package/build/client/_app/immutable/nodes/1.BZ_iRXtk.js +0 -1
- package/build/client/_app/immutable/nodes/2.BADJoHBB.js +0 -171
- package/build/server/chunks/entries/pages/_error.svelte.js-BTQyW5Df.js +0 -203
- package/build/server/chunks/nodes/1.js-2FULYexO.js +0 -9
- package/template/.dsi/prompts.sqlite-shm +0 -0
- package/template/.dsi/prompts.sqlite-wal +0 -0
- /package/build/client/_app/immutable/nodes/{0.BBoMIehN.js → 0.DlNmLZ8S.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1790074132758"}
|
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-BcFykRDA.js';
|
|
6
|
+
import './server/chunks/index.js-CYc5jGBw.js';
|
|
7
|
+
import './server/chunks/manifest.js-CgPn3jEA.js';
|
|
8
8
|
import './env.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -16,7 +16,7 @@ import './server/chunks/chunks/shared.js-HQ0rfhm4.js';
|
|
|
16
16
|
import './server/chunks/chunks/uneval.js-BJ9Qq2SF.js';
|
|
17
17
|
import './server/chunks/chunks/utils.js-CAdNO8Tu.js';
|
|
18
18
|
import 'node:url';
|
|
19
|
-
import './server/chunks/chunks/internal.js-
|
|
19
|
+
import './server/chunks/chunks/internal.js-1R9PHQNf.js';
|
|
20
20
|
import './server/chunks/chunks/server.js-11-pxAWV.js';
|
|
21
21
|
import './server/chunks/chunks/internal2.js-BcS47nI-.js';
|
|
22
22
|
import './server/chunks/chunks/exports.js-DH_tjtdv.js';
|
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-BcFykRDA.js';
|
|
5
5
|
import { env, timeout_env } from './env.js';
|
|
6
6
|
import { rm } from 'node:fs/promises';
|
|
7
7
|
import './shims.js';
|
|
@@ -14,12 +14,12 @@ import 'node:stream';
|
|
|
14
14
|
import './server/chunks/chunks/shared.js-HQ0rfhm4.js';
|
|
15
15
|
import './server/chunks/chunks/uneval.js-BJ9Qq2SF.js';
|
|
16
16
|
import './server/chunks/chunks/utils.js-CAdNO8Tu.js';
|
|
17
|
-
import './server/chunks/index.js-
|
|
18
|
-
import './server/chunks/chunks/internal.js-
|
|
17
|
+
import './server/chunks/index.js-CYc5jGBw.js';
|
|
18
|
+
import './server/chunks/chunks/internal.js-1R9PHQNf.js';
|
|
19
19
|
import './server/chunks/chunks/server.js-11-pxAWV.js';
|
|
20
20
|
import './server/chunks/chunks/internal2.js-BcS47nI-.js';
|
|
21
21
|
import './server/chunks/chunks/exports.js-DH_tjtdv.js';
|
|
22
|
-
import './server/chunks/manifest.js-
|
|
22
|
+
import './server/chunks/manifest.js-CgPn3jEA.js';
|
|
23
23
|
import 'node:url';
|
|
24
24
|
|
|
25
25
|
const path = env('SOCKET_PATH', false);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { execFile } from 'node:child_process';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
|
|
7
|
+
//#region src/lib/server/skills/types.ts
|
|
8
|
+
var EngineMissingError = class extends Error {
|
|
9
|
+
enginePath;
|
|
10
|
+
constructor(enginePath) {
|
|
11
|
+
super("shelf engine not found: " + enginePath);
|
|
12
|
+
this.name = "EngineMissingError";
|
|
13
|
+
this.enginePath = enginePath;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var EngineFailedError = class extends Error {
|
|
17
|
+
payload;
|
|
18
|
+
constructor(message, payload) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "EngineFailedError";
|
|
21
|
+
this.payload = payload;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/** Uninstallable = on disk AND signed (ADR D5 control matrix). */
|
|
25
|
+
function uninstallableIds(snapshot) {
|
|
26
|
+
return snapshot.sources.flatMap((s) => s.skills.filter((k) => k.installed && k.signed).map((k) => k.id));
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/lib/server/skills/engine.ts
|
|
30
|
+
var execFileP = promisify(execFile);
|
|
31
|
+
var ENGINE_TIMEOUT_MS = 12e4;
|
|
32
|
+
function defaultEnginePath() {
|
|
33
|
+
return process.env.SHELF_ENGINE_PATH || join(homedir(), ".agents/skills/dsi-skill-shelf/shelf.mjs");
|
|
34
|
+
}
|
|
35
|
+
/** Test seam: override to stub the engine process. */
|
|
36
|
+
var runner = async (enginePath, args) => {
|
|
37
|
+
const { stdout } = await execFileP("node", [enginePath, ...args], {
|
|
38
|
+
timeout: ENGINE_TIMEOUT_MS,
|
|
39
|
+
maxBuffer: 33554432
|
|
40
|
+
});
|
|
41
|
+
return stdout;
|
|
42
|
+
};
|
|
43
|
+
async function run(args) {
|
|
44
|
+
const enginePath = defaultEnginePath();
|
|
45
|
+
if (!existsSync(enginePath)) throw new EngineMissingError(enginePath);
|
|
46
|
+
let stdout;
|
|
47
|
+
try {
|
|
48
|
+
stdout = await runner(enginePath, args);
|
|
49
|
+
} catch (err) {
|
|
50
|
+
const e = err;
|
|
51
|
+
if (e.killed) throw new EngineFailedError("shelf engine timed out after 120000ms", null);
|
|
52
|
+
throw new EngineFailedError(String(e.message ?? e), null);
|
|
53
|
+
}
|
|
54
|
+
let payload;
|
|
55
|
+
try {
|
|
56
|
+
payload = JSON.parse(stdout);
|
|
57
|
+
} catch {
|
|
58
|
+
throw new EngineFailedError("shelf engine emitted non-JSON output", null);
|
|
59
|
+
}
|
|
60
|
+
if (payload.v !== 1) throw new EngineFailedError("shelf engine wire version mismatch: v=" + payload.v, payload);
|
|
61
|
+
return payload;
|
|
62
|
+
}
|
|
63
|
+
function getEngine() {
|
|
64
|
+
return {
|
|
65
|
+
async snapshotStatus() {
|
|
66
|
+
const p = await run(["snapshot-status"]);
|
|
67
|
+
return { present: Boolean(p.present) };
|
|
68
|
+
},
|
|
69
|
+
async refresh(reload) {
|
|
70
|
+
const p = await run(reload ? ["refresh", "--reload"] : ["refresh"]);
|
|
71
|
+
if (!p.ok || !p.snapshot) throw new EngineFailedError("refresh failed", p);
|
|
72
|
+
return {
|
|
73
|
+
snapshot: p.snapshot,
|
|
74
|
+
reused: Boolean(p.reused)
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
async apply(action, targets) {
|
|
78
|
+
const p = await run([
|
|
79
|
+
"apply",
|
|
80
|
+
action,
|
|
81
|
+
...targets
|
|
82
|
+
]);
|
|
83
|
+
if (!p.results) throw new EngineFailedError("apply returned no results", p);
|
|
84
|
+
return p.results;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { EngineMissingError as E, EngineFailedError as a, getEngine as g, uninstallableIds as u };
|
|
90
|
+
//# sourceMappingURL=engine.js-DzJkajy7.js.map
|
|
@@ -722,7 +722,7 @@ var options = {
|
|
|
722
722
|
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"%paraglide.locale%\">\n <head>\n <meta charset=\"utf-8\" />\n <link rel=\"icon\" href=\"" + assets + "/favicon.svg\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n " + head + "\n </head>\n <body data-sveltekit-preload-data=\"tap\">\n <div style=\"display: contents\">" + body + "</div>\n </body>\n</html>\n",
|
|
723
723
|
error: error_template_default
|
|
724
724
|
},
|
|
725
|
-
version_hash: "
|
|
725
|
+
version_hash: "ch4x77"
|
|
726
726
|
};
|
|
727
727
|
async function get_hooks() {
|
|
728
728
|
let handle;
|
|
@@ -744,5 +744,5 @@ async function get_hooks() {
|
|
|
744
744
|
};
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
-
export { __commonJSMin as _, set_public_env as a, set_read_implementation as b, onDestroy as c, get_hooks as g, index_server_exports as i, options as o, public_env as p, read_implementation as r, set_private_env as s };
|
|
748
|
-
//# sourceMappingURL=internal.js-
|
|
747
|
+
export { __commonJSMin as _, set_public_env as a, set_read_implementation as b, onDestroy as c, __exportAll as d, get_hooks as g, index_server_exports as i, options as o, public_env as p, read_implementation as r, set_private_env as s };
|
|
748
|
+
//# sourceMappingURL=internal.js-1R9PHQNf.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as index_server_exports } from './internal.js-
|
|
1
|
+
import { i as index_server_exports } from './internal.js-1R9PHQNf.js';
|
|
2
2
|
import './shared.js-HQ0rfhm4.js';
|
|
3
3
|
import './exports.js-DH_tjtdv.js';
|
|
4
4
|
import { U as snapshot, J as getContext, G as noop } from './server.js-11-pxAWV.js';
|
|
@@ -36,6 +36,166 @@ function t(fn) {
|
|
|
36
36
|
} catch {}
|
|
37
37
|
return fn();
|
|
38
38
|
}
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/lib/paraglide/messages/backtoworkspace2.js
|
|
41
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
42
|
+
/** @typedef {{}} Backtoworkspace2Inputs */
|
|
43
|
+
var en_backtoworkspace2 = () => {
|
|
44
|
+
return `← Back to the workspace`;
|
|
45
|
+
};
|
|
46
|
+
var zh_backtoworkspace2 = () => {
|
|
47
|
+
return `← 返回工作区`;
|
|
48
|
+
};
|
|
49
|
+
var id_backtoworkspace2 = () => {
|
|
50
|
+
return `← Kembali ke workspace`;
|
|
51
|
+
};
|
|
52
|
+
var es_backtoworkspace2 = () => {
|
|
53
|
+
return `← Volver al workspace`;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* | output |
|
|
57
|
+
* | --- |
|
|
58
|
+
* | "← Back to the workspace" |
|
|
59
|
+
*
|
|
60
|
+
* @param {Backtoworkspace2Inputs} inputs
|
|
61
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
62
|
+
* @returns {LocalizedString}
|
|
63
|
+
*/
|
|
64
|
+
var backtoworkspace2 = ((inputs = {}, options = {}) => {
|
|
65
|
+
const locale = options.locale ?? getLocale();
|
|
66
|
+
if (locale === "zh") return zh_backtoworkspace2();
|
|
67
|
+
if (locale === "id") return id_backtoworkspace2();
|
|
68
|
+
if (locale === "es") return es_backtoworkspace2();
|
|
69
|
+
return en_backtoworkspace2();
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/lib/paraglide/messages/dshunreachable1.js
|
|
73
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
74
|
+
/** @typedef {{}} Dshunreachable1Inputs */
|
|
75
|
+
var en_dshunreachable1 = () => {
|
|
76
|
+
return `DSH host unreachable`;
|
|
77
|
+
};
|
|
78
|
+
var zh_dshunreachable1 = () => {
|
|
79
|
+
return `DSH 主机不可达`;
|
|
80
|
+
};
|
|
81
|
+
var id_dshunreachable1 = () => {
|
|
82
|
+
return `Host DSH tidak dapat dijangkau`;
|
|
83
|
+
};
|
|
84
|
+
var es_dshunreachable1 = () => {
|
|
85
|
+
return `Host DSH inalcanzable`;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* | output |
|
|
89
|
+
* | --- |
|
|
90
|
+
* | "DSH host unreachable" |
|
|
91
|
+
*
|
|
92
|
+
* @param {Dshunreachable1Inputs} inputs
|
|
93
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
94
|
+
* @returns {LocalizedString}
|
|
95
|
+
*/
|
|
96
|
+
var dshunreachable1 = ((inputs = {}, options = {}) => {
|
|
97
|
+
const locale = options.locale ?? getLocale();
|
|
98
|
+
if (locale === "zh") return zh_dshunreachable1();
|
|
99
|
+
if (locale === "id") return id_dshunreachable1();
|
|
100
|
+
if (locale === "es") return es_dshunreachable1();
|
|
101
|
+
return en_dshunreachable1();
|
|
102
|
+
});
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/lib/paraglide/messages/reapednote1.js
|
|
105
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
106
|
+
/** @typedef {{}} Reapednote1Inputs */
|
|
107
|
+
var en_reapednote1 = () => {
|
|
108
|
+
return `It may have been reaped, or the link predates this host's ledger.`;
|
|
109
|
+
};
|
|
110
|
+
var zh_reapednote1 = () => {
|
|
111
|
+
return `它可能已被回收,或链接早于此主机的账本。`;
|
|
112
|
+
};
|
|
113
|
+
var id_reapednote1 = () => {
|
|
114
|
+
return `Mungkin sudah dihapus, atau tautannya lebih tua dari ledger host ini.`;
|
|
115
|
+
};
|
|
116
|
+
var es_reapednote1 = () => {
|
|
117
|
+
return `Puede haber sido recolectada, o el enlace es anterior al libro mayor de este host.`;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* | output |
|
|
121
|
+
* | --- |
|
|
122
|
+
* | "It may have been reaped, or the link predates this host's ledger." |
|
|
123
|
+
*
|
|
124
|
+
* @param {Reapednote1Inputs} inputs
|
|
125
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
126
|
+
* @returns {LocalizedString}
|
|
127
|
+
*/
|
|
128
|
+
var reapednote1 = ((inputs = {}, options = {}) => {
|
|
129
|
+
const locale = options.locale ?? getLocale();
|
|
130
|
+
if (locale === "zh") return zh_reapednote1();
|
|
131
|
+
if (locale === "id") return id_reapednote1();
|
|
132
|
+
if (locale === "es") return es_reapednote1();
|
|
133
|
+
return en_reapednote1();
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/lib/paraglide/messages/sessionnotfound2.js
|
|
137
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
138
|
+
/** @typedef {{}} Sessionnotfound2Inputs */
|
|
139
|
+
var en_sessionnotfound2 = () => {
|
|
140
|
+
return `Session not found`;
|
|
141
|
+
};
|
|
142
|
+
var zh_sessionnotfound2 = () => {
|
|
143
|
+
return `会话未找到`;
|
|
144
|
+
};
|
|
145
|
+
var id_sessionnotfound2 = () => {
|
|
146
|
+
return `Sesi tidak ditemukan`;
|
|
147
|
+
};
|
|
148
|
+
var es_sessionnotfound2 = () => {
|
|
149
|
+
return `Sesión no encontrada`;
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* | output |
|
|
153
|
+
* | --- |
|
|
154
|
+
* | "Session not found" |
|
|
155
|
+
*
|
|
156
|
+
* @param {Sessionnotfound2Inputs} inputs
|
|
157
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
158
|
+
* @returns {LocalizedString}
|
|
159
|
+
*/
|
|
160
|
+
var sessionnotfound2 = ((inputs = {}, options = {}) => {
|
|
161
|
+
const locale = options.locale ?? getLocale();
|
|
162
|
+
if (locale === "zh") return zh_sessionnotfound2();
|
|
163
|
+
if (locale === "id") return id_sessionnotfound2();
|
|
164
|
+
if (locale === "es") return es_sessionnotfound2();
|
|
165
|
+
return en_sessionnotfound2();
|
|
166
|
+
});
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/lib/paraglide/messages/unexpectederror1.js
|
|
169
|
+
/** @typedef {import('../runtime.js').LocalizedString} LocalizedString */
|
|
170
|
+
/** @typedef {{}} Unexpectederror1Inputs */
|
|
171
|
+
var en_unexpectederror1 = () => {
|
|
172
|
+
return `Unexpected error`;
|
|
173
|
+
};
|
|
174
|
+
var zh_unexpectederror1 = () => {
|
|
175
|
+
return `意外错误`;
|
|
176
|
+
};
|
|
177
|
+
var id_unexpectederror1 = () => {
|
|
178
|
+
return `Kesalahan tak terduga`;
|
|
179
|
+
};
|
|
180
|
+
var es_unexpectederror1 = () => {
|
|
181
|
+
return `Error inesperado`;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* | output |
|
|
185
|
+
* | --- |
|
|
186
|
+
* | "Unexpected error" |
|
|
187
|
+
*
|
|
188
|
+
* @param {Unexpectederror1Inputs} inputs
|
|
189
|
+
* @param {{ locale?: "en" | "zh" | "id" | "es" }} options
|
|
190
|
+
* @returns {LocalizedString}
|
|
191
|
+
*/
|
|
192
|
+
var unexpectederror1 = ((inputs = {}, options = {}) => {
|
|
193
|
+
const locale = options.locale ?? getLocale();
|
|
194
|
+
if (locale === "zh") return zh_unexpectederror1();
|
|
195
|
+
if (locale === "id") return id_unexpectederror1();
|
|
196
|
+
if (locale === "es") return es_unexpectederror1();
|
|
197
|
+
return en_unexpectederror1();
|
|
198
|
+
});
|
|
39
199
|
var is_legacy = noop.toString().includes("$$") || /function \w+\(\) \{\}/.test(noop.toString());
|
|
40
200
|
var placeholder_url = "a:";
|
|
41
201
|
if (is_legacy) {
|
|
@@ -142,5 +302,5 @@ var page = {
|
|
|
142
302
|
}
|
|
143
303
|
};
|
|
144
304
|
|
|
145
|
-
export { afterNavigate as a,
|
|
146
|
-
//# sourceMappingURL=state.js-
|
|
305
|
+
export { afterNavigate as a, backtoworkspace2 as b, replaceState as c, dshunreachable1 as d, currentLocale as e, page as p, reapednote1 as r, sessionnotfound2 as s, t, unexpectederror1 as u };
|
|
306
|
+
//# sourceMappingURL=state.js-vRL4xZQO.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-DzJkajy7.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 'node:child_process';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
9
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/api/skills/install/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-skills - POST /api/skills/install
|
|
14
|
+
* Body: { targets: string[] } - explicit shelf numbers or ids.
|
|
15
|
+
* Returns per-target results; 400 on malformed body, 503 on engine failure.
|
|
16
|
+
*/
|
|
17
|
+
var POST = async ({ request }) => {
|
|
18
|
+
let targets;
|
|
19
|
+
try {
|
|
20
|
+
targets = (await request.json()).targets;
|
|
21
|
+
} catch {
|
|
22
|
+
return json({
|
|
23
|
+
ok: false,
|
|
24
|
+
error: "malformed JSON body"
|
|
25
|
+
}, { status: 400 });
|
|
26
|
+
}
|
|
27
|
+
if (!Array.isArray(targets) || targets.length === 0 || !targets.every((t) => typeof t === "string" && t.length > 0)) return json({
|
|
28
|
+
ok: false,
|
|
29
|
+
error: "targets must be a non-empty array of strings"
|
|
30
|
+
}, { status: 400 });
|
|
31
|
+
try {
|
|
32
|
+
const results = await getEngine().apply("install", targets);
|
|
33
|
+
return json({
|
|
34
|
+
ok: results.every((r) => r.ok),
|
|
35
|
+
results
|
|
36
|
+
});
|
|
37
|
+
} catch (err) {
|
|
38
|
+
const status = err instanceof EngineMissingError || err instanceof EngineFailedError ? 503 : 500;
|
|
39
|
+
return json({
|
|
40
|
+
ok: false,
|
|
41
|
+
error: String(err.message)
|
|
42
|
+
}, { status });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { POST };
|
|
47
|
+
//# sourceMappingURL=_server.ts.js-Dvoz59-b.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine.js-DzJkajy7.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 'node:child_process';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
9
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/api/skills/reload/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-skills - POST /api/skills/reload
|
|
14
|
+
* Forced rebuild (ADR D3 --reload): re-reads the SKR, re-diffs, regenerates.
|
|
15
|
+
*/
|
|
16
|
+
var POST = async () => {
|
|
17
|
+
try {
|
|
18
|
+
const { snapshot } = await getEngine().refresh(true);
|
|
19
|
+
return json({
|
|
20
|
+
ok: true,
|
|
21
|
+
snapshot,
|
|
22
|
+
uninstallable: uninstallableIds(snapshot)
|
|
23
|
+
});
|
|
24
|
+
} catch (err) {
|
|
25
|
+
return json({
|
|
26
|
+
ok: false,
|
|
27
|
+
error: String(err.message)
|
|
28
|
+
}, { status: 503 });
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { POST };
|
|
33
|
+
//# sourceMappingURL=_server.ts.js-fUUcvsn3.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine.js-DzJkajy7.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 'node:child_process';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
9
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/api/skills/snapshot/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-skills - GET /api/skills/snapshot
|
|
14
|
+
* Snapshot-first (ADR D3): absent cache triggers build; present cache is used as-is.
|
|
15
|
+
* Response: { ok, snapshot, uninstallable } - uninstallable from signed+installed (D5).
|
|
16
|
+
*/
|
|
17
|
+
var GET = async () => {
|
|
18
|
+
try {
|
|
19
|
+
const engine = getEngine();
|
|
20
|
+
const { present } = await engine.snapshotStatus();
|
|
21
|
+
const { snapshot, reused } = await engine.refresh(!present);
|
|
22
|
+
return json({
|
|
23
|
+
ok: true,
|
|
24
|
+
reused,
|
|
25
|
+
snapshot,
|
|
26
|
+
uninstallable: uninstallableIds(snapshot)
|
|
27
|
+
});
|
|
28
|
+
} catch (err) {
|
|
29
|
+
return json({
|
|
30
|
+
ok: false,
|
|
31
|
+
error: String(err.message)
|
|
32
|
+
}, { status: 503 });
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { GET };
|
|
37
|
+
//# sourceMappingURL=_server.ts.js-C4AvWpBK.js.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-DzJkajy7.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 'node:child_process';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
9
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/api/skills/uninstall/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-skills - POST /api/skills/uninstall
|
|
14
|
+
* Body: { ids: string[] }. Signed-only (ADR D5): any unsigned refusal maps to 409.
|
|
15
|
+
*/
|
|
16
|
+
var POST = async ({ request }) => {
|
|
17
|
+
let ids;
|
|
18
|
+
try {
|
|
19
|
+
ids = (await request.json()).ids;
|
|
20
|
+
} catch {
|
|
21
|
+
return json({
|
|
22
|
+
ok: false,
|
|
23
|
+
error: "malformed JSON body"
|
|
24
|
+
}, { status: 400 });
|
|
25
|
+
}
|
|
26
|
+
if (!Array.isArray(ids) || ids.length === 0 || !ids.every((t) => typeof t === "string" && t.length > 0)) return json({
|
|
27
|
+
ok: false,
|
|
28
|
+
error: "ids must be a non-empty array of strings"
|
|
29
|
+
}, { status: 400 });
|
|
30
|
+
try {
|
|
31
|
+
const results = await getEngine().apply("uninstall", ids);
|
|
32
|
+
const unsigned = results.some((r) => !r.ok && /unsigned/.test(r.error ?? ""));
|
|
33
|
+
return json({
|
|
34
|
+
ok: results.every((r) => r.ok),
|
|
35
|
+
results
|
|
36
|
+
}, { status: unsigned ? 409 : 200 });
|
|
37
|
+
} catch (err) {
|
|
38
|
+
const status = err instanceof EngineMissingError || err instanceof EngineFailedError ? 503 : 500;
|
|
39
|
+
return json({
|
|
40
|
+
ok: false,
|
|
41
|
+
error: String(err.message)
|
|
42
|
+
}, { status });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { POST };
|
|
47
|
+
//# sourceMappingURL=_server.ts.js-qqFlorKD.js.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
2
|
+
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
6
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
7
|
+
|
|
8
|
+
//#region src/lib/server/skills/voice.ts
|
|
9
|
+
/**
|
|
10
|
+
* skill-voice (The Shelf Voice ADR D5) - the merged voice map: one entry
|
|
11
|
+
* per shelf-installed skill carrying its per-locale words, read from the
|
|
12
|
+
* .dsi-voice/<locale>.json sidecars the engine wrote at install time.
|
|
13
|
+
* Homegrown dsi-* skills are NOT here - their voice is compile-time
|
|
14
|
+
* paraglide (D7), resolved client-side.
|
|
15
|
+
*/
|
|
16
|
+
var VOICE_LOCALES = [
|
|
17
|
+
"en",
|
|
18
|
+
"zh",
|
|
19
|
+
"id",
|
|
20
|
+
"es"
|
|
21
|
+
];
|
|
22
|
+
var VOICE_DIR = ".dsi-voice";
|
|
23
|
+
function buildVoiceMap(skillsDir) {
|
|
24
|
+
const map = {};
|
|
25
|
+
if (!existsSync(skillsDir)) return map;
|
|
26
|
+
for (const skillId of readdirSync(skillsDir)) {
|
|
27
|
+
const voiceDir = join(skillsDir, skillId, VOICE_DIR);
|
|
28
|
+
if (!existsSync(voiceDir)) continue;
|
|
29
|
+
for (const locale of VOICE_LOCALES) {
|
|
30
|
+
const file = join(voiceDir, locale + ".json");
|
|
31
|
+
if (!existsSync(file)) continue;
|
|
32
|
+
try {
|
|
33
|
+
const entry = JSON.parse(readFileSync(file, "utf8"));
|
|
34
|
+
if (typeof entry?.name === "string" && typeof entry?.description === "string") {
|
|
35
|
+
map[skillId] = map[skillId] ?? {};
|
|
36
|
+
map[skillId][locale] = {
|
|
37
|
+
name: entry.name,
|
|
38
|
+
description: entry.description,
|
|
39
|
+
whenToUse: String(entry.whenToUse ?? "")
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
} catch {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return map;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/routes/api/skills/voice/+server.ts
|
|
49
|
+
/**
|
|
50
|
+
* api-skills - GET /api/skills/voice (The Shelf Voice ADR D5).
|
|
51
|
+
* The merged voice map for shelf-installed skills; the slash menu
|
|
52
|
+
* overlays it onto the host's English wire rows at render.
|
|
53
|
+
*/
|
|
54
|
+
function skillsDirFromEnv() {
|
|
55
|
+
return process.env.SHELF_SKILLS_DIR || join(homedir(), ".agents/skills");
|
|
56
|
+
}
|
|
57
|
+
var GET = async () => {
|
|
58
|
+
try {
|
|
59
|
+
return json({
|
|
60
|
+
ok: true,
|
|
61
|
+
voice: buildVoiceMap(skillsDirFromEnv())
|
|
62
|
+
});
|
|
63
|
+
} catch (err) {
|
|
64
|
+
return json({
|
|
65
|
+
ok: false,
|
|
66
|
+
error: String(err.message)
|
|
67
|
+
}, { status: 503 });
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { GET };
|
|
72
|
+
//# sourceMappingURL=_server.ts.js-yiGBLufB.js.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { V as head, W as escape_html, y as derived } from '../../chunks/server.js-11-pxAWV.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-vRL4xZQO.js';
|
|
3
|
+
import '../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
4
|
+
import '../../chunks/internal.js-1R9PHQNf.js';
|
|
5
|
+
import '../../chunks/shared.js-HQ0rfhm4.js';
|
|
6
|
+
import '../../chunks/exports.js-DH_tjtdv.js';
|
|
7
|
+
import '../../chunks/config.js-BvW5LrfQ.js';
|
|
8
|
+
import '../../chunks/runtime.js-CCJi3XaY.js';
|
|
9
|
+
import '../../chunks/utils.js-CAdNO8Tu.js';
|
|
10
|
+
|
|
11
|
+
//#region src/routes/+error.svelte
|
|
12
|
+
function _error($$renderer, $$props) {
|
|
13
|
+
$$renderer.component(($$renderer) => {
|
|
14
|
+
/**
|
|
15
|
+
* App-wide error boundary (the Root-is-the-Floor ADR, 2026-09-02):
|
|
16
|
+
* 404 (session absent — and any retired address), 503 (host down),
|
|
17
|
+
* 409 (sub-agent ownership). The way back is `/` itself: a bare
|
|
18
|
+
* arrival restores the persisted desk, so "back" costs nothing.
|
|
19
|
+
*/
|
|
20
|
+
const status = derived(() => page.status);
|
|
21
|
+
const message = derived(() => page.error?.message ?? "Something went wrong.");
|
|
22
|
+
head("1j96wlh", $$renderer, ($$renderer) => {
|
|
23
|
+
$$renderer.title(($$renderer) => {
|
|
24
|
+
$$renderer.push(`<title>${escape_html(status())} — deepseek-insight</title>`);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
$$renderer.push(`<main data-svelte="ErrorPage" class="mx-auto flex max-w-3xl flex-col items-center gap-4 px-4 py-16 text-center"><p class="text-5xl font-semibold text-slate-300" data-testid="error-status">${escape_html(status())}</p> `);
|
|
28
|
+
if (status() === 404) {
|
|
29
|
+
$$renderer.push("<!--[0-->");
|
|
30
|
+
$$renderer.push(`<h1 class="text-xl font-semibold">${escape_html(t(sessionnotfound2))}</h1> <p class="text-sm text-slate-500" data-testid="error-message">${escape_html(message())}</p> <p class="text-xs text-slate-400">${escape_html(t(reapednote1))}</p>`);
|
|
31
|
+
} else if (status() === 503) {
|
|
32
|
+
$$renderer.push("<!--[1-->");
|
|
33
|
+
$$renderer.push(`<h1 class="text-xl font-semibold">${escape_html(t(dshunreachable1))}</h1> <p class="text-sm text-slate-500" data-testid="error-message">${escape_html(message())}</p>`);
|
|
34
|
+
} else {
|
|
35
|
+
$$renderer.push("<!--[-1-->");
|
|
36
|
+
$$renderer.push(`<h1 class="text-xl font-semibold">${escape_html(t(unexpectederror1))}</h1> <p class="text-sm text-slate-500" data-testid="error-message">${escape_html(message())}</p>`);
|
|
37
|
+
}
|
|
38
|
+
$$renderer.push(`<!--]--> <a href="/" class="mt-2 rounded-md border border-slate-300 px-3 py-1.5 text-sm text-slate-600 hover:bg-slate-100" data-testid="error-back-home">${escape_html(t(backtoworkspace2))}</a></main>`);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { _error as default };
|
|
43
|
+
//# sourceMappingURL=_error.svelte.js-CtYKjJrf.js.map
|