@swarmvaultai/engine 0.1.24 → 0.1.26

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
@@ -54,6 +54,7 @@ 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
56
  type SourceCaptureType = "arxiv" | "doi" | "tweet" | "article" | "url";
57
+ type SourceClass = "first_party" | "third_party" | "resource" | "generated";
57
58
  type CodeLanguage = "javascript" | "jsx" | "typescript" | "tsx" | "python" | "go" | "rust" | "java" | "csharp" | "c" | "cpp" | "php" | "ruby" | "powershell";
58
59
  type CodeSymbolKind = "function" | "class" | "interface" | "type_alias" | "enum" | "variable" | "struct" | "trait";
59
60
  type OrchestrationRole = "research" | "audit" | "context" | "safety";
@@ -100,6 +101,7 @@ interface ProviderAdapter {
100
101
  readonly capabilities: Set<ProviderCapability>;
101
102
  generateText(request: GenerationRequest): Promise<GenerationResponse>;
102
103
  generateStructured<T>(request: GenerationRequest, schema: z.ZodType<T>): Promise<T>;
104
+ embedTexts?(texts: string[]): Promise<number[][]>;
103
105
  generateImage?(request: ImageGenerationRequest): Promise<ImageGenerationResponse>;
104
106
  }
105
107
  interface ProviderConfig {
@@ -153,6 +155,7 @@ interface VaultConfig {
153
155
  lintProvider: string;
154
156
  visionProvider: string;
155
157
  imageProvider?: string;
158
+ embeddingProvider?: string;
156
159
  };
157
160
  viewer: {
158
161
  port: number;
@@ -169,6 +172,10 @@ interface VaultConfig {
169
172
  questions?: string[];
170
173
  maxQuestions?: number;
171
174
  };
175
+ repoAnalysis?: {
176
+ classifyGlobs?: Partial<Record<SourceClass, string[]>>;
177
+ extractClasses?: SourceClass[];
178
+ };
172
179
  webSearch?: {
173
180
  providers: Record<string, WebSearchProviderConfig>;
174
181
  tasks: {
@@ -200,6 +207,7 @@ interface ResolvedPaths {
200
207
  searchDbPath: string;
201
208
  compileStatePath: string;
202
209
  codeIndexPath: string;
210
+ embeddingsPath: string;
203
211
  benchmarkPath: string;
204
212
  jobsLogPath: string;
205
213
  sessionsDir: string;
@@ -253,6 +261,7 @@ interface IngestOptions {
253
261
  exclude?: string[];
254
262
  maxFiles?: number;
255
263
  gitignore?: boolean;
264
+ extractClasses?: SourceClass[];
256
265
  }
257
266
  interface DirectoryIngestSkip {
258
267
  path: string;
@@ -272,6 +281,7 @@ interface SourceManifest {
272
281
  originType: "file" | "url";
273
282
  sourceKind: SourceKind;
274
283
  sourceType?: SourceCaptureType;
284
+ sourceClass?: SourceClass;
275
285
  language?: CodeLanguage;
276
286
  originalPath?: string;
277
287
  repoRelativePath?: string;
@@ -384,6 +394,7 @@ interface GraphNode {
384
394
  confidence?: number;
385
395
  sourceIds: string[];
386
396
  projectIds: string[];
397
+ sourceClass?: SourceClass;
387
398
  language?: CodeLanguage;
388
399
  moduleId?: string;
389
400
  symbolKind?: CodeSymbolKind;
@@ -402,6 +413,7 @@ interface GraphEdge {
402
413
  confidence: number;
403
414
  provenance: string[];
404
415
  similarityReasons?: Array<"shared_concept" | "shared_entity" | "shared_tag" | "shared_symbol" | "shared_rationale_theme" | "shared_source_type">;
416
+ similarityBasis?: "feature_overlap" | "embeddings";
405
417
  }
406
418
  interface GraphHyperedge {
407
419
  id: string;
@@ -419,6 +431,7 @@ interface GraphPage {
419
431
  title: string;
420
432
  kind: PageKind;
421
433
  sourceType?: SourceCaptureType;
434
+ sourceClass?: SourceClass;
422
435
  sourceIds: string[];
423
436
  projectIds: string[];
424
437
  nodeIds: string[];
@@ -577,6 +590,7 @@ interface SearchResult {
577
590
  status?: PageStatus;
578
591
  projectIds: string[];
579
592
  sourceType?: SourceCaptureType;
593
+ sourceClass?: SourceClass;
580
594
  }
581
595
  interface QueryOptions {
582
596
  question: string;
@@ -830,6 +844,20 @@ interface BenchmarkArtifact {
830
844
  questionResults: BenchmarkQuestionResult[];
831
845
  summary: BenchmarkSummary;
832
846
  }
847
+ interface EmbeddingCacheEntry {
848
+ itemId: string;
849
+ kind: "node" | "page" | "hyperedge";
850
+ label: string;
851
+ contentHash: string;
852
+ values: number[];
853
+ }
854
+ interface EmbeddingCacheArtifact {
855
+ generatedAt: string;
856
+ providerId: string;
857
+ providerModel: string;
858
+ graphHash: string;
859
+ entries: EmbeddingCacheEntry[];
860
+ }
833
861
  interface BenchmarkOptions {
834
862
  questions?: string[];
835
863
  maxQuestions?: number;
@@ -843,6 +871,18 @@ interface GraphReportArtifact {
843
871
  pages: number;
844
872
  communities: number;
845
873
  };
874
+ firstPartyOverview: {
875
+ nodes: number;
876
+ edges: number;
877
+ pages: number;
878
+ communities: number;
879
+ };
880
+ sourceClassBreakdown: Record<SourceClass, {
881
+ sources: number;
882
+ pages: number;
883
+ nodes: number;
884
+ }>;
885
+ warnings: string[];
846
886
  benchmark?: {
847
887
  generatedAt: string;
848
888
  stale: boolean;
@@ -1132,4 +1172,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
1132
1172
  declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
1133
1173
  declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
1134
1174
 
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 };
1175
+ 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 EmbeddingCacheArtifact, type EmbeddingCacheEntry, 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 SourceClass, 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 };