Rename the internal tool registry to capability registry
This commit is contained in:
1 parent
f8b2b2ecde
commit
bc9256a9d9
41 files changed
+470
-452
No files matched your search
@@ -157,7 +157,7 @@ bun run build:binary
|
||||
|
||||
## CLI
|
||||
|
||||
Use the CLI from skills, shell scripts, or agents. Domain commands such as `seal-use approval-runs ...`, `seal-use rules ...`, and `seal-use documents ...` wrap the shared tool registry, so the CLI, the HTTP adapter, and the MCP server all end up running the same tool handler with the same validation.
|
||||
Use the CLI from skills, shell scripts, or agents. Domain commands such as `seal-use approval-runs ...`, `seal-use rules ...`, and `seal-use documents ...` wrap the shared capability registry, so the CLI, the HTTP adapter, and the MCP server all end up running the same capability handler with the same validation.
|
||||
|
||||
```bash
|
||||
seal-use version
|
||||
@@ -255,6 +255,18 @@ The service is intentionally local: `service start` runs the same HTTP adapter a
|
||||
|
||||
Most users do not need MCP. The public/shared path is the global `seal-use` CLI plus the optional local service.
|
||||
|
||||
### One registry, three doors
|
||||
|
||||
All approval/logic lives once in the capability registry under `src/domains/seal/capabilities/` (`src/domains/seal/capabilities.ts` re-exports it). Three surfaces enter the same handlers, each with its own naming:
|
||||
|
||||
| Surface | Entry | Naming |
|
||||
| --- | --- | --- |
|
||||
| CLI (primary) | `seal-use <area> <verb>` via `runCapability` | Kebab verbs: `seal-use context`, `seal-use rules get` |
|
||||
| Local HTTP adapter | `POST /api/tool/:name` via `findSealCapability` | Registry IDs: `seal_approval_context_get` |
|
||||
| Local MCP server | `seal_cli` / `seal_cli_write` gateways that execute a CLI command string | Gateway names only — the registry IDs are the allow-list, never advertised as tools |
|
||||
|
||||
`seal_*` strings are internal registry identifiers: they are valid as HTTP tool IDs and dispatch IDs, and they are **not** MCP tool names — no MCP client will ever see them in `tools/list`. If you are reading code and a `seal_*` name looks like it should be an MCP tool, that instinct is the trap this note exists to prevent; check `src/server.ts` for the actual (two-gateway) MCP surface.
|
||||
|
||||
The MCP server exposes two tools — and only when `SEAL_USE_MCP_ENABLED=true`, which is what the `seal-use mcp-config` snippet carries; without that flag `tools/list` answers with an empty list:
|
||||
|
||||
- `seal_cli` runs read-only commands and refuses anything that mutates tenant state, self-updates, or starts a server.
|
||||
|
||||
Reference in new issue
Block a user