From c1990b3e6e196ad41379aa432bf3ccca8a65d9f0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 00:36:50 -0300 Subject: 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//... /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 --- test/agent_session.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/agent_session.py') 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) -- cgit v1.3