bus-agent 2.3.4 → 2.3.6
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/{.env.coco → .env.bus} +1 -1
- package/AGENTS.md +6 -6
- package/README.md +176 -230
- package/SKILL.md +35 -35
- package/backup.js +4 -4
- package/bridge.js +5 -5
- package/bus-aliases.sh +10 -0
- package/{coco-cli.js → bus-cli.js} +18 -18
- package/{coco-tool.js → bus-tool.js} +13 -13
- package/bus.js +26 -0
- package/claude-mcp.json +2 -2
- package/clients/{coco-client.ts → bus-client.ts} +6 -6
- package/clients/{coco_client.py → bus_client.py} +7 -7
- package/cursor-mcp.json +1 -1
- package/doctor.js +1 -1
- package/hermes-forwarder.js +1 -1
- package/hermes.example.json +2 -2
- package/index.js +1 -1
- package/lib/backup.js +9 -9
- package/lib/bus.js +1 -1
- package/lib/daemon.js +7 -7
- package/lib/doctor.js +4 -4
- package/lib/mcp.js +10 -10
- package/lib/memory.js +1 -1
- package/lib/orchestrator.js +1 -1
- package/lib/scheduler.js +2 -2
- package/lib/tunnel.js +12 -12
- package/mcporter.example.json +2 -2
- package/opencode-mcp.json +2 -2
- package/package.json +9 -9
- package/scripts/install.bat +1 -1
- package/scripts/install.ps1 +10 -10
- package/setup.js +32 -32
- package/tunnel.js +2 -2
- package/webhook-gateway.js +2 -2
- package/coco-aliases.sh +0 -10
- package/coco.js +0 -26
package/lib/backup.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Bus Backup & Restore — Bus State Management Module
|
|
3
3
|
*
|
|
4
4
|
* Export functions, no process.exit, accepts busDir as parameter.
|
|
5
|
-
* Used by:
|
|
5
|
+
* Used by: bus-cli.js, backup.js (thin CLI wrapper)
|
|
6
6
|
*/
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
const path = require('path');
|
|
@@ -21,9 +21,9 @@ function createBackup(busDir, outFile) {
|
|
|
21
21
|
if (!fs.existsSync(backupDir)) fs.mkdirSync(backupDir, { recursive: true });
|
|
22
22
|
|
|
23
23
|
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
24
|
-
const output = outFile || path.join(backupDir, `
|
|
24
|
+
const output = outFile || path.join(backupDir, `bus-${timestamp}.coco`);
|
|
25
25
|
|
|
26
|
-
console.log(`\n
|
|
26
|
+
console.log(`\n Bus Backup — Creating backup...`);
|
|
27
27
|
console.log(` Source: ${busDir}`);
|
|
28
28
|
console.log(` Output: ${output}\n`);
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ function createBackup(busDir, outFile) {
|
|
|
44
44
|
walk(busDir);
|
|
45
45
|
|
|
46
46
|
const metadata = {
|
|
47
|
-
version: '2.1.0', tool: '
|
|
47
|
+
version: '2.1.0', tool: 'bus-backup', created_at: new Date().toISOString(),
|
|
48
48
|
hostname: require('os').hostname(), bus_path: busDir, file_count: entries.length,
|
|
49
49
|
checksum: crypto.createHash('sha256').update(entries.map(e => e.path + e.content).join('')).digest('hex'),
|
|
50
50
|
};
|
|
@@ -65,7 +65,7 @@ function createBackup(busDir, outFile) {
|
|
|
65
65
|
function restoreBackup(file, busDir) {
|
|
66
66
|
if (!fs.existsSync(file)) throw new Error(`Backup file not found: ${file}`);
|
|
67
67
|
|
|
68
|
-
console.log(`\n
|
|
68
|
+
console.log(`\n Bus Restore — Restoring from backup...`);
|
|
69
69
|
console.log(` Source: ${file}`);
|
|
70
70
|
|
|
71
71
|
let archive;
|
|
@@ -113,7 +113,7 @@ function listBackups(busDir) {
|
|
|
113
113
|
const files = fs.readdirSync(backupDir).filter(f => f.endsWith('.coco')).sort().reverse();
|
|
114
114
|
if (files.length === 0) { console.log('No backups found.'); return []; }
|
|
115
115
|
|
|
116
|
-
console.log(`\n
|
|
116
|
+
console.log(`\n Bus Backups (${files.length} total):`);
|
|
117
117
|
console.log(' ──────────────────────────────────────────────');
|
|
118
118
|
|
|
119
119
|
let totalSize = 0;
|
|
@@ -165,7 +165,7 @@ function diffBackup(file, busDir) {
|
|
|
165
165
|
if (!fs.existsSync(file)) throw new Error(`Backup file not found: ${file}`);
|
|
166
166
|
const archive = JSON.parse(zlib.gunzipSync(fs.readFileSync(file)).toString('utf-8'));
|
|
167
167
|
|
|
168
|
-
console.log(`\n
|
|
168
|
+
console.log(`\n Bus Diff — Backup vs Current State`);
|
|
169
169
|
console.log(` Backup: ${archive.metadata.created_at}`);
|
|
170
170
|
console.log(' ──────────────────────────────────────────────');
|
|
171
171
|
|
|
@@ -246,7 +246,7 @@ function autoBackup(busDir) {
|
|
|
246
246
|
|
|
247
247
|
function watchMode(busDir, intervalMinutes = 30) {
|
|
248
248
|
const intervalMs = intervalMinutes * 60 * 1000;
|
|
249
|
-
console.log(`\n
|
|
249
|
+
console.log(`\n Bus Auto-Backup — Every ${intervalMinutes} minutes`);
|
|
250
250
|
console.log(` Bus: ${busDir}`);
|
|
251
251
|
console.log(` Press Ctrl+C to stop\n`);
|
|
252
252
|
autoBackup(busDir);
|
package/lib/bus.js
CHANGED
|
@@ -77,7 +77,7 @@ class AgentBus extends EventEmitter {
|
|
|
77
77
|
});
|
|
78
78
|
// Send welcome DM to the new agent
|
|
79
79
|
this.sendMessage('coco', name,
|
|
80
|
-
`👋 Welcome to
|
|
80
|
+
`👋 Welcome to Agent Bus, **${name}**!\n` +
|
|
81
81
|
`You are now connected to ${Object.keys(this._agents).length} agent(s).\n` +
|
|
82
82
|
`Try: agent_list, whoami, or send a message to another agent.`,
|
|
83
83
|
{ type: 'system_welcome' }
|
package/lib/daemon.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Daemon Manager — run MCP
|
|
2
|
+
* Daemon Manager — run MCP Bus as a background process
|
|
3
3
|
* with healthcheck, PID tracking, and auto-recovery for Hermes backend.
|
|
4
4
|
*/
|
|
5
5
|
const { spawn } = require('child_process');
|
|
6
6
|
const path = require('path');
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
|
|
9
|
-
const PID_FILE = path.join(__dirname, '..', '.
|
|
10
|
-
const LOG_FILE = path.join(__dirname, '..', '
|
|
9
|
+
const PID_FILE = path.join(__dirname, '..', '.bus-daemon.pid');
|
|
10
|
+
const LOG_FILE = path.join(__dirname, '..', 'bus-daemon.log');
|
|
11
11
|
const HERMES_MCP_PID = path.join(__dirname, '..', '.hermes-mcp.pid');
|
|
12
12
|
|
|
13
13
|
class Daemon {
|
|
14
14
|
/**
|
|
15
|
-
* Start the MCP
|
|
15
|
+
* Start the MCP Bus daemon in background.
|
|
16
16
|
* Returns immediately; the child process runs independently.
|
|
17
17
|
*/
|
|
18
18
|
async start() {
|
|
@@ -21,7 +21,7 @@ class Daemon {
|
|
|
21
21
|
const existingPid = parseInt(fs.readFileSync(PID_FILE, 'utf-8').trim());
|
|
22
22
|
try {
|
|
23
23
|
process.kill(existingPid, 0);
|
|
24
|
-
console.error(`MCP
|
|
24
|
+
console.error(`MCP Bus already running (PID: ${existingPid})`);
|
|
25
25
|
process.exit(0);
|
|
26
26
|
return;
|
|
27
27
|
} catch {
|
|
@@ -34,7 +34,7 @@ class Daemon {
|
|
|
34
34
|
const child = spawn(process.execPath, [path.join(__dirname, '..', 'index.js')], {
|
|
35
35
|
detached: true,
|
|
36
36
|
stdio: ['ignore', fs.openSync(LOG_FILE, 'a'), fs.openSync(LOG_FILE, 'a')],
|
|
37
|
-
env: { ...process.env,
|
|
37
|
+
env: { ...process.env, MCP_BUS_DAEMON: '1' },
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
child.unref();
|
|
@@ -42,7 +42,7 @@ class Daemon {
|
|
|
42
42
|
// Write PID
|
|
43
43
|
fs.writeFileSync(PID_FILE, String(child.pid), 'utf-8');
|
|
44
44
|
|
|
45
|
-
console.log(`MCP
|
|
45
|
+
console.log(`MCP Bus daemon started (PID: ${child.pid})`);
|
|
46
46
|
console.log(`Log: ${LOG_FILE}`);
|
|
47
47
|
|
|
48
48
|
// Also start Hermes MCP backend
|
package/lib/doctor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Bus Doctor — Diagnostics & Health Check Module
|
|
3
3
|
*
|
|
4
4
|
* Export functions, no process.exit, accepts busDir as parameter.
|
|
5
|
-
* Used by:
|
|
5
|
+
* Used by: bus-cli.js, doctor.js (thin CLI wrapper)
|
|
6
6
|
*/
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
const path = require('path');
|
|
@@ -253,7 +253,7 @@ function runDiagnostics(opts = {}) {
|
|
|
253
253
|
|
|
254
254
|
// ── Stale PID Files ──
|
|
255
255
|
check('Stale PID files', () => {
|
|
256
|
-
const pidFiles = ['.
|
|
256
|
+
const pidFiles = ['.bus-daemon.pid', '.hermes-mcp.pid'];
|
|
257
257
|
let found = 0;
|
|
258
258
|
for (const pf of pidFiles) {
|
|
259
259
|
const p = path.join(path.dirname(BUS_DIR), pf);
|
|
@@ -293,7 +293,7 @@ function runDiagnostics(opts = {}) {
|
|
|
293
293
|
|
|
294
294
|
// ── Run ──
|
|
295
295
|
if (!cfg.quick) {
|
|
296
|
-
console.log(`\n╔═══════════════════════════════════════════════╗\n║
|
|
296
|
+
console.log(`\n╔═══════════════════════════════════════════════╗\n║ Bus — Diagnostic Report ║\n╚═══════════════════════════════════════════════╝`);
|
|
297
297
|
}
|
|
298
298
|
for (const test of tests) test.fn();
|
|
299
299
|
const summary = summaryText(passed, failed, warnings, fixes);
|
package/lib/mcp.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* MCP Protocol Handler — JSON-RPC 2.0 over stdio
|
|
3
3
|
*
|
|
4
|
-
* MCP
|
|
4
|
+
* MCP Bus: Agent Profiles, Discovery, Profiles, Scheduler base
|
|
5
5
|
*/
|
|
6
6
|
const readline = require('readline');
|
|
7
7
|
const path = require('path');
|
|
@@ -16,9 +16,9 @@ class MCPServer {
|
|
|
16
16
|
this.bus = new AgentBus();
|
|
17
17
|
this.agentName = 'coco';
|
|
18
18
|
|
|
19
|
-
// Auto-register
|
|
20
|
-
this.bus.registerAgent('coco', 'MCP
|
|
21
|
-
version: '2.
|
|
19
|
+
// Auto-register Bus on bus with full profile
|
|
20
|
+
this.bus.registerAgent('coco', 'MCP Bus — Universal Agent Communication Hub', {
|
|
21
|
+
version: '2.3.5',
|
|
22
22
|
capabilities: [
|
|
23
23
|
'agent-registry', 'agent-discovery', 'agent-profiles',
|
|
24
24
|
'direct-messaging', 'broadcast', 'channels',
|
|
@@ -65,8 +65,8 @@ class MCPServer {
|
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
name: '
|
|
69
|
-
description: 'Check MCP
|
|
68
|
+
name: 'bus_health',
|
|
69
|
+
description: 'Check MCP Bus bridge and Hermes Agent health status',
|
|
70
70
|
inputSchema: { type: 'object', properties: {} },
|
|
71
71
|
},
|
|
72
72
|
|
|
@@ -441,7 +441,7 @@ class MCPServer {
|
|
|
441
441
|
// Start scheduler
|
|
442
442
|
this.scheduler.start();
|
|
443
443
|
|
|
444
|
-
// Update
|
|
444
|
+
// Update Bus's tool list in profile
|
|
445
445
|
this.bus.updateProfile('coco', { tools: this.tools.map(t => t.name) });
|
|
446
446
|
}
|
|
447
447
|
|
|
@@ -455,7 +455,7 @@ class MCPServer {
|
|
|
455
455
|
return this._respond(id, {
|
|
456
456
|
protocolVersion: '2024-11-05',
|
|
457
457
|
capabilities: { tools: {} },
|
|
458
|
-
serverInfo: { name: 'mcp-
|
|
458
|
+
serverInfo: { name: 'mcp-bus', version: '2.3.5' },
|
|
459
459
|
});
|
|
460
460
|
|
|
461
461
|
case 'notifications/initialized':
|
|
@@ -493,7 +493,7 @@ class MCPServer {
|
|
|
493
493
|
case 'hermes_channels':
|
|
494
494
|
result = await this.bridge.listChannels(args.platform);
|
|
495
495
|
break;
|
|
496
|
-
case '
|
|
496
|
+
case 'bus_health':
|
|
497
497
|
result = await this.bridge.healthCheck();
|
|
498
498
|
break;
|
|
499
499
|
|
|
@@ -510,7 +510,7 @@ class MCPServer {
|
|
|
510
510
|
metadata: {},
|
|
511
511
|
};
|
|
512
512
|
if (args.description) metadata.description = args.description;
|
|
513
|
-
result = this.bus.registerAgent(args.name, args.description || 'MCP agent on
|
|
513
|
+
result = this.bus.registerAgent(args.name, args.description || 'MCP agent on the bus', metadata);
|
|
514
514
|
break;
|
|
515
515
|
}
|
|
516
516
|
case 'agent_update_profile':
|
package/lib/memory.js
CHANGED
package/lib/orchestrator.js
CHANGED
package/lib/scheduler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Bus Agent Scheduler — Schedule messages to be sent on the bus at specified times
|
|
3
3
|
*
|
|
4
4
|
* Reads a schedule file (.bus/schedule.json) and fires messages on time.
|
|
5
5
|
* Supports cron-like intervals, one-shot, and recurring scheduled messages.
|
|
@@ -226,7 +226,7 @@ class Scheduler {
|
|
|
226
226
|
id: { type: 'string', description: 'Unique job ID (optional, auto-generated)' },
|
|
227
227
|
cron: { type: 'string', description: 'Cron expression: "minute hour day month weekday" (e.g. "0 9 * * 1-5" = weekdays 9am)' },
|
|
228
228
|
at: { type: 'string', description: 'ISO timestamp for one-shot scheduling (e.g. "2026-06-25T09:00:00+07:00")' },
|
|
229
|
-
from: { type: 'string', description: 'Sender agent name (default:
|
|
229
|
+
from: { type: 'string', description: 'Sender agent name (default: bus-agent)' },
|
|
230
230
|
to: { type: 'string', description: 'Target: agent name, "#channel", or "broadcast" (default: broadcast)' },
|
|
231
231
|
message: { type: 'string', description: 'Message content to send' },
|
|
232
232
|
metadata: { type: 'object', description: 'Optional metadata' },
|
package/lib/tunnel.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Bus Tunnel — Cross-machine Bus Proxy Module
|
|
3
3
|
*
|
|
4
4
|
* Export functions, no process.exit, accepts busDir as parameter.
|
|
5
|
-
* Used by:
|
|
5
|
+
* Used by: bus-cli.js, tunnel.js (thin CLI wrapper)
|
|
6
6
|
*/
|
|
7
7
|
const http = require('http');
|
|
8
8
|
const fs = require('fs');
|
|
@@ -21,7 +21,7 @@ function hashSecret(secret) {
|
|
|
21
21
|
|
|
22
22
|
function authenticate(req, secret) {
|
|
23
23
|
if (!secret) return true;
|
|
24
|
-
const provided = req.headers['x-
|
|
24
|
+
const provided = req.headers['x-bus-token'];
|
|
25
25
|
return provided && hashSecret(provided) === hashSecret(secret);
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ function startServer(opts = {}) {
|
|
|
47
47
|
const port = opts.port || 9090;
|
|
48
48
|
const secret = opts.secret || null;
|
|
49
49
|
|
|
50
|
-
console.log(`\n
|
|
50
|
+
console.log(`\n Bus Tunnel — Server (receiving end)`);
|
|
51
51
|
console.log(` Listening on :${port}`);
|
|
52
52
|
console.log(` Auth: ${secret ? 'enabled' : 'disabled (INSECURE)'}`);
|
|
53
53
|
console.log(` Bus: ${busDir}\n`);
|
|
@@ -55,7 +55,7 @@ function startServer(opts = {}) {
|
|
|
55
55
|
const server = http.createServer((req, res) => {
|
|
56
56
|
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
57
57
|
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
|
|
58
|
-
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, X-
|
|
58
|
+
res.setHeader('Access-Control-Allow-Headers', 'Content-Type, X-Bus-Token');
|
|
59
59
|
if (req.method === 'OPTIONS') { res.writeHead(204); res.end(); return; }
|
|
60
60
|
if (secret && !authenticate(req, secret)) { res.writeHead(401); res.end(JSON.stringify({ error: 'Unauthorized' })); return; }
|
|
61
61
|
|
|
@@ -64,7 +64,7 @@ function startServer(opts = {}) {
|
|
|
64
64
|
|
|
65
65
|
if (req.method === 'GET' && pathname === '/health') {
|
|
66
66
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
67
|
-
res.end(JSON.stringify({ service: '
|
|
67
|
+
res.end(JSON.stringify({ service: 'bus-tunnel', role: 'server', bus: busDir, agents: Object.keys(loadAgents(busDir)).length, uptime: process.uptime() }));
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -170,9 +170,9 @@ async function startClient(opts = {}) {
|
|
|
170
170
|
const interval = opts.interval || 10000;
|
|
171
171
|
const baseUrl = `http://${host}:${port}`;
|
|
172
172
|
const headers = {};
|
|
173
|
-
if (secret) headers['X-
|
|
173
|
+
if (secret) headers['X-Bus-Token'] = secret;
|
|
174
174
|
|
|
175
|
-
console.log(`\n
|
|
175
|
+
console.log(`\n Bus Tunnel — Client (sending end)`);
|
|
176
176
|
console.log(` Remote: ${baseUrl}`);
|
|
177
177
|
console.log(` Sync: Every ${interval}ms\n`);
|
|
178
178
|
|
|
@@ -240,9 +240,9 @@ async function startSync(opts = {}) {
|
|
|
240
240
|
const secret = opts.secret || null;
|
|
241
241
|
const interval = opts.interval || 10000;
|
|
242
242
|
const headers = {};
|
|
243
|
-
if (secret) headers['X-
|
|
243
|
+
if (secret) headers['X-Bus-Token'] = secret;
|
|
244
244
|
|
|
245
|
-
console.log(`\n
|
|
245
|
+
console.log(`\n Bus Tunnel — Bidirectional Sync`);
|
|
246
246
|
console.log(` Remote: ${remote}`);
|
|
247
247
|
console.log(` Local: ${busDir}`);
|
|
248
248
|
console.log(` Sync: Every ${interval}ms\n`);
|
|
@@ -294,8 +294,8 @@ function printSSHHelp(opts = {}) {
|
|
|
294
294
|
const remote = opts.remote || 'user@remote-host';
|
|
295
295
|
const port = opts.port || 9090;
|
|
296
296
|
|
|
297
|
-
console.log(`\n╔═══════════════════════════════════════════════╗\n║
|
|
298
|
-
console.log(`To expose your local
|
|
297
|
+
console.log(`\n╔═══════════════════════════════════════════════╗\n║ Bus Tunnel — SSH Port Forwarding ║\n╚═══════════════════════════════════════════════╝\n`);
|
|
298
|
+
console.log(`To expose your local bus to a remote machine:\n`);
|
|
299
299
|
console.log(`1. On THIS machine, start the tunnel server:`);
|
|
300
300
|
console.log(` node tunnel.js server --port ${port} --secret ***\n`);
|
|
301
301
|
console.log(`2. On the REMOTE machine, create an SSH reverse tunnel:`);
|
package/mcporter.example.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"servers": {
|
|
3
|
-
"
|
|
3
|
+
"bus-agent": {
|
|
4
4
|
"type": "stdio",
|
|
5
5
|
"command": "node",
|
|
6
|
-
"args": ["C:\\Users\\Administrator\\.openclaw\\workspace\\
|
|
6
|
+
"args": ["C:\\Users\\Administrator\\.openclaw\\workspace\\bus-agent\\index.js"]
|
|
7
7
|
},
|
|
8
8
|
"hermes": {
|
|
9
9
|
"type": "stdio",
|
package/opencode-mcp.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bus-agent",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
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
|
-
"bus": "
|
|
8
|
-
"bus-agent": "
|
|
7
|
+
"bus": "bus-cli.js",
|
|
8
|
+
"bus-agent": "bin/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"start": "node index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"backup": "node backup.js",
|
|
17
17
|
"backup:list": "node backup.js --list",
|
|
18
18
|
"tunnel": "node tunnel.js server",
|
|
19
|
-
"memory": "node
|
|
19
|
+
"memory": "node bus-cli.js memory"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|
|
22
22
|
"node": ">=18.0.0"
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"lib/",
|
|
51
51
|
"clients/",
|
|
52
52
|
"index.js",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"bus-cli.js",
|
|
54
|
+
"bus-tool.js",
|
|
55
55
|
"doctor.js",
|
|
56
56
|
"backup.js",
|
|
57
57
|
"tunnel.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"webhook-gateway.js",
|
|
60
60
|
"hermes-forwarder.js",
|
|
61
61
|
"setup.js",
|
|
62
|
-
"
|
|
63
|
-
".env.
|
|
62
|
+
"bus.js",
|
|
63
|
+
".env.bus",
|
|
64
64
|
"AGENTS.md",
|
|
65
65
|
"README.md",
|
|
66
66
|
"SKILL.md",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"opencode-mcp.json",
|
|
71
71
|
"mcporter.example.json",
|
|
72
72
|
"hermes.example.json",
|
|
73
|
-
"
|
|
73
|
+
"bus-aliases.sh",
|
|
74
74
|
"scripts/"
|
|
75
75
|
]
|
|
76
76
|
}
|
package/scripts/install.bat
CHANGED
package/scripts/install.ps1
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# MCP
|
|
1
|
+
# MCP Bus — Windows Install Script
|
|
2
2
|
# Run as Administrator to install Scheduled Task + mcporter config
|
|
3
3
|
|
|
4
4
|
$ErrorActionPreference = "Stop"
|
|
5
5
|
$RepoDir = Split-Path -Parent $PSScriptRoot
|
|
6
6
|
|
|
7
7
|
Write-Host "╔══════════════════════════════════════════╗" -ForegroundColor Cyan
|
|
8
|
-
Write-Host "║ MCP
|
|
8
|
+
Write-Host "║ MCP Bus — Windows Install ║" -ForegroundColor Cyan
|
|
9
9
|
Write-Host "╚══════════════════════════════════════════╝" -ForegroundColor Cyan
|
|
10
10
|
Write-Host ""
|
|
11
11
|
|
|
@@ -29,11 +29,11 @@ try {
|
|
|
29
29
|
exit 1
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
# 3. Test MCP
|
|
33
|
-
Write-Host "🧪 Testing MCP
|
|
32
|
+
# 3. Test MCP Bus
|
|
33
|
+
Write-Host "🧪 Testing MCP Bus..." -ForegroundColor Yellow
|
|
34
34
|
try {
|
|
35
35
|
$result = node "$RepoDir\bin\cli.js" --health 2>&1
|
|
36
|
-
Write-Host " ✅ MCP
|
|
36
|
+
Write-Host " ✅ MCP Bus works" -ForegroundColor Green
|
|
37
37
|
} catch {
|
|
38
38
|
Write-Host " ⚠️ First run - testing..." -ForegroundColor Yellow
|
|
39
39
|
}
|
|
@@ -45,7 +45,7 @@ try {
|
|
|
45
45
|
} catch {}
|
|
46
46
|
|
|
47
47
|
# 5. Register Scheduled Task for auto-start
|
|
48
|
-
$taskName = "
|
|
48
|
+
$taskName = "MCP_Bus_Daemon"
|
|
49
49
|
$taskExists = Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
|
|
50
50
|
|
|
51
51
|
Write-Host "⚙️ Scheduled Task: $taskName" -ForegroundColor Yellow
|
|
@@ -70,7 +70,7 @@ try {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
# 6. Start daemon
|
|
73
|
-
Write-Host "🚀 Starting MCP
|
|
73
|
+
Write-Host "🚀 Starting MCP Bus daemon..." -ForegroundColor Yellow
|
|
74
74
|
try {
|
|
75
75
|
Start-ScheduledTask -TaskName $taskName
|
|
76
76
|
Write-Host " ✅ Daemon started via Scheduled Task" -ForegroundColor Green
|
|
@@ -90,11 +90,11 @@ if ($LASTEXITCODE -eq 0) {
|
|
|
90
90
|
|
|
91
91
|
Write-Host ""
|
|
92
92
|
Write-Host "╔══════════════════════════════════════════╗" -ForegroundColor Cyan
|
|
93
|
-
Write-Host "║ MCP
|
|
93
|
+
Write-Host "║ MCP Bus Installation Done ║" -ForegroundColor Cyan
|
|
94
94
|
Write-Host "╚══════════════════════════════════════════╝" -ForegroundColor Cyan
|
|
95
95
|
Write-Host ""
|
|
96
96
|
Write-Host "To use from OpenClaw, add to mcporter config:" -ForegroundColor White
|
|
97
|
-
Write-Host " mcporter add
|
|
97
|
+
Write-Host " mcporter add bus-agent --stdio `"node $RepoDir\index.js`"" -ForegroundColor Gray
|
|
98
98
|
Write-Host ""
|
|
99
99
|
Write-Host "Then call:" -ForegroundColor White
|
|
100
|
-
Write-Host " mcporter call
|
|
100
|
+
Write-Host " mcporter call bus-agent.ask_hermes prompt=`"Hello`"" -ForegroundColor Gray
|