{"schema_version":1,"harness_version":"1.0","contract_version":"1.1","name":"Strata Agent Harness","summary":"A capability-gated workflow and executable action graph for agents that discover, quote, prepare, externally sign, and submit Strata operations.","entrypoints":{"documentation":"https://stratabook.org/docs/agent-harness/","capabilities":"https://api.stratabook.app/sonar/capabilities","markets":"https://api.stratabook.app/sonar/markets","action_graph":"https://api.stratabook.app/sonar/action-graph","mcp":"https://api.stratabook.app/mcp","manifest":"https://api.stratabook.app/.well-known/strata-agent.json"},"interfaces":{"mcp_tool_order":["strata_capabilities","strata_action_graph","strata_markets","strata_quote","strata_execution_challenge","strata_execution_prepare","strata_execution_submit"],"terminal":["npx -y @stratabook/sdk capabilities --json","npx -y @stratabook/sdk action-graph --json","npx -y @stratabook/sdk markets --json","npx -y @stratabook/sdk quote --market SOL/USDC --side sell --amount-atoms 10000000 --json"]},"workflow":[{"id":"discover_capabilities","instruction":"Read the live capability catalog before every objective. Never infer permission from documentation, package support, or an earlier session."},{"id":"establish_mode","instruction":"Read the action graph and identify which prepare and submit nodes are live. The external agent owner configures its permissions and signer authority; static documentation never enables a Strata operation."},{"id":"understand_objective","instruction":"Resolve the user's market, side, amount, and tolerance. Ask before proceeding when any economically meaningful input is ambiguous."},{"id":"discover_market","instruction":"List markets, select one marked ready, and use its discovered base and quote decimals. Do not guess market identifiers or token decimals."},{"id":"preserve_atoms","instruction":"Represent token amounts as unsigned base-10 atomic strings. Never pass settlement amounts through floating-point arithmetic."},{"id":"request_quote","instruction":"Request a fresh Sonar quote with an explicit side, exact input atoms, and execution tolerance supplied by the external agent."},{"id":"validate_quote","instruction":"Verify the quote binds to the selected market, side, and input. Check labelled fees, minimum output, price impact, server time, and expiry."},{"id":"report_result","instruction":"Report consumed input, expected output, minimum output, fees by asset side, price impact, and remaining validity without inventing private route composition."},{"id":"authorize_writes","instruction":"When prepare and submit are exposed, keep signing external to Strata: request canonical authorization bytes, sign them with the owner-configured signer, verify the prepared transaction preserves the quote, then submit the externally signed transaction with idempotency."},{"id":"monitor_outcome","instruction":"After an authorized submission, report the durable receipt or explicit failure. Never claim completion from preparation, signing, or an unconfirmed request."}],"stop_conditions":["The required live capability is disabled or absent.","The market is paused, unavailable, or has no reviewed operation path.","Market, side, amount, decimals, tolerance, or signer authority is unavailable or ambiguous.","The contract version is unsupported or a response contains unknown fields.","A quote is expired or its market, side, amount, fee, minimum-output, or time binding is inconsistent.","A requested operation exceeds the exposed tool, account, or policy scope.","A user asks the agent to receive or expose wallet secrets, private keys, seed phrases, session keys, or production credentials."],"safety_rules":["Never request or accept wallet secrets, private keys, seed phrases, session keys, or production credentials in a prompt.","Never call undocumented endpoints or reconstruct private Sonar behavior.","Never silently widen slippage, refresh changed economics, substitute a market, or retry a non-retryable failure.","Treat capability removal, revocation, expiry, and emergency disable as immediate stop signals.","Capability and action-graph availability are authoritative for Strata operations; permission and signer policy remain controlled by the external agent owner."]}