Skip to content

Commit 634f46a

Browse files
hyperpolymathclaude
andcommitted
feat(echidna-llm-mcp): v0.3.0 — expand to 15 tools mapping all REST routes
Linter pass expanded mod.js to cover all ECHIDNA server.rs routes: POST /api/prove, /api/verify, /api/verify_raw, /api/suggest, /api/tactics/suggest, /api/session/create, /api/session/:id/apply GET /api/provers, /api/health, /api/aspect-tags, /api/search, /api/theorems/search, /api/session/:id/state, /api/session/:id/tree Single backend (ECHIDNA_REST_URL :8081 / flycast :8090) — no separate LLM port. README updated to reflect 15-tool surface. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 00d94cd commit 634f46a

3 files changed

Lines changed: 280 additions & 132 deletions

File tree

cartridges/echidna-llm-mcp/README.adoc

Lines changed: 43 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,35 @@ Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
1010
== Overview
1111

1212
ECHIDNA 105-prover cross-repo invocation surface. Exposes all 105 ECHIDNA
13-
prover backends (proof invocation, tool discovery, tactic advisory) as BoJ
14-
cartridge tools. **All ECHIDNA calls from any hyperpolymath repo must go
15-
through this cartridge — never call ECHIDNA directly.**
13+
prover backends through 15 tools covering discovery, proof, verification,
14+
tactic advisory, and interactive proof sessions.
15+
**All ECHIDNA calls from any hyperpolymath repo must go through this
16+
cartridge — never call ECHIDNA directly.**
1617

17-
== Tools (8)
18+
== Tools (15)
1819

1920
[cols="2,4,2"]
2021
|===
21-
| Tool | Description | Backend
22-
23-
| `echidna_list_provers` | Tool-discovery: returns all 105 provers with tier/category/complexity | REST :8000
24-
| `echidna_prove` | Invoke a prover on a file path (auto-detects from extension) | REST :8000
25-
| `echidna_verify` | Verify inline proof content as a string | REST :8000
26-
| `echidna_search` | Keyword search over the 66,674-proof corpus | REST :8000
27-
| `echidna_init` | Initialise LLM advisory session | LLM :7721
28-
| `echidna_authenticate` | Authenticate for metered LLM calls | LLM :7721
29-
| `echidna_suggest_tactics` | Advisory tactic suggestions for a proof goal | LLM :7721
30-
| `echidna_rank_provers` | Advisory prover ranking for a theorem | LLM :7721
22+
| Tool | Description | REST Endpoint
23+
24+
| `echidna_list_provers` | Discovery: all 105 provers with tier/complexity | `GET /api/provers`
25+
| `echidna_health` | Backend health check | `GET /api/health`
26+
| `echidna_rank_provers` | Prover list (advisory selection hint) | `GET /api/provers`
27+
| `echidna_aspect_tags` | Active proof-aspect tag set | `GET /api/aspect-tags`
28+
| `echidna_prove` | Invoke prover on content | `POST /api/prove`
29+
| `echidna_verify` | Parse → export → verify round-trip | `POST /api/verify`
30+
| `echidna_verify_raw` | Direct binary invocation, no round-trip | `POST /api/verify_raw`
31+
| `echidna_suggest` | Julia ML neural tactic suggestions | `POST /api/suggest`
32+
| `echidna_suggest_tactics` | Aspect-tag model tactic suggestions | `POST /api/tactics/suggest`
33+
| `echidna_search` | Keyword search over 66,674-proof corpus | `GET /api/search`
34+
| `echidna_search_theorems` | Theorem search with metadata | `GET /api/theorems/search`
35+
| `echidna_session_create` | Start interactive tactic session | `POST /api/session/create`
36+
| `echidna_session_state` | Current goals / completion | `GET /api/session/:id/state`
37+
| `echidna_session_apply` | Apply tactic to current goal | `POST /api/session/:id/apply`
38+
| `echidna_session_tree` | Full proof tree for session | `GET /api/session/:id/tree`
3139
|===
3240

33-
Advisory tools (suggest_tactics, rank_provers) cannot influence ECHIDNA
41+
Advisory tools (suggest_tactics, suggest) cannot influence ECHIDNA
3442
trust levels — formally verified in `abi/EchidnaLlm/Protocol.idr`.
3543

3644
== Quick Start
@@ -40,17 +48,23 @@ trust levels — formally verified in `abi/EchidnaLlm/Protocol.idr`.
4048
// 1. Discover available provers
4149
{ "tool": "echidna_list_provers", "args": {} }
4250
43-
// 2. Prove a Lean 4 file
51+
// 2. Prove inline Lean 4 content
4452
{
4553
"tool": "echidna_prove",
46-
"args": { "file": "/path/to/proof.lean", "prover": "Lean" }
54+
"args": { "content": "theorem t : 1 + 1 = 2 := rfl", "prover": "Lean" }
4755
}
4856
4957
// 3. Verify inline Z3 content
5058
{
5159
"tool": "echidna_verify",
5260
"args": { "content": "(assert (not true))\n(check-sat)", "prover": "Z3" }
5361
}
62+
63+
// 4. Start interactive session
64+
{
65+
"tool": "echidna_session_create",
66+
"args": { "prover": "Coq" }
67+
}
5468
----
5569

5670
Full protocol documentation: `docs/CALL-PROTOCOL.adoc`
@@ -63,20 +77,22 @@ Three-layer stack per the BoJ cartridge standard:
6377
|===
6478
| Layer | Language | Purpose
6579

66-
| ABI | Idris2 | Formally verified state machine; proves advisory-only invariant for all 5 LLM operations; `ProverId` bounded to `Fin 105`
80+
| ABI | Idris2 | Formally verified state machine; proves advisory-only invariant for all tactic ops; `ProverId` bounded to `Fin 105`
6781
| FFI | Zig | C-ABI implementation: session pool, action metrics, thread safety
68-
| Adapter| Zig | Adapter bridge to the BoJ unified adapter protocol
82+
| Adapter| Zig | Bridge to the BoJ unified adapter protocol
6983
|===
7084

71-
== Backend URLs
85+
== Backend URL
86+
87+
Single REST backend — all 15 tools route here.
7288

7389
[source,bash]
7490
----
75-
# REST API (proof, discovery, search) — full 105-prover portfolio
76-
export ECHIDNA_REST_URL=http://127.0.0.1:8000 # default
91+
# Local default
92+
export ECHIDNA_REST_URL=http://127.0.0.1:8081
7793
78-
# LLM advisory layer (tactic suggestions, ranking)
79-
export ECHIDNA_LLM_URL=http://127.0.0.1:7721 # default
94+
# Fly.io private network
95+
export ECHIDNA_REST_URL=http://echidna-nesy.flycast:8090
8096
----
8197

8298
== Building
@@ -96,9 +112,9 @@ cd adapter && zig build
96112

97113
== Status
98114

99-
Alpha (CRG D). Cartridge metadata declared in `cartridge.json`; 8 tools exposed
100-
across two backend layers (REST + LLM advisory). Not yet dogfooded externally.
101-
See `docs/practice/DOGFOOD-LOG.adoc` for usage evidence.
115+
Alpha (CRG D). Cartridge v0.3.0: 15 tools across the full ECHIDNA REST API.
116+
Not yet dogfooded externally. See `docs/practice/DOGFOOD-LOG.adoc` for
117+
usage evidence.
102118

103119
== Consumer Repos
104120

0 commit comments

Comments
 (0)