diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 08:36:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 08:36:06 -0300 |
| commit | 446cde19a6b6fb7125fc749608cc12b7452dad6e (patch) | |
| tree | a7c2792ecdb1833a2e5a3ef99b9fb6ce96c01a00 /abi/wire.zig | |
| parent | 2c2800c93e5417297dd06d3e52d5d336d975560c (diff) | |
| parent | ae3b9e9d19492c827f257da8a224a19d77de51c1 (diff) | |
| download | pardes-446cde19a6b6fb7125fc749608cc12b7452dad6e.tar.gz pardes-446cde19a6b6fb7125fc749608cc12b7452dad6e.zip | |
integration: a session's first client over an inherited socket before its first effects, the pair under PARDES_PAIR, and a session's last word, on the 9P run's fixes and the build's second pass: pardes-first-client (new --detach forks and returns; Options.pair and the join by fd; pardes FILE as a client and a session under the variable; ended CODE and left NAME: a client's own Detach exits 0 with its line again) and pardes-merge33, merged without a textual conflict; tui core-test 858/1013 (155 skipped), shell-test 1053/1056, the window builds; the coordinator's gate in the ledger (reorg/merge34)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'abi/wire.zig')
| -rw-r--r-- | abi/wire.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/abi/wire.zig b/abi/wire.zig index a36e746b..8713ba98 100644 --- a/abi/wire.zig +++ b/abi/wire.zig @@ -192,6 +192,10 @@ pub const ServerTag = enum(u8) { /// unit naming it: the hash, the whole's length and this piece's place /// (u64le each), then at most 1 MiB of it (core/replica.zig). blob = 0x0a, + /// The session's last word on a link: it ended, with its exit code. + ended = 0x0b, + /// ...or this client left it running (a Detach typed in it): its name. + left = 0x0c, }; pub const ServerMsg = union(ServerTag) { @@ -209,6 +213,8 @@ pub const ServerMsg = union(ServerTag) { blobs: []const u8, zstd: []const u8, blob: []const u8, + ended: u8, + left: []const u8, }; /// A message's header, for a payload sent on its own (a unit, a dump's @@ -244,6 +250,8 @@ pub fn decodeServer(tag: u8, payload: []const u8) Error!ServerMsg { .blobs => return .{ .blobs = payload }, .zstd => return .{ .zstd = payload }, .blob => return .{ .blob = payload }, + .ended => .{ .ended = try r.takeByte() }, + .left => .{ .left = try r.take(try r.takeInt(u16, .little)) }, }; try end(&r); return msg; @@ -268,6 +276,8 @@ pub fn encodeServer(out: []u8, msg: ServerMsg) Error![]const u8 { .pong => |v| try w.writeInt(u64, v, .little), .dump, .unit, .screen, .blobs, .zstd, .blob => |bytes| try w.writeAll(bytes), .check => |v| try w.writeInt(u64, v, .little), + .ended => |code| try w.writeByte(code), + .left => |name| try putSlice16(&w, name), } try finishMessage(&w, at); return w.buffered(); |
