okstra 0.235.0 → 0.236.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.
Files changed (68) hide show
  1. package/dist/lib/host-registry-client.d.mts +9 -2
  2. package/dist/lib/host-registry-client.mjs +29 -3
  3. package/dist/lib/host-registry-client.mjs.map +1 -1
  4. package/dist/lib/runtime-payload.mjs +1 -0
  5. package/dist/lib/runtime-payload.mjs.map +1 -1
  6. package/docs/architecture.md +1 -1
  7. package/docs/cli.md +6 -0
  8. package/package.json +1 -1
  9. package/runtime/BUILD.json +2 -2
  10. package/runtime/bin/lib/okstra/usage.sh +8 -8
  11. package/runtime/bin/okstra-qwen-exec.sh +5 -0
  12. package/runtime/prompts/lead/convergence.md +4 -1
  13. package/runtime/prompts/lead/okstra-lead-contract.md +3 -3
  14. package/runtime/prompts/profiles/_common-contract.md +10 -1
  15. package/runtime/prompts/wizard/prompts.ko.json +16 -4
  16. package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +10 -2
  17. package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +16 -1
  18. package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +20 -5
  19. package/runtime/python/okstra_ctl/adapters/providers/kimi/adapter.py +17 -9
  20. package/runtime/python/okstra_ctl/adapters/providers/qwen/adapter.py +88 -0
  21. package/runtime/python/okstra_ctl/adapters/providers/qwen/manifest.json +1 -0
  22. package/runtime/python/okstra_ctl/adapters/providers/qwen/settings.json +12 -0
  23. package/runtime/python/okstra_ctl/adapters/providers/zai/adapter.py +8 -2
  24. package/runtime/python/okstra_ctl/business_flow/contracts.py +11 -0
  25. package/runtime/python/okstra_ctl/business_flow/engine.py +90 -32
  26. package/runtime/python/okstra_ctl/business_flow/hooks.py +4 -2
  27. package/runtime/python/okstra_ctl/business_flow/source.py +39 -7
  28. package/runtime/python/okstra_ctl/business_flow/store.py +94 -28
  29. package/runtime/python/okstra_ctl/convergence.py +95 -5
  30. package/runtime/python/okstra_ctl/convergence_critic_verify_prompt.py +11 -10
  31. package/runtime/python/okstra_ctl/convergence_engine.py +30 -15
  32. package/runtime/python/okstra_ctl/convergence_reverify_prompt.py +9 -2
  33. package/runtime/python/okstra_ctl/coverage_census.py +75 -12
  34. package/runtime/python/okstra_ctl/entrypoints/hosts.py +1 -1
  35. package/runtime/python/okstra_ctl/lead_progress.py +1 -1
  36. package/runtime/python/okstra_ctl/model_discovery.py +1 -1
  37. package/runtime/python/okstra_ctl/models.py +2 -2
  38. package/runtime/python/okstra_ctl/phases/discussion/profile.md +2 -2
  39. package/runtime/python/okstra_ctl/phases/error_analysis/profile.md +1 -1
  40. package/runtime/python/okstra_ctl/phases/implementation_option_selection/profile.md +1 -1
  41. package/runtime/python/okstra_ctl/phases/implementation_planning/authoring.py +2 -1
  42. package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +1 -1
  43. package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +3 -3
  44. package/runtime/python/okstra_ctl/phases/requirements_discovery/profile.md +5 -5
  45. package/runtime/python/okstra_ctl/registry/provider_registry.py +1 -1
  46. package/runtime/python/okstra_ctl/render_final_report.py +1 -1
  47. package/runtime/python/okstra_ctl/run.py +1 -1
  48. package/runtime/python/okstra_ctl/run_context.py +18 -3
  49. package/runtime/python/okstra_ctl/schema_excerpt.py +14 -9
  50. package/runtime/python/okstra_ctl/verdict_blocks.py +7 -2
  51. package/runtime/python/okstra_ctl/wizard/engine.py +28 -1
  52. package/runtime/python/okstra_ctl/wizard/ids.py +8 -0
  53. package/runtime/python/okstra_ctl/wizard/picker_navigation.py +64 -2
  54. package/runtime/python/okstra_ctl/wizard/roles.py +194 -45
  55. package/runtime/python/okstra_ctl/wizard/sources.py +10 -1
  56. package/runtime/python/okstra_ctl/wizard/state.py +67 -20
  57. package/runtime/python/okstra_ctl/wizard/steps_roles.py +6 -3
  58. package/runtime/python/okstra_ctl/wizard/worker_settings.py +129 -25
  59. package/runtime/python/okstra_ctl/worker_audit_ledger.py +44 -8
  60. package/runtime/python/okstra_ctl/worker_prompt_body.py +26 -2
  61. package/runtime/python/okstra_ctl/worker_prompt_headers.py +12 -9
  62. package/runtime/python/okstra_token_usage/claude.py +5 -1
  63. package/runtime/python/okstra_token_usage/collect.py +3 -3
  64. package/runtime/python/okstra_token_usage/pricing.py +1 -0
  65. package/runtime/skills/_fragments/wizard-relay-protocol.md +1 -1
  66. package/runtime/skills/okstra-discussion/SKILL.md +1 -1
  67. package/runtime/skills/okstra-run/SKILL.md +2 -2
  68. package/runtime/templates/worker-prompt-preamble.md +12 -2
@@ -1,4 +1,4 @@
1
- import type { HostProbeOptions, HostReadiness, HostRegistryCatalog, HostResolveOptions, HostRuntimeResolution, PythonRunner } from "./types.mjs";
1
+ import type { HostProbeOptions, HostReadiness, HostRegistryCatalog, HostResolveOptions, HostRuntimeResolution, PythonRunner, RuntimeEnvironment } from "./types.mjs";
2
2
  export declare const RUNTIME_AUTO = "auto";
3
3
  export declare class HostRegistryClientError extends Error {
4
4
  constructor(message: string);
@@ -15,11 +15,18 @@ export declare function loadHostCatalog(): Promise<HostRegistryCatalog>;
15
15
  export declare function resolveHostRuntime(options: HostResolveOptions): Promise<HostRuntimeResolution>;
16
16
  export declare function probeHost(options: HostProbeOptions): Promise<HostReadiness>;
17
17
  export declare function resolveRuntime({ requestedRuntime, command, env, capabilities, }?: HostResolveOptions): Promise<HostRuntimeResolution>;
18
- export declare function checkRuntimeReadiness({ runtime, projectRoot, homeDir, hostRegistryClient, }: {
18
+ /**
19
+ * Readiness of the host a skill names. `auto` is resolved the way `install`
20
+ * resolves it before the host is probed; an unresolved `auto` is not ready,
21
+ * with the resolver's reason as the blocking check.
22
+ */
23
+ export declare function checkRuntimeReadiness({ runtime, projectRoot, homeDir, env, hostRegistryClient, }: {
19
24
  readonly runtime?: string | undefined;
20
25
  readonly projectRoot: string;
21
26
  readonly homeDir?: string | undefined;
27
+ readonly env?: RuntimeEnvironment;
22
28
  readonly hostRegistryClient?: {
23
29
  readonly probeHost: (options: HostProbeOptions) => Promise<HostReadiness>;
30
+ readonly resolveRuntime: (options: HostResolveOptions) => Promise<HostRuntimeResolution>;
24
31
  };
25
32
  }): Promise<HostReadiness>;
@@ -139,11 +139,37 @@ export async function resolveRuntime({ requestedRuntime = RUNTIME_AUTO, command
139
139
  return failedResolution(request, error);
140
140
  }
141
141
  }
142
- export async function checkRuntimeReadiness({ runtime, projectRoot, homeDir = homedir(), hostRegistryClient = { probeHost }, }) {
142
+ /**
143
+ * Readiness of the host a skill names. `auto` is resolved the way `install`
144
+ * resolves it before the host is probed; an unresolved `auto` is not ready,
145
+ * with the resolver's reason as the blocking check.
146
+ */
147
+ export async function checkRuntimeReadiness({ runtime, projectRoot, homeDir = homedir(), env = process.env, hostRegistryClient = { probeHost, resolveRuntime }, }) {
143
148
  if (!runtime)
144
- return { runtime: "auto", status: "ready", checks: [] };
149
+ return { runtime: RUNTIME_AUTO, status: "ready", checks: [] };
150
+ let hostRuntime = runtime;
151
+ if (runtime === RUNTIME_AUTO) {
152
+ const resolution = await hostRegistryClient.resolveRuntime({
153
+ requestedRuntime: RUNTIME_AUTO,
154
+ command: "preflight",
155
+ env,
156
+ });
157
+ if (!resolution.ok || !resolution.resolvedRuntime) {
158
+ return {
159
+ runtime: RUNTIME_AUTO,
160
+ status: "unknown",
161
+ checks: [{
162
+ id: "host_resolution",
163
+ status: "required",
164
+ action: "rerun with --runtime <host-id> naming the host this session runs in",
165
+ reason: resolution.reason,
166
+ }],
167
+ };
168
+ }
169
+ hostRuntime = resolution.resolvedRuntime;
170
+ }
145
171
  return await hostRegistryClient.probeHost({
146
- hostRuntime: runtime,
172
+ hostRuntime,
147
173
  entryMode: "current-session",
148
174
  projectRoot,
149
175
  homeDir,
@@ -1 +1 @@
1
- {"version":3,"file":"host-registry-client.mjs","sourceRoot":"","sources":["../../src/lib/host-registry-client.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SA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G,GAAG,OAAO,CAAC,GAAG,EACjB,kBAAkB,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,GAUnD;IACC,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC5E,IAAI,WAAW,GAAG,OAAO,CAAC;IAC1B,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;QAC7B,MAAM,UAAU,GAAG,MAAM,kBAAkB,CAAC,cAAc,CAAC;YACzD,gBAAgB,EAAE,YAAY;YAC9B,OAAO,EAAE,WAAW;YACpB,GAAG;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YAClD,OAAO;gBACL,OAAO,EAAE,YAAY;gBACrB,MAAM,EAAE,SAAS;gBACjB,MAAM,EAAE,CAAC;wBACP,EAAE,EAAE,iBAAiB;wBACrB,MAAM,EAAE,UAAU;wBAClB,MAAM,EAAE,qEAAqE;wBAC7E,MAAM,EAAE,UAAU,CAAC,MAAM;qBAC1B,CAAC;aACH,CAAC;QACJ,CAAC;QACD,WAAW,GAAG,UAAU,CAAC,eAAe,CAAC;IAC3C,CAAC;IACD,OAAO,MAAM,kBAAkB,CAAC,SAAS,CAAC;QACxC,WAAW;QACX,SAAS,EAAE,iBAAiB;QAC5B,WAAW;QACX,OAAO;QACP,kBAAkB,EAAE,CAAC,gBAAgB,CAAC;KACvC,CAAC,CAAC;AACL,CAAC"}
@@ -16,6 +16,7 @@ export const RUNTIME_BIN_FILES = Object.freeze([
16
16
  { name: "okstra-grok-exec.sh" },
17
17
  { name: "okstra-kimi-exec.sh" },
18
18
  { name: "okstra-zai-exec.sh" },
19
+ { name: "okstra-qwen-exec.sh" },
19
20
  { name: "okstra-provider-exec.py" },
20
21
  // 진입 스크립트들이 import 하는 경로 부트스트랩. 이들과 같은
21
22
  // 디렉터리에 있어야 `sys.path` 를 고치기 전에 import 된다.
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-payload.mjs","sourceRoot":"","sources":["../../src/lib/runtime-payload.mts"],"names":[],"mappings":"AAAA,uBAAuB;AACvB,EAAE;AACF,oCAAoC;AACpC,0DAA0D;AAC1D,iEAAiE;AACjE,+CAA+C;AAC/C,kDAAkD;AAClD,EAAE;AACF,kCAAkC;AAalC,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAA8B,MAAM,CAAC,MAAM,CAAC;IACxE,EAAE,IAAI,EAAE,WAAW,EAAE;IACrB,EAAE,IAAI,EAAE,sBAAsB,EAAE;IAChC,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACjC,EAAE,IAAI,EAAE,4BAA4B,EAAE;IACtC,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC/B,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC/B,EAAE,IAAI,EAAE,oBAAoB,EAAE;IAC9B,EAAE,IAAI,EAAE,yBAAyB,EAAE;IACnC,uCAAuC;IACvC,2CAA2C;IAC3C,EAAE,IAAI,EAAE,qBAAqB,EAAE;IAC/B,EAAE,IAAI,EAAE,wBAAwB,EAAE;IAClC,EAAE,IAAI,EAAE,4BAA4B,EAAE;IACtC,EAAE,IAAI,EAAE,0BAA0B,EAAE;IACpC,EAAE,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,IAAI,EAAE;IAC7C,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,IAAI,EAAE;IACvD,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,IAAI,EAAE;IACvD,EAAE,IAAI,EAAE,+BAA+B,EAAE,MAAM,EAAE,IAAI,EAAE;IACvD,EAAE,IAAI,EAAE,2BAA2B,EAAE,MAAM,EAAE,IAAI,EAAE;IACnD,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,EAAE,IAAI,EAAE;CAChD,CAAC,CAAC;AAEH,0DAA0D;A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CAAC;IACtB,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,YAAY,EAAE,YAAY,CAAC;IAC5B,CAAC,QAAQ,EAAE,QAAQ,CAAC;CACZ,CAAC,CAAC;AAEZ,uDAAuD;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAsB,MAAM,CAAC,MAAM,CAClE,iBAAiB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAC7C,CAAC;AAEF,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAsB,MAAM,CAAC,MAAM,CACjE,iBAAiB,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAC7E,CAAC"}
@@ -333,7 +333,7 @@ The standard `okstra` workflow applies the following team contract consistently
333
333
  - The current host-native provider owns the synthesis-only lead session: Claude on Claude Code, Codex on Codex.
334
334
  - Every selected worker comes from the profile roster and provider capability registry. The default analysis policy remains Claude + Codex + a report writer; Antigravity, Grok, and Kimi are attempted only when the profile and resolved roster include them.
335
335
  - `Report writer worker` focuses on report structure and evidence organization, while the host-native lead remains the final synthesis owner. Claude is the default report-writer provider; Codex may be selected explicitly.
336
- - Model defaults are provider and functional-role policy. Fallbacks include Claude lead/analyser=`opus`, Codex lead/analyser=`gpt-6.1-sol`, Claude report writer=`sonnet`, Antigravity=`gemini-3.1-pro`, Grok analyser=`grok-4.7`, and Kimi analyser=`kimi-k3`. Selectable catalog models may be assigned to every role.
336
+ - Model defaults are provider and functional-role policy. Fallbacks include Claude lead/analyser=`opus`, Codex lead/analyser=`gpt-6.2-sol`, Claude report writer=`sonnet`, Antigravity=`gemini-3.1-pro`, Grok analyser=`grok-4.7`, and Kimi analyser=`kimi-k3`. Selectable catalog models may be assigned to every role.
337
337
  - Before the final judgment, each required role in the current run's worker roster must have either a result or an explicit terminal status (`completed`, `timeout`, `error`, `not-run`).
338
338
  - Every attempted worker (`completed`, `timeout`, `error`) must have an assigned worker prompt history file under the current run's `prompts/` directory.
339
339
  - Worker timing begins at the atomic transition to `in-progress`, which records `workers[].startedAt` in `team-state.json`; prompt creation time is not a dispatch proxy. `okstra worker-state transition` and both dispatch adapters share `dispatch_state.transition_worker_status`, while `okstra worker-liveness --team-state ... --worker ...` reads that timestamp as the launch-grace authority for both probe kinds — the in-process audit sidecar is reused on re-dispatch, so only `startedAt` separates the previous attempt's last heartbeat from this dispatch's silence.
package/docs/cli.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # okstra-run 입력 형식과 사용량 정책
2
2
 
3
+ ## 작업자 모델과 인증
4
+
5
+ 새 선택에는 Codex GPT-6.1 Terra, Kimi K3.1 Pro·Highspeed, Antigravity Gemini 4 Carbon·Hydrogen, Z.ai GLM-5.3 FlashX·Legal, Qwen4-Max가 포함된다. Kimi 기본값은 `k3.1-pro`, Antigravity 기본값은 `gemini-4-argon`이다. 구형 `kimi-k3`·`gemini-3.1-pro`는 새 선택에서 제외하지만 과거 실행의 검증과 정산 정보는 보존한다. 저장된 새 실행 설정에 구형 모델이 있으면 현재 모델로 다시 선택한다. Gemini와 Codex는 기존 계정별 가용성 검사를 사용하며 다른 모델로 자동 대체하지 않는다. FlashX 계열은 일반 API용이고 GLM Coding Plan에는 제공되지 않는다.
6
+
7
+ Qwen 작업자는 `qwen/qwen4-max`로 선택한다. `qwen` 실행 파일과 해당 지역의 `DASHSCOPE_API_KEY`, `OKSTRA_QWEN_BASE_URL`을 실행 환경에 준비한다. 주소는 Model Studio 소유 호스트의 HTTPS OpenAI 호환 기본 주소(`/compatible-mode/v1`)이며 개인 CLI의 로컬 주소를 상속하지 않는다. 워크스페이스·지역별 `*.maas.aliyuncs.com` 주소와 기존 `dashscope.aliyuncs.com`·`dashscope-intl.aliyuncs.com`·`cn-hongkong.dashscope.aliyuncs.com` 주소를 허용하며 사용자 정보·쿼리·프래그먼트·비표준 포트를 거부한다. 키는 명령 인자가 아닌 자식 환경으로 전달한다. 자식 프로세스에는 배포된 시스템 공급자 설정을 적용해 개인·프로젝트의 같은 모델 설정보다 주소·인증 출처를 우선한다. Qwen은 작업자 역할만 지원하며 사용자 홈에 설치한 `qwen-local`과 별도다. Qwen Code의 `message.model`은 요청 설정의 복사이므로 실제 응답 모델로 증명하지 않고 미확인으로 남긴다. 최종 이벤트에서 관측한 토큰 수는 캐시 읽기와 분리해 수집한다. 지역별 Qwen 단가와 신규 Gemini 단가는 추정해 넣지 않으므로 비용은 미확인으로 남을 수 있다. 실제 유료 모델 호출과 계정 권한은 별도로 확인해야 한다.
8
+
3
9
  새 실행은 run manifest에 `reportAuthoringFormat: "json-v1"`과 `usageAccountingPolicy: "advisory"`를 기록한다. 작성자 입력은 `reportNarrativePath`의 `.json` 파일에 허용된 작성자 소유 값만 쓰며, 설명 문자열에는 Markdown을 사용할 수 있다. 최종 보고서의 `schemaVersion`과 `reportContractVersion`은 `3.0`을 유지한다. 필드가 없는 기존 실행은 `markdown-v1`·`strict`로 읽으며, 알 수 없는 값은 거부한다.
4
10
 
5
11
  `json-v1` 작성자 입력은 UTF-8 2,000,000바이트, 루트를 0으로 세고 스칼라 값을 포함한 깊이 32까지 받는다. 소유권 검사에서 방문한 필드 경로의 누적 길이는 64,000,000문자까지 허용한다. 초과·재귀 오류는 작성자 입력 결함으로 처리하며, 교정 결과도 같은 크기 제한을 통과한 뒤 게시한다. 보존된 교정 기준은 worker 결과 디렉터리의 일반 파일이어야 하고 심볼릭 링크는 거부한다. 이 한도는 작성자 JSON의 판독·교정 계약이며 최종 `data.json`의 크기 제한은 아니다.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.235.0",
3
+ "version": "0.236.0",
4
4
  "description": "Host-aware multi-provider cross-verification orchestrator runtime and agent skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.235.0",
3
- "builtAt": "2026-11-17T05:54:24.676Z",
2
+ "package": "0.236.0",
3
+ "builtAt": "2026-11-19T05:54:13.362Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -103,13 +103,13 @@ options:
103
103
  --role-count Instance count for one profile role (repeatable), e.g. analyser=1.
104
104
  Allowed range comes from the phase profile.json; default is its recommended count.
105
105
  A single analyser runs without cross-model verification.
106
- --role-model Model for the next instance of a role (repeatable), e.g. analyser=codex/gpt-6.1-sol.
106
+ --role-model Model for the next instance of a role (repeatable), e.g. analyser=codex/gpt-6.2-sol.
107
107
  --lead-provider Compatibility assertion for the lead assignment. Must match the selected host adapter's native provider.
108
108
  --lead-model Model for the host-native lead. Default: the selected provider's lead policy.
109
109
  --claude-model Model for Claude worker. Default: OKSTRA_DEFAULT_CLAUDE_MODEL or opus
110
- --codex-model Model for Codex worker. Default: OKSTRA_DEFAULT_CODEX_MODEL or gpt-6.1-sol
111
- --antigravity-model Model for Antigravity worker. Default: OKSTRA_DEFAULT_ANTIGRAVITY_MODEL or gemini-3.1-pro
112
- --worker-model Provider-qualified worker override CSV, e.g. grok=grok-4.7,kimi=kimi-k3.
110
+ --codex-model Model for Codex worker. Default: OKSTRA_DEFAULT_CODEX_MODEL or gpt-6.2-sol
111
+ --antigravity-model Model for Antigravity worker. Default: OKSTRA_DEFAULT_ANTIGRAVITY_MODEL or gemini-4-argon
112
+ --worker-model Provider-qualified worker override CSV, e.g. grok=grok-4.7,kimi=k3.1-pro.
113
113
  --report-writer-provider
114
114
  Provider for report writer. Supported: claude, codex. Default: claude.
115
115
  --report-writer-model
@@ -140,13 +140,13 @@ options:
140
140
  -h, --help Show this help.
141
141
 
142
142
  model defaults:
143
- Host-native lead: provider policy (Claude default: opus; Codex default: gpt-6.1-sol)
143
+ Host-native lead: provider policy (Claude default: opus; Codex default: gpt-6.2-sol)
144
144
  Report writer worker: selected provider policy (Claude default: sonnet)
145
145
  Claude worker: OKSTRA_DEFAULT_CLAUDE_MODEL or opus
146
- Codex worker: OKSTRA_DEFAULT_CODEX_MODEL or gpt-6.1-sol
147
- Antigravity worker: OKSTRA_DEFAULT_ANTIGRAVITY_MODEL or gemini-3.1-pro
146
+ Codex worker: OKSTRA_DEFAULT_CODEX_MODEL or gpt-6.2-sol
147
+ Antigravity worker: OKSTRA_DEFAULT_ANTIGRAVITY_MODEL or gemini-4-argon
148
148
  Grok worker: grok-4.7
149
- Kimi worker: kimi-k3
149
+ Kimi worker: k3.1-pro
150
150
  Implementation executor: OKSTRA_DEFAULT_EXECUTOR or claude (one of: claude | codex | antigravity | grok | kimi)
151
151
 
152
152
  output:
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
5
+ exec python3 "$script_dir/okstra-provider-exec.py" qwen "$@"
@@ -453,11 +453,14 @@ re-read the task brief, instruction-set, or report template.
453
453
  **Explanation** (required for every verdict, SURVIVES included): <2-3 sentences; for
454
454
  SURVIVES say what you attacked and why the attack failed; for counter-evidence include
455
455
  the file:line you found>
456
+ **Opened**: <every file you opened for this finding, as path:line, comma-separated>
456
457
 
457
458
  ### F-002
458
459
  ...
459
460
  ```
460
461
 
462
+ A SURVIVES, SURVIVES-WITH-CAVEAT or burden-not-met vote whose `**Opened**` line names none of the files in the finding's `originEvidence` is collected as `unverifiable`, with the reason prefixed to its explanation. **Enforced:** `okstra convergence collect-results` reads `originEvidence` from the `convergence-work-<suffix>.json` beside the round plan (`okstra_ctl.convergence._grounded_vote`), tested by `tests/verification/test_convergence_collect_results.py`. Critic-gap and acceptance votes are not collected there and are not checked.
463
+
461
464
  When persisting votes, map SURVIVES→`agree`, SURVIVES-WITH-CAVEAT→`supplement`, REFUTED→`disagree`, and UNVERIFIABLE→`unverifiable`; copy the stated Basis into `votes.<worker>.disagreeBasis` (null for non-REFUTED verdicts). Every vote requires a non-empty `explanation`.
462
465
 
463
466
  UNVERIFIABLE is **not** `verification-error`. A verifier that opened the evidence and could not check it participated in the round; a `verification-error` is a verifier that failed to answer. The classifier counts only non-error votes, so folding the two shrinks the participating roster without saying so — a round where one analyser answers UNVERIFIABLE throughout would read as a two-way cross-check while reporting three voters. **Enforced:** `okstra convergence collect-results` applies this mapping (`okstra_ctl.verdict_blocks.ADVERSARIAL_VERDICTS`); do not transcribe votes by hand.
@@ -630,7 +633,7 @@ above the Round 0 list, and the lead pastes the output whole.
630
633
  critic sets `duplicateOf` to that finding's id (`schemas/convergence-critic-results-v1.0.schema.json` `$defs.Candidate`). A restated finding costs a whole gap-verification round to reject; a declared duplicate costs none — it is recorded in the ledger, never dispatched, and counted in `config.critic.gapsDuplicate`. **Enforced:** `okstra convergence apply-critic-gaps` rejects a `duplicateOf` that names no finding the state carries, and rejects a duplicate row carrying votes.
631
634
 
632
635
  ### Gap verification (1 adversarial reverify round)
633
- Each critic gap enters the verification queue as a finding with `originWorker = "<provider>-critic"` and `source = "critic"`, except a gap the critic declared `duplicateOf` — that one is recorded and never dispatched. The lead runs ONE adversarial reverify round (§"Adversarial Verification Mode" classifier) in which **each gap is verified by exactly one Phase 4 analyser**: walk the analyser roster in `criticVerification.analyserRoster` order and assign gap *i* to `roster[i % len(roster)]`, then dispatch each assigned analyser once with its own gaps. Rejecting a gap costs the same as accepting one and this round is off the books (`rounds: []`, no `roundHistory` entry) on the serial path, so a batch of two gaps no longer wakes four analysers. **Enforced:** `okstra_ctl.convergence_engine._critic_gap_coverage_errors` accepts a dispatch set that is either the assignee set or the full roster, and rejects anything else — the full roster stays valid because a run finished before this rule cannot say which shape it used, the same dual acceptance `_validate_round_ledger_counts` gives the two round-counting arithmetics. Choosing a critic provider that is already in the analyser roster costs nothing: the critic is a different role contract, a different duty and a different session, so an analyser is not disqualified by sharing its provider name (ADR-0017 — provider and model are not role identity, and the same model assigned to two roles gets two independent workers). The critic cannot judge its own gaps because it is not an analyser: the voter roster is `workers[]` filtered to `audience == "analysis"`, and a critic is not even representable there (the allowed values are `analysis` / `lead` / `report-writer`). `okstra convergence apply-critic-gaps` refuses a vote from anyone outside that roster (`critic voter must be a non-critic analyser`). Only gaps classified `full-consensus` / `partial-consensus` merge into the final report findings; `contested` / `worker-unique` gaps are treated as hallucinations and dropped (recorded in the convergence state, not promoted).
636
+ Each critic gap enters the verification queue as a finding with `originWorker = "<provider>-critic"` and `source = "critic"`, except a gap the critic declared `duplicateOf` — that one is recorded and never dispatched. The lead runs ONE adversarial reverify round (§"Adversarial Verification Mode" classifier). With two analysers or fewer, **every analyser verifies every gap**: one verifier per gap let a single shallow pass decide what merged into the report. With more, **each gap is verified by exactly one Phase 4 analyser**: walk the analyser roster in `criticVerification.analyserRoster` order and assign gap *i* to `roster[i % len(roster)]`, then dispatch each assigned analyser once with its own gaps. Rejecting a gap costs the same as accepting one and this round is off the books (`rounds: []`, no `roundHistory` entry) on the serial path, so a batch of two gaps does not wake four analysers. `okstra convergence critic-verify-prompt` renders each analyser's gaps from `okstra_ctl.convergence_engine.critic_gap_assignees`, the same rule the coverage check applies. **Enforced:** `okstra_ctl.convergence_engine._critic_gap_coverage_errors` accepts a dispatch set that is either the assignee set or the full roster, and rejects anything else — the full roster stays valid because a run finished before this rule cannot say which shape it used, the same dual acceptance `_validate_round_ledger_counts` gives the two round-counting arithmetics. Choosing a critic provider that is already in the analyser roster costs nothing: the critic is a different role contract, a different duty and a different session, so an analyser is not disqualified by sharing its provider name (ADR-0017 — provider and model are not role identity, and the same model assigned to two roles gets two independent workers). The critic cannot judge its own gaps because it is not an analyser: the voter roster is `workers[]` filtered to `audience == "analysis"`, and a critic is not even representable there (the allowed values are `analysis` / `lead` / `report-writer`). `okstra convergence apply-critic-gaps` refuses a vote from anyone outside that roster (`critic voter must be a non-critic analyser`). Only gaps classified `full-consensus` / `partial-consensus` merge into the final report findings; `contested` / `worker-unique` gaps are treated as hallucinations and dropped (recorded in the convergence state, not promoted).
634
637
 
635
638
  **Dispatching the gap round.** The gap round is off the round ledger, so `plan-round` writes no plan for it and `reverify-prompt` cannot render it; it has its own generator and dispatch kind. Assemble the coverage batch first — the same `{ schemaVersion, taskKey, mode: "coverage", provider, modelExecutionValue, gaps[] }` document `apply-critic-gaps` will take, with each candidate as a gap (`gapId` = the critic's item id, `summary`, `category`, `ticketIds`, `originEvidence`, `duplicateOf` where declared) and no `votes` or `dispatches` yet. Then, for each assigned analyser, render `okstra convergence critic-verify-prompt --run-manifest <run-manifest> --gaps <coverage-batch.json> --worker <worker-id>` and write its output verbatim as the instruction file: it applies the same round-robin as `apply-critic-gaps` (`okstra_ctl.convergence_engine.critic_gap_assignees`) and carries only that analyser's gaps, each with the critic's result file and `### [<gapId>]` section, the critic audit sidecar the verifier may open, and the adversarial response format the collector parses (gap votes are always read as adversarial). Materialize with the analyser's existing `reverify/<worker-id>` assignment ref, `--dispatch-kind critic-verify`, `--audience reverification-worker`, and on a v2 run the analyser's own `--source-role-execution-ref` exactly as a numbered reverify round; name the prompt `<worker-id>-worker-critic-verify-<task-type>-<seq>.md` and the result `worker-results/<worker-id>-worker-critic-verify-<task-type>-<seq>.md`. Collect each result with `parse_finding_votes` semantics (the `### <gapId>` blocks), write the votes and one `dispatches[]` row per assigned analyser into the batch, and run `apply-critic-gaps`. **Enforced (rendering):** `okstra_ctl.convergence_critic_verify_prompt`. **Enforced (pre-dispatch):** `validate_reverify_prompt` in `scripts/okstra_ctl/worker_prompt_contract.py` requires the `**Rendered by:** okstra convergence critic-verify-prompt` line for dispatch kind `critic-verify`, so a hand-written gap instruction cannot be materialized; `worker_prompt_policy.is_verification_dispatch_kind` routes the kind through the reverify prompt plan, and `convergence_store.reserve_dynamic_verifier` records the kind on the v2 reservation. Before this path existed (2026-09-09, dev-10642 requirements-discovery 001) every attempt to dispatch the round was refused and all three gaps ended `gapsUnverified`.
636
639
 
@@ -278,7 +278,7 @@ For an `implementation-planning` run whose run manifest declares `activityContra
278
278
  The live projection follows this shape:
279
279
 
280
280
  ```text
281
- PROGRESS: phase-4-dispatch worker=codex-worker model=gpt-6.1-sol
281
+ PROGRESS: phase-4-dispatch worker=codex-worker model=gpt-6.2-sol
282
282
  ACTIVITY: id=A-001 agent=codex-worker summary="Verify Stage Map paths and commands" items=P-Step-001,P-Step-002 result=runs/.../codex-worker-....md outcome=pending
283
283
  ```
284
284
 
@@ -380,8 +380,8 @@ The table below documents those prep-time seed values **for reference only** —
380
380
  | Lead role | opus | -- | runtime-specific role label; orchestration + convergence supervision + final-report review/approval |
381
381
  | Report writer worker | sonnet | report-writer-worker | common + role + duty contracts composed per invocation; `native-session` execution |
382
382
  | Claude worker | opus | claude-worker | common + role + duty contracts composed per invocation; `native-session` execution |
383
- | Codex worker | gpt-6.1-sol | codex-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
384
- | Antigravity worker | gemini-3.1-pro | antigravity-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
383
+ | Codex worker | gpt-6.2-sol | codex-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
384
+ | Antigravity worker | gemini-4-argon | antigravity-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
385
385
 
386
386
  Each analysis assignment follows its recorded `runner`. `runner=native-session` uses the host's native subagent primitive after `host-native-spec-link-gate`. `runner=cli-wrapper` follows the planned execution surface after `core-pre-dispatch` verification: `okstra team dispatch` when `terminalBackend` is `cmux-pane`, otherwise the deterministic `okstra worker-dispatch` process boundary. No LLM transport wrapper sits in front of a provider CLI.
387
387
 
@@ -5,7 +5,7 @@ Edit here once; every profile picks the change up at next render. Do NOT
5
5
  add phase-specific rules to this file — phase rules stay in the per-
6
6
  profile document.
7
7
  -->
8
- - Team contract (shared): roster roles, model-assignment rules, dispatch invariants, and worker attempt rules are canonical in the team contract (`prompts/lead/team-contract.md`). Two consequences every phase honours: the host-native Okstra lead is synthesis-only (in `implementation`, distinct from the `Executor` and verifiers), and unnamed generic parallel workers never replace or extend the run's selected roster (`resultContract.workerRoles`). Prep-time model recommendations come from the catalog defaults in `okstra_ctl.models` (for example, `Codex worker` → `gpt-6.1-sol`); at dispatch time the task-manifest's materialized assignment is the only source — there is no dispatch-time fallback.
8
+ - Team contract (shared): roster roles, model-assignment rules, dispatch invariants, and worker attempt rules are canonical in the team contract (`prompts/lead/team-contract.md`). Two consequences every phase honours: the host-native Okstra lead is synthesis-only (in `implementation`, distinct from the `Executor` and verifiers), and unnamed generic parallel workers never replace or extend the run's selected roster (`resultContract.workerRoles`). Prep-time model recommendations come from the catalog defaults in `okstra_ctl.models` (for example, `Codex worker` → `gpt-6.2-sol`); at dispatch time the task-manifest's materialized assignment is the only source — there is no dispatch-time fallback.
9
9
  - Worker interaction model (shared — read before inferring behaviour from the roster):
10
10
  - the run's selected roster is a **roster**, not a behaviour contract. Each role's interaction mode changes across operating phases of the same run.
11
11
  - **Phase 4 / 5 (independent analysis)**: every analyser in the resolved provider assignment roster produces findings independently and has no access to another worker's output. `report-writer` does not analyse.
@@ -24,6 +24,15 @@ profile document.
24
24
  - Okstra-owned project artifacts live only under `<PROJECT_ROOT>/.okstra/**`. Treat `project.json`, task bundles, run artifacts, `glossary.md`, and `decisions/` under that subtree as the canonical okstra memory.
25
25
  - Treat paths outside `<PROJECT_ROOT>/.okstra/**` as source material only when the task brief's `Source Material` or `Reporter Confirmations` explicitly cites them; they never become okstra memory.
26
26
  - Create, modify, or delete only inside `<PROJECT_ROOT>/.okstra/**` unless the brief verbatim requests a specific non-okstra edit. The phase performing that edit must quote the user instruction in its report. Implementation source edits also require the approved implementation plan.
27
+ - Runtime resources (shared — Docker containers, volumes, databases, images and networks a worker uses, e.g. a PostgreSQL test database for validation or a built server image):
28
+ - Reuse before creating. Before `docker run`, `docker volume create` or `docker build`, look for an okstra resource of this project that already serves the purpose: `docker ps -a --filter label=okstra.project=<project-id>` and `docker volume ls --filter label=okstra.project=<project-id>`, where `<project-id>` is the first segment of the task key. Resources created before this rule carry `okstra.validation.scope` / `okstra.validation.owner` instead and no `okstra.project`; list them with `docker ps -a --filter label=okstra.validation.owner` and `docker volume ls --filter label=okstra.validation.owner`, and count one only when its name or `okstra.validation.scope` value names this project — otherwise treat it as foreign. Reuse one with a matching image and major version: start it if it is stopped and wait until it is healthy or accepts connections. Create a new one only when none fits (for example, a different major version is required), and record why in your result.
29
+ - Inside a reused database server, keep this task's data in its own database (or schema) named `<task-group>_<task-id>` from the task key, with `_s<N>` appended for implementation stage `<N>`, lower-cased and with every character other than letters, digits and `_` replaced by `_`. Concurrent stages never share one. On a later attempt, reuse that database; create it only when it does not exist. When a test needs a known starting state, reset this database's contents (for example, drop and recreate its schemas, then rerun the migrations) instead of dropping the database. Never drop or alter another task's database.
30
+ - Label what you create with `okstra.project=<project-id>` and `okstra.purpose=<service>-<major-version>` (for example `postgres-16`), and give it a stable name built from the same values. Never put a random or per-attempt id in a name or label: that is what makes the next attempt treat the previous attempt's container as a foreign resource and create another one.
31
+ - For an image you build, add `--label okstra.source=<commit sha of the source>` and use one stable tag per task and stage, built from the same sanitized `<task-group>_<task-id>[_s<N>]` value, so concurrent stages and tasks never overwrite each other's image. Reuse an existing image only when its `okstra.source` label equals the current commit of a worktree with no uncommitted changes; otherwise rebuild under the same tag instead of adding a per-attempt tag.
32
+ - Keep these containers, volumes and databases after the work; later attempts, phases and tasks reuse them. Do not remove them, and do not stop, modify or remove any Docker resource without an okstra label.
33
+ - Starting, connecting to, and creating a task database or schema in an okstra-labelled resource is authorised by this rule. It is not a non-okstra edit under the Resource boundary above, and needs no brief instruction.
34
+ - This rule governs how a phase and role already permitted to run Docker or test commands does so. It grants no such permission and does NOT relax any phase-specific Forbidden actions list or a read-only role's limits.
35
+ - This is a prompt instruction, not a code-enforced gate.
27
36
  - Authority & permissions assumption (applies to every okstra task-type):
28
37
  - **Assume the user (and their team) holds full authority and every permission required for the anticipated, in-flight, or follow-up work.** Treat external approvals, third-party access grants, role/IAM permissions, organisational sign-off, legal/compliance review, vendor coordination, and "verify access exists" steps as already satisfied unless the task brief explicitly states otherwise.
29
38
  - Do NOT add such items to routing decisions, missing-materials lists, clarification questions, option trade-offs, dependency/migration risk, validation checklists, rollout plans, acceptance blockers, residual risks, release recommendations, the `## 1. Clarification Items` table, or any day/effort estimate. They are not legitimate sources of schedule extension.
@@ -568,7 +568,7 @@
568
568
  "echo_template": "edit-target: {value}"
569
569
  },
570
570
  "role_models": {
571
- "label": "{role} 역할의 모델을 고르세요 — 고른 만큼 인스턴스를 띄웁니다 ({range}). 제공자별로 표시하며 추천은 프로젝트 modelDefaults(없으면 카탈로그 기본값)를 따릅니다",
571
+ "label": "{role} 역할의 모델을 고르세요 — 고른 만큼 인스턴스를 띄웁니다 ({range}). 벤더별로 표시하며 목록에 없는 모델은 '직접 입력'으로 고릅니다. 추천은 프로젝트 modelDefaults(없으면 카탈로그 기본값)를 따릅니다",
572
572
  "echo_template": "role-models: {value}",
573
573
  "options": {
574
574
  "model": "{model_ref} — {display}",
@@ -580,18 +580,26 @@
580
580
  "labels": {
581
581
  "range": "허용 {minimum}..{maximum}개, 권장 {recommended}개",
582
582
  "exact": "정확히 {count}개",
583
- "single": "{role} 역할의 모델을 하나 고르세요 — 인스턴스는 1개입니다 ({range}). 1번 추천은 프로젝트 modelDefaults(없으면 카탈로그 기본값)이고, 이 역할을 빼려면 '추가 안 함' 입니다"
583
+ "single": "{role} 역할의 모델을 하나 고르세요 — 인스턴스는 1개입니다 ({range}). 1번 추천은 프로젝트 modelDefaults(없으면 카탈로그 기본값)이고, 이 역할을 빼려면 '추가 안 함'(벤더 탭 화면에서는 아무것도 고르지 않음) 입니다"
584
584
  },
585
585
  "errors": {
586
586
  "count_out_of_range": "{range} 골라야 합니다 — 고른 수 {count}개",
587
- "min_one_required": "모델을 {range} 고르세요 (이 역할을 빼려면 '추가 안 함')",
587
+ "min_one_required": "모델을 {range} 고르세요",
588
588
  "unknown_option": "목록에 없는 항목입니다: {values}"
589
589
  },
590
590
  "echo_variants": {
591
591
  "skipped": "role-models: (추가 안 함)"
592
592
  }
593
+ },
594
+ "role_model_input": {
595
+ "label": "{role} 역할에 쓸 {providers} 모델 id를 입력하세요 (쉼표로 여러 개). 앞 화면에서 고른 모델: {chosen}. 입력할 수 있는 모델: {candidates}",
596
+ "echo_template": "role-model-input: {value}"
593
597
  }
594
598
  },
599
+ "model_tabs": {
600
+ "free_input": "직접 입력 ({vendors})",
601
+ "mixed": "기타 {vendors}"
602
+ },
595
603
  "confirmation": {
596
604
  "header": "선택 확인:",
597
605
  "provider_data_scope": "\n전달 대상: 위 역할·모델 목록의 제공자(현재 세션 및 선택한 외부 모델 제공자).\n전달 자료: `{project_root}`의 이 작업에 대한 작업 개요, 작업 수행에 필요한 저장소 소스·문서, 선택한 근거 자료 및 실행 중 생성되는 관련 분석·검증 결과.\n진행을 선택하면 위 대상에 해당 자료를 전달하여 선택한 작업을 실행하는 것을 승인합니다. 선택에 없는 제공자나 작업과 무관한 자료는 승인 범위에 포함되지 않습니다. 실행 환경의 권한 검토는 별도로 적용됩니다.",
@@ -648,7 +656,11 @@
648
656
  "save": "저장",
649
657
  "edit": "계속 수정",
650
658
  "review": "변경 검토",
651
- "models_label": "{role} · 허용 {minimum}..{maximum}명\n선택한 모델 하나당 1명입니다. 상속·해제·사용 안 함은 단독으로 선택하세요.\n검증자 기본값은 시작 역할에만 적용하며 동적 검증자는 원본 배정을 따릅니다.",
659
+ "action_label": "{role} · 허용 {minimum}..{maximum}명\n모델을 고르거나, 상속·해제·사용 안 함을 고르세요.",
660
+ "choose_models": "모델 고르기",
661
+ "models_label": "{role} · 허용 {minimum}..{maximum}명\n선택한 모델 하나당 1명입니다. 벤더별로 표시하며 목록에 없는 모델은 '직접 입력'으로 고릅니다.\n검증자 기본값은 시작 역할에만 적용하며 동적 검증자는 원본 배정을 따릅니다.",
662
+ "model_input_label": "{role}에 쓸 {providers} 모델 id를 입력하세요 (쉼표로 여러 개). 앞 화면에서 고른 모델: {chosen}. 입력할 수 있는 모델: {candidates}",
663
+ "choose_action": "모델 고르기, 상속·해제·사용 안 함, 취소 중에서 고르세요.",
652
664
  "exclusive": "상속·해제·사용 안 함은 다른 모델과 함께 선택할 수 없습니다.",
653
665
  "conflict": "{path}: {role} 설정이 이 편집을 시작한 뒤 바뀌었습니다. 설정을 다시 여세요.",
654
666
  "choose_scope": "설정 범위를 선택하세요.",
@@ -30,9 +30,17 @@ import okstra_ctl.model_discovery as model_discovery
30
30
  # normalizer through ProviderSpec so assignment resolution does not branch on
31
31
  # provider names.
32
32
  ANTIGRAVITY = {
33
+ "gemini-4-carbon": ModelSpec(
34
+ "gemini-4-carbon", "Gemini 4 Carbon", "gemini-4-carbon",
35
+ aliases=("gemini 4 carbon",),
36
+ ),
37
+ "gemini-4-hydrogen": ModelSpec(
38
+ "gemini-4-hydrogen", "Gemini 4 Hydrogen", "gemini-4-hydrogen",
39
+ aliases=("gemini 4 hydrogen",),
40
+ ),
33
41
  "gemini-3.1-pro": ModelSpec(
34
42
  "gemini-3.1-pro", "Gemini 3.1 Pro", "gemini-3.1-pro",
35
- aliases=("gemini 3.1 pro",),
43
+ aliases=("gemini 3.1 pro",), selectable=False,
36
44
  ),
37
45
  "gemini-4-argon": ModelSpec(
38
46
  "gemini-4-argon", "Gemini 4 Argon", "gemini-4-argon",
@@ -326,7 +334,7 @@ def create_provider() -> ProviderSpec:
326
334
  display_label="Antigravity",
327
335
  models=ANTIGRAVITY,
328
336
  default_models={
329
- role: "gemini-3.1-pro"
337
+ role: "gemini-4-argon"
330
338
  for role in (
331
339
  "lead", "analyser", "critic", "designer", "planner", "executor",
332
340
  "verifier", "report-writer",
@@ -18,6 +18,10 @@ from okstra_ctl.domain.worker_stream import content_block_events
18
18
 
19
19
 
20
20
  CLAUDE = {
21
+ "fable-5-2": ModelSpec(
22
+ "fable-5-2", "fable-5-2", "claude-fable-5-2", aliases=("claude-fable-5-2",),
23
+ channel_family="fable", selectable=False,
24
+ ),
21
25
  "fable": ModelSpec(
22
26
  "fable", "fable", "fable", version_kind="channel", channel_family="fable"
23
27
  ),
@@ -108,6 +112,14 @@ def observe_served_model(event: Mapping[str, Any]) -> str | None:
108
112
  # observed end to end, which is why policy_support claims no write boundary.
109
113
  _APPROVAL_ARGS = ("--permission-mode", "bypassPermissions")
110
114
 
115
+ # The user's own ~/.claude (CLAUDE.md, rules, skills, settings such as an answer
116
+ # language) would otherwise load into every worker and compete with the worker
117
+ # prompt. Project and local sources stay: they carry the target project's own
118
+ # CLAUDE.md, settings and project-scope MCP servers. User-scope MCP servers drop
119
+ # out with the user source, so the MCP inventory below is listed under the same
120
+ # sources to report only what a worker can reach.
121
+ _SETTING_SOURCE_ARGS = ("--setting-sources", "project,local")
122
+
111
123
 
112
124
  class ClaudeExecution:
113
125
  """claude CLI invocation.
@@ -131,6 +143,7 @@ class ClaudeExecution:
131
143
  argv += list(_APPROVAL_ARGS)
132
144
  if request.reasoning_effort:
133
145
  argv += ["--effort", request.reasoning_effort]
146
+ argv += list(_SETTING_SOURCE_ARGS)
134
147
  # `--verbose` is mandatory, not cosmetic: Claude Code rejects `--print`
135
148
  # combined with `--output-format=stream-json` without it and exits 1 in
136
149
  # under a second.
@@ -176,7 +189,9 @@ def parse_mcp_list(stdout: str) -> McpInventory:
176
189
  return McpInventory(listed=True, servers=tuple(servers))
177
190
 
178
191
 
179
- MCP_INVENTORY = McpInventoryProbe(argv=("claude", "mcp", "list"), parse=parse_mcp_list)
192
+ MCP_INVENTORY = McpInventoryProbe(
193
+ argv=("claude", *_SETTING_SOURCE_ARGS, "mcp", "list"), parse=parse_mcp_list,
194
+ )
180
195
 
181
196
 
182
197
  def create_provider() -> ProviderSpec:
@@ -20,6 +20,10 @@ import okstra_ctl.model_discovery as model_discovery
20
20
 
21
21
 
22
22
  CODEX = {
23
+ "gpt-6.1-terra": ModelSpec(
24
+ "gpt-6.1-terra", "gpt-6.1-terra", "gpt-6.1-terra", pricing=(1.0, 0.05, 5.0),
25
+ cli_args=("-c", "model_reasoning_effort=high"),
26
+ ),
23
27
  # 비용은 계정이 구독이든 API 든 공개 API 단가(입력·캐시 입력·출력 USD/1M)로
24
28
  # 추정한다 — 리포트가 답하는 것은 "얼마나 썼는가" 이지 "청구서에 얼마가
25
29
  # 찍히는가" 가 아니다. 단가를 비우면 그 워커의 비용이 `--` 로 빠지고, 접두어
@@ -29,12 +33,23 @@ CODEX = {
29
33
  # layer3labs.io/guides/gpt-6-astra-api-pricing).
30
34
  # gpt-6 단가는 OpenAI 모델 문서의 표준 등급(2026-09-23 확인):
31
35
  # developers.openai.com/api/docs/models/gpt-6-sol, .../gpt-6-luna, .../gpt-6.1-sol
32
- # (gpt-6.1-sol 은 2026-09-30 확인: 캐시 입력만 $0.10 으로 gpt-6-sol 과 다르다).
33
- "gpt-6-astra": ModelSpec("gpt-6-astra", "gpt-6-astra", "gpt-6-astra", pricing=(10.0, 1.0, 50.0)),
34
- # 카탈로그 기본 effort 는 low 라, config.toml 에 값이 없는 기계에서는 low 로 돈다.
36
+ # (gpt-6.1-sol 은 2026-09-30 확인: 캐시 입력만 $0.10 으로 gpt-6-sol 과 다르다;
37
+ # gpt-6.2-sol 은 2026-11-19 확인: gpt-6.1-sol 과 같은 단가).
38
+ # gpt-6.2-astra 는 2026-11-19 확인: developers.openai.com/api/docs/models/gpt-6.2-astra.
39
+ # gpt-6.2-astra·gpt-6.2-sol 의 카탈로그 기본 effort 는 low 라, config.toml 에 값이
40
+ # 없는 기계에서는 low 로 돈다. 그래서 두 행 모두 high 를 고정한다.
41
+ "gpt-6.2-astra": ModelSpec(
42
+ "gpt-6.2-astra", "gpt-6.2-astra", "gpt-6.2-astra", pricing=(8.0, 0.40, 40.0),
43
+ cli_args=("-c", "model_reasoning_effort=high"),
44
+ ),
45
+ "gpt-6-astra": ModelSpec("gpt-6-astra", "gpt-6-astra", "gpt-6-astra", pricing=(10.0, 1.0, 50.0), selectable=False),
46
+ "gpt-6.2-sol": ModelSpec(
47
+ "gpt-6.2-sol", "gpt-6.2-sol", "gpt-6.2-sol", pricing=(2.0, 0.10, 10.0),
48
+ cli_args=("-c", "model_reasoning_effort=high"),
49
+ ),
35
50
  "gpt-6.1-sol": ModelSpec(
36
51
  "gpt-6.1-sol", "gpt-6.1-sol", "gpt-6.1-sol", pricing=(2.0, 0.10, 10.0),
37
- cli_args=("-c", "model_reasoning_effort=high"),
52
+ cli_args=("-c", "model_reasoning_effort=high"), selectable=False,
38
53
  ),
39
54
  "gpt-6-sol": ModelSpec("gpt-6-sol", "gpt-6-sol", "gpt-6-sol", pricing=(2.0, 0.20, 10.0), selectable=False),
40
55
  "gpt-6-luna": ModelSpec("gpt-6-luna", "gpt-6-luna", "gpt-6-luna", pricing=(0.10, 0.01, 0.50)),
@@ -162,7 +177,7 @@ def create_provider() -> ProviderSpec:
162
177
  display_label="Codex",
163
178
  models=CODEX,
164
179
  default_models={
165
- role: "gpt-6.1-sol"
180
+ role: "gpt-6.2-sol"
166
181
  for role in ("lead", "analyser", "critic", "designer", "planner", "executor", "verifier", "report-writer")
167
182
  },
168
183
  wrapper="okstra-codex-exec.sh",
@@ -17,7 +17,15 @@ from okstra_ctl.domain.worker_stream import content_block_events
17
17
 
18
18
 
19
19
  KIMI = {
20
- "kimi-k3": ModelSpec("kimi-k3", "Kimi K3", "kimi-k3", aliases=("kimi k3",), pricing=(3.00, 0.30, 15.00)),
20
+ "k3.1-pro": ModelSpec(
21
+ "k3.1-pro", "Kimi K3.1 Pro", "k3.1-pro",
22
+ aliases=("kimi-k3.1-pro",), pricing=(2.0, 0.20, 10.0),
23
+ ),
24
+ "k3.1-pro-highspeed": ModelSpec(
25
+ "k3.1-pro-highspeed", "Kimi K3.1 Pro Highspeed", "k3.1-pro-highspeed",
26
+ aliases=("kimi-k3.1-pro-highspeed",), pricing=(4.0, 0.20, 20.0),
27
+ ),
28
+ "kimi-k3": ModelSpec("kimi-k3", "Kimi K3", "kimi-k3", aliases=("kimi k3",), pricing=(3.00, 0.30, 15.00), selectable=False),
21
29
  # picker 에서는 감춘다: kimi-k3 와 표시명·실체가 같아 목록에 두 줄로 뜬다.
22
30
  # 단가는 kimi-k3 와 같다 — 같은 모델의 다른 슬러그이고, `_match_pricing` 은
23
31
  # `kimi-k3` 키를 `k3` 관측값에 맞추지 못하므로 행마다 값을 둔다. k3-256k 는
@@ -96,14 +104,14 @@ def create_provider() -> ProviderSpec:
96
104
  display_label="Kimi",
97
105
  models=KIMI,
98
106
  default_models={
99
- "lead": "kimi-k3",
100
- "analyser": "kimi-k3",
101
- "critic": "kimi-k3",
102
- "designer": "kimi-k3",
103
- "planner": "kimi-k3",
104
- "executor": "kimi-k3",
105
- "verifier": "kimi-k3",
106
- "report-writer": "kimi-k3",
107
+ "lead": "k3.1-pro",
108
+ "analyser": "k3.1-pro",
109
+ "critic": "k3.1-pro",
110
+ "designer": "k3.1-pro",
111
+ "planner": "k3.1-pro",
112
+ "executor": "k3.1-pro",
113
+ "verifier": "k3.1-pro",
114
+ "report-writer": "k3.1-pro",
107
115
  },
108
116
  wrapper="okstra-kimi-exec.sh",
109
117
  supported_roles=ALL_ROLE_TOKENS,
@@ -0,0 +1,88 @@
1
+ """Qwen Code workers using a regional Model Studio API endpoint."""
2
+ import os
3
+ import re
4
+ from collections.abc import Mapping
5
+ from pathlib import Path
6
+ from typing import Any
7
+ from urllib.parse import urlsplit
8
+
9
+ from okstra_ctl.domain.provider import ModelSpec, ProviderSpec
10
+ from okstra_ctl.domain.role import ROLE_DEFINITIONS
11
+ from okstra_ctl.domain.worker_exec import ExecCommand, PolicySupport, WorkerExecRequest
12
+ from okstra_ctl.domain.worker_presentation import JsonEvents
13
+ from okstra_ctl.domain.worker_stream import content_block_events
14
+
15
+
16
+ def observe_usage(event: Mapping[str, Any]) -> Mapping[str, Any] | None:
17
+ usage = event.get("usage") if event.get("type") == "result" else None
18
+ return usage if isinstance(usage, Mapping) and usage else None
19
+
20
+
21
+ class QwenExecution:
22
+ def build_command(self, request: WorkerExecRequest) -> ExecCommand:
23
+ api_key = os.environ.get("DASHSCOPE_API_KEY", "").strip()
24
+ endpoint = os.environ.get("OKSTRA_QWEN_BASE_URL", "").strip()
25
+ if not api_key:
26
+ raise OSError("DASHSCOPE_API_KEY is required for Qwen workers")
27
+ if not endpoint:
28
+ raise OSError("OKSTRA_QWEN_BASE_URL is required for Qwen workers")
29
+ try:
30
+ parsed = urlsplit(endpoint)
31
+ port = parsed.port
32
+ except ValueError:
33
+ raise OSError("OKSTRA_QWEN_BASE_URL is not a valid Model Studio URL") from None
34
+ host = parsed.hostname or ""
35
+ if parsed.username is not None or parsed.password is not None:
36
+ raise OSError("OKSTRA_QWEN_BASE_URL must not embed credentials")
37
+ regional = re.fullmatch(r"[a-z0-9-]+\.[a-z0-9-]+\.maas\.aliyuncs\.com", host)
38
+ legacy = host in {"dashscope.aliyuncs.com", "dashscope-intl.aliyuncs.com", "cn-hongkong.dashscope.aliyuncs.com"}
39
+ if (parsed.scheme != "https" or not (regional or legacy)
40
+ or port not in (None, 443) or parsed.query or parsed.fragment
41
+ or parsed.path.rstrip("/") != "/compatible-mode/v1"):
42
+ raise OSError("OKSTRA_QWEN_BASE_URL must be an HTTPS Model Studio /compatible-mode/v1 URL without credentials, query or fragment")
43
+ argv = [
44
+ "qwen", "--auth-type", "openai", "--openai-base-url", endpoint,
45
+ "--model", request.model, "--output-format", "stream-json",
46
+ ]
47
+ if request.policy.auto_approve:
48
+ argv += ["--approval-mode", "yolo"]
49
+ if request.session_id:
50
+ argv += ["--session-id", request.session_id]
51
+ for directory in request.policy.write_scope:
52
+ argv += ["--include-directories", str(directory)]
53
+ return ExecCommand(
54
+ argv=tuple(argv), stdin_text=request.prompt_text,
55
+ cwd=request.worktree_path or request.project_root,
56
+ environment={
57
+ "OPENAI_API_KEY": api_key, "OPENAI_MODEL": request.model,
58
+ "OKSTRA_QWEN_API_KEY": api_key, "OKSTRA_QWEN_ENDPOINT": endpoint,
59
+ "QWEN_CODE_SYSTEM_SETTINGS_PATH": str(Path(__file__).with_name("settings.json")),
60
+ },
61
+ presentation=JsonEvents(
62
+ normalise=content_block_events,
63
+ # Qwen Code copies config.getModel() into message.model.
64
+ observe=lambda _event: None,
65
+ observe_usage=observe_usage,
66
+ ),
67
+ )
68
+
69
+ def policy_support(self) -> PolicySupport:
70
+ return PolicySupport(
71
+ can_auto_approve=True, can_bound_write_scope=False,
72
+ note="Qwen Code approval mode does not enforce filesystem write boundaries",
73
+ )
74
+
75
+
76
+ def create_provider() -> ProviderSpec:
77
+ roles = frozenset(role.id for role in ROLE_DEFINITIONS if role.id != "leader")
78
+ return ProviderSpec(
79
+ provider="qwen", display_label="Qwen Code",
80
+ models={"qwen4-max": ModelSpec("qwen4-max", "Qwen4 Max", "qwen4-max")},
81
+ default_models={role: "qwen4-max" for role in roles},
82
+ wrapper="okstra-qwen-exec.sh", supported_roles=roles,
83
+ execution_capabilities=frozenset({
84
+ "worker-artifact-io", "source-readonly",
85
+ "extended-artifact-authoring", "project-mutation",
86
+ }),
87
+ exec_strategy=QwenExecution(),
88
+ )
@@ -0,0 +1 @@
1
+ {"schemaVersion": 1, "id": "qwen", "factory": "adapter.py:create_provider"}