Expand description
A subject’s wire form, and the one place it is decided.
The server hands a view the surface’s own values, and a client reads a shape built for it here rather than the core’s structs. A twin per subject keeps a wire change in one file instead of in a handler and a test, and the fixtures beside this module are what make a changed shape fail a test rather than a client.
The twins are complete. A field is carried unless it is a Rust
mechanism rather than data - a oneshot, an Arc<Workspace> - because
the client is not today’s pages: it is built against this wire, and a
field missing here cannot be added later without a server change.
Re-exports§
use std::collections::BTreeMap;🔒use std::collections::HashMap;🔒use std::path::Path;🔒use std::sync::Arc;🔒use anyhow::Result;🔒use forge_primitives::git_diff::LayerState;🔒use forge_primitives::plugins::PluginUpdateRun;🔒use forge_primitives::plugins::PluginsInventorySnapshot;🔒use forge_primitives::review::ReviewAnchor;🔒use forge_primitives::review::ReviewSet;🔒use forge_primitives::review::ReviewSide;🔒use forge_primitives::review::ReviewThread;🔒use forge_primitives::runtime::AvailableAgent;🔒use forge_primitives::runtime::AvailableCommand;🔒use forge_primitives::runtime::MonitorRecord;🔒use forge_primitives::slack::SlackSubscription;🔒use forge_primitives::ContentBlock;🔒use forge_primitives::GotifySubscription;🔒use forge_primitives::Message;🔒use forge_primitives::SessionSlot;🔒use forge_primitives::UserEnvelope;🔒use forge_workspace::env::git_diff::content::DiffContent;🔒use forge_workspace::env::git_diff::content::FileContent;🔒use forge_workspace::env::git_diff::content::scan as scan_content;🔒use forge_workspace::env::git_diff::file::merge_base;🔒use forge_workspace::env::git_diff::file::read_file_lines;🔒use forge_workspace::env::git_diff::resolver::AnchorPlacement;🔒use forge_workspace::env::git_diff::resolver::OutdatedReason;🔒use forge_workspace::env::git_diff::resolver::place_anchor_in_content;🔒use forge_workspace::env::git_diff::resolver::place_anchor_in_lines_with;🔒use forge_workspace::env::processes::ProcessSnapshot;🔒use forge_workspace::McpServers;🔒use forge_workspace::ProjectView;🔒use serde::Deserialize;🔒use serde::Deserialize;🔒use serde::Serialize;🔒use serde::Serialize;🔒use serde_json::Value;🔒use crate::file_index::FileIndex;🔒use crate::surface::AgentRow;🔒use crate::surface::PendingAsk;🔒use crate::surface::ViewSurface;🔒use crate::transcript::Rendered;🔒use crate::transcript::TaskEnding;🔒use crate::transcript::TurnSpan;🔒use crate::transport::TransportState;🔒use crate::transport::conversation::Conversation;🔒use crate::transport::conversation::Held;🔒use crate::transport::envelope::Subject;🔒use crate::work::WorkState;🔒use crate::work::git_work_view;🔒use crate::work::work_from_scan;🔒
Structs§
- Agent
Wire - One seat’s row: the surface’s own
AgentRow, plus the read that is per SEAT rather than per project. - Board
Wire - The board’s own read: every project’s live detail, for the page and the rail that draw it (#2517).
- Composer
Wire - What one seat’s composer is doing.
- Connectors
Wire - What the inbound connectors are watching, server-wide.
- Conversation
Wire - The conversation a session’s transcript replayed, and how many times it has compacted.
- Dictate
Wire - Dictation’s preflight state.
- Extensions
Wire - The Extensions page’s read: the plugin inventory, the PATH checks the scan cannot carry, and the last update run.
- Gotify
Wire - Home
Wire - The home, as a client sees it: every read a home-scoped view makes.
- LspCheck
Wire - One declared LSP server and whether its binary resolves on PATH.
- Open
Timings - The slices of one session open, in milliseconds, gathered as its read runs (#2374).
- Page
- One page of history: the newest turns, in conversation order, and the handle that asks for the ones above them.
- Project
Board Identity - One project’s identity, which is all a board row needs to place it.
- Project
Board Wire - One project’s board detail.
- Project
Connectors Wire - One project’s connector subscriptions, as the row’s section draws them.
- Project
Wire - One project row: the project, and the per-row reads the home draws it from.
- Record
Cap 🔒 - What the cap did to one served record, for the log line beside it.
- Resumable
Session Wire - One session a seat can resume, as
/resume’s list draws it: the id a pick writes into the draft, and the transcript’s own title beside it. - Reviewed
Thread Wire - One review thread as a record carries it: the stored thread, and where its anchor sits in the content the record ships beside it.
- Reviews
Wire - The review reads for one branch, each carrying its own answer.
- Session
Header Wire - The session’s header facts, including the two a client cannot otherwise reach: the catalogue a picker draws its rows from, and whether a turn is in flight.
- Session
State Wire - Where a session’s reads find their own working tree.
- Session
Wire - One session, as a client sees it: every read a session-scoped view makes.
- Slack
Wire - Turn
Wire - One turn, as a page carries it: the key the server named it by, and the messages it ran as.
- Vault
Wire - The shared vault session as the settings card draws it.
- Voice
Wire - The voice switch and where its model lands, as the home carries them.
- Whole
File 🔒 - One whole file an anchor needed, and whether the read carried all of it.
Enums§
- File
Content Wire - One file’s content at a revision, as the
file_contentanswer carries it: the lines a review page’s between-hunk expansion draws. - NotReady 🔒
- Why a read could not bring its copy current, which the refusal’s text says apart: they are different losses and only one is about a number.
- Outdated
Reason Wire - The resolver’s own reason, crossing as data rather than as prose.
- Pending
AskWire - What a seat is held on: every kind of parked interaction, not the two the dock happened to draw first. Each request crosses as the core’s own shape, because a client draws it rather than re-deriving it.
- Read
Wire - One of the surface’s two independent review reads: the records, or why they could not be read. They fail apart, so neither is collapsed into the other, and a client can tell an empty branch from an unreadable one.
- Thread
Resolution Wire - Where an anchor sits, as a view draws it: the line in the anchor’s own side’s numbering, or why it could not be placed.
Constants§
- CATCH_
UP_ 🔒WAIT - How long an encode waits for the fold loop to catch up before filling the gap from the seat’s own window.
- DRAWN_
RECORD_ 🔒KEYS - The keys a client actually draws out of a structured record: a mutation’s patch and its outside-edit mark, a question’s answers and the notes typed beside them.
- SEAL_
WAIT 🔒 - How long a read whose copy needs an unapplied seal waits for the fold before refusing.
- SEED_
WAIT 🔒 - How long a request waits for a live seat’s first
Connectedbefore answering without a conversation. - SUBSCRIBE_
TURNS - How many of a conversation’s newest turns a subscribe carries.
- WHOLE_
FILE_ 🔒READS_ PER_ RECORD - At most this many whole-file reads per record encode. An ordinary record reads none - every anchor sits in its hunks - and a review with more comments outside its hunks than this answers the rest from the bounded content rather than running an unbounded pile of git subprocesses on every seat encode.
Functions§
- all_
turns messagesas the whole turnsrenderednames, in conversation order.- await_
current 🔒 - Wait, up to
within, forslot’s held copy to satisfycurrent, and answer it when it does. - awaits_
seal_ 🔒history - Whether
slot’s copy is missing rows its epoch opened on. - board 🔒
- The board’s record, from the reads a board-scoped view makes.
- boot_id 🔒
- The server run’s own identity, minted once.
- cap_
message_ 🔒record - The same bound on a live frame’s record, before it goes to a client (#2374): a reload and a live frame draw the same record or the marker.
- cap_
tool_ 🔒record - Bound one served
tool_use_resulttocapbytes (#2374). - cap_
tool_ 🔒records - Bound every frame’s
tool_use_resultin a page about to be SERVED (#2374). - cap_
turn 🔒 cap_tool_recordsfor one turn, answering what it bounded and the call each belongs to rather than logging it here.- catch_
up 🔒 - Bring
slot’s held conversation up towant, or report that it cannot. - checked_
refresh 🔒 - The refresh a record may state as its own check: none when the run answered nothing (its leader panicked or was cancelled, or a bound cut it), because the words beside that state are forge’s own rather than git’s.
- compact_
counters 🔒 - Fold each run of consecutive thinking-token counters in a turn into the one frame it draws as.
- conversation_
for - The seat’s conversation, answering from its own transcript when the stream holds none.
- counted 🔒
- How many frames a counter stands for, itself included.
- counter_
dispatch 🔒 - The dispatch a counter ran under, empty when it is the turn’s own.
- counter_
stamp 🔒 - The stamp a counter frame carries, when it carries one.
- cron_
names_ of - The schedules the fired prompts in
turnscame from, keyed by the prompt’s own id. - diff_
base_ 🔒error - Why a record’s
diffcould not check its base: the refresh’s words when it ran, the store’s when the refresh answered nothing, and none when no refresh ran - the field names git’s words, never forge’s own. - encode_
subject - A subject’s wire form. The ONE place it is produced.
- encode_
subject_ 🔒timed encode_subject, carrying the session’s own open timings.- extensions 🔒
- The Extensions page’s read, as the wire carries it.
- fits 🔒
- Whether a value serialises into the cap.
- fixture_
seat - The seat the fixture surface is populated for.
- floor_
cursor 🔒 - Hand the window’s floor back as a page’s cursor when the page opens on the window’s front (#2420).
- forged_
ending 🔒 - The notice as a frame of its own, for the turn that holds the call it ends.
- frame_
of 🔒 - One message as the page carries it, or the notice that says it will not.
- grown 🔒
- The growth one counter frame stands for: one frame’s delta, or a run’s sum.
- home 🔒
- The home’s record, from the reads a home-scoped view makes.
- is_
counter 🔒 - Whether the frame is a thinking-token counter.
- line_
carried 🔒 - Whether any hunk of
filescarriesanchor.lineon the anchor’s side. - log_
record_ 🔒cap - Say what the cap did to an executed call’s record (#2374).
- opens_
of 🔒 - Where each turn opens, one entry per turn, and what names it.
- owed_
endings 🔒 - The endings that name a call this turn holds and that the turn does not already carry.
- page
- Slice a conversation into whole turns, newest first.
- page_
within page, with the whole turns it carries held tobudgetbytes.- placement_
wire 🔒 resolution_wire’s twin for the seat tree: the placement the surface already resolved against the seat’s own working file crosses as-is - the numbering is the anchor’s home, somoved_fromis always named when there is one.- reduced_
to 🔒 - The record reduced to
keys, orNonewhen it holds none of them. - request_
context_ 🔒usage_ if_ unreported - Ask the core for a context reading on
slotwhen the seat reports none. - request_
mcp_ 🔒snapshot_ if_ unreported - Ask the core for an MCP snapshot on
slotwhen the seat reports none. - resolution_
wire 🔒 - One anchor placed against the bounded content the record carries. With
trustedthe line number is evidence too, because the branch-ahead layer is the numbering the anchor was written in - the same trust a view’s overlay extends to its own home scope. Untrusted, the placement is earned by content and neighbours alone. - reviewed_
threads 🔒 - Every thread with its landing against
content- the same content the record ships, so a page draws a thread where this answer says. - same_
run 🔒 - Whether
nextcontinues the counter runlastis part of. - seed_
from_ 🔒transcript - The conversation the seat’s transcript holds, for a seat this transport holds nothing for.
- session 🔒
- One session’s record, from the reads a session-scoped view makes.
- slice_
ms 🔒 - One read’s share of the open, in milliseconds.
- stated_
base 🔒 - The base a record’s
gitrow states. When the read refreshed, the row states the check itsdiffwas read against, never the store’s newer measurement (a bypass answered while a fetch landed); a read that did not refresh, or one whose refresh answered nothing, states what the store holds. - turn_
holds_ 🔒call - Whether these frames make the call
id. - turn_
ranges 🔒 - The message range of every turn
spansnames, in conversation order, each with what names it. - turn_
wire 🔒 - The messages
from..toas one turn, which is the shape both the session record and a page carry. - whole_
files_ 🔒for - The whole files for the anchors no hunk carries a line for.
Type Aliases§
- Whole
Files 🔒 - The whole files an anchor needed, one per
(path, side).