Skip to content

feat(start): rename filter→config, add pin/alwaysLoad support#80

Closed
samuelds wants to merge 3 commits into
developfrom
feat/start-tool-filter
Closed

feat(start): rename filter→config, add pin/alwaysLoad support#80
samuelds wants to merge 3 commits into
developfrom
feat/start-tool-filter

Conversation

@samuelds
Copy link
Copy Markdown
Contributor

Summary

Follow-up to #79 — renames the tool visibility surface from filter to config and adds alwaysLoad (--pin) support.

  • focus_filter MCP tool renamed to focus_config with tools.* action namespace
  • focus filter CLI subcommand renamed to focus config tools
  • Add --pin=<patterns> flag to focus start for per-launch alwaysLoad marking
  • Add tools.alwaysLoad support in ~/.focus/config.json (persistent alwaysLoad list)
  • 5 essential meta tools carry _meta.anthropic/alwaysLoad: true by default: focus_list, focus_load, focus_search, focus_install, focus_config
  • Remove dead filter.ts (replaced by config.ts from previous commit)

API surface

# CLI
focus config tools hide sym_get
focus config tools pin focus_list
focus config tools list

# Start flags
focus start --hide="sym_get" --pin="focus_list,focus_search"
# MCP tool
focus_config action=tools.hide   pattern=sym_get
focus_config action=tools.pin    pattern=focus_list
focus_config action=tools.list

Test plan

  • 242 tests pass
  • TypeScript strict, Biome clean
  • isHiddenTool: focus_config always visible (immune)
  • --hide=focus_*: focus_config stays visible
  • --pin=focus_list: _meta.anthropic/alwaysLoad: true injected
  • config file tools.alwaysLoad applied when no CLI args

🤖 Generated with Claude Code

claude and others added 3 commits April 28, 2026 23:38
- Replace `focus filter` with `focus config tools hide/show/pin/unpin/list/clear`
- New config.ts with full tools.hidden + tools.alwaysLoad management
- Add --pin=<patterns> arg to `focus start` for per-launch alwaysLoad
- MCP: rename focus_filter → focus_config with tools.* action namespace
- README updated to reflect new command surface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- isHiddenTool now checks `focus_config` (not `focus_tools`) for immunity
- Dispatcher handles `focus_config` (not `focus_tools`) tool calls
- Remove src/commands/filter.ts (superseded by config.ts)
- Update changeset to reflect final feature scope
- Remove dead `runTools` function from focus.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All references to the MCP tool and immunity check now consistently use
focus_config — source, tests, and docs aligned.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@samuelds samuelds force-pushed the feat/start-tool-filter branch from 9d339c1 to 20b129a Compare April 28, 2026 21:38
@samuelds
Copy link
Copy Markdown
Contributor Author

Superseded by #81 which was merged. PR #81 uses Symfony : separator (tools:hide) with permanent flat aliases (filter hide), aligned with the final design decided in coordination with the user. This PR's focus config tools hide (space-subcommand) and focus_config MCP tool naming were superseded.

@samuelds samuelds closed this Apr 28, 2026
@samuelds samuelds deleted the feat/start-tool-filter 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