Commit graph

106 commits

Author SHA1 Message Date
A
e07d9ef5cd
fix: auto-correct swapped agent/cloud args and improve help text (#300)
- Auto-correct swapped arguments (e.g., `spawn sprite claude` now runs
  as `spawn claude sprite`) instead of just warning and exiting
- Document `ls` alias for `list` in help text
- Add SPAWN_NO_UPDATE_CHECK env var to troubleshooting section
- Bump version to 0.2.21

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:14:50 -08:00
A
f4f02825a3
test: add coverage for compact list view rendering in cmdList (#298)
Tests the compact list view triggered when the matrix grid is wider
than the terminal. Covers view switching logic, count formatting,
missing clouds column, "all clouds" display, and edge cases.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:14:14 -08:00
A
d70c7a8055
fix: remove cli.js build artifact from repo and add to .gitignore (#297)
cli/cli.js is a bun build output that should never have been committed.
Remove it from tracking and add it to .gitignore.

Fixes #296

Agent: team-lead

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:10:42 -08:00
A
af1c366dd5
test: add coverage for showInfoOrError routing in index.ts (#295)
Adds 25 tests for the previously untested showInfoOrError function which
handles single-argument CLI routing (agent info, cloud info, unknown
command with fuzzy suggestions). Tests cover valid agents, valid clouds,
unknown names, fuzzy match suggestions, help flag routing, and edge cases.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 15:32:06 -08:00
A
e1c2df3b1b
fix: Use compact list view when matrix is too wide for terminal (#294)
The `spawn list` grid was 888 characters wide with 30 clouds, making it
completely unreadable in standard terminals (80-120 columns). Now detects
terminal width and automatically switches to a compact view showing each
agent with its cloud count and any missing clouds.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 15:30:48 -08:00
A
2b1944ee1c
fix: Show cloud type and agent notes in info commands (#255)
cmdAgentInfo now displays the cloud type (api, cli, sandbox, etc.) next
to each cloud provider, helping users understand what kind of
infrastructure they're choosing. Also shows agent notes when present.

cmdCloudInfo now shows the cloud type beneath the description for
quick reference.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 15:11:06 -08:00
A
2b9005f0a5
test: Add 420 bash -n syntax validation tests for all shell scripts (#254)
Runs `bash -n` on every shell script in the repo:
- shared/common.sh (core library)
- All 21 cloud lib/common.sh files
- All 264+ implemented agent scripts

This is the automated equivalent of the CLAUDE.md rule:
"Run bash -n on every changed .sh file before committing."

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 15:10:43 -08:00
A
29b6a0e7b9
refactor: simplify CLI command dispatch with lookup tables (#253)
Extract duplicated agent/cloud lookup logic into showInfoOrError() and
replace repetitive switch cases with dispatch tables, reducing main()
from 85 to 65 lines and handleDefaultCommand() from 52 to 16 lines.

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 15:10:04 -08:00
A
281ea2a74f
test: Add 43 tests for display command output (cmdAgentInfo, cmdList, cmdAgents, cmdClouds, cmdHelp, cmdUpdate) (#251)
Cover previously untested happy paths for user-facing display commands:
- cmdAgentInfo: agent details, available clouds, no-clouds fallback, many clouds
- cmdList: matrix table rendering, implemented counts, edge cases
- cmdAgents: agent listing with cloud counts, singular/plural, descriptions
- cmdClouds: cloud listing with agent counts, singular/plural, descriptions
- cmdHelp: all sections (USAGE, EXAMPLES, AUTHENTICATION, TROUBLESHOOTING, INSTALL)
- cmdUpdate: version match, fetch failure, non-ok response

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 14:12:31 -08:00
A
16cabed6d8
feat: detect unknown flags and show actionable error (#250)
Previously, unknown flags like --json or --verbose were silently ignored
or misinterpreted as positional arguments (agent/cloud names), leading to
confusing error messages. Now the CLI detects unrecognized flags and shows
a clear error listing the supported flags.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 14:12:20 -08:00
A
8ea28e1d07
test: Add 28 tests for index.ts main() routing (zero prior coverage) (#230)
Tests the actual CLI entry point through subprocess execution:
- help/version command routing (help, --help, -h, version, --version, -v, -V)
- Subcommand --help routing (list --help, agents --help, clouds --help, etc.)
- ls alias routing
- Non-TTY mode behavior (shows help when no args)
- handleError formatting for invalid identifiers
- extractFlagValue in actual CLI (--prompt/--prompt-file missing values)
- --prompt and --prompt-file mutual exclusion
- --prompt-file with nonexistent file
- Prompt-only-without-cloud error messaging

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 12:49:50 -08:00
A
06091864af
fix: Show unified agent+cloud suggestions for unknown single-arg commands (#229)
Previously, `spawn hetzne` (typo of cloud name "hetzner") would show
"Unknown agent: hetzne" with no useful suggestion, because it only
searched agent names for typo matches. Now when a single argument
matches neither an agent nor a cloud, the error searches both pools
and shows "Did you mean hetzner (cloud)?" — guiding the user to the
right command.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 12:49:44 -08:00
A
1f3bc21d3d
test: Add 24 tests for cmdCloudInfo (zero prior coverage) (#227)
- Test happy paths: cloud name/description, available agents, launch hints
- Test cloud notes display and no-agents fallback message
- Test error paths: unknown cloud, typo suggestions, invalid identifiers
- Test security: path traversal, shell metacharacters, length limits
- Fix manifest.json: mark railway/gptme as implemented (script exists)

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 12:36:05 -08:00
A
35b322b320
test: Add cmdCloudInfo test coverage (23 tests) (#223)
cmdCloudInfo was the only major command function with zero test coverage.
Tests cover happy paths, cloud notes display, empty agents state, error
paths (invalid identifiers, unknown clouds), and typo suggestions.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 12:33:51 -08:00
A
eeecdedef2
fix: Bundle dependencies in CLI build for proot-distro compatibility (#216)
The bun build command was failing on proot-distro ubuntu because it couldn't
resolve node_modules dependencies. Added --packages bundle flag to explicitly
bundle all dependencies into the output file.

Fixes #209

Agent: issue-responder

Co-authored-by: B <6723574+louisgv@users.noreply.github.com>
2026-02-10 12:22:58 -08:00
A
e58a4b2898
test: Add manifest integrity tests (26 tests) (#194)
Validates that manifest.json is internally consistent and that every
"implemented" matrix entry has a corresponding script file. Catches
configuration drift between manifest.json and the actual file tree.

Tests cover:
- Manifest structure (agents, clouds, matrix top-level keys)
- Agent/cloud definition required fields and naming conventions
- Matrix consistency (valid statuses, complete coverage, no duplicates)
- Script file existence for all implemented entries
- Cloud lib/common.sh existence for clouds with implementations
- Script content basics (shebang, set -eo pipefail, sourcing lib)
- Orphaned script detection (files exist but marked "missing")

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 08:54:52 -08:00
A
d1ecbaf88c
feat: Add cloud info command (spawn <cloud>) for cloud-first discovery (#192)
Users who know their preferred cloud but not which agents are available
had no way to find out. Now `spawn hetzner` shows all agents available
on Hetzner, mirroring how `spawn claude` shows all clouds for Claude.

- Add cmdCloudInfo() showing cloud details + available agents
- handleDefaultCommand detects cloud names and routes to cloud info
- Update help text and clouds list footer to document the new command
- Bump CLI version to 0.2.15

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 08:54:24 -08:00
B
1029320cff refactor: Rename improve to discovery and remove improve CLI command
Rename the GitHub workflow, scripts, and service from "improve" to
"discovery" to better reflect what the automation does. Remove the
`spawn improve` CLI command entirely — the discovery/refactor loops
are internal automation, not user-facing CLI features.

File renames:
- .github/workflows/improve.yml → discovery.yml
- .claude/skills/.../improve.sh → discovery.sh
- .claude/skills/.../start-improve.sh → start-discovery.sh
- Service: improve-trigger → discovery-trigger

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 16:13:56 +00:00
A
86dfbacab0
fix: Detect swapped agent/cloud arguments and fix count pluralization (#178)
When users type "spawn sprite claude" instead of "spawn claude sprite",
the CLI now detects the swap and suggests the correct order instead of
showing a confusing "Unknown agent" error. Also fixes grammar in
"spawn agents" and "spawn clouds" output (1 cloud vs 1 clouds).

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:42:25 -08:00
A
836fd0db97
test: Add 52 tests for resolvePrompt pipeline and handleDefaultCommand routing (#176)
Cover the full prompt resolution pipeline from index.ts including:
- Sequential --prompt/--prompt-file extraction
- Mutual exclusion error handling
- File read error paths
- handleDefaultCommand HELP_FLAGS routing
- Subcommand --help flag detection edge cases

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 07:39:14 -08:00
A
4133813879
fix: Add typo suggestions and --help flag handling for better CLI UX (#168)
- Add "Did you mean?" suggestions when agent/cloud names have typos
  (using Levenshtein distance, max 3 edits)
- Handle "spawn <agent> --help" to show agent info instead of failing
  with "invalid characters" error on the --help flag
- Handle "--help" after subcommands (spawn list --help, spawn agents --help)
  to show general help instead of silently ignoring the flag
- Bump CLI version to 0.2.13
- Add 15 tests for levenshtein and findClosestMatch functions

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:17:11 -08:00
A
7af2dd7336
test: Add 46 tests for version comparison logic in update-check.ts (#167)
The compareVersions function decides whether auto-update runs, but had
no direct test coverage. Tests cover: basic comparisons, precedence
ordering (major > minor > patch), missing/extra segments, zero and
boundary versions, non-numeric input handling, parseSemver helper,
realistic spawn version scenarios, and full checkForUpdates integration
with edge-case version strings.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 07:17:04 -08:00
Sprite
18b5aa4a32 fix: Remove curl|bash script validation that blocks spawn scripts
The spawn scripts themselves use curl|bash to install agents (e.g.
Claude Code). The validateScriptContent check was blocking our own
legitimate scripts. Removed curl|bash and wget|bash from the
dangerous patterns list since the scripts are already fetched from
our trusted GitHub repo.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 09:40:16 +00:00
A
c93cb1d40c test: Fix incorrect LANG expectations in unicode-detect tests
The unicode-detect module only modifies TERM, never LANG. Two tests
incorrectly expected LANG to be set to en_US.UTF-8 - fixed to match
actual module behavior.

Agent: team-lead
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 09:39:21 +00:00
Sprite
7c43b901a6 fix: Switch build target from node to bun to fix UTF-8 mojibake
Root cause: Bun has a known bug (oven-sh/bun#25767) where --target=node
causes UTF-8 string literals to be double-encoded as Latin-1, producing
mojibake (â instead of ◆/│/✔). Switching to --target=bun avoids this
encoding path entirely.

Also removes the ineffective stdout.write monkey-patch that was
attempting to work around this issue.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 09:36:28 +00:00
A
8f0625fd89
fix: UX improvements for spawn update, --prompt validation, and update banner (#166)
- `spawn update` now performs auto-update instead of printing curl command
- `--prompt` without both agent and cloud now errors instead of being silently dropped
- Update banner box uses dynamic padding to align correctly with any version length

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 01:35:46 -08:00
A
f9117cf7b9
refactor: Extract helpers from main() and start_oauth_server() (#165)
- Extract resolvePrompt() from main() in cli/src/index.ts (98 -> 62 lines)
  Separates prompt flag parsing/file-reading from command dispatch
- Extract _validate_oauth_server_args() and _generate_oauth_html() from
  start_oauth_server() in shared/common.sh (81 -> 52 lines)
  Separates validation/HTML generation from server startup
- Bump CLI version to 0.2.11

Agent: complexity-hunter

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 01:35:42 -08:00
A
7100948136
test: Add unicode-detect tests and bump version to 0.2.11 (#164)
Add 16 tests for unicode-detect.ts which had zero coverage.
Tests verify ASCII/Unicode detection based on TERM, SSH,
and SPAWN_UNICODE/SPAWN_ASCII/SPAWN_NO_UNICODE env vars.
Also tests LANG setting and debug output behavior.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 01:34:54 -08:00
Sprite
67051bfc48 fix: Monkey-patch stdout.write to force UTF-8 Buffer encoding
Explicitly convert string chunks to Buffer.from(chunk, 'utf8') before
writing to process.stdout. This fixes UTF-8 mojibake (â instead of ◆/│)
seen in some Bun + terminal combinations (e.g. Ghostty on macOS) where
process.stdout.write(string) doesn't encode as UTF-8 by default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 09:25:58 +00:00
Sprite
553626e902 feat: Force UTF-8 encoding for Unicode output
Added explicit LANG=en_US.UTF-8 and stdout.setEncoding('utf8')
when Unicode mode is enabled. This should prevent UTF-8 mojibake
(â appearing instead of ◆) in terminals like Ghostty.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 09:17:53 +00:00
Sprite
ac1a197dfe debug: Add SPAWN_DEBUG flag to diagnose Unicode detection
Adds debug logging to unicode-detect.ts to help troubleshoot why
Unicode rendering isn't working in Ghostty terminal. When SPAWN_DEBUG=1
is set, the CLI will show:

- Current TERM value (e.g., xterm-ghostty)
- SSH environment variables (SSH_CONNECTION, SSH_CLIENT, SSH_TTY)
- Whether ASCII mode is being forced

This will help identify if SSH detection is incorrectly triggering
ASCII fallback for local Ghostty sessions.

Usage: SPAWN_DEBUG=1 spawn list

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:47:43 +00:00
Sprite
4f23fae38f feat: Enable Unicode rendering by default on local terminals
Reverses the overly conservative ASCII-only approach. Now defaults to
Unicode (beautiful spinners, checkmarks, symbols) on local macOS
Terminal, iTerm2, and modern Linux terminals, while still forcing
ASCII fallback for problematic environments:

- SSH sessions (encoding mismatches)
- Dumb terminals (TERM=dumb)
- Users can override with SPAWN_UNICODE=1 or SPAWN_NO_UNICODE=1

This fixes rendering issues while maintaining compatibility across
all environments.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:41:24 +00:00
Sprite
dff70afb4b fix: Force CI mode for complete Unicode disabling in CLI
- Set both TERM=linux and CI=true in unicode-detect.ts
- CI env var provides additional Unicode disabling for @clack/prompts
- Fix test imports to use package.json instead of deleted version.ts
- Bump to 0.2.6

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:35:20 +00:00
Sprite
875e9adb6b chore: Bump version to 0.2.5 and add version bump policy
- Bumped CLI version from 0.2.4 to 0.2.5
- Added rule to CLAUDE.md: ANY change to cli/ requires a version bump
- Uses semantic versioning (patch for fixes, minor for features, major for breaking)
- Auto-update ensures users get latest version immediately

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:24:28 +00:00
Sprite
31c2454d59 fix: Replace Unicode box-drawing characters with ASCII
- Changed update banner to use +, -, | instead of Unicode box characters
- Replaced arrow (→) with ASCII arrow (->)
- Changed p.cancel() to plain console.error to avoid Unicode bullet
- Ensures clean rendering on all terminals regardless of Unicode support

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:19:30 +00:00
Sprite
935d1f5fe9 chore: Bump version to 0.2.4
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:15:11 +00:00
Sprite
598b621ad1 feat: Check for updates on every run, remove 24-hour cache
- Removed CHECK_INTERVAL and cache-based update checking
- Now fetches latest version on every spawn invocation
- 5-second timeout keeps it fast
- Simplified tests to match new behavior (8 tests instead of 12)
- Users who don't want update checks can set SPAWN_NO_UPDATE_CHECK=1

This ensures users always get the latest version immediately when available.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 07:13:42 +00:00
Sprite
3b5a8c8bcc fix: Default to ASCII mode for safer unicode rendering
- Changed unicode detection to default to ASCII mode (TERM=linux)
- Users can opt-in to unicode with SPAWN_UNICODE=1
- Auto-detects SSH sessions and forces ASCII (common rendering issues)
- Fixes bullet point display issues in interactive selectors

To enable unicode: export SPAWN_UNICODE=1
To force ASCII: export SPAWN_ASCII=1 (or SPAWN_NO_UNICODE=1)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:57:29 +00:00
Sprite
5962a00c15 chore: Bump version to 0.2.3
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:56:47 +00:00
Sprite
13b601239d chore: Bump version to 0.2.2
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:53:20 +00:00
Sprite
84d474c192 refactor: Remove version.ts duplication, import directly from package.json
- Removed src/version.ts file
- Updated src/commands.ts, src/index.ts, and src/update-check.ts to import version from package.json
- Using JSON import assertion: `import pkg from "../package.json" with { type: "json" }`
- Eliminates need to maintain version in two places

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:50:54 +00:00
Sprite
01042fab5a chore: Bump version to 0.2.1
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:49:49 +00:00
Sprite
c4d99daaab feat: Bump version to 0.2.0 and implement auto-update on run
Changes:
- Bumped version from 0.1.0 to 0.2.0
- Changed update-check mechanism to auto-install updates instead of just notifying
- checkForUpdates() now blocks and runs install.sh automatically when update is available
- Added executor wrapper for testability of execSync calls
- Updated all tests to mock executor.execSync instead of child_process.execSync
- Auto-update runs on every spawn invocation (24-hour cache prevents excessive checks)
- On update failure, shows error message but continues with original command

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:48:19 +00:00
Sprite
d223038a5e feat: Add auto-update check mechanism to spawn CLI
Implements a non-intrusive update notification system that:
- Checks for new versions once per day
- Shows a styled notification when updates are available
- Stores check results in cache to minimize network requests
- Can be disabled with SPAWN_NO_UPDATE_CHECK=1

Implementation:
- New update-check.ts module with background version checking
- Comprehensive test suite (16 tests) covering all scenarios
- Integrated into main CLI entry point
- Updated documentation in README.md

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 06:41:27 +00:00
A
30f19b7df6
refactor: Drop spawn.sh bash fallback, auto-install bun instead (#163)
The 663-line bash CLI (spawn.sh) has drifted from the TypeScript CLI,
missing --prompt, security validation, download fallback, and other
features. Rather than maintaining two implementations, the installer
now auto-installs bun (~5 seconds) when it's not present, ensuring
every user gets the full-featured TypeScript CLI.

- Remove cli/spawn.sh (663 lines)
- Simplify install.sh: remove npm method, add bun auto-install
- Extract build_and_install() helper to deduplicate build logic
- Update cli/README.md and CLAUDE.md to reflect bun-only strategy

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 22:30:48 -08:00
B
462cd367e0 chore: Switch from npm lockfile to bun lockfile
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-10 06:16:19 +00:00
A
6f7d684e69
test: Add 17 tests for cmdUpdate and script download/execution paths (#135)
Covers previously untested critical paths in commands.ts:
- cmdUpdate version checking (up-to-date, update available, fetch failures)
- downloadScriptWithFallback (primary/fallback URLs, 404, 500, network errors)
- reportDownloadFailure error messaging (404 vs server error)
- execScript script validation (shebang, dangerous patterns)
- runBash environment variables (SPAWN_PROMPT, SPAWN_MODE)

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 22:03:48 -08:00
A
d22719910c
fix: Add ASCII fallback for terminal unicode rendering (#134)
Fixes #132 - Some terminals can't render the unicode characters used by
@clack/prompts for bullets, selectors, and box drawing. This adds a
unicode detection module that runs before @clack/prompts is imported,
forcing ASCII mode when:
- SPAWN_NO_UNICODE=1 or SPAWN_ASCII=1 is set (explicit override)
- TERM is "dumb" or unset (common in basic terminals)

Also adds a troubleshooting hint in the help text.

Agent: ux-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 22:03:04 -08:00
A
dae37fded0
test: Add 31 tests for commands.ts error/validation paths (#133)
Tests the actual exported cmdRun and cmdAgentInfo functions (not inline
replicas) for their process.exit error paths: identifier validation
(injection, path traversal, length), unknown agent/cloud handling,
unimplemented combination suggestions, prompt security validation,
and empty input handling.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-09 21:45:39 -08:00
A
c1b1330ec1
test: Add 34 tests for command output functions (cmdList, cmdAgents, cmdClouds, cmdAgentInfo, cmdHelp) (#128)
Tests the actual exported command functions end-to-end using mock.module
for @clack/prompts and loadManifest(true) to force cache refresh with
mocked fetch data. Covers matrix display, agent/cloud listing, agent
info output, and help text content verification.

Agent: test-engineer

Co-authored-by: A <6723574+louisgv@users.noreply.github.com>
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-09 20:22:12 -08:00