Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions PHASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,16 @@ handoff_receive

A real Grok Bot can pair → status → exec → read/write file through the public endpoint.

**Status:** IMPLEMENTED (2026-08-22) for the unpaid protocol + capability gate (FakeProvider, in-process / loopback HTTP). Real Grok Bot through a public HTTPS URL remains **manual** and is **not** claimed here. Do not merge until explicit approval.
**Status:** IMPLEMENTED + POST-MERGE HARDENING **MERGED / ON MAIN** (2026-08-23). The unpaid protocol + capability gate (FakeProvider, in-process / loopback HTTP) is closed by tests. Real Grok Bot through a public HTTPS URL remains **manual, not claimed — pending explicit approval to deploy**. Paid Runloop: **not required** for unpaid C5 and **not run**. C6: **not started**.

**Evidence**
- Branch: `feat/c5-mcp-gateway`
- Base: `main` after [Adaptive-Liquidity/floks-pc#6](https://github.com/Adaptive-Liquidity/floks-pc/pull/6) (`1fcedac`)
- Unpaid: `npm run typecheck` + `npm test` + `npm run build` + `npm run verify` — **155 pass / 0 fail** (22 C5)
- Branch: `feat/c5-mcp-gateway` → merged as [Adaptive-Liquidity/floks-pc#7](https://github.com/Adaptive-Liquidity/floks-pc/pull/7) (`3013fbc`), base `main` after [Adaptive-Liquidity/floks-pc#6](https://github.com/Adaptive-Liquidity/floks-pc/pull/6) (`1fcedac`)
- Post-merge hardening: `fix/c5-mcp-post-merge-hardening` → merged as [Adaptive-Liquidity/floks-pc#8](https://github.com/Adaptive-Liquidity/floks-pc/pull/8) (`26d85be`, head `d835c17`)
- Top-level MCP HTTP never-hang: sanitized JSON-RPC 500, notifications settle 202, client aborts end without hanging
- Aborted body / `readBody` settlement (`ABORTED` vs `PAYLOAD_TOO_LARGE`)
- `MCP-Protocol-Version` response header comes from negotiated/supported version — never echoes an unsupported version
- Pair throttle saturation **fail-closed**; throttled identities not evicted by flooding; unvalidated Bearer values never mint throttle identities
- Unpaid verification on main (`26d85be`): `npm run typecheck` + `npm test` + `npm run build` + `npm run verify` — **167 pass / 0 fail** (34 C5, incl. 12 hardening cases)
- Paid Runloop: **not required** and **not run**
- Isolation: zero writes under Floks-main
- Nexus / graph flags remain false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ All computer domain logic, providers, migrations, worker, and MCP surface live h
| **C3A** — Runloop Devbox compute substrate | **CLOSED / PASSED** |
| **C3B** — interactive computer (display, browser, screenshot, bounded input) | **CLOSED / PASSED** |
| **C4** — pair codes + capability tokens (internal layer) | **CLOSED / PASSED** |
| **C5** — Flok MCP Gateway (`POST /mcp`, eight tools) | **IMPLEMENTED** (unpaid FakeProvider tests; real Grok Bot / public URL remains manual) |
| **C5** — Flok MCP Gateway (`POST /mcp`, eight tools) | **IMPLEMENTED + hardening merged on main** (unpaid FakeProvider tests; real Grok Bot / public URL remains manual) |
| C6+ | Not started (Nexus-IQ remains hard-locked until G0) |

## Authority files (read in this order)
Expand Down
7 changes: 7 additions & 0 deletions docs/computers/MCP.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ Status:
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"computer_status","arguments":{"capability_token":"fakeTokenNotARealSecret","computer_handle":"computer_example"}}}
```

## Post-merge hardening (PR #8, on main)

- **Never-hang:** any unhandled gateway throw ends the response — sanitized JSON-RPC `500 INTERNAL` for requests, `202` (no body) for notifications. Client aborts while uploading settle immediately.
- **Protocol header honesty:** `MCP-Protocol-Version` response header is taken from the negotiated/supported version. An unsupported client-presented version is never echoed.
- **Throttle fail-closed:** pair-connection throttle evicts only expired or under-limit entries; a saturated map of throttled identities rejects unknown identities instead of letting them pass unthrottled.
- **No unvalidated Bearer identity:** caller-supplied `Authorization` is only used for throttle identity when `FLOK_MCP_AUTH_TOKEN` is configured and the Bearer already passed validation. Without wrapper auth configured, unauthenticated connections key on remote address.

## Env / config

| Variable | Required for unit tests | Meaning |
Expand Down