21 Commits

Author SHA1 Message Date
c04631ccee docs: product demo video + screenshots, Track-1 agent address, Render blueprint
- docs/assets/product-demo.mp4 — 30s captioned product tour (cockpit → proof →
  Track 1/2 → risk → self-custody), built from live paper-data screenshots
- README: Demo section (video + cockpit/proof screenshots), Track-1 agent
  address 0x0c2c…f83E + ERC-8004 registry, Render deploy, corrected live creds
- render.yaml — Render Blueprint for the read-only API (Docker)
- public/ — source logo art (high-res); skills-lock.json — installed TWAK skills
2026-06-17 01:13:56 +03:00
4f4195992c feat(dashboard): wire Guardrail Alpha logo — navbar, tab-bar favicon, README
Web-optimized from source art (10MB raw → ~196K/104K/52K): full lockup in
the navbar via next/image, shield icon as App Router favicon + apple-icon,
logo banner atop the README.
2026-06-17 00:28:19 +03:00
8577e22186
fix(api): configurable bind address + smoke curl timeout (#20)
- guardrail-api: resolve listen addr from GUARDRAIL_API_ADDR > PORT > default
  0.0.0.0:8080, so it can coexist with a port conflict (e.g. a stray Docker
  proxy holding :8080) instead of being unreachable.
- smoke_quant.sh: add curl --max-time 8 so a stuck/hijacked socket fails the
  check cleanly instead of hanging the whole smoke forever.
- docs/API.md: correct bind host (0.0.0.0, not 127.0.0.1) + document override.

Verified live: API on 127.0.0.1:8091 via GUARDRAIL_API_ADDR, all 9 quant
endpoints PASS through smoke_quant.sh (exit 0).
2026-06-16 19:33:10 +03:00
dd4a9f310c
feat(api): GET /portfolio/risk — concentration metrics (HHI, effective-N) (#16)
Concentration view over the live run-report positions: HHI, effective number
of positions, largest position, invested vs stable-reserve, and a
diversified/moderate/concentrated label. Read-only, pure. Complements /exposure
and /risk. Route count -> 77.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:26:30 +03:00
c4182cab0e
feat(api): /equity/indicators — ta-signals over the live NAV curve (#14)
* feat(api): GET /equity/indicators — ta-signals over the live NAV curve

Computes sma/ema/rsi (via the ta-signals crate) over the agent's actual NAV
series from PortfolioReconciled events — real indicators on real agent data,
read-only, no trading-loop behavior change. ?indicator=&period=.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: route count -> 76 (/equity/indicators)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:16:34 +03:00
9c7018b8f2
docs: QUANT.md — consolidated quant-suite reference (#13)
One reference for the six quant tools, each documented across all five surfaces
(crate/API/page/SDK/CLI) with runnable CLI/API/SDK examples and design notes.
Linked from the README.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:13:26 +03:00
b703b74b0e
feat: correlation SDK (TS/Py/Go) + CLI parity (#11)
Completes the correlation vertical (crate->API->page->SDK->CLI):
- SDKs: correlation(series) in TS, Python, Go (tsc/go/py verified).
- CLI: 'corr --series "A:…;B:…"' prints the matrix (verified A=C 1.00, AvB -1.00).
CLI subcommands -> 46.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 15:05:09 +03:00
1031567ebc
feat(product): correlation crate + GET /correlation + page + /quant hub entry (#10)
- crates/correlation: Pearson/covariance/stddev/beta, rolling correlation, and a
  named-series correlation matrix. Pure f64; zero-variance -> 0.0 (never NaN).
  6 unit tests + doctest.
- GET /correlation?series=NAME:v1,v2,…;NAME2:… -> correlation matrix (2 tests).
- /correlation dashboard page renders the matrix with green/red tint by value;
  added to the /quant hub.
- Registered in workspace; build green, clippy clean, tsc clean.
- Counts: 28 crates, 75 routes, 74 pages; docs synced.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:59:58 +03:00
699efeafd8
feat: quant suite finish — /pnl SDK parity, /quant hub, health-aggregator (#7)
* feat(sdk): /pnl methods in TS, Python, and Go clients

3-language SDK parity for the PnL attribution endpoint:
- TS: pnl(fills?, marks?)
- Python: pnl(fills=None, marks=None)
- Go: PnL(ctx, fills, marks)
tsc clean; Python imports; go vet+build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): health-aggregator Go service

services/health-aggregator: read-only ops service that polls the /health
endpoints of the Guardrail services concurrently (goroutine per target, 5s
timeout) and serves a single aggregate (200 all-up / 503 degraded) with
per-target up/latency/error. GET /health, GET /targets; HEALTH_TARGETS /
HEALTH_ADDR env. go vet + build clean; smoke verified (degraded 0/3 with no
services up).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(dashboard): /quant hub page indexing the quant suite

A single index of the quant tools (ta-studio, fees, sizer, orderbook, pnl) —
each with its API route and a live example link; shows the CMC-capabilities
summary. tsc clean. Dashboard pages -> 73.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(whats-new): Phase 3 quant suite (crate->API->page->SDK->CLI) + health-aggregator

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:44:17 +03:00
0814423b61
feat: PnL attribution (crate + /pnl API + page + CLI) (#6)
* feat(product): pnl-attribution crate + GET /pnl + dashboard page

Average-cost realized/unrealized PnL attribution from a fill stream — core
trading-product functionality.
- crates/pnl-attribution: per-symbol position/avg-cost, realized PnL on sells,
  unrealized from marks, fees; portfolio totals. 5 tests + doctest.
- GET /pnl?fills=SYM,buy,qty,price[,fee];…&marks=SYM:price — runs the real
  attributor (2 parse tests).
- /pnl dashboard page renders per-symbol + total PnL.
- Registered in workspace; build green, clippy clean, tsc clean.
- Counts: 27 crates, 74 routes, 72 pages; docs synced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(cli): pnl subcommand (completes the quant CLI suite)

guardrail-cli gains 'pnl --fills … --marks …' driving pnl-attribution directly.
Verified: CAKE buy10@2/sell4@3, mark 3 -> realized 4, unrealized 6, total 10.
All five quant crates now have a CLI subcommand. CLI subcommands -> 45.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:34:55 +03:00
fb1c95d0a4 feat(cli): ta/fees/size/book subcommands (quant crates, no API)
guardrail-cli now drives the new quant crates directly, offline:
- ta --indicator sma|ema|rsi|macd|bollinger --series … --period N (ta-signals)
- fees --notional --quantity --side (fee-model)
- size --method kelly|vol_target … (position-sizer)
- book --orders "s,limit,101,5;b,market,,6" (orderbook matching engine)
New commands/quant.rs; build + clippy clean; all four verified (correct
kelly/sma/cost/match output). CLI subcommands -> 44; CLI.md synced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:16:47 +03:00
5bb90f10ef
feat: Go SDK parity + orderbook API/page surface (#5)
* feat(sdk): Go client methods for /ta, /fees, /sizer, /cmc/capabilities

Completes 3-language SDK parity (TS + Python + Go) for the new quant endpoints.
- TA(ctx, indicator, series, period, mult)
- Fees(ctx, params), Sizer(ctx, method, params)
- CMCCapabilities(ctx)
All via the existing getMapQuery helper; go vet + build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): expose orderbook matching engine via GET /orderbook + page

Closes the last crate-without-a-surface. GET /orderbook builds a book from a
compact `side,kind,price,qty;…` spec, runs the real matching engine, and returns
trades + top-of-book + aggregated depth (2 parse tests). New /orderbook
dashboard page renders trades and bid/ask depth (tsc clean). Route count -> 73,
pages -> 71; docs synced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:12:56 +03:00
0d7f3e4a26
feat: product expansion + production hardening (16 components, 4 langs) (#4)
* feat(prod): fail-fast on missing live creds + client hardening

No more silent mock fallback — the defining hackathon→product fix.

- agent-runtime: build_data_source/build_executor now return Result and
  refuse to run on mock data in LIVE mode (missing CMC_API_KEY/mcp_url,
  use_mock=true, twak.mode="mock", or a network transport without base_url
  all error instead of silently trading on fake data from a fake wallet).
  Paper mode still degrades to mock. +3 deterministic fail-fast tests.
- twak-client: REST and MCP transports now use a 20s request timeout
  (was reqwest's no-timeout default — a hung TWAK endpoint could stall
  the trading loop forever).
- cmc-client: a missing/non-positive quote price now skips the asset with
  a warning instead of feeding a $0 price into the strategy/risk engine.
- agent-runtime: run-report dir create failure is logged, not swallowed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(prod): doc truth, strip hackathon scaffolding, observability (chunks 2-4)

Chunk 2 — doc↔code truth:
- Fix stale counts: 69 routes (README/API/ARCHITECTURE), 64 dashboard pages
  (ARCHITECTURE), and mark the route/page tables as representative subsets.

Chunk 3 — strip hackathon scaffolding:
- Archive pure prize/judge docs to docs/archive/hackathon/ (SUBMISSION,
  HACKATHON, PRIZE_MAP, PITCH, JUDGE_DEMO, TRACK2, DEMO_SCRIPT) and judge
  scripts to scripts/archive/. Reframe README "Hackathon tracks" -> "Capabilities"
  and fix the now-archived links. Product-relevant docs (architecture, risk,
  strategy, runbook, proof/identity, CMC hub) stay.

Chunk 4 — observability + tests:
- agent-runtime: build_data_source/build_executor return a transport label;
  AgentStarted payload now carries cmc_transport + twak_transport, plus a
  "transports resolved" structured log — operators can see live-vs-mock at a glance.
- cmc-client: extract parse_quotes pure helper + 6 tests for the price-skip behavior.

Workspace builds green, clippy clean, tests pass, paper run verified.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): orderbook + ta-signals crates + /ta API route

Two real, pure-Rust product crates (no mocks), integrated into the workspace,
plus a real API surface exposing the indicators.

- crates/orderbook: in-memory limit order book with a price-time-priority
  matching engine — limit/market orders, partial fills, multi-level market
  sweeps, FIFO time priority, cancel, best bid/ask, spread, aggregated depth.
  8 unit tests + a doctest.
- crates/ta-signals: technical-analysis library — SMA, EMA, RSI (Wilder),
  MACD, Bollinger Bands, ATR, Stochastic, OBV, ADX (full Wilder directional
  system), VWAP. Each returns an input-aligned Vec with NaN warmup; correct
  algorithms with known-value tests. 24 unit tests + a doctest.
- apps/guardrail-api GET /ta: compute sma/ema/rsi/macd/bollinger over a
  caller-supplied close series via ta-signals (NaN -> JSON null). Route count
  -> 70; docs synced.

Workspace builds green, clippy clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): price-oracle Go microservice + README count sync

services/price-oracle: a real read-only Go microservice serving live USD
prices for the BSC universe from the free CoinGecko public API, cached behind
a TTL. No key, no chain, no writes.
- oracle/coingecko.go: real HTTP client (timeout, UA, error handling) over
  /simple/price for 10 tracked symbols.
- oracle/cache.go: thread-safe TTL cache; stale-on-error graceful degradation.
- oracle/server.go: net/http (go1.22 method+path patterns) — GET /health,
  /prices, /prices/{symbol}, /prices/refresh; JSON; access logging.
- main.go: PORT/ORACLE_TTL/ORACLE_HTTP_TIMEOUT env, read-header timeout.
- go vet clean, go build ok; verified live: /prices/BTC returned a real price.

docs: sync README "What's inside" counts to reality (24 crates, 70 routes,
64 pages).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): risk-analytics service (metrics engine + API + CLI)

services/risk-analytics: portfolio risk/performance metrics over the agent's
NAV curve. Pure-stdlib engine + CLI (run anywhere, no numpy); optional FastAPI
HTTP surface.
- risk_analytics/metrics.py: total/annualized return, annualized vol, max
  drawdown, Sharpe, Sortino, Calmar, historical + parametric VaR (Acklam
  inverse-normal), Pearson correlation matrix. Doctested formulas.
- store.py: reads the NAV series from portfolio_reconciled events in the
  SQLite log. api.py: import-guarded FastAPI (POST /metrics, /correlation,
  GET /metrics/live, /health). cli.py: metrics/live/demo subcommands.
- Verified: doctests pass; CLI demo + live (over the real event log) produce
  correct metrics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): 3 new dashboard pages (market-oracle, transports, journal-pro)

Real Next.js server components over the read-only API; nav links added.
- /market-oracle: renders the CMC data->capability lineage from
  GET /cmc/capabilities (datasets + capabilities tables, summary).
- /transports: surfaces the running agent's resolved cmc/twak transports +
  mode from the latest agent_started event, flagging live-with-mock.
- /journal-pro: GET /events with a client-side event-type filter (a small
  "use client" JournalTable component).
- src/lib/types-expansion.ts holds the new types (existing types.ts untouched).
- tsc --noEmit clean. Dashboard pages -> 67.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): grctl read-only operator CLI (Go)

clients/go-cli: a dependency-free Go CLI over the read-only API.
- internal/client: net/http client (10s timeout, non-2xx errors, JSON decode).
- internal/commands: status/regime/portfolio/trades/risk/signals/proof/verify/
  events/cockpit + watch (polls /regime); clean tabwriter summaries or --json.
- main.go: --api/$GUARDRAIL_API base, --json flag, help.
- go vet clean, go build ok.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): guardrail-term terminal client (TypeScript)

clients/ts-terminal: a typed, dependency-free Node CLI over the read-only API.
Uses built-in fetch; DOM lib + a tiny process shim so it typechecks with zero
deps (no @types/node).
- src/api.ts: read-only client (AbortController 10s timeout, non-2xx errors).
- src/render.ts: ANSI color + aligned kv/table helpers (no deps).
- src/index.ts: status/regime/portfolio/trades/risk/signals/proof/verify/
  events/cockpit/watch; --api/$GUARDRAIL_API, --json; colored verify table.
- tsc --noEmit clean; built + ran help to verify.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): strategy parameter optimizer (Python)

python-lab/optimizer: grid + random search over the agent's strategy params,
maximizing Calmar or Sharpe. Pure stdlib (no numpy/requests).
- objective.py: calmar/sharpe/max_drawdown/annualized_return over an equity curve.
- model.py: deterministic synthetic equity surface with a hidden optimum.
- grid.py: grid_search + seeded random_search.
- runner.py: offline scorer (synthetic) + api_backtest scorer (urllib over
  GET /skills/{skill}/backtest?preset=).
- cli.py: --offline/--api, --metric, --random N, --csv, --top.
- Verified: offline grid rediscovers the hidden ideal params as the top Calmar.

8/8 product-expansion components shipped (orderbook, ta-signals+/ta, price-oracle,
risk-analytics, dashboard pages, grctl, ts-terminal, optimizer).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(whats-new): Phase 3 product-expansion entry + fix archived companion links

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): batch 2 — position-sizer, fee-model, notification-relay, reporting, ta-studio

Five more real components (workflow-built, integrated + verified). Workspace
builds green; new Rust crates carry unit tests.

- crates/position-sizer (Rust): fixed-fractional, vol-target, Kelly (fractional
  + cap), equal-risk-contribution weights. 39 tests + 5 doctests. forbid(unsafe).
- crates/fee-model (Rust): all-in swap cost — gas, constant-product price impact
  + linear slippage, protocol fee; CostBreakdown w/ effective price. 16 tests + doctest.
- services/notification-relay (Go): concurrent webhook fan-out (POST /notify ->
  goroutine per target, per-attempt timeout + retry, 200/207/502, delivery
  report), GET /health, graceful shutdown. vet + build clean.
- python-lab/reporting (Python, stdlib): reads the event log read-only + run
  report, computes drawdown/return/sharpe, renders a self-contained HTML (or
  text) report. Verified against the real DB.
- dashboard /ta-studio: page driving the new GET /ta endpoint (searchParams ->
  indicator/series/period), NaN warmup rendered as "—"; nav link added. tsc clean.

Both new crates registered in the workspace; cargo build --workspace green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): expose fee-model + position-sizer via GET /fees and /sizer

Two real API routes over the new crates, wiring crate -> API.
- GET /fees: all-in swap cost (gas + price-impact/slippage + protocol fee) from
  fee-model; query params with sensible defaults, buy/sell side.
- GET /sizer: position sizing from position-sizer — method=fixed_fractional|
  vol_target|kelly with their params; returns input + output (or a typed error).
- guardrail-api deps + modules + routes wired; build + clippy clean.
- Route count -> 72; README/API/ARCHITECTURE synced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): /fees + /sizer dashboard pages (crate -> API -> page verticals)

Two new Next.js pages closing the verticals for the fee-model and
position-sizer crates:
- /fees: renders GET /fees cost breakdown; ?notional_usd/quantity/side drive it.
- /sizer: renders GET /sizer input+output; ?method=fixed_fractional|vol_target|
  kelly + params.
Nav links added; inline types; tsc --noEmit clean. Dashboard pages -> 70;
README/ARCHITECTURE synced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(product): Monte Carlo outcome simulator (Python)

python-lab/montecarlo: simulate strategy equity outcomes — terminal-value
distribution, max-drawdown risk, prob of loss, prob of ruin. Pure stdlib.
- sim.py: bootstrap (resample a historical return series) + GBM engines;
  per-path max drawdown; percentile/ruin summary.
- cli.py: --demo/--bootstrap/--gbm, reads NAV from the event log (read-only)
  with --db, configurable paths/horizon/mu/sigma/ruin.
- Verified: demo + gbm produce sensible distributions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(sdk): TypeScript SDK methods for /ta, /fees, /sizer, /cmc/capabilities

Make the new quant endpoints consumable from the typed client:
- ta(params): compute an indicator over a close-price series.
- fees(params): all-in swap cost (camelCase -> snake_case query mapping).
- sizer(params): position sizing by method.
- cmcCapabilities(): CMC data->capability lineage.
Typed param interfaces (TaParams/FeesParams/SizerParams); tsc --noEmit clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(sdk): Python client methods for /ta, /fees, /sizer, /cmc/capabilities

Parity with the TS SDK — ta(indicator, series, ...), fees(**params),
sizer(method, **params), cmc_capabilities(). Stdlib urllib; imports clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: README clients count 9->11 (grctl, guardrail-term) + services list

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 14:05:15 +03:00
c7d296d2c5
feat: submission-complete — proof capture, CMC hub lineage, live wiring, docker fix (#3)
* fix(docker): deterministic pnpm + CI flag for dashboard image

corepack enable downloaded a nondeterministic 'latest' pnpm (v11+) whose
TTY/CI gates broke the non-interactive build. Pin pnpm@9.15.4, set CI=true,
require the lockfile (drop the silent '|| pnpm install' fallback). Verified
with a full local 'docker build -f infra/Dockerfile.dashboard .' (next build
completes, image exports). Greens the docker CI job.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(cmc): CMC Agent Hub capability/lineage surface (Phase B)

Make the CMC integration verifiable and discoverable, not just asserted —
the gap that kept the CMC Agent Hub lane at PARTIAL. Read-only only; no
execution is ever exposed to the hub.

- configs/cmc/capabilities.json: single source of truth declaring each CMC
  dataset (quotes/OHLCV/Fear&Greed/DEX-liquidity/security/trending/global)
  -> the capability it powers, with the exact cmc-client source and the
  API route / MCP tool that exposes it.
- GET /cmc/capabilities (apps/guardrail-api/src/cmc_capabilities.rs): serves
  the descriptor + a summary (datasets, capabilities, execution_exposed=false).
- MCP resource guardrail://cmc/capabilities mirrors the descriptor.
- agent_card.json: advertise a "CMC Agent Hub" service so the agent is
  discoverable from its ERC-8004 identity document.
- docs/CMC_AGENT_HUB.md + PRIZE_MAP row.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(submission): one-command proof capture + evidence auto-ticker (Phase C)

Turn the unchecked submission checklist into a captured, evidence-backed
artifact in one command — and tick it from real evidence, never by hand.

- python-lab/scripts/tick_checklist.py: reads the SQLite event log, the run
  report, and configs, then flips each proof-artifact checkbox based on whether
  the artifact actually exists, and regenerates an evidence table. Honest by
  construction: items needing a real on-chain tx report "pending (live)" in
  paper mode instead of a false tick. Evidence is scoped to the primary run's
  run_id so the shared-DB kill-switch demo can't shadow it.
- configs/risk_policy.killswitch_demo.json + configs/killswitch_demo.toml: a
  low-threshold (0.05%) policy/config that trips the kill switch on a normal
  paper run, emitting a real KillSwitchTriggered event (shared DB, throwaway
  report so the primary run report is preserved).
- scripts/capture_submission.sh: orchestrates run -> kill-switch demo -> export
  submission.md -> proof-verify -> tick. Offline-safe (paper/mock); flips to
  live when keys + production config are supplied.

Verified end-to-end: a paper capture ticks 10/11 from real evidence; only
Competition registration stays pending (live), exactly as it should.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(live): registration wiring + go-live preflight + go_live.sh (Phase D)

Make the live path turn-key and the on-chain registration proof flow end to
end, so the keyed go-live (the one human-in-the-loop step) is a single safe
command.

- agent-runtime: thread the competition registration tx through RunMeta into
  the run report, the AgentProof, and the AgentReportPublished summary — but
  only for a real LIVE registration. In paper the mock executor's synthetic
  hash is logged as an event for the demo and never presented as an anchored
  on-chain tx, so proof_verify and the checklist stay honest (registration =
  pending until live). The run report now also carries agent_id.
- guardrail-doctor --live: a preflight safety gate — required credentials
  (CMC_API_KEY, BSC_RPC_URL, TWAK transport), production config in live mode,
  and conservative policy caps. Env + file checks only; refuses to green when
  unconfigured. +2 tests.
- tick_checklist.py: registration ticks only on a live tx; a paper mock stays
  pending (live).
- scripts/go_live.sh: preflight -> on-chain reachability -> confirm -> bounded
  live run -> capture proof -> print BscScan links. Requires a typed "GO LIVE"
  confirmation (spends real money) unless --yes.

Workspace builds green, clippy clean, agent-runtime e2e tests pass, paper
capture still ticks 10/11.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: runbook one-command paths, checklist regen note, WHATS_NEW (Phase F)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 02:54:00 +03:00
2e1de6a549
feat(bnb): read-only on-chain proof verification (#1)
* feat(bnb): read-only on-chain proof verification

Close the BNB SDK lane's gap: proof artifacts were self-attested
(hashes recomputable) but nothing confirmed the chain. Add a new
read-only BSC JSON-RPC verifier and surface it everywhere proof is shown.

- crates/chain-verifier: eth_chainId, eth_getCode, eth_getTransactionReceipt.
  ABI-free, no keys/signing, offline-safe (skipped when BSC_RPC_URL unset).
  11 unit tests.
- /proof/verify: append onchain_* checks + onchain_configured; passed now
  means "no check failed" so skipped does not block.
- dashboard /proof: dedicated On-chain Verification section, skipped handling.
- clients/proof-verifier/verify.py: --rpc / BSC_RPC_URL opt-in, stdlib urllib,
  mirrors the Rust checks; offline default unchanged.
- docs: BNB_AGENT_IDENTITY, proof-verifier README, PRIZE_MAP, WHATS_NEW.

Verified against live BSC mainnet: competition contract 0x212c61…aed5
returns ~2.5 KB of deployed bytecode via eth_getCode (chain id 56).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(ci): green rust clippy + cargo-deny (pre-existing failures)

These failures predate the on-chain-verification feature and block the
merge; fixing them here unblocks it and moves the repo toward green.

- clippy (CI clippy 1.96 is stricter than local 0.1.94): convert three
  unnecessary_sort_by key-extraction sorts to sort_by_key in guardrail-cli
  (identity.rs, market.rs, portfolio.rs). Decimal keys are Copy+Ord.
- cargo-deny: add a [licenses] allow-list (was empty, so every crate —
  including this MIT workspace — was rejected). Standard permissive set.

Not fixed here: the docker dashboard image build (pnpm v10 frozen-lockfile
+ sharp build-script) — unrelated infra, non-required check; the dashboard
deploys to Vercel separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(ci): allow CDLA-Permissive-2.0 license (webpki-roots)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 01:37:00 +03:00
9a411cd22b docs: reconcile stale counts (68 routes, 64 pages, 7 skills) + add /ensemble/live to OpenAPI
Updated FEATURE_MATRIX/API_CLIENTS/WHATS_NEW/API/PRODUCT_OVERVIEW/PRIZE_MAP/api README to the real counts; OpenAPI now 68 paths.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:50:24 +03:00
475d77d3a5 feat(expansion): judge README + QUICKSTART, TS-CLI watch, python-lab correlation analytics, dashboard /analytics
- README.md rewritten with verified counts (68 routes, 21 crates, 9 apps, 7 skills, 63 dashboard pages); + docs/QUICKSTART.md.

- clients/typescript: CLI watch subcommand (interval/once/json, SIGINT-clean, offline-safe).

- python-lab: correlation.py (pure-python Pearson matrix + exposure/HHI) + analyze.py correlation subcommand.

- dashboard: /analytics overview page (equity/drawdown/regime/exposure). tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:42:41 +03:00
49a3cd9548 feat(expansion): dashboard ensemble/journal pages, Go guardrailctl watch+subcommands, /snapshots route, docs
- dashboard: /ensemble (regime->skill weights) + /journal (per-cycle narrative) pages; /lab already server-backed. tsc clean.

- clients/go: guardrailctl watch/ensemble/journal + typed Ensemble/Journal SDK methods. build+vet+gofmt clean.

- guardrail-api: GET /snapshots over the persisted snapshot history (5 tests). OpenAPI 67 paths.

- docs: DASHBOARD.md, WASM_NOTE.md (Track B deferral rationale), WHATS_NEW/FEATURE_MATRIX/PRODUCT_OVERVIEW/INDEX refresh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 17:17:08 +03:00
79b366d801 docs(phase2): REALTIME + SKILLS_MARKETPLACE + SERVICES docs; OpenAPI +/stream +/proof/verify +/skills/{id}{/backtest}
OpenAPI now 66 paths; INDEX updated. Documents the SSE telemetry, skill-loader/marketplace, and services/ tree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 16:56:59 +03:00
41138e2780 feat(phase2): notebooks, all-docs end-to-end, native strategy-ensemble crate
- python-lab/notebooks: 6 runnable offline-safe notebooks (closes the last plan.md gap).

- docs: OpenAPI now covers all 56 routes (+/journal /ensemble /skills /version); new CLI.md + API.md; refreshed WHATS_NEW/PRIZE_MAP/FEATURE_MATRIX/PRODUCT_OVERVIEW/INDEX.

- crates/strategy-ensemble: native Rust ensemble meta-allocator (blend by regime, 9 tests, clippy-clean), registered in workspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 12:23:09 +03:00
2d2b15c7fe feat: full guardrail-alpha system + CLI modularization + Vercel deploy config
- Rust engine: real bootstrap/wiring preflight (guardrail-agent), execution layer (retry/router/pre-trade/post-trade/reconciliation), guardrail-doctor diagnostics with allowlist-drift guard.

- guardrail-cli: extracted pure helpers into util.rs (split in progress).

- 6 Track-2 skills + ensemble; python-lab analytics (regime/drawdown/montecarlo/dossier/ensemble/journal/seed); clients (ts/py/go/mcp/langchain/web-lite/proof-verifier); alert relay; scenarios; helm/k8s/compose; docs.

- dashboard/vercel.json + docs/VERCEL_DEPLOY.md for Vercel deployment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 11:02:22 +03:00