Skip to content

Commit 77264a8

Browse files
igorcostaAutohand Evolve
andcommitted
Bundle Squad member management, group chats and routines
Co-authored-by: Autohand Evolve <code-noreply@autohand.ai>
1 parent ca4f0c5 commit 77264a8

12 files changed

Lines changed: 227 additions & 11 deletions

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Added
66

7+
- Squad MCP now also manages agent profiles, abilities, extra project folders, skills, group chats, channel membership and scheduled routines.
78
- Squad is built in as an MCP connection. Select an agent in the running app with `/squad`, send it direct messages with `/message`, and read conversation history and delivery receipts. The connection also reads Squad artifacts and memories.
89

910
## 0.9.10 - 2026-11-04

‎docs/adr/2026-11-05-built-in-squad-messaging.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,32 @@ check against the installed Squad bridge recognized 18 members with presence;
8383
it sent zero messages and made no app lifecycle calls. Local evidence is in
8484
`.artifacts/squad-mcp/compiled-mcp-proof.json` and `live-readonly-proof.json`.
8585

86+
## Expanded operator management
87+
88+
The canonical Squad MCP now exposes 37 tools, adding saved member profiles,
89+
abilities, directory grants, skill selections, channel settings/membership,
90+
private groups and scheduled routines. Bundle its `management.mjs` alongside
91+
the runtime and schemas. This keeps tool behavior identical between Squad
92+
and CLI without introducing a second client implementation. Management
93+
requires an updated bridge; a missing member-management endpoint explains
94+
that the app must be updated, without starting an upgrade.
95+
96+
Profile edits use canonical revisions. Folder grants and skill selections
97+
apply during later engine preparation, preserving current work. Groups reuse
98+
private channels and dispatch only explicit recipients; the bridge persists
99+
replies after client disconnect. Routines require a timezone and are disabled
100+
by default. Operator powers remain unavailable to managed Squad members.
101+
The rationale and controlled bridge evidence are in
102+
[Squad ADR-0181](https://github.com/autohandai/squad/blob/main/docs/adrs/ADR-0181-operator-mcp-manages-saved-members-and-work.md).
103+
104+
Focused CLI validation: typecheck, 13 related unit tests, and the actual
105+
Tuistory flow in both standard and fullscreen layouts pass. The terminal
106+
scenario now discovers and calls the new `get_member_profile` tool through
107+
the ordinary MCP tool-search/permission path, against an isolated fixture.
108+
Both layouts also pass with the compiled macOS ARM64 executable. The
109+
required full `bun run proof` is running; its aggregate outcome is recorded
110+
separately from these focused passes.
111+
86112
## Consequences
87113

88114
Desktop selection changes the unqualified `/message` recipient for this

‎docs/mcp.md‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Top-level `autohand squad` still opens the app; `autohand squad agents`,
5858
work without an interactive agent session. Legacy standalone runtime actions
5959
remain available, including top-level `autohand squad queue`.
6060

61-
The server exposes the existing channel/run/goal tools plus direct messaging
61+
The server exposes 37 tools: the existing channel/run/goal tools plus direct messaging
6262
(`message_member`, `get_conversation`, `get_member_queue`, `wait_for_message`),
6363
published artifacts (`list_artifacts`, `get_artifact`) and the knowledge
6464
library (`list_memories`, `read_memory`). These direct messages enter Squad's
@@ -68,6 +68,30 @@ Repeat `wait_for_message` using the same receipt after a timeout; inspect the
6868
queue before retrying a send whose response was lost. Creating members and
6969
changing their models still happens in the app.
7070

71+
Member management is also built in: `get_member_profile`,
72+
`update_member_profile`, `set_member_abilities`, `add_member_directory`,
73+
`remove_member_directory`, `list_skills` and `set_member_skills`. Read the
74+
saved revision before editing; pass `expected_revision` to reject stale
75+
changes. Folder grants use the existing engine directory settings on later
76+
turns; current work continues. Skill selection is distinct from installation
77+
on the next turn. Policy edits preserve other settings and OS grants.
78+
79+
Channels support `get_channel`, `update_channel`, `set_channel_members`,
80+
`list_channel_threads`, `create_group_chat` and `send_channel_message`.
81+
Groups are private channels with at least two existing members. Creation
82+
does not dispatch work. Sending dispatches only explicit `member_ids`;
83+
omitting them posts without starting agents. Replies persist on the bridge
84+
even after this CLI disconnects. Check per-recipient receipts before retrying.
85+
86+
Use `list_routines`, `get_routine`, `preview_routine`, `create_routine`,
87+
`update_routine` and `run_routine` for scheduled work. Schedules require an
88+
explicit IANA timezone. New routines default to disabled; set `enabled:true`
89+
to schedule, `enabled:false` to pause, or run a saved routine manually.
90+
These tools require an updated Squad bridge; older versions return an
91+
upgrade instruction. The CLI never upgrades or restarts the app automatically.
92+
The [canonical tool reference](https://github.com/autohandai/squad/blob/main/docs/integration/control-plane.md)
93+
contains arguments and examples.
94+
7195
Use a current Squad release for Library tools; older app versions may lack
7296
the artifact or knowledge-library endpoints. Updating the app does not
7397
require reinstalling the CLI's built-in MCP.

‎src/squad/vendor/SOURCE.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Canonical repository: https://github.com/autohandai/squad
44

5-
Revision: `9857b40f75135c537f18f65497b32518658e26a0`
5+
Revision: `4ffc242cbdc5b0ac9843b90fa862948cbe074f6e`
66

7-
`control-plane.mjs` and `runtime.mjs` are unchanged copies of
7+
`control-plane.mjs`, `runtime.mjs` and `management.mjs` are unchanged copies of
88
`server/control-plane/` at that revision, under the accompanying MIT license.
99
The `.d.mts` files are CLI type declarations. The bundle uses the runtime
1010
library, never the app's executable stdio entry point.
1111

12-
To update, copy both canonical modules and `LICENSE` together, update this
12+
To update, copy all three canonical modules and `LICENSE` together, update this
1313
revision, run Squad's `node scripts/check-control-plane.mjs`, and run the CLI
1414
`bun run proof`. Keep operator and managed-member connections separate.
1515
Do not add an automatic download or execute an app-side server on startup.

‎src/squad/vendor/control-plane.mjs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// framings. No I/O here so scripts/check-control-plane.mjs can import it
44
// without a bridge. The stdio entry point is mcp-server.mjs.
55

6+
import { MANAGEMENT_TOOLS } from './management.mjs';
7+
68
export const SERVER_NAME = 'autohand-squad-control-plane';
79
export const SERVER_VERSION = '1';
810
export const PROTOCOL_VERSIONS = ['2024-11-05', '2025-03-26', '2025-06-18'];
@@ -260,12 +262,17 @@ export const TOOLS = [
260262
},
261263
];
262264

265+
TOOLS.push(...MANAGEMENT_TOOLS);
263266
export const TOOL_NAMES = TOOLS.map((tool) => tool.name);
264267

265268
/** Small JSON-schema subset validator: types, enums, bounds, required, unknown fields. */
266269
export function validateArgs(schema, input, path = 'arguments') {
267270
const errors = [];
268271
const check = (node, value, at) => {
272+
if (node.anyOf) {
273+
if (!node.anyOf.some(branch => validateArgs(branch, value, at).length === 0)) errors.push(`${at} must match one of the allowed types`);
274+
return;
275+
}
269276
if (node.type === 'object') {
270277
if (value === undefined || value === null) value = {};
271278
if (typeof value !== 'object' || Array.isArray(value)) { errors.push(`${at} must be an object`); return; }

0 commit comments

Comments
 (0)