feat(cli): update notifier (v2.1.0 minor)#89
Merged
Conversation
…thin wrapper Required for focus_update + focus_upgrade MCP tools (thin wrapper depends on executeUpgrade exported from @focus-mcp/core 1.2.0).
…vailable - New `src/commands/check-updates.ts`: shouldSkipUpdateCheck, formatUpdateWarning, runUpdateCheck (fire-and-forget), checkUpdatesCommand (MCP tool) - `src/bin/focus.ts`: import runUpdateCheck, call before dispatch, add --no-update-check global flag and FOCUS_NO_UPDATE_NOTIFY env var doc - `src/commands/start.ts`: focus_check_updates MCP tool + runUpdateCheck on server start - Skip conditions: TTY off, FOCUS_NO_UPDATE_NOTIFY=1, --no-update-check, update/upgrade cmds - Bump @focus-mcp/core devDep to ^1.4.0 (requires feat/update-checker PR) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…or update-checker - Merge origin/develop (2.0.0) into feat/update-notifier - Resolve conflicts: CHANGELOG.md, package.json, src/bin/focus.ts, src/commands/start.ts - Keep version 2.0.0 from develop, core dep ^1.4.0 from update-notifier branch - Add src/commands/check-updates-io.ts: makeNodeIO() Node.js adapter for UpdateCheckIO - Inject io: makeNodeIO() in all checkForUpdates() calls (core 1.4.0 API requires io) - Add src/commands/check-updates-io.test.ts: 21 tests, 100% coverage, no v8 ignore - Update start.test.ts: expect 20 meta tools (add focus_check_updates) - Update check-updates.test.ts: mock check-updates-io.ts makeNodeIO - Use core 1.4.0-dev tag until stable release Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/commands/check-updates.ts— new module with:shouldSkipUpdateCheck()— skip logic (TTY, env var, flag, update commands)formatUpdateWarning()— formats the⚠ Update availablemessagerunUpdateCheck()— fire-and-forget, called before each CLI commandcheckUpdatesCommand()— pure output for thefocus_check_updatesMCP toolsrc/bin/focus.ts— callsrunUpdateCheck()before command dispatch, adds--no-update-checkglobal flagsrc/commands/start.ts— addsfocus_check_updatesMCP tool +runUpdateCheck()on server start@focus-mcp/coredevDep to^1.4.0(depends on feat(core): add update-checker module (v1.4.0 minor) core#58)Skip conditions
FOCUS_NO_UPDATE_NOTIFY=1env var--no-update-checkCLI flagupdate,upgrade, orself-update(avoids recursion)MCP tool
focus_check_updates { include_cli?, include_bricks? }— agents can call this explicitly.Test plan
check-updates.ts@focus-mcp/core ^1.4.0missing exports (will resolve when core PR merges)Dependencies
Requires focus-mcp/core#58 (feat/update-checker) to be released as core 1.4.0 before merging.
Release order:
focus-mcp/core#58→ core1.4.02.1.0🤖 Generated with Claude Code