feat(plugin): flat tool draft with namespace

Effect draft.add accepts flat tool objects matching Promise ergonomics.
Migrate the tool grouping concept fully to namespace: rename MCP's group
helper/registration to namespace and thread namespace through the flat
Effect and Promise draft declarations.
This commit is contained in:
Aiden Cline 2026-07-12 15:30:27 -05:00
commit 6714f74433
13 changed files with 157 additions and 88 deletions

View file

@ -312,12 +312,13 @@ export default Plugin.define({
})
```
Unsupported characters in tool and group names are normalized to underscores.
Unsupported characters in tool and namespace names are normalized to underscores.
The resulting exposed key must begin with a letter and contain at most 64
letters, digits, underscores, or hyphens. Set `options` on the declaration to
configure registration with `{ group, codemode }`:
letters, digits, underscores, or hyphens. Set registration fields on the
declaration or options with `{ namespace, codemode }`:
- `group` prefixes and groups the exposed tool name.
- `namespace` prefixes the exposed tool name (and becomes the CodeMode path
segment).
- `codemode` defaults to `true` and makes the tool available through the
`execute` CodeMode tool. Set `codemode: false` to expose it directly to the
provider.