bluera-knowledge 0.12.5 → 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 +15 -0
- package/commands/test-plugin.md +61 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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
|
+
|
|
5
20
|
## [0.12.5](https://github.com/blueraai/bluera-knowledge/compare/v0.11.21...v0.12.5) (2026-01-15)
|
|
6
21
|
|
|
7
22
|
|
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
|
|