Skip to content

Commit 814d409

Browse files
trilltinoclaude
andcommitted
Fold freelancer + research examples into marketplace and txodds
Five example dirs down to three, no functionality lost: - examples/freelancer/start.ts -> examples/marketplace/freelancer.ts and examples/research/start.ts -> examples/marketplace/research.ts — both were marketplace sessions already (same protocol, feed, visualizer, ledger); now they're rounds of the one market: npm start (classic), npm run freelancer (verifier-gated harnesses), npm run research (event-driven) - the odds-move watcher + detectEvents (+ tests) move to examples/txodds/research/ — they're tooling over the txodds proxy; the watcher is rewritten on node:http to match the proxy's style (drops the express dep), `npm run watch` there - examples/agent-economy README gains the "where the economy goes next" section tying its front doors to the market rounds - root npm run freelancer/research/research:watch retargeted; all inbound references fixed (README, CLAUDE.md, CORAL.md diagrams + file map, coral-agents READMEs, Dockerfile.claude, build-agents.sh, wantFeed.ts, ROADMAP.md keeps the history) Verified: txodds 10/10 tests (detect suite moved in), marketplace + txodds typecheck, watcher smoke (health / 204-on-empty / dead-proxy resilience). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 45e122c commit 814d409

28 files changed

Lines changed: 172 additions & 268 deletions

CLAUDE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ is **Venice AI** (free credits; `LLM_PROVIDER` also accepts `openai`/`anthropic`
2727

2828
| Directory | Purpose |
2929
|-----------|---------|
30-
| `examples/txodds/` | The World Cup Oracle (the headline example). `agent/` (`edge.ts` — the verified-odds→LLM-call transform; `service.ts` — the `deliverService` fork point; `escrow.ts` — the buyer-side escrow client), `server/` (`mint.ts`, `proxy.ts` — the live data + escrow proxy), `web/` (the no-build React app), `escrow/` (the Anchor escrow + arbiter programs — the settlement spine). |
30+
| `examples/txodds/` | The World Cup Oracle (the headline example). `agent/` (`edge.ts` — the verified-odds→LLM-call transform; `service.ts` — the `deliverService` fork point; `escrow.ts` — the buyer-side escrow client), `server/` (`mint.ts`, `proxy.ts` — the live data + escrow proxy), `web/` (the no-build React app), `research/` (`watcher.ts` + `detect.ts` — the odds-move event watcher feeding the research round; `npm run watch`), `escrow/` (the Anchor escrow + arbiter programs — the settlement spine). |
3131
| `examples/agent-economy/` | **Three front doors** on CoralOS (needs Docker): `autonomous/` (agent→agent purchase), `bridge/` (HTTP bridge + React checkout — the human front door), `quickstart/` (bare 402 pay-per-call, no Docker/CoralOS), `web/` (3-tab dashboard), `config/coral.toml`. Escrow references point at `examples/txodds/escrow/`. |
32-
| `examples/marketplace/` | **Competitive bidding market** (needs Docker): `start.ts` launches a buyer + persona sellers in one CoralOS session; `feed/` (folds session state into rounds AND persists each round to the **run ledger** `runs/`; serves `/api/runs` + `/api/reputation`; replays a session from disk when coral is down), `web/` (React visualizer + Playwright tests). Settles via the escrow. |
33-
| `examples/freelancer/` | **Verifier-gated freelancer market** (needs Docker): heterogeneous harnesses (`seller-scribe` node-llm vs `seller-claude` Claude Code) bid on a brief; `verifier-agent` gates the release. |
34-
| `examples/research/` | **Event-driven research market** (needs Docker + the txodds proxy): `src/watcher.ts` turns live odds moves into queued WANTs (`detectEvents`, tested); the buyer polls it via `WANT_FEED_URL` — quiet board, no spend. |
32+
| `examples/marketplace/` | **Competitive bidding market, three rounds** (needs Docker): `start.ts` (classic buyer + persona sellers), `freelancer.ts` (**verifier-gated**: heterogeneous harnesses — `seller-scribe` node-llm vs `seller-claude` Claude Code — bid on a brief; `verifier-agent` gates the release), `research.ts` (**event-driven**: the buyer polls the txodds watcher via `WANT_FEED_URL` — quiet board, no spend; needs the txodds proxy + `npm run watch` there); `feed/` (folds session state into rounds AND persists each round to the **run ledger** `runs/`; serves `/api/runs` + `/api/reputation`; replays a session from disk when coral is down), `web/` (React visualizer + Playwright tests). Settles via the escrow. |
3533
| `packages/agent-runtime/` | The runtime, one folder each under `src/`: the LLM provider shim (`llm/`), Solana Pay + devnet guard (`solana/`), a CoralOS MCP client (`coral/`), the market protocol incl. VERIFY/VERIFIED (`market/`), the **run ledger + reputation** (`ledger/`), and the **policy choke point** (`policy/` — spend caps, payout/award-price binding, verifier gate). Root `src/index.ts` re-exports all of them. |
3634
| `packages/harness-runtime/` | The **harness adapter SDK**: one `HarnessAdapter` interface (`quote`/`run`, hash-bound deliveries, streamed events) so a seller can be a prompt (`node-llm`), headless Claude Code (`claude-code`, Coral MCP config injection), or any CLI (`HARNESS=cli HARNESS_CMD='hermes {prompt}'`). Harness processes never hold keys. Build after agent-runtime. |
3735
| `coral-agents/` | The agents coral-server launches per session: `buyer-agent` (policy-enforced, verifier-gated, event-mode capable), `seller-agent` (harness-adapter seller; personas `seller-worldcup`/`seller-scribe`/`seller-claude`/`seller-moves`/`seller-stats` reuse its image), `verifier-agent` (independent delivery checks — release gate), plus `broker/` (swarm — buys upstream, resells at a markup, escrow both legs), `echo-agent/` (minimal test agent), `user_proxy/` (the human's puppet for the bridge). |

CORAL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ the kit does**. If you want the LLM equivalent of this doc, see [LLM.md](LLM.md)
3737
│ coral.toml registry scan of /agents/*, auth, docker host │
3838
│ examples/txodds/coral/round.ts POST /api/v1/local/session (agent graph)│
3939
│ examples/marketplace/start.ts " (buyer + persona sellers) │
40-
│ examples/freelancer/start.ts " (harness sellers + the verifier gate) │
41-
│ examples/research/start.ts " (event-mode buyer + specialists) │
40+
│ examples/marketplace/freelancer.ts " (harness sellers + the verifier gate) │
41+
│ examples/marketplace/research.ts " (event-mode buyer + specialists) │
4242
│ examples/agent-economy/bridge " + the puppet API (human → agent) │
4343
└──────────────────────────────────────────────────────────────────────────────┘
4444
│ spawns, injects CORAL_CONNECTION_URL
@@ -391,8 +391,8 @@ the doc page that shows you how.
391391
| [examples/txodds/coral/coral.toml](examples/txodds/coral/coral.toml) | coral-server config: registry scan, auth, docker host (no wallet) |
392392
| [examples/txodds/coral/round.ts](examples/txodds/coral/round.ts) | Launches the TxODDS round via `POST /api/v1/local/session` |
393393
| [examples/marketplace/start.ts](examples/marketplace/start.ts) | Launches the competitive market (buyer + persona sellers) |
394-
| [examples/freelancer/start.ts](examples/freelancer/start.ts) | Launches the freelancer market (harness sellers + the verifier release gate) |
395-
| [examples/research/start.ts](examples/research/start.ts) | Launches the research market (event-mode buyer; the watcher queues WANTs) |
394+
| [examples/marketplace/freelancer.ts](examples/marketplace/freelancer.ts) | Launches the freelancer round (harness sellers + the verifier release gate) |
395+
| [examples/marketplace/research.ts](examples/marketplace/research.ts) | Launches the research round (event-mode buyer; [txodds/research/watcher.ts](examples/txodds/research/watcher.ts) queues the WANTs) |
396396
| [coral-agents/verifier-agent/](coral-agents/verifier-agent/README.md) | Independent delivery verifier — `VERIFY` in, `VERIFIED pass\|fail` out |
397397
| [packages/harness-runtime/](packages/harness-runtime/README.md) | Harness adapter SDK — Claude Code / any CLI as a market seller |
398398
| [examples/agent-economy/bridge/server.ts](examples/agent-economy/bridge/server.ts) | Human → agent bridge: the puppet API + extended-state reads |

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ Some things agents can sell on these exact rails:
3434
| **Oracle agent** | a verified fact / a checked output | trust in a number |
3535
| **Reseller agent** | packages other agents' services into one | a bundle, one payment |
3636

37-
The first two already ship as working markets: [`examples/freelancer`](examples/freelancer/README.md)
38-
(heterogeneous harnesses — a plain LLM vs headless **Claude Code** — bid on a brief, an independent
39-
verifier gates the release) and [`examples/research`](examples/research/README.md) (live odds moves
40-
trigger the WANT — quiet board, no spend). Fork those instead of starting blank.
37+
The first two already ship as working marketplace rounds: `npm run freelancer` (heterogeneous
38+
harnesses — a plain LLM vs headless **Claude Code** — bid on a brief, an independent verifier gates
39+
the release) and `npm run research` (live odds moves trigger the WANT — quiet board, no spend).
40+
See [`examples/marketplace`](examples/marketplace/README.md); fork those instead of starting blank.
4141

4242
> **The World Cup oracle is only the default demo — not the product.** It sells a verified, de-margined
4343
> betting line to prove the rails work end-to-end. The invitation isn't "here's a repo about sports
@@ -230,10 +230,8 @@ deployed ids with no local build. **Devnet only** — never put a funded mainnet
230230

231231
| Directory | Purpose |
232232
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
233-
| `examples/txodds/` | **the default demo** — the World Cup oracle. `agent/` (`service.ts` = the `deliverService()` fork point; `edge.ts` = its transform; escrow/arbiter clients), `server/` (proxy + mint), `web/` (React board), `escrow/` (the two Anchor programs) |
234-
| `examples/marketplace/` | **the full market** — a buyer + competing sellers in one CoralOS session; `feed/` (rounds + the **run ledger** `runs/`, `/api/runs`, `/api/reputation`, disk replay), `web/` (React visualizer). Needs Docker |
235-
| `examples/freelancer/` | **the freelancer market** — heterogeneous harnesses (plain LLM vs **Claude Code**) bid on a brief; the **verifier** gates the arbiter release. Needs Docker |
236-
| `examples/research/` | **the research market** — live odds moves trigger paid research WANTs (event watcher + event-mode buyer; quiet board = no spend). Needs Docker + the txodds proxy |
233+
| `examples/txodds/` | **the default demo** — the World Cup oracle. `agent/` (`service.ts` = the `deliverService()` fork point; `edge.ts` = its transform; escrow/arbiter clients), `server/` (proxy + mint), `web/` (React board), `research/` (the odds-move **event watcher** feeding the research round), `escrow/` (the two Anchor programs) |
234+
| `examples/marketplace/` | **the full market** — a buyer + competing sellers in one CoralOS session, in three rounds: `start.ts` (classic), `freelancer.ts` (harness sellers + **verifier-gated** release), `research.ts` (event-driven — odds moves trigger the WANTs); `feed/` (rounds + the **run ledger** `runs/`, `/api/runs`, `/api/reputation`, disk replay), `web/` (React visualizer). Needs Docker |
237235
| `examples/agent-economy/` | **three front doors** on CoralOS — autonomous (agent→agent), a human checkout bridge, and a bare 402 pay-per-call quickstart |
238236
| `coral-agents/` | the agents coral-server launches per session —`buyer-agent`, `seller-agent` (+ personas incl. `seller-claude`), `verifier-agent` (the release gate), `broker` (swarm reseller), `echo-agent`, `user_proxy` |
239237
| `packages/agent-runtime/` | the runtime —`llm/`, `solana/`, `coral/`, `market/`, `ledger/`, `policy/` |

0 commit comments

Comments
 (0)