Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/fr/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ temporairement indisponible, ce qui n’est pas le cas.
Cliquez sur le nom d’une couche pour afficher le texte qu’elle envoie. La boîte de dialogue le lit
depuis `codex debug prompt-input` : il s’agit donc du contenu réel, et non d’une description.

Chaque appel de lecture dispose d’un délai fixe de 15 secondes, qui inclut la lecture des
métadonnées et l’attente d’une sonde partagée. L’expiration est vérifiée après la fin de la
lecture synchrone des métadonnées ; si le délai est épuisé, aucune nouvelle sonde ne démarre.
À l’expiration, la boîte de dialogue indique que le prompt n’a pas pu être lu, mais les
instructions de base lues localement sont tout de même renvoyées.

Il arrive qu’il n’y ait rien à afficher. La boîte de dialogue précise alors la raison :

- **Le fichier existe, mais il est vide.** Votre fichier `~/.codex/AGENTS.md` ne contient aucun
Expand Down
8 changes: 8 additions & 0 deletions docs-site/src/content/docs/guides/codex-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,14 @@ $CODEX_HOME/models_cache.json

On macOS, opencodex checks the Codex app’s bundled CLI in `/Applications/ChatGPT.app` and then `~/Applications/ChatGPT.app` after explicit selections, shims, PATH, established installs, and the runnable bare `codex` fallback, requires the bundle’s XML `Info.plist` identity to be `com.openai.codex`, and never automatically replaces a runnable persisted selection with an app candidate.

Execution checks also recognize `Codex.app` and `ChatGPT.app` at any location, including relocated
bundles, explicit `CODEX_CLI_PATH` or configured runtime commands, and symlink aliases. A recognized
name triggers verification; it does not grant trust. Before each execution, the canonical bundle
and exact binary must pass strict signature verification with OpenAI's Team ID and the ownership,
permission and ancestor-directory policy. The binary must resolve inside the bundle's `Contents/`
(including `Codex.app/Contents/Resources/codex-aarch64-apple-darwin`); unresolved bundles or binaries
are refused. Arbitrary non-app CLIs and third-party app bundles keep their existing execution policy.

On WSL, if `CODEX_HOME` is unset and the Linux `~/.codex` directory is absent or holds no Codex state
(`config.toml`, `auth.json`, `sessions`, `history.jsonl`), opencodex also
checks for a single Windows Codex Desktop home at `/mnt/c/Users/*/.codex/config.toml`. When exactly
Expand Down
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ unavailable, which is not the case.
Click a layer name to see the text it sends. The dialog reads it from
`codex debug prompt-input`, so it is the real thing rather than a description.

The read has one fixed 15-second caller budget, including time spent
reading metadata and waiting on a shared probe. Synchronous metadata reads finish
before expiry can be checked; an exhausted budget then prevents a new probe.
If it expires, the dialog reports that the prompt
could not be read; locally available base instructions are still returned.

Sometimes there is nothing to show, and the dialog says which reason applies:

- **The file exists but is empty.** Your `~/.codex/AGENTS.md` is zero bytes, so
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ja/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Codex が実際には使用しない順序を示すことになります。
レイヤー名をクリックすると、送信されるテキストを確認できます。ダイアログは
`codex debug prompt-input` から内容を読み取るため、説明ではなく実際の送信内容です。

読み取りには、メタデータの読み取りと共有プローブの待機時間を含む、呼び出しごとに固定の
15 秒の制限があります。同期的なメタデータの読み取りが終わってから時間切れを確認し、
制限に達していれば新しいプローブを開始しません。時間切れになると、ダイアログはプロンプトを
読み取れなかったと表示しますが、ローカルで読み取れた基本指示は引き続き返されます。

表示する内容がない場合もあり、ダイアログに該当する理由が表示されます。

- **ファイルは存在しますが空です。** `~/.codex/AGENTS.md` が 0 バイトのため、
Expand Down
8 changes: 8 additions & 0 deletions docs-site/src/content/docs/ko/guides/codex-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ $CODEX_HOME/models_cache.json

macOS에서는 명시적 선택, shim, PATH, 기존 설치 경로와 실행 가능한 기본 `codex` 후보 뒤에 `/Applications/ChatGPT.app`, `~/Applications/ChatGPT.app` 순서로 Codex 앱의 번들 CLI를 확인하며, 번들의 XML `Info.plist` 식별자가 `com.openai.codex`여야 하고 실행 가능한 저장된 선택을 앱 후보로 자동 교체하지 않습니다.

실행 시에는 위치와 관계없이 `Codex.app`과 `ChatGPT.app`을 인식하며, 이동한 번들, 명시적
`CODEX_CLI_PATH`·설정 런타임 명령, 심볼릭 링크 별칭에도 같은 검증을 적용합니다. 앱 이름은 검증
대상만 결정하고 신뢰를 허용하지 않습니다. 매 실행 전에 정규화한 번들과 정확한 실행 파일의
엄격한 서명 검증, OpenAI Team ID, 소유권·권한·상위 디렉터리 정책을 확인합니다. 실행 파일은
번들의 `Contents/` 안에 있어야 하며(Codex.app의 `Contents/Resources/codex-aarch64-apple-darwin`
포함), 번들이나 실행 파일을 정규화할 수 없으면 실행을 거부합니다. 일반 CLI와 다른 회사 앱의
번들은 기존 실행 정책을 유지합니다.

WSL에서는 `CODEX_HOME`이 비어 있고 Linux `~/.codex` 디렉터리가 없거나 Codex 상태(`config.toml`, `auth.json`, `sessions`, `history.jsonl`)가 전혀 없을 때 `/mnt/c/Users/*/.codex/config.toml` 아래의 단일 Windows Codex Desktop home도 확인합니다. 후보가 정확히 하나면 그 디렉터리를 사용하므로 WSL app-server mode와 Windows Codex Desktop이 같은 config와 auth 파일을 공유합니다. 이 탐지를 덮으려면 `CODEX_HOME`을 명시하세요.

Windows에서 Orca shell은 `CODEX_HOME`과 `ORCA_CODEX_HOME`을 Orca의 번들 런타임 home으로 설정할 수 있지만, ChatGPT/Codex app은 여전히 `%USERPROFILE%\\.codex`를 읽습니다. `ocx status`와 `ocx doctor`는 이 정확한 불일치를 경고하고, 경로는 가린 채 대상 home을 출력합니다. 해당 Orca shell에서 background service를 설치했다면 먼저 원래 shell에서 uninstall하고, `CODEX_HOME`을 app home으로 설정한 뒤 `ORCA_CODEX_HOME`을 해제하고, sync/restore를 다시 실행한 다음 service를 다시 설치하세요.
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ko/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ Codex가 실제로 쓰지 않는 순서를 보여 주게 됩니다.
레이어 이름을 클릭하면 전송되는 텍스트를 볼 수 있습니다. 대화 상자는
`codex debug prompt-input`에서 내용을 읽으므로 설명문이 아닌 실제 전송 내용입니다.

읽기에는 호출마다 고정된 15초 제한이 있으며, 메타데이터를 읽는 시간과 공유 프로브를
기다리는 시간도 포함됩니다. 동기식 메타데이터 읽기가 끝난 뒤에 시간 초과를 확인하므로,
그때 제한에 도달했다면 새 프로브를 시작하지 않습니다. 시간이 초과되면 대화 상자는
프롬프트를 읽지 못했다고 표시하지만, 로컬에서 읽은 기본 지침은 계속 반환됩니다.

표시할 내용이 없을 때도 있으며, 대화 상자에 해당하는 이유가 나옵니다.

- **파일은 있지만 비어 있습니다.** `~/.codex/AGENTS.md`가 0바이트라서
Expand Down
2 changes: 1 addition & 1 deletion docs-site/src/content/docs/reference/management-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ See [Combos](/guides/combos/) for target strategies, cooldowns, aliases, and rou
| Method and path | Purpose | Notable errors |
| --- | --- | --- |
| `GET /api/codex-prompt` | Read the prompt-layer snapshot: layers, base variants, selection, and drift state | — |
| `GET /api/codex-prompt/text` | Probe the model-visible prompt text via `codex debug prompt-input` | Fail-soft: an unavailable probe degrades to a status in the body, not an HTTP error |
| `GET /api/codex-prompt/text` | Probe the model-visible prompt text via `codex debug prompt-input`; one caller budget includes metadata, shared wait and execution; synchronous metadata is checked for expiry after it returns | Fail-soft: an unavailable probe degrades to a status in the body, not an HTTP error; timeout preserves locally read base instructions; earlier external cancellation stays cancelled |
| `PUT /api/codex-prompt/toggle` | Enable or disable one toggleable layer | 400 invalid body or unknown layer; 409 `stale_revision`, `layer_not_toggleable` |
| `PUT /api/codex-prompt/custom` | Replace the custom-layer set | 400 invalid body, `invalid_characters`, `body_too_large` when a normalized UTF-8 layer exceeds 65,536 bytes, `composed_too_large` over 131,072 bytes; 409 `stale_revision` |
| `PUT /api/codex-prompt/base/select` | Select the default base prompt or one stored variant | 400 invalid body, `unknown_layer` for an id matching no stored variant; 409 `stale_revision`, `developer_instructions_not_owned` when the current base is external |
Expand Down
5 changes: 5 additions & 0 deletions docs-site/src/content/docs/ru/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Codex собирает свой промпт из слоёв: собственн
Нажмите на название слоя, чтобы увидеть отправляемый им текст. Диалоговое окно получает его
из `codex debug prompt-input`, поэтому показывает реальное содержимое, а не описание.

Для каждого вызова установлен фиксированный срок чтения — 15 секунд, включая чтение метаданных и ожидание
общей проверки. Истечение срока проверяется после завершения синхронного чтения метаданных;
если время уже исчерпано, новая проверка не запускается. При истечении срока диалог сообщает,
что промпт не удалось прочитать, но базовые инструкции, прочитанные локально, всё равно возвращаются.

Иногда показывать нечего, и диалоговое окно указывает причину:

- **Файл существует, но пуст.** Ваш файл `~/.codex/AGENTS.md` имеет нулевой размер, поэтому
Expand Down
6 changes: 6 additions & 0 deletions docs-site/src/content/docs/tr/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Gönderdiği metni görmek için katman adına tıklayın. İletişim kutusu bun
`codex debug prompt-input` üzerinden okur; dolayısıyla bir açıklama değil,
gerçekte gönderilen metindir.

Her okuma çağrısının, meta verileri okuma ve ortak incelemeyi bekleme süresini de içeren,
sabit 15 saniyelik bir süresi vardır. Sürenin dolup dolmadığı eşzamanlı meta veri okuması
tamamlandıktan sonra denetlenir; süre tükenmişse yeni bir inceleme başlatılmaz.
Süre dolarsa iletişim kutusu istemin okunamadığını bildirir, ancak yerel olarak okunan
temel talimatlar yine de döndürülür.

Bazen gösterilecek bir şey olmaz ve iletişim kutusu hangi nedenin geçerli
olduğunu belirtir:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ $CODEX_HOME/models_cache.json

在 macOS 上,opencodex 在显式选择、shim、PATH、既有安装路径和可运行的裸 `codex` 后备命令之后,依次检查 `/Applications/ChatGPT.app` 和 `~/Applications/ChatGPT.app` 中的 Codex 应用内置 CLI,要求其 XML `Info.plist` 标识为 `com.openai.codex`,且不会用应用候选项自动替换仍可运行的已保存选择。

执行检查还会识别任意位置的 `Codex.app` 和 `ChatGPT.app`,包括移动后的应用包、显式
`CODEX_CLI_PATH` 或配置的运行时命令,以及符号链接别名。名称只触发验证,不代表可信。
每次执行前,规范化的应用包和确切二进制都必须通过严格签名验证、OpenAI Team ID 及所有权、
权限和祖先目录策略。二进制必须位于包的 `Contents/` 内(包括 Codex.app 的
`Contents/Resources/codex-aarch64-apple-darwin`);无法规范化应用包或二进制时拒绝执行。
普通非应用 CLI 和第三方应用包保留原有执行策略。

在 WSL 中,如果未设置 `CODEX_HOME`,且 Linux 侧的 `~/.codex` 目录不存在或不含任何 Codex 状态(`config.toml`, `auth.json`, `sessions`, `history.jsonl`),opencodex 还会检查
`/mnt/c/Users/*/.codex/config.toml` 下是否存在单一的 Windows Codex Desktop home。只要候选项恰好只有一个,
它就会使用那个目录,让 WSL app-server mode 和 Windows Codex Desktop 共享同一份 config 与 auth 文件。
Expand Down
4 changes: 4 additions & 0 deletions docs-site/src/content/docs/zh-cn/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Codex 会分层组装提示词:它自己的基础指令、你的项目文档
点击层名称即可查看它发送的文本。对话框会从 `codex debug prompt-input` 读取内容,
所以显示的是真实内容,而不是描述。

每次读取都有固定的 15 秒时限,包括读取元数据和等待共享探测所花的时间。
同步元数据读取结束后才能检查是否超时;如果时限已用尽,就不会启动新的探测。
超时后,对话框会提示无法读取提示词,但仍会返回已从本地读取的基础指令。

有时没有内容可显示,对话框会说明具体原因:

- **文件存在但为空。** 你的 `~/.codex/AGENTS.md` 是零字节,因此该层没有内容可发送。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ $CODEX_HOME/models_cache.json

在 macOS 上,opencodex 在明確選擇、shim、PATH、既有安裝路徑和可執行的裸 `codex` 後備命令之後,依序檢查 `/Applications/ChatGPT.app` 和 `~/Applications/ChatGPT.app` 中的 Codex 應用程式內建 CLI,要求其 XML `Info.plist` 識別碼為 `com.openai.codex`,且不會用應用程式候選項自動取代仍可執行的已儲存選擇。

執行檢查也會辨識任意位置的 `Codex.app` 和 `ChatGPT.app`,包括移動後的應用程式套件、明確的
`CODEX_CLI_PATH` 或設定的執行階段命令,以及符號連結別名。名稱只觸發驗證,不代表可信。
每次執行前,正規化的套件和確切二進位檔都必須通過嚴格簽章驗證、OpenAI Team ID 及擁有權、
權限和祖先目錄政策。二進位檔必須位於套件的 `Contents/` 內(包含 Codex.app 的
`Contents/Resources/codex-aarch64-apple-darwin`);無法正規化套件或二進位檔時拒絕執行。
一般非應用程式 CLI 和第三方套件保留原有執行政策。

在 WSL 中,如果未設定 `CODEX_HOME`,且 Linux 的 `~/.codex` 目錄不存在或不含任何 Codex 狀態(`config.toml`, `auth.json`, `sessions`, `history.jsonl`),opencodex 也會檢查
`/mnt/c/Users/*/.codex/config.toml` 下是否只有一個 Windows Codex Desktop home。候選項恰好只有一個時,
會使用該目錄,讓 WSL app-server mode 與 Windows Codex Desktop 共用相同的 config 與 auth 檔案。
Expand Down
4 changes: 4 additions & 0 deletions docs-site/src/content/docs/zh-tw/guides/codex-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Codex 會分層組裝提示詞:它自己的基礎指令、你的專案文件
點擊層名稱即可查看它傳送的文字。對話框會從 `codex debug prompt-input` 讀取內容,
所以顯示的是真實內容,而不是描述。

每次讀取都有固定的 15 秒時限,包括讀取中繼資料與等待共用探測所花的時間。
同步中繼資料讀取結束後才能檢查是否逾時;如果時限已用盡,就不會啟動新的探測。
逾時後,對話框會提示無法讀取提示詞,但仍會傳回已從本機讀取的基礎指示。

有時沒有內容可顯示,對話框會說明具體原因:

- **檔案存在但為空。** 你的 `~/.codex/AGENTS.md` 是零位元組,因此該層沒有內容可傳送。
Expand Down
Loading
Loading