@matteeh/osq 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +415 -72
- package/dist/cli/approve.d.ts +13 -3
- package/dist/cli/approve.d.ts.map +1 -1
- package/dist/cli/approve.js +59 -4
- package/dist/cli/approve.js.map +1 -1
- package/dist/cli/bin.js +0 -0
- package/dist/cli/confirm.d.ts +21 -0
- package/dist/cli/confirm.d.ts.map +1 -0
- package/dist/cli/confirm.js +28 -0
- package/dist/cli/confirm.js.map +1 -0
- package/dist/cli/doctor.d.ts +13 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +23 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/done.d.ts +12 -0
- package/dist/cli/done.d.ts.map +1 -0
- package/dist/cli/done.js +26 -0
- package/dist/cli/done.js.map +1 -0
- package/dist/cli/inbox.d.ts +22 -0
- package/dist/cli/inbox.d.ts.map +1 -0
- package/dist/cli/inbox.js +41 -0
- package/dist/cli/inbox.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +127 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +1 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +9 -3
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/lint.d.ts +26 -0
- package/dist/cli/lint.d.ts.map +1 -0
- package/dist/cli/lint.js +60 -0
- package/dist/cli/lint.js.map +1 -0
- package/dist/cli/migrate.d.ts +18 -0
- package/dist/cli/migrate.d.ts.map +1 -0
- package/dist/cli/migrate.js +42 -0
- package/dist/cli/migrate.js.map +1 -0
- package/dist/cli/new.js +1 -1
- package/dist/cli/new.js.map +1 -1
- package/dist/cli/plan-queue.d.ts +50 -0
- package/dist/cli/plan-queue.d.ts.map +1 -0
- package/dist/cli/plan-queue.js +167 -0
- package/dist/cli/plan-queue.js.map +1 -0
- package/dist/cli/plan.d.ts +35 -0
- package/dist/cli/plan.d.ts.map +1 -0
- package/dist/cli/plan.js +153 -0
- package/dist/cli/plan.js.map +1 -0
- package/dist/cli/queue.d.ts +9 -0
- package/dist/cli/queue.d.ts.map +1 -0
- package/dist/cli/queue.js +24 -0
- package/dist/cli/queue.js.map +1 -0
- package/dist/cli/reject.d.ts +8 -0
- package/dist/cli/reject.d.ts.map +1 -0
- package/dist/cli/reject.js +18 -0
- package/dist/cli/reject.js.map +1 -0
- package/dist/cli/report.d.ts +1 -1
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +141 -14
- package/dist/cli/report.js.map +1 -1
- package/dist/cli/retry.d.ts +7 -0
- package/dist/cli/retry.d.ts.map +1 -0
- package/dist/cli/retry.js +29 -0
- package/dist/cli/retry.js.map +1 -0
- package/dist/cli/serve.d.ts +30 -0
- package/dist/cli/serve.d.ts.map +1 -0
- package/dist/cli/serve.js +136 -0
- package/dist/cli/serve.js.map +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +7 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/show.d.ts +2 -1
- package/dist/cli/show.d.ts.map +1 -1
- package/dist/cli/show.js +20 -3
- package/dist/cli/show.js.map +1 -1
- package/dist/cli/status.d.ts +1 -1
- package/dist/cli/status.d.ts.map +1 -1
- package/dist/cli/status.js +2 -2
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/watch.d.ts +9 -6
- package/dist/cli/watch.d.ts.map +1 -1
- package/dist/cli/watch.js +15 -2
- package/dist/cli/watch.js.map +1 -1
- package/dist/core/foundation/config-codex.d.ts +22 -0
- package/dist/core/foundation/config-codex.d.ts.map +1 -0
- package/dist/core/foundation/config-codex.js +58 -0
- package/dist/core/foundation/config-codex.js.map +1 -0
- package/dist/core/foundation/config-doctor.d.ts +14 -0
- package/dist/core/foundation/config-doctor.d.ts.map +1 -0
- package/dist/core/foundation/config-doctor.js +29 -0
- package/dist/core/foundation/config-doctor.js.map +1 -0
- package/dist/core/foundation/config-env.d.ts +3 -0
- package/dist/core/foundation/config-env.d.ts.map +1 -0
- package/dist/core/foundation/config-env.js +22 -0
- package/dist/core/foundation/config-env.js.map +1 -0
- package/dist/core/foundation/config-gates.d.ts +22 -0
- package/dist/core/foundation/config-gates.d.ts.map +1 -0
- package/dist/core/foundation/config-gates.js +43 -0
- package/dist/core/foundation/config-gates.js.map +1 -0
- package/dist/core/foundation/config-pi.d.ts +64 -0
- package/dist/core/foundation/config-pi.d.ts.map +1 -0
- package/dist/core/foundation/config-pi.js +131 -0
- package/dist/core/foundation/config-pi.js.map +1 -0
- package/dist/core/foundation/config-planning.d.ts +24 -0
- package/dist/core/foundation/config-planning.d.ts.map +1 -0
- package/dist/core/foundation/config-planning.js +60 -0
- package/dist/core/foundation/config-planning.js.map +1 -0
- package/dist/core/foundation/config-queue.d.ts +15 -0
- package/dist/core/foundation/config-queue.d.ts.map +1 -0
- package/dist/core/foundation/config-queue.js +24 -0
- package/dist/core/foundation/config-queue.js.map +1 -0
- package/dist/core/foundation/config-serve.d.ts +20 -0
- package/dist/core/foundation/config-serve.d.ts.map +1 -0
- package/dist/core/foundation/config-serve.js +35 -0
- package/dist/core/foundation/config-serve.js.map +1 -0
- package/dist/core/{config.d.ts → foundation/config.d.ts} +34 -3
- package/dist/core/foundation/config.d.ts.map +1 -0
- package/dist/core/{config.js → foundation/config.js} +35 -18
- package/dist/core/foundation/config.js.map +1 -0
- package/dist/core/foundation/doctor-managed.d.ts +13 -0
- package/dist/core/foundation/doctor-managed.d.ts.map +1 -0
- package/dist/core/foundation/doctor-managed.js +77 -0
- package/dist/core/foundation/doctor-managed.js.map +1 -0
- package/dist/core/foundation/doctor.d.ts +19 -0
- package/dist/core/foundation/doctor.d.ts.map +1 -0
- package/dist/core/foundation/doctor.js +187 -0
- package/dist/core/foundation/doctor.js.map +1 -0
- package/dist/core/foundation/harness-catalog.d.ts +96 -0
- package/dist/core/foundation/harness-catalog.d.ts.map +1 -0
- package/dist/core/foundation/harness-catalog.js +182 -0
- package/dist/core/foundation/harness-catalog.js.map +1 -0
- package/dist/core/foundation/init-blocks.d.ts +33 -0
- package/dist/core/foundation/init-blocks.d.ts.map +1 -0
- package/dist/core/foundation/init-blocks.js +165 -0
- package/dist/core/foundation/init-blocks.js.map +1 -0
- package/dist/core/foundation/init-managed.d.ts +10 -0
- package/dist/core/foundation/init-managed.d.ts.map +1 -0
- package/dist/core/foundation/init-managed.js +115 -0
- package/dist/core/foundation/init-managed.js.map +1 -0
- package/dist/core/foundation/init.d.ts +18 -0
- package/dist/core/foundation/init.d.ts.map +1 -0
- package/dist/core/foundation/init.js +113 -0
- package/dist/core/foundation/init.js.map +1 -0
- package/dist/core/{logger.d.ts → foundation/logger.d.ts} +1 -0
- package/dist/core/foundation/logger.d.ts.map +1 -0
- package/dist/core/{logger.js → foundation/logger.js} +18 -2
- package/dist/core/foundation/logger.js.map +1 -0
- package/dist/core/{new.d.ts → foundation/new.d.ts} +3 -0
- package/dist/core/foundation/new.d.ts.map +1 -0
- package/dist/core/foundation/new.js +206 -0
- package/dist/core/foundation/new.js.map +1 -0
- package/dist/core/foundation/package-root.d.ts +9 -0
- package/dist/core/foundation/package-root.d.ts.map +1 -0
- package/dist/core/foundation/package-root.js +11 -0
- package/dist/core/foundation/package-root.js.map +1 -0
- package/dist/core/lifecycle/done.d.ts +17 -0
- package/dist/core/lifecycle/done.d.ts.map +1 -0
- package/dist/core/lifecycle/done.js +97 -0
- package/dist/core/lifecycle/done.js.map +1 -0
- package/dist/core/lifecycle/reject.d.ts +26 -0
- package/dist/core/lifecycle/reject.d.ts.map +1 -0
- package/dist/core/lifecycle/reject.js +83 -0
- package/dist/core/lifecycle/reject.js.map +1 -0
- package/dist/core/lifecycle/retry-transition.d.ts +23 -0
- package/dist/core/lifecycle/retry-transition.d.ts.map +1 -0
- package/dist/core/lifecycle/retry-transition.js +41 -0
- package/dist/core/lifecycle/retry-transition.js.map +1 -0
- package/dist/core/lifecycle/retry.d.ts +18 -0
- package/dist/core/lifecycle/retry.d.ts.map +1 -0
- package/dist/core/lifecycle/retry.js +179 -0
- package/dist/core/lifecycle/retry.js.map +1 -0
- package/dist/core/report/approval-flags.d.ts +29 -0
- package/dist/core/report/approval-flags.d.ts.map +1 -0
- package/dist/core/report/approval-flags.js +138 -0
- package/dist/core/report/approval-flags.js.map +1 -0
- package/dist/core/report/planning-economics.d.ts +39 -0
- package/dist/core/report/planning-economics.d.ts.map +1 -0
- package/dist/core/report/planning-economics.js +168 -0
- package/dist/core/report/planning-economics.js.map +1 -0
- package/dist/core/report/planning-observed.d.ts +59 -0
- package/dist/core/report/planning-observed.d.ts.map +1 -0
- package/dist/core/report/planning-observed.js +135 -0
- package/dist/core/report/planning-observed.js.map +1 -0
- package/dist/core/report/planning-records.d.ts +69 -0
- package/dist/core/report/planning-records.d.ts.map +1 -0
- package/dist/core/report/planning-records.js +149 -0
- package/dist/core/report/planning-records.js.map +1 -0
- package/dist/core/report/planning-slice-lookup.d.ts +13 -0
- package/dist/core/report/planning-slice-lookup.d.ts.map +1 -0
- package/dist/core/report/planning-slice-lookup.js +146 -0
- package/dist/core/report/planning-slice-lookup.js.map +1 -0
- package/dist/core/report/planning-slice-measures.d.ts +17 -0
- package/dist/core/report/planning-slice-measures.d.ts.map +1 -0
- package/dist/core/report/planning-slice-measures.js +85 -0
- package/dist/core/report/planning-slice-measures.js.map +1 -0
- package/dist/core/report/planning-slice-record.d.ts +4 -0
- package/dist/core/report/planning-slice-record.d.ts.map +1 -0
- package/dist/core/report/planning-slice-record.js +66 -0
- package/dist/core/report/planning-slice-record.js.map +1 -0
- package/dist/core/report/planning-slice-turns.d.ts +13 -0
- package/dist/core/report/planning-slice-turns.d.ts.map +1 -0
- package/dist/core/report/planning-slice-turns.js +41 -0
- package/dist/core/report/planning-slice-turns.js.map +1 -0
- package/dist/core/report/planning-slice.d.ts +70 -0
- package/dist/core/report/planning-slice.d.ts.map +1 -0
- package/dist/core/report/planning-slice.js +147 -0
- package/dist/core/report/planning-slice.js.map +1 -0
- package/dist/core/report/planning.d.ts +31 -0
- package/dist/core/report/planning.d.ts.map +1 -0
- package/dist/core/report/planning.js +75 -0
- package/dist/core/report/planning.js.map +1 -0
- package/dist/core/report/report-events.d.ts +52 -0
- package/dist/core/report/report-events.d.ts.map +1 -0
- package/dist/core/report/report-events.js +198 -0
- package/dist/core/report/report-events.js.map +1 -0
- package/dist/core/report/report-pre-spawn.d.ts +25 -0
- package/dist/core/report/report-pre-spawn.d.ts.map +1 -0
- package/dist/core/report/report-pre-spawn.js +40 -0
- package/dist/core/report/report-pre-spawn.js.map +1 -0
- package/dist/core/report/report-retries.d.ts +30 -0
- package/dist/core/report/report-retries.d.ts.map +1 -0
- package/dist/core/report/report-retries.js +100 -0
- package/dist/core/report/report-retries.js.map +1 -0
- package/dist/core/report/report.d.ts +276 -0
- package/dist/core/report/report.d.ts.map +1 -0
- package/dist/core/report/report.js +1421 -0
- package/dist/core/report/report.js.map +1 -0
- package/dist/core/{lock.d.ts → run/lock.d.ts} +6 -0
- package/dist/core/run/lock.d.ts.map +1 -0
- package/dist/core/{lock.js → run/lock.js} +7 -15
- package/dist/core/run/lock.js.map +1 -0
- package/dist/core/run/manifest.d.ts +39 -0
- package/dist/core/run/manifest.d.ts.map +1 -0
- package/dist/core/run/manifest.js +137 -0
- package/dist/core/run/manifest.js.map +1 -0
- package/dist/core/run/scope-hash.d.ts +71 -0
- package/dist/core/run/scope-hash.d.ts.map +1 -0
- package/dist/core/run/scope-hash.js +177 -0
- package/dist/core/run/scope-hash.js.map +1 -0
- package/dist/core/run/scope.d.ts +30 -0
- package/dist/core/run/scope.d.ts.map +1 -0
- package/dist/core/run/scope.js +193 -0
- package/dist/core/run/scope.js.map +1 -0
- package/dist/core/run/summary.d.ts +8 -0
- package/dist/core/run/summary.d.ts.map +1 -0
- package/dist/core/run/summary.js +25 -0
- package/dist/core/run/summary.js.map +1 -0
- package/dist/core/run/verification.d.ts +23 -0
- package/dist/core/run/verification.d.ts.map +1 -0
- package/dist/core/run/verification.js +78 -0
- package/dist/core/run/verification.js.map +1 -0
- package/dist/core/spec/approve.d.ts +31 -0
- package/dist/core/spec/approve.d.ts.map +1 -0
- package/dist/core/spec/approve.js +111 -0
- package/dist/core/spec/approve.js.map +1 -0
- package/dist/core/spec/delta.d.ts +77 -0
- package/dist/core/spec/delta.d.ts.map +1 -0
- package/dist/core/spec/delta.js +581 -0
- package/dist/core/spec/delta.js.map +1 -0
- package/dist/core/spec/digest-flags.d.ts +21 -0
- package/dist/core/spec/digest-flags.d.ts.map +1 -0
- package/dist/core/spec/digest-flags.js +194 -0
- package/dist/core/spec/digest-flags.js.map +1 -0
- package/dist/core/spec/digest-verify-starts.d.ts +5 -0
- package/dist/core/spec/digest-verify-starts.d.ts.map +1 -0
- package/dist/core/spec/digest-verify-starts.js +31 -0
- package/dist/core/spec/digest-verify-starts.js.map +1 -0
- package/dist/core/spec/digest.d.ts +42 -0
- package/dist/core/spec/digest.d.ts.map +1 -0
- package/dist/core/spec/digest.js +170 -0
- package/dist/core/spec/digest.js.map +1 -0
- package/dist/core/spec/hasher.d.ts +11 -0
- package/dist/core/spec/hasher.d.ts.map +1 -0
- package/dist/core/{hasher.js → spec/hasher.js} +27 -3
- package/dist/core/spec/hasher.js.map +1 -0
- package/dist/core/spec/linter.d.ts +79 -0
- package/dist/core/spec/linter.d.ts.map +1 -0
- package/dist/core/spec/linter.js +826 -0
- package/dist/core/spec/linter.js.map +1 -0
- package/dist/core/spec/migrate.d.ts +54 -0
- package/dist/core/spec/migrate.d.ts.map +1 -0
- package/dist/core/spec/migrate.js +297 -0
- package/dist/core/spec/migrate.js.map +1 -0
- package/dist/core/spec/openspec-version.d.ts +30 -0
- package/dist/core/spec/openspec-version.d.ts.map +1 -0
- package/dist/core/spec/openspec-version.js +118 -0
- package/dist/core/spec/openspec-version.js.map +1 -0
- package/dist/core/spec/parser.d.ts +82 -0
- package/dist/core/spec/parser.d.ts.map +1 -0
- package/dist/core/spec/parser.js +221 -0
- package/dist/core/spec/parser.js.map +1 -0
- package/dist/core/spec/verify-paths.d.ts +18 -0
- package/dist/core/spec/verify-paths.d.ts.map +1 -0
- package/dist/core/spec/verify-paths.js +139 -0
- package/dist/core/spec/verify-paths.js.map +1 -0
- package/dist/core/spec/verify-starts.d.ts +45 -0
- package/dist/core/spec/verify-starts.d.ts.map +1 -0
- package/dist/core/spec/verify-starts.js +61 -0
- package/dist/core/spec/verify-starts.js.map +1 -0
- package/dist/core/status/inbox-cursor.d.ts +10 -0
- package/dist/core/status/inbox-cursor.d.ts.map +1 -0
- package/dist/core/status/inbox-cursor.js +33 -0
- package/dist/core/status/inbox-cursor.js.map +1 -0
- package/dist/core/status/inbox-projection.d.ts +15 -0
- package/dist/core/status/inbox-projection.d.ts.map +1 -0
- package/dist/core/status/inbox-projection.js +20 -0
- package/dist/core/status/inbox-projection.js.map +1 -0
- package/dist/core/status/inbox-text.d.ts +4 -0
- package/dist/core/status/inbox-text.d.ts.map +1 -0
- package/dist/core/status/inbox-text.js +48 -0
- package/dist/core/status/inbox-text.js.map +1 -0
- package/dist/core/status/inbox.d.ts +53 -0
- package/dist/core/status/inbox.d.ts.map +1 -0
- package/dist/core/status/inbox.js +167 -0
- package/dist/core/status/inbox.js.map +1 -0
- package/dist/core/status/layout.d.ts +29 -0
- package/dist/core/status/layout.d.ts.map +1 -0
- package/dist/core/status/layout.js +77 -0
- package/dist/core/status/layout.js.map +1 -0
- package/dist/core/status/queue-parser.d.ts +13 -0
- package/dist/core/status/queue-parser.d.ts.map +1 -0
- package/dist/core/status/queue-parser.js +88 -0
- package/dist/core/status/queue-parser.js.map +1 -0
- package/dist/core/status/queue-planning.d.ts +62 -0
- package/dist/core/status/queue-planning.d.ts.map +1 -0
- package/dist/core/status/queue-planning.js +158 -0
- package/dist/core/status/queue-planning.js.map +1 -0
- package/dist/core/status/queue-report-detail.d.ts +50 -0
- package/dist/core/status/queue-report-detail.d.ts.map +1 -0
- package/dist/core/status/queue-report-detail.js +140 -0
- package/dist/core/status/queue-report-detail.js.map +1 -0
- package/dist/core/status/queue-report.d.ts +14 -0
- package/dist/core/status/queue-report.d.ts.map +1 -0
- package/dist/core/status/queue-report.js +41 -0
- package/dist/core/status/queue-report.js.map +1 -0
- package/dist/core/status/queue-state.d.ts +53 -0
- package/dist/core/status/queue-state.d.ts.map +1 -0
- package/dist/core/status/queue-state.js +167 -0
- package/dist/core/status/queue-state.js.map +1 -0
- package/dist/core/status/queue.d.ts +7 -0
- package/dist/core/status/queue.d.ts.map +1 -0
- package/dist/core/status/queue.js +4 -0
- package/dist/core/status/queue.js.map +1 -0
- package/dist/core/status/show.d.ts +102 -0
- package/dist/core/status/show.d.ts.map +1 -0
- package/dist/core/status/show.js +704 -0
- package/dist/core/status/show.js.map +1 -0
- package/dist/core/status/state.d.ts +56 -0
- package/dist/core/status/state.d.ts.map +1 -0
- package/dist/core/status/state.js +187 -0
- package/dist/core/status/state.js.map +1 -0
- package/dist/core/status/status.d.ts +23 -0
- package/dist/core/status/status.d.ts.map +1 -0
- package/dist/core/status/status.js +173 -0
- package/dist/core/status/status.js.map +1 -0
- package/dist/core/web/web-data-change.d.ts +10 -0
- package/dist/core/web/web-data-change.d.ts.map +1 -0
- package/dist/core/web/web-data-change.js +106 -0
- package/dist/core/web/web-data-change.js.map +1 -0
- package/dist/core/web/web-data-folders.d.ts +39 -0
- package/dist/core/web/web-data-folders.d.ts.map +1 -0
- package/dist/core/web/web-data-folders.js +125 -0
- package/dist/core/web/web-data-folders.js.map +1 -0
- package/dist/core/web/web-data-graph.d.ts +8 -0
- package/dist/core/web/web-data-graph.d.ts.map +1 -0
- package/dist/core/web/web-data-graph.js +113 -0
- package/dist/core/web/web-data-graph.js.map +1 -0
- package/dist/core/web/web-data-lifecycle.d.ts +43 -0
- package/dist/core/web/web-data-lifecycle.d.ts.map +1 -0
- package/dist/core/web/web-data-lifecycle.js +141 -0
- package/dist/core/web/web-data-lifecycle.js.map +1 -0
- package/dist/core/web/web-data-observations.d.ts +30 -0
- package/dist/core/web/web-data-observations.d.ts.map +1 -0
- package/dist/core/web/web-data-observations.js +181 -0
- package/dist/core/web/web-data-observations.js.map +1 -0
- package/dist/core/web/web-data-tokens.d.ts +29 -0
- package/dist/core/web/web-data-tokens.d.ts.map +1 -0
- package/dist/core/web/web-data-tokens.js +62 -0
- package/dist/core/web/web-data-tokens.js.map +1 -0
- package/dist/core/web/web-data-types.d.ts +156 -0
- package/dist/core/web/web-data-types.d.ts.map +1 -0
- package/dist/core/web/web-data-types.js +15 -0
- package/dist/core/web/web-data-types.js.map +1 -0
- package/dist/core/web/web-data.d.ts +10 -0
- package/dist/core/web/web-data.d.ts.map +1 -0
- package/dist/core/web/web-data.js +8 -0
- package/dist/core/web/web-data.js.map +1 -0
- package/dist/core/web/web-events.d.ts +54 -0
- package/dist/core/web/web-events.d.ts.map +1 -0
- package/dist/core/web/web-events.js +162 -0
- package/dist/core/web/web-events.js.map +1 -0
- package/dist/core/web/web-export.d.ts +18 -0
- package/dist/core/web/web-export.d.ts.map +1 -0
- package/dist/core/web/web-export.js +112 -0
- package/dist/core/web/web-export.js.map +1 -0
- package/dist/core/web/web-server.d.ts +34 -0
- package/dist/core/web/web-server.d.ts.map +1 -0
- package/dist/core/web/web-server.js +182 -0
- package/dist/core/web/web-server.js.map +1 -0
- package/dist/core/web/web-static.d.ts +20 -0
- package/dist/core/web/web-static.d.ts.map +1 -0
- package/dist/core/web/web-static.js +104 -0
- package/dist/core/web/web-static.js.map +1 -0
- package/dist/harness/{agy.d.ts → agy/agy.d.ts} +8 -6
- package/dist/harness/agy/agy.d.ts.map +1 -0
- package/dist/harness/{agy.js → agy/agy.js} +49 -34
- package/dist/harness/agy/agy.js.map +1 -0
- package/dist/harness/claude/claude-turns.d.ts +29 -0
- package/dist/harness/claude/claude-turns.d.ts.map +1 -0
- package/dist/harness/claude/claude-turns.js +162 -0
- package/dist/harness/claude/claude-turns.js.map +1 -0
- package/dist/harness/claude/claude-usage.d.ts +12 -0
- package/dist/harness/claude/claude-usage.d.ts.map +1 -0
- package/dist/harness/claude/claude-usage.js +144 -0
- package/dist/harness/claude/claude-usage.js.map +1 -0
- package/dist/harness/codex/codex-observe-usage.d.ts +6 -0
- package/dist/harness/codex/codex-observe-usage.d.ts.map +1 -0
- package/dist/harness/codex/codex-observe-usage.js +215 -0
- package/dist/harness/codex/codex-observe-usage.js.map +1 -0
- package/dist/harness/codex/codex-prompt.d.ts +17 -0
- package/dist/harness/codex/codex-prompt.d.ts.map +1 -0
- package/dist/harness/codex/codex-prompt.js +43 -0
- package/dist/harness/codex/codex-prompt.js.map +1 -0
- package/dist/harness/codex/codex-stream.d.ts +23 -0
- package/dist/harness/codex/codex-stream.d.ts.map +1 -0
- package/dist/harness/codex/codex-stream.js +182 -0
- package/dist/harness/codex/codex-stream.js.map +1 -0
- package/dist/harness/codex/codex-usage.d.ts +26 -0
- package/dist/harness/codex/codex-usage.d.ts.map +1 -0
- package/dist/harness/codex/codex-usage.js +122 -0
- package/dist/harness/codex/codex-usage.js.map +1 -0
- package/dist/harness/codex/codex.d.ts +16 -0
- package/dist/harness/codex/codex.d.ts.map +1 -0
- package/dist/harness/codex/codex.js +92 -0
- package/dist/harness/codex/codex.js.map +1 -0
- package/dist/harness/index.d.ts +11 -2
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +24 -9
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/mock.d.ts +5 -2
- package/dist/harness/mock.d.ts.map +1 -1
- package/dist/harness/mock.js +10 -11
- package/dist/harness/mock.js.map +1 -1
- package/dist/harness/opencode/opencode-observe-usage.d.ts +4 -0
- package/dist/harness/opencode/opencode-observe-usage.d.ts.map +1 -0
- package/dist/harness/opencode/opencode-observe-usage.js +100 -0
- package/dist/harness/opencode/opencode-observe-usage.js.map +1 -0
- package/dist/harness/opencode/opencode-usage.d.ts +24 -0
- package/dist/harness/opencode/opencode-usage.d.ts.map +1 -0
- package/dist/harness/opencode/opencode-usage.js +181 -0
- package/dist/harness/opencode/opencode-usage.js.map +1 -0
- package/dist/harness/{opencode.d.ts → opencode/opencode.d.ts} +10 -7
- package/dist/harness/opencode/opencode.d.ts.map +1 -0
- package/dist/harness/{opencode.js → opencode/opencode.js} +159 -70
- package/dist/harness/opencode/opencode.js.map +1 -0
- package/dist/harness/pi/pi-args.d.ts +9 -0
- package/dist/harness/pi/pi-args.d.ts.map +1 -0
- package/dist/harness/pi/pi-args.js +33 -0
- package/dist/harness/pi/pi-args.js.map +1 -0
- package/dist/harness/pi/pi-stream.d.ts +27 -0
- package/dist/harness/pi/pi-stream.d.ts.map +1 -0
- package/dist/harness/pi/pi-stream.js +176 -0
- package/dist/harness/pi/pi-stream.js.map +1 -0
- package/dist/harness/pi/pi-tools.d.ts +5 -0
- package/dist/harness/pi/pi-tools.d.ts.map +1 -0
- package/dist/harness/pi/pi-tools.js +31 -0
- package/dist/harness/pi/pi-tools.js.map +1 -0
- package/dist/harness/pi/pi.d.ts +11 -0
- package/dist/harness/pi/pi.d.ts.map +1 -0
- package/dist/harness/pi/pi.js +109 -0
- package/dist/harness/pi/pi.js.map +1 -0
- package/dist/harness/prompt.d.ts +11 -0
- package/dist/harness/prompt.d.ts.map +1 -0
- package/dist/harness/prompt.js +105 -0
- package/dist/harness/prompt.js.map +1 -0
- package/dist/harness/types.d.ts +287 -8
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/harness/types.js +125 -0
- package/dist/harness/types.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/watcher/archive-verify.d.ts +9 -0
- package/dist/watcher/archive-verify.d.ts.map +1 -0
- package/dist/watcher/archive-verify.js +80 -0
- package/dist/watcher/archive-verify.js.map +1 -0
- package/dist/watcher/archiver.d.ts +14 -2
- package/dist/watcher/archiver.d.ts.map +1 -1
- package/dist/watcher/archiver.js +112 -33
- package/dist/watcher/archiver.js.map +1 -1
- package/dist/watcher/attempt.d.ts +19 -0
- package/dist/watcher/attempt.d.ts.map +1 -0
- package/dist/watcher/attempt.js +94 -0
- package/dist/watcher/attempt.js.map +1 -0
- package/dist/watcher/auto-retry.d.ts +11 -0
- package/dist/watcher/auto-retry.d.ts.map +1 -0
- package/dist/watcher/auto-retry.js +180 -0
- package/dist/watcher/auto-retry.js.map +1 -0
- package/dist/watcher/build.d.ts +24 -0
- package/dist/watcher/build.d.ts.map +1 -0
- package/dist/watcher/build.js +169 -0
- package/dist/watcher/build.js.map +1 -0
- package/dist/watcher/change-verify.d.ts +25 -0
- package/dist/watcher/change-verify.d.ts.map +1 -0
- package/dist/watcher/change-verify.js +57 -0
- package/dist/watcher/change-verify.js.map +1 -0
- package/dist/watcher/dev.d.ts +51 -0
- package/dist/watcher/dev.d.ts.map +1 -0
- package/dist/watcher/dev.js +124 -0
- package/dist/watcher/dev.js.map +1 -0
- package/dist/watcher/failure-reason.d.ts +7 -0
- package/dist/watcher/failure-reason.d.ts.map +1 -0
- package/dist/watcher/failure-reason.js +2 -0
- package/dist/watcher/failure-reason.js.map +1 -0
- package/dist/watcher/fingerprint.d.ts +19 -0
- package/dist/watcher/fingerprint.d.ts.map +1 -0
- package/dist/watcher/fingerprint.js +53 -0
- package/dist/watcher/fingerprint.js.map +1 -0
- package/dist/watcher/heartbeat.d.ts +33 -0
- package/dist/watcher/heartbeat.d.ts.map +1 -0
- package/dist/watcher/heartbeat.js +135 -0
- package/dist/watcher/heartbeat.js.map +1 -0
- package/dist/watcher/lock.d.ts +10 -0
- package/dist/watcher/lock.d.ts.map +1 -0
- package/dist/watcher/lock.js +14 -0
- package/dist/watcher/lock.js.map +1 -0
- package/dist/watcher/loop.d.ts +26 -6
- package/dist/watcher/loop.d.ts.map +1 -1
- package/dist/watcher/loop.js +154 -37
- package/dist/watcher/loop.js.map +1 -1
- package/dist/watcher/measures.d.ts +46 -0
- package/dist/watcher/measures.d.ts.map +1 -0
- package/dist/watcher/measures.js +203 -0
- package/dist/watcher/measures.js.map +1 -0
- package/dist/watcher/outcome.d.ts +32 -0
- package/dist/watcher/outcome.d.ts.map +1 -0
- package/dist/watcher/outcome.js +127 -0
- package/dist/watcher/outcome.js.map +1 -0
- package/dist/watcher/regression.d.ts +43 -0
- package/dist/watcher/regression.d.ts.map +1 -0
- package/dist/watcher/regression.js +175 -0
- package/dist/watcher/regression.js.map +1 -0
- package/dist/watcher/runner.d.ts +6 -68
- package/dist/watcher/runner.d.ts.map +1 -1
- package/dist/watcher/runner.js +74 -523
- package/dist/watcher/runner.js.map +1 -1
- package/dist/watcher/spawn.d.ts +48 -0
- package/dist/watcher/spawn.d.ts.map +1 -0
- package/dist/watcher/spawn.js +130 -0
- package/dist/watcher/spawn.js.map +1 -0
- package/dist/watcher/task-verify.d.ts +59 -0
- package/dist/watcher/task-verify.d.ts.map +1 -0
- package/dist/watcher/task-verify.js +108 -0
- package/dist/watcher/task-verify.js.map +1 -0
- package/dist/watcher/verify.d.ts +44 -0
- package/dist/watcher/verify.d.ts.map +1 -0
- package/dist/watcher/verify.js +156 -0
- package/dist/watcher/verify.js.map +1 -0
- package/package.json +21 -9
- package/templates/PLANNER.md +77 -0
- package/templates/openspec/config.yaml +24 -0
- package/templates/openspec/schemas/osq/README.md +30 -0
- package/templates/openspec/schemas/osq/schema.yaml +133 -0
- package/templates/openspec/schemas/osq/templates/proposal.md +66 -0
- package/templates/openspec/schemas/osq/templates/spec.md +13 -0
- package/templates/openspec/schemas/osq/templates/tasks.md +11 -0
- package/templates/proposal.md +66 -0
- package/templates/tasks.md +5 -0
- package/ui/dist/assets/index-CZYeQ8la.js +9 -0
- package/ui/dist/assets/index-D6zVSjO7.css +1 -0
- package/ui/dist/index.html +14 -0
- package/dist/core/approve.d.ts +0 -11
- package/dist/core/approve.d.ts.map +0 -1
- package/dist/core/approve.js +0 -52
- package/dist/core/approve.js.map +0 -1
- package/dist/core/config.d.ts.map +0 -1
- package/dist/core/config.js.map +0 -1
- package/dist/core/hasher.d.ts +0 -4
- package/dist/core/hasher.d.ts.map +0 -1
- package/dist/core/hasher.js.map +0 -1
- package/dist/core/init.d.ts +0 -12
- package/dist/core/init.d.ts.map +0 -1
- package/dist/core/init.js +0 -151
- package/dist/core/init.js.map +0 -1
- package/dist/core/linter.d.ts +0 -8
- package/dist/core/linter.d.ts.map +0 -1
- package/dist/core/linter.js +0 -100
- package/dist/core/linter.js.map +0 -1
- package/dist/core/lock.d.ts.map +0 -1
- package/dist/core/lock.js.map +0 -1
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/logger.js.map +0 -1
- package/dist/core/new.d.ts.map +0 -1
- package/dist/core/new.js +0 -79
- package/dist/core/new.js.map +0 -1
- package/dist/core/parser.d.ts +0 -32
- package/dist/core/parser.d.ts.map +0 -1
- package/dist/core/parser.js +0 -87
- package/dist/core/parser.js.map +0 -1
- package/dist/core/report.d.ts +0 -54
- package/dist/core/report.d.ts.map +0 -1
- package/dist/core/report.js +0 -475
- package/dist/core/report.js.map +0 -1
- package/dist/core/show.d.ts +0 -50
- package/dist/core/show.d.ts.map +0 -1
- package/dist/core/show.js +0 -374
- package/dist/core/show.js.map +0 -1
- package/dist/core/state.d.ts +0 -25
- package/dist/core/state.d.ts.map +0 -1
- package/dist/core/state.js +0 -180
- package/dist/core/state.js.map +0 -1
- package/dist/core/status.d.ts +0 -10
- package/dist/core/status.d.ts.map +0 -1
- package/dist/core/status.js +0 -106
- package/dist/core/status.js.map +0 -1
- package/dist/harness/agy.d.ts.map +0 -1
- package/dist/harness/agy.js.map +0 -1
- package/dist/harness/opencode.d.ts.map +0 -1
- package/dist/harness/opencode.js.map +0 -1
package/dist/harness/types.js
CHANGED
|
@@ -1,5 +1,130 @@
|
|
|
1
|
+
import fsSync from 'node:fs';
|
|
1
2
|
import fs from 'node:fs/promises';
|
|
2
3
|
import path from 'node:path';
|
|
4
|
+
/** Explicit all-null value for harnesses without a confirmed usage artifact. */
|
|
5
|
+
export const NULL_INTERACTIVE_USAGE = Object.freeze({
|
|
6
|
+
inputTokens: null,
|
|
7
|
+
outputTokens: null,
|
|
8
|
+
cachedTokens: null,
|
|
9
|
+
reasoningTokens: null,
|
|
10
|
+
cost: null,
|
|
11
|
+
});
|
|
12
|
+
const REQUIREMENT_HEADER_REGEX = /^###\s+Requirement:\s*(.+?)\s*$/gm;
|
|
13
|
+
const SCENARIO_HEADER_REGEX = /^####\s+/m;
|
|
14
|
+
/**
|
|
15
|
+
* Parses `### Requirement: <title>` blocks from a capability specification.
|
|
16
|
+
* The statement is the requirement prose up to the first scenario subheading,
|
|
17
|
+
* with HTML comments stripped and whitespace collapsed.
|
|
18
|
+
*/
|
|
19
|
+
function parseRequirementRules(content) {
|
|
20
|
+
const requirements = [];
|
|
21
|
+
for (const match of content.matchAll(REQUIREMENT_HEADER_REGEX)) {
|
|
22
|
+
const start = (match.index ?? 0) + match[0].length;
|
|
23
|
+
const rest = content.slice(start);
|
|
24
|
+
const boundary = rest.search(/\n(?:##(?!#)\s|###\s)/);
|
|
25
|
+
const block = boundary === -1 ? rest : rest.slice(0, boundary);
|
|
26
|
+
const scenarioIndex = block.search(SCENARIO_HEADER_REGEX);
|
|
27
|
+
const prose = scenarioIndex === -1 ? block : block.slice(0, scenarioIndex);
|
|
28
|
+
const statement = prose
|
|
29
|
+
.replace(/<!--[\s\S]*?-->/g, '')
|
|
30
|
+
.replace(/\s+/g, ' ')
|
|
31
|
+
.trim();
|
|
32
|
+
requirements.push({ title: match[1].trim(), statement });
|
|
33
|
+
}
|
|
34
|
+
return requirements;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Extracts capability-specific rules from the delta specs a change writes under
|
|
38
|
+
* `specs/<capability>/spec.md`. Each rule is rendered as
|
|
39
|
+
* `<capability>: <requirement title> — <requirement statement>`. Capabilities
|
|
40
|
+
* are visited in sorted order and requirements keep document order, so the
|
|
41
|
+
* resulting prompt is deterministic. Returns an empty array when the change
|
|
42
|
+
* folder has no delta specs.
|
|
43
|
+
*/
|
|
44
|
+
export function extractCapabilityRules(specFolderPath) {
|
|
45
|
+
const specsDir = path.join(specFolderPath, 'specs');
|
|
46
|
+
let entries;
|
|
47
|
+
try {
|
|
48
|
+
entries = fsSync.readdirSync(specsDir, { withFileTypes: true });
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return [];
|
|
52
|
+
}
|
|
53
|
+
const rules = [];
|
|
54
|
+
const ordered = [...entries].sort((a, b) => a.name.localeCompare(b.name));
|
|
55
|
+
for (const entry of ordered) {
|
|
56
|
+
if (!entry.isDirectory()) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
let content;
|
|
60
|
+
try {
|
|
61
|
+
content = fsSync.readFileSync(path.join(specsDir, entry.name, 'spec.md'), 'utf8');
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
for (const requirement of parseRequirementRules(content)) {
|
|
67
|
+
const detail = requirement.statement
|
|
68
|
+
? `${requirement.title} — ${requirement.statement}`
|
|
69
|
+
: requirement.title;
|
|
70
|
+
rules.push(`${entry.name}: ${detail}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return rules;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolves the capability rules for a task. An explicit `capabilityRules`
|
|
77
|
+
* option always wins, including an explicit empty array; when the option is
|
|
78
|
+
* absent the change folder's delta specs are parsed.
|
|
79
|
+
*/
|
|
80
|
+
export function resolveCapabilityRules(options) {
|
|
81
|
+
return options.capabilityRules ?? extractCapabilityRules(options.specFolderPath);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Shared `Rules:` sub-section listing capability-specific requirements. Returns
|
|
85
|
+
* no lines when there are no rules so a prompt never carries an empty header.
|
|
86
|
+
*/
|
|
87
|
+
export function capabilityRuleLines(rules) {
|
|
88
|
+
if (rules.length === 0) {
|
|
89
|
+
return [];
|
|
90
|
+
}
|
|
91
|
+
return ['', 'Capability Rules:', ...rules.map((rule) => `- ${rule}`)];
|
|
92
|
+
}
|
|
93
|
+
/** Bounded failed-output length kept identical across every textual harness prompt. */
|
|
94
|
+
const PRIOR_CONTEXT_OUTPUT_MAX_LENGTH = 2000;
|
|
95
|
+
function boundedPriorOutput(output) {
|
|
96
|
+
return output.length <= PRIOR_CONTEXT_OUTPUT_MAX_LENGTH
|
|
97
|
+
? output
|
|
98
|
+
: `${output.slice(0, PRIOR_CONTEXT_OUTPUT_MAX_LENGTH)}…`;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Shared prior-context block for every textual executor prompt. It is rendered
|
|
102
|
+
* when a retry or requeued recertification supplied an attempt, failure reason,
|
|
103
|
+
* or failed output, or when a prior result file still exists, so a fresh process
|
|
104
|
+
* reconstructs why it is running again.
|
|
105
|
+
*/
|
|
106
|
+
export function priorContextLines(context) {
|
|
107
|
+
const attempt = context.attempt ?? 1;
|
|
108
|
+
const output = typeof context.output === 'string' ? context.output : '';
|
|
109
|
+
const hasOutput = output.trim().length > 0;
|
|
110
|
+
if (attempt <= 1 && !context.reason && !context.resultPath && !hasOutput) {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
const lines = ['', 'Prior Context:', `- Prior Attempt: ${attempt}`];
|
|
114
|
+
if (context.reason) {
|
|
115
|
+
lines.push(`- Prior Failure: ${context.reason}`);
|
|
116
|
+
}
|
|
117
|
+
if (hasOutput) {
|
|
118
|
+
lines.push('- Prior Failure Output:');
|
|
119
|
+
for (const line of boundedPriorOutput(output).split('\n')) {
|
|
120
|
+
lines.push(` ${line}`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (context.resultPath) {
|
|
124
|
+
lines.push(`- Prior Result: ${context.resultPath}`);
|
|
125
|
+
}
|
|
126
|
+
return lines;
|
|
127
|
+
}
|
|
3
128
|
export async function appendHarnessEvent(specFolderPath, taskNumber, event) {
|
|
4
129
|
const eventsDir = path.join(specFolderPath, '.run', 'events');
|
|
5
130
|
await fs.mkdir(eventsDir, { recursive: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/harness/types.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAkU7B,gFAAgF;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAqB,MAAM,CAAC,MAAM,CAAC;IACpE,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,IAAI;IAClB,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;AAsBH,MAAM,wBAAwB,GAAG,mCAAmC,CAAC;AACrE,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAO1C;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,OAAe;IAC5C,MAAM,YAAY,GAAwB,EAAE,CAAC;IAE7C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,CAAC;QAC/D,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QACnD,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,C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B,CACtC,cAAsB,EACtB,UAAkB,EAClB,KAAmB;IAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/C,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,UAAU,QAAQ,CAAC,CAAC;IAClE,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;IAC1C,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
export { DEFAULT_CONFIG, defineConfig, loadConfig } from './core/config.js';
|
|
2
|
-
export
|
|
1
|
+
export { DEFAULT_CONFIG, defineConfig, loadConfig } from './core/foundation/config.js';
|
|
2
|
+
export { DEFAULT_PLANNING_CONFIG, validatePlanningConfig, } from './core/foundation/config-planning.js';
|
|
3
|
+
export type { PlanningConfig, PlanningPrice } from './core/foundation/config-planning.js';
|
|
4
|
+
export { DEFAULT_SERVE_CONFIG, isValidPort, validateServeConfig, } from './core/foundation/config-serve.js';
|
|
5
|
+
export type { ServeConfig } from './core/foundation/config-serve.js';
|
|
6
|
+
export type { AgyConfig, CodexConfig, LogConfig, OpencodeConfig, OsqConfig, OsqLimits, OsqPaths, OsqTimeouts, OsqUserConfig, PiConfig, QueueConfig, } from './core/foundation/config.js';
|
|
7
|
+
export { resolveCodexBinary, resolveCodexEffort, resolveCodexModel, resolveHarnessEffort, resolveHarnessModel, validatePlannerConfig, } from './core/foundation/config-codex.js';
|
|
8
|
+
export { PI_TESTED_RANGE, validatePiConfig } from './core/foundation/config-pi.js';
|
|
9
|
+
export type { HarnessDiagnoseContext, HarnessDiagnosis, } from './core/foundation/config-pi.js';
|
|
10
|
+
export { resolvePiBinary, resolvePiEffort } from './core/foundation/config-pi.js';
|
|
11
|
+
export { resolvePiModel } from './core/foundation/harness-catalog.js';
|
|
12
|
+
export { HARNESS_CATALOG, HARNESS_NAMES, availableHarnessNames, findHarness, lookupHarness, normalizeHarnessName, resolveExecutorIdentity, resolveHarnessExecutable, resolvePlannerSelection, } from './core/foundation/harness-catalog.js';
|
|
13
|
+
export type { ExecutorIdentity, HarnessCatalogEntry, HarnessName, PlannerCapability, PlannerSelection, } from './core/foundation/harness-catalog.js';
|
|
3
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACrE,YAAY,EACV,SAAS,EACT,WAAW,EACX,SAAS,EACT,cAAc,EACd,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,aAAa,EACb,QAAQ,EACR,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACnF,YAAY,EACV,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sCAAsC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export { DEFAULT_CONFIG, defineConfig, loadConfig } from './core/config.js';
|
|
1
|
+
export { DEFAULT_CONFIG, defineConfig, loadConfig } from './core/foundation/config.js';
|
|
2
|
+
export { DEFAULT_PLANNING_CONFIG, validatePlanningConfig, } from './core/foundation/config-planning.js';
|
|
3
|
+
export { DEFAULT_SERVE_CONFIG, isValidPort, validateServeConfig, } from './core/foundation/config-serve.js';
|
|
4
|
+
export { resolveCodexBinary, resolveCodexEffort, resolveCodexModel, resolveHarnessEffort, resolveHarnessModel, validatePlannerConfig, } from './core/foundation/config-codex.js';
|
|
5
|
+
export { PI_TESTED_RANGE, validatePiConfig } from './core/foundation/config-pi.js';
|
|
6
|
+
export { resolvePiBinary, resolvePiEffort } from './core/foundation/config-pi.js';
|
|
7
|
+
export { resolvePiModel } from './core/foundation/harness-catalog.js';
|
|
8
|
+
export { HARNESS_CATALOG, HARNESS_NAMES, availableHarnessNames, findHarness, lookupHarness, normalizeHarnessName, resolveExecutorIdentity, resolveHarnessExecutable, resolvePlannerSelection, } from './core/foundation/harness-catalog.js';
|
|
2
9
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACvF,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAe3C,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAKnF,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OsqConfig } from '../core/foundation/config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Re-run one archive-time command through the shared gate. A command naming a
|
|
4
|
+
* missing path is recorded as a regression with reason `verify_path_missing`
|
|
5
|
+
* without running; otherwise a failing or timed-out command records the
|
|
6
|
+
* established `verify_red` regression.
|
|
7
|
+
*/
|
|
8
|
+
export declare function verifyArchiveStep(projectRoot: string, specFolderPath: string, runDir: string, config: OsqConfig, target: string, command: string): Promise<boolean>;
|
|
9
|
+
//# sourceMappingURL=archive-verify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-verify.d.ts","sourceRoot":"","sources":["../../src/watcher/archive-verify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AA+B9D;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,CAyDlB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { missingNamedPaths } from '../core/spec/verify-paths.js';
|
|
4
|
+
import { recordRegressedEvent, writeRegressedMarker } from './outcome.js';
|
|
5
|
+
import { runVerificationGate } from './verify.js';
|
|
6
|
+
/** Human label for the change-level target versus a numbered task. */
|
|
7
|
+
function archiveTargetLabel(target) {
|
|
8
|
+
return target === 'change' ? 'change-level' : `task ${target}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Regressed marker for a verify whose command names a path the final tree does
|
|
12
|
+
* not contain: the reason and quoted command in frontmatter, then one line per
|
|
13
|
+
* missing path.
|
|
14
|
+
*/
|
|
15
|
+
function formatArchiveMissingPathMarker(target, command, missingPaths) {
|
|
16
|
+
return [
|
|
17
|
+
'---',
|
|
18
|
+
'reason: verify_path_missing',
|
|
19
|
+
`command: ${JSON.stringify(command)}`,
|
|
20
|
+
'---',
|
|
21
|
+
`Archive-time ${archiveTargetLabel(target)} verification not run; verify names paths that do not exist:`,
|
|
22
|
+
...missingPaths.map((missing) => `- ${missing}`),
|
|
23
|
+
'',
|
|
24
|
+
].join('\n');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Re-run one archive-time command through the shared gate. A command naming a
|
|
28
|
+
* missing path is recorded as a regression with reason `verify_path_missing`
|
|
29
|
+
* without running; otherwise a failing or timed-out command records the
|
|
30
|
+
* established `verify_red` regression.
|
|
31
|
+
*/
|
|
32
|
+
export async function verifyArchiveStep(projectRoot, specFolderPath, runDir, config, target, command) {
|
|
33
|
+
const missing = await missingNamedPaths(projectRoot, command);
|
|
34
|
+
if (missing.length > 0) {
|
|
35
|
+
await writeRegressedMarker(runDir, target, formatArchiveMissingPathMarker(target, command, missing));
|
|
36
|
+
await recordRegressedEvent(specFolderPath, target, {
|
|
37
|
+
command,
|
|
38
|
+
reason: 'verify_path_missing',
|
|
39
|
+
missingPaths: [...missing],
|
|
40
|
+
});
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const gate = await runVerificationGate(projectRoot, command, config.timeouts.verifyTimeoutSeconds ?? 600, { specFolderPath, taskNumber: target });
|
|
44
|
+
if (gate.passed)
|
|
45
|
+
return true;
|
|
46
|
+
// The shared gate is the sole `verify_ran` writer; recover its payload.
|
|
47
|
+
const raw = await fs
|
|
48
|
+
.readFile(path.join(specFolderPath, '.run', 'events', `${target}.jsonl`), 'utf8')
|
|
49
|
+
.catch(() => '');
|
|
50
|
+
let exitCode = 1;
|
|
51
|
+
let duration = 0;
|
|
52
|
+
let output = '';
|
|
53
|
+
for (const line of raw.split('\n')) {
|
|
54
|
+
if (!line.includes('"verify_ran"'))
|
|
55
|
+
continue;
|
|
56
|
+
const data = JSON.parse(line).data ?? {};
|
|
57
|
+
exitCode = typeof data.exitCode === 'number' ? data.exitCode : 1;
|
|
58
|
+
duration = typeof data.duration === 'number' ? data.duration : 0;
|
|
59
|
+
output = typeof data.output === 'string' ? data.output : '';
|
|
60
|
+
}
|
|
61
|
+
const content = [
|
|
62
|
+
'---',
|
|
63
|
+
'reason: verify_red',
|
|
64
|
+
`command: ${JSON.stringify(command)}`,
|
|
65
|
+
`exit_code: ${exitCode}`,
|
|
66
|
+
'---',
|
|
67
|
+
`Archive-time ${archiveTargetLabel(target)} verification failed.`,
|
|
68
|
+
output.trim() || '(no output)',
|
|
69
|
+
'',
|
|
70
|
+
].join('\n');
|
|
71
|
+
await writeRegressedMarker(runDir, target, content);
|
|
72
|
+
await recordRegressedEvent(specFolderPath, target, {
|
|
73
|
+
exitCode,
|
|
74
|
+
duration,
|
|
75
|
+
command,
|
|
76
|
+
reason: 'verify_red',
|
|
77
|
+
});
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=archive-verify.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-verify.js","sourceRoot":"","sources":["../../src/watcher/archive-verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,sEAAsE;AACtE,SAAS,kBAAkB,CAAC,MAAc;IACxC,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,MAAM,EAAE,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,SAAS,8BAA8B,CACrC,MAAc,EACd,OAAe,EACf,YAA+B;IAE/B,OAAO;QACL,KAAK;QACL,6BAA6B;QAC7B,YAAY,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;QACrC,KAAK;QACL,gBAAgB,kBAAkB,CAAC,MAAM,CAAC,8DAA8D;QACxG,GAAG,YAAY,CAAC,GAAG,CAAC,C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fig } from '../core/foundation/config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Payload of the change-level `archived` event. The event timestamp is the
|
|
4
|
+
* authoritative archive time for cycle metrics.
|
|
5
|
+
*/
|
|
6
|
+
export interface ArchivedEventData {
|
|
7
|
+
readonly archivePath: string;
|
|
8
|
+
}
|
|
9
|
+
/** Merge every delta spec into `openspec/specs/`. */
|
|
10
|
+
export declare function applyOpenSpecDeltas(projectRoot: string, specFolderPath: string, config: OsqConfig): Promise<void>;
|
|
11
|
+
/** Rewrite every unchecked `[ ]` checkbox to `[x]`. Pure; reads no `.run/` state. */
|
|
12
|
+
export declare function tickAllTaskCheckboxes(content: string): string;
|
|
13
|
+
/** Apply deltas, move the folder to the canonical archive, and tick every `tasks.md`. */
|
|
3
14
|
export declare function archiveSpecFolder(projectRoot: string, specFolderPath: string, config: OsqConfig): Promise<string>;
|
|
15
|
+
/** Re-run every task verify, then the change-level verify, before archiving. */
|
|
4
16
|
export declare function checkAndArchiveSpec(projectRoot: string, specFolderPath: string, config: OsqConfig): Promise<boolean>;
|
|
5
17
|
//# sourceMappingURL=archiver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/watcher/archiver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archiver.d.ts","sourceRoot":"","sources":["../../src/watcher/archiver.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAU9D;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B;AAOD,qDAAqD;AACrD,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,IAAI,CAAC,CA8Bf;AAED,qFAAqF;AACrF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D;AA+BD,yFAAyF;AACzF,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,MAAM,CAAC,CAsCjB;AAED,gFAAgF;AAChF,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,SAAS,GAChB,OAAO,CAAC,OAAO,CAAC,CA+ClB"}
|
package/dist/watcher/archiver.js
CHANGED
|
@@ -1,45 +1,82 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
import { listCanonicalDoneNumbers } from '../core/run/scope-hash.js';
|
|
4
|
+
import { mergeDelta, parseDelta } from '../core/spec/delta.js';
|
|
5
|
+
import { parseSpecMdFromFolder, parseTaskMd } from '../core/spec/parser.js';
|
|
6
|
+
import { getArchiveDir } from '../core/status/layout.js';
|
|
7
|
+
import { compareNumericPrefix, deriveSpecState } from '../core/status/state.js';
|
|
8
|
+
import { appendHarnessEvent } from '../harness/types.js';
|
|
9
|
+
import { verifyArchiveStep } from './archive-verify.js';
|
|
10
|
+
import { auditScopeRegressions } from './regression.js';
|
|
11
|
+
function resolveOpenSpecRoot(config) {
|
|
12
|
+
const paths = config.paths;
|
|
13
|
+
return paths.openspecRoot ?? 'openspec';
|
|
14
|
+
}
|
|
15
|
+
/** Merge every delta spec into `openspec/specs/`. */
|
|
16
|
+
export async function applyOpenSpecDeltas(projectRoot, specFolderPath, config) {
|
|
17
|
+
const deltasDir = path.join(specFolderPath, 'specs');
|
|
18
|
+
const entries = await fs.readdir(deltasDir, { withFileTypes: true }).catch(() => []);
|
|
19
|
+
const capabilities = entries
|
|
20
|
+
.filter((entry) => entry.isDirectory())
|
|
21
|
+
.map((entry) => entry.name)
|
|
22
|
+
.sort();
|
|
23
|
+
if (capabilities.length === 0) {
|
|
16
24
|
return;
|
|
17
25
|
}
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
existing = await fs.readFile(featurePath, 'utf8');
|
|
26
|
+
const specsRoot = path.join(projectRoot, resolveOpenSpecRoot(config), 'specs');
|
|
27
|
+
for (const capability of capabilities) {
|
|
28
|
+
const deltaPath = path.join(deltasDir, capability, 'spec.md');
|
|
29
|
+
const deltaContent = await fs.readFile(deltaPath, 'utf8').catch(() => null);
|
|
30
|
+
if (deltaContent === null) {
|
|
31
|
+
continue;
|
|
25
32
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
const delta = parseDelta(deltaContent);
|
|
34
|
+
const targetDir = path.join(specsRoot, capability);
|
|
35
|
+
const targetPath = path.join(targetDir, 'spec.md');
|
|
36
|
+
const baseContent = await fs.readFile(targetPath, 'utf8').catch(() => null);
|
|
37
|
+
const merged = mergeDelta(baseContent, capability, delta);
|
|
38
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
39
|
+
await fs.writeFile(targetPath, merged, 'utf8');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** Rewrite every unchecked `[ ]` checkbox to `[x]`. Pure; reads no `.run/` state. */
|
|
43
|
+
export function tickAllTaskCheckboxes(content) {
|
|
44
|
+
return content.replace(/^([ \t]*[-*][ \t]+\[)[ ](\])/gm, '$1x$2');
|
|
45
|
+
}
|
|
46
|
+
async function ensureArchivedTasksTicked(folderPath) {
|
|
47
|
+
const stack = [folderPath];
|
|
48
|
+
while (stack.length > 0) {
|
|
49
|
+
const current = stack.pop();
|
|
50
|
+
if (current === undefined) {
|
|
51
|
+
break;
|
|
34
52
|
}
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
const entries = await fs.readdir(current, { withFileTypes: true }).catch(() => []);
|
|
54
|
+
for (const entry of entries) {
|
|
55
|
+
if (entry.name === '.run' || entry.name === '.git' || entry.name === '.DS_Store') {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const fullPath = path.join(current, entry.name);
|
|
59
|
+
if (entry.isDirectory()) {
|
|
60
|
+
stack.push(fullPath);
|
|
61
|
+
}
|
|
62
|
+
else if (entry.isFile() && entry.name === 'tasks.md') {
|
|
63
|
+
const content = await fs.readFile(fullPath, 'utf8');
|
|
64
|
+
const ticked = tickAllTaskCheckboxes(content);
|
|
65
|
+
if (ticked !== content) {
|
|
66
|
+
await fs.writeFile(fullPath, ticked, 'utf8');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
37
69
|
}
|
|
38
|
-
await fs.writeFile(featurePath, updatedContent, 'utf8');
|
|
39
70
|
}
|
|
40
71
|
}
|
|
72
|
+
/** Apply deltas, move the folder to the canonical archive, and tick every `tasks.md`. */
|
|
41
73
|
export async function archiveSpecFolder(projectRoot, specFolderPath, config) {
|
|
42
|
-
|
|
74
|
+
await applyOpenSpecDeltas(projectRoot, specFolderPath, config);
|
|
75
|
+
// The planning prompt is transient local context, not authored content. Remove
|
|
76
|
+
// it once deltas are applied and only after every verification gate has
|
|
77
|
+
// already passed, idempotently, and before the archived folder is exposed.
|
|
78
|
+
await fs.rm(path.join(specFolderPath, 'plan-prompt.md'), { force: true });
|
|
79
|
+
const archiveDir = getArchiveDir(config.paths.openspecRoot, projectRoot);
|
|
43
80
|
await fs.mkdir(archiveDir, { recursive: true });
|
|
44
81
|
const folderName = path.basename(specFolderPath);
|
|
45
82
|
let targetPath = path.join(archiveDir, folderName);
|
|
@@ -52,14 +89,56 @@ export async function archiveSpecFolder(projectRoot, specFolderPath, config) {
|
|
|
52
89
|
counter++;
|
|
53
90
|
}
|
|
54
91
|
await fs.rename(specFolderPath, targetPath);
|
|
92
|
+
await ensureArchivedTasksTicked(targetPath);
|
|
93
|
+
// Only after the folder is relocated and its tasks are projected do we stamp
|
|
94
|
+
// the authoritative archive time. The event is always change-level; it never
|
|
95
|
+
// lands in a numbered task event file.
|
|
96
|
+
await appendHarnessEvent(targetPath, 'change', {
|
|
97
|
+
type: 'archived',
|
|
98
|
+
timestamp: new Date().toISOString(),
|
|
99
|
+
data: { archivePath: targetPath },
|
|
100
|
+
});
|
|
55
101
|
return targetPath;
|
|
56
102
|
}
|
|
103
|
+
/** Re-run every task verify, then the change-level verify, before archiving. */
|
|
57
104
|
export async function checkAndArchiveSpec(projectRoot, specFolderPath, config) {
|
|
58
105
|
const specState = await deriveSpecState(projectRoot, specFolderPath);
|
|
59
106
|
if (specState.status !== 'done') {
|
|
60
107
|
return false;
|
|
61
108
|
}
|
|
62
|
-
|
|
109
|
+
const runDir = path.join(specFolderPath, '.run');
|
|
110
|
+
// Archive scope recertification gate: audit every automated canonical done
|
|
111
|
+
// task in one pass before any archive-time verification runs. The shared
|
|
112
|
+
// pre-dispatch audit owns detection verification, markers, events, and
|
|
113
|
+
// attribution; any stale task halts archival and leaves the folder active.
|
|
114
|
+
const audit = await auditScopeRegressions({
|
|
115
|
+
projectRoot,
|
|
116
|
+
specFolderPath,
|
|
117
|
+
eligibleTaskNumbers: await listCanonicalDoneNumbers(runDir),
|
|
118
|
+
verifyTimeoutSeconds: config.timeouts.verifyTimeoutSeconds ?? 600,
|
|
119
|
+
});
|
|
120
|
+
if (audit.stale.length > 0) {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
const tasksDir = path.join(specFolderPath, 'tasks');
|
|
124
|
+
const taskFiles = (await fs.readdir(tasksDir).catch(() => []))
|
|
125
|
+
.filter((entry) => entry.endsWith('.md'))
|
|
126
|
+
.sort(compareNumericPrefix);
|
|
127
|
+
for (const entry of taskFiles) {
|
|
128
|
+
const target = entry.replace(/\.md$/, '');
|
|
129
|
+
const command = parseTaskMd(await fs.readFile(path.join(tasksDir, entry), 'utf8')).verify;
|
|
130
|
+
if (!command)
|
|
131
|
+
continue;
|
|
132
|
+
if (!(await verifyArchiveStep(projectRoot, specFolderPath, runDir, config, target, command))) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const specData = await parseSpecMdFromFolder(specFolderPath);
|
|
137
|
+
const changeCommand = specData?.verify ?? '';
|
|
138
|
+
if (changeCommand &&
|
|
139
|
+
!(await verifyArchiveStep(projectRoot, specFolderPath, runDir, config, 'change', changeCommand))) {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
63
142
|
await archiveSpecFolder(projectRoot, specFolderPath, config);
|
|
64
143
|
return true;
|
|
65
144
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archiver.js","sourceRoot":"","sources":["../../src/watcher/archiver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"archiver.js","sourceRoot":"","sources":["../../src/watcher/archiver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAqB,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAUxD,SAAS,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AAc,CAAC,CAAC;IAC7D,MAAM,aAAa,GAAG,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC;IAC7C,IACE,aAAa;QACb,CAAC,CAAC,MAAM,iBAAiB,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,EAChG,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,iBAAiB,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IAC7D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Curated task-started line: prefix plus the title truncated to terminal width. */
|
|
2
|
+
export declare function formatTaskStartedLine(taskNumber: string, title: string, pid: number | undefined, timeoutSeconds: number, symbols: boolean, terminalWidth?: number): string;
|
|
3
|
+
export interface RetryContext {
|
|
4
|
+
readonly attempt: number;
|
|
5
|
+
readonly reason?: string;
|
|
6
|
+
/** Failure output retained by the latest retry or requeued recertification. */
|
|
7
|
+
readonly output?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reconstruct the target-wide execution attempt, prior failure reason, and
|
|
11
|
+
* failure output from the append-only event stream. The latest `retry`
|
|
12
|
+
* transition or requeued `recertification` wins, so a watcher restart loses
|
|
13
|
+
* neither the attempt nor the failure context. A retry's output is the body of
|
|
14
|
+
* the dead marker it retained; a requeued recertification keeps its captured
|
|
15
|
+
* verification output. A passed recertification is not a transition and never
|
|
16
|
+
* advances attempts. Without either event the target starts at attempt 1.
|
|
17
|
+
*/
|
|
18
|
+
export declare function readRetryContext(specFolderPath: string, taskNumber: string): Promise<RetryContext>;
|
|
19
|
+
//# sourceMappingURL=attempt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/watcher/attempt.ts"],"names":[],"mappings":"AAgBA,oFAAoF;AACpF,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,OAAO,EAChB,aAAa,GAAE,MAA0E,GACxF,MAAM,CAIR;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAmBD;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,CA4CvB"}
|