open-claude-p 1.1.2 → 1.2.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/CHANGELOG.md CHANGED
@@ -7,6 +7,339 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.2.1] — 2026-09-13
11
+
12
+ Re-sync with Claude Code 2.1.270 and the current model lineup, and fix a
13
+ permission regression introduced in 1.2.0.
14
+
15
+ ### Fixed
16
+
17
+ - **`--dangerously-skip-permissions=false` and `OCP_NO_SKIP_PERMS=1` were
18
+ being ignored.** Two faults stacked up. `forwardedRequestFields` omits
19
+ `false` values (there is no argv to emit for them), and `runOneShot`
20
+ resolves a missing field with `?? true` — so an opt-out reached the
21
+ driver as "unset" and came back out as "enabled". Underneath that sat
22
+ an older, latent bug: the CLI's opt-out test read
23
+ `options['dangerously-skip-permissions'] === false`, which is *also*
24
+ true for the pre-seeded default, so it fired on every invocation and
25
+ quietly turned the whole default-assignment block into dead code — the
26
+ default-on behaviour had been coming from the driver's `?? true` all
27
+ along. `parseArgv` now reports which options argv actually supplied
28
+ (`result.supplied`), the opt-out keys off that, and the CLI always
29
+ sends a concrete boolean. Net effect on defaults: none — a plain
30
+ `ocp "…"` still runs with permissions bypassed — but asking for the
31
+ bypass back now works.
32
+
33
+ ### Added
34
+
35
+ - **Claude Code 2.1.270 flags.**
36
+
37
+ | Flag | Purpose |
38
+ |------|---------|
39
+ | `--permission-prompts <host\|none>` | Who answers permission prompts; `none` denies rather than waiting |
40
+ | `--restricted` | Drop command/code-running tools and WebFetch, ignore user/project/local settings, confine file tools, refuse `bypassPermissions` |
41
+ | `--system-prompt-snapshot <on\|off>` | Record the system prompt once per conversation and reuse it verbatim, or re-render each request |
42
+
43
+ - **`--restricted` is wired to actually work headlessly.** Upstream
44
+ rejects it outright when `bypassPermissions` is in play ("Error:
45
+ bypassPermissions not supported in restricted mode") and exits, and
46
+ ocp's CLI turns `--dangerously-skip-permissions` on by default — so a
47
+ bare `ocp --restricted "…"` would have failed every time, silently,
48
+ with no output. Asking for restricted mode is an explicit choice to
49
+ keep the permission gates, so it now stands the permissive default
50
+ down and defaults `--permission-prompts` to `none`, which is the only
51
+ setting that keeps the run from waiting on a prompt no PTY can answer.
52
+ Passing `--restricted` together with an explicit
53
+ `--dangerously-skip-permissions` is reported as a validation error
54
+ instead of being handed to upstream to reject.
55
+
56
+ One caveat worth knowing: a restricted run writes no session JSONL, so
57
+ ocp cannot use its usual clean-transcript path and reconstructs the
58
+ reply from the TUI frames instead. The answer is correct, but it can
59
+ carry leftover box-border chrome — observed on roughly two runs in
60
+ three, against none for the same prompts without `--restricted`.
61
+
62
+ - **`parseArgv` returns `supplied`**, the set of canonical option names
63
+ present in argv. Defaults are pre-seeded into `options`, so this is the
64
+ only way to tell `--flag=false` apart from an unset flag.
65
+
66
+ ### Changed
67
+
68
+ - **Model references refreshed to the current lineup.** Claude Fable 5.1
69
+ (`claude-fable-5-1`) supersedes Claude Fable 5 in the documented
70
+ examples; `claude-opus-5` remains the general-purpose recommendation.
71
+ Aliases (`fable`, `opus`, `sonnet`, `haiku`) resolve to the latest
72
+ model in each family and are unaffected. Verified against the upstream
73
+ model list and the 2.1.270 binary, which ships both `claude-fable-5-1`
74
+ and `claude-mythos-5-1`.
75
+
76
+ ### Verified
77
+
78
+ - The 2.1.270 option surface was re-diffed against `OPTION_SPEC`: no
79
+ previously-forwarded flag was removed, and the remaining unmapped
80
+ flags (`--bg`, `--cloud`, `--environment`, `--from-pr`,
81
+ `--remote-control`, `--teleport`, `--tmux`, `--worktree`, `--chrome`)
82
+ are interactive or cloud-session features outside a headless shim's
83
+ scope.
84
+
85
+ ---
86
+
87
+ ## [1.2.0] — 2026-08-21
88
+
89
+ Realign the option surface with Claude Code 2.1.x. The headline is a
90
+ forwarding bug: roughly thirty documented flags parsed cleanly, passed
91
+ validation, appeared in `ocp --help`, and were then silently discarded
92
+ before the upstream `claude` process ever saw them.
93
+
94
+ ### Fixed
95
+
96
+ - **Flags declared in `OPTION_SPEC` are no longer dropped on the way to
97
+ the upstream process.** `buildSpawnArgs()` has always been
98
+ spec-driven — it walks `OPTION_SPEC` and emits `--flag value` for
99
+ every entry whose `forward.type` is `'argv'`, reading
100
+ `req[camelCase(spec.name)]`. The other half of that contract was
101
+ hand-maintained: each call site in `bin/cli.js` listed the request
102
+ fields it cared about. The two halves drifted, and everything the
103
+ hand-written list had never picked up went nowhere:
104
+
105
+ `--effort`, `--thinking`, `--max-thinking-tokens`, `--fallback-model`,
106
+ `--tools`, `--add-dir`, `--mcp-config`, `--strict-mcp-config`,
107
+ `--permission-prompt-tool`, `--system-prompt-file`,
108
+ `--append-system-prompt-file`, `--settings`, `--setting-sources`,
109
+ `--agents`, `--agent`, `--plugin-dir`, `--disable-slash-commands`,
110
+ `--file`, `--ide`, `--betas`, `--bare`, `--init`, `--init-only`,
111
+ `--maintenance`, `--debug-file`, `--workload`, `--enable-auth-status`,
112
+ `--allow-dangerously-skip-permissions`, `--include-hook-events`, and
113
+ `--include-partial-messages`.
114
+
115
+ There was no error and no warning — `ocp --effort high "…"` ran at
116
+ the upstream default effort and reported success. The mapping now
117
+ comes from the same spec that produces the argv
118
+ (`src/options/forward.js`), across all three request paths (daemon,
119
+ print-mode, and the PTY path), so appending an entry to `OPTION_SPEC`
120
+ is once again the only edit a newly-supported flag needs.
121
+
122
+ - **A concurrent session in the same directory could answer for this
123
+ one.** Two independent defects lined up to produce it, and both are
124
+ fixed:
125
+
126
+ `findRecentSessionId` is the filesystem fallback that recovers a
127
+ session id when none was scraped from the PTY. It accepted two classes
128
+ of candidate — files created during the request, and pre-existing files
129
+ whose mtime moved during it (the `--resume` append) — then ranked them
130
+ together by mtime and took the newest. A background daemon holding a
131
+ warm PTY in the same cwd appends to its own JSONL continuously, so it
132
+ reliably out-raced the file the current spawn had just created. The
133
+ wrong id then flowed into `readSessionText`, whose strict-by-id path
134
+ faithfully returned that other session's transcript as this request's
135
+ answer. Newly-created files now win outright; the append class is
136
+ consulted only when nothing new appeared, which is exactly the
137
+ `--resume` case it exists for.
138
+
139
+ `readSessionText` has a second path, used when no session id is known
140
+ at all, that scans the project directory and takes the most recently
141
+ modified transcript. Its own source comments describe why that is
142
+ unsafe — it is why the by-id path refuses to fall back to a scan — but
143
+ the CLI reached it on every run where the id was missing. It now
144
+ accepts an `expectPrompt` option and requires a candidate transcript to
145
+ actually contain the prompt that was sent before returning its text;
146
+ the CLI always supplies it. Ownership beats recency, so our own
147
+ transcript is still found even when a neighbour is newer, and when
148
+ nothing matches the caller falls back to the PTY-extracted text as
149
+ before. Callers that omit the option keep the previous behaviour.
150
+
151
+ - **`--include-partial-messages` is no longer forwarded on the PTY
152
+ path.** Upstream refuses it without `--print` ("Error:
153
+ --include-partial-messages requires --print and
154
+ --output-format=stream-json") and exits immediately, so forwarding it
155
+ to the interactive spawn failed the whole run. OPTION_SPEC gains a
156
+ `printModeOnly` field for this class of flag; ocp already synthesises
157
+ `assistant-partial` events from the TUI frames, so nothing is lost.
158
+
159
+ - **`--agents` reaches upstream as JSON again.** It is a `json`-kind
160
+ option, so `parseArgv` stores it already parsed and `buildSpawnArgs`'s
161
+ `String(value)` turned it into the literal `[object Object]`. Upstream
162
+ accepts that token without complaint and simply defines no agents, so
163
+ the flag failed silently. `json`-kind values are now re-serialised, and
164
+ a value supplied as raw JSON text is passed through unchanged rather
165
+ than double-encoded.
166
+
167
+ - **`--effort xhigh` is accepted.** Upstream's levels are `low`,
168
+ `medium`, `high`, `xhigh`, `max`; ocp's enum was missing `xhigh`, so
169
+ the value most appropriate for coding and agentic work was rejected
170
+ at parse time.
171
+
172
+ - **`--permission-mode manual` is accepted.** Upstream renamed the
173
+ prompt-on-every-tool mode from `default` to `manual`; ocp's validator
174
+ still had the old name only, so the current spelling was refused. Both
175
+ are accepted now — upstream continues to take `default`, so removing
176
+ it would have broken existing callers for no gain.
177
+
178
+ - **The `env:` field in `OPTION_SPEC` does something.** It has been part
179
+ of the documented entry shape since 1.0 but nothing ever read it; the
180
+ two options that used it were wired up by hand at their call sites, so
181
+ any new entry declaring `env` silently had no effect. `parseArgv` now
182
+ applies it, with the precedence the hand-rolled versions already used:
183
+ **explicit argv > environment variable > spec default**. An explicit
184
+ `--print-mode=false` beats a set `OCP_PRINT_MODE=1`. Booleans read
185
+ `1` / `true` / `yes` / `on` as on; everything else, including the
186
+ empty string, leaves the default in place.
187
+
188
+ ### Added
189
+
190
+ - **Upstream flags introduced since the spec was last synced.** All
191
+ forwarded verbatim:
192
+
193
+ | Flag | Purpose |
194
+ |------|---------|
195
+ | `--autocompact <auto\|tokens>` | Auto-compact window size (`auto`, or 100k–1M) |
196
+ | `--exclude-dynamic-system-prompt-sections` | Move per-machine sections out of the system prompt so the cached prefix is stable across machines |
197
+ | `--forward-subagent-text` | Forward subagent text/thinking as messages with `parent_tool_use_id` |
198
+ | `--prompt-suggestions` | Emit a `prompt_suggestion` event carrying a predicted next prompt |
199
+ | `--plugin-url <url…>` | Fetch a plugin `.zip` from a URL for this session |
200
+ | `--safe-mode` | Start with all customizations disabled |
201
+ | `--ax-screen-reader` | Screen-reader friendly TUI output |
202
+ | `--brief` | Enable the SendUserMessage tool |
203
+
204
+ - **`--ax-screen-reader` is worth knowing about even if you do not need
205
+ accessibility.** It asks the upstream TUI for flat text with no
206
+ decorative borders and no animations. ocp reconstructs its answer by
207
+ scraping TUI frames, so there is simply less chrome for the parsers to
208
+ strip. It stays **opt-in** (flag, or `OCP_AX_SCREEN_READER=1`) because
209
+ it changes the captured frame shape, and this release does not alter
210
+ any default.
211
+
212
+ - **New cross-flag validation.** `--forward-subagent-text` and
213
+ `--prompt-suggestions` both require `--output-format=stream-json`
214
+ (upstream only emits them on that channel, and the text/json adapters
215
+ have nowhere to put them). `--autocompact` is checked for `auto` or a
216
+ token budget in the 100k–1M range, accepting a `k`/`m` suffix.
217
+
218
+ - **`buildSpawnArgs` is exported from `open-claude-p`.** It was already
219
+ a pure function; exporting it lets the spec → request-field → argv
220
+ round-trip be asserted directly in tests.
221
+
222
+ ### Security
223
+
224
+ - **`--plugin-url` added to the `passThroughArgv` deny-list.** It loads
225
+ untrusted plugin code exactly like `--plugin-dir`, which was already
226
+ listed, so it belongs in the same group.
227
+
228
+ - **`redactArgvForLog` now redacts every value of a variadic sensitive
229
+ flag, not just the first.** `--mcp-config` takes multiple tokens and
230
+ inline MCP JSON routinely carries server credentials; only the first
231
+ token was masked, so a `--debug` run could print a secret to stderr
232
+ and from there into a CI log or a pasted bug report. Previously
233
+ unreachable from the CLI, because `--mcp-config` was one of the flags
234
+ being dropped.
235
+
236
+ - **Wiring the dropped flags up widens what an argv-splicing wrapper
237
+ exposes, and that is now documented.** ocp treats its own command line
238
+ as trusted; the deny-list guards only *unrecognised* argv forwarded
239
+ through `passThroughArgv` and has never covered ocp's own spec flags.
240
+ A wrapper that splices untrusted text into ocp's argv was already
241
+ unsafe — `--system-prompt`, `--append-system-prompt` and
242
+ `--allowed-tools` have always been forwarded and the CLI defaults
243
+ `--dangerously-skip-permissions` to on — but the newly-wired flags
244
+ turn that from model-mediated influence into direct process
245
+ execution. `docs/cli-reference.md` gains a **Never splice untrusted
246
+ input into ocp's argv** section with the safe pattern. The flags are
247
+ deliberately *not* gated behind an env var: they are documented,
248
+ first-class options, and hiding them would re-break exactly what this
249
+ release fixes.
250
+
251
+ ### Tests
252
+
253
+ - `test/forward.test.js` (39 new tests). The central one walks
254
+ `OPTION_SPEC` itself and asserts that every argv-forwarding entry
255
+ survives the trip to the spawn argv, so a flag added to the spec is
256
+ covered the moment it is declared rather than whenever someone
257
+ remembers to extend a hand-written list. The rest pin the specific
258
+ flags that regressed, the refreshed `--effort` / `--permission-mode`
259
+ surfaces, the new validation rules, and env-var precedence.
260
+
261
+ ### Documentation
262
+
263
+ - `docs/cli-reference.md` gains the model & behaviour flags
264
+ (`--effort`, `--thinking`, `--fallback-model`, `--autocompact`,
265
+ `--exclude-dynamic-system-prompt-sections`), a **Config, plugins &
266
+ MCP** section covering the flags that were being dropped, the
267
+ permission-mode values, the new lifecycle flags, and the env-var
268
+ precedence rule.
269
+ - Model examples across `README.md`, `README.ko.md`, `README.ja.md`,
270
+ `README.zh.md`, `docs/cli-reference.md`, and the spec's own help text
271
+ moved off retired ids onto current ones (`claude-opus-5`,
272
+ `claude-fable-5`) and the current aliases (`fable`, `opus`, `sonnet`,
273
+ `haiku`).
274
+
275
+ ### Internal
276
+
277
+ - Two comments in `bin/cli.js` used a non-English example prompt, which
278
+ the project's contribution rules forbid in committed files. Replaced
279
+ with English equivalents.
280
+
281
+ ---
282
+
283
+ ## [1.1.3] — 2026-05-19
284
+
285
+ Fix the `/compact` 24-hour hang and tighten the slash-command path so
286
+ skill invocations are not collateral damage. Driven by a captured
287
+ session (`4af68584-…`) where a manually-triggered `/compact` ran for
288
+ 57 s of compaction activity, returned to the input box with no
289
+ assistant turn, and left `runOneShot` waiting for a sentinel that — by
290
+ the upstream's design — could never arrive.
291
+
292
+ ### Fixed
293
+
294
+ - **`/compact` and other local-builtin slash commands no longer block
295
+ for `maxResponseMs`.** Claude TUI splits `/`-prefixed prompts into
296
+ two classes: *local builtins* (`/compact`, `/clear`, `/help`,
297
+ `/exit`, `/quit`, `/login`, `/logout`, `/cost`, `/status`, `/model`,
298
+ `/permissions`, `/config`) which run a local handler and never open
299
+ an `⏺` region, and *LLM-bearing slash invocations* (skills like
300
+ `/init`, `/review`, `/security-review`, plus every user-installed
301
+ skill) which DO go through the model. The driver previously
302
+ appended the OCP_END marker instruction to both and required
303
+ `hadAssistantText` before the completion detector's idle fallback
304
+ could fire — fine for the LLM-bearing class, fatal for builtins,
305
+ which would wait for an assistant region that never opened until
306
+ the 24 h hard timeout.
307
+
308
+ Now `runOneShot` matches the prompt against a narrow whitelist of
309
+ local builtins. On a match it (a) skips the OCP_END instruction
310
+ append (the TUI's command parser drops it as junk args anyway, and
311
+ appending it can pollute free-form-arg commands like `/bug`) and
312
+ (b) sets the detector's new `allowIdleWithoutResponse` flag so the
313
+ pre-sentinel idle path is reachable without a prior region entry.
314
+ Skills and unknown `/<name>` prompts are NOT in the whitelist and
315
+ keep the existing instruction + strict-idle-gate behaviour, so
316
+ their LLM responses still complete cleanly via the sentinel.
317
+
318
+ ### Added
319
+
320
+ - **`CompletionDetector.allowIdleWithoutResponse` (default false).**
321
+ When true, `_onTick`'s pre-sentinel idle fallback fires after
322
+ `preIdleMs` of silence even without a prior `assistant-region-
323
+ entered`. This is the policy switch the driver uses for local
324
+ builtins; library callers that drive prompts known to produce no
325
+ assistant turn can opt in directly.
326
+
327
+ ### Tests
328
+
329
+ - **End-to-end integration coverage for the slash-command path.**
330
+ `test/driver-slash-command.test.js` spawns the real driver against
331
+ `test/fixtures/fake-claude-tui.mjs` — a minimal node-pty fixture
332
+ that reproduces the captured `/compact` shape (spinner activity,
333
+ `Compacted` stdout, chevron return, no region, no sentinel) — and
334
+ asserts: `/compact` completes via `reason='idle'` in well under
335
+ `maxResponseMs`; a plain prompt still completes via `sentinel` with
336
+ no degraded-capture notice prefix; `/init` (a skill, not a builtin)
337
+ also completes via `sentinel`, proving the whitelist isn't too
338
+ greedy. Three new unit tests in `test/detector.test.js` cover the
339
+ bare `allowIdleWithoutResponse` flag.
340
+
341
+ ---
342
+
10
343
  ## [1.1.2] — 2026-05-19
11
344
 
12
345
  Recovery-path fixes for the sentinel-missing case. When the end-of-reply
package/README.ja.md CHANGED
@@ -174,7 +174,7 @@ ocp --output-format stream-json "こんにちは"
174
174
 
175
175
  # モデルを指定
176
176
  ocp --model sonnet "複雑な質問..."
177
- ocp --model claude-opus-4-7 "アーキテクチャレビュー..."
177
+ ocp --model claude-opus-5 "アーキテクチャレビュー..."
178
178
 
179
179
  # システムプロンプトを追加
180
180
  ocp --append-system-prompt "常に日本語で答えてください" "what's the weather?"
@@ -290,7 +290,7 @@ const result = await driver.runOneShot({
290
290
 
291
291
  // ── モデル / 動作 ────────────────────────────
292
292
  model: 'sonnet', // モデル名
293
- effort: 'high', // 'low' | 'medium' | 'high' | 'max'
293
+ effort: 'high', // 'low' | 'medium' | 'high' | 'xhigh' | 'max'
294
294
  thinking: 'adaptive', // 'enabled' | 'adaptive' | 'disabled'
295
295
  maxTurns: 5, // 最大エージェントターン数(shim 強制)
296
296
 
@@ -634,7 +634,7 @@ OCP_NO_DAEMON=1 ocp "一度だけ実行"
634
634
 
635
635
  | req フィールド | CLI フラグ | 型 | 説明 |
636
636
  |-------------|---------|---|------|
637
- | `model` | `--model` | string | モデル名(例:`sonnet`、`claude-sonnet-4-6`) |
637
+ | `model` | `--model` | string | モデル名(例:`sonnet`、`claude-opus-5`) |
638
638
  | `systemPrompt` | `--system-prompt` | string | システムプロンプト全体を置換 |
639
639
  | `appendSystemPrompt` | `--append-system-prompt` | string | デフォルトシステムプロンプトに追加 |
640
640
  | `dangerouslySkipPermissions` | `--dangerously-skip-permissions` | boolean | 権限チェックをスキップ |
@@ -645,11 +645,11 @@ OCP_NO_DAEMON=1 ocp "一度だけ実行"
645
645
  | `forkSession` | `--fork-session` | boolean | 再開時に新しいセッション ID を作成 |
646
646
  | `sessionId` | `--session-id` | string | 新しいセッションに特定の UUID を指定 |
647
647
  | `noSessionPersistence` | `--no-session-persistence` | boolean | セッション保存を無効化 |
648
- | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `max` |
648
+ | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `xhigh` \| `max` |
649
649
  | `thinking` | `--thinking` | enum | `enabled` \| `adaptive` \| `disabled` |
650
650
  | `maxTurns` | `--max-turns` | number | 最大エージェントターン数 |
651
651
  | `fallbackModel` | `--fallback-model` | string | プライマリモデル過負荷時のフォールバック |
652
- | `permissionMode` | `--permission-mode` | string | `default` \| `plan` \| `acceptEdits` \| `bypassPermissions` |
652
+ | `permissionMode` | `--permission-mode` | string | `acceptEdits` \| `auto` \| `bypassPermissions` \| `manual` \| `dontAsk` \| `plan` |
653
653
  | `mcpConfig` | `--mcp-config` | string[] | MCP 設定パス |
654
654
  | `addDir` | `--add-dir` | string[] | ツールがアクセスできる追加ディレクトリ |
655
655
  | `bare` | `--bare` | boolean | 最小モード(hooks、LSP、プラグインなどを無効化) |
package/README.ko.md CHANGED
@@ -169,7 +169,7 @@ ocp --output-format stream-json "안녕"
169
169
 
170
170
  # 모델 지정
171
171
  ocp --model sonnet "복잡한 질문..."
172
- ocp --model claude-opus-4-7 "설계 리뷰..."
172
+ ocp --model claude-opus-5 "설계 리뷰..."
173
173
 
174
174
  # 시스템 프롬프트 추가
175
175
  ocp --append-system-prompt "항상 한국어로 답변하세요" "what's the weather?"
@@ -285,7 +285,7 @@ const result = await driver.runOneShot({
285
285
 
286
286
  // ── 모델 / 동작 ──────────────────────────
287
287
  model: 'sonnet', // 모델 지정
288
- effort: 'high', // 'low' | 'medium' | 'high' | 'max'
288
+ effort: 'high', // 'low' | 'medium' | 'high' | 'xhigh' | 'max'
289
289
  thinking: 'adaptive', // 'enabled' | 'adaptive' | 'disabled'
290
290
  maxTurns: 5, // 최대 에이전트 턴 수 (shim 강제)
291
291
 
@@ -634,7 +634,7 @@ OCP_NO_DAEMON=1 ocp "한 번만 실행"
634
634
 
635
635
  | req 필드 | CLI 플래그 | 타입 | 설명 |
636
636
  |----------|-----------|------|------|
637
- | `model` | `--model` | string | 모델 이름 (예: `sonnet`, `claude-sonnet-4-6`) |
637
+ | `model` | `--model` | string | 모델 이름 (예: `sonnet`, `claude-opus-5`) |
638
638
  | `systemPrompt` | `--system-prompt` | string | 시스템 프롬프트 전체 대체 |
639
639
  | `appendSystemPrompt` | `--append-system-prompt` | string | 기본 시스템 프롬프트에 추가 |
640
640
  | `dangerouslySkipPermissions` | `--dangerously-skip-permissions` | boolean | 권한 검사 건너뜀 |
@@ -645,11 +645,11 @@ OCP_NO_DAEMON=1 ocp "한 번만 실행"
645
645
  | `forkSession` | `--fork-session` | boolean | resume 시 새 세션 ID 생성 |
646
646
  | `sessionId` | `--session-id` | string | 새 세션에 특정 UUID 지정 |
647
647
  | `noSessionPersistence` | `--no-session-persistence` | boolean | 세션 저장 비활성화 |
648
- | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `max` |
648
+ | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `xhigh` \| `max` |
649
649
  | `thinking` | `--thinking` | enum | `enabled` \| `adaptive` \| `disabled` |
650
650
  | `maxTurns` | `--max-turns` | number | 최대 에이전트 턴 수 |
651
651
  | `fallbackModel` | `--fallback-model` | string | 기본 모델 과부하 시 폴백 |
652
- | `permissionMode` | `--permission-mode` | string | `default` \| `plan` \| `acceptEdits` \| `bypassPermissions` |
652
+ | `permissionMode` | `--permission-mode` | string | `acceptEdits` \| `auto` \| `bypassPermissions` \| `manual` \| `dontAsk` \| `plan` |
653
653
  | `mcpConfig` | `--mcp-config` | string[] | MCP 설정 경로 |
654
654
  | `addDir` | `--add-dir` | string[] | 도구가 접근할 추가 디렉토리 |
655
655
  | `bare` | `--bare` | boolean | 최소 모드 (hooks, LSP, 플러그인 등 비활성) |
package/README.md CHANGED
@@ -192,7 +192,7 @@ ocp --output-format stream-json "Hi"
192
192
 
193
193
  # Specify model
194
194
  ocp --model sonnet "Complex question..."
195
- ocp --model claude-opus-4-7 "Architecture review..."
195
+ ocp --model claude-opus-5 "Architecture review..."
196
196
 
197
197
  # Append system prompt
198
198
  ocp --append-system-prompt "Always reply in English" "what's the weather?"
@@ -413,7 +413,7 @@ const result = await driver.runOneShot({
413
413
 
414
414
  // ── Model / Behavior ──────────────────────────
415
415
  model: 'sonnet', // model name
416
- effort: 'high', // 'low' | 'medium' | 'high' | 'max'
416
+ effort: 'high', // 'low' | 'medium' | 'high' | 'xhigh' | 'max'
417
417
  thinking: 'adaptive', // 'enabled' | 'adaptive' | 'disabled'
418
418
  maxTurns: 5, // max agent turns (shim-enforced)
419
419
 
@@ -747,7 +747,7 @@ appears below; the canonical, fully-described table is in
747
747
 
748
748
  | req field | CLI flag | Type | Description |
749
749
  |-----------|----------|------|-------------|
750
- | `model` | `--model` | string | Model name (e.g. `sonnet`, `claude-sonnet-4-6`) |
750
+ | `model` | `--model` | string | Model name (e.g. `sonnet`, `claude-opus-5`) |
751
751
  | `systemPrompt` | `--system-prompt` | string | Replace entire system prompt |
752
752
  | `appendSystemPrompt` | `--append-system-prompt` | string | Append to default system prompt |
753
753
  | `dangerouslySkipPermissions` | `--dangerously-skip-permissions` | boolean | Skip permission checks |
@@ -758,14 +758,19 @@ appears below; the canonical, fully-described table is in
758
758
  | `forkSession` | `--fork-session` | boolean | Create new session ID on resume |
759
759
  | `sessionId` | `--session-id` | string | Assign a specific UUID to the new session |
760
760
  | `noSessionPersistence` | `--no-session-persistence` | boolean | Disable session saving |
761
- | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `max` |
761
+ | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `xhigh` \| `max` |
762
762
  | `thinking` | `--thinking` | enum | `enabled` \| `adaptive` \| `disabled` |
763
763
  | `maxTurns` | `--max-turns` | number | Maximum agent turns |
764
764
  | `fallbackModel` | `--fallback-model` | string | Fallback when primary model is overloaded |
765
- | `permissionMode` | `--permission-mode` | string | `default` \| `plan` \| `acceptEdits` \| `bypassPermissions` |
765
+ | `permissionMode` | `--permission-mode` | string | `acceptEdits` \| `auto` \| `bypassPermissions` \| `manual` \| `dontAsk` \| `plan` |
766
766
  | `mcpConfig` | `--mcp-config` | string[] | MCP config paths |
767
767
  | `addDir` | `--add-dir` | string[] | Additional directories tools can access |
768
768
  | `bare` | `--bare` | boolean | Minimal mode (disables hooks, LSP, plugins, etc.) |
769
+ | `autocompact` | `--autocompact` | string | Auto-compact window: `auto`, or 100k–1M tokens |
770
+ | `safeMode` | `--safe-mode` | boolean | Start with all customizations disabled |
771
+ | `axScreenReader` | `--ax-screen-reader` | boolean | Flat, animation-free TUI output — less chrome for the parsers to strip |
772
+ | `forwardSubagentText` | `--forward-subagent-text` | boolean | Forward subagent text/thinking as messages (stream-json only) |
773
+ | `excludeDynamicSystemPromptSections` | `--exclude-dynamic-system-prompt-sections` | boolean | Keep the cached prompt prefix stable across machines |
769
774
  | `debug` | `--debug` | boolean | Print debug logs to stderr |
770
775
  | `verbose` | `--verbose` | boolean | Verbose output |
771
776
  | `cwd` | `--cwd` | string | PTY process working directory |
package/README.zh.md CHANGED
@@ -164,7 +164,7 @@ ocp --output-format stream-json "你好"
164
164
 
165
165
  # 指定模型
166
166
  ocp --model sonnet "复杂问题..."
167
- ocp --model claude-opus-4-7 "架构评审..."
167
+ ocp --model claude-opus-5 "架构评审..."
168
168
 
169
169
  # 添加系统提示
170
170
  ocp --append-system-prompt "始终用中文回答" "what's the weather?"
@@ -280,7 +280,7 @@ const result = await driver.runOneShot({
280
280
 
281
281
  // ── 模型 / 行为 ──────────────────────────────
282
282
  model: 'sonnet', // 模型名称
283
- effort: 'high', // 'low' | 'medium' | 'high' | 'max'
283
+ effort: 'high', // 'low' | 'medium' | 'high' | 'xhigh' | 'max'
284
284
  thinking: 'adaptive', // 'enabled' | 'adaptive' | 'disabled'
285
285
  maxTurns: 5, // 最大代理轮次(shim 强制)
286
286
 
@@ -624,7 +624,7 @@ OCP_NO_DAEMON=1 ocp "只运行一次"
624
624
 
625
625
  | req 字段 | CLI 标志 | 类型 | 说明 |
626
626
  |---------|---------|------|------|
627
- | `model` | `--model` | string | 模型名称(如 `sonnet`、`claude-sonnet-4-6`) |
627
+ | `model` | `--model` | string | 模型名称(如 `sonnet`、`claude-opus-5`) |
628
628
  | `systemPrompt` | `--system-prompt` | string | 替换整个系统提示 |
629
629
  | `appendSystemPrompt` | `--append-system-prompt` | string | 追加到默认系统提示 |
630
630
  | `dangerouslySkipPermissions` | `--dangerously-skip-permissions` | boolean | 跳过权限检查 |
@@ -635,11 +635,11 @@ OCP_NO_DAEMON=1 ocp "只运行一次"
635
635
  | `forkSession` | `--fork-session` | boolean | 恢复时创建新的会话 ID |
636
636
  | `sessionId` | `--session-id` | string | 为新会话指定特定 UUID |
637
637
  | `noSessionPersistence` | `--no-session-persistence` | boolean | 禁用会话保存 |
638
- | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `max` |
638
+ | `effort` | `--effort` | enum | `low` \| `medium` \| `high` \| `xhigh` \| `max` |
639
639
  | `thinking` | `--thinking` | enum | `enabled` \| `adaptive` \| `disabled` |
640
640
  | `maxTurns` | `--max-turns` | number | 最大代理轮次 |
641
641
  | `fallbackModel` | `--fallback-model` | string | 主模型过载时的备用模型 |
642
- | `permissionMode` | `--permission-mode` | string | `default` \| `plan` \| `acceptEdits` \| `bypassPermissions` |
642
+ | `permissionMode` | `--permission-mode` | string | `acceptEdits` \| `auto` \| `bypassPermissions` \| `manual` \| `dontAsk` \| `plan` |
643
643
  | `mcpConfig` | `--mcp-config` | string[] | MCP 配置路径 |
644
644
  | `addDir` | `--add-dir` | string[] | 工具可访问的附加目录 |
645
645
  | `bare` | `--bare` | boolean | 最小模式(禁用 hooks、LSP、插件等) |