@swarmvaultai/engine 0.1.17 → 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 -4
- package/dist/chunk-NCSZ4AKP.js +1057 -0
- package/dist/index.d.ts +111 -5
- package/dist/index.js +2787 -1059
- package/dist/registry-JFEW5RUP.js +12 -0
- package/dist/viewer/assets/index-DWUwoLny.js +330 -0
- package/dist/viewer/index.html +1 -1
- package/dist/viewer/lib.d.ts +60 -1
- package/dist/viewer/lib.js +33 -0
- package/package.json +3 -1
- package/dist/viewer/assets/index-sMKSYq5V.js +0 -330
package/README.md
CHANGED
|
@@ -26,16 +26,20 @@ import {
|
|
|
26
26
|
defaultVaultSchema,
|
|
27
27
|
exploreVault,
|
|
28
28
|
exportGraphHtml,
|
|
29
|
+
explainGraphVault,
|
|
29
30
|
importInbox,
|
|
30
31
|
ingestInput,
|
|
31
32
|
initVault,
|
|
32
33
|
installAgent,
|
|
33
34
|
getWebSearchAdapterForTask,
|
|
34
35
|
lintVault,
|
|
36
|
+
listGodNodes,
|
|
35
37
|
listSchedules,
|
|
36
38
|
loadVaultConfig,
|
|
37
39
|
loadVaultSchema,
|
|
38
40
|
loadVaultSchemas,
|
|
41
|
+
pathGraphVault,
|
|
42
|
+
queryGraphVault,
|
|
39
43
|
queryVault,
|
|
40
44
|
runSchedule,
|
|
41
45
|
searchVault,
|
|
@@ -64,6 +68,9 @@ await compileVault(rootDir, {});
|
|
|
64
68
|
const saved = await queryVault(rootDir, { question: "What changed most recently?" });
|
|
65
69
|
console.log(saved.savedPath);
|
|
66
70
|
|
|
71
|
+
const graphQuery = await queryGraphVault(rootDir, "Which nodes bridge the biggest communities?");
|
|
72
|
+
console.log(graphQuery.summary);
|
|
73
|
+
|
|
67
74
|
const exploration = await exploreVault(rootDir, { question: "What should I investigate next?", steps: 3, format: "report" });
|
|
68
75
|
console.log(exploration.hubPath);
|
|
69
76
|
|
|
@@ -122,17 +129,24 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
122
129
|
|
|
123
130
|
### Ingest
|
|
124
131
|
|
|
125
|
-
- `ingestInput(rootDir, input, { includeAssets, maxAssetSize })` ingests a local path or URL
|
|
132
|
+
- `ingestInput(rootDir, input, { includeAssets, maxAssetSize })` ingests a local file path or URL
|
|
133
|
+
- `ingestDirectory(rootDir, inputDir, { repoRoot, include, exclude, maxFiles, gitignore })` recursively ingests a local directory as a repo-aware code/content source tree
|
|
126
134
|
- `importInbox(rootDir, inputDir?)` recursively imports supported inbox files and browser-clipper style bundles
|
|
127
|
-
- JavaScript, TypeScript, Python, Go, Rust, and
|
|
135
|
+
- JavaScript, TypeScript, Python, Go, Rust, Java, C#, C, C++, and PHP inputs are treated as code sources and compiled into both source pages and `wiki/code/` module pages
|
|
136
|
+
- code manifests can carry `repoRelativePath`, and compile writes `state/code-index.json` so local imports can resolve across an ingested repo tree
|
|
128
137
|
- HTML and markdown URL ingests localize remote image references into `raw/assets/<sourceId>/` by default and rewrite the stored markdown to local relative paths
|
|
129
138
|
|
|
130
139
|
### Compile + Query
|
|
131
140
|
|
|
132
141
|
- `compileVault(rootDir, { approve })` writes wiki pages, graph data, and search state using the vault schema as guidance, or stages a review bundle
|
|
142
|
+
- compile also writes graph orientation pages such as `wiki/graph/report.md` and `wiki/graph/communities/<community>.md`
|
|
133
143
|
- `queryVault(rootDir, { question, save, format, review })` answers against the compiled vault using the same schema layer and saves by default
|
|
134
144
|
- `exploreVault(rootDir, { question, steps, format, review })` runs a save-first multi-step exploration loop and writes a hub page plus step outputs
|
|
135
145
|
- `searchVault(rootDir, query, limit)` searches compiled pages directly
|
|
146
|
+
- `queryGraphVault(rootDir, question, { traversal, budget })` runs deterministic local graph search without a model provider
|
|
147
|
+
- `pathGraphVault(rootDir, from, to)` returns the shortest graph path between two targets
|
|
148
|
+
- `explainGraphVault(rootDir, target)` returns node, community, neighbor, and provenance details
|
|
149
|
+
- `listGodNodes(rootDir, limit)` returns the most connected bridge-heavy graph nodes
|
|
136
150
|
- project-aware compile also builds `wiki/projects/index.md` plus `wiki/projects/<project>/index.md` rollups without duplicating page trees
|
|
137
151
|
- human-authored insight pages in `wiki/insights/` are indexed into search and available to query without being rewritten by compile
|
|
138
152
|
- `chart` and `image` formats save wrapper markdown pages plus local output assets under `wiki/outputs/assets/<slug>/`
|
|
@@ -157,7 +171,7 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
157
171
|
- `startMcpServer(rootDir)` runs the MCP server over stdio
|
|
158
172
|
- `exportGraphHtml(rootDir, outputPath)` exports the graph workspace as a standalone HTML file
|
|
159
173
|
|
|
160
|
-
The MCP surface includes tools for workspace info, page search, page reads, source listing, querying, ingestion, compile, and
|
|
174
|
+
The MCP surface includes tools for workspace info, page search, page reads, source listing, querying, ingestion, compile, lint, and graph-native read operations such as graph query, node explain, neighbor lookup, shortest path, and god-node listing, along with resources for config, graph, manifests, schema, page content, and session artifacts.
|
|
161
175
|
|
|
162
176
|
## Artifacts
|
|
163
177
|
|
|
@@ -168,6 +182,7 @@ Running the engine produces a local workspace with these main areas:
|
|
|
168
182
|
- `raw/sources/`: immutable source copies
|
|
169
183
|
- `raw/assets/`: copied attachments referenced by ingested markdown bundles and remote URL ingests
|
|
170
184
|
- `wiki/`: generated markdown pages, the append-only `log.md` activity trail, staged candidates, saved query outputs, exploration hub pages, and a human-only `insights/` area
|
|
185
|
+
- `wiki/graph/`: generated graph report pages and per-community summaries derived from `state/graph.json`
|
|
171
186
|
- `wiki/outputs/assets/`: local chart/image artifacts and JSON manifests for saved visual outputs
|
|
172
187
|
- `wiki/code/`: generated module pages for ingested code sources
|
|
173
188
|
- `wiki/projects/`: generated project rollups over canonical pages
|
|
@@ -175,6 +190,7 @@ Running the engine produces a local workspace with these main areas:
|
|
|
175
190
|
- `state/manifests/`: source manifests
|
|
176
191
|
- `state/extracts/`: extracted text
|
|
177
192
|
- `state/analyses/`: model analysis output
|
|
193
|
+
- `state/code-index.json`: repo-aware code module aliases and local resolution data
|
|
178
194
|
- `state/graph.json`: compiled graph
|
|
179
195
|
- `state/search.sqlite`: full-text index
|
|
180
196
|
- `state/sessions/`: canonical session artifacts
|
|
@@ -183,7 +199,7 @@ Running the engine produces a local workspace with these main areas:
|
|
|
183
199
|
- `state/jobs.ndjson`: watch-mode automation logs
|
|
184
200
|
|
|
185
201
|
Saved outputs are indexed immediately into the graph page registry and search index, then linked back into compiled source, concept, and entity pages immediately through the lightweight artifact sync path. New concept and entity pages stage into `wiki/candidates/` first and promote to active pages on the next matching compile. Insight pages are indexed into search and page reads, but compile does not mutate them. Project-scoped pages receive `project_ids`, project tags, and layered root-plus-project schema hashes when all contributing sources resolve to the same configured project.
|
|
186
|
-
Code sources also emit module and
|
|
202
|
+
Code sources also emit module, symbol, and parser-backed rationale nodes into `state/graph.json`, so local imports, exports, inheritance, same-module call edges, and rationale links are queryable through the same viewer and search pipeline.
|
|
187
203
|
Ingest, inbox import, compile, query, lint, review, and candidate operations also append human-readable entries to `wiki/log.md`.
|
|
188
204
|
|
|
189
205
|
## Notes
|