@vpxa/kb 0.1.10 → 0.1.11
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/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{appendFileSync as p,existsSync as
|
|
1
|
+
import{appendFileSync as p,existsSync as o,mkdirSync as u,readFileSync as m,writeFileSync as a}from"node:fs";import{basename as g,resolve as t}from"node:path";const h={sources:[{path:".",excludePatterns:["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.kb-data/**","**/coverage/**","**/*.min.js","**/package-lock.json","**/pnpm-lock.yaml"]}],indexing:{chunkSize:1500,chunkOverlap:200,minChunkSize:100},embedding:{model:"mixedbread-ai/mxbai-embed-large-v1",dimensions:1024},store:{backend:"lancedb",path:".kb-data/lance"},curated:{path:"curated"}};function f(e){return{servers:{[`${e}-kb`]:{type:"stdio",command:"npx",args:["@vpxa/kb","serve"]}}}}function y(e){return`# ${e} \u2014 Copilot Instructions
|
|
2
2
|
|
|
3
3
|
This project uses **@vpxa/kb** as an MCP knowledge base server. Use the KB tools to search, analyze, and understand the codebase before making changes.
|
|
4
4
|
|
|
5
5
|
## KB Tools
|
|
6
6
|
|
|
7
|
-
Before starting any task on **${
|
|
7
|
+
Before starting any task on **${e}**, use these MCP tools:
|
|
8
8
|
|
|
9
9
|
| Action | Tool | Example |
|
|
10
10
|
|--------|------|---------|
|
|
@@ -141,7 +141,7 @@ kb_remember({ title: "What I learned", category: "decisions" }) # Persist
|
|
|
141
141
|
| \`kb_queue\` | Task queue for sequential agent operations. |
|
|
142
142
|
| \`kb_replay_list\` | View audit trail of tool invocations. |
|
|
143
143
|
| \`kb_replay_clear\` | Clear the replay audit trail. |
|
|
144
|
-
`}function w(
|
|
144
|
+
`}function w(e){return`# ${e} \u2014 Agent Instructions
|
|
145
145
|
|
|
146
146
|
## KB Knowledge Base
|
|
147
147
|
|
|
@@ -238,12 +238,12 @@ kb_blast_radius({ changed_files: ["src/file.ts"] }) \u2192 kb_check({}) \u2192 k
|
|
|
238
238
|
- Use \`kb_check\` and \`kb_test_run\` to validate before committing
|
|
239
239
|
- Use \`kb_remember\` to persist architecture decisions and lessons learned
|
|
240
240
|
- Analysis results are auto-persisted as \`origin: "produced"\` entries
|
|
241
|
-
`}async function P(
|
|
242
|
-
`,"utf-8"),console.log(" Created kb.config.json");const
|
|
241
|
+
`}async function P(e){const s=process.cwd(),i=t(s,"kb.config.json");if(o(i)&&!e.force){console.log("kb.config.json already exists. Use --force to overwrite.");return}a(i,`${JSON.stringify(h,null,2)}
|
|
242
|
+
`,"utf-8"),console.log(" Created kb.config.json");const c=t(s,"curated");o(c)||(u(c,{recursive:!0}),console.log(" Created curated/"));const r=t(s,".gitignore");o(r)?m(r,"utf-8").includes(".kb-data")||(p(r,`
|
|
243
243
|
# Knowledge base vector store
|
|
244
244
|
.kb-data/
|
|
245
245
|
`,"utf-8"),console.log(" Added .kb-data/ to .gitignore")):(a(r,`# Knowledge base vector store
|
|
246
246
|
.kb-data/
|
|
247
|
-
`,"utf-8"),console.log(" Created .gitignore with .kb-data/"));const
|
|
248
|
-
`,"utf-8"),console.log(" Created .vscode/mcp.json"));const
|
|
247
|
+
`,"utf-8"),console.log(" Created .gitignore with .kb-data/"));const n=g(s),l=t(s,".vscode"),d=t(l,"mcp.json");o(l)&&!o(d)&&(a(d,`${JSON.stringify(f(n),null,2)}
|
|
248
|
+
`,"utf-8"),console.log(" Created .vscode/mcp.json"));const b=t(s,".github"),k=t(b,"copilot-instructions.md");o(k)||(u(b,{recursive:!0}),a(k,y(n),"utf-8"),console.log(" Created .github/copilot-instructions.md"));const _=t(s,"AGENTS.md");o(_)||(a(_,w(n),"utf-8"),console.log(" Created AGENTS.md")),console.log(`
|
|
249
249
|
Knowledge base initialized! Next steps:`),console.log(" kb reindex Index your codebase"),console.log(" kb search Search indexed content"),console.log(" kb serve Start MCP server for IDE integration")}export{P as initProject};
|