@swarmvaultai/cli 3.4.0 → 3.5.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.
Files changed (3) hide show
  1. package/README.md +24 -2
  2. package/dist/index.js +20 -4
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -52,6 +52,7 @@ swarmvault query "Turn this into slides" --format slides
52
52
  swarmvault explore "What should I research next?" --steps 3
53
53
  swarmvault lint --deep
54
54
  swarmvault graph blast ./src/index.ts
55
+ swarmvault graph update .
55
56
  swarmvault graph query "Which nodes bridge the biggest clusters?"
56
57
  swarmvault graph explain "concept:drift"
57
58
  swarmvault watch status
@@ -372,6 +373,16 @@ When `--repo` sees only code-file changes under tracked repo roots, SwarmVault t
372
373
 
373
374
  Show watched repo roots, the latest watch run, and any pending semantic refresh entries for tracked non-code repo changes.
374
375
 
376
+ ### `swarmvault graph update [path]`
377
+
378
+ Refresh code-derived graph artifacts from tracked repo roots or one explicit repo path.
379
+
380
+ - aliases to `swarmvault graph refresh [path]`
381
+ - runs the same code-only repo refresh path as `swarmvault watch --repo --code-only --once`
382
+ - without `path`, uses configured or auto-discovered watched repo roots
383
+ - with `path`, refreshes that repo root instead of the tracked set
384
+ - `--json` returns the same one-shot watch result shape, including repo import/update/remove counts and pending semantic refresh entries
385
+
375
386
  ### `swarmvault hook install|uninstall|status`
376
387
 
377
388
  Manage SwarmVault's local git hook blocks for the nearest git repository.
@@ -414,8 +425,17 @@ Run SwarmVault as a local MCP server over stdio. This exposes the vault to compa
414
425
  - `rebuild_retrieval`
415
426
  - `doctor_retrieval`
416
427
  - `doctor_vault`
417
-
418
- `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.
428
+ - `query_graph`
429
+ - `graph_report`
430
+ - `graph_stats`
431
+ - `get_node`
432
+ - `get_community`
433
+ - `get_neighbors`
434
+ - `get_hyperedges`
435
+ - `shortest_path`
436
+ - `god_nodes`
437
+
438
+ `compile_vault` also accepts `maxTokens` for bounded wiki output, `graph_stats` returns lightweight graph counts, `get_community` resolves community members and pages, `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.
419
439
 
420
440
  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`.
421
441
 
@@ -510,6 +530,7 @@ Install agent-specific rules into the current project so an agent understands th
510
530
  Hook-capable installs:
511
531
 
512
532
  ```bash
533
+ swarmvault install --agent codex --hook
513
534
  swarmvault install --agent claude --hook
514
535
  swarmvault install --agent gemini --hook
515
536
  swarmvault install --agent opencode --hook
@@ -530,6 +551,7 @@ Agent target mapping:
530
551
 
531
552
  Hook semantics:
532
553
 
554
+ - `codex --hook` writes `.codex/hooks.json` plus `.codex/hooks/swarmvault-graph-first.js` and emits model-visible guidance before broad shell search
533
555
  - `claude --hook` writes `.claude/settings.json` plus `.claude/hooks/swarmvault-graph-first.js` and adds model-visible advisory context through structured hook JSON
534
556
  - `gemini --hook` writes `.gemini/settings.json` plus `.gemini/hooks/swarmvault-graph-first.js` and stays advisory/model-visible
535
557
  - `opencode --hook` writes `.opencode/plugins/swarmvault-graph-first.js` and stays advisory/log-only
package/dist/index.js CHANGED
@@ -309,9 +309,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
309
309
  function readCliVersion() {
310
310
  try {
311
311
  const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
312
- return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.4.0";
312
+ return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.5.0";
313
313
  } catch {
314
- return "3.4.0";
314
+ return "3.5.0";
315
315
  }
316
316
  }
317
317
  function parsePositiveInt(value, fallback) {
@@ -1134,6 +1134,22 @@ program.command("lint").description("Run anti-drift and wiki-health checks.").op
1134
1134
  });
1135
1135
  var graph = program.command("graph").description("Graph-related commands.").enablePositionalOptions();
1136
1136
  var graphPush = graph.command("push").description("Push the compiled graph into external sinks.");
1137
+ graph.command("update").alias("refresh").description("Refresh code-derived graph artifacts from tracked repo roots or one explicit repo path.").argument("[path]", "Optional repo root to refresh instead of configured/tracked roots").option("--lint", "Run lint after the refresh cycle", false).action(async (targetPath, options) => {
1138
+ const overrideRoots = targetPath ? [path2.resolve(process2.cwd(), targetPath)] : void 0;
1139
+ const result = await runWatchCycle(process2.cwd(), {
1140
+ repo: true,
1141
+ codeOnly: true,
1142
+ lint: options.lint ?? false,
1143
+ overrideRoots
1144
+ });
1145
+ if (isJson()) {
1146
+ emitJson(result);
1147
+ return;
1148
+ }
1149
+ log(
1150
+ `Updated graph from ${result.watchedRepoRoots.length} repo root${result.watchedRepoRoots.length === 1 ? "" : "s"}. Imported ${result.repoImportedCount}, updated ${result.repoUpdatedCount}, removed ${result.repoRemovedCount}, pending semantic refresh ${result.pendingSemanticRefreshCount}.`
1151
+ );
1152
+ });
1137
1153
  graphPush.command("neo4j").description("Push the compiled graph directly into Neo4j over Bolt/Aura.").option("--uri <bolt-uri>", "Neo4j Bolt or Aura URI").option("--username <user>", "Neo4j username").option("--password-env <env-var>", "Environment variable containing the Neo4j password").option("--database <name>", "Neo4j database name").option("--vault-id <id>", "Stable vault identifier used for shared-database namespacing").option("--batch-size <n>", "Maximum rows to write per Neo4j transaction batch").option("--include-third-party", "Also push third-party repo material", false).option("--include-resources", "Also push resource-like content", false).option("--include-generated", "Also push generated output", false).option("--dry-run", "Show what would be pushed without writing to Neo4j", false).action(
1138
1154
  async (options) => {
1139
1155
  const batchSize = typeof options.batchSize === "string" && options.batchSize.trim() ? parsePositiveInt(options.batchSize, 0) || void 0 : void 0;
@@ -1717,9 +1733,9 @@ program.command("install").description("Install SwarmVault instructions for an a
1717
1733
  "claude, codex, cursor, gemini, goose, opencode, copilot, aider, droid, pi, trae, claw, kiro, hermes, antigravity, vscode, amp, augment, adal, bob, cline, codebuddy, command-code, continue, cortex, crush, deepagents, firebender, iflow, junie, kilo-code, kimi, kode, mcpjam, mistral-vibe, mux, neovate, openclaw, openhands, pochi, qoder, qwen-code, replit, roo-code, trae-cn, warp, windsurf, or zencoder"
1718
1734
  ).option("--hook", "Also install hook/plugin guidance when the target agent supports it", false).action(
1719
1735
  async (options) => {
1720
- const hookCapableAgents = /* @__PURE__ */ new Set(["claude", "opencode", "gemini", "copilot"]);
1736
+ const hookCapableAgents = /* @__PURE__ */ new Set(["codex", "claude", "opencode", "gemini", "copilot"]);
1721
1737
  if (options.hook && !hookCapableAgents.has(options.agent)) {
1722
- throw new Error("--hook is only supported for --agent claude, opencode, gemini, or copilot");
1738
+ throw new Error("--hook is only supported for --agent codex, claude, opencode, gemini, or copilot");
1723
1739
  }
1724
1740
  const result = await installAgent(process2.cwd(), options.agent, { hook: options.hook ?? false });
1725
1741
  if (isJson()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/cli",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Global CLI for SwarmVault.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "prepublishOnly": "node ../../scripts/check-release-sync.mjs && node ../../scripts/check-published-manifests.mjs"
45
45
  },
46
46
  "dependencies": {
47
- "@swarmvaultai/engine": "3.4.0",
47
+ "@swarmvaultai/engine": "3.5.0",
48
48
  "commander": "^14.0.1"
49
49
  },
50
50
  "devDependencies": {