@martinloop/mcp 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -105
- package/dist/resources.js +148 -148
- package/dist/server.js +0 -0
- package/dist/tools/preflight.d.ts +0 -2
- package/dist/tools/preflight.js +2 -42
- package/dist/vendor/adapters/openai-compatible.js +6 -6
- package/dist/vendor/contracts/index.d.ts +0 -2
- package/dist/vendor/contracts/index.js +0 -2
- package/dist/vendor/core/index.d.ts +0 -2
- package/dist/vendor/core/index.js +0 -2
- package/package.json +86 -83
- package/server.json +21 -21
- package/LICENSE +0 -216
- package/dist/vendor/adapters/adapters/src/claude-cli.d.ts +0 -146
- package/dist/vendor/adapters/adapters/src/claude-cli.js +0 -1100
- package/dist/vendor/adapters/adapters/src/cli-bridge.d.ts +0 -103
- package/dist/vendor/adapters/adapters/src/cli-bridge.js +0 -569
- package/dist/vendor/adapters/adapters/src/codex-launcher.d.ts +0 -78
- package/dist/vendor/adapters/adapters/src/codex-launcher.js +0 -663
- package/dist/vendor/adapters/adapters/src/direct-provider.d.ts +0 -10
- package/dist/vendor/adapters/adapters/src/direct-provider.js +0 -40
- package/dist/vendor/adapters/adapters/src/index.d.ts +0 -8
- package/dist/vendor/adapters/adapters/src/index.js +0 -8
- package/dist/vendor/adapters/adapters/src/openai-compatible.d.ts +0 -62
- package/dist/vendor/adapters/adapters/src/openai-compatible.js +0 -306
- package/dist/vendor/adapters/adapters/src/runtime-support.d.ts +0 -17
- package/dist/vendor/adapters/adapters/src/runtime-support.js +0 -59
- package/dist/vendor/adapters/adapters/src/stub-agent-cli.d.ts +0 -8
- package/dist/vendor/adapters/adapters/src/stub-agent-cli.js +0 -40
- package/dist/vendor/adapters/adapters/src/stub-direct-provider.d.ts +0 -8
- package/dist/vendor/adapters/adapters/src/stub-direct-provider.js +0 -12
- package/dist/vendor/adapters/adapters/src/verifier-only.d.ts +0 -9
- package/dist/vendor/adapters/adapters/src/verifier-only.js +0 -63
- package/dist/vendor/adapters/contracts/src/context-graph.d.ts +0 -48
- package/dist/vendor/adapters/contracts/src/context-graph.js +0 -26
- package/dist/vendor/adapters/contracts/src/execution-policy.d.ts +0 -78
- package/dist/vendor/adapters/contracts/src/execution-policy.js +0 -43
- package/dist/vendor/adapters/contracts/src/governance.d.ts +0 -24
- package/dist/vendor/adapters/contracts/src/governance.js +0 -11
- package/dist/vendor/adapters/contracts/src/identity.d.ts +0 -29
- package/dist/vendor/adapters/contracts/src/identity.js +0 -30
- package/dist/vendor/adapters/contracts/src/index.d.ts +0 -412
- package/dist/vendor/adapters/contracts/src/index.js +0 -225
- package/dist/vendor/adapters/contracts/src/operator.d.ts +0 -19
- package/dist/vendor/adapters/contracts/src/operator.js +0 -11
- package/dist/vendor/adapters/contracts/src/trajectory.d.ts +0 -26
- package/dist/vendor/adapters/contracts/src/trajectory.js +0 -27
- package/dist/vendor/adapters/core/src/compiler.d.ts +0 -52
- package/dist/vendor/adapters/core/src/compiler.js +0 -52
- package/dist/vendor/adapters/core/src/context-graph.d.ts +0 -3
- package/dist/vendor/adapters/core/src/context-graph.js +0 -371
- package/dist/vendor/adapters/core/src/context-integrity.d.ts +0 -26
- package/dist/vendor/adapters/core/src/context-integrity.js +0 -80
- package/dist/vendor/adapters/core/src/grounding.d.ts +0 -38
- package/dist/vendor/adapters/core/src/grounding.js +0 -273
- package/dist/vendor/adapters/core/src/identity.d.ts +0 -20
- package/dist/vendor/adapters/core/src/identity.js +0 -86
- package/dist/vendor/adapters/core/src/index.d.ts +0 -186
- package/dist/vendor/adapters/core/src/index.js +0 -1495
- package/dist/vendor/adapters/core/src/leash.d.ts +0 -48
- package/dist/vendor/adapters/core/src/leash.js +0 -497
- package/dist/vendor/adapters/core/src/persistence/compiler.d.ts +0 -18
- package/dist/vendor/adapters/core/src/persistence/compiler.js +0 -34
- package/dist/vendor/adapters/core/src/persistence/index.d.ts +0 -10
- package/dist/vendor/adapters/core/src/persistence/index.js +0 -5
- package/dist/vendor/adapters/core/src/persistence/integrity.d.ts +0 -39
- package/dist/vendor/adapters/core/src/persistence/integrity.js +0 -252
- package/dist/vendor/adapters/core/src/persistence/ledger.d.ts +0 -23
- package/dist/vendor/adapters/core/src/persistence/ledger.js +0 -9
- package/dist/vendor/adapters/core/src/persistence/memory-store.d.ts +0 -63
- package/dist/vendor/adapters/core/src/persistence/memory-store.js +0 -115
- package/dist/vendor/adapters/core/src/persistence/runs-reader.d.ts +0 -66
- package/dist/vendor/adapters/core/src/persistence/runs-reader.js +0 -140
- package/dist/vendor/adapters/core/src/persistence/store.d.ts +0 -89
- package/dist/vendor/adapters/core/src/persistence/store.js +0 -125
- package/dist/vendor/adapters/core/src/persistence/trace-store.d.ts +0 -85
- package/dist/vendor/adapters/core/src/persistence/trace-store.js +0 -125
- package/dist/vendor/adapters/core/src/policy-compiler.d.ts +0 -2
- package/dist/vendor/adapters/core/src/policy-compiler.js +0 -195
- package/dist/vendor/adapters/core/src/policy.d.ts +0 -156
- package/dist/vendor/adapters/core/src/policy.js +0 -704
- package/dist/vendor/adapters/core/src/repo-analyzer.d.ts +0 -53
- package/dist/vendor/adapters/core/src/repo-analyzer.js +0 -263
- package/dist/vendor/adapters/core/src/rollback.d.ts +0 -15
- package/dist/vendor/adapters/core/src/rollback.js +0 -253
- package/dist/vendor/adapters/core/src/routing.d.ts +0 -82
- package/dist/vendor/adapters/core/src/routing.js +0 -336
- package/dist/vendor/adapters/core/src/test-integrity.d.ts +0 -64
- package/dist/vendor/adapters/core/src/test-integrity.js +0 -197
- package/dist/vendor/adapters/core/src/trajectory.d.ts +0 -18
- package/dist/vendor/adapters/core/src/trajectory.js +0 -295
- package/dist/vendor/contracts/delivery.d.ts +0 -47
- package/dist/vendor/contracts/delivery.js +0 -18
- package/dist/vendor/core/delivery/index.d.ts +0 -6
- package/dist/vendor/core/delivery/index.js +0 -4
- package/dist/vendor/core/delivery/message-client.d.ts +0 -18
- package/dist/vendor/core/delivery/message-client.js +0 -38
- package/dist/vendor/core/delivery/message-ledger.d.ts +0 -35
- package/dist/vendor/core/delivery/message-ledger.js +0 -97
- package/dist/vendor/core/delivery/message-schema.d.ts +0 -16
- package/dist/vendor/core/delivery/message-schema.js +0 -111
- package/dist/vendor/core/delivery/update-check.d.ts +0 -19
- package/dist/vendor/core/delivery/update-check.js +0 -107
package/README.md
CHANGED
|
@@ -1,153 +1,196 @@
|
|
|
1
|
-
# MCP
|
|
1
|
+
# MartinLoop MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<div align="center">
|
|
4
|
+
<img src="https://raw.githubusercontent.com/Keesan12/martin-loop/main/docs/assets/martinloop-logo.png" alt="MartinLoop" width="240">
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Stop runaway loops, bad code, and token waste.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
The governed MCP runtime for Claude Code, Codex, Gemini CLI, Cursor, and autonomous coding agents.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
[](https://www.npmjs.com/package/@martinloop/mcp)
|
|
11
|
+
[](https://www.npmjs.com/package/@martinloop/mcp)
|
|
12
|
+
[](https://github.com/Keesan12/martin-loop/blob/main/LICENSE)
|
|
13
|
+
[](#requirements)
|
|
14
|
+
[](https://glama.ai/mcp/servers/Keesan12/martin-loop)
|
|
15
|
+
</div>
|
|
10
16
|
|
|
11
|
-
|
|
17
|
+
AI coding agents can write code. MartinLoop decides whether they are allowed to keep spending, whether the result is actually verified, and what evidence must remain for review.
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
- **Tadas Antanavicius** (PulseMCP) [@tadasant](https://github.com/tadasant)
|
|
15
|
-
- **Radoslav (Rado) Dimitrov** (Stacklok) [@rdimitrov](https://github.com/rdimitrov)
|
|
16
|
-
- **Bob Dickinson** (TeamSpark) [@BobDickinson](https://github.com/BobDickinson)
|
|
17
|
-
- **Preeti (Pree) Dewani** (Ravenmail) [@pree-dew](https://github.com/pree-dew)
|
|
19
|
+
It wraps agent execution with:
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
- hard USD, token, iteration, time, command, and file-change limits
|
|
22
|
+
- verifier gates that must pass before completion
|
|
23
|
+
- allowed and denied path contracts
|
|
24
|
+
- preflight checks before any execution or spend
|
|
25
|
+
- durable pause, continue, and cancel receipts
|
|
26
|
+
- failure triage, run dossiers, evaluations, and PR-review evidence
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
## Connect in one command
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
| Host | Command |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| Claude Code | `claude mcp add martin-loop -- npx -y @martinloop/mcp` |
|
|
33
|
+
| Codex | `codex mcp add martin-loop -- npx -y @martinloop/mcp` |
|
|
34
|
+
| Gemini CLI | `gemini mcp add martin-loop -- npx -y @martinloop/mcp` |
|
|
35
|
+
| Any stdio MCP host | `npx -y @martinloop/mcp` |
|
|
24
36
|
|
|
25
|
-
|
|
26
|
-
- **[Discussions](https://github.com/modelcontextprotocol/registry/discussions)** - Propose and discuss product/technical requirements
|
|
27
|
-
- **[Issues](https://github.com/modelcontextprotocol/registry/issues)** - Track well-scoped technical work
|
|
28
|
-
- **[Pull Requests](https://github.com/modelcontextprotocol/registry/pulls)** - Contribute work towards issues
|
|
37
|
+
Windows Claude Code:
|
|
29
38
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
39
|
+
```sh
|
|
40
|
+
claude mcp add --transport stdio --scope user martin-loop -- cmd /c npx -y @martinloop/mcp
|
|
41
|
+
```
|
|
33
42
|
|
|
34
|
-
-
|
|
35
|
-
- **Go 1.24.x**
|
|
36
|
-
- **ko** - Container image builder for Go ([installation instructions](https://ko.build/install/))
|
|
37
|
-
- **golangci-lint v2.4.0**
|
|
43
|
+
No API key is required to start and inspect the server. Live execution requires a supported coding-agent CLI and its normal authentication.
|
|
38
44
|
|
|
39
|
-
|
|
45
|
+
## Why agents use MartinLoop
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
| Uncontrolled agent run | Governed MartinLoop run |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| The agent decides when it is done | Your verifier decides whether completion is valid |
|
|
50
|
+
| Retries continue until the user notices | Hard budgets and stop conditions prevent open-ended spend |
|
|
51
|
+
| Scope drifts across the repository | Allowed and denied paths constrain writes |
|
|
52
|
+
| The final answer hides failed attempts | The dossier preserves attempts, costs, verification, and artifacts |
|
|
53
|
+
| Process control is ephemeral | Pause, continue, and cancel actions leave durable receipts |
|
|
54
|
+
| “Probably fixed” becomes accepted | Missing, failed, contradicted, or unknown verification stays incomplete |
|
|
45
55
|
|
|
46
|
-
|
|
56
|
+
MartinLoop is not another coding agent. It is the enforcement and evidence layer around the agents you already use.
|
|
47
57
|
|
|
48
|
-
|
|
58
|
+
## Agent operating contract
|
|
49
59
|
|
|
50
|
-
|
|
60
|
+
Use this sequence for governed coding work:
|
|
51
61
|
|
|
52
|
-
|
|
62
|
+
```text
|
|
63
|
+
martin_doctor
|
|
64
|
+
→ martin_estimate
|
|
65
|
+
→ martin_plan
|
|
66
|
+
→ martin_preflight
|
|
67
|
+
→ martin_run
|
|
68
|
+
→ martin_dossier
|
|
69
|
+
→ martin_eval
|
|
70
|
+
```
|
|
53
71
|
|
|
54
|
-
|
|
55
|
-
<summary>Alternative: Running a pre-built Docker image</summary>
|
|
72
|
+
### Rules for agents
|
|
56
73
|
|
|
57
|
-
|
|
74
|
+
1. Start with `martin_doctor` to inspect the environment and run store.
|
|
75
|
+
2. Call `martin_estimate` before spending.
|
|
76
|
+
3. Keep the same objective and compatible scope through estimate, plan, preflight, and run.
|
|
77
|
+
4. Prefer read-only tools until execution is explicitly authorized.
|
|
78
|
+
5. Treat failed, contradicted, missing, or unknown verification as incomplete.
|
|
79
|
+
6. Use `martin://agent/next-step` or `martin://guides/agent-start` when the next action is unclear.
|
|
80
|
+
7. Do not use `martin_create_pr` with `execute: true` unless the user has explicitly authorized a GitHub write.
|
|
58
81
|
|
|
59
|
-
|
|
60
|
-
# Run latest stable release
|
|
61
|
-
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:latest
|
|
82
|
+
`martin_run` intentionally hard-blocks until the required doctor, estimate, plan, and preflight receipts exist for the same task.
|
|
62
83
|
|
|
63
|
-
|
|
64
|
-
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main
|
|
84
|
+
## What a governed run looks like
|
|
65
85
|
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
```text
|
|
87
|
+
User objective:
|
|
88
|
+
"Fix the auth regression. Budget: $3. Verify: npm test."
|
|
68
89
|
|
|
69
|
-
|
|
70
|
-
|
|
90
|
+
doctor checks environment, CLI availability, and run storage
|
|
91
|
+
estimate predicts route, spend, and pre-work burn without spending
|
|
92
|
+
plan defines scope, verifier proposal, policy pack, and risk
|
|
93
|
+
preflight validates the contract before execution
|
|
94
|
+
run executes inside budget, scope, policy, and verifier gates
|
|
95
|
+
dossier returns attempts, cost, verification, artifacts, and evidence paths
|
|
96
|
+
eval grades completion, verifier health, risk, and reviewability
|
|
71
97
|
```
|
|
72
98
|
|
|
73
|
-
|
|
74
|
-
- **Releases**: `latest`, `v1.0.0`, `v1.1.0`, etc.
|
|
75
|
-
- **Continuous**: `main` (latest main branch build)
|
|
76
|
-
- **Development**: `main-<date>-<sha>` (specific commit builds)
|
|
99
|
+
Every attempt is bounded by the run contract. A confident model answer does not override a failed verifier.
|
|
77
100
|
|
|
78
|
-
|
|
101
|
+
## Proof, not promises
|
|
79
102
|
|
|
80
|
-
|
|
103
|
+
This real governed run spent `$0.51` against a `$3.00` budget. The verifier passed and the receipt integrity was signed. MartinLoop still kept the result at `EVIDENCE_BOUNDARY` because rollback evidence had not been recorded.
|
|
81
104
|
|
|
82
|
-
|
|
105
|
+
<div align="center">
|
|
106
|
+
<img src="https://raw.githubusercontent.com/Keesan12/martin-loop/main/docs/assets/proof-receipt-live-governed.png" alt="MartinLoop governed run receipt showing spend, budget, verifier result, integrity, and evidence boundary" width="720">
|
|
107
|
+
</div>
|
|
83
108
|
|
|
84
|
-
|
|
85
|
-
# Build the latest CLI
|
|
86
|
-
make publisher
|
|
109
|
+
Inspect the example receipt:
|
|
87
110
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```
|
|
111
|
+
- [Markdown receipt](https://github.com/Keesan12/martin-loop/blob/main/docs/examples/proof-receipts/live-governed-run-receipt.md)
|
|
112
|
+
- [JSON receipt](https://github.com/Keesan12/martin-loop/blob/main/docs/examples/proof-receipts/live-governed-run-receipt.json)
|
|
91
113
|
|
|
92
|
-
|
|
114
|
+
## Tool surface
|
|
93
115
|
|
|
94
|
-
|
|
116
|
+
### Governed workflow
|
|
95
117
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
- `martin_doctor` — inspect environment readiness; expected first call
|
|
119
|
+
- `martin_estimate` — estimate cost and route without spending
|
|
120
|
+
- `martin_plan` — produce scoped plan, verifier proposal, policy pack, and risk
|
|
121
|
+
- `martin_preflight` — validate readiness before execution
|
|
122
|
+
- `martin_run` — execute a governed coding task
|
|
123
|
+
- `martin_pause` — record a durable pause request
|
|
124
|
+
- `martin_continue` — record a durable resume request
|
|
125
|
+
- `martin_cancel` — record a durable cancellation request
|
|
100
126
|
|
|
101
|
-
|
|
127
|
+
### Inspection and review
|
|
102
128
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
129
|
+
- `martin_status`, `martin_logs`, `martin_inspect`
|
|
130
|
+
- `martin_list_runs`, `martin_triage_runs`
|
|
131
|
+
- `martin_get_run`, `martin_get_attempt`, `martin_get_verification_results`
|
|
132
|
+
- `martin_run_dossier`, `martin_dossier`, `martin_eval`
|
|
133
|
+
- `martin_pr_summary`, `martin_create_pr`, `martin_review_pr`
|
|
106
134
|
|
|
107
|
-
|
|
135
|
+
### Read-only resources
|
|
108
136
|
|
|
109
|
-
|
|
137
|
+
The server exposes run summaries, receipts, budget status, verifier evidence, policies, health, agent guidance, and repository-risk context through `martin://` resources, including:
|
|
110
138
|
|
|
139
|
+
```text
|
|
140
|
+
martin://runs/latest
|
|
141
|
+
martin://runs/latest/summary
|
|
142
|
+
martin://runs/latest/receipt
|
|
143
|
+
martin://runs/latest/budget-status
|
|
144
|
+
martin://runs/latest/verifier-evidence
|
|
145
|
+
martin://runs/recent
|
|
146
|
+
martin://server/health
|
|
147
|
+
martin://policies/current
|
|
148
|
+
martin://agent/next-step
|
|
149
|
+
martin://guides/agent-start
|
|
150
|
+
martin://repo/risk-map
|
|
111
151
|
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
│ └── validators/ # Input validation
|
|
125
|
-
├── pkg/ # Public packages
|
|
126
|
-
│ ├── api/ # API types and structures
|
|
127
|
-
│ │ └── v0/ # Version 0 API types
|
|
128
|
-
│ └── model/ # Data models for server.json
|
|
129
|
-
├── scripts/ # Development and testing scripts
|
|
130
|
-
├── tests/ # Integration tests
|
|
131
|
-
└── tools/ # CLI tools and utilities
|
|
132
|
-
└── validate-*.sh # Schema validation tools
|
|
152
|
+
|
|
153
|
+
Use resources when the agent needs context without side effects.
|
|
154
|
+
|
|
155
|
+
## Configuration profiles
|
|
156
|
+
|
|
157
|
+
Generate host config tuned to the minimum surface needed:
|
|
158
|
+
|
|
159
|
+
```sh
|
|
160
|
+
npx martin-loop mcp print-config --host claude --profile minimal
|
|
161
|
+
npx martin-loop mcp print-config --host claude --profile diagnostic
|
|
162
|
+
npx martin-loop mcp print-config --host claude --profile full-local
|
|
163
|
+
npx martin-loop mcp print-config --host claude --profile github-review
|
|
133
164
|
```
|
|
134
165
|
|
|
135
|
-
|
|
166
|
+
- `minimal` — core run and inspection path
|
|
167
|
+
- `diagnostic` — adds doctor and triage surfaces
|
|
168
|
+
- `full-local` — all local tools
|
|
169
|
+
- `github-review` — adds PR evidence and review workflow
|
|
170
|
+
|
|
171
|
+
## Trust boundaries
|
|
172
|
+
|
|
173
|
+
- Cost and token values include provenance: actual, estimated, or unavailable.
|
|
174
|
+
- A verifier proves only the commands you configured, not every product requirement.
|
|
175
|
+
- Receipt integrity must be verified before evidence is trusted externally.
|
|
176
|
+
- Unknown or missing evidence never passes silently.
|
|
177
|
+
- MartinLoop does not guarantee that an agent will produce correct code; it makes execution bounded, verification explicit, and failure reviewable.
|
|
136
178
|
|
|
137
|
-
|
|
138
|
-
- **GitHub OAuth** - For publishing by logging into GitHub
|
|
139
|
-
- **GitHub OIDC** - For publishing from GitHub Actions
|
|
140
|
-
- **DNS verification** - For proving ownership of a domain and its subdomains
|
|
141
|
-
- **HTTP verification** - For proving ownership of a domain
|
|
179
|
+
## Requirements
|
|
142
180
|
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
181
|
+
- Node.js 20+
|
|
182
|
+
- One supported coding-agent CLI for live execution: Claude Code, Codex, Gemini CLI, or an OpenAI-compatible route
|
|
183
|
+
- Git repository for rollback-aware and changed-file workflows
|
|
146
184
|
|
|
147
|
-
##
|
|
185
|
+
## Links
|
|
148
186
|
|
|
149
|
-
|
|
187
|
+
- [Glama server page](https://glama.ai/mcp/servers/Keesan12/martin-loop)
|
|
188
|
+
- [npm: @martinloop/mcp](https://www.npmjs.com/package/@martinloop/mcp)
|
|
189
|
+
- [GitHub source and issues](https://github.com/Keesan12/martin-loop)
|
|
190
|
+
- [MCP setup guide](https://github.com/Keesan12/martin-loop/blob/main/docs/getting-started/mcp.md)
|
|
191
|
+
- [MCP tool reference](https://github.com/Keesan12/martin-loop/blob/main/docs/reference/mcp-tools.md)
|
|
192
|
+
- [martinloop.com](https://martinloop.com)
|
|
150
193
|
|
|
151
|
-
##
|
|
194
|
+
## License
|
|
152
195
|
|
|
153
|
-
|
|
196
|
+
Apache-2.0.
|
package/dist/resources.js
CHANGED
|
@@ -769,174 +769,174 @@ function inferAgentNextStep(loop, verification) {
|
|
|
769
769
|
}
|
|
770
770
|
function buildMcpUsageGuide(runsRoot) {
|
|
771
771
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
772
|
-
return `# Martin Loop MCP Usage
|
|
773
|
-
|
|
774
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
775
|
-
Server version: \`${metadata.serverVersion}\`
|
|
776
|
-
Runs root: \`${runsRoot}\`
|
|
777
|
-
|
|
778
|
-
Martin Loop exposes governed coding workflows over MCP. Use the server health and run-store views to decide when to preflight, execute, inspect, or escalate.
|
|
779
|
-
|
|
780
|
-
## Recommended Flow
|
|
781
|
-
|
|
782
|
-
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\` or call \`martin_doctor\` to confirm the environment and run-store visibility.
|
|
783
|
-
2. Use the \`martin_governed_coding_kickoff\` prompt to frame a governed coding request.
|
|
784
|
-
3. Call \`martin_preflight\` before \`martin_run\` when the task or safety envelope is non-trivial.
|
|
785
|
-
4. After execution, inspect \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\`, \`martin://runs/{loopId}\`, and \`martin://runs/{loopId}/verification\`.
|
|
786
|
-
5. For low-context agents, read \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`, or \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\` before asking for full JSON. Treat \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\` as an optional derived view.
|
|
787
|
-
6. Read \`${MARTIN_STATIC_RESOURCE_URIS.triage}\` or call \`martin_triage_runs\` to prioritize which run needs attention first.
|
|
788
|
-
7. Use \`martin_debug_failed_run\` when a loop exits failed, budget-bound, or escalated.
|
|
789
|
-
|
|
790
|
-
## Current Martin MCP Surface
|
|
791
|
-
|
|
792
|
-
- Tools: \`martin_run\`, \`martin_inspect\`, \`martin_status\`, \`martin_doctor\`, \`martin_preflight\`, \`martin_list_runs\`, \`martin_triage_runs\`, \`martin_get_run\`, \`martin_get_attempt\`, \`martin_get_verification_results\`, \`martin_run_dossier\`
|
|
793
|
-
- Static resources: \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\`, \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\`, \`${MARTIN_STATIC_RESOURCE_URIS.triage}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestBudgetStatus}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestVerifierEvidence}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestRollbackEvidence}\`, \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`, \`${MARTIN_STATIC_RESOURCE_URIS.mcpUsageGuide}\`, \`${MARTIN_STATIC_RESOURCE_URIS.agentStartGuide}\`, \`${MARTIN_STATIC_RESOURCE_URIS.publishReadinessGuide}\`
|
|
794
|
-
- Resource templates: \`martin://runs/{loopId}\`, \`martin://runs/{loopId}/attempts/{attemptIndex}\`, \`martin://runs/{loopId}/verification\`
|
|
795
|
-
- Prompts: \`martin_start\`, \`martin_preflight\`, \`martin_triage\`, \`martin_resume\`, \`martin_prove\`, \`martin_release_check\`, \`martin_governed_coding_kickoff\`, \`martin_debug_failed_run\`, \`martin_publish_readiness_review\`, \`martin_triage_run_store\`
|
|
796
|
-
|
|
797
|
-
## Notes
|
|
798
|
-
|
|
799
|
-
- Discovery helpers read the existing Martin run-store; they do not create new schema.
|
|
800
|
-
- Verification history is derived from persisted \`verification.completed\` evidence in loop records and ledgers.
|
|
801
|
-
- Attempt inspection stays aligned with the same loop selectors used by \`martin_status\` and \`martin_inspect\`.
|
|
772
|
+
return `# Martin Loop MCP Usage
|
|
773
|
+
|
|
774
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
775
|
+
Server version: \`${metadata.serverVersion}\`
|
|
776
|
+
Runs root: \`${runsRoot}\`
|
|
777
|
+
|
|
778
|
+
Martin Loop exposes governed coding workflows over MCP. Use the server health and run-store views to decide when to preflight, execute, inspect, or escalate.
|
|
779
|
+
|
|
780
|
+
## Recommended Flow
|
|
781
|
+
|
|
782
|
+
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\` or call \`martin_doctor\` to confirm the environment and run-store visibility.
|
|
783
|
+
2. Use the \`martin_governed_coding_kickoff\` prompt to frame a governed coding request.
|
|
784
|
+
3. Call \`martin_preflight\` before \`martin_run\` when the task or safety envelope is non-trivial.
|
|
785
|
+
4. After execution, inspect \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\`, \`martin://runs/{loopId}\`, and \`martin://runs/{loopId}/verification\`.
|
|
786
|
+
5. For low-context agents, read \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`, or \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\` before asking for full JSON. Treat \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\` as an optional derived view.
|
|
787
|
+
6. Read \`${MARTIN_STATIC_RESOURCE_URIS.triage}\` or call \`martin_triage_runs\` to prioritize which run needs attention first.
|
|
788
|
+
7. Use \`martin_debug_failed_run\` when a loop exits failed, budget-bound, or escalated.
|
|
789
|
+
|
|
790
|
+
## Current Martin MCP Surface
|
|
791
|
+
|
|
792
|
+
- Tools: \`martin_run\`, \`martin_inspect\`, \`martin_status\`, \`martin_doctor\`, \`martin_preflight\`, \`martin_list_runs\`, \`martin_triage_runs\`, \`martin_get_run\`, \`martin_get_attempt\`, \`martin_get_verification_results\`, \`martin_run_dossier\`
|
|
793
|
+
- Static resources: \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\`, \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\`, \`${MARTIN_STATIC_RESOURCE_URIS.triage}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestBudgetStatus}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestVerifierEvidence}\`, \`${MARTIN_STATIC_RESOURCE_URIS.latestRollbackEvidence}\`, \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`, \`${MARTIN_STATIC_RESOURCE_URIS.mcpUsageGuide}\`, \`${MARTIN_STATIC_RESOURCE_URIS.agentStartGuide}\`, \`${MARTIN_STATIC_RESOURCE_URIS.publishReadinessGuide}\`
|
|
794
|
+
- Resource templates: \`martin://runs/{loopId}\`, \`martin://runs/{loopId}/attempts/{attemptIndex}\`, \`martin://runs/{loopId}/verification\`
|
|
795
|
+
- Prompts: \`martin_start\`, \`martin_preflight\`, \`martin_triage\`, \`martin_resume\`, \`martin_prove\`, \`martin_release_check\`, \`martin_governed_coding_kickoff\`, \`martin_debug_failed_run\`, \`martin_publish_readiness_review\`, \`martin_triage_run_store\`
|
|
796
|
+
|
|
797
|
+
## Notes
|
|
798
|
+
|
|
799
|
+
- Discovery helpers read the existing Martin run-store; they do not create new schema.
|
|
800
|
+
- Verification history is derived from persisted \`verification.completed\` evidence in loop records and ledgers.
|
|
801
|
+
- Attempt inspection stays aligned with the same loop selectors used by \`martin_status\` and \`martin_inspect\`.
|
|
802
802
|
`;
|
|
803
803
|
}
|
|
804
804
|
function buildAgentStartGuide(runsRoot) {
|
|
805
805
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
806
|
-
return `# Agent Start Here
|
|
807
|
-
|
|
808
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
809
|
-
Server version: \`${metadata.serverVersion}\`
|
|
810
|
-
Runs root: \`${runsRoot}\`
|
|
811
|
-
|
|
812
|
-
Use Martin Loop as the local governor before you spend agent tokens or retry a failed coding loop.
|
|
813
|
-
|
|
814
|
-
## Cheap Default Flow
|
|
815
|
-
|
|
816
|
-
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\` first. It is the smallest "what should I do now?" payload.
|
|
817
|
-
2. If no runs exist, call \`martin_doctor\`, then \`martin_preflight\`.
|
|
818
|
-
3. If a run exists, read \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\` before reading full run JSON.
|
|
819
|
-
4. If the verifier failed, use prompt \`martin_debug_failed_run\` or \`martin_triage\`.
|
|
820
|
-
5. If you need a shareable receipt, read \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\` first. Generate or inspect \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\` only when a visual artifact is explicitly required.
|
|
821
|
-
|
|
822
|
-
## Install Profiles
|
|
823
|
-
|
|
824
|
-
- \`minimal\` (default): doctor, preflight, list, triage, dossier. Good for low tool bloat.
|
|
825
|
-
- \`diagnostic\`: read-only inspection tools for debugging without execution.
|
|
826
|
-
- \`full-local\`: all local tools, including \`martin_run\`.
|
|
827
|
-
- \`github-review\`: review-oriented local profile for PR drafting and reviewer evidence.
|
|
828
|
-
- \`starter\` and \`full\`: compatibility aliases.
|
|
829
|
-
|
|
830
|
-
## Copy-Paste Agent Rule
|
|
831
|
-
|
|
832
|
-
Before running or retrying an autonomous coding task, call Martin. Prefer compact resources first, then full dossiers only when the compact receipt says more evidence is needed. Never claim success unless Martin shows verifier-backed completion or a clear blocked reason.
|
|
806
|
+
return `# Agent Start Here
|
|
807
|
+
|
|
808
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
809
|
+
Server version: \`${metadata.serverVersion}\`
|
|
810
|
+
Runs root: \`${runsRoot}\`
|
|
811
|
+
|
|
812
|
+
Use Martin Loop as the local governor before you spend agent tokens or retry a failed coding loop.
|
|
813
|
+
|
|
814
|
+
## Cheap Default Flow
|
|
815
|
+
|
|
816
|
+
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\` first. It is the smallest "what should I do now?" payload.
|
|
817
|
+
2. If no runs exist, call \`martin_doctor\`, then \`martin_preflight\`.
|
|
818
|
+
3. If a run exists, read \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\` before reading full run JSON.
|
|
819
|
+
4. If the verifier failed, use prompt \`martin_debug_failed_run\` or \`martin_triage\`.
|
|
820
|
+
5. If you need a shareable receipt, read \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\` first. Generate or inspect \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\` only when a visual artifact is explicitly required.
|
|
821
|
+
|
|
822
|
+
## Install Profiles
|
|
823
|
+
|
|
824
|
+
- \`minimal\` (default): doctor, preflight, list, triage, dossier. Good for low tool bloat.
|
|
825
|
+
- \`diagnostic\`: read-only inspection tools for debugging without execution.
|
|
826
|
+
- \`full-local\`: all local tools, including \`martin_run\`.
|
|
827
|
+
- \`github-review\`: review-oriented local profile for PR drafting and reviewer evidence.
|
|
828
|
+
- \`starter\` and \`full\`: compatibility aliases.
|
|
829
|
+
|
|
830
|
+
## Copy-Paste Agent Rule
|
|
831
|
+
|
|
832
|
+
Before running or retrying an autonomous coding task, call Martin. Prefer compact resources first, then full dossiers only when the compact receipt says more evidence is needed. Never claim success unless Martin shows verifier-backed completion or a clear blocked reason.
|
|
833
833
|
`;
|
|
834
834
|
}
|
|
835
835
|
function buildCommandMapGuide(runsRoot) {
|
|
836
836
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
837
|
-
return `# Martin Command Map
|
|
838
|
-
|
|
839
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
840
|
-
Server version: \`${metadata.serverVersion}\`
|
|
841
|
-
Runs root: \`${runsRoot}\`
|
|
842
|
-
|
|
843
|
-
Use this guide when an IDE or agent needs to know which Martin surface to call next.
|
|
844
|
-
|
|
845
|
-
## Default Governed Sequence
|
|
846
|
-
|
|
847
|
-
1. \`martin_doctor\` — confirm environment and visibility.
|
|
848
|
-
2. \`martin_plan\` — propose the bounded approach without spending a run.
|
|
849
|
-
3. \`martin_preflight\` — turn the plan into an explicit contract.
|
|
850
|
-
4. \`martin_run\` — execute only after the contract is safe.
|
|
851
|
-
5. \`martin_dossier\` — inspect what happened and what Martin prevented.
|
|
852
|
-
6. \`martin_eval\` — convert the result into review posture when needed.
|
|
853
|
-
|
|
854
|
-
## When To Use Which Surface
|
|
855
|
-
|
|
856
|
-
- Need the smallest next action: \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`
|
|
857
|
-
- Need a quick receipt: \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`
|
|
858
|
-
- Need the structured receipt source of truth: \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\`
|
|
859
|
-
- Need an optional visual proof object: \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\`
|
|
860
|
-
- Need a full run review: \`martin_dossier\`
|
|
861
|
-
- Need to decide whether to retry: \`martin_triage_runs\`
|
|
862
|
-
- Need IDE setup guidance: \`${MARTIN_STATIC_RESOURCE_URIS.ideOnboardingGuide}\`
|
|
837
|
+
return `# Martin Command Map
|
|
838
|
+
|
|
839
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
840
|
+
Server version: \`${metadata.serverVersion}\`
|
|
841
|
+
Runs root: \`${runsRoot}\`
|
|
842
|
+
|
|
843
|
+
Use this guide when an IDE or agent needs to know which Martin surface to call next.
|
|
844
|
+
|
|
845
|
+
## Default Governed Sequence
|
|
846
|
+
|
|
847
|
+
1. \`martin_doctor\` — confirm environment and visibility.
|
|
848
|
+
2. \`martin_plan\` — propose the bounded approach without spending a run.
|
|
849
|
+
3. \`martin_preflight\` — turn the plan into an explicit contract.
|
|
850
|
+
4. \`martin_run\` — execute only after the contract is safe.
|
|
851
|
+
5. \`martin_dossier\` — inspect what happened and what Martin prevented.
|
|
852
|
+
6. \`martin_eval\` — convert the result into review posture when needed.
|
|
853
|
+
|
|
854
|
+
## When To Use Which Surface
|
|
855
|
+
|
|
856
|
+
- Need the smallest next action: \`${MARTIN_STATIC_RESOURCE_URIS.agentNextStep}\`
|
|
857
|
+
- Need a quick receipt: \`${MARTIN_STATIC_RESOURCE_URIS.latestSummary}\`
|
|
858
|
+
- Need the structured receipt source of truth: \`${MARTIN_STATIC_RESOURCE_URIS.latestReceipt}\`
|
|
859
|
+
- Need an optional visual proof object: \`${MARTIN_STATIC_RESOURCE_URIS.latestProofCard}\`
|
|
860
|
+
- Need a full run review: \`martin_dossier\`
|
|
861
|
+
- Need to decide whether to retry: \`martin_triage_runs\`
|
|
862
|
+
- Need IDE setup guidance: \`${MARTIN_STATIC_RESOURCE_URIS.ideOnboardingGuide}\`
|
|
863
863
|
`;
|
|
864
864
|
}
|
|
865
865
|
function buildIdeOnboardingGuide(runsRoot) {
|
|
866
866
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
867
|
-
return `# Martin IDE Onboarding
|
|
868
|
-
|
|
869
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
870
|
-
Server version: \`${metadata.serverVersion}\`
|
|
871
|
-
Runs root: \`${runsRoot}\`
|
|
872
|
-
|
|
873
|
-
Use this guide after the MCP server is installed so the host naturally uses MartinLoop during real work.
|
|
874
|
-
|
|
875
|
-
## IDE Default Flow
|
|
876
|
-
|
|
877
|
-
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.agentStartGuide}\`
|
|
878
|
-
2. Read \`${MARTIN_STATIC_RESOURCE_URIS.operatingRulesGuide}\`
|
|
879
|
-
3. Use prompt \`martin_start\` or \`martin_governed_coding_kickoff\`
|
|
880
|
-
4. Call \`martin_doctor\`
|
|
881
|
-
5. Call \`martin_plan\`
|
|
882
|
-
6. Call \`martin_preflight\`
|
|
883
|
-
7. Only then call \`martin_run\`
|
|
884
|
-
|
|
885
|
-
## Goal
|
|
886
|
-
|
|
887
|
-
MartinLoop should become the normal path for coding work in the host, not a manual extra step the human has to remember.
|
|
867
|
+
return `# Martin IDE Onboarding
|
|
868
|
+
|
|
869
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
870
|
+
Server version: \`${metadata.serverVersion}\`
|
|
871
|
+
Runs root: \`${runsRoot}\`
|
|
872
|
+
|
|
873
|
+
Use this guide after the MCP server is installed so the host naturally uses MartinLoop during real work.
|
|
874
|
+
|
|
875
|
+
## IDE Default Flow
|
|
876
|
+
|
|
877
|
+
1. Read \`${MARTIN_STATIC_RESOURCE_URIS.agentStartGuide}\`
|
|
878
|
+
2. Read \`${MARTIN_STATIC_RESOURCE_URIS.operatingRulesGuide}\`
|
|
879
|
+
3. Use prompt \`martin_start\` or \`martin_governed_coding_kickoff\`
|
|
880
|
+
4. Call \`martin_doctor\`
|
|
881
|
+
5. Call \`martin_plan\`
|
|
882
|
+
6. Call \`martin_preflight\`
|
|
883
|
+
7. Only then call \`martin_run\`
|
|
884
|
+
|
|
885
|
+
## Goal
|
|
886
|
+
|
|
887
|
+
MartinLoop should become the normal path for coding work in the host, not a manual extra step the human has to remember.
|
|
888
888
|
`;
|
|
889
889
|
}
|
|
890
890
|
function buildOperatingRulesGuide(runsRoot) {
|
|
891
891
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
892
|
-
return `# Martin Operating Rules
|
|
893
|
-
|
|
894
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
895
|
-
Server version: \`${metadata.serverVersion}\`
|
|
896
|
-
Runs root: \`${runsRoot}\`
|
|
897
|
-
|
|
898
|
-
Use these rules inside the IDE or MCP host as the default MartinLoop operating posture.
|
|
899
|
-
|
|
900
|
-
## Required Sequence Before Real Work
|
|
901
|
-
|
|
902
|
-
1. \`martin_doctor\`
|
|
903
|
-
2. \`martin_plan\`
|
|
904
|
-
3. \`martin_preflight\`
|
|
905
|
-
4. \`martin_run\`
|
|
906
|
-
5. \`martin_dossier\`
|
|
907
|
-
|
|
908
|
-
## Enforcement Rule
|
|
909
|
-
|
|
910
|
-
Do not execute real coding work through MartinLoop until doctor and preflight have both been used for the current task.
|
|
911
|
-
|
|
912
|
-
## Completion Rule
|
|
913
|
-
|
|
914
|
-
Do not claim success until MartinLoop shows verifier-backed completion or an explicit blocked reason backed by evidence.
|
|
892
|
+
return `# Martin Operating Rules
|
|
893
|
+
|
|
894
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
895
|
+
Server version: \`${metadata.serverVersion}\`
|
|
896
|
+
Runs root: \`${runsRoot}\`
|
|
897
|
+
|
|
898
|
+
Use these rules inside the IDE or MCP host as the default MartinLoop operating posture.
|
|
899
|
+
|
|
900
|
+
## Required Sequence Before Real Work
|
|
901
|
+
|
|
902
|
+
1. \`martin_doctor\`
|
|
903
|
+
2. \`martin_plan\`
|
|
904
|
+
3. \`martin_preflight\`
|
|
905
|
+
4. \`martin_run\`
|
|
906
|
+
5. \`martin_dossier\`
|
|
907
|
+
|
|
908
|
+
## Enforcement Rule
|
|
909
|
+
|
|
910
|
+
Do not execute real coding work through MartinLoop until doctor and preflight have both been used for the current task.
|
|
911
|
+
|
|
912
|
+
## Completion Rule
|
|
913
|
+
|
|
914
|
+
Do not claim success until MartinLoop shows verifier-backed completion or an explicit blocked reason backed by evidence.
|
|
915
915
|
`;
|
|
916
916
|
}
|
|
917
917
|
function buildPublishReadinessGuide(runsRoot) {
|
|
918
918
|
const metadata = buildMartinDiscoveryMetadata(MARTIN_MCP_PACKAGE_VERSION);
|
|
919
|
-
return `# Martin MCP Publish Readiness
|
|
920
|
-
|
|
921
|
-
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
922
|
-
Server version: \`${metadata.serverVersion}\`
|
|
923
|
-
Runs root: \`${runsRoot}\`
|
|
924
|
-
|
|
925
|
-
Use this guide when reviewing whether the public MCP package is ready to publish, promote, or hand off for registry submission.
|
|
926
|
-
|
|
927
|
-
## Review Areas
|
|
928
|
-
|
|
929
|
-
1. Environment health: confirm \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\` shows a sane working directory, runs root, and engine availability for the target mode.
|
|
930
|
-
2. Discovery surface: verify tools, prompts, static resources, and resource templates are all discoverable and named consistently.
|
|
931
|
-
3. Run evidence: inspect \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\` and, when relevant, \`martin://runs/{loopId}/verification\` to confirm verification outcomes are explainable from persisted data.
|
|
932
|
-
4. Packaging lane: run the MCP package test, build, and smoke-pack commands before calling the package publish-ready.
|
|
933
|
-
5. Findings-first reporting: call out missing schema, integration gaps, triage-critical runs, and verification blockers before summarizing strengths.
|
|
934
|
-
|
|
935
|
-
## Evidence Expectations
|
|
936
|
-
|
|
937
|
-
- Prefer concrete run IDs, attempt indices, and verification summaries over vague statements.
|
|
938
|
-
- Distinguish local package validation from live registry readiness.
|
|
939
|
-
- If a discovery helper exists but is not yet wired into the server, report that as an integration gap instead of treating the capability as fully shipped.
|
|
919
|
+
return `# Martin MCP Publish Readiness
|
|
920
|
+
|
|
921
|
+
Discovery revision: \`${metadata.discoveryRevision}\`
|
|
922
|
+
Server version: \`${metadata.serverVersion}\`
|
|
923
|
+
Runs root: \`${runsRoot}\`
|
|
924
|
+
|
|
925
|
+
Use this guide when reviewing whether the public MCP package is ready to publish, promote, or hand off for registry submission.
|
|
926
|
+
|
|
927
|
+
## Review Areas
|
|
928
|
+
|
|
929
|
+
1. Environment health: confirm \`${MARTIN_STATIC_RESOURCE_URIS.serverHealth}\` shows a sane working directory, runs root, and engine availability for the target mode.
|
|
930
|
+
2. Discovery surface: verify tools, prompts, static resources, and resource templates are all discoverable and named consistently.
|
|
931
|
+
3. Run evidence: inspect \`${MARTIN_STATIC_RESOURCE_URIS.recentRuns}\` and, when relevant, \`martin://runs/{loopId}/verification\` to confirm verification outcomes are explainable from persisted data.
|
|
932
|
+
4. Packaging lane: run the MCP package test, build, and smoke-pack commands before calling the package publish-ready.
|
|
933
|
+
5. Findings-first reporting: call out missing schema, integration gaps, triage-critical runs, and verification blockers before summarizing strengths.
|
|
934
|
+
|
|
935
|
+
## Evidence Expectations
|
|
936
|
+
|
|
937
|
+
- Prefer concrete run IDs, attempt indices, and verification summaries over vague statements.
|
|
938
|
+
- Distinguish local package validation from live registry readiness.
|
|
939
|
+
- If a discovery helper exists but is not yet wired into the server, report that as an integration gap instead of treating the capability as fully shipped.
|
|
940
940
|
`;
|
|
941
941
|
}
|
|
942
942
|
async function buildModeStatusResource() {
|
package/dist/server.js
CHANGED
|
File without changes
|