From 21017cfa243d4da0ebc6650fcdfbe13f926561aa Mon Sep 17 00:00:00 2001 From: Proactive Runtime Bot Date: Wed, 7 Oct 2026 19:12:20 -0700 Subject: [PATCH 1/5] fix(install): print node up/down in the quick start The installer's quick start printed `agent-relay up --background` and `agent-relay down` after both moved under `node`; `up` fails with "unknown command 'up'" and `down` prints the top-level help. A test now resolves every quick-start command against the real command tree. Co-Authored-By: Claude Opus 5.5 (1M context) --- install.sh | 4 ++-- packages/cli/src/cli/bootstrap.test.ts | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3bb084480..d1fa19afe 100755 --- a/install.sh +++ b/install.sh @@ -1283,13 +1283,13 @@ print_usage() { echo -e "${BOLD}Quick Start:${NC}" echo "" echo " # Start the local broker (detached so this terminal stays free)" - echo " agent-relay up --background" + echo " agent-relay node up --background" echo "" echo " # Check status" echo " agent-relay status" echo "" echo " # Stop the broker" - echo " agent-relay down" + echo " agent-relay node down" echo "" echo -e "${BOLD}Documentation:${NC} https://github.com/AgentWorkforce/relay" echo "" diff --git a/packages/cli/src/cli/bootstrap.test.ts b/packages/cli/src/cli/bootstrap.test.ts index f07483fdb..c78690294 100644 --- a/packages/cli/src/cli/bootstrap.test.ts +++ b/packages/cli/src/cli/bootstrap.test.ts @@ -480,3 +480,23 @@ describe('telemetry context propagation', () => { } }); }); + +describe('install.sh quick start', () => { + it('prints only commands this CLI actually has', () => { + // The installer once printed `agent-relay up --background` after `up` moved + // under `node`, so a first run failed with "unknown command 'up'". + const installScript = fs.readFileSync(new URL('../../../../install.sh', import.meta.url), 'utf-8'); + const usage = installScript.match(/^print_usage\(\)\s*\{\n([\s\S]*?)^\}/m)?.[1] ?? ''; + const commands = [...usage.matchAll(/echo "\s*agent-relay ([^"]+)"/g)].map((match) => match[1]); + expect(commands.length).toBeGreaterThan(0); + const program = createProgram(); + for (const command of commands) { + let current: Command = program; + for (const word of command.split(/\s+/).filter((part) => !part.startsWith('-'))) { + const next = current.commands.find((sub) => sub.name() === word || sub.aliases().includes(word)); + expect(next, `agent-relay ${command}: no "${word}" command`).toBeDefined(); + current = next as Command; + } + } + }); +}); From 5d15cc7c87c85361128376bee8128c743efd02e3 Mon Sep 17 00:00:00 2001 From: Proactive Runtime Bot Date: Wed, 7 Oct 2026 20:10:51 -0700 Subject: [PATCH 2/5] fix(install): record the quick start fix and ignore argument tokens Add an [Unreleased - Patch] Fixed entry for the installer's node up/down commands, and let the quick start test skip and words after a leaf command so a future positional value does not fail it. Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 6 +++++- packages/cli/src/cli/bootstrap.test.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba9311050..9bee7bd25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,11 @@ All notable changes to Agent Relay will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [Unreleased - Patch] + +### Fixed + +- The installer's Quick Start now prints `agent-relay node up --background` and `agent-relay node down`, which exist, instead of the removed `agent-relay up` form that failed with "unknown command 'up'". ## [13.1.5] - 2026-10-08 diff --git a/packages/cli/src/cli/bootstrap.test.ts b/packages/cli/src/cli/bootstrap.test.ts index c78690294..39aa0146f 100644 --- a/packages/cli/src/cli/bootstrap.test.ts +++ b/packages/cli/src/cli/bootstrap.test.ts @@ -492,7 +492,9 @@ describe('install.sh quick start', () => { const program = createProgram(); for (const command of commands) { let current: Command = program; - for (const word of command.split(/\s+/).filter((part) => !part.startsWith('-'))) { + // Flags, , and anything after a leaf command are arguments, not command words. + for (const word of command.split(/\s+/).filter((part) => !part.startsWith('-') && !/^<[^>]+>$/.test(part))) { + if (current !== program && current.commands.length === 0) break; const next = current.commands.find((sub) => sub.name() === word || sub.aliases().includes(word)); expect(next, `agent-relay ${command}: no "${word}" command`).toBeDefined(); current = next as Command; From 0b211ad32dbe93887b82a8f99eb7ae9081d46adb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 8 Oct 2026 03:12:03 +0000 Subject: [PATCH 3/5] style: auto-format with Prettier --- packages/cli/src/cli/bootstrap.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/cli/bootstrap.test.ts b/packages/cli/src/cli/bootstrap.test.ts index 39aa0146f..199ddafa5 100644 --- a/packages/cli/src/cli/bootstrap.test.ts +++ b/packages/cli/src/cli/bootstrap.test.ts @@ -493,7 +493,9 @@ describe('install.sh quick start', () => { for (const command of commands) { let current: Command = program; // Flags, , and anything after a leaf command are arguments, not command words. - for (const word of command.split(/\s+/).filter((part) => !part.startsWith('-') && !/^<[^>]+>$/.test(part))) { + for (const word of command + .split(/\s+/) + .filter((part) => !part.startsWith('-') && !/^<[^>]+>$/.test(part))) { if (current !== program && current.commands.length === 0) break; const next = current.commands.find((sub) => sub.name() === word || sub.aliases().includes(word)); expect(next, `agent-relay ${command}: no "${word}" command`).toBeDefined(); From 1bbd4e95e379ebbf416d532bfa53bf7e8bd5bbd5 Mon Sep 17 00:00:00 2001 From: Proactive Runtime Bot Date: Wed, 7 Oct 2026 20:40:46 -0700 Subject: [PATCH 4/5] ci: rerun checks after the Prettier auto-format commit Co-Authored-By: Claude Opus 5.5 (1M context) From 72796441575a1d3c4da1a1b8b0bce1ae715a463c Mon Sep 17 00:00:00 2001 From: Proactive Runtime Bot Date: Wed, 7 Oct 2026 21:59:36 -0700 Subject: [PATCH 5/5] fix(install): keep top-level up/down in the quick start for pre-9.2.2 pinned installs The node command group arrived in 9.2.2, so an AGENT_RELAY_VERSION pin to an older release would be told to run commands it lacks. The quick-start test now executes print_usage for latest, 9.2.1 and later versions. Co-Authored-By: Claude Opus 5.5 (1M context) --- CHANGELOG.md | 2 +- install.sh | 14 ++++++++++++-- packages/cli/src/cli/bootstrap.test.ts | 26 ++++++++++++++++++++++---- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bee7bd25..56edf4d70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- The installer's Quick Start now prints `agent-relay node up --background` and `agent-relay node down`, which exist, instead of the removed `agent-relay up` form that failed with "unknown command 'up'". +- The installer's Quick Start now prints `agent-relay node up --background` and `agent-relay node down`, which exist, instead of the removed `agent-relay up` form that failed with "unknown command 'up'". An install pinned with `AGENT_RELAY_VERSION` to a release older than 9.2.2 still prints the top-level `up`/`down` forms that release has. ## [13.1.5] - 2026-10-08 diff --git a/install.sh b/install.sh index d1fa19afe..7227cc559 100755 --- a/install.sh +++ b/install.sh @@ -1279,17 +1279,27 @@ verify_installation() { # Print usage instructions print_usage() { + # The broker commands moved under `node` in 9.2.2. A pinned older install + # (AGENT_RELAY_VERSION) still has only the top-level `up`/`down` forms. + local node_group="node " + local major minor patch + if [[ "$VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]]; then + major=${BASH_REMATCH[1]}; minor=${BASH_REMATCH[2]}; patch=${BASH_REMATCH[3]} + if (( major < 9 || (major == 9 && (minor < 2 || (minor == 2 && patch < 2))) )); then + node_group="" + fi + fi echo "" echo -e "${BOLD}Quick Start:${NC}" echo "" echo " # Start the local broker (detached so this terminal stays free)" - echo " agent-relay node up --background" + echo " agent-relay ${node_group}up --background" echo "" echo " # Check status" echo " agent-relay status" echo "" echo " # Stop the broker" - echo " agent-relay node down" + echo " agent-relay ${node_group}down" echo "" echo -e "${BOLD}Documentation:${NC} https://github.com/AgentWorkforce/relay" echo "" diff --git a/packages/cli/src/cli/bootstrap.test.ts b/packages/cli/src/cli/bootstrap.test.ts index 199ddafa5..c27311847 100644 --- a/packages/cli/src/cli/bootstrap.test.ts +++ b/packages/cli/src/cli/bootstrap.test.ts @@ -1,3 +1,4 @@ +import { execFileSync } from 'node:child_process'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; @@ -482,13 +483,24 @@ describe('telemetry context propagation', () => { }); describe('install.sh quick start', () => { + const installScript = fs.readFileSync(new URL('../../../../install.sh', import.meta.url), 'utf-8'); + const usageFunction = installScript.match(/^print_usage\(\)\s*\{\n[\s\S]*?^\}/m)?.[0] ?? ''; + + function quickStartCommands(version: string): string[] { + // Run the real function so version-dependent command forms are what we check. + const output = execFileSync('bash', ['-c', `${usageFunction}\nprint_usage`], { + encoding: 'utf-8', + env: { ...process.env, VERSION: version, BOLD: '', NC: '' }, + }); + return [...output.matchAll(/^\s*agent-relay (.+)$/gm)].map((match) => match[1].trim()); + } + it('prints only commands this CLI actually has', () => { // The installer once printed `agent-relay up --background` after `up` moved // under `node`, so a first run failed with "unknown command 'up'". - const installScript = fs.readFileSync(new URL('../../../../install.sh', import.meta.url), 'utf-8'); - const usage = installScript.match(/^print_usage\(\)\s*\{\n([\s\S]*?)^\}/m)?.[1] ?? ''; - const commands = [...usage.matchAll(/echo "\s*agent-relay ([^"]+)"/g)].map((match) => match[1]); - expect(commands.length).toBeGreaterThan(0); + expect(usageFunction).not.toBe(''); + const commands = quickStartCommands('latest'); + expect(commands).toContain('node up --background'); const program = createProgram(); for (const command of commands) { let current: Command = program; @@ -503,4 +515,10 @@ describe('install.sh quick start', () => { } } }); + + it('keeps the top-level up/down forms for pinned installs older than 9.2.2', () => { + expect(quickStartCommands('9.2.1')).toEqual(['up --background', 'status', 'down']); + expect(quickStartCommands('9.2.2')).toEqual(['node up --background', 'status', 'node down']); + expect(quickStartCommands('13.1.5')).toEqual(['node up --background', 'status', 'node down']); + }); });