You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(team-mcp): use fixed server name to stay within 64-char tool limit (ELECTRON-1JY) (#336)
## Summary
- Anthropic caps tool names at 64 chars (wire form
`mcp__<server>__<tool>`); embedding a 36-char UUID v7 `team_id` into the
team MCP server name pushed `team_describe_assistant` to 78 chars and
triggered `invalid_request_error: 工具名称过长` (Sentry ELECTRON-1JY).
- Hoist the server name to a fixed `TEAM_MCP_SERVER_NAME =
"aionui-team"` constant in `aionui-api-types` (foundation layer
reachable from both `aionui-team` and `aionui-ai-agent`); team routing
was always done via per-team TCP port + auth token, so the team_id was
redundant in the name.
- Tighten the auto-approve prefix in `permission_router` from
`mcp__aionui-team-` to `mcp__aionui-team__` (precise double-underscore —
the old single-dash form happened to also catch
`mcp__aionui-team-guide__`, which is now matched by its own dedicated
entry).
- Pin the limit with a unit test that asserts the longest current tool
name (`team_describe_assistant`) plus `mcp__aionui-team__` stays ≤ 64
chars, so any future tool addition that would re-break the limit fails
locally.
## Test plan
- [x] `cargo fmt --all -- --check`
- [x] `cargo clippy -p aionui-api-types -p aionui-team -p
aionui-ai-agent --all-targets -- -D warnings`
- [x] `cargo test -p aionui-api-types -p aionui-team -p aionui-ai-agent`
- [x] `just push` full-workspace nextest gate (5657 tests passed)
- [x] `just build` release binary built and reinstalled to
`~/.cargo/bin/aioncore`; running AionUi Dev resolves to the new binary
via system PATH
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: zhuqingyu <zhuqingyu@bituniverse.org>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments