fix: show runtime/platform in spawn version, clarify compact list legend (#456)

- `spawn version` now shows runtime (bun/node), version, platform,
  and architecture for easier bug reporting and diagnostics
- Compact list legend changed from confusing "N/N" to descriptive
  "green = all clouds  yellow = some missing"
- Bump CLI to v0.2.38

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
A 2026-02-11 06:55:24 -08:00 committed by GitHub
parent b4580b4f8f
commit 1316f9f609
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@openrouter/spawn",
"version": "0.2.37",
"version": "0.2.38",
"type": "module",
"bin": {
"spawn": "cli.js"

View file

@ -368,9 +368,12 @@ describe("dispatchCommand routing", () => {
describe("showVersion output format", () => {
// Replica of the showVersion output structure
function formatVersionOutput(version: string, binaryPath: string | undefined): string[] {
const runtime = process.versions.bun ? "bun" : "node";
const runtimeVersion = process.versions.bun ?? process.versions.node;
return [
`spawn v${version}`,
` ${binaryPath ?? "unknown path"}`,
` ${runtime} ${runtimeVersion} ${process.platform} ${process.arch}`,
` Run spawn update to check for updates.`,
];
}
@ -390,9 +393,15 @@ describe("showVersion output format", () => {
expect(lines[1]).toContain("unknown path");
});
it("should include runtime and platform info", () => {
const lines = formatVersionOutput("0.2.15", "/usr/local/bin/spawn");
expect(lines[2]).toContain(process.platform);
expect(lines[2]).toContain(process.arch);
});
it("should suggest spawn update", () => {
const lines = formatVersionOutput("0.2.15", "/usr/local/bin/spawn");
expect(lines[2]).toContain("spawn update");
expect(lines[3]).toContain("spawn update");
});
});

View file

@ -647,7 +647,7 @@ export async function cmdList(): Promise<void> {
const total = agents.length * clouds.length;
console.log();
if (isCompact) {
console.log(`${pc.green("N/N")} all clouds ${pc.yellow("N/N")} some missing`);
console.log(`Color: ${pc.green("green")} = all clouds ${pc.yellow("yellow")} = some missing`);
} else {
console.log(`${pc.green("+")} implemented ${pc.dim("-")} not yet available`);
}

View file

@ -250,6 +250,7 @@ async function handleNoCommand(prompt: string | undefined): Promise<void> {
function showVersion(): void {
console.log(`spawn v${VERSION}`);
console.log(pc.dim(` ${process.argv[1] ?? "unknown path"}`));
console.log(pc.dim(` ${process.versions.bun ? "bun" : "node"} ${process.versions.bun ?? process.versions.node} ${process.platform} ${process.arch}`));
console.log(pc.dim(` Run ${pc.cyan("spawn update")} to check for updates.`));
}