Skip to content

Commit 9058ab3

Browse files
authored
feat(tui): the status row is drawn from what the client knows (#19)
## Summary `[ui.status_line]` drew nothing with the Python agent. The row waited for a `session_status` message that only the old Rust agent sent. Now `zypi` builds the row from what it already knows. There is no change on the wire and no change in Python. This is plan decision 15, option (b). Option (a), a new message from the Python agent, was chosen first and did not pass the review below. ```text shell_status_context() start from the status the agent sent # it wins; empty if none fill the empty fields from ClientOwnedFields: cwd, session id, model id and name, version session name: always the client's, because a rename happens here fill_from_clocks: cost.total_duration_ms = time since the session was attached turn.started_at_ms = start of the running turn left empty: context, the rest of cost, branch, repo # nobody on this side can know them ``` ```diff the row is built again when the source agent changes + cwd, session id, session name, model, or "a turn runs" changes # ClientOwnedFields a forced or due refresh arrives ``` The flag "a turn runs" is the reason for the last line. A command row runs on every tick of a turn and on no tick after it. Without the flag, the last run would keep the turn in its payload, and a timer would stay on a built-in row after the turn. **Why not option (a).** DESIGN section 8.5 lists five points for a `pi/` extension; one failed point is enough to refuse it. Two failed: (1) what the Python agent could truthfully send is known to `zypi` already, or has a standard place in ACP (`agentInfo.version`, `usage_update`); the agent itself knows neither the context window nor a price. (4) The message type would live in `pi-shell`, an old runtime crate. The user then chose (b). ## Evidence - **Before:** `status_line_probe.py` (r11, plan section 10.14): 4 runs, the row was not drawn with the Python agent and a command script did not run. **After:** 4/4 runs pass on a real debug `zypi` (WSL2, 23 s). Without a status from the agent: the row is on the screen; a script runs and gets session id, cwd, model, version, `workspace.current_dir`; `context_window` is an empty object and `cost` has only `total_duration_ms` (no `used_percentage`, `context_tokens`, `context_window_size`, `total_cost_usd`). With a status from the agent (the stand-in `status_proxy_agent.py`): the row shows what the agent sent. - **Tests:** 16 new unit tests: 9 in `status_line_tests.rs` (what `zypi` fills in, what an agent status keeps, the two clocks) and 7 in `dispatch/tests/status_line.rs` (when the row is built again, what a script is given). 2 tests rewritten (they said the row waits for the agent). 1 adjusted: `only_a_row_that_can_change_mid_turn_holds_the_loop_awake_for_one`. The start of a turn now makes the row stale once, on purpose; the old test looked for ticks right after the turn start and failed. It now lets that one rebuild happen first. A built-in row still asks for no tick; a command row still asks for one. - **Checks that ran locally** (WSL2, debug build; on the code of the final commit, the last edits are documentation only): the `pi-pager` suite of the manifest (`--lib`, `settings_e2e`, `grok_home_paths`, `selection_model_public_api`, `python_agent_e2e`, with the manifest environment): 5,624 passed, 0 failed, 13 ignored (the reference is 5,608; the 16 new tests are the difference). `tui_baseline.py check` exit 0: warnings 0, residue words unchanged, graph 980 = ceiling, `cargo check --workspace --tests` 0 errors. `ruff check` and `ruff format --check` pass. `pytest`: Windows 2,519 passed, 39 skipped, 31 deselected; WSL 2,542 passed, 16 skipped, 31 deselected. - **A failure that this change did not cause:** my first run of the suite had 1 failure, `pin_ambiguous_title_errors_before_sandbox`. `main` and #18 fail the same way on my machine when the whole `--lib` suite runs, and the test passes alone. The cause is a leftover directory in my real `~/.pi-python/sessions`, from an earlier run that did not finish. The test uses fixed session ids. In a whole-suite run, another test pins `grok_home()` to the real home first, so the test writes there. An id that exists in two directories cannot be found by title (`duplicate_legacy_id_is_not_title_addressable` tests this), so the call returns `Ok` where the test wants an error. With an empty `HOME` the whole `--lib` suite passes (5,340 passed, 0 failed); with only `sessions/` copied in, it fails; with only `config.toml` and `trusted_folders.toml` copied in, it passes. After I removed the directory, the suite passed (above). CI runners are clean, so CI does not see it. I did not change the fixture. - **CI** (on `bfd5425`: [TUI CI run](https://github.com/zy1233/pi-python/actions/runs/38348219064), [CI run](https://github.com/zy1233/pi-python/actions/runs/38348219013)): every job passes. `Ruff`. `pytest` 3.11, 3.12 and 3.13. `Gates + cargo check`: warnings 0, `leader` 245 of 245, `x.ai` 304 of 304, graph 980 of 980. `cargo test`: 8,681 passed, 0 failed, 22 ignored (`pi-pager`: 5,624 passed, 13 ignored, the same as my rerun). `Release build baseline` is manual and was skipped. - **CI after merging `main`** (on `1fa18cf`, where #18 is merged into this branch; [TUI CI run 38353039701](https://github.com/zy1233/pi-python/actions/runs/38353039701), [CI run 38353039688](https://github.com/zy1233/pi-python/actions/runs/38353039688)): every job passes. `Gates + cargo check`: warnings 0, `leader` 245 of 245, `x.ai` 304 of 304, graph 980 of 980. `cargo test`: 8,700 passed, 0 failed, 22 ignored (`pi-pager`: 5,643 passed, 13 ignored). That is the base of 8,665 plus the 19 tests of #18 and the 16 tests of this PR. - **Not verified:** Windows and macOS (the probe runs on Linux only). A real model (the agent is a mock; the data in the row does not depend on the model). A real agent that sends `session_status` (only the stand-in does). ## Merge Danger **Door:** two-way No data format, no wire message and no Python code changes. A revert brings back the old state: no row with the Python agent. **Blast Radius:** status row Only a user who sets `[ui.status_line]` sees a difference. The row now appears where it did not. `context` and `cost` items stay empty with the Python agent; the guide page says so. The row is built once more at the start of a turn and once more at its end: one more build for a built-in row, one more run of the script for a command row. The agent status still wins when an agent sends one. Merged on the owner's order, after #18, into V0.5 (`v0.5.0`). #18 and this PR changed the same documentation lines (`CHANGELOG.md`, the plan, the execution log), so the branch has one merge of `main` (`1fa18cf`); the code did not conflict. A documentation PR that follows moves both CHANGELOG entries from `[Unreleased]` to `[0.5.0]` and narrows the `[ui.status_line]` known issue (the `context` and `cost` items stay empty). `tui/` changed, so the release build and the binary size are checked again on this tree (release dry run [run 38353038777](https://github.com/zy1233/pi-python/actions/runs/38353038777), `release_baseline` [run 38353042677](https://github.com/zy1233/pi-python/actions/runs/38353042677); both started on `1fa18cf`).
1 parent ec7d455 commit 9058ab3

14 files changed

Lines changed: 747 additions & 97 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- **`zypi export <id>` works with the Python agent (TUI)**: it read the session files of the old Rust agent, so it answered `Session '<id>' not found.` for every session that the Python agent stored. It now asks the agent, as a resume does: it starts the agent, sends `session/load`, collects the `session/update` messages that the agent replays, and writes the Markdown transcript as before (to stdout, to a file, or to the clipboard; plan decision 6, option (a)). The agent is stopped when the command ends, also when the command fails. The command does not stop at the answer to `session/load`, because the last replayed messages can arrive after it: it waits until no replayed message has come for 500 ms. An agent that says nothing for 60 s is an error (`it said nothing for 60 s`), and a permission request from the agent is refused. A session that was compacted exports from the compaction on, as a resume shows it. The session file is not changed. Time, on a debug build in WSL2: 2,000 entries (1.4 MB) 2.5 s, 5,000 entries (3.6 MB) 5.7 s, 20,000 entries (14.2 MB) 63 s. The agent alone needs 0.24 s, 0.53 s and 2.5 s for the same sessions, so the rest is `zypi` turning the messages into text, and that time grows faster than the size. Tests: 18 unit tests, 1 end-to-end test against the real agent, and `scripts/tui_pty/resume_matrix.py` cases 12 and 13, which now also check that no process is left behind.
1313

14+
### Changed
15+
16+
- **The status row is drawn with the Python agent (TUI)**: `[ui.status_line]` (`type = "builtin"` or `"command"`) drew nothing with the Python agent, because the row was built from a `session_status` message that only the old Rust agent sent. `zypi` now builds the row from what it knows itself: the working directory, the session id, the model, the session name, its own version, how long it has held the session (`cost.total_duration_ms`), and when the turn began (`turn.started_at_ms`). A status that an agent does send is read first, and `zypi` fills only the fields that the agent left out; the session name is always `zypi`'s own. The row is built again when the session, the model, the name, or the state of the turn changes, so a timer does not stay on the row after its turn. **What it does not show**: the agent does not tell `zypi` the size of the context window, the tokens in use, or a cost, so the `context` and `cost` items stay empty with the Python agent, and a script gets no `context_window.*`, `cost.total_cost_usd`, `workspace.branch`, `workspace.repo_root` or other field that only an agent can fill. A script that needs the branch runs `git` itself. Plan decision 15 first chose that the Python agent sends the status. The review that DESIGN section 8.5 asks for failed on two of its five points: what the agent could truthfully send is known to `zypi` already or has a standard place in ACP, and the type of the message would live in an old runtime crate. The user then chose this way: no new message on the wire, and no change to the Python packages. The guide page `25-status-line.md` and `scripts/tui_pty/status_line_probe.py` say what the row shows now. Tests: 16 new unit tests (what `zypi` fills in and what an agent status keeps, the two clocks, when the row is built again, and what a script is given), 2 tests rewritten that said the row waits for the agent, and `scripts/tui_pty/status_line_probe.py`, which now checks that the row is drawn and that a script gets the facts and no invented number (4 of 4 runs on a real `zypi`).
17+
1418
## [0.5.0] - 2026-10-12
1519

1620
`zypi` no longer has an agent of its own. It draws the terminal screen and talks ACP to the Python agent (`python -m pi_agent_cli`), and that agent is now the only agent. **Removed** says what went with the Rust agent runtime. **Known issues** says what does not work yet. This release also has the Phase 6 and Phase 7 changes to the Python packages: project trust, a sandbox for workflow scripts, DeepSeek thinking with tools, and tool annotations.

‎docs/PLAN/PLAN-RUST-AGENT-RUNTIME-REMOVAL.md‎

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

‎docs/PLAN/archive/PLAN-RUST-AGENT-RUNTIME-REMOVAL-EXECUTION-LOG.md‎

Lines changed: 13 additions & 1 deletion
Large diffs are not rendered by default.

‎docs/baselines/tui.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ macOS 环境:Apple Silicon,Homebrew `cargo` / `rustc` 1.96.1(**不是**钉
113113

114114
### 3.3 PTY 载体
115115

116-
`scripts/tui_pty/`(r8,Linux;README 在同目录)用 pyte 当屏幕,在真 PTY 里跑真的 `zypi`,查两件事:画面(欢迎页、一轮对话、`/model`、重启后 `/resume`、`--sandbox` 时状态栏的标签)和进程树(以六种方式离开 zypi,之后不能有进程留下;`-p` 下只杀 zypi,agent 与工具也得停)。它们要一个已构建的 `zypi`,所以不在 `pytest` 或 CI 里;WSL2 上的结果是 `smoke.py` 23/23(加 `--sandbox workspace` 26/26)、`exit_matrix.py` 12/12(沙箱下 14/14)、`print_exit.py` 4/4。脚本本身的辅助逻辑有 `scripts/tests/test_tui_pty.py`(Windows 上跳过依赖 `pty` 的 5 个)。r9 又加了两个:`resume_matrix.py`(`--continue`、`--resume <id|标题>`、`--session-id`、`zypi export` 对 Python 写的会话做了什么,13 例,WSL2 上 9 PASS / 4 GAP,GAP 不让脚本失败,`--strict` 才让)与 `mode_probe.py`(权限模式,只记录、不判对错:r9 时 12 个场景,结果见计划 §10.11;r10 起是 10 个场景、4 个被拒绝的 `--permission-mode` 值与设置页的一项检查,结果见 §10.13)。r11 又加了三个:`net_audit.py`(`zypi` 有没有外连,13 项检查:mock LLM 13/13,放进没有网络的命名空间再跑一次 13/13,真模型一次 13/13,含 agent 确有外连的正向对照)、`status_line_probe.py`(`[ui.status_line]` 画不画:4 个运行都与指南页所写一致,Python agent 下不画)与它用的替身 agent `status_proxy_agent.py`;结果见计划 §10.14。
116+
`scripts/tui_pty/`(r8,Linux;README 在同目录)用 pyte 当屏幕,在真 PTY 里跑真的 `zypi`,查两件事:画面(欢迎页、一轮对话、`/model`、重启后 `/resume`、`--sandbox` 时状态栏的标签)和进程树(以六种方式离开 zypi,之后不能有进程留下;`-p` 下只杀 zypi,agent 与工具也得停)。它们要一个已构建的 `zypi`,所以不在 `pytest` 或 CI 里;WSL2 上的结果是 `smoke.py` 23/23(加 `--sandbox workspace` 26/26)、`exit_matrix.py` 12/12(沙箱下 14/14)、`print_exit.py` 4/4。脚本本身的辅助逻辑有 `scripts/tests/test_tui_pty.py`(Windows 上跳过依赖 `pty` 的 5 个)。r9 又加了两个:`resume_matrix.py`(`--continue`、`--resume <id|标题>`、`--session-id`、`zypi export` 对 Python 写的会话做了什么,13 例,WSL2 上 9 PASS / 4 GAP,GAP 不让脚本失败,`--strict` 才让)与 `mode_probe.py`(权限模式,只记录、不判对错:r9 时 12 个场景,结果见计划 §10.11;r10 起是 10 个场景、4 个被拒绝的 `--permission-mode` 值与设置页的一项检查,结果见 §10.13)。r11 又加了三个:`net_audit.py`(`zypi` 有没有外连,13 项检查:mock LLM 13/13,放进没有网络的命名空间再跑一次 13/13,真模型一次 13/13,含 agent 确有外连的正向对照)、`status_line_probe.py`(`[ui.status_line]` 画不画:r11 时 4 个运行都与指南页所写一致,Python agent 下不画;r12 续 7 之后 pager 用本地已有的事实画这一行,探针的预期随之改了,见计划 §10.15 续 7)与它用的替身 agent `status_proxy_agent.py`;结果见计划 §10.14。
117117

118118
## 4. deny-list 与保留理由(0.4)
119119

‎scripts/tests/test_tui_pty.py‎

Lines changed: 67 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -702,13 +702,18 @@ def test_the_sampler_does_not_record_traffic_on_loopback():
702702
# ---- status_line_probe and status_proxy_agent: the status row and the message behind it --
703703

704704

705-
def test_the_status_line_scenarios_cover_both_row_types_with_and_without_the_message():
705+
def test_the_status_line_scenarios_cover_both_row_types_with_and_without_a_status_from_the_agent():
706706
assert {(s.kind, s.injected) for s in slp.SCENARIOS} == {
707707
(kind, injected) for kind in ("command", "builtin") for injected in (False, True)
708708
}
709709
assert len({s.name for s in slp.SCENARIOS}) == len(slp.SCENARIOS)
710710

711711

712+
def test_the_probe_names_the_model_the_proxy_sends():
713+
assert slp.PROXY_MODEL == spa.MODEL
714+
assert slp.AGENT_MODEL != slp.PROXY_MODEL # or the precedence test could not tell them apart
715+
716+
712717
def test_a_scenarios_config_text_is_a_status_line_section(tmp_path):
713718
script = tmp_path / "statusline.sh"
714719
for scenario in slp.SCENARIOS:
@@ -724,40 +729,83 @@ def test_the_row_patterns_match_the_row_and_nothing_else_on_the_screen():
724729
def scenario(kind, injected):
725730
return next(s for s in slp.SCENARIOS if (s.kind, s.injected) == (kind, injected))
726731

727-
with_message, without = scenario("builtin", True), scenario("builtin", False)
728-
assert re.search(with_message.row, " work │ proxy-model │ 25% ctx")
729-
assert not re.search(with_message.row, " work │ mock-a") # the model must be the message's
730-
assert re.search(without.row, " work │ mock-a") # any built-in row that starts with the dir
732+
with_status, without = scenario("builtin", True), scenario("builtin", False)
733+
assert re.search(with_status.row, " work │ proxy-model │ 25% ctx")
734+
assert not re.search(with_status.row, " work │ mock-a") # the model must be the agent's
735+
assert re.search(without.row, " work │ mock-a") # the client's own model, no context item
736+
assert not re.search(without.row, " work │ proxy-model")
731737
for elsewhere in (" /tmp/pi-statusline-x/work", " │ > │"):
732738
assert not re.search(without.row, elsewhere)
733739
command = scenario("command", False)
734740
assert re.search(command.row, f" {slp.ROW_TEXT}")
735741
assert not re.search(command.row, " STATUSROW")
736742

737743

738-
def test_a_run_is_what_the_page_says_when_the_row_follows_the_message():
744+
def test_a_run_is_what_the_page_says_when_the_row_is_drawn_from_the_right_facts():
739745
def says(kind, injected, **seen):
740746
return slp.verdict(slp.Scenario(kind, injected), **seen)[0]
741747

742-
ok = {"replied": True, "ran": False, "shown": False}
743-
# Plain Python agent: no row, and no script run.
744-
assert says("command", False, **ok)
745-
assert says("builtin", False, **ok)
746-
assert not says("command", False, **{**ok, "ran": True}) # the script ran: the page is wrong
747-
assert not says("builtin", False, **{**ok, "shown": True}) # a row without any message
748-
# With the message: the row is drawn, and a command script was run.
749-
assert says("command", True, replied=True, ran=True, shown=True)
750-
assert not says("command", True, replied=True, ran=False, shown=True)
751-
assert says("builtin", True, replied=True, ran=False, shown=True) # no script to run
752-
assert not says("builtin", True, **ok) # the control failed: the config text is suspect
753-
# A turn that was never answered tested nothing.
754-
assert not says("command", False, **{**ok, "replied": False})
748+
drawn = {"replied": True, "ran": True, "shown": True}
749+
# The row is drawn with the plain agent as well as with one that sends a status.
750+
for injected in (False, True):
751+
assert says("command", injected, **drawn)
752+
assert says("builtin", injected, replied=True, ran=False, shown=True) # no script to run
753+
assert not says("command", injected, **{**drawn, "shown": False}) # no row on the screen
754+
assert not says("builtin", injected, replied=True, ran=False, shown=False)
755+
assert not says("command", injected, **{**drawn, "ran": False}) # the script did not run
756+
assert not says("command", injected, **drawn, problems=["session_id is missing"])
757+
# A turn that was never answered tested nothing.
758+
assert not says("command", injected, **{**drawn, "replied": False})
755759

756760

757761
def test_the_fields_a_command_script_was_given_are_read_from_its_payload():
758762
assert slp.payload_fields('{"b": 1, "a": {"c": 2}}') == ["a", "b"]
759763
assert slp.payload_fields("not json") == []
760764
assert slp.payload_fields("[1, 2]") == []
765+
assert slp.payload_of('{"a": 1}') == {"a": 1}
766+
assert slp.payload_of("not json") == {} and slp.payload_of("[1]") == {}
767+
768+
769+
def _payload(model, **more):
770+
"""What a script is given when the session is in /tmp/x/work and the model is `model`."""
771+
return {
772+
"schema_version": 1,
773+
"cwd": "/tmp/x/work",
774+
"session_id": "s-1",
775+
"version": "0.5.0",
776+
"model": {"id": model, "display_name": model},
777+
"workspace": {"current_dir": "/tmp/x/work"},
778+
"cost": {"total_duration_ms": 10},
779+
"context_window": {},
780+
**more,
781+
}
782+
783+
784+
def test_a_payload_is_checked_for_the_facts_the_client_knows():
785+
plain = slp.Scenario("command", False)
786+
assert slp.payload_problems(plain, _payload("mock-a")) == []
787+
# The other scenario's model is a problem: the precedence went the wrong way.
788+
assert slp.payload_problems(plain, _payload("proxy-model")) == [
789+
"model.display_name is not 'mock-a'"
790+
]
791+
assert slp.payload_problems(slp.Scenario("command", True), _payload("proxy-model")) == []
792+
# Every fact that is missing is named.
793+
assert len(slp.payload_problems(plain, {})) == 6
794+
795+
796+
def test_a_payload_has_no_number_the_client_cannot_know_unless_the_agent_sent_it():
797+
plain, proxy = slp.Scenario("command", False), slp.Scenario("command", True)
798+
for field, section in (
799+
("used_percentage", "context_window"),
800+
("context_tokens", "context_window"),
801+
("context_window_size", "context_window"),
802+
("total_cost_usd", "cost"),
803+
):
804+
number = _payload("mock-a", **{section: {field: 0}})
805+
assert len(slp.payload_problems(plain, number)) == 1, field # zero is a made-up number
806+
# An agent that sent the number is believed.
807+
agent_number = _payload("proxy-model", **{section: {field: 25}})
808+
assert slp.payload_problems(proxy, agent_number) == [], field
761809

762810

763811
NEW_SESSION = b'{"jsonrpc": "2.0", "id": 2, "result": {"sessionId": "s-1"}}\n'

‎scripts/tui_pty/README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ a built `zypi`, so they are not part of `pytest` or CI.
1313
| `resume_matrix.py` | What `--continue`, `--resume <id>`, `--resume <title>`, `--session-id` and `zypi export` do with a session the Python agent wrote (13 cases). Two are **known gaps** (reported as `GAP`, not failures; `--strict` fails them): the pager still reads the old Rust agent's session files for them (`--session-id <fresh uuid>` closed when the agent began to honour `_meta.sessionId`; the two `zypi export` cases closed when `zypi export` began to start an agent and replay the session with `session/load`: they check the transcript on stdout, an error that names an unknown id, and that no agent is left running). Landing ADR1 (execution log section 10.11) has to close the two that are left and drop each case's `gap` text; a gap that has closed shows as `FIXED` |
1414
| `mode_probe.py` | Which permission modes the TUI offers (Shift+Tab cycle, `--always-approve`, `--permission-mode default\|bypassPermissions`) the Python agent honours: for each, whether a `write` is asked about and whether it is carried out unasked; then the four `--permission-mode` values that are refused (`acceptEdits`, `auto`, `dontAsk`, `plan`), each of which must exit at once with the reason; last, the settings page (does a search for "plan" find a "Plan mode" row, which choices does the Permission mode picker list). Judges nothing, prints a table (execution log section 10.13; plan appendix A, 1.P3 (a)): Plan, Auto and the settings page's Default are hidden because the agent honours neither (section 10.11 has the measurements from before they were hidden) |
1515
| `net_audit.py` | Whether zypi talks to the network (plan C.1). It plays one turn and, every few milliseconds, lists the sockets of zypi and of each process below it (`/proc/<pid>/fd` joined with `/proc/<pid>/net/*`). zypi must have no connection to a non-loopback address, and it must listen on none. `--mock` uses the mock LLM (the agent must be silent too). `--model-from FILE` plays one real turn with the `[model]` table of that `agent.toml`: the agent must then hold an established connection to a non-loopback address (the positive control, which shows that the sampler can see traffic), and the output names no host, address or key. `--no-network` (with `--mock`) runs everything in an empty network namespace (`bwrap --unshare-net`): the turn must still end |
16-
| `status_line_probe.py` | Whether the status row is drawn (`[ui.status_line]`, `type = "command"` and `"builtin"`). With the plain Python agent the row must not be drawn, and a command script must not run. With `status_proxy_agent.py`, which adds the `session_status` message that the old Rust agent sent, the row must be drawn: this second run is the control that shows the config text is right. Execution log section 10.14 has the result |
16+
| `status_line_probe.py` | Whether the status row is drawn from the right facts (`[ui.status_line]`, `type = "command"` and `"builtin"`). The Python agent sends no status, so with the plain agent the row is built from what zypi knows (directory, session id, model): it must be drawn with the model of the session, and a command script must run with a payload that names that model and session and has no number zypi cannot know (a context percentage, a cost). With `status_proxy_agent.py`, which adds a `session_status` message of its own, the row must show the model that message names: this second run shows that a status from the agent is read first. Execution log section 10.14 has the first result (the row stayed empty); section 10.15 has the change |
1717

1818
`pty_term.py` is the driver (`Term`, plus `/proc` helpers); `zypi_env.py` finds the binary and builds
19-
a throw-away home. `status_proxy_agent.py` is a stand-in agent: the Python agent plus one extra message.
19+
a throw-away home. `status_proxy_agent.py` is a stand-in agent: the Python agent plus a status message of its own.
2020
`status_line_probe.py` starts it through `PI_AGENT_COMMAND`.
2121

2222
## Running

0 commit comments

Comments
 (0)