Skip to content

Auto-prefix repo tools with repo. namespace#68

Merged
selfcontained merged 1 commit into
mainfrom
repo-tool-prefix
Mar 16, 2026
Merged

Auto-prefix repo tools with repo. namespace#68
selfcontained merged 1 commit into
mainfrom
repo-tool-prefix

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

Summary

  • Repos no longer need to manually prefix tool names with project. in .dispatch/tools.json. Just use plain names like dev_up and Dispatch automatically surfaces them as repo.dev_up.
  • Names containing dots are rejected with a clear error message to prevent repos from self-prefixing.
  • Fixes repo tool loading in worktrees by resolving the worktree root via --show-toplevel instead of --git-common-dir, so .dispatch/tools.json is read from the correct checkout.

Test plan

  • Unit tests updated and passing (test/repo-tools.test.ts)
  • Full type check passing (npm run check)
  • E2E tests passing (25/25)
  • Verified with live agent on dev server — tools surfaced as repo.dev_up, repo.dev_down, etc.

🤖 Generated with Claude Code

…refix

Repos no longer need to manually prefix tool names with "project." in
.dispatch/tools.json. Dispatch now automatically adds a "repo." prefix
when surfacing tools to agents (e.g. "dev_up" becomes "repo.dev_up").

Also fixes repo tool loading in worktrees by resolving the worktree root
via --show-toplevel instead of --git-common-dir, so .dispatch/tools.json
is read from the correct checkout.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@selfcontained
selfcontained merged commit a85ef3d into main Mar 16, 2026
1 check passed
@selfcontained
selfcontained deleted the repo-tool-prefix branch March 16, 2026 03: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