vde-open 0.0.0 → 0.1.0
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/LICENSE +21 -0
- package/README.md +124 -28
- package/THIRD_PARTY_NOTICES.md +3433 -0
- package/dist/cli.js +4194 -0
- package/dist/daemon.js +34 -0
- package/dist/heap-Dev_gSQn.js +12 -0
- package/dist/main-lxBamyBU.js +13257 -0
- package/dist/render-yCayIbhf.js +14769 -0
- package/dist/rolldown-runtime-DC62tzP2.js +33 -0
- package/dist/search-index-C0szMSlZ.js +8797 -0
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/index-BYu5_12H.css +2 -0
- package/dist/web/assets/index-CLggJFeG.js +95 -0
- package/dist/web/assets/markdown.worker-BhrAVXtB.js +13 -0
- package/dist/web/index.html +13 -0
- package/dist/workers/parse-worker.js +30 -0
- package/dist/workers/search-worker.js +70 -0
- package/docs/agent-usage.md +97 -0
- package/package.json +57 -7
- package/skills/vde-open/SKILL.md +108 -0
package/dist/daemon.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { k as version, t as startDaemon, w as currentPathEnvironment } from "./main-lxBamyBU.js";
|
|
2
|
+
import { E as isVdeError } from "./search-index-C0szMSlZ.js";
|
|
3
|
+
//#region src/daemon.ts
|
|
4
|
+
function notifyParent(message) {
|
|
5
|
+
if (!process.send) return;
|
|
6
|
+
process.send(message, () => {
|
|
7
|
+
if (process.connected) process.disconnect();
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const daemon = await startDaemon({
|
|
12
|
+
environment: currentPathEnvironment(),
|
|
13
|
+
version
|
|
14
|
+
});
|
|
15
|
+
notifyParent({
|
|
16
|
+
type: "ready",
|
|
17
|
+
daemonId: daemon.daemonId
|
|
18
|
+
});
|
|
19
|
+
const shutdown = (signal) => void daemon.stop(signal);
|
|
20
|
+
process.on("SIGINT", () => shutdown("SIGINT"));
|
|
21
|
+
process.on("SIGTERM", () => shutdown("SIGTERM"));
|
|
22
|
+
await daemon.stopped;
|
|
23
|
+
process.exitCode = 0;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
notifyParent({
|
|
26
|
+
type: "error",
|
|
27
|
+
code: isVdeError(error) ? error.code : "E_DAEMON_START_FAILED",
|
|
28
|
+
message: isVdeError(error) ? error.message : "The daemon could not be started.",
|
|
29
|
+
details: isVdeError(error) ? error.details : {}
|
|
30
|
+
});
|
|
31
|
+
process.exitCode = 1;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getHeapStatistics, setFlagsFromString } from "node:v8";
|
|
2
|
+
import { runInNewContext } from "node:vm";
|
|
3
|
+
//#region src/diagnostics/heap.ts
|
|
4
|
+
function measureHeap(collectGarbage) {
|
|
5
|
+
if (collectGarbage) {
|
|
6
|
+
setFlagsFromString("--expose-gc");
|
|
7
|
+
runInNewContext("gc")();
|
|
8
|
+
}
|
|
9
|
+
return getHeapStatistics().used_heap_size;
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { measureHeap as t };
|