1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! `PipeAck` — server-side response to one `RichContent` notification
//! line written into the per-agent socket at
//! `${config_base_dir}/pipes/<agent_instance_hierarchy>/socket`.
//!
//! The cli-stream socket handler (see `objectiveai-cli-stream/src/pipes.rs`)
//! used to be write-only from the client side — clients pushed an
//! NDJSON `RichContent` and disconnected, with no visibility into
//! whether the line was actually parsed, queued, and dispatched
//! upstream. `agents message` needs that visibility so it knows
//! whether to fall back to a continuation; the server now writes
//! one `PipeAck` line after each processed input line.
//!
//! Wire shape (one NDJSON line):
//!
//! - `{"type":"ok"}`
//! - `{"type":"error","message":"<…>"}`
//!
//! Backward-compatible: old clients that close the socket immediately
//! after writing see a broken pipe on the server's ack write, which
//! the server silently swallows.
use JsonSchema;
use ;