use serde_json::Value;
use super::Verb;
pub const BALLS: Verb = Verb {
word: "balls",
params: &[],
summary: "every ball⇄workspace binding fact",
detail: "The join rows: which ball is claimed by which workspace, in which \
state. It names no workspace, so its subject is EVERY channel this \
box holds, and the pane is the union — the same fanned shape \
`workspaces` and the decision queue keep. A ball nobody holds \
names no claimant and no wall, which is a reading rather than a \
blank.",
};
pub const BOARD: Verb = Verb {
word: "board",
params: &[],
summary: "the fleet board — every live ball in its column",
detail: "The balls as columns: ready, gated, claimed, blocked. Gated is \
balls' own close-blocker rule — a ball you could claim but could \
not deliver — shown with the ball whose close mints its gate. \
Each claimed row names the conversations working it and carries \
what it has cost. It is also the ONLY answer carrying an armed \
loop's own facts: there is no `fleet` read on this wire, and a \
box running nothing leaves the array out rather than answering an \
empty one.",
};
pub const WORKSPACE_BALLS: Verb = Verb {
word: "workspace-balls",
params: &["workspace"],
summary: "the balls one workspace holds, with what each has cost",
detail: "Every ball bound to the named workspace: its id, its badge, the \
project its `bl` verbs run in, the name they stamp `--as`, and \
the tokens and money its conversations have spent on it. `balls` \
answers the whole box's binding table; this answers one wall.",
};
pub const MARKS: Verb = Verb {
word: "marks",
params: &["workspace"],
summary: "the branch this workspace tracks its tasks on",
detail: "Each agent tracks on a balls branch of its own, in a task space \
of its own, so two agents' task churn never collides. \
`balls/tasks` is the project's shared board, which is where a \
workspace raised to work an existing project is pointed. This is \
the read; the form that amends the branch is a write this seat \
does not compose.",
};
pub fn balls() -> Value {
BALLS.built(Vec::new())
}
pub fn board() -> Value {
BOARD.built(Vec::new())
}
pub fn workspace_balls(workspace: String) -> Value {
WORKSPACE_BALLS.built(vec![workspace])
}
pub fn marks(workspace: String) -> Value {
MARKS.built(vec![workspace])
}
#[cfg(test)]
mod tests;