@swarmvaultai/engine 0.1.19 → 0.1.21
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 +43 -4
- package/dist/chunk-QMW7OISM.js +1063 -0
- package/dist/index.d.ts +113 -3
- package/dist/index.js +2282 -577
- package/dist/registry-X5PMZTZY.js +12 -0
- package/dist/viewer/assets/index-DEETVhXx.js +330 -0
- package/dist/viewer/index.html +1 -1
- package/dist/viewer/lib.d.ts +35 -1
- package/dist/viewer/lib.js +15 -0
- package/package.json +1 -1
- package/dist/viewer/assets/index-DWUwoLny.js +0 -330
package/dist/index.d.ts
CHANGED
|
@@ -47,12 +47,13 @@ type Polarity = "positive" | "negative" | "neutral";
|
|
|
47
47
|
type OutputOrigin = "query" | "explore";
|
|
48
48
|
type OutputFormat = "markdown" | "report" | "slides" | "chart" | "image";
|
|
49
49
|
type OutputAssetRole = "primary" | "preview" | "manifest" | "poster";
|
|
50
|
+
type GraphExportFormat = "html" | "svg" | "graphml" | "cypher";
|
|
50
51
|
type PageStatus = "draft" | "candidate" | "active" | "archived";
|
|
51
52
|
type PageManager = "system" | "human";
|
|
52
53
|
type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
|
|
53
54
|
type ApprovalChangeType = "create" | "update" | "delete" | "promote";
|
|
54
55
|
type SourceKind = "markdown" | "text" | "pdf" | "image" | "html" | "binary" | "code";
|
|
55
|
-
type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java" | "csharp" | "c" | "cpp" | "php";
|
|
56
|
+
type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java" | "csharp" | "c" | "cpp" | "php" | "ruby" | "powershell";
|
|
56
57
|
type CodeSymbolKind = "function" | "class" | "interface" | "type_alias" | "enum" | "variable" | "struct" | "trait";
|
|
57
58
|
type OrchestrationRole = "research" | "audit" | "context" | "safety";
|
|
58
59
|
declare const webSearchProviderTypeSchema: z.ZodEnum<{
|
|
@@ -193,9 +194,13 @@ interface ResolvedPaths {
|
|
|
193
194
|
searchDbPath: string;
|
|
194
195
|
compileStatePath: string;
|
|
195
196
|
codeIndexPath: string;
|
|
197
|
+
benchmarkPath: string;
|
|
196
198
|
jobsLogPath: string;
|
|
197
199
|
sessionsDir: string;
|
|
198
200
|
approvalsDir: string;
|
|
201
|
+
watchDir: string;
|
|
202
|
+
watchStatusPath: string;
|
|
203
|
+
pendingSemanticRefreshPath: string;
|
|
199
204
|
configPath: string;
|
|
200
205
|
}
|
|
201
206
|
interface SourceAttachment {
|
|
@@ -562,6 +567,28 @@ interface InboxImportResult {
|
|
|
562
567
|
interface WatchOptions {
|
|
563
568
|
lint?: boolean;
|
|
564
569
|
debounceMs?: number;
|
|
570
|
+
repo?: boolean;
|
|
571
|
+
}
|
|
572
|
+
interface PendingSemanticRefreshEntry {
|
|
573
|
+
id: string;
|
|
574
|
+
repoRoot: string;
|
|
575
|
+
path: string;
|
|
576
|
+
changeType: "added" | "modified" | "removed";
|
|
577
|
+
detectedAt: string;
|
|
578
|
+
sourceId?: string;
|
|
579
|
+
sourceKind?: SourceKind;
|
|
580
|
+
}
|
|
581
|
+
interface RepoSyncResult {
|
|
582
|
+
repoRoots: string[];
|
|
583
|
+
scannedCount: number;
|
|
584
|
+
imported: SourceManifest[];
|
|
585
|
+
updated: SourceManifest[];
|
|
586
|
+
removed: SourceManifest[];
|
|
587
|
+
skipped: DirectoryIngestSkip[];
|
|
588
|
+
}
|
|
589
|
+
interface WatchRepoSyncResult extends RepoSyncResult {
|
|
590
|
+
pendingSemanticRefresh: PendingSemanticRefreshEntry[];
|
|
591
|
+
staleSourceIds: string[];
|
|
565
592
|
}
|
|
566
593
|
interface WatchRunRecord {
|
|
567
594
|
startedAt: string;
|
|
@@ -573,13 +600,33 @@ interface WatchRunRecord {
|
|
|
573
600
|
scannedCount: number;
|
|
574
601
|
attachmentCount: number;
|
|
575
602
|
changedPages: string[];
|
|
603
|
+
repoImportedCount?: number;
|
|
604
|
+
repoUpdatedCount?: number;
|
|
605
|
+
repoRemovedCount?: number;
|
|
606
|
+
repoScannedCount?: number;
|
|
607
|
+
pendingSemanticRefreshCount?: number;
|
|
608
|
+
pendingSemanticRefreshPaths?: string[];
|
|
576
609
|
lintFindingCount?: number;
|
|
577
610
|
success: boolean;
|
|
578
611
|
error?: string;
|
|
579
612
|
}
|
|
613
|
+
interface WatchStatusResult {
|
|
614
|
+
generatedAt: string;
|
|
615
|
+
watchedRepoRoots: string[];
|
|
616
|
+
lastRun?: WatchRunRecord;
|
|
617
|
+
pendingSemanticRefresh: PendingSemanticRefreshEntry[];
|
|
618
|
+
}
|
|
580
619
|
interface WatchController {
|
|
581
620
|
close(): Promise<void>;
|
|
582
621
|
}
|
|
622
|
+
interface InstallAgentOptions {
|
|
623
|
+
claudeHook?: boolean;
|
|
624
|
+
}
|
|
625
|
+
interface GitHookStatus {
|
|
626
|
+
repoRoot: string | null;
|
|
627
|
+
postCommit: "installed" | "not_installed" | "other_content";
|
|
628
|
+
postCheckout: "installed" | "not_installed" | "other_content";
|
|
629
|
+
}
|
|
583
630
|
interface CompileState {
|
|
584
631
|
generatedAt: string;
|
|
585
632
|
rootSchemaHash: string;
|
|
@@ -681,6 +728,42 @@ interface SceneSpec {
|
|
|
681
728
|
height?: number;
|
|
682
729
|
elements: SceneElement[];
|
|
683
730
|
}
|
|
731
|
+
interface GraphExportResult {
|
|
732
|
+
format: GraphExportFormat;
|
|
733
|
+
outputPath: string;
|
|
734
|
+
}
|
|
735
|
+
interface AddOptions extends IngestOptions {
|
|
736
|
+
author?: string;
|
|
737
|
+
contributor?: string;
|
|
738
|
+
}
|
|
739
|
+
interface AddResult {
|
|
740
|
+
captureType: "arxiv" | "tweet" | "url";
|
|
741
|
+
manifest: SourceManifest;
|
|
742
|
+
normalizedUrl: string;
|
|
743
|
+
title: string;
|
|
744
|
+
fallback: boolean;
|
|
745
|
+
}
|
|
746
|
+
interface BenchmarkQuestionResult {
|
|
747
|
+
question: string;
|
|
748
|
+
queryTokens: number;
|
|
749
|
+
reduction: number;
|
|
750
|
+
visitedNodeIds: string[];
|
|
751
|
+
pageIds: string[];
|
|
752
|
+
}
|
|
753
|
+
interface BenchmarkArtifact {
|
|
754
|
+
generatedAt: string;
|
|
755
|
+
corpusWords: number;
|
|
756
|
+
corpusTokens: number;
|
|
757
|
+
nodes: number;
|
|
758
|
+
edges: number;
|
|
759
|
+
avgQueryTokens: number;
|
|
760
|
+
reductionRatio: number;
|
|
761
|
+
sampleQuestions: string[];
|
|
762
|
+
perQuestion: BenchmarkQuestionResult[];
|
|
763
|
+
}
|
|
764
|
+
interface BenchmarkOptions {
|
|
765
|
+
questions?: string[];
|
|
766
|
+
}
|
|
684
767
|
interface ScheduledCompileTask {
|
|
685
768
|
type: "compile";
|
|
686
769
|
approve?: boolean;
|
|
@@ -776,7 +859,7 @@ interface ScheduleController {
|
|
|
776
859
|
close(): Promise<void>;
|
|
777
860
|
}
|
|
778
861
|
|
|
779
|
-
declare function installAgent(rootDir: string, agent: AgentType): Promise<string>;
|
|
862
|
+
declare function installAgent(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<string>;
|
|
780
863
|
declare function installConfiguredAgents(rootDir: string): Promise<string[]>;
|
|
781
864
|
|
|
782
865
|
declare function defaultVaultConfig(): VaultConfig;
|
|
@@ -791,7 +874,17 @@ declare function initWorkspace(rootDir: string): Promise<{
|
|
|
791
874
|
paths: ResolvedPaths;
|
|
792
875
|
}>;
|
|
793
876
|
|
|
877
|
+
declare function exportGraphFormat(rootDir: string, format: Exclude<GraphExportFormat, "html">, outputPath: string): Promise<GraphExportResult>;
|
|
878
|
+
|
|
879
|
+
declare function getGitHookStatus(rootDir: string): Promise<GitHookStatus>;
|
|
880
|
+
declare function installGitHooks(rootDir: string): Promise<GitHookStatus>;
|
|
881
|
+
declare function uninstallGitHooks(rootDir: string): Promise<GitHookStatus>;
|
|
882
|
+
|
|
883
|
+
declare function listTrackedRepoRoots(rootDir: string): Promise<string[]>;
|
|
884
|
+
declare function syncTrackedRepos(rootDir: string, options?: IngestOptions, repoRoots?: string[]): Promise<RepoSyncResult>;
|
|
885
|
+
declare function syncTrackedReposForWatch(rootDir: string, options?: IngestOptions, repoRoots?: string[]): Promise<WatchRepoSyncResult>;
|
|
794
886
|
declare function ingestInput(rootDir: string, input: string, options?: IngestOptions): Promise<SourceManifest>;
|
|
887
|
+
declare function addInput(rootDir: string, input: string, options?: AddOptions): Promise<AddResult>;
|
|
795
888
|
declare function ingestDirectory(rootDir: string, inputDir: string, options?: IngestOptions): Promise<DirectoryIngestResult>;
|
|
796
889
|
declare function importInbox(rootDir: string, inputDir?: string): Promise<InboxImportResult>;
|
|
797
890
|
declare function listManifests(rootDir: string): Promise<SourceManifest[]>;
|
|
@@ -842,6 +935,7 @@ declare function queryGraphVault(rootDir: string, question: string, options?: {
|
|
|
842
935
|
traversal?: "bfs" | "dfs";
|
|
843
936
|
budget?: number;
|
|
844
937
|
}): Promise<GraphQueryResult>;
|
|
938
|
+
declare function benchmarkVault(rootDir: string, options?: BenchmarkOptions): Promise<BenchmarkArtifact>;
|
|
845
939
|
declare function pathGraphVault(rootDir: string, from: string, to: string): Promise<GraphPathResult>;
|
|
846
940
|
declare function explainGraphVault(rootDir: string, target: string): Promise<GraphExplainResult>;
|
|
847
941
|
declare function listGodNodes(rootDir: string, limit?: number): Promise<GraphNode[]>;
|
|
@@ -876,9 +970,25 @@ declare function startGraphServer(rootDir: string, port?: number): Promise<{
|
|
|
876
970
|
}>;
|
|
877
971
|
declare function exportGraphHtml(rootDir: string, outputPath: string): Promise<string>;
|
|
878
972
|
|
|
973
|
+
type WatchCycleResult = {
|
|
974
|
+
watchedRepoRoots: string[];
|
|
975
|
+
importedCount: number;
|
|
976
|
+
scannedCount: number;
|
|
977
|
+
attachmentCount: number;
|
|
978
|
+
repoImportedCount: number;
|
|
979
|
+
repoUpdatedCount: number;
|
|
980
|
+
repoRemovedCount: number;
|
|
981
|
+
repoScannedCount: number;
|
|
982
|
+
pendingSemanticRefreshCount: number;
|
|
983
|
+
pendingSemanticRefreshPaths: string[];
|
|
984
|
+
changedPages: string[];
|
|
985
|
+
lintFindingCount?: number;
|
|
986
|
+
};
|
|
987
|
+
declare function runWatchCycle(rootDir: string, options?: WatchOptions): Promise<WatchCycleResult>;
|
|
879
988
|
declare function watchVault(rootDir: string, options?: WatchOptions): Promise<WatchController>;
|
|
989
|
+
declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
|
|
880
990
|
|
|
881
991
|
declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
|
|
882
992
|
declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
|
|
883
993
|
|
|
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 };
|
|
994
|
+
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 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 GitHookStatus, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphNode, type GraphPage, type GraphPathResult, type GraphQueryMatch, type GraphQueryResult, type ImageGenerationRequest, type ImageGenerationResponse, 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 SourceClaim, 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 };
|