agent-relay 3.1.22 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/bin/agent-relay-broker-darwin-arm64 +0 -0
- package/bin/agent-relay-broker-darwin-x64 +0 -0
- package/bin/agent-relay-broker-linux-arm64 +0 -0
- package/bin/agent-relay-broker-linux-x64 +0 -0
- package/dist/index.cjs +2852 -16618
- package/dist/src/cli/commands/core.d.ts.map +1 -1
- package/dist/src/cli/commands/core.js +1 -0
- package/dist/src/cli/commands/core.js.map +1 -1
- package/dist/src/cli/commands/setup.js +1 -1
- package/dist/src/cli/commands/setup.js.map +1 -1
- package/dist/src/cli/lib/broker-lifecycle.d.ts +1 -0
- package/dist/src/cli/lib/broker-lifecycle.d.ts.map +1 -1
- package/dist/src/cli/lib/broker-lifecycle.js +118 -0
- package/dist/src/cli/lib/broker-lifecycle.js.map +1 -1
- package/dist/src/cli/lib/core-maintenance.d.ts.map +1 -1
- package/dist/src/cli/lib/core-maintenance.js +46 -1
- package/dist/src/cli/lib/core-maintenance.js.map +1 -1
- package/dist/src/cli/lib/relaycast-mcp-command.d.ts +5 -0
- package/dist/src/cli/lib/relaycast-mcp-command.d.ts.map +1 -0
- package/dist/src/cli/lib/relaycast-mcp-command.js +13 -0
- package/dist/src/cli/lib/relaycast-mcp-command.js.map +1 -0
- package/dist/src/cli/relaycast-mcp.d.ts +35 -0
- package/dist/src/cli/relaycast-mcp.d.ts.map +1 -0
- package/dist/src/cli/relaycast-mcp.js +432 -0
- package/dist/src/cli/relaycast-mcp.js.map +1 -0
- package/package.json +9 -8
- package/packages/acp-bridge/package.json +2 -2
- package/packages/config/package.json +1 -1
- package/packages/hooks/package.json +4 -4
- package/packages/memory/package.json +2 -2
- package/packages/openclaw/README.md +7 -7
- package/packages/openclaw/dist/identity/files.js +5 -5
- package/packages/openclaw/dist/identity/files.js.map +1 -1
- package/packages/openclaw/dist/setup.js +4 -4
- package/packages/openclaw/package.json +2 -2
- package/packages/openclaw/skill/SKILL.md +24 -24
- package/packages/openclaw/src/identity/files.ts +5 -5
- package/packages/openclaw/src/setup.ts +4 -4
- package/packages/openclaw/templates/SOUL.md.template +5 -5
- package/packages/policy/package.json +2 -2
- package/packages/sdk/dist/__tests__/unit.test.js +8 -0
- package/packages/sdk/dist/__tests__/unit.test.js.map +1 -1
- package/packages/sdk/dist/client.js +2 -2
- package/packages/sdk/dist/client.js.map +1 -1
- package/packages/sdk/dist/examples/example.js +1 -1
- package/packages/sdk/dist/examples/example.js.map +1 -1
- package/packages/sdk/dist/examples/ralph-loop.js +6 -6
- package/packages/sdk/dist/examples/ralph-loop.js.map +1 -1
- package/packages/sdk/dist/relay-adapter.js +4 -4
- package/packages/sdk/dist/relay-adapter.js.map +1 -1
- package/packages/sdk/dist/relay.d.ts +1 -0
- package/packages/sdk/dist/relay.d.ts.map +1 -1
- package/packages/sdk/dist/relay.js +2 -0
- package/packages/sdk/dist/relay.js.map +1 -1
- package/packages/sdk/dist/workflows/runner.js +8 -8
- package/packages/sdk/dist/workflows/runner.js.map +1 -1
- package/packages/sdk/dist/workflows/validator.js +4 -4
- package/packages/sdk/dist/workflows/validator.js.map +1 -1
- package/packages/sdk/package.json +2 -2
- package/packages/sdk/src/__tests__/unit.test.ts +10 -0
- package/packages/sdk/src/client.ts +2 -2
- package/packages/sdk/src/examples/example.ts +1 -1
- package/packages/sdk/src/examples/ralph-loop.ts +6 -6
- package/packages/sdk/src/relay-adapter.ts +4 -4
- package/packages/sdk/src/relay.ts +2 -0
- package/packages/sdk/src/workflows/runner.ts +8 -8
- package/packages/sdk/src/workflows/validator.ts +4 -4
- package/packages/sdk-py/pyproject.toml +1 -1
- package/packages/sdk-py/src/agent_relay/models.py +11 -0
- package/packages/sdk-py/src/agent_relay/relay.py +9 -6
- package/packages/sdk-py/tests/test_relay_lifecycle_hooks.py +23 -0
- package/packages/telemetry/package.json +1 -1
- package/packages/trajectory/package.json +2 -2
- package/packages/user-directory/package.json +2 -2
- package/packages/utils/package.json +2 -2
- package/relay-snippets/agent-relay-protocol.md +4 -4
- package/relay-snippets/agent-relay-snippet.md +31 -43
|
@@ -75,19 +75,19 @@ export function validateWorkflow(config) {
|
|
|
75
75
|
task.length > 500 &&
|
|
76
76
|
!task.includes('do not') &&
|
|
77
77
|
!task.includes('Do NOT') &&
|
|
78
|
-
!task.includes('
|
|
78
|
+
!task.includes('mcp__relaycast__agent_add') &&
|
|
79
79
|
!task.includes('add_agent')) {
|
|
80
80
|
issues.push({
|
|
81
81
|
severity: 'info',
|
|
82
82
|
code: 'CLAUDE_NO_SPAWN_GUARD',
|
|
83
83
|
message: `Step "${step.name}" uses interactive claude with a long task. Claude may spontaneously spawn sub-agents via relay MCP tools.`,
|
|
84
|
-
fix: `Add "Do NOT use
|
|
84
|
+
fix: `Add "Do NOT use mcp__relaycast__agent_add or add_agent to spawn sub-agents." to the task, or use \`interactive: false\`.`,
|
|
85
85
|
location: `step:${step.name}`,
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
// Check 4: non-interactive agent that references
|
|
88
|
+
// Check 4: non-interactive agent that references relay messaging tools in task
|
|
89
89
|
if (def.interactive === false &&
|
|
90
|
-
(task.includes('
|
|
90
|
+
(task.includes('mcp__relaycast__dm_send') || task.includes('mcp__relaycast__message_post') || task.includes('mcp__relaycast__inbox_check'))) {
|
|
91
91
|
issues.push({
|
|
92
92
|
severity: 'warning',
|
|
93
93
|
code: 'NONINTERACTIVE_RELAY',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../src/workflows/validator.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,MAAM,MAAM,GAAsB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAA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AO,GAAG,GAAG,EAAE,CAAC,CAAC;QAC7D,IAAI,KAAK,CAAC,GAAG,EAAE,CAAC;YACd,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAClC,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACzF,IAAI,QAAQ,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,MAAM,WAAW,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACjG,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,OAAO,CAAC,CAAC;IACvD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"typescript": "^5.7.3"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@agent-relay/config": "3.
|
|
84
|
+
"@agent-relay/config": "3.2.0",
|
|
85
85
|
"@relaycast/sdk": "^0.4.0",
|
|
86
86
|
"yaml": "^2.7.0"
|
|
87
87
|
}
|
|
@@ -358,6 +358,16 @@ test('waitForIdle: idle resolves before timeout', async () => {
|
|
|
358
358
|
const result = await promise;
|
|
359
359
|
assert.equal(result, 'idle');
|
|
360
360
|
});
|
|
361
|
+
// ── shorthand spawners ───────────────────────────────────────────────────────
|
|
362
|
+
|
|
363
|
+
test('AgentRelay: has shorthand spawners for major CLIs', () => {
|
|
364
|
+
const relay = new AgentRelay({ channels: ['general'] });
|
|
365
|
+
assert.ok(relay.claude, 'relay.claude should be defined');
|
|
366
|
+
assert.ok(relay.codex, 'relay.codex should be defined');
|
|
367
|
+
assert.ok(relay.gemini, 'relay.gemini should be defined');
|
|
368
|
+
assert.ok(relay.opencode, 'relay.opencode should be defined');
|
|
369
|
+
});
|
|
370
|
+
|
|
361
371
|
// ── agent.status ────────────────────────────────────────────────────────────
|
|
362
372
|
|
|
363
373
|
test('agent.status: mock agent has ready status', () => {
|
|
@@ -490,8 +490,8 @@ export class AgentRelayClient {
|
|
|
490
490
|
...this.options.binaryArgs,
|
|
491
491
|
];
|
|
492
492
|
|
|
493
|
-
// Ensure the SDK bin directory (containing agent-relay-broker
|
|
494
|
-
// PATH so spawned workers can find
|
|
493
|
+
// Ensure the SDK bin directory (containing agent-relay-broker) is on
|
|
494
|
+
// PATH so spawned workers can find it without any user setup.
|
|
495
495
|
const env = { ...this.options.env };
|
|
496
496
|
if (isExplicitPath(this.options.binaryPath)) {
|
|
497
497
|
const binDir = path.dirname(path.resolve(resolvedBinary));
|
|
@@ -78,7 +78,7 @@ async function main(): Promise<void> {
|
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
console.log(
|
|
81
|
-
`[${now()}] workers spawned. send kickoff via Relaycast (MCP
|
|
81
|
+
`[${now()}] workers spawned. send kickoff via Relaycast (MCP mcp__relaycast__dm_send) and watch events here (Ctrl+C to stop).`,
|
|
82
82
|
);
|
|
83
83
|
await new Promise<void>(() => {
|
|
84
84
|
// keep process alive while events stream
|
|
@@ -101,9 +101,9 @@ function architectPrompt(story: Story, progress: string): string {
|
|
|
101
101
|
``,
|
|
102
102
|
`### How to communicate`,
|
|
103
103
|
`Use the Relaycast MCP tools to post messages to #general:`,
|
|
104
|
-
`1. Call
|
|
105
|
-
`2.
|
|
106
|
-
`3. Use
|
|
104
|
+
`1. Call workspace.set_key with your RELAY_API_KEY env var`,
|
|
105
|
+
`2. Call agent.register with your name`,
|
|
106
|
+
`3. Use message.post to send to the #general channel`,
|
|
107
107
|
``,
|
|
108
108
|
story.description,
|
|
109
109
|
``,
|
|
@@ -136,9 +136,9 @@ function builderPrompt(story: Story, progress: string, reviewFeedback?: string):
|
|
|
136
136
|
``,
|
|
137
137
|
`### How to communicate`,
|
|
138
138
|
`Use the Relaycast MCP tools to post messages to #general:`,
|
|
139
|
-
`1. Call
|
|
140
|
-
`2.
|
|
141
|
-
`3. Use
|
|
139
|
+
`1. Call workspace.set_key with your RELAY_API_KEY env var`,
|
|
140
|
+
`2. Call agent.register with your name`,
|
|
141
|
+
`3. Use message.post to send to the #general channel`,
|
|
142
142
|
``,
|
|
143
143
|
story.description,
|
|
144
144
|
``,
|
|
@@ -33,16 +33,16 @@ const WORKFLOW_BOOTSTRAP_TASK =
|
|
|
33
33
|
|
|
34
34
|
const WORKFLOW_CONVENTIONS = [
|
|
35
35
|
'Messaging requirements:',
|
|
36
|
-
'- When you receive `Relay message from <sender> ...`, reply using `
|
|
36
|
+
'- When you receive `Relay message from <sender> ...`, reply using `mcp__relaycast__dm_send(to: "<sender>", text: "...")`.',
|
|
37
37
|
'- Send `ACK: ...` when you receive a task.',
|
|
38
38
|
'- Send `DONE: ...` when the task is complete.',
|
|
39
|
-
'- Do not reply only in terminal text; send the response via
|
|
40
|
-
'- Use
|
|
39
|
+
'- Do not reply only in terminal text; send the response via mcp__relaycast__dm_send.',
|
|
40
|
+
'- Use mcp__relaycast__inbox_check() and mcp__relaycast__agent_list() when context is missing.',
|
|
41
41
|
].join('\n');
|
|
42
42
|
|
|
43
43
|
function hasWorkflowConventions(task: string): boolean {
|
|
44
44
|
const lower = task.toLowerCase();
|
|
45
|
-
return lower.includes('relay_send(') || (lower.includes('ack:') && lower.includes('done:'));
|
|
45
|
+
return lower.includes('mcp__relaycast__dm_send(') || lower.includes('relay_send(') || (lower.includes('ack:') && lower.includes('done:'));
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
function buildSpawnTask(
|
|
@@ -271,6 +271,7 @@ export class AgentRelay {
|
|
|
271
271
|
readonly codex: AgentSpawner;
|
|
272
272
|
readonly claude: AgentSpawner;
|
|
273
273
|
readonly gemini: AgentSpawner;
|
|
274
|
+
readonly opencode: AgentSpawner;
|
|
274
275
|
|
|
275
276
|
private readonly clientOptions: AgentRelayClientOptions;
|
|
276
277
|
private readonly defaultChannels: string[];
|
|
@@ -316,6 +317,7 @@ export class AgentRelay {
|
|
|
316
317
|
this.codex = this.createSpawner('codex', 'Codex', 'pty');
|
|
317
318
|
this.claude = this.createSpawner('claude', 'Claude', 'pty');
|
|
318
319
|
this.gemini = this.createSpawner('gemini', 'Gemini', 'pty');
|
|
320
|
+
this.opencode = this.createSpawner('opencode', 'OpenCode', 'headless');
|
|
319
321
|
}
|
|
320
322
|
|
|
321
323
|
/**
|
|
@@ -3260,8 +3260,8 @@ export class WorkflowRunner {
|
|
|
3260
3260
|
case 'worker':
|
|
3261
3261
|
return (
|
|
3262
3262
|
'You are a non-interactive worker agent. Produce clean, structured output to stdout.\n' +
|
|
3263
|
-
'Do NOT use
|
|
3264
|
-
'Do NOT use
|
|
3263
|
+
'Do NOT use mcp__relaycast__agent_add, add_agent, or any MCP tool to spawn sub-agents.\n' +
|
|
3264
|
+
'Do NOT use mcp__relaycast__dm_send or any Relaycast messaging tools — you have no relay connection.\n\n'
|
|
3265
3265
|
);
|
|
3266
3266
|
case 'reviewer':
|
|
3267
3267
|
return (
|
|
@@ -3299,7 +3299,7 @@ export class WorkflowRunner {
|
|
|
3299
3299
|
step.task +
|
|
3300
3300
|
'\n\n---\n' +
|
|
3301
3301
|
'IMPORTANT: You are running as a non-interactive subprocess. ' +
|
|
3302
|
-
'Do NOT call
|
|
3302
|
+
'Do NOT call mcp__relaycast__agent_add, add_agent, or any MCP tool to spawn or manage other agents.\n\n' +
|
|
3303
3303
|
'CRITICAL REQUIREMENT — YOU MUST FOLLOW THIS EXACTLY:\n' +
|
|
3304
3304
|
'You are running in non-interactive mode. There is NO opportunity for follow-up, ' +
|
|
3305
3305
|
'clarification, or additional input. Your stdout output is your ONLY deliverable.\n\n' +
|
|
@@ -4085,7 +4085,7 @@ export class WorkflowRunner {
|
|
|
4085
4085
|
'RELAY SETUP — do this FIRST before any other relay tool:\n' +
|
|
4086
4086
|
`1. Call: register(name="${agentName}")\n` +
|
|
4087
4087
|
' This authenticates you in the Relaycast workspace.\n' +
|
|
4088
|
-
' ALL relay tools (
|
|
4088
|
+
' ALL relay tools (mcp__relaycast__dm_send, mcp__relaycast__inbox_check, mcp__relaycast__message_post, etc.) require\n' +
|
|
4089
4089
|
' registration first — they will fail with "Not registered" otherwise.\n' +
|
|
4090
4090
|
`2. Your agent name is "${agentName}" — use this exact name when registering.`
|
|
4091
4091
|
);
|
|
@@ -4113,10 +4113,10 @@ export class WorkflowRunner {
|
|
|
4113
4113
|
'If it involves multiple independent subtasks, touches many files, or could take a long time, ' +
|
|
4114
4114
|
'you should break it down and delegate to helper agents to avoid timeouts.\n\n' +
|
|
4115
4115
|
'Option 1 — Spawn relay agents (for real parallel coding work):\n' +
|
|
4116
|
-
' -
|
|
4117
|
-
' - Coordinate via
|
|
4118
|
-
' - Check on them with
|
|
4119
|
-
' - Clean up when done:
|
|
4116
|
+
' - mcp__relaycast__agent_add(name="helper-1", cli="claude", task="Specific subtask description")\n' +
|
|
4117
|
+
' - Coordinate via mcp__relaycast__dm_send(to="helper-1", text="...")\n' +
|
|
4118
|
+
' - Check on them with mcp__relaycast__inbox_check()\n' +
|
|
4119
|
+
' - Clean up when done: mcp__relaycast__agent_remove(name="helper-1")\n\n' +
|
|
4120
4120
|
subAgentOption +
|
|
4121
4121
|
'Guidelines:\n' +
|
|
4122
4122
|
'- You are the lead — delegate but stay in control, track progress, integrate results\n' +
|
|
@@ -90,22 +90,22 @@ export function validateWorkflow(config: RelayYamlConfig): ValidationIssue[] {
|
|
|
90
90
|
task.length > 500 &&
|
|
91
91
|
!task.includes('do not') &&
|
|
92
92
|
!task.includes('Do NOT') &&
|
|
93
|
-
!task.includes('
|
|
93
|
+
!task.includes('mcp__relaycast__agent_add') &&
|
|
94
94
|
!task.includes('add_agent')
|
|
95
95
|
) {
|
|
96
96
|
issues.push({
|
|
97
97
|
severity: 'info',
|
|
98
98
|
code: 'CLAUDE_NO_SPAWN_GUARD',
|
|
99
99
|
message: `Step "${step.name}" uses interactive claude with a long task. Claude may spontaneously spawn sub-agents via relay MCP tools.`,
|
|
100
|
-
fix: `Add "Do NOT use
|
|
100
|
+
fix: `Add "Do NOT use mcp__relaycast__agent_add or add_agent to spawn sub-agents." to the task, or use \`interactive: false\`.`,
|
|
101
101
|
location: `step:${step.name}`,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
// Check 4: non-interactive agent that references
|
|
105
|
+
// Check 4: non-interactive agent that references relay messaging tools in task
|
|
106
106
|
if (
|
|
107
107
|
def.interactive === false &&
|
|
108
|
-
(task.includes('
|
|
108
|
+
(task.includes('mcp__relaycast__dm_send') || task.includes('mcp__relaycast__message_post') || task.includes('mcp__relaycast__inbox_check'))
|
|
109
109
|
) {
|
|
110
110
|
issues.push({
|
|
111
111
|
severity: 'warning',
|
|
@@ -25,3 +25,14 @@ class Models:
|
|
|
25
25
|
GEMINI_2_5_PRO = "gemini-2.5-pro"
|
|
26
26
|
GEMINI_2_5_FLASH = "gemini-2.5-flash"
|
|
27
27
|
GEMINI_2_5_FLASH_LITE = "gemini-2.5-flash-lite"
|
|
28
|
+
|
|
29
|
+
class Opencode:
|
|
30
|
+
OPENCODE_BIG_PICKLE = "opencode/big-pickle"
|
|
31
|
+
OPENCODE_GPT_5_NANO = "opencode/gpt-5-nano"
|
|
32
|
+
OPENCODE_MIMO_V2_FLASH_FREE = "opencode/mimo-v2-flash-free"
|
|
33
|
+
OPENCODE_MINIMAX_M2_5_FREE = "opencode/minimax-m2.5-free"
|
|
34
|
+
OPENAI_CODEX_MINI_LATEST = "openai/codex-mini-latest"
|
|
35
|
+
OPENAI_GPT_5_2 = "openai/gpt-5.2"
|
|
36
|
+
OPENAI_O3_MINI = "openai/o3-mini"
|
|
37
|
+
OPENAI_O3_PRO = "openai/o3-pro"
|
|
38
|
+
OPENAI_O4_MINI = "openai/o4-mini"
|
|
@@ -291,10 +291,11 @@ class HumanHandle:
|
|
|
291
291
|
class AgentSpawner:
|
|
292
292
|
"""Shorthand spawner for a specific CLI (e.g., relay.claude.spawn(...))."""
|
|
293
293
|
|
|
294
|
-
def __init__(self, cli: str, default_name: str, relay: AgentRelay):
|
|
294
|
+
def __init__(self, cli: str, default_name: str, relay: AgentRelay, transport: str = "pty"):
|
|
295
295
|
self._cli = cli
|
|
296
296
|
self._default_name = default_name
|
|
297
297
|
self._relay = relay
|
|
298
|
+
self._transport = transport
|
|
298
299
|
|
|
299
300
|
async def spawn(
|
|
300
301
|
self,
|
|
@@ -326,9 +327,10 @@ class AgentSpawner:
|
|
|
326
327
|
)
|
|
327
328
|
|
|
328
329
|
try:
|
|
329
|
-
result = await client.
|
|
330
|
+
result = await client.spawn_provider(
|
|
330
331
|
name=agent_name,
|
|
331
|
-
|
|
332
|
+
provider=self._cli,
|
|
333
|
+
transport=self._transport,
|
|
332
334
|
args=args or [],
|
|
333
335
|
channels=agent_channels,
|
|
334
336
|
task=task,
|
|
@@ -434,9 +436,10 @@ class AgentRelay:
|
|
|
434
436
|
self._idle_resolvers: dict[str, list[asyncio.Future[str]]] = {}
|
|
435
437
|
|
|
436
438
|
# Shorthand spawners
|
|
437
|
-
self.codex = AgentSpawner("codex", "Codex", self)
|
|
438
|
-
self.claude = AgentSpawner("claude", "Claude", self)
|
|
439
|
-
self.gemini = AgentSpawner("gemini", "Gemini", self)
|
|
439
|
+
self.codex = AgentSpawner("codex", "Codex", self, transport="pty")
|
|
440
|
+
self.claude = AgentSpawner("claude", "Claude", self, transport="pty")
|
|
441
|
+
self.gemini = AgentSpawner("gemini", "Gemini", self, transport="pty")
|
|
442
|
+
self.opencode = AgentSpawner("opencode", "OpenCode", self, transport="headless")
|
|
440
443
|
|
|
441
444
|
@property
|
|
442
445
|
def workspace_key(self) -> Optional[str]:
|
|
@@ -23,6 +23,12 @@ class _FakeRelayClient:
|
|
|
23
23
|
raise self.spawn_error
|
|
24
24
|
return {"name": kwargs["name"], "runtime": "pty"}
|
|
25
25
|
|
|
26
|
+
async def spawn_provider(self, **kwargs):
|
|
27
|
+
self.spawn_calls.append(kwargs)
|
|
28
|
+
if self.spawn_error:
|
|
29
|
+
raise self.spawn_error
|
|
30
|
+
return {"name": kwargs["name"], "runtime": "pty"}
|
|
31
|
+
|
|
26
32
|
async def release(self, name: str, reason: str | None = None):
|
|
27
33
|
self.release_calls.append((name, reason))
|
|
28
34
|
if self.release_error:
|
|
@@ -142,6 +148,23 @@ async def test_shorthand_spawn_lifecycle_hooks_success():
|
|
|
142
148
|
|
|
143
149
|
assert agent.name == "ShorthandWorker"
|
|
144
150
|
assert events == ["start", "success"]
|
|
151
|
+
assert client.spawn_calls[-1]["transport"] == "pty"
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@pytest.mark.asyncio
|
|
155
|
+
async def test_opencode_shorthand_spawn_success():
|
|
156
|
+
relay = AgentRelay()
|
|
157
|
+
client = _FakeRelayClient()
|
|
158
|
+
relay._ensure_started = AsyncMock(return_value=client)
|
|
159
|
+
|
|
160
|
+
agent = await relay.opencode.spawn(
|
|
161
|
+
name="OpencodeWorker",
|
|
162
|
+
channels=["general"],
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
assert agent.name == "OpencodeWorker"
|
|
166
|
+
assert client.spawn_calls[-1]["provider"] == "opencode"
|
|
167
|
+
assert client.spawn_calls[-1]["transport"] == "headless"
|
|
145
168
|
|
|
146
169
|
|
|
147
170
|
@pytest.mark.asyncio
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/trajectory",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Trajectory integration utilities (trail/PDERO) for Relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test:watch": "vitest"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agent-relay/config": "3.
|
|
25
|
+
"@agent-relay/config": "3.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.19.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/user-directory",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "User directory service for agent-relay (per-user credential storage)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test:watch": "vitest"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agent-relay/utils": "3.
|
|
25
|
+
"@agent-relay/utils": "3.2.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.19.3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-relay/utils",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Shared utilities for agent-relay: logging, name generation, command resolution, update checking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"vitest": "^3.2.4"
|
|
113
113
|
},
|
|
114
114
|
"dependencies": {
|
|
115
|
-
"@agent-relay/config": "3.
|
|
115
|
+
"@agent-relay/config": "3.2.0",
|
|
116
116
|
"compare-versions": "^6.1.1"
|
|
117
117
|
},
|
|
118
118
|
"publishConfig": {
|
|
@@ -4,10 +4,10 @@ Advanced features for session continuity and trajectory tracking.
|
|
|
4
4
|
|
|
5
5
|
## Session Continuity
|
|
6
6
|
|
|
7
|
-
Use `
|
|
7
|
+
Use `mcp__relaycast__send_dm` with a continuity message to save state for session recovery:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
|
|
10
|
+
mcp__relaycast__send_dm(to: "system", text: "KIND: continuity\nACTION: save\n\nCurrent task: Implementing user authentication\nCompleted: User model, JWT utils\nIn progress: Login endpoint")
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
### When to Save
|
|
@@ -51,10 +51,10 @@ trail abandon --reason "Blocked by missing credentials"
|
|
|
51
51
|
|
|
52
52
|
## Cross-Project Messaging
|
|
53
53
|
|
|
54
|
-
In bridge mode, use `project:agent` format with `
|
|
54
|
+
In bridge mode, use `project:agent` format with `mcp__relaycast__send_dm`:
|
|
55
55
|
|
|
56
56
|
```
|
|
57
|
-
|
|
57
|
+
mcp__relaycast__send_dm(to: "frontend:Designer", text: "Please update the login UI.")
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Special targets:
|
|
@@ -4,41 +4,30 @@ Real-time agent-to-agent messaging via MCP tools.
|
|
|
4
4
|
|
|
5
5
|
## MCP Tools
|
|
6
6
|
|
|
7
|
-
All agent communication uses MCP tools provided by the Relaycast MCP server
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
7
|
+
All agent communication uses MCP tools provided by the Relaycast MCP server.
|
|
8
|
+
Tool names use dot-notation: Claude uses `mcp__relaycast__<category>_<action>`, other CLIs use `relaycast.<category>.<action>`.
|
|
9
|
+
|
|
10
|
+
| Tool | Description |
|
|
11
|
+
| --------------------------------- | ------------------------------------- |
|
|
12
|
+
| `dm_send(to, text)` | Send a DM to an agent |
|
|
13
|
+
| `message_post(channel, text)` | Post a message to a channel |
|
|
14
|
+
| `inbox_check()` | Check your inbox for new messages |
|
|
15
|
+
| `agent_list()` | List online agents |
|
|
16
|
+
| `agent_add(name, cli, task)` | Spawn a new worker agent |
|
|
17
|
+
| `agent_remove(name)` | Release/stop a worker agent |
|
|
17
18
|
|
|
18
19
|
## Sending Messages
|
|
19
20
|
|
|
20
|
-
Use the `relay_send` MCP tool:
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
relay_send(to: "AgentName", message: "Your message here")
|
|
24
|
-
```
|
|
25
|
-
|
|
26
21
|
### Direct Messages
|
|
27
22
|
|
|
28
23
|
```
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Broadcast to All
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
relay_send(to: "*", message: "I've finished the auth module")
|
|
24
|
+
mcp__relaycast__dm_send(to: "Bob", text: "Can you review my code changes?")
|
|
36
25
|
```
|
|
37
26
|
|
|
38
27
|
### Channel Messages
|
|
39
28
|
|
|
40
29
|
```
|
|
41
|
-
|
|
30
|
+
mcp__relaycast__message_post(channel: "general", text: "The API endpoints are ready")
|
|
42
31
|
```
|
|
43
32
|
|
|
44
33
|
## Spawning & Releasing Agents
|
|
@@ -46,23 +35,24 @@ relay_send(to: "#frontend", message: "The API endpoints are ready")
|
|
|
46
35
|
### Spawn a Worker
|
|
47
36
|
|
|
48
37
|
```
|
|
49
|
-
|
|
38
|
+
mcp__relaycast__agent_add(name: "WorkerName", cli: "claude", task: "Task description here")
|
|
50
39
|
```
|
|
51
40
|
|
|
52
41
|
### CLI Options
|
|
53
42
|
|
|
54
|
-
| CLI Value
|
|
55
|
-
|
|
|
56
|
-
| `claude`
|
|
57
|
-
| `codex`
|
|
58
|
-
| `gemini`
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
43
|
+
| CLI Value | Description |
|
|
44
|
+
| ----------- | ---------------------------- |
|
|
45
|
+
| `claude` | Claude Code (Anthropic) |
|
|
46
|
+
| `codex` | Codex CLI (OpenAI) |
|
|
47
|
+
| `gemini` | Gemini CLI (Google) |
|
|
48
|
+
| `opencode` | OpenCode CLI (multi-model) |
|
|
49
|
+
| `aider` | Aider coding assistant |
|
|
50
|
+
| `goose` | Goose AI assistant |
|
|
61
51
|
|
|
62
52
|
### Release a Worker
|
|
63
53
|
|
|
64
54
|
```
|
|
65
|
-
|
|
55
|
+
mcp__relaycast__agent_remove(name: "WorkerName")
|
|
66
56
|
```
|
|
67
57
|
|
|
68
58
|
## Receiving Messages
|
|
@@ -86,11 +76,11 @@ Reply to the channel shown, not the sender.
|
|
|
86
76
|
If you were spawned by another agent:
|
|
87
77
|
|
|
88
78
|
1. Your first message is your task from your spawner
|
|
89
|
-
2. Use `
|
|
79
|
+
2. Use `mcp__relaycast__dm_send` to reply to your spawner
|
|
90
80
|
3. Report status to your spawner (your lead), not broadcast
|
|
91
81
|
|
|
92
82
|
```
|
|
93
|
-
|
|
83
|
+
mcp__relaycast__dm_send(to: "Lead", text: "ACK: Starting on the task.")
|
|
94
84
|
```
|
|
95
85
|
|
|
96
86
|
## Protocol
|
|
@@ -103,10 +93,10 @@ relay_send(to: "Lead", message: "ACK: Starting on the task.")
|
|
|
103
93
|
|
|
104
94
|
**Local communication** uses plain agent names. The `project:` prefix is **ONLY** for cross-project bridge mode.
|
|
105
95
|
|
|
106
|
-
| Context | Correct
|
|
107
|
-
| ---------------------- |
|
|
108
|
-
| Local (same project) | `
|
|
109
|
-
| Bridge (cross-project) | `
|
|
96
|
+
| Context | Correct | Incorrect |
|
|
97
|
+
| ---------------------- | ----------------------------------------------------------- | ------------------------------------------------------ |
|
|
98
|
+
| Local (same project) | `mcp__relaycast__dm_send(to: "Lead", ...)` | `mcp__relaycast__dm_send(to: "project:lead", ...)` |
|
|
99
|
+
| Bridge (cross-project) | `mcp__relaycast__dm_send(to: "frontend:Designer", ...)` | N/A |
|
|
110
100
|
|
|
111
101
|
## Multi-Workspace
|
|
112
102
|
|
|
@@ -118,12 +108,10 @@ Relay message from Alice [my-team / abc123]: Hello!
|
|
|
118
108
|
|
|
119
109
|
- Messages are scoped to the originating workspace
|
|
120
110
|
- Reply within the same workspace context shown in the message header
|
|
121
|
-
- Use `relay_status()` to see which workspaces are connected
|
|
122
111
|
|
|
123
112
|
## Checking Status
|
|
124
113
|
|
|
125
114
|
```
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
relay_status() # Check connection status
|
|
115
|
+
mcp__relaycast__agent_list() # List online agents
|
|
116
|
+
mcp__relaycast__inbox_check() # Check for unread messages
|
|
129
117
|
```
|