bluera-knowledge 0.11.6 โ 0.11.8
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/settings.local.json.example +5 -0
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +27 -0
- package/README.md +17 -1
- package/dist/index.js +63 -17
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/scripts/validate-npm-release.sh +209 -0
- package/src/cli/commands/plugin-api.test.ts +105 -43
- package/src/cli/commands/plugin-api.ts +42 -8
- package/src/plugin/commands.ts +42 -17
- package/src/scripts/validate-npm-release.test.ts +55 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
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.8](https://github.com/blueraai/bluera-knowledge/compare/v0.11.6...v0.11.8) (2026-01-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **scripts:** add post-release npm validation script ([e4c29a0](https://github.com/blueraai/bluera-knowledge/commit/e4c29a0c83907de4bc293a69a58412629457fb22))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **cli:** plugin-api commands now respect global options ([d3cca02](https://github.com/blueraai/bluera-knowledge/commit/d3cca02ffc679ffc187b76c7682f3cc177eabdea))
|
|
16
|
+
* **scripts:** show real-time output in validation script ([8a4bdec](https://github.com/blueraai/bluera-knowledge/commit/8a4bdec8b63c504d34ba35bfe19da795f7f7fd07))
|
|
17
|
+
* **scripts:** use mktemp for temp directories in validation script ([3107861](https://github.com/blueraai/bluera-knowledge/commit/3107861bd7a966016fde2a121469dd84756f39be))
|
|
18
|
+
|
|
19
|
+
## [0.11.7](https://github.com/blueraai/bluera-knowledge/compare/v0.11.6...v0.11.7) (2026-01-10)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* **scripts:** add post-release npm validation script ([e4c29a0](https://github.com/blueraai/bluera-knowledge/commit/e4c29a0c83907de4bc293a69a58412629457fb22))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **cli:** plugin-api commands now respect global options ([d3cca02](https://github.com/blueraai/bluera-knowledge/commit/d3cca02ffc679ffc187b76c7682f3cc177eabdea))
|
|
30
|
+
* **scripts:** use mktemp for temp directories in validation script ([3107861](https://github.com/blueraai/bluera-knowledge/commit/3107861bd7a966016fde2a121469dd84756f39be))
|
|
31
|
+
|
|
5
32
|
## [0.11.6](https://github.com/blueraai/bluera-knowledge/compare/v0.10.0...v0.11.6) (2026-01-10)
|
|
6
33
|
|
|
7
34
|
|
package/README.md
CHANGED
|
@@ -1601,6 +1601,22 @@ Note: The version command runs full quality checks (format, lint, deadcode, type
|
|
|
1601
1601
|
|
|
1602
1602
|
> ๐ก **That's it!** No manual tagging needed. Just push to `main` and the release happens automatically when CI passes.
|
|
1603
1603
|
|
|
1604
|
+
### ๐ Post-Release Validation
|
|
1605
|
+
|
|
1606
|
+
After a release, validate the npm package works correctly:
|
|
1607
|
+
|
|
1608
|
+
```bash
|
|
1609
|
+
bun run validate:npm
|
|
1610
|
+
```
|
|
1611
|
+
|
|
1612
|
+
This script:
|
|
1613
|
+
- Installs the latest `bluera-knowledge` from npm globally
|
|
1614
|
+
- Exercises all CLI commands (stores, add-folder, search, index, delete)
|
|
1615
|
+
- Writes detailed logs to `logs/validation/npm-validation-*.log`
|
|
1616
|
+
- Returns exit code 0 on success, 1 on failure
|
|
1617
|
+
|
|
1618
|
+
Use this to catch any packaging or runtime issues after npm publish.
|
|
1619
|
+
|
|
1604
1620
|
### ๐งช Testing Locally
|
|
1605
1621
|
|
|
1606
1622
|
**Option 1: Development MCP Server (Recommended)**
|
|
@@ -1619,7 +1635,7 @@ cd /path/to/bluera-knowledge
|
|
|
1619
1635
|
claude --plugin-dir .
|
|
1620
1636
|
```
|
|
1621
1637
|
|
|
1622
|
-
The MCP config in `
|
|
1638
|
+
The MCP config in `plugin.json` is only loaded when the directory is loaded as a plugin (via `--plugin-dir` or marketplace install), so there's no conflict with project-level MCP config.
|
|
1623
1639
|
|
|
1624
1640
|
**Option 3: CLI Tool Testing**
|
|
1625
1641
|
|
package/dist/index.js
CHANGED
|
@@ -773,8 +773,12 @@ var RepoUrlResolver = class {
|
|
|
773
773
|
};
|
|
774
774
|
|
|
775
775
|
// src/plugin/commands.ts
|
|
776
|
-
async function handleAddRepo(args) {
|
|
777
|
-
const services = await createServices(
|
|
776
|
+
async function handleAddRepo(args, options = {}) {
|
|
777
|
+
const services = await createServices(
|
|
778
|
+
options.config,
|
|
779
|
+
options.dataDir,
|
|
780
|
+
options.projectRoot ?? process.env["PWD"]
|
|
781
|
+
);
|
|
778
782
|
const storeName = args.name ?? extractRepoName(args.url);
|
|
779
783
|
console.log(`Cloning ${args.url}...`);
|
|
780
784
|
const result = await services.store.create({
|
|
@@ -799,8 +803,12 @@ async function handleAddRepo(args) {
|
|
|
799
803
|
console.error(`Indexing failed: ${indexResult.error.message}`);
|
|
800
804
|
}
|
|
801
805
|
}
|
|
802
|
-
async function handleAddFolder(args) {
|
|
803
|
-
const services = await createServices(
|
|
806
|
+
async function handleAddFolder(args, options = {}) {
|
|
807
|
+
const services = await createServices(
|
|
808
|
+
options.config,
|
|
809
|
+
options.dataDir,
|
|
810
|
+
options.projectRoot ?? process.env["PWD"]
|
|
811
|
+
);
|
|
804
812
|
const { basename } = await import("path");
|
|
805
813
|
const storeName = args.name ?? basename(args.path);
|
|
806
814
|
console.log(`Adding folder: ${args.path}...`);
|
|
@@ -825,8 +833,12 @@ async function handleAddFolder(args) {
|
|
|
825
833
|
console.error(`Indexing failed: ${indexResult.error.message}`);
|
|
826
834
|
}
|
|
827
835
|
}
|
|
828
|
-
async function handleStores() {
|
|
829
|
-
const services = await createServices(
|
|
836
|
+
async function handleStores(options = {}) {
|
|
837
|
+
const services = await createServices(
|
|
838
|
+
options.config,
|
|
839
|
+
options.dataDir,
|
|
840
|
+
options.projectRoot ?? process.env["PWD"]
|
|
841
|
+
);
|
|
830
842
|
const stores = await services.store.list();
|
|
831
843
|
if (stores.length === 0) {
|
|
832
844
|
console.log("No stores found.");
|
|
@@ -850,10 +862,10 @@ async function handleStores() {
|
|
|
850
862
|
console.log(`| ${name} | ${type} | ${id.substring(0, 8)}... | ${source} |`);
|
|
851
863
|
}
|
|
852
864
|
}
|
|
853
|
-
async function handleSuggest() {
|
|
854
|
-
const projectRoot = process.env["PWD"] ?? process.cwd();
|
|
865
|
+
async function handleSuggest(options = {}) {
|
|
866
|
+
const projectRoot = options.projectRoot ?? process.env["PWD"] ?? process.cwd();
|
|
855
867
|
console.log("Analyzing project dependencies...\n");
|
|
856
|
-
const services = await createServices(
|
|
868
|
+
const services = await createServices(options.config, options.dataDir, projectRoot);
|
|
857
869
|
const analyzer = new DependencyUsageAnalyzer();
|
|
858
870
|
const resolver = new RepoUrlResolver();
|
|
859
871
|
const spinner = ora3("Scanning source files...").start();
|
|
@@ -910,24 +922,58 @@ async function handleSuggest() {
|
|
|
910
922
|
}
|
|
911
923
|
|
|
912
924
|
// src/cli/commands/plugin-api.ts
|
|
913
|
-
function createAddRepoCommand(
|
|
925
|
+
function createAddRepoCommand(getOptions) {
|
|
914
926
|
return new Command4("add-repo").description("Clone and index a library source repository").argument("<url>", "Git repository URL").option("--name <name>", "Store name (defaults to repo name)").option("--branch <branch>", "Git branch to clone").action(async (url, options) => {
|
|
915
|
-
|
|
927
|
+
const globalOpts = getOptions();
|
|
928
|
+
await handleAddRepo(
|
|
929
|
+
{ url, ...options },
|
|
930
|
+
{
|
|
931
|
+
config: globalOpts.config,
|
|
932
|
+
dataDir: globalOpts.dataDir,
|
|
933
|
+
projectRoot: globalOpts.projectRoot,
|
|
934
|
+
format: globalOpts.format,
|
|
935
|
+
quiet: globalOpts.quiet
|
|
936
|
+
}
|
|
937
|
+
);
|
|
916
938
|
});
|
|
917
939
|
}
|
|
918
|
-
function createAddFolderCommand(
|
|
940
|
+
function createAddFolderCommand(getOptions) {
|
|
919
941
|
return new Command4("add-folder").description("Index a local folder of reference material").argument("<path>", "Folder path to index").option("--name <name>", "Store name (defaults to folder name)").action(async (path, options) => {
|
|
920
|
-
|
|
942
|
+
const globalOpts = getOptions();
|
|
943
|
+
await handleAddFolder(
|
|
944
|
+
{ path, ...options },
|
|
945
|
+
{
|
|
946
|
+
config: globalOpts.config,
|
|
947
|
+
dataDir: globalOpts.dataDir,
|
|
948
|
+
projectRoot: globalOpts.projectRoot,
|
|
949
|
+
format: globalOpts.format,
|
|
950
|
+
quiet: globalOpts.quiet
|
|
951
|
+
}
|
|
952
|
+
);
|
|
921
953
|
});
|
|
922
954
|
}
|
|
923
|
-
function createStoresCommand(
|
|
955
|
+
function createStoresCommand(getOptions) {
|
|
924
956
|
return new Command4("stores").description("List all indexed library stores").action(async () => {
|
|
925
|
-
|
|
957
|
+
const globalOpts = getOptions();
|
|
958
|
+
await handleStores({
|
|
959
|
+
config: globalOpts.config,
|
|
960
|
+
dataDir: globalOpts.dataDir,
|
|
961
|
+
projectRoot: globalOpts.projectRoot,
|
|
962
|
+
format: globalOpts.format,
|
|
963
|
+
quiet: globalOpts.quiet
|
|
964
|
+
});
|
|
926
965
|
});
|
|
927
966
|
}
|
|
928
|
-
function createSuggestCommand(
|
|
967
|
+
function createSuggestCommand(getOptions) {
|
|
929
968
|
return new Command4("suggest").description("Suggest important dependencies to add to knowledge stores").action(async () => {
|
|
930
|
-
|
|
969
|
+
const globalOpts = getOptions();
|
|
970
|
+
await handleSuggest({
|
|
971
|
+
config: globalOpts.config,
|
|
972
|
+
dataDir: globalOpts.dataDir,
|
|
973
|
+
projectRoot: globalOpts.projectRoot,
|
|
974
|
+
format: globalOpts.format,
|
|
975
|
+
quiet: globalOpts.quiet
|
|
976
|
+
});
|
|
931
977
|
});
|
|
932
978
|
}
|
|
933
979
|
|