guardrail/configs/cmc/capabilities.json
Caelum 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

95 lines
4.0 KiB
JSON

{
"agent": "Guardrail Alpha",
"summary": "A CMC-powered autonomous trading agent. Every market decision is derived from CoinMarketCap data: a regime classifier routes exposure, a multi-factor alpha blend ranks BSC-eligible assets, and liquidity/security gates protect execution. This descriptor declares the exact CMC dataset -> capability lineage so a CMC Agent Hub consumer can verify, discover, and call the agent's read-only analysis surface.",
"execution_policy": "read-only — the agent NEVER exposes trade execution, signing, or fund movement to the hub. Only CMC-derived analysis is published. The Rust risk engine remains the sole execution gate, reachable only by the internal trading binary.",
"cmc_client": "crates/cmc-client (CmcDataSource trait; rest.rs, mcp.rs, x402.rs)",
"datasets": [
{
"dataset": "latest_quotes",
"cmc": "cryptocurrency/quotes/latest",
"source": "crates/cmc-client/src/rest.rs::latest_quotes",
"powers": ["alpha_scoring", "nav_marking", "momentum"]
},
{
"dataset": "ohlcv",
"cmc": "cryptocurrency/ohlcv/historical",
"source": "crates/cmc-client/src/rest.rs::ohlcv",
"powers": ["momentum", "volatility", "indicators"]
},
{
"dataset": "fear_and_greed",
"cmc": "fear-and-greed/latest",
"source": "crates/cmc-client/src/rest.rs::fear_greed",
"powers": ["market_regime", "sentiment"]
},
{
"dataset": "dex_liquidity",
"cmc": "dex/networks pairs/liquidity",
"source": "crates/cmc-client/src/rest.rs::dex_liquidity",
"powers": ["liquidity_gate", "execution_quality"]
},
{
"dataset": "token_security",
"cmc": "token security / risk flags",
"source": "crates/cmc-client/src/rest.rs::token_security",
"powers": ["security_gate", "risk_penalty"]
},
{
"dataset": "trending",
"cmc": "cryptocurrency/trending",
"source": "crates/cmc-client/src/rest.rs::trending",
"powers": ["watchlist", "discovery"]
},
{
"dataset": "global_metrics",
"cmc": "global-metrics/quotes/latest",
"source": "crates/cmc-client/src/rest.rs::global_market",
"powers": ["market_regime", "btc_dominance"]
}
],
"capabilities": [
{
"capability": "market_regime",
"description": "Classifies the market into risk-on / risk-off / chop / breakout from CMC Fear & Greed, global metrics, and quote momentum.",
"cmc_inputs": ["fear_and_greed", "global_metrics", "latest_quotes"],
"api": "GET /regime",
"mcp_tool": "guardrail_regime",
"mcp_resource": "guardrail://regime"
},
{
"capability": "asset_scoring",
"description": "Ranks BSC-eligible assets with a multi-factor blend (momentum + RSI + MACD + volume + volatility + liquidity + sentiment + execution-quality, minus a security penalty).",
"cmc_inputs": ["latest_quotes", "ohlcv", "dex_liquidity", "token_security"],
"api": "GET /signals",
"mcp_tool": "guardrail_skill",
"mcp_resource": "guardrail://skill"
},
{
"capability": "skill_backtest",
"description": "Runs the real Rust strategy + risk + backtester over a CMC-derived universe for any published Track-2 skill.",
"cmc_inputs": ["latest_quotes", "ohlcv", "fear_and_greed"],
"api": "GET /skills/{id}/backtest",
"mcp_tool": "guardrail_backtest"
},
{
"capability": "liquidity_intel",
"description": "Per-asset DEX liquidity and headroom used to gate order sizing.",
"cmc_inputs": ["dex_liquidity"],
"api": "GET /liquidity",
"mcp_tool": "guardrail_liquidity"
},
{
"capability": "mandate_compilation",
"description": "Compiles a natural-language mandate into a validated, hashed risk policy (CMC-eligible assets only).",
"cmc_inputs": ["latest_quotes"],
"api": "GET /policy/compile",
"mcp_tool": "guardrail_compile_policy"
}
],
"discovery": {
"agent_card": "GET /.well-known/agent-card.json",
"capabilities_endpoint": "GET /cmc/capabilities",
"mcp_resource": "guardrail://cmc/capabilities"
}
}