@swarmvaultai/cli 0.1.18 → 0.1.19
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 +20 -2
- package/dist/index.js +45 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,6 +31,8 @@ swarmvault query "What keeps recurring?"
|
|
|
31
31
|
swarmvault query "Turn this into slides" --format slides
|
|
32
32
|
swarmvault explore "What should I research next?" --steps 3
|
|
33
33
|
swarmvault lint --deep
|
|
34
|
+
swarmvault graph query "Which nodes bridge the biggest clusters?"
|
|
35
|
+
swarmvault graph explain "concept:drift"
|
|
34
36
|
swarmvault graph serve
|
|
35
37
|
swarmvault graph export --html ./exports/graph.html
|
|
36
38
|
```
|
|
@@ -177,11 +179,27 @@ The MCP surface also exposes `swarmvault://schema`, `swarmvault://sessions`, `sw
|
|
|
177
179
|
|
|
178
180
|
### `swarmvault graph serve`
|
|
179
181
|
|
|
180
|
-
Start the local graph workspace backed by `state/graph.json`, `/api/search`,
|
|
182
|
+
Start the local graph workspace backed by `state/graph.json`, `/api/search`, `/api/page`, and local graph query/path/explain endpoints.
|
|
183
|
+
|
|
184
|
+
### `swarmvault graph query "<question>" [--dfs] [--budget <n>]`
|
|
185
|
+
|
|
186
|
+
Run a deterministic local graph traversal seeded from local search and graph labels.
|
|
187
|
+
|
|
188
|
+
### `swarmvault graph path <from> <to>`
|
|
189
|
+
|
|
190
|
+
Return the shortest high-confidence path between two graph targets.
|
|
191
|
+
|
|
192
|
+
### `swarmvault graph explain <target>`
|
|
193
|
+
|
|
194
|
+
Inspect graph metadata, community membership, neighbors, and provenance for a node or page.
|
|
195
|
+
|
|
196
|
+
### `swarmvault graph god-nodes [--limit <n>]`
|
|
197
|
+
|
|
198
|
+
List the most connected bridge-heavy nodes in the current graph.
|
|
181
199
|
|
|
182
200
|
### `swarmvault graph export --html <output>`
|
|
183
201
|
|
|
184
|
-
Export the graph workspace as a standalone HTML file with embedded graph and page data for offline sharing.
|
|
202
|
+
Export the graph workspace as a standalone HTML file with embedded graph and page data for offline sharing. The exported file keeps read-only graph browsing, search, and page preview. The live graph query/path/explain actions remain part of `graph serve` and the MCP surface.
|
|
185
203
|
|
|
186
204
|
### `swarmvault install --agent <codex|claude|cursor|goose|pi|gemini|opencode>`
|
|
187
205
|
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
acceptApproval,
|
|
8
8
|
archiveCandidate,
|
|
9
9
|
compileVault,
|
|
10
|
+
explainGraphVault,
|
|
10
11
|
exploreVault,
|
|
11
12
|
exportGraphHtml,
|
|
12
13
|
importInbox,
|
|
@@ -17,9 +18,12 @@ import {
|
|
|
17
18
|
lintVault,
|
|
18
19
|
listApprovals,
|
|
19
20
|
listCandidates,
|
|
21
|
+
listGodNodes,
|
|
20
22
|
listSchedules,
|
|
21
23
|
loadVaultConfig,
|
|
24
|
+
pathGraphVault,
|
|
22
25
|
promoteCandidate,
|
|
26
|
+
queryGraphVault,
|
|
23
27
|
queryVault,
|
|
24
28
|
readApproval,
|
|
25
29
|
rejectApproval,
|
|
@@ -36,9 +40,9 @@ program.name("swarmvault").description("SwarmVault is a local-first LLM wiki com
|
|
|
36
40
|
function readCliVersion() {
|
|
37
41
|
try {
|
|
38
42
|
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
39
|
-
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.1.
|
|
43
|
+
return typeof packageJson.version === "string" && packageJson.version.trim() ? packageJson.version : "0.1.19";
|
|
40
44
|
} catch {
|
|
41
|
-
return "0.1.
|
|
45
|
+
return "0.1.19";
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
function isJson() {
|
|
@@ -194,6 +198,45 @@ graph.command("export").description("Export the graph viewer as a single self-co
|
|
|
194
198
|
log(`Exported graph HTML to ${outputPath}`);
|
|
195
199
|
}
|
|
196
200
|
});
|
|
201
|
+
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) => {
|
|
202
|
+
const budget = options.budget ? Number.parseInt(options.budget, 10) : void 0;
|
|
203
|
+
const result = await queryGraphVault(process.cwd(), question, {
|
|
204
|
+
traversal: options.dfs ? "dfs" : "bfs",
|
|
205
|
+
budget: Number.isFinite(budget) ? budget : void 0
|
|
206
|
+
});
|
|
207
|
+
if (isJson()) {
|
|
208
|
+
emitJson(result);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
log(result.summary);
|
|
212
|
+
});
|
|
213
|
+
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) => {
|
|
214
|
+
const result = await pathGraphVault(process.cwd(), from, to);
|
|
215
|
+
if (isJson()) {
|
|
216
|
+
emitJson(result);
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
log(result.summary);
|
|
220
|
+
});
|
|
221
|
+
graph.command("explain").description("Explain a graph node, its page, community, and neighbors.").argument("<target>", "Node/page label or id").action(async (target) => {
|
|
222
|
+
const result = await explainGraphVault(process.cwd(), target);
|
|
223
|
+
if (isJson()) {
|
|
224
|
+
emitJson(result);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
log(result.summary);
|
|
228
|
+
});
|
|
229
|
+
graph.command("god-nodes").description("List the highest-connectivity non-source graph nodes.").option("--limit <n>", "Maximum number of nodes to return", "10").action(async (options) => {
|
|
230
|
+
const limit = Number.parseInt(options.limit ?? "10", 10);
|
|
231
|
+
const result = await listGodNodes(process.cwd(), Number.isFinite(limit) ? limit : 10);
|
|
232
|
+
if (isJson()) {
|
|
233
|
+
emitJson(result);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
for (const node of result) {
|
|
237
|
+
log(`${node.label} degree=${node.degree ?? 0} bridge=${node.bridgeScore ?? 0}`);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
197
240
|
var review = program.command("review").description("Review staged compile approval bundles.");
|
|
198
241
|
review.command("list").description("List staged approval bundles and their resolution status.").action(async () => {
|
|
199
242
|
const approvals = await listApprovals(process.cwd());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarmvaultai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Global CLI for SwarmVault.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"commander": "^14.0.1",
|
|
42
|
-
"@swarmvaultai/engine": "0.1.
|
|
42
|
+
"@swarmvaultai/engine": "0.1.19"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^24.6.0",
|