docs: align runner docs with current API

This commit is contained in:
banteg
2026-01-02 14:25:53 +04:00
parent 51cdb72d0b
commit 7e5d6e3d40
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ The orchestrator module containing:
- Per-resume locks (WeakValueDictionary) prevent concurrent resumes of the same session - Per-resume locks (WeakValueDictionary) prevent concurrent resumes of the same session
- Event delivery uses a single internal queue to preserve order without per-event tasks - Event delivery uses a single internal queue to preserve order without per-event tasks
- Stderr is drained into a bounded tail (debug logging only) - Stderr is drained into a bounded tail (debug logging only)
- Event callbacks must not raise; callback errors abort the run - Translation errors abort the run; keep event normalization defensive
### `model.py` / `runner.py` - Core domain types ### `model.py` / `runner.py` - Core domain types
+2 -2
View File
@@ -69,7 +69,7 @@ From the bridge/runner point of view:
1. **Bridge receives Telegram prompt** 1. **Bridge receives Telegram prompt**
2. Bridge tries to extract a resume line (`codex resume <uuid>`) from the message/reply (runner-owned parsing). 2. Bridge tries to extract a resume line (`codex resume <uuid>`) from the message/reply (runner-owned parsing).
3. Bridge calls `runner.run(prompt, resumeTokenOrNone, on_event=...)` 3. Bridge calls `runner.run(prompt, resumeTokenOrNone)`
4. Codex runner spawns `codex exec --json ...` and reads JSONL line-by-line. 4. Codex runner spawns `codex exec --json ...` and reads JSONL line-by-line.
5. The *first moment the runner can know thread identity* is: 5. The *first moment the runner can know thread identity* is:
@@ -350,7 +350,7 @@ did_emit_started = False
did_emit_completed = False did_emit_completed = False
turn_index = 0 turn_index = 0
def emit(evt): on_event(evt) def emit(evt): yield evt # emit to the output event stream
for line in codex_jsonl_stream: for line in codex_jsonl_stream:
t = line["type"] t = line["type"]