@swarmvaultai/engine 0.5.0 → 0.6.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.
package/dist/index.d.ts CHANGED
@@ -54,8 +54,12 @@ type PageStatus = "draft" | "candidate" | "active" | "archived";
54
54
  type PageManager = "system" | "human";
55
55
  type ApprovalEntryStatus = "pending" | "accepted" | "rejected";
56
56
  type ApprovalChangeType = "create" | "update" | "delete" | "promote";
57
- type ApprovalBundleType = "compile" | "generated_output" | "source_review" | "guided_source";
57
+ type ApprovalBundleType = "compile" | "generated_output" | "source_review" | "guided_source" | "guided_session";
58
58
  type ApprovalEntryLabel = "source-brief" | "source-review" | "source-guide" | "guided-update";
59
+ type GuidedSourceSessionStatus = "awaiting_input" | "ready_to_stage" | "staged" | "accepted" | "rejected";
60
+ type VaultProfilePreset = "reader" | "timeline" | "diligence" | "thesis";
61
+ type VaultDashboardPack = "default" | "reader" | "diligence";
62
+ type GuidedSessionMode = "insights_only" | "canonical_review";
59
63
  type SourceKind = "markdown" | "text" | "pdf" | "image" | "html" | "docx" | "epub" | "csv" | "xlsx" | "pptx" | "transcript" | "chat_export" | "email" | "calendar" | "binary" | "code";
60
64
  type SourceCaptureType = "arxiv" | "doi" | "tweet" | "article" | "url";
61
65
  type SourceClass = "first_party" | "third_party" | "resource" | "generated";
@@ -146,6 +150,12 @@ interface WebSearchAdapter {
146
150
  readonly type: WebSearchProviderType;
147
151
  search(query: string, limit?: number): Promise<WebSearchResult[]>;
148
152
  }
153
+ interface VaultProfileConfig {
154
+ presets: VaultProfilePreset[];
155
+ dashboardPack: VaultDashboardPack;
156
+ guidedSessionMode: GuidedSessionMode;
157
+ dataviewBlocks: boolean;
158
+ }
149
159
  interface VaultConfig {
150
160
  workspace: {
151
161
  rawDir: string;
@@ -166,6 +176,7 @@ interface VaultConfig {
166
176
  viewer: {
167
177
  port: number;
168
178
  };
179
+ profile: VaultProfileConfig;
169
180
  projects?: Record<string, {
170
181
  roots: string[];
171
182
  schemaPath?: string;
@@ -220,6 +231,7 @@ interface ResolvedPaths {
220
231
  benchmarkPath: string;
221
232
  jobsLogPath: string;
222
233
  sessionsDir: string;
234
+ sourceSessionsDir: string;
223
235
  approvalsDir: string;
224
236
  watchDir: string;
225
237
  watchStatusPath: string;
@@ -594,6 +606,7 @@ interface ApprovalManifest {
594
606
  createdAt: string;
595
607
  bundleType?: ApprovalBundleType;
596
608
  title?: string;
609
+ sourceSessionId?: string;
597
610
  entries: ApprovalEntry[];
598
611
  }
599
612
  interface ApprovalSummary {
@@ -601,6 +614,7 @@ interface ApprovalSummary {
601
614
  createdAt: string;
602
615
  bundleType?: ApprovalBundleType;
603
616
  title?: string;
617
+ sourceSessionId?: string;
604
618
  entryCount: number;
605
619
  pendingCount: number;
606
620
  acceptedCount: number;
@@ -633,7 +647,7 @@ interface CompileOptions {
633
647
  }
634
648
  interface InitOptions {
635
649
  obsidian?: boolean;
636
- profile?: "default" | "personal-research";
650
+ profile?: string;
637
651
  }
638
652
  interface CompileResult {
639
653
  graphPath: string;
@@ -772,6 +786,7 @@ interface ManagedSourceAddOptions {
772
786
  brief?: boolean;
773
787
  review?: boolean;
774
788
  guide?: boolean;
789
+ guideAnswers?: GuidedSourceSessionAnswers;
775
790
  maxPages?: number;
776
791
  maxDepth?: number;
777
792
  }
@@ -796,6 +811,31 @@ interface ManagedSourceReloadResult {
796
811
  interface ManagedSourceDeleteResult {
797
812
  removed: ManagedSourceRecord;
798
813
  }
814
+ interface GuidedSourceSessionQuestion {
815
+ id: string;
816
+ prompt: string;
817
+ answer?: string;
818
+ }
819
+ type GuidedSourceSessionAnswers = Record<string, string> | string[];
820
+ interface GuidedSourceSessionRecord {
821
+ sessionId: string;
822
+ scopeId: string;
823
+ scopeTitle: string;
824
+ sourceIds: string[];
825
+ kind?: string;
826
+ status: GuidedSourceSessionStatus;
827
+ createdAt: string;
828
+ updatedAt: string;
829
+ questions: GuidedSourceSessionQuestion[];
830
+ briefPath?: string;
831
+ reviewPath?: string;
832
+ guidePath?: string;
833
+ sessionPath?: string;
834
+ approvalId?: string;
835
+ approvalDir?: string;
836
+ targetedPagePaths: string[];
837
+ stagedUpdatePaths: string[];
838
+ }
799
839
  interface SourceReviewResult {
800
840
  sourceId: string;
801
841
  pageId: string;
@@ -806,10 +846,18 @@ interface SourceReviewResult {
806
846
  }
807
847
  interface SourceGuideResult {
808
848
  sourceId: string;
809
- pageId: string;
810
- guidePath: string;
811
- reviewPageId: string;
812
- reviewPath: string;
849
+ pageId?: string;
850
+ guidePath?: string;
851
+ reviewPageId?: string;
852
+ reviewPath?: string;
853
+ sessionId: string;
854
+ sessionPath: string;
855
+ sessionStatePath: string;
856
+ status: GuidedSourceSessionStatus;
857
+ questions: GuidedSourceSessionQuestion[];
858
+ awaitingInput?: boolean;
859
+ targetedPagePaths: string[];
860
+ stagedUpdatePaths: string[];
813
861
  briefPath?: string;
814
862
  staged: boolean;
815
863
  approvalId?: string;
@@ -1217,15 +1265,15 @@ interface ScheduleController {
1217
1265
  declare function installAgent(rootDir: string, agent: AgentType, options?: InstallAgentOptions): Promise<InstallAgentResult>;
1218
1266
  declare function installConfiguredAgents(rootDir: string): Promise<InstallAgentResult[]>;
1219
1267
 
1220
- declare function defaultVaultConfig(): VaultConfig;
1221
- declare function defaultVaultSchema(profile?: "default" | "personal-research"): string;
1268
+ declare function defaultVaultConfig(profile?: VaultProfileConfig): VaultConfig;
1269
+ declare function defaultVaultSchema(profile?: string | VaultProfileConfig): string;
1222
1270
  declare function resolvePaths(rootDir: string, config?: VaultConfig, configPath?: string, schemaPath?: string): ResolvedPaths;
1223
1271
  declare function loadVaultConfig(rootDir: string): Promise<{
1224
1272
  config: VaultConfig;
1225
1273
  paths: ResolvedPaths;
1226
1274
  }>;
1227
1275
  declare function initWorkspace(rootDir: string, options?: {
1228
- profile?: "default" | "personal-research";
1276
+ profile?: string;
1229
1277
  }): Promise<{
1230
1278
  config: VaultConfig;
1231
1279
  paths: ResolvedPaths;
@@ -1302,9 +1350,16 @@ type SourceScope = {
1302
1350
  briefPath?: string;
1303
1351
  };
1304
1352
  declare function reviewSourceScope(rootDir: string, scope: SourceScope): Promise<SourceReviewResult>;
1305
- declare function guideSourceScope(rootDir: string, scope: SourceScope): Promise<SourceGuideResult>;
1353
+ declare function guideSourceScope(rootDir: string, scope: SourceScope, options?: {
1354
+ answers?: GuidedSourceSessionAnswers;
1355
+ }): Promise<SourceGuideResult>;
1306
1356
  declare function reviewManagedSource(rootDir: string, id: string): Promise<SourceReviewResult>;
1307
- declare function guideManagedSource(rootDir: string, id: string): Promise<SourceGuideResult>;
1357
+ declare function guideManagedSource(rootDir: string, id: string, options?: {
1358
+ answers?: GuidedSourceSessionAnswers;
1359
+ }): Promise<SourceGuideResult>;
1360
+ declare function resumeSourceSession(rootDir: string, id: string, options?: {
1361
+ answers?: GuidedSourceSessionAnswers;
1362
+ }): Promise<SourceGuideResult>;
1308
1363
  declare function listManagedSourceRecords(rootDir: string): Promise<ManagedSourceRecord[]>;
1309
1364
  declare function addManagedSource(rootDir: string, input: string, options?: ManagedSourceAddOptions): Promise<ManagedSourceAddResult>;
1310
1365
  declare function reloadManagedSources(rootDir: string, options?: ManagedSourceReloadOptions): Promise<ManagedSourceReloadResult>;
@@ -1327,6 +1382,7 @@ declare function stageGeneratedOutputPages(rootDir: string, stagedPages: Array<{
1327
1382
  }>, options?: {
1328
1383
  bundleType?: ApprovalBundleType;
1329
1384
  title?: string;
1385
+ sourceSessionId?: string;
1330
1386
  }): Promise<{
1331
1387
  approvalId: string;
1332
1388
  approvalDir: string;
@@ -1411,4 +1467,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
1411
1467
  declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
1412
1468
  declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
1413
1469
 
1414
- 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 BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, 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 WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, acceptApproval, addInput, addManagedSource, agentTypeSchema, archiveCandidate, assertProviderCapability, benchmarkVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, 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, reviewManagedSource, reviewSourceScope, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, syncTrackedRepos, syncTrackedReposForWatch, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };
1470
+ 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 BenchmarkArtifact, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type 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, benchmarkVault, bootstrapDemo, compileVault, createMcpServer, createProvider, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, 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, uninstallGitHooks, watchVault, webSearchProviderTypeSchema };