bluera-knowledge 0.11.20 → 0.12.1

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 (43) hide show
  1. package/.claude/council-cache/1a43ed5977b8f29afc79a9bf5c4082ee5ad8338c42ab991a4241a48f80c1e46d.json +7 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +31 -0
  4. package/README.md +64 -5
  5. package/commands/crawl.md +7 -7
  6. package/commands/search.md +9 -2
  7. package/commands/skill-activation.md +130 -0
  8. package/dist/{chunk-MQGRQ2EG.js → chunk-C4SYGLAI.js} +27 -7
  9. package/dist/chunk-C4SYGLAI.js.map +1 -0
  10. package/dist/{chunk-ZSKQIMD7.js → chunk-CC6EGZ4D.js} +48 -8
  11. package/dist/chunk-CC6EGZ4D.js.map +1 -0
  12. package/dist/{chunk-Q2ZGPJ66.js → chunk-QCSFBMYW.js} +2 -2
  13. package/dist/index.js +64 -12
  14. package/dist/index.js.map +1 -1
  15. package/dist/mcp/server.js +2 -2
  16. package/dist/workers/background-worker-cli.js +2 -2
  17. package/hooks/hooks.json +28 -1
  18. package/hooks/pretooluse-bk-reminder.py +97 -0
  19. package/hooks/skill-activation.py +190 -0
  20. package/hooks/skill-rules.json +122 -0
  21. package/package.json +1 -1
  22. package/src/analysis/code-graph.test.ts +30 -0
  23. package/src/analysis/code-graph.ts +10 -2
  24. package/src/cli/commands/store.test.ts +78 -0
  25. package/src/cli/commands/store.ts +19 -0
  26. package/src/cli/commands/sync.test.ts +1 -1
  27. package/src/cli/commands/sync.ts +50 -1
  28. package/src/mcp/commands/sync.commands.test.ts +94 -6
  29. package/src/mcp/commands/sync.commands.ts +36 -6
  30. package/src/mcp/handlers/search.handler.ts +3 -1
  31. package/src/mcp/handlers/store.handler.test.ts +3 -0
  32. package/src/mcp/handlers/store.handler.ts +5 -2
  33. package/src/mcp/schemas/index.test.ts +36 -0
  34. package/src/mcp/schemas/index.ts +6 -0
  35. package/src/mcp/server.ts +11 -0
  36. package/src/services/code-graph.service.ts +11 -1
  37. package/src/services/job.service.test.ts +23 -0
  38. package/src/services/job.service.ts +10 -6
  39. package/src/services/watch.service.test.ts +14 -11
  40. package/vitest.config.ts +1 -1
  41. package/dist/chunk-MQGRQ2EG.js.map +0 -1
  42. package/dist/chunk-ZSKQIMD7.js.map +0 -1
  43. /package/dist/{chunk-Q2ZGPJ66.js.map → chunk-QCSFBMYW.js.map} +0 -0
@@ -21,6 +21,9 @@ vi.mock('chokidar', () => ({
21
21
  }),
22
22
  }));
23
23
 
24
+ // Import chokidar once after mock is set up to avoid dynamic import flakiness
25
+ import * as chokidar from 'chokidar';
26
+
24
27
  describe('WatchService', () => {
25
28
  let watchService: WatchService;
26
29
  let mockIndexService: IndexService;
@@ -78,7 +81,7 @@ describe('WatchService', () => {
78
81
  const noopErrorHandler = (): void => {};
79
82
 
80
83
  it('starts watching a file store', async () => {
81
- const { watch } = await import('chokidar');
84
+ const { watch } = chokidar;
82
85
 
83
86
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
84
87
 
@@ -93,7 +96,7 @@ describe('WatchService', () => {
93
96
  });
94
97
 
95
98
  it('starts watching a repo store', async () => {
96
- const { watch } = await import('chokidar');
99
+ const { watch } = chokidar;
97
100
 
98
101
  await watchService.watch(mockRepoStore, 1000, undefined, noopErrorHandler);
99
102
 
@@ -109,7 +112,7 @@ describe('WatchService', () => {
109
112
  });
110
113
 
111
114
  it('does not start watching if already watching the same store', async () => {
112
- const { watch } = await import('chokidar');
115
+ const { watch } = chokidar;
113
116
 
114
117
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
115
118
  const callCount1 = (watch as ReturnType<typeof vi.fn>).mock.calls.length;
@@ -121,7 +124,7 @@ describe('WatchService', () => {
121
124
  });
122
125
 
123
126
  it('allows watching multiple different stores', async () => {
124
- const { watch } = await import('chokidar');
127
+ const { watch } = chokidar;
125
128
 
126
129
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
127
130
  await watchService.watch(mockRepoStore, 1000, undefined, noopErrorHandler);
@@ -454,7 +457,7 @@ describe('WatchService', () => {
454
457
  });
455
458
 
456
459
  it('removes watcher from internal map', async () => {
457
- const { watch } = await import('chokidar');
460
+ const { watch } = chokidar;
458
461
 
459
462
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
460
463
  await watchService.unwatch(mockFileStore.id);
@@ -523,7 +526,7 @@ describe('WatchService', () => {
523
526
  });
524
527
 
525
528
  it('clears all watchers from map', async () => {
526
- const { watch } = await import('chokidar');
529
+ const { watch } = chokidar;
527
530
 
528
531
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
529
532
  await watchService.watch(mockRepoStore, 1000, undefined, noopErrorHandler);
@@ -546,7 +549,7 @@ describe('WatchService', () => {
546
549
  const noopErrorHandler = (): void => {};
547
550
 
548
551
  it('ignores .git directories', async () => {
549
- const { watch } = await import('chokidar');
552
+ const { watch } = chokidar;
550
553
 
551
554
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
552
555
 
@@ -557,7 +560,7 @@ describe('WatchService', () => {
557
560
  });
558
561
 
559
562
  it('ignores node_modules directories', async () => {
560
- const { watch } = await import('chokidar');
563
+ const { watch } = chokidar;
561
564
 
562
565
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
563
566
 
@@ -567,7 +570,7 @@ describe('WatchService', () => {
567
570
  });
568
571
 
569
572
  it('ignores dist and build directories', async () => {
570
- const { watch } = await import('chokidar');
573
+ const { watch } = chokidar;
571
574
 
572
575
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
573
576
 
@@ -577,7 +580,7 @@ describe('WatchService', () => {
577
580
  });
578
581
 
579
582
  it('sets persistent to true', async () => {
580
- const { watch } = await import('chokidar');
583
+ const { watch } = chokidar;
581
584
 
582
585
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
583
586
 
@@ -586,7 +589,7 @@ describe('WatchService', () => {
586
589
  });
587
590
 
588
591
  it('sets ignoreInitial to true', async () => {
589
- const { watch } = await import('chokidar');
592
+ const { watch } = chokidar;
590
593
 
591
594
  await watchService.watch(mockFileStore, 1000, undefined, noopErrorHandler);
592
595
 
package/vitest.config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineConfig } from 'vitest/config';
2
2
 
3
- const coverageThreshold = 81;
3
+ const coverageThreshold = 80.5;
4
4
 
5
5
  export default defineConfig({
6
6
  test: {