From f81ef1da4cc47b37e32b6b4fa366cf760c3dec01 Mon Sep 17 00:00:00 2001 From: A <258483684+la14-1@users.noreply.github.com> Date: Mon, 9 Mar 2026 07:10:05 -0700 Subject: [PATCH] fix(status): add -a/--agent and -c/--cloud filter flags to spawn status (#2379) `spawn status` silently ignored -a and -c flags, showing all servers regardless. This is inconsistent with `spawn list` and `spawn delete` which both support these filters. - Update `cmdStatus` to accept `agentFilter`/`cloudFilter` options and pass them to `filterHistory()` - Update `dispatchStatusCommand` to parse filter flags using the shared `parseListFilters` helper (same as list/delete) - Document filter flags in help text for `spawn status` - Bump version to 0.15.27 Fixes #2377 Agent: issue-fixer Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 --- packages/cli/src/commands/help.ts | 4 ++++ packages/cli/src/commands/status.ts | 6 ++++-- packages/cli/src/index.ts | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/commands/help.ts b/packages/cli/src/commands/help.ts index 5107a8bc..00bde016 100644 --- a/packages/cli/src/commands/help.ts +++ b/packages/cli/src/commands/help.ts @@ -26,6 +26,10 @@ function getHelpUsageSection(): string { spawn delete Delete a previously spawned server (aliases: rm, destroy, kill) spawn delete -a Filter servers by agent spawn delete -c Filter servers by cloud + spawn status Show live state of cloud servers (aliases: ps) + spawn status -a Filter status by agent (or --agent) + spawn status -c Filter status by cloud (or --cloud) + spawn status --prune Remove gone servers from history spawn last Instantly rerun the most recent spawn (alias: rerun) spawn matrix Full availability matrix (alias: m) spawn agents List all agents with descriptions diff --git a/packages/cli/src/commands/status.ts b/packages/cli/src/commands/status.ts index 612b3d54..c0c8382a 100644 --- a/packages/cli/src/commands/status.ts +++ b/packages/cli/src/commands/status.ts @@ -247,8 +247,10 @@ function renderStatusJson(results: ServerStatusResult[]): void { // ── Main command ───────────────────────────────────────────────────────────── -export async function cmdStatus(opts: { prune?: boolean; json?: boolean } = {}): Promise { - const records = filterHistory(); +export async function cmdStatus( + opts: { prune?: boolean; json?: boolean; agentFilter?: string; cloudFilter?: string } = {}, +): Promise { + const records = filterHistory(opts.agentFilter, opts.cloudFilter); const candidates = records.filter( (r) => r.connection && !r.connection.deleted && r.connection.cloud && r.connection.cloud !== "local", diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index d3c26bac..5f1c03bb 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -586,9 +586,12 @@ async function dispatchStatusCommand(filteredArgs: string[]): Promise { const args = filteredArgs.slice(1); const prune = args.includes("--prune"); const json = args.includes("--json"); + const { agentFilter, cloudFilter } = parseListFilters(args); await cmdStatus({ prune, json, + agentFilter, + cloudFilter, }); }