Skip to content

feat: 2.0.0 — namespace bricks:, MCP tools convention, self-update (breaking)#85

Merged
samuelds merged 6 commits into
developfrom
feat/2.0.0-namespace-and-self-update
Apr 29, 2026
Merged

feat: 2.0.0 — namespace bricks:, MCP tools convention, self-update (breaking)#85
samuelds merged 6 commits into
developfrom
feat/2.0.0-namespace-and-self-update

Conversation

@samuelds
Copy link
Copy Markdown
Contributor

Summary

This PR introduces breaking changes for the 2.0.0 release of @focus-mcp/cli.

Breaking changes

MCP tools renamed to focus_<namespace>_<action> pattern:

  • focus_installfocus_bricks_install
  • focus_removefocus_bricks_remove
  • focus_searchfocus_bricks_search
  • focus_loadfocus_bricks_load
  • focus_unloadfocus_bricks_unload
  • focus_reloadfocus_bricks_reload
  • focus_updatefocus_bricks_update
  • focus_upgrade → removed from MCP (use focus_bricks_update)
  • focus_tools (singleton with action arg) → split into 6: focus_tools_hide, focus_tools_show, focus_tools_pin, focus_tools_unpin, focus_tools_list, focus_tools_clear
  • New: focus_self_update — returns the shell command to self-update the CLI

CLI focus update / focus upgrade now self-update the CLI:

  • focus update → prints the npm/pnpm/yarn command to update @focus-mcp/cli
  • focus update --all → also updates all installed bricks
  • focus update <brick> → ERROR with guidance to use focus bricks:update <name>

New bricks: namespace for brick management:

  • focus bricks:install, bricks:remove, bricks:list, bricks:search, bricks:update, bricks:load, bricks:unload
  • Flat aliases (add, remove, list, search) remain permanent back-compat

CI fix (also included): .changeset/config.json snapshot config updated to use useCalculatedVersion + commit-based template to fix dev-publish version tags.

Files changed

  • src/commands/cli-updater.ts — new module: detects npm/pnpm/yarn, returns self-update command
  • src/commands/cli-updater.test.ts — 100% coverage of cli-updater
  • src/bin/focus.ts — new bricks: namespace + refactored update/upgrade commands
  • src/commands/start.ts — all MCP meta tools renamed, focus_tools split into 6
  • src/commands/start.test.ts — updated for all renames (263 tests pass)
  • .changeset/2.0.0-namespace-self-update.md — major changeset entry
  • .changeset/config.json — snapshot config fix
  • CHANGELOG.md — 2.0.0 breaking changes section

Test plan

  • pnpm typecheck — passes (verified locally)
  • pnpm test — 263 tests pass, 17 test files (verified locally)
  • pnpm lint — passes (verified locally)
  • Review MCP tool names in CHANGELOG migration guide
  • Manual test: focus update (should print self-update command)
  • Manual test: focus bricks:update echo (should update brick)
  • Manual test: focus update echo (should print error with guidance)

🤖 Generated with Claude Code

claude and others added 6 commits April 29, 2026 11:28
Pure function that detects npm/pnpm/yarn from npm_execpath env var
and returns the appropriate global install command for @focus-mcp/cli.
No I/O: caller is responsible for execution (MCP paradox).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without this, dev-publish generates tags like '0.0.0-dev-<timestamp>'
instead of '<next-version>-dev-<commit>'. Setting useCalculatedVersion
and a commit-based template fixes the preview version format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…breaking)

- focus update / upgrade now self-update the CLI (breaking: no longer updates bricks)
  - Without args: print the npm/pnpm/yarn command to run for self-update
  - With --all: also update all installed bricks via bricks:update --all
  - With <brick> arg: ERROR with guidance to use bricks:update <name>
- Add bricks: namespace: bricks:install, bricks:remove, bricks:list,
  bricks:search, bricks:update, bricks:load, bricks:unload
- Flat aliases (install, remove, list, search) remain as back-compat

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…breaking)

Renames:
- focus_list      → focus_bricks_list
- focus_load      → focus_bricks_load
- focus_unload    → focus_bricks_unload
- focus_reload    → focus_bricks_reload
- focus_search    → focus_bricks_search
- focus_install   → focus_bricks_install
- focus_remove    → focus_bricks_remove
- focus_update    → focus_bricks_update (focus_upgrade removed from MCP)
- focus_tools     → split into 6: focus_tools_hide/show/pin/unpin/list/clear
- (new)           → focus_self_update (returns command to run for CLI update)

focus_catalog_add/remove/list kept as-is (already namespaced).
focus_tools_* are immune to the hidden filter (always visible).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update start.test.ts: all focus_* tool names updated to focus_bricks_*
- Replace focus_tools singleton tests with 6 distinct focus_tools_* tests
- Update bench mode tests to use new tool names
- Update isHiddenTool tests: focus_tools_* are now immune (not focus_tools)
- Update ListTools count from 14 to 19 (8 bricks + 3 catalog + 1 self + 6 tools)
- Add cli-updater.test.ts: 100% coverage of detectPackageManager / buildUpdateCommand / cliUpdater

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@samuelds samuelds merged commit 75e617b into develop Apr 29, 2026
10 checks passed
@samuelds samuelds deleted the feat/2.0.0-namespace-and-self-update branch April 30, 2026 07:45
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