@swarmvaultai/engine 0.7.29 → 0.7.31
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/chunk-NECZ4MUE.js +1416 -0
- package/dist/index.d.ts +86 -1
- package/dist/index.js +1889 -1434
- package/dist/registry-4C55ZCPL.js +12 -0
- package/dist/viewer/assets/{index-DxKn2KOc.js → index-CwkhOTfH.js} +37 -36
- package/dist/viewer/assets/{index-BHjjw4rU.css → index-DRAglPyY.css} +1 -1
- package/dist/viewer/index.html +2 -2
- package/dist/viewer/lib.d.ts +27 -1
- package/dist/viewer/lib.js +141 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -229,6 +229,44 @@ interface VaultConfig {
|
|
|
229
229
|
rerank?: boolean;
|
|
230
230
|
};
|
|
231
231
|
autoCommit?: boolean;
|
|
232
|
+
candidate?: {
|
|
233
|
+
autoPromote?: CandidatePromotionConfig;
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
interface CandidatePromotionConfig {
|
|
237
|
+
enabled: boolean;
|
|
238
|
+
minSources: number;
|
|
239
|
+
minConfidence: number;
|
|
240
|
+
minAgreement: number;
|
|
241
|
+
minDegree: number;
|
|
242
|
+
minAgeHours: number;
|
|
243
|
+
maxPerRun: number;
|
|
244
|
+
dryRun: boolean;
|
|
245
|
+
}
|
|
246
|
+
type PromotionGateKind = "sources" | "confidence" | "agreement" | "degree" | "age";
|
|
247
|
+
interface PromotionGateResult {
|
|
248
|
+
gate: PromotionGateKind;
|
|
249
|
+
value: number;
|
|
250
|
+
threshold: number;
|
|
251
|
+
passed: boolean;
|
|
252
|
+
}
|
|
253
|
+
interface PromotionDecision {
|
|
254
|
+
pageId: string;
|
|
255
|
+
title: string;
|
|
256
|
+
kind: "concept" | "entity";
|
|
257
|
+
promote: boolean;
|
|
258
|
+
score: number;
|
|
259
|
+
gates: PromotionGateResult[];
|
|
260
|
+
reasons: string[];
|
|
261
|
+
}
|
|
262
|
+
interface PromotionSession {
|
|
263
|
+
startedAt: string;
|
|
264
|
+
finishedAt: string;
|
|
265
|
+
dryRun: boolean;
|
|
266
|
+
promotedPageIds: string[];
|
|
267
|
+
skippedPageIds: string[];
|
|
268
|
+
decisions: PromotionDecision[];
|
|
269
|
+
sessionPath?: string;
|
|
232
270
|
}
|
|
233
271
|
interface ResolvedPaths {
|
|
234
272
|
rootDir: string;
|
|
@@ -312,11 +350,17 @@ interface IngestOptions {
|
|
|
312
350
|
maxFiles?: number;
|
|
313
351
|
gitignore?: boolean;
|
|
314
352
|
extractClasses?: SourceClass[];
|
|
353
|
+
resume?: string;
|
|
315
354
|
}
|
|
316
355
|
interface DirectoryIngestSkip {
|
|
317
356
|
path: string;
|
|
318
357
|
reason: string;
|
|
319
358
|
}
|
|
359
|
+
interface DirectoryIngestFailure {
|
|
360
|
+
path: string;
|
|
361
|
+
error: string;
|
|
362
|
+
stage: "prepare" | "persist";
|
|
363
|
+
}
|
|
320
364
|
interface DirectoryIngestResult {
|
|
321
365
|
inputDir: string;
|
|
322
366
|
repoRoot: string;
|
|
@@ -324,6 +368,9 @@ interface DirectoryIngestResult {
|
|
|
324
368
|
imported: SourceManifest[];
|
|
325
369
|
updated: SourceManifest[];
|
|
326
370
|
skipped: DirectoryIngestSkip[];
|
|
371
|
+
failed?: DirectoryIngestFailure[];
|
|
372
|
+
runId?: string;
|
|
373
|
+
statePath?: string;
|
|
327
374
|
}
|
|
328
375
|
interface InputIngestResult {
|
|
329
376
|
input: string;
|
|
@@ -687,11 +734,36 @@ interface ApprovalSummary {
|
|
|
687
734
|
acceptedCount: number;
|
|
688
735
|
rejectedCount: number;
|
|
689
736
|
}
|
|
737
|
+
type ApprovalDiffLine = {
|
|
738
|
+
type: "add" | "remove" | "context";
|
|
739
|
+
value: string;
|
|
740
|
+
};
|
|
741
|
+
type ApprovalDiffHunk = {
|
|
742
|
+
oldStart: number;
|
|
743
|
+
oldLines: number;
|
|
744
|
+
newStart: number;
|
|
745
|
+
newLines: number;
|
|
746
|
+
lines: ApprovalDiffLine[];
|
|
747
|
+
};
|
|
748
|
+
type ApprovalFrontmatterChange = {
|
|
749
|
+
key: string;
|
|
750
|
+
before?: unknown;
|
|
751
|
+
after?: unknown;
|
|
752
|
+
protected: boolean;
|
|
753
|
+
};
|
|
754
|
+
type ApprovalStructuredDiff = {
|
|
755
|
+
hunks: ApprovalDiffHunk[];
|
|
756
|
+
addedLines: number;
|
|
757
|
+
removedLines: number;
|
|
758
|
+
frontmatterChanges: ApprovalFrontmatterChange[];
|
|
759
|
+
};
|
|
690
760
|
interface ApprovalEntryDetail extends ApprovalEntry {
|
|
691
761
|
currentContent?: string;
|
|
692
762
|
stagedContent?: string;
|
|
693
763
|
changeSummary?: string;
|
|
694
764
|
diff?: string;
|
|
765
|
+
structuredDiff?: ApprovalStructuredDiff;
|
|
766
|
+
warnings?: string[];
|
|
695
767
|
}
|
|
696
768
|
interface ApprovalDetail extends ApprovalSummary {
|
|
697
769
|
entries: ApprovalEntryDetail[];
|
|
@@ -742,6 +814,12 @@ interface CompileResult {
|
|
|
742
814
|
postPassApprovalDir?: string;
|
|
743
815
|
promotedPageIds: string[];
|
|
744
816
|
candidatePageCount: number;
|
|
817
|
+
autoPromotion?: {
|
|
818
|
+
evaluated: number;
|
|
819
|
+
promoted: number;
|
|
820
|
+
dryRun: boolean;
|
|
821
|
+
sessionPath?: string;
|
|
822
|
+
};
|
|
745
823
|
tokenStats?: {
|
|
746
824
|
estimatedTokens: number;
|
|
747
825
|
maxTokens: number;
|
|
@@ -1373,6 +1451,9 @@ declare function autoCommitWikiChanges(rootDir: string, operation: string, detai
|
|
|
1373
1451
|
force?: boolean;
|
|
1374
1452
|
}): Promise<string | null>;
|
|
1375
1453
|
|
|
1454
|
+
declare const DEFAULT_PROMOTION_CONFIG: CandidatePromotionConfig;
|
|
1455
|
+
declare function evaluateCandidateForPromotion(page: GraphPage, graph: GraphArtifact, history: CompileState["candidateHistory"] | undefined, config: CandidatePromotionConfig, now?: number): PromotionDecision;
|
|
1456
|
+
|
|
1376
1457
|
declare function defaultVaultConfig(profile?: VaultProfileConfig): VaultConfig;
|
|
1377
1458
|
declare function defaultVaultSchema(profile?: string | VaultProfileConfig): string;
|
|
1378
1459
|
declare function resolvePaths(rootDir: string, config?: VaultConfig, configPath?: string, schemaPath?: string): ResolvedPaths;
|
|
@@ -1552,6 +1633,10 @@ declare function acceptApproval(rootDir: string, approvalId: string, targets?: s
|
|
|
1552
1633
|
declare function rejectApproval(rootDir: string, approvalId: string, targets?: string[]): Promise<ReviewActionResult>;
|
|
1553
1634
|
declare function listCandidates(rootDir: string): Promise<CandidateRecord[]>;
|
|
1554
1635
|
declare function promoteCandidate(rootDir: string, target: string): Promise<CandidateRecord>;
|
|
1636
|
+
declare function runAutoPromotion(rootDir: string, options?: {
|
|
1637
|
+
dryRun?: boolean;
|
|
1638
|
+
}): Promise<PromotionSession>;
|
|
1639
|
+
declare function previewCandidatePromotions(rootDir: string): Promise<PromotionDecision[]>;
|
|
1555
1640
|
declare function archiveCandidate(rootDir: string, target: string): Promise<CandidateRecord>;
|
|
1556
1641
|
declare function initVault(rootDir: string, options?: InitOptions): Promise<void>;
|
|
1557
1642
|
declare function compileVault(rootDir: string, options?: CompileOptions): Promise<CompileResult>;
|
|
@@ -1627,4 +1712,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
|
|
|
1627
1712
|
declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
|
|
1628
1713
|
declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
|
|
1629
1714
|
|
|
1630
|
-
export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalManifest, type ApprovalSummary, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type 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 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, type LintFinding, type LintOptions, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type Neo4jGraphSinkConfig, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RepoSyncResult, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, addManagedSource, agentTypeSchema, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, estimatePageTokens, estimateTokens, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, rejectApproval, reloadManagedSources, resolvePaths, resumeSourceSession, reviewManagedSource, reviewSourceScope, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
|
|
1715
|
+
export { type AddOptions, type AddResult, 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 BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, DEFAULT_PROMOTION_CONFIG, 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 Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, 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 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, type LintFinding, type LintOptions, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type Neo4jGraphSinkConfig, 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 ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RepoSyncResult, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, addManagedSource, agentTypeSchema, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, pathGraphVault, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, rejectApproval, reloadManagedSources, resolvePaths, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
|