@swarmvaultai/engine 0.1.21 → 0.1.23

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/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ type PageManager = "system" | "human";
53
53
  type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
54
54
  type ApprovalChangeType = "create" | "update" | "delete" | "promote";
55
55
  type SourceKind = "markdown" | "text" | "pdf" | "image" | "html" | "binary" | "code";
56
+ type SourceCaptureType = "arxiv" | "doi" | "tweet" | "article" | "url";
56
57
  type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java" | "csharp" | "c" | "cpp" | "php" | "ruby" | "powershell";
57
58
  type CodeSymbolKind = "function" | "class" | "interface" | "type_alias" | "enum" | "variable" | "struct" | "trait";
58
59
  type OrchestrationRole = "research" | "audit" | "context" | "safety";
@@ -163,6 +164,11 @@ interface VaultConfig {
163
164
  agents: AgentType[];
164
165
  schedules?: Record<string, ScheduleJobConfig>;
165
166
  orchestration?: OrchestrationConfig;
167
+ benchmark?: {
168
+ enabled?: boolean;
169
+ questions?: string[];
170
+ maxQuestions?: number;
171
+ };
166
172
  webSearch?: {
167
173
  providers: Record<string, WebSearchProviderConfig>;
168
174
  tasks: {
@@ -208,6 +214,37 @@ interface SourceAttachment {
208
214
  mimeType: string;
209
215
  originalPath?: string;
210
216
  }
217
+ type ExtractionKind = "plain_text" | "html_readability" | "pdf_text" | "image_vision";
218
+ interface ExtractionTerm {
219
+ name: string;
220
+ description: string;
221
+ }
222
+ interface ExtractionClaim {
223
+ text: string;
224
+ confidence: number;
225
+ polarity: Polarity;
226
+ }
227
+ interface ImageVisionExtraction {
228
+ title?: string;
229
+ summary: string;
230
+ text: string;
231
+ concepts: ExtractionTerm[];
232
+ entities: ExtractionTerm[];
233
+ claims: ExtractionClaim[];
234
+ questions: string[];
235
+ }
236
+ interface SourceExtractionArtifact {
237
+ extractor: ExtractionKind;
238
+ sourceKind: SourceKind;
239
+ mimeType: string;
240
+ producedAt: string;
241
+ providerId?: string;
242
+ providerModel?: string;
243
+ warnings?: string[];
244
+ pageCount?: number;
245
+ metadata?: Record<string, string>;
246
+ vision?: ImageVisionExtraction;
247
+ }
211
248
  interface IngestOptions {
212
249
  includeAssets?: boolean;
213
250
  maxAssetSize?: number;
@@ -234,12 +271,15 @@ interface SourceManifest {
234
271
  title: string;
235
272
  originType: "file" | "url";
236
273
  sourceKind: SourceKind;
274
+ sourceType?: SourceCaptureType;
237
275
  language?: CodeLanguage;
238
276
  originalPath?: string;
239
277
  repoRelativePath?: string;
240
278
  url?: string;
241
279
  storedPath: string;
242
280
  extractedTextPath?: string;
281
+ extractedMetadataPath?: string;
282
+ extractionHash?: string;
243
283
  mimeType: string;
244
284
  contentHash: string;
245
285
  createdAt: string;
@@ -323,6 +363,7 @@ interface SourceAnalysis {
323
363
  analysisVersion: number;
324
364
  sourceId: string;
325
365
  sourceHash: string;
366
+ extractionHash?: string;
326
367
  schemaHash: string;
327
368
  title: string;
328
369
  summary: string;
@@ -366,6 +407,7 @@ interface GraphPage {
366
407
  path: string;
367
408
  title: string;
368
409
  kind: PageKind;
410
+ sourceType?: SourceCaptureType;
369
411
  sourceIds: string[];
370
412
  projectIds: string[];
371
413
  nodeIds: string[];
@@ -520,6 +562,7 @@ interface SearchResult {
520
562
  kind?: PageKind;
521
563
  status?: PageStatus;
522
564
  projectIds: string[];
565
+ sourceType?: SourceCaptureType;
523
566
  }
524
567
  interface QueryOptions {
525
568
  question: string;
@@ -737,7 +780,7 @@ interface AddOptions extends IngestOptions {
737
780
  contributor?: string;
738
781
  }
739
782
  interface AddResult {
740
- captureType: "arxiv" | "tweet" | "url";
783
+ captureType: SourceCaptureType;
741
784
  manifest: SourceManifest;
742
785
  normalizedUrl: string;
743
786
  title: string;
@@ -748,10 +791,20 @@ interface BenchmarkQuestionResult {
748
791
  queryTokens: number;
749
792
  reduction: number;
750
793
  visitedNodeIds: string[];
794
+ visitedEdgeIds: string[];
751
795
  pageIds: string[];
752
796
  }
797
+ interface BenchmarkSummary {
798
+ questionCount: number;
799
+ uniqueVisitedNodes: number;
800
+ finalContextTokens: number;
801
+ naiveCorpusTokens: number;
802
+ avgReduction: number;
803
+ reductionRatio: number;
804
+ }
753
805
  interface BenchmarkArtifact {
754
806
  generatedAt: string;
807
+ graphHash: string;
755
808
  corpusWords: number;
756
809
  corpusTokens: number;
757
810
  nodes: number;
@@ -760,9 +813,77 @@ interface BenchmarkArtifact {
760
813
  reductionRatio: number;
761
814
  sampleQuestions: string[];
762
815
  perQuestion: BenchmarkQuestionResult[];
816
+ questionResults: BenchmarkQuestionResult[];
817
+ summary: BenchmarkSummary;
763
818
  }
764
819
  interface BenchmarkOptions {
765
820
  questions?: string[];
821
+ maxQuestions?: number;
822
+ }
823
+ interface GraphReportArtifact {
824
+ generatedAt: string;
825
+ graphHash: string;
826
+ overview: {
827
+ nodes: number;
828
+ edges: number;
829
+ pages: number;
830
+ communities: number;
831
+ };
832
+ benchmark?: {
833
+ generatedAt: string;
834
+ stale: boolean;
835
+ summary: BenchmarkSummary;
836
+ questionCount: number;
837
+ };
838
+ godNodes: Array<{
839
+ nodeId: string;
840
+ label: string;
841
+ pageId?: string;
842
+ degree?: number;
843
+ bridgeScore?: number;
844
+ }>;
845
+ bridgeNodes: Array<{
846
+ nodeId: string;
847
+ label: string;
848
+ pageId?: string;
849
+ degree?: number;
850
+ bridgeScore?: number;
851
+ }>;
852
+ thinCommunities: Array<{
853
+ id: string;
854
+ label: string;
855
+ nodeCount: number;
856
+ pageId?: string;
857
+ path?: string;
858
+ title?: string;
859
+ }>;
860
+ surprisingConnections: Array<{
861
+ id: string;
862
+ sourceNodeId: string;
863
+ sourceLabel: string;
864
+ targetNodeId: string;
865
+ targetLabel: string;
866
+ relation: string;
867
+ evidenceClass: EvidenceClass;
868
+ confidence: number;
869
+ pathNodeIds: string[];
870
+ pathEdgeIds: string[];
871
+ pathSummary: string;
872
+ explanation: string;
873
+ }>;
874
+ suggestedQuestions: string[];
875
+ communityPages: Array<{
876
+ id: string;
877
+ path: string;
878
+ title: string;
879
+ }>;
880
+ recentResearchSources: Array<{
881
+ pageId: string;
882
+ path: string;
883
+ title: string;
884
+ sourceType: SourceCaptureType;
885
+ updatedAt: string;
886
+ }>;
766
887
  }
767
888
  interface ScheduledCompileTask {
768
889
  type: "compile";
@@ -991,4 +1112,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
991
1112
  declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
992
1113
  declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
993
1114
 
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 };
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 };