@openparachute/vault 0.7.0-rc.4 → 0.7.0-rc.5

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/src/vault.test.ts CHANGED
@@ -484,7 +484,7 @@ describe("deeper link queries", async () => {
484
484
  describe("MCP tools", async () => {
485
485
  test("generates the consolidated tool set", () => {
486
486
  const tools = generateMcpTools(store);
487
- expect(tools.length).toBe(10);
487
+ expect(tools.length).toBe(13);
488
488
 
489
489
  const names = tools.map((t) => t.name);
490
490
  expect(names).toContain("query-notes");
@@ -498,6 +498,12 @@ describe("MCP tools", async () => {
498
498
  expect(names).toContain("vault-info");
499
499
  // prune-schema (admin) — drops orphaned indexed-field columns.
500
500
  expect(names).toContain("prune-schema");
501
+ // rename-tag / merge-tags (vault#552) — MCP parity with the pre-existing
502
+ // REST engine.
503
+ expect(names).toContain("rename-tag");
504
+ expect(names).toContain("merge-tags");
505
+ // doctor (admin, vault#552) — read-only taxonomy/metadata integrity scan.
506
+ expect(names).toContain("doctor");
501
507
  // Six note-schema MCP tools (list/update/delete-note-schema +
502
508
  // list/set/delete-schema-mapping) retired in v17 — vault#267.
503
509
  expect(names).not.toContain("list-note-schemas");
@@ -5414,8 +5420,11 @@ describe("stateless MCP transport", async () => {
5414
5420
  expect(toolNames).not.toContain("delete-note");
5415
5421
  expect(toolNames).not.toContain("update-tag");
5416
5422
  expect(toolNames).not.toContain("delete-tag");
5423
+ expect(toolNames).not.toContain("rename-tag");
5424
+ expect(toolNames).not.toContain("merge-tags");
5417
5425
  // Admin tools (vault#376) are hidden too
5418
5426
  expect(toolNames).not.toContain("manage-token");
5427
+ expect(toolNames).not.toContain("doctor");
5419
5428
  // Read tier is exactly 4 tools.
5420
5429
  expect(toolNames.length).toBe(4);
5421
5430
 
@@ -5658,7 +5667,7 @@ describe("MCP tools/list scope tiers (vault#376)", () => {
5658
5667
  expect(names.length).toBe(4);
5659
5668
  });
5660
5669
 
5661
- test("vault:read + vault:write sees the 9 read+write tools", async () => {
5670
+ test("vault:read + vault:write sees the 11 read+write tools", async () => {
5662
5671
  const names = await listToolNames(["vault:read", "vault:write"]);
5663
5672
  expect(new Set(names)).toEqual(
5664
5673
  new Set([
@@ -5671,24 +5680,31 @@ describe("MCP tools/list scope tiers (vault#376)", () => {
5671
5680
  "delete-note",
5672
5681
  "update-tag",
5673
5682
  "delete-tag",
5683
+ // vault#552: MCP parity with the pre-existing REST rename/merge engine.
5684
+ "rename-tag",
5685
+ "merge-tags",
5674
5686
  ]),
5675
5687
  );
5676
- expect(names.length).toBe(9);
5688
+ expect(names.length).toBe(11);
5677
5689
  expect(names).not.toContain("manage-token");
5690
+ expect(names).not.toContain("doctor");
5678
5691
  // Aaron 2026-05-27: delete-* are write-tier (same destructive verb as
5679
- // update). Only manage-token is admin-gated.
5692
+ // update). Only manage-token/prune-schema/doctor are admin-gated.
5680
5693
  expect(names).toContain("delete-note");
5681
5694
  expect(names).toContain("delete-tag");
5682
5695
  });
5683
5696
 
5684
- test("vault:admin sees all 11 tools including manage-token + prune-schema", async () => {
5697
+ test("vault:admin sees all 14 tools including manage-token + prune-schema + doctor", async () => {
5685
5698
  const names = await listToolNames(["vault:read", "vault:write", "vault:admin"]);
5686
5699
  expect(names).toContain("manage-token");
5687
5700
  expect(names).toContain("prune-schema");
5688
- expect(names.length).toBe(11);
5701
+ expect(names).toContain("doctor");
5702
+ expect(names).toContain("rename-tag");
5703
+ expect(names).toContain("merge-tags");
5704
+ expect(names.length).toBe(14);
5689
5705
  });
5690
5706
 
5691
- test("legacy-derived full token sees all 11 tools (back-compat)", async () => {
5707
+ test("legacy-derived full token sees all 14 tools (back-compat)", async () => {
5692
5708
  const { handleScopedMcp } = await import("./mcp-http.ts");
5693
5709
  const { writeVaultConfig } = await import("./config.ts");
5694
5710
  const { closeAllStores } = await import("./vault-store.ts");
@@ -5721,9 +5737,10 @@ describe("MCP tools/list scope tiers (vault#376)", () => {
5721
5737
  } as any);
5722
5738
  const body = await res.json() as any;
5723
5739
  const names: string[] = body.result.tools.map((t: any) => t.name);
5724
- expect(names.length).toBe(11);
5740
+ expect(names.length).toBe(14);
5725
5741
  expect(names).toContain("manage-token");
5726
5742
  expect(names).toContain("prune-schema");
5743
+ expect(names).toContain("doctor");
5727
5744
  closeAllStores();
5728
5745
  });
5729
5746