bluera-knowledge 0.9.25 → 0.9.30

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 (56) hide show
  1. package/.claude/commands/commit.md +4 -7
  2. package/.claude/hooks/post-edit-check.sh +21 -24
  3. package/.claude/skills/atomic-commits/SKILL.md +6 -0
  4. package/.claude-plugin/plugin.json +1 -1
  5. package/.env.example +4 -0
  6. package/.husky/pre-push +12 -2
  7. package/.versionrc.json +0 -4
  8. package/CHANGELOG.md +76 -0
  9. package/README.md +55 -20
  10. package/bun.lock +35 -1
  11. package/commands/crawl.md +2 -0
  12. package/dist/{chunk-BICFAWMN.js → chunk-DNOIM7BO.js} +73 -8
  13. package/dist/chunk-DNOIM7BO.js.map +1 -0
  14. package/dist/{chunk-5QMHZUC4.js → chunk-NJUMU4X2.js} +462 -105
  15. package/dist/chunk-NJUMU4X2.js.map +1 -0
  16. package/dist/{chunk-J7J6LXOJ.js → chunk-SZNTYLYT.js} +106 -41
  17. package/dist/chunk-SZNTYLYT.js.map +1 -0
  18. package/dist/index.js +65 -25
  19. package/dist/index.js.map +1 -1
  20. package/dist/mcp/server.js +2 -2
  21. package/dist/workers/background-worker-cli.js +2 -2
  22. package/eslint.config.js +1 -1
  23. package/package.json +3 -1
  24. package/src/analysis/ast-parser.test.ts +46 -0
  25. package/src/cli/commands/crawl.test.ts +99 -12
  26. package/src/cli/commands/crawl.ts +76 -24
  27. package/src/crawl/article-converter.ts +36 -1
  28. package/src/crawl/bridge.ts +18 -7
  29. package/src/crawl/intelligent-crawler.ts +45 -4
  30. package/src/db/embeddings.test.ts +16 -0
  31. package/src/logging/index.ts +29 -0
  32. package/src/logging/logger.test.ts +75 -0
  33. package/src/logging/logger.ts +147 -0
  34. package/src/logging/payload.test.ts +152 -0
  35. package/src/logging/payload.ts +121 -0
  36. package/src/mcp/handlers/search.handler.test.ts +28 -9
  37. package/src/mcp/handlers/search.handler.ts +69 -29
  38. package/src/mcp/handlers/store.handler.test.ts +1 -0
  39. package/src/mcp/server.ts +44 -16
  40. package/src/services/chunking.service.ts +23 -0
  41. package/src/services/index.service.test.ts +921 -1
  42. package/src/services/index.service.ts +76 -1
  43. package/src/services/index.ts +10 -1
  44. package/src/services/search.service.test.ts +573 -21
  45. package/src/services/search.service.ts +257 -105
  46. package/src/services/snippet.service.ts +28 -3
  47. package/src/services/token.service.test.ts +45 -0
  48. package/src/services/token.service.ts +33 -0
  49. package/src/types/result.test.ts +10 -0
  50. package/src/workers/spawn-worker.test.ts +19 -21
  51. package/tests/integration/cli-consistency.test.ts +1 -4
  52. package/vitest.config.ts +4 -0
  53. package/dist/chunk-5QMHZUC4.js.map +0 -1
  54. package/dist/chunk-BICFAWMN.js.map +0 -1
  55. package/dist/chunk-J7J6LXOJ.js.map +0 -1
  56. package/scripts/readme-version-updater.cjs +0 -18
@@ -1,8 +1,3 @@
1
- ---
2
- description: Create atomic commits grouped by logical features with README.md and CLAUDE.md awareness.
3
- allowed-tools: Bash(git:*), Read, Glob, Grep
4
- ---
5
-
6
1
  # Commit
7
2
 
8
3
  Create atomic, well-organized commits. See @.claude/skills/atomic-commits/SKILL.md for documentation check criteria.
@@ -19,7 +14,6 @@ Create atomic, well-organized commits. See @.claude/skills/atomic-commits/SKILL.
19
14
  4. **Commit each group**:
20
15
  ```bash
21
16
  git add <files>
22
- bun run precommit
23
17
  git commit -m "<type>(<scope>): <description>"
24
18
  ```
25
19
  5. **Handle untracked**: Categorize as commit/ignore/intentional
@@ -27,8 +21,11 @@ Create atomic, well-organized commits. See @.claude/skills/atomic-commits/SKILL.
27
21
 
28
22
  ## Validation
29
23
 
24
+ Pre-commit hooks run automatically:
30
25
  - **Doc-only changes**: Skips all validation (instant)
31
- - **Code changes**: Runs lint + typecheck + tests + build
26
+ - **Code changes**: Runs lint + typecheck per language
27
+
28
+ If hooks fail, fix issues and retry. Never use `--no-verify`.
32
29
 
33
30
  ## Safety
34
31
 
@@ -1,41 +1,38 @@
1
1
  #!/bin/bash
2
- # Smart post-edit validation hook
3
- # Only runs relevant checks based on modified file types
2
+ # Smart post-edit auto-fix hook
3
+ # Auto-fixes lint issues and validates types on modified files
4
4
 
5
5
  cd "$CLAUDE_PROJECT_DIR" || exit 0
6
6
 
7
- # Get modified files (uncommitted changes)
8
- MODIFIED_FILES=$(git diff --name-only HEAD 2>/dev/null || echo '')
7
+ # Get modified TS/JS files (uncommitted changes)
8
+ MODIFIED_TS_FILES=$(git diff --name-only HEAD 2>/dev/null | grep -E '\.(ts|tsx|js|jsx)$' || true)
9
9
 
10
- # If no git repo or no changes, skip
11
- if [ -z "$MODIFIED_FILES" ]; then
10
+ # If no TS/JS changes, skip
11
+ if [ -z "$MODIFIED_TS_FILES" ]; then
12
12
  exit 0
13
13
  fi
14
14
 
15
- # Check for TypeScript/JavaScript changes
16
- HAS_TS_CHANGES=$(echo "$MODIFIED_FILES" | grep -E '\.(ts|tsx|js|jsx)$' || true)
15
+ # Auto-fix lint issues on modified files only (fast)
16
+ echo "$MODIFIED_TS_FILES" | xargs npx eslint --fix --quiet 2>/dev/null || true
17
17
 
18
- # If only docs/config changed (no TS/JS), skip all checks
19
- if [ -z "$HAS_TS_CHANGES" ]; then
20
- exit 0
18
+ # Check for remaining lint errors (exit 2 to block and show to Claude)
19
+ LINT_OUTPUT=$(echo "$MODIFIED_TS_FILES" | xargs npx eslint --quiet 2>&1)
20
+ if [ -n "$LINT_OUTPUT" ]; then
21
+ echo "$LINT_OUTPUT" >&2
22
+ exit 2
21
23
  fi
22
24
 
23
- # Run lint and typecheck for TS/JS changes
24
- bun run lint:quiet 2>&1
25
- LINT_EXIT=$?
26
-
27
- bun run typecheck:quiet 2>&1
28
- TYPE_EXIT=$?
29
-
30
- # Check for anti-patterns in code files (not just docs/json)
31
- if git diff -- ':!.claude/' | grep -E '\b(fallback|deprecated|backward compatibility)\b' | grep -v '^-' | grep -qE '^\+'; then
32
- echo 'Anti-pattern detected (fallback/deprecated/backward compatibility). Review CLAUDE.md: never use fallback code, deprecated implementations, or backward compatibility shims.' >&2
25
+ # Run typecheck (exit 2 to block and show to Claude)
26
+ TYPE_OUTPUT=$(npx tsc --noEmit --pretty false 2>&1)
27
+ if [ -n "$TYPE_OUTPUT" ]; then
28
+ echo "$TYPE_OUTPUT" | head -20 >&2
33
29
  exit 2
34
30
  fi
35
31
 
36
- # Exit with error if lint or typecheck failed
37
- if [ $LINT_EXIT -ne 0 ] || [ $TYPE_EXIT -ne 0 ]; then
38
- exit 1
32
+ # Check for anti-patterns in code files
33
+ if git diff -- ':!.claude/' | grep -E '\b(fallback|deprecated|backward compatibility)\b' | grep -v '^-' | grep -qE '^\+'; then
34
+ echo 'Anti-pattern detected (fallback/deprecated/backward compatibility). Review CLAUDE.md.' >&2
35
+ exit 2
39
36
  fi
40
37
 
41
38
  exit 0
@@ -1,3 +1,9 @@
1
+ ---
2
+ name: atomic-commits
3
+ description: Create atomic commits grouped by logical features with README.md and CLAUDE.md awareness.
4
+ version: 1.0.0
5
+ ---
6
+
1
7
  # Atomic Commits with Documentation Awareness
2
8
 
3
9
  Guidelines for creating well-organized commits with README.md and CLAUDE.md awareness.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bluera-knowledge",
3
- "version": "0.9.25",
3
+ "version": "0.9.30",
4
4
  "description": "Clone repos, crawl docs, search locally. Fast, authoritative answers for AI coding agents without web lookups.",
5
5
  "author": {
6
6
  "name": "Bluera Inc",
package/.env.example ADDED
@@ -0,0 +1,4 @@
1
+ # Logging Configuration
2
+ # Valid values: trace, debug, info, warn, error, fatal
3
+ # Default: info
4
+ LOG_LEVEL=info
package/.husky/pre-push CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/bin/sh
2
+ set -o pipefail
2
3
 
3
4
  # Get list of files changed in commits being pushed (compared to remote)
4
5
  # If remote doesn't exist yet, compare to HEAD~1
@@ -22,8 +23,17 @@ if [ -z "$HAS_SRC_CHANGES" ] && [ -z "$HAS_TEST_CHANGES" ]; then
22
23
  exit 0
23
24
  fi
24
25
 
25
- # Run coverage tests only for source/test changes
26
+ # Run coverage tests - capture exit code before filtering output
26
27
  echo "🧪 Running coverage tests..."
27
- bun run test:coverage:quiet || exit 1
28
+ COVERAGE_OUTPUT=$(bun run test:coverage 2>&1)
29
+ COVERAGE_EXIT=$?
30
+
31
+ # Show filtered summary
32
+ echo "$COVERAGE_OUTPUT" | grep -E '(FAIL|Test Files|passed|Coverage|threshold|ERROR)' | tail -15
33
+
34
+ if [ $COVERAGE_EXIT -ne 0 ]; then
35
+ echo "❌ Coverage tests failed"
36
+ exit 1
37
+ fi
28
38
 
29
39
  echo "✅ Coverage tests passed"
package/.versionrc.json CHANGED
@@ -13,10 +13,6 @@
13
13
  {
14
14
  "filename": ".claude-plugin/plugin.json",
15
15
  "type": "json"
16
- },
17
- {
18
- "filename": "README.md",
19
- "updater": "scripts/readme-version-updater.cjs"
20
16
  }
21
17
  ],
22
18
  "tagPrefix": "v",
package/CHANGELOG.md CHANGED
@@ -2,6 +2,82 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
4
4
 
5
+ ## [0.9.30](https://github.com/blueraai/bluera-knowledge/compare/v0.9.26...v0.9.30) (2026-01-06)
6
+
7
+
8
+ ### Features
9
+
10
+ * **crawl:** auto-create web store if it doesn't exist ([98face4](https://github.com/blueraai/bluera-knowledge/commit/98face486df69f6d27be9ccca84ce83cbc788de7))
11
+ * **logging:** add comprehensive pino-based file logging with auto-rotation ([1f8bc84](https://github.com/blueraai/bluera-knowledge/commit/1f8bc84493b1237d11597aa23312f52d632dcfac))
12
+ * **search:** add path keyword boosting for file/folder search ([8771a19](https://github.com/blueraai/bluera-knowledge/commit/8771a19f42c469f7728118deda58de12a0b80db6))
13
+ * **search:** add URL keyword matching for improved web search ranking ([17f2e5e](https://github.com/blueraai/bluera-knowledge/commit/17f2e5e55f7d7ce79ac43ad06664cd5056468938))
14
+ * **search:** improve search quality for web content ([d2093af](https://github.com/blueraai/bluera-knowledge/commit/d2093af9d36089e3c5ea562be346bc9871477689))
15
+ * **search:** increase path/URL keyword boost for better source file ranking ([7f557d3](https://github.com/blueraai/bluera-knowledge/commit/7f557d3973db451b751caf925ad6dd306feed486)), closes [#2](https://github.com/blueraai/bluera-knowledge/issues/2) [#1](https://github.com/blueraai/bluera-knowledge/issues/1)
16
+ * **search:** show token usage in MCP search responses ([b4fce10](https://github.com/blueraai/bluera-knowledge/commit/b4fce10c6fce30c493a03da6ff36dd235ae6543d))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **commands:** resolve skill/command naming collision for /commit ([3b8f854](https://github.com/blueraai/bluera-knowledge/commit/3b8f854caaab9b3390dd66a5e88870ebbd770146))
22
+ * **hooks:** capture coverage exit code before filtering output ([e6c72ed](https://github.com/blueraai/bluera-knowledge/commit/e6c72ed9bd149c3291e50b4a4b6eef16e817cad7))
23
+ * **hooks:** exit 2 on lint/type errors to block and show to Claude ([8782e8e](https://github.com/blueraai/bluera-knowledge/commit/8782e8ed584298d8f96e08571fbaa1bb9a45c6d7))
24
+ * **hooks:** use npx tsc for PATH compatibility ([873b500](https://github.com/blueraai/bluera-knowledge/commit/873b5001e8e27ea676e0124fb1ec6570cef744b1))
25
+ * **skills:** add required YAML frontmatter to commit skill ([dbba76d](https://github.com/blueraai/bluera-knowledge/commit/dbba76d5ae01c9d9de2b15c75bfd2756071fb2cd))
26
+
27
+ ## [0.9.29](https://github.com/blueraai/bluera-knowledge/compare/v0.9.26...v0.9.29) (2026-01-06)
28
+
29
+
30
+ ### Features
31
+
32
+ * **crawl:** auto-create web store if it doesn't exist ([98face4](https://github.com/blueraai/bluera-knowledge/commit/98face486df69f6d27be9ccca84ce83cbc788de7))
33
+ * **logging:** add comprehensive pino-based file logging with auto-rotation ([1f8bc84](https://github.com/blueraai/bluera-knowledge/commit/1f8bc84493b1237d11597aa23312f52d632dcfac))
34
+ * **search:** add path keyword boosting for file/folder search ([8771a19](https://github.com/blueraai/bluera-knowledge/commit/8771a19f42c469f7728118deda58de12a0b80db6))
35
+ * **search:** add URL keyword matching for improved web search ranking ([17f2e5e](https://github.com/blueraai/bluera-knowledge/commit/17f2e5e55f7d7ce79ac43ad06664cd5056468938))
36
+ * **search:** improve search quality for web content ([d2093af](https://github.com/blueraai/bluera-knowledge/commit/d2093af9d36089e3c5ea562be346bc9871477689))
37
+ * **search:** increase path/URL keyword boost for better source file ranking ([7f557d3](https://github.com/blueraai/bluera-knowledge/commit/7f557d3973db451b751caf925ad6dd306feed486)), closes [#2](https://github.com/blueraai/bluera-knowledge/issues/2) [#1](https://github.com/blueraai/bluera-knowledge/issues/1)
38
+ * **search:** show token usage in MCP search responses ([b4fce10](https://github.com/blueraai/bluera-knowledge/commit/b4fce10c6fce30c493a03da6ff36dd235ae6543d))
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * **hooks:** exit 2 on lint/type errors to block and show to Claude ([8782e8e](https://github.com/blueraai/bluera-knowledge/commit/8782e8ed584298d8f96e08571fbaa1bb9a45c6d7))
44
+ * **hooks:** use npx tsc for PATH compatibility ([873b500](https://github.com/blueraai/bluera-knowledge/commit/873b5001e8e27ea676e0124fb1ec6570cef744b1))
45
+ * **skills:** add required YAML frontmatter to commit skill ([dbba76d](https://github.com/blueraai/bluera-knowledge/commit/dbba76d5ae01c9d9de2b15c75bfd2756071fb2cd))
46
+
47
+ ## [0.9.28](https://github.com/blueraai/bluera-knowledge/compare/v0.9.26...v0.9.28) (2026-01-06)
48
+
49
+
50
+ ### Features
51
+
52
+ * **logging:** add comprehensive pino-based file logging with auto-rotation ([1f8bc84](https://github.com/blueraai/bluera-knowledge/commit/1f8bc84493b1237d11597aa23312f52d632dcfac))
53
+ * **search:** add URL keyword matching for improved web search ranking ([17f2e5e](https://github.com/blueraai/bluera-knowledge/commit/17f2e5e55f7d7ce79ac43ad06664cd5056468938))
54
+ * **search:** improve search quality for web content ([d2093af](https://github.com/blueraai/bluera-knowledge/commit/d2093af9d36089e3c5ea562be346bc9871477689))
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * **skills:** add required YAML frontmatter to commit skill ([dbba76d](https://github.com/blueraai/bluera-knowledge/commit/dbba76d5ae01c9d9de2b15c75bfd2756071fb2cd))
60
+
61
+ ## [0.9.27](https://github.com/blueraai/bluera-knowledge/compare/v0.9.26...v0.9.27) (2026-01-06)
62
+
63
+
64
+ ### Features
65
+
66
+ * **logging:** add comprehensive pino-based file logging with auto-rotation ([1f8bc84](https://github.com/blueraai/bluera-knowledge/commit/1f8bc84493b1237d11597aa23312f52d632dcfac))
67
+ * **search:** improve search quality for web content ([d2093af](https://github.com/blueraai/bluera-knowledge/commit/d2093af9d36089e3c5ea562be346bc9871477689))
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * **skills:** add required YAML frontmatter to commit skill ([dbba76d](https://github.com/blueraai/bluera-knowledge/commit/dbba76d5ae01c9d9de2b15c75bfd2756071fb2cd))
73
+
74
+ ## [0.9.26](https://github.com/blueraai/bluera-knowledge/compare/v0.9.25...v0.9.26) (2026-01-06)
75
+
76
+
77
+ ### Bug Fixes
78
+
79
+ * **tests:** make spawn-worker tests more robust ([05e3127](https://github.com/blueraai/bluera-knowledge/commit/05e312748d250592df1ce23395006954907f5387))
80
+
5
81
  ## [0.9.25](https://github.com/blueraai/bluera-knowledge/compare/v0.9.23...v0.9.25) (2026-01-06)
6
82
 
7
83
 
package/README.md CHANGED
@@ -1,16 +1,24 @@
1
1
  # 🧠 Bluera Knowledge
2
2
 
3
3
  [![CI](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml/badge.svg)](https://github.com/blueraai/bluera-knowledge/actions/workflows/ci.yml)
4
- ![Version](https://img.shields.io/badge/version-0.9.25-blue)
4
+ ![NPM Version](https://img.shields.io/npm/v/bluera-knowledge)
5
+ ![NPM Downloads](https://img.shields.io/npm/dm/bluera-knowledge)
5
6
  ![License](https://img.shields.io/badge/license-MIT-green)
6
7
  ![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen)
7
8
  ![Python](https://img.shields.io/badge/python-%3E%3D3.8-blue)
8
9
 
9
10
  > 🚀 **Build a local knowledge base for your AI coding agent—dependency source code, crawled docs, and your own files, all instantly searchable.**
10
11
 
11
- **Use it as:**
12
- - 🔌 **Claude Code Plugin** — Slash commands + MCP tools + Skills for optimal Claude Code integration
13
- - 📦 **npm Package** Standalone CLI for any editor, CI/CD, or automation
12
+ **Two ways to use it:**
13
+
14
+ | | npm Package | Claude Code Plugin |
15
+ |--|-------------|-------------------|
16
+ | **Install** | `npm install -g bluera-knowledge` | `/plugin install bluera-knowledge@bluera` |
17
+ | **Interface** | CLI commands | Slash commands + MCP tools |
18
+ | **Works with** | Any AI tool, any editor | Claude Code specifically |
19
+ | **Best for** | CI/CD, automation, other editors | Native Claude Code integration |
20
+
21
+ Both provide the same core functionality: index repos, crawl docs, semantic search.
14
22
 
15
23
  Bluera Knowledge gives AI coding agents instant local access to authoritative context:
16
24
 
@@ -58,37 +66,38 @@ All searchable in milliseconds, no rate limits, fully offline.
58
66
 
59
67
  ## 📦 Installation
60
68
 
61
- ### As Claude Code Plugin
69
+ ### npm Package (CLI)
62
70
 
63
71
  ```bash
64
- # Add the Bluera marketplace (one-time setup)
65
- /plugin marketplace add blueraai/bluera-marketplace
72
+ # Global install (CLI available everywhere)
73
+ npm install -g bluera-knowledge
66
74
 
67
- # Install the plugin (or use /plugin to browse the UI)
68
- /plugin install bluera-knowledge@bluera
75
+ # Or project install
76
+ npm install --save-dev bluera-knowledge
69
77
  ```
70
78
 
71
- > [!NOTE]
72
- > **First launch may appear to hang** while the plugin installs Python dependencies (crawl4ai). This is normal—subsequent launches are instant.
79
+ Works with any AI coding tool, editor, CI/CD pipeline, or automation.
73
80
 
74
- ### As npm Package
81
+ ### Claude Code Plugin
75
82
 
76
83
  ```bash
77
- # Global install (CLI available everywhere)
78
- npm install -g bluera-knowledge
84
+ # Add the Bluera marketplace (one-time setup)
85
+ /plugin marketplace add blueraai/bluera-marketplace
79
86
 
80
- # Or project install
81
- npm install --save-dev bluera-knowledge
87
+ # Install the plugin (or use /plugin to browse the UI)
88
+ /plugin install bluera-knowledge@bluera
82
89
  ```
83
90
 
84
- > [!TIP]
85
- > Both installation methods provide the same core functionality. The plugin adds slash commands and Skills; the npm package provides a standalone CLI.
91
+ Adds slash commands, MCP tools, and Skills for optimal Claude Code integration.
92
+
93
+ > [!NOTE]
94
+ > **First launch may appear to hang** while the plugin installs Python dependencies (crawl4ai). This is normal—subsequent launches are instant.
86
95
 
87
96
  ---
88
97
 
89
98
  ## ✨ Why Bluera Knowledge?
90
99
 
91
- When you ask Claude Code "how do I handle errors in Express middleware?", it can:
100
+ When your AI coding assistant needs to answer "how do I handle errors in Express middleware?", it can:
92
101
 
93
102
  1. **Guess from training data** — might be outdated or wrong
94
103
  2. **Search the web** — slow, rate-limited, often returns blog posts instead of source
@@ -718,7 +727,7 @@ Removed:
718
727
 
719
728
  **⚙️ Requirements:**
720
729
  - 🐍 Python 3 with `crawl4ai` package installed
721
- - 📦 A web store must be created first
730
+ - 📦 Web store is auto-created if it doesn't exist
722
731
 
723
732
  **Examples:**
724
733
  ```bash
@@ -1082,6 +1091,32 @@ The plugin includes a Model Context Protocol server that exposes search tools. T
1082
1091
  }
1083
1092
  ```
1084
1093
 
1094
+ ### 🎯 Context Efficiency Strategy
1095
+
1096
+ **Why only 3 MCP tools?**
1097
+
1098
+ Every MCP tool exposed requires its full schema to be sent to Claude with each tool invocation. More tools = more tokens consumed before Claude can even respond.
1099
+
1100
+ **Design decision:** Consolidate from 10+ tools down to 3:
1101
+
1102
+ | Approach | Tool Count | Context Cost | Trade-off |
1103
+ |----------|------------|--------------|-----------|
1104
+ | Individual tools | 10+ | ~800+ tokens | Simple calls, high overhead |
1105
+ | **Consolidated (current)** | 3 | ~300 tokens | Minimal overhead, slightly longer commands |
1106
+
1107
+ **How it works:**
1108
+
1109
+ 1. **Native tools for common workflow** - `search` and `get_full_context` are the operations Claude uses most often, so they get dedicated tools with full schemas
1110
+
1111
+ 2. **Meta-tool for management** - The `execute` tool consolidates 8 store/job management commands into a single tool. Commands are discovered on-demand via `execute("commands")` or `execute("help", {command: "store:create"})`
1112
+
1113
+ 3. **Lazy documentation** - Command help isn't pre-sent with tool listings; it's discoverable when needed
1114
+
1115
+ **Result:** ~60% reduction in context overhead for MCP tool listings, without sacrificing functionality.
1116
+
1117
+ > [!TIP]
1118
+ > This pattern—consolidating infrequent operations into a meta-tool while keeping high-frequency operations native—is a general strategy for MCP context efficiency.
1119
+
1085
1120
  ### 🛠️ Available MCP Tools
1086
1121
 
1087
1122
  The plugin exposes 3 MCP tools optimized for minimal context overhead:
package/bun.lock CHANGED
@@ -23,6 +23,8 @@
23
23
  "hono": "^4.11.1",
24
24
  "node-addon-api": "^8.5.0",
25
25
  "ora": "^9.0.0",
26
+ "pino": "^9.6.0",
27
+ "pino-roll": "^1.3.0",
26
28
  "slurp-ai": "^1.0.6",
27
29
  "tree-sitter": "^0.25.0",
28
30
  "tree-sitter-go": "^0.23.1",
@@ -309,6 +311,8 @@
309
311
 
310
312
  "@oxc-resolver/binding-win32-x64-msvc": ["@oxc-resolver/binding-win32-x64-msvc@11.16.2", "", { "os": "win32", "cpu": "x64" }, "sha512-M7z0xjYQq1HdJk2DxTSLMvRMyBSI4wn4FXGcVQBsbAihgXevAReqwMdb593nmCK/OiFwSNcOaGIzUvzyzQ+95w=="],
311
313
 
314
+ "@pinojs/redact": ["@pinojs/redact@0.4.0", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],
315
+
312
316
  "@protobufjs/aspromise": ["@protobufjs/aspromise@1.1.2", "", {}, "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="],
313
317
 
314
318
  "@protobufjs/base64": ["@protobufjs/base64@1.1.2", "", {}, "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="],
@@ -491,6 +495,8 @@
491
495
 
492
496
  "asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
493
497
 
498
+ "atomic-sleep": ["atomic-sleep@1.0.0", "", {}, "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="],
499
+
494
500
  "axios": ["axios@1.13.2", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA=="],
495
501
 
496
502
  "b4a": ["b4a@1.7.3", "", { "peerDependencies": { "react-native-b4a": "*" }, "optionalPeers": ["react-native-b4a"] }, "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q=="],
@@ -1129,6 +1135,8 @@
1129
1135
 
1130
1136
  "obug": ["obug@2.1.1", "", {}, "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ=="],
1131
1137
 
1138
+ "on-exit-leak-free": ["on-exit-leak-free@2.1.2", "", {}, "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="],
1139
+
1132
1140
  "on-finished": ["on-finished@2.4.1", "", { "dependencies": { "ee-first": "1.1.1" } }, "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg=="],
1133
1141
 
1134
1142
  "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
@@ -1199,6 +1207,14 @@
1199
1207
 
1200
1208
  "pify": ["pify@2.3.0", "", {}, "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog=="],
1201
1209
 
1210
+ "pino": ["pino@9.14.0", "", { "dependencies": { "@pinojs/redact": "^0.4.0", "atomic-sleep": "^1.0.0", "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "^2.0.0", "pino-std-serializers": "^7.0.0", "process-warning": "^5.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^4.0.1", "thread-stream": "^3.0.0" }, "bin": { "pino": "bin.js" } }, "sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w=="],
1211
+
1212
+ "pino-abstract-transport": ["pino-abstract-transport@2.0.0", "", { "dependencies": { "split2": "^4.0.0" } }, "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw=="],
1213
+
1214
+ "pino-roll": ["pino-roll@1.3.0", "", { "dependencies": { "sonic-boom": "^3.8.0" } }, "sha512-bEjnbuSNjHY44LJH9MNqnrLnLWwWlDrK5AE9WMDR1bhQYiikzPgIla1TQ75+J0cx6Im2CYe5kMKRJzbRGVQjVQ=="],
1215
+
1216
+ "pino-std-serializers": ["pino-std-serializers@7.0.0", "", {}, "sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA=="],
1217
+
1202
1218
  "pirates": ["pirates@4.0.7", "", {}, "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA=="],
1203
1219
 
1204
1220
  "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="],
@@ -1217,6 +1233,8 @@
1217
1233
 
1218
1234
  "process-nextick-args": ["process-nextick-args@2.0.1", "", {}, "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="],
1219
1235
 
1236
+ "process-warning": ["process-warning@5.0.0", "", {}, "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA=="],
1237
+
1220
1238
  "progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="],
1221
1239
 
1222
1240
  "promise-retry": ["promise-retry@2.0.1", "", { "dependencies": { "err-code": "^2.0.2", "retry": "^0.12.0" } }, "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g=="],
@@ -1241,6 +1259,8 @@
1241
1259
 
1242
1260
  "queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
1243
1261
 
1262
+ "quick-format-unescaped": ["quick-format-unescaped@4.0.4", "", {}, "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg=="],
1263
+
1244
1264
  "quick-lru": ["quick-lru@4.0.1", "", {}, "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g=="],
1245
1265
 
1246
1266
  "range-parser": ["range-parser@1.2.1", "", {}, "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="],
@@ -1255,6 +1275,8 @@
1255
1275
 
1256
1276
  "readdirp": ["readdirp@5.0.0", "", {}, "sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ=="],
1257
1277
 
1278
+ "real-require": ["real-require@0.2.0", "", {}, "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg=="],
1279
+
1258
1280
  "redent": ["redent@3.0.0", "", { "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" } }, "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg=="],
1259
1281
 
1260
1282
  "reflect-metadata": ["reflect-metadata@0.2.2", "", {}, "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q=="],
@@ -1285,6 +1307,8 @@
1285
1307
 
1286
1308
  "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
1287
1309
 
1310
+ "safe-stable-stringify": ["safe-stable-stringify@2.5.0", "", {}, "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="],
1311
+
1288
1312
  "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="],
1289
1313
 
1290
1314
  "sanitize-html": ["sanitize-html@2.17.0", "", { "dependencies": { "deepmerge": "^4.2.2", "escape-string-regexp": "^4.0.0", "htmlparser2": "^8.0.0", "is-plain-object": "^5.0.0", "parse-srcset": "^1.0.2", "postcss": "^8.3.11" } }, "sha512-dLAADUSS8rBwhaevT12yCezvioCA+bmUTPH/u57xKPT8d++voeYE6HeluA/bPbQ15TwDBG2ii+QZIEmYx8VdxA=="],
@@ -1329,6 +1353,8 @@
1329
1353
 
1330
1354
  "socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
1331
1355
 
1356
+ "sonic-boom": ["sonic-boom@4.2.0", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww=="],
1357
+
1332
1358
  "source-map": ["source-map@0.7.6", "", {}, "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ=="],
1333
1359
 
1334
1360
  "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
@@ -1343,7 +1369,7 @@
1343
1369
 
1344
1370
  "split": ["split@1.0.1", "", { "dependencies": { "through": "2" } }, "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg=="],
1345
1371
 
1346
- "split2": ["split2@3.2.2", "", { "dependencies": { "readable-stream": "^3.0.0" } }, "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg=="],
1372
+ "split2": ["split2@4.2.0", "", {}, "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="],
1347
1373
 
1348
1374
  "sprintf-js": ["sprintf-js@1.1.3", "", {}, "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA=="],
1349
1375
 
@@ -1395,6 +1421,8 @@
1395
1421
 
1396
1422
  "thenify-all": ["thenify-all@1.6.0", "", { "dependencies": { "thenify": ">= 3.1.0 < 4" } }, "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA=="],
1397
1423
 
1424
+ "thread-stream": ["thread-stream@3.1.0", "", { "dependencies": { "real-require": "^0.2.0" } }, "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A=="],
1425
+
1398
1426
  "through": ["through@2.3.8", "", {}, "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="],
1399
1427
 
1400
1428
  "through2": ["through2@2.0.5", "", { "dependencies": { "readable-stream": "~2.3.6", "xtend": "~4.0.1" } }, "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ=="],
@@ -1557,6 +1585,8 @@
1557
1585
 
1558
1586
  "commit-and-tag-version/chalk": ["chalk@2.4.2", "", { "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ=="],
1559
1587
 
1588
+ "conventional-commits-parser/split2": ["split2@3.2.2", "", { "dependencies": { "readable-stream": "^3.0.0" } }, "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg=="],
1589
+
1560
1590
  "cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
1561
1591
 
1562
1592
  "decamelize-keys/map-obj": ["map-obj@1.0.1", "", {}, "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg=="],
@@ -1581,6 +1611,8 @@
1581
1611
 
1582
1612
  "get-pkg-repo/yargs": ["yargs@16.2.0", "", { "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw=="],
1583
1613
 
1614
+ "git-raw-commits/split2": ["split2@3.2.2", "", { "dependencies": { "readable-stream": "^3.0.0" } }, "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg=="],
1615
+
1584
1616
  "glob/minimatch": ["minimatch@10.1.1", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.0" } }, "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ=="],
1585
1617
 
1586
1618
  "handlebars/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
@@ -1617,6 +1649,8 @@
1617
1649
 
1618
1650
  "path-type/pify": ["pify@3.0.0", "", {}, "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg=="],
1619
1651
 
1652
+ "pino-roll/sonic-boom": ["sonic-boom@3.8.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg=="],
1653
+
1620
1654
  "proxy-agent/lru-cache": ["lru-cache@7.18.3", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
1621
1655
 
1622
1656
  "read-pkg/normalize-package-data": ["normalize-package-data@2.5.0", "", { "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA=="],
package/commands/crawl.md CHANGED
@@ -12,6 +12,8 @@ node ${CLAUDE_PLUGIN_ROOT}/dist/index.js crawl $ARGUMENTS
12
12
 
13
13
  The web pages will be crawled with intelligent link selection and optional natural language extraction, then indexed for searching.
14
14
 
15
+ **Note:** The web store is auto-created if it doesn't exist. No need to create the store first.
16
+
15
17
  ## Usage Examples
16
18
 
17
19
  **Intelligent crawl strategy:**