## Why
A stalled WebSocket write can leave the remote client's command queue
full. Shutdown can then wait indefinitely to enqueue its command,
before it reaches the timeout that allows it to abort the worker.
## What changed
Apply `SHUTDOWN_TIMEOUT` to enqueuing the shutdown command so the client
can reach the existing worker abort fallback even if the queue stays
full.
## Testing
Add a paused-time regression test that keeps the queue full with a
stalled worker and verifies that shutdown returns and the worker has
finished.
GitOrigin-RevId: d7c1a90442cd2619893144b20e43f6d87d5caa94
## Why
Automatic mailbox wakes can start new turns while the app-server is
draining or has paused turn admission. Native child results still need
to reach the parent during drain so they can survive a daemon restart.
## What changed
- Require a turn admission permit for ordinary automatic mailbox wakes
and hold it through turn registration. Retry queued work when a
temporary pause ends. Explicit follow-ups and native child results can
still wake the parent during drain.
- Let `thread/inject_items` queue plain-text agent messages for native
child threads when native tools are enabled. Injected mail follows the
ordinary wake rules.
- Extract the remote app-server client, shared event and request types,
and WebSocket compression into `codex-app-server-remote-client` so
callers can use them without linking the app-server runtime.
## Testing
Cover delivery of queued mail when admission reopens, injection into
native child threads, and recovery of a child result after a daemon
restart.
GitOrigin-RevId: 4c5ceeca8829c2612cc2b6b74c03d0c7677a9244