Imported from amichne/kast (
app-server/src/main/kotlin/io/github/amichne/kast/appserver/host/AGENTS.md). Install upstream withnpx skills add amichne/kast --skill host. Copyright stays with the author.
Codex Host Boundaries
- This package owns how a Codex client reaches the shared broker. Host selection must not create a second broker, tool catalog, or semantic execution path.
admissionrefines raw executable and argument inputs before any process, socket, or stdio effect begins. Preserve admitted values as typed data; do not unwrap and re-parse them downstream.- The CLI host owns its injected
--remotetransport. The App Server host owns its injected--listentransport. Reject caller-supplied transport overrides before adding either host-owned argument. - Parse global and role argument segments independently. Unknown options, remote overrides, missing values, ambiguous roles, control characters, and size overflow are closed typed failures.
- Executable identity checks must fail closed on unavailable paths, recursive façade identity, I/O failure, or denied access.
- Stdio framing and process lifecycle remain bounded. Keep shutdown, interruption, upstream exit, and malformed-frame outcomes explicit; never write diagnostics to the App Server stdout protocol stream.
- Tests must cover successful role selection plus every failure that could transfer transport ownership, recurse into the façade, corrupt framing, or leak a process.
Navigation
- CodexHostInvocation.kt - transport admission or host composition.
- CodexHostExecutable.kt - transport admission or host composition.
- CliRemoteClientHost.kt - transport admission or host composition.
- DesktopStdioHost.kt - transport admission or host composition.
