@swarmvaultai/cli 3.7.2 → 3.8.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 (2) hide show
  1. package/dist/index.js +28 -13
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -313,9 +313,9 @@ program.name("swarmvault").description("SwarmVault is a local-first knowledge co
313
313
  function readCliVersion() {
314
314
  try {
315
315
  const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
316
- return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.7.2";
316
+ return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "3.8.0";
317
317
  } catch {
318
- return "3.7.2";
318
+ return "3.8.0";
319
319
  }
320
320
  }
321
321
  function parsePositiveInt(value, fallback) {
@@ -1383,18 +1383,33 @@ graph.command("share").description("Print a shareable summary of the compiled gr
1383
1383
  }
1384
1384
  log(options.post ? artifact.shortPost : renderGraphShareMarkdown(artifact));
1385
1385
  });
1386
- graph.command("query").description("Traverse the compiled graph deterministically from local search seeds.").argument("<question>", "Question or graph search seed").option("--dfs", "Prefer a depth-first traversal instead of breadth-first", false).option("--budget <n>", "Maximum number of graph nodes to summarize").action(async (question, options) => {
1387
- const budget = options.budget ? parsePositiveInt(options.budget, 0) || void 0 : void 0;
1388
- const result = await queryGraphVault(process2.cwd(), question, {
1389
- traversal: options.dfs ? "dfs" : "bfs",
1390
- budget
1391
- });
1392
- if (isJson()) {
1393
- emitJson(result);
1394
- return;
1386
+ graph.command("query").description("Traverse the compiled graph deterministically from local search seeds.").argument("<question>", "Question or graph search seed").option("--dfs", "Prefer a depth-first traversal instead of breadth-first", false).option("--budget <n>", "Maximum number of graph nodes to summarize").option("--relation <name>", "Only traverse edges with this relation name (repeatable)", collectRepeated, []).option(
1387
+ "--context <group>",
1388
+ "Relation group context: calls, imports, types, data, rationale, or evidence (repeatable)",
1389
+ collectRepeated,
1390
+ []
1391
+ ).option("--evidence <class>", "Evidence class: extracted, inferred, or ambiguous (repeatable)", collectRepeated, []).option("--node-type <type>", "Prefer traversal around this graph node type (repeatable)", collectRepeated, []).option("--language <lang>", "Prefer traversal around this code language (repeatable)", collectRepeated, []).action(
1392
+ async (question, options) => {
1393
+ const budget = options.budget ? parsePositiveInt(options.budget, 0) || void 0 : void 0;
1394
+ const filters = {
1395
+ relations: options.relation,
1396
+ relationGroups: options.context,
1397
+ evidenceClasses: options.evidence,
1398
+ nodeTypes: options.nodeType,
1399
+ languages: options.language
1400
+ };
1401
+ const result = await queryGraphVault(process2.cwd(), question, {
1402
+ traversal: options.dfs ? "dfs" : "bfs",
1403
+ budget,
1404
+ filters
1405
+ });
1406
+ if (isJson()) {
1407
+ emitJson(result);
1408
+ return;
1409
+ }
1410
+ log(result.summary);
1395
1411
  }
1396
- log(result.summary);
1397
- });
1412
+ );
1398
1413
  graph.command("path").description("Find the shortest graph path between two nodes or pages.").argument("<from>", "Source node/page label or id").argument("<to>", "Target node/page label or id").action(async (from, to) => {
1399
1414
  const result = await pathGraphVault(process2.cwd(), from, to);
1400
1415
  if (isJson()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/cli",
3
- "version": "3.7.2",
3
+ "version": "3.8.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.7.2",
47
+ "@swarmvaultai/engine": "3.8.0",
48
48
  "commander": "^14.0.1"
49
49
  },
50
50
  "devDependencies": {