Skip to content

fix: show version update notice on all commands#79

Merged
christso merged 4 commits intomainfrom
fix/update-check-all-commands
Feb 5, 2026
Merged

fix: show version update notice on all commands#79
christso merged 4 commits intomainfrom
fix/update-check-all-commands

Conversation

@christso
Copy link
Copy Markdown
Contributor

@christso christso commented Feb 5, 2026

Summary

  • Replace in-process npm fetch in backgroundUpdateCheck() with a detached child process that survives process.exit()
  • Add update notice display to CLI entry point (index.ts) for all subcommand invocations via process.on('exit') handler
  • Wizard retains its own update notice path to avoid duplicate output

Test plan

  • Existing unit tests pass (bun test)
  • TypeScript typecheck passes
  • Run allagents workspace status with a stale/missing cache and verify the background child populates ~/.allagents/version-check.json
  • Run again with a cached version newer than installed and verify the update notice prints to stderr after command output

🤖 Generated with Claude Code

The background version check previously only ran in the interactive TUI
wizard. Commands like `allagents workspace sync` would never show an
update notice. Replace the in-process npm fetch with a detached child
process that survives process.exit(), and register a process exit handler
in the CLI entry point so the notice appears after any subcommand output.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 5, 2026

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

Latest commit: bf9b1a7
Status: ✅  Deploy successful!
Preview URL: https://a53793ca.allagents.pages.dev
Branch Preview URL: https://fix-update-check-all-command.allagents.pages.dev

View logs

christso and others added 3 commits February 5, 2026 01:03
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Register process.on('exit') handler synchronously to prevent race where
process.exit() fires before the cache file read resolves. Add
--input-type=commonjs flag to child process spawn for forward
compatibility with ESM-only Node runtimes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Node defaults to CJS for -e scripts. The flag was a preemptive
workaround for a hypothetical future change that would break
half the ecosystem anyway.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@christso christso merged commit 0a06f4c into main Feb 5, 2026
@christso christso deleted the fix/update-check-all-commands branch February 5, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant