@vpxa/kb 0.1.12 → 0.1.13

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.
Files changed (54) hide show
  1. package/README.md +48 -37
  2. package/package.json +1 -1
  3. package/packages/analyzers/dist/entry-point-analyzer.d.ts +18 -0
  4. package/packages/analyzers/dist/entry-point-analyzer.js +6 -5
  5. package/packages/analyzers/dist/pattern-analyzer.js +1 -1
  6. package/packages/analyzers/dist/types.d.ts +1 -1
  7. package/packages/cli/dist/commands/init.d.ts +2 -1
  8. package/packages/cli/dist/commands/init.js +242 -183
  9. package/packages/cli/dist/commands/knowledge.js +1 -1
  10. package/packages/cli/dist/commands/system.js +6 -3
  11. package/packages/cli/dist/helpers.js +5 -3
  12. package/packages/core/dist/content-detector.d.ts +5 -1
  13. package/packages/core/dist/content-detector.js +1 -1
  14. package/packages/core/dist/index.d.ts +1 -1
  15. package/packages/core/dist/index.js +1 -1
  16. package/packages/core/dist/types.d.ts +2 -0
  17. package/packages/server/dist/server.js +1 -1
  18. package/packages/server/dist/tools/analyze.tools.js +3 -1
  19. package/packages/server/dist/tools/audit.tool.d.ts +5 -0
  20. package/packages/server/dist/tools/audit.tool.js +4 -0
  21. package/packages/server/dist/tools/replay.tool.js +4 -4
  22. package/packages/server/dist/tools/search.tool.js +18 -14
  23. package/packages/server/dist/tools/status.tool.js +3 -3
  24. package/packages/server/dist/tools/toolkit.tools.d.ts +1 -1
  25. package/packages/server/dist/tools/toolkit.tools.js +23 -20
  26. package/packages/store/dist/lance-store.js +1 -1
  27. package/packages/store/dist/store.interface.d.ts +2 -0
  28. package/packages/tools/dist/audit.d.ts +66 -0
  29. package/packages/tools/dist/audit.js +7 -0
  30. package/packages/tools/dist/check.d.ts +19 -0
  31. package/packages/tools/dist/check.js +2 -2
  32. package/packages/tools/dist/compact.d.ts +4 -2
  33. package/packages/tools/dist/compact.js +2 -2
  34. package/packages/tools/dist/dead-symbols.d.ts +9 -1
  35. package/packages/tools/dist/dead-symbols.js +2 -2
  36. package/packages/tools/dist/forge-classify.js +1 -1
  37. package/packages/tools/dist/guide.d.ts +23 -0
  38. package/packages/tools/dist/guide.js +1 -0
  39. package/packages/tools/dist/health.js +2 -1
  40. package/packages/tools/dist/index.d.ts +6 -2
  41. package/packages/tools/dist/index.js +1 -1
  42. package/packages/tools/dist/path-resolver.d.ts +12 -0
  43. package/packages/tools/dist/path-resolver.js +1 -0
  44. package/packages/tools/dist/replay.d.ts +1 -1
  45. package/packages/tools/dist/response-envelope.d.ts +41 -0
  46. package/packages/tools/dist/response-envelope.js +1 -0
  47. package/packages/tools/dist/scope-map.d.ts +2 -0
  48. package/packages/tools/dist/scope-map.js +1 -1
  49. package/packages/tools/dist/truncation.d.ts +9 -0
  50. package/packages/tools/dist/truncation.js +8 -8
  51. package/packages/tui/dist/App.js +109 -109
  52. package/packages/tui/dist/index.js +116 -116
  53. package/packages/tui/dist/panels/LogPanel.js +100 -100
  54. package/skills/knowledge-base/SKILL.md +19 -19
@@ -1,6 +1,6 @@
1
1
  # @vpxa/kb — Knowledge Base Toolkit
2
2
 
3
- Local-first AI developer toolkit — 57 MCP tools for knowledge management, code analysis, context compression, code manipulation, execution, web access, and developer utilities.
3
+ Local-first AI developer toolkit — 64 MCP tools for knowledge management, code analysis, context compression, code manipulation, execution, web access, and developer utilities.
4
4
 
5
5
  ## When to Use
6
6
 
@@ -25,8 +25,8 @@ Local-first AI developer toolkit — 57 MCP tools for knowledge management, code
25
25
  core → store → embeddings → chunker → indexer → analyzers → tools → server → cli → tui
26
26
  ```
27
27
 
28
- - **MCP server**: 57 tools + 2 resources (via `@modelcontextprotocol/sdk`)
29
- - **CLI**: 42 commands (thin dispatcher + 8 command groups)
28
+ - **MCP server**: 65 tools + 2 resources (via `@modelcontextprotocol/sdk`)
29
+ - **CLI**: 45 commands (thin dispatcher + 10 command groups)
30
30
  - **Search**: Hybrid vector + keyword + RRF fusion
31
31
  - **Embeddings**: ONNX local (mxbai-embed-large-v1, 1024 dimensions)
32
32
  - **Vector store**: LanceDB (embedded, zero infrastructure)
@@ -54,19 +54,18 @@ remember (capture insights)
54
54
  remember({ title: "Session checkpoint: <topic>", content: "<what was done, decisions made, next steps>", category: "conventions" })
55
55
  ```
56
56
 
57
- ## Tool Catalog (57 tools)
57
+ ## Tool Catalog (65 tools)
58
58
 
59
59
  ### Search & Discovery (9)
60
60
  | Tool | CLI | Purpose |
61
61
  |------|-----|---------|
62
62
  | `search` | `kb search` | Hybrid/semantic/keyword search with `search_mode` param |
63
- | `find` | `kb find` | Federated search: vector + FTS + glob + regex in one call |
63
+ | `find` | `kb find` | Federated search: vector + FTS + glob + regex in one call. Use `mode: 'examples'` to find usage examples. |
64
64
  | `symbol` | `kb symbol` | Resolve symbol definition, imports, and references |
65
65
  | `lookup` | `kb lookup` | Full-file retrieval by path or record ID |
66
66
  | `scope_map` | `kb scope-map` | Task-scoped reading plan with token estimates |
67
67
  | `trace` | `kb trace` | Forward/backward flow tracing through call chains |
68
- | `find_examples` | `kb examples` | Find usage examples of a symbol or pattern |
69
- | `dead_symbols` | `kb dead-symbols` | Find exported symbols that are never imported |
68
+ | `dead_symbols` | `kb dead-symbols` | Find exported symbols never imported separates source (actionable) from docs (informational). Accepts `path` to scope the search. |
70
69
  | `file_summary` | `kb summarize` | Structural overview of a file (exports, imports, functions) |
71
70
 
72
71
  ### Code Analysis (7)
@@ -76,14 +75,14 @@ remember({ title: "Session checkpoint: <topic>", content: "<what was done, decis
76
75
  | `analyze_dependencies` | `kb analyze deps` | Dependency graph with confidence |
77
76
  | `analyze_symbols` | `kb analyze symbols` | Symbol extraction and cross-references |
78
77
  | `analyze_patterns` | `kb analyze patterns` | Design pattern detection |
79
- | `analyze_entry_points` | `kb analyze entry-points` | Find entry points |
78
+ | `analyze_entry_points` | `kb analyze entry-points` | Find entry points: handlers, CDK constructs, test suites, package exports (walks workspace packages) |
80
79
  | `analyze_diagram` | `kb analyze diagram` | Generate Mermaid diagrams |
81
80
  | `blast_radius` | `kb analyze blast-radius` | Change impact analysis |
82
81
 
83
82
  ### Context Management (5)
84
83
  | Tool | CLI | Purpose |
85
84
  |------|-----|---------|
86
- | `compact` | `kb compact` | Compress text to relevant sections using embeddings (no LLM) |
85
+ | `compact` | `kb compact` | Compress text to relevant sections using embeddings (no LLM). Accepts `path` for server-side file read. |
87
86
  | `workset` | `kb workset` | Named file set management (save/load/add/remove) |
88
87
  | `stash` | `kb stash` | Named key-value store for session data |
89
88
  | `checkpoint` | `kb checkpoint` | Save/restore session checkpoints |
@@ -97,13 +96,14 @@ remember({ title: "Session checkpoint: <topic>", content: "<what was done, decis
97
96
  | `diff_parse` | `kb diff` | Parse unified diff → structured changes |
98
97
  | `data_transform` | `kb transform` | JQ-like JSON transformations |
99
98
 
100
- ### Execution & Validation (4)
99
+ ### Execution & Validation (5)
101
100
  | Tool | CLI | Purpose |
102
- |------|-----|---------|
101
+ |------|-----|---------||
103
102
  | `eval` | `kb eval` | Sandboxed JavaScript/TypeScript execution |
104
- | `check` | `kb check` | Incremental typecheck + lint in one call |
103
+ | `check` | `kb check` | Incremental typecheck + lint. `detail` param: summary (default, ~300 tokens), errors, full |
105
104
  | `test_run` | `kb test` | Run tests with structured pass/fail results |
106
105
  | `batch` | `kb batch` | Execute multiple operations in parallel |
106
+ | `audit` | `kb audit` | Unified project audit: structure, deps, patterns, health, dead symbols, check, entry points → synthesized report with score and recommendations. 6 round-trips → 1. |
107
107
 
108
108
  ### Knowledge Management (6)
109
109
  | Tool | CLI | Purpose |
@@ -151,13 +151,13 @@ Lane actions: `create` (copy files to lane), `list`, `status` (modified/added/de
151
151
 
152
152
  ### System (6)
153
153
  | Tool | CLI | Purpose |
154
- |------|-----|---------|
154
+ |------|-----|--------|
155
155
  | `status` | `kb status` | Index statistics |
156
156
  | `reindex` | `kb reindex` | Rebuild index |
157
- | `health` | `kb health` | Project health checks (package.json, tsconfig, lockfile, etc.) |
157
+ | `health` | `kb health` | Project health checks (package.json, tsconfig, lockfile, circular deps) |
158
+ | `guide` | `kb guide` | Tool discovery — given a goal, recommends tools and workflow order |
158
159
  | `queue` | `kb queue` | Task queue for sequential agent operations (create/push/next/done/fail) |
159
- | `replay_list` | `kb replay` | View audit trail of tool invocations (filter by tool/source/time) |
160
- | `replay_clear` | `kb replay-clear` | Clear the replay audit trail |
160
+ | `replay` | `kb replay` | View or clear the audit trail of tool invocations (action: list/clear) |
161
161
 
162
162
  ## Search Strategy
163
163
 
@@ -180,7 +180,7 @@ analyze_structure({ path: "src/" })
180
180
  ### Planning a Task
181
181
  ```
182
182
  scope_map({ task: "implement user auth" })
183
- → compact({ text: <large file>, query: "auth flow" })
183
+ → compact({ path: "src/auth.ts", query: "auth flow" })
184
184
  → workset({ action: "save", name: "auth-task", files: [...] })
185
185
  ```
186
186
 
@@ -227,8 +227,8 @@ kb search <q> # Hybrid search
227
227
  kb find <q> # Federated search
228
228
  kb symbol <name> # Resolve symbol
229
229
  kb scope-map <t> # Task reading plan
230
- kb compact <q> # Context compression
231
- kb check # Typecheck + lint
230
+ kb compact <q> # Context compression (--path file or stdin)
231
+ kb check # Typecheck + lint (--detail summary|errors|full)
232
232
  kb test # Run tests
233
233
  kb rename <old> <new> <path> # Rename symbol
234
234
  kb lane create <name> --files f1,f2 # Create lane