feat(kits): add trade-signal kit — advisory AI buy/sell/hold, attested, execution-free#89
Merged
Merged
Conversation
… attested, execution-free Honestly-named port of create-0g-dapp's agent-trading-bot. Advisory-only: generates buy/sell/hold + confidence + rationale via Compute.router(), signs a receipt (EIP-191, not TEE-quote) and anchors it to 0G Storage. NO order execution — a negative lib test enforces the execution-free public API (no execute/trade/swap/send/transfer) and analyzeSignal defaults safely to hold. - lib: signal.ts (analyzeSignal), signalLog.ts (logSignal + attestSignal), 18 vitest - adapters: react-app, chat (analyze/log), tee-attested-api (Hono), mcp-agent (trade_signal + signal_verify) - ui: non-removable AdvisoryBanner, SignalPanel, useTradeSignal, /signal page - docs page + kits-index entry; changeset (minor @foundryprotocol/0gkit-kits) - gates: kits:check 31/31, boundary ✓, format ✓, vitest 18/18 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
trade-signalkit — an honestly-named port of create-0g-dapp'sagent-trading-bot.Behavior (advisory-only)
analyzeSignal(input, deps)→{ action: buy|sell|hold, confidence 0..1, rationale }viaCompute.router(). Safeholddefault on malformed output; never throws.logSignal(signal, deps)→ signs a receipt (EIP-191, ✓ signature verified — not TEE-quote) and anchors the record to 0G Storage.attestSignal= sign+verify without storing (MCP).execute/trade/swap/send/transfer.Surface (full 3-tier standard)
signal.ts,signalLog.ts+__tests__/signal.test.ts(18 tests)react-app+chat(analyze/log),tee-attested-api(HonobuildSignalRouter),mcp-agent(trade_signal+signal_verify+mcpToolPlugin)AdvisoryBanner,SignalPanel,useTradeSignal,/signalpage@foundryprotocol/0gkit-kits)Gates (local, CI-equivalent)
pnpm kits:check— 31/31 PASS (all 4trade-signal × {react-app, chat, tee-attested-api, mcp-agent}green)pnpm boundary:check✓ ·pnpm format:check✓ · kit vitest 18/18 ✓🤖 Generated with Claude Code