okstra 0.174.0 → 0.175.1
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 +4 -0
- package/docs/architecture.md +7 -1
- package/docs/cli.md +26 -6
- package/docs/contributor-change-matrix.md +2 -2
- package/docs/project-structure-overview.md +16 -7
- package/docs/task-process/README.md +2 -0
- package/docs/task-process/implementation-planning.md +1 -1
- package/docs/task-process/implementation.md +1 -1
- 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/usage.sh +4 -4
- package/runtime/bin/okstra-error-log.py +27 -0
- package/runtime/bin/okstra-provider-exec.py +217 -5
- package/runtime/bin/okstra.sh +10 -0
- package/runtime/prompts/lead/convergence.md +27 -18
- package/runtime/prompts/lead/okstra-lead-contract.md +3 -1
- package/runtime/prompts/lead/plan-body-verification.md +10 -3
- package/runtime/prompts/lead/team-contract.md +1 -1
- package/runtime/prompts/profiles/change-impact-analysis.md +16 -0
- package/runtime/prompts/profiles/error-analysis.md +20 -0
- package/runtime/prompts/profiles/feature-analysis.md +16 -0
- package/runtime/prompts/profiles/final-verification.md +16 -0
- package/runtime/prompts/profiles/implementation-option-selection.md +16 -0
- package/runtime/prompts/profiles/implementation-planning.md +20 -0
- package/runtime/prompts/profiles/implementation.md +15 -0
- package/runtime/prompts/profiles/improvement-discovery.md +16 -0
- package/runtime/prompts/profiles/project-analysis.md +16 -0
- package/runtime/prompts/profiles/release-handoff.md +4 -0
- package/runtime/prompts/profiles/requirements-discovery.md +20 -0
- package/runtime/prompts/wizard/prompts.ko.json +18 -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/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/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 +1092 -63
- 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 +32 -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 +13 -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_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/index.py +6 -2
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +43 -3
- package/runtime/python/okstra_ctl/legacy_model_selection.py +490 -0
- 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/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/registry/provider_registry.py +8 -4
- package/runtime/python/okstra_ctl/render.py +78 -10
- 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 +217 -0
- package/runtime/python/okstra_ctl/run.py +1207 -258
- package/runtime/python/okstra_ctl/run_index_row.py +7 -1
- 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 +1253 -62
- package/runtime/python/okstra_ctl/worker_audit_ledger.py +68 -65
- 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/write_policy.py +571 -0
- 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 +25 -0
- package/runtime/skills/okstra-run/SKILL.md +9 -9
- 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/worker-prompt-preamble.md +6 -2
- package/runtime/validators/lib/fixtures.sh +49 -16
- package/runtime/validators/validate-run.py +429 -35
- 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
|
@@ -202,7 +202,14 @@ Before each verifier call, write one task-instructions file under the current
|
|
|
202
202
|
run's `state/` directory and run `okstra agent-prompt materialize` with
|
|
203
203
|
`--audience reverification-worker`,
|
|
204
204
|
`--assignment-ref reverify/<workerId>`, the exact `--worker-id`, and
|
|
205
|
-
`--dispatch-kind reverify-r<N>`.
|
|
205
|
+
`--dispatch-kind reverify-r<N>`. For a v2 run, select the verifier's canonical
|
|
206
|
+
source `RoleExecution` row from the run manifest's static role state. Use its
|
|
207
|
+
`participantRef`, and set `sourceRoleExecutionRef` to the selected source
|
|
208
|
+
`RoleExecution` row's `roleExecutionRef`, not that row's
|
|
209
|
+
`sourceRoleExecutionRef` field. Pass `--source-role-execution-ref
|
|
210
|
+
<sourceRoleExecutionRef>`. Do not derive that reference from `workerId`,
|
|
211
|
+
provider, model, or execution-label text. A legacy v1 run omits this flag. Run
|
|
212
|
+
`okstra agent-prompt verify` against the
|
|
206
213
|
returned `metadataPath` before dispatch and use the returned `promptPath`
|
|
207
214
|
without modification. Native-session calls use only `hostModelValue`; before
|
|
208
215
|
the host primitive, run `okstra agent-prompt record-dispatch` with the project
|
|
@@ -268,9 +275,9 @@ round before any host or provider process starts.
|
|
|
268
275
|
- **Round completion.** A round is complete only after the renderer has run on the corrected data.json, lead has appended the round to the state file per step 6, lead has reconciled instructed groups against applied corrections — every `itemIds` entry either carries a `selfFixNote` or is still recorded as broken — **`okstra plan-verify --report <report>` exits 0** (step 5), and lead has then set that round's immutable `completedAt`. A round left with a non-zero exit carries its defect into the next round's inputs, which is how a mis-scored gate survives a whole self-fix budget. A round that was instructed but never rendered has not happened, and counting it inflates the budget that gates promotion. The state-file append is not optional bookkeeping: the next re-verification overwrites data.json's `planItems[].verdicts`, so a round that never reached `roundHistory[]` leaves no record anywhere of what it blocked on — which is the whole reason this file exists. **Enforced:** `validators/validate-run.py` `_validate_plan_body_state_rounds` requires one `roundHistory[]` entry per round `1..roundCount`, each carrying its own `gateResult` and cited by at least one item's `rounds[]`, and requires the file's `selfFixRoundsApplied` to match the report's. For a resolved correctness-critical user response, `_validate_target_round_causality` additionally requires the cited round's `completedAt` to be after every linked canonical `user-decision-required` event and no later than every linked canonical `user-decision-evaluated` event.
|
|
269
276
|
- **Loop termination.** Lead — not the report-writer worker — records the round count in `planBodyVerification.selfFixRoundsApplied` at each round's end, and why the loop stopped in `planBodyVerification.selfFixStopReason`. The count must equal the highest `round` in `selfFixGroups[]`, so it is derivable from recorded work rather than self-reported. A user-directed correction does not consume the automatic self-fix limit, and a verification failure after that correction does not restart the automatic loop:
|
|
270
277
|
- `all-resolved` — no planner-fixable `majority-disagree` item remains. Exit.
|
|
271
|
-
- `no-progress` — the round resolved **zero** planner-fixable items relative to the previous round. Exit even with budget left: the same rewrite would repeat. Newly *introduced* defects count against progress, so a rewrite that trades one defect for another stops the loop rather than churning.
|
|
278
|
+
- `no-progress` — the round resolved **zero** planner-fixable items relative to the previous round. Exit even with budget left: the same rewrite would repeat. Newly *introduced* defects count against progress, so a rewrite that trades one defect for another stops the loop rather than churning. A round that re-targets only what the previous round left unresolved is this same conclusion reached one dispatch earlier — exit on it under this reason rather than paying for the round that proves it. **Enforced (advisory):** `validators/validate-run.py` `_detect_self_fix_recurrence` warns on that shape and names this stop reason.
|
|
272
279
|
- `max-rounds-reached` — `selfFixRoundsApplied == selfFixMaxRounds`. Exit.
|
|
273
|
-
- `cause-group-recurrence` — legacy read-only value for reports produced before activity contract v1. A new activity-contract-v1 run MUST NOT emit it because there is no second automatic self-fix round in which a cause group can recur. **Enforced:** `validators/validate-run.py` `_validate_activity_contract_plan_limits`.
|
|
280
|
+
- `cause-group-recurrence` — legacy read-only value for reports produced before activity contract v1. A new activity-contract-v1 run MUST NOT emit it because there is no second automatic self-fix round in which a cause group can recur. **Enforced:** `validators/validate-run.py` `_validate_activity_contract_plan_limits`. A legacy report that already carries it is still an *exhausted* loop, so step 8 may promote its surviving items: `_SELF_FIX_EXHAUSTED_REASONS` admits this value alongside `no-progress` / `max-rounds-reached`. Refusing it there left such a report with no exit at all — the loop may not run again, and the item may not be promoted either.
|
|
274
281
|
- `not-attempted` — the loop never ran because no item qualified.
|
|
275
282
|
The `no-progress` and `max-rounds-reached` exits are what make the loop terminate; `selfFixMaxRounds` alone is the backstop.
|
|
276
283
|
- a `majority-disagree` item with a majority of its deciding `DISAGREE` votes at `needs-user-input` is NOT a self-fix target — after correctness-critical precedence, it goes straight to the next step as `user-decision` rather than generic `noncritical-dissent`. **Enforced:** `validators/validate-run.py` `_expected_approval_classification`.
|
|
@@ -164,7 +164,7 @@ After each worker attempt returns (regardless of role), Lead MUST verify the can
|
|
|
164
164
|
- The result file exists but its audit sidecar does not, at `runs/<task-type>/worker-results/<worker>-audit-<task-type>-<seq>.md`. Workers write both in the same step, so a result without a sidecar means the Reading Confirmation block — the only evidence the worker read its inputs — was never produced. `validate-run.py` fails the run on this at Phase 7 either way (`validate_worker_results_audit`); checking it here spends the existing one-retry budget while the role can still be re-dispatched, instead of surfacing hours later when the worker session is gone.
|
|
165
165
|
- `okstra worker-audit-check --run-dir <runs/<task-type>/> --task-type <t> --seq <n> --worker <id>` exits 2 on a backticked `path:line` citation in the worker's result that has no matching Evidence read row in its audit sidecar. Run it the moment you collect each result. Phase 7 enforces the same rules from the same implementation (`okstra_ctl.worker_audit_ledger`), but by then the worker session is gone and the only remaining moves are editing the result yourself — which destroys the audit chain the ledger exists to provide — or ending the run `contract-violated`. While the session is alive, `SendMessage` to the worker so it corrects its own citation; that costs about a minute against a re-dispatch or a failed run.
|
|
166
166
|
|
|
167
|
-
The same audit check parses command evidence from canonical rows such as `- Evidence command: {"command":"npm run check","cwd":"<project-root>","exitCode":0,"outputSummary":"all checks passed"}`. Workers record only commands that produced or verified a conclusion, not exploratory `rg`, `ls`, or file-opening commands.
|
|
167
|
+
The same audit check parses command evidence from canonical rows such as `- Evidence command: {"command":"npm run check","cwd":"<project-root>","exitCode":0,"outputSummary":"all checks passed"}`. Workers record only commands that produced or verified a conclusion, not exploratory `rg`, `ls`, or file-opening commands. A malformed row is a contract failure returned by `okstra_ctl.worker_audit_ledger`; send the failure to the worker while its session is still available. Nothing scans these rows for secrets, so a row is never refused for how a setting is named — `AUTH_MODE=off` and `TOKEN_TTL=60` record verbatim. Do not tell a worker to drop or paraphrase a row on those grounds: a worker that cannot record the command it ran has no way to satisfy the evidence ledger that demands it.
|
|
168
168
|
|
|
169
169
|
**One-retry policy:**
|
|
170
170
|
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Impact Analysis Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: analysis-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: report-writer
|
|
11
|
+
count: 1
|
|
12
|
+
duty: report-writer
|
|
13
|
+
- role: verifier
|
|
14
|
+
count: 0
|
|
15
|
+
duty: reverification-worker
|
|
16
|
+
dynamic: true
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: assess the read-only impact of a proposed change, including preserved behavior, affected dependencies, and constraints that a later planning phase must resolve
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Error Analysis Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: diagnosis-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: critic
|
|
11
|
+
count: 0
|
|
12
|
+
optionalCount: 1
|
|
13
|
+
duty: scope-critic
|
|
14
|
+
- role: report-writer
|
|
15
|
+
count: 1
|
|
16
|
+
duty: report-writer
|
|
17
|
+
- role: verifier
|
|
18
|
+
count: 0
|
|
19
|
+
duty: reverification-worker
|
|
20
|
+
dynamic: true
|
|
21
|
+
```
|
|
22
|
+
|
|
3
23
|
- Purpose: analyse reported errors or incidents and identify likely causes, missing evidence, and validation paths
|
|
4
24
|
- Required workers:
|
|
5
25
|
- claude
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Feature Analysis Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: analysis-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: report-writer
|
|
11
|
+
count: 1
|
|
12
|
+
duty: report-writer
|
|
13
|
+
- role: verifier
|
|
14
|
+
count: 0
|
|
15
|
+
duty: reverification-worker
|
|
16
|
+
dynamic: true
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: analyse a confirmed feature target's behavior, rules, state changes, external calls, and test coverage scope without designing or changing an implementation
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Final Verification Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: verifier
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: acceptance-verifier
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: critic
|
|
11
|
+
count: 0
|
|
12
|
+
optionalCount: 1
|
|
13
|
+
duty: acceptance-critic
|
|
14
|
+
- role: report-writer
|
|
15
|
+
count: 1
|
|
16
|
+
duty: report-writer
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: analyse completed work and identify remaining defects, omissions, and delivery risk before final acceptance
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Implementation Option Selection Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: designer
|
|
6
|
+
count: 3
|
|
7
|
+
optionalCount: 2
|
|
8
|
+
duty: direction-selection-worker
|
|
9
|
+
minDistinctProviders: 3
|
|
10
|
+
- role: report-writer
|
|
11
|
+
count: 1
|
|
12
|
+
duty: report-writer
|
|
13
|
+
- role: verifier
|
|
14
|
+
count: 0
|
|
15
|
+
duty: reverification-worker
|
|
16
|
+
dynamic: true
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: compare feasible implementation directions before planning, preserving a read-only record of the evidence and trade-offs that selects the direction to plan
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Implementation Planning Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: planner
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: planning-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: critic
|
|
11
|
+
count: 0
|
|
12
|
+
optionalCount: 1
|
|
13
|
+
duty: acceptance-critic
|
|
14
|
+
- role: report-writer
|
|
15
|
+
count: 1
|
|
16
|
+
duty: report-writer
|
|
17
|
+
- role: verifier
|
|
18
|
+
count: 0
|
|
19
|
+
duty: reverification-worker
|
|
20
|
+
dynamic: true
|
|
21
|
+
```
|
|
22
|
+
|
|
3
23
|
- Purpose: turn an upstream-selected direction into an executable plan; legacy reruns may retain candidate comparison
|
|
4
24
|
- Required workers:
|
|
5
25
|
- claude
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Implementation Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: implementer
|
|
6
|
+
count: 1
|
|
7
|
+
duty: implementation-executor
|
|
8
|
+
- role: verifier
|
|
9
|
+
count: 2
|
|
10
|
+
optionalCount: 1
|
|
11
|
+
duty: implementation-verifier
|
|
12
|
+
minDistinctProviders: 2
|
|
13
|
+
- role: report-writer
|
|
14
|
+
count: 1
|
|
15
|
+
duty: report-writer
|
|
16
|
+
```
|
|
17
|
+
|
|
3
18
|
- Purpose: realise the approved `implementation-planning` deliverable as actual source changes, with cross-model verification, while keeping the run reversible
|
|
4
19
|
- **Run-level fixed cost:** the verifier set, Phase 5.5 convergence, and the Phase 6 report-writer run exactly once per implementation run, over this run's single stage diff — never once per step.
|
|
5
20
|
- **Fix run (profile carries a "Fix-Run Carry" block):** the executor's scope is the carried blocking findings plus the previous routing recommendation — it MUST NOT re-execute plan steps the previous run completed. Verifiers apply the "Fix-run incremental scope" section of `_implementation-verifier.md`; the report writer applies "Fix-run incremental authoring" in `report-writer.md`. The full validation-command re-run is NOT reduced.
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Improvement Discovery Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 3
|
|
7
|
+
optionalCount: 2
|
|
8
|
+
duty: discovery-worker
|
|
9
|
+
minDistinctProviders: 3
|
|
10
|
+
- role: report-writer
|
|
11
|
+
count: 1
|
|
12
|
+
duty: report-writer
|
|
13
|
+
- role: verifier
|
|
14
|
+
count: 0
|
|
15
|
+
duty: reverification-worker
|
|
16
|
+
dynamic: true
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: scan a codebase scope through a fixed lens whitelist and surface ranked improvement candidates with multi-worker consensus classification
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Project Analysis Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: analysis-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: report-writer
|
|
11
|
+
count: 1
|
|
12
|
+
duty: report-writer
|
|
13
|
+
- role: verifier
|
|
14
|
+
count: 0
|
|
15
|
+
duty: reverification-worker
|
|
16
|
+
dynamic: true
|
|
17
|
+
```
|
|
18
|
+
|
|
3
19
|
- Purpose: map a bounded project area so later work can navigate components, dependencies, entry points, repositories, and external integrations without changing the source
|
|
4
20
|
- Required workers:
|
|
5
21
|
- claude
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Release Handoff Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles: []
|
|
5
|
+
```
|
|
6
|
+
|
|
3
7
|
- Record the handoff shape in `releaseHandoff.handoffScope`: `mode` always, plus `stages`
|
|
4
8
|
and `collectorBranch` in stage-group mode. The report is the only place a reader learns
|
|
5
9
|
which stages shipped — the collector branch name does not say.
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Requirements Discovery Profile
|
|
2
2
|
|
|
3
|
+
```yaml
|
|
4
|
+
roles:
|
|
5
|
+
- role: analyser
|
|
6
|
+
count: 2
|
|
7
|
+
optionalCount: 3
|
|
8
|
+
duty: analysis-worker
|
|
9
|
+
minDistinctProviders: 2
|
|
10
|
+
- role: critic
|
|
11
|
+
count: 0
|
|
12
|
+
optionalCount: 1
|
|
13
|
+
duty: scope-critic
|
|
14
|
+
- role: report-writer
|
|
15
|
+
count: 1
|
|
16
|
+
duty: report-writer
|
|
17
|
+
- role: verifier
|
|
18
|
+
count: 0
|
|
19
|
+
duty: reverification-worker
|
|
20
|
+
dynamic: true
|
|
21
|
+
```
|
|
22
|
+
|
|
3
23
|
- Purpose: classify the work request, identify missing requirement evidence, and route the task to the safest next lifecycle phase before implementation starts
|
|
4
24
|
- Required workers:
|
|
5
25
|
- claude
|
|
@@ -480,6 +480,22 @@
|
|
|
480
480
|
"no": "아니오 — 단계별로 다시 입력"
|
|
481
481
|
}
|
|
482
482
|
},
|
|
483
|
+
"role_count": {
|
|
484
|
+
"label": "{role} 역할 인스턴스 수를 선택하세요 ({minimum}..{maximum}, 기본 {default})",
|
|
485
|
+
"echo_template": "role-count: {value}",
|
|
486
|
+
"options": {
|
|
487
|
+
"count": "{count}개{default_suffix}",
|
|
488
|
+
"default_suffix": " (기본)"
|
|
489
|
+
}
|
|
490
|
+
},
|
|
491
|
+
"role_model": {
|
|
492
|
+
"label": "{role} 역할 {ordinal}/{count} 인스턴스의 모델을 선택하세요",
|
|
493
|
+
"echo_template": "role-model: {value}",
|
|
494
|
+
"options": {
|
|
495
|
+
"model": "{model_ref} — {display}{default_suffix}",
|
|
496
|
+
"default_suffix": " (기본 후보)"
|
|
497
|
+
}
|
|
498
|
+
},
|
|
483
499
|
"defaults_or_custom": {
|
|
484
500
|
"label": "역할별 모델 선택 단계입니다 (참여 워커 구성을 바꾸는 게 아닙니다).\n이번 run 에서 모델을 고를 역할:\n{role_models}\n· 기본값으로 진행 — 위 추천 모델을 그대로 쓰고, directive·관련 task 없이 바로 넘어갑니다.\n· 커스터마이즈 — 위 역할별 모델을 직접 고르고, 추가 directive·관련 task 도 지정합니다.\n(추천 값은 runtime 기본값으로 해소됩니다. 분석에 참여하지 않는 역할은 위 목록에 나오지 않습니다 — 예: antigravity 는 implementation 의 executor 로 선택했을 때만 표시됩니다.)",
|
|
485
501
|
"echo_template": "customize: {value}",
|
|
@@ -587,6 +603,8 @@
|
|
|
587
603
|
},
|
|
588
604
|
"confirmation": {
|
|
589
605
|
"header": "선택 확인:",
|
|
606
|
+
"static_role": " static-role : {role}#{ordinal} / {model}",
|
|
607
|
+
"dynamic_role": " dynamic-role : {role} / reuse selected participant model",
|
|
590
608
|
"workers_implementation_default": " workers : (프로필 기본 — executor + verifier 2 + report-writer)",
|
|
591
609
|
"base_ref_stage_isolated": " base-ref : (stage 격리 — 의존 stage 기준으로 run 준비 시점에 자동 해소)",
|
|
592
610
|
"base_ref_reuse_task_dir": " base-ref : (기존 `{task_key}` 디렉터리 재사용 — 최초 base 유지)",
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from collections.abc import Mapping
|
|
5
5
|
|
|
6
6
|
from ... import dispatch_core
|
|
7
|
+
from ...domain.worker_exec import WorkerWriteCapability
|
|
7
8
|
from ...ports.worker_dispatch import WorkerDispatchPlan, WorkerDispatchRequest
|
|
8
9
|
|
|
9
10
|
|
|
@@ -17,6 +18,9 @@ class CliWrapperDispatchPort:
|
|
|
17
18
|
default_backend: str = dispatch_core.BACKEND_CLI_WRAPPER,
|
|
18
19
|
cli_wrapper_assignments_only: bool = False,
|
|
19
20
|
default_provider_by_worker_id: Mapping[str, str] | None = None,
|
|
21
|
+
worker_write_capability: WorkerWriteCapability = WorkerWriteCapability(
|
|
22
|
+
"none"
|
|
23
|
+
),
|
|
20
24
|
) -> None:
|
|
21
25
|
self._supported_worker_wrappers = supported_worker_wrappers or {}
|
|
22
26
|
self._unsupported_worker_label = unsupported_worker_label
|
|
@@ -26,6 +30,7 @@ class CliWrapperDispatchPort:
|
|
|
26
30
|
self._default_provider_by_worker_id = dict(
|
|
27
31
|
default_provider_by_worker_id or {}
|
|
28
32
|
)
|
|
33
|
+
self._worker_write_capability = worker_write_capability
|
|
29
34
|
|
|
30
35
|
def build_plan(self, request: WorkerDispatchRequest) -> WorkerDispatchPlan:
|
|
31
36
|
backend_plan = None
|
|
@@ -52,3 +57,6 @@ class CliWrapperDispatchPort:
|
|
|
52
57
|
backend_plan=backend_plan,
|
|
53
58
|
dispatch_mode="render-only",
|
|
54
59
|
)
|
|
60
|
+
|
|
61
|
+
def worker_write_capability(self) -> WorkerWriteCapability:
|
|
62
|
+
return self._worker_write_capability
|
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
from collections.abc import Mapping
|
|
5
5
|
|
|
6
6
|
from ... import dispatch_core
|
|
7
|
+
from ...domain.worker_exec import WorkerWriteCapability
|
|
7
8
|
from ...ports.worker_dispatch import (
|
|
8
9
|
WorkerDispatchPlan,
|
|
9
10
|
WorkerDispatchPort,
|
|
@@ -25,6 +26,9 @@ class CmuxDispatchPort:
|
|
|
25
26
|
required_lead_runtime: str | None = None,
|
|
26
27
|
cli_wrapper_assignments_only: bool = False,
|
|
27
28
|
default_provider_by_worker_id: Mapping[str, str] | None = None,
|
|
29
|
+
worker_write_capability: WorkerWriteCapability = WorkerWriteCapability(
|
|
30
|
+
"none"
|
|
31
|
+
),
|
|
28
32
|
) -> None:
|
|
29
33
|
self._backend_port = CliWrapperDispatchPort(
|
|
30
34
|
supported_worker_wrappers=supported_worker_wrappers,
|
|
@@ -33,6 +37,7 @@ class CmuxDispatchPort:
|
|
|
33
37
|
default_backend=dispatch_core.BACKEND_CMUX_PANE,
|
|
34
38
|
cli_wrapper_assignments_only=cli_wrapper_assignments_only,
|
|
35
39
|
default_provider_by_worker_id=default_provider_by_worker_id,
|
|
40
|
+
worker_write_capability=worker_write_capability,
|
|
36
41
|
)
|
|
37
42
|
|
|
38
43
|
def build_plan(self, request: WorkerDispatchRequest) -> WorkerDispatchPlan:
|
|
@@ -46,6 +51,9 @@ class CmuxDispatchPort:
|
|
|
46
51
|
relay_contract=CMUX_RELAY_CONTRACT,
|
|
47
52
|
)
|
|
48
53
|
|
|
54
|
+
def worker_write_capability(self) -> WorkerWriteCapability:
|
|
55
|
+
return self._backend_port.worker_write_capability()
|
|
56
|
+
|
|
49
57
|
|
|
50
58
|
def dispatch_port_for_terminal_backend(
|
|
51
59
|
terminal_backend: str,
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
"""Native host-team dispatch planning."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
from ...domain.worker_exec import WorkerWriteCapability
|
|
4
5
|
from ...ports.worker_dispatch import WorkerDispatchPlan, WorkerDispatchRequest
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
class NativeTeamDispatchPort:
|
|
9
|
+
def __init__(
|
|
10
|
+
self,
|
|
11
|
+
*,
|
|
12
|
+
worker_write_capability: WorkerWriteCapability = WorkerWriteCapability(
|
|
13
|
+
"none"
|
|
14
|
+
),
|
|
15
|
+
) -> None:
|
|
16
|
+
self._worker_write_capability = worker_write_capability
|
|
17
|
+
|
|
8
18
|
def build_plan(self, request: WorkerDispatchRequest) -> WorkerDispatchPlan:
|
|
9
19
|
return WorkerDispatchPlan(
|
|
10
20
|
mode="native-team",
|
|
11
21
|
request=request,
|
|
12
22
|
dispatch_mode="team",
|
|
13
23
|
)
|
|
24
|
+
|
|
25
|
+
def worker_write_capability(self) -> WorkerWriteCapability:
|
|
26
|
+
return self._worker_write_capability
|
|
@@ -60,7 +60,7 @@ def create_adapter(
|
|
|
60
60
|
detector=no_automatic_claim,
|
|
61
61
|
provider_registry=provider_registry,
|
|
62
62
|
host_model_port=host_model_port or NativeExecutionValueHostModelBindingPort(
|
|
63
|
-
DESCRIPTOR.id,
|
|
64
|
-
DESCRIPTOR.native_provider_id,
|
|
63
|
+
host_runtime=DESCRIPTOR.id,
|
|
64
|
+
native_provider=DESCRIPTOR.native_provider_id,
|
|
65
65
|
),
|
|
66
66
|
)
|
|
@@ -15,6 +15,7 @@ from okstra_ctl.adapters.hosts.capability_adapter import (
|
|
|
15
15
|
numbered_interaction_port,
|
|
16
16
|
)
|
|
17
17
|
from okstra_ctl.domain.host import HostClaim, HostDescriptor, HostResolutionContext
|
|
18
|
+
from okstra_ctl.domain.provider import HostModelBinding
|
|
18
19
|
from okstra_ctl.ports.host_model import (
|
|
19
20
|
HostModelBindingError,
|
|
20
21
|
HostModelBindingRequest,
|
|
@@ -42,27 +43,46 @@ DESCRIPTOR = HostDescriptor(
|
|
|
42
43
|
class ClaudeFamilyHostModelBindingPort:
|
|
43
44
|
_FAMILIES = ("fable", "opus", "sonnet", "haiku")
|
|
44
45
|
|
|
45
|
-
def resolve(self, request: HostModelBindingRequest) ->
|
|
46
|
+
def resolve(self, request: HostModelBindingRequest) -> HostModelBinding:
|
|
46
47
|
if request.runner == "cli-wrapper":
|
|
47
|
-
return
|
|
48
|
+
return HostModelBinding(
|
|
49
|
+
runner=request.runner,
|
|
50
|
+
catalog_execution_value=request.model_execution_value,
|
|
51
|
+
resolved_execution_value=request.execution_value,
|
|
52
|
+
host_model_value=None,
|
|
53
|
+
binding_fidelity="exact",
|
|
54
|
+
worker_write_capability=request.worker_write_capability,
|
|
55
|
+
)
|
|
48
56
|
if (
|
|
49
57
|
request.runner != "native-session"
|
|
50
58
|
or request.host_runtime != DESCRIPTOR.id
|
|
51
59
|
or request.provider != DESCRIPTOR.native_provider_id
|
|
52
60
|
):
|
|
53
61
|
raise self._unsupported(request)
|
|
54
|
-
segments = request.
|
|
62
|
+
segments = request.execution_value.lower().split("-")
|
|
55
63
|
matches = [family for family in self._FAMILIES if family in segments]
|
|
56
64
|
if len(matches) != 1:
|
|
57
65
|
raise self._unsupported(request)
|
|
58
|
-
|
|
66
|
+
if request.version_kind == "pinned":
|
|
67
|
+
raise HostModelBindingError(
|
|
68
|
+
"exact binding unavailable: "
|
|
69
|
+
f"host={request.host_runtime!r}, model={request.model_ref!r}"
|
|
70
|
+
)
|
|
71
|
+
return HostModelBinding(
|
|
72
|
+
runner=request.runner,
|
|
73
|
+
catalog_execution_value=request.model_execution_value,
|
|
74
|
+
resolved_execution_value=request.execution_value,
|
|
75
|
+
host_model_value=matches[0],
|
|
76
|
+
binding_fidelity="channel",
|
|
77
|
+
worker_write_capability=request.worker_write_capability,
|
|
78
|
+
)
|
|
59
79
|
|
|
60
80
|
@staticmethod
|
|
61
81
|
def _unsupported(request: HostModelBindingRequest) -> HostModelBindingError:
|
|
62
82
|
return HostModelBindingError(
|
|
63
83
|
"unsupported host model: "
|
|
64
84
|
f"host={request.host_runtime!r}, provider={request.provider!r}, "
|
|
65
|
-
f"model={request.
|
|
85
|
+
f"model={request.execution_value!r}"
|
|
66
86
|
)
|
|
67
87
|
|
|
68
88
|
|
|
@@ -83,7 +83,7 @@ def create_adapter(
|
|
|
83
83
|
provider_registry=provider_registry,
|
|
84
84
|
readiness_probe=_okstra_home_write_checks,
|
|
85
85
|
host_model_port=host_model_port or NativeExecutionValueHostModelBindingPort(
|
|
86
|
-
DESCRIPTOR.id,
|
|
87
|
-
DESCRIPTOR.native_provider_id,
|
|
86
|
+
host_runtime=DESCRIPTOR.id,
|
|
87
|
+
native_provider=DESCRIPTOR.native_provider_id,
|
|
88
88
|
),
|
|
89
89
|
)
|
|
@@ -13,6 +13,7 @@ from okstra_ctl.adapters.hosts.capability_adapter import (
|
|
|
13
13
|
numbered_interaction_port,
|
|
14
14
|
)
|
|
15
15
|
from okstra_ctl.domain.host import HostClaim, HostDescriptor, HostResolutionContext
|
|
16
|
+
from okstra_ctl.ports.host_model import FailClosedHostModelBindingPort
|
|
16
17
|
from okstra_ctl.registry.provider_registry import ProviderRegistry
|
|
17
18
|
|
|
18
19
|
|
|
@@ -70,5 +71,7 @@ def create_adapter(
|
|
|
70
71
|
supported_functions=INTERACTION_FUNCTIONS,
|
|
71
72
|
detector=_detect_tmux,
|
|
72
73
|
provider_registry=provider_registry,
|
|
73
|
-
host_model_port=
|
|
74
|
+
host_model_port=(
|
|
75
|
+
host_model_port or FailClosedHostModelBindingPort(DESCRIPTOR.id)
|
|
76
|
+
),
|
|
74
77
|
)
|
|
@@ -63,7 +63,7 @@ def create_adapter(
|
|
|
63
63
|
detector=no_automatic_claim,
|
|
64
64
|
provider_registry=provider_registry,
|
|
65
65
|
host_model_port=host_model_port or NativeExecutionValueHostModelBindingPort(
|
|
66
|
-
DESCRIPTOR.id,
|
|
67
|
-
DESCRIPTOR.native_provider_id,
|
|
66
|
+
host_runtime=DESCRIPTOR.id,
|
|
67
|
+
native_provider=DESCRIPTOR.native_provider_id,
|
|
68
68
|
),
|
|
69
69
|
)
|
|
@@ -63,7 +63,7 @@ def create_adapter(
|
|
|
63
63
|
detector=no_automatic_claim,
|
|
64
64
|
provider_registry=provider_registry,
|
|
65
65
|
host_model_port=host_model_port or NativeExecutionValueHostModelBindingPort(
|
|
66
|
-
DESCRIPTOR.id,
|
|
67
|
-
DESCRIPTOR.native_provider_id,
|
|
66
|
+
host_runtime=DESCRIPTOR.id,
|
|
67
|
+
native_provider=DESCRIPTOR.native_provider_id,
|
|
68
68
|
),
|
|
69
69
|
)
|