let-them-talk 2.0.0 → 2.5.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/cli.js +79 -4
- package/dashboard.html +1522 -158
- package/dashboard.js +283 -6
- package/package.json +3 -2
- package/server.js +534 -50
- package/templates/debate.json +16 -0
- package/templates/pair.json +16 -0
- package/templates/review.json +16 -0
- package/templates/team.json +21 -0
package/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ const command = process.argv[2];
|
|
|
8
8
|
|
|
9
9
|
function printUsage() {
|
|
10
10
|
console.log(`
|
|
11
|
-
Let Them Talk — Agent Bridge v2.
|
|
11
|
+
Let Them Talk — Agent Bridge v2.5.0
|
|
12
12
|
MCP message broker for inter-agent communication
|
|
13
13
|
Supports: Claude Code, Gemini CLI, Codex CLI
|
|
14
14
|
|
|
@@ -18,6 +18,8 @@ function printUsage() {
|
|
|
18
18
|
npx let-them-talk init --gemini Configure for Gemini CLI
|
|
19
19
|
npx let-them-talk init --codex Configure for Codex CLI
|
|
20
20
|
npx let-them-talk init --all Configure for all supported CLIs
|
|
21
|
+
npx let-them-talk init --template T Initialize with a team template (pair, team, review, debate)
|
|
22
|
+
npx let-them-talk templates List available agent templates
|
|
21
23
|
npx let-them-talk dashboard Launch the web dashboard (http://localhost:3000)
|
|
22
24
|
npx let-them-talk reset Clear all conversation data
|
|
23
25
|
npx let-them-talk help Show this help message
|
|
@@ -181,10 +183,26 @@ function init() {
|
|
|
181
183
|
|
|
182
184
|
console.log('');
|
|
183
185
|
console.log(' Agent Bridge is ready! Restart your CLI to pick up the MCP tools.');
|
|
184
|
-
console.log(' Open two terminals and start a conversation between agents.');
|
|
185
|
-
console.log('');
|
|
186
|
-
console.log(' Optional: Run "npx let-them-talk dashboard" to monitor conversations.');
|
|
187
186
|
console.log('');
|
|
187
|
+
|
|
188
|
+
// Show template if --template was provided
|
|
189
|
+
var templateFlag = null;
|
|
190
|
+
for (var i = 3; i < process.argv.length; i++) {
|
|
191
|
+
if (process.argv[i] === '--template' && process.argv[i + 1]) {
|
|
192
|
+
templateFlag = process.argv[i + 1];
|
|
193
|
+
break;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (templateFlag) {
|
|
198
|
+
showTemplate(templateFlag);
|
|
199
|
+
} else {
|
|
200
|
+
console.log(' Open two terminals and start a conversation between agents.');
|
|
201
|
+
console.log(' Tip: Use "npx let-them-talk init --template pair" for ready-made prompts.');
|
|
202
|
+
console.log('');
|
|
203
|
+
console.log(' Optional: Run "npx let-them-talk dashboard" to monitor conversations.');
|
|
204
|
+
console.log('');
|
|
205
|
+
}
|
|
188
206
|
}
|
|
189
207
|
|
|
190
208
|
function reset() {
|
|
@@ -206,6 +224,60 @@ function reset() {
|
|
|
206
224
|
console.log(` Cleared ${count} file(s) from ${targetDir}`);
|
|
207
225
|
}
|
|
208
226
|
|
|
227
|
+
function getTemplates() {
|
|
228
|
+
const templatesDir = path.join(__dirname, 'templates');
|
|
229
|
+
if (!fs.existsSync(templatesDir)) return [];
|
|
230
|
+
return fs.readdirSync(templatesDir)
|
|
231
|
+
.filter(f => f.endsWith('.json'))
|
|
232
|
+
.map(f => {
|
|
233
|
+
try { return JSON.parse(fs.readFileSync(path.join(templatesDir, f), 'utf8')); }
|
|
234
|
+
catch { return null; }
|
|
235
|
+
})
|
|
236
|
+
.filter(Boolean);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function listTemplates() {
|
|
240
|
+
const templates = getTemplates();
|
|
241
|
+
console.log('');
|
|
242
|
+
console.log(' Available Agent Templates');
|
|
243
|
+
console.log(' ========================');
|
|
244
|
+
console.log('');
|
|
245
|
+
for (const t of templates) {
|
|
246
|
+
const agentNames = t.agents.map(a => a.name).join(', ');
|
|
247
|
+
console.log(' ' + t.name.padEnd(12) + ' ' + t.description);
|
|
248
|
+
console.log(' ' + ''.padEnd(12) + ' Agents: ' + agentNames);
|
|
249
|
+
console.log('');
|
|
250
|
+
}
|
|
251
|
+
console.log(' Usage: npx let-them-talk init --template <name>');
|
|
252
|
+
console.log('');
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function showTemplate(templateName) {
|
|
256
|
+
const templates = getTemplates();
|
|
257
|
+
const template = templates.find(t => t.name === templateName);
|
|
258
|
+
if (!template) {
|
|
259
|
+
console.error(' Unknown template: ' + templateName);
|
|
260
|
+
console.error(' Available: ' + templates.map(t => t.name).join(', '));
|
|
261
|
+
process.exit(1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
console.log('');
|
|
265
|
+
console.log(' Template: ' + template.name);
|
|
266
|
+
console.log(' ' + template.description);
|
|
267
|
+
console.log('');
|
|
268
|
+
console.log(' Copy these prompts into each terminal:');
|
|
269
|
+
console.log(' ======================================');
|
|
270
|
+
|
|
271
|
+
for (var i = 0; i < template.agents.length; i++) {
|
|
272
|
+
var a = template.agents[i];
|
|
273
|
+
console.log('');
|
|
274
|
+
console.log(' --- Terminal ' + (i + 1) + ': ' + a.name + ' (' + a.role + ') ---');
|
|
275
|
+
console.log('');
|
|
276
|
+
console.log(' ' + a.prompt.replace(/\n/g, '\n '));
|
|
277
|
+
console.log('');
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
209
281
|
function dashboard() {
|
|
210
282
|
require('./dashboard.js');
|
|
211
283
|
}
|
|
@@ -214,6 +286,9 @@ switch (command) {
|
|
|
214
286
|
case 'init':
|
|
215
287
|
init();
|
|
216
288
|
break;
|
|
289
|
+
case 'templates':
|
|
290
|
+
listTemplates();
|
|
291
|
+
break;
|
|
217
292
|
case 'dashboard':
|
|
218
293
|
dashboard();
|
|
219
294
|
break;
|