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
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
"""Bundled Kimi provider catalog."""
|
|
2
|
-
from
|
|
2
|
+
from typing import Any, Mapping
|
|
3
|
+
from okstra_ctl.domain.provider import (
|
|
4
|
+
LeadLaunchSpec,
|
|
5
|
+
ModelSpec,
|
|
6
|
+
ProviderSpec,
|
|
7
|
+
ServedModelAttestation,
|
|
8
|
+
)
|
|
9
|
+
from okstra_ctl.domain.role import ALL_ROLE_TOKENS
|
|
3
10
|
from okstra_ctl.domain.worker_exec import (
|
|
4
11
|
STREAM_JSON,
|
|
5
12
|
ExecCommand,
|
|
@@ -10,18 +17,33 @@ from okstra_ctl.domain.worker_stream import content_block_events
|
|
|
10
17
|
|
|
11
18
|
|
|
12
19
|
KIMI = {
|
|
13
|
-
"kimi-k2.7-code": ModelSpec(
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"kimi-k3": ModelSpec("Kimi K3", "kimi-k3", (3.00, 0.30, 15.00), in_picker=True),
|
|
19
|
-
"kimi k3": ModelSpec("Kimi K3", "kimi-k3"),
|
|
20
|
-
"k3": ModelSpec("Kimi K3", "k3", in_picker=True),
|
|
21
|
-
"k3-256k": ModelSpec("Kimi K3 256K", "k3-256k", in_picker=True),
|
|
22
|
-
"kimi k3 256k": ModelSpec("Kimi K3 256K", "k3-256k"),
|
|
20
|
+
"kimi-k2.7-code": ModelSpec("kimi-k2.7-code", "Kimi K2.7 Code", "kimi-k2.7-code", aliases=("kimi k2.7 code",), pricing=(0.95, 0.19, 4.00)),
|
|
21
|
+
"kimi-for-coding": ModelSpec("kimi-for-coding", "Kimi K2.7 Code", "kimi-for-coding"),
|
|
22
|
+
"kimi-k3": ModelSpec("kimi-k3", "Kimi K3", "kimi-k3", aliases=("kimi k3",), pricing=(3.00, 0.30, 15.00)),
|
|
23
|
+
"k3": ModelSpec("k3", "Kimi K3", "k3"),
|
|
24
|
+
"k3-256k": ModelSpec("k3-256k", "Kimi K3 256K", "k3-256k", aliases=("kimi k3 256k",)),
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
|
|
28
|
+
def normalise_served_model(raw_model: str | None) -> ServedModelAttestation:
|
|
29
|
+
if not raw_model or not raw_model.strip():
|
|
30
|
+
return ServedModelAttestation.unknown()
|
|
31
|
+
model_id = raw_model.strip().lower().removeprefix("kimi/")
|
|
32
|
+
return ServedModelAttestation(
|
|
33
|
+
raw_model, f"kimi/{model_id}", "exact", "provider-output"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def observe_served_model(event: Mapping[str, Any]) -> str | None:
|
|
38
|
+
model = event.get("model")
|
|
39
|
+
if isinstance(model, str) and model.strip():
|
|
40
|
+
return model
|
|
41
|
+
message = event.get("message")
|
|
42
|
+
if isinstance(message, Mapping):
|
|
43
|
+
model = message.get("model")
|
|
44
|
+
return model if isinstance(model, str) and model.strip() else None
|
|
45
|
+
return None
|
|
46
|
+
|
|
25
47
|
KIMI_LEAD_LAUNCH = LeadLaunchSpec(
|
|
26
48
|
executable="kimi",
|
|
27
49
|
model_flag="--model",
|
|
@@ -52,6 +74,7 @@ class KimiExecution:
|
|
|
52
74
|
stdin_text=None,
|
|
53
75
|
stream_format=STREAM_JSON,
|
|
54
76
|
normalise=content_block_events,
|
|
77
|
+
observe_served_model=observe_served_model,
|
|
55
78
|
cwd=cwd,
|
|
56
79
|
)
|
|
57
80
|
|
|
@@ -72,9 +95,25 @@ def create_provider() -> ProviderSpec:
|
|
|
72
95
|
"lead": "kimi-k2.7-code",
|
|
73
96
|
"analyser": "kimi-k2.7-code",
|
|
74
97
|
"critic": "kimi-k3",
|
|
98
|
+
"designer": "kimi-k2.7-code",
|
|
99
|
+
"planner": "kimi-k2.7-code",
|
|
100
|
+
"executor": "kimi-k2.7-code",
|
|
101
|
+
"verifier": "kimi-k2.7-code",
|
|
102
|
+
"report-writer": "kimi-k2.7-code",
|
|
103
|
+
"translator": "kimi-k2.7-code",
|
|
75
104
|
},
|
|
76
105
|
wrapper="okstra-kimi-exec.sh",
|
|
77
|
-
supported_roles=
|
|
106
|
+
supported_roles=ALL_ROLE_TOKENS,
|
|
107
|
+
execution_capabilities=frozenset(
|
|
108
|
+
{
|
|
109
|
+
"lead-session",
|
|
110
|
+
"worker-artifact-io",
|
|
111
|
+
"source-readonly",
|
|
112
|
+
"extended-artifact-authoring",
|
|
113
|
+
"project-mutation",
|
|
114
|
+
}
|
|
115
|
+
),
|
|
78
116
|
lead_launch=KIMI_LEAD_LAUNCH,
|
|
79
117
|
exec_strategy=KimiExecution(),
|
|
118
|
+
served_model_normalizer=normalise_served_model,
|
|
80
119
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Execution-surface adapters."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Build the injected execution-surface chain for one planned surface."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from collections.abc import Sequence
|
|
5
|
+
|
|
6
|
+
from ...domain.worker_runtime import SURFACE_CLI_WRAPPER, SURFACE_CMUX_PANE
|
|
7
|
+
from ...ports.worker_runtime import WorkerRuntimePort
|
|
8
|
+
from .cli_wrapper import CliWrapperRuntime
|
|
9
|
+
from .cmux import CmuxRuntime
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def runtime_chain(planned_surface: str) -> tuple[WorkerRuntimePort, ...]:
|
|
13
|
+
cli = CliWrapperRuntime()
|
|
14
|
+
if planned_surface == SURFACE_CLI_WRAPPER:
|
|
15
|
+
return (cli,)
|
|
16
|
+
if planned_surface == SURFACE_CMUX_PANE:
|
|
17
|
+
return (CmuxRuntime(), cli)
|
|
18
|
+
raise ValueError(f"unknown execution surface: {planned_surface}")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def port_for(
|
|
22
|
+
chain: Sequence[WorkerRuntimePort], surface: str
|
|
23
|
+
) -> WorkerRuntimePort:
|
|
24
|
+
for port in chain:
|
|
25
|
+
if port.surface == surface:
|
|
26
|
+
return port
|
|
27
|
+
raise KeyError(surface)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Run a worker as a lead-owned subprocess."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import subprocess
|
|
5
|
+
import uuid
|
|
6
|
+
|
|
7
|
+
from ...domain.worker_runtime import (
|
|
8
|
+
SURFACE_CLI_WRAPPER,
|
|
9
|
+
ProgressEvent,
|
|
10
|
+
RuntimeHandle,
|
|
11
|
+
WorkerSpawnRequest,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class CliWrapperRuntime:
|
|
16
|
+
surface = SURFACE_CLI_WRAPPER
|
|
17
|
+
|
|
18
|
+
def __init__(self) -> None:
|
|
19
|
+
self._children: dict[str, subprocess.Popen[str]] = {}
|
|
20
|
+
|
|
21
|
+
def spawn(self, request: WorkerSpawnRequest) -> RuntimeHandle:
|
|
22
|
+
process = subprocess.Popen(
|
|
23
|
+
list(request.command), cwd=request.cwd, text=True
|
|
24
|
+
)
|
|
25
|
+
identifier = uuid.uuid4().hex
|
|
26
|
+
self._children[identifier] = process
|
|
27
|
+
return RuntimeHandle(
|
|
28
|
+
surface=self.surface,
|
|
29
|
+
identifier=identifier,
|
|
30
|
+
waitable=True,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def close(self, handle: RuntimeHandle) -> None:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
def wait(self, handle: RuntimeHandle) -> int:
|
|
37
|
+
process = self._children[handle.identifier]
|
|
38
|
+
return process.wait()
|
|
39
|
+
|
|
40
|
+
def terminate(self, handle: RuntimeHandle) -> None:
|
|
41
|
+
process = self._children[handle.identifier]
|
|
42
|
+
if process.poll() is None:
|
|
43
|
+
process.terminate()
|
|
44
|
+
|
|
45
|
+
def notify(self, event: ProgressEvent) -> None:
|
|
46
|
+
return None
|
|
47
|
+
|
|
48
|
+
def restore_lead(self) -> None:
|
|
49
|
+
return None
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"""Open and signal workers on a cmux pane surface."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import subprocess
|
|
5
|
+
|
|
6
|
+
from ... import cmux
|
|
7
|
+
from ...domain.worker_runtime import (
|
|
8
|
+
SURFACE_CMUX_PANE,
|
|
9
|
+
EnvironmentBlocked,
|
|
10
|
+
ProgressEvent,
|
|
11
|
+
RuntimeHandle,
|
|
12
|
+
SurfaceUnavailable,
|
|
13
|
+
WorkerSpawnRequest,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CmuxRuntime:
|
|
18
|
+
surface = SURFACE_CMUX_PANE
|
|
19
|
+
|
|
20
|
+
def spawn(self, request: WorkerSpawnRequest) -> RuntimeHandle:
|
|
21
|
+
workspace = cmux.resolve_lead_workspace()
|
|
22
|
+
if not workspace:
|
|
23
|
+
reason = cmux.unreachable_reason()
|
|
24
|
+
if reason in (cmux.LOST_ENVIRONMENT, cmux.LOST_DENIED):
|
|
25
|
+
observed = (
|
|
26
|
+
"this process has no cmux environment left — a sandbox sanitized it"
|
|
27
|
+
if reason == cmux.LOST_ENVIRONMENT
|
|
28
|
+
else "cmux is running but this process may not connect to its socket"
|
|
29
|
+
)
|
|
30
|
+
raise EnvironmentBlocked(
|
|
31
|
+
"this run was prepared for cmux panes, but "
|
|
32
|
+
f"{observed}. The same sandbox blocks worker CLIs from "
|
|
33
|
+
"their own config, so falling back to blocking workers "
|
|
34
|
+
"would fail too. Relaunch the lead outside a sandbox "
|
|
35
|
+
"(use a full-access lead sandbox)."
|
|
36
|
+
)
|
|
37
|
+
raise SurfaceUnavailable("cmux lead workspace is gone")
|
|
38
|
+
try:
|
|
39
|
+
surface_id = cmux.spawn_worker_surface(
|
|
40
|
+
workspace=workspace,
|
|
41
|
+
cwd=request.cwd,
|
|
42
|
+
command=request.command,
|
|
43
|
+
title=request.title,
|
|
44
|
+
owned_surface_ids=request.owned_surface_ids,
|
|
45
|
+
)
|
|
46
|
+
except (RuntimeError, OSError, subprocess.SubprocessError) as exc:
|
|
47
|
+
raise SurfaceUnavailable(str(exc)) from exc
|
|
48
|
+
return RuntimeHandle(
|
|
49
|
+
surface=self.surface,
|
|
50
|
+
identifier=surface_id,
|
|
51
|
+
waitable=False,
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
def close(self, handle: RuntimeHandle) -> None:
|
|
55
|
+
cmux.close_surface(handle.identifier)
|
|
56
|
+
|
|
57
|
+
def wait(self, handle: RuntimeHandle) -> int:
|
|
58
|
+
raise RuntimeError("cmux-pane handles are not waitable")
|
|
59
|
+
|
|
60
|
+
def terminate(self, handle: RuntimeHandle) -> None:
|
|
61
|
+
self.close(handle)
|
|
62
|
+
|
|
63
|
+
def notify(self, event: ProgressEvent) -> None:
|
|
64
|
+
workspace = cmux.resolve_lead_workspace()
|
|
65
|
+
cmux.sidebar_log(workspace, event.message, level=event.level)
|
|
66
|
+
if event.notify_title is not None:
|
|
67
|
+
cmux.sidebar_notify(
|
|
68
|
+
workspace,
|
|
69
|
+
title=event.notify_title,
|
|
70
|
+
body=event.notify_body or "",
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
def restore_lead(self) -> None:
|
|
74
|
+
cmux.restore_lead_width()
|
|
@@ -113,7 +113,11 @@ def _activity_row(event: LeadEvent) -> dict[str, Any]:
|
|
|
113
113
|
or _ACTIVITY_ID_RE.fullmatch(activity_id) is None
|
|
114
114
|
):
|
|
115
115
|
raise ActivityProjectionError(f"invalid activityId: {activity_id}")
|
|
116
|
-
|
|
116
|
+
from okstra_ctl.execution_identity import stored_identity
|
|
117
|
+
|
|
118
|
+
row = {key: details[key] for key in ACTIVITY_FIELDS}
|
|
119
|
+
row.update(stored_identity(details))
|
|
120
|
+
return row
|
|
117
121
|
|
|
118
122
|
|
|
119
123
|
def _validate_activity_order(rows: Sequence[Mapping[str, Any]]) -> None:
|