bus-agent 2.3.2 → 2.3.4
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 +10 -10
- package/SKILL.md +8 -8
- package/bin/cli.js +15 -6
- package/coco-cli.js +48 -48
- package/package.json +2 -2
- package/setup.js +10 -10
package/README.md
CHANGED
|
@@ -216,9 +216,9 @@ node index.js
|
|
|
216
216
|
# CLI mode (for scripts / terminal agents)
|
|
217
217
|
npx bus-agent # Run as MCP server (stdio)
|
|
218
218
|
# Or with global install:
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
bus status # Check bus health
|
|
220
|
+
bus agents # List registered agents
|
|
221
|
+
bus send hermes "Hello" # Send a DM
|
|
222
222
|
|
|
223
223
|
# Webhook gateway (optional)
|
|
224
224
|
node webhook-gateway.js 8080
|
|
@@ -231,7 +231,7 @@ Add the following to your MCP client configuration:
|
|
|
231
231
|
```json
|
|
232
232
|
{
|
|
233
233
|
"mcpServers": {
|
|
234
|
-
"
|
|
234
|
+
"bus-agent": {
|
|
235
235
|
"command": "npx",
|
|
236
236
|
"args": ["bus-agent"]
|
|
237
237
|
}
|
|
@@ -244,7 +244,7 @@ Or from a local clone:
|
|
|
244
244
|
```json
|
|
245
245
|
{
|
|
246
246
|
"mcpServers": {
|
|
247
|
-
"
|
|
247
|
+
"bus-agent": {
|
|
248
248
|
"command": "node",
|
|
249
249
|
"args": ["/path/to/bus-agent/index.js"]
|
|
250
250
|
}
|
|
@@ -364,11 +364,11 @@ Agent memory system with dual-mode search:
|
|
|
364
364
|
| Pluggable | Switch between keyword, Ollama, OpenAI, or custom |
|
|
365
365
|
|
|
366
366
|
```bash
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
bus memory store andul "Jonus likes clean architecture" --key architecture-pref --namespace preferences
|
|
368
|
+
bus memory search andul "architecture layers" --limit 5
|
|
369
|
+
bus memory configure --provider ollama --endpoint http://localhost:11434 --model nomic-embed-text
|
|
370
|
+
bus memory rebuild andul
|
|
371
|
+
bus memory archive andul --max-age-days 7
|
|
372
372
|
```
|
|
373
373
|
|
|
374
374
|
## Utility Tools
|
package/SKILL.md
CHANGED
|
@@ -82,10 +82,10 @@ Agent memory with TF-IDF keyword search (built-in) and optional vector search vi
|
|
|
82
82
|
**Dual-mode search:** Vector (cosine similarity) → TF-IDF fallback. Stored in `.bus/memory/{agent}/` as JSONL + vectors.json.
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
bus memory store andul "content" --key k --namespace preferences
|
|
86
|
+
bus memory search andul "query" --limit 5
|
|
87
|
+
bus memory configure --provider ollama --endpoint http://localhost:11434
|
|
88
|
+
bus memory rebuild andul
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
## Communication Patterns
|
|
@@ -216,12 +216,12 @@ alias coco='node E:\_system\.openclaw\workspace\repos\mcp-coco\coco.js'
|
|
|
216
216
|
|
|
217
217
|
Then just:
|
|
218
218
|
```bash
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
bus agents
|
|
220
|
+
bus inbox
|
|
221
|
+
bus send andul "Hello world!"
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
When you run `
|
|
224
|
+
When you run `bus send`, it auto-registers your agent on the bus. Other agents (Andul, Hermes) will see you online and can message you back.
|
|
225
225
|
|
|
226
226
|
## Windows Notes
|
|
227
227
|
|
package/bin/cli.js
CHANGED
|
@@ -14,28 +14,37 @@ const args = process.argv.slice(2);
|
|
|
14
14
|
|
|
15
15
|
if (args.includes('--help') || args.includes('-h')) {
|
|
16
16
|
console.log(`
|
|
17
|
-
MCP Bus —
|
|
17
|
+
MCP Bus — Agent Communication Hub
|
|
18
18
|
|
|
19
19
|
Usage:
|
|
20
|
-
bus-agent Run as stdio MCP server (for
|
|
20
|
+
bus-agent Run as stdio MCP server (for MCP clients)
|
|
21
21
|
bus-agent --daemon Start background daemon
|
|
22
22
|
bus-agent --health Quick health check (exit 0 = ok)
|
|
23
23
|
bus-agent --help Show this help
|
|
24
24
|
|
|
25
25
|
Examples:
|
|
26
26
|
# Run as stdio server (connect via mcporter):
|
|
27
|
-
mcporter add
|
|
27
|
+
mcporter config add bus-agent --stdio "bus-agent"
|
|
28
28
|
|
|
29
29
|
# Start as background daemon:
|
|
30
30
|
bus-agent --daemon
|
|
31
31
|
|
|
32
|
-
# Call from OpenClaw:
|
|
33
|
-
mcporter call coco.ask_hermes prompt="Hello Hermes"
|
|
34
|
-
|
|
35
32
|
# Check health:
|
|
36
33
|
bus-agent --health
|
|
37
34
|
`);
|
|
38
35
|
process.exit(0);
|
|
39
36
|
}
|
|
40
37
|
|
|
38
|
+
if (args.includes('--health')) {
|
|
39
|
+
const { AgentBus } = require(path.join(__dirname, '..', 'lib', 'bus'));
|
|
40
|
+
try {
|
|
41
|
+
const bus = new AgentBus();
|
|
42
|
+
const busDir = process.env.BUS_DIR || path.join(process.cwd(), '.bus');
|
|
43
|
+
const ok = require('fs').existsSync(path.join(busDir, 'agents.json'));
|
|
44
|
+
process.exit(ok ? 0 : 1);
|
|
45
|
+
} catch {
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
require(path.join(__dirname, '..', 'index.js'));
|
package/coco-cli.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Bus CLI v2.3.3 - Direct bus interface for CLI agents
|
|
4
4
|
*
|
|
5
|
-
* No MCP needed. Direct file access to the
|
|
5
|
+
* No MCP needed. Direct file access to the Bus Agent Bus.
|
|
6
6
|
*
|
|
7
7
|
* Usage:
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
8
|
+
* bus agents # List all agents (with filters)
|
|
9
|
+
* bus whoami # Show your agent identity
|
|
10
|
+
* bus inbox [agent] # Show inbox messages
|
|
11
|
+
* bus send <to> <message> # Send a message
|
|
12
|
+
* bus reply <msg-id> <message> # Reply to a message
|
|
13
|
+
* bus profile [agent] # Show profile
|
|
14
|
+
* bus profile edit --status busy # Edit your profile
|
|
15
|
+
* bus search <query> # Search agents
|
|
16
|
+
* bus status # Show Bus + your agent status
|
|
17
|
+
* bus subscribe <channel> # Listen to channel messages
|
|
18
|
+
* bus channel list|send|history # Channel operations
|
|
19
|
+
* bus events [since] # View system events
|
|
20
|
+
* bus watch [agent] # Watch for new messages
|
|
21
21
|
*/
|
|
22
22
|
const path = require('path');
|
|
23
23
|
const fs = require('fs');
|
|
@@ -123,7 +123,7 @@ function cmdAgents(filterArgs) {
|
|
|
123
123
|
(a.description || '').toLowerCase().includes(filters.search.toLowerCase())
|
|
124
124
|
);
|
|
125
125
|
|
|
126
|
-
console.log(`\n🤖 Agents on
|
|
126
|
+
console.log(`\n🤖 Agents on Bus (${list.length} total):`);
|
|
127
127
|
console.log('─'.repeat(70));
|
|
128
128
|
|
|
129
129
|
list.sort((a, b) => new Date(b[1].last_seen) - new Date(a[1].last_seen));
|
|
@@ -201,7 +201,7 @@ function cmdInbox(agentName, extra) {
|
|
|
201
201
|
|
|
202
202
|
function cmdSend(to, text) {
|
|
203
203
|
if (!to || !text) {
|
|
204
|
-
console.log('Usage:
|
|
204
|
+
console.log('Usage: bus send <to> <message>');
|
|
205
205
|
process.exit(1);
|
|
206
206
|
}
|
|
207
207
|
const from = process.env.COCO_AGENT || process.env.USER || 'anonymous';
|
|
@@ -220,7 +220,7 @@ function cmdSend(to, text) {
|
|
|
220
220
|
|
|
221
221
|
function cmdReply(msgId, text) {
|
|
222
222
|
if (!msgId || !text) {
|
|
223
|
-
console.log('Usage:
|
|
223
|
+
console.log('Usage: bus reply <msg-id> <message>');
|
|
224
224
|
process.exit(1);
|
|
225
225
|
}
|
|
226
226
|
const from = process.env.COCO_AGENT || process.env.USER || 'anonymous';
|
|
@@ -340,7 +340,7 @@ function cmdProfileEdit(edits) {
|
|
|
340
340
|
|
|
341
341
|
function cmdSearch(query) {
|
|
342
342
|
if (!query) {
|
|
343
|
-
console.log('Usage:
|
|
343
|
+
console.log('Usage: bus search <query>');
|
|
344
344
|
console.log('Searches agent names, descriptions, capabilities, and tags');
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
@@ -391,7 +391,7 @@ function cmdStatus() {
|
|
|
391
391
|
|
|
392
392
|
console.log(`
|
|
393
393
|
╔══════════════════════════════════════════╗
|
|
394
|
-
║
|
|
394
|
+
║ Bus Agent — Agent Bus Status ║
|
|
395
395
|
╚══════════════════════════════════════════╝`);
|
|
396
396
|
console.log(` You: ${myName} ${myOnline ? '🟢 online' : '⚫ offline'}`);
|
|
397
397
|
console.log(` Bus agents: ${Object.keys(agents).length} total (${online.length} online, ${offline.length} offline)`);
|
|
@@ -419,7 +419,7 @@ function cmdStatus() {
|
|
|
419
419
|
|
|
420
420
|
function cmdSubscribe(channelId) {
|
|
421
421
|
if (!channelId) {
|
|
422
|
-
console.log('Usage:
|
|
422
|
+
console.log('Usage: bus subscribe <channel>');
|
|
423
423
|
console.log('Listens to channel messages in real-time.');
|
|
424
424
|
process.exit(1);
|
|
425
425
|
}
|
|
@@ -573,7 +573,7 @@ function cmdChannel(subArgs) {
|
|
|
573
573
|
if (sub === 'create') {
|
|
574
574
|
const chId = subArgs[1];
|
|
575
575
|
const topic = subArgs.slice(2).join(' ') || '';
|
|
576
|
-
if (!chId) { console.log('Usage:
|
|
576
|
+
if (!chId) { console.log('Usage: bus channel create <name> [topic]'); return; }
|
|
577
577
|
const ch = { id: chId, topic, created_by: process.env.COCO_AGENT || 'cli', created_at: new Date().toISOString(), members: [] };
|
|
578
578
|
fs.writeFileSync(path.join(CHANNELS_DIR, `${chId}.json`), JSON.stringify(ch, null, 2), 'utf-8');
|
|
579
579
|
console.log(`✅ Channel "#${chId}" created`);
|
|
@@ -583,7 +583,7 @@ function cmdChannel(subArgs) {
|
|
|
583
583
|
if (sub === 'join') {
|
|
584
584
|
const chId = subArgs[1];
|
|
585
585
|
const agentName = subArgs[2] || process.env.COCO_AGENT || process.env.USER || 'anonymous';
|
|
586
|
-
if (!chId) { console.log('Usage:
|
|
586
|
+
if (!chId) { console.log('Usage: bus channel join <name> [agent]'); return; }
|
|
587
587
|
const chPath = path.join(CHANNELS_DIR, `${chId}.json`);
|
|
588
588
|
if (!fs.existsSync(chPath)) { console.log(`❌ Channel "${chId}" not found`); return; }
|
|
589
589
|
const ch = JSON.parse(fs.readFileSync(chPath, 'utf-8'));
|
|
@@ -597,7 +597,7 @@ function cmdChannel(subArgs) {
|
|
|
597
597
|
const channelId = subArgs[1];
|
|
598
598
|
const text = subArgs.slice(2).join(' ');
|
|
599
599
|
if (!channelId || !text) {
|
|
600
|
-
console.log('Usage:
|
|
600
|
+
console.log('Usage: bus channel send <channel> <message>');
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
603
|
const from = process.env.COCO_AGENT || process.env.USER || 'anonymous';
|
|
@@ -672,7 +672,7 @@ function cmdWatch(agentName) {
|
|
|
672
672
|
const msg = JSON.parse(fs.readFileSync(path.join(dir, f), 'utf-8'));
|
|
673
673
|
const tag = msg.metadata?.channel ? `[#${msg.metadata.channel}]` : '';
|
|
674
674
|
console.log(`\n📩 ${tag} [${msg.from}] ${msg.message}`);
|
|
675
|
-
console.log(` Reply:
|
|
675
|
+
console.log(` Reply: bus reply ${msg.id} "your message"\n`);
|
|
676
676
|
} catch {}
|
|
677
677
|
}
|
|
678
678
|
lastCount = files.length;
|
|
@@ -707,7 +707,7 @@ function cmdTunnel(args) {
|
|
|
707
707
|
const { startServer, startClient, startSync, printSSHHelp } = require('./lib/tunnel');
|
|
708
708
|
const mode = args[0];
|
|
709
709
|
if (!mode || mode === '--help') {
|
|
710
|
-
console.log('Usage:
|
|
710
|
+
console.log('Usage: bus tunnel server|client|sync|ssh [options]');
|
|
711
711
|
console.log(' coco tunnel server --port 9090 --secret <token>');
|
|
712
712
|
console.log(' coco tunnel client --host <ip> --port 9090 --secret <token>');
|
|
713
713
|
console.log(' coco tunnel sync --remote http://<ip>:9090');
|
|
@@ -739,7 +739,7 @@ async function cmdMemory(args) {
|
|
|
739
739
|
const { MemoryStore } = require('./lib/memory');
|
|
740
740
|
const mem = new MemoryStore(BUS_DIR);
|
|
741
741
|
const sub = args[0];
|
|
742
|
-
if (!sub) { console.log('Usage:
|
|
742
|
+
if (!sub) { console.log('Usage: bus memory store|search|recall|list|forget|stats|archive|clear|configure|rebuild <args>'); return; }
|
|
743
743
|
|
|
744
744
|
try {
|
|
745
745
|
switch (sub) {
|
|
@@ -749,7 +749,7 @@ async function cmdMemory(args) {
|
|
|
749
749
|
const key = args.includes('--key') ? args[args.indexOf('--key') + 1] : undefined;
|
|
750
750
|
const namespace = args.includes('--namespace') ? args[args.indexOf('--namespace') + 1] : undefined;
|
|
751
751
|
const ttl = args.includes('--ttl') ? parseInt(args[args.indexOf('--ttl') + 1], 10) : undefined;
|
|
752
|
-
if (!agent || !content) { console.log('Usage:
|
|
752
|
+
if (!agent || !content) { console.log('Usage: bus memory store <agent> <content> [--key] [--namespace] [--ttl]'); return; }
|
|
753
753
|
const id = await mem.store(agent, { content, key, namespace, ttl });
|
|
754
754
|
console.log(' ✅ Memory stored: ' + id);
|
|
755
755
|
break;
|
|
@@ -759,7 +759,7 @@ async function cmdMemory(args) {
|
|
|
759
759
|
const query = args.slice(2).filter(a => !a.startsWith('--')).join(' ');
|
|
760
760
|
const limit = args.includes('--limit') ? parseInt(args[args.indexOf('--limit') + 1], 10) : 10;
|
|
761
761
|
const namespace = args.includes('--namespace') ? args[args.indexOf('--namespace') + 1] : undefined;
|
|
762
|
-
if (!agent || !query) { console.log('Usage:
|
|
762
|
+
if (!agent || !query) { console.log('Usage: bus memory search <agent> <query> [--limit] [--namespace]'); return; }
|
|
763
763
|
const results = await mem.search(agent, query, { limit, namespace });
|
|
764
764
|
if (results.length === 0) { console.log(' No results found.'); return; }
|
|
765
765
|
console.log('');
|
|
@@ -775,7 +775,7 @@ async function cmdMemory(args) {
|
|
|
775
775
|
}
|
|
776
776
|
case 'recall': {
|
|
777
777
|
const agent = args[1]; const id = args[2];
|
|
778
|
-
if (!agent || !id) { console.log('Usage:
|
|
778
|
+
if (!agent || !id) { console.log('Usage: bus memory recall <agent> <id>'); return; }
|
|
779
779
|
const e = mem.recall(agent, id);
|
|
780
780
|
if (!e) { console.log(' Not found.'); return; }
|
|
781
781
|
console.log('');
|
|
@@ -789,7 +789,7 @@ async function cmdMemory(args) {
|
|
|
789
789
|
}
|
|
790
790
|
case 'list': {
|
|
791
791
|
const agent = args[1];
|
|
792
|
-
if (!agent) { console.log('Usage:
|
|
792
|
+
if (!agent) { console.log('Usage: bus memory list <agent> [--namespace] [--limit] [--offset]'); return; }
|
|
793
793
|
const limit = args.includes('--limit') ? parseInt(args[args.indexOf('--limit') + 1], 10) : 50;
|
|
794
794
|
const offset = args.includes('--offset') ? parseInt(args[args.indexOf('--offset') + 1], 10) : 0;
|
|
795
795
|
const namespace = args.includes('--namespace') ? args[args.indexOf('--namespace') + 1] : undefined;
|
|
@@ -804,14 +804,14 @@ async function cmdMemory(args) {
|
|
|
804
804
|
}
|
|
805
805
|
case 'forget': {
|
|
806
806
|
const agent = args[1]; const id = args[2];
|
|
807
|
-
if (!agent || !id) { console.log('Usage:
|
|
807
|
+
if (!agent || !id) { console.log('Usage: bus memory forget <agent> <id>'); return; }
|
|
808
808
|
const ok = mem.forget(agent, id);
|
|
809
809
|
console.log(ok ? ' Deleted.' : ' Not found.');
|
|
810
810
|
break;
|
|
811
811
|
}
|
|
812
812
|
case 'stats': {
|
|
813
813
|
const agent = args[1];
|
|
814
|
-
if (!agent) { console.log('Usage:
|
|
814
|
+
if (!agent) { console.log('Usage: bus memory stats <agent>'); return; }
|
|
815
815
|
const s = mem.stats(agent);
|
|
816
816
|
console.log('');
|
|
817
817
|
console.log(' Memory Stats - ' + agent + ':');
|
|
@@ -828,7 +828,7 @@ async function cmdMemory(args) {
|
|
|
828
828
|
}
|
|
829
829
|
case 'archive': {
|
|
830
830
|
const agent = args[1];
|
|
831
|
-
if (!agent) { console.log('Usage:
|
|
831
|
+
if (!agent) { console.log('Usage: bus memory archive <agent> [--max-age-days] [--no-delete]'); return; }
|
|
832
832
|
const maxAge = args.includes('--max-age-days') ? parseInt(args[args.indexOf('--max-age-days') + 1], 10) : 7;
|
|
833
833
|
const deleteAfter = !args.includes('--no-delete');
|
|
834
834
|
const r = await mem.archive(agent, { maxAgeDays: maxAge, deleteAfter });
|
|
@@ -838,7 +838,7 @@ async function cmdMemory(args) {
|
|
|
838
838
|
case 'clear': {
|
|
839
839
|
const agent = args[1];
|
|
840
840
|
const ns = args.includes('--namespace') ? args[args.indexOf('--namespace') + 1] : undefined;
|
|
841
|
-
if (!agent) { console.log('Usage:
|
|
841
|
+
if (!agent) { console.log('Usage: bus memory clear <agent> [--namespace]'); return; }
|
|
842
842
|
const count = mem.clear(agent, ns);
|
|
843
843
|
console.log(' Cleared ' + count + ' entries' + (ns ? ' in namespace "' + ns + '"' : ''));
|
|
844
844
|
break;
|
|
@@ -848,7 +848,7 @@ async function cmdMemory(args) {
|
|
|
848
848
|
const endpoint = args.includes('--endpoint') ? args[args.indexOf('--endpoint') + 1] : undefined;
|
|
849
849
|
const model = args.includes('--model') ? args[args.indexOf('--model') + 1] : undefined;
|
|
850
850
|
const apiKey = args.includes('--api-key') ? args[args.indexOf('--api-key') + 1] : undefined;
|
|
851
|
-
if (!provider) { console.log('Usage:
|
|
851
|
+
if (!provider) { console.log('Usage: bus memory configure --provider <keyword|ollama|openai|custom> [--endpoint] [--model] [--api-key]'); return; }
|
|
852
852
|
const cfg = mem.configure({ provider, endpoint, model, api_key: apiKey });
|
|
853
853
|
console.log(' Configured: ' + cfg.provider);
|
|
854
854
|
if (cfg.model) console.log(' Model: ' + cfg.model);
|
|
@@ -857,7 +857,7 @@ async function cmdMemory(args) {
|
|
|
857
857
|
}
|
|
858
858
|
case 'rebuild': {
|
|
859
859
|
const agent = args[1];
|
|
860
|
-
if (!agent) { console.log('Usage:
|
|
860
|
+
if (!agent) { console.log('Usage: bus memory rebuild <agent>'); return; }
|
|
861
861
|
const r = await mem.rebuildVectors(agent);
|
|
862
862
|
console.log(' Rebuilt ' + r.rebuilt + ' vectors.');
|
|
863
863
|
if (r.failed > 0) console.log(' Failed: ' + r.failed);
|
|
@@ -865,7 +865,7 @@ async function cmdMemory(args) {
|
|
|
865
865
|
break;
|
|
866
866
|
}
|
|
867
867
|
default:
|
|
868
|
-
console.log('Usage:
|
|
868
|
+
console.log('Usage: bus memory store|search|recall|list|forget|stats|archive|clear|configure|rebuild');
|
|
869
869
|
}
|
|
870
870
|
} catch (err) {
|
|
871
871
|
console.error('Error:', err.message);
|
|
@@ -887,7 +887,7 @@ function cmdBackup(args) {
|
|
|
887
887
|
case '--cleanup': cleanupBackups(BUS_DIR, parseInt(args[1], 10) || 30); break;
|
|
888
888
|
case '--auto': autoBackup(BUS_DIR); break;
|
|
889
889
|
case '--watch': watchMode(BUS_DIR, parseInt(args[1], 10) || 30); break;
|
|
890
|
-
default: console.log('Usage:
|
|
890
|
+
default: console.log('Usage: bus backup [--list|--info|--restore|--diff|--cleanup|--auto|--watch]');
|
|
891
891
|
}
|
|
892
892
|
} catch (err) {
|
|
893
893
|
console.error('Error:', err.message);
|
|
@@ -899,11 +899,11 @@ function cmdBackup(args) {
|
|
|
899
899
|
function cmdHelp() {
|
|
900
900
|
console.log(`
|
|
901
901
|
╔═══════════════════════════════════════════════╗
|
|
902
|
-
║ MCP
|
|
902
|
+
║ MCP Bus v2.3.3 - CLI Agent Bus Interface (bus) ║
|
|
903
903
|
╚═══════════════════════════════════════════════╝
|
|
904
904
|
|
|
905
905
|
Usage:
|
|
906
|
-
|
|
906
|
+
bus <command> [args]
|
|
907
907
|
|
|
908
908
|
Commands:
|
|
909
909
|
agents [filters] List all agents on the bus
|
|
@@ -916,7 +916,7 @@ Commands:
|
|
|
916
916
|
profile [agent] Show agent profile details
|
|
917
917
|
profile edit --status busy Edit your profile fields
|
|
918
918
|
search <query> Search agents by name/capability/description
|
|
919
|
-
status Show
|
|
919
|
+
status Show bus health & online agents
|
|
920
920
|
subscribe <channel> Listen to channel messages in real-time
|
|
921
921
|
|
|
922
922
|
channel list List all channels
|
|
@@ -971,12 +971,12 @@ Environment:
|
|
|
971
971
|
COCO_AGENT=opencode Set your agent name for inbox/send
|
|
972
972
|
|
|
973
973
|
Examples:
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
974
|
+
bus agents --online --capability code-review
|
|
975
|
+
bus profile opencode
|
|
976
|
+
bus search web
|
|
977
|
+
bus status
|
|
978
|
+
bus subscribe dev-chat
|
|
979
|
+
bus channel create dev-chat "Development chat"
|
|
980
980
|
`);
|
|
981
981
|
}
|
|
982
982
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bus-agent",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"description": "Universal Agent Communication Hub — Connect any AI agent to any other. MCP bus with messaging, channels, memory, scheduling, workflows, and diagnostics.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"
|
|
7
|
+
"bus": "./coco-cli.js",
|
|
8
8
|
"bus-agent": "./bin/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
package/setup.js
CHANGED
|
@@ -92,14 +92,14 @@ COCO_CLI=${path.join(COCO_DIR, 'coco-cli.js')}
|
|
|
92
92
|
function generateShellAliases() {
|
|
93
93
|
return `
|
|
94
94
|
# ── CoCo Bus Aliases ──
|
|
95
|
-
alias
|
|
96
|
-
alias
|
|
97
|
-
alias
|
|
98
|
-
alias
|
|
99
|
-
alias
|
|
100
|
-
alias
|
|
101
|
-
alias
|
|
102
|
-
alias
|
|
95
|
+
alias bus-agents='node ${path.join(COCO_DIR, 'coco-cli.js')} agents'
|
|
96
|
+
alias bus-inbox='node ${path.join(COCO_DIR, 'coco-cli.js')} inbox'
|
|
97
|
+
alias bus-send='node ${path.join(COCO_DIR, 'coco-cli.js')} send'
|
|
98
|
+
alias bus-whoami='node ${path.join(COCO_DIR, 'coco-cli.js')} whoami'
|
|
99
|
+
alias bus-status='node ${path.join(COCO_DIR, 'coco-cli.js')} status'
|
|
100
|
+
alias bus-search='node ${path.join(COCO_DIR, 'coco-cli.js')} search'
|
|
101
|
+
alias bus-watch='node ${path.join(COCO_DIR, 'coco-cli.js')} watch'
|
|
102
|
+
alias bus-channel='node ${path.join(COCO_DIR, 'coco-cli.js')} channel'
|
|
103
103
|
`;
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -196,7 +196,7 @@ async function setupClaudeCode(agentName) {
|
|
|
196
196
|
const outPath = path.join(COCO_DIR, 'claude-mcp.json');
|
|
197
197
|
fs.writeFileSync(outPath, JSON.stringify(config, null, 2), 'utf-8');
|
|
198
198
|
console.log(` ✅ Claude Code MCP config → ${outPath}`);
|
|
199
|
-
console.log(` Run: claude mcp add
|
|
199
|
+
console.log(` Run: claude mcp add bus-agent "node ${path.join(COCO_DIR, 'index.js')}"`);
|
|
200
200
|
|
|
201
201
|
const [envFile] = generateEnvAndAliases(agentName);
|
|
202
202
|
return ['claude-mcp.json', envFile];
|
|
@@ -294,7 +294,7 @@ async function main() {
|
|
|
294
294
|
console.log(` Add to .mcp.json:`);
|
|
295
295
|
console.log(` ${JSON.stringify(generateMcpConfigOpenCode(), null, 4).split('\n').map(l => ' ' + l).join('\n')}\n`);
|
|
296
296
|
console.log(` 2. Claude Code:`);
|
|
297
|
-
console.log(` claude mcp add
|
|
297
|
+
console.log(` claude mcp add bus-agent "node ${path.join(COCO_DIR, 'index.js')}"\n`);
|
|
298
298
|
console.log(` 3. Cursor:`);
|
|
299
299
|
console.log(` Add to .cursor/mcp.json`);
|
|
300
300
|
return;
|