@swarmvaultai/engine 0.1.23 → 0.1.25
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 +6 -5
- package/dist/index.d.ts +22 -2
- package/dist/index.js +617 -44
- package/dist/viewer/assets/{index-f8JPYMw_.js → index-CmEm2Pd_.js} +11 -11
- package/dist/viewer/index.html +1 -1
- package/dist/viewer/lib.d.ts +20 -2
- package/package.json +7 -7
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -174,9 +174,10 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
174
174
|
- `queryVault(rootDir, { question, save, format, review })` answers against the compiled vault using the same schema layer and saves by default
|
|
175
175
|
- `exploreVault(rootDir, { question, steps, format, review })` runs a save-first multi-step exploration loop and writes a hub page plus step outputs
|
|
176
176
|
- `searchVault(rootDir, query, limit)` searches compiled pages directly
|
|
177
|
-
- `queryGraphVault(rootDir, question, { traversal, budget })` runs deterministic local graph search without a model provider
|
|
177
|
+
- `queryGraphVault(rootDir, question, { traversal, budget })` runs deterministic local graph search without a model provider and includes matching group patterns when relevant
|
|
178
178
|
- `pathGraphVault(rootDir, from, to)` returns the shortest graph path between two targets
|
|
179
|
-
- `explainGraphVault(rootDir, target)` returns node, community, neighbor, and
|
|
179
|
+
- `explainGraphVault(rootDir, target)` returns node, community, neighbor, provenance, and group-pattern details
|
|
180
|
+
- `listGraphHyperedges(rootDir, target?, limit?)` returns graph hyperedges globally or for a specific node/page target
|
|
180
181
|
- `listGodNodes(rootDir, limit)` returns the most connected bridge-heavy graph nodes
|
|
181
182
|
- project-aware compile also builds `wiki/projects/index.md` plus `wiki/projects/<project>/index.md` rollups without duplicating page trees
|
|
182
183
|
- human-authored insight pages in `wiki/insights/` are indexed into search and available to query without being rewritten by compile
|
|
@@ -208,7 +209,7 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
208
209
|
- `exportGraphHtml(rootDir, outputPath)` exports the graph workspace as a standalone HTML file
|
|
209
210
|
- `exportGraphFormat(rootDir, "svg" | "graphml" | "cypher", outputPath)` exports the graph into interoperable file formats
|
|
210
211
|
|
|
211
|
-
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.
|
|
212
|
+
The MCP surface includes tools for workspace info, page search, page reads, source listing, querying, ingestion, compile, lint, graph report reads, hyperedge reads, 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.
|
|
212
213
|
|
|
213
214
|
## Artifacts
|
|
214
215
|
|
|
@@ -230,7 +231,7 @@ Running the engine produces a local workspace with these main areas:
|
|
|
230
231
|
- `state/analyses/`: model analysis output
|
|
231
232
|
- `state/code-index.json`: repo-aware code module aliases and local resolution data
|
|
232
233
|
- `state/benchmark.json`: latest benchmark/trust summary for the current vault
|
|
233
|
-
- `state/graph.json`: compiled graph
|
|
234
|
+
- `state/graph.json`: compiled graph, including semantic-similarity edges and hyperedge-style group patterns
|
|
234
235
|
- `state/search.sqlite`: full-text index
|
|
235
236
|
- `state/sessions/`: canonical session artifacts
|
|
236
237
|
- `state/approvals/`: staged review bundles from `compileVault({ approve: true })`
|
|
@@ -242,7 +243,7 @@ Saved outputs are indexed immediately into the graph page registry and search in
|
|
|
242
243
|
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.
|
|
243
244
|
Ingest, inbox import, compile, query, lint, review, and candidate operations also append human-readable entries to `wiki/log.md`.
|
|
244
245
|
PDF sources now go through a local text-extraction pass before analysis, and image sources use the configured `visionProvider` for structured OCR/diagram extraction when a real multimodal provider is available. When image extraction is unavailable, SwarmVault records an explicit warning in the extraction sidecar and carries that warning forward into analysis instead of silently treating the source as empty.
|
|
245
|
-
Compile and repo-refresh runs also keep benchmark artifacts current by default, so graph report consumers can show freshness and stale-state without requiring a separate benchmark command first.
|
|
246
|
+
Compile and repo-refresh runs also keep benchmark artifacts current by default, so graph report consumers can show freshness and stale-state without requiring a separate benchmark command first. The graph report now also carries deterministic “why this is surprising” explanations plus group-pattern sections built from hyperedges.
|
|
246
247
|
|
|
247
248
|
## Notes
|
|
248
249
|
|
package/dist/index.d.ts
CHANGED
|
@@ -401,6 +401,17 @@ interface GraphEdge {
|
|
|
401
401
|
evidenceClass: EvidenceClass;
|
|
402
402
|
confidence: number;
|
|
403
403
|
provenance: string[];
|
|
404
|
+
similarityReasons?: Array<"shared_concept" | "shared_entity" | "shared_tag" | "shared_symbol" | "shared_rationale_theme" | "shared_source_type">;
|
|
405
|
+
}
|
|
406
|
+
interface GraphHyperedge {
|
|
407
|
+
id: string;
|
|
408
|
+
label: string;
|
|
409
|
+
relation: "participate_in" | "implement" | "form";
|
|
410
|
+
nodeIds: string[];
|
|
411
|
+
evidenceClass: EvidenceClass;
|
|
412
|
+
confidence: number;
|
|
413
|
+
sourcePageIds: string[];
|
|
414
|
+
why: string;
|
|
404
415
|
}
|
|
405
416
|
interface GraphPage {
|
|
406
417
|
id: string;
|
|
@@ -433,6 +444,7 @@ interface GraphArtifact {
|
|
|
433
444
|
generatedAt: string;
|
|
434
445
|
nodes: GraphNode[];
|
|
435
446
|
edges: GraphEdge[];
|
|
447
|
+
hyperedges: GraphHyperedge[];
|
|
436
448
|
communities?: Array<{
|
|
437
449
|
id: string;
|
|
438
450
|
label: string;
|
|
@@ -442,7 +454,7 @@ interface GraphArtifact {
|
|
|
442
454
|
pages: GraphPage[];
|
|
443
455
|
}
|
|
444
456
|
interface GraphQueryMatch {
|
|
445
|
-
type: "node" | "page";
|
|
457
|
+
type: "node" | "page" | "hyperedge";
|
|
446
458
|
id: string;
|
|
447
459
|
label: string;
|
|
448
460
|
score: number;
|
|
@@ -454,6 +466,7 @@ interface GraphQueryResult {
|
|
|
454
466
|
seedPageIds: string[];
|
|
455
467
|
visitedNodeIds: string[];
|
|
456
468
|
visitedEdgeIds: string[];
|
|
469
|
+
hyperedgeIds: string[];
|
|
457
470
|
pageIds: string[];
|
|
458
471
|
communities: string[];
|
|
459
472
|
summary: string;
|
|
@@ -489,6 +502,7 @@ interface GraphExplainResult {
|
|
|
489
502
|
label: string;
|
|
490
503
|
};
|
|
491
504
|
neighbors: GraphExplainNeighbor[];
|
|
505
|
+
hyperedges: GraphHyperedge[];
|
|
492
506
|
summary: string;
|
|
493
507
|
}
|
|
494
508
|
interface ApprovalEntry {
|
|
@@ -868,9 +882,13 @@ interface GraphReportArtifact {
|
|
|
868
882
|
confidence: number;
|
|
869
883
|
pathNodeIds: string[];
|
|
870
884
|
pathEdgeIds: string[];
|
|
885
|
+
pathRelations: string[];
|
|
886
|
+
pathEvidenceClasses: EvidenceClass[];
|
|
871
887
|
pathSummary: string;
|
|
888
|
+
why: string;
|
|
872
889
|
explanation: string;
|
|
873
890
|
}>;
|
|
891
|
+
groupPatterns: GraphHyperedge[];
|
|
874
892
|
suggestedQuestions: string[];
|
|
875
893
|
communityPages: Array<{
|
|
876
894
|
id: string;
|
|
@@ -1059,6 +1077,8 @@ declare function queryGraphVault(rootDir: string, question: string, options?: {
|
|
|
1059
1077
|
declare function benchmarkVault(rootDir: string, options?: BenchmarkOptions): Promise<BenchmarkArtifact>;
|
|
1060
1078
|
declare function pathGraphVault(rootDir: string, from: string, to: string): Promise<GraphPathResult>;
|
|
1061
1079
|
declare function explainGraphVault(rootDir: string, target: string): Promise<GraphExplainResult>;
|
|
1080
|
+
declare function listGraphHyperedges(rootDir: string, target?: string, limit?: number): Promise<GraphHyperedge[]>;
|
|
1081
|
+
declare function readGraphReport(rootDir: string): Promise<GraphReportArtifact | null>;
|
|
1062
1082
|
declare function listGodNodes(rootDir: string, limit?: number): Promise<GraphNode[]>;
|
|
1063
1083
|
declare function listPages(rootDir: string): Promise<GraphPage[]>;
|
|
1064
1084
|
declare function readPage(rootDir: string, relativePath: string): Promise<{
|
|
@@ -1112,4 +1132,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
|
|
|
1112
1132
|
declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
|
|
1113
1133
|
declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
|
|
1114
1134
|
|
|
1115
|
-
export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryStatus, type ApprovalManifest, type ApprovalSummary, type BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type DirectoryIngestResult, type DirectoryIngestSkip, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphNode, type GraphPage, type GraphPathResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InstallAgentOptions, type LintFinding, type LintOptions, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RepoSyncResult, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceExtractionArtifact, type SourceKind, type SourceManifest, type SourceRationale, type VaultConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, agentTypeSchema, archiveCandidate, assertProviderCapability, benchmarkVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, importInbox, ingestDirectory, ingestInput, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listManifests, listPages, listSchedules, listTrackedRepoRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, promoteCandidate, providerCapabilitySchema, providerTypeSchema, queryGraphVault, queryVault, readApproval, readExtractedText, readPage, rejectApproval, resolvePaths, runSchedule, runWatchCycle, searchVault, serveSchedules, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
|
|
1135
|
+
export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryStatus, type ApprovalManifest, type ApprovalSummary, type BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type DirectoryIngestResult, type DirectoryIngestSkip, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InstallAgentOptions, type LintFinding, type LintOptions, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RepoSyncResult, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceExtractionArtifact, type SourceKind, type SourceManifest, type SourceRationale, type VaultConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, agentTypeSchema, archiveCandidate, assertProviderCapability, benchmarkVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, importInbox, ingestDirectory, ingestInput, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManifests, listPages, listSchedules, listTrackedRepoRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, promoteCandidate, providerCapabilitySchema, providerTypeSchema, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, rejectApproval, resolvePaths, runSchedule, runWatchCycle, searchVault, serveSchedules, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
|