Skip to documentation
SLOP

tiny.acp.TransferLimits

Reference tiny.acp TransferLimits

Defined in client.

A caller caps what the client writes to the agent and what it keeps from the agent, because the agent is another program and can send without end.

API (5)

Fields and members

Public fields and members.

No direct callersNo direct callsclientTransferLimits
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/acp/src/client.zig:140

zig
/// A caller caps what the client writes to the agent and what it keeps from the agent, because the/// agent is another program and can send without end. The structure sets five caps: the size of/// each outgoing message, the size of each incoming update, the number of updates, and the size and/// chunk count of one prompt's reply. Every cap must be above zero, and `Client.init` returns/// `error.InvalidLimits` otherwise. `Options.transfer_limits` takes it and has no default. The/// reader's line limit in `Options.reader_limits` is separate and applies to every incoming line/// first.pub const TransferLimits = struct {    /// The largest message the client writes to the agent, in bytes, counting the newline that ends    /// it. The limit applies to every message the client writes: `initialize`, `session/new`,    /// prompts, permission answers, error answers and `session/cancel`. A larger message fails the    /// call with `error.RequestCapacityExceeded` and nothing is written.    request_bytes: usize,    /// The most reply text, in bytes, one prompt keeps. The chunk that would pass it stays out of    /// the reply, and the client sends `session/cancel`. The result then holds an overflow, and its    /// kind is `response_bytes`. The limit counts again from zero for each prompt.    response_bytes: usize,    /// The largest update message the client accepts, in bytes of the line after surrounding    /// whitespace is trimmed. A larger update fails the call with `error.UpdateCapacityExceeded`    /// before the observer sees it.    update_bytes: usize,    /// The most update messages one client accepts over its whole life. The update sequence starts    /// at 1 and never resets, so the first update numbered above this cap fails the call with    /// `error.UpdateCountCapacityExceeded`.    update_count: u64,    /// The most agent message chunks one prompt's reply keeps. The chunk past it stays out of the    /// reply, and the client sends `session/cancel`. The result then holds an overflow, and its    /// kind is `response_segments`.    response_segment_count: usize,    fn valid(self: TransferLimits) bool {        return self.request_bytes != 0 and self.response_bytes != 0 and            self.update_bytes != 0 and self.update_count != 0 and            self.response_segment_count != 0;    }};

Source: lib/acp/src/root.zig:74

zig
pub const TransferLimits = client.TransferLimits;

Audit

Definitions1
Public names2
Members5
Version26.7.0
Revisiondaab053ee433