@cleocode/core 2026.3.42 → 2026.3.44
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/adapters/adapter-registry.d.ts +29 -0
- package/dist/adapters/adapter-registry.d.ts.map +1 -0
- package/dist/adapters/discovery.d.ts +18 -0
- package/dist/adapters/discovery.d.ts.map +1 -0
- package/dist/adapters/index.d.ts +10 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/manager.d.ts +81 -0
- package/dist/adapters/manager.d.ts.map +1 -0
- package/dist/admin/export-tasks.d.ts +30 -0
- package/dist/admin/export-tasks.d.ts.map +1 -0
- package/dist/admin/export.d.ts +28 -0
- package/dist/admin/export.d.ts.map +1 -0
- package/dist/admin/help.d.ts +74 -0
- package/dist/admin/help.d.ts.map +1 -0
- package/dist/admin/import-tasks.d.ts +43 -0
- package/dist/admin/import-tasks.d.ts.map +1 -0
- package/dist/admin/import.d.ts +33 -0
- package/dist/admin/import.d.ts.map +1 -0
- package/dist/admin/index.d.ts +14 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/adrs/find.d.ts +24 -0
- package/dist/adrs/find.d.ts.map +1 -0
- package/dist/adrs/index.d.ts +18 -0
- package/dist/adrs/index.d.ts.map +1 -0
- package/dist/adrs/link-pipeline.d.ts +35 -0
- package/dist/adrs/link-pipeline.d.ts.map +1 -0
- package/dist/adrs/list.d.ts +16 -0
- package/dist/adrs/list.d.ts.map +1 -0
- package/dist/adrs/parse.d.ts +18 -0
- package/dist/adrs/parse.d.ts.map +1 -0
- package/dist/adrs/show.d.ts +11 -0
- package/dist/adrs/show.d.ts.map +1 -0
- package/dist/adrs/sync.d.ts +20 -0
- package/dist/adrs/sync.d.ts.map +1 -0
- package/dist/adrs/types.d.ts +67 -0
- package/dist/adrs/types.d.ts.map +1 -0
- package/dist/adrs/validate.d.ts +24 -0
- package/dist/adrs/validate.d.ts.map +1 -0
- package/dist/agents/agent-schema.d.ts +358 -0
- package/dist/agents/agent-schema.d.ts.map +1 -0
- package/dist/agents/capacity.d.ts +57 -0
- package/dist/agents/capacity.d.ts.map +1 -0
- package/dist/agents/index.d.ts +17 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/registry.d.ts +115 -0
- package/dist/agents/registry.d.ts.map +1 -0
- package/dist/agents/retry.d.ts +83 -0
- package/dist/agents/retry.d.ts.map +1 -0
- package/dist/audit-prune.d.ts +35 -0
- package/dist/audit-prune.d.ts.map +1 -0
- package/dist/audit.d.ts +49 -0
- package/dist/audit.d.ts.map +1 -0
- package/dist/bootstrap.d.ts +44 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/caamp/adapter.d.ts +130 -0
- package/dist/caamp/adapter.d.ts.map +1 -0
- package/dist/caamp/capability-check.d.ts +27 -0
- package/dist/caamp/capability-check.d.ts.map +1 -0
- package/dist/caamp/index.d.ts +12 -0
- package/dist/caamp/index.d.ts.map +1 -0
- package/dist/caamp-init.d.ts +2 -0
- package/dist/caamp-init.d.ts.map +1 -0
- package/dist/cleo.d.ts +295 -0
- package/dist/cleo.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/architecture.d.ts +7 -0
- package/dist/codebase-map/analyzers/architecture.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/concerns.d.ts +6 -0
- package/dist/codebase-map/analyzers/concerns.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/conventions.d.ts +8 -0
- package/dist/codebase-map/analyzers/conventions.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/integrations.d.ts +7 -0
- package/dist/codebase-map/analyzers/integrations.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/stack.d.ts +8 -0
- package/dist/codebase-map/analyzers/stack.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/structure.d.ts +6 -0
- package/dist/codebase-map/analyzers/structure.d.ts.map +1 -0
- package/dist/codebase-map/analyzers/testing.d.ts +8 -0
- package/dist/codebase-map/analyzers/testing.d.ts.map +1 -0
- package/dist/codebase-map/index.d.ts +94 -0
- package/dist/codebase-map/index.d.ts.map +1 -0
- package/dist/codebase-map/store.d.ts +13 -0
- package/dist/codebase-map/store.d.ts.map +1 -0
- package/dist/codebase-map/summary.d.ts +7 -0
- package/dist/codebase-map/summary.d.ts.map +1 -0
- package/dist/compliance/index.d.ts +38 -0
- package/dist/compliance/index.d.ts.map +1 -0
- package/dist/compliance/protocol-enforcement.d.ts +106 -0
- package/dist/compliance/protocol-enforcement.d.ts.map +1 -0
- package/dist/compliance/protocol-rules.d.ts +55 -0
- package/dist/compliance/protocol-rules.d.ts.map +1 -0
- package/dist/compliance/protocol-types.d.ts +109 -0
- package/dist/compliance/protocol-types.d.ts.map +1 -0
- package/dist/compliance/store.d.ts +19 -0
- package/dist/compliance/store.d.ts.map +1 -0
- package/dist/config/build-config.d.ts +31 -0
- package/dist/config/build-config.d.ts.map +1 -0
- package/dist/config.d.ts +53 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/constants.d.ts +13 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/context/index.d.ts +20 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/engine-result.d.ts +31 -0
- package/dist/engine-result.d.ts.map +1 -0
- package/dist/error-catalog.d.ts +49 -0
- package/dist/error-catalog.d.ts.map +1 -0
- package/dist/error-registry.d.ts +58 -0
- package/dist/error-registry.d.ts.map +1 -0
- package/dist/errors.d.ts +66 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/hooks/handlers/error-hooks.d.ts +18 -0
- package/dist/hooks/handlers/error-hooks.d.ts.map +1 -0
- package/dist/hooks/handlers/file-hooks.d.ts +20 -0
- package/dist/hooks/handlers/file-hooks.d.ts.map +1 -0
- package/dist/hooks/handlers/index.d.ts +17 -0
- package/dist/hooks/handlers/index.d.ts.map +1 -0
- package/dist/hooks/handlers/mcp-hooks.d.ts +22 -0
- package/dist/hooks/handlers/mcp-hooks.d.ts.map +1 -0
- package/dist/hooks/handlers/session-hooks.d.ts +16 -0
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -0
- package/dist/hooks/handlers/task-hooks.d.ts +16 -0
- package/dist/hooks/handlers/task-hooks.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +15 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/payload-schemas.d.ts +214 -0
- package/dist/hooks/payload-schemas.d.ts.map +1 -0
- package/dist/hooks/provider-hooks.d.ts +27 -0
- package/dist/hooks/provider-hooks.d.ts.map +1 -0
- package/dist/hooks/registry.d.ts +111 -0
- package/dist/hooks/registry.d.ts.map +1 -0
- package/dist/hooks/types.d.ts +299 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks.d.ts +46 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16443 -2160
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts +137 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/inject/index.d.ts +26 -0
- package/dist/inject/index.d.ts.map +1 -0
- package/dist/injection.d.ts +69 -0
- package/dist/injection.d.ts.map +1 -0
- package/dist/intelligence/impact.d.ts +51 -0
- package/dist/intelligence/impact.d.ts.map +1 -0
- package/dist/intelligence/index.d.ts +15 -0
- package/dist/intelligence/index.d.ts.map +1 -0
- package/dist/intelligence/patterns.d.ts +66 -0
- package/dist/intelligence/patterns.d.ts.map +1 -0
- package/dist/intelligence/prediction.d.ts +51 -0
- package/dist/intelligence/prediction.d.ts.map +1 -0
- package/dist/intelligence/types.d.ts +221 -0
- package/dist/intelligence/types.d.ts.map +1 -0
- package/dist/internal.d.ts +209 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/issue/create.d.ts +43 -0
- package/dist/issue/create.d.ts.map +1 -0
- package/dist/issue/diagnostics.d.ts +18 -0
- package/dist/issue/diagnostics.d.ts.map +1 -0
- package/dist/issue/index.d.ts +12 -0
- package/dist/issue/index.d.ts.map +1 -0
- package/dist/issue/template-parser.d.ts +54 -0
- package/dist/issue/template-parser.d.ts.map +1 -0
- package/dist/json-schema-validator.d.ts +20 -0
- package/dist/json-schema-validator.d.ts.map +1 -0
- package/dist/lifecycle/chain-composition.d.ts +30 -0
- package/dist/lifecycle/chain-composition.d.ts.map +1 -0
- package/dist/lifecycle/chain-store.d.ts +70 -0
- package/dist/lifecycle/chain-store.d.ts.map +1 -0
- package/dist/lifecycle/consolidate-rcasd.d.ts +81 -0
- package/dist/lifecycle/consolidate-rcasd.d.ts.map +1 -0
- package/dist/lifecycle/default-chain.d.ts +33 -0
- package/dist/lifecycle/default-chain.d.ts.map +1 -0
- package/dist/lifecycle/evidence.d.ts +71 -0
- package/dist/lifecycle/evidence.d.ts.map +1 -0
- package/dist/lifecycle/frontmatter.d.ts +104 -0
- package/dist/lifecycle/frontmatter.d.ts.map +1 -0
- package/dist/lifecycle/index.d.ts +228 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/pipeline.d.ts +335 -0
- package/dist/lifecycle/pipeline.d.ts.map +1 -0
- package/dist/lifecycle/rcasd-index.d.ts +168 -0
- package/dist/lifecycle/rcasd-index.d.ts.map +1 -0
- package/dist/lifecycle/rcasd-paths.d.ts +103 -0
- package/dist/lifecycle/rcasd-paths.d.ts.map +1 -0
- package/dist/lifecycle/resume.d.ts +501 -0
- package/dist/lifecycle/resume.d.ts.map +1 -0
- package/dist/lifecycle/stage-artifacts.d.ts +23 -0
- package/dist/lifecycle/stage-artifacts.d.ts.map +1 -0
- package/dist/lifecycle/stages.d.ts +323 -0
- package/dist/lifecycle/stages.d.ts.map +1 -0
- package/dist/lifecycle/state-machine.d.ts +327 -0
- package/dist/lifecycle/state-machine.d.ts.map +1 -0
- package/dist/lifecycle/tessera-engine.d.ts +48 -0
- package/dist/lifecycle/tessera-engine.d.ts.map +1 -0
- package/dist/logger.d.ts +54 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +42 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/memory/auto-extract.d.ts +34 -0
- package/dist/memory/auto-extract.d.ts.map +1 -0
- package/dist/memory/brain-embedding.d.ts +42 -0
- package/dist/memory/brain-embedding.d.ts.map +1 -0
- package/dist/memory/brain-lifecycle.d.ts +57 -0
- package/dist/memory/brain-lifecycle.d.ts.map +1 -0
- package/dist/memory/brain-links.d.ts +75 -0
- package/dist/memory/brain-links.d.ts.map +1 -0
- package/dist/memory/brain-migration.d.ts +30 -0
- package/dist/memory/brain-migration.d.ts.map +1 -0
- package/dist/memory/brain-reasoning.d.ts +54 -0
- package/dist/memory/brain-reasoning.d.ts.map +1 -0
- package/dist/memory/brain-retrieval.d.ts +157 -0
- package/dist/memory/brain-retrieval.d.ts.map +1 -0
- package/dist/memory/brain-row-types.d.ts +79 -0
- package/dist/memory/brain-row-types.d.ts.map +1 -0
- package/dist/memory/brain-search.d.ts +91 -0
- package/dist/memory/brain-search.d.ts.map +1 -0
- package/dist/memory/brain-similarity.d.ts +33 -0
- package/dist/memory/brain-similarity.d.ts.map +1 -0
- package/dist/memory/claude-mem-migration.d.ts +45 -0
- package/dist/memory/claude-mem-migration.d.ts.map +1 -0
- package/dist/memory/decisions.d.ts +72 -0
- package/dist/memory/decisions.d.ts.map +1 -0
- package/dist/memory/engine-compat.d.ts +144 -0
- package/dist/memory/engine-compat.d.ts.map +1 -0
- package/dist/memory/index.d.ts +305 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/learnings.d.ts +74 -0
- package/dist/memory/learnings.d.ts.map +1 -0
- package/dist/memory/memory-bridge.d.ts +50 -0
- package/dist/memory/memory-bridge.d.ts.map +1 -0
- package/dist/memory/patterns.d.ts +87 -0
- package/dist/memory/patterns.d.ts.map +1 -0
- package/dist/memory/pipeline-manifest-sqlite.d.ts +83 -0
- package/dist/memory/pipeline-manifest-sqlite.d.ts.map +1 -0
- package/dist/memory/session-memory.d.ts +88 -0
- package/dist/memory/session-memory.d.ts.map +1 -0
- package/dist/metrics/ab-test.d.ts +52 -0
- package/dist/metrics/ab-test.d.ts.map +1 -0
- package/dist/metrics/aggregation.d.ts +41 -0
- package/dist/metrics/aggregation.d.ts.map +1 -0
- package/dist/metrics/common.d.ts +30 -0
- package/dist/metrics/common.d.ts.map +1 -0
- package/dist/metrics/enums.d.ts +68 -0
- package/dist/metrics/enums.d.ts.map +1 -0
- package/dist/metrics/index.d.ts +17 -0
- package/dist/metrics/index.d.ts.map +1 -0
- package/dist/metrics/model-provider-registry.d.ts +17 -0
- package/dist/metrics/model-provider-registry.d.ts.map +1 -0
- package/dist/metrics/otel-integration.d.ts +49 -0
- package/dist/metrics/otel-integration.d.ts.map +1 -0
- package/dist/metrics/provider-detection.d.ts +20 -0
- package/dist/metrics/provider-detection.d.ts.map +1 -0
- package/dist/metrics/token-estimation.d.ts +70 -0
- package/dist/metrics/token-estimation.d.ts.map +1 -0
- package/dist/metrics/token-service.d.ts +107 -0
- package/dist/metrics/token-service.d.ts.map +1 -0
- package/dist/migration/agent-outputs.d.ts +70 -0
- package/dist/migration/agent-outputs.d.ts.map +1 -0
- package/dist/migration/checksum.d.ts +55 -0
- package/dist/migration/checksum.d.ts.map +1 -0
- package/dist/migration/index.d.ts +79 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/logger.d.ts +161 -0
- package/dist/migration/logger.d.ts.map +1 -0
- package/dist/migration/preflight.d.ts +10 -0
- package/dist/migration/preflight.d.ts.map +1 -0
- package/dist/migration/state.d.ts +186 -0
- package/dist/migration/state.d.ts.map +1 -0
- package/dist/migration/validate.d.ts +57 -0
- package/dist/migration/validate.d.ts.map +1 -0
- package/dist/nexus/deps.d.ts +98 -0
- package/dist/nexus/deps.d.ts.map +1 -0
- package/dist/nexus/discover.d.ts +66 -0
- package/dist/nexus/discover.d.ts.map +1 -0
- package/dist/nexus/hash.d.ts +7 -0
- package/dist/nexus/hash.d.ts.map +1 -0
- package/dist/nexus/index.d.ts +17 -0
- package/dist/nexus/index.d.ts.map +1 -0
- package/dist/nexus/migrate-json-to-sqlite.d.ts +23 -0
- package/dist/nexus/migrate-json-to-sqlite.d.ts.map +1 -0
- package/dist/nexus/permissions.d.ts +60 -0
- package/dist/nexus/permissions.d.ts.map +1 -0
- package/dist/nexus/query.d.ts +53 -0
- package/dist/nexus/query.d.ts.map +1 -0
- package/dist/nexus/registry.d.ts +126 -0
- package/dist/nexus/registry.d.ts.map +1 -0
- package/dist/nexus/sharing/index.d.ts +39 -0
- package/dist/nexus/sharing/index.d.ts.map +1 -0
- package/dist/observability/index.d.ts +32 -0
- package/dist/observability/index.d.ts.map +1 -0
- package/dist/observability/log-filter.d.ts +31 -0
- package/dist/observability/log-filter.d.ts.map +1 -0
- package/dist/observability/log-parser.d.ts +26 -0
- package/dist/observability/log-parser.d.ts.map +1 -0
- package/dist/observability/log-reader.d.ts +35 -0
- package/dist/observability/log-reader.d.ts.map +1 -0
- package/dist/observability/types.d.ts +112 -0
- package/dist/observability/types.d.ts.map +1 -0
- package/dist/orchestration/analyze.d.ts +57 -0
- package/dist/orchestration/analyze.d.ts.map +1 -0
- package/dist/orchestration/bootstrap.d.ts +12 -0
- package/dist/orchestration/bootstrap.d.ts.map +1 -0
- package/dist/orchestration/context.d.ts +38 -0
- package/dist/orchestration/context.d.ts.map +1 -0
- package/dist/orchestration/critical-path.d.ts +22 -0
- package/dist/orchestration/critical-path.d.ts.map +1 -0
- package/dist/orchestration/index.d.ts +116 -0
- package/dist/orchestration/index.d.ts.map +1 -0
- package/dist/orchestration/parallel.d.ts +35 -0
- package/dist/orchestration/parallel.d.ts.map +1 -0
- package/dist/orchestration/protocol-validators.d.ts +96 -0
- package/dist/orchestration/protocol-validators.d.ts.map +1 -0
- package/dist/orchestration/skill-ops.d.ts +29 -0
- package/dist/orchestration/skill-ops.d.ts.map +1 -0
- package/dist/orchestration/status.d.ts +92 -0
- package/dist/orchestration/status.d.ts.map +1 -0
- package/dist/orchestration/unblock.d.ts +31 -0
- package/dist/orchestration/unblock.d.ts.map +1 -0
- package/dist/orchestration/validate-spawn.d.ts +19 -0
- package/dist/orchestration/validate-spawn.d.ts.map +1 -0
- package/dist/orchestration/waves.d.ts +26 -0
- package/dist/orchestration/waves.d.ts.map +1 -0
- package/dist/otel/index.d.ts +27 -0
- package/dist/otel/index.d.ts.map +1 -0
- package/dist/output.d.ts +66 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/pagination.d.ts +45 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/paths.d.ts +165 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/phases/deps.d.ts +119 -0
- package/dist/phases/deps.d.ts.map +1 -0
- package/dist/phases/index.d.ts +123 -0
- package/dist/phases/index.d.ts.map +1 -0
- package/dist/pipeline/index.d.ts +10 -0
- package/dist/pipeline/index.d.ts.map +1 -0
- package/dist/pipeline/phase.d.ts +36 -0
- package/dist/pipeline/phase.d.ts.map +1 -0
- package/dist/platform.d.ts +103 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/project-info.d.ts +35 -0
- package/dist/project-info.d.ts.map +1 -0
- package/dist/reconciliation/index.d.ts +10 -0
- package/dist/reconciliation/index.d.ts.map +1 -0
- package/dist/reconciliation/link-store.d.ts +44 -0
- package/dist/reconciliation/link-store.d.ts.map +1 -0
- package/dist/reconciliation/reconciliation-engine.d.ts +24 -0
- package/dist/reconciliation/reconciliation-engine.d.ts.map +1 -0
- package/dist/release/artifacts.d.ts +71 -0
- package/dist/release/artifacts.d.ts.map +1 -0
- package/dist/release/changelog-writer.d.ts +26 -0
- package/dist/release/changelog-writer.d.ts.map +1 -0
- package/dist/release/channel.d.ts +54 -0
- package/dist/release/channel.d.ts.map +1 -0
- package/dist/release/ci.d.ts +35 -0
- package/dist/release/ci.d.ts.map +1 -0
- package/dist/release/github-pr.d.ts +63 -0
- package/dist/release/github-pr.d.ts.map +1 -0
- package/dist/release/guards.d.ts +44 -0
- package/dist/release/guards.d.ts.map +1 -0
- package/dist/release/index.d.ts +26 -0
- package/dist/release/index.d.ts.map +1 -0
- package/dist/release/release-config.d.ts +90 -0
- package/dist/release/release-config.d.ts.map +1 -0
- package/dist/release/release-manifest.d.ts +215 -0
- package/dist/release/release-manifest.d.ts.map +1 -0
- package/dist/release/version-bump.d.ts +51 -0
- package/dist/release/version-bump.d.ts.map +1 -0
- package/dist/remote/index.d.ts +81 -0
- package/dist/remote/index.d.ts.map +1 -0
- package/dist/repair.d.ts +30 -0
- package/dist/repair.d.ts.map +1 -0
- package/dist/research/index.d.ts +2 -0
- package/dist/research/index.d.ts.map +1 -0
- package/dist/roadmap/index.d.ts +13 -0
- package/dist/roadmap/index.d.ts.map +1 -0
- package/dist/routing/capability-matrix.d.ts +78 -0
- package/dist/routing/capability-matrix.d.ts.map +1 -0
- package/dist/routing/index.d.ts +10 -0
- package/dist/routing/index.d.ts.map +1 -0
- package/dist/scaffold.d.ts +215 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/schema-management.d.ts +96 -0
- package/dist/schema-management.d.ts.map +1 -0
- package/dist/security/index.d.ts +10 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/input-sanitization.d.ts +93 -0
- package/dist/security/input-sanitization.d.ts.map +1 -0
- package/dist/sequence/index.d.ts +34 -0
- package/dist/sequence/index.d.ts.map +1 -0
- package/dist/sessions/assumptions.d.ts +22 -0
- package/dist/sessions/assumptions.d.ts.map +1 -0
- package/dist/sessions/briefing.d.ts +113 -0
- package/dist/sessions/briefing.d.ts.map +1 -0
- package/dist/sessions/context-alert.d.ts +48 -0
- package/dist/sessions/context-alert.d.ts.map +1 -0
- package/dist/sessions/context-inject.d.ts +31 -0
- package/dist/sessions/context-inject.d.ts.map +1 -0
- package/dist/sessions/context-monitor.d.ts +33 -0
- package/dist/sessions/context-monitor.d.ts.map +1 -0
- package/dist/sessions/decisions.d.ts +29 -0
- package/dist/sessions/decisions.d.ts.map +1 -0
- package/dist/sessions/find.d.ts +38 -0
- package/dist/sessions/find.d.ts.map +1 -0
- package/dist/sessions/handoff.d.ts +137 -0
- package/dist/sessions/handoff.d.ts.map +1 -0
- package/dist/sessions/hitl-warnings.d.ts +58 -0
- package/dist/sessions/hitl-warnings.d.ts.map +1 -0
- package/dist/sessions/index.d.ts +107 -0
- package/dist/sessions/index.d.ts.map +1 -0
- package/dist/sessions/session-archive.d.ts +17 -0
- package/dist/sessions/session-archive.d.ts.map +1 -0
- package/dist/sessions/session-cleanup.d.ts +22 -0
- package/dist/sessions/session-cleanup.d.ts.map +1 -0
- package/dist/sessions/session-drift.d.ts +22 -0
- package/dist/sessions/session-drift.d.ts.map +1 -0
- package/dist/sessions/session-enforcement.d.ts +49 -0
- package/dist/sessions/session-enforcement.d.ts.map +1 -0
- package/dist/sessions/session-grade.d.ts +41 -0
- package/dist/sessions/session-grade.d.ts.map +1 -0
- package/dist/sessions/session-history.d.ts +32 -0
- package/dist/sessions/session-history.d.ts.map +1 -0
- package/dist/sessions/session-id.d.ts +34 -0
- package/dist/sessions/session-id.d.ts.map +1 -0
- package/dist/sessions/session-memory-bridge.d.ts +28 -0
- package/dist/sessions/session-memory-bridge.d.ts.map +1 -0
- package/dist/sessions/session-show.d.ts +14 -0
- package/dist/sessions/session-show.d.ts.map +1 -0
- package/dist/sessions/session-stats.d.ts +30 -0
- package/dist/sessions/session-stats.d.ts.map +1 -0
- package/dist/sessions/session-suspend.d.ts +14 -0
- package/dist/sessions/session-suspend.d.ts.map +1 -0
- package/dist/sessions/session-switch.d.ts +14 -0
- package/dist/sessions/session-switch.d.ts.map +1 -0
- package/dist/sessions/session-view.d.ts +41 -0
- package/dist/sessions/session-view.d.ts.map +1 -0
- package/dist/sessions/statusline-setup.d.ts +24 -0
- package/dist/sessions/statusline-setup.d.ts.map +1 -0
- package/dist/sessions/types.d.ts +110 -0
- package/dist/sessions/types.d.ts.map +1 -0
- package/dist/signaldock/claude-code-transport.d.ts +34 -0
- package/dist/signaldock/claude-code-transport.d.ts.map +1 -0
- package/dist/signaldock/factory.d.ts +22 -0
- package/dist/signaldock/factory.d.ts.map +1 -0
- package/dist/signaldock/index.d.ts +13 -0
- package/dist/signaldock/index.d.ts.map +1 -0
- package/dist/signaldock/signaldock-transport.d.ts +45 -0
- package/dist/signaldock/signaldock-transport.d.ts.map +1 -0
- package/dist/signaldock/transport.d.ts +49 -0
- package/dist/signaldock/transport.d.ts.map +1 -0
- package/dist/signaldock/types.d.ts +88 -0
- package/dist/signaldock/types.d.ts.map +1 -0
- package/dist/skills/agents/config.d.ts +39 -0
- package/dist/skills/agents/config.d.ts.map +1 -0
- package/dist/skills/agents/install.d.ts +33 -0
- package/dist/skills/agents/install.d.ts.map +1 -0
- package/dist/skills/agents/registry.d.ts +56 -0
- package/dist/skills/agents/registry.d.ts.map +1 -0
- package/dist/skills/discovery.d.ts +102 -0
- package/dist/skills/discovery.d.ts.map +1 -0
- package/dist/skills/dispatch.d.ts +67 -0
- package/dist/skills/dispatch.d.ts.map +1 -0
- package/dist/skills/dynamic-skill-generator.d.ts +42 -0
- package/dist/skills/dynamic-skill-generator.d.ts.map +1 -0
- package/dist/skills/index.d.ts +38 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/injection/subagent.d.ts +60 -0
- package/dist/skills/injection/subagent.d.ts.map +1 -0
- package/dist/skills/injection/token.d.ts +121 -0
- package/dist/skills/injection/token.d.ts.map +1 -0
- package/dist/skills/install.d.ts +16 -0
- package/dist/skills/install.d.ts.map +1 -0
- package/dist/skills/manifests/contribution.d.ts +74 -0
- package/dist/skills/manifests/contribution.d.ts.map +1 -0
- package/dist/skills/manifests/research.d.ts +73 -0
- package/dist/skills/manifests/research.d.ts.map +1 -0
- package/dist/skills/manifests/resolver.d.ts +40 -0
- package/dist/skills/manifests/resolver.d.ts.map +1 -0
- package/dist/skills/marketplace.d.ts +45 -0
- package/dist/skills/marketplace.d.ts.map +1 -0
- package/dist/skills/orchestrator/spawn.d.ts +66 -0
- package/dist/skills/orchestrator/spawn.d.ts.map +1 -0
- package/dist/skills/orchestrator/startup.d.ts +85 -0
- package/dist/skills/orchestrator/startup.d.ts.map +1 -0
- package/dist/skills/orchestrator/validator.d.ts +40 -0
- package/dist/skills/orchestrator/validator.d.ts.map +1 -0
- package/dist/skills/precedence-integration.d.ts +46 -0
- package/dist/skills/precedence-integration.d.ts.map +1 -0
- package/dist/skills/precedence-types.d.ts +50 -0
- package/dist/skills/precedence-types.d.ts.map +1 -0
- package/dist/skills/routing-table.d.ts +58 -0
- package/dist/skills/routing-table.d.ts.map +1 -0
- package/dist/skills/skill-paths.d.ts +79 -0
- package/dist/skills/skill-paths.d.ts.map +1 -0
- package/dist/skills/test-utility.d.ts +39 -0
- package/dist/skills/test-utility.d.ts.map +1 -0
- package/dist/skills/types.d.ts +347 -0
- package/dist/skills/types.d.ts.map +1 -0
- package/dist/skills/validation.d.ts +46 -0
- package/dist/skills/validation.d.ts.map +1 -0
- package/dist/skills/version.d.ts +31 -0
- package/dist/skills/version.d.ts.map +1 -0
- package/dist/snapshot/index.d.ts +83 -0
- package/dist/snapshot/index.d.ts.map +1 -0
- package/dist/spawn/adapter-registry.d.ts +132 -0
- package/dist/spawn/adapter-registry.d.ts.map +1 -0
- package/dist/spawn/index.d.ts +11 -0
- package/dist/spawn/index.d.ts.map +1 -0
- package/dist/stats/index.d.ts +37 -0
- package/dist/stats/index.d.ts.map +1 -0
- package/dist/sticky/archive.d.ts +18 -0
- package/dist/sticky/archive.d.ts.map +1 -0
- package/dist/sticky/convert.d.ts +73 -0
- package/dist/sticky/convert.d.ts.map +1 -0
- package/dist/sticky/create.d.ts +18 -0
- package/dist/sticky/create.d.ts.map +1 -0
- package/dist/sticky/id.d.ts +18 -0
- package/dist/sticky/id.d.ts.map +1 -0
- package/dist/sticky/index.d.ts +17 -0
- package/dist/sticky/index.d.ts.map +1 -0
- package/dist/sticky/list.d.ts +18 -0
- package/dist/sticky/list.d.ts.map +1 -0
- package/dist/sticky/purge.d.ts +17 -0
- package/dist/sticky/purge.d.ts.map +1 -0
- package/dist/sticky/show.d.ts +18 -0
- package/dist/sticky/show.d.ts.map +1 -0
- package/dist/sticky/types.d.ts +87 -0
- package/dist/sticky/types.d.ts.map +1 -0
- package/dist/store/atomic.d.ts +75 -0
- package/dist/store/atomic.d.ts.map +1 -0
- package/dist/store/backup.d.ts +21 -0
- package/dist/store/backup.d.ts.map +1 -0
- package/dist/store/brain-accessor.d.ts +84 -0
- package/dist/store/brain-accessor.d.ts.map +1 -0
- package/dist/store/brain-schema.d.ts +1339 -0
- package/dist/store/brain-schema.d.ts.map +1 -0
- package/dist/store/brain-sqlite.d.ts +59 -0
- package/dist/store/brain-sqlite.d.ts.map +1 -0
- package/dist/store/cache.d.ts +67 -0
- package/dist/store/cache.d.ts.map +1 -0
- package/dist/store/chain-schema.d.ts +319 -0
- package/dist/store/chain-schema.d.ts.map +1 -0
- package/dist/store/converters.d.ts +19 -0
- package/dist/store/converters.d.ts.map +1 -0
- package/dist/store/data-accessor.d.ts +20 -0
- package/dist/store/data-accessor.d.ts.map +1 -0
- package/dist/store/data-safety-central.d.ts +101 -0
- package/dist/store/data-safety-central.d.ts.map +1 -0
- package/dist/store/data-safety.d.ts +92 -0
- package/dist/store/data-safety.d.ts.map +1 -0
- package/dist/store/db-helpers.d.ts +61 -0
- package/dist/store/db-helpers.d.ts.map +1 -0
- package/dist/store/export.d.ts +88 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/file-utils.d.ts +72 -0
- package/dist/store/file-utils.d.ts.map +1 -0
- package/dist/store/git-checkpoint.d.ts +93 -0
- package/dist/store/git-checkpoint.d.ts.map +1 -0
- package/dist/store/import-logging.d.ts +58 -0
- package/dist/store/import-logging.d.ts.map +1 -0
- package/dist/store/import-remap.d.ts +50 -0
- package/dist/store/import-remap.d.ts.map +1 -0
- package/dist/store/import-sort.d.ts +35 -0
- package/dist/store/import-sort.d.ts.map +1 -0
- package/dist/store/index.d.ts +28 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/json.d.ts +57 -0
- package/dist/store/json.d.ts.map +1 -0
- package/dist/store/lifecycle-store.d.ts +125 -0
- package/dist/store/lifecycle-store.d.ts.map +1 -0
- package/dist/store/lock.d.ts +29 -0
- package/dist/store/lock.d.ts.map +1 -0
- package/dist/store/migration-sqlite.d.ts +67 -0
- package/dist/store/migration-sqlite.d.ts.map +1 -0
- package/dist/store/nexus-schema.d.ts +503 -0
- package/dist/store/nexus-schema.d.ts.map +1 -0
- package/dist/store/nexus-sqlite.d.ts +58 -0
- package/dist/store/nexus-sqlite.d.ts.map +1 -0
- package/dist/store/nexus-validation-schemas.d.ts +970 -0
- package/dist/store/nexus-validation-schemas.d.ts.map +1 -0
- package/dist/store/parsers.d.ts +16 -0
- package/dist/store/parsers.d.ts.map +1 -0
- package/dist/store/project-detect.d.ts +56 -0
- package/dist/store/project-detect.d.ts.map +1 -0
- package/dist/store/provider.d.ts +147 -0
- package/dist/store/provider.d.ts.map +1 -0
- package/dist/store/safety-data-accessor.d.ts +123 -0
- package/dist/store/safety-data-accessor.d.ts.map +1 -0
- package/dist/store/schema.d.ts +7 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/session-store.d.ts +42 -0
- package/dist/store/session-store.d.ts.map +1 -0
- package/dist/store/sqlite-backup.d.ts +34 -0
- package/dist/store/sqlite-backup.d.ts.map +1 -0
- package/dist/store/sqlite-data-accessor.d.ts +26 -0
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -0
- package/dist/store/sqlite.d.ts +106 -0
- package/dist/store/sqlite.d.ts.map +1 -0
- package/dist/store/status-registry.d.ts +9 -0
- package/dist/store/status-registry.d.ts.map +1 -0
- package/dist/store/task-store.d.ts +69 -0
- package/dist/store/task-store.d.ts.map +1 -0
- package/dist/store/tasks-schema.d.ts +4077 -0
- package/dist/store/tasks-schema.d.ts.map +1 -0
- package/dist/store/typed-query.d.ts +12 -0
- package/dist/store/typed-query.d.ts.map +1 -0
- package/dist/store/validation-schemas.d.ts +9042 -0
- package/dist/store/validation-schemas.d.ts.map +1 -0
- package/dist/system/archive-analytics.d.ts +148 -0
- package/dist/system/archive-analytics.d.ts.map +1 -0
- package/dist/system/archive-stats.d.ts +21 -0
- package/dist/system/archive-stats.d.ts.map +1 -0
- package/dist/system/audit.d.ts +25 -0
- package/dist/system/audit.d.ts.map +1 -0
- package/dist/system/backup.d.ts +28 -0
- package/dist/system/backup.d.ts.map +1 -0
- package/dist/system/cleanup.d.ts +20 -0
- package/dist/system/cleanup.d.ts.map +1 -0
- package/dist/system/health.d.ts +124 -0
- package/dist/system/health.d.ts.map +1 -0
- package/dist/system/index.d.ts +31 -0
- package/dist/system/index.d.ts.map +1 -0
- package/dist/system/inject-generate.d.ts +13 -0
- package/dist/system/inject-generate.d.ts.map +1 -0
- package/dist/system/labels.d.ts +18 -0
- package/dist/system/labels.d.ts.map +1 -0
- package/dist/system/metrics.d.ts +30 -0
- package/dist/system/metrics.d.ts.map +1 -0
- package/dist/system/migrate.d.ts +19 -0
- package/dist/system/migrate.d.ts.map +1 -0
- package/dist/system/platform-paths.d.ts +61 -0
- package/dist/system/platform-paths.d.ts.map +1 -0
- package/dist/system/runtime.d.ts +38 -0
- package/dist/system/runtime.d.ts.map +1 -0
- package/dist/system/safestop.d.ts +35 -0
- package/dist/system/safestop.d.ts.map +1 -0
- package/dist/system/storage-preflight.d.ts +42 -0
- package/dist/system/storage-preflight.d.ts.map +1 -0
- package/dist/task-work/index.d.ts +58 -0
- package/dist/task-work/index.d.ts.map +1 -0
- package/dist/tasks/add.d.ts +123 -0
- package/dist/tasks/add.d.ts.map +1 -0
- package/dist/tasks/analyze.d.ts +16 -0
- package/dist/tasks/analyze.d.ts.map +1 -0
- package/dist/tasks/archive.d.ts +31 -0
- package/dist/tasks/archive.d.ts.map +1 -0
- package/dist/tasks/atomicity.d.ts +21 -0
- package/dist/tasks/atomicity.d.ts.map +1 -0
- package/dist/tasks/cancel-ops.d.ts +42 -0
- package/dist/tasks/cancel-ops.d.ts.map +1 -0
- package/dist/tasks/complete.d.ts +26 -0
- package/dist/tasks/complete.d.ts.map +1 -0
- package/dist/tasks/crossref-extract.d.ts +39 -0
- package/dist/tasks/crossref-extract.d.ts.map +1 -0
- package/dist/tasks/delete-preview.d.ts +69 -0
- package/dist/tasks/delete-preview.d.ts.map +1 -0
- package/dist/tasks/delete.d.ts +24 -0
- package/dist/tasks/delete.d.ts.map +1 -0
- package/dist/tasks/deletion-strategy.d.ts +46 -0
- package/dist/tasks/deletion-strategy.d.ts.map +1 -0
- package/dist/tasks/dependency-check.d.ts +82 -0
- package/dist/tasks/dependency-check.d.ts.map +1 -0
- package/dist/tasks/deps-ready.d.ts +22 -0
- package/dist/tasks/deps-ready.d.ts.map +1 -0
- package/dist/tasks/find.d.ts +48 -0
- package/dist/tasks/find.d.ts.map +1 -0
- package/dist/tasks/graph-cache.d.ts +70 -0
- package/dist/tasks/graph-cache.d.ts.map +1 -0
- package/dist/tasks/graph-ops.d.ts +36 -0
- package/dist/tasks/graph-ops.d.ts.map +1 -0
- package/dist/tasks/graph-rag.d.ts +49 -0
- package/dist/tasks/graph-rag.d.ts.map +1 -0
- package/dist/tasks/hierarchy-policy.d.ts +61 -0
- package/dist/tasks/hierarchy-policy.d.ts.map +1 -0
- package/dist/tasks/hierarchy.d.ts +85 -0
- package/dist/tasks/hierarchy.d.ts.map +1 -0
- package/dist/tasks/id-generator.d.ts +28 -0
- package/dist/tasks/id-generator.d.ts.map +1 -0
- package/dist/tasks/index.d.ts +14 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/labels.d.ts +19 -0
- package/dist/tasks/labels.d.ts.map +1 -0
- package/dist/tasks/list.d.ts +49 -0
- package/dist/tasks/list.d.ts.map +1 -0
- package/dist/tasks/phase-tracking.d.ts +61 -0
- package/dist/tasks/phase-tracking.d.ts.map +1 -0
- package/dist/tasks/plan.d.ts +53 -0
- package/dist/tasks/plan.d.ts.map +1 -0
- package/dist/tasks/relates.d.ts +18 -0
- package/dist/tasks/relates.d.ts.map +1 -0
- package/dist/tasks/show.d.ts +23 -0
- package/dist/tasks/show.d.ts.map +1 -0
- package/dist/tasks/size-weighting.d.ts +38 -0
- package/dist/tasks/size-weighting.d.ts.map +1 -0
- package/dist/tasks/staleness.d.ts +56 -0
- package/dist/tasks/staleness.d.ts.map +1 -0
- package/dist/tasks/task-ops.d.ts +322 -0
- package/dist/tasks/task-ops.d.ts.map +1 -0
- package/dist/tasks/update.d.ts +41 -0
- package/dist/tasks/update.d.ts.map +1 -0
- package/dist/templates/index.d.ts +11 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/parser.d.ts +84 -0
- package/dist/templates/parser.d.ts.map +1 -0
- package/dist/ui/aliases.d.ts +43 -0
- package/dist/ui/aliases.d.ts.map +1 -0
- package/dist/ui/changelog.d.ts +58 -0
- package/dist/ui/changelog.d.ts.map +1 -0
- package/dist/ui/command-registry.d.ts +44 -0
- package/dist/ui/command-registry.d.ts.map +1 -0
- package/dist/ui/flags.d.ts +34 -0
- package/dist/ui/flags.d.ts.map +1 -0
- package/dist/ui/index.d.ts +16 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/injection-legacy.d.ts +26 -0
- package/dist/ui/injection-legacy.d.ts.map +1 -0
- package/dist/upgrade.d.ts +59 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/validation/chain-validation.d.ts +43 -0
- package/dist/validation/chain-validation.d.ts.map +1 -0
- package/dist/validation/compliance.d.ts +94 -0
- package/dist/validation/compliance.d.ts.map +1 -0
- package/dist/validation/docs-sync.d.ts +66 -0
- package/dist/validation/docs-sync.d.ts.map +1 -0
- package/dist/validation/doctor/checks.d.ts +130 -0
- package/dist/validation/doctor/checks.d.ts.map +1 -0
- package/dist/validation/doctor/index.d.ts +9 -0
- package/dist/validation/doctor/index.d.ts.map +1 -0
- package/dist/validation/doctor/project-cache.d.ts +77 -0
- package/dist/validation/doctor/project-cache.d.ts.map +1 -0
- package/dist/validation/doctor/utils.d.ts +68 -0
- package/dist/validation/doctor/utils.d.ts.map +1 -0
- package/dist/validation/engine.d.ts +171 -0
- package/dist/validation/engine.d.ts.map +1 -0
- package/dist/validation/gap-check.d.ts +74 -0
- package/dist/validation/gap-check.d.ts.map +1 -0
- package/dist/validation/index.d.ts +22 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/manifest.d.ts +81 -0
- package/dist/validation/manifest.d.ts.map +1 -0
- package/dist/validation/operation-gate-validators.d.ts +96 -0
- package/dist/validation/operation-gate-validators.d.ts.map +1 -0
- package/dist/validation/operation-verification-gates.d.ts +274 -0
- package/dist/validation/operation-verification-gates.d.ts.map +1 -0
- package/dist/validation/param-utils.d.ts +121 -0
- package/dist/validation/param-utils.d.ts.map +1 -0
- package/dist/validation/protocol-common.d.ts +85 -0
- package/dist/validation/protocol-common.d.ts.map +1 -0
- package/dist/validation/protocols/consensus.d.ts +28 -0
- package/dist/validation/protocols/consensus.d.ts.map +1 -0
- package/dist/validation/protocols/contribution.d.ts +26 -0
- package/dist/validation/protocols/contribution.d.ts.map +1 -0
- package/dist/validation/protocols/decomposition.d.ts +28 -0
- package/dist/validation/protocols/decomposition.d.ts.map +1 -0
- package/dist/validation/protocols/implementation.d.ts +26 -0
- package/dist/validation/protocols/implementation.d.ts.map +1 -0
- package/dist/validation/protocols/release-protocol.d.ts +27 -0
- package/dist/validation/protocols/release-protocol.d.ts.map +1 -0
- package/dist/validation/protocols/research.d.ts +26 -0
- package/dist/validation/protocols/research.d.ts.map +1 -0
- package/dist/validation/protocols/specification.d.ts +28 -0
- package/dist/validation/protocols/specification.d.ts.map +1 -0
- package/dist/validation/protocols/testing-protocol.d.ts +27 -0
- package/dist/validation/protocols/testing-protocol.d.ts.map +1 -0
- package/dist/validation/protocols/validation-protocol.d.ts +27 -0
- package/dist/validation/protocols/validation-protocol.d.ts.map +1 -0
- package/dist/validation/schema-integrity.d.ts +42 -0
- package/dist/validation/schema-integrity.d.ts.map +1 -0
- package/dist/validation/schema-validator.d.ts +52 -0
- package/dist/validation/schema-validator.d.ts.map +1 -0
- package/dist/validation/validate-ops.d.ts +247 -0
- package/dist/validation/validate-ops.d.ts.map +1 -0
- package/dist/validation/validation-rules.d.ts +85 -0
- package/dist/validation/validation-rules.d.ts.map +1 -0
- package/dist/validation/verification.d.ts +153 -0
- package/dist/validation/verification.d.ts.map +1 -0
- package/migrations/drizzle-tasks/20260320013731_wave0-schema-hardening/migration.sql +84 -0
- package/migrations/drizzle-tasks/20260320013731_wave0-schema-hardening/snapshot.json +4060 -0
- package/migrations/drizzle-tasks/20260320020000_agent-dimension/migration.sql +35 -0
- package/migrations/drizzle-tasks/20260320020000_agent-dimension/snapshot.json +4312 -0
- package/package.json +2 -2
- package/src/admin/export-tasks.ts +2 -5
- package/src/agents/__tests__/capacity.test.ts +219 -0
- package/src/agents/__tests__/registry.test.ts +457 -0
- package/src/agents/__tests__/retry.test.ts +289 -0
- package/src/agents/agent-schema.ts +107 -0
- package/src/agents/capacity.ts +151 -0
- package/src/agents/index.ts +68 -0
- package/src/agents/registry.ts +449 -0
- package/src/agents/retry.ts +255 -0
- package/src/hooks/index.ts +20 -1
- package/src/hooks/payload-schemas.ts +199 -0
- package/src/index.ts +69 -0
- package/src/inject/index.ts +14 -14
- package/src/intelligence/__tests__/impact.test.ts +453 -0
- package/src/intelligence/__tests__/patterns.test.ts +450 -0
- package/src/intelligence/__tests__/prediction.test.ts +418 -0
- package/src/intelligence/impact.ts +638 -0
- package/src/intelligence/index.ts +47 -0
- package/src/intelligence/patterns.ts +621 -0
- package/src/intelligence/prediction.ts +621 -0
- package/src/intelligence/types.ts +273 -0
- package/src/internal.ts +82 -1
- package/src/issue/template-parser.ts +65 -4
- package/src/lifecycle/pipeline.ts +14 -7
- package/src/lifecycle/state-machine.ts +6 -2
- package/src/memory/brain-lifecycle.ts +5 -11
- package/src/memory/brain-retrieval.ts +44 -38
- package/src/memory/brain-row-types.ts +43 -6
- package/src/memory/brain-search.ts +53 -32
- package/src/memory/brain-similarity.ts +9 -8
- package/src/memory/claude-mem-migration.ts +4 -3
- package/src/nexus/__tests__/nexus-e2e.test.ts +1481 -0
- package/src/nexus/discover.ts +1 -0
- package/src/orchestration/bootstrap.ts +11 -17
- package/src/orchestration/skill-ops.ts +52 -32
- package/src/otel/index.ts +48 -4
- package/src/sessions/__tests__/briefing.test.ts +31 -2
- package/src/sessions/briefing.ts +27 -42
- package/src/sessions/handoff.ts +52 -86
- package/src/sessions/index.ts +5 -1
- package/src/sessions/types.ts +9 -43
- package/src/signaldock/signaldock-transport.ts +5 -2
- package/src/skills/injection/subagent.ts +10 -16
- package/src/skills/manifests/contribution.ts +5 -13
- package/src/skills/orchestrator/__tests__/spawn-tier.test.ts +44 -30
- package/src/skills/orchestrator/spawn.ts +18 -31
- package/src/skills/orchestrator/startup.ts +78 -65
- package/src/skills/orchestrator/validator.ts +26 -31
- package/src/skills/precedence-types.ts +24 -1
- package/src/skills/types.ts +72 -5
- package/src/store/__tests__/test-db-helper.d.ts +4 -4
- package/src/store/__tests__/test-db-helper.js +5 -16
- package/src/store/__tests__/test-db-helper.ts +5 -18
- package/src/store/chain-schema.ts +1 -1
- package/src/store/export.ts +22 -12
- package/src/store/tasks-schema.ts +65 -8
- package/src/store/typed-query.ts +17 -0
- package/src/store/validation-schemas.ts +347 -23
- package/src/system/inject-generate.ts +9 -23
- package/src/validation/doctor/checks.ts +24 -2
- package/src/validation/engine.ts +11 -11
- package/src/validation/index.ts +131 -3
- package/src/validation/protocol-common.ts +54 -3
- package/src/tasks/reparent.ts +0 -134
package/src/sessions/types.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* @epic T4654
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import type { SessionNote, TaskWorkState } from '@cleocode/contracts';
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* Session object (engine-compatible).
|
|
10
12
|
*/
|
|
@@ -67,45 +69,22 @@ export interface SessionRecord {
|
|
|
67
69
|
|
|
68
70
|
/**
|
|
69
71
|
* Task work state from the task store.
|
|
72
|
+
*
|
|
73
|
+
* Extends the strict contracts {@link TaskWorkState} with required-null
|
|
74
|
+
* fields for session engine compatibility. The engine layer always expects
|
|
75
|
+
* these fields to be present (even if null), whereas the contracts type
|
|
76
|
+
* marks them as optional.
|
|
70
77
|
*/
|
|
71
|
-
export interface TaskWorkStateExt {
|
|
78
|
+
export interface TaskWorkStateExt extends TaskWorkState {
|
|
72
79
|
currentTask: string | null;
|
|
73
80
|
currentPhase: string | null;
|
|
74
81
|
blockedUntil: string | null;
|
|
75
82
|
sessionNote: string | null;
|
|
76
|
-
sessionNotes:
|
|
83
|
+
sessionNotes: SessionNote[];
|
|
77
84
|
nextAction: string | null;
|
|
78
85
|
primarySession: string | null;
|
|
79
86
|
}
|
|
80
87
|
|
|
81
|
-
/**
|
|
82
|
-
* Task file structure (subset for session operations).
|
|
83
|
-
*/
|
|
84
|
-
export interface TaskFileExt {
|
|
85
|
-
focus?:
|
|
86
|
-
| TaskWorkStateExt
|
|
87
|
-
| { currentTask?: string | null; currentPhase?: string | null; [key: string]: unknown };
|
|
88
|
-
_meta?: {
|
|
89
|
-
schemaVersion: string;
|
|
90
|
-
checksum?: string;
|
|
91
|
-
configVersion?: string;
|
|
92
|
-
lastSessionId?: string | null;
|
|
93
|
-
activeSessionCount?: number;
|
|
94
|
-
sessionsFile?: string | null;
|
|
95
|
-
generation?: number;
|
|
96
|
-
[key: string]: unknown;
|
|
97
|
-
};
|
|
98
|
-
tasks?: Array<{
|
|
99
|
-
id: string;
|
|
100
|
-
status: string;
|
|
101
|
-
parentId?: string;
|
|
102
|
-
completedAt?: string;
|
|
103
|
-
[key: string]: unknown;
|
|
104
|
-
}>;
|
|
105
|
-
lastUpdated?: string;
|
|
106
|
-
[key: string]: unknown;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
88
|
/**
|
|
110
89
|
* Decision record stored in decisions.jsonl.
|
|
111
90
|
*/
|
|
@@ -131,16 +110,3 @@ export interface AssumptionRecord {
|
|
|
131
110
|
validatedAt: string | null;
|
|
132
111
|
timestamp: string;
|
|
133
112
|
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Convert a TaskFile (from contracts) to the looser TaskFileExt shape.
|
|
137
|
-
* Accepts any object with at least the basic TaskFileExt structure.
|
|
138
|
-
* The runtime object is the same reference — this only changes the TS type.
|
|
139
|
-
*/
|
|
140
|
-
export function toTaskFileExt<
|
|
141
|
-
T extends { _meta?: object; tasks?: unknown[]; focus?: object; lastUpdated?: string },
|
|
142
|
-
>(taskFile: T): TaskFileExt {
|
|
143
|
-
// The incoming object structurally satisfies TaskFileExt at runtime;
|
|
144
|
-
// this conversion bridges the strict contracts type to the loose session type.
|
|
145
|
-
return taskFile as TaskFileExt;
|
|
146
|
-
}
|
|
@@ -104,8 +104,11 @@ export class SignalDockTransport implements AgentTransport {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
async poll(agentId: string,
|
|
108
|
-
const
|
|
107
|
+
async poll(agentId: string, since?: string): Promise<Message[]> {
|
|
108
|
+
const path = since
|
|
109
|
+
? `/messages/poll/new?since=${encodeURIComponent(since)}`
|
|
110
|
+
: '/messages/poll/new';
|
|
111
|
+
const messages = await this.request<Message[]>('GET', path, undefined, agentId);
|
|
109
112
|
return messages;
|
|
110
113
|
}
|
|
111
114
|
|
|
@@ -19,10 +19,9 @@
|
|
|
19
19
|
|
|
20
20
|
import { existsSync, readFileSync } from 'node:fs';
|
|
21
21
|
import { join } from 'node:path';
|
|
22
|
-
import type { Task } from '@cleocode/contracts';
|
|
23
22
|
import { ExitCode } from '@cleocode/contracts';
|
|
24
23
|
import { CleoError } from '../../errors.js';
|
|
25
|
-
import { getProjectRoot
|
|
24
|
+
import { getProjectRoot } from '../../paths.js';
|
|
26
25
|
import { findSkill } from '../discovery.js';
|
|
27
26
|
import { injectTokens, type TokenValues } from './token.js';
|
|
28
27
|
|
|
@@ -55,15 +54,10 @@ export function loadProtocolBase(cwd?: string): string | null {
|
|
|
55
54
|
* Build task context block for injection into a subagent prompt.
|
|
56
55
|
* @task T4521
|
|
57
56
|
*/
|
|
58
|
-
export function buildTaskContext(taskId: string, cwd?: string): string {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const data = JSON.parse(readFileSync(taskPath, 'utf-8'));
|
|
65
|
-
const tasks: Task[] = data.tasks ?? [];
|
|
66
|
-
const task = tasks.find((t) => t.id === taskId);
|
|
57
|
+
export async function buildTaskContext(taskId: string, cwd?: string): Promise<string> {
|
|
58
|
+
const { getAccessor } = await import('../../store/data-accessor.js');
|
|
59
|
+
const acc = await getAccessor(cwd);
|
|
60
|
+
const task = await acc.loadSingleTask(taskId);
|
|
67
61
|
|
|
68
62
|
if (!task) {
|
|
69
63
|
return `## Task Context\n\n**Task**: ${taskId}\n**Status**: not found\n`;
|
|
@@ -165,15 +159,15 @@ export function filterProtocolByTier(content: string, tier: 0 | 1 | 2): string {
|
|
|
165
159
|
* Composes: skill content + protocol base + task context.
|
|
166
160
|
* @task T4521
|
|
167
161
|
*/
|
|
168
|
-
export function injectProtocol(
|
|
162
|
+
export async function injectProtocol(
|
|
169
163
|
skillContent: string,
|
|
170
164
|
taskId: string,
|
|
171
165
|
tokenValues: TokenValues,
|
|
172
166
|
cwd?: string,
|
|
173
167
|
tier?: 0 | 1 | 2,
|
|
174
|
-
): string {
|
|
168
|
+
): Promise<string> {
|
|
175
169
|
const protocolBase = loadProtocolBase(cwd);
|
|
176
|
-
const taskContext = buildTaskContext(taskId, cwd);
|
|
170
|
+
const taskContext = await buildTaskContext(taskId, cwd);
|
|
177
171
|
|
|
178
172
|
// Inject tokens into skill content
|
|
179
173
|
const resolvedSkill = injectTokens(skillContent, tokenValues);
|
|
@@ -202,13 +196,13 @@ export function injectProtocol(
|
|
|
202
196
|
* High-level function that loads the skill, injects protocol, and returns the prompt.
|
|
203
197
|
* @task T4521
|
|
204
198
|
*/
|
|
205
|
-
export function orchestratorSpawnSkill(
|
|
199
|
+
export async function orchestratorSpawnSkill(
|
|
206
200
|
taskId: string,
|
|
207
201
|
skillName: string,
|
|
208
202
|
tokenValues: TokenValues,
|
|
209
203
|
cwd?: string,
|
|
210
204
|
tier?: 0 | 1 | 2,
|
|
211
|
-
): string {
|
|
205
|
+
): Promise<string> {
|
|
212
206
|
// Find the skill
|
|
213
207
|
const skill = findSkill(skillName, cwd);
|
|
214
208
|
if (!skill || !skill.content) {
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import { randomBytes } from 'node:crypto';
|
|
14
14
|
import { existsSync, readFileSync } from 'node:fs';
|
|
15
|
-
import
|
|
16
|
-
import { getTaskPath } from '../../paths.js';
|
|
15
|
+
import { getAccessor } from '../../store/data-accessor.js';
|
|
17
16
|
import type { ManifestEntry } from '../types.js';
|
|
18
17
|
|
|
19
18
|
// ============================================================================
|
|
@@ -65,20 +64,13 @@ export function generateContributionId(taskId: string): string {
|
|
|
65
64
|
* Validate that a task is suitable for contribution protocol.
|
|
66
65
|
* @task T4520
|
|
67
66
|
*/
|
|
68
|
-
export function validateContributionTask(
|
|
67
|
+
export async function validateContributionTask(
|
|
69
68
|
taskId: string,
|
|
70
69
|
cwd?: string,
|
|
71
|
-
): { valid: boolean; issues: string[] } {
|
|
70
|
+
): Promise<{ valid: boolean; issues: string[] }> {
|
|
72
71
|
const issues: string[] = [];
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
if (!existsSync(taskPath)) {
|
|
76
|
-
return { valid: false, issues: ['Todo file not found'] };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const data = JSON.parse(readFileSync(taskPath, 'utf-8'));
|
|
80
|
-
const tasks: Task[] = data.tasks ?? [];
|
|
81
|
-
const task = tasks.find((t) => t.id === taskId);
|
|
72
|
+
const acc = await getAccessor(cwd);
|
|
73
|
+
const task = await acc.loadSingleTask(taskId);
|
|
82
74
|
|
|
83
75
|
if (!task) {
|
|
84
76
|
return { valid: false, issues: [`Task ${taskId} not found`] };
|
|
@@ -29,6 +29,22 @@ vi.mock('../../discovery.js', () => ({
|
|
|
29
29
|
mapSkillName: vi.fn(() => ({ canonical: 'task-executor', mapped: true })),
|
|
30
30
|
}));
|
|
31
31
|
|
|
32
|
+
vi.mock('../../../store/data-accessor.js', () => ({
|
|
33
|
+
getAccessor: vi.fn().mockResolvedValue({
|
|
34
|
+
loadSingleTask: vi.fn().mockResolvedValue({
|
|
35
|
+
id: 'T100',
|
|
36
|
+
title: 'Test task',
|
|
37
|
+
status: 'active',
|
|
38
|
+
description: 'A test',
|
|
39
|
+
priority: 'medium',
|
|
40
|
+
labels: [],
|
|
41
|
+
depends: [],
|
|
42
|
+
}),
|
|
43
|
+
loadTasks: vi.fn().mockResolvedValue([]),
|
|
44
|
+
queryTasks: vi.fn().mockResolvedValue({ tasks: [], total: 0 }),
|
|
45
|
+
}),
|
|
46
|
+
}));
|
|
47
|
+
|
|
32
48
|
import { existsSync, readFileSync } from 'node:fs';
|
|
33
49
|
import { findSkill } from '../../discovery.js';
|
|
34
50
|
import { injectProtocol, orchestratorSpawnSkill } from '../../injection/subagent.js';
|
|
@@ -67,7 +83,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
67
83
|
} as any);
|
|
68
84
|
});
|
|
69
85
|
|
|
70
|
-
it('passes tier 0 through — output excludes standard and orchestrator', () => {
|
|
86
|
+
it('passes tier 0 through — output excludes standard and orchestrator', async () => {
|
|
71
87
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
72
88
|
const p = String(path);
|
|
73
89
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
@@ -75,7 +91,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
75
91
|
return '';
|
|
76
92
|
});
|
|
77
93
|
|
|
78
|
-
const result = orchestratorSpawnSkill(
|
|
94
|
+
const result = await orchestratorSpawnSkill(
|
|
79
95
|
'T100',
|
|
80
96
|
'test-skill',
|
|
81
97
|
{ TASK_ID: 'T100' },
|
|
@@ -89,7 +105,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
89
105
|
expect(result).toContain('Test Skill');
|
|
90
106
|
});
|
|
91
107
|
|
|
92
|
-
it('passes tier 1 through — output includes minimal + standard', () => {
|
|
108
|
+
it('passes tier 1 through — output includes minimal + standard', async () => {
|
|
93
109
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
94
110
|
const p = String(path);
|
|
95
111
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
@@ -97,7 +113,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
97
113
|
return '';
|
|
98
114
|
});
|
|
99
115
|
|
|
100
|
-
const result = orchestratorSpawnSkill(
|
|
116
|
+
const result = await orchestratorSpawnSkill(
|
|
101
117
|
'T100',
|
|
102
118
|
'test-skill',
|
|
103
119
|
{ TASK_ID: 'T100' },
|
|
@@ -110,7 +126,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
110
126
|
expect(result).not.toContain('Orchestrator Section');
|
|
111
127
|
});
|
|
112
128
|
|
|
113
|
-
it('passes tier 2 through — output includes all tiers', () => {
|
|
129
|
+
it('passes tier 2 through — output includes all tiers', async () => {
|
|
114
130
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
115
131
|
const p = String(path);
|
|
116
132
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
@@ -118,7 +134,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
118
134
|
return '';
|
|
119
135
|
});
|
|
120
136
|
|
|
121
|
-
const result = orchestratorSpawnSkill(
|
|
137
|
+
const result = await orchestratorSpawnSkill(
|
|
122
138
|
'T100',
|
|
123
139
|
'test-skill',
|
|
124
140
|
{ TASK_ID: 'T100' },
|
|
@@ -131,7 +147,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
131
147
|
expect(result).toContain('Orchestrator Section');
|
|
132
148
|
});
|
|
133
149
|
|
|
134
|
-
it('omitting tier includes full protocol (backward compat)', () => {
|
|
150
|
+
it('omitting tier includes full protocol (backward compat)', async () => {
|
|
135
151
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
136
152
|
const p = String(path);
|
|
137
153
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
@@ -140,7 +156,7 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
140
156
|
});
|
|
141
157
|
|
|
142
158
|
// No tier parameter — should pass through unfiltered
|
|
143
|
-
const result = orchestratorSpawnSkill(
|
|
159
|
+
const result = await orchestratorSpawnSkill(
|
|
144
160
|
'T100',
|
|
145
161
|
'test-skill',
|
|
146
162
|
{ TASK_ID: 'T100' },
|
|
@@ -153,12 +169,12 @@ describe('orchestratorSpawnSkill tier passthrough', () => {
|
|
|
153
169
|
expect(result).toContain('TIER:orchestrator');
|
|
154
170
|
});
|
|
155
171
|
|
|
156
|
-
it('throws when skill not found', () => {
|
|
172
|
+
it('throws when skill not found', async () => {
|
|
157
173
|
vi.mocked(findSkill).mockReturnValue(null);
|
|
158
174
|
|
|
159
|
-
expect(
|
|
160
|
-
orchestratorSpawnSkill('T100', 'nonexistent', { TASK_ID: 'T100' }, '/mock/project', 0)
|
|
161
|
-
|
|
175
|
+
await expect(
|
|
176
|
+
orchestratorSpawnSkill('T100', 'nonexistent', { TASK_ID: 'T100' }, '/mock/project', 0),
|
|
177
|
+
).rejects.toThrow(/Skill not found/);
|
|
162
178
|
});
|
|
163
179
|
});
|
|
164
180
|
|
|
@@ -168,29 +184,27 @@ describe('injectProtocol tier parameter', () => {
|
|
|
168
184
|
vi.mocked(existsSync).mockReturnValue(true);
|
|
169
185
|
});
|
|
170
186
|
|
|
171
|
-
it('tier undefined leaves protocol unfiltered', () => {
|
|
187
|
+
it('tier undefined leaves protocol unfiltered', async () => {
|
|
172
188
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
173
189
|
const p = String(path);
|
|
174
190
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
175
|
-
if (p.includes('tasks.json')) return MOCK_TASKS_JSON;
|
|
176
191
|
return '';
|
|
177
192
|
});
|
|
178
193
|
|
|
179
|
-
const result = injectProtocol('# Skill', 'T100', {}, '/mock/project', undefined);
|
|
194
|
+
const result = await injectProtocol('# Skill', 'T100', {}, '/mock/project', undefined);
|
|
180
195
|
|
|
181
196
|
expect(result).toContain('TIER:minimal');
|
|
182
197
|
expect(result).toContain('TIER:orchestrator');
|
|
183
198
|
});
|
|
184
199
|
|
|
185
|
-
it('tier 0 filters to minimal only', () => {
|
|
200
|
+
it('tier 0 filters to minimal only', async () => {
|
|
186
201
|
vi.mocked(readFileSync).mockImplementation((path: unknown) => {
|
|
187
202
|
const p = String(path);
|
|
188
203
|
if (p.includes('subagent-protocol-base')) return TIERED_PROTOCOL;
|
|
189
|
-
if (p.includes('tasks.json')) return MOCK_TASKS_JSON;
|
|
190
204
|
return '';
|
|
191
205
|
});
|
|
192
206
|
|
|
193
|
-
const result = injectProtocol('# Skill', 'T100', {}, '/mock/project', 0);
|
|
207
|
+
const result = await injectProtocol('# Skill', 'T100', {}, '/mock/project', 0);
|
|
194
208
|
|
|
195
209
|
expect(result).toContain('Minimal Section');
|
|
196
210
|
expect(result).not.toContain('Standard Section');
|
|
@@ -218,43 +232,43 @@ describe('buildPrompt tier passthrough', () => {
|
|
|
218
232
|
} as any);
|
|
219
233
|
});
|
|
220
234
|
|
|
221
|
-
it('buildPrompt with tier 0 filters protocol to minimal only', () => {
|
|
222
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
235
|
+
it('buildPrompt with tier 0 filters protocol to minimal only', async () => {
|
|
236
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
223
237
|
expect(result.prompt).toContain('Minimal Section');
|
|
224
238
|
expect(result.prompt).not.toContain('Standard Section');
|
|
225
239
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
226
240
|
expect(result.prompt).toContain('SUBAGENT PROTOCOL');
|
|
227
241
|
});
|
|
228
242
|
|
|
229
|
-
it('buildPrompt with tier 1 includes minimal + standard', () => {
|
|
230
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 1);
|
|
243
|
+
it('buildPrompt with tier 1 includes minimal + standard', async () => {
|
|
244
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 1);
|
|
231
245
|
expect(result.prompt).toContain('Minimal Section');
|
|
232
246
|
expect(result.prompt).toContain('Standard Section');
|
|
233
247
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
234
248
|
});
|
|
235
249
|
|
|
236
|
-
it('buildPrompt without tier includes full protocol', () => {
|
|
237
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project');
|
|
250
|
+
it('buildPrompt without tier includes full protocol', async () => {
|
|
251
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project');
|
|
238
252
|
// No tier = unfiltered, so tier markers present
|
|
239
253
|
expect(result.prompt).toContain('TIER:minimal');
|
|
240
254
|
expect(result.prompt).toContain('TIER:orchestrator');
|
|
241
255
|
});
|
|
242
256
|
|
|
243
|
-
it('buildPrompt injects task context', () => {
|
|
244
|
-
const result = buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
257
|
+
it('buildPrompt injects task context', async () => {
|
|
258
|
+
const result = await buildPrompt('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
245
259
|
expect(result.prompt).toContain('Task Context');
|
|
246
260
|
expect(result.prompt).toContain('T100');
|
|
247
261
|
});
|
|
248
262
|
|
|
249
|
-
it('spawn passes tier through', () => {
|
|
250
|
-
const result = spawn('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
263
|
+
it('spawn passes tier through', async () => {
|
|
264
|
+
const result = await spawn('T100', 'TASK-EXECUTOR', '/mock/project', 0);
|
|
251
265
|
expect(result.prompt).toContain('Minimal Section');
|
|
252
266
|
expect(result.prompt).not.toContain('Orchestrator Section');
|
|
253
267
|
expect(result.spawnTimestamp).toBeDefined();
|
|
254
268
|
});
|
|
255
269
|
|
|
256
|
-
it('spawnBatch passes tier through', () => {
|
|
257
|
-
const result = spawnBatch(['T100'], 'TASK-EXECUTOR', '/mock/project', 0);
|
|
270
|
+
it('spawnBatch passes tier through', async () => {
|
|
271
|
+
const result = await spawnBatch(['T100'], 'TASK-EXECUTOR', '/mock/project', 0);
|
|
258
272
|
expect(result.succeeded).toBe(1);
|
|
259
273
|
expect(result.spawns[0].result!.prompt).toContain('Minimal Section');
|
|
260
274
|
expect(result.spawns[0].result!.prompt).not.toContain('Orchestrator Section');
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* @task T4519
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
16
15
|
import type { Task } from '@cleocode/contracts';
|
|
17
16
|
import { ExitCode } from '@cleocode/contracts';
|
|
18
17
|
import { CleoError } from '../../errors.js';
|
|
19
|
-
import { getAgentOutputsDir
|
|
18
|
+
import { getAgentOutputsDir } from '../../paths.js';
|
|
19
|
+
import { getAccessor } from '../../store/data-accessor.js';
|
|
20
20
|
import { findSkill, mapSkillName } from '../discovery.js';
|
|
21
21
|
import { injectProtocol } from '../injection/subagent.js';
|
|
22
22
|
import type { TokenValues } from '../injection/token.js';
|
|
@@ -30,22 +30,14 @@ import type { SpawnPromptResult } from '../types.js';
|
|
|
30
30
|
* Build a fully-resolved prompt for spawning a subagent.
|
|
31
31
|
* @task T4519
|
|
32
32
|
*/
|
|
33
|
-
export function buildPrompt(
|
|
33
|
+
export async function buildPrompt(
|
|
34
34
|
taskId: string,
|
|
35
35
|
templateName: string = 'TASK-EXECUTOR',
|
|
36
36
|
cwd?: string,
|
|
37
37
|
tier?: 0 | 1 | 2,
|
|
38
|
-
): SpawnPromptResult {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
if (!existsSync(taskPath)) {
|
|
42
|
-
throw new CleoError(ExitCode.NOT_FOUND, 'Todo file not found. Run: cleo init');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Load task
|
|
46
|
-
const data = JSON.parse(readFileSync(taskPath, 'utf-8'));
|
|
47
|
-
const tasks: Task[] = data.tasks ?? [];
|
|
48
|
-
const task = tasks.find((t) => t.id === taskId);
|
|
38
|
+
): Promise<SpawnPromptResult> {
|
|
39
|
+
const acc = await getAccessor(cwd);
|
|
40
|
+
const task = await acc.loadSingleTask(taskId);
|
|
49
41
|
|
|
50
42
|
if (!task) {
|
|
51
43
|
throw new CleoError(ExitCode.NOT_FOUND, `Task ${taskId} not found`);
|
|
@@ -121,7 +113,7 @@ export function buildPrompt(
|
|
|
121
113
|
}
|
|
122
114
|
|
|
123
115
|
// Inject tokens and protocol into template
|
|
124
|
-
const promptContent = injectProtocol(skill.content, taskId, tokenValues, cwd, tier);
|
|
116
|
+
const promptContent = await injectProtocol(skill.content, taskId, tokenValues, cwd, tier);
|
|
125
117
|
|
|
126
118
|
return {
|
|
127
119
|
taskId,
|
|
@@ -138,13 +130,13 @@ export function buildPrompt(
|
|
|
138
130
|
* Generate full spawn command with metadata.
|
|
139
131
|
* @task T4519
|
|
140
132
|
*/
|
|
141
|
-
export function spawn(
|
|
133
|
+
export async function spawn(
|
|
142
134
|
taskId: string,
|
|
143
135
|
templateName: string = 'TASK-EXECUTOR',
|
|
144
136
|
cwd?: string,
|
|
145
137
|
tier?: 0 | 1 | 2,
|
|
146
|
-
): SpawnPromptResult & { spawnTimestamp: string } {
|
|
147
|
-
const result = buildPrompt(taskId, templateName, cwd, tier);
|
|
138
|
+
): Promise<SpawnPromptResult & { spawnTimestamp: string }> {
|
|
139
|
+
const result = await buildPrompt(taskId, templateName, cwd, tier);
|
|
148
140
|
|
|
149
141
|
return {
|
|
150
142
|
...result,
|
|
@@ -156,25 +148,20 @@ export function spawn(
|
|
|
156
148
|
* Check if tasks can be spawned in parallel (no inter-dependencies).
|
|
157
149
|
* @task T4519
|
|
158
150
|
*/
|
|
159
|
-
export function canParallelize(
|
|
151
|
+
export async function canParallelize(
|
|
160
152
|
taskIds: string[],
|
|
161
153
|
cwd?: string,
|
|
162
|
-
): {
|
|
154
|
+
): Promise<{
|
|
163
155
|
canParallelize: boolean;
|
|
164
156
|
conflicts: Array<Pick<Task, 'id'> & { dependsOn: string[] }>;
|
|
165
157
|
safeToSpawn: string[];
|
|
166
|
-
} {
|
|
158
|
+
}> {
|
|
167
159
|
if (taskIds.length === 0) {
|
|
168
160
|
return { canParallelize: true, conflicts: [], safeToSpawn: [] };
|
|
169
161
|
}
|
|
170
162
|
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
return { canParallelize: true, conflicts: [], safeToSpawn: taskIds };
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const data = JSON.parse(readFileSync(taskPath, 'utf-8'));
|
|
177
|
-
const tasks: Task[] = data.tasks ?? [];
|
|
163
|
+
const acc = await getAccessor(cwd);
|
|
164
|
+
const tasks = await acc.loadTasks(taskIds);
|
|
178
165
|
const taskIdSet = new Set(taskIds);
|
|
179
166
|
|
|
180
167
|
const conflicts: Array<Pick<Task, 'id'> & { dependsOn: string[] }> = [];
|
|
@@ -229,17 +216,17 @@ export interface BatchSpawnResult {
|
|
|
229
216
|
* @task T4712
|
|
230
217
|
* @epic T4663
|
|
231
218
|
*/
|
|
232
|
-
export function spawnBatch(
|
|
219
|
+
export async function spawnBatch(
|
|
233
220
|
taskIds: string[],
|
|
234
221
|
templateName?: string,
|
|
235
222
|
cwd?: string,
|
|
236
223
|
tier?: 0 | 1 | 2,
|
|
237
|
-
): BatchSpawnResult {
|
|
224
|
+
): Promise<BatchSpawnResult> {
|
|
238
225
|
const spawns: BatchSpawnEntry[] = [];
|
|
239
226
|
|
|
240
227
|
for (const taskId of taskIds) {
|
|
241
228
|
try {
|
|
242
|
-
const result = spawn(taskId, templateName, cwd, tier);
|
|
229
|
+
const result = await spawn(taskId, templateName, cwd, tier);
|
|
243
230
|
spawns.push({ taskId, success: true, result });
|
|
244
231
|
} catch (err: unknown) {
|
|
245
232
|
const message = err instanceof Error ? err.message : String(err);
|