@deepseek-insight/dsi 0.5.38 → 0.6.1
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-plugin-rack/SKILL.md +27 -0
- package/.agents/skills/dsi-plugin-rack/rack.mjs +237 -0
- package/README.md +27 -3
- package/bin/dsi.mjs +89 -2
- package/bin/lib/plugin-chain.mjs +86 -0
- package/build/client/_app/immutable/assets/{2.B3K-kE1m.css → 2.DEBHmc3y.css} +1 -1
- package/build/client/_app/immutable/chunks/BVBc9rJx.js +2 -0
- package/build/client/_app/immutable/chunks/BdHmBwz-.js +1 -0
- package/build/client/_app/immutable/chunks/{8isMKkmK.js → DNY2-FaC.js} +1 -1
- package/build/client/_app/immutable/chunks/oLHjdJ-M.js +1 -0
- package/build/client/_app/immutable/entry/{app.CpbSsqDG.js → app.C1j_PXOJ.js} +2 -2
- package/build/client/_app/immutable/entry/start.Dyarj9we.js +1 -0
- package/build/client/_app/immutable/nodes/{1.C4SBbU1i.js → 1.DB7DKw94.js} +1 -1
- package/build/client/_app/immutable/nodes/{2.C1u8HG5a.js → 2.D9qSqOKy.js} +195 -195
- 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-CrdWRSwf.js +97 -0
- package/build/server/chunks/chunks/{engine.js-BRoFbCnL.js → engine2.js-BRoFbCnL.js} +1 -1
- package/build/server/chunks/chunks/{internal.js-D0IzcQru.js → internal.js-Ca_6TJ1k.js} +2 -2
- package/build/server/chunks/chunks/{state.js-BeFSJ3AU.js → state.js-BrbF5k84.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/plugins/apply/_server.ts.js-CpO--Jwf.js +125 -0
- package/build/server/chunks/entries/endpoints/api/plugins/reload/_server.ts.js-U8vRgx7E.js +34 -0
- package/build/server/chunks/entries/endpoints/api/plugins/snapshot/_server.ts.js-9Ezy2OeQ.js +36 -0
- package/build/server/chunks/entries/endpoints/api/skills/install/{_server.ts.js-DijnCqgt.js → _server.ts.js-DyzPF_Z5.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/reload/{_server.ts.js-Cqig6BdK.js → _server.ts.js-BUnCt45D.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/reload/cancel/{_server.ts.js-CGlFnmuI.js → _server.ts.js-DT52g6_a.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/snapshot/{_server.ts.js-p7P1CFjG.js → _server.ts.js-CaBD0w0v.js} +2 -2
- package/build/server/chunks/entries/endpoints/api/skills/uninstall/{_server.ts.js-h5IfIfov.js → _server.ts.js-D_NXkZEr.js} +2 -2
- package/build/server/chunks/entries/pages/{_error.svelte.js-C5-GtTAX.js → _error.svelte.js-C9GhKb8G.js} +3 -3
- package/build/server/chunks/entries/pages/{_page.svelte.js-DoOQ17mk.js → _page.svelte.js-6A1VYbL2.js} +1114 -104
- package/build/server/chunks/{handler-UO5maDaQ.js → handler-ChXGVK9Y.js} +3 -3
- package/build/server/chunks/{index.js-sK5zTj9E.js → index.js-5P_bGLRx.js} +2 -2
- package/build/server/chunks/{manifest.js-DdUlckhQ.js → manifest.js-B3ooI-FL.js} +30 -9
- package/build/server/chunks/nodes/1.js-Dcb4_Gzq.js +9 -0
- package/build/server/chunks/nodes/{2.js-ClaC6DDN.js → 2.js-C4WQL8rj.js} +4 -4
- package/package.json +1 -1
- package/template/.dsi/resources/plugins-reff.md +4 -0
- package/build/client/_app/immutable/chunks/DaJQaZs4.js +0 -1
- package/build/client/_app/immutable/chunks/vqHvFU33.js +0 -2
- package/build/client/_app/immutable/chunks/y7n0suOs.js +0 -1
- package/build/client/_app/immutable/entry/start.CNrTX-th.js +0 -1
- package/build/server/chunks/nodes/1.js-CKpJoUo-.js +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1790556846266"}
|
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-ChXGVK9Y.js';
|
|
6
|
+
import './server/chunks/index.js-5P_bGLRx.js';
|
|
7
|
+
import './server/chunks/manifest.js-B3ooI-FL.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-Ca_6TJ1k.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-ChXGVK9Y.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-5P_bGLRx.js';
|
|
18
|
+
import './server/chunks/chunks/internal.js-Ca_6TJ1k.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-B3ooI-FL.js';
|
|
23
23
|
import 'node:url';
|
|
24
24
|
|
|
25
25
|
const path = env('SOCKET_PATH', false);
|
|
@@ -0,0 +1,97 @@
|
|
|
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/plugins/types.ts
|
|
8
|
+
var RackEngineMissingError = class extends Error {
|
|
9
|
+
enginePath;
|
|
10
|
+
constructor(enginePath) {
|
|
11
|
+
super("rack engine not found: " + enginePath);
|
|
12
|
+
this.name = "RackEngineMissingError";
|
|
13
|
+
this.enginePath = enginePath;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var RackEngineFailedError = class extends Error {
|
|
17
|
+
payload;
|
|
18
|
+
constructor(message, payload) {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "RackEngineFailedError";
|
|
21
|
+
this.payload = payload;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region src/lib/server/plugins/engine.ts
|
|
26
|
+
var execFileP = promisify(execFile);
|
|
27
|
+
/** Refresh is a local parse (no network harvest like the shelf) — one
|
|
28
|
+
* ceiling serves every verb. */
|
|
29
|
+
var ENGINE_TIMEOUT_MS = 12e4;
|
|
30
|
+
function defaultEnginePath() {
|
|
31
|
+
return process.env.RACK_ENGINE_PATH || join(homedir(), ".agents/skills/dsi-plugin-rack/rack.mjs");
|
|
32
|
+
}
|
|
33
|
+
function defaultRunner(enginePath, args, timeoutMs = ENGINE_TIMEOUT_MS) {
|
|
34
|
+
return execFileP("node", [enginePath, ...args], {
|
|
35
|
+
timeout: timeoutMs,
|
|
36
|
+
maxBuffer: 8388608
|
|
37
|
+
}).then((r) => r.stdout, (err) => {
|
|
38
|
+
if (err.stdout) return err.stdout;
|
|
39
|
+
throw err;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Test seam: override to stub the engine process. */
|
|
43
|
+
var runner = defaultRunner;
|
|
44
|
+
async function run(args, timeoutMs) {
|
|
45
|
+
const enginePath = defaultEnginePath();
|
|
46
|
+
if (!existsSync(enginePath)) throw new RackEngineMissingError(enginePath);
|
|
47
|
+
let stdout;
|
|
48
|
+
try {
|
|
49
|
+
stdout = await runner(enginePath, args, timeoutMs);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
const e = err;
|
|
52
|
+
if (e.killed) throw new RackEngineFailedError("rack engine timed out after " + (ENGINE_TIMEOUT_MS) + "ms", null);
|
|
53
|
+
throw new RackEngineFailedError(String(e.message ?? e), null);
|
|
54
|
+
}
|
|
55
|
+
let payload;
|
|
56
|
+
try {
|
|
57
|
+
payload = JSON.parse(stdout);
|
|
58
|
+
} catch {
|
|
59
|
+
throw new RackEngineFailedError("rack engine emitted non-JSON output", null);
|
|
60
|
+
}
|
|
61
|
+
if (payload.v !== 1) throw new RackEngineFailedError("rack engine wire version mismatch: v=" + payload.v, payload);
|
|
62
|
+
return payload;
|
|
63
|
+
}
|
|
64
|
+
function getRackEngine() {
|
|
65
|
+
return {
|
|
66
|
+
async snapshotStatus() {
|
|
67
|
+
const p = await run(["snapshot-status"]);
|
|
68
|
+
return { present: Boolean(p.present) };
|
|
69
|
+
},
|
|
70
|
+
async refresh(reload, extraArgs = []) {
|
|
71
|
+
const p = await run([
|
|
72
|
+
"refresh",
|
|
73
|
+
...reload ? ["--reload"] : [],
|
|
74
|
+
...extraArgs
|
|
75
|
+
]);
|
|
76
|
+
if (!p.snapshot) throw new RackEngineFailedError("rack refresh returned no snapshot", p);
|
|
77
|
+
return {
|
|
78
|
+
snapshot: p.snapshot,
|
|
79
|
+
reused: Boolean(p.reused),
|
|
80
|
+
...p.errors ? { errors: p.errors } : {}
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
async apply(action, targets, extraArgs = []) {
|
|
84
|
+
const p = await run([
|
|
85
|
+
"apply",
|
|
86
|
+
action,
|
|
87
|
+
...targets,
|
|
88
|
+
...extraArgs
|
|
89
|
+
]);
|
|
90
|
+
if (!p.results) throw new RackEngineFailedError("rack apply returned no results", p);
|
|
91
|
+
return p.results;
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export { RackEngineMissingError as R, RackEngineFailedError as a, getRackEngine as g };
|
|
97
|
+
//# sourceMappingURL=engine.js-CrdWRSwf.js.map
|
|
@@ -148,4 +148,4 @@ function getEngine() {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
export { EngineMissingError as E, EngineFailedError as a, EngineCancelledError as b, cancelRefresh as c, getEngine as g, uninstallableIds as u };
|
|
151
|
-
//# sourceMappingURL=
|
|
151
|
+
//# sourceMappingURL=engine2.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: "1ezz6qc"
|
|
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-Ca_6TJ1k.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-Ca_6TJ1k.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-BrbF5k84.js.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { g as getRackEngine, R as RackEngineMissingError, a as RackEngineFailedError } from '../../../../../chunks/engine.js-CrdWRSwf.js';
|
|
2
|
+
import { j as json } from '../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
|
+
import { existsSync, mkdirSync, appendFileSync, openSync, closeSync } from 'node:fs';
|
|
4
|
+
import { join, dirname } from 'node:path';
|
|
5
|
+
import { spawn } from 'node:child_process';
|
|
6
|
+
import 'node:os';
|
|
7
|
+
import 'node:util';
|
|
8
|
+
import '../../../../../chunks/shared.js-HQ0rfhm4.js';
|
|
9
|
+
import '../../../../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
10
|
+
|
|
11
|
+
//#region src/lib/server/plugins/restart-chain.ts
|
|
12
|
+
/**
|
|
13
|
+
* plugin-rack — the detached restart-chain spawn (ADR D5). The apply route
|
|
14
|
+
* calls this AFTER the engine's dsh work is done: the chain is the
|
|
15
|
+
* RESTART-ONLY half (killOrphans + dsi dsh --sync: token re-sync + re-serve),
|
|
16
|
+
* spawned detached + unref so the HTTP response comes home before the floor
|
|
17
|
+
* goes down. The install+restart one-shot CLI path lives in bin/dsi.mjs
|
|
18
|
+
* (Wave 4); the route only ever needs the bounce.
|
|
19
|
+
*/
|
|
20
|
+
function dsiBinPath() {
|
|
21
|
+
return process.env.DSI_BIN || join(process.cwd(), "bin", "dsi.mjs");
|
|
22
|
+
}
|
|
23
|
+
/** Where the detached chain's stdout/stderr land (RCA 2026-09-27): a
|
|
24
|
+
* bounce that dies at preflight used to vanish with stdio 'ignore'. The
|
|
25
|
+
* log is cwd-relative like dsiBinPath (the DSI checkout's tmp/, which
|
|
26
|
+
* .gitignore's *.log already covers); DSI_BOUNCE_LOG overrides. */
|
|
27
|
+
function bounceLogPath() {
|
|
28
|
+
return process.env.DSI_BOUNCE_LOG || join(process.cwd(), "tmp", "bounce.log");
|
|
29
|
+
}
|
|
30
|
+
var defaultSpawner = (node, bin, args) => {
|
|
31
|
+
const log = bounceLogPath();
|
|
32
|
+
mkdirSync(dirname(log), { recursive: true });
|
|
33
|
+
appendFileSync(log, "[" + (/* @__PURE__ */ new Date()).toISOString() + "] bounce spawn: dsi " + bin.split("/").slice(-2).join("/") + " " + args.join(" ") + "\n");
|
|
34
|
+
const out = openSync(log, "a");
|
|
35
|
+
try {
|
|
36
|
+
spawn(node, [bin, ...args], {
|
|
37
|
+
detached: true,
|
|
38
|
+
stdio: [
|
|
39
|
+
"ignore",
|
|
40
|
+
out,
|
|
41
|
+
out
|
|
42
|
+
]
|
|
43
|
+
}).unref();
|
|
44
|
+
} finally {
|
|
45
|
+
closeSync(out);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var spawner = defaultSpawner;
|
|
49
|
+
/** @returns false when the bin is missing (route answers honestly; the
|
|
50
|
+
* operator restarts by hand — never a half-truth 200). When the serving
|
|
51
|
+
* floor is a DEV floor (DSI_DEV=1, set by startDsiDevServer), the chain
|
|
52
|
+
* re-serves --dev too (RCA 2026-09-27: a dev pair bounced into build mode
|
|
53
|
+
* left the browser staring at 5175's corpse). */
|
|
54
|
+
function spawnRestartChain() {
|
|
55
|
+
const bin = dsiBinPath();
|
|
56
|
+
if (!existsSync(bin)) return false;
|
|
57
|
+
const args = ["dsh", "--plugin-restart"];
|
|
58
|
+
if (process.env.DSI_DEV === "1") args.push("--dev");
|
|
59
|
+
spawner(process.execPath, bin, args);
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/routes/api/plugins/apply/+server.ts
|
|
64
|
+
/**
|
|
65
|
+
* api-plugins — POST /api/plugins/apply
|
|
66
|
+
* Body: { action: 'install' | 'remove', targets: string[] }.
|
|
67
|
+
* Engine apply runs the dsh work (D3); on overall success the DSH restart
|
|
68
|
+
* chain (killOrphans + --sync re-serve) is spawned DETACHED and this route
|
|
69
|
+
* answers FIRST — the DSI server itself is one of the orphans the sweep
|
|
70
|
+
* kills, so the response can never wait for the bounce (ADR D5).
|
|
71
|
+
* 400 on a malformed body, 409 on a concurrent apply, 503 on engine failure.
|
|
72
|
+
*/
|
|
73
|
+
/** Single-flight (the shelf's reload precedent): a second concurrent apply
|
|
74
|
+
* JOINS nothing — it is refused; the floor bounces under it anyway. */
|
|
75
|
+
var inFlight = false;
|
|
76
|
+
var POST = async ({ request }) => {
|
|
77
|
+
let body;
|
|
78
|
+
try {
|
|
79
|
+
body = await request.json();
|
|
80
|
+
} catch {
|
|
81
|
+
return json({
|
|
82
|
+
ok: false,
|
|
83
|
+
error: "malformed JSON body"
|
|
84
|
+
}, { status: 400 });
|
|
85
|
+
}
|
|
86
|
+
const action = body.action;
|
|
87
|
+
const targets = body.targets;
|
|
88
|
+
if (action !== "install" && action !== "remove") return json({
|
|
89
|
+
ok: false,
|
|
90
|
+
error: "action must be 'install' or 'remove'"
|
|
91
|
+
}, { status: 400 });
|
|
92
|
+
if (!Array.isArray(targets) || targets.length === 0 || !targets.every((t) => typeof t === "string" && t.length > 0)) return json({
|
|
93
|
+
ok: false,
|
|
94
|
+
error: "targets must be a non-empty array of strings"
|
|
95
|
+
}, { status: 400 });
|
|
96
|
+
if (inFlight) return json({
|
|
97
|
+
ok: false,
|
|
98
|
+
error: "an apply is already in flight"
|
|
99
|
+
}, { status: 409 });
|
|
100
|
+
inFlight = true;
|
|
101
|
+
try {
|
|
102
|
+
const results = await getRackEngine().apply(action, targets);
|
|
103
|
+
if (!results.every((r) => r.ok)) return json({
|
|
104
|
+
ok: false,
|
|
105
|
+
results
|
|
106
|
+
});
|
|
107
|
+
const restarting = spawnRestartChain();
|
|
108
|
+
return json({
|
|
109
|
+
ok: true,
|
|
110
|
+
results,
|
|
111
|
+
restarting
|
|
112
|
+
});
|
|
113
|
+
} catch (err) {
|
|
114
|
+
const status = err instanceof RackEngineMissingError || err instanceof RackEngineFailedError ? 503 : 500;
|
|
115
|
+
return json({
|
|
116
|
+
ok: false,
|
|
117
|
+
error: String(err.message)
|
|
118
|
+
}, { status });
|
|
119
|
+
} finally {
|
|
120
|
+
inFlight = false;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export { POST };
|
|
125
|
+
//# sourceMappingURL=_server.ts.js-CpO--Jwf.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { g as getRackEngine } from '../../../../../chunks/engine.js-CrdWRSwf.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/plugins/reload/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-plugins — POST /api/plugins/reload
|
|
14
|
+
* Forces a snapshot rebuild (--reload, ADR D3): the panel's first fetch then
|
|
15
|
+
* carries the fresh numbering and the manifest-reconciled installed flags.
|
|
16
|
+
*/
|
|
17
|
+
var POST = async () => {
|
|
18
|
+
try {
|
|
19
|
+
const { snapshot, errors } = await getRackEngine().refresh(true);
|
|
20
|
+
return json({
|
|
21
|
+
ok: true,
|
|
22
|
+
snapshot,
|
|
23
|
+
...errors ? { errors } : {}
|
|
24
|
+
});
|
|
25
|
+
} catch (err) {
|
|
26
|
+
return json({
|
|
27
|
+
ok: false,
|
|
28
|
+
error: String(err.message)
|
|
29
|
+
}, { status: 503 });
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { POST };
|
|
34
|
+
//# sourceMappingURL=_server.ts.js-U8vRgx7E.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { g as getRackEngine } from '../../../../../chunks/engine.js-CrdWRSwf.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/plugins/snapshot/+server.ts
|
|
12
|
+
/**
|
|
13
|
+
* api-plugins — GET /api/plugins/snapshot
|
|
14
|
+
* Snapshot-first (ADR "The Plugin Rack" D3): absent cache triggers build;
|
|
15
|
+
* present cache is used as-is. Mirrors /api/skills/snapshot.
|
|
16
|
+
*/
|
|
17
|
+
var GET = async () => {
|
|
18
|
+
try {
|
|
19
|
+
const engine = getRackEngine();
|
|
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
|
+
});
|
|
27
|
+
} catch (err) {
|
|
28
|
+
return json({
|
|
29
|
+
ok: false,
|
|
30
|
+
error: String(err.message)
|
|
31
|
+
}, { status: 503 });
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { GET };
|
|
36
|
+
//# sourceMappingURL=_server.ts.js-9Ezy2OeQ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine2.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-DyzPF_Z5.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, u as uninstallableIds, b as EngineCancelledError } from '../../../../../chunks/
|
|
1
|
+
import { g as getEngine, u as uninstallableIds, b as EngineCancelledError } from '../../../../../chunks/engine2.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';
|
|
@@ -35,4 +35,4 @@ var POST = async () => {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
export { POST };
|
|
38
|
-
//# sourceMappingURL=_server.ts.js-
|
|
38
|
+
//# sourceMappingURL=_server.ts.js-BUnCt45D.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as cancelRefresh } from '../../../../../../chunks/
|
|
1
|
+
import { c as cancelRefresh } from '../../../../../../chunks/engine2.js-BRoFbCnL.js';
|
|
2
2
|
import { j as json } from '../../../../../../chunks/utils.js-CAdNO8Tu.js';
|
|
3
3
|
import { rmSync } from 'node:fs';
|
|
4
4
|
import { join } from 'node:path';
|
|
@@ -28,4 +28,4 @@ var POST = async () => {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export { POST };
|
|
31
|
-
//# sourceMappingURL=_server.ts.js-
|
|
31
|
+
//# sourceMappingURL=_server.ts.js-DT52g6_a.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/
|
|
1
|
+
import { g as getEngine, u as uninstallableIds } from '../../../../../chunks/engine2.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-CaBD0w0v.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/
|
|
1
|
+
import { g as getEngine, E as EngineMissingError, a as EngineFailedError } from '../../../../../chunks/engine2.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-D_NXkZEr.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-BrbF5k84.js';
|
|
3
3
|
import '../../chunks/uneval.js-BJ9Qq2SF.js';
|
|
4
|
-
import '../../chunks/internal.js-
|
|
4
|
+
import '../../chunks/internal.js-Ca_6TJ1k.js';
|
|
5
5
|
import '../../chunks/shared.js-HQ0rfhm4.js';
|
|
6
6
|
import '../../chunks/exports.js-DH_tjtdv.js';
|
|
7
7
|
import '../../chunks/config.js-B0w1-uCA.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-C9GhKb8G.js.map
|