@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/dist/index.d.ts
CHANGED
|
@@ -39,9 +39,10 @@ declare const agentTypeSchema: z.ZodEnum<{
|
|
|
39
39
|
opencode: "opencode";
|
|
40
40
|
}>;
|
|
41
41
|
type AgentType = z.infer<typeof agentTypeSchema>;
|
|
42
|
-
type PageKind = "index" | "source" | "module" | "concept" | "entity" | "output" | "insight";
|
|
42
|
+
type PageKind = "index" | "source" | "module" | "concept" | "entity" | "output" | "insight" | "graph_report" | "community_summary";
|
|
43
43
|
type Freshness = "fresh" | "stale";
|
|
44
44
|
type ClaimStatus = "extracted" | "inferred" | "conflicted" | "stale";
|
|
45
|
+
type EvidenceClass = "extracted" | "inferred" | "ambiguous";
|
|
45
46
|
type Polarity = "positive" | "negative" | "neutral";
|
|
46
47
|
type OutputOrigin = "query" | "explore";
|
|
47
48
|
type OutputFormat = "markdown" | "report" | "slides" | "chart" | "image";
|
|
@@ -51,8 +52,8 @@ type PageManager = "system" | "human";
|
|
|
51
52
|
type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
|
|
52
53
|
type ApprovalChangeType = "create" | "update" | "delete" | "promote";
|
|
53
54
|
type SourceKind = "markdown" | "text" | "pdf" | "image" | "html" | "binary" | "code";
|
|
54
|
-
type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java";
|
|
55
|
-
type CodeSymbolKind = "function" | "class" | "interface" | "type_alias" | "enum" | "variable";
|
|
55
|
+
type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java" | "csharp" | "c" | "cpp" | "php";
|
|
56
|
+
type CodeSymbolKind = "function" | "class" | "interface" | "type_alias" | "enum" | "variable" | "struct" | "trait";
|
|
56
57
|
type OrchestrationRole = "research" | "audit" | "context" | "safety";
|
|
57
58
|
declare const webSearchProviderTypeSchema: z.ZodEnum<{
|
|
58
59
|
custom: "custom";
|
|
@@ -191,6 +192,7 @@ interface ResolvedPaths {
|
|
|
191
192
|
graphPath: string;
|
|
192
193
|
searchDbPath: string;
|
|
193
194
|
compileStatePath: string;
|
|
195
|
+
codeIndexPath: string;
|
|
194
196
|
jobsLogPath: string;
|
|
195
197
|
sessionsDir: string;
|
|
196
198
|
approvalsDir: string;
|
|
@@ -204,6 +206,23 @@ interface SourceAttachment {
|
|
|
204
206
|
interface IngestOptions {
|
|
205
207
|
includeAssets?: boolean;
|
|
206
208
|
maxAssetSize?: number;
|
|
209
|
+
repoRoot?: string;
|
|
210
|
+
include?: string[];
|
|
211
|
+
exclude?: string[];
|
|
212
|
+
maxFiles?: number;
|
|
213
|
+
gitignore?: boolean;
|
|
214
|
+
}
|
|
215
|
+
interface DirectoryIngestSkip {
|
|
216
|
+
path: string;
|
|
217
|
+
reason: string;
|
|
218
|
+
}
|
|
219
|
+
interface DirectoryIngestResult {
|
|
220
|
+
inputDir: string;
|
|
221
|
+
repoRoot: string;
|
|
222
|
+
scannedCount: number;
|
|
223
|
+
imported: SourceManifest[];
|
|
224
|
+
updated: SourceManifest[];
|
|
225
|
+
skipped: DirectoryIngestSkip[];
|
|
207
226
|
}
|
|
208
227
|
interface SourceManifest {
|
|
209
228
|
sourceId: string;
|
|
@@ -212,6 +231,7 @@ interface SourceManifest {
|
|
|
212
231
|
sourceKind: SourceKind;
|
|
213
232
|
language?: CodeLanguage;
|
|
214
233
|
originalPath?: string;
|
|
234
|
+
repoRelativePath?: string;
|
|
215
235
|
url?: string;
|
|
216
236
|
storedPath: string;
|
|
217
237
|
extractedTextPath?: string;
|
|
@@ -242,6 +262,8 @@ interface CodeImport {
|
|
|
242
262
|
isTypeOnly?: boolean;
|
|
243
263
|
isExternal: boolean;
|
|
244
264
|
reExport: boolean;
|
|
265
|
+
resolvedSourceId?: string;
|
|
266
|
+
resolvedRepoPath?: string;
|
|
245
267
|
}
|
|
246
268
|
interface CodeDiagnostic {
|
|
247
269
|
code: number;
|
|
@@ -263,13 +285,37 @@ interface CodeSymbol {
|
|
|
263
285
|
interface CodeAnalysis {
|
|
264
286
|
moduleId: string;
|
|
265
287
|
language: CodeLanguage;
|
|
288
|
+
moduleName?: string;
|
|
289
|
+
namespace?: string;
|
|
266
290
|
imports: CodeImport[];
|
|
267
291
|
dependencies: string[];
|
|
268
292
|
symbols: CodeSymbol[];
|
|
269
293
|
exports: string[];
|
|
270
294
|
diagnostics: CodeDiagnostic[];
|
|
271
295
|
}
|
|
296
|
+
interface SourceRationale {
|
|
297
|
+
id: string;
|
|
298
|
+
text: string;
|
|
299
|
+
citation: string;
|
|
300
|
+
kind: "docstring" | "comment" | "marker";
|
|
301
|
+
symbolName?: string;
|
|
302
|
+
}
|
|
303
|
+
interface CodeIndexEntry {
|
|
304
|
+
sourceId: string;
|
|
305
|
+
moduleId: string;
|
|
306
|
+
language: CodeLanguage;
|
|
307
|
+
repoRelativePath?: string;
|
|
308
|
+
originalPath?: string;
|
|
309
|
+
moduleName?: string;
|
|
310
|
+
namespace?: string;
|
|
311
|
+
aliases: string[];
|
|
312
|
+
}
|
|
313
|
+
interface CodeIndexArtifact {
|
|
314
|
+
generatedAt: string;
|
|
315
|
+
entries: CodeIndexEntry[];
|
|
316
|
+
}
|
|
272
317
|
interface SourceAnalysis {
|
|
318
|
+
analysisVersion: number;
|
|
273
319
|
sourceId: string;
|
|
274
320
|
sourceHash: string;
|
|
275
321
|
schemaHash: string;
|
|
@@ -279,12 +325,13 @@ interface SourceAnalysis {
|
|
|
279
325
|
entities: AnalyzedTerm[];
|
|
280
326
|
claims: SourceClaim[];
|
|
281
327
|
questions: string[];
|
|
328
|
+
rationales: SourceRationale[];
|
|
282
329
|
code?: CodeAnalysis;
|
|
283
330
|
producedAt: string;
|
|
284
331
|
}
|
|
285
332
|
interface GraphNode {
|
|
286
333
|
id: string;
|
|
287
|
-
type: "source" | "concept" | "entity" | "module" | "symbol";
|
|
334
|
+
type: "source" | "concept" | "entity" | "module" | "symbol" | "rationale";
|
|
288
335
|
label: string;
|
|
289
336
|
pageId?: string;
|
|
290
337
|
freshness?: Freshness;
|
|
@@ -305,6 +352,7 @@ interface GraphEdge {
|
|
|
305
352
|
target: string;
|
|
306
353
|
relation: string;
|
|
307
354
|
status: ClaimStatus;
|
|
355
|
+
evidenceClass: EvidenceClass;
|
|
308
356
|
confidence: number;
|
|
309
357
|
provenance: string[];
|
|
310
358
|
}
|
|
@@ -346,6 +394,56 @@ interface GraphArtifact {
|
|
|
346
394
|
sources: SourceManifest[];
|
|
347
395
|
pages: GraphPage[];
|
|
348
396
|
}
|
|
397
|
+
interface GraphQueryMatch {
|
|
398
|
+
type: "node" | "page";
|
|
399
|
+
id: string;
|
|
400
|
+
label: string;
|
|
401
|
+
score: number;
|
|
402
|
+
}
|
|
403
|
+
interface GraphQueryResult {
|
|
404
|
+
question: string;
|
|
405
|
+
traversal: "bfs" | "dfs";
|
|
406
|
+
seedNodeIds: string[];
|
|
407
|
+
seedPageIds: string[];
|
|
408
|
+
visitedNodeIds: string[];
|
|
409
|
+
visitedEdgeIds: string[];
|
|
410
|
+
pageIds: string[];
|
|
411
|
+
communities: string[];
|
|
412
|
+
summary: string;
|
|
413
|
+
matches: GraphQueryMatch[];
|
|
414
|
+
}
|
|
415
|
+
interface GraphPathResult {
|
|
416
|
+
from: string;
|
|
417
|
+
to: string;
|
|
418
|
+
resolvedFromNodeId?: string;
|
|
419
|
+
resolvedToNodeId?: string;
|
|
420
|
+
found: boolean;
|
|
421
|
+
nodeIds: string[];
|
|
422
|
+
edgeIds: string[];
|
|
423
|
+
pageIds: string[];
|
|
424
|
+
summary: string;
|
|
425
|
+
}
|
|
426
|
+
interface GraphExplainNeighbor {
|
|
427
|
+
nodeId: string;
|
|
428
|
+
label: string;
|
|
429
|
+
type: GraphNode["type"];
|
|
430
|
+
pageId?: string;
|
|
431
|
+
relation: string;
|
|
432
|
+
direction: "incoming" | "outgoing";
|
|
433
|
+
confidence: number;
|
|
434
|
+
evidenceClass: EvidenceClass;
|
|
435
|
+
}
|
|
436
|
+
interface GraphExplainResult {
|
|
437
|
+
target: string;
|
|
438
|
+
node: GraphNode;
|
|
439
|
+
page?: GraphPage;
|
|
440
|
+
community?: {
|
|
441
|
+
id: string;
|
|
442
|
+
label: string;
|
|
443
|
+
};
|
|
444
|
+
neighbors: GraphExplainNeighbor[];
|
|
445
|
+
summary: string;
|
|
446
|
+
}
|
|
349
447
|
interface ApprovalEntry {
|
|
350
448
|
pageId: string;
|
|
351
449
|
title: string;
|
|
@@ -694,6 +792,7 @@ declare function initWorkspace(rootDir: string): Promise<{
|
|
|
694
792
|
}>;
|
|
695
793
|
|
|
696
794
|
declare function ingestInput(rootDir: string, input: string, options?: IngestOptions): Promise<SourceManifest>;
|
|
795
|
+
declare function ingestDirectory(rootDir: string, inputDir: string, options?: IngestOptions): Promise<DirectoryIngestResult>;
|
|
697
796
|
declare function importInbox(rootDir: string, inputDir?: string): Promise<InboxImportResult>;
|
|
698
797
|
declare function listManifests(rootDir: string): Promise<SourceManifest[]>;
|
|
699
798
|
declare function readExtractedText(rootDir: string, manifest: SourceManifest): Promise<string | undefined>;
|
|
@@ -739,6 +838,13 @@ declare function compileVault(rootDir: string, options?: CompileOptions): Promis
|
|
|
739
838
|
declare function queryVault(rootDir: string, options: QueryOptions): Promise<QueryResult>;
|
|
740
839
|
declare function exploreVault(rootDir: string, options: ExploreOptions): Promise<ExploreResult>;
|
|
741
840
|
declare function searchVault(rootDir: string, query: string, limit?: number): Promise<SearchResult[]>;
|
|
841
|
+
declare function queryGraphVault(rootDir: string, question: string, options?: {
|
|
842
|
+
traversal?: "bfs" | "dfs";
|
|
843
|
+
budget?: number;
|
|
844
|
+
}): Promise<GraphQueryResult>;
|
|
845
|
+
declare function pathGraphVault(rootDir: string, from: string, to: string): Promise<GraphPathResult>;
|
|
846
|
+
declare function explainGraphVault(rootDir: string, target: string): Promise<GraphExplainResult>;
|
|
847
|
+
declare function listGodNodes(rootDir: string, limit?: number): Promise<GraphNode[]>;
|
|
742
848
|
declare function listPages(rootDir: string): Promise<GraphPage[]>;
|
|
743
849
|
declare function readPage(rootDir: string, relativePath: string): Promise<{
|
|
744
850
|
path: string;
|
|
@@ -775,4 +881,4 @@ declare function watchVault(rootDir: string, options?: WatchOptions): Promise<Wa
|
|
|
775
881
|
declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
|
|
776
882
|
declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
|
|
777
883
|
|
|
778
|
-
export { type AgentType, type AnalyzedTerm, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryStatus, type ApprovalManifest, type ApprovalSummary, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ExploreOptions, type ExploreResult, type ExploreStepResult, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GraphArtifact, type GraphEdge, type GraphNode, type GraphPage, type ImageGenerationRequest, type ImageGenerationResponse, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, 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 Polarity, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, 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 SourceClaim, type SourceKind, type SourceManifest, type VaultConfig, type WatchController, type WatchOptions, type WatchRunRecord, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, agentTypeSchema, archiveCandidate, assertProviderCapability, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, exploreVault, exportGraphHtml, getProviderForTask, getWebSearchAdapterForTask, getWorkspaceInfo, importInbox, ingestInput, initVault, initWorkspace, installAgent, installConfiguredAgents, lintVault, listApprovals, listCandidates, listManifests, listPages, listSchedules, loadVaultConfig, loadVaultSchema, loadVaultSchemas, promoteCandidate, providerCapabilitySchema, providerTypeSchema, queryVault, readApproval, readExtractedText, readPage, rejectApproval, resolvePaths, runSchedule, searchVault, serveSchedules, startGraphServer, startMcpServer, watchVault, webSearchProviderTypeSchema };
|
|
884
|
+
export { type AgentType, type AnalyzedTerm, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryStatus, type ApprovalManifest, type ApprovalSummary, 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 Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphNode, type GraphPage, type GraphPathResult, type GraphQueryMatch, type GraphQueryResult, type ImageGenerationRequest, type ImageGenerationResponse, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, 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 Polarity, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, 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 SourceClaim, type SourceKind, type SourceManifest, type SourceRationale, type VaultConfig, type WatchController, type WatchOptions, type WatchRunRecord, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, agentTypeSchema, archiveCandidate, assertProviderCapability, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, explainGraphVault, exploreVault, exportGraphHtml, getProviderForTask, getWebSearchAdapterForTask, getWorkspaceInfo, importInbox, ingestDirectory, ingestInput, initVault, initWorkspace, installAgent, installConfiguredAgents, lintVault, listApprovals, listCandidates, listGodNodes, listManifests, listPages, listSchedules, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, promoteCandidate, providerCapabilitySchema, providerTypeSchema, queryGraphVault, queryVault, readApproval, readExtractedText, readPage, rejectApproval, resolvePaths, runSchedule, searchVault, serveSchedules, startGraphServer, startMcpServer, watchVault, webSearchProviderTypeSchema };
|