peaks-loop 4.0.0-beta.7 → 4.0.0-beta.8
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/CHANGELOG.md +90 -0
- package/README-en.md +178 -67
- package/README.md +178 -57
- package/examples/video-demo/README.md +108 -23
- package/examples/video-demo/preview/peaks-loop-demo-en.mp4 +0 -0
- package/examples/video-demo/preview/peaks-loop-demo.mp4 +0 -0
- package/package.json +19 -6
- package/scripts/copy-templates.mjs +64 -0
- package/skills/bee/peaks-rd/SKILL.md +1 -1
- package/skills/bee/peaks-rd/references/library-version-awareness.md +2 -2
- package/skills/bee/peaks-rd/references/mock-data-placement.md +1 -1
- package/skills/bee/peaks-rd/references/rd-runbook.md +2 -2
- package/skills/bee/peaks-rd/references/rd-transition-gates.md +2 -2
- package/skills/bee/peaks-rd/references/writing-handoff-frontmatter.md +1 -1
- package/skills/bee/peaks-ui/SKILL.md +2 -2
- package/skills/peaks-code/SKILL.md +18 -49
- package/skills/peaks-code/references/project-scan-checklist.md +3 -1
- package/skills/peaks-code/references/runbook.md +2 -2
- package/skills/peaks-code/references/standards-preflight.md +1 -1
- package/skills/peaks-code/references/step-11-memory-sediment.md +56 -0
- package/skills/peaks-code/references/swarm-dispatch-contract.md +1 -1
- package/skills/peaks-code/references/workflow-gates-and-types.md +3 -3
- package/dist/src/cli/cli-helpers.d.ts +0 -43
- package/dist/src/cli/cli-helpers.js +0 -86
- package/dist/src/cli/commands/adapter-commands-s2a.d.ts +0 -34
- package/dist/src/cli/commands/adapter-commands-s2a.js +0 -92
- package/dist/src/cli/commands/adapter-commands.d.ts +0 -30
- package/dist/src/cli/commands/adapter-commands.js +0 -35
- package/dist/src/cli/commands/agent-commands.d.ts +0 -20
- package/dist/src/cli/commands/agent-commands.js +0 -48
- package/dist/src/cli/commands/asset-commands.d.ts +0 -45
- package/dist/src/cli/commands/asset-commands.js +0 -404
- package/dist/src/cli/commands/audit-commands.d.ts +0 -28
- package/dist/src/cli/commands/audit-commands.js +0 -437
- package/dist/src/cli/commands/bee-commands.d.ts +0 -26
- package/dist/src/cli/commands/bee-commands.js +0 -169
- package/dist/src/cli/commands/capability-commands.d.ts +0 -16
- package/dist/src/cli/commands/capability-commands.js +0 -45
- package/dist/src/cli/commands/capability-worker-config-sc-commands.d.ts +0 -3
- package/dist/src/cli/commands/capability-worker-config-sc-commands.js +0 -10
- package/dist/src/cli/commands/classify-classify-commands.d.ts +0 -19
- package/dist/src/cli/commands/classify-classify-commands.js +0 -151
- package/dist/src/cli/commands/code-commands.d.ts +0 -80
- package/dist/src/cli/commands/code-commands.js +0 -798
- package/dist/src/cli/commands/code-review-commands.d.ts +0 -34
- package/dist/src/cli/commands/code-review-commands.js +0 -83
- package/dist/src/cli/commands/codegraph-commands.d.ts +0 -3
- package/dist/src/cli/commands/codegraph-commands.js +0 -99
- package/dist/src/cli/commands/compact-command.d.ts +0 -21
- package/dist/src/cli/commands/compact-command.js +0 -252
- package/dist/src/cli/commands/complexity-commands.d.ts +0 -9
- package/dist/src/cli/commands/complexity-commands.js +0 -34
- package/dist/src/cli/commands/config-commands.d.ts +0 -3
- package/dist/src/cli/commands/config-commands.js +0 -220
- package/dist/src/cli/commands/context-builder-commands.d.ts +0 -11
- package/dist/src/cli/commands/context-builder-commands.js +0 -85
- package/dist/src/cli/commands/context-commands.d.ts +0 -21
- package/dist/src/cli/commands/context-commands.js +0 -254
- package/dist/src/cli/commands/contract-commands.d.ts +0 -26
- package/dist/src/cli/commands/contract-commands.js +0 -114
- package/dist/src/cli/commands/core/artifacts-command.d.ts +0 -3
- package/dist/src/cli/commands/core/artifacts-command.js +0 -62
- package/dist/src/cli/commands/core/binding-commands.d.ts +0 -3
- package/dist/src/cli/commands/core/binding-commands.js +0 -58
- package/dist/src/cli/commands/core/doctor-command.d.ts +0 -11
- package/dist/src/cli/commands/core/doctor-command.js +0 -204
- package/dist/src/cli/commands/core/memory-command.d.ts +0 -3
- package/dist/src/cli/commands/core/memory-command.js +0 -98
- package/dist/src/cli/commands/core/profile-command.d.ts +0 -3
- package/dist/src/cli/commands/core/profile-command.js +0 -9
- package/dist/src/cli/commands/core/proxy-command.d.ts +0 -3
- package/dist/src/cli/commands/core/proxy-command.js +0 -26
- package/dist/src/cli/commands/core/session-command.d.ts +0 -3
- package/dist/src/cli/commands/core/session-command.js +0 -241
- package/dist/src/cli/commands/core/skill-command.d.ts +0 -3
- package/dist/src/cli/commands/core/skill-command.js +0 -297
- package/dist/src/cli/commands/core/standards-command.d.ts +0 -3
- package/dist/src/cli/commands/core/standards-command.js +0 -95
- package/dist/src/cli/commands/core-artifact-commands.d.ts +0 -15
- package/dist/src/cli/commands/core-artifact-commands.js +0 -31
- package/dist/src/cli/commands/dispatch-commands.d.ts +0 -10
- package/dist/src/cli/commands/dispatch-commands.js +0 -351
- package/dist/src/cli/commands/dispatch-from-dag.d.ts +0 -3
- package/dist/src/cli/commands/dispatch-from-dag.js +0 -251
- package/dist/src/cli/commands/doc-commands.d.ts +0 -11
- package/dist/src/cli/commands/doc-commands.js +0 -65
- package/dist/src/cli/commands/evolution-commands.d.ts +0 -27
- package/dist/src/cli/commands/evolution-commands.js +0 -393
- package/dist/src/cli/commands/feedback-commands.d.ts +0 -18
- package/dist/src/cli/commands/feedback-commands.js +0 -145
- package/dist/src/cli/commands/final-review-commands.d.ts +0 -31
- package/dist/src/cli/commands/final-review-commands.js +0 -161
- package/dist/src/cli/commands/fixture-commands.d.ts +0 -32
- package/dist/src/cli/commands/fixture-commands.js +0 -91
- package/dist/src/cli/commands/fork-commands.d.ts +0 -16
- package/dist/src/cli/commands/fork-commands.js +0 -163
- package/dist/src/cli/commands/gate-commands.d.ts +0 -3
- package/dist/src/cli/commands/gate-commands.js +0 -117
- package/dist/src/cli/commands/heartbeat-commands.d.ts +0 -3
- package/dist/src/cli/commands/heartbeat-commands.js +0 -135
- package/dist/src/cli/commands/hook-handle.d.ts +0 -17
- package/dist/src/cli/commands/hook-handle.js +0 -157
- package/dist/src/cli/commands/hooks-commands.d.ts +0 -3
- package/dist/src/cli/commands/hooks-commands.js +0 -156
- package/dist/src/cli/commands/ide-commands.d.ts +0 -25
- package/dist/src/cli/commands/ide-commands.js +0 -42
- package/dist/src/cli/commands/impact-commands.d.ts +0 -15
- package/dist/src/cli/commands/impact-commands.js +0 -62
- package/dist/src/cli/commands/job-commands.d.ts +0 -3
- package/dist/src/cli/commands/job-commands.js +0 -289
- package/dist/src/cli/commands/legacy-commands.d.ts +0 -11
- package/dist/src/cli/commands/legacy-commands.js +0 -32
- package/dist/src/cli/commands/log-commands.d.ts +0 -17
- package/dist/src/cli/commands/log-commands.js +0 -64
- package/dist/src/cli/commands/loop-commands.d.ts +0 -27
- package/dist/src/cli/commands/loop-commands.js +0 -262
- package/dist/src/cli/commands/loop-eval-commands.d.ts +0 -20
- package/dist/src/cli/commands/loop-eval-commands.js +0 -526
- package/dist/src/cli/commands/memory-commands.d.ts +0 -23
- package/dist/src/cli/commands/memory-commands.js +0 -129
- package/dist/src/cli/commands/migrate-1-4-1-command.d.ts +0 -11
- package/dist/src/cli/commands/migrate-1-4-1-command.js +0 -34
- package/dist/src/cli/commands/migrate-v2-10-to-v2-11-command.d.ts +0 -20
- package/dist/src/cli/commands/migrate-v2-10-to-v2-11-command.js +0 -52
- package/dist/src/cli/commands/mut-commands.d.ts +0 -20
- package/dist/src/cli/commands/mut-commands.js +0 -239
- package/dist/src/cli/commands/observability-commands.d.ts +0 -22
- package/dist/src/cli/commands/observability-commands.js +0 -201
- package/dist/src/cli/commands/openspec-commands.d.ts +0 -3
- package/dist/src/cli/commands/openspec-commands.js +0 -237
- package/dist/src/cli/commands/perf-audit-commands.d.ts +0 -22
- package/dist/src/cli/commands/perf-audit-commands.js +0 -132
- package/dist/src/cli/commands/perf-commands.d.ts +0 -3
- package/dist/src/cli/commands/perf-commands.js +0 -41
- package/dist/src/cli/commands/playwright-commands.d.ts +0 -95
- package/dist/src/cli/commands/playwright-commands.js +0 -432
- package/dist/src/cli/commands/polyrepo-commands.d.ts +0 -37
- package/dist/src/cli/commands/polyrepo-commands.js +0 -155
- package/dist/src/cli/commands/prd-blocks-commands.d.ts +0 -18
- package/dist/src/cli/commands/prd-blocks-commands.js +0 -50
- package/dist/src/cli/commands/prd-commands.d.ts +0 -18
- package/dist/src/cli/commands/prd-commands.js +0 -141
- package/dist/src/cli/commands/preferences-commands.d.ts +0 -2
- package/dist/src/cli/commands/preferences-commands.js +0 -197
- package/dist/src/cli/commands/project-commands.d.ts +0 -3
- package/dist/src/cli/commands/project-commands.js +0 -248
- package/dist/src/cli/commands/qa-business-review-commands.d.ts +0 -17
- package/dist/src/cli/commands/qa-business-review-commands.js +0 -148
- package/dist/src/cli/commands/qa-commands.d.ts +0 -94
- package/dist/src/cli/commands/qa-commands.js +0 -271
- package/dist/src/cli/commands/release-commands.d.ts +0 -24
- package/dist/src/cli/commands/release-commands.js +0 -231
- package/dist/src/cli/commands/request-commands.d.ts +0 -3
- package/dist/src/cli/commands/request-commands.js +0 -548
- package/dist/src/cli/commands/retrospective-commands.d.ts +0 -12
- package/dist/src/cli/commands/retrospective-commands.js +0 -175
- package/dist/src/cli/commands/reviewer-commands.d.ts +0 -14
- package/dist/src/cli/commands/reviewer-commands.js +0 -64
- package/dist/src/cli/commands/role-commands.d.ts +0 -13
- package/dist/src/cli/commands/role-commands.js +0 -85
- package/dist/src/cli/commands/runtime-commands.d.ts +0 -52
- package/dist/src/cli/commands/runtime-commands.js +0 -150
- package/dist/src/cli/commands/sc-commands.d.ts +0 -3
- package/dist/src/cli/commands/sc-commands.js +0 -45
- package/dist/src/cli/commands/scan-commands.d.ts +0 -3
- package/dist/src/cli/commands/scan-commands.js +0 -445
- package/dist/src/cli/commands/security-audit-commands.d.ts +0 -23
- package/dist/src/cli/commands/security-audit-commands.js +0 -132
- package/dist/src/cli/commands/sediment-commands.d.ts +0 -80
- package/dist/src/cli/commands/sediment-commands.js +0 -649
- package/dist/src/cli/commands/session-auto-compact-hook-command.d.ts +0 -37
- package/dist/src/cli/commands/session-auto-compact-hook-command.js +0 -127
- package/dist/src/cli/commands/session-checkpoint-command.d.ts +0 -10
- package/dist/src/cli/commands/session-checkpoint-command.js +0 -100
- package/dist/src/cli/commands/session-migrate-skill-name.d.ts +0 -17
- package/dist/src/cli/commands/session-migrate-skill-name.js +0 -41
- package/dist/src/cli/commands/session-resume-command.d.ts +0 -11
- package/dist/src/cli/commands/session-resume-command.js +0 -83
- package/dist/src/cli/commands/share-commands.d.ts +0 -17
- package/dist/src/cli/commands/share-commands.js +0 -296
- package/dist/src/cli/commands/skill-conformance-commands.d.ts +0 -9
- package/dist/src/cli/commands/skill-conformance-commands.js +0 -39
- package/dist/src/cli/commands/skill-loop-engineering-readiness-commands.d.ts +0 -67
- package/dist/src/cli/commands/skill-loop-engineering-readiness-commands.js +0 -173
- package/dist/src/cli/commands/skill-search-commands.d.ts +0 -25
- package/dist/src/cli/commands/skill-search-commands.js +0 -68
- package/dist/src/cli/commands/skill-visibility.d.ts +0 -8
- package/dist/src/cli/commands/skill-visibility.js +0 -63
- package/dist/src/cli/commands/slice-commands.d.ts +0 -24
- package/dist/src/cli/commands/slice-commands.js +0 -492
- package/dist/src/cli/commands/slice-integrate-commands.d.ts +0 -11
- package/dist/src/cli/commands/slice-integrate-commands.js +0 -74
- package/dist/src/cli/commands/slice-review-commands.d.ts +0 -23
- package/dist/src/cli/commands/slice-review-commands.js +0 -162
- package/dist/src/cli/commands/smoke-commands.d.ts +0 -21
- package/dist/src/cli/commands/smoke-commands.js +0 -203
- package/dist/src/cli/commands/sop-commands.d.ts +0 -3
- package/dist/src/cli/commands/sop-commands.js +0 -215
- package/dist/src/cli/commands/statusline-commands.d.ts +0 -3
- package/dist/src/cli/commands/statusline-commands.js +0 -169
- package/dist/src/cli/commands/sub-agent-commands.d.ts +0 -22
- package/dist/src/cli/commands/sub-agent-commands.js +0 -19
- package/dist/src/cli/commands/sub-agent-dispatch-guard.d.ts +0 -55
- package/dist/src/cli/commands/sub-agent-dispatch-guard.js +0 -57
- package/dist/src/cli/commands/sub-agent-shared.d.ts +0 -99
- package/dist/src/cli/commands/sub-agent-shared.js +0 -67
- package/dist/src/cli/commands/test-commands.d.ts +0 -47
- package/dist/src/cli/commands/test-commands.js +0 -204
- package/dist/src/cli/commands/understand-commands.d.ts +0 -3
- package/dist/src/cli/commands/understand-commands.js +0 -148
- package/dist/src/cli/commands/upgrade-commands.d.ts +0 -23
- package/dist/src/cli/commands/upgrade-commands.js +0 -119
- package/dist/src/cli/commands/user-touchpoint-commands.d.ts +0 -18
- package/dist/src/cli/commands/user-touchpoint-commands.js +0 -78
- package/dist/src/cli/commands/verdict-aggregate-command.d.ts +0 -14
- package/dist/src/cli/commands/verdict-aggregate-command.js +0 -106
- package/dist/src/cli/commands/worker-commands.d.ts +0 -3
- package/dist/src/cli/commands/worker-commands.js +0 -52
- package/dist/src/cli/commands/workflow-commands.d.ts +0 -3
- package/dist/src/cli/commands/workflow-commands.js +0 -535
- package/dist/src/cli/commands/workflow-plan-commands.d.ts +0 -39
- package/dist/src/cli/commands/workflow-plan-commands.js +0 -163
- package/dist/src/cli/commands/workspace/clean-command.d.ts +0 -14
- package/dist/src/cli/commands/workspace/clean-command.js +0 -49
- package/dist/src/cli/commands/workspace/helpers.d.ts +0 -28
- package/dist/src/cli/commands/workspace/helpers.js +0 -87
- package/dist/src/cli/commands/workspace/init-command.d.ts +0 -121
- package/dist/src/cli/commands/workspace/init-command.js +0 -436
- package/dist/src/cli/commands/workspace/migrate-command.d.ts +0 -11
- package/dist/src/cli/commands/workspace/migrate-command.js +0 -91
- package/dist/src/cli/commands/workspace/reconcile-command.d.ts +0 -14
- package/dist/src/cli/commands/workspace/reconcile-command.js +0 -103
- package/dist/src/cli/commands/workspace-commands.d.ts +0 -18
- package/dist/src/cli/commands/workspace-commands.js +0 -50
- package/dist/src/cli/index.d.ts +0 -1
- package/dist/src/cli/index.js +0 -30
- package/dist/src/cli/program.d.ts +0 -5
- package/dist/src/cli/program.js +0 -408
- package/dist/src/hooks/pre-tool-use-sub-agent.d.ts +0 -28
- package/dist/src/hooks/pre-tool-use-sub-agent.js +0 -105
- package/dist/src/lib/render/message-renderer.d.ts +0 -20
- package/dist/src/lib/render/message-renderer.js +0 -80
- package/dist/src/services/adapter/adapter-registry.d.ts +0 -48
- package/dist/src/services/adapter/adapter-registry.js +0 -186
- package/dist/src/services/adapter/adapter.d.ts +0 -27
- package/dist/src/services/adapter/adapter.js +0 -5
- package/dist/src/services/adapter/auto-adapter.d.ts +0 -11
- package/dist/src/services/adapter/auto-adapter.js +0 -15
- package/dist/src/services/adapter/claude-adapter.d.ts +0 -14
- package/dist/src/services/adapter/claude-adapter.js +0 -40
- package/dist/src/services/adapter/codex-adapter.d.ts +0 -14
- package/dist/src/services/adapter/codex-adapter.js +0 -14
- package/dist/src/services/adapter/copilot-adapter.d.ts +0 -14
- package/dist/src/services/adapter/copilot-adapter.js +0 -14
- package/dist/src/services/agent/ecc-agent-service.d.ts +0 -47
- package/dist/src/services/agent/ecc-agent-service.js +0 -143
- package/dist/src/services/artifacts/artifact-lint-service.d.ts +0 -23
- package/dist/src/services/artifacts/artifact-lint-service.js +0 -99
- package/dist/src/services/artifacts/artifact-prerequisites.d.ts +0 -78
- package/dist/src/services/artifacts/artifact-prerequisites.js +0 -491
- package/dist/src/services/artifacts/artifact-service.d.ts +0 -43
- package/dist/src/services/artifacts/artifact-service.js +0 -98
- package/dist/src/services/artifacts/artifact-templates.d.ts +0 -30
- package/dist/src/services/artifacts/artifact-templates.js +0 -302
- package/dist/src/services/artifacts/repair-cycle-service.d.ts +0 -23
- package/dist/src/services/artifacts/repair-cycle-service.js +0 -52
- package/dist/src/services/artifacts/request-artifact-service.d.ts +0 -116
- package/dist/src/services/artifacts/request-artifact-service.js +0 -451
- package/dist/src/services/artifacts/request-artifact-state-helpers.d.ts +0 -51
- package/dist/src/services/artifacts/request-artifact-state-helpers.js +0 -114
- package/dist/src/services/artifacts/workspace-service.d.ts +0 -34
- package/dist/src/services/artifacts/workspace-service.js +0 -272
- package/dist/src/services/audit/artifact-writer.d.ts +0 -93
- package/dist/src/services/audit/artifact-writer.js +0 -303
- package/dist/src/services/audit/audit-goal-service.d.ts +0 -35
- package/dist/src/services/audit/audit-goal-service.js +0 -75
- package/dist/src/services/audit/audit-goal-types.d.ts +0 -40
- package/dist/src/services/audit/audit-goal-types.js +0 -15
- package/dist/src/services/audit/backing-detector.d.ts +0 -24
- package/dist/src/services/audit/backing-detector.js +0 -59
- package/dist/src/services/audit/classifier.d.ts +0 -38
- package/dist/src/services/audit/classifier.js +0 -134
- package/dist/src/services/audit/decision-writer.d.ts +0 -76
- package/dist/src/services/audit/decision-writer.js +0 -217
- package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +0 -29
- package/dist/src/services/audit/enforcers/active-skill-resolver.js +0 -71
- package/dist/src/services/audit/enforcers/code-ban.d.ts +0 -23
- package/dist/src/services/audit/enforcers/code-ban.js +0 -27
- package/dist/src/services/audit/enforcers/design-draft-confirm.d.ts +0 -24
- package/dist/src/services/audit/enforcers/design-draft-confirm.js +0 -58
- package/dist/src/services/audit/enforcers/lint-audit-regression.d.ts +0 -21
- package/dist/src/services/audit/enforcers/lint-audit-regression.js +0 -86
- package/dist/src/services/audit/enforcers/lint-catalog-governance.d.ts +0 -32
- package/dist/src/services/audit/enforcers/lint-catalog-governance.js +0 -48
- package/dist/src/services/audit/enforcers/lint-cli-back.d.ts +0 -16
- package/dist/src/services/audit/enforcers/lint-cli-back.js +0 -35
- package/dist/src/services/audit/enforcers/lint-output-style.d.ts +0 -11
- package/dist/src/services/audit/enforcers/lint-output-style.js +0 -94
- package/dist/src/services/audit/enforcers/lint-reference-integrity.d.ts +0 -6
- package/dist/src/services/audit/enforcers/lint-reference-integrity.js +0 -83
- package/dist/src/services/audit/enforcers/lint-reference-shape.d.ts +0 -30
- package/dist/src/services/audit/enforcers/lint-reference-shape.js +0 -272
- package/dist/src/services/audit/enforcers/lint-style.d.ts +0 -49
- package/dist/src/services/audit/enforcers/lint-style.js +0 -173
- package/dist/src/services/audit/enforcers/lint-workflow-shape.d.ts +0 -4
- package/dist/src/services/audit/enforcers/lint-workflow-shape.js +0 -100
- package/dist/src/services/audit/enforcers/login-gate.d.ts +0 -23
- package/dist/src/services/audit/enforcers/login-gate.js +0 -40
- package/dist/src/services/audit/enforcers/mock-placement.d.ts +0 -25
- package/dist/src/services/audit/enforcers/mock-placement.js +0 -48
- package/dist/src/services/audit/enforcers/no-root-pollution.d.ts +0 -21
- package/dist/src/services/audit/enforcers/no-root-pollution.js +0 -56
- package/dist/src/services/audit/enforcers/pre-rd-scan.d.ts +0 -22
- package/dist/src/services/audit/enforcers/pre-rd-scan.js +0 -23
- package/dist/src/services/audit/enforcers/prototype-fidelity.d.ts +0 -25
- package/dist/src/services/audit/enforcers/prototype-fidelity.js +0 -75
- package/dist/src/services/audit/enforcers/resume-detection.d.ts +0 -21
- package/dist/src/services/audit/enforcers/resume-detection.js +0 -52
- package/dist/src/services/audit/enforcers/sub-agent-sid.d.ts +0 -25
- package/dist/src/services/audit/enforcers/sub-agent-sid.js +0 -63
- package/dist/src/services/audit/prose-ratio-calculator.d.ts +0 -45
- package/dist/src/services/audit/prose-ratio-calculator.js +0 -52
- package/dist/src/services/audit/red-line-catalog-p2-a.d.ts +0 -21
- package/dist/src/services/audit/red-line-catalog-p2-a.js +0 -229
- package/dist/src/services/audit/red-line-catalog-p2-b.d.ts +0 -19
- package/dist/src/services/audit/red-line-catalog-p2-b.js +0 -225
- package/dist/src/services/audit/red-line-catalog.d.ts +0 -51
- package/dist/src/services/audit/red-line-catalog.js +0 -195
- package/dist/src/services/audit/red-lines-service.d.ts +0 -23
- package/dist/src/services/audit/red-lines-service.js +0 -464
- package/dist/src/services/audit/scanners/openspec-scanner.d.ts +0 -15
- package/dist/src/services/audit/scanners/openspec-scanner.js +0 -55
- package/dist/src/services/audit/scanners/rules-tree-scanner.d.ts +0 -16
- package/dist/src/services/audit/scanners/rules-tree-scanner.js +0 -56
- package/dist/src/services/audit/scanners/skills-tree-scanner.d.ts +0 -17
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +0 -68
- package/dist/src/services/audit/static-service.d.ts +0 -60
- package/dist/src/services/audit/static-service.js +0 -130
- package/dist/src/services/audit/types.d.ts +0 -86
- package/dist/src/services/audit/types.js +0 -13
- package/dist/src/services/audit-independent/perf-audit-service.d.ts +0 -151
- package/dist/src/services/audit-independent/perf-audit-service.js +0 -316
- package/dist/src/services/audit-independent/security-audit-service.d.ts +0 -155
- package/dist/src/services/audit-independent/security-audit-service.js +0 -316
- package/dist/src/services/classify/classify-service.d.ts +0 -42
- package/dist/src/services/classify/classify-service.js +0 -122
- package/dist/src/services/classify/classify-types.d.ts +0 -79
- package/dist/src/services/classify/classify-types.js +0 -90
- package/dist/src/services/code/auto-compact-orchestrator.d.ts +0 -98
- package/dist/src/services/code/auto-compact-orchestrator.js +0 -343
- package/dist/src/services/code/batch-heartbeat-poller.d.ts +0 -51
- package/dist/src/services/code/batch-heartbeat-poller.js +0 -88
- package/dist/src/services/code/dag-orchestrator.d.ts +0 -128
- package/dist/src/services/code/dag-orchestrator.js +0 -304
- package/dist/src/services/code/emit-handoff.d.ts +0 -49
- package/dist/src/services/code/emit-handoff.js +0 -79
- package/dist/src/services/code/job-shape-decision.d.ts +0 -71
- package/dist/src/services/code/job-shape-decision.js +0 -151
- package/dist/src/services/code/mode-gate.d.ts +0 -163
- package/dist/src/services/code/mode-gate.js +0 -212
- package/dist/src/services/code/post-compact-detector.d.ts +0 -61
- package/dist/src/services/code/post-compact-detector.js +0 -240
- package/dist/src/services/code/status-line-renderer.d.ts +0 -34
- package/dist/src/services/code/status-line-renderer.js +0 -55
- package/dist/src/services/code/step-08-gate.d.ts +0 -90
- package/dist/src/services/code/step-08-gate.js +0 -136
- package/dist/src/services/code/user-touchpoint-classifier.d.ts +0 -44
- package/dist/src/services/code/user-touchpoint-classifier.js +0 -145
- package/dist/src/services/code-review/ecc-bridge.d.ts +0 -148
- package/dist/src/services/code-review/ecc-bridge.js +0 -242
- package/dist/src/services/code-review/ocr-service.d.ts +0 -129
- package/dist/src/services/code-review/ocr-service.js +0 -369
- package/dist/src/services/codegraph/codegraph-process-runner.d.ts +0 -2
- package/dist/src/services/codegraph/codegraph-process-runner.js +0 -93
- package/dist/src/services/codegraph/codegraph-service.d.ts +0 -43
- package/dist/src/services/codegraph/codegraph-service.js +0 -160
- package/dist/src/services/compact/decision-tables.d.ts +0 -66
- package/dist/src/services/compact/decision-tables.js +0 -127
- package/dist/src/services/compact/request-transition-hook.d.ts +0 -20
- package/dist/src/services/compact/request-transition-hook.js +0 -110
- package/dist/src/services/compact/suggest-service.d.ts +0 -74
- package/dist/src/services/compact/suggest-service.js +0 -203
- package/dist/src/services/complexity/complexity-estimator.d.ts +0 -34
- package/dist/src/services/complexity/complexity-estimator.js +0 -64
- package/dist/src/services/config/config-migration.d.ts +0 -45
- package/dist/src/services/config/config-migration.js +0 -154
- package/dist/src/services/config/config-restore.d.ts +0 -10
- package/dist/src/services/config/config-restore.js +0 -47
- package/dist/src/services/config/config-rollback.d.ts +0 -13
- package/dist/src/services/config/config-rollback.js +0 -26
- package/dist/src/services/config/config-safety.d.ts +0 -40
- package/dist/src/services/config/config-safety.js +0 -359
- package/dist/src/services/config/config-service.d.ts +0 -69
- package/dist/src/services/config/config-service.js +0 -814
- package/dist/src/services/config/config-types.d.ts +0 -119
- package/dist/src/services/config/config-types.js +0 -18
- package/dist/src/services/config/model-routing.d.ts +0 -57
- package/dist/src/services/config/model-routing.js +0 -93
- package/dist/src/services/config/provider-service.d.ts +0 -48
- package/dist/src/services/config/provider-service.js +0 -143
- package/dist/src/services/config/proxy-service.d.ts +0 -21
- package/dist/src/services/config/proxy-service.js +0 -44
- package/dist/src/services/config/sidecar-store.d.ts +0 -25
- package/dist/src/services/config/sidecar-store.js +0 -61
- package/dist/src/services/config/workspace-state-service.d.ts +0 -30
- package/dist/src/services/config/workspace-state-service.js +0 -142
- package/dist/src/services/context/artifact-meta.d.ts +0 -72
- package/dist/src/services/context/artifact-meta.js +0 -105
- package/dist/src/services/context/auto-compact-dispatcher.d.ts +0 -37
- package/dist/src/services/context/auto-compact-dispatcher.js +0 -240
- package/dist/src/services/context/auto-compact-reader.d.ts +0 -51
- package/dist/src/services/context/auto-compact-reader.js +0 -164
- package/dist/src/services/context/auto-compact-types.d.ts +0 -143
- package/dist/src/services/context/auto-compact-types.js +0 -36
- package/dist/src/services/context/collector.d.ts +0 -24
- package/dist/src/services/context/collector.js +0 -133
- package/dist/src/services/context/context-builder.d.ts +0 -30
- package/dist/src/services/context/context-builder.js +0 -78
- package/dist/src/services/context/context-guard.d.ts +0 -49
- package/dist/src/services/context/context-guard.js +0 -91
- package/dist/src/services/context/context-schema.d.ts +0 -415
- package/dist/src/services/context/context-schema.js +0 -73
- package/dist/src/services/context/dispatch-context-guard.d.ts +0 -27
- package/dist/src/services/context/dispatch-context-guard.js +0 -192
- package/dist/src/services/context/doc-retriever.d.ts +0 -26
- package/dist/src/services/context/doc-retriever.js +0 -51
- package/dist/src/services/context/headroom-client.d.ts +0 -34
- package/dist/src/services/context/headroom-client.js +0 -117
- package/dist/src/services/context/headroom-fetcher.d.ts +0 -6
- package/dist/src/services/context/headroom-fetcher.js +0 -28
- package/dist/src/services/context/headroom-prefs.d.ts +0 -46
- package/dist/src/services/context/headroom-prefs.js +0 -34
- package/dist/src/services/context/index.d.ts +0 -7
- package/dist/src/services/context/index.js +0 -6
- package/dist/src/services/context/main-session-monitor.d.ts +0 -89
- package/dist/src/services/context/main-session-monitor.js +0 -142
- package/dist/src/services/context/renderer.d.ts +0 -20
- package/dist/src/services/context/renderer.js +0 -30
- package/dist/src/services/context/shared-channel.d.ts +0 -93
- package/dist/src/services/context/shared-channel.js +0 -308
- package/dist/src/services/context/threshold.d.ts +0 -35
- package/dist/src/services/context/threshold.js +0 -76
- package/dist/src/services/context/tokenizer.d.ts +0 -12
- package/dist/src/services/context/tokenizer.js +0 -43
- package/dist/src/services/context/types.d.ts +0 -93
- package/dist/src/services/context/types.js +0 -9
- package/dist/src/services/crystallization/crystallization-service.d.ts +0 -239
- package/dist/src/services/crystallization/crystallization-service.js +0 -397
- package/dist/src/services/crystallization/crystallization-store.d.ts +0 -75
- package/dist/src/services/crystallization/crystallization-store.js +0 -193
- package/dist/src/services/crystallization/crystallization-types.d.ts +0 -313
- package/dist/src/services/crystallization/crystallization-types.js +0 -299
- package/dist/src/services/crystallization/evidence-brief-builder.d.ts +0 -237
- package/dist/src/services/crystallization/evidence-brief-builder.js +0 -240
- package/dist/src/services/dashboard/project-dashboard-service.d.ts +0 -91
- package/dist/src/services/dashboard/project-dashboard-service.js +0 -147
- package/dist/src/services/dispatch/batch-counter.d.ts +0 -27
- package/dist/src/services/dispatch/batch-counter.js +0 -102
- package/dist/src/services/dispatch/contract-store.d.ts +0 -63
- package/dist/src/services/dispatch/contract-store.js +0 -157
- package/dist/src/services/dispatch/dispatch-record-writer.d.ts +0 -138
- package/dist/src/services/dispatch/dispatch-record-writer.js +0 -460
- package/dist/src/services/dispatch/heartbeat-truncator.d.ts +0 -26
- package/dist/src/services/dispatch/heartbeat-truncator.js +0 -13
- package/dist/src/services/dispatch/leak-detector.d.ts +0 -11
- package/dist/src/services/dispatch/leak-detector.js +0 -72
- package/dist/src/services/dispatch/slice-dag.d.ts +0 -81
- package/dist/src/services/dispatch/slice-dag.js +0 -238
- package/dist/src/services/dispatch/sub-agent-dispatcher.d.ts +0 -239
- package/dist/src/services/dispatch/sub-agent-dispatcher.js +0 -382
- package/dist/src/services/dispatch/test-tool-detection.d.ts +0 -36
- package/dist/src/services/dispatch/test-tool-detection.js +0 -46
- package/dist/src/services/doc/doc-generator.d.ts +0 -38
- package/dist/src/services/doc/doc-generator.js +0 -122
- package/dist/src/services/doctor/doctor-service.d.ts +0 -149
- package/dist/src/services/doctor/doctor-service.js +0 -929
- package/dist/src/services/evolution/evolution-service.d.ts +0 -137
- package/dist/src/services/evolution/evolution-service.js +0 -281
- package/dist/src/services/evolution/evolution-store.d.ts +0 -57
- package/dist/src/services/evolution/evolution-store.js +0 -232
- package/dist/src/services/evolution/evolution-types.d.ts +0 -706
- package/dist/src/services/evolution/evolution-types.js +0 -286
- package/dist/src/services/evolution/independent-evaluator-runner.d.ts +0 -90
- package/dist/src/services/evolution/independent-evaluator-runner.js +0 -106
- package/dist/src/services/evolution/regression-skeptic-runner.d.ts +0 -64
- package/dist/src/services/evolution/regression-skeptic-runner.js +0 -113
- package/dist/src/services/feedback/feedback-promotion-service.d.ts +0 -123
- package/dist/src/services/feedback/feedback-promotion-service.js +0 -300
- package/dist/src/services/filesystem/file-lock.d.ts +0 -11
- package/dist/src/services/filesystem/file-lock.js +0 -129
- package/dist/src/services/final-review/final-review-service.d.ts +0 -12
- package/dist/src/services/final-review/final-review-service.js +0 -52
- package/dist/src/services/final-review/final-review-types.d.ts +0 -42
- package/dist/src/services/final-review/final-review-types.js +0 -18
- package/dist/src/services/fixture/fixture-capture-service.d.ts +0 -87
- package/dist/src/services/fixture/fixture-capture-service.js +0 -317
- package/dist/src/services/fixture/fixture-sanitize-service.d.ts +0 -117
- package/dist/src/services/fixture/fixture-sanitize-service.js +0 -161
- package/dist/src/services/fixture/index.d.ts +0 -8
- package/dist/src/services/fixture/index.js +0 -8
- package/dist/src/services/fork/fork-sync-state.d.ts +0 -85
- package/dist/src/services/fork/fork-sync-state.js +0 -130
- package/dist/src/services/fuzzy-matching/fuzzy-match-service.d.ts +0 -15
- package/dist/src/services/fuzzy-matching/fuzzy-match-service.js +0 -56
- package/dist/src/services/fuzzy-matching/fzf-pick-service.d.ts +0 -68
- package/dist/src/services/fuzzy-matching/fzf-pick-service.js +0 -158
- package/dist/src/services/fuzzy-matching/types.d.ts +0 -20
- package/dist/src/services/fuzzy-matching/types.js +0 -1
- package/dist/src/services/handoff/handoff-parser.d.ts +0 -28
- package/dist/src/services/handoff/handoff-parser.js +0 -69
- package/dist/src/services/handoff/handoff-types.d.ts +0 -39
- package/dist/src/services/handoff/handoff-types.js +0 -19
- package/dist/src/services/handoff/handoff-writer.d.ts +0 -23
- package/dist/src/services/handoff/handoff-writer.js +0 -30
- package/dist/src/services/hooks/auto-compact-hook-install.d.ts +0 -104
- package/dist/src/services/hooks/auto-compact-hook-install.js +0 -157
- package/dist/src/services/hooks/output.d.ts +0 -92
- package/dist/src/services/hooks/output.js +0 -111
- package/dist/src/services/hooks/presence-marker-detector.d.ts +0 -16
- package/dist/src/services/hooks/presence-marker-detector.js +0 -105
- package/dist/src/services/ide/adapters/claude-code-adapter.d.ts +0 -18
- package/dist/src/services/ide/adapters/claude-code-adapter.js +0 -103
- package/dist/src/services/ide/adapters/codex-adapter.d.ts +0 -46
- package/dist/src/services/ide/adapters/codex-adapter.js +0 -97
- package/dist/src/services/ide/adapters/cursor-adapter.d.ts +0 -36
- package/dist/src/services/ide/adapters/cursor-adapter.js +0 -84
- package/dist/src/services/ide/adapters/hermes-adapter.d.ts +0 -21
- package/dist/src/services/ide/adapters/hermes-adapter.js +0 -51
- package/dist/src/services/ide/adapters/openclaw-adapter.d.ts +0 -14
- package/dist/src/services/ide/adapters/openclaw-adapter.js +0 -42
- package/dist/src/services/ide/adapters/trae-adapter.d.ts +0 -42
- package/dist/src/services/ide/adapters/trae-adapter.js +0 -83
- package/dist/src/services/ide/adapters/zcode-adapter.d.ts +0 -40
- package/dist/src/services/ide/adapters/zcode-adapter.js +0 -220
- package/dist/src/services/ide/current-model-detector.d.ts +0 -14
- package/dist/src/services/ide/current-model-detector.js +0 -60
- package/dist/src/services/ide/hook-protocol.d.ts +0 -47
- package/dist/src/services/ide/hook-protocol.js +0 -74
- package/dist/src/services/ide/hook-translator.d.ts +0 -72
- package/dist/src/services/ide/hook-translator.js +0 -128
- package/dist/src/services/ide/ide-detector.d.ts +0 -10
- package/dist/src/services/ide/ide-detector.js +0 -19
- package/dist/src/services/ide/ide-registry.d.ts +0 -14
- package/dist/src/services/ide/ide-registry.js +0 -63
- package/dist/src/services/ide/ide-types.d.ts +0 -253
- package/dist/src/services/ide/ide-types.js +0 -2
- package/dist/src/services/ide/resource-profile.d.ts +0 -52
- package/dist/src/services/ide/resource-profile.js +0 -33
- package/dist/src/services/ide/shared/atomic-json.d.ts +0 -15
- package/dist/src/services/ide/shared/atomic-json.js +0 -58
- package/dist/src/services/ide/shared/safe-path.d.ts +0 -11
- package/dist/src/services/ide/shared/safe-path.js +0 -29
- package/dist/src/services/impact/impact-scan-service.d.ts +0 -66
- package/dist/src/services/impact/impact-scan-service.js +0 -197
- package/dist/src/services/job/job-event-emitter.d.ts +0 -30
- package/dist/src/services/job/job-event-emitter.js +0 -5
- package/dist/src/services/job/job-orchestrator.d.ts +0 -50
- package/dist/src/services/job/job-orchestrator.js +0 -104
- package/dist/src/services/job/job-progress-store.d.ts +0 -60
- package/dist/src/services/job/job-progress-store.js +0 -70
- package/dist/src/services/job/job-resource-snapshot.d.ts +0 -7
- package/dist/src/services/job/job-resource-snapshot.js +0 -75
- package/dist/src/services/job/job-rotation.d.ts +0 -17
- package/dist/src/services/job/job-rotation.js +0 -30
- package/dist/src/services/job/job-state-store.d.ts +0 -24
- package/dist/src/services/job/job-state-store.js +0 -60
- package/dist/src/services/job/job-types.d.ts +0 -444
- package/dist/src/services/job/job-types.js +0 -87
- package/dist/src/services/job/subagent-job-wrapper.d.ts +0 -35
- package/dist/src/services/job/subagent-job-wrapper.js +0 -30
- package/dist/src/services/legacy/legacy-detector.d.ts +0 -34
- package/dist/src/services/legacy/legacy-detector.js +0 -111
- package/dist/src/services/log/log-commands-service.d.ts +0 -54
- package/dist/src/services/log/log-commands-service.js +0 -83
- package/dist/src/services/log/logger.d.ts +0 -103
- package/dist/src/services/log/logger.js +0 -224
- package/dist/src/services/log/redact.d.ts +0 -32
- package/dist/src/services/log/redact.js +0 -89
- package/dist/src/services/log/retention.d.ts +0 -34
- package/dist/src/services/log/retention.js +0 -78
- package/dist/src/services/loop/evaluator-dispatcher.d.ts +0 -50
- package/dist/src/services/loop/evaluator-dispatcher.js +0 -552
- package/dist/src/services/loop/loop-bee-relation-service.d.ts +0 -107
- package/dist/src/services/loop/loop-bee-relation-service.js +0 -211
- package/dist/src/services/loop/loop-bee-relation-store.d.ts +0 -53
- package/dist/src/services/loop/loop-bee-relation-store.js +0 -130
- package/dist/src/services/loop/loop-bee-relation-types.d.ts +0 -118
- package/dist/src/services/loop/loop-bee-relation-types.js +0 -114
- package/dist/src/services/loop/loop-release-service.d.ts +0 -46
- package/dist/src/services/loop/loop-release-service.js +0 -66
- package/dist/src/services/loop/loop-release-store.d.ts +0 -55
- package/dist/src/services/loop/loop-release-store.js +0 -134
- package/dist/src/services/loop/loop-release-types.d.ts +0 -250
- package/dist/src/services/loop/loop-release-types.js +0 -162
- package/dist/src/services/loop/monotonic-guard.d.ts +0 -80
- package/dist/src/services/loop/monotonic-guard.js +0 -232
- package/dist/src/services/loop/monotonic-runner.d.ts +0 -58
- package/dist/src/services/loop/monotonic-runner.js +0 -231
- package/dist/src/services/loop/run-driver.d.ts +0 -70
- package/dist/src/services/loop/run-driver.js +0 -400
- package/dist/src/services/loop/spec-service.d.ts +0 -90
- package/dist/src/services/loop/spec-service.js +0 -497
- package/dist/src/services/memory/llm-reranker.d.ts +0 -174
- package/dist/src/services/memory/llm-reranker.js +0 -284
- package/dist/src/services/memory/memory-search-service.d.ts +0 -93
- package/dist/src/services/memory/memory-search-service.js +0 -117
- package/dist/src/services/memory/project-context-service.d.ts +0 -11
- package/dist/src/services/memory/project-context-service.js +0 -148
- package/dist/src/services/memory/project-memory-service.d.ts +0 -167
- package/dist/src/services/memory/project-memory-service.js +0 -817
- package/dist/src/services/migrate-skill-name/migrate.d.ts +0 -17
- package/dist/src/services/migrate-skill-name/migrate.js +0 -152
- package/dist/src/services/migrate-skill-name/schema.d.ts +0 -42
- package/dist/src/services/migrate-skill-name/schema.js +0 -25
- package/dist/src/services/migration/v2-10-to-v2-11-service.d.ts +0 -44
- package/dist/src/services/migration/v2-10-to-v2-11-service.js +0 -190
- package/dist/src/services/migration/v2-10-to-v2-11-types.d.ts +0 -41
- package/dist/src/services/migration/v2-10-to-v2-11-types.js +0 -23
- package/dist/src/services/mode/bypass-tracker.d.ts +0 -4
- package/dist/src/services/mode/bypass-tracker.js +0 -31
- package/dist/src/services/mode/mode-enforcement.d.ts +0 -14
- package/dist/src/services/mode/mode-enforcement.js +0 -84
- package/dist/src/services/mut/assert-scanner.d.ts +0 -6
- package/dist/src/services/mut/assert-scanner.js +0 -116
- package/dist/src/services/mut/index.d.ts +0 -8
- package/dist/src/services/mut/index.js +0 -7
- package/dist/src/services/mut/mut-runner.d.ts +0 -39
- package/dist/src/services/mut/mut-runner.js +0 -29
- package/dist/src/services/mut/production-stryker.d.ts +0 -2
- package/dist/src/services/mut/production-stryker.js +0 -75
- package/dist/src/services/mut/report-builder.d.ts +0 -11
- package/dist/src/services/mut/report-builder.js +0 -110
- package/dist/src/services/mut/report-loader.d.ts +0 -31
- package/dist/src/services/mut/report-loader.js +0 -78
- package/dist/src/services/mut/thresholds.d.ts +0 -21
- package/dist/src/services/mut/thresholds.js +0 -22
- package/dist/src/services/mut/types.d.ts +0 -336
- package/dist/src/services/mut/types.js +0 -59
- package/dist/src/services/observability/aggregation.d.ts +0 -64
- package/dist/src/services/observability/aggregation.js +0 -217
- package/dist/src/services/observability/jsonl-store.d.ts +0 -59
- package/dist/src/services/observability/jsonl-store.js +0 -120
- package/dist/src/services/observability/observability-service.d.ts +0 -95
- package/dist/src/services/observability/observability-service.js +0 -119
- package/dist/src/services/observability/report-formatter.d.ts +0 -42
- package/dist/src/services/observability/report-formatter.js +0 -156
- package/dist/src/services/openspec/openspec-archive-service.d.ts +0 -12
- package/dist/src/services/openspec/openspec-archive-service.js +0 -28
- package/dist/src/services/openspec/openspec-bridge-service.d.ts +0 -16
- package/dist/src/services/openspec/openspec-bridge-service.js +0 -76
- package/dist/src/services/openspec/openspec-init-service.d.ts +0 -23
- package/dist/src/services/openspec/openspec-init-service.js +0 -122
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.d.ts +0 -31
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.js +0 -95
- package/dist/src/services/openspec/openspec-render-service.d.ts +0 -38
- package/dist/src/services/openspec/openspec-render-service.js +0 -130
- package/dist/src/services/openspec/openspec-scan-service.d.ts +0 -6
- package/dist/src/services/openspec/openspec-scan-service.js +0 -123
- package/dist/src/services/openspec/openspec-types.d.ts +0 -39
- package/dist/src/services/openspec/openspec-types.js +0 -1
- package/dist/src/services/openspec/openspec-validate-service.d.ts +0 -27
- package/dist/src/services/openspec/openspec-validate-service.js +0 -77
- package/dist/src/services/perf/perf-baseline-service.d.ts +0 -70
- package/dist/src/services/perf/perf-baseline-service.js +0 -214
- package/dist/src/services/polyrepo/polyrepo-dispatcher.d.ts +0 -34
- package/dist/src/services/polyrepo/polyrepo-dispatcher.js +0 -119
- package/dist/src/services/polyrepo/polyrepo-scanner.d.ts +0 -9
- package/dist/src/services/polyrepo/polyrepo-scanner.js +0 -94
- package/dist/src/services/polyrepo/polyrepo-service.d.ts +0 -34
- package/dist/src/services/polyrepo/polyrepo-service.js +0 -49
- package/dist/src/services/polyrepo/polyrepo-types.d.ts +0 -55
- package/dist/src/services/polyrepo/polyrepo-types.js +0 -1
- package/dist/src/services/prd/handoff-auto-regen.d.ts +0 -22
- package/dist/src/services/prd/handoff-auto-regen.js +0 -73
- package/dist/src/services/prd/handoff-service.d.ts +0 -54
- package/dist/src/services/prd/handoff-service.js +0 -142
- package/dist/src/services/prd/handoff-types.d.ts +0 -64
- package/dist/src/services/prd/handoff-types.js +0 -22
- package/dist/src/services/prd/prd-blocks-checker.d.ts +0 -51
- package/dist/src/services/prd/prd-blocks-checker.js +0 -130
- package/dist/src/services/prd/project-scan-reader.d.ts +0 -24
- package/dist/src/services/prd/project-scan-reader.js +0 -150
- package/dist/src/services/prd/project-scan-sediment.d.ts +0 -97
- package/dist/src/services/prd/project-scan-sediment.js +0 -445
- package/dist/src/services/prd/project-scan-types.d.ts +0 -66
- package/dist/src/services/prd/project-scan-types.js +0 -20
- package/dist/src/services/preferences/preferences-service.d.ts +0 -38
- package/dist/src/services/preferences/preferences-service.js +0 -198
- package/dist/src/services/preferences/preferences-types.d.ts +0 -148
- package/dist/src/services/preferences/preferences-types.js +0 -53
- package/dist/src/services/profiles/profile-service.d.ts +0 -6
- package/dist/src/services/profiles/profile-service.js +0 -19
- package/dist/src/services/progress/progress-service.d.ts +0 -125
- package/dist/src/services/progress/progress-service.js +0 -192
- package/dist/src/services/providers/minimax-provider-service.d.ts +0 -24
- package/dist/src/services/providers/minimax-provider-service.js +0 -143
- package/dist/src/services/providers/minimax-worker-service.d.ts +0 -21
- package/dist/src/services/providers/minimax-worker-service.js +0 -83
- package/dist/src/services/proxy/proxy-service.d.ts +0 -7
- package/dist/src/services/proxy/proxy-service.js +0 -31
- package/dist/src/services/qa/browser-event-logger.d.ts +0 -40
- package/dist/src/services/qa/browser-event-logger.js +0 -54
- package/dist/src/services/qa/browser-restart-detector.d.ts +0 -74
- package/dist/src/services/qa/browser-restart-detector.js +0 -138
- package/dist/src/services/qa/browser-reuse-hint.d.ts +0 -18
- package/dist/src/services/qa/browser-reuse-hint.js +0 -18
- package/dist/src/services/qa/browser-wrapper-service.d.ts +0 -37
- package/dist/src/services/qa/browser-wrapper-service.js +0 -88
- package/dist/src/services/qa/qa-business-review-state.d.ts +0 -47
- package/dist/src/services/qa/qa-business-review-state.js +0 -96
- package/dist/src/services/rd/ast-gate.d.ts +0 -19
- package/dist/src/services/rd/ast-gate.js +0 -71
- package/dist/src/services/rd/impl.d.ts +0 -9
- package/dist/src/services/rd/impl.js +0 -57
- package/dist/src/services/rd/rd-service.d.ts +0 -129
- package/dist/src/services/rd/rd-service.js +0 -441
- package/dist/src/services/rd/reviewer-dispatch-policy.d.ts +0 -122
- package/dist/src/services/rd/reviewer-dispatch-policy.js +0 -148
- package/dist/src/services/rd/standards-diagnostic.d.ts +0 -76
- package/dist/src/services/rd/standards-diagnostic.js +0 -166
- package/dist/src/services/rd/strategic-stage.d.ts +0 -4
- package/dist/src/services/rd/strategic-stage.js +0 -15
- package/dist/src/services/rd/strategy.d.ts +0 -13
- package/dist/src/services/rd/strategy.js +0 -60
- package/dist/src/services/rd/tactical-stage.d.ts +0 -33
- package/dist/src/services/rd/tactical-stage.js +0 -62
- package/dist/src/services/rd/types.d.ts +0 -252
- package/dist/src/services/rd/types.js +0 -47
- package/dist/src/services/recommendations/capability-availability.d.ts +0 -5
- package/dist/src/services/recommendations/capability-availability.js +0 -40
- package/dist/src/services/recommendations/capability-map-service.d.ts +0 -7
- package/dist/src/services/recommendations/capability-map-service.js +0 -131
- package/dist/src/services/recommendations/capability-seed-items.d.ts +0 -2
- package/dist/src/services/recommendations/capability-seed-items.js +0 -140
- package/dist/src/services/recommendations/capability-seed-mappings.d.ts +0 -2
- package/dist/src/services/recommendations/capability-seed-mappings.js +0 -54
- package/dist/src/services/recommendations/capability-seed-sources.d.ts +0 -2
- package/dist/src/services/recommendations/capability-seed-sources.js +0 -35
- package/dist/src/services/recommendations/recommendation-service.d.ts +0 -8
- package/dist/src/services/recommendations/recommendation-service.js +0 -106
- package/dist/src/services/recommendations/recommendation-types.d.ts +0 -129
- package/dist/src/services/recommendations/recommendation-types.js +0 -1
- package/dist/src/services/recommendations/seed-capability-catalog.d.ts +0 -3
- package/dist/src/services/recommendations/seed-capability-catalog.js +0 -3
- package/dist/src/services/refactor/refactor-service.d.ts +0 -9
- package/dist/src/services/refactor/refactor-service.js +0 -36
- package/dist/src/services/release/release-state.d.ts +0 -70
- package/dist/src/services/release/release-state.js +0 -140
- package/dist/src/services/retrospective/retrospective-index.d.ts +0 -37
- package/dist/src/services/retrospective/retrospective-index.js +0 -110
- package/dist/src/services/retrospective/retrospective-search-service.d.ts +0 -55
- package/dist/src/services/retrospective/retrospective-search-service.js +0 -107
- package/dist/src/services/retrospective/retrospective-show.d.ts +0 -40
- package/dist/src/services/retrospective/retrospective-show.js +0 -109
- package/dist/src/services/reviewer/model-family.d.ts +0 -18
- package/dist/src/services/reviewer/model-family.js +0 -70
- package/dist/src/services/reviewer/providers/anthropic.d.ts +0 -2
- package/dist/src/services/reviewer/providers/anthropic.js +0 -61
- package/dist/src/services/reviewer/providers/ollama.d.ts +0 -26
- package/dist/src/services/reviewer/providers/ollama.js +0 -38
- package/dist/src/services/reviewer/providers/openai.d.ts +0 -2
- package/dist/src/services/reviewer/providers/openai.js +0 -63
- package/dist/src/services/reviewer/reviewer-config.d.ts +0 -34
- package/dist/src/services/reviewer/reviewer-config.js +0 -100
- package/dist/src/services/reviewer/reviewer-service.d.ts +0 -56
- package/dist/src/services/reviewer/reviewer-service.js +0 -263
- package/dist/src/services/reviewer/selection-strategies.d.ts +0 -27
- package/dist/src/services/reviewer/selection-strategies.js +0 -53
- package/dist/src/services/role/role-registry.d.ts +0 -38
- package/dist/src/services/role/role-registry.js +0 -83
- package/dist/src/services/runtime/runtime-detector.d.ts +0 -15
- package/dist/src/services/runtime/runtime-detector.js +0 -62
- package/dist/src/services/runtime/runtime-service.d.ts +0 -59
- package/dist/src/services/runtime/runtime-service.js +0 -51
- package/dist/src/services/runtime/vendor-adapter.d.ts +0 -59
- package/dist/src/services/runtime/vendor-adapter.js +0 -1
- package/dist/src/services/runtime/vendors/claude-code.d.ts +0 -7
- package/dist/src/services/runtime/vendors/claude-code.js +0 -39
- package/dist/src/services/runtime/vendors/codex.d.ts +0 -7
- package/dist/src/services/runtime/vendors/codex.js +0 -43
- package/dist/src/services/runtime/vendors/copilot.d.ts +0 -7
- package/dist/src/services/runtime/vendors/copilot.js +0 -40
- package/dist/src/services/sc/index.d.ts +0 -1
- package/dist/src/services/sc/index.js +0 -1
- package/dist/src/services/sc/sc-service.d.ts +0 -131
- package/dist/src/services/sc/sc-service.js +0 -552
- package/dist/src/services/scan/acceptance-coverage-service.d.ts +0 -42
- package/dist/src/services/scan/acceptance-coverage-service.js +0 -140
- package/dist/src/services/scan/api-surface-service.d.ts +0 -69
- package/dist/src/services/scan/api-surface-service.js +0 -239
- package/dist/src/services/scan/archetype-service.d.ts +0 -5
- package/dist/src/services/scan/archetype-service.js +0 -242
- package/dist/src/services/scan/diff-scope-service.d.ts +0 -40
- package/dist/src/services/scan/diff-scope-service.js +0 -198
- package/dist/src/services/scan/existing-system-service.d.ts +0 -7
- package/dist/src/services/scan/existing-system-service.js +0 -300
- package/dist/src/services/scan/file-size-scan.d.ts +0 -23
- package/dist/src/services/scan/file-size-scan.js +0 -68
- package/dist/src/services/scan/karpathy-service.d.ts +0 -60
- package/dist/src/services/scan/karpathy-service.js +0 -228
- package/dist/src/services/scan/libraries-service.d.ts +0 -24
- package/dist/src/services/scan/libraries-service.js +0 -419
- package/dist/src/services/scan/libraries-types.d.ts +0 -59
- package/dist/src/services/scan/libraries-types.js +0 -9
- package/dist/src/services/scan/orphan-service.d.ts +0 -76
- package/dist/src/services/scan/orphan-service.js +0 -538
- package/dist/src/services/scan/scan-types.d.ts +0 -59
- package/dist/src/services/scan/scan-types.js +0 -1
- package/dist/src/services/scan/type-sanity-service.d.ts +0 -23
- package/dist/src/services/scan/type-sanity-service.js +0 -116
- package/dist/src/services/security/safe-settings-path.d.ts +0 -12
- package/dist/src/services/security/safe-settings-path.js +0 -104
- package/dist/src/services/sediment/dispose-confirm.d.ts +0 -9
- package/dist/src/services/sediment/dispose-confirm.js +0 -5
- package/dist/src/services/sediment/json-schema.d.ts +0 -247
- package/dist/src/services/sediment/json-schema.js +0 -26
- package/dist/src/services/sediment/manifest-lint.d.ts +0 -13
- package/dist/src/services/sediment/manifest-lint.js +0 -11
- package/dist/src/services/sediment/pool-paths.d.ts +0 -22
- package/dist/src/services/sediment/pool-paths.js +0 -25
- package/dist/src/services/sediment/pool-read.d.ts +0 -20
- package/dist/src/services/sediment/pool-read.js +0 -73
- package/dist/src/services/sediment/pool-rebuild-index.d.ts +0 -15
- package/dist/src/services/sediment/pool-rebuild-index.js +0 -28
- package/dist/src/services/sediment/pool-write.d.ts +0 -14
- package/dist/src/services/sediment/pool-write.js +0 -25
- package/dist/src/services/sediment/promotion-gate.d.ts +0 -12
- package/dist/src/services/sediment/promotion-gate.js +0 -20
- package/dist/src/services/sediment/types.d.ts +0 -52
- package/dist/src/services/sediment/types.js +0 -1
- package/dist/src/services/session/binding-status-service.d.ts +0 -56
- package/dist/src/services/session/binding-status-service.js +0 -106
- package/dist/src/services/session/binding-store.d.ts +0 -161
- package/dist/src/services/session/binding-store.js +0 -509
- package/dist/src/services/session/caller-binding-service.d.ts +0 -70
- package/dist/src/services/session/caller-binding-service.js +0 -148
- package/dist/src/services/session/caller-id-types.d.ts +0 -77
- package/dist/src/services/session/caller-id-types.js +0 -46
- package/dist/src/services/session/getSessionDir.d.ts +0 -1
- package/dist/src/services/session/getSessionDir.js +0 -27
- package/dist/src/services/session/index.d.ts +0 -6
- package/dist/src/services/session/index.js +0 -7
- package/dist/src/services/session/platform-fallbacks.d.ts +0 -31
- package/dist/src/services/session/platform-fallbacks.js +0 -35
- package/dist/src/services/session/resolve-caller-id.d.ts +0 -57
- package/dist/src/services/session/resolve-caller-id.js +0 -88
- package/dist/src/services/session/session-binding-bridge.d.ts +0 -76
- package/dist/src/services/session/session-binding-bridge.js +0 -247
- package/dist/src/services/session/session-checkpoint-service.d.ts +0 -57
- package/dist/src/services/session/session-checkpoint-service.js +0 -143
- package/dist/src/services/session/session-manager.d.ts +0 -168
- package/dist/src/services/session/session-manager.js +0 -502
- package/dist/src/services/session/session-resume-service.d.ts +0 -25
- package/dist/src/services/session/session-resume-service.js +0 -101
- package/dist/src/services/share/bundle-reader.d.ts +0 -100
- package/dist/src/services/share/bundle-reader.js +0 -434
- package/dist/src/services/share/bundle-types.d.ts +0 -392
- package/dist/src/services/share/bundle-types.js +0 -318
- package/dist/src/services/share/bundle-writer.d.ts +0 -97
- package/dist/src/services/share/bundle-writer.js +0 -429
- package/dist/src/services/share/run-state-contract.d.ts +0 -133
- package/dist/src/services/share/run-state-contract.js +0 -138
- package/dist/src/services/signal/cancel-handler.d.ts +0 -14
- package/dist/src/services/signal/cancel-handler.js +0 -76
- package/dist/src/services/skill/resume-detector.d.ts +0 -54
- package/dist/src/services/skill/resume-detector.js +0 -334
- package/dist/src/services/skill/skill-scheduler.d.ts +0 -40
- package/dist/src/services/skill/skill-scheduler.js +0 -53
- package/dist/src/services/skill/skill-search-service.d.ts +0 -88
- package/dist/src/services/skill/skill-search-service.js +0 -228
- package/dist/src/services/skillhub/release-diff.d.ts +0 -18
- package/dist/src/services/skillhub/release-diff.js +0 -38
- package/dist/src/services/skillhub/release-export.d.ts +0 -8
- package/dist/src/services/skillhub/release-export.js +0 -31
- package/dist/src/services/skillhub/release-gc-blobs.d.ts +0 -13
- package/dist/src/services/skillhub/release-gc-blobs.js +0 -32
- package/dist/src/services/skillhub/release-import.d.ts +0 -7
- package/dist/src/services/skillhub/release-import.js +0 -64
- package/dist/src/services/skillhub/release-retain.d.ts +0 -23
- package/dist/src/services/skillhub/release-retain.js +0 -94
- package/dist/src/services/skillhub/sqlite-store.d.ts +0 -22
- package/dist/src/services/skillhub/sqlite-store.js +0 -63
- package/dist/src/services/skillhub/tar-runtime.d.ts +0 -21
- package/dist/src/services/skillhub/tar-runtime.js +0 -91
- package/dist/src/services/skillhub/types.d.ts +0 -115
- package/dist/src/services/skillhub/types.js +0 -1
- package/dist/src/services/skills/hooks-settings-service.d.ts +0 -137
- package/dist/src/services/skills/hooks-settings-service.js +0 -396
- package/dist/src/services/skills/skill-conformance-service.d.ts +0 -40
- package/dist/src/services/skills/skill-conformance-service.js +0 -139
- package/dist/src/services/skills/skill-presence-service.d.ts +0 -158
- package/dist/src/services/skills/skill-presence-service.js +0 -474
- package/dist/src/services/skills/skill-registry.d.ts +0 -17
- package/dist/src/services/skills/skill-registry.js +0 -67
- package/dist/src/services/skills/skill-runbook-service.d.ts +0 -11
- package/dist/src/services/skills/skill-runbook-service.js +0 -128
- package/dist/src/services/skills/skill-statusline-renderer.d.ts +0 -6
- package/dist/src/services/skills/skill-statusline-renderer.js +0 -55
- package/dist/src/services/skills/skill-statusline-service.d.ts +0 -24
- package/dist/src/services/skills/skill-statusline-service.js +0 -110
- package/dist/src/services/skills/statusline-settings-service.d.ts +0 -59
- package/dist/src/services/skills/statusline-settings-service.js +0 -141
- package/dist/src/services/skills/sync-service.d.ts +0 -86
- package/dist/src/services/skills/sync-service.js +0 -271
- package/dist/src/services/slice/calibration-store.d.ts +0 -39
- package/dist/src/services/slice/calibration-store.js +0 -68
- package/dist/src/services/slice/cross-pass-edge-merger.d.ts +0 -53
- package/dist/src/services/slice/cross-pass-edge-merger.js +0 -246
- package/dist/src/services/slice/granularity-decider.d.ts +0 -37
- package/dist/src/services/slice/granularity-decider.js +0 -40
- package/dist/src/services/slice/llm-arbitrator.d.ts +0 -35
- package/dist/src/services/slice/llm-arbitrator.js +0 -63
- package/dist/src/services/slice/multi-pass-orchestrator.d.ts +0 -67
- package/dist/src/services/slice/multi-pass-orchestrator.js +0 -225
- package/dist/src/services/slice/schema-router.d.ts +0 -44
- package/dist/src/services/slice/schema-router.js +0 -61
- package/dist/src/services/slice/slice-archive-service.d.ts +0 -20
- package/dist/src/services/slice/slice-archive-service.js +0 -111
- package/dist/src/services/slice/slice-benchmark-service.d.ts +0 -19
- package/dist/src/services/slice/slice-benchmark-service.js +0 -60
- package/dist/src/services/slice/slice-check-service.d.ts +0 -2
- package/dist/src/services/slice/slice-check-service.js +0 -459
- package/dist/src/services/slice/slice-check-types.d.ts +0 -104
- package/dist/src/services/slice/slice-check-types.js +0 -28
- package/dist/src/services/slice/slice-decompose-runners.d.ts +0 -23
- package/dist/src/services/slice/slice-decompose-runners.js +0 -174
- package/dist/src/services/slice/slice-decompose-service.d.ts +0 -24
- package/dist/src/services/slice/slice-decompose-service.js +0 -532
- package/dist/src/services/slice/slice-decompose-types.d.ts +0 -263
- package/dist/src/services/slice/slice-decompose-types.js +0 -30
- package/dist/src/services/slice/slice-integration.d.ts +0 -43
- package/dist/src/services/slice/slice-integration.js +0 -106
- package/dist/src/services/slice/slice-pick-service.d.ts +0 -32
- package/dist/src/services/slice/slice-pick-service.js +0 -75
- package/dist/src/services/slice/slice-review-state.d.ts +0 -70
- package/dist/src/services/slice/slice-review-state.js +0 -109
- package/dist/src/services/slice/slice-topology-types.d.ts +0 -115
- package/dist/src/services/slice/slice-topology-types.js +0 -20
- package/dist/src/services/smoke/smoke-paths-state.d.ts +0 -73
- package/dist/src/services/smoke/smoke-paths-state.js +0 -117
- package/dist/src/services/sop/gate-enforce-service.d.ts +0 -33
- package/dist/src/services/sop/gate-enforce-service.js +0 -168
- package/dist/src/services/sop/sop-advance-service.d.ts +0 -74
- package/dist/src/services/sop/sop-advance-service.js +0 -115
- package/dist/src/services/sop/sop-check-service.d.ts +0 -45
- package/dist/src/services/sop/sop-check-service.js +0 -181
- package/dist/src/services/sop/sop-paths.d.ts +0 -62
- package/dist/src/services/sop/sop-paths.js +0 -92
- package/dist/src/services/sop/sop-registry-service.d.ts +0 -46
- package/dist/src/services/sop/sop-registry-service.js +0 -89
- package/dist/src/services/sop/sop-service.d.ts +0 -55
- package/dist/src/services/sop/sop-service.js +0 -222
- package/dist/src/services/sop/sop-types.d.ts +0 -95
- package/dist/src/services/sop/sop-types.js +0 -11
- package/dist/src/services/standards/ide-aware-standards-service.d.ts +0 -94
- package/dist/src/services/standards/ide-aware-standards-service.js +0 -89
- package/dist/src/services/standards/loop-engineering-lint.d.ts +0 -38
- package/dist/src/services/standards/loop-engineering-lint.js +0 -101
- package/dist/src/services/standards/loop-engineering-readiness-lint.d.ts +0 -111
- package/dist/src/services/standards/loop-engineering-readiness-lint.js +0 -248
- package/dist/src/services/standards/migrate-claude-rules-service.d.ts +0 -19
- package/dist/src/services/standards/migrate-claude-rules-service.js +0 -193
- package/dist/src/services/standards/migrate-service.d.ts +0 -63
- package/dist/src/services/standards/migrate-service.js +0 -193
- package/dist/src/services/standards/missing-standards-detector.d.ts +0 -79
- package/dist/src/services/standards/missing-standards-detector.js +0 -132
- package/dist/src/services/standards/project-context.d.ts +0 -24
- package/dist/src/services/standards/project-context.js +0 -314
- package/dist/src/services/standards/project-standards-service.d.ts +0 -114
- package/dist/src/services/standards/project-standards-service.js +0 -574
- package/dist/src/services/tech/tech-service.d.ts +0 -69
- package/dist/src/services/tech/tech-service.js +0 -299
- package/dist/src/services/test-cache/test-cache-service.d.ts +0 -70
- package/dist/src/services/test-cache/test-cache-service.js +0 -175
- package/dist/src/services/understand/hybrid-types.d.ts +0 -32
- package/dist/src/services/understand/hybrid-types.js +0 -1
- package/dist/src/services/understand/understand-hybrid-service.d.ts +0 -10
- package/dist/src/services/understand/understand-hybrid-service.js +0 -100
- package/dist/src/services/understand/understand-scan-service.d.ts +0 -28
- package/dist/src/services/understand/understand-scan-service.js +0 -170
- package/dist/src/services/understand/understand-types.d.ts +0 -50
- package/dist/src/services/understand/understand-types.js +0 -1
- package/dist/src/services/upgrade/1x-detector-service.d.ts +0 -7
- package/dist/src/services/upgrade/1x-detector-service.js +0 -94
- package/dist/src/services/upgrade/gitignore-migrate-service.d.ts +0 -56
- package/dist/src/services/upgrade/gitignore-migrate-service.js +0 -170
- package/dist/src/services/upgrade/upgrade-service.d.ts +0 -81
- package/dist/src/services/upgrade/upgrade-service.js +0 -403
- package/dist/src/services/verdict/envelopes.d.ts +0 -93
- package/dist/src/services/verdict/envelopes.js +0 -349
- package/dist/src/services/verdict/verdict-aggregator.d.ts +0 -94
- package/dist/src/services/verdict/verdict-aggregator.js +0 -112
- package/dist/src/services/workflow/artifact-paths.d.ts +0 -59
- package/dist/src/services/workflow/artifact-paths.js +0 -166
- package/dist/src/services/workflow/autonomous-resume-writer.d.ts +0 -16
- package/dist/src/services/workflow/autonomous-resume-writer.js +0 -170
- package/dist/src/services/workflow/pipeline-verify-service.d.ts +0 -90
- package/dist/src/services/workflow/pipeline-verify-service.js +0 -449
- package/dist/src/services/workflow/plan-reader.d.ts +0 -29
- package/dist/src/services/workflow/plan-reader.js +0 -174
- package/dist/src/services/workflow/plan-refresher.d.ts +0 -32
- package/dist/src/services/workflow/plan-refresher.js +0 -353
- package/dist/src/services/workflow/plan-trigger-detector.d.ts +0 -55
- package/dist/src/services/workflow/plan-trigger-detector.js +0 -142
- package/dist/src/services/workflow/workflow-autonomous-resume-helpers.d.ts +0 -19
- package/dist/src/services/workflow/workflow-autonomous-resume-helpers.js +0 -300
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +0 -100
- package/dist/src/services/workflow/workflow-autonomous-service.js +0 -306
- package/dist/src/services/workflow/workflow-loader.d.ts +0 -63
- package/dist/src/services/workflow/workflow-loader.js +0 -168
- package/dist/src/services/workflow/workflow-router-service.d.ts +0 -85
- package/dist/src/services/workflow/workflow-router-service.js +0 -233
- package/dist/src/services/workflow/workflow-skip-service.d.ts +0 -106
- package/dist/src/services/workflow/workflow-skip-service.js +0 -209
- package/dist/src/services/workflow/workflow-spec.d.ts +0 -116
- package/dist/src/services/workflow/workflow-spec.js +0 -431
- package/dist/src/services/workflow/workflow-state-store.d.ts +0 -27
- package/dist/src/services/workflow/workflow-state-store.js +0 -95
- package/dist/src/services/workspace/claude-settings-template.d.ts +0 -101
- package/dist/src/services/workspace/claude-settings-template.js +0 -254
- package/dist/src/services/workspace/migrate-1-4-1-service.d.ts +0 -44
- package/dist/src/services/workspace/migrate-1-4-1-service.js +0 -195
- package/dist/src/services/workspace/migrate-service.d.ts +0 -2
- package/dist/src/services/workspace/migrate-service.js +0 -613
- package/dist/src/services/workspace/migrate-types.d.ts +0 -127
- package/dist/src/services/workspace/migrate-types.js +0 -21
- package/dist/src/services/workspace/reconcile-service.d.ts +0 -188
- package/dist/src/services/workspace/reconcile-service.js +0 -683
- package/dist/src/services/workspace/reconcile-types.d.ts +0 -130
- package/dist/src/services/workspace/reconcile-types.js +0 -13
- package/dist/src/services/workspace/sid-naming-guard.d.ts +0 -17
- package/dist/src/services/workspace/sid-naming-guard.js +0 -34
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +0 -45
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +0 -194
- package/dist/src/services/workspace/workspace-clean-service.d.ts +0 -28
- package/dist/src/services/workspace/workspace-clean-service.js +0 -46
- package/dist/src/services/workspace/workspace-service.d.ts +0 -177
- package/dist/src/services/workspace/workspace-service.js +0 -432
- package/dist/src/services/workspace/workspace-state-service.d.ts +0 -7
- package/dist/src/services/workspace/workspace-state-service.js +0 -43
- package/dist/src/shared/format-md-compact.d.ts +0 -32
- package/dist/src/shared/format-md-compact.js +0 -297
- package/dist/src/shared/frontmatter.d.ts +0 -6
- package/dist/src/shared/frontmatter.js +0 -165
- package/dist/src/shared/fs-utils.d.ts +0 -4
- package/dist/src/shared/fs-utils.js +0 -16
- package/dist/src/shared/fs.d.ts +0 -4
- package/dist/src/shared/fs.js +0 -26
- package/dist/src/shared/incrementing-number.d.ts +0 -23
- package/dist/src/shared/incrementing-number.js +0 -68
- package/dist/src/shared/json-schema-mini.d.ts +0 -10
- package/dist/src/shared/json-schema-mini.js +0 -113
- package/dist/src/shared/path-safety.d.ts +0 -21
- package/dist/src/shared/path-safety.js +0 -54
- package/dist/src/shared/path-utils.d.ts +0 -13
- package/dist/src/shared/path-utils.js +0 -56
- package/dist/src/shared/paths.d.ts +0 -6
- package/dist/src/shared/paths.js +0 -50
- package/dist/src/shared/planner-response.d.ts +0 -21
- package/dist/src/shared/planner-response.js +0 -26
- package/dist/src/shared/platform.d.ts +0 -6
- package/dist/src/shared/platform.js +0 -11
- package/dist/src/shared/process.d.ts +0 -5
- package/dist/src/shared/process.js +0 -12
- package/dist/src/shared/result.d.ts +0 -22
- package/dist/src/shared/result.js +0 -46
- package/dist/src/shared/stale-policy.d.ts +0 -67
- package/dist/src/shared/stale-policy.js +0 -85
- package/dist/src/shared/version.d.ts +0 -1
- package/dist/src/shared/version.js +0 -1
- package/dist/src/skills/peaks-maker/index.d.ts +0 -5
- package/dist/src/skills/peaks-maker/index.js +0 -32
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { listRequestArtifacts } from '../artifacts/request-artifact-service.js';
|
|
2
|
-
import { scanOpenSpec } from '../openspec/openspec-scan-service.js';
|
|
3
|
-
import { scanUnderstandAnything } from '../understand/understand-scan-service.js';
|
|
4
|
-
import { seedCapabilityItems } from '../recommendations/capability-seed-items.js';
|
|
5
|
-
import { requiredSkillNames } from '../../shared/paths.js';
|
|
6
|
-
import { getSkillPresence } from '../skills/skill-presence-service.js';
|
|
7
|
-
const SKILL_PRESENCE_FRESHNESS_THRESHOLD_MS = 24 * 60 * 60 * 1000;
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the user-facing `ok` field. `workspace-only` (default) returns true
|
|
10
|
-
* when the runbook / workspace layout is healthy, even if 1-2 non-blocking
|
|
11
|
-
* doctor checks fail. `strict` returns false when the doctor aggregate fails.
|
|
12
|
-
* The CLI default is `workspace-only`; `peaks project dashboard --strict`
|
|
13
|
-
* restores the legacy aggregate semantics.
|
|
14
|
-
*/
|
|
15
|
-
export function resolveDashboardOk(args) {
|
|
16
|
-
if (args.okPolicy === 'strict') {
|
|
17
|
-
return { ok: args.doctor.ok && args.runbookHealth.ok, okPolicy: 'strict' };
|
|
18
|
-
}
|
|
19
|
-
return { ok: args.runbookHealth.ok, okPolicy: 'workspace-only' };
|
|
20
|
-
}
|
|
21
|
-
function defaultClock() {
|
|
22
|
-
return new Date().toISOString();
|
|
23
|
-
}
|
|
24
|
-
function groupRequestsByRole(items) {
|
|
25
|
-
const byRole = { prd: [], ui: [], rd: [], qa: [], sc: [] };
|
|
26
|
-
for (const item of items) {
|
|
27
|
-
byRole[item.role].push(item);
|
|
28
|
-
}
|
|
29
|
-
return byRole;
|
|
30
|
-
}
|
|
31
|
-
function countRequestsByState(items) {
|
|
32
|
-
const counts = {};
|
|
33
|
-
for (const item of items) {
|
|
34
|
-
counts[item.state] = (counts[item.state] ?? 0) + 1;
|
|
35
|
-
}
|
|
36
|
-
return counts;
|
|
37
|
-
}
|
|
38
|
-
async function loadDoctorAndRunbookHealth(doctorOverride, runbookOverride) {
|
|
39
|
-
if (doctorOverride !== undefined && runbookOverride !== undefined) {
|
|
40
|
-
return { doctor: doctorOverride, runbookHealth: runbookOverride };
|
|
41
|
-
}
|
|
42
|
-
if (doctorOverride !== undefined) {
|
|
43
|
-
return {
|
|
44
|
-
doctor: doctorOverride,
|
|
45
|
-
runbookHealth: { ok: true, required: 0, healthy: 0, missingRunbook: [], applyNoteFailed: [] }
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
const { runDoctor } = await import('../doctor/doctor-service.js');
|
|
49
|
-
const report = await runDoctor();
|
|
50
|
-
return {
|
|
51
|
-
doctor: { ok: report.summary.ok, passed: report.summary.passed, failed: report.summary.failed },
|
|
52
|
-
runbookHealth: runbookOverride ?? summarizeRunbookHealth(report.checks)
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function summarizeRunbookHealth(checks) {
|
|
56
|
-
const missingRunbook = [];
|
|
57
|
-
const applyNoteFailed = [];
|
|
58
|
-
for (const check of checks) {
|
|
59
|
-
if (!check.ok && check.id.startsWith('skill-runbook:')) {
|
|
60
|
-
missingRunbook.push(check.id.slice('skill-runbook:'.length));
|
|
61
|
-
}
|
|
62
|
-
if (!check.ok && check.id.startsWith('skill-apply-note:')) {
|
|
63
|
-
applyNoteFailed.push(check.id.slice('skill-apply-note:'.length));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
const required = requiredSkillNames.length;
|
|
67
|
-
const healthy = Math.max(0, required - missingRunbook.length - applyNoteFailed.length);
|
|
68
|
-
return {
|
|
69
|
-
ok: missingRunbook.length === 0 && applyNoteFailed.length === 0,
|
|
70
|
-
required,
|
|
71
|
-
healthy,
|
|
72
|
-
missingRunbook,
|
|
73
|
-
applyNoteFailed
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
function buildCapabilitiesSummary(sampleSize) {
|
|
77
|
-
const items = seedCapabilityItems;
|
|
78
|
-
return {
|
|
79
|
-
count: items.length,
|
|
80
|
-
sample: items.slice(0, sampleSize).map((item) => ({
|
|
81
|
-
capabilityId: item.capabilityId,
|
|
82
|
-
name: item.name,
|
|
83
|
-
itemType: item.itemType,
|
|
84
|
-
category: item.category
|
|
85
|
-
}))
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function buildSkillPresenceSummary(presence, projectRoot) {
|
|
89
|
-
// When the caller doesn't supply presence, resolve it from the dashboard's
|
|
90
|
-
// project root rather than the process cwd.
|
|
91
|
-
const resolved = presence === undefined ? getSkillPresence(projectRoot) : presence;
|
|
92
|
-
if (resolved === null) {
|
|
93
|
-
return { active: false, fresh: true };
|
|
94
|
-
}
|
|
95
|
-
const setAtMs = Date.parse(resolved.setAt);
|
|
96
|
-
const fresh = !Number.isNaN(setAtMs) && Date.now() - setAtMs <= SKILL_PRESENCE_FRESHNESS_THRESHOLD_MS;
|
|
97
|
-
return {
|
|
98
|
-
active: true,
|
|
99
|
-
fresh,
|
|
100
|
-
skill: resolved.skill,
|
|
101
|
-
...(resolved.mode !== undefined ? { mode: resolved.mode } : {}),
|
|
102
|
-
...(resolved.gate !== undefined ? { gate: resolved.gate } : {}),
|
|
103
|
-
setAt: resolved.setAt
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
export async function loadProjectDashboard(options) {
|
|
107
|
-
const clock = options.clock ?? defaultClock;
|
|
108
|
-
const sampleSize = options.sampleCapabilities ?? 8;
|
|
109
|
-
const okPolicy = options.okPolicy ?? 'workspace-only';
|
|
110
|
-
const [items, openspecReport, understandReport, doctorAndRunbook] = await Promise.all([
|
|
111
|
-
listRequestArtifacts({ projectRoot: options.projectRoot }),
|
|
112
|
-
scanOpenSpec({ openspecRoot: `${options.projectRoot}/openspec` }),
|
|
113
|
-
scanUnderstandAnything({ projectRoot: options.projectRoot }),
|
|
114
|
-
loadDoctorAndRunbookHealth(options.doctorReport, options.runbookHealth)
|
|
115
|
-
]);
|
|
116
|
-
const okVerdict = resolveDashboardOk({
|
|
117
|
-
okPolicy,
|
|
118
|
-
doctor: doctorAndRunbook.doctor,
|
|
119
|
-
runbookHealth: doctorAndRunbook.runbookHealth
|
|
120
|
-
});
|
|
121
|
-
return {
|
|
122
|
-
generatedAt: clock(),
|
|
123
|
-
projectRoot: options.projectRoot,
|
|
124
|
-
ok: okVerdict.ok,
|
|
125
|
-
okPolicy: okVerdict.okPolicy,
|
|
126
|
-
requests: {
|
|
127
|
-
count: items.length,
|
|
128
|
-
byRole: groupRequestsByRole(items),
|
|
129
|
-
byState: countRequestsByState(items)
|
|
130
|
-
},
|
|
131
|
-
openspec: {
|
|
132
|
-
exists: openspecReport.exists,
|
|
133
|
-
count: openspecReport.changes.length,
|
|
134
|
-
changes: openspecReport.changes
|
|
135
|
-
},
|
|
136
|
-
understand: {
|
|
137
|
-
exists: understandReport.exists,
|
|
138
|
-
graphExists: understandReport.graph.exists,
|
|
139
|
-
graphPath: understandReport.graph.path,
|
|
140
|
-
...(understandReport.graph.parseError !== undefined ? { parseError: understandReport.graph.parseError } : {})
|
|
141
|
-
},
|
|
142
|
-
doctor: doctorAndRunbook.doctor,
|
|
143
|
-
runbookHealth: doctorAndRunbook.runbookHealth,
|
|
144
|
-
capabilities: buildCapabilitiesSummary(sampleSize),
|
|
145
|
-
skillPresence: buildSkillPresenceSummary(options.skillPresence, options.projectRoot)
|
|
146
|
-
};
|
|
147
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const BATCH_LIMIT = 6;
|
|
2
|
-
export declare const BATCH_OVER_LIMIT_CODE = "BATCH_OVER_LIMIT";
|
|
3
|
-
export type BatchCounterWarning = {
|
|
4
|
-
readonly code: typeof BATCH_OVER_LIMIT_CODE;
|
|
5
|
-
readonly batchId: string;
|
|
6
|
-
readonly dispatched: number;
|
|
7
|
-
readonly limit: number;
|
|
8
|
-
readonly message: string;
|
|
9
|
-
};
|
|
10
|
-
/** Build the per-batch counter file path. */
|
|
11
|
-
export declare function batchCounterPath(projectRoot: string, sid: string, batchId: string): string;
|
|
12
|
-
/** A single batch counter record. */
|
|
13
|
-
export interface BatchCounterRecord {
|
|
14
|
-
readonly batchId: string;
|
|
15
|
-
readonly sessionId: string;
|
|
16
|
-
readonly createdAt: string;
|
|
17
|
-
readonly count: number;
|
|
18
|
-
}
|
|
19
|
-
/** Read the current counter; returns 0 if no file yet. */
|
|
20
|
-
export declare function readBatchCount(projectRoot: string, sid: string, batchId: string): number;
|
|
21
|
-
/** Increment the counter and return the new value (with any warning). */
|
|
22
|
-
export declare function noteDispatched(projectRoot: string, sid: string, batchId: string, now?: () => Date): {
|
|
23
|
-
count: number;
|
|
24
|
-
warning: BatchCounterWarning | null;
|
|
25
|
-
};
|
|
26
|
-
/** Reset a batch counter (called by the reducer when starting a new batch). */
|
|
27
|
-
export declare function resetBatch(projectRoot: string, sid: string, batchId: string): void;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* G5.1 / RL-1 — batch size counter.
|
|
3
|
-
*
|
|
4
|
-
* Empirical upper bound for one Dispatcher × one batch: 6 sub-agents.
|
|
5
|
-
* Above 6, the LLM / human is encouraged to split into multiple
|
|
6
|
-
* batches with an explicit reducer step in between. peaks-code's
|
|
7
|
-
* swarm phase dispatches 3; peaks-rd's 4-way fan-out dispatches 4;
|
|
8
|
-
* peaks-qa's 3-way fan-out dispatches 3. The 6 limit leaves headroom
|
|
9
|
-
* for "qa-business-api" / "qa-business-frontend" / "qa-business-regression"
|
|
10
|
-
* subdivisions (3-way + 3-way = 6) without crossing the line.
|
|
11
|
-
*
|
|
12
|
-
* The counter is in-memory per process. The Dispatcher is expected
|
|
13
|
-
* to call `noteDispatched` once per `peaks sub-agent dispatch` and
|
|
14
|
-
* reset between batches. The CLI also persists a small per-sid
|
|
15
|
-
* counter file so that sub-agent spawns invoked across multiple
|
|
16
|
-
* `peaks sub-agent dispatch` processes within the same batch can be
|
|
17
|
-
* tallied (the batch id ties them together).
|
|
18
|
-
*
|
|
19
|
-
* `BATCH_OVER_LIMIT` is a warning, not a hard fail. The user has been
|
|
20
|
-
* explicit: "RL-1 is empirical; if you have a real reason to go to 7,
|
|
21
|
-
* that's your call". A warning is the right surface — let the LLM /
|
|
22
|
-
* human read the reason and decide.
|
|
23
|
-
*/
|
|
24
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
25
|
-
import { dirname, resolve } from 'node:path';
|
|
26
|
-
import { withFileLockSync } from '../filesystem/file-lock.js';
|
|
27
|
-
export const BATCH_LIMIT = 6;
|
|
28
|
-
export const BATCH_OVER_LIMIT_CODE = 'BATCH_OVER_LIMIT';
|
|
29
|
-
/** Build the per-batch counter file path. */
|
|
30
|
-
export function batchCounterPath(projectRoot, sid, batchId) {
|
|
31
|
-
return resolve(projectRoot, '.peaks', '_sub_agents', sid, `batch-${batchId}.counter.json`);
|
|
32
|
-
}
|
|
33
|
-
/** Read the current counter; returns 0 if no file yet. */
|
|
34
|
-
export function readBatchCount(projectRoot, sid, batchId) {
|
|
35
|
-
const path = batchCounterPath(projectRoot, sid, batchId);
|
|
36
|
-
if (!existsSync(path))
|
|
37
|
-
return 0;
|
|
38
|
-
try {
|
|
39
|
-
const parsed = JSON.parse(readFileSync(path, 'utf8'));
|
|
40
|
-
return typeof parsed.count === 'number' && parsed.count >= 0 ? parsed.count : 0;
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return 0;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
/** Increment the counter and return the new value (with any warning). */
|
|
47
|
-
export function noteDispatched(projectRoot, sid, batchId, now = () => new Date()) {
|
|
48
|
-
const path = batchCounterPath(projectRoot, sid, batchId);
|
|
49
|
-
// Slice 2026-06-23-audit-4th #A1: wrap the read-modify-write in a
|
|
50
|
-
// file lock. Two concurrent `peaks sub-agent dispatch` invocations
|
|
51
|
-
// for the same (sid, batchId) would otherwise race — both call
|
|
52
|
-
// readBatchCount first, both see the same N, both write N+1, and
|
|
53
|
-
// the second write clobbers the first (lost update). The BATCH_OVER_LIMIT
|
|
54
|
-
// warning fires for the wrong threshold when this happens. The lock
|
|
55
|
-
// serializes the writes; contention is rare (only when a single
|
|
56
|
-
// batch is dispatched in parallel from the same LLM) so the spin-wait
|
|
57
|
-
// cost is bounded by MAX_LOCK_RETRIES * LOCK_RETRY_MAX_MS.
|
|
58
|
-
return withFileLockSync(path, () => {
|
|
59
|
-
const previous = readBatchCount(projectRoot, sid, batchId);
|
|
60
|
-
const next = {
|
|
61
|
-
batchId,
|
|
62
|
-
sessionId: sid,
|
|
63
|
-
createdAt: now().toISOString(),
|
|
64
|
-
count: previous + 1
|
|
65
|
-
};
|
|
66
|
-
// mkdirSync is conditional via the lock helper (it ensures the
|
|
67
|
-
// parent dir exists), but the counter file may live in a session
|
|
68
|
-
// sub-dir that the lock helper's recursive mkdir handles. Belt +
|
|
69
|
-
// suspenders: keep the explicit mkdir here so the path resolves
|
|
70
|
-
// even if withFileLockSync's mkdir is bypassed in the future.
|
|
71
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
72
|
-
writeFileSync(path, JSON.stringify(next, null, 2) + '\n', 'utf8');
|
|
73
|
-
if (next.count > BATCH_LIMIT) {
|
|
74
|
-
return {
|
|
75
|
-
count: next.count,
|
|
76
|
-
warning: {
|
|
77
|
-
code: BATCH_OVER_LIMIT_CODE,
|
|
78
|
-
batchId,
|
|
79
|
-
dispatched: next.count,
|
|
80
|
-
limit: BATCH_LIMIT,
|
|
81
|
-
message: `per RL-1, batch size 6 is empirical upper bound; you have ` +
|
|
82
|
-
`${next.count}. If you need more, split into multiple batches ` +
|
|
83
|
-
`with an explicit reducer step between them.`
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
return { count: next.count, warning: null };
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
/** Reset a batch counter (called by the reducer when starting a new batch). */
|
|
91
|
-
export function resetBatch(projectRoot, sid, batchId) {
|
|
92
|
-
const path = batchCounterPath(projectRoot, sid, batchId);
|
|
93
|
-
if (existsSync(path)) {
|
|
94
|
-
try {
|
|
95
|
-
const { unlinkSync } = require('node:fs');
|
|
96
|
-
unlinkSync(path);
|
|
97
|
-
}
|
|
98
|
-
catch { // TODO(g2): legacy silent catch — grace: 1 minor release (v2.14.0)
|
|
99
|
-
/* best-effort; counter file is informational */
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/** Public surface of a finished slice. */
|
|
2
|
-
export interface SliceContract {
|
|
3
|
-
readonly sliceId: string;
|
|
4
|
-
readonly sessionId: string;
|
|
5
|
-
readonly completedAt: string;
|
|
6
|
-
/** Public exports (function / class / const / var names). */
|
|
7
|
-
readonly exports: readonly string[];
|
|
8
|
-
/** Public type names. */
|
|
9
|
-
readonly types: readonly string[];
|
|
10
|
-
/** Public function / method signatures, e.g. `"validateDag(dag: SliceDag): void"`. */
|
|
11
|
-
readonly publicSignatures: readonly string[];
|
|
12
|
-
/** Optional: which downstream slice IDs the contract is broadcast-ready for. */
|
|
13
|
-
readonly broadcastTo?: readonly string[];
|
|
14
|
-
/** SHA-256 hash of the contract payload (key-sorted, JSON-canonicalized). */
|
|
15
|
-
readonly contractHash: string;
|
|
16
|
-
}
|
|
17
|
-
export type WriteContractInput = Omit<SliceContract, 'completedAt' | 'contractHash'> & {
|
|
18
|
-
readonly completedAt?: string;
|
|
19
|
-
};
|
|
20
|
-
/** Thrown when contract IO fails. */
|
|
21
|
-
export declare class ContractStoreError extends Error {
|
|
22
|
-
readonly code: "CONTRACT_STORE_ERROR";
|
|
23
|
-
constructor(message: string);
|
|
24
|
-
}
|
|
25
|
-
/** Slice 2026-06-23-audit-4th #A3: default TTL for slice contracts. */
|
|
26
|
-
export declare const CONTRACT_TTL_DAYS = 30;
|
|
27
|
-
/**
|
|
28
|
-
* Slice 2026-06-23-audit-4th #A3: is this contract an orphan
|
|
29
|
-
* (older than CONTRACT_TTL_DAYS or already GC'd)? Mirrors
|
|
30
|
-
* `isOrphanChannel` and `isOrphanDispatchRecord` so a future
|
|
31
|
-
* `peaks sub-agent cleanup` umbrella can run all three sweeps
|
|
32
|
-
* (shared channel + dispatch record + contract) in one pass.
|
|
33
|
-
*/
|
|
34
|
-
export declare function isOrphanContract(opts: {
|
|
35
|
-
projectRoot: string;
|
|
36
|
-
sessionId: string;
|
|
37
|
-
sliceId: string;
|
|
38
|
-
now?: Date;
|
|
39
|
-
}): boolean;
|
|
40
|
-
/** Resolve the contracts directory for a session. */
|
|
41
|
-
export declare function contractsDir(projectRoot: string, sessionId: string): string;
|
|
42
|
-
/** Resolve a single contract file path. */
|
|
43
|
-
export declare function contractPath(projectRoot: string, sessionId: string, sliceId: string): string;
|
|
44
|
-
/** Hash a contract payload. */
|
|
45
|
-
export declare function hashContract(c: WriteContractInput | SliceContract): string;
|
|
46
|
-
/**
|
|
47
|
-
* Persist a slice's public contract. Returns the absolute path on disk.
|
|
48
|
-
* Idempotent: re-writing the same contract overwrites in place.
|
|
49
|
-
*/
|
|
50
|
-
export declare function writeContract(projectRoot: string, sessionId: string, input: WriteContractInput): {
|
|
51
|
-
path: string;
|
|
52
|
-
contract: SliceContract;
|
|
53
|
-
};
|
|
54
|
-
/** Read a contract from disk. Returns null if missing. */
|
|
55
|
-
export declare function readContract(projectRoot: string, sessionId: string, sliceId: string): SliceContract | null;
|
|
56
|
-
/** List all contracts for a session. */
|
|
57
|
-
export declare function listContracts(projectRoot: string, sessionId: string): readonly SliceContract[];
|
|
58
|
-
/**
|
|
59
|
-
* Format a prompt-injection block from a set of contracts. The block is a
|
|
60
|
-
* stable, human-readable summary suitable for splicing into a downstream
|
|
61
|
-
* slice's dispatch prompt.
|
|
62
|
-
*/
|
|
63
|
-
export declare function formatContractInjection(contracts: readonly SliceContract[]): string;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Contract broadcast store — 2.7.0 slice-dag-dispatcher MVP (slice 1.2.a).
|
|
3
|
-
*
|
|
4
|
-
* When slice A finishes, A's public contract (exports / types / signatures)
|
|
5
|
-
* is written to `.peaks/_runtime/<sessionId>/dispatch/contracts/<slice-id>.json`.
|
|
6
|
-
* Downstream slices (B, C, D) have their dispatch prompt auto-injected with
|
|
7
|
-
* the contract content for any ancestor slice already in `completed`.
|
|
8
|
-
*
|
|
9
|
-
* Why this exists:
|
|
10
|
-
* Reading the source code of A from B's prompt inflates the prompt by
|
|
11
|
-
* kilobytes. Contracts are a stable summary: just the public surface.
|
|
12
|
-
*
|
|
13
|
-
* Path layout (cross-platform safe):
|
|
14
|
-
* `<projectRoot>/.peaks/_runtime/<sessionId>/dispatch/contracts/<slice-id>.json`
|
|
15
|
-
*
|
|
16
|
-
* All paths are constructed with `path.join` (homedir + join style via
|
|
17
|
-
* Node `path.join`) to keep Windows / macOS / Linux interop.
|
|
18
|
-
*/
|
|
19
|
-
import { createHash } from 'node:crypto';
|
|
20
|
-
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from 'node:fs';
|
|
21
|
-
import { join } from 'node:path';
|
|
22
|
-
/** Thrown when contract IO fails. */
|
|
23
|
-
export class ContractStoreError extends Error {
|
|
24
|
-
code = 'CONTRACT_STORE_ERROR';
|
|
25
|
-
constructor(message) {
|
|
26
|
-
super(message);
|
|
27
|
-
this.name = 'ContractStoreError';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/** Slice 2026-06-23-audit-4th #A3: default TTL for slice contracts. */
|
|
31
|
-
export const CONTRACT_TTL_DAYS = 30;
|
|
32
|
-
/**
|
|
33
|
-
* Slice 2026-06-23-audit-4th #A3: is this contract an orphan
|
|
34
|
-
* (older than CONTRACT_TTL_DAYS or already GC'd)? Mirrors
|
|
35
|
-
* `isOrphanChannel` and `isOrphanDispatchRecord` so a future
|
|
36
|
-
* `peaks sub-agent cleanup` umbrella can run all three sweeps
|
|
37
|
-
* (shared channel + dispatch record + contract) in one pass.
|
|
38
|
-
*/
|
|
39
|
-
export function isOrphanContract(opts) {
|
|
40
|
-
const path = contractPath(opts.projectRoot, opts.sessionId, opts.sliceId);
|
|
41
|
-
if (!existsSync(path))
|
|
42
|
-
return true;
|
|
43
|
-
const s = statSync(path);
|
|
44
|
-
const now = opts.now ?? new Date();
|
|
45
|
-
const ageMs = now.getTime() - s.mtimeMs;
|
|
46
|
-
const ttlMs = CONTRACT_TTL_DAYS * 24 * 60 * 60 * 1000;
|
|
47
|
-
return ageMs > ttlMs;
|
|
48
|
-
}
|
|
49
|
-
/** Resolve the contracts directory for a session. */
|
|
50
|
-
export function contractsDir(projectRoot, sessionId) {
|
|
51
|
-
return join(projectRoot, '.peaks', '_runtime', sessionId, 'dispatch', 'contracts');
|
|
52
|
-
}
|
|
53
|
-
/** Resolve a single contract file path. */
|
|
54
|
-
export function contractPath(projectRoot, sessionId, sliceId) {
|
|
55
|
-
return join(contractsDir(projectRoot, sessionId), `${sliceId}.json`);
|
|
56
|
-
}
|
|
57
|
-
/** Canonicalize a contract for hashing. Keys sorted; arrays preserved. */
|
|
58
|
-
function canonicalize(c) {
|
|
59
|
-
const obj = {
|
|
60
|
-
sliceId: c.sliceId,
|
|
61
|
-
sessionId: c.sessionId,
|
|
62
|
-
exports: [...c.exports].sort(),
|
|
63
|
-
types: [...c.types].sort(),
|
|
64
|
-
publicSignatures: [...c.publicSignatures].sort()
|
|
65
|
-
};
|
|
66
|
-
if ('completedAt' in c && c.completedAt !== undefined) {
|
|
67
|
-
obj.completedAt = c.completedAt;
|
|
68
|
-
}
|
|
69
|
-
if (c.broadcastTo !== undefined) {
|
|
70
|
-
obj.broadcastTo = [...c.broadcastTo].sort();
|
|
71
|
-
}
|
|
72
|
-
return JSON.stringify(obj);
|
|
73
|
-
}
|
|
74
|
-
/** Hash a contract payload. */
|
|
75
|
-
export function hashContract(c) {
|
|
76
|
-
return createHash('sha256').update(canonicalize(c)).digest('hex');
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Persist a slice's public contract. Returns the absolute path on disk.
|
|
80
|
-
* Idempotent: re-writing the same contract overwrites in place.
|
|
81
|
-
*/
|
|
82
|
-
export function writeContract(projectRoot, sessionId, input) {
|
|
83
|
-
if (!projectRoot || !sessionId) {
|
|
84
|
-
throw new ContractStoreError('projectRoot and sessionId are required');
|
|
85
|
-
}
|
|
86
|
-
if (!input.sliceId || input.sliceId.length === 0) {
|
|
87
|
-
throw new ContractStoreError('sliceId is required');
|
|
88
|
-
}
|
|
89
|
-
if (!Array.isArray(input.exports) || !Array.isArray(input.types) || !Array.isArray(input.publicSignatures)) {
|
|
90
|
-
throw new ContractStoreError('exports, types, publicSignatures must be arrays');
|
|
91
|
-
}
|
|
92
|
-
const completedAt = input.completedAt ?? new Date().toISOString();
|
|
93
|
-
const partial = { ...input, completedAt };
|
|
94
|
-
const contractHash = hashContract(partial);
|
|
95
|
-
const contract = {
|
|
96
|
-
sliceId: input.sliceId,
|
|
97
|
-
sessionId,
|
|
98
|
-
completedAt,
|
|
99
|
-
exports: [...input.exports],
|
|
100
|
-
types: [...input.types],
|
|
101
|
-
publicSignatures: [...input.publicSignatures],
|
|
102
|
-
...(input.broadcastTo !== undefined ? { broadcastTo: [...input.broadcastTo] } : {}),
|
|
103
|
-
contractHash
|
|
104
|
-
};
|
|
105
|
-
const dir = contractsDir(projectRoot, sessionId);
|
|
106
|
-
if (!existsSync(dir)) {
|
|
107
|
-
mkdirSync(dir, { recursive: true });
|
|
108
|
-
}
|
|
109
|
-
const path = contractPath(projectRoot, sessionId, input.sliceId);
|
|
110
|
-
writeFileSync(path, JSON.stringify(contract, null, 2) + '\n', 'utf8');
|
|
111
|
-
return { path, contract };
|
|
112
|
-
}
|
|
113
|
-
/** Read a contract from disk. Returns null if missing. */
|
|
114
|
-
export function readContract(projectRoot, sessionId, sliceId) {
|
|
115
|
-
const path = contractPath(projectRoot, sessionId, sliceId);
|
|
116
|
-
if (!existsSync(path))
|
|
117
|
-
return null;
|
|
118
|
-
try {
|
|
119
|
-
const raw = readFileSync(path, 'utf8');
|
|
120
|
-
return JSON.parse(raw);
|
|
121
|
-
}
|
|
122
|
-
catch (err) {
|
|
123
|
-
throw new ContractStoreError(`failed to parse contract at ${path}: ${err.message}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/** List all contracts for a session. */
|
|
127
|
-
export function listContracts(projectRoot, sessionId) {
|
|
128
|
-
const dir = contractsDir(projectRoot, sessionId);
|
|
129
|
-
if (!existsSync(dir))
|
|
130
|
-
return [];
|
|
131
|
-
const files = readdirSync(dir).filter((f) => f.endsWith('.json'));
|
|
132
|
-
const out = [];
|
|
133
|
-
for (const f of files) {
|
|
134
|
-
const sliceId = f.replace(/\.json$/, '');
|
|
135
|
-
const c = readContract(projectRoot, sessionId, sliceId);
|
|
136
|
-
if (c !== null)
|
|
137
|
-
out.push(c);
|
|
138
|
-
}
|
|
139
|
-
// Stable order: by sliceId
|
|
140
|
-
return out.sort((a, b) => (a.sliceId < b.sliceId ? -1 : a.sliceId > b.sliceId ? 1 : 0));
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Format a prompt-injection block from a set of contracts. The block is a
|
|
144
|
-
* stable, human-readable summary suitable for splicing into a downstream
|
|
145
|
-
* slice's dispatch prompt.
|
|
146
|
-
*/
|
|
147
|
-
export function formatContractInjection(contracts) {
|
|
148
|
-
if (contracts.length === 0)
|
|
149
|
-
return '';
|
|
150
|
-
const blocks = ['## Ancestor slice contracts (do not import source — use this surface)'];
|
|
151
|
-
for (const c of contracts) {
|
|
152
|
-
blocks.push('', `### slice ${c.sliceId} (completed ${c.completedAt}, hash=${c.contractHash.slice(0, 12)})`, `- exports: ${c.exports.length === 0 ? '(none)' : c.exports.join(', ')}`, `- types: ${c.types.length === 0 ? '(none)' : c.types.join(', ')}`, '- publicSignatures:', ...(c.publicSignatures.length === 0
|
|
153
|
-
? [' - (none)']
|
|
154
|
-
: c.publicSignatures.map((s) => ` - \`${s}\``)));
|
|
155
|
-
}
|
|
156
|
-
return blocks.join('\n');
|
|
157
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import type { SubAgentToolCall } from './sub-agent-dispatcher.js';
|
|
2
|
-
/** G6.3 Heartbeat entry — single update written by a running sub-agent. */
|
|
3
|
-
export interface Heartbeat {
|
|
4
|
-
readonly at: string;
|
|
5
|
-
readonly status: HeartbeatStatus;
|
|
6
|
-
readonly progress: number;
|
|
7
|
-
readonly note: string | null;
|
|
8
|
-
}
|
|
9
|
-
export type HeartbeatStatus = 'queued' | 'running' | 'finalizing' | 'done' | 'failed' | 'stale';
|
|
10
|
-
export type DispatchRecordStatus = 'queued' | 'running' | 'finalizing' | 'done' | 'failed' | 'cancelled' | 'no-execution' | 'stale';
|
|
11
|
-
export type DispatchOutcome = 'success' | 'failed' | 'timeout' | 'cancelled' | 'no-execution';
|
|
12
|
-
/** G2+G5+G6 dispatch record schema (AC-26 + AC-34). */
|
|
13
|
-
export interface DispatchRecord {
|
|
14
|
-
readonly version: 2;
|
|
15
|
-
readonly createdAt: string;
|
|
16
|
-
readonly completedAt: string | null;
|
|
17
|
-
readonly outcome: DispatchOutcome;
|
|
18
|
-
readonly artifactPaths: readonly string[];
|
|
19
|
-
readonly disposed: boolean;
|
|
20
|
-
readonly disposedAt: string | null;
|
|
21
|
-
readonly role: string;
|
|
22
|
-
readonly requestId: string;
|
|
23
|
-
readonly sessionId: string;
|
|
24
|
-
readonly prompt: string;
|
|
25
|
-
readonly toolCall: SubAgentToolCall;
|
|
26
|
-
/** G5 batch id (AC-27) — uuid-like opaque token grouping one batch. */
|
|
27
|
-
readonly batchId: string;
|
|
28
|
-
/** G6 fields (AC-34) — backward compat: defaults on read. */
|
|
29
|
-
readonly heartbeats: readonly Heartbeat[];
|
|
30
|
-
readonly lastBeatAt: string | null;
|
|
31
|
-
readonly status: DispatchRecordStatus;
|
|
32
|
-
}
|
|
33
|
-
/** Input for the initial write. */
|
|
34
|
-
export type WriteInitialDispatchInput = {
|
|
35
|
-
projectRoot: string;
|
|
36
|
-
sessionId: string;
|
|
37
|
-
requestId: string;
|
|
38
|
-
role: string;
|
|
39
|
-
prompt: string;
|
|
40
|
-
toolCall: SubAgentToolCall;
|
|
41
|
-
batchId: string;
|
|
42
|
-
/** Override the timestamp (testing). */
|
|
43
|
-
now?: () => Date;
|
|
44
|
-
};
|
|
45
|
-
/** Heartbeat write input. */
|
|
46
|
-
export type AppendHeartbeatInput = {
|
|
47
|
-
recordPath: string;
|
|
48
|
-
status: HeartbeatStatus;
|
|
49
|
-
progress: number;
|
|
50
|
-
note?: string;
|
|
51
|
-
now?: () => Date;
|
|
52
|
-
};
|
|
53
|
-
/** Lifecycle transition input. */
|
|
54
|
-
export type LifecycleInput = {
|
|
55
|
-
recordPath: string;
|
|
56
|
-
outcome: DispatchOutcome;
|
|
57
|
-
status: DispatchRecordStatus;
|
|
58
|
-
artifactPaths?: readonly string[];
|
|
59
|
-
now?: () => Date;
|
|
60
|
-
/**
|
|
61
|
-
* Slice 2026-06-23-audit-4th #A4: trusted project root. Required
|
|
62
|
-
* so the active-dispatches index can be updated without deriving
|
|
63
|
-
* the root from the recordPath (the same anti-pattern that
|
|
64
|
-
* audit-3rd #1 fixed for heartbeat). The CLI / LLM-side runner
|
|
65
|
-
* passes this from `--project` or `process.cwd()`.
|
|
66
|
-
*/
|
|
67
|
-
projectRoot?: string;
|
|
68
|
-
};
|
|
69
|
-
/** Write a new dispatch record (G2 + G5 + G6). Returns the absolute path. */
|
|
70
|
-
export declare function writeInitialDispatchRecord(input: WriteInitialDispatchInput): {
|
|
71
|
-
path: string;
|
|
72
|
-
record: DispatchRecord;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Active-dispatches index. Per-session JSON file at
|
|
76
|
-
* `.peaks/_sub_agents/<sid>/active-dispatches.json`. Map<recordPath,
|
|
77
|
-
* ActiveDispatchEntry>. Updated on dispatch + completion.
|
|
78
|
-
*/
|
|
79
|
-
export interface ActiveDispatchEntry {
|
|
80
|
-
readonly recordPath: string;
|
|
81
|
-
readonly requestId: string;
|
|
82
|
-
readonly role: string;
|
|
83
|
-
readonly batchId: string;
|
|
84
|
-
readonly createdAt: string;
|
|
85
|
-
readonly status: 'queued' | 'running' | 'finalizing' | 'done' | 'failed' | 'cancelled' | 'stale' | 'no-execution';
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Slice 2026-06-23-audit-4th #A4: read the active-dispatches index
|
|
89
|
-
* for a session. Returns the current map<recordPath, entry>. Used
|
|
90
|
-
* by the LLM-side runner to discover in-flight records on restart.
|
|
91
|
-
* Returns an empty map when the index file is missing or corrupt
|
|
92
|
-
* (the on-disk records directory is the next fallback).
|
|
93
|
-
*/
|
|
94
|
-
export declare function readActiveDispatchIndex(projectRoot: string, sessionId: string): Record<string, ActiveDispatchEntry>;
|
|
95
|
-
/** Slice 2026-06-23-audit-4th #A3: default TTL for dispatch records. */
|
|
96
|
-
export declare const DISPATCH_RECORD_TTL_DAYS = 30;
|
|
97
|
-
/**
|
|
98
|
-
* Slice 2026-06-23-audit-4th #A3: is this dispatch record an orphan
|
|
99
|
-
* (older than DISPATCH_RECORD_TTL_DAYS or already GC'd)? Mirrors
|
|
100
|
-
* `isOrphanChannel` in shared-channel.ts so a future
|
|
101
|
-
* `peaks sub-agent cleanup` umbrella can run all three sweeps
|
|
102
|
-
* (shared channel + dispatch record + contract) in one pass.
|
|
103
|
-
*/
|
|
104
|
-
export declare function isOrphanDispatchRecord(opts: {
|
|
105
|
-
projectRoot: string;
|
|
106
|
-
sid: string;
|
|
107
|
-
rid: string;
|
|
108
|
-
recordPath: string;
|
|
109
|
-
now?: Date;
|
|
110
|
-
}): boolean;
|
|
111
|
-
/** Append a heartbeat (G6). Idempotent on (at, status) — append-only. */
|
|
112
|
-
export declare function appendHeartbeat(input: AppendHeartbeatInput): {
|
|
113
|
-
record: DispatchRecord;
|
|
114
|
-
truncated: boolean;
|
|
115
|
-
};
|
|
116
|
-
/** Apply truncation: keep most recent 100, mark truncated flag. */
|
|
117
|
-
export declare function applyTruncation(entries: readonly Heartbeat[]): {
|
|
118
|
-
heartbeats: Heartbeat[];
|
|
119
|
-
truncated: boolean;
|
|
120
|
-
};
|
|
121
|
-
/** Mark a record as completed (success / failed / cancelled / no-execution). */
|
|
122
|
-
export declare function markCompleted(input: LifecycleInput): {
|
|
123
|
-
record: DispatchRecord;
|
|
124
|
-
};
|
|
125
|
-
/** Mark a record as disposed (reducer ran). */
|
|
126
|
-
export declare function markDisposed(recordPath: string, now?: () => Date): {
|
|
127
|
-
record: DispatchRecord;
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Read a dispatch record with backward-compat defaults. Old records
|
|
131
|
-
* missing G5 / G6 fields are upgraded on read (no error, no overwrite).
|
|
132
|
-
*/
|
|
133
|
-
export declare function readRecord(recordPath: string): DispatchRecord;
|
|
134
|
-
/** Read multiple records from a list of paths. Tolerates missing files. */
|
|
135
|
-
export declare function readRecords(paths: readonly string[]): DispatchRecord[];
|
|
136
|
-
declare function isDispatchStatus(v: unknown): v is DispatchRecordStatus;
|
|
137
|
-
declare function isOutcome(v: unknown): v is DispatchOutcome;
|
|
138
|
-
export { isDispatchStatus, isOutcome };
|