agent-relay 2.0.24 → 2.0.25

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.
@@ -26,12 +26,12 @@ import fs from 'node:fs';
26
26
  import path from 'node:path';
27
27
  import readline from 'node:readline';
28
28
  import { promisify } from 'node:util';
29
- import { exec } from 'node:child_process';
29
+ import { exec, spawn as spawnProcess } from 'node:child_process';
30
30
  import { fileURLToPath } from 'node:url';
31
31
  const RELAY_DASHBOARD_REPO = 'https://github.com/AgentWorkforce/relay-dashboard';
32
32
  /**
33
33
  * Prompt user to choose how to handle missing dashboard package.
34
- * Returns: 'install' | 'skip'
34
+ * Returns: 'npx' | 'install' | 'skip'
35
35
  */
36
36
  async function promptDashboardInstall() {
37
37
  const rl = readline.createInterface({
@@ -42,14 +42,18 @@ async function promptDashboardInstall() {
42
42
  The web dashboard requires @agent-relay/dashboard-server package.
43
43
 
44
44
  How would you like to proceed?
45
- 1. View installation instructions
46
- 2. Skip and continue without dashboard
45
+ 1. Start with npx (recommended - auto-installs temporarily)
46
+ 2. View installation instructions
47
+ 3. Skip and continue without dashboard
47
48
  `);
48
49
  return new Promise((resolve) => {
49
- rl.question('Choose [1/2]: ', (answer) => {
50
+ rl.question('Choose [1/2/3]: ', (answer) => {
50
51
  rl.close();
51
52
  const choice = answer.trim();
52
53
  if (choice === '1') {
54
+ resolve('npx');
55
+ }
56
+ else if (choice === '2') {
53
57
  resolve('install');
54
58
  }
55
59
  else {
@@ -74,6 +78,53 @@ Then restart with:
74
78
  For more options, see: ${RELAY_DASHBOARD_REPO}
75
79
  `);
76
80
  }
81
+ /**
82
+ * Start dashboard via npx (downloads and runs if not installed).
83
+ * Returns the spawned child process and port.
84
+ */
85
+ function startDashboardViaNpx(options) {
86
+ console.log('Starting dashboard via npx (this may take a moment on first run)...');
87
+ const dashboardProcess = spawnProcess('npx', [
88
+ '--yes',
89
+ '@agent-relay/dashboard-server',
90
+ '--integrated',
91
+ '--port', String(options.port),
92
+ '--data-dir', options.dataDir,
93
+ '--team-dir', options.teamDir,
94
+ '--project-root', options.projectRoot,
95
+ ], {
96
+ stdio: ['ignore', 'pipe', 'pipe'],
97
+ env: {
98
+ ...process.env,
99
+ // Pass any additional env vars needed
100
+ },
101
+ });
102
+ // Forward dashboard output with prefix
103
+ dashboardProcess.stdout?.on('data', (data) => {
104
+ const lines = data.toString().split('\n').filter(Boolean);
105
+ for (const line of lines) {
106
+ // Don't duplicate the "Dashboard:" line
107
+ if (!line.includes('Dashboard:')) {
108
+ console.log(`[dashboard] ${line}`);
109
+ }
110
+ }
111
+ });
112
+ dashboardProcess.stderr?.on('data', (data) => {
113
+ const lines = data.toString().split('\n').filter(Boolean);
114
+ for (const line of lines) {
115
+ console.error(`[dashboard] ${line}`);
116
+ }
117
+ });
118
+ dashboardProcess.on('error', (err) => {
119
+ console.error('Failed to start dashboard via npx:', err.message);
120
+ });
121
+ dashboardProcess.on('exit', (code) => {
122
+ if (code !== 0 && code !== null) {
123
+ console.error(`Dashboard process exited with code ${code}`);
124
+ }
125
+ });
126
+ return { process: dashboardProcess, port: options.port };
127
+ }
77
128
  dotenvConfig();
78
129
  const DEFAULT_DASHBOARD_PORT = process.env.AGENT_RELAY_DASHBOARD_PORT || '3888';
79
130
  // Read version from package.json
@@ -524,15 +575,54 @@ program
524
575
  if (process.stdin.isTTY) {
525
576
  console.log('');
526
577
  const action = await promptDashboardInstall();
527
- if (action === 'install') {
578
+ if (action === 'npx') {
579
+ // Start dashboard via npx
580
+ const { process: dashboardProcess, port: npxPort } = startDashboardViaNpx({
581
+ port,
582
+ dataDir: paths.dataDir,
583
+ teamDir: paths.teamDir,
584
+ projectRoot: paths.projectRoot,
585
+ });
586
+ dashboardPort = npxPort;
587
+ // Clean up dashboard process on exit
588
+ const cleanupDashboard = () => {
589
+ if (dashboardProcess && !dashboardProcess.killed) {
590
+ dashboardProcess.kill('SIGTERM');
591
+ }
592
+ };
593
+ process.on('SIGINT', cleanupDashboard);
594
+ process.on('SIGTERM', cleanupDashboard);
595
+ process.on('exit', cleanupDashboard);
596
+ // Wait a moment for dashboard to start
597
+ await new Promise(resolve => setTimeout(resolve, 2000));
598
+ console.log(`Dashboard: http://localhost:${dashboardPort}`);
599
+ }
600
+ else if (action === 'install') {
528
601
  showDashboardInstallInstructions();
529
602
  }
530
603
  }
531
604
  else {
532
- // Non-interactive: just show instructions and exit with error
533
- console.error('Dashboard package not installed.');
534
- showDashboardInstallInstructions();
535
- process.exit(1);
605
+ // Non-interactive: try npx automatically
606
+ console.log('Dashboard package not installed. Starting via npx...');
607
+ const { process: dashboardProcess, port: npxPort } = startDashboardViaNpx({
608
+ port,
609
+ dataDir: paths.dataDir,
610
+ teamDir: paths.teamDir,
611
+ projectRoot: paths.projectRoot,
612
+ });
613
+ dashboardPort = npxPort;
614
+ // Clean up dashboard process on exit
615
+ const cleanupDashboard = () => {
616
+ if (dashboardProcess && !dashboardProcess.killed) {
617
+ dashboardProcess.kill('SIGTERM');
618
+ }
619
+ };
620
+ process.on('SIGINT', cleanupDashboard);
621
+ process.on('SIGTERM', cleanupDashboard);
622
+ process.on('exit', cleanupDashboard);
623
+ // Wait a moment for dashboard to start
624
+ await new Promise(resolve => setTimeout(resolve, 3000));
625
+ console.log(`Dashboard: http://localhost:${dashboardPort}`);
536
626
  }
537
627
  }
538
628
  // Silent if user didn't explicitly request dashboard
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-relay",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Real-time agent-to-agent communication system",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -87,21 +87,21 @@
87
87
  },
88
88
  "homepage": "https://github.com/AgentWorkforce/relay#readme",
89
89
  "dependencies": {
90
- "@agent-relay/bridge": "2.0.24",
91
- "@agent-relay/config": "2.0.24",
92
- "@agent-relay/continuity": "2.0.24",
93
- "@agent-relay/daemon": "2.0.24",
94
- "@agent-relay/hooks": "2.0.24",
95
- "@agent-relay/mcp": "2.0.24",
96
- "@agent-relay/protocol": "2.0.24",
97
- "@agent-relay/resiliency": "2.0.24",
98
- "@agent-relay/sdk": "2.0.24",
99
- "@agent-relay/storage": "2.0.24",
100
- "@agent-relay/telemetry": "2.0.24",
101
- "@agent-relay/trajectory": "2.0.24",
102
- "@agent-relay/user-directory": "2.0.24",
103
- "@agent-relay/utils": "2.0.24",
104
- "@agent-relay/wrapper": "2.0.24",
90
+ "@agent-relay/bridge": "2.0.25",
91
+ "@agent-relay/config": "2.0.25",
92
+ "@agent-relay/continuity": "2.0.25",
93
+ "@agent-relay/daemon": "2.0.25",
94
+ "@agent-relay/hooks": "2.0.25",
95
+ "@agent-relay/mcp": "2.0.25",
96
+ "@agent-relay/protocol": "2.0.25",
97
+ "@agent-relay/resiliency": "2.0.25",
98
+ "@agent-relay/sdk": "2.0.25",
99
+ "@agent-relay/storage": "2.0.25",
100
+ "@agent-relay/telemetry": "2.0.25",
101
+ "@agent-relay/trajectory": "2.0.25",
102
+ "@agent-relay/user-directory": "2.0.25",
103
+ "@agent-relay/utils": "2.0.25",
104
+ "@agent-relay/wrapper": "2.0.25",
105
105
  "agent-trajectories": "^0.2.3",
106
106
  "better-sqlite3": "^12.6.2",
107
107
  "chokidar": "^5.0.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/api-types",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Shared API types and Zod schemas for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/bridge",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Multi-project bridge client utilities for Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,13 +22,13 @@
22
22
  "test:watch": "vitest"
23
23
  },
24
24
  "dependencies": {
25
- "@agent-relay/protocol": "2.0.24",
26
- "@agent-relay/config": "2.0.24",
27
- "@agent-relay/utils": "2.0.24",
28
- "@agent-relay/policy": "2.0.24",
29
- "@agent-relay/user-directory": "2.0.24",
30
- "@agent-relay/wrapper": "2.0.24",
31
- "@agent-relay/mcp": "2.0.24"
25
+ "@agent-relay/protocol": "2.0.25",
26
+ "@agent-relay/config": "2.0.25",
27
+ "@agent-relay/utils": "2.0.25",
28
+ "@agent-relay/policy": "2.0.25",
29
+ "@agent-relay/user-directory": "2.0.25",
30
+ "@agent-relay/wrapper": "2.0.25",
31
+ "@agent-relay/mcp": "2.0.25"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/cli-tester",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Manual interactive testing for CLI authentication flows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/config",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Shared configuration schemas and loaders for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -83,7 +83,7 @@
83
83
  "test:watch": "vitest"
84
84
  },
85
85
  "dependencies": {
86
- "@agent-relay/protocol": "2.0.24",
86
+ "@agent-relay/protocol": "2.0.25",
87
87
  "zod": "^3.23.8",
88
88
  "zod-to-json-schema": "^3.23.1"
89
89
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/continuity",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Session continuity manager for Relay (ledgers, handoffs, resume)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/daemon",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Relay daemon server - agent coordination and message routing",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -22,17 +22,17 @@
22
22
  "test:watch": "vitest"
23
23
  },
24
24
  "dependencies": {
25
- "@agent-relay/protocol": "2.0.24",
26
- "@agent-relay/config": "2.0.24",
27
- "@agent-relay/storage": "2.0.24",
28
- "@agent-relay/bridge": "2.0.24",
29
- "@agent-relay/utils": "2.0.24",
30
- "@agent-relay/policy": "2.0.24",
31
- "@agent-relay/memory": "2.0.24",
32
- "@agent-relay/resiliency": "2.0.24",
33
- "@agent-relay/user-directory": "2.0.24",
34
- "@agent-relay/wrapper": "2.0.24",
35
- "@agent-relay/telemetry": "2.0.24",
25
+ "@agent-relay/protocol": "2.0.25",
26
+ "@agent-relay/config": "2.0.25",
27
+ "@agent-relay/storage": "2.0.25",
28
+ "@agent-relay/bridge": "2.0.25",
29
+ "@agent-relay/utils": "2.0.25",
30
+ "@agent-relay/policy": "2.0.25",
31
+ "@agent-relay/memory": "2.0.25",
32
+ "@agent-relay/resiliency": "2.0.25",
33
+ "@agent-relay/user-directory": "2.0.25",
34
+ "@agent-relay/wrapper": "2.0.25",
35
+ "@agent-relay/telemetry": "2.0.25",
36
36
  "ws": "^8.18.3",
37
37
  "better-sqlite3": "^12.6.2",
38
38
  "pg": "^8.16.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/hooks",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Hook emitter, registry, and trajectory hooks for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -37,9 +37,9 @@
37
37
  "test:watch": "vitest"
38
38
  },
39
39
  "dependencies": {
40
- "@agent-relay/protocol": "2.0.24",
41
- "@agent-relay/config": "2.0.24",
42
- "@agent-relay/trajectory": "2.0.24"
40
+ "@agent-relay/protocol": "2.0.25",
41
+ "@agent-relay/config": "2.0.25",
42
+ "@agent-relay/trajectory": "2.0.25"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/mcp",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "MCP server for Agent Relay - native messaging tools for AI agents in Claude, Cursor, and VS Code",
5
5
  "author": "Agent Workforce Inc.",
6
6
  "license": "Apache-2.0",
@@ -47,7 +47,7 @@
47
47
  "prepublishOnly": "npm run clean && npm run build && npm test"
48
48
  },
49
49
  "dependencies": {
50
- "@agent-relay/config": "2.0.24",
50
+ "@agent-relay/config": "2.0.25",
51
51
  "@modelcontextprotocol/sdk": "^1.0.0",
52
52
  "smol-toml": "^1.6.0",
53
53
  "zod": "^3.23.8"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/memory",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Semantic memory storage and retrieval system for agent-relay with multiple backend support",
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/hooks": "2.0.24"
25
+ "@agent-relay/hooks": "2.0.25"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/policy",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Agent policy management with multi-level fallback (repo, local PRPM, cloud workspace)",
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": "2.0.24"
25
+ "@agent-relay/config": "2.0.25"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/protocol",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Wire protocol types and framing for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/resiliency",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Health monitoring, logging, metrics, and crash resilience utilities for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/sdk",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Lightweight SDK for agent-to-agent communication via Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,7 +55,7 @@
55
55
  "access": "public"
56
56
  },
57
57
  "dependencies": {
58
- "@agent-relay/protocol": "2.0.24"
58
+ "@agent-relay/protocol": "2.0.25"
59
59
  },
60
60
  "engines": {
61
61
  "node": ">=18.0.0"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/spawner",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Agent spawning types and utilities for Agent Relay",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/state",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Agent state persistence for non-hook CLIs (Codex, Gemini, etc.)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/storage",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Storage adapters and interfaces for Relay message/session persistence",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -56,7 +56,7 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@agent-relay/protocol": "2.0.24"
59
+ "@agent-relay/protocol": "2.0.25"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "^22.19.3",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/telemetry",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Anonymous telemetry for Agent Relay usage analytics",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/trajectory",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
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": "2.0.24"
25
+ "@agent-relay/config": "2.0.25"
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": "2.0.24",
3
+ "version": "2.0.25",
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/resiliency": "2.0.24"
25
+ "@agent-relay/resiliency": "2.0.25"
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": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "Shared utilities for agent-relay: logging, name generation, command resolution, update checking",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-relay/wrapper",
3
- "version": "2.0.24",
3
+ "version": "2.0.25",
4
4
  "description": "CLI agent wrappers for Agent Relay - tmux, pty integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,11 +30,11 @@
30
30
  "clean": "rm -rf dist"
31
31
  },
32
32
  "dependencies": {
33
- "@agent-relay/api-types": "2.0.24",
34
- "@agent-relay/protocol": "2.0.24",
35
- "@agent-relay/config": "2.0.24",
36
- "@agent-relay/continuity": "2.0.24",
37
- "@agent-relay/resiliency": "2.0.24"
33
+ "@agent-relay/api-types": "2.0.25",
34
+ "@agent-relay/protocol": "2.0.25",
35
+ "@agent-relay/config": "2.0.25",
36
+ "@agent-relay/continuity": "2.0.25",
37
+ "@agent-relay/resiliency": "2.0.25"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "^5.9.3",