bluera-knowledge 0.11.14 → 0.11.16
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 +39 -0
- package/README.md +15 -0
- package/commands/test-plugin.md +148 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,45 @@
|
|
|
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.11.16](https://github.com/blueraai/bluera-knowledge/compare/v0.11.6...v0.11.16) (2026-01-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **commands:** add test-plugin command for comprehensive plugin testing ([c6eb5e7](https://github.com/blueraai/bluera-knowledge/commit/c6eb5e7762376810a9ff3e79f794f05ff0c77b97))
|
|
11
|
+
* **scripts:** add post-release npm validation script ([e4c29a0](https://github.com/blueraai/bluera-knowledge/commit/e4c29a0c83907de4bc293a69a58412629457fb22))
|
|
12
|
+
* **scripts:** add suggest, sync, serve, mcp tests to npm validation ([49d85da](https://github.com/blueraai/bluera-knowledge/commit/49d85dad1a89691060c12f152d644844baf6e6e6))
|
|
13
|
+
* **scripts:** log expected vs installed version in validation script ([c77d039](https://github.com/blueraai/bluera-knowledge/commit/c77d039b27a3ccf54d50006af161ac4dcfea7b21))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **cli:** plugin-api commands now respect global options ([d3cca02](https://github.com/blueraai/bluera-knowledge/commit/d3cca02ffc679ffc187b76c7682f3cc177eabdea))
|
|
19
|
+
* **commands:** move test-plugin to commands/ for plugin distribution ([0a3ff5f](https://github.com/blueraai/bluera-knowledge/commit/0a3ff5f91666db7efa213d5abd4c447fb07749fc))
|
|
20
|
+
* **plugin:** properly close services after command execution ([eeaf743](https://github.com/blueraai/bluera-knowledge/commit/eeaf743750be73fd9c7a9e72440b2fd0fb5a53fa))
|
|
21
|
+
* **scripts:** show real-time output in validation script ([8a4bdec](https://github.com/blueraai/bluera-knowledge/commit/8a4bdec8b63c504d34ba35bfe19da795f7f7fd07))
|
|
22
|
+
* **scripts:** use mktemp for temp directories in validation script ([3107861](https://github.com/blueraai/bluera-knowledge/commit/3107861bd7a966016fde2a121469dd84756f39be))
|
|
23
|
+
* **search:** add defaults for env vars so CLI works standalone ([b2d2ce5](https://github.com/blueraai/bluera-knowledge/commit/b2d2ce534e8cd2ba0fc0abdac505c912a1a76035))
|
|
24
|
+
|
|
25
|
+
## [0.11.15](https://github.com/blueraai/bluera-knowledge/compare/v0.11.6...v0.11.15) (2026-01-10)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Features
|
|
29
|
+
|
|
30
|
+
* **commands:** add test-plugin command for comprehensive plugin testing ([f50c47f](https://github.com/blueraai/bluera-knowledge/commit/f50c47fee74df8c1efbe23481f05dfa33c62911f))
|
|
31
|
+
* **scripts:** add post-release npm validation script ([e4c29a0](https://github.com/blueraai/bluera-knowledge/commit/e4c29a0c83907de4bc293a69a58412629457fb22))
|
|
32
|
+
* **scripts:** add suggest, sync, serve, mcp tests to npm validation ([49d85da](https://github.com/blueraai/bluera-knowledge/commit/49d85dad1a89691060c12f152d644844baf6e6e6))
|
|
33
|
+
* **scripts:** log expected vs installed version in validation script ([c77d039](https://github.com/blueraai/bluera-knowledge/commit/c77d039b27a3ccf54d50006af161ac4dcfea7b21))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **cli:** plugin-api commands now respect global options ([d3cca02](https://github.com/blueraai/bluera-knowledge/commit/d3cca02ffc679ffc187b76c7682f3cc177eabdea))
|
|
39
|
+
* **plugin:** properly close services after command execution ([eeaf743](https://github.com/blueraai/bluera-knowledge/commit/eeaf743750be73fd9c7a9e72440b2fd0fb5a53fa))
|
|
40
|
+
* **scripts:** show real-time output in validation script ([8a4bdec](https://github.com/blueraai/bluera-knowledge/commit/8a4bdec8b63c504d34ba35bfe19da795f7f7fd07))
|
|
41
|
+
* **scripts:** use mktemp for temp directories in validation script ([3107861](https://github.com/blueraai/bluera-knowledge/commit/3107861bd7a966016fde2a121469dd84756f39be))
|
|
42
|
+
* **search:** add defaults for env vars so CLI works standalone ([b2d2ce5](https://github.com/blueraai/bluera-knowledge/commit/b2d2ce534e8cd2ba0fc0abdac505c912a1a76035))
|
|
43
|
+
|
|
5
44
|
## [0.11.14](https://github.com/blueraai/bluera-knowledge/compare/v0.11.6...v0.11.14) (2026-01-10)
|
|
6
45
|
|
|
7
46
|
|
package/README.md
CHANGED
|
@@ -1661,6 +1661,21 @@ This script:
|
|
|
1661
1661
|
|
|
1662
1662
|
Use this to catch any packaging or runtime issues after npm publish.
|
|
1663
1663
|
|
|
1664
|
+
### 🧪 Plugin Self-Test
|
|
1665
|
+
|
|
1666
|
+
Test all plugin functionality from within Claude Code:
|
|
1667
|
+
|
|
1668
|
+
```
|
|
1669
|
+
/test-plugin
|
|
1670
|
+
```
|
|
1671
|
+
|
|
1672
|
+
This command runs 13 tests covering:
|
|
1673
|
+
- **MCP Tools**: execute (help, stores, create, info, index), search, get_full_context
|
|
1674
|
+
- **Slash Commands**: /stores, /search, /suggest
|
|
1675
|
+
- **Cleanup**: Store deletion, artifact removal, verification
|
|
1676
|
+
|
|
1677
|
+
The test creates temporary content, exercises all features, and cleans up automatically. Use this to verify the plugin is working correctly after installation or updates.
|
|
1678
|
+
|
|
1664
1679
|
### 🧪 Testing Locally
|
|
1665
1680
|
|
|
1666
1681
|
**Option 1: Development MCP Server (Recommended)**
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Test Plugin
|
|
2
|
+
|
|
3
|
+
Comprehensive test of all Bluera Knowledge plugin functionality (MCP tools + slash commands).
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
!`echo "=== BK Plugin Test ===" && ls -la .bluera/bluera-knowledge/ 2>/dev/null || echo "No BK data dir yet (will be created)"`
|
|
8
|
+
|
|
9
|
+
## Test Content Setup
|
|
10
|
+
|
|
11
|
+
First, create test content for indexing:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
mkdir -p .bluera/bluera-knowledge/test-content
|
|
15
|
+
cat > .bluera/bluera-knowledge/test-content/test-file.md << 'EOF'
|
|
16
|
+
# BK Plugin Test File
|
|
17
|
+
|
|
18
|
+
This file contains unique test content for validating the Bluera Knowledge plugin.
|
|
19
|
+
|
|
20
|
+
## Test Function
|
|
21
|
+
|
|
22
|
+
The `validateBKPlugin` function performs comprehensive testing of all plugin features.
|
|
23
|
+
It checks MCP connectivity, store operations, search functionality, and cleanup.
|
|
24
|
+
|
|
25
|
+
Keywords: bluera-knowledge-test, plugin-validation, mcp-test
|
|
26
|
+
EOF
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
Execute each test in order. Mark each as PASS or FAIL.
|
|
32
|
+
|
|
33
|
+
### Part 1: MCP Tools
|
|
34
|
+
|
|
35
|
+
1. **MCP Connection**: Call MCP tool `execute` with `{ command: "help" }`
|
|
36
|
+
- Expected: Returns list of available commands
|
|
37
|
+
- PASS if response contains "Available commands"
|
|
38
|
+
|
|
39
|
+
2. **List Stores (MCP)**: Call MCP tool `execute` with `{ command: "stores" }`
|
|
40
|
+
- Expected: Returns store list (may be empty initially)
|
|
41
|
+
- PASS if no error
|
|
42
|
+
|
|
43
|
+
3. **Create Store**: Call MCP tool `execute` with:
|
|
44
|
+
```json
|
|
45
|
+
{ "command": "store:create", "args": { "name": "bk-test-store", "type": "file", "path": ".bluera/bluera-knowledge/test-content" } }
|
|
46
|
+
```
|
|
47
|
+
- Expected: Store created successfully
|
|
48
|
+
- PASS if response indicates success
|
|
49
|
+
|
|
50
|
+
4. **Store Info**: Call MCP tool `execute` with:
|
|
51
|
+
```json
|
|
52
|
+
{ "command": "store:info", "args": { "store": "bk-test-store" } }
|
|
53
|
+
```
|
|
54
|
+
- Expected: Returns store metadata including name, type, path
|
|
55
|
+
- PASS if response contains store details
|
|
56
|
+
|
|
57
|
+
5. **Index Store**: Call MCP tool `execute` with:
|
|
58
|
+
```json
|
|
59
|
+
{ "command": "store:index", "args": { "store": "bk-test-store" } }
|
|
60
|
+
```
|
|
61
|
+
- Expected: Indexing completes (may take a few seconds)
|
|
62
|
+
- PASS if response indicates indexing succeeded
|
|
63
|
+
|
|
64
|
+
6. **Search (MCP)**: Call MCP tool `search` with:
|
|
65
|
+
```json
|
|
66
|
+
{ "query": "validateBKPlugin", "stores": ["bk-test-store"] }
|
|
67
|
+
```
|
|
68
|
+
- Expected: Returns results containing test content
|
|
69
|
+
- PASS if results array is non-empty and contains test file
|
|
70
|
+
|
|
71
|
+
7. **Get Full Context**: If search returned results, call MCP tool `get_full_context` with:
|
|
72
|
+
```json
|
|
73
|
+
{ "resultId": "<id from search result>" }
|
|
74
|
+
```
|
|
75
|
+
- Expected: Returns full file content
|
|
76
|
+
- PASS if response contains "BK Plugin Test File"
|
|
77
|
+
|
|
78
|
+
### Part 2: Slash Commands
|
|
79
|
+
|
|
80
|
+
8. **Stores Command**: Run `/bluera-knowledge:stores`
|
|
81
|
+
- Expected: Shows bk-test-store in output
|
|
82
|
+
- PASS if store is listed
|
|
83
|
+
|
|
84
|
+
9. **Search Command**: Run `/bluera-knowledge:search "bluera-knowledge-test"`
|
|
85
|
+
- Expected: Returns results from test store
|
|
86
|
+
- PASS if results are shown
|
|
87
|
+
|
|
88
|
+
10. **Suggest Command**: Run `/bluera-knowledge:suggest`
|
|
89
|
+
- Expected: Runs without error (may show no suggestions if no package.json)
|
|
90
|
+
- PASS if no error thrown
|
|
91
|
+
|
|
92
|
+
### Part 3: Cleanup
|
|
93
|
+
|
|
94
|
+
11. **Delete Store**: Call MCP tool `execute` with:
|
|
95
|
+
```json
|
|
96
|
+
{ "command": "store:delete", "args": { "store": "bk-test-store" } }
|
|
97
|
+
```
|
|
98
|
+
- Expected: Store deleted
|
|
99
|
+
- PASS if deletion succeeds
|
|
100
|
+
|
|
101
|
+
12. **Remove Test Content**: Run bash command:
|
|
102
|
+
```bash
|
|
103
|
+
rm -rf .bluera/bluera-knowledge/test-content
|
|
104
|
+
```
|
|
105
|
+
- Expected: Directory removed
|
|
106
|
+
- PASS if command succeeds
|
|
107
|
+
|
|
108
|
+
13. **Verify Cleanup**: Call MCP tool `execute` with `{ command: "stores" }`
|
|
109
|
+
- Expected: bk-test-store is NOT in the list
|
|
110
|
+
- PASS if test store is gone
|
|
111
|
+
|
|
112
|
+
## Output Format
|
|
113
|
+
|
|
114
|
+
After running all tests, report results in this format:
|
|
115
|
+
|
|
116
|
+
### Plugin Test Results
|
|
117
|
+
|
|
118
|
+
| # | Test | Status |
|
|
119
|
+
|---|------|--------|
|
|
120
|
+
| 1 | MCP Connection (help) | ? |
|
|
121
|
+
| 2 | List Stores (MCP) | ? |
|
|
122
|
+
| 3 | Create Store | ? |
|
|
123
|
+
| 4 | Store Info | ? |
|
|
124
|
+
| 5 | Index Store | ? |
|
|
125
|
+
| 6 | Search (MCP) | ? |
|
|
126
|
+
| 7 | Get Full Context | ? |
|
|
127
|
+
| 8 | /stores Command | ? |
|
|
128
|
+
| 9 | /search Command | ? |
|
|
129
|
+
| 10 | /suggest Command | ? |
|
|
130
|
+
| 11 | Delete Store | ? |
|
|
131
|
+
| 12 | Remove Test Content | ? |
|
|
132
|
+
| 13 | Verify Cleanup | ? |
|
|
133
|
+
|
|
134
|
+
**Result: X/13 tests passed**
|
|
135
|
+
|
|
136
|
+
## Error Recovery
|
|
137
|
+
|
|
138
|
+
If tests fail partway through, clean up manually:
|
|
139
|
+
|
|
140
|
+
1. Delete test store (if exists):
|
|
141
|
+
```
|
|
142
|
+
execute → { command: "store:delete", args: { store: "bk-test-store" } }
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
2. Remove test content directory:
|
|
146
|
+
```bash
|
|
147
|
+
rm -rf .bluera/bluera-knowledge/test-content
|
|
148
|
+
```
|