open-claude-p 1.1.3 → 1.2.2

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,348 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.2.2] — 2026-09-13
11
+
12
+ Fixes the two defects listed as known issues in 1.2.1. Both were
13
+ pre-existing — they predate the 1.2.x work — and both were tracked to
14
+ root cause before anything was changed.
15
+
16
+ ### Fixed
17
+
18
+ - **Replies lost every space between words.** The upstream TUI does not
19
+ emit literal spaces between words on a redraw; it positions each word
20
+ with an absolute column move and lets the terminal leave the gap blank:
21
+
22
+ ```
23
+ A\x1b[5Gpseudoterminal\x1b[20Gis\x1b[23Ga\x1b[25Gsoftware
24
+ ```
25
+
26
+ `ansi-strip` translated only CUF (`ESC [ Pn C`) into spaces. CHA
27
+ (`ESC [ Pn G`) — which the current CLI uses for nearly every word — was
28
+ deleted by the general CSI strip, so the reply came back as
29
+ `Apseudoterminalisasoftware…`. The parser now tracks the cursor column
30
+ and expands any forward horizontal move, CUF and CHA alike, into the
31
+ run of spaces it would have left on screen. CUP (`H`/`f`) adopts the
32
+ column without padding, since it is a jump to another region rather
33
+ than a gap.
34
+
35
+ - **The CLI printed the TUI's spinner cell and usage meters around the
36
+ answer.** `cleanResponse` exists as the last line of defence for
37
+ PTY-extracted text — its own docstring says so — but only the chat
38
+ client ever called it. The CLI printed raw PTY text whenever the
39
+ upstream session file was unavailable, which is exactly when the scrub
40
+ is needed. Both CLI paths now scrub, and the pattern set gained the
41
+ rate-limit meters (`Usage ██░░ 16% (resets in 3h)`), the bare context
42
+ meter, and the spinner status cell with its token counters (`63✢ 88`).
43
+ Guards keep real prose intact: meters must carry bar glyphs, counter
44
+ cells must carry a digit beside the glyph and the multi-space padding
45
+ the TUI uses, and a reply that is legitimately just a number ("what is
46
+ 6*7" → "42") is never swallowed.
47
+
48
+ - **Sessions started from inside a Claude Code session were never
49
+ persisted.** When `ocp` itself runs under Claude Code — an agent
50
+ driving it, or a developer testing from one — the spawned `claude`
51
+ inherited the caller's session identity, most decisively
52
+ `CLAUDE_CODE_CHILD_SESSION`, and concluded it was a continuation of the
53
+ parent rather than a new session. It then wrote no session JSONL at
54
+ all: `sessionId` came back `null`, the clean transcript ocp prefers was
55
+ unavailable so every answer fell back to PTY-scraped text, and
56
+ `--continue` / `--resume` had nothing to resume. The driver now removes
57
+ the caller's session-identity variables when spawning. User-facing
58
+ configuration (`CLAUDE_CODE_SIMPLE`, `CLAUDE_CODE_SAFE_MODE`, provider
59
+ toggles, …) is untouched, an explicit value in `opts.env` still wins,
60
+ and `OCP_KEEP_PARENT_SESSION_ENV=1` restores the old behaviour.
61
+
62
+ ### Tests
63
+
64
+ - 237 → 243. New coverage: `test/ansi-cha.test.js` (absolute column moves,
65
+ including the verbatim byte sequence captured off the wire) and
66
+ `test/parent-session-env.test.js`. `test/clean-response.test.js` gains
67
+ the meter, spinner-cell and numeric-answer cases.
68
+
69
+ ### Verification
70
+
71
+ Each fix was reproduced first, then confirmed against the real CLI:
72
+ replaying the captured session through the parser now yields the sentence
73
+ with its spacing intact; a warm-daemon second turn prints the answer with
74
+ no chrome; and `--continue` recalls a word from the previous turn, which
75
+ it could not do before.
76
+
77
+ ---
78
+
79
+ ## [1.2.1] — 2026-09-13
80
+
81
+ Re-sync with Claude Code 2.1.270 and the current model lineup, and fix a
82
+ permission regression introduced in 1.2.0.
83
+
84
+ ### Fixed
85
+
86
+ - **`--dangerously-skip-permissions=false` and `OCP_NO_SKIP_PERMS=1` were
87
+ being ignored.** Two faults stacked up. `forwardedRequestFields` omits
88
+ `false` values (there is no argv to emit for them), and `runOneShot`
89
+ resolves a missing field with `?? true` — so an opt-out reached the
90
+ driver as "unset" and came back out as "enabled". Underneath that sat
91
+ an older, latent bug: the CLI's opt-out test read
92
+ `options['dangerously-skip-permissions'] === false`, which is *also*
93
+ true for the pre-seeded default, so it fired on every invocation and
94
+ quietly turned the whole default-assignment block into dead code — the
95
+ default-on behaviour had been coming from the driver's `?? true` all
96
+ along. `parseArgv` now reports which options argv actually supplied
97
+ (`result.supplied`), the opt-out keys off that, and the CLI always
98
+ sends a concrete boolean. Net effect on defaults: none — a plain
99
+ `ocp "…"` still runs with permissions bypassed — but asking for the
100
+ bypass back now works.
101
+
102
+ ### Added
103
+
104
+ - **Claude Code 2.1.270 flags.**
105
+
106
+ | Flag | Purpose |
107
+ |------|---------|
108
+ | `--permission-prompts <host\|none>` | Who answers permission prompts; `none` denies rather than waiting |
109
+ | `--restricted` | Drop command/code-running tools and WebFetch, ignore user/project/local settings, confine file tools, refuse `bypassPermissions` |
110
+ | `--system-prompt-snapshot <on\|off>` | Record the system prompt once per conversation and reuse it verbatim, or re-render each request |
111
+
112
+ - **`--restricted` is wired to actually work headlessly.** Upstream
113
+ rejects it outright when `bypassPermissions` is in play ("Error:
114
+ bypassPermissions not supported in restricted mode") and exits, and
115
+ ocp's CLI turns `--dangerously-skip-permissions` on by default — so a
116
+ bare `ocp --restricted "…"` would have failed every time, silently,
117
+ with no output. Asking for restricted mode is an explicit choice to
118
+ keep the permission gates, so it now stands the permissive default
119
+ down and defaults `--permission-prompts` to `none`, which is the only
120
+ setting that keeps the run from waiting on a prompt no PTY can answer.
121
+ Passing `--restricted` together with an explicit
122
+ `--dangerously-skip-permissions` is reported as a validation error
123
+ instead of being handed to upstream to reject.
124
+
125
+ One caveat worth knowing: a restricted run writes no session JSONL, so
126
+ ocp cannot use its usual clean-transcript path and reconstructs the
127
+ reply from the TUI frames instead. The answer is correct, but it can
128
+ carry leftover box-border chrome — observed on roughly two runs in
129
+ three, against none for the same prompts without `--restricted`.
130
+
131
+ - **`parseArgv` returns `supplied`**, the set of canonical option names
132
+ present in argv. Defaults are pre-seeded into `options`, so this is the
133
+ only way to tell `--flag=false` apart from an unset flag.
134
+
135
+ ### Changed
136
+
137
+ - **Model references refreshed to the current lineup.** Claude Fable 5.1
138
+ (`claude-fable-5-1`) supersedes Claude Fable 5 in the documented
139
+ examples; `claude-opus-5` remains the general-purpose recommendation.
140
+ Aliases (`fable`, `opus`, `sonnet`, `haiku`) resolve to the latest
141
+ model in each family and are unaffected. Verified against the upstream
142
+ model list and the 2.1.270 binary, which ships both `claude-fable-5-1`
143
+ and `claude-mythos-5-1`.
144
+
145
+ ### Verified
146
+
147
+ - The 2.1.270 option surface was re-diffed against `OPTION_SPEC`: no
148
+ previously-forwarded flag was removed, and the remaining unmapped
149
+ flags (`--bg`, `--cloud`, `--environment`, `--from-pr`,
150
+ `--remote-control`, `--teleport`, `--tmux`, `--worktree`, `--chrome`)
151
+ are interactive or cloud-session features outside a headless shim's
152
+ scope.
153
+
154
+ ---
155
+
156
+ ## [1.2.0] — 2026-08-21
157
+
158
+ Realign the option surface with Claude Code 2.1.x. The headline is a
159
+ forwarding bug: roughly thirty documented flags parsed cleanly, passed
160
+ validation, appeared in `ocp --help`, and were then silently discarded
161
+ before the upstream `claude` process ever saw them.
162
+
163
+ ### Fixed
164
+
165
+ - **Flags declared in `OPTION_SPEC` are no longer dropped on the way to
166
+ the upstream process.** `buildSpawnArgs()` has always been
167
+ spec-driven — it walks `OPTION_SPEC` and emits `--flag value` for
168
+ every entry whose `forward.type` is `'argv'`, reading
169
+ `req[camelCase(spec.name)]`. The other half of that contract was
170
+ hand-maintained: each call site in `bin/cli.js` listed the request
171
+ fields it cared about. The two halves drifted, and everything the
172
+ hand-written list had never picked up went nowhere:
173
+
174
+ `--effort`, `--thinking`, `--max-thinking-tokens`, `--fallback-model`,
175
+ `--tools`, `--add-dir`, `--mcp-config`, `--strict-mcp-config`,
176
+ `--permission-prompt-tool`, `--system-prompt-file`,
177
+ `--append-system-prompt-file`, `--settings`, `--setting-sources`,
178
+ `--agents`, `--agent`, `--plugin-dir`, `--disable-slash-commands`,
179
+ `--file`, `--ide`, `--betas`, `--bare`, `--init`, `--init-only`,
180
+ `--maintenance`, `--debug-file`, `--workload`, `--enable-auth-status`,
181
+ `--allow-dangerously-skip-permissions`, `--include-hook-events`, and
182
+ `--include-partial-messages`.
183
+
184
+ There was no error and no warning — `ocp --effort high "…"` ran at
185
+ the upstream default effort and reported success. The mapping now
186
+ comes from the same spec that produces the argv
187
+ (`src/options/forward.js`), across all three request paths (daemon,
188
+ print-mode, and the PTY path), so appending an entry to `OPTION_SPEC`
189
+ is once again the only edit a newly-supported flag needs.
190
+
191
+ - **A concurrent session in the same directory could answer for this
192
+ one.** Two independent defects lined up to produce it, and both are
193
+ fixed:
194
+
195
+ `findRecentSessionId` is the filesystem fallback that recovers a
196
+ session id when none was scraped from the PTY. It accepted two classes
197
+ of candidate — files created during the request, and pre-existing files
198
+ whose mtime moved during it (the `--resume` append) — then ranked them
199
+ together by mtime and took the newest. A background daemon holding a
200
+ warm PTY in the same cwd appends to its own JSONL continuously, so it
201
+ reliably out-raced the file the current spawn had just created. The
202
+ wrong id then flowed into `readSessionText`, whose strict-by-id path
203
+ faithfully returned that other session's transcript as this request's
204
+ answer. Newly-created files now win outright; the append class is
205
+ consulted only when nothing new appeared, which is exactly the
206
+ `--resume` case it exists for.
207
+
208
+ `readSessionText` has a second path, used when no session id is known
209
+ at all, that scans the project directory and takes the most recently
210
+ modified transcript. Its own source comments describe why that is
211
+ unsafe — it is why the by-id path refuses to fall back to a scan — but
212
+ the CLI reached it on every run where the id was missing. It now
213
+ accepts an `expectPrompt` option and requires a candidate transcript to
214
+ actually contain the prompt that was sent before returning its text;
215
+ the CLI always supplies it. Ownership beats recency, so our own
216
+ transcript is still found even when a neighbour is newer, and when
217
+ nothing matches the caller falls back to the PTY-extracted text as
218
+ before. Callers that omit the option keep the previous behaviour.
219
+
220
+ - **`--include-partial-messages` is no longer forwarded on the PTY
221
+ path.** Upstream refuses it without `--print` ("Error:
222
+ --include-partial-messages requires --print and
223
+ --output-format=stream-json") and exits immediately, so forwarding it
224
+ to the interactive spawn failed the whole run. OPTION_SPEC gains a
225
+ `printModeOnly` field for this class of flag; ocp already synthesises
226
+ `assistant-partial` events from the TUI frames, so nothing is lost.
227
+
228
+ - **`--agents` reaches upstream as JSON again.** It is a `json`-kind
229
+ option, so `parseArgv` stores it already parsed and `buildSpawnArgs`'s
230
+ `String(value)` turned it into the literal `[object Object]`. Upstream
231
+ accepts that token without complaint and simply defines no agents, so
232
+ the flag failed silently. `json`-kind values are now re-serialised, and
233
+ a value supplied as raw JSON text is passed through unchanged rather
234
+ than double-encoded.
235
+
236
+ - **`--effort xhigh` is accepted.** Upstream's levels are `low`,
237
+ `medium`, `high`, `xhigh`, `max`; ocp's enum was missing `xhigh`, so
238
+ the value most appropriate for coding and agentic work was rejected
239
+ at parse time.
240
+
241
+ - **`--permission-mode manual` is accepted.** Upstream renamed the
242
+ prompt-on-every-tool mode from `default` to `manual`; ocp's validator
243
+ still had the old name only, so the current spelling was refused. Both
244
+ are accepted now — upstream continues to take `default`, so removing
245
+ it would have broken existing callers for no gain.
246
+
247
+ - **The `env:` field in `OPTION_SPEC` does something.** It has been part
248
+ of the documented entry shape since 1.0 but nothing ever read it; the
249
+ two options that used it were wired up by hand at their call sites, so
250
+ any new entry declaring `env` silently had no effect. `parseArgv` now
251
+ applies it, with the precedence the hand-rolled versions already used:
252
+ **explicit argv > environment variable > spec default**. An explicit
253
+ `--print-mode=false` beats a set `OCP_PRINT_MODE=1`. Booleans read
254
+ `1` / `true` / `yes` / `on` as on; everything else, including the
255
+ empty string, leaves the default in place.
256
+
257
+ ### Added
258
+
259
+ - **Upstream flags introduced since the spec was last synced.** All
260
+ forwarded verbatim:
261
+
262
+ | Flag | Purpose |
263
+ |------|---------|
264
+ | `--autocompact <auto\|tokens>` | Auto-compact window size (`auto`, or 100k–1M) |
265
+ | `--exclude-dynamic-system-prompt-sections` | Move per-machine sections out of the system prompt so the cached prefix is stable across machines |
266
+ | `--forward-subagent-text` | Forward subagent text/thinking as messages with `parent_tool_use_id` |
267
+ | `--prompt-suggestions` | Emit a `prompt_suggestion` event carrying a predicted next prompt |
268
+ | `--plugin-url <url…>` | Fetch a plugin `.zip` from a URL for this session |
269
+ | `--safe-mode` | Start with all customizations disabled |
270
+ | `--ax-screen-reader` | Screen-reader friendly TUI output |
271
+ | `--brief` | Enable the SendUserMessage tool |
272
+
273
+ - **`--ax-screen-reader` is worth knowing about even if you do not need
274
+ accessibility.** It asks the upstream TUI for flat text with no
275
+ decorative borders and no animations. ocp reconstructs its answer by
276
+ scraping TUI frames, so there is simply less chrome for the parsers to
277
+ strip. It stays **opt-in** (flag, or `OCP_AX_SCREEN_READER=1`) because
278
+ it changes the captured frame shape, and this release does not alter
279
+ any default.
280
+
281
+ - **New cross-flag validation.** `--forward-subagent-text` and
282
+ `--prompt-suggestions` both require `--output-format=stream-json`
283
+ (upstream only emits them on that channel, and the text/json adapters
284
+ have nowhere to put them). `--autocompact` is checked for `auto` or a
285
+ token budget in the 100k–1M range, accepting a `k`/`m` suffix.
286
+
287
+ - **`buildSpawnArgs` is exported from `open-claude-p`.** It was already
288
+ a pure function; exporting it lets the spec → request-field → argv
289
+ round-trip be asserted directly in tests.
290
+
291
+ ### Security
292
+
293
+ - **`--plugin-url` added to the `passThroughArgv` deny-list.** It loads
294
+ untrusted plugin code exactly like `--plugin-dir`, which was already
295
+ listed, so it belongs in the same group.
296
+
297
+ - **`redactArgvForLog` now redacts every value of a variadic sensitive
298
+ flag, not just the first.** `--mcp-config` takes multiple tokens and
299
+ inline MCP JSON routinely carries server credentials; only the first
300
+ token was masked, so a `--debug` run could print a secret to stderr
301
+ and from there into a CI log or a pasted bug report. Previously
302
+ unreachable from the CLI, because `--mcp-config` was one of the flags
303
+ being dropped.
304
+
305
+ - **Wiring the dropped flags up widens what an argv-splicing wrapper
306
+ exposes, and that is now documented.** ocp treats its own command line
307
+ as trusted; the deny-list guards only *unrecognised* argv forwarded
308
+ through `passThroughArgv` and has never covered ocp's own spec flags.
309
+ A wrapper that splices untrusted text into ocp's argv was already
310
+ unsafe — `--system-prompt`, `--append-system-prompt` and
311
+ `--allowed-tools` have always been forwarded and the CLI defaults
312
+ `--dangerously-skip-permissions` to on — but the newly-wired flags
313
+ turn that from model-mediated influence into direct process
314
+ execution. `docs/cli-reference.md` gains a **Never splice untrusted
315
+ input into ocp's argv** section with the safe pattern. The flags are
316
+ deliberately *not* gated behind an env var: they are documented,
317
+ first-class options, and hiding them would re-break exactly what this
318
+ release fixes.
319
+
320
+ ### Tests
321
+
322
+ - `test/forward.test.js` (39 new tests). The central one walks
323
+ `OPTION_SPEC` itself and asserts that every argv-forwarding entry
324
+ survives the trip to the spawn argv, so a flag added to the spec is
325
+ covered the moment it is declared rather than whenever someone
326
+ remembers to extend a hand-written list. The rest pin the specific
327
+ flags that regressed, the refreshed `--effort` / `--permission-mode`
328
+ surfaces, the new validation rules, and env-var precedence.
329
+
330
+ ### Documentation
331
+
332
+ - `docs/cli-reference.md` gains the model & behaviour flags
333
+ (`--effort`, `--thinking`, `--fallback-model`, `--autocompact`,
334
+ `--exclude-dynamic-system-prompt-sections`), a **Config, plugins &
335
+ MCP** section covering the flags that were being dropped, the
336
+ permission-mode values, the new lifecycle flags, and the env-var
337
+ precedence rule.
338
+ - Model examples across `README.md`, `README.ko.md`, `README.ja.md`,
339
+ `README.zh.md`, `docs/cli-reference.md`, and the spec's own help text
340
+ moved off retired ids onto current ones (`claude-opus-5`,
341
+ `claude-fable-5`) and the current aliases (`fable`, `opus`, `sonnet`,
342
+ `haiku`).
343
+
344
+ ### Internal
345
+
346
+ - Two comments in `bin/cli.js` used a non-English example prompt, which
347
+ the project's contribution rules forbid in committed files. Replaced
348
+ with English equivalents.
349
+
350
+ ---
351
+
10
352
  ## [1.1.3] — 2026-05-19
11
353
 
12
354
  Fix the `/compact` 24-hour hang and tighten the slash-command path so
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、插件等) |