MCP plan §11 + lane M8: read-only mode (--read-only: five tools, ≤1 800 bytes, never writes inside a root; full mode unchanged)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
1 parent
03c566a08b
commit
e992cca577
2 files changed
+90
No files matched your search
@@ -568,3 +568,66 @@ Agents guide's table.
|
||||
- The M4 attack suite green unchanged; `check` on the fixtures identical to
|
||||
the old `diagnostics` line set; `hierarchy` on opentitan's `top_earlgrey`
|
||||
identical instance set to the old tool.
|
||||
|
||||
## 11. Read-only mode (0.59 — the owner's request of 2026-09-29)
|
||||
|
||||
One binary, two modes. `lucisv-mcp --read-only` offers only the five read
|
||||
tools and shorter instructions; without the flag nothing changes (the nine
|
||||
tools of §10). The two co-exist: a host may configure both side by side
|
||||
under two names, and the extension chooses by a setting.
|
||||
|
||||
### 11.1 The server
|
||||
|
||||
- **Flag** `--read-only` (no value). Usage line:
|
||||
`usage: lucisv-mcp [--root DIR]... [--filelist FILE] [--index-cache DIR] [--read-only] [--verbose]`.
|
||||
- **`tools/list`** in read-only mode: exactly `hierarchy, find, outline,
|
||||
read, check`, in that order, the same descriptions and schemas as in full
|
||||
mode except `check`, whose words "after edits" do not apply (one
|
||||
description for both modes if it reads right in both; otherwise a
|
||||
read-only wording). Model-visible bytes (compact JSON of name +
|
||||
description + inputSchema) **≤ 1 800**, pinned by test.
|
||||
- **`tools/call`** of `rename`, `port`, `edit_item` or `format` in
|
||||
read-only mode is the unknown-tool error (`-32602`), message
|
||||
`unknown tool: rename (the server runs --read-only)`. The edit handlers
|
||||
are not reachable: the mode filters the registry, it does not flag
|
||||
inside each handler.
|
||||
- **Instructions** in read-only mode, **≤ 300 bytes**, pinned by test:
|
||||
|
||||
> lucisv-mcp reads the SystemVerilog on disk (save first); it never
|
||||
> edits. Use it before reading files: hierarchy for instance trees and
|
||||
> top modules, find for a name's declarations and uses, outline for a
|
||||
> file or unit's ports, read for one item, check for diagnostics. Paths
|
||||
> root-relative, lines 1-based.
|
||||
|
||||
- **The promise:** in read-only mode no file inside a root is created,
|
||||
written, renamed or removed, whatever is called. The server's own index
|
||||
store under `--index-cache` is outside the roots and is still written
|
||||
(it is what makes the next start warm). A test walks the fixture tree's
|
||||
sizes, mtimes and names before and after calling every tool name of the
|
||||
full catalogue.
|
||||
- Resources, transport, freshness, annotations: unchanged.
|
||||
|
||||
### 11.2 The extension
|
||||
|
||||
- Setting **`lucisv.mcp.mode`**: `"full"` (default) or `"read-only"`. In
|
||||
read-only mode the definition's args gain `--read-only` and its label is
|
||||
`lucisv read-only (<folder>)`; a change of the setting fires the
|
||||
provider's change event, like `lucisv.mcp.enabled`.
|
||||
- **lucisv: Copy MCP server config** follows the setting: in read-only
|
||||
mode the snippet's args end with `--read-only`, the server key is
|
||||
`lucisv-ro`, and the message says which mode was copied. (Two keys, so a
|
||||
user can paste both.)
|
||||
- `mcp_smoke.js <binary> --read-only` smokes that mode (five tools in
|
||||
order, one `hierarchy`, and `rename` answered with the unknown-tool
|
||||
error); `tools/release.sh` runs both smokes on the host binary and on
|
||||
the embedded one.
|
||||
|
||||
### 11.3 Acceptance
|
||||
|
||||
- Full mode byte-identical on the wire to 0.58.0 (`tools/list`,
|
||||
`instructions`), except the usage line.
|
||||
- Read-only budgets met and pinned; the no-write test green; the
|
||||
extension's node tests cover the setting, the label, the args and the
|
||||
snippet.
|
||||
- Census round 5 (lead): tasks a and d on the read-only mode, against
|
||||
round 4's full-mode figures.
|
||||
Reference in new issue
Block a user