perf(coding-agent): optimized documentation indexing via compressed blob

- Replaced raw TypeScript documentation map with a lazily-inflated gzip blob.
- Reduced bundled binary/npm package size by approximately 0.9MB.
- Encapsulated index logic into `docs-index.ts` to separate header metadata from content.
- Added `postpack` and robust `try/finally` patterns in build scripts to ensure clean artifacts.
- Implemented disk-based fallback during development to maintain existing developer experience.
This commit is contained in:
can1357
2026-06-18 18:57:13 +02:00
parent f5ebab2b83
commit 831b664a4c
10 changed files with 212 additions and 51 deletions
+2 -3
View File
@@ -19,8 +19,8 @@ const ALWAYS_EXTERNAL = ["mupdf", "@oh-my-pi/pi-natives", "@huggingface/transfor
// redundant copy that bloats dist/cli.js. NEVER add a patched dependency here — the
// bundle is where a root `patchedDependencies` patch is baked in, so an externalized
// import would load the unpatched npm package in users' installs (currently
// beautiful-mermaid and @ark/schema are patched, so they — and arktype, which pulls
// @ark/schema — stay bundled).
// @ark/schema is patched, so it — and arktype, which pulls @ark/schema — stay
// bundled).
const RUNTIME_EXTERNAL = [
"puppeteer-core",
"@puppeteer/browsers",
@@ -30,7 +30,6 @@ const RUNTIME_EXTERNAL = [
"turndown-plugin-gfm",
"@mozilla/readability",
"linkedom",
"markit-ai",
"@agentclientprotocol/sdk",
];