@swarmvaultai/engine 3.7.0 → 3.7.2

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
@@ -3088,6 +3088,7 @@ declare function exportGraphHtml(rootDir: string, outputPath: string, options?:
3088
3088
  declare function evaluateGraphShrinkGuard(previousGraph: GraphArtifact | null | undefined, nextGraph: GraphArtifact | null | undefined, options?: {
3089
3089
  threshold?: number;
3090
3090
  }): GraphShrinkGuardResult;
3091
+ declare function projectGraphAfterRemovals(graph: GraphArtifact, removedSourceIds: readonly string[]): GraphArtifact;
3091
3092
  type WatchCycleResult = {
3092
3093
  watchedRepoRoots: string[];
3093
3094
  importedCount: number;
@@ -3139,4 +3140,4 @@ declare function createWebSearchAdapter(id: string, config: WebSearchProviderCon
3139
3140
  type WebSearchTaskId = "deepLintProvider" | "queryProvider" | "exploreProvider";
3140
3141
  declare function getWebSearchAdapterForTask(rootDir: string, task: WebSearchTaskId): Promise<WebSearchAdapter>;
3141
3142
 
3142
- export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentMemoryDecision, type AgentMemoryNote, type AgentMemoryResumeFormat, type AgentMemoryTask, type AgentMemoryTaskResult, type AgentMemoryTaskStatus, type AgentMemoryTaskSummary, type AgentType, 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 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 GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GraphShareBundleFile, type GraphShrinkDimension, type GraphShrinkGuardResult, type GraphStatsResult, type GraphStatusChange, type GraphStatusResult, 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 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, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildContextPack, buildGraphShareArtifact, buildGraphTree, buildMemoryGraphElements, buildRedactor, checkTrackedRepoChanges, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteContextPack, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, doctorRetrieval, doctorVault, downloadWhisperModel, ensureMemoryLedger, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, evaluateGraphShrinkGuard, expectedModelPath, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportGraphTree, exportObsidianCanvas, exportObsidianVault, finishMemoryTask, getGitHookStatus, getGraphCommunityVault, getGraphStatus, getProviderForTask, getRetrievalStatus, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, graphStatsVault, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listContextPacks, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listMemoryTasks, listPages, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadMemoryTaskPages, loadVaultConfig, loadVaultSchema, loadVaultSchemas, lookupPresetCapabilities, markSuperseded, memoryTaskHashes, mergeGraphFiles, modelDownloadUrl, pathGraphVault, persistDecayFrontmatter, planMigration, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, 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, watchVault, webSearchProviderTypeSchema, withCapabilityFallback, writeRetrievalManifest };
3143
+ export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentMemoryDecision, type AgentMemoryNote, type AgentMemoryResumeFormat, type AgentMemoryTask, type AgentMemoryTaskResult, type AgentMemoryTaskStatus, type AgentMemoryTaskSummary, type AgentType, 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 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 GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GraphShareBundleFile, type GraphShrinkDimension, type GraphShrinkGuardResult, type GraphStatsResult, type GraphStatusChange, type GraphStatusResult, 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 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, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildContextPack, buildGraphShareArtifact, buildGraphTree, buildMemoryGraphElements, buildRedactor, checkTrackedRepoChanges, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteContextPack, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, doctorRetrieval, doctorVault, downloadWhisperModel, ensureMemoryLedger, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, evaluateGraphShrinkGuard, expectedModelPath, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportGraphTree, exportObsidianCanvas, exportObsidianVault, finishMemoryTask, getGitHookStatus, getGraphCommunityVault, getGraphStatus, getProviderForTask, getRetrievalStatus, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, graphStatsVault, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, 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, 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, watchVault, webSearchProviderTypeSchema, withCapabilityFallback, writeRetrievalManifest };
package/dist/index.js CHANGED
@@ -125,7 +125,7 @@ import {
125
125
  writeGuidedSourceSession,
126
126
  writeRetrievalManifest,
127
127
  writeWatchStatusArtifact
128
- } from "./chunk-S2E65WRI.js";
128
+ } from "./chunk-YFKWMXJ6.js";
129
129
  import {
130
130
  LocalWhisperProviderAdapter,
131
131
  SWARMVAULT_OUT_ENV,
@@ -151,7 +151,7 @@ import {
151
151
  truncate,
152
152
  uniqueBy,
153
153
  writeJsonFile
154
- } from "./chunk-7O2HJSWQ.js";
154
+ } from "./chunk-HW72C7O2.js";
155
155
  import {
156
156
  estimatePageTokens,
157
157
  estimateTokens,
@@ -673,6 +673,33 @@ function evaluateGraphShrinkGuard(previousGraph, nextGraph, options = {}) {
673
673
  function forceGraphUpdateEnabled(options) {
674
674
  return options.force === true || process2.env.SWARMVAULT_FORCE_UPDATE === "1" || process2.env.SWARMVAULT_FORCE_UPDATE === "true";
675
675
  }
676
+ function projectGraphAfterRemovals(graph, removedSourceIds) {
677
+ if (removedSourceIds.length === 0) {
678
+ return graph;
679
+ }
680
+ const removed = new Set(removedSourceIds);
681
+ const droppedNodeIds = new Set(
682
+ graph.nodes.filter((node) => node.sourceIds.length > 0 && node.sourceIds.every((sourceId) => removed.has(sourceId))).map((node) => node.id)
683
+ );
684
+ if (droppedNodeIds.size === 0) {
685
+ return graph;
686
+ }
687
+ const remainingNodes = graph.nodes.filter((node) => !droppedNodeIds.has(node.id));
688
+ const remainingEdges = graph.edges.filter((edge) => !droppedNodeIds.has(edge.source) && !droppedNodeIds.has(edge.target));
689
+ return { ...graph, nodes: remainingNodes, edges: remainingEdges };
690
+ }
691
+ async function predictRemovedSourceIdsFromRepoSync(rootDir, options) {
692
+ if (!options.repo) {
693
+ return [];
694
+ }
695
+ const overrideRoots = options.overrideRoots && options.overrideRoots.length > 0 ? options.overrideRoots : void 0;
696
+ const changes = await checkTrackedRepoChanges(rootDir, overrideRoots);
697
+ return [
698
+ ...new Set(
699
+ changes.filter((change) => change.changeType === "removed").map((change) => change.sourceId).filter((sourceId) => Boolean(sourceId))
700
+ )
701
+ ];
702
+ }
676
703
  function hasIgnoredRepoSegment(baseDir, targetPath) {
677
704
  const relativePath = path2.relative(baseDir, targetPath);
678
705
  if (!relativePath || relativePath.startsWith("..")) {
@@ -827,13 +854,17 @@ async function runWatchCycle(rootDir, options = {}) {
827
854
  changedPages: []
828
855
  };
829
856
  try {
830
- result = await performWatchCycle(rootDir, paths, options, options.codeOnly ?? false);
831
- const nextGraph = await readJsonFile(paths.graphPath);
832
- const guard = evaluateGraphShrinkGuard(previousGraph, nextGraph, { threshold: options.maxGraphShrinkRatio });
833
- if (previousGraph && nextGraph && guard.blocked && !forceGraphUpdateEnabled(options)) {
834
- await writeJsonFile(paths.graphPath, previousGraph);
835
- throw new Error(guard.message ?? "Graph update aborted because the graph shrank unexpectedly.");
857
+ if (previousGraph && options.repo && !forceGraphUpdateEnabled(options)) {
858
+ const removedSourceIds = await predictRemovedSourceIdsFromRepoSync(rootDir, options);
859
+ if (removedSourceIds.length > 0) {
860
+ const projectedGraph = projectGraphAfterRemovals(previousGraph, removedSourceIds);
861
+ const guard = evaluateGraphShrinkGuard(previousGraph, projectedGraph, { threshold: options.maxGraphShrinkRatio });
862
+ if (guard.blocked) {
863
+ throw new Error(guard.message ?? "Graph update aborted because the graph shrank unexpectedly.");
864
+ }
865
+ }
836
866
  }
867
+ result = await performWatchCycle(rootDir, paths, options, options.codeOnly ?? false);
837
868
  return result;
838
869
  } catch (caught) {
839
870
  success = false;
@@ -4743,7 +4774,7 @@ import path10 from "path";
4743
4774
  import { McpServer, ResourceTemplate } from "@modelcontextprotocol/sdk/server/mcp.js";
4744
4775
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4745
4776
  import { z } from "zod";
4746
- var SERVER_VERSION = "3.7.0";
4777
+ var SERVER_VERSION = "3.7.2";
4747
4778
  async function createMcpServer(rootDir) {
4748
4779
  const server = new McpServer({
4749
4780
  name: "swarmvault",
@@ -8895,6 +8926,7 @@ export {
8895
8926
  persistDecayFrontmatter,
8896
8927
  planMigration,
8897
8928
  previewCandidatePromotions,
8929
+ projectGraphAfterRemovals,
8898
8930
  promoteCandidate,
8899
8931
  pushGraphNeo4j,
8900
8932
  queryGraphVault,
@@ -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-JTRE7C7P.js";
16
+ import "./chunk-7O2HJSWQ.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-YFKWMXJ6.js";
16
+ import "./chunk-HW72C7O2.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-HW72C7O2.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.7.0",
3
+ "version": "3.7.2",
4
4
  "description": "Core engine for SwarmVault: ingest, compile, query, lint, and provider abstractions.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",