@jamesaphoenix/tx-core 0.4.2 → 0.4.3
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/README.md +480 -0
- package/dist/db.d.ts +28 -14
- package/dist/db.d.ts.map +1 -1
- package/dist/db.js +102 -14
- package/dist/db.js.map +1 -1
- package/dist/errors.d.ts +178 -34
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +119 -26
- package/dist/errors.js.map +1 -1
- package/dist/id.d.ts +10 -0
- package/dist/id.d.ts.map +1 -1
- package/dist/id.js +17 -1
- package/dist/id.js.map +1 -1
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -8
- package/dist/index.js.map +1 -1
- package/dist/layer.d.ts +23 -14
- package/dist/layer.d.ts.map +1 -1
- package/dist/layer.js +75 -76
- package/dist/layer.js.map +1 -1
- package/dist/mappers/anchor.d.ts +15 -1
- package/dist/mappers/anchor.d.ts.map +1 -1
- package/dist/mappers/anchor.js +95 -28
- package/dist/mappers/anchor.js.map +1 -1
- package/dist/mappers/attempt.d.ts +3 -1
- package/dist/mappers/attempt.d.ts.map +1 -1
- package/dist/mappers/attempt.js +23 -9
- package/dist/mappers/attempt.js.map +1 -1
- package/dist/mappers/candidate.d.ts +3 -1
- package/dist/mappers/candidate.d.ts.map +1 -1
- package/dist/mappers/candidate.js +46 -16
- package/dist/mappers/candidate.js.map +1 -1
- package/dist/mappers/claim.d.ts +1 -1
- package/dist/mappers/claim.d.ts.map +1 -1
- package/dist/mappers/claim.js +11 -4
- package/dist/mappers/claim.js.map +1 -1
- package/dist/mappers/deduplication.d.ts +13 -1
- package/dist/mappers/deduplication.d.ts.map +1 -1
- package/dist/mappers/deduplication.js +22 -3
- package/dist/mappers/deduplication.js.map +1 -1
- package/dist/mappers/doc.d.ts +24 -0
- package/dist/mappers/doc.d.ts.map +1 -0
- package/dist/mappers/doc.js +161 -0
- package/dist/mappers/doc.js.map +1 -0
- package/dist/mappers/edge.d.ts +10 -1
- package/dist/mappers/edge.d.ts.map +1 -1
- package/dist/mappers/edge.js +74 -12
- package/dist/mappers/edge.js.map +1 -1
- package/dist/mappers/file-learning.d.ts.map +1 -1
- package/dist/mappers/file-learning.js +2 -1
- package/dist/mappers/file-learning.js.map +1 -1
- package/dist/mappers/index.d.ts +6 -7
- package/dist/mappers/index.d.ts.map +1 -1
- package/dist/mappers/index.js +10 -12
- package/dist/mappers/index.js.map +1 -1
- package/dist/mappers/learning.d.ts +9 -1
- package/dist/mappers/learning.d.ts.map +1 -1
- package/dist/mappers/learning.js +94 -14
- package/dist/mappers/learning.js.map +1 -1
- package/dist/mappers/orchestrator-state.d.ts +1 -1
- package/dist/mappers/orchestrator-state.d.ts.map +1 -1
- package/dist/mappers/orchestrator-state.js +31 -5
- package/dist/mappers/orchestrator-state.js.map +1 -1
- package/dist/mappers/parse-date.d.ts +11 -0
- package/dist/mappers/parse-date.d.ts.map +1 -0
- package/dist/mappers/parse-date.js +18 -0
- package/dist/mappers/parse-date.js.map +1 -0
- package/dist/mappers/run.d.ts +14 -4
- package/dist/mappers/run.d.ts.map +1 -1
- package/dist/mappers/run.js +49 -18
- package/dist/mappers/run.js.map +1 -1
- package/dist/mappers/task.d.ts +5 -1
- package/dist/mappers/task.d.ts.map +1 -1
- package/dist/mappers/task.js +66 -16
- package/dist/mappers/task.js.map +1 -1
- package/dist/mappers/tracked-project.d.ts +3 -1
- package/dist/mappers/tracked-project.d.ts.map +1 -1
- package/dist/mappers/tracked-project.js +23 -9
- package/dist/mappers/tracked-project.js.map +1 -1
- package/dist/mappers/worker.d.ts +1 -1
- package/dist/mappers/worker.d.ts.map +1 -1
- package/dist/mappers/worker.js +44 -6
- package/dist/mappers/worker.js.map +1 -1
- package/dist/repo/anchor-repo.d.ts +2 -2
- package/dist/repo/anchor-repo.d.ts.map +1 -1
- package/dist/repo/anchor-repo.js +46 -5
- package/dist/repo/anchor-repo.js.map +1 -1
- package/dist/repo/attempt-repo.d.ts +2 -2
- package/dist/repo/attempt-repo.d.ts.map +1 -1
- package/dist/repo/attempt-repo.js +16 -6
- package/dist/repo/attempt-repo.js.map +1 -1
- package/dist/repo/candidate-repo.d.ts.map +1 -1
- package/dist/repo/candidate-repo.js +22 -1
- package/dist/repo/candidate-repo.js.map +1 -1
- package/dist/repo/claim-repo.d.ts +46 -2
- package/dist/repo/claim-repo.d.ts.map +1 -1
- package/dist/repo/claim-repo.js +113 -6
- package/dist/repo/claim-repo.js.map +1 -1
- package/dist/repo/compaction-repo.d.ts +41 -0
- package/dist/repo/compaction-repo.d.ts.map +1 -0
- package/dist/repo/compaction-repo.js +84 -0
- package/dist/repo/compaction-repo.js.map +1 -0
- package/dist/repo/deduplication-repo.d.ts +9 -1
- package/dist/repo/deduplication-repo.d.ts.map +1 -1
- package/dist/repo/deduplication-repo.js +46 -9
- package/dist/repo/deduplication-repo.js.map +1 -1
- package/dist/repo/dep-repo.d.ts +27 -3
- package/dist/repo/dep-repo.d.ts.map +1 -1
- package/dist/repo/dep-repo.js +166 -39
- package/dist/repo/dep-repo.js.map +1 -1
- package/dist/repo/doc-repo.d.ts +59 -0
- package/dist/repo/doc-repo.d.ts.map +1 -0
- package/dist/repo/doc-repo.js +276 -0
- package/dist/repo/doc-repo.js.map +1 -0
- package/dist/repo/edge-repo.d.ts +1 -1
- package/dist/repo/edge-repo.d.ts.map +1 -1
- package/dist/repo/edge-repo.js +65 -34
- package/dist/repo/edge-repo.js.map +1 -1
- package/dist/repo/file-learning-repo.d.ts +3 -3
- package/dist/repo/file-learning-repo.d.ts.map +1 -1
- package/dist/repo/file-learning-repo.js +19 -8
- package/dist/repo/file-learning-repo.js.map +1 -1
- package/dist/repo/index.d.ts +4 -6
- package/dist/repo/index.d.ts.map +1 -1
- package/dist/repo/index.js +3 -5
- package/dist/repo/index.js.map +1 -1
- package/dist/repo/learning-repo.d.ts +10 -3
- package/dist/repo/learning-repo.d.ts.map +1 -1
- package/dist/repo/learning-repo.js +68 -11
- package/dist/repo/learning-repo.js.map +1 -1
- package/dist/repo/orchestrator-state-repo.d.ts.map +1 -1
- package/dist/repo/orchestrator-state-repo.js +8 -1
- package/dist/repo/orchestrator-state-repo.js.map +1 -1
- package/dist/repo/run-repo.d.ts +3 -3
- package/dist/repo/run-repo.d.ts.map +1 -1
- package/dist/repo/run-repo.js +40 -19
- package/dist/repo/run-repo.js.map +1 -1
- package/dist/repo/task-repo.d.ts +14 -3
- package/dist/repo/task-repo.d.ts.map +1 -1
- package/dist/repo/task-repo.js +194 -20
- package/dist/repo/task-repo.js.map +1 -1
- package/dist/repo/tracked-project-repo.d.ts.map +1 -1
- package/dist/repo/tracked-project-repo.js +15 -1
- package/dist/repo/tracked-project-repo.js.map +1 -1
- package/dist/repo/worker-repo.d.ts +3 -2
- package/dist/repo/worker-repo.d.ts.map +1 -1
- package/dist/repo/worker-repo.js +54 -8
- package/dist/repo/worker-repo.js.map +1 -1
- package/dist/schemas/sync.js +2 -2
- package/dist/schemas/sync.js.map +1 -1
- package/dist/schemas/worker.d.ts +1 -0
- package/dist/schemas/worker.d.ts.map +1 -1
- package/dist/schemas/worker.js +1 -0
- package/dist/schemas/worker.js.map +1 -1
- package/dist/services/agent-service.d.ts +57 -0
- package/dist/services/agent-service.d.ts.map +1 -0
- package/dist/services/agent-service.js +81 -0
- package/dist/services/agent-service.js.map +1 -0
- package/dist/services/anchor-service.js +1 -1
- package/dist/services/anchor-service.js.map +1 -1
- package/dist/services/anchor-verification.d.ts +8 -0
- package/dist/services/anchor-verification.d.ts.map +1 -1
- package/dist/services/anchor-verification.js +237 -37
- package/dist/services/anchor-verification.js.map +1 -1
- package/dist/services/ast-grep-service.d.ts.map +1 -1
- package/dist/services/ast-grep-service.js +93 -22
- package/dist/services/ast-grep-service.js.map +1 -1
- package/dist/services/attempt-service.d.ts.map +1 -1
- package/dist/services/attempt-service.js +1 -4
- package/dist/services/attempt-service.js.map +1 -1
- package/dist/services/auto-sync-service.d.ts +1 -1
- package/dist/services/auto-sync-service.d.ts.map +1 -1
- package/dist/services/auto-sync-service.js +18 -10
- package/dist/services/auto-sync-service.js.map +1 -1
- package/dist/services/claim-service.d.ts +8 -2
- package/dist/services/claim-service.d.ts.map +1 -1
- package/dist/services/claim-service.js +37 -23
- package/dist/services/claim-service.js.map +1 -1
- package/dist/services/compaction-service.d.ts +105 -0
- package/dist/services/compaction-service.d.ts.map +1 -0
- package/dist/services/compaction-service.js +369 -0
- package/dist/services/compaction-service.js.map +1 -0
- package/dist/services/cycle-scan-service.d.ts +32 -0
- package/dist/services/cycle-scan-service.d.ts.map +1 -0
- package/dist/services/cycle-scan-service.js +542 -0
- package/dist/services/cycle-scan-service.js.map +1 -0
- package/dist/services/daemon-service.d.ts +40 -2
- package/dist/services/daemon-service.d.ts.map +1 -1
- package/dist/services/daemon-service.js +199 -52
- package/dist/services/daemon-service.js.map +1 -1
- package/dist/services/deduplication-service.d.ts +8 -4
- package/dist/services/deduplication-service.d.ts.map +1 -1
- package/dist/services/deduplication-service.js +79 -25
- package/dist/services/deduplication-service.js.map +1 -1
- package/dist/services/dep-service.d.ts +2 -2
- package/dist/services/dep-service.d.ts.map +1 -1
- package/dist/services/dep-service.js +9 -5
- package/dist/services/dep-service.js.map +1 -1
- package/dist/services/diversifier-service.d.ts +2 -1
- package/dist/services/diversifier-service.d.ts.map +1 -1
- package/dist/services/diversifier-service.js +37 -43
- package/dist/services/diversifier-service.js.map +1 -1
- package/dist/services/doc-service.d.ts +49 -0
- package/dist/services/doc-service.d.ts.map +1 -0
- package/dist/services/doc-service.js +605 -0
- package/dist/services/doc-service.js.map +1 -0
- package/dist/services/edge-service.js +2 -2
- package/dist/services/edge-service.js.map +1 -1
- package/dist/services/embedding-service.d.ts +66 -2
- package/dist/services/embedding-service.d.ts.map +1 -1
- package/dist/services/embedding-service.js +138 -24
- package/dist/services/embedding-service.js.map +1 -1
- package/dist/services/file-learning-service.d.ts.map +1 -1
- package/dist/services/file-learning-service.js +8 -7
- package/dist/services/file-learning-service.js.map +1 -1
- package/dist/services/file-watcher-service.d.ts.map +1 -1
- package/dist/services/file-watcher-service.js +58 -11
- package/dist/services/file-watcher-service.js.map +1 -1
- package/dist/services/graph-expansion.d.ts +3 -0
- package/dist/services/graph-expansion.d.ts.map +1 -1
- package/dist/services/graph-expansion.js +28 -7
- package/dist/services/graph-expansion.js.map +1 -1
- package/dist/services/hierarchy-service.d.ts +1 -1
- package/dist/services/hierarchy-service.d.ts.map +1 -1
- package/dist/services/hierarchy-service.js +50 -32
- package/dist/services/hierarchy-service.js.map +1 -1
- package/dist/services/index.d.ts +13 -15
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +13 -15
- package/dist/services/index.js.map +1 -1
- package/dist/services/learning-service.d.ts +4 -4
- package/dist/services/learning-service.d.ts.map +1 -1
- package/dist/services/learning-service.js +75 -42
- package/dist/services/learning-service.js.map +1 -1
- package/dist/services/llm-service.d.ts +62 -0
- package/dist/services/llm-service.d.ts.map +1 -0
- package/dist/services/llm-service.js +172 -0
- package/dist/services/llm-service.js.map +1 -0
- package/dist/services/migration-service.d.ts +1 -1
- package/dist/services/migration-service.d.ts.map +1 -1
- package/dist/services/migration-service.js +18 -7
- package/dist/services/migration-service.js.map +1 -1
- package/dist/services/orchestrator-service.d.ts +4 -3
- package/dist/services/orchestrator-service.d.ts.map +1 -1
- package/dist/services/orchestrator-service.js +67 -29
- package/dist/services/orchestrator-service.js.map +1 -1
- package/dist/services/promotion-service.d.ts +1 -1
- package/dist/services/promotion-service.js +1 -1
- package/dist/services/promotion-service.js.map +1 -1
- package/dist/services/query-expansion-service.d.ts +30 -9
- package/dist/services/query-expansion-service.d.ts.map +1 -1
- package/dist/services/query-expansion-service.js +54 -63
- package/dist/services/query-expansion-service.js.map +1 -1
- package/dist/services/ready-service.d.ts +21 -1
- package/dist/services/ready-service.d.ts.map +1 -1
- package/dist/services/ready-service.js +44 -21
- package/dist/services/ready-service.js.map +1 -1
- package/dist/services/retriever-service.d.ts +10 -10
- package/dist/services/retriever-service.d.ts.map +1 -1
- package/dist/services/retriever-service.js +53 -161
- package/dist/services/retriever-service.js.map +1 -1
- package/dist/services/swarm-verification.d.ts +2 -2
- package/dist/services/swarm-verification.d.ts.map +1 -1
- package/dist/services/swarm-verification.js +12 -6
- package/dist/services/swarm-verification.js.map +1 -1
- package/dist/services/sync-service.d.ts +17 -4
- package/dist/services/sync-service.d.ts.map +1 -1
- package/dist/services/sync-service.js +378 -114
- package/dist/services/sync-service.js.map +1 -1
- package/dist/services/task-service.d.ts +6 -4
- package/dist/services/task-service.d.ts.map +1 -1
- package/dist/services/task-service.js +162 -33
- package/dist/services/task-service.js.map +1 -1
- package/dist/services/tracing-service.d.ts +55 -0
- package/dist/services/tracing-service.d.ts.map +1 -0
- package/dist/services/tracing-service.js +99 -0
- package/dist/services/tracing-service.js.map +1 -0
- package/dist/services/transcript-adapter.d.ts +99 -0
- package/dist/services/transcript-adapter.d.ts.map +1 -0
- package/dist/services/transcript-adapter.js +283 -0
- package/dist/services/transcript-adapter.js.map +1 -0
- package/dist/services/validation-service.d.ts +85 -0
- package/dist/services/validation-service.d.ts.map +1 -0
- package/dist/services/validation-service.js +289 -0
- package/dist/services/validation-service.js.map +1 -0
- package/dist/services/worker-process.d.ts +23 -4
- package/dist/services/worker-process.d.ts.map +1 -1
- package/dist/services/worker-process.js +159 -70
- package/dist/services/worker-process.js.map +1 -1
- package/dist/services/worker-service.d.ts.map +1 -1
- package/dist/services/worker-service.js +7 -12
- package/dist/services/worker-service.js.map +1 -1
- package/dist/sync/claude-task-writer.d.ts +49 -0
- package/dist/sync/claude-task-writer.d.ts.map +1 -0
- package/dist/sync/claude-task-writer.js +135 -0
- package/dist/sync/claude-task-writer.js.map +1 -0
- package/dist/utils/doc-hash.d.ts +10 -0
- package/dist/utils/doc-hash.d.ts.map +1 -0
- package/dist/utils/doc-hash.js +14 -0
- package/dist/utils/doc-hash.js.map +1 -0
- package/dist/utils/doc-renderer.d.ts +44 -0
- package/dist/utils/doc-renderer.d.ts.map +1 -0
- package/dist/utils/doc-renderer.js +202 -0
- package/dist/utils/doc-renderer.js.map +1 -0
- package/dist/utils/math.d.ts +5 -1
- package/dist/utils/math.d.ts.map +1 -1
- package/dist/utils/math.js +12 -4
- package/dist/utils/math.js.map +1 -1
- package/dist/utils/sql.d.ts +9 -0
- package/dist/utils/sql.d.ts.map +1 -0
- package/dist/utils/sql.js +9 -0
- package/dist/utils/sql.js.map +1 -0
- package/dist/utils/toml-config.d.ts +22 -0
- package/dist/utils/toml-config.d.ts.map +1 -0
- package/dist/utils/toml-config.js +75 -0
- package/dist/utils/toml-config.js.map +1 -0
- package/dist/worker/hooks.d.ts +102 -0
- package/dist/worker/hooks.d.ts.map +1 -0
- package/dist/worker/hooks.js +11 -0
- package/dist/worker/hooks.js.map +1 -0
- package/dist/worker/index.d.ts +9 -0
- package/dist/worker/index.d.ts.map +1 -0
- package/dist/worker/index.js +8 -0
- package/dist/worker/index.js.map +1 -0
- package/dist/worker/run-worker.d.ts +33 -0
- package/dist/worker/run-worker.d.ts.map +1 -0
- package/dist/worker/run-worker.js +265 -0
- package/dist/worker/run-worker.js.map +1 -0
- package/package.json +14 -12
package/dist/index.d.ts
CHANGED
|
@@ -6,20 +6,28 @@
|
|
|
6
6
|
*
|
|
7
7
|
* See DD-002 for design specification.
|
|
8
8
|
*/
|
|
9
|
-
export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, ValidationError, CircularDependencyError, DatabaseError, EmbeddingUnavailableError,
|
|
10
|
-
export { SqliteClient, SqliteClientLive, makeSqliteClient, getSchemaVersion, applyMigrations, type SqliteDatabase, type SqliteStatement } from "./db.js";
|
|
9
|
+
export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, RunNotFoundError, ValidationError, CircularDependencyError, DatabaseError, DependencyNotFoundError, EmbeddingUnavailableError, EmbeddingDimensionMismatchError, RerankerUnavailableError, RetrievalError, LlmUnavailableError, DaemonError, FileWatcherError, WatcherAlreadyRunningError, WatcherNotRunningError, RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError, BatchProcessingError, StaleDataError, HasChildrenError, InvalidStatusError, InvalidDateError, DocNotFoundError, DocLockedError, InvalidDocYamlError, InvariantNotFoundError, AgentError, CycleScanError } from "./errors.js";
|
|
10
|
+
export { SqliteClient, SqliteClientLive, makeSqliteClient, getSchemaVersion, applyMigrations, type SqliteDatabase, type SqliteStatement, type SqliteRunResult } from "./db.js";
|
|
11
11
|
export { generateTaskId, fixtureId } from "./id.js";
|
|
12
|
-
export { makeAppLayer, makeMinimalLayer, SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig, AttemptService, TaskService, DependencyService, ReadyService, HierarchyService, ScoreService,
|
|
13
|
-
export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive,
|
|
14
|
-
export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, type BM25Result, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive,
|
|
12
|
+
export { makeAppLayer, makeAppLayerFromInfra, makeMinimalLayer, SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig, AttemptService, TaskService, DependencyService, ReadyService, type ReadyCheckResult, isReadyResult, HierarchyService, ScoreService, DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto, DocService } from "./layer.js";
|
|
13
|
+
export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, WorkerService, WorkerServiceLive, type WorkerRegistration, type WorkerFilter, type FindDeadConfig, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, type OrchestratorConfig, runWorkerProcess, type WorkerProcessConfig, MIGRATIONS, getLatestVersion, type ScoreBreakdown, type ExportResult, type ImportResult, type SyncStatus, type CompactResult, type ExportOptions, type ExportAllResult, type ImportAllResult, type Migration, type AppliedMigration, type MigrationStatus, type AutoSyncEntity, type RerankerResult, isValidLlama, isValidLlamaModel, isValidLlamaEmbeddingContext, isValidOpenAIClient, validateEmbeddingDimensions, LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, LlmOptionsSchema, type LlmOptions, QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult, MAX_EXPANSION_QUERIES, MAX_QUERY_LENGTH, validateExpansions, DeduplicationService, DeduplicationServiceLive, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, getPidFilePath, LAUNCHD_PLIST_PATH, writePid, readPid, removePid, removePidIfContentMatches, isProcessRunning, tryAtomicPidCreate, acquirePidLock, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, type DaemonStatus, type DaemonConfig, type LaunchdPlistOptions, type SystemdServiceOptions, FileWatcherService, FileWatcherServiceLive, FileWatcherServiceNoop, type FileEvent, type FileEventType, type FileWatcherConfig, type FileWatcherStatus, ClaudeCodeAdapter, GenericJSONLAdapter, getAdapter, registerAdapter, type TranscriptAdapter, type ToolCall, type Message, DocServiceLive, AgentService, AgentServiceLive, AgentServiceNoop, type AgentRunConfig, type AgentResult, CycleScanService, CycleScanServiceLive } from "./services/index.js";
|
|
14
|
+
export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, type BM25Result, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive, type OrchestratorStateUpdate, DeduplicationRepository, DeduplicationRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, DocRepository, DocRepositoryLive, type InsertDocInput, type UpdateDocInput } from "./repo/index.js";
|
|
15
15
|
export * from "./schemas/index.js";
|
|
16
16
|
export { rowToTask, rowToDependency, isValidStatus, isValidTransition, VALID_TRANSITIONS, type TaskRow, type DependencyRow } from "./mappers/task.js";
|
|
17
17
|
export { rowToLearning, float32ArrayToBuffer, type LearningRow } from "./mappers/learning.js";
|
|
18
18
|
export { rowToFileLearning, matchesPattern, type FileLearningRow } from "./mappers/file-learning.js";
|
|
19
19
|
export { rowToAttempt, type AttemptRow } from "./mappers/attempt.js";
|
|
20
|
-
export { rowToAnchor, rowToInvalidationLog, type AnchorRow, type InvalidationLogRow } from "./mappers/anchor.js";
|
|
21
|
-
export { rowToEdge, type EdgeRow } from "./mappers/edge.js";
|
|
22
20
|
export { rowToWorker, isValidWorkerStatus, WORKER_STATUSES, type WorkerRow } from "./mappers/worker.js";
|
|
21
|
+
export { normalizeContent, hashContent } from "./mappers/deduplication.js";
|
|
22
|
+
export { rowToDoc, rowToDocLink, rowToTaskDocLink, rowToInvariant, rowToInvariantCheck, isValidDocKind, isValidDocStatus, type DocRow, type DocLinkRow, type TaskDocLinkRow, type InvariantRow, type InvariantCheckRow } from "./mappers/doc.js";
|
|
23
23
|
export { cosineSimilarity } from "./utils/math.js";
|
|
24
24
|
export { matchesGlob } from "./utils/glob.js";
|
|
25
|
+
export { escapeLikePattern, DEFAULT_QUERY_LIMIT } from "./utils/sql.js";
|
|
26
|
+
export { computeDocHash } from "./utils/doc-hash.js";
|
|
27
|
+
export { renderDocToMarkdown, renderIndexToMarkdown } from "./utils/doc-renderer.js";
|
|
28
|
+
export { readTxConfig, type TxConfig, type TxDocsConfig } from "./utils/toml-config.js";
|
|
29
|
+
export { type ExecutionResult, type IOCapture, type WorkerContext, type WorkerHooks, type WorkerConfig, runWorker } from "./worker/index.js";
|
|
30
|
+
export { TracingService, TracingServiceLive, TracingServiceNoop, type SpanOptions } from "./services/tracing-service.js";
|
|
31
|
+
export { ValidationService, ValidationServiceLive, type ValidationSeverity, type ValidationIssue, type CheckResult, type ValidationResult, type ValidateOptions } from "./services/validation-service.js";
|
|
32
|
+
export { buildClaudeTaskFiles, ClaudeTaskFileSchema, ClaudeSyncResultSchema, type ClaudeTaskFile, type ClaudeSyncResult } from "./sync/claude-task-writer.js";
|
|
25
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,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9
|
// =============================================================================
|
|
10
10
|
// Errors
|
|
11
11
|
// =============================================================================
|
|
12
|
-
export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, ValidationError, CircularDependencyError, DatabaseError,
|
|
12
|
+
export { TaskNotFoundError, LearningNotFoundError, FileLearningNotFoundError, AttemptNotFoundError, RunNotFoundError, ValidationError, CircularDependencyError, DatabaseError, DependencyNotFoundError, EmbeddingUnavailableError, EmbeddingDimensionMismatchError, RerankerUnavailableError, RetrievalError,
|
|
13
|
+
// LLM service errors (DD-022)
|
|
14
|
+
LlmUnavailableError,
|
|
15
|
+
// Daemon / file-watcher errors
|
|
16
|
+
DaemonError, FileWatcherError, WatcherAlreadyRunningError, WatcherNotRunningError,
|
|
13
17
|
// Orchestration errors (PRD-018)
|
|
14
|
-
RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError
|
|
18
|
+
RegistrationError, WorkerNotFoundError, AlreadyClaimedError, ClaimNotFoundError, ClaimIdNotFoundError, LeaseExpiredError, MaxRenewalsExceededError, OrchestratorError,
|
|
19
|
+
// Batch processing errors
|
|
20
|
+
BatchProcessingError,
|
|
21
|
+
// Optimistic locking errors
|
|
22
|
+
StaleDataError,
|
|
23
|
+
// Hierarchy protection errors
|
|
24
|
+
HasChildrenError,
|
|
25
|
+
// Data validation errors
|
|
26
|
+
InvalidStatusError, InvalidDateError,
|
|
27
|
+
// Doc errors (DD-023)
|
|
28
|
+
DocNotFoundError, DocLockedError, InvalidDocYamlError, InvariantNotFoundError,
|
|
29
|
+
// Cycle scan errors
|
|
30
|
+
AgentError, CycleScanError } from "./errors.js";
|
|
15
31
|
// =============================================================================
|
|
16
32
|
// Database
|
|
17
33
|
// =============================================================================
|
|
@@ -23,17 +39,35 @@ export { generateTaskId, fixtureId } from "./id.js";
|
|
|
23
39
|
// =============================================================================
|
|
24
40
|
// Layers
|
|
25
41
|
// =============================================================================
|
|
26
|
-
export { makeAppLayer, makeMinimalLayer,
|
|
42
|
+
export { makeAppLayer, makeAppLayerFromInfra, makeMinimalLayer,
|
|
27
43
|
// Re-exports for convenience
|
|
28
|
-
SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, AttemptService, TaskService, DependencyService, ReadyService, HierarchyService, ScoreService,
|
|
44
|
+
SyncService, MigrationService, AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive, LearningService, FileLearningService, EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, AttemptService, TaskService, DependencyService, ReadyService, isReadyResult, HierarchyService, ScoreService, DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto, DocService } from "./layer.js";
|
|
29
45
|
// =============================================================================
|
|
30
46
|
// Services (full exports)
|
|
31
47
|
// =============================================================================
|
|
32
|
-
export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive,
|
|
48
|
+
export { TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, ScoreServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, SyncServiceLive, MigrationServiceLive, RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto, WorkerService, WorkerServiceLive, ClaimService, ClaimServiceLive, OrchestratorService, OrchestratorServiceLive, runWorkerProcess, MIGRATIONS, getLatestVersion,
|
|
49
|
+
// Runtime interface validators for optional peer dependencies
|
|
50
|
+
isValidLlama, isValidLlamaModel, isValidLlamaEmbeddingContext, isValidOpenAIClient,
|
|
51
|
+
// Dimension validation
|
|
52
|
+
validateEmbeddingDimensions,
|
|
53
|
+
// LLM service (DD-022)
|
|
54
|
+
LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, LlmOptionsSchema,
|
|
55
|
+
// Query expansion
|
|
56
|
+
QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, MAX_EXPANSION_QUERIES, MAX_QUERY_LENGTH, validateExpansions,
|
|
57
|
+
// Daemon / file-watcher / deduplication
|
|
58
|
+
DeduplicationService, DeduplicationServiceLive, DaemonService, DaemonServiceLive, DaemonServiceNoop, PID_FILE_PATH, getPidFilePath, LAUNCHD_PLIST_PATH, writePid, readPid, removePid, removePidIfContentMatches, isProcessRunning, tryAtomicPidCreate, acquirePidLock, defaultDaemonConfig, generateLaunchdPlist, generateSystemdService, FileWatcherService, FileWatcherServiceLive, FileWatcherServiceNoop,
|
|
59
|
+
// Transcript adapter
|
|
60
|
+
ClaudeCodeAdapter, GenericJSONLAdapter, getAdapter, registerAdapter,
|
|
61
|
+
// Doc service (DD-023)
|
|
62
|
+
DocServiceLive,
|
|
63
|
+
// Agent service (cycle scan)
|
|
64
|
+
AgentService, AgentServiceLive, AgentServiceNoop,
|
|
65
|
+
// Cycle scan service
|
|
66
|
+
CycleScanService, CycleScanServiceLive } from "./services/index.js";
|
|
33
67
|
// =============================================================================
|
|
34
68
|
// Repositories
|
|
35
69
|
// =============================================================================
|
|
36
|
-
export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive,
|
|
70
|
+
export { TaskRepository, TaskRepositoryLive, DependencyRepository, DependencyRepositoryLive, LearningRepository, LearningRepositoryLive, FileLearningRepository, FileLearningRepositoryLive, AttemptRepository, AttemptRepositoryLive, RunRepository, RunRepositoryLive, WorkerRepository, WorkerRepositoryLive, ClaimRepository, ClaimRepositoryLive, OrchestratorStateRepository, OrchestratorStateRepositoryLive, DeduplicationRepository, DeduplicationRepositoryLive, TrackedProjectRepository, TrackedProjectRepositoryLive, DocRepository, DocRepositoryLive } from "./repo/index.js";
|
|
37
71
|
// =============================================================================
|
|
38
72
|
// Schemas
|
|
39
73
|
// =============================================================================
|
|
@@ -45,12 +79,32 @@ export { rowToTask, rowToDependency, isValidStatus, isValidTransition, VALID_TRA
|
|
|
45
79
|
export { rowToLearning, float32ArrayToBuffer } from "./mappers/learning.js";
|
|
46
80
|
export { rowToFileLearning, matchesPattern } from "./mappers/file-learning.js";
|
|
47
81
|
export { rowToAttempt } from "./mappers/attempt.js";
|
|
48
|
-
export { rowToAnchor, rowToInvalidationLog } from "./mappers/anchor.js";
|
|
49
|
-
export { rowToEdge } from "./mappers/edge.js";
|
|
50
82
|
export { rowToWorker, isValidWorkerStatus, WORKER_STATUSES } from "./mappers/worker.js";
|
|
83
|
+
export { normalizeContent, hashContent } from "./mappers/deduplication.js";
|
|
84
|
+
export { rowToDoc, rowToDocLink, rowToTaskDocLink, rowToInvariant, rowToInvariantCheck, isValidDocKind, isValidDocStatus } from "./mappers/doc.js";
|
|
51
85
|
// =============================================================================
|
|
52
86
|
// Utils
|
|
53
87
|
// =============================================================================
|
|
54
88
|
export { cosineSimilarity } from "./utils/math.js";
|
|
55
89
|
export { matchesGlob } from "./utils/glob.js";
|
|
90
|
+
export { escapeLikePattern, DEFAULT_QUERY_LIMIT } from "./utils/sql.js";
|
|
91
|
+
export { computeDocHash } from "./utils/doc-hash.js";
|
|
92
|
+
export { renderDocToMarkdown, renderIndexToMarkdown } from "./utils/doc-renderer.js";
|
|
93
|
+
export { readTxConfig } from "./utils/toml-config.js";
|
|
94
|
+
// =============================================================================
|
|
95
|
+
// Worker (PRD-018 headless worker system)
|
|
96
|
+
// =============================================================================
|
|
97
|
+
export { runWorker } from "./worker/index.js";
|
|
98
|
+
// =============================================================================
|
|
99
|
+
// Tracing Service (PRD-019 Execution Tracing)
|
|
100
|
+
// =============================================================================
|
|
101
|
+
export { TracingService, TracingServiceLive, TracingServiceNoop } from "./services/tracing-service.js";
|
|
102
|
+
// =============================================================================
|
|
103
|
+
// Validation Service
|
|
104
|
+
// =============================================================================
|
|
105
|
+
export { ValidationService, ValidationServiceLive } from "./services/validation-service.js";
|
|
106
|
+
// =============================================================================
|
|
107
|
+
// Sync: Claude Code task writer
|
|
108
|
+
// =============================================================================
|
|
109
|
+
export { buildClaudeTaskFiles, ClaudeTaskFileSchema, ClaudeSyncResultSchema } from "./sync/claude-task-writer.js";
|
|
56
110
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,+BAA+B,EAC/B,wBAAwB,EACxB,cAAc;AACd,8BAA8B;AAC9B,mBAAmB;AACnB,+BAA+B;AAC/B,WAAW,EACX,gBAAgB,EAChB,0BAA0B,EAC1B,sBAAsB;AACtB,iCAAiC;AACjC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,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AAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,EAAE,YAAY,EAAoC,MAAM,wBAAwB,CAAA;AAEvF,gFAAgF;AAChF,0CAA0C;AAC1C,gFAAgF;AAChF,OAAO,EAML,SAAS,EACV,MAAM,mBAAmB,CAAA;AAE1B,gFAAgF;AAChF,8CAA8C;AAC9C,gFAAgF;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,+BAA+B,CAAA;AAEtC,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAChF,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EAMtB,MAAM,kCAAkC,CAAA;AAEzC,gFAAgF;AAChF,gCAAgC;AAChC,gFAAgF;AAChF,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EAGvB,MAAM,8BAA8B,CAAA"}
|
package/dist/layer.d.ts
CHANGED
|
@@ -5,31 +5,40 @@
|
|
|
5
5
|
* See DD-002 for full specification.
|
|
6
6
|
*/
|
|
7
7
|
import { Layer } from "effect";
|
|
8
|
+
import { type SqliteClient } from "./db.js";
|
|
8
9
|
export { SyncService } from "./services/sync-service.js";
|
|
9
10
|
export { MigrationService } from "./services/migration-service.js";
|
|
10
11
|
export { AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive } from "./services/auto-sync-service.js";
|
|
11
12
|
export { LearningService } from "./services/learning-service.js";
|
|
12
13
|
export { FileLearningService } from "./services/file-learning-service.js";
|
|
13
14
|
export { EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer, type EmbedderConfig } from "./services/embedding-service.js";
|
|
14
|
-
export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult } from "./services/query-expansion-service.js";
|
|
15
15
|
export { AttemptService } from "./services/attempt-service.js";
|
|
16
16
|
export { TaskService } from "./services/task-service.js";
|
|
17
17
|
export { DependencyService } from "./services/dep-service.js";
|
|
18
|
-
export { ReadyService } from "./services/ready-service.js";
|
|
18
|
+
export { ReadyService, type ReadyCheckResult, isReadyResult } from "./services/ready-service.js";
|
|
19
19
|
export { HierarchyService } from "./services/hierarchy-service.js";
|
|
20
20
|
export { ScoreService } from "./services/score-service.js";
|
|
21
|
-
export { RunRepository } from "./repo/run-repo.js";
|
|
22
21
|
export { RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto, type RerankerResult } from "./services/reranker-service.js";
|
|
23
|
-
export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
24
22
|
export { RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto } from "./services/retriever-service.js";
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
23
|
+
export { DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto } from "./services/diversifier-service.js";
|
|
24
|
+
export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError, type QueryExpansionResult } from "./services/query-expansion-service.js";
|
|
25
|
+
export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
26
|
+
export { LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto, type LlmOptions } from "./services/llm-service.js";
|
|
27
|
+
export { RunRepository } from "./repo/run-repo.js";
|
|
28
|
+
export { DocService } from "./services/doc-service.js";
|
|
29
|
+
export { AgentService, AgentServiceNoop } from "./services/agent-service.js";
|
|
30
|
+
export { CycleScanService } from "./services/cycle-scan-service.js";
|
|
31
|
+
/**
|
|
32
|
+
* Create the full application layer from an existing SqliteClient infra layer.
|
|
33
|
+
*
|
|
34
|
+
* Use this when you already have a SqliteClient layer (e.g., from Layer.succeed
|
|
35
|
+
* with a pre-created database instance). This is useful for test utilities that
|
|
36
|
+
* need to share a single database across test runs while getting fresh service
|
|
37
|
+
* instances via Layer.fresh.
|
|
38
|
+
*
|
|
39
|
+
* @param infra A layer providing SqliteClient
|
|
40
|
+
*/
|
|
41
|
+
export declare const makeAppLayerFromInfra: <E>(infra: Layer.Layer<SqliteClient, E>) => Layer.Layer<import("./services/sync-service.js").SyncService | SqliteClient | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/worker-repo.js").WorkerRepository | import("./repo/claim-repo.js").ClaimRepository | import("./repo/orchestrator-state-repo.js").OrchestratorStateRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./repo/doc-repo.js").DocRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/worker-service.js").WorkerService | import("./services/claim-service.js").ClaimService | import("./services/orchestrator-service.js").OrchestratorService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/deduplication-service.js").DeduplicationService | import("./services/doc-service.js").DocService | import("./services/agent-service.js").AgentService | import("./services/cycle-scan-service.js").CycleScanService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError | E | import("./errors.js").LlmUnavailableError | import("./errors.js").AgentError, never>;
|
|
33
42
|
/**
|
|
34
43
|
* Create the full application layer with all services.
|
|
35
44
|
*
|
|
@@ -39,12 +48,12 @@ export { DaemonService, DaemonServiceLive, DaemonServiceNoop, type DaemonStatus
|
|
|
39
48
|
*
|
|
40
49
|
* @param dbPath Path to SQLite database file
|
|
41
50
|
*/
|
|
42
|
-
export declare const makeAppLayer: (dbPath: string) => Layer.Layer<import("./services/
|
|
51
|
+
export declare const makeAppLayer: (dbPath: string) => Layer.Layer<import("./services/sync-service.js").SyncService | SqliteClient | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./repo/worker-repo.js").WorkerRepository | import("./repo/claim-repo.js").ClaimRepository | import("./repo/orchestrator-state-repo.js").OrchestratorStateRepository | import("./repo/deduplication-repo.js").DeduplicationRepository | import("./repo/tracked-project-repo.js").TrackedProjectRepository | import("./repo/doc-repo.js").DocRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/worker-service.js").WorkerService | import("./services/claim-service.js").ClaimService | import("./services/orchestrator-service.js").OrchestratorService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/deduplication-service.js").DeduplicationService | import("./services/doc-service.js").DocService | import("./services/agent-service.js").AgentService | import("./services/cycle-scan-service.js").CycleScanService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError | import("./errors.js").LlmUnavailableError | import("./errors.js").AgentError, never>;
|
|
43
52
|
/**
|
|
44
53
|
* Create a minimal application layer without auto-sync.
|
|
45
54
|
* Useful for testing and simple CLI operations.
|
|
46
55
|
*
|
|
47
56
|
* @param dbPath Path to SQLite database file
|
|
48
57
|
*/
|
|
49
|
-
export declare const makeMinimalLayer: (dbPath: string) => Layer.Layer<import("./services/
|
|
58
|
+
export declare const makeMinimalLayer: (dbPath: string) => Layer.Layer<import("./services/sync-service.js").SyncService | import("./services/task-service.js").TaskService | import("./repo/task-repo.js").TaskRepository | import("./repo/dep-repo.js").DependencyRepository | import("./services/dep-service.js").DependencyService | import("./services/ready-service.js").ReadyService | import("./services/hierarchy-service.js").HierarchyService | import("./services/learning-service.js").LearningService | import("./repo/learning-repo.js").LearningRepository | import("./services/retriever-service.js").RetrieverService | import("./services/file-learning-service.js").FileLearningService | import("./repo/file-learning-repo.js").FileLearningRepository | import("./services/attempt-service.js").AttemptService | import("./repo/attempt-repo.js").AttemptRepository | import("./repo/run-repo.js").RunRepository | import("./services/diversifier-service.js").DiversifierService | import("./services/tracing-service.js").TracingService | import("./services/validation-service.js").ValidationService | import("./services/llm-service.js").LlmService | import("./services/migration-service.js").MigrationService, import("./errors.js").DatabaseError, never>;
|
|
50
59
|
//# sourceMappingURL=layer.d.ts.map
|
package/dist/layer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,KAAK,YAAY,EAAoB,MAAM,SAAS,CAAA;AAuC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC3G,OAAO,EAA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AoB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,6/DA+F3E,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,y/DAE1C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,mqCAyD9C,CAAA"}
|
package/dist/layer.js
CHANGED
|
@@ -12,14 +12,13 @@ import { LearningRepositoryLive } from "./repo/learning-repo.js";
|
|
|
12
12
|
import { FileLearningRepositoryLive } from "./repo/file-learning-repo.js";
|
|
13
13
|
import { AttemptRepositoryLive } from "./repo/attempt-repo.js";
|
|
14
14
|
import { RunRepositoryLive } from "./repo/run-repo.js";
|
|
15
|
-
import { AnchorRepositoryLive } from "./repo/anchor-repo.js";
|
|
16
|
-
import { EdgeRepositoryLive } from "./repo/edge-repo.js";
|
|
17
|
-
import { DeduplicationRepositoryLive } from "./repo/deduplication-repo.js";
|
|
18
|
-
import { CandidateRepositoryLive } from "./repo/candidate-repo.js";
|
|
19
|
-
import { TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
|
|
20
15
|
import { WorkerRepositoryLive } from "./repo/worker-repo.js";
|
|
21
16
|
import { ClaimRepositoryLive } from "./repo/claim-repo.js";
|
|
22
17
|
import { OrchestratorStateRepositoryLive } from "./repo/orchestrator-state-repo.js";
|
|
18
|
+
import { DeduplicationRepositoryLive } from "./repo/deduplication-repo.js";
|
|
19
|
+
import { DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
20
|
+
import { TrackedProjectRepositoryLive } from "./repo/tracked-project-repo.js";
|
|
21
|
+
import { DocRepositoryLive } from "./repo/doc-repo.js";
|
|
23
22
|
import { TaskServiceLive } from "./services/task-service.js";
|
|
24
23
|
import { DependencyServiceLive } from "./services/dep-service.js";
|
|
25
24
|
import { ReadyServiceLive } from "./services/ready-service.js";
|
|
@@ -27,25 +26,22 @@ import { HierarchyServiceLive } from "./services/hierarchy-service.js";
|
|
|
27
26
|
import { LearningServiceLive } from "./services/learning-service.js";
|
|
28
27
|
import { FileLearningServiceLive } from "./services/file-learning-service.js";
|
|
29
28
|
import { AttemptServiceLive } from "./services/attempt-service.js";
|
|
30
|
-
import { AnchorServiceLive } from "./services/anchor-service.js";
|
|
31
|
-
import { EdgeServiceLive } from "./services/edge-service.js";
|
|
32
|
-
import { DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
33
29
|
import { SyncServiceLive } from "./services/sync-service.js";
|
|
34
30
|
import { AutoSyncServiceLive, AutoSyncServiceNoop } from "./services/auto-sync-service.js";
|
|
35
31
|
import { MigrationServiceLive } from "./services/migration-service.js";
|
|
36
32
|
import { EmbeddingServiceNoop } from "./services/embedding-service.js";
|
|
37
|
-
import { QueryExpansionServiceNoop } from "./services/query-expansion-service.js";
|
|
38
33
|
import { RerankerServiceNoop } from "./services/reranker-service.js";
|
|
39
34
|
import { RetrieverServiceLive } from "./services/retriever-service.js";
|
|
40
|
-
import {
|
|
41
|
-
import { AnchorVerificationServiceLive } from "./services/anchor-verification.js";
|
|
42
|
-
import { SwarmVerificationServiceLive } from "./services/swarm-verification.js";
|
|
43
|
-
import { PromotionServiceLive } from "./services/promotion-service.js";
|
|
44
|
-
import { FeedbackTrackerServiceLive } from "./services/feedback-tracker.js";
|
|
35
|
+
import { DiversifierServiceLive } from "./services/diversifier-service.js";
|
|
45
36
|
import { WorkerServiceLive } from "./services/worker-service.js";
|
|
46
37
|
import { ClaimServiceLive } from "./services/claim-service.js";
|
|
47
38
|
import { OrchestratorServiceLive } from "./services/orchestrator-service.js";
|
|
48
|
-
import {
|
|
39
|
+
import { TracingServiceLive, TracingServiceNoop } from "./services/tracing-service.js";
|
|
40
|
+
import { ValidationServiceLive } from "./services/validation-service.js";
|
|
41
|
+
import { LlmServiceClaudeAgentSdk, LlmServiceNoop } from "./services/llm-service.js";
|
|
42
|
+
import { DocServiceLive } from "./services/doc-service.js";
|
|
43
|
+
import { AgentServiceLive } from "./services/agent-service.js";
|
|
44
|
+
import { CycleScanServiceLive } from "./services/cycle-scan-service.js";
|
|
49
45
|
// Re-export services for cleaner imports
|
|
50
46
|
export { SyncService } from "./services/sync-service.js";
|
|
51
47
|
export { MigrationService } from "./services/migration-service.js";
|
|
@@ -53,70 +49,81 @@ export { AutoSyncService, AutoSyncServiceNoop, AutoSyncServiceLive } from "./ser
|
|
|
53
49
|
export { LearningService } from "./services/learning-service.js";
|
|
54
50
|
export { FileLearningService } from "./services/file-learning-service.js";
|
|
55
51
|
export { EmbeddingService, EmbeddingServiceNoop, EmbeddingServiceLive, EmbeddingServiceOpenAI, EmbeddingServiceAuto, createEmbedderLayer } from "./services/embedding-service.js";
|
|
56
|
-
export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError } from "./services/query-expansion-service.js";
|
|
57
52
|
export { AttemptService } from "./services/attempt-service.js";
|
|
58
53
|
export { TaskService } from "./services/task-service.js";
|
|
59
54
|
export { DependencyService } from "./services/dep-service.js";
|
|
60
|
-
export { ReadyService } from "./services/ready-service.js";
|
|
55
|
+
export { ReadyService, isReadyResult } from "./services/ready-service.js";
|
|
61
56
|
export { HierarchyService } from "./services/hierarchy-service.js";
|
|
62
57
|
export { ScoreService } from "./services/score-service.js";
|
|
63
|
-
export { RunRepository } from "./repo/run-repo.js";
|
|
64
58
|
export { RerankerService, RerankerServiceNoop, RerankerServiceLive, RerankerServiceAuto } from "./services/reranker-service.js";
|
|
65
|
-
export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
66
59
|
export { RetrieverService, RetrieverServiceNoop, RetrieverServiceLive, RetrieverServiceAuto } from "./services/retriever-service.js";
|
|
67
|
-
export {
|
|
68
|
-
export {
|
|
69
|
-
export {
|
|
70
|
-
export {
|
|
71
|
-
export {
|
|
72
|
-
export {
|
|
73
|
-
export {
|
|
74
|
-
export {
|
|
60
|
+
export { DiversifierService, DiversifierServiceNoop, DiversifierServiceLive, DiversifierServiceAuto } from "./services/diversifier-service.js";
|
|
61
|
+
export { QueryExpansionService, QueryExpansionServiceNoop, QueryExpansionServiceLive, QueryExpansionServiceAuto, QueryExpansionUnavailableError } from "./services/query-expansion-service.js";
|
|
62
|
+
export { DeduplicationService, DeduplicationServiceLive } from "./services/deduplication-service.js";
|
|
63
|
+
export { LlmService, LlmServiceNoop, LlmServiceClaudeAgentSdk, LlmServiceAnthropicSdk, LlmServiceAuto } from "./services/llm-service.js";
|
|
64
|
+
export { RunRepository } from "./repo/run-repo.js";
|
|
65
|
+
export { DocService } from "./services/doc-service.js";
|
|
66
|
+
export { AgentService, AgentServiceNoop } from "./services/agent-service.js";
|
|
67
|
+
export { CycleScanService } from "./services/cycle-scan-service.js";
|
|
75
68
|
/**
|
|
76
|
-
* Create the full application layer
|
|
69
|
+
* Create the full application layer from an existing SqliteClient infra layer.
|
|
77
70
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
71
|
+
* Use this when you already have a SqliteClient layer (e.g., from Layer.succeed
|
|
72
|
+
* with a pre-created database instance). This is useful for test utilities that
|
|
73
|
+
* need to share a single database across test runs while getting fresh service
|
|
74
|
+
* instances via Layer.fresh.
|
|
81
75
|
*
|
|
82
|
-
* @param
|
|
76
|
+
* @param infra A layer providing SqliteClient
|
|
83
77
|
*/
|
|
84
|
-
export const
|
|
85
|
-
const
|
|
86
|
-
const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive, AnchorRepositoryLive, EdgeRepositoryLive, DeduplicationRepositoryLive, CandidateRepositoryLive, TrackedProjectRepositoryLive, WorkerRepositoryLive, ClaimRepositoryLive, OrchestratorStateRepositoryLive).pipe(Layer.provide(infra));
|
|
78
|
+
export const makeAppLayerFromInfra = (infra) => {
|
|
79
|
+
const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive, WorkerRepositoryLive, ClaimRepositoryLive, OrchestratorStateRepositoryLive, DeduplicationRepositoryLive, TrackedProjectRepositoryLive, DocRepositoryLive).pipe(Layer.provide(infra));
|
|
87
80
|
// SyncServiceLive needs TaskService, repos, and infra
|
|
88
81
|
const syncServiceWithDeps = SyncServiceLive.pipe(Layer.provide(Layer.mergeAll(infra, repos, TaskServiceLive.pipe(Layer.provide(repos)))));
|
|
89
82
|
// AutoSyncServiceLive needs SyncService and infra
|
|
90
83
|
const autoSyncService = AutoSyncServiceLive.pipe(Layer.provide(Layer.merge(infra, syncServiceWithDeps)));
|
|
91
|
-
//
|
|
92
|
-
const
|
|
93
|
-
//
|
|
94
|
-
const
|
|
95
|
-
// GraphExpansionServiceLive needs EdgeService, LearningRepository, and AnchorRepository
|
|
96
|
-
const graphExpansionService = GraphExpansionServiceLive.pipe(Layer.provide(Layer.merge(repos, edgeService)));
|
|
97
|
-
// RetrieverServiceLive needs repos, embedding, query expansion, reranker, graph expansion, and optionally feedback tracker
|
|
98
|
-
const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, graphExpansionService, feedbackTrackerService)));
|
|
99
|
-
// Services need repos, embedding, query expansion, reranker, retriever, and autoSyncService
|
|
100
|
-
const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive, AnchorServiceLive, DeduplicationServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, QueryExpansionServiceNoop, RerankerServiceNoop, retrieverService, autoSyncService)));
|
|
101
|
-
// AnchorVerificationServiceLive needs AnchorRepository from repos
|
|
102
|
-
const anchorVerificationService = AnchorVerificationServiceLive.pipe(Layer.provide(repos));
|
|
103
|
-
// SwarmVerificationServiceLive needs AnchorVerificationService and AnchorRepository
|
|
104
|
-
const swarmVerificationService = SwarmVerificationServiceLive.pipe(Layer.provide(Layer.merge(repos, anchorVerificationService)));
|
|
105
|
-
// PromotionServiceLive needs CandidateRepository, LearningService, and EdgeService
|
|
106
|
-
const promotionService = PromotionServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, edgeService)));
|
|
84
|
+
// RetrieverServiceLive needs repos, embedding, reranker, diversifier
|
|
85
|
+
const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, DiversifierServiceLive)));
|
|
86
|
+
// Services need repos, embedding, reranker, retriever, and autoSyncService
|
|
87
|
+
const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, retrieverService, autoSyncService)));
|
|
107
88
|
// WorkerServiceLive needs WorkerRepository and OrchestratorStateRepository (from repos)
|
|
108
89
|
const workerService = WorkerServiceLive.pipe(Layer.provide(repos));
|
|
109
90
|
// ClaimServiceLive needs ClaimRepository and OrchestratorStateRepository (from repos)
|
|
110
91
|
const claimService = ClaimServiceLive.pipe(Layer.provide(repos));
|
|
111
|
-
// OrchestratorServiceLive needs WorkerService, ClaimService, TaskService, and
|
|
112
|
-
const orchestratorService = OrchestratorServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, workerService, claimService)));
|
|
113
|
-
//
|
|
114
|
-
const
|
|
92
|
+
// OrchestratorServiceLive needs WorkerService, ClaimService, TaskService, OrchestratorStateRepository, and SqliteClient
|
|
93
|
+
const orchestratorService = OrchestratorServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, workerService, claimService, infra)));
|
|
94
|
+
// TracingServiceLive needs SqliteClient
|
|
95
|
+
const tracingService = TracingServiceLive.pipe(Layer.provide(infra));
|
|
96
|
+
// ValidationServiceLive needs SqliteClient
|
|
97
|
+
const validationService = ValidationServiceLive.pipe(Layer.provide(infra));
|
|
98
|
+
// DeduplicationServiceLive needs DeduplicationRepository (from repos)
|
|
99
|
+
const deduplicationService = DeduplicationServiceLive.pipe(Layer.provide(repos));
|
|
100
|
+
// DocServiceLive needs DocRepository (from repos)
|
|
101
|
+
const docService = DocServiceLive.pipe(Layer.provide(repos));
|
|
102
|
+
// LlmServiceClaudeAgentSdk is the default — uses Claude Code subscription (DD-022)
|
|
103
|
+
const llmService = LlmServiceClaudeAgentSdk;
|
|
104
|
+
// AgentServiceLive — wraps Claude Agent SDK for sub-agent dispatch (cycle scan)
|
|
105
|
+
const agentService = AgentServiceLive;
|
|
106
|
+
// CycleScanServiceLive needs AgentService + SqliteClient
|
|
107
|
+
const cycleScanService = CycleScanServiceLive.pipe(Layer.provide(Layer.mergeAll(agentService, infra)));
|
|
108
|
+
// Merge all services
|
|
109
|
+
const allServices = Layer.mergeAll(services, retrieverService, DiversifierServiceLive, workerService, claimService, orchestratorService, tracingService, validationService, llmService, deduplicationService, docService, agentService, cycleScanService);
|
|
115
110
|
// MigrationService only needs SqliteClient
|
|
116
111
|
const migrationService = MigrationServiceLive.pipe(Layer.provide(infra));
|
|
117
112
|
// Also expose RunRepository directly for run tracking
|
|
118
|
-
//
|
|
119
|
-
return Layer.mergeAll(allServices, syncServiceWithDeps, migrationService, repos);
|
|
113
|
+
// Also expose SqliteClient directly for direct database access (e.g., trace commands)
|
|
114
|
+
return Layer.mergeAll(allServices, syncServiceWithDeps, migrationService, repos, infra);
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* Create the full application layer with all services.
|
|
118
|
+
*
|
|
119
|
+
* This is the standard entry point for CLI, MCP, and SDK consumers.
|
|
120
|
+
* Provides: TaskService, DependencyService, ReadyService, HierarchyService,
|
|
121
|
+
* LearningService, FileLearningService, AttemptService, SyncService, MigrationService
|
|
122
|
+
*
|
|
123
|
+
* @param dbPath Path to SQLite database file
|
|
124
|
+
*/
|
|
125
|
+
export const makeAppLayer = (dbPath) => {
|
|
126
|
+
return makeAppLayerFromInfra(SqliteClientLive(dbPath));
|
|
120
127
|
};
|
|
121
128
|
/**
|
|
122
129
|
* Create a minimal application layer without auto-sync.
|
|
@@ -126,25 +133,17 @@ export const makeAppLayer = (dbPath) => {
|
|
|
126
133
|
*/
|
|
127
134
|
export const makeMinimalLayer = (dbPath) => {
|
|
128
135
|
const infra = SqliteClientLive(dbPath);
|
|
129
|
-
const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive
|
|
130
|
-
//
|
|
131
|
-
const
|
|
132
|
-
//
|
|
133
|
-
const
|
|
134
|
-
//
|
|
135
|
-
const
|
|
136
|
-
//
|
|
137
|
-
const
|
|
138
|
-
//
|
|
139
|
-
const
|
|
140
|
-
// AnchorVerificationServiceLive needs AnchorRepository from repos
|
|
141
|
-
const anchorVerificationService = AnchorVerificationServiceLive.pipe(Layer.provide(repos));
|
|
142
|
-
// SwarmVerificationServiceLive needs AnchorVerificationService and AnchorRepository
|
|
143
|
-
const swarmVerificationService = SwarmVerificationServiceLive.pipe(Layer.provide(Layer.merge(repos, anchorVerificationService)));
|
|
144
|
-
// PromotionServiceLive needs CandidateRepository, LearningService, and EdgeService
|
|
145
|
-
const promotionService = PromotionServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, services, edgeService)));
|
|
146
|
-
// Merge all services including edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, and daemon service (noop for minimal layer)
|
|
147
|
-
const allServices = Layer.mergeAll(services, edgeService, graphExpansionService, anchorVerificationService, swarmVerificationService, promotionService, feedbackTrackerService, retrieverService, DaemonServiceNoop);
|
|
136
|
+
const repos = Layer.mergeAll(TaskRepositoryLive, DependencyRepositoryLive, LearningRepositoryLive, FileLearningRepositoryLive, AttemptRepositoryLive, RunRepositoryLive).pipe(Layer.provide(infra));
|
|
137
|
+
// RetrieverServiceLive needs repos, embedding, reranker, diversifier
|
|
138
|
+
const retrieverService = RetrieverServiceLive.pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, DiversifierServiceLive)));
|
|
139
|
+
// Services with Noop embedding, reranker, retriever, and auto-sync
|
|
140
|
+
const services = Layer.mergeAll(TaskServiceLive, DependencyServiceLive, ReadyServiceLive, HierarchyServiceLive, LearningServiceLive, FileLearningServiceLive, AttemptServiceLive).pipe(Layer.provide(Layer.mergeAll(repos, EmbeddingServiceNoop, RerankerServiceNoop, retrieverService, AutoSyncServiceNoop)));
|
|
141
|
+
// ValidationServiceLive needs SqliteClient
|
|
142
|
+
const validationService = ValidationServiceLive.pipe(Layer.provide(infra));
|
|
143
|
+
// LlmServiceNoop for minimal layer — no LLM needed for core commands (DD-022)
|
|
144
|
+
const llmService = LlmServiceNoop;
|
|
145
|
+
// Merge all services
|
|
146
|
+
const allServices = Layer.mergeAll(services, retrieverService, DiversifierServiceLive, TracingServiceNoop, validationService, llmService);
|
|
148
147
|
// MigrationService only needs SqliteClient
|
|
149
148
|
const migrationService = MigrationServiceLive.pipe(Layer.provide(infra));
|
|
150
149
|
// SyncService for manual exports
|