pub struct ServerConfig {
pub enabled: bool,
pub port: u16,
pub bind: IpAddr,
pub tool_record_cap_kb: u64,
pub first_frame_cap_kb: u64,
pub more_page_cap_kb: u64,
pub allowed_origins: Vec<String>,
}Expand description
The [server] block of forge.toml: whether the socket’s listener
starts with forge, where it binds, and how large a served page’s
structured tool record may be.
On unless it is turned off, so a restart leaves the socket serving without a key being added first.
Fields§
§enabled: bool§port: u16§bind: IpAddrLoopback by default: an address on a network interface is a
deliberate line in forge.toml, never something on-by-default
reaches.
tool_record_cap_kb: u64How large a frame’s tool_use_result may be in anything a client is
served, in KB (#2374).
A record over it is reduced first, keeping only the keys a client
draws (a mutation’s patch and outside-edit mark, a question’s answers
and notes); it becomes an omitted marker only when that reduction is
still over the cap. Every path to a client is bounded - a page, a
more, the live stream and both repairs - while the transcript keeps
the record whole and the visible tool-result block draws as always.
0 serves the records whole, for a reader whose changes carry patches
beyond the default.
first_frame_cap_kb: u64How many bytes of conversation a session’s first snapshot carries, in KB.
The first snapshot is what a seat switch waits on, and twenty
turns of a large conversation are megabytes: seconds over a network,
from a frame a client spends milliseconds on locally. The newest
turns are kept while they fit and the rest is paged through more as
it always was, so nothing is dropped and the order does not move.
0 serves the page the turn count asks for, for a reader who would
rather have the whole window in one frame.
more_page_cap_kb: u64How many bytes of conversation a more page carries, in KB.
A page past the first frame is unbounded by its turn count alone:
the page contract is whole turns, so one large turn crossed whole and
a more answer could be tens of megabytes. The newest whole turns are
kept while they fit, the newest rides even when it alone is over, and
the cursor names the history above the page as it always did - nothing
is dropped and the walk above it still reaches every turn.
0 serves the page the turn count asks for.
allowed_origins: Vec<String>Extra browser origins allowed to open the socket, beside the shell’s
own, the server’s own, and any page served on the user’s own machine -
the localhost name or any loopback IP address, any port, http or
https, in every build. A web client served from another address is one
only the operator knows; an empty list allows none.