let-them-talk 5.2.0 → 5.2.5
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/cli.js +1 -1
- package/dashboard.js +3 -6
- package/package.json +1 -1
- package/server.js +35 -11
package/cli.js
CHANGED
|
@@ -9,7 +9,7 @@ const command = process.argv[2];
|
|
|
9
9
|
|
|
10
10
|
function printUsage() {
|
|
11
11
|
console.log(`
|
|
12
|
-
Let Them Talk — Agent Bridge v5.2.
|
|
12
|
+
Let Them Talk — Agent Bridge v5.2.5
|
|
13
13
|
MCP message broker for inter-agent communication
|
|
14
14
|
Supports: Claude Code, Gemini CLI, Codex CLI, Ollama
|
|
15
15
|
|
package/dashboard.js
CHANGED
|
@@ -1320,7 +1320,7 @@ function apiLaunchAgent(body) {
|
|
|
1320
1320
|
const safeName = (agent_name || '').replace(/[^a-zA-Z0-9]/g, '').substring(0, 20);
|
|
1321
1321
|
const launchPrompt = prompt || (safeName ? `You are agent "${safeName}". Use the register tool to register as "${safeName}", then use listen to wait for messages.` : `Register with the agent-bridge MCP tools and use listen to wait for messages.`);
|
|
1322
1322
|
|
|
1323
|
-
// Try to launch terminal
|
|
1323
|
+
// Try to launch terminal — user pastes prompt from clipboard after CLI loads
|
|
1324
1324
|
if (process.platform === 'win32') {
|
|
1325
1325
|
spawn('cmd', ['/c', 'start', 'cmd', '/k', cliCmd], { cwd: projectDir, shell: false, detached: true, stdio: 'ignore' });
|
|
1326
1326
|
return { success: true, launched: true, cli, project_dir: projectDir, prompt: launchPrompt };
|
|
@@ -1328,13 +1328,10 @@ function apiLaunchAgent(body) {
|
|
|
1328
1328
|
|
|
1329
1329
|
// Non-Windows: return command for manual execution
|
|
1330
1330
|
return {
|
|
1331
|
-
success: true,
|
|
1332
|
-
launched: false,
|
|
1333
|
-
cli,
|
|
1334
|
-
project_dir: projectDir,
|
|
1331
|
+
success: true, launched: false, cli, project_dir: projectDir,
|
|
1335
1332
|
command: `cd "${projectDir}" && ${cliCmd}`,
|
|
1336
1333
|
prompt: launchPrompt,
|
|
1337
|
-
message: '
|
|
1334
|
+
message: 'Run the command in a terminal, then paste the prompt.'
|
|
1338
1335
|
};
|
|
1339
1336
|
}
|
|
1340
1337
|
|
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1077,8 +1077,26 @@ function buildGuide(level = 'standard') {
|
|
|
1077
1077
|
|
|
1078
1078
|
const rules = [];
|
|
1079
1079
|
|
|
1080
|
+
// === MANAGED MODE: agents wait for manager's floor control ===
|
|
1081
|
+
if (isManagedMode()) {
|
|
1082
|
+
const managed = getManagedConfig();
|
|
1083
|
+
const isManager = managed.manager === registeredName;
|
|
1084
|
+
if (isManager) {
|
|
1085
|
+
rules.push('YOU ARE THE MANAGER. You control the conversation. Use yield_floor(agent) to let agents speak. Use set_phase() to change team phase (discussion/planning/execution/review).');
|
|
1086
|
+
rules.push('YOUR MANAGER LOOP: 1) Plan the work and assign tasks. 2) Use yield_floor() to give each agent their turn to speak. 3) Call listen() to wait for agent responses. 4) Review responses and decide next steps. 5) Use create_task() and create_workflow() to structure work.');
|
|
1087
|
+
rules.push('Use send_message() to give instructions. Use broadcast() for team announcements. Agents cannot speak unless you give them the floor.');
|
|
1088
|
+
rules.push('STRICT RULE: After EVERY action, call listen() to wait for responses. NEVER use sleep(). NEVER use check_messages() in a loop. NEVER stop managing. Your loop is: act → listen() → act → listen(). This loop NEVER ends.');
|
|
1089
|
+
} else {
|
|
1090
|
+
rules.push('YOU ARE IN MANAGED MODE. The manager controls who speaks. Call listen() to wait for your turn. When the manager gives you the floor via yield_floor(), respond with your work.');
|
|
1091
|
+
rules.push('YOUR LOOP: 1) Call listen() — wait for messages and floor assignments. 2) When you receive a message or get the floor, do the work and respond. 3) Call listen() again immediately. This loop NEVER ends.');
|
|
1092
|
+
rules.push('If you have an active task during execution phase, do the work, then report back to the manager via send_message(). Then call listen() again immediately.');
|
|
1093
|
+
rules.push('STRICT RULES: NEVER use sleep(). NEVER use check_messages() in a polling loop. NEVER call get_work() in managed mode. NEVER stop listening. Your ONLY loop is: listen() → work → respond → listen(). If listen() times out, call listen() again immediately.');
|
|
1094
|
+
}
|
|
1095
|
+
rules.push('Keep messages to 2-3 paragraphs max.');
|
|
1096
|
+
rules.push('When you finish work, report what you did and what files you changed.');
|
|
1097
|
+
}
|
|
1080
1098
|
// === AUTONOMOUS MODE: completely different guide ===
|
|
1081
|
-
if (autonomousActive) {
|
|
1099
|
+
else if (autonomousActive) {
|
|
1082
1100
|
if (isAdvisor) {
|
|
1083
1101
|
// Advisor Agent: strategic thinker — reads everything, suggests improvements
|
|
1084
1102
|
rules.push('YOU ARE THE ADVISOR. You do NOT write code. You READ all messages and completed work, then give strategic ideas, suggestions, and improvements to the team.');
|
|
@@ -1168,7 +1186,8 @@ function buildGuide(level = 'standard') {
|
|
|
1168
1186
|
}
|
|
1169
1187
|
|
|
1170
1188
|
// Tier 0 — THE one rule (always included at every level)
|
|
1171
|
-
|
|
1189
|
+
const listenCmd = isManagedMode() ? 'listen()' : (mode === 'group' ? 'listen_group()' : 'listen()');
|
|
1190
|
+
rules.push(`AFTER EVERY ACTION, call ${listenCmd}. This is how you receive messages. NEVER skip this. NEVER use sleep(). NEVER poll with check_messages(). ${listenCmd} is your ONLY way to receive messages.`);
|
|
1172
1191
|
|
|
1173
1192
|
// Minimal level: Tier 0 only — for experienced agents refreshing rules
|
|
1174
1193
|
if (level === 'minimal') {
|
|
@@ -1183,7 +1202,9 @@ function buildGuide(level = 'standard') {
|
|
|
1183
1202
|
tier_info: `${rules.length} rules (minimal level, ${aliveCount} agents)`,
|
|
1184
1203
|
first_steps: mode === 'direct'
|
|
1185
1204
|
? '1. Call list_agents() to see who is online. 2. Send a message or call listen() to wait.'
|
|
1186
|
-
:
|
|
1205
|
+
: mode === 'managed'
|
|
1206
|
+
? `1. Call get_briefing() for project context. 2. Call listen() to wait for the manager. 3. Respond when given the floor, then listen() again.`
|
|
1207
|
+
: `1. Call get_briefing() for project context. 2. Call listen_group() to join. 3. Respond and listen_group() again.`,
|
|
1187
1208
|
};
|
|
1188
1209
|
}
|
|
1189
1210
|
|
|
@@ -1210,7 +1231,7 @@ function buildGuide(level = 'standard') {
|
|
|
1210
1231
|
|
|
1211
1232
|
// Tier 3 — large teams (shown when 5+ agents)
|
|
1212
1233
|
if (aliveCount >= 5) {
|
|
1213
|
-
rules.push(
|
|
1234
|
+
rules.push(`${listenCmd} blocks until messages arrive. NEVER stop listening. NEVER use sleep() or check_messages() loops.`);
|
|
1214
1235
|
rules.push('Tasks auto-create channels (#task-xxx). Use them for focused discussion instead of #general.');
|
|
1215
1236
|
rules.push('Use channels to split into sub-teams. Do not discuss everything in #general.');
|
|
1216
1237
|
}
|
|
@@ -2037,6 +2058,7 @@ function toolCheckMessages(from = null) {
|
|
|
2037
2058
|
result.preview = `${latest.from}: "${latest.content.substring(0, 80).replace(/\n/g, ' ')}..."`;
|
|
2038
2059
|
const oldestAge = Math.round((Date.now() - new Date(unconsumed[0].timestamp).getTime()) / 1000);
|
|
2039
2060
|
result.urgency = oldestAge > 120 ? 'critical' : oldestAge > 30 ? 'urgent' : 'normal';
|
|
2061
|
+
result.action_required = 'You have unread messages. Call listen() to receive and process them. Do NOT call check_messages() again — it does not consume messages and you will see the same messages repeatedly.';
|
|
2040
2062
|
}
|
|
2041
2063
|
|
|
2042
2064
|
return result;
|
|
@@ -2540,7 +2562,7 @@ async function toolListenGroup() {
|
|
|
2540
2562
|
messages: [],
|
|
2541
2563
|
message_count: 0,
|
|
2542
2564
|
retry: true,
|
|
2543
|
-
batch_summary: 'No new messages — call listen_group() again to keep listening.',
|
|
2565
|
+
batch_summary: isManagedMode() ? 'No new messages — call listen() again immediately to keep waiting.' : 'No new messages — call listen_group() again to keep listening.',
|
|
2544
2566
|
});
|
|
2545
2567
|
}
|
|
2546
2568
|
};
|
|
@@ -2709,7 +2731,7 @@ function buildListenGroupResponse(batch, consumed, agentName, listenStart) {
|
|
|
2709
2731
|
result.instructions = `EXECUTION PHASE: Focus on your assigned tasks. Only message the manager (${managed.manager}) if you need help or to report completion.`;
|
|
2710
2732
|
} else {
|
|
2711
2733
|
result.should_respond = false;
|
|
2712
|
-
result.instructions = 'DO NOT RESPOND. Wait for the manager to give you the floor. Call listen()
|
|
2734
|
+
result.instructions = 'DO NOT RESPOND. Wait for the manager to give you the floor. Call listen() again to wait.';
|
|
2713
2735
|
}
|
|
2714
2736
|
}
|
|
2715
2737
|
|
|
@@ -3792,7 +3814,9 @@ async function toolGetWork(params = {}) {
|
|
|
3792
3814
|
touchActivity();
|
|
3793
3815
|
const idleResult = {
|
|
3794
3816
|
type: 'idle',
|
|
3795
|
-
instruction:
|
|
3817
|
+
instruction: isManagedMode()
|
|
3818
|
+
? 'No work available right now. Call listen() to wait for the manager to assign work or give you the floor.'
|
|
3819
|
+
: 'No work available right now. Call get_work() again in 30 seconds. Do NOT call listen_group() — use get_work() to stay in the proactive loop.'
|
|
3796
3820
|
};
|
|
3797
3821
|
// Item 4: warn demoted agents
|
|
3798
3822
|
const agentRep = getReputation();
|
|
@@ -6088,7 +6112,7 @@ function toolToggleRule(ruleId) {
|
|
|
6088
6112
|
// --- MCP Server setup ---
|
|
6089
6113
|
|
|
6090
6114
|
const server = new Server(
|
|
6091
|
-
{ name: 'agent-bridge', version: '5.2.
|
|
6115
|
+
{ name: 'agent-bridge', version: '5.2.5' },
|
|
6092
6116
|
{ capabilities: { tools: {} } }
|
|
6093
6117
|
);
|
|
6094
6118
|
|
|
@@ -6193,7 +6217,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
6193
6217
|
},
|
|
6194
6218
|
{
|
|
6195
6219
|
name: 'listen_codex',
|
|
6196
|
-
description: '
|
|
6220
|
+
description: 'ONLY for Codex CLI agents — do NOT use if you are Claude Code or Gemini CLI. Same as listen() but returns after 90 seconds due to Codex tool timeout limits. Claude and Gemini agents must use listen() instead.',
|
|
6197
6221
|
inputSchema: {
|
|
6198
6222
|
type: 'object',
|
|
6199
6223
|
properties: {
|
|
@@ -6206,7 +6230,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
6206
6230
|
},
|
|
6207
6231
|
{
|
|
6208
6232
|
name: 'check_messages',
|
|
6209
|
-
description: 'Non-blocking
|
|
6233
|
+
description: 'Non-blocking PEEK at your inbox — shows message previews but does NOT consume them. Use listen() to actually receive and process messages. Do NOT call this in a loop — it wastes tokens returning the same messages repeatedly. Use listen() instead which blocks efficiently and consumes messages.',
|
|
6210
6234
|
inputSchema: {
|
|
6211
6235
|
type: 'object',
|
|
6212
6236
|
properties: {
|
|
@@ -7175,7 +7199,7 @@ async function main() {
|
|
|
7175
7199
|
try {
|
|
7176
7200
|
const transport = new StdioServerTransport();
|
|
7177
7201
|
await server.connect(transport);
|
|
7178
|
-
console.error('Agent Bridge MCP server v5.2.
|
|
7202
|
+
console.error('Agent Bridge MCP server v5.2.5 running (66 tools)');
|
|
7179
7203
|
} catch (e) {
|
|
7180
7204
|
console.error('ERROR: MCP server failed to start: ' + e.message);
|
|
7181
7205
|
console.error('Fix: Run "npx let-them-talk doctor" to check your setup.');
|