use crate::boundary::{Action, Gesture};
use crate::monitor::Verb;
fn advertised() -> crate::registry::tools::Tool {
crate::registry::tools::Tool {
name: "Bash".into(),
description: "run a command".into(),
input_schema: serde_json::json!({
"type": "object",
"properties": {"command": {"type": "string", "minLength": 1}},
"required": ["command"],
}),
}
}
pub(super) fn surface() -> Vec<Gesture> {
let mut out = vec![
Gesture::Act(Action::Message {
workspace: "ws".into(),
agent: "c-1".into(),
content: "hi there".into(),
}),
Gesture::Act(Action::Interrupt {
workspace: "ws".into(),
agent: "c-1".into(),
content: "no, this".into(),
}),
Gesture::Act(Action::Stop {
workspace: "ws".into(),
agent: "c-1".into(),
children: true,
}),
Gesture::Act(Action::Scan {
workspace: "ws".into(),
}),
Gesture::Act(Action::Nudge {
workspace: "ws".into(),
agent: "c-1".into(),
}),
Gesture::Act(Action::DeleteWorkspace {
workspace: "ws".into(),
typed: "alba".into(),
}),
Gesture::Act(Action::DeleteAgent {
workspace: "ws".into(),
agent: "c-1".into(),
typed: "the goal name".into(),
}),
Gesture::Act(Action::Monitor(Verb::Arm {
workspace: "ws".into(),
model: "claude-haiku-4-5".into(),
})),
Gesture::Act(Action::Monitor(Verb::Disarm {
workspace: "ws".into(),
})),
Gesture::Act(Action::Monitor(Verb::Flag {
workspace: "ws".into(),
agent: "c-1".into(),
reason: "it is rewriting an unrelated crate".into(),
})),
];
for ruling in [
crate::control::judge::Ruling::Pass,
crate::control::judge::Ruling::Hold,
crate::control::judge::Ruling::Refuse,
] {
out.push(Gesture::Act(Action::AnswerHold {
workspace: "ws".into(),
agent: "c-1".into(),
ruling,
}));
}
out.push(Gesture::Act(Action::Ack));
out.push(Gesture::Act(Action::MarkSeen {
workspace: "ws".into(),
agent: "c-1".into(),
}));
out.push(Gesture::Act(Action::ClearTrail));
for tools in [Vec::new(), vec![advertised()]] {
out.push(Gesture::Act(Action::Advertise { tools }));
}
out.push(Gesture::Act(Action::Route(
crate::registry::mailbox::Verb::Invoke(crate::registry::mailbox::Call {
client: "laptop".into(),
tool: "Bash".into(),
input: serde_json::json!({"command": "ls -l", "timeout": 30}),
}),
)));
out.push(Gesture::Act(Action::Route(
crate::registry::mailbox::Verb::Complete(crate::registry::mailbox::Completion {
invocation: "inv-1".into(),
capture: crate::registry::mailbox::Capture {
stdout: "hello\n".into(),
stderr: "warned\n".into(),
exit_code: 3,
},
}),
)));
out
}