@deepseek-insight/dsi 0.5.27 → 0.5.29
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/bin/lib/mirror-skills.mjs +1 -1
- package/build/client/_app/immutable/assets/0.BbBUj8Gs.css +2 -0
- package/build/client/_app/immutable/assets/{2.Bfl8hQcu.css → 2.B2JMICOx.css} +1 -1
- package/build/client/_app/immutable/chunks/Ch00tocz.js +2 -0
- package/build/client/_app/immutable/chunks/{DuItqZFP.js → D4yILG4p.js} +1 -1
- package/build/client/_app/immutable/chunks/Zxb_bQ44.js +1 -0
- package/build/client/_app/immutable/chunks/muEkqSbS.js +1 -0
- package/build/client/_app/immutable/entry/{app.DjIR2gNq.js → app.CxAgK_V4.js} +2 -2
- package/build/client/_app/immutable/entry/start.CImCAUy1.js +1 -0
- package/build/client/_app/immutable/nodes/{1.CERO4WcC.js → 1.DJ0wIUro.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.DwsATN7B.js → 2.8eo5qS19.js} +88 -88
- 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-BRoFbCnL.js +151 -0
- package/build/server/chunks/chunks/{internal.js-9ErK1M89.js → internal.js-D-70iBmc.js} +2 -2
- package/build/server/chunks/chunks/{state.js-CoQ1E4r6.js → state.js-BKUnFOB4.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/install/{_server.ts.js-CtHQQsxC.js → _server.ts.js-DijnCqgt.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/progress/_server.ts.js-DdqqTrFN.js +59 -0
- package/build/server/chunks/entries/endpoints/api/skills/reload/{_server.ts.js-BOlSdtQw.js → _server.ts.js-Cqig6BdK.js} +7 -2
- package/build/server/chunks/entries/endpoints/api/skills/reload/cancel/_server.ts.js-CGlFnmuI.js +31 -0
- package/build/server/chunks/entries/endpoints/api/skills/snapshot/{_server.ts.js-Yz5rNblU.js → _server.ts.js-p7P1CFjG.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/uninstall/{_server.ts.js-Bzy9Oq4k.js → _server.ts.js-h5IfIfov.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-jdm5qmCK.js → _error.svelte.js-Bee5xNts.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-qgIk1zgI.js → _page.svelte.js-B2EA5ccE.js} +200 -71
- package/build/server/chunks/{handler-DBjyvmti.js → handler-BVZR5A-R.js} +3 -3
- package/build/server/chunks/{index.js-DP_xAH0H.js → index.js-Nwzp6b_k.js} +2 -2
- package/build/server/chunks/{manifest.js-B3WD8tJ6.js → manifest.js-Bof9naPY.js} +23 -9
- package/build/server/chunks/nodes/{0.js-DO4F8XMq.js → 0.js-iA5BIbe7.js} +3 -3
- package/build/server/chunks/nodes/1.js-CxOuNsR_.js +9 -0
- package/build/server/chunks/nodes/{2.js-DtdHKW9v.js → 2.js-QPzVOzfX.js} +4 -4
- package/package.json +8 -3
- package/build/client/_app/immutable/assets/0.DoqT6ojN.css +0 -2
- package/build/client/_app/immutable/chunks/DL2Y4nxy.js +0 -1
- package/build/client/_app/immutable/chunks/Xs5m2yqM.js +0 -1
- package/build/client/_app/immutable/chunks/pNaMQbLr.js +0 -2
- package/build/client/_app/immutable/entry/start.Bho-erid.js +0 -1
- package/build/server/chunks/chunks/engine.js-CBxHjv0c.js +0 -96
- package/build/server/chunks/nodes/1.js-Vh-e4em9.js +0 -9
- /package/build/client/_app/immutable/nodes/{0.DlNmLZ8S.js → 0.B3l2ZewD.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1790194532210"}
|
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-BVZR5A-R.js';
|
|
6
|
+
import './server/chunks/index.js-Nwzp6b_k.js';
|
|
7
|
+
import './server/chunks/manifest.js-Bof9naPY.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-D-70iBmc.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-BVZR5A-R.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-Nwzp6b_k.js';
|
|
18
|
+
import './server/chunks/chunks/internal.js-D-70iBmc.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-Bof9naPY.js';
|
|
23
23
|
import 'node:url';
|
|
24
24
|
|
|
25
25
|
const path = env('SOCKET_PATH', false);
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
/** The operator cancelled the in-flight refresh (Reload Rememberer,
|
|
25
|
+
* 2026-09-23): the child was killed on purpose — the route maps this to
|
|
26
|
+
* a quiet cancelled payload, not an error note. */
|
|
27
|
+
var EngineCancelledError = class extends Error {
|
|
28
|
+
constructor() {
|
|
29
|
+
super("shelf refresh cancelled");
|
|
30
|
+
this.name = "EngineCancelledError";
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
/** Uninstallable = on disk AND signed (ADR D5 control matrix). */
|
|
34
|
+
function uninstallableIds(snapshot) {
|
|
35
|
+
return snapshot.sources.flatMap((s) => s.skills.filter((k) => k.installed && k.signed).map((k) => k.id));
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/lib/server/skills/engine.ts
|
|
39
|
+
promisify(execFile);
|
|
40
|
+
/** Fast commands (status, cached refresh, apply) stay on the snappy floor. */
|
|
41
|
+
var ENGINE_TIMEOUT_MS = 12e4;
|
|
42
|
+
/** A FULL live refresh enumerates ~140 skills and fetches every raw
|
|
43
|
+
* SKILL.md + package.json sequentially (~6m measured 2026-09-22) — the
|
|
44
|
+
* reload verb dies at 120s with 'shelf engine timed out' (observed in
|
|
45
|
+
* headed verification). Give the slow command room to finish. */
|
|
46
|
+
var ENGINE_REFRESH_TIMEOUT_MS = Number(process.env.SHELF_REFRESH_TIMEOUT_MS) || 6e5;
|
|
47
|
+
function defaultEnginePath() {
|
|
48
|
+
return process.env.SHELF_ENGINE_PATH || join(homedir(), ".agents/skills/dsi-skill-shelf/shelf.mjs");
|
|
49
|
+
}
|
|
50
|
+
/** Default runner (Reload Rememberer cancel support, 2026-09-23): the
|
|
51
|
+
* real child handle is exposed through registerCancel so cancelRefresh
|
|
52
|
+
* can SIGTERM the in-flight harvest. */
|
|
53
|
+
function defaultRunner(enginePath, args, timeoutMs = ENGINE_TIMEOUT_MS, registerCancel) {
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
const child = execFile("node", [enginePath, ...args], {
|
|
56
|
+
timeout: timeoutMs,
|
|
57
|
+
maxBuffer: 33554432
|
|
58
|
+
}, (err, stdout) => {
|
|
59
|
+
if (err) reject(err);
|
|
60
|
+
else resolve(stdout);
|
|
61
|
+
});
|
|
62
|
+
if (registerCancel) registerCancel(() => child.kill("SIGTERM"));
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/** Test seam: override to stub the engine process. */
|
|
66
|
+
var runner = defaultRunner;
|
|
67
|
+
/** Handle to the ONE in-flight engine child (single-flight refresh):
|
|
68
|
+
* cancelRefresh kills it; null when nothing runs or a stubbed runner
|
|
69
|
+
* (tests) cannot expose a process. */
|
|
70
|
+
var activeKill = null;
|
|
71
|
+
var cancelRequested = false;
|
|
72
|
+
async function run(args, timeoutMs = ENGINE_TIMEOUT_MS) {
|
|
73
|
+
const enginePath = defaultEnginePath();
|
|
74
|
+
if (!existsSync(enginePath)) throw new EngineMissingError(enginePath);
|
|
75
|
+
let stdout;
|
|
76
|
+
cancelRequested = false;
|
|
77
|
+
try {
|
|
78
|
+
stdout = await runner(enginePath, args, timeoutMs, (cancel) => activeKill = cancel);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
activeKill = null;
|
|
81
|
+
const e = err;
|
|
82
|
+
if (cancelRequested) throw new EngineCancelledError();
|
|
83
|
+
if (e.killed) throw new EngineFailedError("shelf engine timed out after " + timeoutMs + "ms", null);
|
|
84
|
+
throw new EngineFailedError(String(e.message ?? e), null);
|
|
85
|
+
}
|
|
86
|
+
activeKill = null;
|
|
87
|
+
let payload;
|
|
88
|
+
try {
|
|
89
|
+
payload = JSON.parse(stdout);
|
|
90
|
+
} catch {
|
|
91
|
+
throw new EngineFailedError("shelf engine emitted non-JSON output", null);
|
|
92
|
+
}
|
|
93
|
+
if (payload.v !== 1) throw new EngineFailedError("shelf engine wire version mismatch: v=" + payload.v, payload);
|
|
94
|
+
return payload;
|
|
95
|
+
}
|
|
96
|
+
/** Single-flight (Reload Rememberer amendment, 2026-09-23): the browser
|
|
97
|
+
* aborts its POST on a hard reload, but the engine child keeps harvesting
|
|
98
|
+
* server-side — and D4's re-issue used to spawn a SECOND full harvest
|
|
99
|
+
* (no per-source resume: refresh --reload refetches every source), so
|
|
100
|
+
* the operator waited ~6m from zero twice over. A re-issued refresh now
|
|
101
|
+
* JOINS the in-flight run instead of spawning a duplicate engine. */
|
|
102
|
+
var inFlightRefresh = null;
|
|
103
|
+
/** Cancel the in-flight refresh (Reload Rememberer, 2026-09-23): kills
|
|
104
|
+
* the engine child, and run() rejects every rider with
|
|
105
|
+
* EngineCancelledError. The snapshot cache is only written at the END
|
|
106
|
+
* of a successful run, so the OLD snapshot survives untouched. The
|
|
107
|
+
* progress sidecar is the route's to clear (it owns the path seam). */
|
|
108
|
+
function cancelRefresh() {
|
|
109
|
+
if (!activeKill) return false;
|
|
110
|
+
cancelRequested = true;
|
|
111
|
+
activeKill();
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
function getEngine() {
|
|
115
|
+
return {
|
|
116
|
+
cancelRefresh,
|
|
117
|
+
async snapshotStatus() {
|
|
118
|
+
const p = await run(["snapshot-status"]);
|
|
119
|
+
return { present: Boolean(p.present) };
|
|
120
|
+
},
|
|
121
|
+
async refresh(reload) {
|
|
122
|
+
if (reload && inFlightRefresh) return inFlightRefresh;
|
|
123
|
+
const p = run(reload ? ["refresh", "--reload"] : ["refresh"], reload ? ENGINE_REFRESH_TIMEOUT_MS : ENGINE_TIMEOUT_MS).then((p) => {
|
|
124
|
+
if (!p.ok || !p.snapshot) throw new EngineFailedError("refresh failed", p);
|
|
125
|
+
return {
|
|
126
|
+
snapshot: p.snapshot,
|
|
127
|
+
reused: Boolean(p.reused)
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
if (reload) {
|
|
131
|
+
inFlightRefresh = p;
|
|
132
|
+
p.catch(() => {}).finally(() => {
|
|
133
|
+
if (inFlightRefresh === p) inFlightRefresh = null;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return p;
|
|
137
|
+
},
|
|
138
|
+
async apply(action, targets) {
|
|
139
|
+
const p = await run([
|
|
140
|
+
"apply",
|
|
141
|
+
action,
|
|
142
|
+
...targets
|
|
143
|
+
]);
|
|
144
|
+
if (!p.results) throw new EngineFailedError("apply returned no results", p);
|
|
145
|
+
return p.results;
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export { EngineMissingError as E, EngineFailedError as a, EngineCancelledError as b, cancelRefresh as c, getEngine as g, uninstallableIds as u };
|
|
151
|
+
//# sourceMappingURL=engine.js-BRoFbCnL.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: "oebryp"
|
|
726
726
|
};
|
|
727
727
|
async function get_hooks() {
|
|
728
728
|
let handle;
|
|
@@ -745,4 +745,4 @@ async function get_hooks() {
|
|
|
745
745
|
}
|
|
746
746
|
|
|
747
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-
|
|
748
|
+
//# sourceMappingURL=internal.js-D-70iBmc.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-D-70iBmc.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';
|
|
@@ -303,4 +303,4 @@ var page = {
|
|
|
303
303
|
};
|
|
304
304
|
|
|
305
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-
|
|
306
|
+
//# sourceMappingURL=state.js-BKUnFOB4.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-BRoFbCnL.js';
|
|
2
2
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:path';
|
|
@@ -44,4 +44,4 @@ var POST = async ({ request }) => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { POST };
|
|
47
|
-
//# sourceMappingURL=_server.ts.js-
|
|
47
|
+
//# sourceMappingURL=_server.ts.js-DijnCqgt.js.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
2
|
+
import { existsSync, 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/routes/api/skills/progress/+server.ts
|
|
9
|
+
/**
|
|
10
|
+
* api-skills - GET /api/skills/progress
|
|
11
|
+
* Live harvest progress (2026-09-23): the engine (refresh --reload)
|
|
12
|
+
* rewrites skr-progress.json after EACH source completes — parallel 3 at
|
|
13
|
+
* a time — and DELETES it when enumeration ends. File absent = no run:
|
|
14
|
+
* { running: false }. The shelf button polls this while its spinner is
|
|
15
|
+
* up and renders {done}/{total}. The path is env-seamed (BC-10 class)
|
|
16
|
+
* so tests never touch the operator's real ~/.dsi.
|
|
17
|
+
*/
|
|
18
|
+
/** Underscore-prefixed: SvelteKit endpoints allow only handler exports. */
|
|
19
|
+
var _PROGRESS_PATH = () => process.env.SHELF_PROGRESS_PATH || join(homedir(), ".dsi/resources/skr-progress.json");
|
|
20
|
+
var GET = async () => {
|
|
21
|
+
const path = _PROGRESS_PATH();
|
|
22
|
+
try {
|
|
23
|
+
if (!existsSync(path)) return json({
|
|
24
|
+
ok: true,
|
|
25
|
+
running: false,
|
|
26
|
+
done: 0,
|
|
27
|
+
total: 0,
|
|
28
|
+
skillDone: 0,
|
|
29
|
+
skillTotal: 0,
|
|
30
|
+
sources: []
|
|
31
|
+
});
|
|
32
|
+
const p = JSON.parse(readFileSync(path, "utf8"));
|
|
33
|
+
return json({
|
|
34
|
+
ok: true,
|
|
35
|
+
running: p.running !== false,
|
|
36
|
+
done: Number.isFinite(p.done) ? Number(p.done) : 0,
|
|
37
|
+
total: Number.isFinite(p.total) ? Number(p.total) : 0,
|
|
38
|
+
skillDone: Number.isFinite(p.skillDone) ? Number(p.skillDone) : 0,
|
|
39
|
+
skillTotal: Number.isFinite(p.skillTotal) ? Number(p.skillTotal) : 0,
|
|
40
|
+
sources: Array.isArray(p.sources) ? p.sources.filter((s) => s && typeof s.name === "string").map((s) => ({
|
|
41
|
+
name: s.name,
|
|
42
|
+
state: s.state === "working" || s.state === "done" ? s.state : "pending"
|
|
43
|
+
})) : []
|
|
44
|
+
});
|
|
45
|
+
} catch {
|
|
46
|
+
return json({
|
|
47
|
+
ok: true,
|
|
48
|
+
running: false,
|
|
49
|
+
done: 0,
|
|
50
|
+
total: 0,
|
|
51
|
+
skillDone: 0,
|
|
52
|
+
skillTotal: 0,
|
|
53
|
+
sources: []
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export { GET, _PROGRESS_PATH };
|
|
59
|
+
//# sourceMappingURL=_server.ts.js-DdqqTrFN.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine.js-
|
|
1
|
+
import { g as getEngine, u as uninstallableIds, b as EngineCancelledError } from '../../../../../chunks/engine.js-BRoFbCnL.js';
|
|
2
2
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:path';
|
|
@@ -22,6 +22,11 @@ var POST = async () => {
|
|
|
22
22
|
uninstallable: uninstallableIds(snapshot)
|
|
23
23
|
});
|
|
24
24
|
} catch (err) {
|
|
25
|
+
if (err instanceof EngineCancelledError) return json({
|
|
26
|
+
ok: false,
|
|
27
|
+
cancelled: true,
|
|
28
|
+
error: "reload cancelled"
|
|
29
|
+
}, { status: 200 });
|
|
25
30
|
return json({
|
|
26
31
|
ok: false,
|
|
27
32
|
error: String(err.message)
|
|
@@ -30,4 +35,4 @@ var POST = async () => {
|
|
|
30
35
|
};
|
|
31
36
|
|
|
32
37
|
export { POST };
|
|
33
|
-
//# sourceMappingURL=_server.ts.js-
|
|
38
|
+
//# sourceMappingURL=_server.ts.js-Cqig6BdK.js.map
|
package/build/server/chunks/entries/endpoints/api/skills/reload/cancel/_server.ts.js-CGlFnmuI.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { c as cancelRefresh } from '../../../../../../chunks/engine.js-BRoFbCnL.js';
|
|
2
|
+
import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import { rmSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { homedir } from '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/cancel/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-skills - POST /api/skills/reload/cancel
|
|
14
|
+
* The bored-operator verb (Reload Rememberer, 2026-09-23): kills the
|
|
15
|
+
* in-flight engine child and clears the progress sidecar. The snapshot
|
|
16
|
+
* cache is only written at the END of a successful refresh, so the OLD
|
|
17
|
+
* snapshot survives untouched — cancel loses nothing but the wait.
|
|
18
|
+
*/
|
|
19
|
+
var POST = async () => {
|
|
20
|
+
const killed = cancelRefresh();
|
|
21
|
+
if (killed) try {
|
|
22
|
+
rmSync(process.env.SHELF_PROGRESS_PATH || join(homedir(), ".dsi/resources/skr-progress.json"), { force: true });
|
|
23
|
+
} catch {}
|
|
24
|
+
return json({
|
|
25
|
+
ok: true,
|
|
26
|
+
cancelled: killed
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { POST };
|
|
31
|
+
//# sourceMappingURL=_server.ts.js-CGlFnmuI.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine.js-
|
|
1
|
+
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine.js-BRoFbCnL.js';
|
|
2
2
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:path';
|
|
@@ -34,4 +34,4 @@ var GET = async () => {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export { GET };
|
|
37
|
-
//# sourceMappingURL=_server.ts.js-
|
|
37
|
+
//# sourceMappingURL=_server.ts.js-p7P1CFjG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine.js-BRoFbCnL.js';
|
|
2
2
|
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:path';
|
|
@@ -44,4 +44,4 @@ var POST = async ({ request }) => {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export { POST };
|
|
47
|
-
//# sourceMappingURL=_server.ts.js-
|
|
47
|
+
//# sourceMappingURL=_server.ts.js-h5IfIfov.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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-
|
|
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-BKUnFOB4.js';
|
|
3
3
|
import '../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
4
|
-
import '../../chunks/internal.js-
|
|
4
|
+
import '../../chunks/internal.js-D-70iBmc.js';
|
|
5
5
|
import '../../chunks/shared.js-HQ0rfhm4.js';
|
|
6
6
|
import '../../chunks/exports.js-DH_tjtdv.js';
|
|
7
7
|
import '../../chunks/config.js-BvW5LrfQ.js';
|
|
@@ -40,4 +40,4 @@ function _error($$renderer, $$props) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export { _error as default };
|
|
43
|
-
//# sourceMappingURL=_error.svelte.js-
|
|
43
|
+
//# sourceMappingURL=_error.svelte.js-Bee5xNts.js.map
|