use serde_json::Value;
use super::Verb;
pub const INTERRUPT: Verb = Verb {
word: "interrupt",
params: &["workspace", "agent", "content"],
summary: "cut a conversation off mid-work and say this instead",
detail: "The driver is killed and the content deposited, both stamped as \
one gesture, and the deposit's own driver-start is what carries \
the turn on — so nothing else has to be asked for afterwards. The \
content crosses verbatim, so quote it as one argument. The cascade \
onto descendants is deliberately not offered: this gesture's \
subject is the conversation being talked to, and taking a subtree \
down is `stop`'s question, not this one's.",
};
pub const STOP: Verb = Verb {
word: "stop",
params: &["workspace", "agent"],
summary: "kill the driver held on a conversation",
detail: "It kills the driver and leaves everything else standing: the \
conversation's history, its worktree and its inbox are untouched, \
and `nudge` starts a driver on it again. This is the BARE form. \
The wire also carries a `children` flag that takes the whole \
subtree down, and this seat composes no gesture that raises it — a \
cascade is a second control with a second confirmation, and it \
belongs beside the conversation records that would say what is \
under there.",
};
pub const RETARGET: Verb = Verb {
word: "retarget",
params: &["workspace", "agent"],
summary: "settle a conversation onto the head of the config lineage governing it",
detail: "Marks the conversation to be re-forked onto the head of the \
config lineage that governs it, which its own executor lands at \
the next step boundary. Nothing is rewritten now: what comes back \
is the captured run of the marking, and the conversation keeps \
running whatever it was running.",
};
pub const DELETE_AGENT: Verb = Verb {
word: "delete-agent",
params: &["workspace", "agent", "typed"],
summary: "delete a conversation; the typed name arms taking its children too",
detail: "Removes the conversation and everything the engine holds for it — \
its ref, worktree, steps and inbox. Refused while it is live, so a \
conversation still working is not deleted out from under itself. \
An EMPTY `typed` deletes the one conversation; typing its name \
exactly is what arms taking its descendants with it, and without \
that the substrate declines a subtree nobody confirmed.",
};
pub fn interrupt(workspace: String, agent: String, content: String) -> Value {
INTERRUPT.built(vec![workspace, agent, content])
}
pub fn stop(workspace: String, agent: String) -> Value {
STOP.built(vec![workspace, agent])
}
pub fn retarget(workspace: String, agent: String) -> Value {
RETARGET.built(vec![workspace, agent])
}
pub fn delete_agent(workspace: String, agent: String, typed: String) -> Value {
DELETE_AGENT.built(vec![workspace, agent, typed])
}