bluera-knowledge 0.12.4 → 0.12.6
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +2 -1
- package/commands/test-plugin.md +61 -9
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,36 @@
|
|
|
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.12.6](https://github.com/blueraai/bluera-knowledge/compare/v0.11.21...v0.12.6) (2026-01-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **hooks:** add PreToolUse hooks for BK suggestions ([23d3fa4](https://github.com/blueraai/bluera-knowledge/commit/23d3fa493dd16427d6bda3ea80064622c6244bba))
|
|
11
|
+
* **hooks:** add skill auto-activation system ([2b4e96b](https://github.com/blueraai/bluera-knowledge/commit/2b4e96bd29f28df63377cdaacab922d4f4321a8f))
|
|
12
|
+
* **hooks:** improve skill activation with forced evaluation pattern ([f044077](https://github.com/blueraai/bluera-knowledge/commit/f044077d260b78b55a00ebf735b68a2d933f34a7)), closes [#15345](https://github.com/blueraai/bluera-knowledge/issues/15345)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **hooks:** use JSON output for PreToolUse hook context injection ([a73977e](https://github.com/blueraai/bluera-knowledge/commit/a73977e0f8f690d43b9d7c987300522dd501fe38))
|
|
18
|
+
* **tests:** stabilize watch service tests in coverage mode ([fdf6c3a](https://github.com/blueraai/bluera-knowledge/commit/fdf6c3a478adff9e4746b54a9519184ca280f344))
|
|
19
|
+
|
|
20
|
+
## [0.12.5](https://github.com/blueraai/bluera-knowledge/compare/v0.11.21...v0.12.5) (2026-01-15)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **hooks:** add PreToolUse hooks for BK suggestions ([23d3fa4](https://github.com/blueraai/bluera-knowledge/commit/23d3fa493dd16427d6bda3ea80064622c6244bba))
|
|
26
|
+
* **hooks:** add skill auto-activation system ([2b4e96b](https://github.com/blueraai/bluera-knowledge/commit/2b4e96bd29f28df63377cdaacab922d4f4321a8f))
|
|
27
|
+
* **hooks:** improve skill activation with forced evaluation pattern ([f044077](https://github.com/blueraai/bluera-knowledge/commit/f044077d260b78b55a00ebf735b68a2d933f34a7)), closes [#15345](https://github.com/blueraai/bluera-knowledge/issues/15345)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* **hooks:** use JSON output for PreToolUse hook context injection ([a73977e](https://github.com/blueraai/bluera-knowledge/commit/a73977e0f8f690d43b9d7c987300522dd501fe38))
|
|
33
|
+
* **tests:** stabilize watch service tests in coverage mode ([fdf6c3a](https://github.com/blueraai/bluera-knowledge/commit/fdf6c3a478adff9e4746b54a9519184ca280f344))
|
|
34
|
+
|
|
5
35
|
## [0.12.4](https://github.com/blueraai/bluera-knowledge/compare/v0.11.21...v0.12.4) (2026-01-15)
|
|
6
36
|
|
|
7
37
|
|
package/README.md
CHANGED
|
@@ -1657,7 +1657,8 @@ This creates a separate `bluera-knowledge-dev` MCP server that runs source TypeS
|
|
|
1657
1657
|
| `bun run test:coverage:verbose` | 📢 Coverage (full output) | Reviewing detailed coverage |
|
|
1658
1658
|
| `bun run build:verbose` | 📢 Build (full output) | Debugging build issues |
|
|
1659
1659
|
| `bun run gh:status` | 📋 List recent GitHub Actions runs | Monitor CI/CD status |
|
|
1660
|
-
| `bun run gh:watch` | 👁️ Watch latest workflow
|
|
1660
|
+
| `bun run gh:watch` | 👁️ Watch latest workflow (quiet, shows result + failures) | Wait for CI completion |
|
|
1661
|
+
| `bun run gh:watch:verbose` | 📢 Watch with live status updates | Debugging CI issues |
|
|
1661
1662
|
| `bun run gh:releases` | 🏷️ List recent GitHub releases | Check release history |
|
|
1662
1663
|
|
|
1663
1664
|
### 🔄 Automatic Build & Dist Commit
|
package/commands/test-plugin.md
CHANGED
|
@@ -99,23 +99,69 @@ Execute each test in order. Mark each as PASS or FAIL.
|
|
|
99
99
|
- Expected: Runs without error (may show no suggestions if no package.json)
|
|
100
100
|
- PASS if no error thrown
|
|
101
101
|
|
|
102
|
-
### Part 3:
|
|
102
|
+
### Part 3: Hook Tests
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
These tests verify that plugin hooks work correctly by running hook scripts directly with simulated input.
|
|
105
|
+
|
|
106
|
+
11. **Hook Registration**: Verify hooks.json has expected structure
|
|
107
|
+
```bash
|
|
108
|
+
cat .claude-plugin/hooks/hooks.json 2>/dev/null || cat hooks/hooks.json | jq -e '.hooks.PostToolUse and .hooks.UserPromptSubmit and .hooks.SessionStart'
|
|
109
|
+
```
|
|
110
|
+
- Expected: Returns `true` (all hook types registered)
|
|
111
|
+
- PASS if command succeeds with truthy output
|
|
112
|
+
|
|
113
|
+
12. **PostToolUse Hook - Library Detection**: Run hook with simulated node_modules read
|
|
114
|
+
```bash
|
|
115
|
+
echo '{"tool_name": "Read", "tool_input": {"file_path": "/project/node_modules/express/index.js"}}' | python3 hooks/posttooluse-bk-reminder.py
|
|
116
|
+
```
|
|
117
|
+
- Expected: JSON output with `hookSpecificOutput.additionalContext` containing "BLUERA-KNOWLEDGE REMINDER"
|
|
118
|
+
- PASS if output contains reminder text and library name "express"
|
|
119
|
+
|
|
120
|
+
13. **PostToolUse Hook - Non-Library (Silent)**: Run hook with non-dependency path
|
|
121
|
+
```bash
|
|
122
|
+
echo '{"tool_name": "Read", "tool_input": {"file_path": "/project/src/index.ts"}}' | python3 hooks/posttooluse-bk-reminder.py
|
|
123
|
+
```
|
|
124
|
+
- Expected: Empty output (no reminder for non-library paths)
|
|
125
|
+
- PASS if output is empty
|
|
126
|
+
|
|
127
|
+
14. **Skill Activation Hook - Matching Prompt**: Run hook with library-related question
|
|
128
|
+
```bash
|
|
129
|
+
export CLAUDE_PLUGIN_ROOT="$(pwd)" && echo '{"prompt": "why does the express package throw this error?"}' | python3 hooks/skill-activation.py
|
|
130
|
+
```
|
|
131
|
+
- Expected: JSON output with skill activation reminder for "knowledge-search"
|
|
132
|
+
- PASS if output contains "MANDATORY EVALUATION" and "knowledge-search"
|
|
133
|
+
|
|
134
|
+
15. **Skill Activation Hook - Excluded Prompt**: Run hook with BK command (excluded)
|
|
135
|
+
```bash
|
|
136
|
+
export CLAUDE_PLUGIN_ROOT="$(pwd)" && echo '{"prompt": "/bluera-knowledge:search express"}' | python3 hooks/skill-activation.py
|
|
137
|
+
```
|
|
138
|
+
- Expected: Empty output (global exclusion matches)
|
|
139
|
+
- PASS if output is empty
|
|
140
|
+
|
|
141
|
+
16. **Skill Rules File**: Verify skill-rules.json structure
|
|
142
|
+
```bash
|
|
143
|
+
jq -e '(.skills | length) > 0 and (.globalExclusions | length) > 0' hooks/skill-rules.json
|
|
144
|
+
```
|
|
145
|
+
- Expected: Returns `true` (valid structure with skills and exclusions)
|
|
146
|
+
- PASS if command succeeds
|
|
147
|
+
|
|
148
|
+
### Part 4: Cleanup
|
|
149
|
+
|
|
150
|
+
17. **Delete Store**: Call MCP tool `execute` with:
|
|
105
151
|
```json
|
|
106
152
|
{ "command": "store:delete", "args": { "store": "bk-test-store" } }
|
|
107
153
|
```
|
|
108
154
|
- Expected: Store deleted
|
|
109
155
|
- PASS if deletion succeeds
|
|
110
156
|
|
|
111
|
-
|
|
157
|
+
18. **Remove Test Content**: Run bash command:
|
|
112
158
|
```bash
|
|
113
159
|
rm -rf .bluera/bluera-knowledge/test-content
|
|
114
160
|
```
|
|
115
161
|
- Expected: Directory removed
|
|
116
162
|
- PASS if command succeeds
|
|
117
163
|
|
|
118
|
-
|
|
164
|
+
19. **Verify Cleanup**: Call MCP tool `execute` with `{ command: "stores" }`
|
|
119
165
|
- Expected: bk-test-store is NOT in the list
|
|
120
166
|
- PASS if test store is gone
|
|
121
167
|
|
|
@@ -137,11 +183,17 @@ After running all tests, report results in this format:
|
|
|
137
183
|
| 8 | /stores Command | ? |
|
|
138
184
|
| 9 | /search Command | ? |
|
|
139
185
|
| 10 | /suggest Command | ? |
|
|
140
|
-
| 11 |
|
|
141
|
-
| 12 |
|
|
142
|
-
| 13 |
|
|
143
|
-
|
|
144
|
-
|
|
186
|
+
| 11 | Hook Registration | ? |
|
|
187
|
+
| 12 | PostToolUse - Library Detection | ? |
|
|
188
|
+
| 13 | PostToolUse - Non-Library (Silent) | ? |
|
|
189
|
+
| 14 | Skill Activation - Matching | ? |
|
|
190
|
+
| 15 | Skill Activation - Excluded | ? |
|
|
191
|
+
| 16 | Skill Rules File | ? |
|
|
192
|
+
| 17 | Delete Store | ? |
|
|
193
|
+
| 18 | Remove Test Content | ? |
|
|
194
|
+
| 19 | Verify Cleanup | ? |
|
|
195
|
+
|
|
196
|
+
**Result: X/19 tests passed**
|
|
145
197
|
|
|
146
198
|
## Error Recovery
|
|
147
199
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bluera-knowledge",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "CLI tool for managing knowledge stores with semantic search",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
"release:major": "commit-and-tag-version --release-as major && git push --follow-tags",
|
|
43
43
|
"validate:npm": "./scripts/validate-npm-release.sh",
|
|
44
44
|
"gh:status": "gh run list --limit 5",
|
|
45
|
-
"gh:watch": "gh run list --limit 1 --json databaseId
|
|
45
|
+
"gh:watch": "bash -c 'RUN_ID=$(gh run list --limit 1 --json databaseId -q \".[0].databaseId\") && echo \"Watching run $RUN_ID...\" && gh run watch $RUN_ID --exit-status >/dev/null 2>&1 && echo \"✓ Workflow passed\" || { echo \"✗ Workflow failed:\"; gh run view $RUN_ID --log-failed 2>&1 | head -50; }'",
|
|
46
|
+
"gh:watch:verbose": "gh run list --limit 1 --json databaseId --jq '.[0].databaseId' | xargs -I {} gh run watch {} --exit-status",
|
|
46
47
|
"gh:releases": "gh release list --limit 5"
|
|
47
48
|
},
|
|
48
49
|
"keywords": [
|