Skip to content

Commit a14bd82

Browse files
hyperpolymathclaude
andcommitted
feat: add cartridge-minter CLI and 14 new Ayo-tier cartridges
Cartridge Minter (tools/cartridge-minter/): Rust CLI wizard that scaffolds complete 3-layer cartridges (Idris2 ABI + Zig FFI + V adapter + PanLL panel harness). Four modes: mint, provision, configure, harness. 22 tests, criterion benchmarks, installed as `cm` alias. 14 new cartridges (all with full ABI+FFI+ADT stacks): - vault-mcp: Zero-knowledge proxy to reasonably-good-token-vault - browser-mcp: Firefox automation via Marionette protocol - github-api-mcp: GitHub REST+GraphQL (replaces standalone MCP) - gitlab-api-mcp: GitLab API with self-hosted + push mirror support - slack-mcp: Slack Web API with per-method rate tiers - discord-mcp: Discord Bot API with bucket-based rate limits - telegram-mcp: Telegram Bot API with token-in-URL pattern - matrix-mcp: Matrix Client-Server API with configurable homeserver - linear-mcp: Linear GraphQL API for project management - notion-mcp: Notion API with versioned headers - jira-mcp: Atlassian Jira REST API with Basic auth - postgresql-mcp: PostgreSQL wire protocol with libpq stubs - redis-mcp: Redis RESP protocol with pipeline support - mongodb-mcp: MongoDB wire protocol with BSON handling All cartridges validated: %default total, zero unsafe patterns, SPDX PMPL-1.0-or-later, PanLL panel manifests, test+benchmark stubs. Total cartridge count: 38 (24 existing + 14 new). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 822f085 commit a14bd82

150 files changed

Lines changed: 23635 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,6 @@ v.mod.lock
132132
# Zig global cache
133133
.zig-cache/
134134
zig-out/
135+
136+
# Cartridge minter build artifacts
137+
tools/cartridge-minter/target/

.machine_readable/servers/menu.a2ml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,3 +350,171 @@
350350
timestamp = "2026-03-08T00:00:00Z"
351351
canonical = "boj-server/.machine_readable/servers/menu.a2ml"
352352
@end
353+
354+
355+
@cartridge(id="vault-mcp"):
356+
name = "vault-mcp"
357+
version = "0.1.0"
358+
status = Development
359+
tier = Ayo
360+
domain = Secrets
361+
protocols = [MCP, REST]
362+
hash = ""
363+
notes = "Zero-knowledge credential proxy for the reasonably-good-token-vault"
364+
@end
365+
366+
367+
@cartridge(id="browser-mcp"):
368+
name = "browser-mcp"
369+
version = "0.1.0"
370+
status = Development
371+
tier = Ayo
372+
domain = Browser
373+
protocols = [MCP, REST]
374+
hash = ""
375+
notes = "Firefox browser automation via the Marionette protocol (TCP localhost:2828)"
376+
@end
377+
378+
379+
@cartridge(id="github-api-mcp"):
380+
name = "github-api-mcp"
381+
version = "0.1.0"
382+
status = Development
383+
tier = Ayo
384+
domain = Cloud
385+
protocols = [MCP, REST]
386+
hash = ""
387+
notes = "github-api-mcp cartridge"
388+
@end
389+
390+
391+
@cartridge(id="gitlab-api-mcp"):
392+
name = "gitlab-api-mcp"
393+
version = "0.1.0"
394+
status = Development
395+
tier = Ayo
396+
domain = Cloud
397+
protocols = [MCP, REST]
398+
hash = ""
399+
notes = "gitlab-api-mcp cartridge"
400+
@end
401+
402+
403+
@cartridge(id="slack-mcp"):
404+
name = "slack-mcp"
405+
version = "0.1.0"
406+
status = Development
407+
tier = Ayo
408+
domain = Comms
409+
protocols = [MCP, REST]
410+
hash = ""
411+
notes = "Slack Web API and Events API cartridge — send messages, manage channels, search, react, and more"
412+
@end
413+
414+
415+
@cartridge(id="linear-mcp"):
416+
name = "linear-mcp"
417+
version = "0.1.0"
418+
status = Development
419+
tier = Ayo
420+
domain = Cloud
421+
protocols = [MCP, REST]
422+
hash = ""
423+
notes = "linear-mcp cartridge"
424+
@end
425+
426+
427+
@cartridge(id="notion-mcp"):
428+
name = "notion-mcp"
429+
version = "0.1.0"
430+
status = Development
431+
tier = Ayo
432+
domain = Comms
433+
protocols = [MCP, REST]
434+
hash = ""
435+
notes = "Notion REST API cartridge — pages, databases, blocks, users, and comments via https://api.notion.com/v1/"
436+
@end
437+
438+
439+
@cartridge(id="jira-mcp"):
440+
name = "jira-mcp"
441+
version = "0.1.0"
442+
status = Development
443+
tier = Ayo
444+
domain = Cloud
445+
protocols = [MCP, REST]
446+
hash = ""
447+
notes = "jira-mcp cartridge"
448+
@end
449+
450+
451+
@cartridge(id="discord-mcp"):
452+
name = "discord-mcp"
453+
version = "0.1.0"
454+
status = Development
455+
tier = Ayo
456+
domain = Comms
457+
protocols = [MCP, REST]
458+
hash = ""
459+
notes = "Discord REST API v10 cartridge — messages, channels, guilds, members, reactions, threads, search, status, file uploads"
460+
@end
461+
462+
463+
@cartridge(id="telegram-mcp"):
464+
name = "telegram-mcp"
465+
version = "0.1.0"
466+
status = Development
467+
tier = Ayo
468+
domain = Comms
469+
protocols = [MCP, REST]
470+
hash = ""
471+
notes = "Telegram Bot API cartridge — messages, updates, chats, media, webhooks, callbacks, stickers, forwarding, pinning"
472+
@end
473+
474+
475+
@cartridge(id="matrix-mcp"):
476+
name = "matrix-mcp"
477+
version = "0.1.0"
478+
status = Development
479+
tier = Ayo
480+
domain = Comms
481+
protocols = [MCP, REST]
482+
hash = ""
483+
notes = "Matrix Client-Server API v3 cartridge — messages, events, rooms, membership, state, sync, search, media, profiles, room creation"
484+
@end
485+
486+
487+
@cartridge(id="postgresql-mcp"):
488+
name = "postgresql-mcp"
489+
version = "0.1.0"
490+
status = Development
491+
tier = Ayo
492+
domain = Database
493+
protocols = [MCP, REST]
494+
hash = ""
495+
notes = "PostgreSQL database cartridge with parameterised queries, transaction support, and libpq C-ABI integration"
496+
@end
497+
498+
499+
@cartridge(id="redis-mcp"):
500+
name = "redis-mcp"
501+
version = "0.1.0"
502+
status = Development
503+
tier = Ayo
504+
domain = Database
505+
protocols = [MCP, REST]
506+
hash = ""
507+
notes = "Redis database cartridge with RESP protocol, pipeline support, and pub/sub"
508+
@end
509+
510+
511+
@cartridge(id="mongodb-mcp"):
512+
name = "mongodb-mcp"
513+
version = "0.1.0"
514+
status = Development
515+
tier = Ayo
516+
domain = Database
517+
protocols = [MCP, REST]
518+
hash = ""
519+
notes = "MongoDB database cartridge with BSON document handling, aggregation pipelines, and wire protocol integration"
520+
@end

cartridges/browser-mcp/README.adoc

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
= browser-mcp
2+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
:spdx: PMPL-1.0-or-later
4+
:tier: Ayo
5+
:domain: Browser
6+
:protocols: MCP, REST
7+
8+
== Overview
9+
10+
Browser automation cartridge for Firefox via the **Marionette protocol**.
11+
Connects to Firefox's built-in remote automation endpoint on `localhost:2828`
12+
(enabled by launching Firefox with `--marionette` or setting
13+
`marionette.enabled = true` in `about:config`).
14+
15+
Provides MCP tools for:
16+
17+
* **Navigate** — load a URL in the current tab
18+
* **Click** — click an element by CSS selector
19+
* **Type** — type text into a form element by CSS selector
20+
* **Screenshot** — capture the current viewport as PNG
21+
* **ReadPage** — extract DOM text content
22+
* **FillForm** — fill multiple form fields in one operation
23+
* **ExecuteJS** — execute JavaScript in page context
24+
* **TabCreate** / **TabClose** / **TabList** — manage browser tabs
25+
26+
Inspired by the Firefox MCP at `patallm-gallery/claude-integrations/firefox-mcp/`,
27+
which uses a Deno server + Firefox extension via WebSocket. This cartridge
28+
replaces that architecture with the standard BoJ Idris2/Zig/V-lang triple
29+
and connects directly to Marionette over TCP (no extension required).
30+
31+
== Architecture
32+
33+
[cols="1,1,2"]
34+
|===
35+
| Layer | Language | Purpose
36+
37+
| ABI
38+
| Idris2
39+
| Formally verified browser state machine (`Closed -> Connecting -> Connected -> Navigating`) with dependent-type proofs
40+
41+
| FFI
42+
| Zig
43+
| C-compatible implementation with thread-safe session pool, Marionette TCP protocol handling
44+
45+
| Adapter
46+
| V-lang
47+
| REST endpoint bridge to BoJ unified adapter protocol
48+
|===
49+
50+
=== Browser State Machine
51+
52+
....
53+
Closed --StartConnect--> Connecting
54+
Connecting --ConnectSuccess--> Connected
55+
Connecting --ConnectFail--> Error
56+
Connected --BeginNavigate--> Navigating
57+
Connected --Disconnect--> Closed
58+
Connected --ConnectedError--> Error
59+
Navigating --EndNavigate--> Connected
60+
Navigating --NavigateError--> Error
61+
Error --ErrorRecover--> Closed
62+
....
63+
64+
== Building
65+
66+
[source,bash]
67+
----
68+
# Build FFI shared library
69+
cd ffi && zig build
70+
71+
# Run FFI tests (state machine tests, no Firefox needed)
72+
cd ffi && zig build test
73+
74+
# Type-check ABI
75+
cd abi && idris2 --check BrowserMcp.SafeBrowser
76+
----
77+
78+
== Firefox Setup
79+
80+
To enable Marionette for automation:
81+
82+
[source,bash]
83+
----
84+
# Launch Firefox with Marionette enabled
85+
firefox --marionette
86+
87+
# Or set in about:config
88+
# marionette.enabled = true
89+
# marionette.port = 2828 (default)
90+
----
91+
92+
== REST Endpoints
93+
94+
[cols="1,2,2"]
95+
|===
96+
| Method | Path | Description
97+
98+
| POST | `/session` | Open a new browser session
99+
| DELETE | `/session/{slot}` | Close a session
100+
| GET | `/session/{slot}/state` | Get connection state
101+
| POST | `/session/{slot}/connect` | Connect to Firefox Marionette
102+
| POST | `/session/{slot}/disconnect` | Disconnect from Firefox
103+
| POST | `/session/{slot}/navigate` | Navigate to URL
104+
| POST | `/session/{slot}/click` | Click element by selector
105+
| POST | `/session/{slot}/type` | Type text into element
106+
| POST | `/session/{slot}/screenshot` | Capture screenshot
107+
| POST | `/session/{slot}/read_page` | Read page DOM text
108+
| POST | `/session/{slot}/tab` | Create new tab
109+
| DELETE | `/session/{slot}/tab/{idx}` | Close tab by index
110+
| GET | `/session/{slot}/tabs` | List open tabs
111+
|===
112+
113+
== PanLL Panel
114+
115+
The `panels/manifest.json` defines a monitoring panel with:
116+
117+
* Connection status badge (colour-coded by state)
118+
* Current URL display
119+
* Tab count indicator
120+
* Page title display
121+
* Screenshot thumbnail (refreshed every 30s)
122+
123+
== Status
124+
125+
Development — not yet ready for mounting.

0 commit comments

Comments
 (0)