@swarmvaultai/engine 3.15.0 → 3.16.1

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.
Files changed (122) hide show
  1. package/README.md +6 -1
  2. package/dist/{chunk-NUWZUYE7.js → chunk-NON6BVEI.js} +4 -0
  3. package/dist/{chunk-JJDJF2P3.js → chunk-TQIIJVVG.js} +341 -10
  4. package/dist/index.d.ts +77 -2
  5. package/dist/index.js +234 -4
  6. package/dist/{memory-A4VPLUBA.js → memory-4BDKH4Y2.js} +2 -2
  7. package/dist/{registry-2QC3VN7M.js → registry-ZZ6NESFD.js} +1 -1
  8. package/package.json +3 -3
  9. package/dist/chunk-2CH2WWS4.js +0 -1359
  10. package/dist/chunk-2PN46RDI.js +0 -26846
  11. package/dist/chunk-333AMRSV.js +0 -1056
  12. package/dist/chunk-3GVEUYQZ.js +0 -1641
  13. package/dist/chunk-4MSSM2GH.js +0 -1476
  14. package/dist/chunk-563TZ4TZ.js +0 -26573
  15. package/dist/chunk-5GEPTIZE.js +0 -26010
  16. package/dist/chunk-5HNZ2WQI.js +0 -1341
  17. package/dist/chunk-5Q4IV4O3.js +0 -1336
  18. package/dist/chunk-6MO57J5C.js +0 -988
  19. package/dist/chunk-6UPHDGEB.js +0 -1073
  20. package/dist/chunk-75BU5TQ6.js +0 -1690
  21. package/dist/chunk-7O2HJSWQ.js +0 -1686
  22. package/dist/chunk-7QHDATCQ.js +0 -1673
  23. package/dist/chunk-B3FC4J3P.js +0 -1214
  24. package/dist/chunk-BTWPJEP2.js +0 -1421
  25. package/dist/chunk-CG67P2HB.js +0 -1420
  26. package/dist/chunk-CSPDMCON.js +0 -26846
  27. package/dist/chunk-CVFY54CF.js +0 -24893
  28. package/dist/chunk-CWLDFLH2.js +0 -1163
  29. package/dist/chunk-DAJAZPPO.js +0 -26865
  30. package/dist/chunk-EEWB4WGH.js +0 -1056
  31. package/dist/chunk-EXD4RWT3.js +0 -1131
  32. package/dist/chunk-F7HZZ3VM.js +0 -931
  33. package/dist/chunk-FD3LJQ4T.js +0 -1216
  34. package/dist/chunk-G2TH6ZTA.js +0 -1468
  35. package/dist/chunk-H3CDZYRE.js +0 -1701
  36. package/dist/chunk-HFU5S5NO.js +0 -838
  37. package/dist/chunk-HKU2T5JX.js +0 -25213
  38. package/dist/chunk-HOJ7NSYC.js +0 -937
  39. package/dist/chunk-HRRPWXRZ.js +0 -1335
  40. package/dist/chunk-HW72C7O2.js +0 -1690
  41. package/dist/chunk-IAEYFTUS.js +0 -1159
  42. package/dist/chunk-IHMJCCXR.js +0 -1146
  43. package/dist/chunk-JTRE7C7P.js +0 -26062
  44. package/dist/chunk-LEUV6TWJ.js +0 -1131
  45. package/dist/chunk-MB7HPUTR.js +0 -1364
  46. package/dist/chunk-MZSUYTSL.js +0 -998
  47. package/dist/chunk-N56FAH4N.js +0 -1404
  48. package/dist/chunk-NCSZ4AKP.js +0 -1057
  49. package/dist/chunk-NECZ4MUE.js +0 -1416
  50. package/dist/chunk-NHGS4LOI.js +0 -1346
  51. package/dist/chunk-OK5752AP.js +0 -1325
  52. package/dist/chunk-QMW7OISM.js +0 -1063
  53. package/dist/chunk-RN56HUXA.js +0 -26972
  54. package/dist/chunk-RSQRF4FV.js +0 -1424
  55. package/dist/chunk-S2E65WRI.js +0 -26062
  56. package/dist/chunk-SRHM3HP4.js +0 -944
  57. package/dist/chunk-U7JO257M.js +0 -25017
  58. package/dist/chunk-UQCF65BN.js +0 -1623
  59. package/dist/chunk-USSP4GVB.js +0 -25064
  60. package/dist/chunk-V7KX3AQD.js +0 -26010
  61. package/dist/chunk-WOA5LSNB.js +0 -26559
  62. package/dist/chunk-WWP3VPEJ.js +0 -26080
  63. package/dist/chunk-YFKWMXJ6.js +0 -26066
  64. package/dist/chunk-Z552HHPV.js +0 -26846
  65. package/dist/chunk-ZQ5T64AR.js +0 -1365
  66. package/dist/memory-DNSQCDHC.js +0 -32
  67. package/dist/memory-ECS3TSGC.js +0 -32
  68. package/dist/memory-FVIBFROA.js +0 -32
  69. package/dist/memory-G6I3DBW4.js +0 -32
  70. package/dist/memory-HE6VWUPV.js +0 -32
  71. package/dist/memory-HEA7XNKB.js +0 -32
  72. package/dist/memory-JRYTVHNH.js +0 -32
  73. package/dist/memory-K3NL5E3K.js +0 -32
  74. package/dist/memory-KANI73CX.js +0 -32
  75. package/dist/memory-KI5G2A4C.js +0 -32
  76. package/dist/memory-PK55JUKG.js +0 -32
  77. package/dist/memory-PK5JJNAG.js +0 -32
  78. package/dist/memory-SAQPBIB4.js +0 -32
  79. package/dist/memory-SVGRP5KS.js +0 -32
  80. package/dist/memory-TQ46BGCI.js +0 -32
  81. package/dist/memory-YKQWWIVY.js +0 -32
  82. package/dist/memory-Z7BP5OSC.js +0 -32
  83. package/dist/registry-2REAPKPO.js +0 -12
  84. package/dist/registry-2XHXZDGH.js +0 -12
  85. package/dist/registry-4C55ZCPL.js +0 -12
  86. package/dist/registry-4QRMVAHX.js +0 -12
  87. package/dist/registry-5SYH3Y3U.js +0 -12
  88. package/dist/registry-6KZMA3XM.js +0 -12
  89. package/dist/registry-7QACDJQQ.js +0 -12
  90. package/dist/registry-B7UXRBW3.js +0 -12
  91. package/dist/registry-FKEREVDO.js +0 -12
  92. package/dist/registry-FLSGGY2R.js +0 -12
  93. package/dist/registry-G7NSRYCO.js +0 -12
  94. package/dist/registry-GH4O3A7H.js +0 -12
  95. package/dist/registry-IBH6K2KK.js +0 -12
  96. package/dist/registry-ILDEBNCW.js +0 -12
  97. package/dist/registry-JFEW5RUP.js +0 -12
  98. package/dist/registry-JQYQOZYN.js +0 -12
  99. package/dist/registry-JR5WY22P.js +0 -12
  100. package/dist/registry-KLO5YIHP.js +0 -12
  101. package/dist/registry-KVJAO5DF.js +0 -12
  102. package/dist/registry-MYJX6AEE.js +0 -12
  103. package/dist/registry-NBLIJHZT.js +0 -12
  104. package/dist/registry-NLRWSN5J.js +0 -12
  105. package/dist/registry-NMXDBYIZ.js +0 -12
  106. package/dist/registry-OUB6W3LM.js +0 -12
  107. package/dist/registry-P5KRT66L.js +0 -12
  108. package/dist/registry-PGZWRXMD.js +0 -12
  109. package/dist/registry-QAG2ZYH3.js +0 -12
  110. package/dist/registry-SUXWCWB4.js +0 -12
  111. package/dist/registry-SYCRRA65.js +0 -12
  112. package/dist/registry-TYROWPR5.js +0 -12
  113. package/dist/registry-U23ML76I.js +0 -12
  114. package/dist/registry-U76DBOV3.js +0 -12
  115. package/dist/registry-UA42LQUQ.js +0 -12
  116. package/dist/registry-W6ZFRI73.js +0 -12
  117. package/dist/registry-X5PMZTZY.js +0 -12
  118. package/dist/registry-XIL5F33J.js +0 -12
  119. package/dist/registry-XOPLQNZY.js +0 -12
  120. package/dist/registry-YDXVCE4Q.js +0 -12
  121. package/dist/registry-YGVTLIZH.js +0 -12
  122. package/dist/registry-ZNW3FDED.js +0 -12
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,56 @@ 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
+ fallbackProviderId: string | null;
1742
+ updatedTasks: ProviderTaskKey[];
1743
+ reassignedTasks: ProviderTaskKey[];
1744
+ clearedTasks: ProviderTaskKey[];
1745
+ }
1682
1746
  interface ManagedSourceAddOptions {
1683
1747
  compile?: boolean;
1684
1748
  brief?: boolean;
@@ -2287,6 +2351,7 @@ interface ScheduleController {
2287
2351
  }
2288
2352
 
2289
2353
  declare function installAgent(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<InstallAgentResult>;
2354
+ declare function getAgentInstallStatus(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<AgentInstallStatus>;
2290
2355
  declare function installConfiguredAgents(rootDir: string): Promise<InstallAgentResult[]>;
2291
2356
 
2292
2357
  declare function exportAiPack(rootDir: string, options?: AiExportOptions): Promise<AiExportResult>;
@@ -2586,6 +2651,11 @@ declare function validateGraphArtifact(graph: GraphArtifact, options?: {
2586
2651
  strict?: boolean;
2587
2652
  }): GraphValidationResult;
2588
2653
  declare function graphDiff(oldGraph: GraphArtifact, newGraph: GraphArtifact): GraphDiffResult;
2654
+ declare function findGraphCycles(graph: GraphArtifact, options?: {
2655
+ relations?: string[];
2656
+ limit?: number;
2657
+ maxDepth?: number;
2658
+ }): GraphCycleResult;
2589
2659
  /**
2590
2660
  * Compute the blast radius of changing a file/module by tracing reverse import
2591
2661
  * edges via BFS. Returns all modules that transitively depend on the target.
@@ -2762,6 +2832,11 @@ declare function runMigration(rootDir: string, options?: {
2762
2832
  dryRun?: boolean;
2763
2833
  }): Promise<MigrationResult>;
2764
2834
 
2835
+ declare function addProviderConfig(options: ProviderConfigAddOptions): Promise<ProviderConfigAddResult>;
2836
+ declare function listProviderConfigEntries(rootDir: string): Promise<ProviderConfigEntry[]>;
2837
+ declare function getProviderConfigEntry(rootDir: string, providerId: string): Promise<ProviderConfigEntry | null>;
2838
+ declare function removeProviderConfig(options: ProviderConfigRemoveOptions): Promise<ProviderConfigRemoveResult>;
2839
+
2765
2840
  declare abstract class BaseProviderAdapter implements ProviderAdapter {
2766
2841
  readonly id: string;
2767
2842
  readonly type: ProviderType;
@@ -3264,4 +3339,4 @@ declare function createWebSearchAdapter(id: string, config: WebSearchProviderCon
3264
3339
  type WebSearchTaskId = "deepLintProvider" | "queryProvider" | "exploreProvider";
3265
3340
  declare function getWebSearchAdapterForTask(rootDir: string, task: WebSearchTaskId): Promise<WebSearchAdapter>;
3266
3341
 
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 };
3342
+ 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.1";
5445
5514
  var codeLanguageSchema = z.enum([
5446
5515
  "javascript",
5447
5516
  "jsx",
@@ -6359,6 +6428,161 @@ 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
+ var REQUIRED_PROVIDER_TASK_KEYS = /* @__PURE__ */ new Set([
6442
+ "compileProvider",
6443
+ "queryProvider",
6444
+ "lintProvider",
6445
+ "visionProvider"
6446
+ ]);
6447
+ async function loadRawConfig(rootDir) {
6448
+ await initWorkspace(rootDir);
6449
+ const { paths } = await loadVaultConfig(rootDir);
6450
+ const raw = await readJsonFile(paths.configPath) ?? defaultVaultConfig();
6451
+ return { configPath: paths.configPath, raw };
6452
+ }
6453
+ function ensureProviders(raw) {
6454
+ if (!raw.providers || typeof raw.providers !== "object" || Array.isArray(raw.providers)) {
6455
+ raw.providers = {};
6456
+ }
6457
+ return raw.providers;
6458
+ }
6459
+ function ensureTasks(raw) {
6460
+ if (!raw.tasks || typeof raw.tasks !== "object" || Array.isArray(raw.tasks)) {
6461
+ raw.tasks = {};
6462
+ }
6463
+ return raw.tasks;
6464
+ }
6465
+ function normalizeProvider(provider) {
6466
+ providerTypeSchema.parse(provider.type);
6467
+ if (!provider.model.trim()) {
6468
+ throw new Error("Provider model cannot be empty.");
6469
+ }
6470
+ const rawProvider = provider;
6471
+ if (typeof rawProvider.apiKey === "string") {
6472
+ throw new Error("Provider configs must reference secrets through apiKeyEnv, not literal apiKey values.");
6473
+ }
6474
+ return JSON.parse(
6475
+ JSON.stringify({
6476
+ ...provider,
6477
+ model: provider.model.trim(),
6478
+ capabilities: provider.capabilities?.map((capability) => providerCapabilitySchema.parse(capability))
6479
+ })
6480
+ );
6481
+ }
6482
+ function assignedTasks(raw, providerId) {
6483
+ const tasks = ensureTasks(raw);
6484
+ return PROVIDER_TASK_KEYS.filter((taskKey) => tasks[taskKey] === providerId);
6485
+ }
6486
+ function toEntry(raw, id, provider) {
6487
+ return {
6488
+ id,
6489
+ type: provider.type,
6490
+ model: provider.model,
6491
+ baseUrl: provider.baseUrl,
6492
+ apiKeyEnv: provider.apiKeyEnv,
6493
+ capabilities: provider.capabilities ?? [],
6494
+ assignedTasks: assignedTasks(raw, id),
6495
+ provider
6496
+ };
6497
+ }
6498
+ function assertTaskKeys(tasks) {
6499
+ const requested = tasks ?? [];
6500
+ const valid = new Set(PROVIDER_TASK_KEYS);
6501
+ for (const task of requested) {
6502
+ if (!valid.has(task)) {
6503
+ throw new Error(`Unknown provider task ${String(task)}.`);
6504
+ }
6505
+ }
6506
+ return [...new Set(requested)];
6507
+ }
6508
+ async function addProviderConfig(options) {
6509
+ const { configPath, raw } = await loadRawConfig(options.rootDir);
6510
+ const providers = ensureProviders(raw);
6511
+ const tasks = ensureTasks(raw);
6512
+ const provider = normalizeProvider(options.provider);
6513
+ const existing = providers[options.providerId];
6514
+ const added = !existing;
6515
+ const updated = !added && JSON.stringify(existing) !== JSON.stringify(provider);
6516
+ providers[options.providerId] = provider;
6517
+ const updatedTasks = assertTaskKeys(options.tasks);
6518
+ for (const taskKey of updatedTasks) {
6519
+ tasks[taskKey] = options.providerId;
6520
+ }
6521
+ await writeJsonFile(configPath, raw);
6522
+ return {
6523
+ providerId: options.providerId,
6524
+ configPath,
6525
+ added,
6526
+ updated,
6527
+ updatedTasks
6528
+ };
6529
+ }
6530
+ async function listProviderConfigEntries(rootDir) {
6531
+ const { raw } = await loadRawConfig(rootDir);
6532
+ const providers = ensureProviders(raw);
6533
+ return Object.entries(providers).map(([id, provider]) => toEntry(raw, id, provider)).sort((left, right) => left.id.localeCompare(right.id));
6534
+ }
6535
+ async function getProviderConfigEntry(rootDir, providerId) {
6536
+ const { raw } = await loadRawConfig(rootDir);
6537
+ const providers = ensureProviders(raw);
6538
+ const provider = providers[providerId];
6539
+ return provider ? toEntry(raw, providerId, provider) : null;
6540
+ }
6541
+ async function removeProviderConfig(options) {
6542
+ const { configPath, raw } = await loadRawConfig(options.rootDir);
6543
+ const providers = ensureProviders(raw);
6544
+ const tasks = ensureTasks(raw);
6545
+ const removed = Boolean(providers[options.providerId]);
6546
+ delete providers[options.providerId];
6547
+ if (options.fallbackProviderId && !providers[options.fallbackProviderId]) {
6548
+ throw new Error(`Provider ${options.fallbackProviderId} is not configured; cannot reassign tasks to it.`);
6549
+ }
6550
+ const fallbackProviderId = options.fallbackProviderId ?? (providers.local ? "local" : Object.keys(providers).sort((left, right) => left.localeCompare(right))[0]);
6551
+ const assignedTaskKeys = PROVIDER_TASK_KEYS.filter((taskKey) => tasks[taskKey] === options.providerId);
6552
+ if (!fallbackProviderId) {
6553
+ const orphanedRequired = assignedTaskKeys.filter((taskKey) => REQUIRED_PROVIDER_TASK_KEYS.has(taskKey));
6554
+ if (orphanedRequired.length) {
6555
+ throw new Error(
6556
+ `Cannot remove provider ${options.providerId}; tasks ${orphanedRequired.join(", ")} would have no provider. Configure another provider first or pass a fallback.`
6557
+ );
6558
+ }
6559
+ }
6560
+ const reassignedTasks = [];
6561
+ const clearedTasks = [];
6562
+ for (const taskKey of assignedTaskKeys) {
6563
+ if (!fallbackProviderId) {
6564
+ delete tasks[taskKey];
6565
+ clearedTasks.push(taskKey);
6566
+ } else {
6567
+ tasks[taskKey] = fallbackProviderId;
6568
+ reassignedTasks.push(taskKey);
6569
+ }
6570
+ }
6571
+ const updatedTasks = assignedTaskKeys;
6572
+ if (removed || updatedTasks.length) {
6573
+ await writeJsonFile(configPath, raw);
6574
+ }
6575
+ return {
6576
+ providerId: options.providerId,
6577
+ configPath,
6578
+ removed,
6579
+ fallbackProviderId: fallbackProviderId ?? null,
6580
+ updatedTasks,
6581
+ reassignedTasks,
6582
+ clearedTasks
6583
+ };
6584
+ }
6585
+
6362
6586
  // src/providers/local-whisper-setup.ts
6363
6587
  import { createWriteStream, constants as fsConstants } from "fs";
6364
6588
  import fs11 from "fs/promises";
@@ -9548,6 +9772,7 @@ export {
9548
9772
  acceptApproval,
9549
9773
  addInput,
9550
9774
  addManagedSource,
9775
+ addProviderConfig,
9551
9776
  addWatchedRoot,
9552
9777
  applyDecayToPages,
9553
9778
  archiveCandidate,
@@ -9597,10 +9822,13 @@ export {
9597
9822
  exportGraphTree,
9598
9823
  exportObsidianCanvas,
9599
9824
  exportObsidianVault,
9825
+ findGraphCycles,
9600
9826
  finishMemoryTask,
9827
+ getAgentInstallStatus,
9601
9828
  getGitHookStatus,
9602
9829
  getGraphCommunityVault,
9603
9830
  getGraphStatus,
9831
+ getProviderConfigEntry,
9604
9832
  getProviderForTask,
9605
9833
  getRetrievalStatus,
9606
9834
  getWatchStatus,
@@ -9631,6 +9859,7 @@ export {
9631
9859
  listManifests,
9632
9860
  listMemoryTasks,
9633
9861
  listPages,
9862
+ listProviderConfigEntries,
9634
9863
  listSchedules,
9635
9864
  listTrackedRepoRoots,
9636
9865
  listWatchedRoots,
@@ -9664,6 +9893,7 @@ export {
9664
9893
  registerLocalWhisperProvider,
9665
9894
  rejectApproval,
9666
9895
  reloadManagedSources,
9896
+ removeProviderConfig,
9667
9897
  removeWatchedRoot,
9668
9898
  renderContextPackLlms,
9669
9899
  renderContextPackMarkdown,
@@ -12,8 +12,8 @@ import {
12
12
  resumeMemoryTask,
13
13
  startMemoryTask,
14
14
  updateMemoryTask
15
- } from "./chunk-CSPDMCON.js";
16
- import "./chunk-75BU5TQ6.js";
15
+ } from "./chunk-TQIIJVVG.js";
16
+ import "./chunk-NON6BVEI.js";
17
17
  import "./chunk-NAIERP4C.js";
18
18
  export {
19
19
  buildMemoryGraphElements,
@@ -3,7 +3,7 @@ import {
3
3
  createProvider,
4
4
  getProviderForTask,
5
5
  getResolvedPaths
6
- } from "./chunk-BTWPJEP2.js";
6
+ } from "./chunk-NON6BVEI.js";
7
7
  export {
8
8
  assertProviderCapability,
9
9
  createProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swarmvaultai/engine",
3
- "version": "3.15.0",
3
+ "version": "3.16.1",
4
4
  "description": "Core engine for SwarmVault: ingest, compile, query, lint, and provider abstractions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "chokidar": "^4.0.3",
56
56
  "compromise": "^14.14.4",
57
57
  "csv-parse": "^6.2.1",
58
- "fast-xml-parser": "^5.5.11",
58
+ "fast-xml-parser": "^5.8.0",
59
59
  "fflate": "^0.8.2",
60
60
  "graphology": "^0.26.0",
61
61
  "graphology-communities-louvain": "^2.0.2",
@@ -94,9 +94,9 @@
94
94
  "@types/node": "^24.6.0",
95
95
  "@types/turndown": "^5.0.5",
96
96
  "graphology-types": "^0.24.8",
97
- "tsup": "^8.5.0",
98
97
  "tree-sitter-julia": "0.23.1",
99
98
  "tree-sitter-systemverilog": "0.3.1",
99
+ "tsup": "^8.5.0",
100
100
  "vitest": "^3.2.4"
101
101
  }
102
102
  }