summaryrefslogtreecommitdiff
path: root/test/agent_session.py
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-20 00:36:50 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commitc1990b3e6e196ad41379aa432bf3ccca8a65d9f0 (patch)
treed7ad5afe559f7f56464b14c3122242fa3f16399b /test/agent_session.py
parent717afaf3177a2e0925b18ae3445119efe808b129 (diff)
downloadpardes-c1990b3e6e196ad41379aa432bf3ccca8a65d9f0.tar.gz
pardes-c1990b3e6e196ad41379aa432bf3ccca8a65d9f0.zip
Flatten the 9P control tree and move it out of fs.zig
The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane/<n>/... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'test/agent_session.py')
-rw-r--r--test/agent_session.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/agent_session.py b/test/agent_session.py
index b920b006..aa87c845 100644
--- a/test/agent_session.py
+++ b/test/agent_session.py
@@ -52,21 +52,21 @@ def run(args, command, status):
client, _ = context.__enter__()
try:
try:
- while not client.read('/self/pane/1/body').strip():
+ while not client.read('/pane/1/body').strip():
time.sleep(.01)
started = time.monotonic()
- client.write('/self/pane/1/pty/data', shlex.join(['/bin/sh', str(script)]).encode() + b'\r')
+ client.write('/pane/1/pty/data', shlex.join(['/bin/sh', str(script)]).encode() + b'\r')
status['phase'] = 'readiness'
wait_ready(client, args.ready)
if args.prepare_key is not None:
status['phase'] = 'preparation'
- client.write('/self/pane/1/pty/data', args.prepare_key)
+ client.write('/pane/1/pty/data', args.prepare_key)
wait_ready(client, args.ready)
ready_ms = (time.monotonic() - started) * 1000
status.update(phase='history', required_body_rows=args.min_rows)
while True:
started = time.monotonic()
- body = client.read('/self/pane/1/body')
+ body = client.read('/pane/1/body')
body_read_ms = (time.monotonic() - started) * 1000
rows = body.count(b'\n') + int(bool(body) and not body.endswith(b'\n'))
status.update(body_bytes=len(body), body_rows=rows)
@@ -81,13 +81,13 @@ def run(args, command, status):
raise AssertionError('probe is already visible')
status['phase'] = 'probe-visible'
started = time.monotonic()
- client.write('/self/pane/1/pty/data', probe.encode())
+ client.write('/pane/1/pty/data', probe.encode())
while probe not in screen_text(client).replace('\n', ''):
time.sleep(.01)
write_ms = (time.monotonic() - started) * 1000
status['phase'] = 'probe-cleared'
started = time.monotonic()
- client.write('/self/pane/1/pty/data', b'\x15')
+ client.write('/pane/1/pty/data', b'\x15')
while True:
observed = screen_text(client)
status['observed_visible_text_sha256'] = hashlib.sha256(observed.encode()).hexdigest()
@@ -109,7 +109,7 @@ def run(args, command, status):
client.socket.settimeout(.25)
for _ in range(2):
try:
- client.write('/self/pane/1/pty/data', b'\x03')
+ client.write('/pane/1/pty/data', b'\x03')
except (OSError, EOFError):
pass
time.sleep(.05)