Minimal Agent Task Ledger with WORM audit trail, Ed25519 signing, and formal verification.
Zero runtime dependencies. TypeScript + Node.js native http + JSONL storage.
git clone https://github.com/SNAPKITTYWEST/agent-farm-gauntlet.git cd agent-farm-gauntlet npm install npm run verify npm start
Server runs on http://127.0.0.1:3847.
| Command | Description |
|---|---|
npm install | Install dependencies |
npm run build | Compile TypeScript |
npm test | Run 21 tests |
npm start | Start server on :3847 |
npm run verify | Build + test + chain verify |
node scripts/doctor.js | Check environment |
node scripts/verify-chain.js | Verify WORM chain |
┌─────────────────────────────────────────────────────────┐
│ CONSTITUTION │
│ Supreme governance. Immutable. 86 lines. │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ TRUST DEED │
│ TD-GAUNTLET-001. 4 obligations. 4 conditions. │
│ deployment_allowed := security ∧ compliance │
│ ∧ logic ∧ human │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ AGENT RUNTIME │
│ 8 source files. 996 lines. Ed25519 signing. │
│ HTTP server → Middleware → State machine → WORM │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ WORM LEDGER │
│ 8 entries. Hash-chained. Append-only. Sealed. │
└─────────────────────────────────────────────────────────┘
| Control | Mechanism | Status |
|---|---|---|
| Agent Identity | Ed25519 keypairs | ENFORCED |
| Request Signing | requireSignedAgent middleware | ENFORCED |
| Hash Chain | SHA-256 with | delimiters | ENFORCED |
| Atomic Writes | tmp → fsync → rename | ENFORCED |
| File Locking | PID-based stale detection | ENFORCED |
| Body Size Limit | 100KB max | ENFORCED |
| State Machine | Validated transitions | ENFORCED |
| Tamper Detection | Hash chain (sorry in Lean) | PARTIAL |
| Property | Status | Location |
|---|---|---|
| deployment_allowed → security_passed | PROVEN | TrustDeed.lean:34 |
| deployment_allowed → human_approved | PROVEN | TrustDeed.lean:39 |
| trust_deed_is_supreme | PROVEN | TrustDeed.lean:82 |
| completed_is_terminal | PROVEN | TaskInvariants.lean:33 |
| rejected_is_terminal | PROVEN | TaskInvariants.lean:38 |
| pending_cannot_complete | PROVEN | TaskInvariants.lean:43 |
| in_progress_cannot_rollback | PROVEN | TaskInvariants.lean:48 |
| tamper_detected | sorry | LedgerChain.lean:72 |
| chain_implies_monotonic | sorry | LedgerChain.lean:87 |
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
| GET | /cold-boot | Cold boot visualization |
| GET | /agents/:name/public-key | Agent public key |
| POST | /tasks | Create task (signed) |
| GET | /tasks | List tasks |
| GET | /tasks/:id | Get task |
| POST | /tasks/:id/start | Start task (signed) |
| POST | /tasks/:id/complete | Complete task (signed) |
| POST | /tasks/:id/reject | Reject task (signed) |
| GET | /worm | View WORM chain |
| POST | /worm/verify | Verify chain integrity |
MIT