42d4ee13
feat(mcpsrv): spec_propose write tool (Phase 3)
The agent-facing half of the write plane over MCP. spec_propose uploads
whole documents and returns {proposal, url, merged}, calling the same
service.Propose the REST PUT will — one implementation of If-Match,
provenance and auto-merge behind both surfaces, never two that drift.
- Writer is an optional Backend field: nil keeps the server read-only
(the three read tools, unchanged), so a read-only deploy or a test
needs no mutable backend. Set, it registers spec_propose with neither
the read-only nor the idempotent hint — proposing twice opens two
proposals.
- The acting agent is resolved from the bearer token on the tool call by
the resolver middleware now installed on /mcp; the read tools never
needed it. The ACL stays in service/: service.Propose refuses a
non-agent, so an anonymous or owner caller is rejected there.
Eugene Blikh <bigbes@gmail.com> — 2026-07-23 05:22:18 UTC
Commit 42d4ee137ee6f4c70dd2ce4097c21606151f4a29 —
view raw patch
Parent(s):
f8a7a174
| File | Status | + | − |
|---|---|---|---|
cmd/specsrht/main.go
|
M | +6 | -1 |
mcpsrv/mcpsrv.go
|
M | +30 | |
mcpsrv/propose.go
|
A | +105 | |
mcpsrv/propose_internal_test.go
|
A | +95 |