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
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ server.
| CLI-only after the TS CLI cutover | Import and execute the TS kernel in the CLI process; no daemon |
| App-only | Embed the same kernel in the App runtime |
| App + CLI + scheduler, or concurrent clients | One managed local authority daemon; clients connect to the active writer |
| Migration while Python remains the CLI | One idle-exiting loopback runtime bridges Python to the migrated TS kernel |
| Migration while Python remains the CLI | An idle-exiting loopback runtime bridges Python to the migrated TS kernel by default. On POSIX, an explicit stdio setting uses a child process owned by each CLI invocation. |

If an authority daemon owns a registry/workspace, a CLI process must connect
to it instead of opening a second direct writer. Runtime discovery and startup
Expand All @@ -2017,6 +2017,13 @@ regression covers first ping and typed write, then abrupt exit and receipt
replay. This repair preserves lock reclaim ages, startup deadlines and retry
classification; broader process/storage recovery remains separately qualified.

The stdio bridge lets the Python CLI and its settlement subprocess run when
the host denies local sockets. It shares the typed dispatcher, bounded file
snapshots, authority provider and writer fences with the loopback bridge.
The caller authenticates the child before dispatch. Closing the pipe retires
the child after its current request. An ambiguous response requires reading
the exact durable receipt before any retry.

### 2.3 TypeScript owns migrated effects

The target is not “TypeScript decides, Python always executes”. TypeScript may
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ handler 不会新增 server。
| TS CLI cutover 后的 CLI-only | CLI 进程内 import 并执行 TS kernel;没有 daemon |
| 仅 App | App runtime 内嵌同一 kernel |
| App + CLI + scheduler,或多个并发 client | 一个 managed local authority daemon;client 连接当前 writer |
| Python 仍是 CLI 的迁移期 | 一个 idle-exiting loopback runtime 把 Python 桥接到已迁 TS kernel |
| Python 仍是 CLI 的迁移期 | 默认由空闲退出的回环 runtime 把 Python 桥接到已迁 TS kernel。POSIX 可显式选择由每个 CLI 进程持有的标准输入输出子进程。 |

如果 authority daemon 已拥有某个 registry/workspace,CLI 必须连接它,而不能
绕过它再打开第二个直接 writer。Runtime discovery 与启动全自动;用户无需配置
Expand All @@ -1452,6 +1452,11 @@ handler 不会新增 server。
并验证替代 runtime 写入和回执重放;锁的 stale age、启动预算、认证、writer 权限
和重试分类均保持不变。这只关闭该发布顺序缺口,不代表长期运维或跨平台资格完成。

宿主禁止本地 socket 时,Python CLI 和它启动的结算子进程可用标准输入输出
桥接。同一套类型化分派、限长文件快照、权威存储与写入栅栏适用于两种传输。
调用方先认证子进程,再发送业务请求。管道关闭后,子进程完成当前请求再退出。
响应不明确时,重试前先读取该操作的确切持久回执。

### 2.3 TypeScript 拥有已迁 effect

目标不是“TypeScript 决策、Python 永远执行”。TypeScript 可以拥有 atomic
Expand Down
8 changes: 8 additions & 0 deletions docs/product/runtimes/codex-cli/codex-cli-tui-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ do not migrate existing automations. Existing authority and cadence floors remai
LoopX should be the control plane. Codex CLI should remain the executor
and the user's live console.

When the Codex sandbox blocks loopback TCP on macOS or Linux, set
`LOOPX_EFFECT_RUNTIME_TRANSPORT=stdio` in the shell that starts Codex.
LoopX commands and their settlement subprocesses inherit the setting. Run
`loopx doctor --deep` from that environment to verify the Node/SQLite runtime.
The CLI uses the configured authority store and needs write access to the
project state and its normal temporary directory for large snapshots.
Launch Codex with the setting unset to use the default loopback bridge.

## Operating Modes

### 1. TUI Bootstrap
Expand Down
3 changes: 2 additions & 1 deletion loopx/control_plane/coordination/sqlite_runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ let cached: {driver: typeof import("node:sqlite"); info: SqliteRuntimeInfo} | un
*/
function servingManagedRuntime(): boolean {
const token = process.env.LOOPX_EFFECT_RUNTIME_TOKEN;
return typeof token === "string" && token.length > 0;
return typeof token === "string" && token.length > 0 &&
process.env.LOOPX_EFFECT_RUNTIME_TRANSPORT !== "stdio";
}

/** Probe only an in-memory database before any authority path is created. */
Expand Down
Loading
Loading