@cleocode/core 2026.4.5 → 2026.4.7
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/discovery.d.ts +69 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1643 -2349
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts +51 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/internal.d.ts +9 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/lifecycle/default-chain.d.ts +8 -2
- package/dist/lifecycle/default-chain.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/stage-guidance.d.ts +140 -0
- package/dist/lifecycle/stage-guidance.d.ts.map +1 -0
- package/dist/orchestration/protocol-validators.d.ts +122 -3
- package/dist/orchestration/protocol-validators.d.ts.map +1 -1
- package/dist/paths.d.ts +91 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/scaffold.d.ts +31 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/skills/dispatch.d.ts +1 -1
- package/dist/skills/skill-paths.d.ts +9 -6
- package/dist/skills/skill-paths.d.ts.map +1 -1
- package/dist/validation/protocols/_shared.d.ts +40 -0
- package/dist/validation/protocols/_shared.d.ts.map +1 -0
- package/dist/validation/protocols/architecture-decision.d.ts +23 -0
- package/dist/validation/protocols/architecture-decision.d.ts.map +1 -0
- package/dist/validation/protocols/artifact-publish.d.ts +22 -0
- package/dist/validation/protocols/artifact-publish.d.ts.map +1 -0
- package/dist/validation/protocols/consensus.d.ts +11 -17
- package/dist/validation/protocols/consensus.d.ts.map +1 -1
- package/dist/validation/protocols/contribution.d.ts +12 -17
- package/dist/validation/protocols/contribution.d.ts.map +1 -1
- package/dist/validation/protocols/decomposition.d.ts +18 -21
- package/dist/validation/protocols/decomposition.d.ts.map +1 -1
- package/dist/validation/protocols/implementation.d.ts +9 -17
- package/dist/validation/protocols/implementation.d.ts.map +1 -1
- package/dist/validation/protocols/provenance.d.ts +23 -0
- package/dist/validation/protocols/provenance.d.ts.map +1 -0
- package/dist/validation/protocols/release.d.ts +25 -0
- package/dist/validation/protocols/release.d.ts.map +1 -0
- package/dist/validation/protocols/research.d.ts +9 -17
- package/dist/validation/protocols/research.d.ts.map +1 -1
- package/dist/validation/protocols/specification.d.ts +7 -17
- package/dist/validation/protocols/specification.d.ts.map +1 -1
- package/dist/validation/protocols/testing.d.ts +22 -0
- package/dist/validation/protocols/testing.d.ts.map +1 -0
- package/dist/validation/protocols/validation.d.ts +22 -0
- package/dist/validation/protocols/validation.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/discovery.ts +235 -0
- package/src/index.ts +16 -0
- package/src/init.ts +196 -0
- package/src/internal.ts +31 -1
- package/src/lifecycle/default-chain.ts +11 -2
- package/src/lifecycle/index.ts +10 -0
- package/src/lifecycle/stage-guidance.ts +282 -0
- package/src/orchestration/__tests__/protocol-validators.test.ts +259 -7
- package/src/orchestration/protocol-validators.ts +419 -4
- package/src/paths.ts +110 -0
- package/src/scaffold.ts +240 -4
- package/src/skills/dispatch.ts +6 -6
- package/src/skills/skill-paths.ts +27 -23
- package/src/validation/protocols/_shared.ts +88 -0
- package/src/validation/protocols/architecture-decision.ts +52 -0
- package/src/validation/protocols/artifact-publish.ts +49 -0
- package/src/validation/protocols/consensus.ts +44 -74
- package/src/validation/protocols/contribution.ts +28 -65
- package/src/validation/protocols/decomposition.ts +37 -64
- package/src/validation/protocols/implementation.ts +25 -65
- package/src/validation/protocols/protocols-markdown/architecture-decision.md +303 -0
- package/src/validation/protocols/protocols-markdown/artifact-publish.md +600 -0
- package/src/validation/protocols/protocols-markdown/consensus.md +322 -0
- package/src/validation/protocols/protocols-markdown/contribution.md +388 -0
- package/src/validation/protocols/protocols-markdown/decomposition.md +421 -0
- package/src/validation/protocols/protocols-markdown/implementation.md +357 -0
- package/src/validation/protocols/protocols-markdown/provenance.md +613 -0
- package/src/validation/protocols/protocols-markdown/release.md +783 -0
- package/src/validation/protocols/protocols-markdown/research.md +261 -0
- package/src/validation/protocols/protocols-markdown/specification.md +300 -0
- package/src/validation/protocols/protocols-markdown/testing.md +287 -0
- package/src/validation/protocols/protocols-markdown/validation.md +242 -0
- package/src/validation/protocols/provenance.ts +50 -0
- package/src/validation/protocols/release.ts +44 -0
- package/src/validation/protocols/research.ts +25 -87
- package/src/validation/protocols/specification.ts +27 -89
- package/src/validation/protocols/testing.ts +46 -0
- package/src/validation/protocols/validation.ts +46 -0
- package/dist/cant/approval.d.ts +0 -110
- package/dist/cant/approval.d.ts.map +0 -1
- package/dist/cant/context-builder.d.ts +0 -79
- package/dist/cant/context-builder.d.ts.map +0 -1
- package/dist/cant/discretion.d.ts +0 -95
- package/dist/cant/discretion.d.ts.map +0 -1
- package/dist/cant/index.d.ts +0 -25
- package/dist/cant/index.d.ts.map +0 -1
- package/dist/cant/parallel-runner.d.ts +0 -38
- package/dist/cant/parallel-runner.d.ts.map +0 -1
- package/dist/cant/types.d.ts +0 -127
- package/dist/cant/types.d.ts.map +0 -1
- package/dist/cant/workflow-executor.d.ts +0 -105
- package/dist/cant/workflow-executor.d.ts.map +0 -1
- package/dist/validation/protocols/release-protocol.d.ts +0 -27
- package/dist/validation/protocols/release-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/testing-protocol.d.ts +0 -27
- package/dist/validation/protocols/testing-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/validation-protocol.d.ts +0 -27
- package/dist/validation/protocols/validation-protocol.d.ts.map +0 -1
- package/schemas/agent-configs.schema.json +0 -120
- package/schemas/agent-registry.schema.json +0 -132
- package/schemas/archive.schema.json +0 -450
- package/schemas/brain-decision.schema.json +0 -69
- package/schemas/brain-learning.schema.json +0 -57
- package/schemas/brain-pattern.schema.json +0 -72
- package/schemas/critical-path.schema.json +0 -246
- package/schemas/deps-cache.schema.json +0 -97
- package/schemas/doctor-output.schema.json +0 -283
- package/schemas/error.schema.json +0 -161
- package/schemas/global-config.schema.json +0 -219
- package/schemas/grade.schema.json +0 -49
- package/schemas/log.schema.json +0 -250
- package/schemas/metrics.schema.json +0 -328
- package/schemas/migrations.schema.json +0 -150
- package/schemas/nexus-registry.schema.json +0 -90
- package/schemas/operation-constitution.schema.json +0 -438
- package/schemas/output.schema.json +0 -164
- package/schemas/projects-registry.schema.json +0 -107
- package/schemas/protocol-frontmatter.schema.json +0 -72
- package/schemas/rcasd-consensus-report.schema.json +0 -10
- package/schemas/rcasd-evidence.schema.json +0 -42
- package/schemas/rcasd-gate-result.schema.json +0 -46
- package/schemas/rcasd-hitl-resolution.schema.json +0 -10
- package/schemas/rcasd-index.schema.json +0 -10
- package/schemas/rcasd-manifest.schema.json +0 -10
- package/schemas/rcasd-research-output.schema.json +0 -10
- package/schemas/rcasd-spec-frontmatter.schema.json +0 -10
- package/schemas/rcasd-stage-transition.schema.json +0 -38
- package/schemas/releases.schema.json +0 -267
- package/schemas/skills-manifest.schema.json +0 -91
- package/schemas/spec-index.schema.json +0 -196
- package/schemas/system-flow-atlas.schema.json +0 -125
- package/src/__tests__/audit-prune.test.d.ts.map +0 -1
- package/src/__tests__/audit-prune.test.js +0 -162
- package/src/__tests__/audit-prune.test.js.map +0 -1
- package/src/__tests__/caamp-skill-install.test.d.ts.map +0 -1
- package/src/__tests__/caamp-skill-install.test.js +0 -147
- package/src/__tests__/caamp-skill-install.test.js.map +0 -1
- package/src/__tests__/cli-parity.test.d.ts.map +0 -1
- package/src/__tests__/cli-parity.test.js +0 -209
- package/src/__tests__/cli-parity.test.js.map +0 -1
- package/src/__tests__/config.test.d.ts.map +0 -1
- package/src/__tests__/config.test.js +0 -144
- package/src/__tests__/config.test.js.map +0 -1
- package/src/__tests__/core-parity.test.d.ts.map +0 -1
- package/src/__tests__/core-parity.test.js +0 -645
- package/src/__tests__/core-parity.test.js.map +0 -1
- package/src/__tests__/error-catalog.test.d.ts.map +0 -1
- package/src/__tests__/error-catalog.test.js +0 -127
- package/src/__tests__/error-catalog.test.js.map +0 -1
- package/src/__tests__/golden-parity.test.d.ts.map +0 -1
- package/src/__tests__/golden-parity.test.js +0 -212
- package/src/__tests__/golden-parity.test.js.map +0 -1
- package/src/__tests__/hooks.test.d.ts.map +0 -1
- package/src/__tests__/hooks.test.js +0 -201
- package/src/__tests__/hooks.test.js.map +0 -1
- package/src/__tests__/human-output.test.d.ts.map +0 -1
- package/src/__tests__/human-output.test.js +0 -158
- package/src/__tests__/human-output.test.js.map +0 -1
- package/src/__tests__/index-api-compat.test.d.ts.map +0 -1
- package/src/__tests__/index-api-compat.test.js +0 -16
- package/src/__tests__/index-api-compat.test.js.map +0 -1
- package/src/__tests__/init-e2e.test.d.ts.map +0 -1
- package/src/__tests__/init-e2e.test.js +0 -221
- package/src/__tests__/init-e2e.test.js.map +0 -1
- package/src/__tests__/injection-chain.test.d.ts.map +0 -1
- package/src/__tests__/injection-chain.test.js +0 -234
- package/src/__tests__/injection-chain.test.js.map +0 -1
- package/src/__tests__/injection-mvi-tiers.test.d.ts.map +0 -1
- package/src/__tests__/injection-mvi-tiers.test.js +0 -152
- package/src/__tests__/injection-mvi-tiers.test.js.map +0 -1
- package/src/__tests__/injection-shared.test.d.ts.map +0 -1
- package/src/__tests__/injection-shared.test.js +0 -194
- package/src/__tests__/injection-shared.test.js.map +0 -1
- package/src/__tests__/lafs-conformance.test.d.ts.map +0 -1
- package/src/__tests__/lafs-conformance.test.js +0 -786
- package/src/__tests__/lafs-conformance.test.js.map +0 -1
- package/src/__tests__/logger.test.d.ts.map +0 -1
- package/src/__tests__/logger.test.js +0 -75
- package/src/__tests__/logger.test.js.map +0 -1
- package/src/__tests__/paths.test.d.ts.map +0 -1
- package/src/__tests__/paths.test.js +0 -327
- package/src/__tests__/paths.test.js.map +0 -1
- package/src/__tests__/project-info.test.d.ts.map +0 -1
- package/src/__tests__/project-info.test.js +0 -156
- package/src/__tests__/project-info.test.js.map +0 -1
- package/src/__tests__/rcsd-pipeline-e2e.test.d.ts.map +0 -1
- package/src/__tests__/rcsd-pipeline-e2e.test.js +0 -263
- package/src/__tests__/rcsd-pipeline-e2e.test.js.map +0 -1
- package/src/__tests__/remote.test.d.ts.map +0 -1
- package/src/__tests__/remote.test.js +0 -149
- package/src/__tests__/remote.test.js.map +0 -1
- package/src/__tests__/scaffold.test.d.ts.map +0 -1
- package/src/__tests__/scaffold.test.js +0 -474
- package/src/__tests__/scaffold.test.js.map +0 -1
- package/src/__tests__/schema-management.test.d.ts.map +0 -1
- package/src/__tests__/schema-management.test.js +0 -287
- package/src/__tests__/schema-management.test.js.map +0 -1
- package/src/__tests__/schema.test.d.ts.map +0 -1
- package/src/__tests__/schema.test.js +0 -51
- package/src/__tests__/schema.test.js.map +0 -1
- package/src/__tests__/sharing.test.d.ts.map +0 -1
- package/src/__tests__/sharing.test.js +0 -160
- package/src/__tests__/sharing.test.js.map +0 -1
- package/src/__tests__/snapshot.test.d.ts.map +0 -1
- package/src/__tests__/snapshot.test.js +0 -72
- package/src/__tests__/snapshot.test.js.map +0 -1
- package/src/__tests__/upgrade.test.d.ts.map +0 -1
- package/src/__tests__/upgrade.test.js +0 -321
- package/src/__tests__/upgrade.test.js.map +0 -1
- package/src/adapters/__tests__/discovery.test.d.ts.map +0 -1
- package/src/adapters/__tests__/discovery.test.js +0 -56
- package/src/adapters/__tests__/discovery.test.js.map +0 -1
- package/src/adapters/__tests__/manager.test.d.ts.map +0 -1
- package/src/adapters/__tests__/manager.test.js +0 -260
- package/src/adapters/__tests__/manager.test.js.map +0 -1
- package/src/agents/__tests__/agent-registry.test.d.ts.map +0 -1
- package/src/agents/__tests__/agent-registry.test.js +0 -262
- package/src/agents/__tests__/agent-registry.test.js.map +0 -1
- package/src/agents/__tests__/capacity.test.d.ts.map +0 -1
- package/src/agents/__tests__/capacity.test.js +0 -173
- package/src/agents/__tests__/capacity.test.js.map +0 -1
- package/src/agents/__tests__/execution-learning.test.d.ts.map +0 -1
- package/src/agents/__tests__/execution-learning.test.js +0 -533
- package/src/agents/__tests__/execution-learning.test.js.map +0 -1
- package/src/agents/__tests__/health-monitor.test.d.ts.map +0 -1
- package/src/agents/__tests__/health-monitor.test.js +0 -259
- package/src/agents/__tests__/health-monitor.test.js.map +0 -1
- package/src/agents/__tests__/registry.test.d.ts.map +0 -1
- package/src/agents/__tests__/registry.test.js +0 -373
- package/src/agents/__tests__/registry.test.js.map +0 -1
- package/src/agents/__tests__/retry.test.d.ts.map +0 -1
- package/src/agents/__tests__/retry.test.js +0 -225
- package/src/agents/__tests__/retry.test.js.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.d.ts.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.js +0 -77
- package/src/cant/__tests__/cant-agent-parse.test.js.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.ts +0 -94
- package/src/cant/approval.ts +0 -218
- package/src/cant/context-builder.ts +0 -135
- package/src/cant/discretion.ts +0 -149
- package/src/cant/index.ts +0 -58
- package/src/cant/parallel-runner.ts +0 -205
- package/src/cant/types.ts +0 -158
- package/src/cant/workflow-executor.ts +0 -618
- package/src/compliance/__tests__/sync.test.d.ts.map +0 -1
- package/src/compliance/__tests__/sync.test.js +0 -119
- package/src/compliance/__tests__/sync.test.js.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.d.ts.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.js +0 -178
- package/src/conduit/__tests__/dual-api-e2e.test.js.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.ts +0 -212
- package/src/conduit/__tests__/local-credential-flow.test.d.ts.map +0 -1
- package/src/conduit/__tests__/local-credential-flow.test.js +0 -185
- package/src/conduit/__tests__/local-credential-flow.test.js.map +0 -1
- package/src/conduit/__tests__/local-transport.test.d.ts.map +0 -1
- package/src/conduit/__tests__/local-transport.test.js +0 -404
- package/src/conduit/__tests__/local-transport.test.js.map +0 -1
- package/src/conduit/__tests__/sse-transport.test.d.ts.map +0 -1
- package/src/conduit/__tests__/sse-transport.test.js +0 -291
- package/src/conduit/__tests__/sse-transport.test.js.map +0 -1
- package/src/hooks/__tests__/provider-hooks.test.d.ts.map +0 -1
- package/src/hooks/__tests__/provider-hooks.test.js +0 -33
- package/src/hooks/__tests__/provider-hooks.test.js.map +0 -1
- package/src/hooks/__tests__/registry.test.d.ts.map +0 -1
- package/src/hooks/__tests__/registry.test.js +0 -37
- package/src/hooks/__tests__/registry.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/error-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/error-hooks.test.js +0 -90
- package/src/hooks/handlers/__tests__/error-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/file-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/file-hooks.test.js +0 -128
- package/src/hooks/handlers/__tests__/file-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +0 -501
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/session-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/session-hooks.test.js +0 -54
- package/src/hooks/handlers/__tests__/session-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/task-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/task-hooks.test.js +0 -77
- package/src/hooks/handlers/__tests__/task-hooks.test.js.map +0 -1
- package/src/intelligence/__tests__/adaptive-validation.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/adaptive-validation.test.js +0 -517
- package/src/intelligence/__tests__/adaptive-validation.test.js.map +0 -1
- package/src/intelligence/__tests__/impact.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/impact.test.js +0 -515
- package/src/intelligence/__tests__/impact.test.js.map +0 -1
- package/src/intelligence/__tests__/patterns.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/patterns.test.js +0 -370
- package/src/intelligence/__tests__/patterns.test.js.map +0 -1
- package/src/intelligence/__tests__/prediction.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/prediction.test.js +0 -314
- package/src/intelligence/__tests__/prediction.test.js.map +0 -1
- package/src/lib/__tests__/retry.test.d.ts.map +0 -1
- package/src/lib/__tests__/retry.test.js +0 -225
- package/src/lib/__tests__/retry.test.js.map +0 -1
- package/src/lifecycle/__tests__/chain-store.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/chain-store.test.js +0 -243
- package/src/lifecycle/__tests__/chain-store.test.js.map +0 -1
- package/src/lifecycle/__tests__/consolidate-rcasd.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/consolidate-rcasd.test.js +0 -210
- package/src/lifecycle/__tests__/consolidate-rcasd.test.js.map +0 -1
- package/src/lifecycle/__tests__/default-chain.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/default-chain.test.js +0 -74
- package/src/lifecycle/__tests__/default-chain.test.js.map +0 -1
- package/src/lifecycle/__tests__/frontmatter.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/frontmatter.test.js +0 -229
- package/src/lifecycle/__tests__/frontmatter.test.js.map +0 -1
- package/src/lifecycle/__tests__/lifecycle.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/lifecycle.test.js +0 -126
- package/src/lifecycle/__tests__/lifecycle.test.js.map +0 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.js +0 -977
- package/src/lifecycle/__tests__/pipeline.integration.test.js.map +0 -1
- package/src/lifecycle/__tests__/rcasd-paths.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/rcasd-paths.test.js +0 -206
- package/src/lifecycle/__tests__/rcasd-paths.test.js.map +0 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.js +0 -246
- package/src/lifecycle/__tests__/resume-schema-contract.test.js.map +0 -1
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.js +0 -95
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.js.map +0 -1
- package/src/lifecycle/__tests__/tessera-engine.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/tessera-engine.test.js +0 -392
- package/src/lifecycle/__tests__/tessera-engine.test.js.map +0 -1
- package/src/memory/__tests__/auto-extract.test.d.ts.map +0 -1
- package/src/memory/__tests__/auto-extract.test.js +0 -197
- package/src/memory/__tests__/auto-extract.test.js.map +0 -1
- package/src/memory/__tests__/brain-automation.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-automation.test.js +0 -730
- package/src/memory/__tests__/brain-automation.test.js.map +0 -1
- package/src/memory/__tests__/brain-embedding.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-embedding.test.js +0 -92
- package/src/memory/__tests__/brain-embedding.test.js.map +0 -1
- package/src/memory/__tests__/brain-links.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-links.test.js +0 -221
- package/src/memory/__tests__/brain-links.test.js.map +0 -1
- package/src/memory/__tests__/brain-migration.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-migration.test.js +0 -180
- package/src/memory/__tests__/brain-migration.test.js.map +0 -1
- package/src/memory/__tests__/brain-retrieval.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-retrieval.test.js +0 -701
- package/src/memory/__tests__/brain-retrieval.test.js.map +0 -1
- package/src/memory/__tests__/brain-search.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-search.test.js +0 -180
- package/src/memory/__tests__/brain-search.test.js.map +0 -1
- package/src/memory/__tests__/claude-mem-migration.test.d.ts.map +0 -1
- package/src/memory/__tests__/claude-mem-migration.test.js +0 -424
- package/src/memory/__tests__/claude-mem-migration.test.js.map +0 -1
- package/src/memory/__tests__/decisions.test.d.ts.map +0 -1
- package/src/memory/__tests__/decisions.test.js +0 -253
- package/src/memory/__tests__/decisions.test.js.map +0 -1
- package/src/memory/__tests__/engine-compat.test.d.ts.map +0 -1
- package/src/memory/__tests__/engine-compat.test.js +0 -331
- package/src/memory/__tests__/engine-compat.test.js.map +0 -1
- package/src/memory/__tests__/memory-bridge.test.d.ts.map +0 -1
- package/src/memory/__tests__/memory-bridge.test.js +0 -231
- package/src/memory/__tests__/memory-bridge.test.js.map +0 -1
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.d.ts.map +0 -1
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.js +0 -516
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.js.map +0 -1
- package/src/memory/__tests__/session-memory.test.d.ts.map +0 -1
- package/src/memory/__tests__/session-memory.test.js +0 -387
- package/src/memory/__tests__/session-memory.test.js.map +0 -1
- package/src/metrics/__tests__/model-provider-registry.test.d.ts.map +0 -1
- package/src/metrics/__tests__/model-provider-registry.test.js +0 -45
- package/src/metrics/__tests__/model-provider-registry.test.js.map +0 -1
- package/src/metrics/__tests__/provider-detection.test.d.ts.map +0 -1
- package/src/metrics/__tests__/provider-detection.test.js +0 -111
- package/src/metrics/__tests__/provider-detection.test.js.map +0 -1
- package/src/migration/__tests__/checksum.test.d.ts.map +0 -1
- package/src/migration/__tests__/checksum.test.js +0 -216
- package/src/migration/__tests__/checksum.test.js.map +0 -1
- package/src/migration/__tests__/logger.test.d.ts.map +0 -1
- package/src/migration/__tests__/logger.test.js +0 -256
- package/src/migration/__tests__/logger.test.js.map +0 -1
- package/src/migration/__tests__/migration-failure.integration.test.d.ts.map +0 -1
- package/src/migration/__tests__/migration-failure.integration.test.js +0 -515
- package/src/migration/__tests__/migration-failure.integration.test.js.map +0 -1
- package/src/migration/__tests__/migration.test.d.ts.map +0 -1
- package/src/migration/__tests__/migration.test.js +0 -82
- package/src/migration/__tests__/migration.test.js.map +0 -1
- package/src/migration/__tests__/state.test.d.ts.map +0 -1
- package/src/migration/__tests__/state.test.js +0 -330
- package/src/migration/__tests__/state.test.js.map +0 -1
- package/src/migration/__tests__/validate.test.d.ts.map +0 -1
- package/src/migration/__tests__/validate.test.js +0 -258
- package/src/migration/__tests__/validate.test.js.map +0 -1
- package/src/nexus/__tests__/deps.test.d.ts.map +0 -1
- package/src/nexus/__tests__/deps.test.js +0 -283
- package/src/nexus/__tests__/deps.test.js.map +0 -1
- package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +0 -1
- package/src/nexus/__tests__/nexus-e2e.test.js +0 -1220
- package/src/nexus/__tests__/nexus-e2e.test.js.map +0 -1
- package/src/nexus/__tests__/permissions.test.d.ts.map +0 -1
- package/src/nexus/__tests__/permissions.test.js +0 -119
- package/src/nexus/__tests__/permissions.test.js.map +0 -1
- package/src/nexus/__tests__/query.test.d.ts.map +0 -1
- package/src/nexus/__tests__/query.test.js +0 -168
- package/src/nexus/__tests__/query.test.js.map +0 -1
- package/src/nexus/__tests__/reconcile.test.d.ts.map +0 -1
- package/src/nexus/__tests__/reconcile.test.js +0 -135
- package/src/nexus/__tests__/reconcile.test.js.map +0 -1
- package/src/nexus/__tests__/registry.test.d.ts.map +0 -1
- package/src/nexus/__tests__/registry.test.js +0 -229
- package/src/nexus/__tests__/registry.test.js.map +0 -1
- package/src/nexus/__tests__/transfer.test.d.ts.map +0 -1
- package/src/nexus/__tests__/transfer.test.js +0 -372
- package/src/nexus/__tests__/transfer.test.js.map +0 -1
- package/src/observability/__tests__/index.test.d.ts.map +0 -1
- package/src/observability/__tests__/index.test.js +0 -288
- package/src/observability/__tests__/index.test.js.map +0 -1
- package/src/observability/__tests__/log-filter.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-filter.test.js +0 -151
- package/src/observability/__tests__/log-filter.test.js.map +0 -1
- package/src/observability/__tests__/log-parser.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-parser.test.js +0 -170
- package/src/observability/__tests__/log-parser.test.js.map +0 -1
- package/src/observability/__tests__/log-reader.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-reader.test.js +0 -150
- package/src/observability/__tests__/log-reader.test.js.map +0 -1
- package/src/orchestration/__tests__/autonomous-spec.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/autonomous-spec.test.js +0 -419
- package/src/orchestration/__tests__/autonomous-spec.test.js.map +0 -1
- package/src/orchestration/__tests__/orchestration.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/orchestration.test.js +0 -205
- package/src/orchestration/__tests__/orchestration.test.js.map +0 -1
- package/src/orchestration/__tests__/protocol-validators.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/protocol-validators.test.js +0 -382
- package/src/orchestration/__tests__/protocol-validators.test.js.map +0 -1
- package/src/phases/__tests__/deps.test.d.ts.map +0 -1
- package/src/phases/__tests__/deps.test.js +0 -210
- package/src/phases/__tests__/deps.test.js.map +0 -1
- package/src/phases/__tests__/phases.test.d.ts.map +0 -1
- package/src/phases/__tests__/phases.test.js +0 -215
- package/src/phases/__tests__/phases.test.js.map +0 -1
- package/src/release/__tests__/artifacts.test.d.ts.map +0 -1
- package/src/release/__tests__/artifacts.test.js +0 -65
- package/src/release/__tests__/artifacts.test.js.map +0 -1
- package/src/release/__tests__/cancel-release.test.d.ts.map +0 -1
- package/src/release/__tests__/cancel-release.test.js +0 -154
- package/src/release/__tests__/cancel-release.test.js.map +0 -1
- package/src/release/__tests__/changelog-writer.test.d.ts.map +0 -1
- package/src/release/__tests__/changelog-writer.test.js +0 -132
- package/src/release/__tests__/changelog-writer.test.js.map +0 -1
- package/src/release/__tests__/push-policy.test.d.ts.map +0 -1
- package/src/release/__tests__/push-policy.test.js +0 -142
- package/src/release/__tests__/push-policy.test.js.map +0 -1
- package/src/release/__tests__/release.test.d.ts.map +0 -1
- package/src/release/__tests__/release.test.js +0 -25
- package/src/release/__tests__/release.test.js.map +0 -1
- package/src/sequence/__tests__/allocate.test.d.ts.map +0 -1
- package/src/sequence/__tests__/allocate.test.js +0 -113
- package/src/sequence/__tests__/allocate.test.js.map +0 -1
- package/src/sessions/__tests__/briefing-blocked.test.d.ts.map +0 -1
- package/src/sessions/__tests__/briefing-blocked.test.js +0 -117
- package/src/sessions/__tests__/briefing-blocked.test.js.map +0 -1
- package/src/sessions/__tests__/briefing.test.d.ts.map +0 -1
- package/src/sessions/__tests__/briefing.test.js +0 -336
- package/src/sessions/__tests__/briefing.test.js.map +0 -1
- package/src/sessions/__tests__/handoff-integration.test.d.ts.map +0 -1
- package/src/sessions/__tests__/handoff-integration.test.js +0 -264
- package/src/sessions/__tests__/handoff-integration.test.js.map +0 -1
- package/src/sessions/__tests__/handoff.test.d.ts.map +0 -1
- package/src/sessions/__tests__/handoff.test.js +0 -435
- package/src/sessions/__tests__/handoff.test.js.map +0 -1
- package/src/sessions/__tests__/index.test.d.ts.map +0 -1
- package/src/sessions/__tests__/index.test.js +0 -82
- package/src/sessions/__tests__/index.test.js.map +0 -1
- package/src/sessions/__tests__/session-cleanup.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-cleanup.test.js +0 -201
- package/src/sessions/__tests__/session-cleanup.test.js.map +0 -1
- package/src/sessions/__tests__/session-edge-cases.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-edge-cases.test.js +0 -251
- package/src/sessions/__tests__/session-edge-cases.test.js.map +0 -1
- package/src/sessions/__tests__/session-find.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-find.test.js +0 -210
- package/src/sessions/__tests__/session-find.test.js.map +0 -1
- package/src/sessions/__tests__/session-grade.integration.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-grade.integration.test.js +0 -287
- package/src/sessions/__tests__/session-grade.integration.test.js.map +0 -1
- package/src/sessions/__tests__/session-grade.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-grade.test.js +0 -630
- package/src/sessions/__tests__/session-grade.test.js.map +0 -1
- package/src/sessions/__tests__/session-memory-bridge.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-memory-bridge.test.js +0 -52
- package/src/sessions/__tests__/session-memory-bridge.test.js.map +0 -1
- package/src/sessions/__tests__/sessions.test.d.ts.map +0 -1
- package/src/sessions/__tests__/sessions.test.js +0 -113
- package/src/sessions/__tests__/sessions.test.js.map +0 -1
- package/src/skills/__tests__/discovery.test.d.ts.map +0 -1
- package/src/skills/__tests__/discovery.test.js +0 -171
- package/src/skills/__tests__/discovery.test.js.map +0 -1
- package/src/skills/__tests__/dispatch.test.d.ts.map +0 -1
- package/src/skills/__tests__/dispatch.test.js +0 -99
- package/src/skills/__tests__/dispatch.test.js.map +0 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.d.ts.map +0 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.js +0 -77
- package/src/skills/__tests__/dynamic-skill-generator.test.js.map +0 -1
- package/src/skills/__tests__/manifests.test.d.ts.map +0 -1
- package/src/skills/__tests__/manifests.test.js +0 -121
- package/src/skills/__tests__/manifests.test.js.map +0 -1
- package/src/skills/__tests__/precedence.test.d.ts.map +0 -1
- package/src/skills/__tests__/precedence.test.js +0 -325
- package/src/skills/__tests__/precedence.test.js.map +0 -1
- package/src/skills/__tests__/routing-table.test.d.ts.map +0 -1
- package/src/skills/__tests__/routing-table.test.js +0 -91
- package/src/skills/__tests__/routing-table.test.js.map +0 -1
- package/src/skills/__tests__/skill-paths.test.d.ts.map +0 -1
- package/src/skills/__tests__/skill-paths.test.js +0 -71
- package/src/skills/__tests__/skill-paths.test.js.map +0 -1
- package/src/skills/__tests__/test-utility.test.d.ts.map +0 -1
- package/src/skills/__tests__/test-utility.test.js +0 -59
- package/src/skills/__tests__/test-utility.test.js.map +0 -1
- package/src/skills/__tests__/token.test.d.ts.map +0 -1
- package/src/skills/__tests__/token.test.js +0 -135
- package/src/skills/__tests__/token.test.js.map +0 -1
- package/src/skills/__tests__/validation.test.d.ts.map +0 -1
- package/src/skills/__tests__/validation.test.js +0 -108
- package/src/skills/__tests__/validation.test.js.map +0 -1
- package/src/skills/__tests__/version.test.d.ts.map +0 -1
- package/src/skills/__tests__/version.test.js +0 -71
- package/src/skills/__tests__/version.test.js.map +0 -1
- package/src/skills/injection/__tests__/subagent.test.d.ts.map +0 -1
- package/src/skills/injection/__tests__/subagent.test.js +0 -122
- package/src/skills/injection/__tests__/subagent.test.js.map +0 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.d.ts.map +0 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +0 -228
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +0 -1
- package/src/spawn/__tests__/adapter-registry.test.d.ts.map +0 -1
- package/src/spawn/__tests__/adapter-registry.test.js +0 -76
- package/src/spawn/__tests__/adapter-registry.test.js.map +0 -1
- package/src/stats/__tests__/stats.test.d.ts.map +0 -1
- package/src/stats/__tests__/stats.test.js +0 -374
- package/src/stats/__tests__/stats.test.js.map +0 -1
- package/src/sticky/__tests__/purge.test.d.ts.map +0 -1
- package/src/sticky/__tests__/purge.test.js +0 -64
- package/src/sticky/__tests__/purge.test.js.map +0 -1
- package/src/store/__tests__/atomic.test.d.ts.map +0 -1
- package/src/store/__tests__/atomic.test.js +0 -81
- package/src/store/__tests__/atomic.test.js.map +0 -1
- package/src/store/__tests__/backup.test.d.ts.map +0 -1
- package/src/store/__tests__/backup.test.js +0 -131
- package/src/store/__tests__/backup.test.js.map +0 -1
- package/src/store/__tests__/brain-accessor-pageindex.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-accessor-pageindex.test.js +0 -179
- package/src/store/__tests__/brain-accessor-pageindex.test.js.map +0 -1
- package/src/store/__tests__/brain-accessor.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-accessor.test.js +0 -398
- package/src/store/__tests__/brain-accessor.test.js.map +0 -1
- package/src/store/__tests__/brain-pageindex.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-pageindex.test.js +0 -137
- package/src/store/__tests__/brain-pageindex.test.js.map +0 -1
- package/src/store/__tests__/brain-schema.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-schema.test.js +0 -137
- package/src/store/__tests__/brain-schema.test.js.map +0 -1
- package/src/store/__tests__/brain-vec.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-vec.test.js +0 -100
- package/src/store/__tests__/brain-vec.test.js.map +0 -1
- package/src/store/__tests__/collision-detection.test.d.ts.map +0 -1
- package/src/store/__tests__/collision-detection.test.js +0 -165
- package/src/store/__tests__/collision-detection.test.js.map +0 -1
- package/src/store/__tests__/data-safety-central.test.d.ts.map +0 -1
- package/src/store/__tests__/data-safety-central.test.js +0 -408
- package/src/store/__tests__/data-safety-central.test.js.map +0 -1
- package/src/store/__tests__/db-helpers.test.d.ts.map +0 -1
- package/src/store/__tests__/db-helpers.test.js +0 -101
- package/src/store/__tests__/db-helpers.test.js.map +0 -1
- package/src/store/__tests__/e2e-safety-integration.test.d.ts.map +0 -1
- package/src/store/__tests__/e2e-safety-integration.test.js +0 -402
- package/src/store/__tests__/e2e-safety-integration.test.js.map +0 -1
- package/src/store/__tests__/git-checkpoint.test.d.ts.map +0 -1
- package/src/store/__tests__/git-checkpoint.test.js +0 -133
- package/src/store/__tests__/git-checkpoint.test.js.map +0 -1
- package/src/store/__tests__/idempotent-migration.test.d.ts.map +0 -1
- package/src/store/__tests__/idempotent-migration.test.js +0 -172
- package/src/store/__tests__/idempotent-migration.test.js.map +0 -1
- package/src/store/__tests__/import-logging.test.d.ts.map +0 -1
- package/src/store/__tests__/import-logging.test.js +0 -92
- package/src/store/__tests__/import-logging.test.js.map +0 -1
- package/src/store/__tests__/import-sort.test.d.ts.map +0 -1
- package/src/store/__tests__/import-sort.test.js +0 -109
- package/src/store/__tests__/import-sort.test.js.map +0 -1
- package/src/store/__tests__/json.test.d.ts.map +0 -1
- package/src/store/__tests__/json.test.js +0 -98
- package/src/store/__tests__/json.test.js.map +0 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.d.ts.map +0 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.js +0 -90
- package/src/store/__tests__/lifecycle-schema-parity.test.js.map +0 -1
- package/src/store/__tests__/migration-integration.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-integration.test.js +0 -238
- package/src/store/__tests__/migration-integration.test.js.map +0 -1
- package/src/store/__tests__/migration-retry.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-retry.test.js +0 -178
- package/src/store/__tests__/migration-retry.test.js.map +0 -1
- package/src/store/__tests__/migration-safety.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-safety.test.js +0 -756
- package/src/store/__tests__/migration-safety.test.js.map +0 -1
- package/src/store/__tests__/migration-sqlite.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-sqlite.test.js +0 -544
- package/src/store/__tests__/migration-sqlite.test.js.map +0 -1
- package/src/store/__tests__/performance-safety.test.d.ts.map +0 -1
- package/src/store/__tests__/performance-safety.test.js +0 -157
- package/src/store/__tests__/performance-safety.test.js.map +0 -1
- package/src/store/__tests__/project-detect.test.d.ts.map +0 -1
- package/src/store/__tests__/project-detect.test.js +0 -609
- package/src/store/__tests__/project-detect.test.js.map +0 -1
- package/src/store/__tests__/project-registry.test.d.ts.map +0 -1
- package/src/store/__tests__/project-registry.test.js +0 -28
- package/src/store/__tests__/project-registry.test.js.map +0 -1
- package/src/store/__tests__/provider.test.d.ts.map +0 -1
- package/src/store/__tests__/provider.test.js +0 -15
- package/src/store/__tests__/provider.test.js.map +0 -1
- package/src/store/__tests__/relations.test.d.ts.map +0 -1
- package/src/store/__tests__/relations.test.js +0 -318
- package/src/store/__tests__/relations.test.js.map +0 -1
- package/src/store/__tests__/safety-accessor.test.d.ts.map +0 -1
- package/src/store/__tests__/safety-accessor.test.js +0 -219
- package/src/store/__tests__/safety-accessor.test.js.map +0 -1
- package/src/store/__tests__/sequence-validation.test.d.ts.map +0 -1
- package/src/store/__tests__/sequence-validation.test.js +0 -94
- package/src/store/__tests__/sequence-validation.test.js.map +0 -1
- package/src/store/__tests__/session-store.test.d.ts.map +0 -1
- package/src/store/__tests__/session-store.test.js +0 -463
- package/src/store/__tests__/session-store.test.js.map +0 -1
- package/src/store/__tests__/sqlite-backup.test.d.ts.map +0 -1
- package/src/store/__tests__/sqlite-backup.test.js +0 -72
- package/src/store/__tests__/sqlite-backup.test.js.map +0 -1
- package/src/store/__tests__/sqlite.test.d.ts.map +0 -1
- package/src/store/__tests__/sqlite.test.js +0 -256
- package/src/store/__tests__/sqlite.test.js.map +0 -1
- package/src/store/__tests__/task-store.test.d.ts.map +0 -1
- package/src/store/__tests__/task-store.test.js +0 -514
- package/src/store/__tests__/task-store.test.js.map +0 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +0 -1
- package/src/store/__tests__/test-db-helper.js +0 -110
- package/src/store/__tests__/test-db-helper.js.map +0 -1
- package/src/store/__tests__/write-verification.test.d.ts.map +0 -1
- package/src/store/__tests__/write-verification.test.js +0 -185
- package/src/store/__tests__/write-verification.test.js.map +0 -1
- package/src/system/__tests__/cleanup.test.d.ts.map +0 -1
- package/src/system/__tests__/cleanup.test.js +0 -87
- package/src/system/__tests__/cleanup.test.js.map +0 -1
- package/src/system/__tests__/health.test.d.ts.map +0 -1
- package/src/system/__tests__/health.test.js +0 -55
- package/src/system/__tests__/health.test.js.map +0 -1
- package/src/task-work/__tests__/start-deps.test.d.ts.map +0 -1
- package/src/task-work/__tests__/start-deps.test.js +0 -152
- package/src/task-work/__tests__/start-deps.test.js.map +0 -1
- package/src/tasks/__tests__/add.test.d.ts.map +0 -1
- package/src/tasks/__tests__/add.test.js +0 -226
- package/src/tasks/__tests__/add.test.js.map +0 -1
- package/src/tasks/__tests__/archive.test.d.ts.map +0 -1
- package/src/tasks/__tests__/archive.test.js +0 -196
- package/src/tasks/__tests__/archive.test.js.map +0 -1
- package/src/tasks/__tests__/assignee.test.d.ts.map +0 -1
- package/src/tasks/__tests__/assignee.test.js +0 -125
- package/src/tasks/__tests__/assignee.test.js.map +0 -1
- package/src/tasks/__tests__/atomicity.test.d.ts.map +0 -1
- package/src/tasks/__tests__/atomicity.test.js +0 -192
- package/src/tasks/__tests__/atomicity.test.js.map +0 -1
- package/src/tasks/__tests__/cancel-ops.test.d.ts.map +0 -1
- package/src/tasks/__tests__/cancel-ops.test.js +0 -115
- package/src/tasks/__tests__/cancel-ops.test.js.map +0 -1
- package/src/tasks/__tests__/complete-unblocks.test.d.ts.map +0 -1
- package/src/tasks/__tests__/complete-unblocks.test.js +0 -151
- package/src/tasks/__tests__/complete-unblocks.test.js.map +0 -1
- package/src/tasks/__tests__/complete.test.d.ts.map +0 -1
- package/src/tasks/__tests__/complete.test.js +0 -230
- package/src/tasks/__tests__/complete.test.js.map +0 -1
- package/src/tasks/__tests__/delete.test.d.ts.map +0 -1
- package/src/tasks/__tests__/delete.test.js +0 -183
- package/src/tasks/__tests__/delete.test.js.map +0 -1
- package/src/tasks/__tests__/dependency-check.test.d.ts.map +0 -1
- package/src/tasks/__tests__/dependency-check.test.js +0 -293
- package/src/tasks/__tests__/dependency-check.test.js.map +0 -1
- package/src/tasks/__tests__/deps-ready.test.d.ts.map +0 -1
- package/src/tasks/__tests__/deps-ready.test.js +0 -68
- package/src/tasks/__tests__/deps-ready.test.js.map +0 -1
- package/src/tasks/__tests__/epic-enforcement.test.d.ts.map +0 -1
- package/src/tasks/__tests__/epic-enforcement.test.js +0 -669
- package/src/tasks/__tests__/epic-enforcement.test.js.map +0 -1
- package/src/tasks/__tests__/find.test.d.ts.map +0 -1
- package/src/tasks/__tests__/find.test.js +0 -163
- package/src/tasks/__tests__/find.test.js.map +0 -1
- package/src/tasks/__tests__/graph-ops.test.d.ts.map +0 -1
- package/src/tasks/__tests__/graph-ops.test.js +0 -174
- package/src/tasks/__tests__/graph-ops.test.js.map +0 -1
- package/src/tasks/__tests__/hierarchy-policy.test.d.ts.map +0 -1
- package/src/tasks/__tests__/hierarchy-policy.test.js +0 -399
- package/src/tasks/__tests__/hierarchy-policy.test.js.map +0 -1
- package/src/tasks/__tests__/hierarchy.test.d.ts.map +0 -1
- package/src/tasks/__tests__/hierarchy.test.js +0 -302
- package/src/tasks/__tests__/hierarchy.test.js.map +0 -1
- package/src/tasks/__tests__/id-generator.test.d.ts.map +0 -1
- package/src/tasks/__tests__/id-generator.test.js +0 -59
- package/src/tasks/__tests__/id-generator.test.js.map +0 -1
- package/src/tasks/__tests__/labels.test.d.ts.map +0 -1
- package/src/tasks/__tests__/labels.test.js +0 -173
- package/src/tasks/__tests__/labels.test.js.map +0 -1
- package/src/tasks/__tests__/list.test.d.ts.map +0 -1
- package/src/tasks/__tests__/list.test.js +0 -272
- package/src/tasks/__tests__/list.test.js.map +0 -1
- package/src/tasks/__tests__/minimal-test.test.d.ts.map +0 -1
- package/src/tasks/__tests__/minimal-test.test.js +0 -25
- package/src/tasks/__tests__/minimal-test.test.js.map +0 -1
- package/src/tasks/__tests__/phase-tracking.test.d.ts.map +0 -1
- package/src/tasks/__tests__/phase-tracking.test.js +0 -209
- package/src/tasks/__tests__/phase-tracking.test.js.map +0 -1
- package/src/tasks/__tests__/pipeline-stage.test.d.ts.map +0 -1
- package/src/tasks/__tests__/pipeline-stage.test.js +0 -277
- package/src/tasks/__tests__/pipeline-stage.test.js.map +0 -1
- package/src/tasks/__tests__/plan-priority.test.d.ts.map +0 -1
- package/src/tasks/__tests__/plan-priority.test.js +0 -133
- package/src/tasks/__tests__/plan-priority.test.js.map +0 -1
- package/src/tasks/__tests__/priority-normalization.test.d.ts.map +0 -1
- package/src/tasks/__tests__/priority-normalization.test.js +0 -117
- package/src/tasks/__tests__/priority-normalization.test.js.map +0 -1
- package/src/tasks/__tests__/relates.test.d.ts.map +0 -1
- package/src/tasks/__tests__/relates.test.js +0 -84
- package/src/tasks/__tests__/relates.test.js.map +0 -1
- package/src/tasks/__tests__/show-deps.test.d.ts.map +0 -1
- package/src/tasks/__tests__/show-deps.test.js +0 -182
- package/src/tasks/__tests__/show-deps.test.js.map +0 -1
- package/src/tasks/__tests__/show.test.d.ts.map +0 -1
- package/src/tasks/__tests__/show.test.js +0 -126
- package/src/tasks/__tests__/show.test.js.map +0 -1
- package/src/tasks/__tests__/staleness.test.d.ts.map +0 -1
- package/src/tasks/__tests__/staleness.test.js +0 -154
- package/src/tasks/__tests__/staleness.test.js.map +0 -1
- package/src/tasks/__tests__/task-ops-depends.test.d.ts.map +0 -1
- package/src/tasks/__tests__/task-ops-depends.test.js +0 -118
- package/src/tasks/__tests__/task-ops-depends.test.js.map +0 -1
- package/src/tasks/__tests__/update.test.d.ts.map +0 -1
- package/src/tasks/__tests__/update.test.js +0 -320
- package/src/tasks/__tests__/update.test.js.map +0 -1
- package/src/validation/__tests__/chain-validation.test.d.ts.map +0 -1
- package/src/validation/__tests__/chain-validation.test.js +0 -204
- package/src/validation/__tests__/chain-validation.test.js.map +0 -1
- package/src/validation/__tests__/compliance.test.d.ts.map +0 -1
- package/src/validation/__tests__/compliance.test.js +0 -83
- package/src/validation/__tests__/compliance.test.js.map +0 -1
- package/src/validation/__tests__/docs-sync.test.d.ts.map +0 -1
- package/src/validation/__tests__/docs-sync.test.js +0 -243
- package/src/validation/__tests__/docs-sync.test.js.map +0 -1
- package/src/validation/__tests__/doctor-gitignore.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor-gitignore.test.js +0 -154
- package/src/validation/__tests__/doctor-gitignore.test.js.map +0 -1
- package/src/validation/__tests__/doctor-injection.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor-injection.test.js +0 -230
- package/src/validation/__tests__/doctor-injection.test.js.map +0 -1
- package/src/validation/__tests__/doctor.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor.test.js +0 -202
- package/src/validation/__tests__/doctor.test.js.map +0 -1
- package/src/validation/__tests__/engine.test.d.ts.map +0 -1
- package/src/validation/__tests__/engine.test.js +0 -346
- package/src/validation/__tests__/engine.test.js.map +0 -1
- package/src/validation/__tests__/manifest.test.d.ts.map +0 -1
- package/src/validation/__tests__/manifest.test.js +0 -244
- package/src/validation/__tests__/manifest.test.js.map +0 -1
- package/src/validation/__tests__/protocol-common.test.d.ts.map +0 -1
- package/src/validation/__tests__/protocol-common.test.js +0 -112
- package/src/validation/__tests__/protocol-common.test.js.map +0 -1
- package/src/validation/__tests__/verification.test.d.ts.map +0 -1
- package/src/validation/__tests__/verification.test.js +0 -277
- package/src/validation/__tests__/verification.test.js.map +0 -1
- package/src/validation/protocols/release-protocol.ts +0 -80
- package/src/validation/protocols/testing-protocol.ts +0 -93
- package/src/validation/protocols/validation-protocol.ts +0 -93
|
@@ -1,101 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Research protocol
|
|
2
|
+
* Research protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
3
4
|
* @task T4804
|
|
4
|
-
* @
|
|
5
|
+
* @task T260
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
protocol: string;
|
|
17
|
-
taskId: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function findManifestEntry(taskId: string, manifestPath: string): string | null {
|
|
21
|
-
if (!existsSync(manifestPath)) return null;
|
|
22
|
-
const lines = readFileSync(manifestPath, 'utf-8').trim().split('\n');
|
|
23
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
24
|
-
if (lines[i]!.includes(`"${taskId}"`)) return lines[i]!;
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
8
|
+
import {
|
|
9
|
+
type ProtocolValidationResult,
|
|
10
|
+
validateResearchProtocol,
|
|
11
|
+
} from '../../orchestration/protocol-validators.js';
|
|
12
|
+
import {
|
|
13
|
+
loadManifestEntryByTaskId,
|
|
14
|
+
loadManifestEntryFromFile,
|
|
15
|
+
throwIfStrictFailed,
|
|
16
|
+
} from './_shared.js';
|
|
28
17
|
|
|
29
18
|
/** Validate research protocol for a task. */
|
|
30
19
|
export async function validateResearchTask(
|
|
31
20
|
taskId: string,
|
|
32
|
-
opts: { strict?: boolean },
|
|
33
|
-
): Promise<
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
throw new CleoError(ExitCode.NOT_FOUND, `No manifest entry found for task ${taskId}`);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const manifest = JSON.parse(entry);
|
|
41
|
-
const violations: ValidationResult['violations'] = [];
|
|
42
|
-
|
|
43
|
-
// RSCH-001: agent_type check
|
|
44
|
-
if (manifest.agent_type !== 'research') {
|
|
45
|
-
violations.push({
|
|
46
|
-
code: 'RSCH-001',
|
|
47
|
-
severity: 'high',
|
|
48
|
-
message: `Expected agent_type "research", got "${manifest.agent_type}"`,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// RSCH-002: key_findings must be present and non-empty
|
|
53
|
-
if (
|
|
54
|
-
!manifest.key_findings ||
|
|
55
|
-
!Array.isArray(manifest.key_findings) ||
|
|
56
|
-
manifest.key_findings.length === 0
|
|
57
|
-
) {
|
|
58
|
-
violations.push({
|
|
59
|
-
code: 'RSCH-002',
|
|
60
|
-
severity: 'high',
|
|
61
|
-
message: 'Research output must include non-empty key_findings array',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// RSCH-003: output file must exist
|
|
66
|
-
if (manifest.file && !existsSync(manifest.file)) {
|
|
67
|
-
violations.push({
|
|
68
|
-
code: 'RSCH-003',
|
|
69
|
-
severity: 'medium',
|
|
70
|
-
message: `Output file "${manifest.file}" not found on disk`,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const score = violations.length === 0 ? 100 : Math.max(0, 100 - violations.length * 25);
|
|
75
|
-
const result: ValidationResult = {
|
|
76
|
-
valid: violations.length === 0,
|
|
77
|
-
violations,
|
|
78
|
-
score,
|
|
79
|
-
protocol: 'research',
|
|
80
|
-
taskId,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
if (opts.strict && violations.length > 0) {
|
|
84
|
-
throw new CleoError(60 as ExitCode, `Research protocol violations for ${taskId}`);
|
|
85
|
-
}
|
|
86
|
-
|
|
21
|
+
opts: { strict?: boolean; hasCodeChanges?: boolean },
|
|
22
|
+
): Promise<ProtocolValidationResult> {
|
|
23
|
+
const entry = loadManifestEntryByTaskId(taskId);
|
|
24
|
+
const result = validateResearchProtocol(entry, opts);
|
|
25
|
+
throwIfStrictFailed(result, opts, 'research', taskId);
|
|
87
26
|
return result;
|
|
88
27
|
}
|
|
89
28
|
|
|
90
|
-
/** Validate research protocol from manifest file. */
|
|
29
|
+
/** Validate research protocol from a manifest file. */
|
|
91
30
|
export async function checkResearchManifest(
|
|
92
31
|
manifestFile: string,
|
|
93
|
-
opts: { strict?: boolean },
|
|
94
|
-
): Promise<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return validateResearchTask(taskId, opts);
|
|
32
|
+
opts: { strict?: boolean; hasCodeChanges?: boolean },
|
|
33
|
+
): Promise<ProtocolValidationResult> {
|
|
34
|
+
const entry = loadManifestEntryFromFile(manifestFile);
|
|
35
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
36
|
+
const result = validateResearchProtocol(entry, opts);
|
|
37
|
+
throwIfStrictFailed(result, opts, 'research', taskId);
|
|
38
|
+
return result;
|
|
101
39
|
}
|
|
@@ -1,106 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Specification protocol
|
|
2
|
+
* Specification protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
3
4
|
* @task T4537
|
|
4
|
-
* @
|
|
5
|
+
* @task T260
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
import { existsSync, readFileSync } from 'node:fs';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
taskId: string;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function findManifestEntry(taskId: string, manifestPath: string): string | null {
|
|
21
|
-
if (!existsSync(manifestPath)) return null;
|
|
22
|
-
const lines = readFileSync(manifestPath, 'utf-8').trim().split('\n');
|
|
23
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
24
|
-
if (lines[i]!.includes(`"${taskId}"`)) return lines[i]!;
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
9
|
+
import {
|
|
10
|
+
type ProtocolValidationResult,
|
|
11
|
+
validateSpecificationProtocol,
|
|
12
|
+
} from '../../orchestration/protocol-validators.js';
|
|
13
|
+
import {
|
|
14
|
+
loadManifestEntryByTaskId,
|
|
15
|
+
loadManifestEntryFromFile,
|
|
16
|
+
throwIfStrictFailed,
|
|
17
|
+
} from './_shared.js';
|
|
28
18
|
|
|
29
19
|
/** Validate specification protocol for a task. */
|
|
30
20
|
export async function validateSpecificationTask(
|
|
31
21
|
taskId: string,
|
|
32
22
|
opts: { strict?: boolean; specFile?: string },
|
|
33
|
-
): Promise<
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const manifest = JSON.parse(entry);
|
|
41
|
-
const violations: ValidationResult['violations'] = [];
|
|
42
|
-
|
|
43
|
-
// SPEC-007: agent_type check
|
|
44
|
-
if (manifest.agent_type !== 'specification') {
|
|
45
|
-
violations.push({
|
|
46
|
-
code: 'SPEC-007',
|
|
47
|
-
severity: 'high',
|
|
48
|
-
message: `Expected agent_type "specification", got "${manifest.agent_type}"`,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// SPEC-001: RFC 2119 keywords check
|
|
53
|
-
if (opts.specFile && existsSync(opts.specFile)) {
|
|
54
|
-
const specContent = readFileSync(opts.specFile, 'utf-8');
|
|
55
|
-
const rfc2119Keywords = ['MUST', 'SHOULD', 'MAY', 'MUST NOT', 'SHOULD NOT'];
|
|
56
|
-
const hasKeywords = rfc2119Keywords.some((kw) => specContent.includes(kw));
|
|
57
|
-
if (!hasKeywords) {
|
|
58
|
-
violations.push({
|
|
59
|
-
code: 'SPEC-001',
|
|
60
|
-
severity: 'medium',
|
|
61
|
-
message: 'Specification should contain RFC 2119 keywords (MUST/SHOULD/MAY)',
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// SPEC-002: version check
|
|
67
|
-
if (!manifest.version && opts.specFile) {
|
|
68
|
-
const specContent = existsSync(opts.specFile) ? readFileSync(opts.specFile, 'utf-8') : '';
|
|
69
|
-
const hasVersion = /version[:\s]+\d/i.test(specContent) || /^#+.*v\d/im.test(specContent);
|
|
70
|
-
if (!hasVersion) {
|
|
71
|
-
violations.push({
|
|
72
|
-
code: 'SPEC-002',
|
|
73
|
-
severity: 'medium',
|
|
74
|
-
message: 'Specification should include version information',
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const score = violations.length === 0 ? 100 : Math.max(0, 100 - violations.length * 20);
|
|
80
|
-
const result: ValidationResult = {
|
|
81
|
-
valid: violations.length === 0,
|
|
82
|
-
violations,
|
|
83
|
-
score,
|
|
84
|
-
protocol: 'specification',
|
|
85
|
-
taskId,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
if (opts.strict && violations.length > 0) {
|
|
89
|
-
throw new CleoError(62 as ExitCode, `Specification protocol violations for ${taskId}`);
|
|
90
|
-
}
|
|
91
|
-
|
|
23
|
+
): Promise<ProtocolValidationResult> {
|
|
24
|
+
const entry = loadManifestEntryByTaskId(taskId);
|
|
25
|
+
const specContent =
|
|
26
|
+
opts.specFile && existsSync(opts.specFile) ? readFileSync(opts.specFile, 'utf-8') : undefined;
|
|
27
|
+
const result = validateSpecificationProtocol(entry, specContent);
|
|
28
|
+
throwIfStrictFailed(result, opts, 'specification', taskId);
|
|
92
29
|
return result;
|
|
93
30
|
}
|
|
94
31
|
|
|
95
|
-
/** Validate specification protocol from manifest file. */
|
|
32
|
+
/** Validate specification protocol from a manifest file. */
|
|
96
33
|
export async function checkSpecificationManifest(
|
|
97
34
|
manifestFile: string,
|
|
98
35
|
opts: { strict?: boolean; specFile?: string },
|
|
99
|
-
): Promise<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
|
|
36
|
+
): Promise<ProtocolValidationResult> {
|
|
37
|
+
const entry = loadManifestEntryFromFile(manifestFile);
|
|
38
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
39
|
+
const specContent =
|
|
40
|
+
opts.specFile && existsSync(opts.specFile) ? readFileSync(opts.specFile, 'utf-8') : undefined;
|
|
41
|
+
const result = validateSpecificationProtocol(entry, specContent);
|
|
42
|
+
throwIfStrictFailed(result, opts, 'specification', taskId);
|
|
43
|
+
return result;
|
|
106
44
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
4
|
+
* Renamed from testing-protocol.ts in T260. The testing protocol is the
|
|
5
|
+
* project-agnostic IVT loop closure stage: it checks that a detected test
|
|
6
|
+
* framework ran, achieved 100% pass rate, and the Implement→Validate→Test
|
|
7
|
+
* loop converged on the specification. Framework detection and loop logic
|
|
8
|
+
* live in the `ct-ivt-looper` skill; this validator only certifies results.
|
|
9
|
+
*
|
|
10
|
+
* @task T4804
|
|
11
|
+
* @task T260 — drop -protocol suffix, delegate, project-agnostic IVT
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
type ProtocolValidationResult,
|
|
16
|
+
type TestingOptions,
|
|
17
|
+
validateTestingProtocol,
|
|
18
|
+
} from '../../orchestration/protocol-validators.js';
|
|
19
|
+
import {
|
|
20
|
+
loadManifestEntryByTaskId,
|
|
21
|
+
loadManifestEntryFromFile,
|
|
22
|
+
throwIfStrictFailed,
|
|
23
|
+
} from './_shared.js';
|
|
24
|
+
|
|
25
|
+
/** Validate testing protocol for a task. */
|
|
26
|
+
export async function validateTestingTask(
|
|
27
|
+
taskId: string,
|
|
28
|
+
opts: { strict?: boolean } & TestingOptions,
|
|
29
|
+
): Promise<ProtocolValidationResult> {
|
|
30
|
+
const entry = loadManifestEntryByTaskId(taskId);
|
|
31
|
+
const result = validateTestingProtocol(entry, opts);
|
|
32
|
+
throwIfStrictFailed(result, opts, 'testing', taskId);
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Validate testing protocol from a manifest file. */
|
|
37
|
+
export async function checkTestingManifest(
|
|
38
|
+
manifestFile: string,
|
|
39
|
+
opts: { strict?: boolean } & TestingOptions,
|
|
40
|
+
): Promise<ProtocolValidationResult> {
|
|
41
|
+
const entry = loadManifestEntryFromFile(manifestFile);
|
|
42
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
43
|
+
const result = validateTestingProtocol(entry, opts);
|
|
44
|
+
throwIfStrictFailed(result, opts, 'testing', taskId);
|
|
45
|
+
return result;
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
4
|
+
* Renamed from validation-protocol.ts in T260. The validation stage runs
|
|
5
|
+
* static analysis, type checking, and pre-test quality gates. It is the
|
|
6
|
+
* first half of the IVT loop (Implement → Validate → Test); the validator
|
|
7
|
+
* here only verifies that a validation run produced a proper manifest
|
|
8
|
+
* entry — runtime gate enforcement is in the lifecycle state machine.
|
|
9
|
+
*
|
|
10
|
+
* @task T4804
|
|
11
|
+
* @task T260 — drop -protocol suffix, delegate to orchestration validator
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
type ProtocolValidationResult,
|
|
16
|
+
type ValidationStageOptions,
|
|
17
|
+
validateValidationProtocol,
|
|
18
|
+
} from '../../orchestration/protocol-validators.js';
|
|
19
|
+
import {
|
|
20
|
+
loadManifestEntryByTaskId,
|
|
21
|
+
loadManifestEntryFromFile,
|
|
22
|
+
throwIfStrictFailed,
|
|
23
|
+
} from './_shared.js';
|
|
24
|
+
|
|
25
|
+
/** Validate validation-stage protocol for a task. */
|
|
26
|
+
export async function validateValidationTask(
|
|
27
|
+
taskId: string,
|
|
28
|
+
opts: { strict?: boolean } & ValidationStageOptions,
|
|
29
|
+
): Promise<ProtocolValidationResult> {
|
|
30
|
+
const entry = loadManifestEntryByTaskId(taskId);
|
|
31
|
+
const result = validateValidationProtocol(entry, opts);
|
|
32
|
+
throwIfStrictFailed(result, opts, 'validation', taskId);
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Validate validation-stage protocol from a manifest file. */
|
|
37
|
+
export async function checkValidationManifest(
|
|
38
|
+
manifestFile: string,
|
|
39
|
+
opts: { strict?: boolean } & ValidationStageOptions,
|
|
40
|
+
): Promise<ProtocolValidationResult> {
|
|
41
|
+
const entry = loadManifestEntryFromFile(manifestFile);
|
|
42
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
43
|
+
const result = validateValidationProtocol(entry, opts);
|
|
44
|
+
throwIfStrictFailed(result, opts, 'validation', taskId);
|
|
45
|
+
return result;
|
|
46
|
+
}
|
package/dist/cant/approval.d.ts
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Approval gate manager for CANT workflow execution.
|
|
3
|
-
*
|
|
4
|
-
* Manages the lifecycle of approval tokens: generation, validation,
|
|
5
|
-
* approval, rejection, and expiration. Tokens follow the state machine
|
|
6
|
-
* defined in CANT-DSL-SPEC.md Section 8.2.
|
|
7
|
-
*
|
|
8
|
-
* State transitions are atomic (CAS): only `pending -> approved`,
|
|
9
|
-
* `pending -> rejected`, and `pending -> expired` are permitted.
|
|
10
|
-
*
|
|
11
|
-
* @see docs/specs/CANT-DSL-SPEC.md Section 8 (Approval Token Protocol)
|
|
12
|
-
*/
|
|
13
|
-
import type { ApprovalToken, TokenValidation } from './types.js';
|
|
14
|
-
/**
|
|
15
|
-
* Manages approval tokens for CANT workflow gates.
|
|
16
|
-
*
|
|
17
|
-
* Tokens are stored in-memory per instance. In production, these are
|
|
18
|
-
* persisted via the session's `approvalTokensJson` column in tasks.db.
|
|
19
|
-
*/
|
|
20
|
-
export declare class ApprovalManager {
|
|
21
|
-
/** In-memory token store keyed by token UUID. */
|
|
22
|
-
private tokens;
|
|
23
|
-
/**
|
|
24
|
-
* Generates a new approval token for a workflow gate.
|
|
25
|
-
*
|
|
26
|
-
* @param sessionId - The session that owns this token.
|
|
27
|
-
* @param workflowName - The workflow containing the approval gate.
|
|
28
|
-
* @param gateName - The label of the specific approval gate.
|
|
29
|
-
* @param message - The message to display to the approver.
|
|
30
|
-
* @param workflowHash - SHA-256 hash of the workflow definition.
|
|
31
|
-
* @param requestedBy - The agent/workflow requesting approval.
|
|
32
|
-
* @param expiresInMs - Token lifetime in milliseconds (default: 24h).
|
|
33
|
-
* @returns The generated approval token.
|
|
34
|
-
*/
|
|
35
|
-
generateToken(sessionId: string, workflowName: string, gateName: string, message: string, workflowHash: string, requestedBy: string, expiresInMs?: number): ApprovalToken;
|
|
36
|
-
/**
|
|
37
|
-
* Validates an approval token against the current execution context.
|
|
38
|
-
*
|
|
39
|
-
* Checks: (a) token exists, (b) sessionId matches, (c) status is pending,
|
|
40
|
-
* (d) not expired, (e) workflowHash matches current workflow.
|
|
41
|
-
*
|
|
42
|
-
* @param tokenId - The token UUID to validate.
|
|
43
|
-
* @param currentSessionId - The current session to validate against.
|
|
44
|
-
* @param currentWorkflowHash - The current workflow hash for TOCTOU check.
|
|
45
|
-
* @returns Validation result with reason if invalid.
|
|
46
|
-
*/
|
|
47
|
-
validateToken(tokenId: string, currentSessionId: string, currentWorkflowHash: string): TokenValidation;
|
|
48
|
-
/**
|
|
49
|
-
* Approves a pending token.
|
|
50
|
-
*
|
|
51
|
-
* Performs an atomic CAS transition: `pending -> approved`. If the token
|
|
52
|
-
* is not in `pending` state, the operation is a no-op and returns false.
|
|
53
|
-
*
|
|
54
|
-
* @param tokenId - The token UUID to approve.
|
|
55
|
-
* @param approvedBy - The identifier of the approving actor.
|
|
56
|
-
* @returns `true` if the transition succeeded, `false` if CAS failed.
|
|
57
|
-
*/
|
|
58
|
-
approveToken(tokenId: string, approvedBy: string): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Rejects a pending token.
|
|
61
|
-
*
|
|
62
|
-
* Performs an atomic CAS transition: `pending -> rejected`.
|
|
63
|
-
*
|
|
64
|
-
* @param tokenId - The token UUID to reject.
|
|
65
|
-
* @returns `true` if the transition succeeded, `false` if CAS failed.
|
|
66
|
-
*/
|
|
67
|
-
rejectToken(tokenId: string): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Expires a pending token.
|
|
70
|
-
*
|
|
71
|
-
* Performs an atomic CAS transition: `pending -> expired`.
|
|
72
|
-
*
|
|
73
|
-
* @param tokenId - The token UUID to expire.
|
|
74
|
-
* @returns `true` if the transition succeeded, `false` if CAS failed.
|
|
75
|
-
*/
|
|
76
|
-
expireToken(tokenId: string): boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Retrieves a token by its UUID.
|
|
79
|
-
*
|
|
80
|
-
* @param tokenId - The token UUID to look up.
|
|
81
|
-
* @returns The token if found, otherwise undefined.
|
|
82
|
-
*/
|
|
83
|
-
getToken(tokenId: string): ApprovalToken | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Lists all tokens for a given session.
|
|
86
|
-
*
|
|
87
|
-
* @param sessionId - The session to filter by.
|
|
88
|
-
* @returns Array of tokens belonging to the session.
|
|
89
|
-
*/
|
|
90
|
-
getTokensForSession(sessionId: string): ApprovalToken[];
|
|
91
|
-
/**
|
|
92
|
-
* Computes a SHA-256 hash of a workflow definition string.
|
|
93
|
-
*
|
|
94
|
-
* Used for TOCTOU protection: the hash at token creation time is compared
|
|
95
|
-
* against the hash at approval time.
|
|
96
|
-
*
|
|
97
|
-
* @param workflowText - The raw workflow definition text.
|
|
98
|
-
* @returns Hex-encoded SHA-256 hash.
|
|
99
|
-
*/
|
|
100
|
-
static computeWorkflowHash(workflowText: string): string;
|
|
101
|
-
/**
|
|
102
|
-
* Atomically transitions a token from `pending` to the target status.
|
|
103
|
-
*
|
|
104
|
-
* @param tokenId - The token UUID.
|
|
105
|
-
* @param targetStatus - The desired new status.
|
|
106
|
-
* @returns `true` if the CAS transition succeeded.
|
|
107
|
-
*/
|
|
108
|
-
private transitionStatus;
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=approval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../src/cant/approval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAuB,eAAe,EAAE,MAAM,YAAY,CAAC;AAKtF;;;;;GAKG;AACH,qBAAa,eAAe;IAC1B,iDAAiD;IACjD,OAAO,CAAC,MAAM,CAAyC;IAEvD;;;;;;;;;;;OAWG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,WAAW,GAAE,MAA0B,GACtC,aAAa;IAmBhB;;;;;;;;;;OAUG;IACH,aAAa,CACX,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,EAAE,MAAM,GAC1B,eAAe;IA8BlB;;;;;;;;;OASG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO;IAc1D;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAWrC;;;;;;;OAOG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;IAIrC;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIpD;;;;;OAKG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE;IAIvD;;;;;;;;OAQG;IACH,MAAM,CAAC,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM;IAIxD;;;;;;OAMG;IACH,OAAO,CAAC,gBAAgB;CASzB"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Execution context builder for CANT workflows.
|
|
3
|
-
*
|
|
4
|
-
* Resolves variable references and manages the scope chain for workflow
|
|
5
|
-
* execution. Variables from workflow parameters, step outputs, and
|
|
6
|
-
* intermediate bindings are tracked in a hierarchical scope.
|
|
7
|
-
*
|
|
8
|
-
* @see docs/specs/CANT-DSL-SPEC.md Section 7.2 (Workflow Execution)
|
|
9
|
-
*/
|
|
10
|
-
import type { ExecutionScope } from './types.js';
|
|
11
|
-
/**
|
|
12
|
-
* Creates a new root execution scope with initial variable bindings.
|
|
13
|
-
*
|
|
14
|
-
* @param initialBindings - Initial variable values (typically workflow parameters).
|
|
15
|
-
* @returns A new root scope.
|
|
16
|
-
*/
|
|
17
|
-
export declare function createScope(initialBindings?: Record<string, unknown>): ExecutionScope;
|
|
18
|
-
/**
|
|
19
|
-
* Creates a child scope that inherits from a parent.
|
|
20
|
-
*
|
|
21
|
-
* Lookups in the child scope fall through to the parent if not found locally.
|
|
22
|
-
* This is used for parallel arms, loop iterations, and nested blocks.
|
|
23
|
-
*
|
|
24
|
-
* @param parent - The parent scope.
|
|
25
|
-
* @param localBindings - Local variable overrides for this child scope.
|
|
26
|
-
* @returns A new child scope.
|
|
27
|
-
*/
|
|
28
|
-
export declare function createChildScope(parent: ExecutionScope, localBindings?: Record<string, unknown>): ExecutionScope;
|
|
29
|
-
/**
|
|
30
|
-
* Resolves a variable name in the scope chain.
|
|
31
|
-
*
|
|
32
|
-
* Searches the current scope first, then walks up the parent chain.
|
|
33
|
-
*
|
|
34
|
-
* @param scope - The scope to search in.
|
|
35
|
-
* @param name - The variable name to resolve.
|
|
36
|
-
* @returns The variable value, or `undefined` if not found in any scope.
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveVariable(scope: ExecutionScope, name: string): unknown;
|
|
39
|
-
/**
|
|
40
|
-
* Sets a variable in the current scope (does not affect parent scopes).
|
|
41
|
-
*
|
|
42
|
-
* @param scope - The scope to modify.
|
|
43
|
-
* @param name - The variable name to set.
|
|
44
|
-
* @param value - The value to assign.
|
|
45
|
-
*/
|
|
46
|
-
export declare function setVariable(scope: ExecutionScope, name: string, value: unknown): void;
|
|
47
|
-
/**
|
|
48
|
-
* Resolves `{variable}` placeholders in a template string against the scope.
|
|
49
|
-
*
|
|
50
|
-
* Performs single-pass replacement per the T07 security rule: nested
|
|
51
|
-
* interpolation within resolved values is treated as literal text.
|
|
52
|
-
*
|
|
53
|
-
* @param template - The string containing `{variable}` placeholders.
|
|
54
|
-
* @param scope - The execution scope for variable resolution.
|
|
55
|
-
* @returns The string with all placeholders resolved.
|
|
56
|
-
* @throws {Error} If a referenced variable is not found in any scope.
|
|
57
|
-
*/
|
|
58
|
-
export declare function resolveTemplate(template: string, scope: ExecutionScope): string;
|
|
59
|
-
/**
|
|
60
|
-
* Merges step output into the current scope.
|
|
61
|
-
*
|
|
62
|
-
* Binds `<stepName>.stdout`, `<stepName>.stderr`, and `<stepName>.exitCode`
|
|
63
|
-
* for use in subsequent step variable resolution.
|
|
64
|
-
*
|
|
65
|
-
* @param scope - The scope to add bindings to.
|
|
66
|
-
* @param stepName - The name of the completed step.
|
|
67
|
-
* @param output - The step output to merge.
|
|
68
|
-
*/
|
|
69
|
-
export declare function mergeStepOutput(scope: ExecutionScope, stepName: string, output: Record<string, unknown>): void;
|
|
70
|
-
/**
|
|
71
|
-
* Collects all variable bindings visible from the given scope (including parents).
|
|
72
|
-
*
|
|
73
|
-
* Parent bindings are overridden by child bindings of the same name.
|
|
74
|
-
*
|
|
75
|
-
* @param scope - The scope to flatten.
|
|
76
|
-
* @returns A flat record of all visible variable bindings.
|
|
77
|
-
*/
|
|
78
|
-
export declare function flattenScope(scope: ExecutionScope): Record<string, unknown>;
|
|
79
|
-
//# sourceMappingURL=context-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-builder.d.ts","sourceRoot":"","sources":["../../src/cant/context-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,cAAc,CAIzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,aAAa,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAC1C,cAAc,CAKhB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAY5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAErF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,MAAM,CAQ/E;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,cAAc,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,IAAI,CAQN;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAG3E"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Discretion evaluation for CANT workflow conditionals.
|
|
3
|
-
*
|
|
4
|
-
* Discretion conditions (`**prose text**`) are AI-evaluated logic gates
|
|
5
|
-
* in CANT workflows. The evaluation is pluggable: the default evaluator
|
|
6
|
-
* stubs `true` (real LLM integration is a separate task), while custom
|
|
7
|
-
* evaluators can be injected for testing, rule-based shortcuts, or
|
|
8
|
-
* alternative model backends.
|
|
9
|
-
*
|
|
10
|
-
* @see docs/specs/CANT-DSL-SPEC.md Section 7.3 (Discretion Evaluation)
|
|
11
|
-
*/
|
|
12
|
-
import type { DiscretionContext } from './types.js';
|
|
13
|
-
/** Evaluates a discretion condition and returns a boolean judgment. */
|
|
14
|
-
export interface DiscretionEvaluator {
|
|
15
|
-
/**
|
|
16
|
-
* Evaluate whether a discretion condition is met.
|
|
17
|
-
*
|
|
18
|
-
* @param condition - The prose text between `**` delimiters.
|
|
19
|
-
* @param context - Execution context including session, variables, and prior results.
|
|
20
|
-
* @returns `true` if the condition is judged to be met.
|
|
21
|
-
*/
|
|
22
|
-
evaluate(condition: string, context: DiscretionContext): Promise<boolean>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Default discretion evaluator that always returns `true`.
|
|
26
|
-
*
|
|
27
|
-
* This is a stub implementation. The real LLM-backed evaluator will be
|
|
28
|
-
* implemented as a separate task. In production, this should be replaced
|
|
29
|
-
* with an evaluator that:
|
|
30
|
-
* - Calls the LLM API with the condition in a structured field
|
|
31
|
-
* - Uses structured prompting (tool use / JSON mode)
|
|
32
|
-
* - Returns a boolean judgment
|
|
33
|
-
*/
|
|
34
|
-
export declare class DefaultDiscretionEvaluator implements DiscretionEvaluator {
|
|
35
|
-
/** Always returns `true` (stub). */
|
|
36
|
-
evaluate(_condition: string, _context: DiscretionContext): Promise<boolean>;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Mock discretion evaluator with configurable responses for testing.
|
|
40
|
-
*
|
|
41
|
-
* Responses can be set per condition text or as a blanket default.
|
|
42
|
-
*/
|
|
43
|
-
export declare class MockDiscretionEvaluator implements DiscretionEvaluator {
|
|
44
|
-
private responses;
|
|
45
|
-
private defaultResponse;
|
|
46
|
-
private evaluationLog;
|
|
47
|
-
/**
|
|
48
|
-
* Creates a mock evaluator.
|
|
49
|
-
*
|
|
50
|
-
* @param defaultResponse - The response for conditions without a specific mapping.
|
|
51
|
-
*/
|
|
52
|
-
constructor(defaultResponse?: boolean);
|
|
53
|
-
/** Set the response for a specific condition text. */
|
|
54
|
-
setResponse(condition: string, result: boolean): void;
|
|
55
|
-
/** Evaluate using the configured response map. */
|
|
56
|
-
evaluate(condition: string, context: DiscretionContext): Promise<boolean>;
|
|
57
|
-
/** Get the log of all evaluations performed. */
|
|
58
|
-
getLog(): ReadonlyArray<{
|
|
59
|
-
condition: string;
|
|
60
|
-
context: DiscretionContext;
|
|
61
|
-
result: boolean;
|
|
62
|
-
}>;
|
|
63
|
-
/** Reset the evaluation log. */
|
|
64
|
-
clearLog(): void;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Wraps a discretion evaluator with rate limiting.
|
|
68
|
-
*
|
|
69
|
-
* Enforces a configurable maximum number of discretion evaluations per
|
|
70
|
-
* workflow execution. Default limit is 100 per the spec. This prevents
|
|
71
|
-
* runaway costs from loops containing discretion conditions.
|
|
72
|
-
*/
|
|
73
|
-
export declare class RateLimitedDiscretionEvaluator implements DiscretionEvaluator {
|
|
74
|
-
private readonly inner;
|
|
75
|
-
private readonly maxEvaluations;
|
|
76
|
-
private evaluationCount;
|
|
77
|
-
/**
|
|
78
|
-
* Creates a rate-limited evaluator wrapper.
|
|
79
|
-
*
|
|
80
|
-
* @param inner - The underlying evaluator to delegate to.
|
|
81
|
-
* @param maxEvaluations - Maximum evaluations allowed (default: 100).
|
|
82
|
-
*/
|
|
83
|
-
constructor(inner: DiscretionEvaluator, maxEvaluations?: number);
|
|
84
|
-
/**
|
|
85
|
-
* Evaluate with rate limiting.
|
|
86
|
-
*
|
|
87
|
-
* @throws {Error} If the evaluation count exceeds the configured maximum.
|
|
88
|
-
*/
|
|
89
|
-
evaluate(condition: string, context: DiscretionContext): Promise<boolean>;
|
|
90
|
-
/** Get the current evaluation count. */
|
|
91
|
-
getEvaluationCount(): number;
|
|
92
|
-
/** Reset the evaluation counter (for reuse across workflow runs). */
|
|
93
|
-
resetCount(): void;
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=discretion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discretion.d.ts","sourceRoot":"","sources":["../../src/cant/discretion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAMpD,uEAAuE;AACvE,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3E;AAMD;;;;;;;;;GASG;AACH,qBAAa,0BAA2B,YAAW,mBAAmB;IACpE,oCAAoC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;CAGlF;AAMD;;;;GAIG;AACH,qBAAa,uBAAwB,YAAW,mBAAmB;IACjE,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,aAAa,CAChB;IAEL;;;;OAIG;gBACS,eAAe,UAAO;IAIlC,sDAAsD;IACtD,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI;IAIrD,kDAAkD;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAM/E,gDAAgD;IAChD,MAAM,IAAI,aAAa,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,iBAAiB,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAI3F,gCAAgC;IAChC,QAAQ,IAAI,IAAI;CAGjB;AAMD;;;;;;GAMG;AACH,qBAAa,8BAA+B,YAAW,mBAAmB;IAUtE,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAVjC,OAAO,CAAC,eAAe,CAAK;IAE5B;;;;;OAKG;gBAEgB,KAAK,EAAE,mBAAmB,EAC1B,cAAc,GAAE,MAAY;IAG/C;;;;OAIG;IACG,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IAW/E,wCAAwC;IACxC,kBAAkB,IAAI,MAAM;IAI5B,qEAAqE;IACrE,UAAU,IAAI,IAAI;CAGnB"}
|