@swarmvaultai/engine 3.15.0 → 3.16.0

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
@@ -59,9 +59,11 @@ declare const agentTypeSchema: z.ZodEnum<{
59
59
  cortex: "cortex";
60
60
  crush: "crush";
61
61
  deepagents: "deepagents";
62
+ devin: "devin";
62
63
  firebender: "firebender";
63
64
  iflow: "iflow";
64
65
  junie: "junie";
66
+ kilo: "kilo";
65
67
  "kilo-code": "kilo-code";
66
68
  kimi: "kimi";
67
69
  kode: "kode";
@@ -105,7 +107,7 @@ type ContextPackItemKind = "page" | "node" | "edge" | "hyperedge";
105
107
  type AgentMemoryTaskStatus = "active" | "blocked" | "completed" | "archived";
106
108
  type AgentMemoryResumeFormat = "markdown" | "json" | "llms";
107
109
  type OutputAssetRole = "primary" | "preview" | "manifest" | "poster";
108
- type GraphExportFormat = "html" | "html-standalone" | "report" | "svg" | "graphml" | "cypher" | "json" | "obsidian" | "canvas";
110
+ type GraphExportFormat = "html" | "html-standalone" | "report" | "svg" | "graphml" | "cypher" | "json" | "callflow" | "obsidian" | "canvas";
109
111
  type PageStatus = "draft" | "candidate" | "active" | "blocked" | "completed" | "archived";
110
112
  type PageManager = "system" | "human";
111
113
  type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
@@ -1019,6 +1021,17 @@ interface GraphPathResult {
1019
1021
  pageIds: string[];
1020
1022
  summary: string;
1021
1023
  }
1024
+ interface GraphCycle {
1025
+ nodeIds: string[];
1026
+ labels: string[];
1027
+ edgeIds: string[];
1028
+ relations: string[];
1029
+ }
1030
+ interface GraphCycleResult {
1031
+ cycles: GraphCycle[];
1032
+ limit: number;
1033
+ summary: string;
1034
+ }
1022
1035
  interface GraphExplainNeighbor {
1023
1036
  nodeId: string;
1024
1037
  label: string;
@@ -1672,6 +1685,7 @@ interface WatchController {
1672
1685
  }
1673
1686
  interface InstallAgentOptions {
1674
1687
  hook?: boolean;
1688
+ scope?: "project" | "user";
1675
1689
  }
1676
1690
  interface InstallAgentResult {
1677
1691
  agent: AgentType;
@@ -1679,6 +1693,53 @@ interface InstallAgentResult {
1679
1693
  targets: string[];
1680
1694
  warnings?: string[];
1681
1695
  }
1696
+ interface AgentInstallTargetStatus {
1697
+ path: string;
1698
+ exists: boolean;
1699
+ }
1700
+ interface AgentInstallStatus {
1701
+ agent: AgentType;
1702
+ scope: "project" | "user";
1703
+ hook: boolean;
1704
+ installed: boolean;
1705
+ target: string;
1706
+ targets: AgentInstallTargetStatus[];
1707
+ }
1708
+ type ProviderTaskKey = keyof VaultConfig["tasks"];
1709
+ interface ProviderConfigEntry {
1710
+ id: string;
1711
+ type: ProviderType;
1712
+ model: string;
1713
+ baseUrl?: string;
1714
+ apiKeyEnv?: string;
1715
+ capabilities: ProviderCapability[];
1716
+ assignedTasks: ProviderTaskKey[];
1717
+ provider: ProviderConfig;
1718
+ }
1719
+ interface ProviderConfigAddOptions {
1720
+ rootDir: string;
1721
+ providerId: string;
1722
+ provider: ProviderConfig;
1723
+ tasks?: ProviderTaskKey[];
1724
+ }
1725
+ interface ProviderConfigAddResult {
1726
+ providerId: string;
1727
+ configPath: string;
1728
+ added: boolean;
1729
+ updated: boolean;
1730
+ updatedTasks: ProviderTaskKey[];
1731
+ }
1732
+ interface ProviderConfigRemoveOptions {
1733
+ rootDir: string;
1734
+ providerId: string;
1735
+ fallbackProviderId?: string;
1736
+ }
1737
+ interface ProviderConfigRemoveResult {
1738
+ providerId: string;
1739
+ configPath: string;
1740
+ removed: boolean;
1741
+ updatedTasks: ProviderTaskKey[];
1742
+ }
1682
1743
  interface ManagedSourceAddOptions {
1683
1744
  compile?: boolean;
1684
1745
  brief?: boolean;
@@ -2287,6 +2348,7 @@ interface ScheduleController {
2287
2348
  }
2288
2349
 
2289
2350
  declare function installAgent(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<InstallAgentResult>;
2351
+ declare function getAgentInstallStatus(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<AgentInstallStatus>;
2290
2352
  declare function installConfiguredAgents(rootDir: string): Promise<InstallAgentResult[]>;
2291
2353
 
2292
2354
  declare function exportAiPack(rootDir: string, options?: AiExportOptions): Promise<AiExportResult>;
@@ -2586,6 +2648,11 @@ declare function validateGraphArtifact(graph: GraphArtifact, options?: {
2586
2648
  strict?: boolean;
2587
2649
  }): GraphValidationResult;
2588
2650
  declare function graphDiff(oldGraph: GraphArtifact, newGraph: GraphArtifact): GraphDiffResult;
2651
+ declare function findGraphCycles(graph: GraphArtifact, options?: {
2652
+ relations?: string[];
2653
+ limit?: number;
2654
+ maxDepth?: number;
2655
+ }): GraphCycleResult;
2589
2656
  /**
2590
2657
  * Compute the blast radius of changing a file/module by tracing reverse import
2591
2658
  * edges via BFS. Returns all modules that transitively depend on the target.
@@ -2762,6 +2829,11 @@ declare function runMigration(rootDir: string, options?: {
2762
2829
  dryRun?: boolean;
2763
2830
  }): Promise<MigrationResult>;
2764
2831
 
2832
+ declare function addProviderConfig(options: ProviderConfigAddOptions): Promise<ProviderConfigAddResult>;
2833
+ declare function listProviderConfigEntries(rootDir: string): Promise<ProviderConfigEntry[]>;
2834
+ declare function getProviderConfigEntry(rootDir: string, providerId: string): Promise<ProviderConfigEntry | null>;
2835
+ declare function removeProviderConfig(options: ProviderConfigRemoveOptions): Promise<ProviderConfigRemoveResult>;
2836
+
2765
2837
  declare abstract class BaseProviderAdapter implements ProviderAdapter {
2766
2838
  readonly id: string;
2767
2839
  readonly type: ProviderType;
@@ -3264,4 +3336,4 @@ declare function createWebSearchAdapter(id: string, config: WebSearchProviderCon
3264
3336
  type WebSearchTaskId = "deepLintProvider" | "queryProvider" | "exploreProvider";
3265
3337
  declare function getWebSearchAdapterForTask(rootDir: string, task: WebSearchTaskId): Promise<WebSearchAdapter>;
3266
3338
 
3267
- export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentMemoryDecision, type AgentMemoryNote, type AgentMemoryResumeFormat, type AgentMemoryTask, type AgentMemoryTaskResult, type AgentMemoryTaskStatus, type AgentMemoryTaskSummary, type AgentType, type AiExportFile, type AiExportOptions, type AiExportResult, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AskChatOptions, type AskChatResult, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkByClassEntry, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type BuildContextPackOptions, type BuildContextPackResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeRelation, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ConsolidationConfig, type ConsolidationPromotion, type ConsolidationResult, type ContextPack, type ContextPackFormat, type ContextPackItem, type ContextPackItemKind, type ContextPackOmittedItem, type ContextPackSummary, DEFAULT_CONSOLIDATION_CONFIG, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS, DEFAULT_PROMOTION_CONFIG, DEFAULT_REDACTION_PATTERNS, DEFAULT_STALE_THRESHOLD, type DegradationOutcome, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type FinishMemoryTaskOptions, type Freshness, type FreshnessConfig, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphClusterRefreshResult, type GraphCommunityResult, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryFilterStats, type GraphQueryFilters, type GraphQueryMatch, type GraphQueryRelationGroup, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GraphShareBundleFile, type GraphShrinkDimension, type GraphShrinkGuardResult, type GraphStatsResult, type GraphStatusChange, type GraphStatusResult, type GraphValidationIssue, type GraphValidationResult, type GraphValidationSeverity, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, LARGE_REPO_NODE_THRESHOLD, LOCAL_WHISPER_MODEL_SIZES, type LintFinding, type LintOptions, type LocalWhisperAdapterOptions, type LocalWhisperBinaryDiscovery, LocalWhisperProviderAdapter, type LocalWhisperSetupStatus, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type MemoryTier, type MigrationPlan, type MigrationResult, type MigrationStep, type Neo4jGraphSinkConfig, OPENAI_COMPATIBLE_CAPABILITY_MATRIX, type OpenAiCompatiblePresetId, 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 PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderPresetCapability, type ProviderRegistrationOptions, type ProviderRegistrationResult, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RedactionMatchSummary, type RedactionPatternConfig, type RedactionSettings, type RedactionSummary, type RepoSyncResult, type ResolvedLargeRepoDefaults, type ResolvedPaths, type ResumeMemoryTaskOptions, type ResumeMemoryTaskResult, type RetrievalConfig, type RetrievalDoctorResult, type RetrievalManifest, type RetrievalStatus, type ReviewActionResult, type RoleExecutorConfig, SWARMVAULT_OUT_ENV, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledConsolidateTask, 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 SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type StartMemoryTaskOptions, type SynthesizedHubEdge, type SynthesizedHubNode, type SynthesizedHyperedgeHubs, type UpdateMemoryTaskOptions, type VaultChatSession, type VaultChatSessionSummary, type VaultChatTurn, type VaultConfig, type VaultDashboardPack, type VaultDoctorAction, type VaultDoctorCheck, type VaultDoctorCounts, type VaultDoctorRecommendation, type VaultDoctorRecommendationPriority, type VaultDoctorReport, type VaultDoctorSafeAction, type VaultDoctorStatus, type VaultProfileConfig, type VaultProfilePreset, type VaultVersionRecord, type WatchConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, type WhisperRunResult, type WhisperRunner, acceptApproval, addInput, addManagedSource, addWatchedRoot, agentTypeSchema, applyDecayToPages, archiveCandidate, askChatSession, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildContextPack, buildGraphShareArtifact, buildGraphTree, buildMemoryGraphElements, buildRedactor, checkTrackedRepoChanges, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteChatSession, deleteContextPack, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, doctorRetrieval, doctorVault, downloadWhisperModel, ensureMemoryLedger, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, evaluateGraphShrinkGuard, expectedModelPath, explainGraphVault, exploreVault, exportAiPack, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportGraphTree, exportObsidianCanvas, exportObsidianVault, finishMemoryTask, getGitHookStatus, getGraphCommunityVault, getGraphStatus, getProviderForTask, getRetrievalStatus, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, graphStats, graphStatsVault, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listChatSessions, listContextPacks, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listMemoryTasks, listPages, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadMemoryTaskPages, loadVaultConfig, loadVaultSchema, loadVaultSchemas, lookupPresetCapabilities, markSuperseded, memoryTaskHashes, mergeGraphFiles, modelDownloadUrl, pathGraphVault, persistDecayFrontmatter, planMigration, previewCandidatePromotions, projectGraphAfterRemovals, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readChatSession, readContextPack, readExtractedText, readGraphReport, readMemoryTask, readPage, rebuildRetrievalIndex, refreshGraphClusters, registerLocalWhisperProvider, rejectApproval, reloadManagedSources, removeWatchedRoot, renderContextPackLlms, renderContextPackMarkdown, renderGraphShareBundleFiles, renderGraphShareMarkdown, renderGraphSharePreviewHtml, renderGraphShareSvg, renderGraphTreeHtml, renderMemoryTaskMarkdown, resetDecay, resolveArtifactRootDir, resolveConsolidationConfig, resolveDecayConfig, resolveLargeRepoDefaults, resolvePaths, resolveRedactionPatterns, resolveRetrievalConfig, resolveWatchedRepoRoots, resumeMemoryTask, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runConsolidation, runDecayPass, runMigration, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, startMemoryTask, summarizeLocalWhisperSetup, syncTrackedRepos, syncTrackedReposForWatch, synthesizeHyperedgeHubs, trimToTokenBudget, uninstallGitHooks, updateMemoryTask, validateGraphArtifact, validateGraphVault, watchVault, webSearchProviderTypeSchema, withCapabilityFallback, writeRetrievalManifest };
3339
+ export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentInstallStatus, type AgentInstallTargetStatus, type AgentMemoryDecision, type AgentMemoryNote, type AgentMemoryResumeFormat, type AgentMemoryTask, type AgentMemoryTaskResult, type AgentMemoryTaskStatus, type AgentMemoryTaskSummary, type AgentType, type AiExportFile, type AiExportOptions, type AiExportResult, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AskChatOptions, type AskChatResult, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkByClassEntry, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type BuildContextPackOptions, type BuildContextPackResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeRelation, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ConsolidationConfig, type ConsolidationPromotion, type ConsolidationResult, type ContextPack, type ContextPackFormat, type ContextPackItem, type ContextPackItemKind, type ContextPackOmittedItem, type ContextPackSummary, DEFAULT_CONSOLIDATION_CONFIG, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS, DEFAULT_PROMOTION_CONFIG, DEFAULT_REDACTION_PATTERNS, DEFAULT_STALE_THRESHOLD, type DegradationOutcome, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type FinishMemoryTaskOptions, type Freshness, type FreshnessConfig, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphClusterRefreshResult, type GraphCommunityResult, type GraphCycle, type GraphCycleResult, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryFilterStats, type GraphQueryFilters, type GraphQueryMatch, type GraphQueryRelationGroup, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GraphShareBundleFile, type GraphShrinkDimension, type GraphShrinkGuardResult, type GraphStatsResult, type GraphStatusChange, type GraphStatusResult, type GraphValidationIssue, type GraphValidationResult, type GraphValidationSeverity, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, LARGE_REPO_NODE_THRESHOLD, LOCAL_WHISPER_MODEL_SIZES, type LintFinding, type LintOptions, type LocalWhisperAdapterOptions, type LocalWhisperBinaryDiscovery, LocalWhisperProviderAdapter, type LocalWhisperSetupStatus, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type MemoryTier, type MigrationPlan, type MigrationResult, type MigrationStep, type Neo4jGraphSinkConfig, OPENAI_COMPATIBLE_CAPABILITY_MATRIX, type OpenAiCompatiblePresetId, 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 PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderConfigAddOptions, type ProviderConfigAddResult, type ProviderConfigEntry, type ProviderConfigRemoveOptions, type ProviderConfigRemoveResult, type ProviderPresetCapability, type ProviderRegistrationOptions, type ProviderRegistrationResult, type ProviderRoleExecutorConfig, type ProviderTaskKey, type ProviderType, type QueryOptions, type QueryResult, type RedactionMatchSummary, type RedactionPatternConfig, type RedactionSettings, type RedactionSummary, type RepoSyncResult, type ResolvedLargeRepoDefaults, type ResolvedPaths, type ResumeMemoryTaskOptions, type ResumeMemoryTaskResult, type RetrievalConfig, type RetrievalDoctorResult, type RetrievalManifest, type RetrievalStatus, type ReviewActionResult, type RoleExecutorConfig, SWARMVAULT_OUT_ENV, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledConsolidateTask, 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 SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type StartMemoryTaskOptions, type SynthesizedHubEdge, type SynthesizedHubNode, type SynthesizedHyperedgeHubs, type UpdateMemoryTaskOptions, type VaultChatSession, type VaultChatSessionSummary, type VaultChatTurn, type VaultConfig, type VaultDashboardPack, type VaultDoctorAction, type VaultDoctorCheck, type VaultDoctorCounts, type VaultDoctorRecommendation, type VaultDoctorRecommendationPriority, type VaultDoctorReport, type VaultDoctorSafeAction, type VaultDoctorStatus, type VaultProfileConfig, type VaultProfilePreset, type VaultVersionRecord, type WatchConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, type WhisperRunResult, type WhisperRunner, acceptApproval, addInput, addManagedSource, addProviderConfig, addWatchedRoot, agentTypeSchema, applyDecayToPages, archiveCandidate, askChatSession, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildContextPack, buildGraphShareArtifact, buildGraphTree, buildMemoryGraphElements, buildRedactor, checkTrackedRepoChanges, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteChatSession, deleteContextPack, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, doctorRetrieval, doctorVault, downloadWhisperModel, ensureMemoryLedger, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, evaluateGraphShrinkGuard, expectedModelPath, explainGraphVault, exploreVault, exportAiPack, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportGraphTree, exportObsidianCanvas, exportObsidianVault, findGraphCycles, finishMemoryTask, getAgentInstallStatus, getGitHookStatus, getGraphCommunityVault, getGraphStatus, getProviderConfigEntry, getProviderForTask, getRetrievalStatus, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, graphStats, graphStatsVault, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listChatSessions, listContextPacks, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listMemoryTasks, listPages, listProviderConfigEntries, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadMemoryTaskPages, loadVaultConfig, loadVaultSchema, loadVaultSchemas, lookupPresetCapabilities, markSuperseded, memoryTaskHashes, mergeGraphFiles, modelDownloadUrl, pathGraphVault, persistDecayFrontmatter, planMigration, previewCandidatePromotions, projectGraphAfterRemovals, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readChatSession, readContextPack, readExtractedText, readGraphReport, readMemoryTask, readPage, rebuildRetrievalIndex, refreshGraphClusters, registerLocalWhisperProvider, rejectApproval, reloadManagedSources, removeProviderConfig, removeWatchedRoot, renderContextPackLlms, renderContextPackMarkdown, renderGraphShareBundleFiles, renderGraphShareMarkdown, renderGraphSharePreviewHtml, renderGraphShareSvg, renderGraphTreeHtml, renderMemoryTaskMarkdown, resetDecay, resolveArtifactRootDir, resolveConsolidationConfig, resolveDecayConfig, resolveLargeRepoDefaults, resolvePaths, resolveRedactionPatterns, resolveRetrievalConfig, resolveWatchedRepoRoots, resumeMemoryTask, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runConsolidation, runDecayPass, runMigration, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, startMemoryTask, summarizeLocalWhisperSetup, syncTrackedRepos, syncTrackedReposForWatch, synthesizeHyperedgeHubs, trimToTokenBudget, uninstallGitHooks, updateMemoryTask, validateGraphArtifact, validateGraphVault, watchVault, webSearchProviderTypeSchema, withCapabilityFallback, writeRetrievalManifest };
package/dist/index.js CHANGED
@@ -37,8 +37,10 @@ import {
37
37
  evaluateCandidateForPromotion,
38
38
  explainGraphVault,
39
39
  exploreVault,
40
+ findGraphCycles,
40
41
  findLatestGuidedSourceSessionByScope,
41
42
  finishMemoryTask,
43
+ getAgentInstallStatus,
42
44
  getGraphCommunityVault,
43
45
  getRetrievalStatus,
44
46
  getWebSearchAdapterForTask,
@@ -128,7 +130,7 @@ import {
128
130
  writeGuidedSourceSession,
129
131
  writeRetrievalManifest,
130
132
  writeWatchStatusArtifact
131
- } from "./chunk-JJDJF2P3.js";
133
+ } from "./chunk-TQIIJVVG.js";
132
134
  import {
133
135
  LocalWhisperProviderAdapter,
134
136
  SWARMVAULT_OUT_ENV,
@@ -145,6 +147,8 @@ import {
145
147
  listFilesRecursive,
146
148
  loadVaultConfig,
147
149
  normalizeWhitespace,
150
+ providerCapabilitySchema,
151
+ providerTypeSchema,
148
152
  readJsonFile,
149
153
  resolveArtifactRootDir,
150
154
  resolvePaths,
@@ -155,7 +159,7 @@ import {
155
159
  truncate,
156
160
  uniqueBy,
157
161
  writeJsonFile
158
- } from "./chunk-NUWZUYE7.js";
162
+ } from "./chunk-NON6BVEI.js";
159
163
  import {
160
164
  estimatePageTokens,
161
165
  estimateTokens,
@@ -2842,6 +2846,71 @@ function renderJson(graph) {
2842
2846
  };
2843
2847
  return JSON.stringify(payload, null, 2);
2844
2848
  }
2849
+ function renderCallflowHtml(graph) {
2850
+ const nodes = graphNodeById(graph);
2851
+ const rows = [...graph.edges].filter((edge) => nodes.has(edge.source) && nodes.has(edge.target)).sort((left, right) => {
2852
+ const leftSource = nodes.get(left.source)?.label ?? left.source;
2853
+ const rightSource = nodes.get(right.source)?.label ?? right.source;
2854
+ const leftTarget = nodes.get(left.target)?.label ?? left.target;
2855
+ const rightTarget = nodes.get(right.target)?.label ?? right.target;
2856
+ return leftSource.localeCompare(rightSource) || leftTarget.localeCompare(rightTarget) || left.relation.localeCompare(right.relation) || left.id.localeCompare(right.id);
2857
+ }).map((edge) => {
2858
+ const source = nodes.get(edge.source);
2859
+ const target = nodes.get(edge.target);
2860
+ return [
2861
+ "<tr>",
2862
+ `<td><span class="node-type">${xmlEscape(source?.type ?? "node")}</span>${xmlEscape(source?.label ?? edge.source)}<small>${xmlEscape(edge.source)}</small></td>`,
2863
+ `<td class="relation">${xmlEscape(edge.relation)}</td>`,
2864
+ `<td><span class="node-type">${xmlEscape(target?.type ?? "node")}</span>${xmlEscape(target?.label ?? edge.target)}<small>${xmlEscape(edge.target)}</small></td>`,
2865
+ `<td>${xmlEscape(edge.evidenceClass)}</td>`,
2866
+ `<td>${edge.confidence.toFixed(2)}</td>`,
2867
+ "</tr>"
2868
+ ].join("");
2869
+ }).join("\n");
2870
+ return `<!doctype html>
2871
+ <html lang="en">
2872
+ <head>
2873
+ <meta charset="utf-8" />
2874
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
2875
+ <title>SwarmVault Callflow</title>
2876
+ <style>
2877
+ :root { color-scheme: light dark; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
2878
+ body { margin: 0; background: #f8fafc; color: #0f172a; }
2879
+ main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 48px; }
2880
+ h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: 0; }
2881
+ p { margin: 0 0 24px; color: #475569; }
2882
+ table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #dbe3ee; }
2883
+ th, td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
2884
+ th { background: #eaf0f7; font-size: 12px; text-transform: uppercase; color: #334155; }
2885
+ small { display: block; margin-top: 3px; color: #64748b; font-size: 11px; word-break: break-all; }
2886
+ .relation { font-weight: 700; color: #0f766e; white-space: nowrap; }
2887
+ .node-type { display: inline-block; min-width: 54px; margin-right: 8px; color: #475569; font-size: 11px; text-transform: uppercase; }
2888
+ @media (prefers-color-scheme: dark) {
2889
+ body { background: #020617; color: #e2e8f0; }
2890
+ p, small, .node-type { color: #94a3b8; }
2891
+ table { background: #0f172a; border-color: #334155; }
2892
+ th { background: #1e293b; color: #cbd5e1; }
2893
+ th, td { border-color: #1e293b; }
2894
+ .relation { color: #5eead4; }
2895
+ }
2896
+ </style>
2897
+ </head>
2898
+ <body>
2899
+ <main>
2900
+ <h1>SwarmVault Callflow</h1>
2901
+ <p>${graph.nodes.length} nodes, ${graph.edges.length} directed relationships, generated ${xmlEscape(graph.generatedAt)}.</p>
2902
+ <table>
2903
+ <thead>
2904
+ <tr><th>Source</th><th>Relation</th><th>Target</th><th>Evidence</th><th>Confidence</th></tr>
2905
+ </thead>
2906
+ <tbody>
2907
+ ${rows || '<tr><td colspan="5">No directed relationships found.</td></tr>'}
2908
+ </tbody>
2909
+ </table>
2910
+ </main>
2911
+ </body>
2912
+ </html>`;
2913
+ }
2845
2914
  function renderHtmlStandalone(graph) {
2846
2915
  const communities = sortedCommunities(graph);
2847
2916
  const cappedNodes = [...graph.nodes].sort((a, b) => (b.degree ?? 0) - (a.degree ?? 0)).slice(0, 5e3);
@@ -3772,7 +3841,7 @@ async function writeGraphExport(outputPath, content) {
3772
3841
  }
3773
3842
  async function exportGraphFormat(rootDir, format, outputPath) {
3774
3843
  const graph = await loadGraph(rootDir);
3775
- const rendered = format === "html-standalone" ? renderHtmlStandalone(graph) : format === "json" ? renderJson(graph) : format === "svg" ? renderSvg(graph) : format === "graphml" ? renderGraphMl(graph) : renderCypher(graph);
3844
+ const rendered = format === "html-standalone" ? renderHtmlStandalone(graph) : format === "json" ? renderJson(graph) : format === "callflow" ? renderCallflowHtml(graph) : format === "svg" ? renderSvg(graph) : format === "graphml" ? renderGraphMl(graph) : renderCypher(graph);
3776
3845
  const resolvedPath = await writeGraphExport(outputPath, rendered);
3777
3846
  return { format, outputPath: resolvedPath };
3778
3847
  }
@@ -5441,7 +5510,7 @@ import path12 from "path";
5441
5510
  import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
5442
5511
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5443
5512
  import { z } from "zod";
5444
- var SERVER_VERSION = "3.15.0";
5513
+ var SERVER_VERSION = "3.16.0";
5445
5514
  var codeLanguageSchema = z.enum([
5446
5515
  "javascript",
5447
5516
  "jsx",
@@ -6359,6 +6428,137 @@ function asTextResource(uri, text) {
6359
6428
  };
6360
6429
  }
6361
6430
 
6431
+ // src/providers/config-store.ts
6432
+ var PROVIDER_TASK_KEYS = [
6433
+ "compileProvider",
6434
+ "queryProvider",
6435
+ "lintProvider",
6436
+ "visionProvider",
6437
+ "imageProvider",
6438
+ "embeddingProvider",
6439
+ "audioProvider"
6440
+ ];
6441
+ async function loadRawConfig(rootDir) {
6442
+ await initWorkspace(rootDir);
6443
+ const { paths } = await loadVaultConfig(rootDir);
6444
+ const raw = await readJsonFile(paths.configPath) ?? defaultVaultConfig();
6445
+ return { configPath: paths.configPath, raw };
6446
+ }
6447
+ function ensureProviders(raw) {
6448
+ if (!raw.providers || typeof raw.providers !== "object" || Array.isArray(raw.providers)) {
6449
+ raw.providers = {};
6450
+ }
6451
+ return raw.providers;
6452
+ }
6453
+ function ensureTasks(raw) {
6454
+ if (!raw.tasks || typeof raw.tasks !== "object" || Array.isArray(raw.tasks)) {
6455
+ raw.tasks = {};
6456
+ }
6457
+ return raw.tasks;
6458
+ }
6459
+ function normalizeProvider(provider) {
6460
+ providerTypeSchema.parse(provider.type);
6461
+ if (!provider.model.trim()) {
6462
+ throw new Error("Provider model cannot be empty.");
6463
+ }
6464
+ const rawProvider = provider;
6465
+ if (typeof rawProvider.apiKey === "string") {
6466
+ throw new Error("Provider configs must reference secrets through apiKeyEnv, not literal apiKey values.");
6467
+ }
6468
+ return JSON.parse(
6469
+ JSON.stringify({
6470
+ ...provider,
6471
+ model: provider.model.trim(),
6472
+ capabilities: provider.capabilities?.map((capability) => providerCapabilitySchema.parse(capability))
6473
+ })
6474
+ );
6475
+ }
6476
+ function assignedTasks(raw, providerId) {
6477
+ const tasks = ensureTasks(raw);
6478
+ return PROVIDER_TASK_KEYS.filter((taskKey) => tasks[taskKey] === providerId);
6479
+ }
6480
+ function toEntry(raw, id, provider) {
6481
+ return {
6482
+ id,
6483
+ type: provider.type,
6484
+ model: provider.model,
6485
+ baseUrl: provider.baseUrl,
6486
+ apiKeyEnv: provider.apiKeyEnv,
6487
+ capabilities: provider.capabilities ?? [],
6488
+ assignedTasks: assignedTasks(raw, id),
6489
+ provider
6490
+ };
6491
+ }
6492
+ function assertTaskKeys(tasks) {
6493
+ const requested = tasks ?? [];
6494
+ const valid = new Set(PROVIDER_TASK_KEYS);
6495
+ for (const task of requested) {
6496
+ if (!valid.has(task)) {
6497
+ throw new Error(`Unknown provider task ${String(task)}.`);
6498
+ }
6499
+ }
6500
+ return [...new Set(requested)];
6501
+ }
6502
+ async function addProviderConfig(options) {
6503
+ const { configPath, raw } = await loadRawConfig(options.rootDir);
6504
+ const providers = ensureProviders(raw);
6505
+ const tasks = ensureTasks(raw);
6506
+ const provider = normalizeProvider(options.provider);
6507
+ const existing = providers[options.providerId];
6508
+ const added = !existing;
6509
+ const updated = !added && JSON.stringify(existing) !== JSON.stringify(provider);
6510
+ providers[options.providerId] = provider;
6511
+ const updatedTasks = assertTaskKeys(options.tasks);
6512
+ for (const taskKey of updatedTasks) {
6513
+ tasks[taskKey] = options.providerId;
6514
+ }
6515
+ await writeJsonFile(configPath, raw);
6516
+ return {
6517
+ providerId: options.providerId,
6518
+ configPath,
6519
+ added,
6520
+ updated,
6521
+ updatedTasks
6522
+ };
6523
+ }
6524
+ async function listProviderConfigEntries(rootDir) {
6525
+ const { raw } = await loadRawConfig(rootDir);
6526
+ const providers = ensureProviders(raw);
6527
+ return Object.entries(providers).map(([id, provider]) => toEntry(raw, id, provider)).sort((left, right) => left.id.localeCompare(right.id));
6528
+ }
6529
+ async function getProviderConfigEntry(rootDir, providerId) {
6530
+ const { raw } = await loadRawConfig(rootDir);
6531
+ const providers = ensureProviders(raw);
6532
+ const provider = providers[providerId];
6533
+ return provider ? toEntry(raw, providerId, provider) : null;
6534
+ }
6535
+ async function removeProviderConfig(options) {
6536
+ const { configPath, raw } = await loadRawConfig(options.rootDir);
6537
+ const providers = ensureProviders(raw);
6538
+ const tasks = ensureTasks(raw);
6539
+ const removed = Boolean(providers[options.providerId]);
6540
+ delete providers[options.providerId];
6541
+ const fallbackProviderId = options.fallbackProviderId ?? (providers.local ? "local" : Object.keys(providers).sort((left, right) => left.localeCompare(right))[0]);
6542
+ const updatedTasks = [];
6543
+ for (const taskKey of PROVIDER_TASK_KEYS) {
6544
+ if (tasks[taskKey] === options.providerId) {
6545
+ if (!fallbackProviderId) {
6546
+ delete tasks[taskKey];
6547
+ } else {
6548
+ tasks[taskKey] = fallbackProviderId;
6549
+ }
6550
+ updatedTasks.push(taskKey);
6551
+ }
6552
+ }
6553
+ await writeJsonFile(configPath, raw);
6554
+ return {
6555
+ providerId: options.providerId,
6556
+ configPath,
6557
+ removed,
6558
+ updatedTasks
6559
+ };
6560
+ }
6561
+
6362
6562
  // src/providers/local-whisper-setup.ts
6363
6563
  import { createWriteStream, constants as fsConstants } from "fs";
6364
6564
  import fs11 from "fs/promises";
@@ -9548,6 +9748,7 @@ export {
9548
9748
  acceptApproval,
9549
9749
  addInput,
9550
9750
  addManagedSource,
9751
+ addProviderConfig,
9551
9752
  addWatchedRoot,
9552
9753
  applyDecayToPages,
9553
9754
  archiveCandidate,
@@ -9597,10 +9798,13 @@ export {
9597
9798
  exportGraphTree,
9598
9799
  exportObsidianCanvas,
9599
9800
  exportObsidianVault,
9801
+ findGraphCycles,
9600
9802
  finishMemoryTask,
9803
+ getAgentInstallStatus,
9601
9804
  getGitHookStatus,
9602
9805
  getGraphCommunityVault,
9603
9806
  getGraphStatus,
9807
+ getProviderConfigEntry,
9604
9808
  getProviderForTask,
9605
9809
  getRetrievalStatus,
9606
9810
  getWatchStatus,
@@ -9631,6 +9835,7 @@ export {
9631
9835
  listManifests,
9632
9836
  listMemoryTasks,
9633
9837
  listPages,
9838
+ listProviderConfigEntries,
9634
9839
  listSchedules,
9635
9840
  listTrackedRepoRoots,
9636
9841
  listWatchedRoots,
@@ -9664,6 +9869,7 @@ export {
9664
9869
  registerLocalWhisperProvider,
9665
9870
  rejectApproval,
9666
9871
  reloadManagedSources,
9872
+ removeProviderConfig,
9667
9873
  removeWatchedRoot,
9668
9874
  renderContextPackLlms,
9669
9875
  renderContextPackMarkdown,
@@ -0,0 +1,32 @@
1
+ import {
2
+ buildMemoryGraphElements,
3
+ ensureMemoryLedger,
4
+ estimateMemoryTaskTokens,
5
+ finishMemoryTask,
6
+ listMemoryTasks,
7
+ loadMemoryTaskPages,
8
+ memoryTaskHashes,
9
+ memoryTaskPageRecord,
10
+ readMemoryTask,
11
+ renderMemoryTaskMarkdown,
12
+ resumeMemoryTask,
13
+ startMemoryTask,
14
+ updateMemoryTask
15
+ } from "./chunk-TQIIJVVG.js";
16
+ import "./chunk-NON6BVEI.js";
17
+ import "./chunk-NAIERP4C.js";
18
+ export {
19
+ buildMemoryGraphElements,
20
+ ensureMemoryLedger,
21
+ estimateMemoryTaskTokens,
22
+ finishMemoryTask,
23
+ listMemoryTasks,
24
+ loadMemoryTaskPages,
25
+ memoryTaskHashes,
26
+ memoryTaskPageRecord,
27
+ readMemoryTask,
28
+ renderMemoryTaskMarkdown,
29
+ resumeMemoryTask,
30
+ startMemoryTask,
31
+ updateMemoryTask
32
+ };
@@ -0,0 +1,32 @@
1
+ import {
2
+ buildMemoryGraphElements,
3
+ ensureMemoryLedger,
4
+ estimateMemoryTaskTokens,
5
+ finishMemoryTask,
6
+ listMemoryTasks,
7
+ loadMemoryTaskPages,
8
+ memoryTaskHashes,
9
+ memoryTaskPageRecord,
10
+ readMemoryTask,
11
+ renderMemoryTaskMarkdown,
12
+ resumeMemoryTask,
13
+ startMemoryTask,
14
+ updateMemoryTask
15
+ } from "./chunk-L7DKPPV4.js";
16
+ import "./chunk-NON6BVEI.js";
17
+ import "./chunk-NAIERP4C.js";
18
+ export {
19
+ buildMemoryGraphElements,
20
+ ensureMemoryLedger,
21
+ estimateMemoryTaskTokens,
22
+ finishMemoryTask,
23
+ listMemoryTasks,
24
+ loadMemoryTaskPages,
25
+ memoryTaskHashes,
26
+ memoryTaskPageRecord,
27
+ readMemoryTask,
28
+ renderMemoryTaskMarkdown,
29
+ resumeMemoryTask,
30
+ startMemoryTask,
31
+ updateMemoryTask
32
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ assertProviderCapability,
3
+ createProvider,
4
+ getProviderForTask,
5
+ getResolvedPaths
6
+ } from "./chunk-NON6BVEI.js";
7
+ export {
8
+ assertProviderCapability,
9
+ createProvider,
10
+ getProviderForTask,
11
+ getResolvedPaths
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/engine",
3
- "version": "3.15.0",
3
+ "version": "3.16.0",
4
4
  "description": "Core engine for SwarmVault: ingest, compile, query, lint, and provider abstractions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",