@cleocode/core 2026.9.21 → 2026.9.23
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/agents/scaffold.d.ts.map +1 -1
- package/dist/agents/scaffold.js +0 -1
- package/dist/agents/scaffold.js.map +1 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +4 -0
- package/dist/bootstrap.js.map +1 -1
- package/dist/build-provenance.json +6 -0
- package/dist/decide/audit.d.ts +7 -1
- package/dist/decide/audit.d.ts.map +1 -1
- package/dist/decide/audit.js.map +1 -1
- package/dist/decide/client.d.ts +46 -4
- package/dist/decide/client.d.ts.map +1 -1
- package/dist/decide/client.js +328 -33
- package/dist/decide/client.js.map +1 -1
- package/dist/decide/credentials.d.ts +28 -4
- package/dist/decide/credentials.d.ts.map +1 -1
- package/dist/decide/credentials.js +50 -12
- package/dist/decide/credentials.js.map +1 -1
- package/dist/decide/index.d.ts +10 -4
- package/dist/decide/index.d.ts.map +1 -1
- package/dist/decide/index.js +10 -4
- package/dist/decide/index.js.map +1 -1
- package/dist/decide/jev-wire.d.ts +100 -8
- package/dist/decide/jev-wire.d.ts.map +1 -1
- package/dist/decide/jev-wire.js +402 -55
- package/dist/decide/jev-wire.js.map +1 -1
- package/dist/decide/operations.d.ts +97 -20
- package/dist/decide/operations.d.ts.map +1 -1
- package/dist/decide/operations.js +180 -28
- package/dist/decide/operations.js.map +1 -1
- package/dist/decide/provider-state.d.ts +89 -0
- package/dist/decide/provider-state.d.ts.map +1 -0
- package/dist/decide/provider-state.js +134 -0
- package/dist/decide/provider-state.js.map +1 -0
- package/dist/decide/provider.d.ts +26 -5
- package/dist/decide/provider.d.ts.map +1 -1
- package/dist/decide/provider.js.map +1 -1
- package/dist/decide/providers.d.ts +58 -0
- package/dist/decide/providers.d.ts.map +1 -0
- package/dist/decide/providers.js +69 -0
- package/dist/decide/providers.js.map +1 -0
- package/dist/decide/site.d.ts +2 -2
- package/dist/decide/site.d.ts.map +1 -1
- package/dist/decide/site.js +2 -0
- package/dist/decide/site.js.map +1 -1
- package/dist/decide/sites/list.d.ts +46 -0
- package/dist/decide/sites/list.d.ts.map +1 -0
- package/dist/decide/sites/list.js +206 -0
- package/dist/decide/sites/list.js.map +1 -0
- package/dist/decide/sites/registry.d.ts +130 -0
- package/dist/decide/sites/registry.d.ts.map +1 -0
- package/dist/decide/sites/registry.js +375 -0
- package/dist/decide/sites/registry.js.map +1 -0
- package/dist/decide/spend.d.ts +196 -0
- package/dist/decide/spend.d.ts.map +1 -0
- package/dist/decide/spend.js +387 -0
- package/dist/decide/spend.js.map +1 -0
- package/dist/decide/wizard.d.ts +53 -0
- package/dist/decide/wizard.d.ts.map +1 -0
- package/dist/decide/wizard.js +144 -0
- package/dist/decide/wizard.js.map +1 -0
- package/dist/dispatch/mutate-projection.d.ts.map +1 -1
- package/dist/dispatch/mutate-projection.js +5 -0
- package/dist/dispatch/mutate-projection.js.map +1 -1
- package/dist/docs/docs-audit.d.ts.map +1 -1
- package/dist/docs/docs-audit.js +1 -2
- package/dist/docs/docs-audit.js.map +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +25 -9
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/export-document.js +1073 -628
- package/dist/docs/export-document.js.map +3 -3
- package/dist/doctor/knowledge.d.ts +16 -1
- package/dist/doctor/knowledge.d.ts.map +1 -1
- package/dist/doctor/knowledge.js +53 -17
- package/dist/doctor/knowledge.js.map +1 -1
- package/dist/engine/engine-ops.d.ts +36 -6
- package/dist/engine/engine-ops.d.ts.map +1 -1
- package/dist/engine/engine-ops.js +115 -14
- package/dist/engine/engine-ops.js.map +1 -1
- package/dist/gateway-client/generated/types.gen.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/init/scaffold-workflows.d.ts.map +1 -1
- package/dist/init/scaffold-workflows.js +6 -3
- package/dist/init/scaffold-workflows.js.map +1 -1
- package/dist/init/upgrade-workflows.d.ts.map +1 -1
- package/dist/init/upgrade-workflows.js +6 -3
- package/dist/init/upgrade-workflows.js.map +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +51 -11
- package/dist/init.js.map +1 -1
- package/dist/inject/index.d.ts.map +1 -1
- package/dist/inject/index.js +8 -3
- package/dist/inject/index.js.map +1 -1
- package/dist/internal.d.ts +3 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +2 -2
- package/dist/internal.js.map +1 -1
- package/dist/llm/plugin-facade.js +1184 -739
- package/dist/llm/plugin-facade.js.map +3 -3
- package/dist/memory/attention.d.ts.map +1 -1
- package/dist/memory/attention.js +2 -2
- package/dist/memory/attention.js.map +1 -1
- package/dist/memory/decision-contradiction.d.ts +3 -3
- package/dist/memory/decision-contradiction.d.ts.map +1 -1
- package/dist/memory/decision-contradiction.js +4 -3
- package/dist/memory/decision-contradiction.js.map +1 -1
- package/dist/memory/graph-memory-bridge.d.ts.map +1 -1
- package/dist/memory/graph-memory-bridge.js +2 -0
- package/dist/memory/graph-memory-bridge.js.map +1 -1
- package/dist/memory/observation-type-decision.d.ts +2 -2
- package/dist/memory/observation-type-decision.d.ts.map +1 -1
- package/dist/memory/observation-type-decision.js +3 -2
- package/dist/memory/observation-type-decision.js.map +1 -1
- package/dist/memory/pipeline-manifest-sqlite.d.ts +111 -0
- package/dist/memory/pipeline-manifest-sqlite.d.ts.map +1 -1
- package/dist/memory/pipeline-manifest-sqlite.js +230 -2
- package/dist/memory/pipeline-manifest-sqlite.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts +38 -0
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +96 -21
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/knowledge.d.ts.map +1 -1
- package/dist/nexus/knowledge.js +15 -4
- package/dist/nexus/knowledge.js.map +1 -1
- package/dist/nexus/migrations/M-split-graph.d.ts.map +1 -1
- package/dist/nexus/migrations/M-split-graph.js +4 -0
- package/dist/nexus/migrations/M-split-graph.js.map +1 -1
- package/dist/nexus/store.d.ts.map +1 -1
- package/dist/nexus/store.js +2 -0
- package/dist/nexus/store.js.map +1 -1
- package/dist/nexus/stored-roots.d.ts +65 -0
- package/dist/nexus/stored-roots.d.ts.map +1 -1
- package/dist/nexus/stored-roots.js +73 -0
- package/dist/nexus/stored-roots.js.map +1 -1
- package/dist/orchestrate/lifecycle-ops.d.ts.map +1 -1
- package/dist/orchestrate/lifecycle-ops.js +4 -1
- package/dist/orchestrate/lifecycle-ops.js.map +1 -1
- package/dist/orchestrate/pivot.d.ts.map +1 -1
- package/dist/orchestrate/pivot.js +13 -8
- package/dist/orchestrate/pivot.js.map +1 -1
- package/dist/orchestrate/plan.d.ts.map +1 -1
- package/dist/orchestrate/plan.js +8 -2
- package/dist/orchestrate/plan.js.map +1 -1
- package/dist/orchestrate/query-ops.d.ts +7 -2
- package/dist/orchestrate/query-ops.d.ts.map +1 -1
- package/dist/orchestrate/query-ops.js +17 -6
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +5 -14
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/bootstrap.d.ts.map +1 -1
- package/dist/orchestration/bootstrap.js +4 -2
- package/dist/orchestration/bootstrap.js.map +1 -1
- package/dist/orchestration/index.d.ts +1 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +4 -3
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/lead-rollup.d.ts +8 -5
- package/dist/orchestration/lead-rollup.d.ts.map +1 -1
- package/dist/orchestration/lead-rollup.js +46 -17
- package/dist/orchestration/lead-rollup.js.map +1 -1
- package/dist/orchestration/owner-decision-readiness.d.ts +2 -2
- package/dist/orchestration/owner-decision-readiness.d.ts.map +1 -1
- package/dist/orchestration/owner-decision-readiness.js +3 -2
- package/dist/orchestration/owner-decision-readiness.js.map +1 -1
- package/dist/orchestration/parallel.d.ts.map +1 -1
- package/dist/orchestration/parallel.js +10 -17
- package/dist/orchestration/parallel.js.map +1 -1
- package/dist/orchestration/spawn-prompt.d.ts +4 -1
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +3 -2
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/orchestration/status.d.ts +8 -3
- package/dist/orchestration/status.d.ts.map +1 -1
- package/dist/orchestration/status.js +9 -6
- package/dist/orchestration/status.js.map +1 -1
- package/dist/orchestration/validate-spawn.d.ts.map +1 -1
- package/dist/orchestration/validate-spawn.js +2 -0
- package/dist/orchestration/validate-spawn.js.map +1 -1
- package/dist/orchestration/wave-topic.d.ts +54 -0
- package/dist/orchestration/wave-topic.d.ts.map +1 -0
- package/dist/orchestration/wave-topic.js +68 -0
- package/dist/orchestration/wave-topic.js.map +1 -0
- package/dist/orchestration/waves.d.ts +47 -8
- package/dist/orchestration/waves.d.ts.map +1 -1
- package/dist/orchestration/waves.js +152 -43
- package/dist/orchestration/waves.js.map +1 -1
- package/dist/phases/index.d.ts.map +1 -1
- package/dist/phases/index.js +6 -2
- package/dist/phases/index.js.map +1 -1
- package/dist/project-scope.d.ts +34 -0
- package/dist/project-scope.d.ts.map +1 -1
- package/dist/project-scope.js +73 -0
- package/dist/project-scope.js.map +1 -1
- package/dist/release/ci-evidence.d.ts +10 -0
- package/dist/release/ci-evidence.d.ts.map +1 -1
- package/dist/release/ci-evidence.js +23 -7
- package/dist/release/ci-evidence.js.map +1 -1
- package/dist/release/github-pr.d.ts +30 -0
- package/dist/release/github-pr.d.ts.map +1 -1
- package/dist/release/github-pr.js +42 -1
- package/dist/release/github-pr.js.map +1 -1
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +6 -3
- package/dist/release/plan.js.map +1 -1
- package/dist/release/pr-evidence.d.ts.map +1 -1
- package/dist/release/pr-evidence.js +12 -4
- package/dist/release/pr-evidence.js.map +1 -1
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/routing/capability-matrix.js +7 -0
- package/dist/routing/capability-matrix.js.map +1 -1
- package/dist/security/input-sanitization.d.ts.map +1 -1
- package/dist/security/input-sanitization.js +9 -2
- package/dist/security/input-sanitization.js.map +1 -1
- package/dist/selfimprove/fix-gen.js +1193 -748
- package/dist/selfimprove/fix-gen.js.map +3 -3
- package/dist/session/engine-ops.d.ts +6 -0
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +36 -4
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/sessions/briefing.d.ts +17 -0
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +68 -68
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/drift-watchdog.d.ts.map +1 -1
- package/dist/sessions/drift-watchdog.js +4 -3
- package/dist/sessions/drift-watchdog.js.map +1 -1
- package/dist/sessions/focus-state-store.d.ts +94 -1
- package/dist/sessions/focus-state-store.d.ts.map +1 -1
- package/dist/sessions/focus-state-store.js +100 -1
- package/dist/sessions/focus-state-store.js.map +1 -1
- package/dist/sessions/index.d.ts +2 -2
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +1 -1
- package/dist/sessions/index.js.map +1 -1
- package/dist/sessions/session-drift.d.ts.map +1 -1
- package/dist/sessions/session-drift.js +4 -3
- package/dist/sessions/session-drift.js.map +1 -1
- package/dist/setup/config-json-merge.d.ts +28 -0
- package/dist/setup/config-json-merge.d.ts.map +1 -1
- package/dist/setup/config-json-merge.js +51 -0
- package/dist/setup/config-json-merge.js.map +1 -1
- package/dist/setup/index.d.ts +13 -10
- package/dist/setup/index.d.ts.map +1 -1
- package/dist/setup/index.js +15 -10
- package/dist/setup/index.js.map +1 -1
- package/dist/setup/sections/llm.js +1 -1
- package/dist/setup/sections/llm.js.map +1 -1
- package/dist/setup/sections/system-one.d.ts +28 -0
- package/dist/setup/sections/system-one.d.ts.map +1 -0
- package/dist/setup/sections/system-one.js +53 -0
- package/dist/setup/sections/system-one.js.map +1 -0
- package/dist/setup/wizard.d.ts +15 -1
- package/dist/setup/wizard.d.ts.map +1 -1
- package/dist/setup/wizard.js +15 -0
- package/dist/setup/wizard.js.map +1 -1
- package/dist/skills/discovery.d.ts +12 -1
- package/dist/skills/discovery.d.ts.map +1 -1
- package/dist/skills/discovery.js +27 -2
- package/dist/skills/discovery.js.map +1 -1
- package/dist/skills/orchestrator/startup.d.ts.map +1 -1
- package/dist/skills/orchestrator/startup.js +10 -5
- package/dist/skills/orchestrator/startup.js.map +1 -1
- package/dist/skills/prune-bundled.d.ts +306 -0
- package/dist/skills/prune-bundled.d.ts.map +1 -0
- package/dist/skills/prune-bundled.js +652 -0
- package/dist/skills/prune-bundled.js.map +1 -0
- package/dist/skills/types.d.ts +9 -1
- package/dist/skills/types.d.ts.map +1 -1
- package/dist/skills/types.js +17 -34
- package/dist/skills/types.js.map +1 -1
- package/dist/spawn/branch-lock.d.ts.map +1 -1
- package/dist/spawn/branch-lock.js +26 -2
- package/dist/spawn/branch-lock.js.map +1 -1
- package/dist/stats/index.d.ts.map +1 -1
- package/dist/stats/index.js +4 -2
- package/dist/stats/index.js.map +1 -1
- package/dist/store/agent-registry-accessor.d.ts.map +1 -1
- package/dist/store/agent-registry-accessor.js +2 -0
- package/dist/store/agent-registry-accessor.js.map +1 -1
- package/dist/store/backup-pack.js +1 -1
- package/dist/store/backup-pack.js.map +1 -1
- package/dist/store/backup.d.ts +15 -1
- package/dist/store/backup.d.ts.map +1 -1
- package/dist/store/backup.js +18 -2
- package/dist/store/backup.js.map +1 -1
- package/dist/store/conduit-sqlite.d.ts.map +1 -1
- package/dist/store/conduit-sqlite.js +3 -0
- package/dist/store/conduit-sqlite.js.map +1 -1
- package/dist/store/credential-transfer.d.ts.map +1 -1
- package/dist/store/credential-transfer.js +2 -0
- package/dist/store/credential-transfer.js.map +1 -1
- package/dist/store/cross-db-cleanup.d.ts.map +1 -1
- package/dist/store/cross-db-cleanup.js +2 -0
- package/dist/store/cross-db-cleanup.js.map +1 -1
- package/dist/store/dual-scope-db.d.ts.map +1 -1
- package/dist/store/dual-scope-db.js +13 -2
- package/dist/store/dual-scope-db.js.map +1 -1
- package/dist/store/migrate-signaldock-to-conduit.d.ts.map +1 -1
- package/dist/store/migrate-signaldock-to-conduit.js +3 -0
- package/dist/store/migrate-signaldock-to-conduit.js.map +1 -1
- package/dist/store/migration-manager.d.ts.map +1 -1
- package/dist/store/migration-manager.js +37 -3
- package/dist/store/migration-manager.js.map +1 -1
- package/dist/store/migration-sqlite.d.ts.map +1 -1
- package/dist/store/migration-sqlite.js +2 -0
- package/dist/store/migration-sqlite.js.map +1 -1
- package/dist/store/nexus-sqlite.d.ts.map +1 -1
- package/dist/store/nexus-sqlite.js +3 -0
- package/dist/store/nexus-sqlite.js.map +1 -1
- package/dist/store/open-cleo-db.d.ts.map +1 -1
- package/dist/store/open-cleo-db.js +3 -0
- package/dist/store/open-cleo-db.js.map +1 -1
- package/dist/store/portable-bundle-import.d.ts.map +1 -1
- package/dist/store/portable-bundle-import.js +2 -0
- package/dist/store/portable-bundle-import.js.map +1 -1
- package/dist/store/portable-bundle-relocate.d.ts.map +1 -1
- package/dist/store/portable-bundle-relocate.js +2 -0
- package/dist/store/portable-bundle-relocate.js.map +1 -1
- package/dist/store/portable-bundle-scan.js +1 -1
- package/dist/store/portable-bundle-scan.js.map +1 -1
- package/dist/store/ports/domain-binding.d.ts.map +1 -1
- package/dist/store/ports/domain-binding.js +5 -0
- package/dist/store/ports/domain-binding.js.map +1 -1
- package/dist/store/skills-db.d.ts +17 -0
- package/dist/store/skills-db.d.ts.map +1 -1
- package/dist/store/skills-db.js +30 -0
- package/dist/store/skills-db.js.map +1 -1
- package/dist/store/snapshot-gate.d.ts.map +1 -1
- package/dist/store/snapshot-gate.js +3 -0
- package/dist/store/snapshot-gate.js.map +1 -1
- package/dist/store/split-brain-import.d.ts.map +1 -1
- package/dist/store/split-brain-import.js +2 -0
- package/dist/store/split-brain-import.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +19 -2
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/store/sqlite-native.d.ts.map +1 -1
- package/dist/store/sqlite-native.js +1 -0
- package/dist/store/sqlite-native.js.map +1 -1
- package/dist/store/sqlite.d.ts +14 -0
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.js +31 -4
- package/dist/store/sqlite.js.map +1 -1
- package/dist/store/twin-collapse.d.ts +46 -1
- package/dist/store/twin-collapse.d.ts.map +1 -1
- package/dist/store/twin-collapse.js +131 -5
- package/dist/store/twin-collapse.js.map +1 -1
- package/dist/store/worktree-build-guard.d.ts +191 -0
- package/dist/store/worktree-build-guard.d.ts.map +1 -0
- package/dist/store/worktree-build-guard.js +486 -0
- package/dist/store/worktree-build-guard.js.map +1 -0
- package/dist/store/worktree-isolation-guard.d.ts +27 -0
- package/dist/store/worktree-isolation-guard.d.ts.map +1 -1
- package/dist/store/worktree-isolation-guard.js +71 -3
- package/dist/store/worktree-isolation-guard.js.map +1 -1
- package/dist/store/writer-lease.d.ts.map +1 -1
- package/dist/store/writer-lease.js +2 -0
- package/dist/store/writer-lease.js.map +1 -1
- package/dist/system/backup.d.ts +6 -2
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +6 -3
- package/dist/system/backup.js.map +1 -1
- package/dist/system/inject-generate.d.ts.map +1 -1
- package/dist/system/inject-generate.js +4 -4
- package/dist/system/inject-generate.js.map +1 -1
- package/dist/task-tools/index.d.ts +4 -2
- package/dist/task-tools/index.d.ts.map +1 -1
- package/dist/task-tools/index.js +3 -2
- package/dist/task-tools/index.js.map +1 -1
- package/dist/task-tools/score-task-priority.d.ts +93 -18
- package/dist/task-tools/score-task-priority.d.ts.map +1 -1
- package/dist/task-tools/score-task-priority.js +193 -81
- package/dist/task-tools/score-task-priority.js.map +1 -1
- package/dist/task-work/index.d.ts +6 -0
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +6 -3
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/affected-packages.d.ts +62 -13
- package/dist/tasks/affected-packages.d.ts.map +1 -1
- package/dist/tasks/affected-packages.js +158 -33
- package/dist/tasks/affected-packages.js.map +1 -1
- package/dist/tasks/affected-scope.d.ts +59 -0
- package/dist/tasks/affected-scope.d.ts.map +1 -0
- package/dist/tasks/affected-scope.js +81 -0
- package/dist/tasks/affected-scope.js.map +1 -0
- package/dist/tasks/analyze.d.ts +29 -1
- package/dist/tasks/analyze.d.ts.map +1 -1
- package/dist/tasks/analyze.js +52 -36
- package/dist/tasks/analyze.js.map +1 -1
- package/dist/tasks/backfill-child-projections.d.ts.map +1 -1
- package/dist/tasks/backfill-child-projections.js +4 -1
- package/dist/tasks/backfill-child-projections.js.map +1 -1
- package/dist/tasks/change-set.d.ts +24 -0
- package/dist/tasks/change-set.d.ts.map +1 -1
- package/dist/tasks/change-set.js +143 -11
- package/dist/tasks/change-set.js.map +1 -1
- package/dist/tasks/command-line.d.ts +54 -0
- package/dist/tasks/command-line.d.ts.map +1 -0
- package/dist/tasks/command-line.js +151 -0
- package/dist/tasks/command-line.js.map +1 -0
- package/dist/tasks/complete.d.ts +10 -0
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +49 -0
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/component-pr.d.ts +106 -0
- package/dist/tasks/component-pr.d.ts.map +1 -0
- package/dist/tasks/component-pr.js +275 -0
- package/dist/tasks/component-pr.js.map +1 -0
- package/dist/tasks/delete.d.ts.map +1 -1
- package/dist/tasks/delete.js +20 -0
- package/dist/tasks/delete.js.map +1 -1
- package/dist/tasks/done-plan.d.ts +21 -1
- package/dist/tasks/done-plan.d.ts.map +1 -1
- package/dist/tasks/done-plan.js +170 -15
- package/dist/tasks/done-plan.js.map +1 -1
- package/dist/tasks/done-record.d.ts.map +1 -1
- package/dist/tasks/done-record.js +9 -80
- package/dist/tasks/done-record.js.map +1 -1
- package/dist/tasks/duplicate-detector.d.ts +3 -3
- package/dist/tasks/duplicate-detector.d.ts.map +1 -1
- package/dist/tasks/duplicate-detector.js +4 -3
- package/dist/tasks/duplicate-detector.js.map +1 -1
- package/dist/tasks/engine-wrap-ops.d.ts +29 -0
- package/dist/tasks/engine-wrap-ops.d.ts.map +1 -1
- package/dist/tasks/engine-wrap-ops.js +40 -0
- package/dist/tasks/engine-wrap-ops.js.map +1 -1
- package/dist/tasks/engine-wrap.d.ts +1 -1
- package/dist/tasks/engine-wrap.d.ts.map +1 -1
- package/dist/tasks/engine-wrap.js +1 -1
- package/dist/tasks/engine-wrap.js.map +1 -1
- package/dist/tasks/evidence.d.ts +49 -2
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +85 -9
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/gate-runner.d.ts.map +1 -1
- package/dist/tasks/gate-runner.js +48 -12
- package/dist/tasks/gate-runner.js.map +1 -1
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +1 -1
- package/dist/tasks/index.js.map +1 -1
- package/dist/tasks/ops.d.ts +1 -0
- package/dist/tasks/ops.d.ts.map +1 -1
- package/dist/tasks/ranking-audit.d.ts +122 -0
- package/dist/tasks/ranking-audit.d.ts.map +1 -0
- package/dist/tasks/ranking-audit.js +193 -0
- package/dist/tasks/ranking-audit.js.map +1 -0
- package/dist/tasks/task-analyze.d.ts.map +1 -1
- package/dist/tasks/task-analyze.js +19 -32
- package/dist/tasks/task-analyze.js.map +1 -1
- package/dist/tasks/task-next.d.ts +48 -2
- package/dist/tasks/task-next.d.ts.map +1 -1
- package/dist/tasks/task-next.js +84 -102
- package/dist/tasks/task-next.js.map +1 -1
- package/dist/tasks/task-ops.d.ts +1 -1
- package/dist/tasks/task-ops.d.ts.map +1 -1
- package/dist/tasks/task-ops.js +1 -1
- package/dist/tasks/task-ops.js.map +1 -1
- package/dist/tasks/tool-resolver.d.ts +7 -1
- package/dist/tasks/tool-resolver.d.ts.map +1 -1
- package/dist/tasks/tool-resolver.js +24 -10
- package/dist/tasks/tool-resolver.js.map +1 -1
- package/dist/tasks/update.d.ts +8 -2
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +28 -1
- package/dist/tasks/update.js.map +1 -1
- package/dist/telemetry/sqlite.d.ts.map +1 -1
- package/dist/telemetry/sqlite.js +2 -0
- package/dist/telemetry/sqlite.js.map +1 -1
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +2 -2
- package/dist/validation/doctor/checks.js.map +1 -1
- package/dist/validation/engine-ops.d.ts +9 -1
- package/dist/validation/engine-ops.d.ts.map +1 -1
- package/dist/validation/engine-ops.js +24 -1
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/dist/validation/validate-ops.js +9 -3
- package/dist/validation/validate-ops.js.map +1 -1
- package/dist/worktree/worktree-adopt.d.ts.map +1 -1
- package/dist/worktree/worktree-adopt.js +5 -2
- package/dist/worktree/worktree-adopt.js.map +1 -1
- package/package.json +14 -14
- package/schemas/config.schema.json +13 -0
- package/templates/CLEO-INJECTION.md +1 -1
- package/templates/CLEO-REFERENCE.md +5 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `cleo decide sites` — list every registered decision site with its rung,
|
|
3
|
+
* ladder, fallback, owner-escalation rule, configured and effective mode,
|
|
4
|
+
* go-live evidence and last-7-day audit activity (spec
|
|
5
|
+
* `system-one-integration` §3.4).
|
|
6
|
+
*
|
|
7
|
+
* Read-only. The effective mode follows the rule `resolveDecisionSiteSettings`
|
|
8
|
+
* applies at the call sites: a site that uses System One (as its primary rung
|
|
9
|
+
* or on its ladder) is `off` while no provider is configured.
|
|
10
|
+
*
|
|
11
|
+
* @task T12662
|
|
12
|
+
* @epic T12486
|
|
13
|
+
*/
|
|
14
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
15
|
+
import { join } from 'node:path';
|
|
16
|
+
import { DECISION_AUDIT_FILE, DEFAULT_DECISION_AUDIT_KEEP } from '../audit.js';
|
|
17
|
+
import { isDecisionSiteMode } from '../site.js';
|
|
18
|
+
import { DECISION_SITES } from './registry.js';
|
|
19
|
+
/** Window for {@link DecisionSiteSummary.last7d}, ms. */
|
|
20
|
+
export const DECISION_SITE_ACTIVITY_WINDOW_MS = 7 * 24 * 60 * 60 * 1000;
|
|
21
|
+
/** Whether a site asks System One at all (primary rung or ladder). */
|
|
22
|
+
function usesSystemOne(site) {
|
|
23
|
+
return site.primaryRung === 'system-one' || site.ladder.includes('system-one');
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Audit lines from the live `decisions.jsonl` and its rotated generations,
|
|
27
|
+
* newest generation first. Rotation only moves older lines down, so once a
|
|
28
|
+
* whole generation predates `since`, every older one does too and reading
|
|
29
|
+
* stops there. Unreadable files and malformed lines are skipped.
|
|
30
|
+
*
|
|
31
|
+
* @param projectRoot - Project root.
|
|
32
|
+
* @param since - Start of the window, epoch ms.
|
|
33
|
+
* @returns Parsed lines from the generations that can reach the window.
|
|
34
|
+
*/
|
|
35
|
+
function readAuditLines(projectRoot, since) {
|
|
36
|
+
const live = join(projectRoot, DECISION_AUDIT_FILE);
|
|
37
|
+
const files = [live];
|
|
38
|
+
for (let n = 1; n <= DEFAULT_DECISION_AUDIT_KEEP; n++)
|
|
39
|
+
files.push(`${live}.${n}`);
|
|
40
|
+
const lines = [];
|
|
41
|
+
for (const file of files) {
|
|
42
|
+
if (!existsSync(file))
|
|
43
|
+
continue;
|
|
44
|
+
let text;
|
|
45
|
+
try {
|
|
46
|
+
text = readFileSync(file, 'utf-8');
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
let newest = Number.NEGATIVE_INFINITY;
|
|
52
|
+
const parsedLines = [];
|
|
53
|
+
for (const raw of text.split('\n')) {
|
|
54
|
+
if (raw.trim() === '')
|
|
55
|
+
continue;
|
|
56
|
+
try {
|
|
57
|
+
const parsed = JSON.parse(raw);
|
|
58
|
+
if (!parsed || typeof parsed !== 'object')
|
|
59
|
+
continue;
|
|
60
|
+
const line = parsed;
|
|
61
|
+
parsedLines.push(line);
|
|
62
|
+
const at = typeof line.timestamp === 'string' ? Date.parse(line.timestamp) : Number.NaN;
|
|
63
|
+
if (!Number.isNaN(at) && at > newest)
|
|
64
|
+
newest = at;
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// malformed line
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (parsedLines.length > 0 && newest < since)
|
|
71
|
+
break;
|
|
72
|
+
lines.push(...parsedLines);
|
|
73
|
+
}
|
|
74
|
+
return lines;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Per-site activity over the window ending at `now`.
|
|
78
|
+
*
|
|
79
|
+
* @param lines - Parsed audit lines.
|
|
80
|
+
* @param now - End of the window.
|
|
81
|
+
* @returns Site id → counts.
|
|
82
|
+
*/
|
|
83
|
+
function activityBySite(lines, now) {
|
|
84
|
+
const since = now.getTime() - DECISION_SITE_ACTIVITY_WINDOW_MS;
|
|
85
|
+
const acc = new Map();
|
|
86
|
+
for (const line of lines) {
|
|
87
|
+
if (typeof line.site !== 'string' || typeof line.timestamp !== 'string')
|
|
88
|
+
continue;
|
|
89
|
+
const at = Date.parse(line.timestamp);
|
|
90
|
+
if (Number.isNaN(at) || at < since || at > now.getTime())
|
|
91
|
+
continue;
|
|
92
|
+
const a = acc.get(line.site) ?? {
|
|
93
|
+
asked: 0,
|
|
94
|
+
provider: 0,
|
|
95
|
+
cache: 0,
|
|
96
|
+
fallback: 0,
|
|
97
|
+
escalated: 0,
|
|
98
|
+
compared: 0,
|
|
99
|
+
agreed: 0,
|
|
100
|
+
};
|
|
101
|
+
a.asked++;
|
|
102
|
+
if (line.source === 'provider')
|
|
103
|
+
a.provider++;
|
|
104
|
+
else if (line.source === 'cache')
|
|
105
|
+
a.cache++;
|
|
106
|
+
else if (line.source === 'fallback')
|
|
107
|
+
a.fallback++;
|
|
108
|
+
if (line.escalatedFrom !== undefined)
|
|
109
|
+
a.escalated++;
|
|
110
|
+
const agree = line.shadow?.agree;
|
|
111
|
+
if (typeof agree === 'boolean') {
|
|
112
|
+
a.compared++;
|
|
113
|
+
if (agree)
|
|
114
|
+
a.agreed++;
|
|
115
|
+
}
|
|
116
|
+
acc.set(line.site, a);
|
|
117
|
+
}
|
|
118
|
+
const out = new Map();
|
|
119
|
+
for (const [site, a] of acc) {
|
|
120
|
+
out.set(site, {
|
|
121
|
+
asked: a.asked,
|
|
122
|
+
provider: a.provider,
|
|
123
|
+
cache: a.cache,
|
|
124
|
+
fallback: a.fallback,
|
|
125
|
+
escalated: a.escalated,
|
|
126
|
+
...(a.compared > 0 ? { agreement: a.agreed / a.compared } : {}),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return out;
|
|
130
|
+
}
|
|
131
|
+
const NO_ACTIVITY = {
|
|
132
|
+
asked: 0,
|
|
133
|
+
provider: 0,
|
|
134
|
+
cache: 0,
|
|
135
|
+
fallback: 0,
|
|
136
|
+
escalated: 0,
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* List the registered decision sites with their configured and effective
|
|
140
|
+
* modes and recent activity. Never throws on unreadable config or audit.
|
|
141
|
+
*
|
|
142
|
+
* @param opts - Filters and injectable dependencies.
|
|
143
|
+
* @returns Provider state, registry size and the matching sites.
|
|
144
|
+
*/
|
|
145
|
+
export async function listDecisionSites(opts = {}) {
|
|
146
|
+
const sites = opts.sites ?? DECISION_SITES;
|
|
147
|
+
let projectRoot = opts.projectRoot;
|
|
148
|
+
if (projectRoot === undefined) {
|
|
149
|
+
const { getProjectRoot } = await import('../../paths.js');
|
|
150
|
+
projectRoot = getProjectRoot();
|
|
151
|
+
}
|
|
152
|
+
let providerConfigured = opts.providerConfigured;
|
|
153
|
+
if (providerConfigured === undefined) {
|
|
154
|
+
try {
|
|
155
|
+
const { loadDecideConnection } = await import('../credentials.js');
|
|
156
|
+
providerConfigured = loadDecideConnection() !== null;
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
providerConfigured = false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const readConfig = opts.readConfig ??
|
|
163
|
+
(async (key, root) => {
|
|
164
|
+
const { getConfigValue } = await import('../../config/registry.js');
|
|
165
|
+
return getConfigValue(key, { projectRoot: root });
|
|
166
|
+
});
|
|
167
|
+
const now = opts.now ?? new Date();
|
|
168
|
+
const activity = activityBySite(readAuditLines(projectRoot, now.getTime() - DECISION_SITE_ACTIVITY_WINDOW_MS), now);
|
|
169
|
+
const summaries = [];
|
|
170
|
+
for (const site of sites) {
|
|
171
|
+
let configuredMode;
|
|
172
|
+
if (site.modeKey !== undefined) {
|
|
173
|
+
try {
|
|
174
|
+
const value = await readConfig(site.modeKey, projectRoot);
|
|
175
|
+
if (isDecisionSiteMode(value))
|
|
176
|
+
configuredMode = value;
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
// unreadable config → default
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const effectiveMode = usesSystemOne(site) && !providerConfigured ? 'off' : (configuredMode ?? site.defaultMode);
|
|
183
|
+
summaries.push({
|
|
184
|
+
id: site.id,
|
|
185
|
+
title: site.title,
|
|
186
|
+
questionType: site.questionType,
|
|
187
|
+
primaryRung: site.primaryRung,
|
|
188
|
+
ladder: site.ladder,
|
|
189
|
+
fallback: site.fallback,
|
|
190
|
+
ownerEscalation: site.ownerEscalation,
|
|
191
|
+
mode: site.defaultMode,
|
|
192
|
+
...(configuredMode !== undefined ? { configuredMode } : {}),
|
|
193
|
+
effectiveMode,
|
|
194
|
+
...(site.modeKey !== undefined ? { modeKey: site.modeKey } : {}),
|
|
195
|
+
...(site.goLive !== undefined ? { goLive: site.goLive } : {}),
|
|
196
|
+
task: site.task,
|
|
197
|
+
last7d: activity.get(site.id) ?? NO_ACTIVITY,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const matching = summaries.filter((s) => (opts.id === undefined || s.id === opts.id) &&
|
|
201
|
+
(opts.rung === undefined || s.primaryRung === opts.rung) &&
|
|
202
|
+
(opts.mode === undefined || s.effectiveMode === opts.mode) &&
|
|
203
|
+
(opts.evidenceOnly !== true || s.goLive !== undefined));
|
|
204
|
+
return { providerConfigured, total: sites.length, sites: matching };
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/decide/sites/list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AASjC,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,yDAAyD;AACzD,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAwBxE,sEAAsE;AACtE,SAAS,aAAa,CAAC,IAA4B;IACjD,OAAO,IAAI,CAAC,WAAW,KAAK,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AACjF,CAAC;AAWD;;;;;;;;;GASG;AACH,SAAS,cAAc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CAAC,CAAC,EAAE,CAAC;YAC7D,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,WAAW;SAC7C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,IAAI,CAAC,EAAE,KAAK,SAAS,IAAI,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QAC3C,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC;QACxD,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,aAAa,KAAK,IAAI,CAAC,IAAI,CAAC;QAC1D,CAAC,IAAI,CAAC,YAAY,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,SAAS,CAAC,CACzD,CAAC;IACF,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AACtE,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The decision-site registry — every place CLEO makes a judgement, with its
|
|
3
|
+
* rung, ladder, fallback, owner-escalation rule, mode and go-live evidence
|
|
4
|
+
* (spec `system-one-integration` §3, D11158; naming and config keys per
|
|
5
|
+
* D11159: the `decide.*` keys stay).
|
|
6
|
+
*
|
|
7
|
+
* Pure data: importing this module loads nothing else, so the call sites can
|
|
8
|
+
* take their ids and config keys from here without a startup cost. Each id
|
|
9
|
+
* string exists once, here; the site modules re-export it under their old
|
|
10
|
+
* constant names (`DUPLICATE_DECISION_SITE` …) so no caller breaks.
|
|
11
|
+
*
|
|
12
|
+
* Phase 1 (T12662) records the sites and changes no behaviour. Executing the
|
|
13
|
+
* ladder (escalation, handoffs) is T12665; the CI gate over it is T12663.
|
|
14
|
+
*
|
|
15
|
+
* @task T12662
|
|
16
|
+
* @epic T12486
|
|
17
|
+
*/
|
|
18
|
+
import type { DecisionSiteDefinition } from '@cleocode/contracts';
|
|
19
|
+
/** `tasks.duplicate-detection` — is a new task a duplicate of an open one (T12492). */
|
|
20
|
+
export declare const DUPLICATE_DETECTION_SITE: {
|
|
21
|
+
readonly id: "tasks.duplicate-detection";
|
|
22
|
+
readonly title: "Duplicate task detection on add";
|
|
23
|
+
readonly files: readonly ["packages/core/src/tasks/duplicate-detector.ts"];
|
|
24
|
+
readonly questionType: "noul";
|
|
25
|
+
readonly primaryRung: "system-one";
|
|
26
|
+
readonly ladder: readonly ["generative"];
|
|
27
|
+
readonly fallback: "rule";
|
|
28
|
+
readonly floors: {
|
|
29
|
+
readonly '*': 0.6;
|
|
30
|
+
};
|
|
31
|
+
readonly ownerEscalation: "never";
|
|
32
|
+
readonly modeKey: "decide.sites.duplicateDetection";
|
|
33
|
+
readonly generativeKey: "decide.generativeFallback.duplicateDetection";
|
|
34
|
+
readonly defaultMode: "shadow";
|
|
35
|
+
readonly llmSystemKey: "consolidation";
|
|
36
|
+
readonly writePath: true;
|
|
37
|
+
readonly sends: readonly ["task-text"];
|
|
38
|
+
readonly task: "T12492";
|
|
39
|
+
readonly note: "Batched noul over at most 3 candidates; rule fallback is Tier-1/Jaccard similarity.";
|
|
40
|
+
};
|
|
41
|
+
/** `memory.decision-contradiction` — does a new decision contradict a stored one (T12493). */
|
|
42
|
+
export declare const DECISION_CONTRADICTION_DECISION_SITE: {
|
|
43
|
+
readonly id: "memory.decision-contradiction";
|
|
44
|
+
readonly title: "Decision contradiction check on store";
|
|
45
|
+
readonly files: readonly ["packages/core/src/memory/decision-contradiction.ts", "packages/core/src/memory/decisions.ts"];
|
|
46
|
+
readonly questionType: "choice";
|
|
47
|
+
readonly primaryRung: "system-one";
|
|
48
|
+
readonly ladder: readonly ["generative"];
|
|
49
|
+
readonly fallback: "rule";
|
|
50
|
+
readonly floors: {
|
|
51
|
+
readonly '*': 0.6;
|
|
52
|
+
};
|
|
53
|
+
readonly ownerEscalation: "never";
|
|
54
|
+
readonly modeKey: "decide.sites.decisionContradiction";
|
|
55
|
+
readonly generativeKey: "decide.generativeFallback.decisionContradiction";
|
|
56
|
+
readonly defaultMode: "shadow";
|
|
57
|
+
readonly writePath: true;
|
|
58
|
+
readonly sends: readonly ["memory-text"];
|
|
59
|
+
readonly task: "T12493";
|
|
60
|
+
readonly note: "Advisory: a contradiction is reported, never blocks the write.";
|
|
61
|
+
};
|
|
62
|
+
/** `memory.observation-type` — which type an observation is (T12494). */
|
|
63
|
+
export declare const OBSERVATION_TYPE_DECISION_SITE: {
|
|
64
|
+
readonly id: "memory.observation-type";
|
|
65
|
+
readonly title: "Observation type classification";
|
|
66
|
+
readonly files: readonly ["packages/core/src/memory/observation-type-decision.ts"];
|
|
67
|
+
readonly questionType: "choice";
|
|
68
|
+
readonly primaryRung: "system-one";
|
|
69
|
+
readonly ladder: readonly [];
|
|
70
|
+
readonly fallback: "rule";
|
|
71
|
+
readonly floors: {
|
|
72
|
+
readonly '*': 0.6;
|
|
73
|
+
};
|
|
74
|
+
readonly ownerEscalation: "never";
|
|
75
|
+
readonly modeKey: "decide.sites.observationType";
|
|
76
|
+
readonly defaultMode: "shadow";
|
|
77
|
+
readonly writePath: true;
|
|
78
|
+
readonly sends: readonly ["memory-text"];
|
|
79
|
+
readonly task: "T12494";
|
|
80
|
+
readonly note: "Interactive observations only; rule fallback is keyword typing.";
|
|
81
|
+
};
|
|
82
|
+
/** `orchestration.owner-decision` — does a task wait on an owner decision (T12494). */
|
|
83
|
+
export declare const OWNER_DECISION_DECISION_SITE: {
|
|
84
|
+
readonly id: "orchestration.owner-decision";
|
|
85
|
+
readonly title: "Owner-decision readiness check";
|
|
86
|
+
readonly files: readonly ["packages/core/src/orchestration/owner-decision-readiness.ts", "packages/core/src/orchestration/classify-readiness.ts"];
|
|
87
|
+
readonly questionType: "noul";
|
|
88
|
+
readonly primaryRung: "rule";
|
|
89
|
+
readonly ladder: readonly ["system-one"];
|
|
90
|
+
readonly fallback: "rule";
|
|
91
|
+
readonly floors: {
|
|
92
|
+
readonly '*': 0.6;
|
|
93
|
+
};
|
|
94
|
+
readonly ownerEscalation: "escalate-only";
|
|
95
|
+
readonly modeKey: "decide.sites.ownerDecision";
|
|
96
|
+
readonly defaultMode: "shadow";
|
|
97
|
+
readonly writePath: true;
|
|
98
|
+
readonly sends: readonly ["task-text"];
|
|
99
|
+
readonly task: "T12494";
|
|
100
|
+
readonly note: "Escalate-only: may add requiresOwnerDecision, never clears it.";
|
|
101
|
+
};
|
|
102
|
+
/** `cli.decide-ask` — the `cleo decide ask` debug question (T12491). */
|
|
103
|
+
export declare const DECIDE_ASK_DECISION_SITE: {
|
|
104
|
+
readonly id: "cli.decide-ask";
|
|
105
|
+
readonly title: "cleo decide ask (debug question)";
|
|
106
|
+
readonly files: readonly ["packages/core/src/decide/operations.ts"];
|
|
107
|
+
readonly questionType: "noul";
|
|
108
|
+
readonly primaryRung: "system-one";
|
|
109
|
+
readonly ladder: readonly [];
|
|
110
|
+
readonly fallback: "none";
|
|
111
|
+
readonly ownerEscalation: "never";
|
|
112
|
+
readonly defaultMode: "on";
|
|
113
|
+
readonly writePath: false;
|
|
114
|
+
readonly sends: readonly ["external-text"];
|
|
115
|
+
readonly task: "T12491";
|
|
116
|
+
readonly note: "Debug verb: the operator supplies the text; nothing acts on the answer.";
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Every registered decision site. The System One sites come first, then the
|
|
120
|
+
* generative and agent-rung sites.
|
|
121
|
+
*/
|
|
122
|
+
export declare const DECISION_SITES: readonly DecisionSiteDefinition[];
|
|
123
|
+
/**
|
|
124
|
+
* The registry row for `id`.
|
|
125
|
+
*
|
|
126
|
+
* @param id - Site id.
|
|
127
|
+
* @returns The row, or `undefined` when no site has that id.
|
|
128
|
+
*/
|
|
129
|
+
export declare function getDecisionSite(id: string): DecisionSiteDefinition | undefined;
|
|
130
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/decide/sites/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,uFAAuF;AACvF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;CAkBM,CAAC;AAE5C,8FAA8F;AAC9F,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;CAoBN,CAAC;AAE5C,yEAAyE;AACzE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;CAgBA,CAAC;AAE5C,uFAAuF;AACvF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;CAmBE,CAAC;AAE5C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;CAcM,CAAC;AAkP5C;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,sBAAsB,EAO3D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,sBAAsB,GAAG,SAAS,CAE9E"}
|