Expand description
Codex App Serverβs stable thread/turn adapter.
The transport in super::app_server owns framing and request lifecycle.
This module owns the first protocol-semantic layer: typed request shapes,
thread identity, turn identity, and notification reconciliation. It is
intentionally not registered as a production block controller yet.
StructsΒ§
- Codex
AppServer Session - Item
Snapshot - Pending
Server Request - Session
Snapshot - Session
State π - Text
User πInput - Thread
Fork Options - Thread
List Options - Thread
Resume πParams - Thread
Start Options - Turn
Start πParams
EnumsΒ§
- Account
Login Options - Login choices accepted by the pinned App Server schema. API keys are kept in this typed request only and are never included in protocol events/logs.
- Codex
AppServer Event - Codex
AppServer Protocol Error - Server
Request Kind - Session
Phase - Thread
List CwdFilter - A thread/list cwd filter: either a single path or a set of paths, per the
pinned schemaβs
ThreadListCwdFilter(string | string[]).
ConstantsΒ§
- MAX_
PENDING_ πSERVER_ REQUESTS - MAX_
RAW_ πEVENTS
FunctionsΒ§
- ensure_
active_ πscopes - See ensure_active_thread_scope β fails closed when no turn is active.
- ensure_
active_ πthread_ scope - Unlike ensure_thread_scope, fails closed when no thread is active β a server request claiming a threadId must be scoped to a real, active thread, not merely βno conflicting thread claimed yetβ the way an incoming notification establishing state is allowed to be.
- ensure_
active_ πturn_ scope - See ensure_active_thread_scope β fails closed when no turn is active. Split out from ensure_active_scopes so a turn can be validated on its own when a request carries a turnId without a threadId (ReAgent P1, PR #3212 4th review).
- ensure_
scopes π - ensure_
thread_ πscope - extract_
in_ πprogress_ turn_ id - The id of whichever turn in
thread.turns(aThreadResumeResponsefield, populated onthread/resume) hasstatus: "inProgress", if any.TurnStatusβs only other values (completed/interrupted/failed) are all terminal, so at most one entry can ever match. Malformed/missing shapes intentionally fall through toNonerather than erroring β this is best-effort derivation of pre-existing state, not a required field. - extract_
thread_ πid - string_
field π