okstra 0.78.1 → 0.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/kr/cli.md CHANGED
@@ -312,12 +312,17 @@ scripts/okstra.sh --task-type implementation-planning --workers claude,codex --p
312
312
 
313
313
  Lead 실행 adapter 를 지정합니다. 기본값은 `claude-code` 입니다.
314
314
 
315
+ Lead runtime independence boundary:
316
+
315
317
  - `claude-code`: 현재 기본 실행 경로입니다. Claude Code lead 가 `TeamCreate` / `Agent(...)` / Claude session jsonl 기반으로 worker dispatch 와 사용량 집계를 수행합니다.
316
318
  - `codex`: Codex lead adapter 용 runtime marker 입니다. `okstra codex-run` 이 `--render-only --lead-runtime codex` 를 소유해 task bundle 을 준비하고, 준비된 run manifest 는 `okstra codex-dispatch` 로 CLI-backed worker 실행에 넘길 수 있습니다.
319
+ - `external`: Claude Code Teams 없이 `--render-only --lead-runtime external` 로 task bundle 과 external lead prompt 를 준비하고, lead 는 `okstra team dispatch` / `okstra team await` / `okstra team teardown` 으로 tmux-pane worker lifecycle 을 관리합니다. 이 path 는 `TeamCreate` / `Agent(...)` 를 쓰지 않고 artifact-only accounting 을 사용합니다.
320
+
321
+ 현재 Claude Code 독립 범위는 external lead prompt + `okstra team *` worker dispatch 입니다. non-render `okstra_ctl.run --lead-runtime external` remains blocked; 완전한 external lead driver 는 아직 별도 구현 대상입니다. `--runtime external` does not install `~/.claude` assets, but selecting a `claude` worker still requires a local Claude CLI wrapper.
317
322
 
318
323
  Codex lead dry-run 은 `okstra codex-run <args...>` 를 쓰면 됩니다. 이 명령은 `--render-only --lead-runtime codex` 를 직접 붙이고, worker dispatch 없이 준비된 task bundle 과 lead prompt 를 출력합니다.
319
324
  생성된 team-state / run-manifest / task-manifest 는 `leadEventsPath` 로 `runs/<task-type>/state/lead-events-<task-type>-<seq>.jsonl` 를 가리키며, render 단계는 `bundle-prepared` event 를 기록합니다.
320
- 이후 `okstra codex-dispatch --project-root <dir> --run-manifest <run-manifest> --workers codex[,gemini[,report-writer]]` 가 기존 CLI wrapper 기반 worker 를 실행합니다. `--workers` 를 생략하면 run roster 중 Codex-side 지원 worker(`codex`, `gemini`, opt-in 된 `report-writer`)만 자동 선택하고, `claude` 처럼 지원하지 않는 worker 를 명시 요청하면 실패합니다. `report-writer` 는 명시 opt-in (`--enable-codex-report-writer --report-writer-codex-model <model>`) 이 필요하며, 성공 시 token-usage substitution → render-views → spawn-followups → validate-run 후처리를 순서대로 수행합니다.
325
+ 이후 `okstra codex-dispatch --project-root <dir> --run-manifest <run-manifest> --workers codex[,gemini[,report-writer]]` 가 기존 CLI wrapper 기반 worker 를 실행합니다. `--workers` 를 생략하면 run roster 중 Codex-side 지원 worker(`codex`, `gemini`, opt-in 된 `report-writer`)만 자동 선택하고, 명시 요청하면 미지원 worker 를 실패 처리합니다. `report-writer` 는 명시 opt-in (`--enable-codex-report-writer --report-writer-codex-model <model>`) 이 필요하며, 성공 시 token-usage substitution → render-views → spawn-followups → validate-run 후처리를 순서대로 수행합니다.
321
326
 
322
327
  Codex worker(`--workers codex`, `--codex-model`)와 Codex lead runtime 은 별개입니다. 전자는 Claude Code lead 가 dispatch 하는 worker provider 선택이고, 후자는 lead 자체를 Codex adapter 로 실행하기 위한 상위 runtime 경계입니다.
323
328
 
@@ -106,8 +106,19 @@ So `runtime/` is not the only npm-published content. It is the install payload c
106
106
 
107
107
  `npm run build` and `prepack` both run this sync. Never hand-edit `runtime/`.
108
108
 
109
+ Runtime/install asset changes follow this checklist:
110
+
111
+ 1. Add or edit the source asset under `scripts/`, `skills/`, `agents/`, `prompts/`, `schemas`, `templates`, or `validators`.
112
+ 2. Add a `tools/build.mjs` sync mapping when the asset must appear under `runtime/` (for example, a new executable such as `okstra-claude-exec.sh`).
113
+ 3. Run `npm run build`.
114
+ 4. Verify `tests-js/runtime-build-sync.test.mjs`.
115
+ 5. Verify `tests-js/install-runtime.test.mjs`.
116
+ 6. Reinstall or repack the package before testing global `okstra install`.
117
+
109
118
  ### 3.3 Install output
110
119
 
120
+ `okstra install` copies from the installed npm package `runtime/` tree, not from the source checkout. `okstra -v` only proves the CLI version; the same semver can still point at stale package contents when the global package was installed before the latest build.
121
+
111
122
  `okstra install` copies or symlinks:
112
123
 
113
124
  - `runtime/python/*` → `~/.okstra/lib/python/`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.78.1",
3
+ "version": "0.79.0",
4
4
  "description": "Multi-agent cross-verification orchestrator runtime + Claude Code skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.78.1",
3
- "builtAt": "2026-06-14T07:26:32.969Z",
2
+ "package": "0.79.0",
3
+ "builtAt": "2026-06-14T09:17:32.918Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env bash
2
+ # okstra-claude-exec.sh — wrapper around Claude Code non-interactive print mode.
3
+ set -euo pipefail
4
+
5
+ if [[ $# -lt 3 || $# -gt 6 ]]; then
6
+ printf 'usage: %s <project-root> <model-execution-value> <prompt-path> [worktree-path] [role] [idle-timeout-seconds]\n' "$(basename "$0")" >&2
7
+ exit 64
8
+ fi
9
+
10
+ project_root="$1"
11
+ model="$2"
12
+ prompt_path="$3"
13
+ worktree_path="${4-}"
14
+ role="${5:-worker}"
15
+ idle_timeout_secs="${6:-600}"
16
+
17
+ if [[ ! -d "$project_root" ]]; then
18
+ printf 'okstra-claude-exec.sh: project root not found: %s\n' "$project_root" >&2
19
+ exit 65
20
+ fi
21
+ if [[ -z "$model" ]]; then
22
+ printf 'okstra-claude-exec.sh: model is required\n' >&2
23
+ exit 66
24
+ fi
25
+ if [[ ! -f "$prompt_path" ]]; then
26
+ printf 'okstra-claude-exec.sh: prompt not found: %s\n' "$prompt_path" >&2
27
+ exit 67
28
+ fi
29
+ if [[ -n "$worktree_path" && ! -d "$worktree_path" ]]; then
30
+ printf 'okstra-claude-exec.sh: worktree not found: %s\n' "$worktree_path" >&2
31
+ exit 68
32
+ fi
33
+ if ! [[ "$idle_timeout_secs" =~ ^[0-9]+$ ]]; then
34
+ printf 'okstra-claude-exec.sh: idle timeout must be a non-negative integer\n' >&2
35
+ exit 69
36
+ fi
37
+ if ! command -v claude >/dev/null 2>&1; then
38
+ printf 'okstra-claude-exec.sh: claude CLI not found\n' >&2
39
+ exit 127
40
+ fi
41
+
42
+ log_path="${prompt_path%.md}.log"
43
+ [[ "$log_path" == "$prompt_path" ]] && log_path="${prompt_path}.log"
44
+ : > "$log_path"
45
+ status_path="${prompt_path}.status.json"
46
+ started_ts=$(date +%s)
47
+ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
48
+ python3 "$script_dir/okstra-wrapper-status.py" \
49
+ init "$status_path" "$(basename "$0")" "$role" "$$" "$started_ts" "$log_path" \
50
+ >>"$log_path" 2>&1 || true
51
+
52
+ _okstra_status_finish() {
53
+ local exit_code=$?
54
+ local ended_ts
55
+ ended_ts=$(date +%s)
56
+ local duration_ms=$(( (ended_ts - started_ts) * 1000 ))
57
+ python3 "$script_dir/okstra-wrapper-status.py" \
58
+ finish "$status_path" "$exit_code" "$ended_ts" "$duration_ms" \
59
+ >>"$log_path" 2>&1 || true
60
+ }
61
+ trap _okstra_status_finish EXIT
62
+
63
+ cd "$project_root"
64
+ set +e
65
+ claude -p --model "$model" --output-format=stream-json < "$prompt_path" \
66
+ > >(tee -a "$log_path") \
67
+ 2> >(tee -a "$log_path" >&2)
68
+ claude_exit=$?
69
+ set -e
70
+
71
+ exit "$claude_exit"
@@ -13,6 +13,8 @@ SCRIPT_DIR="$(cd -P "$(dirname "$SOURCE_PATH")" && pwd)"
13
13
  WORKSPACE_ROOT="$(cd -P "$SCRIPT_DIR/.." && pwd)"
14
14
  PROJECT_ID="okstra-validation"
15
15
  PROJECT_ROOT="${OKSTRA_VALIDATION_PROJECT_ROOT:-/tmp/okstra-validate.workflow}"
16
+ export OKSTRA_HOME="${OKSTRA_HOME:-$PROJECT_ROOT/.okstra-home}"
17
+
16
18
  WORKSPACE_APP_PATH="$PROJECT_ROOT"
17
19
  OKSTRA_SCRIPT="$WORKSPACE_ROOT/scripts/okstra.sh"
18
20
  RUN_VALIDATOR_PATH="$WORKSPACE_ROOT/validators/validate-run.py"
@@ -30,6 +32,14 @@ SECONDARY_TASK_GROUP="discovery"
30
32
  SECONDARY_TASK_ID="task-catalog"
31
33
  SECONDARY_BRIEF_FILENAME="validation-brief-secondary.md"
32
34
 
35
+ # Workflow validation is a hermetic contract test for bundle prep / discovery
36
+ # artifacts / validator round-trips. It must not depend on the developer or CI
37
+ # machine having a preinstalled ~/.okstra runtime, and it must not reconcile or
38
+ # backfill against unrelated local state.
39
+ export OKSTRA_SKIP_INSTALL_CHECK="${OKSTRA_SKIP_INSTALL_CHECK:-1}"
40
+ export OKSTRA_CTL_SKIP_RECONCILE="${OKSTRA_CTL_SKIP_RECONCILE:-1}"
41
+ export OKSTRA_CTL_SKIP_BACKFILL="${OKSTRA_CTL_SKIP_BACKFILL:-1}"
42
+
33
43
  # shellcheck source=lib/common.sh
34
44
  source "$SCRIPT_DIR/lib/common.sh"
35
45
  # shellcheck source=lib/paths.sh