okstra 0.174.0 → 0.176.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 +18 -9
- package/bin/okstra +8 -4
- package/dist/cli-registry.d.mts +16 -0
- package/dist/cli-registry.mjs +560 -0
- package/dist/cli-registry.mjs.map +1 -0
- package/dist/commands/execute/agent-prompt.d.mts +1 -0
- package/{src → dist}/commands/execute/agent-prompt.mjs +10 -11
- package/dist/commands/execute/agent-prompt.mjs.map +1 -0
- package/dist/commands/execute/codex-dispatch.d.mts +3 -0
- package/dist/commands/execute/codex-dispatch.mjs +6 -0
- package/dist/commands/execute/codex-dispatch.mjs.map +1 -0
- package/dist/commands/execute/codex-run.d.mts +3 -0
- package/{src → dist}/commands/execute/codex-run.mjs +30 -37
- package/dist/commands/execute/codex-run.mjs.map +1 -0
- package/dist/commands/execute/convergence.d.mts +1 -0
- package/{src → dist}/commands/execute/convergence.mjs +15 -16
- package/dist/commands/execute/convergence.mjs.map +1 -0
- package/dist/commands/execute/error-log.d.mts +1 -0
- package/{src → dist}/commands/execute/error-log.mjs +2 -3
- package/dist/commands/execute/error-log.mjs.map +1 -0
- package/dist/commands/execute/git-reconcile.d.mts +1 -0
- package/{src → dist}/commands/execute/git-reconcile.mjs +10 -11
- package/dist/commands/execute/git-reconcile.mjs.map +1 -0
- package/dist/commands/execute/handoff.d.mts +1 -0
- package/{src → dist}/commands/execute/handoff.mjs +10 -11
- package/dist/commands/execute/handoff.mjs.map +1 -0
- package/dist/commands/execute/incremental-carry.d.mts +1 -0
- package/{src → dist}/commands/execute/incremental-carry.mjs +2 -3
- package/dist/commands/execute/incremental-carry.mjs.map +1 -0
- package/dist/commands/execute/incremental-scope.d.mts +1 -0
- package/{src → dist}/commands/execute/incremental-scope.mjs +2 -3
- package/dist/commands/execute/incremental-scope.mjs.map +1 -0
- package/dist/commands/execute/integrate-stages.d.mts +1 -0
- package/{src → dist}/commands/execute/integrate-stages.mjs +10 -11
- package/dist/commands/execute/integrate-stages.mjs.map +1 -0
- package/dist/commands/execute/pane-title.d.mts +1 -0
- package/dist/commands/execute/pane-title.mjs +20 -0
- package/dist/commands/execute/pane-title.mjs.map +1 -0
- package/dist/commands/execute/plan-items.d.mts +1 -0
- package/dist/commands/execute/plan-items.mjs +9 -0
- package/dist/commands/execute/plan-items.mjs.map +1 -0
- package/dist/commands/execute/plan-validate.d.mts +1 -0
- package/dist/commands/execute/plan-validate.mjs +68 -0
- package/dist/commands/execute/plan-validate.mjs.map +1 -0
- package/dist/commands/execute/plan-verify.d.mts +1 -0
- package/{src → dist}/commands/execute/plan-verify.mjs +13 -16
- package/dist/commands/execute/plan-verify.mjs.map +1 -0
- package/dist/commands/execute/render-bundle.d.mts +3 -0
- package/{src → dist}/commands/execute/render-bundle.mjs +65 -61
- package/dist/commands/execute/render-bundle.mjs.map +1 -0
- package/dist/commands/execute/run.d.mts +24 -0
- package/dist/commands/execute/run.mjs +196 -0
- package/dist/commands/execute/run.mjs.map +1 -0
- package/dist/commands/execute/spawn-followups.d.mts +1 -0
- package/{src → dist}/commands/execute/spawn-followups.mjs +6 -7
- package/dist/commands/execute/spawn-followups.mjs.map +1 -0
- package/dist/commands/execute/team.d.mts +3 -0
- package/{src → dist}/commands/execute/team.mjs +29 -36
- package/dist/commands/execute/team.mjs.map +1 -0
- package/dist/commands/execute/token-usage.d.mts +1 -0
- package/{src → dist}/commands/execute/token-usage.mjs +2 -3
- package/dist/commands/execute/token-usage.mjs.map +1 -0
- package/dist/commands/execute/wizard.d.mts +8 -0
- package/dist/commands/execute/wizard.mjs +191 -0
- package/dist/commands/execute/wizard.mjs.map +1 -0
- package/dist/commands/execute/worker-audit-check.d.mts +1 -0
- package/{src → dist}/commands/execute/worker-audit-check.mjs +11 -12
- package/dist/commands/execute/worker-audit-check.mjs.map +1 -0
- package/dist/commands/execute/worker-dispatch.d.mts +7 -0
- package/{src → dist}/commands/execute/worker-dispatch.mjs +34 -46
- package/dist/commands/execute/worker-dispatch.mjs.map +1 -0
- package/dist/commands/execute/worker-state.d.mts +1 -0
- package/{src → dist}/commands/execute/worker-state.mjs +15 -16
- package/dist/commands/execute/worker-state.mjs.map +1 -0
- package/dist/commands/execute/worktree-lookup.d.mts +1 -0
- package/{src → dist}/commands/execute/worktree-lookup.mjs +38 -37
- package/dist/commands/execute/worktree-lookup.mjs.map +1 -0
- package/dist/commands/execute/worktree-status.d.mts +1 -0
- package/{src → dist}/commands/execute/worktree-status.mjs +52 -46
- package/dist/commands/execute/worktree-status.mjs.map +1 -0
- package/dist/commands/inspect/code-review.d.mts +1 -0
- package/{src → dist}/commands/inspect/code-review.mjs +16 -19
- package/dist/commands/inspect/code-review.mjs.map +1 -0
- package/dist/commands/inspect/container.d.mts +1 -0
- package/{src → dist}/commands/inspect/container.mjs +11 -13
- package/dist/commands/inspect/container.mjs.map +1 -0
- package/dist/commands/inspect/context-cost.d.mts +1 -0
- package/{src → dist}/commands/inspect/context-cost.mjs +11 -13
- package/dist/commands/inspect/context-cost.mjs.map +1 -0
- package/dist/commands/inspect/design-prep.d.mts +1 -0
- package/{src → dist}/commands/inspect/design-prep.mjs +10 -11
- package/dist/commands/inspect/design-prep.mjs.map +1 -0
- package/dist/commands/inspect/error-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/error-report.mjs +11 -13
- package/dist/commands/inspect/error-report.mjs.map +1 -0
- package/dist/commands/inspect/error-zip.d.mts +1 -0
- package/{src → dist}/commands/inspect/error-zip.mjs +11 -12
- package/dist/commands/inspect/error-zip.mjs.map +1 -0
- package/dist/commands/inspect/log-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/log-report.mjs +11 -13
- package/dist/commands/inspect/log-report.mjs.map +1 -0
- package/dist/commands/inspect/profile-show.d.mts +1 -0
- package/{src → dist}/commands/inspect/profile-show.mjs +10 -11
- package/dist/commands/inspect/profile-show.mjs.map +1 -0
- package/dist/commands/inspect/recap.d.mts +1 -0
- package/{src → dist}/commands/inspect/recap.mjs +11 -13
- package/dist/commands/inspect/recap.mjs.map +1 -0
- package/dist/commands/inspect/resolve-task-key.d.mts +1 -0
- package/{src → dist}/commands/inspect/resolve-task-key.mjs +11 -13
- package/dist/commands/inspect/resolve-task-key.mjs.map +1 -0
- package/dist/commands/inspect/rollup.d.mts +1 -0
- package/{src → dist}/commands/inspect/rollup.mjs +11 -13
- package/dist/commands/inspect/rollup.mjs.map +1 -0
- package/dist/commands/inspect/run-audit.d.mts +1 -0
- package/{src → dist}/commands/inspect/run-audit.mjs +11 -12
- package/dist/commands/inspect/run-audit.mjs.map +1 -0
- package/dist/commands/inspect/set-work-status.d.mts +1 -0
- package/{src → dist}/commands/inspect/set-work-status.mjs +11 -13
- package/dist/commands/inspect/set-work-status.mjs.map +1 -0
- package/dist/commands/inspect/stage-map.d.mts +1 -0
- package/dist/commands/inspect/stage-map.mjs +110 -0
- package/dist/commands/inspect/stage-map.mjs.map +1 -0
- package/dist/commands/inspect/task-list.d.mts +1 -0
- package/dist/commands/inspect/task-list.mjs +103 -0
- package/dist/commands/inspect/task-list.mjs.map +1 -0
- package/dist/commands/inspect/task-show.d.mts +1 -0
- package/dist/commands/inspect/task-show.mjs +108 -0
- package/dist/commands/inspect/task-show.mjs.map +1 -0
- package/dist/commands/inspect/time-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/time-report.mjs +11 -13
- package/dist/commands/inspect/time-report.mjs.map +1 -0
- package/dist/commands/inspect/usage-report.d.mts +1 -0
- package/{src → dist}/commands/inspect/usage-report.mjs +11 -13
- package/dist/commands/inspect/usage-report.mjs.map +1 -0
- package/dist/commands/inspect/user-response.d.mts +1 -0
- package/{src → dist}/commands/inspect/user-response.mjs +10 -11
- package/dist/commands/inspect/user-response.mjs.map +1 -0
- package/dist/commands/inspect/worker-liveness.d.mts +1 -0
- package/{src → dist}/commands/inspect/worker-liveness.mjs +11 -13
- package/dist/commands/inspect/worker-liveness.mjs.map +1 -0
- package/dist/commands/lifecycle/check-project.d.mts +21 -0
- package/dist/commands/lifecycle/check-project.mjs +175 -0
- package/dist/commands/lifecycle/check-project.mjs.map +1 -0
- package/dist/commands/lifecycle/config.d.mts +1 -0
- package/dist/commands/lifecycle/config.mjs +369 -0
- package/dist/commands/lifecycle/config.mjs.map +1 -0
- package/dist/commands/lifecycle/doctor.d.mts +10 -0
- package/dist/commands/lifecycle/doctor.mjs +317 -0
- package/dist/commands/lifecycle/doctor.mjs.map +1 -0
- package/dist/commands/lifecycle/install.d.mts +17 -0
- package/dist/commands/lifecycle/install.mjs +1077 -0
- package/dist/commands/lifecycle/install.mjs.map +1 -0
- package/dist/commands/lifecycle/migrate.d.mts +1 -0
- package/{src → dist}/commands/lifecycle/migrate.mjs +10 -11
- package/dist/commands/lifecycle/migrate.mjs.map +1 -0
- package/dist/commands/lifecycle/model.d.mts +1 -0
- package/dist/commands/lifecycle/model.mjs +22 -0
- package/dist/commands/lifecycle/model.mjs.map +1 -0
- package/dist/commands/lifecycle/paths.d.mts +1 -0
- package/dist/commands/lifecycle/paths.mjs +102 -0
- package/dist/commands/lifecycle/paths.mjs.map +1 -0
- package/dist/commands/lifecycle/preflight.d.mts +1 -0
- package/dist/commands/lifecycle/preflight.mjs +124 -0
- package/dist/commands/lifecycle/preflight.mjs.map +1 -0
- package/dist/commands/lifecycle/setup.d.mts +1 -0
- package/dist/commands/lifecycle/setup.mjs +297 -0
- package/dist/commands/lifecycle/setup.mjs.map +1 -0
- package/dist/commands/lifecycle/uninstall.d.mts +4 -0
- package/dist/commands/lifecycle/uninstall.mjs +262 -0
- package/dist/commands/lifecycle/uninstall.mjs.map +1 -0
- package/dist/commands/manager.d.mts +3 -0
- package/{src → dist}/commands/manager.mjs +25 -32
- package/dist/commands/manager.mjs.map +1 -0
- package/dist/commands/memory/memory.d.mts +1 -0
- package/dist/commands/memory/memory.mjs +569 -0
- package/dist/commands/memory/memory.mjs.map +1 -0
- package/dist/commands/pr/pr.d.mts +33 -0
- package/dist/commands/pr/pr.mjs +296 -0
- package/dist/commands/pr/pr.mjs.map +1 -0
- package/dist/commands/report/agent-activity.d.mts +1 -0
- package/{src → dist}/commands/report/agent-activity.mjs +11 -12
- package/dist/commands/report/agent-activity.mjs.map +1 -0
- package/dist/commands/report/finalize.d.mts +4 -0
- package/{src → dist}/commands/report/finalize.mjs +25 -32
- package/dist/commands/report/finalize.mjs.map +1 -0
- package/dist/commands/report/inject-report-index.d.mts +1 -0
- package/{src → dist}/commands/report/inject-report-index.mjs +6 -7
- package/dist/commands/report/inject-report-index.mjs.map +1 -0
- package/dist/commands/report/render-final-report.d.mts +1 -0
- package/{src → dist}/commands/report/render-final-report.mjs +6 -7
- package/dist/commands/report/render-final-report.mjs.map +1 -0
- package/dist/commands/report/render-views.d.mts +1 -0
- package/{src → dist}/commands/report/render-views.mjs +6 -7
- package/dist/commands/report/render-views.mjs.map +1 -0
- package/dist/commands/report/translate.d.mts +1 -0
- package/{src → dist}/commands/report/translate.mjs +6 -7
- package/dist/commands/report/translate.mjs.map +1 -0
- package/dist/lib/helper-scripts.d.mts +3 -0
- package/{src → dist}/lib/helper-scripts.mjs +11 -14
- package/dist/lib/helper-scripts.mjs.map +1 -0
- package/dist/lib/host-registry-client.d.mts +25 -0
- package/dist/lib/host-registry-client.mjs +152 -0
- package/dist/lib/host-registry-client.mjs.map +1 -0
- package/dist/lib/install-assets.d.mts +8 -0
- package/{src → dist}/lib/install-assets.mjs +17 -20
- package/dist/lib/install-assets.mjs.map +1 -0
- package/dist/lib/okstra-dirs.d.mts +4 -0
- package/{src → dist}/lib/okstra-dirs.mjs +3 -6
- package/dist/lib/okstra-dirs.mjs.map +1 -0
- package/dist/lib/paths.d.mts +4 -0
- package/dist/lib/paths.mjs +78 -0
- package/dist/lib/paths.mjs.map +1 -0
- package/dist/lib/proc.d.mts +3 -0
- package/dist/lib/proc.mjs +31 -0
- package/dist/lib/proc.mjs.map +1 -0
- package/dist/lib/python-helper.d.mts +8 -0
- package/dist/lib/python-helper.mjs +123 -0
- package/dist/lib/python-helper.mjs.map +1 -0
- package/dist/lib/runtime-manifest.d.mts +7 -0
- package/dist/lib/runtime-manifest.mjs +73 -0
- package/dist/lib/runtime-manifest.mjs.map +1 -0
- package/dist/lib/skill-catalog.d.mts +4 -0
- package/dist/lib/skill-catalog.mjs +50 -0
- package/dist/lib/skill-catalog.mjs.map +1 -0
- package/dist/lib/types.d.mts +129 -0
- package/dist/lib/types.mjs +2 -0
- package/dist/lib/types.mjs.map +1 -0
- package/dist/lib/version.d.mts +2 -0
- package/dist/lib/version.mjs +27 -0
- package/dist/lib/version.mjs.map +1 -0
- package/docs/architecture/storage-model.md +6 -2
- package/docs/architecture.md +29 -20
- package/docs/cli.md +40 -16
- package/docs/contributor-change-matrix.md +2 -2
- package/docs/for-ai/skills/okstra-inspect.md +2 -3
- package/docs/for-ai/skills/okstra-rollup.md +1 -0
- package/docs/project-structure-overview.md +72 -62
- package/docs/task-process/README.md +12 -8
- package/docs/task-process/common-flow.md +13 -16
- package/docs/task-process/error-analysis.md +9 -10
- package/docs/task-process/final-verification.md +7 -7
- package/docs/task-process/implementation-planning.md +9 -9
- package/docs/task-process/implementation.md +6 -6
- package/docs/task-process/release-handoff.md +8 -7
- package/docs/task-process/requirements-discovery.md +8 -8
- package/package.json +11 -5
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/claude-worker.md +2 -1
- package/runtime/agents/workers/report-writer-worker.md +3 -1
- package/runtime/agents/workers/translator-worker.md +3 -1
- package/runtime/bin/lib/okstra/cli.sh +12 -0
- package/runtime/bin/lib/okstra/globals.sh +3 -0
- package/runtime/bin/lib/okstra/interactive.sh +12 -6
- package/runtime/bin/lib/okstra/usage.sh +7 -6
- package/runtime/bin/okstra-error-log.py +27 -0
- package/runtime/bin/okstra-provider-exec.py +217 -5
- package/runtime/bin/okstra-spawn-followups.py +4 -2
- package/runtime/bin/okstra.sh +10 -0
- package/runtime/prompts/launch.template.md +2 -2
- package/runtime/prompts/lead/context-loader.md +1 -2
- package/runtime/prompts/lead/convergence.md +27 -18
- package/runtime/prompts/lead/okstra-lead-contract.md +6 -5
- package/runtime/prompts/lead/plan-body-verification.md +10 -3
- package/runtime/prompts/lead/report-writer.md +15 -1
- package/runtime/prompts/lead/team-contract.md +17 -13
- package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +0 -3
- package/runtime/prompts/profiles/_implementation-verifier.md +3 -7
- package/runtime/prompts/profiles/change-impact-analysis.md +20 -0
- package/runtime/prompts/profiles/error-analysis.md +27 -1
- package/runtime/prompts/profiles/feature-analysis.md +20 -0
- package/runtime/prompts/profiles/final-verification.md +20 -1
- package/runtime/prompts/profiles/implementation-option-selection.md +20 -0
- package/runtime/prompts/profiles/implementation-planning.md +26 -0
- package/runtime/prompts/profiles/implementation.md +19 -0
- package/runtime/prompts/profiles/improvement-discovery.md +21 -1
- package/runtime/prompts/profiles/project-analysis.md +20 -0
- package/runtime/prompts/profiles/release-handoff.md +4 -0
- package/runtime/prompts/profiles/requirements-discovery.md +27 -1
- package/runtime/prompts/wizard/prompts.ko.json +35 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/cli_wrapper.py +8 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/cmux.py +8 -0
- package/runtime/python/okstra_ctl/adapters/dispatch/native_team.py +13 -0
- package/runtime/python/okstra_ctl/adapters/hosts/antigravity/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +25 -5
- package/runtime/python/okstra_ctl/adapters/hosts/codex/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/external/adapter.py +4 -1
- package/runtime/python/okstra_ctl/adapters/hosts/grok/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/hosts/kimi/adapter.py +2 -2
- package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +79 -11
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +95 -25
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +59 -14
- package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +55 -9
- package/runtime/python/okstra_ctl/adapters/providers/kimi/adapter.py +51 -12
- package/runtime/python/okstra_ctl/adapters/runtime/__init__.py +1 -0
- package/runtime/python/okstra_ctl/adapters/runtime/assembly.py +27 -0
- package/runtime/python/okstra_ctl/adapters/runtime/cli_wrapper.py +49 -0
- package/runtime/python/okstra_ctl/adapters/runtime/cmux.py +74 -0
- package/runtime/python/okstra_ctl/agent_activity.py +5 -1
- package/runtime/python/okstra_ctl/agent_invocation.py +608 -14
- package/runtime/python/okstra_ctl/agent_prompt_cli.py +249 -50
- package/runtime/python/okstra_ctl/application/open_worker.py +29 -0
- package/runtime/python/okstra_ctl/application/resolve_assignment.py +53 -12
- package/runtime/python/okstra_ctl/assignment_environment.py +102 -0
- package/runtime/python/okstra_ctl/assignment_resolver.py +790 -0
- package/runtime/python/okstra_ctl/attempt_evidence.py +342 -0
- package/runtime/python/okstra_ctl/convergence.py +409 -3
- package/runtime/python/okstra_ctl/convergence_engine.py +248 -15
- package/runtime/python/okstra_ctl/convergence_store.py +170 -1
- package/runtime/python/okstra_ctl/dispatch_core.py +1204 -155
- package/runtime/python/okstra_ctl/dispatch_state.py +696 -11
- package/runtime/python/okstra_ctl/doctor.py +14 -0
- package/runtime/python/okstra_ctl/domain/host.py +34 -1
- package/runtime/python/okstra_ctl/domain/provider.py +212 -6
- package/runtime/python/okstra_ctl/domain/role.py +125 -0
- package/runtime/python/okstra_ctl/domain/wizard/interaction.py +18 -0
- package/runtime/python/okstra_ctl/domain/worker_exec.py +34 -1
- package/runtime/python/okstra_ctl/domain/worker_role.py +13 -3
- package/runtime/python/okstra_ctl/domain/worker_runtime.py +44 -0
- package/runtime/python/okstra_ctl/domain/worker_stream.py +24 -0
- package/runtime/python/okstra_ctl/error_log_write.py +9 -0
- package/runtime/python/okstra_ctl/error_report.py +21 -1
- package/runtime/python/okstra_ctl/execution_identity.py +529 -0
- package/runtime/python/okstra_ctl/execution_manifest.py +1281 -0
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +619 -0
- package/runtime/python/okstra_ctl/implementation_outcome.py +21 -5
- package/runtime/python/okstra_ctl/index.py +6 -2
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +43 -3
- package/runtime/python/okstra_ctl/legacy_model_selection.py +578 -0
- package/runtime/python/okstra_ctl/manager_sync.py +4 -1
- package/runtime/python/okstra_ctl/model_cli.py +278 -0
- package/runtime/python/okstra_ctl/model_defaults.py +46 -0
- package/runtime/python/okstra_ctl/model_discovery.py +26 -7
- package/runtime/python/okstra_ctl/model_pool.py +501 -0
- package/runtime/python/okstra_ctl/models.py +47 -27
- package/runtime/python/okstra_ctl/mutation_recovery.py +293 -0
- package/runtime/python/okstra_ctl/next_phase.py +236 -0
- package/runtime/python/okstra_ctl/pane_title.py +151 -0
- package/runtime/python/okstra_ctl/ports/host_model.py +48 -17
- package/runtime/python/okstra_ctl/ports/worker_dispatch.py +4 -0
- package/runtime/python/okstra_ctl/ports/worker_runtime.py +26 -0
- package/runtime/python/okstra_ctl/recap.py +4 -1
- package/runtime/python/okstra_ctl/registry/provider_registry.py +8 -4
- package/runtime/python/okstra_ctl/render.py +124 -57
- package/runtime/python/okstra_ctl/render_final_report.py +19 -0
- package/runtime/python/okstra_ctl/report_contract.py +39 -0
- package/runtime/python/okstra_ctl/report_finalize.py +16 -0
- package/runtime/python/okstra_ctl/report_html/render.py +1 -0
- package/runtime/python/okstra_ctl/role_requirements.py +210 -0
- package/runtime/python/okstra_ctl/rollup.py +4 -1
- package/runtime/python/okstra_ctl/run.py +1210 -258
- package/runtime/python/okstra_ctl/run_index_row.py +7 -1
- package/runtime/python/okstra_ctl/stage_fix_carry.py +17 -1
- package/runtime/python/okstra_ctl/team.py +14 -18
- package/runtime/python/okstra_ctl/time_report.py +38 -4
- package/runtime/python/okstra_ctl/usage_identity.py +86 -0
- package/runtime/python/okstra_ctl/usage_report.py +15 -3
- package/runtime/python/okstra_ctl/wizard.py +1449 -66
- package/runtime/python/okstra_ctl/worker_audit_ledger.py +68 -65
- package/runtime/python/okstra_ctl/worker_prompt_body.py +18 -2
- package/runtime/python/okstra_ctl/worker_prompt_contract.py +40 -9
- package/runtime/python/okstra_ctl/worker_prompt_headers.py +16 -1
- package/runtime/python/okstra_ctl/worker_request.py +7 -1
- package/runtime/python/okstra_ctl/worker_runner.py +130 -5
- package/runtime/python/okstra_ctl/workers.py +7 -5
- package/runtime/python/okstra_ctl/workflow.py +18 -32
- package/runtime/python/okstra_ctl/worktree.py +3 -3
- package/runtime/python/okstra_ctl/worktree_registry.py +5 -4
- package/runtime/python/okstra_ctl/write_policy.py +571 -0
- package/runtime/python/okstra_project/state.py +54 -6
- package/runtime/schemas/convergence-groups-v2.0.schema.json +128 -0
- package/runtime/schemas/execution-manifest-v2.schema.json +340 -0
- package/runtime/schemas/final-report-v2.0.schema.json +68 -5
- package/runtime/skills/okstra-inspect/facets/recap.md +2 -0
- package/runtime/skills/okstra-inspect/facets/report.md +1 -1
- package/runtime/skills/okstra-inspect/facets/status.md +15 -13
- package/runtime/skills/okstra-rollup/SKILL.md +1 -0
- package/runtime/skills/okstra-run/SKILL.md +14 -14
- package/runtime/templates/implementation-worker-preamble.md +3 -18
- package/runtime/templates/project-docs/task-index.template.md +0 -1
- package/runtime/templates/report-writer-prompt-preamble.md +2 -0
- package/runtime/templates/reports/final-report-v2.template.md +7 -1
- package/runtime/templates/reports/html/base.template.html +21 -0
- package/runtime/templates/reports/html/i18n/en.json +4 -0
- package/runtime/templates/reports/html/i18n/ko.json +4 -0
- package/runtime/templates/reports/html/macros/forms.html +5 -4
- package/runtime/templates/reports/html/tasks/final-verification.template.html +1 -1
- package/runtime/templates/reports/html/tasks/implementation.template.html +1 -1
- package/runtime/templates/worker-prompt-preamble.md +6 -35
- package/runtime/validators/lib/fixtures.sh +49 -16
- package/runtime/validators/validate-run.py +486 -134
- package/runtime/validators/validate_session_conformance.py +25 -7
- package/src/cli-registry.mjs +0 -539
- package/src/commands/execute/codex-dispatch.mjs +0 -10
- package/src/commands/execute/plan-items.mjs +0 -9
- package/src/commands/execute/plan-validate.mjs +0 -68
- package/src/commands/execute/run.mjs +0 -208
- package/src/commands/execute/wizard.mjs +0 -167
- package/src/commands/inspect/stage-map.mjs +0 -98
- package/src/commands/inspect/task-list.mjs +0 -97
- package/src/commands/inspect/task-show.mjs +0 -100
- package/src/commands/lifecycle/check-project.mjs +0 -187
- package/src/commands/lifecycle/config.mjs +0 -385
- package/src/commands/lifecycle/doctor.mjs +0 -308
- package/src/commands/lifecycle/install.mjs +0 -1170
- package/src/commands/lifecycle/paths.mjs +0 -104
- package/src/commands/lifecycle/preflight.mjs +0 -125
- package/src/commands/lifecycle/setup.mjs +0 -333
- package/src/commands/lifecycle/uninstall.mjs +0 -279
- package/src/commands/memory/memory.mjs +0 -524
- package/src/commands/pr/pr.mjs +0 -261
- package/src/lib/host-registry-client.mjs +0 -176
- package/src/lib/paths.mjs +0 -86
- package/src/lib/proc.mjs +0 -31
- package/src/lib/python-helper.mjs +0 -142
- package/src/lib/runtime-manifest.mjs +0 -70
- package/src/lib/skill-catalog.mjs +0 -53
- package/src/lib/version.mjs +0 -20
- /package/{src → dist}/commands/pr/default.md +0 -0
|
@@ -25,7 +25,9 @@ def build_run_index_row(*, project_id: str, project_root: str,
|
|
|
25
25
|
run_seq: int, status: str, started_at: str,
|
|
26
26
|
finished_at: Optional[str], workers: list, lead_model: str,
|
|
27
27
|
validation: str, run_dir_rel: str,
|
|
28
|
-
final_report_rel: str, final_status_rel: str
|
|
28
|
+
final_report_rel: str, final_status_rel: str,
|
|
29
|
+
execution_manifest_path: str = "",
|
|
30
|
+
role_execution_refs: list | None = None) -> dict:
|
|
29
31
|
"""slim run-index row(14필드)를 만든다. 파생 4필드는 포함하지 않는다."""
|
|
30
32
|
return {
|
|
31
33
|
"runId": build_run_id(project_id, task_group, task_id,
|
|
@@ -43,6 +45,10 @@ def build_run_index_row(*, project_id: str, project_root: str,
|
|
|
43
45
|
"finalReportRel": final_report_rel,
|
|
44
46
|
"finalStatusRel": final_status_rel,
|
|
45
47
|
"runDirRel": run_dir_rel,
|
|
48
|
+
**({
|
|
49
|
+
"executionManifestPath": execution_manifest_path,
|
|
50
|
+
"roleExecutionRefs": list(role_execution_refs or []),
|
|
51
|
+
} if execution_manifest_path else {}),
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
|
|
@@ -84,10 +84,26 @@ def derive_stage_fix_carry(
|
|
|
84
84
|
str(row.get("discrepancy") or row.get("verifier") or "")
|
|
85
85
|
for row in failed
|
|
86
86
|
],
|
|
87
|
-
routing_recommendation=
|
|
87
|
+
routing_recommendation=_routing_line(impl.get("routingRecommendation")),
|
|
88
88
|
)
|
|
89
89
|
|
|
90
90
|
|
|
91
|
+
def _routing_line(value: object) -> str:
|
|
92
|
+
"""구조체 라우팅을 캐리 프롬프트에 실을 한 줄로 편다.
|
|
93
|
+
|
|
94
|
+
리포트의 `implementation.routingRecommendation` 은 `{target, rationale}`
|
|
95
|
+
구조체다. dict 를 str() 로 강제하면 executor 프롬프트에 파이썬 dict repr 이
|
|
96
|
+
그대로 실려 사람도 모델도 읽을 수 없는 줄이 된다.
|
|
97
|
+
"""
|
|
98
|
+
if not isinstance(value, dict):
|
|
99
|
+
return ""
|
|
100
|
+
target = str(value.get("target") or "").strip()
|
|
101
|
+
rationale = str(value.get("rationale") or "").strip()
|
|
102
|
+
if target and rationale:
|
|
103
|
+
return f"{target} — {rationale}"
|
|
104
|
+
return target or rationale
|
|
105
|
+
|
|
106
|
+
|
|
91
107
|
def _latest_report(stage_run_dir: Path) -> Path | None:
|
|
92
108
|
reports_dir = stage_run_dir / "reports"
|
|
93
109
|
if not reports_dir.is_dir():
|
|
@@ -163,10 +163,21 @@ def _teardown(args) -> int:
|
|
|
163
163
|
if args.dry_run:
|
|
164
164
|
_emit_teardown(args.json, panes)
|
|
165
165
|
return 0
|
|
166
|
-
|
|
166
|
+
from .adapters.runtime.assembly import port_for, runtime_chain
|
|
167
|
+
from .domain.worker_runtime import RuntimeHandle, SURFACE_CMUX_PANE
|
|
168
|
+
|
|
169
|
+
chain = runtime_chain(_manifest_backend(manifest))
|
|
170
|
+
# cli-wrapper chains have no cmux port; leftover paneIds must not KeyError.
|
|
171
|
+
if panes and any(port.surface == SURFACE_CMUX_PANE for port in chain):
|
|
172
|
+
closer = port_for(chain, SURFACE_CMUX_PANE)
|
|
167
173
|
for pane in panes:
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
closer.close(
|
|
175
|
+
RuntimeHandle(SURFACE_CMUX_PANE, pane["paneId"], False)
|
|
176
|
+
)
|
|
177
|
+
try:
|
|
178
|
+
chain[0].restore_lead()
|
|
179
|
+
except (OSError, subprocess.SubprocessError, RuntimeError) as exc:
|
|
180
|
+
print(f"okstra team: could not restore the lead's width: {exc}", file=sys.stderr)
|
|
170
181
|
_mark_teardown_errors(team_state_path)
|
|
171
182
|
_emit_teardown(args.json, panes)
|
|
172
183
|
return 0
|
|
@@ -280,21 +291,6 @@ def _append_pane(panes: list[dict[str, str]], seen: set[str], pane_id: str, kind
|
|
|
280
291
|
seen.add(pane_id)
|
|
281
292
|
|
|
282
293
|
|
|
283
|
-
def _restore_lead_width() -> None:
|
|
284
|
-
"""Give the lead back the width the reclaimed panes left behind.
|
|
285
|
-
|
|
286
|
-
Reported rather than raised: teardown's contract is to reclaim the run's
|
|
287
|
-
panes and print what it reclaimed, and a failed resize must not cost the
|
|
288
|
-
caller that record — the panes are already closed by the time this runs.
|
|
289
|
-
Reported rather than swallowed, because a width failure nobody is told
|
|
290
|
-
about is what left the lead at 18 columns unnoticed.
|
|
291
|
-
"""
|
|
292
|
-
try:
|
|
293
|
-
cmux.restore_lead_width()
|
|
294
|
-
except (OSError, subprocess.SubprocessError, RuntimeError) as exc:
|
|
295
|
-
print(f"okstra team: could not restore the lead's width: {exc}", file=sys.stderr)
|
|
296
|
-
|
|
297
|
-
|
|
298
294
|
def _mark_teardown_errors(team_state_path: Path) -> None:
|
|
299
295
|
def mark(payload: dict[str, Any]) -> bool:
|
|
300
296
|
changed = False
|
|
@@ -19,6 +19,18 @@ from okstra_project import read_task_key
|
|
|
19
19
|
from okstra_ctl.task_target import resolve_task_root
|
|
20
20
|
|
|
21
21
|
|
|
22
|
+
def time_rows_with_identity(run_root: Path) -> list[dict]:
|
|
23
|
+
"""Project time rows from stored execution labels without reparsing them."""
|
|
24
|
+
from okstra_ctl.usage_identity import identity_rows_from_state
|
|
25
|
+
|
|
26
|
+
state_path = run_root / "state" / "team-state.json"
|
|
27
|
+
try:
|
|
28
|
+
state = json.loads(state_path.read_text(encoding="utf-8"))
|
|
29
|
+
except (OSError, ValueError):
|
|
30
|
+
return []
|
|
31
|
+
return identity_rows_from_state(state if isinstance(state, dict) else {})
|
|
32
|
+
|
|
33
|
+
|
|
22
34
|
def load_runs(task_root: Path) -> tuple[list[dict], bool]:
|
|
23
35
|
path = task_timeline_file(task_root)
|
|
24
36
|
try:
|
|
@@ -98,14 +110,26 @@ def _collect_run(run: dict, project_root: Path) -> dict:
|
|
|
98
110
|
state = _read_state(project_root, run.get("teamStatePath", ""))
|
|
99
111
|
if state is None:
|
|
100
112
|
return {**base, "reason": "team-state missing"}
|
|
113
|
+
from okstra_ctl.execution_identity import stored_identity
|
|
114
|
+
from okstra_ctl.usage_identity import identity_rows_from_state
|
|
115
|
+
|
|
101
116
|
lead = _duration_ms(state.get("leadUsage"))
|
|
102
|
-
workers = [
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
workers = []
|
|
118
|
+
for worker in (state.get("workers") or []):
|
|
119
|
+
if not isinstance(worker, dict):
|
|
120
|
+
continue
|
|
121
|
+
row = {
|
|
122
|
+
"workerId": worker.get("workerId", ""),
|
|
123
|
+
"agent": worker.get("agent", ""),
|
|
124
|
+
"durationMs": _duration_ms(worker.get("usage")),
|
|
125
|
+
}
|
|
126
|
+
row.update(stored_identity(worker))
|
|
127
|
+
workers.append(row)
|
|
105
128
|
if lead == 0 and all(w["durationMs"] == 0 for w in workers):
|
|
106
129
|
return {**base, "reason": "no durationMs (Phase 7 not reached)"}
|
|
107
130
|
return {**base, "leadMs": lead, "workers": workers,
|
|
108
|
-
"wallClockMs": wall_clock_ms(state), "phases": _phase_rows(state)
|
|
131
|
+
"wallClockMs": wall_clock_ms(state), "phases": _phase_rows(state),
|
|
132
|
+
"identityRows": identity_rows_from_state(state)}
|
|
109
133
|
|
|
110
134
|
|
|
111
135
|
def _by_task_type(collected: list[dict]) -> list[dict]:
|
|
@@ -165,6 +189,15 @@ def aggregate_time(runs: list[dict], project_root: Path) -> dict:
|
|
|
165
189
|
(unavailable if "reason" in c else collected).append(c)
|
|
166
190
|
by_tt = _by_task_type(collected)
|
|
167
191
|
grand = {k: sum(r[k] for r in by_tt) for k in ("runs", "leadMs", "workersMs", "cpuSumMs")}
|
|
192
|
+
identity_rows = []
|
|
193
|
+
seen: set[str] = set()
|
|
194
|
+
for collected_run in collected:
|
|
195
|
+
for row in collected_run.get("identityRows") or []:
|
|
196
|
+
key = str(row.get("roleExecutionRef") or row.get("executionLabel"))
|
|
197
|
+
if key in seen:
|
|
198
|
+
continue
|
|
199
|
+
seen.add(key)
|
|
200
|
+
identity_rows.append(row)
|
|
168
201
|
return {
|
|
169
202
|
"byTaskType": by_tt,
|
|
170
203
|
"grandTotal": grand,
|
|
@@ -173,6 +206,7 @@ def aggregate_time(runs: list[dict], project_root: Path) -> dict:
|
|
|
173
206
|
"wallClockMs": c["wallClockMs"]} for c in collected],
|
|
174
207
|
"phaseTimelines": [{"runTimestamp": c["runTimestamp"], "taskType": c["taskType"],
|
|
175
208
|
"phases": c["phases"]} for c in collected if c["phases"]],
|
|
209
|
+
"identityRows": identity_rows,
|
|
176
210
|
"unavailable": unavailable,
|
|
177
211
|
}
|
|
178
212
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Project usage rows from stored execution-identity refs."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from collections.abc import Mapping
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from .execution_identity import (
|
|
10
|
+
ExecutionManifest,
|
|
11
|
+
execution_identity_for_ref,
|
|
12
|
+
stored_execution_label,
|
|
13
|
+
stored_identity,
|
|
14
|
+
)
|
|
15
|
+
from .execution_manifest import read_execution_manifest
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def run_execution_manifest(run_root: Path) -> ExecutionManifest:
|
|
19
|
+
"""Load the first run-manifest under ``run_root/manifests``."""
|
|
20
|
+
return read_execution_manifest(_manifest_path(run_root))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def identity_rows_from_state(state: Mapping[str, Any] | None) -> list[dict[str, Any]]:
|
|
24
|
+
"""Collect stored identity rows from a team-state document."""
|
|
25
|
+
if not isinstance(state, Mapping):
|
|
26
|
+
return []
|
|
27
|
+
rows: list[dict[str, Any]] = []
|
|
28
|
+
seen: set[str] = set()
|
|
29
|
+
for collection in (
|
|
30
|
+
state.get("workers") or [],
|
|
31
|
+
state.get("workerDispatches") or [],
|
|
32
|
+
state.get("agentDispatches") or [],
|
|
33
|
+
):
|
|
34
|
+
if not isinstance(collection, list):
|
|
35
|
+
continue
|
|
36
|
+
for item in collection:
|
|
37
|
+
ident = stored_identity(item if isinstance(item, Mapping) else None)
|
|
38
|
+
if not ident:
|
|
39
|
+
continue
|
|
40
|
+
key = str(ident.get("roleExecutionRef") or ident.get("executionLabel"))
|
|
41
|
+
if key in seen:
|
|
42
|
+
continue
|
|
43
|
+
seen.add(key)
|
|
44
|
+
rows.append(ident)
|
|
45
|
+
return rows
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def collect_usage_rows(run_root: Path) -> list[dict[str, Any]]:
|
|
49
|
+
"""Project usage rows with stored execution identity refs."""
|
|
50
|
+
manifest = run_execution_manifest(run_root)
|
|
51
|
+
team_state = _load_json(run_root / "state" / "team-state.json")
|
|
52
|
+
rows: list[dict[str, Any]] = []
|
|
53
|
+
for collection in (
|
|
54
|
+
team_state.get("workerDispatches") or [],
|
|
55
|
+
team_state.get("agentDispatches") or [],
|
|
56
|
+
):
|
|
57
|
+
for item in collection:
|
|
58
|
+
if not isinstance(item, Mapping):
|
|
59
|
+
continue
|
|
60
|
+
rows.append(_usage_row(manifest, item))
|
|
61
|
+
return rows
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _usage_row(manifest: ExecutionManifest, item: Mapping[str, Any]) -> dict[str, Any]:
|
|
65
|
+
ref = str(item.get("roleExecutionRef") or "")
|
|
66
|
+
role = execution_identity_for_ref(manifest, ref)
|
|
67
|
+
return {
|
|
68
|
+
"participantRef": item.get("participantRef") or role.participant_ref,
|
|
69
|
+
"roleExecutionRef": role.role_execution_ref,
|
|
70
|
+
"invocationRef": item.get("invocationRef"),
|
|
71
|
+
"attempt": item.get("attempt", 1),
|
|
72
|
+
"executionLabel": stored_execution_label(
|
|
73
|
+
{"executionLabel": item.get("executionLabel") or role.execution_label}
|
|
74
|
+
),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _manifest_path(run_root: Path) -> Path:
|
|
79
|
+
manifests = run_root / "manifests"
|
|
80
|
+
for path in sorted(manifests.glob("*.json")):
|
|
81
|
+
return path
|
|
82
|
+
raise FileNotFoundError(f"no run manifest under {run_root}")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _load_json(path: Path) -> dict[str, Any]:
|
|
86
|
+
return json.loads(path.read_text(encoding="utf-8"))
|
|
@@ -147,9 +147,13 @@ def _collect_usage(
|
|
|
147
147
|
end_at: dt.datetime,
|
|
148
148
|
unavailable: dict[str, int],
|
|
149
149
|
warnings: dict[str, int],
|
|
150
|
-
) -> tuple[dict[str, dict], set[str], int, int]:
|
|
150
|
+
) -> tuple[dict[str, dict], set[str], int, int, list[dict]]:
|
|
151
|
+
from okstra_ctl.usage_identity import identity_rows_from_state
|
|
152
|
+
|
|
151
153
|
buckets: dict[str, dict] = {}
|
|
152
154
|
unmatched_models: set[str] = set()
|
|
155
|
+
identity_rows: list[dict] = []
|
|
156
|
+
seen_identity: set[str] = set()
|
|
153
157
|
total_runs = 0
|
|
154
158
|
collected_runs = 0
|
|
155
159
|
for entry in list_project_tasks(project_root):
|
|
@@ -173,6 +177,13 @@ def _collect_usage(
|
|
|
173
177
|
total_runs += 1
|
|
174
178
|
bucket["runs"] += 1
|
|
175
179
|
metrics, reason = _run_metrics(run, project_root)
|
|
180
|
+
state = _read_state(project_root, str(run.get("teamStatePath") or ""))
|
|
181
|
+
for row in identity_rows_from_state(state):
|
|
182
|
+
key = str(row.get("roleExecutionRef") or row.get("executionLabel"))
|
|
183
|
+
if key in seen_identity:
|
|
184
|
+
continue
|
|
185
|
+
seen_identity.add(key)
|
|
186
|
+
identity_rows.append(row)
|
|
176
187
|
if reason is not None:
|
|
177
188
|
unavailable[reason] += 1
|
|
178
189
|
continue
|
|
@@ -182,7 +193,7 @@ def _collect_usage(
|
|
|
182
193
|
bucket[key] += metrics[key]
|
|
183
194
|
bucket["costUsd"] += metrics["costUsd"]
|
|
184
195
|
unmatched_models.update(metrics["unmatchedModels"])
|
|
185
|
-
return buckets, unmatched_models, total_runs, collected_runs
|
|
196
|
+
return buckets, unmatched_models, total_runs, collected_runs, identity_rows
|
|
186
197
|
|
|
187
198
|
|
|
188
199
|
def build_usage_report(project_root: Path, days: int, now: dt.datetime) -> dict:
|
|
@@ -196,7 +207,7 @@ def build_usage_report(project_root: Path, days: int, now: dt.datetime) -> dict:
|
|
|
196
207
|
start_at = dt.datetime.min.replace(tzinfo=UTC)
|
|
197
208
|
unavailable = {key: 0 for key in UNAVAILABLE_KEYS}
|
|
198
209
|
warnings = {"missingOrInvalidTimelines": 0}
|
|
199
|
-
buckets, unmatched_models, total_runs, collected_runs = _collect_usage(
|
|
210
|
+
buckets, unmatched_models, total_runs, collected_runs, identity_rows = _collect_usage(
|
|
200
211
|
project_root, start_at, end_at, unavailable, warnings
|
|
201
212
|
)
|
|
202
213
|
|
|
@@ -226,6 +237,7 @@ def build_usage_report(project_root: Path, days: int, now: dt.datetime) -> dict:
|
|
|
226
237
|
"unavailable": unavailable,
|
|
227
238
|
"warnings": warnings,
|
|
228
239
|
"unmatchedModels": sorted(unmatched_models),
|
|
240
|
+
"identityRows": identity_rows,
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
|