Skip to content

Syra x402 v2 market-intelligence connector + daemon wiring#96

Open
mizuki0x wants to merge 3 commits into
mainfrom
feat/syra
Open

Syra x402 v2 market-intelligence connector + daemon wiring#96
mizuki0x wants to merge 3 commits into
mainfrom
feat/syra

Conversation

@mizuki0x

Copy link
Copy Markdown
Contributor

Syra (api.syraa.fun) as a paid x402 tool source for Covenant agents: market intelligence (signal, news, sentiment, brain, smart-money) bought per call in USDC on the Solana rail.

What's here

  • covenant-syra crate: the x402 v2 pay loop, a curated endpoint catalog, and one MCP tool per endpoint (syra.signal, syra.news, syra.sentiment, syra.brain, syra.smart_money). Tool params mirror Syra's live Bazaar discovery schema. 17 unit tests, parsers pinned to the real 402.
  • Daemon wiring: DaemonSyraExecutor in covenantd. Every Syra tool is a paid call routed through budget/settlement/audit and the x402 signer sidecar. Gated by COVENANT_SYRA_ENABLED.

Reuse

Ports the proven covenant-wurk x402 v2 machinery (echo the chosen accept into accepted for the official deepEqual matcher, extract the signed tx from the sidecar's v1 envelope, re-wrap as v2). Differences from Wurk: standard x-payment header, retry the same URL, Syra's own payTo/feePayer. covenant-x402 unchanged; PayaiSolanaSigner is feePayer-generic so Syra's sponsor signs fine. Solana rail only (Syra also offers Base/Polygon/BNB; out of scope).

Verified

  • 17 connector unit tests + 2 daemon executor tests pass.
  • Live on mainnet: a real paid /health call settled end to end through the connector, transaction finalized, $0.0001 USDC debited from the treasury.
  • Live daemon path: syra.news routed through the full Server (advertise, capability gate, executor, signer sidecar, real API). Syra's data backend is currently flapping 503, so the call failed closed at the client timeout with no settlement, exactly as designed (no money spent on a failed call).

Robustness

The daemon executor's HTTP client is bounded (30s timeout) so a stalled upstream fails closed instead of hanging the daemon path.

Note: CI fmt is red on pre-existing workspace files, unrelated to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant