bluera-knowledge 0.9.31 → 0.9.34

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 (200) hide show
  1. package/.claude/commands/code-review.md +15 -0
  2. package/.claude/hooks/post-edit-check.sh +5 -3
  3. package/.claude/skills/atomic-commits/SKILL.md +3 -1
  4. package/.claude/skills/code-review-repo/skill.md +62 -0
  5. package/.husky/pre-commit +3 -2
  6. package/.prettierrc +9 -0
  7. package/.versionrc.json +1 -1
  8. package/CHANGELOG.md +35 -0
  9. package/CLAUDE.md +6 -0
  10. package/README.md +25 -13
  11. package/bun.lock +277 -33
  12. package/dist/{chunk-L2YVNC63.js → chunk-6FHWC36B.js} +9 -1
  13. package/dist/chunk-6FHWC36B.js.map +1 -0
  14. package/dist/{chunk-2SJHNRXD.js → chunk-DC7CGSGT.js} +288 -241
  15. package/dist/chunk-DC7CGSGT.js.map +1 -0
  16. package/dist/{chunk-RWSXP3PQ.js → chunk-WFNPNAAP.js} +3194 -3024
  17. package/dist/chunk-WFNPNAAP.js.map +1 -0
  18. package/dist/{chunk-OGEY66FZ.js → chunk-Z2KKVH45.js} +548 -482
  19. package/dist/chunk-Z2KKVH45.js.map +1 -0
  20. package/dist/index.js +871 -754
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp/server.js +3 -3
  23. package/dist/watch.service-BJV3TI3F.js +7 -0
  24. package/dist/workers/background-worker-cli.js +46 -45
  25. package/dist/workers/background-worker-cli.js.map +1 -1
  26. package/eslint.config.js +43 -1
  27. package/package.json +18 -11
  28. package/plugin.json +8 -0
  29. package/python/requirements.txt +1 -1
  30. package/src/analysis/ast-parser.test.ts +12 -11
  31. package/src/analysis/ast-parser.ts +28 -22
  32. package/src/analysis/code-graph.test.ts +52 -62
  33. package/src/analysis/code-graph.ts +9 -13
  34. package/src/analysis/dependency-usage-analyzer.test.ts +91 -271
  35. package/src/analysis/dependency-usage-analyzer.ts +52 -24
  36. package/src/analysis/go-ast-parser.test.ts +22 -22
  37. package/src/analysis/go-ast-parser.ts +18 -25
  38. package/src/analysis/parser-factory.test.ts +9 -9
  39. package/src/analysis/parser-factory.ts +3 -3
  40. package/src/analysis/python-ast-parser.test.ts +27 -27
  41. package/src/analysis/python-ast-parser.ts +2 -2
  42. package/src/analysis/repo-url-resolver.test.ts +82 -82
  43. package/src/analysis/rust-ast-parser.test.ts +19 -19
  44. package/src/analysis/rust-ast-parser.ts +17 -27
  45. package/src/analysis/tree-sitter-parser.test.ts +3 -3
  46. package/src/analysis/tree-sitter-parser.ts +10 -16
  47. package/src/cli/commands/crawl.test.ts +40 -24
  48. package/src/cli/commands/crawl.ts +186 -161
  49. package/src/cli/commands/index-cmd.test.ts +90 -90
  50. package/src/cli/commands/index-cmd.ts +52 -36
  51. package/src/cli/commands/mcp.test.ts +6 -6
  52. package/src/cli/commands/mcp.ts +2 -2
  53. package/src/cli/commands/plugin-api.test.ts +16 -18
  54. package/src/cli/commands/plugin-api.ts +9 -6
  55. package/src/cli/commands/search.test.ts +16 -7
  56. package/src/cli/commands/search.ts +124 -87
  57. package/src/cli/commands/serve.test.ts +67 -25
  58. package/src/cli/commands/serve.ts +18 -3
  59. package/src/cli/commands/setup.test.ts +176 -101
  60. package/src/cli/commands/setup.ts +140 -117
  61. package/src/cli/commands/store.test.ts +82 -53
  62. package/src/cli/commands/store.ts +56 -37
  63. package/src/cli/program.ts +2 -2
  64. package/src/crawl/article-converter.test.ts +4 -1
  65. package/src/crawl/article-converter.ts +46 -31
  66. package/src/crawl/bridge.test.ts +240 -132
  67. package/src/crawl/bridge.ts +87 -30
  68. package/src/crawl/claude-client.test.ts +124 -56
  69. package/src/crawl/claude-client.ts +7 -15
  70. package/src/crawl/intelligent-crawler.test.ts +65 -22
  71. package/src/crawl/intelligent-crawler.ts +86 -53
  72. package/src/crawl/markdown-utils.ts +1 -4
  73. package/src/db/embeddings.ts +4 -6
  74. package/src/db/lance.test.ts +63 -4
  75. package/src/db/lance.ts +31 -12
  76. package/src/index.ts +26 -17
  77. package/src/logging/index.ts +1 -5
  78. package/src/logging/logger.ts +3 -5
  79. package/src/logging/payload.test.ts +1 -1
  80. package/src/logging/payload.ts +3 -5
  81. package/src/mcp/commands/index.ts +2 -2
  82. package/src/mcp/commands/job.commands.ts +12 -18
  83. package/src/mcp/commands/meta.commands.ts +13 -13
  84. package/src/mcp/commands/registry.ts +5 -8
  85. package/src/mcp/commands/store.commands.ts +19 -19
  86. package/src/mcp/handlers/execute.handler.test.ts +10 -10
  87. package/src/mcp/handlers/execute.handler.ts +4 -5
  88. package/src/mcp/handlers/index.ts +10 -14
  89. package/src/mcp/handlers/job.handler.test.ts +10 -10
  90. package/src/mcp/handlers/job.handler.ts +22 -25
  91. package/src/mcp/handlers/search.handler.test.ts +36 -65
  92. package/src/mcp/handlers/search.handler.ts +135 -104
  93. package/src/mcp/handlers/store.handler.test.ts +41 -52
  94. package/src/mcp/handlers/store.handler.ts +108 -88
  95. package/src/mcp/schemas/index.test.ts +73 -68
  96. package/src/mcp/schemas/index.ts +18 -12
  97. package/src/mcp/server.test.ts +1 -1
  98. package/src/mcp/server.ts +59 -46
  99. package/src/plugin/commands.test.ts +230 -95
  100. package/src/plugin/commands.ts +24 -25
  101. package/src/plugin/dependency-analyzer.test.ts +52 -52
  102. package/src/plugin/dependency-analyzer.ts +85 -22
  103. package/src/plugin/git-clone.test.ts +24 -13
  104. package/src/plugin/git-clone.ts +3 -7
  105. package/src/server/app.test.ts +109 -109
  106. package/src/server/app.ts +32 -23
  107. package/src/server/index.test.ts +64 -66
  108. package/src/services/chunking.service.test.ts +32 -32
  109. package/src/services/chunking.service.ts +16 -9
  110. package/src/services/code-graph.service.test.ts +30 -36
  111. package/src/services/code-graph.service.ts +24 -10
  112. package/src/services/code-unit.service.test.ts +55 -11
  113. package/src/services/code-unit.service.ts +85 -11
  114. package/src/services/config.service.test.ts +37 -18
  115. package/src/services/config.service.ts +30 -7
  116. package/src/services/index.service.test.ts +49 -18
  117. package/src/services/index.service.ts +98 -48
  118. package/src/services/index.ts +8 -10
  119. package/src/services/job.service.test.ts +22 -22
  120. package/src/services/job.service.ts +18 -18
  121. package/src/services/project-root.service.test.ts +1 -3
  122. package/src/services/search.service.test.ts +248 -120
  123. package/src/services/search.service.ts +286 -156
  124. package/src/services/services.test.ts +36 -0
  125. package/src/services/snippet.service.test.ts +14 -6
  126. package/src/services/snippet.service.ts +7 -5
  127. package/src/services/store.service.test.ts +68 -29
  128. package/src/services/store.service.ts +41 -12
  129. package/src/services/watch.service.test.ts +34 -14
  130. package/src/services/watch.service.ts +11 -1
  131. package/src/types/brands.test.ts +3 -1
  132. package/src/types/index.ts +2 -13
  133. package/src/types/search.ts +10 -8
  134. package/src/utils/type-guards.test.ts +20 -15
  135. package/src/utils/type-guards.ts +1 -1
  136. package/src/workers/background-worker-cli.ts +2 -2
  137. package/src/workers/background-worker.test.ts +54 -40
  138. package/src/workers/background-worker.ts +76 -60
  139. package/src/workers/spawn-worker.test.ts +22 -10
  140. package/src/workers/spawn-worker.ts +6 -6
  141. package/tests/analysis/ast-parser.test.ts +3 -3
  142. package/tests/analysis/code-graph.test.ts +5 -5
  143. package/tests/fixtures/code-snippets/api/error-handling.ts +4 -15
  144. package/tests/fixtures/code-snippets/api/rest-controller.ts +3 -9
  145. package/tests/fixtures/code-snippets/auth/jwt-auth.ts +5 -21
  146. package/tests/fixtures/code-snippets/auth/oauth-flow.ts +4 -4
  147. package/tests/fixtures/code-snippets/database/repository-pattern.ts +11 -3
  148. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/aws-lambda/handler.ts +2 -2
  149. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-pages/handler.ts +1 -1
  150. package/tests/fixtures/corpus/oss-repos/hono/src/adapter/cloudflare-workers/serve-static.ts +2 -2
  151. package/tests/fixtures/corpus/oss-repos/hono/src/client/client.ts +2 -2
  152. package/tests/fixtures/corpus/oss-repos/hono/src/client/types.ts +22 -20
  153. package/tests/fixtures/corpus/oss-repos/hono/src/context.ts +13 -10
  154. package/tests/fixtures/corpus/oss-repos/hono/src/helper/accepts/accepts.ts +10 -7
  155. package/tests/fixtures/corpus/oss-repos/hono/src/helper/adapter/index.ts +2 -2
  156. package/tests/fixtures/corpus/oss-repos/hono/src/helper/css/index.ts +1 -1
  157. package/tests/fixtures/corpus/oss-repos/hono/src/helper/factory/index.ts +16 -16
  158. package/tests/fixtures/corpus/oss-repos/hono/src/helper/ssg/ssg.ts +2 -2
  159. package/tests/fixtures/corpus/oss-repos/hono/src/hono-base.ts +3 -3
  160. package/tests/fixtures/corpus/oss-repos/hono/src/hono.ts +1 -1
  161. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/css.ts +2 -2
  162. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/intrinsic-element/components.ts +1 -1
  163. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/dom/render.ts +7 -7
  164. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/hooks/index.ts +3 -3
  165. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/intrinsic-element/components.ts +1 -1
  166. package/tests/fixtures/corpus/oss-repos/hono/src/jsx/utils.ts +6 -6
  167. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/jsx-renderer/index.ts +3 -3
  168. package/tests/fixtures/corpus/oss-repos/hono/src/middleware/serve-static/index.ts +1 -1
  169. package/tests/fixtures/corpus/oss-repos/hono/src/preset/quick.ts +1 -1
  170. package/tests/fixtures/corpus/oss-repos/hono/src/preset/tiny.ts +1 -1
  171. package/tests/fixtures/corpus/oss-repos/hono/src/router/pattern-router/router.ts +2 -2
  172. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/node.ts +4 -4
  173. package/tests/fixtures/corpus/oss-repos/hono/src/router/reg-exp-router/router.ts +1 -1
  174. package/tests/fixtures/corpus/oss-repos/hono/src/router/trie-router/node.ts +1 -1
  175. package/tests/fixtures/corpus/oss-repos/hono/src/types.ts +166 -169
  176. package/tests/fixtures/corpus/oss-repos/hono/src/utils/body.ts +8 -8
  177. package/tests/fixtures/corpus/oss-repos/hono/src/utils/color.ts +3 -3
  178. package/tests/fixtures/corpus/oss-repos/hono/src/utils/cookie.ts +2 -2
  179. package/tests/fixtures/corpus/oss-repos/hono/src/utils/encode.ts +2 -2
  180. package/tests/fixtures/corpus/oss-repos/hono/src/utils/types.ts +30 -33
  181. package/tests/fixtures/corpus/oss-repos/hono/src/validator/validator.ts +2 -2
  182. package/tests/fixtures/test-server.ts +3 -2
  183. package/tests/helpers/performance-metrics.ts +8 -25
  184. package/tests/helpers/search-relevance.ts +14 -69
  185. package/tests/integration/cli-consistency.test.ts +5 -4
  186. package/tests/integration/e2e-workflow.test.ts +2 -0
  187. package/tests/integration/python-bridge.test.ts +13 -3
  188. package/tests/mcp/server.test.ts +1 -1
  189. package/tests/services/code-unit.service.test.ts +48 -0
  190. package/tests/services/job.service.test.ts +124 -0
  191. package/tests/services/search.progressive-context.test.ts +2 -2
  192. package/.claude-plugin/plugin.json +0 -13
  193. package/BUGS-FOUND.md +0 -71
  194. package/dist/chunk-2SJHNRXD.js.map +0 -1
  195. package/dist/chunk-L2YVNC63.js.map +0 -1
  196. package/dist/chunk-OGEY66FZ.js.map +0 -1
  197. package/dist/chunk-RWSXP3PQ.js.map +0 -1
  198. package/dist/watch.service-YAIKKDCF.js +0 -7
  199. package/skills/atomic-commits/SKILL.md +0 -77
  200. /package/dist/{watch.service-YAIKKDCF.js.map → watch.service-BJV3TI3F.js.map} +0 -0
@@ -0,0 +1,15 @@
1
+ # Code Review
2
+
3
+ Review the local codebase using multi-agent analysis. See @.claude/skills/code-review-repo/skill.md for process details.
4
+
5
+ ## Context
6
+
7
+ !`echo "---PROJECT---" && ls -la && echo "---CLAUDE.md FILES---" && find . -name CLAUDE.md 2>/dev/null`
8
+
9
+ ## Workflow
10
+
11
+ 1. **Gather context**: Find all CLAUDE.md files and source files
12
+ 2. **Multi-agent review**: Launch 5 parallel agents (CLAUDE.md compliance, bug scan, git history, PR comments, code comments)
13
+ 3. **Score issues**: Haiku agents score each issue 0-100 for confidence
14
+ 4. **Filter**: Only report issues with confidence >= 80
15
+ 5. **Output**: Print formatted results to console
@@ -29,9 +29,11 @@ if [ -n "$TYPE_OUTPUT" ]; then
29
29
  exit 2
30
30
  fi
31
31
 
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
32
+ # Check for anti-patterns in code files only (not docs/markdown)
33
+ ANTI_PATTERN=$(git diff -- '*.ts' '*.tsx' '*.js' '*.jsx' ':!dist/' | grep -E '\b(fallback|deprecated|backward compatibility|legacy)\b' | grep -v '^-' | grep -E '^\+' || true)
34
+ if [ -n "$ANTI_PATTERN" ]; then
35
+ echo 'Anti-pattern detected (fallback/deprecated/backward compatibility/legacy). Review CLAUDE.md.' >&2
36
+ echo "$ANTI_PATTERN" >&2
35
37
  exit 2
36
38
  fi
37
39
 
@@ -56,4 +56,6 @@ Identify logical features by grouping related files:
56
56
  <type>(<scope>): <description>
57
57
  ```
58
58
 
59
- Types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `style`
59
+ Types: `feat`, `fix`, `docs`, `chore`, `refactor`, `test`, `style`, `build`, `ci`, `perf`
60
+
61
+ **Note:** Commit messages are validated by commitlint (conventional commits format).
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: code-review-repo
3
+ description: Review local codebase for bugs and CLAUDE.md compliance using multi-agent analysis
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Local Code Review
8
+
9
+ Review the entire local codebase for bugs, issues, and CLAUDE.md compliance.
10
+
11
+ ## Process
12
+
13
+ 1. **Gather CLAUDE.md files**: Use a Haiku agent to find all CLAUDE.md files in the repository (root and subdirectories)
14
+
15
+ 2. **Identify source files**: Determine which files to review:
16
+ - Include: `.ts`, `.tsx`, `.js`, `.jsx`, `.py`, `.rs`, `.go` and similar source files
17
+ - Exclude: `node_modules/`, `dist/`, `.git/`, vendor directories, generated files
18
+
19
+ 3. **Multi-agent review**: Launch 5 parallel Sonnet agents to independently review the codebase. Each agent returns a list of issues with reasons:
20
+ - **Agent #1**: Audit for CLAUDE.md compliance. Check that code follows guidelines in all relevant CLAUDE.md files.
21
+ - **Agent #2**: Shallow bug scan. Look for obvious bugs, error handling issues, and logic errors. Focus on significant bugs, not nitpicks.
22
+ - **Agent #3**: Git history context. Use git blame and history to identify patterns, recent changes, and potential issues in light of historical context.
23
+ - **Agent #4**: Previous PR comments. Check closed PRs that touched these files for any feedback that might apply.
24
+ - **Agent #5**: Code comment compliance. Ensure code follows any guidance in TODO, FIXME, NOTE, or other code comments.
25
+
26
+ 4. **Confidence scoring**: For each issue found, launch a parallel Haiku agent to score confidence (0-100):
27
+ - **0**: False positive, doesn't hold up to scrutiny
28
+ - **25**: Might be real, but unverified. Stylistic issues not in CLAUDE.md
29
+ - **50**: Real but minor, rarely hit in practice
30
+ - **75**: Verified real issue, important, directly impacts functionality or mentioned in CLAUDE.md
31
+ - **100**: Definitely real, frequently hit, evidence confirms
32
+
33
+ 5. **Filter**: Only report issues with score >= 80
34
+
35
+ ## False Positive Examples
36
+
37
+ Avoid flagging:
38
+ - Issues that linters/typecheckers catch (imports, types, formatting)
39
+ - General quality issues unless in CLAUDE.md
40
+ - Code with lint-ignore comments for that specific issue
41
+ - Pre-existing issues unrelated to recent changes
42
+ - Pedantic nitpicks a senior engineer wouldn't mention
43
+
44
+ ## Output Format
45
+
46
+ ### Code review
47
+
48
+ Found N issues:
49
+
50
+ 1. Brief description (CLAUDE.md says "...")
51
+ `file/path.ts:42`
52
+
53
+ 2. Brief description (bug due to missing error handling)
54
+ `file/path.ts:88-95`
55
+
56
+ ---
57
+
58
+ Or if no issues:
59
+
60
+ ### Code review
61
+
62
+ No issues found. Checked for bugs and CLAUDE.md compliance.
package/.husky/pre-commit CHANGED
@@ -6,7 +6,7 @@ STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
6
6
  # Categorize changes
7
7
  HAS_SRC_CHANGES=$(echo "$STAGED_FILES" | grep -E '^src/.*\.(ts|js)$' || true)
8
8
  HAS_TEST_CHANGES=$(echo "$STAGED_FILES" | grep -E '\.(test|spec)\.(ts|js)$' || true)
9
- HAS_CONFIG_CHANGES=$(echo "$STAGED_FILES" | grep -E '^(package\.json|tsconfig\.json|tsup\.config\.ts|\.eslintrc|knip\.json)' || true)
9
+ HAS_CONFIG_CHANGES=$(echo "$STAGED_FILES" | grep -E '^(package\.json|tsconfig\.json|tsup\.config\.ts|vitest\.config\.ts|\.eslintrc|knip\.json|\.prettierrc|commitlint\.config\.js)' || true)
10
10
  HAS_DOC_CHANGES=$(echo "$STAGED_FILES" | grep -E '\.(md|txt)$|^LICENSE|^NOTICE' || true)
11
11
  HAS_DIST_CHANGES=$(echo "$STAGED_FILES" | grep -E '^dist/' || true)
12
12
 
@@ -25,8 +25,9 @@ fi
25
25
  # Run checks based on what changed
26
26
  echo "🔍 Running validation checks..."
27
27
 
28
- # Always run lint and typecheck for code/config changes
28
+ # Always run format check, lint and typecheck for code/config changes
29
29
  if [ -n "$HAS_SRC_CHANGES" ] || [ -n "$HAS_TEST_CHANGES" ] || [ -n "$HAS_CONFIG_CHANGES" ]; then
30
+ bun run format:check:quiet || exit 1
30
31
  bun run lint:quiet || exit 1
31
32
  bun run lint:deadcode:quiet || exit 1
32
33
  bun run typecheck:quiet || exit 1
package/.prettierrc ADDED
@@ -0,0 +1,9 @@
1
+ {
2
+ "semi": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "es5",
5
+ "tabWidth": 2,
6
+ "useTabs": false,
7
+ "printWidth": 100,
8
+ "endOfLine": "lf"
9
+ }
package/.versionrc.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "json"
12
12
  },
13
13
  {
14
- "filename": ".claude-plugin/plugin.json",
14
+ "filename": "plugin.json",
15
15
  "type": "json"
16
16
  }
17
17
  ],
package/CHANGELOG.md CHANGED
@@ -2,6 +2,41 @@
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.34](https://github.com/blueraai/bluera-knowledge/compare/v0.9.32...v0.9.34) (2026-01-08)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **bridge:** kill Python process before nullifying to prevent zombie ([393dab3](https://github.com/blueraai/bluera-knowledge/commit/393dab3e45c75fd87c9ecfc1ca92e67b14526e79))
11
+ * **bridge:** mock kill() emits exit event & attach rejection handlers before stop ([d73c6ca](https://github.com/blueraai/bluera-knowledge/commit/d73c6ca6d640c3d15bd82756cabcda832f9ae245))
12
+ * **bridge:** stop() now waits for process to actually exit ([a92de41](https://github.com/blueraai/bluera-knowledge/commit/a92de41c89318fc106f996568ed88505352d5159))
13
+ * **cli:** ensure destroyServices runs before process.exit ([22e4267](https://github.com/blueraai/bluera-knowledge/commit/22e4267b7b9f698de3985a89b9c2b10759cfd49c))
14
+ * **code-unit:** brace counting now handles strings and comments ([1e857bb](https://github.com/blueraai/bluera-knowledge/commit/1e857bb297f357b97a6c067950e62495b3c8fc99))
15
+ * **code-unit:** support complex return types in signature extraction ([3bd2467](https://github.com/blueraai/bluera-knowledge/commit/3bd24675a67e73cc74a0c718f4b5a9e86cd826fb))
16
+ * **job:** validate PID before process.kill to prevent process group kill ([67c540f](https://github.com/blueraai/bluera-knowledge/commit/67c540fef6f2c55c5dca2c824104a91fe19aeff1))
17
+ * **services:** fail fast on corrupted config/registry files ([030f63c](https://github.com/blueraai/bluera-knowledge/commit/030f63c10b0a30bddcd8e9b27b291ab0f53263f1))
18
+ * **tests:** increase timeout for flaky store delete test ([738fb49](https://github.com/blueraai/bluera-knowledge/commit/738fb4975653703d800dee802730dedfdf9e85ba))
19
+ * **watch:** clear pending timeouts on unwatch to prevent timer leak ([4dcafc1](https://github.com/blueraai/bluera-knowledge/commit/4dcafc14417442f6eeed0257cf185e04ae9de12b))
20
+ * **worker:** prevent division by zero and improve cancellation handling ([b7b40ab](https://github.com/blueraai/bluera-knowledge/commit/b7b40ab950b7ad0fbbe84af243be3138b1072a72))
21
+
22
+ ## [0.9.33](https://github.com/blueraai/bluera-knowledge/compare/v0.9.32...v0.9.33) (2026-01-08)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * **bridge:** kill Python process before nullifying to prevent zombie ([393dab3](https://github.com/blueraai/bluera-knowledge/commit/393dab3e45c75fd87c9ecfc1ca92e67b14526e79))
28
+ * **bridge:** mock kill() emits exit event & attach rejection handlers before stop ([d73c6ca](https://github.com/blueraai/bluera-knowledge/commit/d73c6ca6d640c3d15bd82756cabcda832f9ae245))
29
+ * **bridge:** stop() now waits for process to actually exit ([a92de41](https://github.com/blueraai/bluera-knowledge/commit/a92de41c89318fc106f996568ed88505352d5159))
30
+ * **cli:** ensure destroyServices runs before process.exit ([22e4267](https://github.com/blueraai/bluera-knowledge/commit/22e4267b7b9f698de3985a89b9c2b10759cfd49c))
31
+ * **code-unit:** brace counting now handles strings and comments ([1e857bb](https://github.com/blueraai/bluera-knowledge/commit/1e857bb297f357b97a6c067950e62495b3c8fc99))
32
+ * **code-unit:** support complex return types in signature extraction ([3bd2467](https://github.com/blueraai/bluera-knowledge/commit/3bd24675a67e73cc74a0c718f4b5a9e86cd826fb))
33
+ * **job:** validate PID before process.kill to prevent process group kill ([67c540f](https://github.com/blueraai/bluera-knowledge/commit/67c540fef6f2c55c5dca2c824104a91fe19aeff1))
34
+ * **services:** fail fast on corrupted config/registry files ([030f63c](https://github.com/blueraai/bluera-knowledge/commit/030f63c10b0a30bddcd8e9b27b291ab0f53263f1))
35
+ * **watch:** clear pending timeouts on unwatch to prevent timer leak ([4dcafc1](https://github.com/blueraai/bluera-knowledge/commit/4dcafc14417442f6eeed0257cf185e04ae9de12b))
36
+ * **worker:** prevent division by zero and improve cancellation handling ([b7b40ab](https://github.com/blueraai/bluera-knowledge/commit/b7b40ab950b7ad0fbbe84af243be3138b1072a72))
37
+
38
+ ## [0.9.32](https://github.com/blueraai/bluera-knowledge/compare/v0.9.31...v0.9.32) (2026-01-06)
39
+
5
40
  ## [0.9.31](https://github.com/blueraai/bluera-knowledge/compare/v0.9.30...v0.9.31) (2026-01-06)
6
41
 
7
42
 
package/CLAUDE.md CHANGED
@@ -22,6 +22,12 @@ This file is YOUR (Claude's) project memory. It is NOT user documentation. It is
22
22
 
23
23
  ---
24
24
 
25
+ ## Package Manager
26
+
27
+ **Use `bun`** - not npm or yarn. All scripts should be run with `bun run <script>`.
28
+
29
+ ---
30
+
25
31
  ## Scripts
26
32
 
27
33
  **Development:**
package/README.md CHANGED
@@ -1365,24 +1365,39 @@ The validation is intelligent - it only runs checks for TypeScript/JavaScript fi
1365
1365
 
1366
1366
  > **Note:** The `.claude/settings.local.json` file is gitignored (local to your machine). The example file is checked in for reference.
1367
1367
 
1368
- ### 🔌 MCP Server
1368
+ ### 🐕 Dogfooding
1369
1369
 
1370
- **`mcp.plugin.json`** (Plugin distribution)
1371
- - Located at plugin root, referenced from `plugin.json`
1372
- - Uses `${CLAUDE_PLUGIN_ROOT}` and points to compiled `dist/mcp/server.js`
1373
- - Only loaded when directory is loaded as a plugin (no project/plugin conflict)
1374
- - Committed to git and distributed with the plugin
1370
+ Develop this plugin while using it with Claude Code:
1375
1371
 
1376
- **For local development/dogfooding:**
1372
+ ```bash
1373
+ claude --plugin-dir /path/to/bluera-knowledge
1374
+ ```
1375
+
1376
+ This loads the plugin directly from source. Changes take effect on Claude Code restart (no reinstall needed).
1377
+
1378
+ | What to test | Approach |
1379
+ |--------------|----------|
1380
+ | **Commands** (`/search`, `/add-repo`) | `--plugin-dir` (changes need restart) |
1381
+ | **Hooks** (job status, dependencies) | `--plugin-dir` (changes need restart) |
1382
+ | **MCP tools** (compiled) | `--plugin-dir` (run `bun run build` first) |
1383
+ | **MCP tools** (live TypeScript) | `~/.claude.json` dev server (see below) |
1384
+
1385
+ ### 🔌 MCP Server Development
1386
+
1387
+ **Production mode** (`mcp.plugin.json`):
1388
+ - Uses `${CLAUDE_PLUGIN_ROOT}/dist/mcp/server.js` (compiled)
1389
+ - Distributed with plugin, no extra setup needed
1390
+
1391
+ **Development mode** (live TypeScript):
1377
1392
 
1378
- To enable live development without rebuilding, add a user-level MCP server config to `~/.claude.json`:
1393
+ For instant feedback when editing MCP server code, add a dev server to `~/.claude.json`:
1379
1394
 
1380
1395
  ```json
1381
1396
  {
1382
1397
  "mcpServers": {
1383
1398
  "bluera-knowledge-dev": {
1384
1399
  "command": "npx",
1385
- "args": ["tsx", "/Users/yourname/repos/bluera-knowledge/src/mcp/server.ts"],
1400
+ "args": ["tsx", "/path/to/bluera-knowledge/src/mcp/server.ts"],
1386
1401
  "env": {
1387
1402
  "PWD": "${PWD}",
1388
1403
  "DATA_DIR": "${PWD}/.bluera/bluera-knowledge/data",
@@ -1393,10 +1408,7 @@ To enable live development without rebuilding, add a user-level MCP server confi
1393
1408
  }
1394
1409
  ```
1395
1410
 
1396
- Replace the path with your actual repo location. This creates a separate `bluera-knowledge-dev` MCP server that:
1397
- - Runs the source TypeScript directly via `tsx`
1398
- - Updates immediately when you modify MCP server code
1399
- - Doesn't interfere with the production plugin version
1411
+ This creates a separate `bluera-knowledge-dev` MCP server that runs source TypeScript directly via `tsx` - no rebuild needed for MCP changes
1400
1412
 
1401
1413
  ### 📜 Commands
1402
1414