okstra 0.79.0 → 0.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.kr.md +3 -3
- package/README.md +3 -3
- package/docs/kr/architecture.md +1 -1
- package/docs/kr/cli.md +12 -0
- package/docs/project-structure-overview.md +4 -2
- package/docs/superpowers/plans/2026-06-14-host-runtime-auto-execution.md +1775 -0
- package/docs/superpowers/specs/2026-06-14-host-runtime-auto-execution-design.md +404 -0
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/python/okstra_ctl/render.py +11 -0
- package/runtime/python/okstra_ctl/run.py +25 -0
- package/runtime/skills/okstra-inspect/SKILL.md +1 -1
- package/runtime/skills/okstra-run/SKILL.md +4 -1
- package/runtime/skills/okstra-schedule/SKILL.md +1 -1
- package/runtime/skills/okstra-setup/SKILL.md +2 -2
- package/src/cli-registry.mjs +8 -1
- package/src/doctor.mjs +17 -3
- package/src/install.mjs +43 -19
- package/src/render-bundle.mjs +38 -1
- package/src/run.mjs +201 -0
- package/src/runtime-manifest.mjs +49 -12
- package/src/runtime-resolver.mjs +123 -0
package/README.kr.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# okstra
|
|
2
2
|
|
|
3
|
-
> npm: [`okstra`](https://www.npmjs.com/package/okstra) · 설치: `npx -y okstra@latest install`
|
|
3
|
+
> npm: [`okstra`](https://www.npmjs.com/package/okstra) · 설치: `npx -y okstra@latest install --runtime claude-code`
|
|
4
4
|
>
|
|
5
5
|
> English: [`README.md`](README.md)
|
|
6
6
|
|
|
@@ -105,7 +105,7 @@ okstra/ npm 패키지 = repo 루트
|
|
|
105
105
|
### 3.1 최초 셋업 (머신당 1회)
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
npx -y okstra@latest install
|
|
108
|
+
npx -y okstra@latest install --runtime claude-code
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
`~/.okstra/{lib/python, bin, templates, version}`, `~/.claude/skills/` 아래 스킬 마크다운 11개, `~/.claude/agents/` 아래 worker agent 4개, `~/.okstra/` 의 설치 asset manifest 를 생성합니다. 재실행은 idempotent — 파일별 hash 를 비교하고 바뀐 파일만 갱신합니다.
|
|
@@ -125,7 +125,7 @@ npx -y okstra@latest doctor
|
|
|
125
125
|
```bash
|
|
126
126
|
npm i -g okstra
|
|
127
127
|
okstra --version # CLI 가 PATH 에 잡혔는지 확인
|
|
128
|
-
okstra install
|
|
128
|
+
okstra install --runtime claude-code # 'npx -y okstra@latest install --runtime claude-code' 와 동일
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
글로벌 설치는 Node CLI 를 PATH 에 등록할 뿐입니다. 런타임(`~/.okstra/`) 과 Claude 스킬(`~/.claude/skills/`) 은 여전히 `okstra install` 이 생성합니다 — `npm i -g` 에 포함되지 않습니다. 실험적 Codex lead adapter 용 공유 runtime 만 설치하려면 `okstra install --runtime codex` 를 사용하세요 (`~/.claude` 자산은 건너뜀). 이후 업그레이드: `npm i -g okstra@latest && okstra install`. 글로벌 바이너리 제거: `npm uninstall -g okstra` (`~/.okstra/` 는 그대로; 그것까지 지우려면 `okstra uninstall`).
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# okstra
|
|
2
2
|
|
|
3
|
-
> npm: [`okstra`](https://www.npmjs.com/package/okstra) · install: `npx -y okstra@latest install`
|
|
3
|
+
> npm: [`okstra`](https://www.npmjs.com/package/okstra) · install: `npx -y okstra@latest install --runtime claude-code`
|
|
4
4
|
>
|
|
5
5
|
> 한국어 매뉴얼: [`README.kr.md`](README.kr.md)
|
|
6
6
|
|
|
@@ -104,7 +104,7 @@ okstra/ npm package = repo root
|
|
|
104
104
|
### 3.1 First-time setup (once per machine)
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
npx -y okstra@latest install
|
|
107
|
+
npx -y okstra@latest install --runtime claude-code
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
Provisions `~/.okstra/{lib/python, bin, templates, version}`, the 11 skill markdown files under `~/.claude/skills/`, the 4 worker agents under `~/.claude/agents/`, and the installed-asset manifests in `~/.okstra/`. Re-running is idempotent — per-file hashes are compared and only changed files are touched.
|
|
@@ -124,7 +124,7 @@ Every example in this README uses `npx -y okstra@latest <cmd>` so you don't need
|
|
|
124
124
|
```bash
|
|
125
125
|
npm i -g okstra
|
|
126
126
|
okstra --version # confirm the CLI is on PATH
|
|
127
|
-
okstra install
|
|
127
|
+
okstra install --runtime claude-code # same as 'npx -y okstra@latest install --runtime claude-code'
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
The global install only registers the Node CLI on your PATH. The runtime (`~/.okstra/`) and the Claude skills (`~/.claude/skills/`) are still provisioned by `okstra install` — they are not part of `npm i -g`. To install only the shared runtime for the experimental Codex lead adapter, use `okstra install --runtime codex` (skips `~/.claude` assets). To upgrade later: `npm i -g okstra@latest && okstra install`. To remove the global binary: `npm uninstall -g okstra` (leaves `~/.okstra/` untouched; remove that with `okstra uninstall`).
|
package/docs/kr/architecture.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
- **Single python authority**: 모든 prepare wiring(profile/workers/model 해소, path 계산, render, central record_start)이 [`okstra_ctl.run.prepare_task_bundle()`](../../scripts/okstra_ctl/run.py) 한 함수에 모여 있습니다. `okstra.sh` 와 `okstra-run` skill 은 같은 함수를 호출하는 thin caller 이며, 환경 변수로 상태를 전달하지 않습니다 — task 정체성·경로·workflow 상태는 모두 디스크 권위 파일에서 매번 계산됩니다.
|
|
19
19
|
- **Claude handoff (두 모드)**: (a) `okstra.sh` 가 새 `claude` 프로세스를 띄우는 전통 방식, (b) `okstra-run` skill 이 현재 claude 세션 안에서 prepare 후 lead 역할을 그대로 인계받는 in-session 모드. 둘 다 `prepare_task_bundle` 의 산출물(instruction-set 등)을 그대로 사용합니다.
|
|
20
20
|
- **Required team contract**: 각 phase profile의 `Required workers:` 블록이 roster의 권위입니다. 일반 분석 phase는 Claude/Codex analyser + report-writer를 기본으로 하고, Gemini는 profile과 `--workers`가 허용할 때만 포함됩니다. `release-handoff`처럼 lead-only에 가까운 phase는 별도 roster를 가집니다.
|
|
21
|
-
- **User-home install + project-local task bundles**: `npx okstra@latest install` 한 명령이 런타임(`~/.okstra/{lib/python, bin, templates}`), 스킬 11종(`~/.claude/skills/<name>/SKILL.md`), worker agent 4종(`~/.claude/agents/*-worker.md`)을 설치합니다. `--runtime codex` 는 실험적 Codex lead adapter 용 공유 runtime 만 설치하고 `~/.claude` 자산을 건너뜁니다. 전역 대화 메모리는 프로젝트와 분리된 `~/.okstra/memory-book/` 에 저장됩니다. 대상 프로젝트에는 task bundle 과 discovery metadata 가 `.okstra/` 아래 저장되고, **추가로 `<PROJECT_ROOT>/.claude/settings.local.json` 이 `~/.okstra/templates/settings.local.json` 을 가리키는 symlink 로 provisioning** 됩니다 (`okstra setup` 또는 `okstra-ctl` prepare 가 idempotent 하게 관리; 기존에 일반 파일이 있었다면 `.bak.<timestamp>` 로 백업 후 교체). 이 symlink 가 host Claude Code 세션에 자동 로드되어 codex/gemini worker wrapper 호출 권한을 부여하므로, 사용자의 글로벌 `~/.claude/settings.json` 은 건드리지 않습니다. 개발용 `okstra install --link <repo>` 는 설치 파일을 repo source로 symlink합니다.
|
|
21
|
+
- **User-home install + project-local task bundles**: `npx okstra@latest install --runtime claude-code` 한 명령이 런타임(`~/.okstra/{lib/python, bin, templates}`), 스킬 11종(`~/.claude/skills/<name>/SKILL.md`), worker agent 4종(`~/.claude/agents/*-worker.md`)을 설치합니다. `--runtime codex` 는 실험적 Codex lead adapter 용 공유 runtime 만 설치하고 `~/.claude` 자산을 건너뜁니다. 전역 대화 메모리는 프로젝트와 분리된 `~/.okstra/memory-book/` 에 저장됩니다. 대상 프로젝트에는 task bundle 과 discovery metadata 가 `.okstra/` 아래 저장되고, **추가로 `<PROJECT_ROOT>/.claude/settings.local.json` 이 `~/.okstra/templates/settings.local.json` 을 가리키는 symlink 로 provisioning** 됩니다 (`okstra setup` 또는 `okstra-ctl` prepare 가 idempotent 하게 관리; 기존에 일반 파일이 있었다면 `.bak.<timestamp>` 로 백업 후 교체). 이 symlink 가 host Claude Code 세션에 자동 로드되어 codex/gemini worker wrapper 호출 권한을 부여하므로, 사용자의 글로벌 `~/.claude/settings.json` 은 건드리지 않습니다. 개발용 `okstra install --link <repo>` 는 설치 파일을 repo source로 symlink합니다.
|
|
22
22
|
- **Resume and clarification**: `--task-key`, `--resume-clarification`, `--clarification-response`로 같은 task 재개와 lead의 추가 질문 응답 흐름을 지원합니다.
|
|
23
23
|
- **Derived views and telemetry**: final-report data.json → Markdown → slim MD / self-contained HTML view, worker error sidecar, wrapper log sidecar, token usage / cost accounting을 제공합니다.
|
|
24
24
|
|
package/docs/kr/cli.md
CHANGED
|
@@ -320,6 +320,18 @@ Lead runtime independence boundary:
|
|
|
320
320
|
|
|
321
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.
|
|
322
322
|
|
|
323
|
+
### Runtime auto-detection (`auto`)
|
|
324
|
+
|
|
325
|
+
`okstra run` 의 기본 runtime은 `auto` 입니다. `auto` 는 host 기반으로 `claude-code`, `codex`, `external` 중 하나로 resolve 됩니다 (`src/runtime-resolver.mjs`). 우선순위: 명시 runtime > `OKSTRA_RUNTIME_HOST` env > Claude Code skill handoff > tmux 가용 시 external > 그 외 fail-fast (safe fallback: 의도와 다른 runtime 으로 조용히 넘어가지 않음).
|
|
326
|
+
|
|
327
|
+
- Claude Code 안에서는 `/okstra-run` 이 front door 입니다. bare `okstra run` 은 Claude Code `TeamCreate` / `Agent(...)` 를 호출할 수 없습니다.
|
|
328
|
+
- Codex host: `okstra run` 이 `codex-run` -> `codex-dispatch` 를 orchestration 합니다.
|
|
329
|
+
- generic terminal + tmux: `okstra run` 이 `render-bundle --lead-runtime external` -> `okstra team dispatch` -> `okstra team await` 를 orchestration 합니다.
|
|
330
|
+
|
|
331
|
+
`okstra install` / `ensure-installed` / `doctor` / `render-bundle` 도 `auto` 를 기본값으로 받지만, host signal 이 없는 plain terminal 에서는 host 지정이 필요합니다. 그래서 Claude Code skill 들은 `--runtime claude-code` / `--lead-runtime claude-code` 를 명시합니다.
|
|
332
|
+
|
|
333
|
+
`installed-runtimes.json` 은 schemaVersion 2 로 `installRequest`, `runtimeResolution`, `installedRuntimes`, `installedAssets` 를 분리합니다. 이전 `codexAdapter` / `externalAdapter` 는 v1 manifest read 호환 경로에서만 해석됩니다.
|
|
334
|
+
|
|
323
335
|
Codex lead dry-run 은 `okstra codex-run <args...>` 를 쓰면 됩니다. 이 명령은 `--render-only --lead-runtime codex` 를 직접 붙이고, worker dispatch 없이 준비된 task bundle 과 lead prompt 를 출력합니다.
|
|
324
336
|
생성된 team-state / run-manifest / task-manifest 는 `leadEventsPath` 로 `runs/<task-type>/state/lead-events-<task-type>-<seq>.jsonl` 를 가리키며, render 단계는 `bundle-prepared` event 를 기록합니다.
|
|
325
337
|
이후 `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 후처리를 순서대로 수행합니다.
|
|
@@ -131,6 +131,8 @@ Runtime/install asset changes follow this checklist:
|
|
|
131
131
|
|
|
132
132
|
`--link <repo>` mode is for development and symlinks installed files back to repo sources.
|
|
133
133
|
|
|
134
|
+
`src/runtime-resolver.mjs` is the single reference point for runtime auto-detection. `okstra install` defaults to `--runtime auto`, records the request and resolution in `installed-runtimes.json` schemaVersion 2, and still copies the shared runtime payload from the installed package `runtime/` tree. Dynamic capabilities such as `tmux` and `codex` CLI availability are checked by `doctor` and `run`, not frozen into the install manifest. Claude Code skills pass explicit `--runtime claude-code` / `--lead-runtime claude-code` so they never depend on host auto-detection.
|
|
135
|
+
|
|
134
136
|
---
|
|
135
137
|
|
|
136
138
|
## 4. 폴더별 역할
|
|
@@ -390,8 +392,8 @@ Project-local `<PROJECT_ROOT>/.claude/settings.local.json` is provisioned as a s
|
|
|
390
392
|
|
|
391
393
|
### 7.1 First setup
|
|
392
394
|
|
|
393
|
-
1. `okstra install`
|
|
394
|
-
2. `okstra doctor`
|
|
395
|
+
1. `okstra install --runtime claude-code`
|
|
396
|
+
2. `okstra doctor --runtime claude-code`
|
|
395
397
|
3. inside target repo: `okstra setup --project-id <id>` or `/okstra-setup`
|
|
396
398
|
|
|
397
399
|
### 7.2 Brief creation
|