@swarmvaultai/engine 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -54,6 +54,9 @@ 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" | "guided_session";
58
+ type ApprovalEntryLabel = "source-brief" | "source-review" | "source-guide" | "guided-update";
59
+ type GuidedSourceSessionStatus = "awaiting_input" | "ready_to_stage" | "staged" | "accepted" | "rejected";
57
60
  type SourceKind = "markdown" | "text" | "pdf" | "image" | "html" | "docx" | "epub" | "csv" | "xlsx" | "pptx" | "transcript" | "chat_export" | "email" | "calendar" | "binary" | "code";
58
61
  type SourceCaptureType = "arxiv" | "doi" | "tweet" | "article" | "url";
59
62
  type SourceClass = "first_party" | "third_party" | "resource" | "generated";
@@ -218,6 +221,7 @@ interface ResolvedPaths {
218
221
  benchmarkPath: string;
219
222
  jobsLogPath: string;
220
223
  sessionsDir: string;
224
+ sourceSessionsDir: string;
221
225
  approvalsDir: string;
222
226
  watchDir: string;
223
227
  watchStatusPath: string;
@@ -585,15 +589,22 @@ interface ApprovalEntry {
585
589
  sourceIds: string[];
586
590
  nextPath?: string;
587
591
  previousPath?: string;
592
+ label?: ApprovalEntryLabel;
588
593
  }
589
594
  interface ApprovalManifest {
590
595
  approvalId: string;
591
596
  createdAt: string;
597
+ bundleType?: ApprovalBundleType;
598
+ title?: string;
599
+ sourceSessionId?: string;
592
600
  entries: ApprovalEntry[];
593
601
  }
594
602
  interface ApprovalSummary {
595
603
  approvalId: string;
596
604
  createdAt: string;
605
+ bundleType?: ApprovalBundleType;
606
+ title?: string;
607
+ sourceSessionId?: string;
597
608
  entryCount: number;
598
609
  pendingCount: number;
599
610
  acceptedCount: number;
@@ -626,6 +637,7 @@ interface CompileOptions {
626
637
  }
627
638
  interface InitOptions {
628
639
  obsidian?: boolean;
640
+ profile?: "default" | "personal-research";
629
641
  }
630
642
  interface CompileResult {
631
643
  graphPath: string;
@@ -763,6 +775,8 @@ interface ManagedSourceAddOptions {
763
775
  compile?: boolean;
764
776
  brief?: boolean;
765
777
  review?: boolean;
778
+ guide?: boolean;
779
+ guideAnswers?: GuidedSourceSessionAnswers;
766
780
  maxPages?: number;
767
781
  maxDepth?: number;
768
782
  }
@@ -775,16 +789,43 @@ interface ManagedSourceAddResult {
775
789
  compile?: CompileResult;
776
790
  briefGenerated: boolean;
777
791
  review?: SourceReviewResult;
792
+ guide?: SourceGuideResult;
778
793
  }
779
794
  interface ManagedSourceReloadResult {
780
795
  sources: ManagedSourceRecord[];
781
796
  compile?: CompileResult;
782
797
  briefPaths: string[];
783
798
  reviews: SourceReviewResult[];
799
+ guides: SourceGuideResult[];
784
800
  }
785
801
  interface ManagedSourceDeleteResult {
786
802
  removed: ManagedSourceRecord;
787
803
  }
804
+ interface GuidedSourceSessionQuestion {
805
+ id: string;
806
+ prompt: string;
807
+ answer?: string;
808
+ }
809
+ type GuidedSourceSessionAnswers = Record<string, string> | string[];
810
+ interface GuidedSourceSessionRecord {
811
+ sessionId: string;
812
+ scopeId: string;
813
+ scopeTitle: string;
814
+ sourceIds: string[];
815
+ kind?: string;
816
+ status: GuidedSourceSessionStatus;
817
+ createdAt: string;
818
+ updatedAt: string;
819
+ questions: GuidedSourceSessionQuestion[];
820
+ briefPath?: string;
821
+ reviewPath?: string;
822
+ guidePath?: string;
823
+ sessionPath?: string;
824
+ approvalId?: string;
825
+ approvalDir?: string;
826
+ targetedPagePaths: string[];
827
+ stagedUpdatePaths: string[];
828
+ }
788
829
  interface SourceReviewResult {
789
830
  sourceId: string;
790
831
  pageId: string;
@@ -793,6 +834,25 @@ interface SourceReviewResult {
793
834
  approvalId?: string;
794
835
  approvalDir?: string;
795
836
  }
837
+ interface SourceGuideResult {
838
+ sourceId: string;
839
+ pageId?: string;
840
+ guidePath?: string;
841
+ reviewPageId?: string;
842
+ reviewPath?: string;
843
+ sessionId: string;
844
+ sessionPath: string;
845
+ sessionStatePath: string;
846
+ status: GuidedSourceSessionStatus;
847
+ questions: GuidedSourceSessionQuestion[];
848
+ awaitingInput?: boolean;
849
+ targetedPagePaths: string[];
850
+ stagedUpdatePaths: string[];
851
+ briefPath?: string;
852
+ staged: boolean;
853
+ approvalId?: string;
854
+ approvalDir?: string;
855
+ }
796
856
  interface GitHookStatus {
797
857
  repoRoot: string | null;
798
858
  postCommit: "installed" | "not_installed" | "other_content";
@@ -1196,13 +1256,15 @@ declare function installAgent(rootDir: string, agent: AgentType, options?: Insta
1196
1256
  declare function installConfiguredAgents(rootDir: string): Promise<InstallAgentResult[]>;
1197
1257
 
1198
1258
  declare function defaultVaultConfig(): VaultConfig;
1199
- declare function defaultVaultSchema(): string;
1259
+ declare function defaultVaultSchema(profile?: "default" | "personal-research"): string;
1200
1260
  declare function resolvePaths(rootDir: string, config?: VaultConfig, configPath?: string, schemaPath?: string): ResolvedPaths;
1201
1261
  declare function loadVaultConfig(rootDir: string): Promise<{
1202
1262
  config: VaultConfig;
1203
1263
  paths: ResolvedPaths;
1204
1264
  }>;
1205
- declare function initWorkspace(rootDir: string): Promise<{
1265
+ declare function initWorkspace(rootDir: string, options?: {
1266
+ profile?: "default" | "personal-research";
1267
+ }): Promise<{
1206
1268
  config: VaultConfig;
1207
1269
  paths: ResolvedPaths;
1208
1270
  }>;
@@ -1270,13 +1332,24 @@ interface LoadedVaultSchemas {
1270
1332
  declare function loadVaultSchemas(rootDir: string): Promise<LoadedVaultSchemas>;
1271
1333
  declare function loadVaultSchema(rootDir: string): Promise<VaultSchema>;
1272
1334
 
1273
- type SourceReviewScope = {
1335
+ type SourceScope = {
1274
1336
  id: string;
1275
1337
  title: string;
1276
1338
  sourceIds: string[];
1339
+ kind?: string;
1340
+ briefPath?: string;
1277
1341
  };
1278
- declare function reviewSourceScope(rootDir: string, scope: SourceReviewScope): Promise<SourceReviewResult>;
1342
+ declare function reviewSourceScope(rootDir: string, scope: SourceScope): Promise<SourceReviewResult>;
1343
+ declare function guideSourceScope(rootDir: string, scope: SourceScope, options?: {
1344
+ answers?: GuidedSourceSessionAnswers;
1345
+ }): Promise<SourceGuideResult>;
1279
1346
  declare function reviewManagedSource(rootDir: string, id: string): Promise<SourceReviewResult>;
1347
+ declare function guideManagedSource(rootDir: string, id: string, options?: {
1348
+ answers?: GuidedSourceSessionAnswers;
1349
+ }): Promise<SourceGuideResult>;
1350
+ declare function resumeSourceSession(rootDir: string, id: string, options?: {
1351
+ answers?: GuidedSourceSessionAnswers;
1352
+ }): Promise<SourceGuideResult>;
1280
1353
  declare function listManagedSourceRecords(rootDir: string): Promise<ManagedSourceRecord[]>;
1281
1354
  declare function addManagedSource(rootDir: string, input: string, options?: ManagedSourceAddOptions): Promise<ManagedSourceAddResult>;
1282
1355
  declare function reloadManagedSources(rootDir: string, options?: ManagedSourceReloadOptions): Promise<ManagedSourceReloadResult>;
@@ -1295,7 +1368,12 @@ declare function stageGeneratedOutputPages(rootDir: string, stagedPages: Array<{
1295
1368
  page: GraphPage;
1296
1369
  content: string;
1297
1370
  assetFiles?: GeneratedOutputArtifacts["assetFiles"];
1298
- }>): Promise<{
1371
+ label?: ApprovalEntryLabel;
1372
+ }>, options?: {
1373
+ bundleType?: ApprovalBundleType;
1374
+ title?: string;
1375
+ sourceSessionId?: string;
1376
+ }): Promise<{
1299
1377
  approvalId: string;
1300
1378
  approvalDir: string;
1301
1379
  }>;
@@ -1379,4 +1457,4 @@ declare function getWatchStatus(rootDir: string): Promise<WatchStatusResult>;
1379
1457
  declare function createWebSearchAdapter(id: string, config: WebSearchProviderConfig, rootDir: string): Promise<WebSearchAdapter>;
1380
1458
  declare function getWebSearchAdapterForTask(rootDir: string, task: "deepLintProvider"): Promise<WebSearchAdapter>;
1381
1459
 
1382
- export { type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalChangeType, type ApprovalDetail, type ApprovalEntry, type ApprovalEntryDetail, 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 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, 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 };
1460
+ 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 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 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 };