Commit dde50d1
committed
feat(contract): migrate every remote MCP tool contract to @loopover/contract
Completes #9518. All seven remote-server categories -- admin, maintainer,
review, branch, discovery, utility and agent -- now take their input and output
schemas from the contract package instead of ~120 declarations local to
src/mcp/server.ts. The remote server is the second of the three to be migrated
to completion, after the AMS miner (#9542).
A handful of inputs deliberately stay server-side, each for a stated reason:
schemas carrying a .transform() or .default() (a caller must not be able to
assert its own branch eligibility into its own score), one input shared verbatim
with a REST route, and three bounded by constants a zod-only leaf package cannot
import. Their outputs migrate either way.
Two fixes fall out of the move:
- The changed-file and validation-entry schemas behind loopover_run_local_scorer
and loopover_preflight_local_diff, and both nested schemas behind
loopover_suggest_boundary_tests, lost their .strict() in an earlier batch of
this migration. That strictness is the no-upload boundary: without it a caller
that smuggles a patch/content field gets a silently-stripped call instead of a
rejected one, and believes the upload succeeded. Restored, with regression
tests on both surfaces.
- PLAN_STEP_STATUSES said 'in_progress' where both real surfaces -- the remote
plan DAG and the miner's plan store -- say 'running'. Nothing consumed it yet,
so nothing broke, but the first consumer would have rejected every running step
the store has ever persisted. Corrected, aliased from the miner contract so
there is one vocabulary, and pinned by a test.
The REST<->MCP parity guards now read the contract rather than server-local
declarations that no longer exist. Tool descriptions are relocated verbatim.1 parent 4b266b2 commit dde50d1
19 files changed
Lines changed: 1074 additions & 526 deletions
File tree
- packages
- loopover-contract/src
- tools
- loopover-engine/src
- loopover-mcp/bin
- src
- api
- mcp
- openapi
- test/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
0 commit comments