@swarmvaultai/cli 3.1.0 → 3.3.0

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/README.md CHANGED
@@ -47,6 +47,7 @@ swarmvault query "What keeps recurring?" --commit
47
47
  swarmvault context build "Ship this feature safely" --target ./src --budget 8000
48
48
  swarmvault task start "Ship this feature safely" --target ./src --agent codex
49
49
  swarmvault retrieval status
50
+ swarmvault doctor --repair
50
51
  swarmvault query "Turn this into slides" --format slides
51
52
  swarmvault explore "What should I research next?" --steps 3
52
53
  swarmvault lint --deep
@@ -115,6 +116,17 @@ Compare the current `state/graph.json` against the last committed graph in git.
115
116
  - when no git baseline exists, falls back to a summary of the current graph state
116
117
  - supports `--json` for structured automation output
117
118
 
119
+ ### `swarmvault doctor [--repair]`
120
+
121
+ Run a whole-vault health check before handing the workspace to an agent or opening the live viewer.
122
+
123
+ - checks workspace config and schema presence
124
+ - reports graph, page, source, review, candidate, task, watch, migration, and retrieval state
125
+ - emits suggested follow-up commands for warnings and errors
126
+ - supports `--json` for structured automation output
127
+ - add `--repair` to rebuild safe derived retrieval artifacts
128
+ - the live viewer workbench shows the same checks with details and copyable suggested commands
129
+
118
130
  ### `swarmvault source add|list|reload|review|guide|session|delete`
119
131
 
120
132
  Manage recurring source roots through a registry-backed workflow.
@@ -400,16 +412,19 @@ Run SwarmVault as a local MCP server over stdio. This exposes the vault to compa
400
412
  - `retrieval_status`
401
413
  - `rebuild_retrieval`
402
414
  - `doctor_retrieval`
415
+ - `doctor_vault`
403
416
 
404
- `compile_vault` also accepts `maxTokens` for bounded wiki output, `blast_radius` traces reverse import impact for a file or module target, `build_context_pack` creates the same bounded agent evidence bundles as `swarmvault context build`, the task tools mirror `swarmvault task`, the memory tools mirror the compatibility command group, and retrieval tools inspect or repair the local index.
417
+ `compile_vault` also accepts `maxTokens` for bounded wiki output, `blast_radius` traces reverse import impact for a file or module target, `build_context_pack` creates the same bounded agent evidence bundles as `swarmvault context build`, the task tools mirror `swarmvault task`, the memory tools mirror the compatibility command group, `doctor_vault` mirrors `swarmvault doctor`, and retrieval tools inspect or repair the local index.
405
418
 
406
419
  The MCP surface also exposes `swarmvault://schema`, `swarmvault://sessions`, `swarmvault://sessions/{path}`, `swarmvault://context-packs`, `swarmvault://tasks`, `swarmvault://memory-tasks`, and includes `schemaPath` in `workspace_info`.
407
420
 
408
421
  ### `swarmvault graph serve`
409
422
 
410
- Start the local graph workspace backed by `state/graph.json`, `/api/search`, `/api/page`, and local graph query/path/explain endpoints.
423
+ Start the local graph workspace backed by `state/graph.json`, `/api/search`, `/api/page`, local graph query/path/explain endpoints, and the workbench APIs for doctor, retrieval repair, capture, context packs, task start, and source reload.
424
+
425
+ The workbench renders every vault doctor check with details, suggested commands that can be copied back to a terminal, safe one-click retrieval repair through `doctor --repair`, selectable capture modes (`ingest`, normalized `add`, or `inbox`), editable token budgets for context packs and task starts, and action receipts after workbench operations complete.
411
426
 
412
- It also exposes `/api/bookmarklet` and `/api/clip`, so a running local viewer can ingest the current browser page through a bookmarklet without leaving the browser.
427
+ It also exposes `/api/bookmarklet` and `/api/clip`, so a running local viewer can capture the current browser URL, selected text, markdown, HTML excerpts, and tags through the workbench or bookmarklet without leaving the browser.
413
428
 
414
429
  ### `swarmvault graph query "<question>" [--dfs] [--budget <n>]`
415
430
 
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  deleteContextPack,
24
24
  deleteManagedSource,
25
25
  doctorRetrieval,
26
+ doctorVault,
26
27
  downloadWhisperModel,
27
28
  explainGraphVault,
28
29
  exploreVault,
@@ -308,9 +309,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
308
309
  function readCliVersion() {
309
310
  try {
310
311
  const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
311
- return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.1.0";
312
+ return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.3.0";
312
313
  } catch {
313
- return "3.1.0";
314
+ return "3.3.0";
314
315
  }
315
316
  }
316
317
  function parsePositiveInt(value, fallback) {
@@ -2013,6 +2014,26 @@ program.command("diff").description("Show what changed in the knowledge graph si
2013
2014
  }
2014
2015
  }
2015
2016
  });
2017
+ program.command("doctor").description("Diagnose vault health across graph, retrieval, review queues, watch state, and migrations.").option("--repair", "Run safe repairs such as rebuilding stale retrieval artifacts", false).action(async (options) => {
2018
+ const report = await doctorVault(process2.cwd(), { repair: options.repair });
2019
+ if (isJson()) {
2020
+ emitJson(report);
2021
+ return;
2022
+ }
2023
+ log(`Vault health: ${report.status}${report.repaired.length ? ` (repaired: ${report.repaired.join(", ")})` : ""}`);
2024
+ log(
2025
+ `Sources ${report.counts.sources} | Managed ${report.counts.managedSources} | Pages ${report.counts.pages} | Nodes ${report.counts.nodes} | Edges ${report.counts.edges}`
2026
+ );
2027
+ for (const check of report.checks) {
2028
+ log(`[${check.status}] ${check.label}: ${check.summary}`);
2029
+ if (check.detail) {
2030
+ log(` ${check.detail}`);
2031
+ }
2032
+ for (const action of check.actions ?? []) {
2033
+ log(` Try: ${action.command} - ${action.description}`);
2034
+ }
2035
+ }
2036
+ });
2016
2037
  var retrieval = program.command("retrieval").description("Inspect and repair the local retrieval index.");
2017
2038
  retrieval.command("status").description("Show retrieval index health and configuration.").action(async () => {
2018
2039
  const status = await getRetrievalStatus(process2.cwd());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/cli",
3
- "version": "3.1.0",
3
+ "version": "3.3.0",
4
4
  "description": "Global CLI for SwarmVault.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,18 +37,19 @@
37
37
  "engines": {
38
38
  "node": ">=24.0.0"
39
39
  },
40
+ "scripts": {
41
+ "build": "tsup src/index.ts --format esm --dts",
42
+ "test": "vitest run",
43
+ "typecheck": "tsc --noEmit",
44
+ "prepublishOnly": "node ../../scripts/check-release-sync.mjs && node ../../scripts/check-published-manifests.mjs"
45
+ },
40
46
  "dependencies": {
41
- "@swarmvaultai/engine": "3.1.0",
47
+ "@swarmvaultai/engine": "3.3.0",
42
48
  "commander": "^14.0.1"
43
49
  },
44
50
  "devDependencies": {
45
51
  "@types/node": "^24.6.0",
46
52
  "tsup": "^8.5.0",
47
53
  "vitest": "^3.2.4"
48
- },
49
- "scripts": {
50
- "build": "tsup src/index.ts --format esm --dts",
51
- "test": "vitest run",
52
- "typecheck": "tsc --noEmit"
53
54
  }
54
- }
55
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 SwarmVault
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.