1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Copyright (c) 2024-Present, Jeremy Plichta
* Licensed under the MIT License
*/
//! MCP (Model Context Protocol) interface for Tinytown.
//!
//! This module provides an MCP server interface that exposes Tinytown orchestration
//! operations as MCP tools, resources, and prompts. It supports both stdio and HTTP/SSE
//! transports.
//!
//! ## Tools
//! - `town.get_status` - Get town status including all agents
//! - `agent.list` - List all agents
//! - `agent.inbox` - Inspect an agent inbox
//! - `agent.spawn` - Spawn a new agent
//! - `agent.kill` - Kill (stop) an agent
//! - `agent.restart` - Restart a stopped agent
//! - `agent.prune` - Remove stopped or stale agents
//! - `task.assign` - Assign a task to an agent
//! - `task.list_pending` - List pending tasks across inboxes
//! - `message.send` - Send a message to an agent
//! - `backlog.add` - Add a task to the backlog
//! - `backlog.list` - List backlog tasks
//! - `backlog.claim` - Claim a backlog task for an agent
//! - `backlog.assign_all` - Assign all backlog tasks to agents
//! - `backlog.remove` - Remove a task from the backlog
//! - `mission.list` - List missions
//! - `mission.get_status` - Get detailed mission status
//! - `mission.status` - Alias for detailed mission status
//! - `mission.list_work` - List mission work items
//! - `mission.work_items` - Alias for mission work items
//! - `mission.list_watches` - List mission watch items
//! - `mission.watches` - Alias for mission watch items
//! - `mission.get_events` - Get recent mission events
//! - `mission.events` - Alias for recent mission events
//! - `mission.start` - Start a new mission
//! - `mission.approve` - Approve a mission work item review gate
//! - `mission.reject` - Reject a mission work item review gate
//! - `mission.pause` - Pause a mission through the dispatcher
//! - `mission.resume` - Resume a mission
//! - `mission.dispatch` - Run a single mission dispatcher tick
//! - `mission.note` - Queue an operator note for the dispatcher
//! - `mission.input` - Provide human input to a mission work item
//! - `mission.stop` - Stop a mission
//! - `recovery.recover_agents` - Recover orphaned agents
//! - `recovery.reclaim_tasks` - Reclaim tasks from dead agents
//!
//! ## Resources
//! - `tinytown://town/current` - Current town state
//! - `tinytown://agents` - List of all agents
//! - `tinytown://agents/{agent_name}` - Specific agent details
//! - `tinytown://backlog` - Current backlog
//! - `tinytown://tasks/{task_id}` - Specific task details
//! - `tinytown://missions` - All missions
//! - `tinytown://missions/{mission_id}` - Specific mission details
//!
//! ## Prompts
//! - `conductor.startup_context` - Context for conductor startup
//! - `agent.role_hint` - Role hints for agents
pub use ;
pub