{"openapi":"3.1.0","info":{"title":"txcast Agent API","version":"1.0.0","description":"Bearer-authenticated, organisation-scoped API for AI agents. Mutating calls require Txcast-Agent-Name and Txcast-Agent-Version so audit events can record caller attribution."},"servers":[{"url":"/agent/v1"}],"paths":{"/context":{"get":{"operationId":"get_context","summary":"Get agent context","description":"Return the organisation and credential context attached to this bearer token.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"organisation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"kind":{"type":"string","enum":["personal","standard"]},"role":{"type":"string","enum":["owner","admin","member"]},"seatStatus":{"type":"string","enum":["active","unavailable"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","slug","kind","role","seatStatus","createdAt","updatedAt"],"additionalProperties":false},"credential":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9@][A-Za-z0-9 ._/@+-]{0,79}$"},"scopes":{"type":"array","items":{"type":"string","enum":["organisation.read","registry.contract.create","workflow.draft.write","workflow.revision.publish","run.draft.write","run.publish","run.cancel","run.visibility.public","run.execution.prepare","run.safe.signature.submit","run.execution.record","run.checkpoint.complete"]}},"accountAccess":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"selected"},"controlledAccountIds":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100}},"required":["mode","controlledAccountIds"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"all"}},"required":["mode"],"additionalProperties":false}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","name","scopes","accountAccess","expiresAt"],"additionalProperties":false}},"required":["organisation","credential"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":null,"x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/networks":{"get":{"operationId":"list_networks","summary":"List enabled networks","description":"List the EVM networks currently enabled for txcast workflows.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":120}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"networks":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"name":{"type":"string"},"slug":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["chainId","name","slug","createdAt","updatedAt"],"additionalProperties":false}}},"required":["networks"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/controlled-accounts":{"get":{"operationId":"list_controlled_accounts","summary":"List controlled accounts","description":"List organisation-controlled Safe and EOA accounts available to this credential.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":160}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["safe","eoa"]},"name":{"type":"string"},"chains":{"type":"array","items":{"type":"object","properties":{"controlledAccountId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["controlledAccountId","organisationId","chainId","address","createdAt","updatedAt"],"additionalProperties":false},"minItems":1},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","organisationId","kind","name","chains","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["accounts"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/contracts":{"get":{"operationId":"list_contracts","summary":"List saved contracts","description":"List ABI-backed contracts saved in the organisation registry.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"chainId","in":"query","required":false,"schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":160}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"contracts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["evm_address"]},"organisationId":{"type":"string","format":"uuid"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["contract","safe","wallet"]},"minItems":1},"account":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["safe","wallet"]}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","properties":{"abi":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},{"type":"null"}]},"abiSource":{"anyOf":[{"type":"string","enum":["provided","sourcify"]},{"type":"null"}]},"abiSourceAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"abiDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["abi"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","organisationId","chainId","address","kinds","account","contract","name","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}}},"required":["contracts"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},"post":{"operationId":"register_contract","summary":"Register contract","description":"Save a contract in the organisation registry using a supplied ABI or an explicitly selected Sourcify ABI. Include the inspected abiDigest to guard against ABI changes. For abiSource=provided, include abi. For abiSource=sourcify, sourcifyTarget defaults to recommended.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":160},"abiSource":{"type":"string","enum":["sourcify","provided"]},"abi":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"sourcifyTarget":{"type":"string","enum":["recommended","proxy","implementation"]}},"required":["chainId","address","name","abiSource"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["evm_address"]},"organisationId":{"type":"string","format":"uuid"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["contract","safe","wallet"]},"minItems":1},"account":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["safe","wallet"]}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","properties":{"abi":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},{"type":"null"}]},"abiSource":{"anyOf":[{"type":"string","enum":["provided","sourcify"]},{"type":"null"}]},"abiSourceAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"abiDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["abi"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","organisationId","chainId","address","kinds","account","contract","name","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"status":{"type":"string","enum":["created","unchanged"]}},"required":["contract","abiDigest","status"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"registry.contract.create","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/contracts/{chainId}/{address}":{"get":{"operationId":"get_contract","summary":"Get saved contract","description":"Get one saved contract and its ABI from the organisation registry.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"chainId","in":"path","required":true,"schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["evm_address"]},"organisationId":{"type":"string","format":"uuid"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["contract","safe","wallet"]},"minItems":1},"account":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["safe","wallet"]}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","properties":{"abi":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},{"type":"null"}]},"abiSource":{"anyOf":[{"type":"string","enum":["provided","sourcify"]},{"type":"null"}]},"abiSourceAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"abiDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["abi"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","organisationId","chainId","address","kinds","account","contract","name","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["contract"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/contracts/inspect":{"post":{"operationId":"inspect_contract","summary":"Inspect contract","description":"Inspect onchain bytecode and look for verified proxy or implementation ABIs on Sourcify. This does not save anything.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"saved":{"anyOf":[{"type":"object","properties":{"contract":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["evm_address"]},"organisationId":{"type":"string","format":"uuid"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kinds":{"type":"array","items":{"type":"string","enum":["contract","safe","wallet"]},"minItems":1},"account":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["safe","wallet"]}},"required":["kind"],"additionalProperties":false},{"type":"null"}]},"contract":{"anyOf":[{"type":"object","properties":{"abi":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},{"type":"null"}]},"abiSource":{"anyOf":[{"type":"string","enum":["provided","sourcify"]},{"type":"null"}]},"abiSourceAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"abiDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["abi"],"additionalProperties":false},{"type":"null"}]},"name":{"type":"string"},"createdByUserId":{"type":"string","format":"uuid"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","type","organisationId","chainId","address","kinds","account","contract","name","createdByUserId","createdAt","updatedAt"],"additionalProperties":false},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["contract"],"additionalProperties":false},{"type":"null"}]},"code":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"hasCode":{"type":["boolean","null"]},"status":{"type":"string","enum":["valid","unknown"]},"message":{"type":"string"}},"required":["chainId","address","hasCode","status","message"],"additionalProperties":false},"abi":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"status":{"type":"string","enum":["found","not_found","unknown"]},"message":{"type":"string"},"proxy":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","minLength":1},"implementationAddress":{"type":"string"}},"required":["kind","implementationAddress"],"additionalProperties":false},{"type":"null"}]},"proxyAbi":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","const":"sourcify"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"abi":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["source","chainId","address","name","abi"],"additionalProperties":false},{"type":"null"}]},"implementationAbi":{"anyOf":[{"type":"object","properties":{"source":{"type":"string","const":"sourcify"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"abi":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["constructor","error","event","fallback","function","receive"]}},"required":["type"],"additionalProperties":true},"minItems":1},"abiDigest":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"}},"required":["source","chainId","address","name","abi"],"additionalProperties":false},{"type":"null"}]},"recommended":{"anyOf":[{"type":"string","enum":["proxy","implementation"]},{"type":"null"}]}},"required":["chainId","address","status","message","proxy","proxyAbi","implementationAbi","recommended"],"additionalProperties":false}},"required":["saved","code","abi"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}},"/workflow-definitions/validate":{"post":{"operationId":"validate_workflow_definition","summary":"Validate workflow definition","description":"Validate an agent-authored version 2 workflow graph with stable caller-supplied node refs, including its variables and saved-contract references, without saving it.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["title","account","transactions","kind","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","condition","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","ref"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}},"required":["definition"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"code":{"type":"string","minLength":1,"maxLength":80},"severity":{"type":"string","enum":["error","warning"]},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["path","code","severity","message"],"additionalProperties":false}}},"required":["valid","issues"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/workflows":{"get":{"operationId":"list_workflows","summary":"List workflows","description":"List workflows in the credential's organisation.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["workflows"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},"post":{"operationId":"create_workflow","summary":"Create workflow","description":"Create a workflow with an agent-authored version 2 draft. Nodes use stable caller-supplied refs; the response maps each ref to its persisted UUID. Publish a revision separately when the draft is ready.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"definition":{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["title","account","transactions","kind","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","condition","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","ref"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}},"required":["name","definition"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false},"nodeIdMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"propertyNames":{"minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}}},"required":["workflow","nodeIdMapping"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"workflow.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}}},"/workflows/{workflowId}":{"get":{"operationId":"get_workflow","summary":"Get workflow","description":"Get a workflow, including its current strict draft and saved definition.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["workflow"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/workflows/{workflowId}/revisions":{"get":{"operationId":"list_workflow_revisions","summary":"List workflow revisions","description":"List immutable saved revisions for a workflow.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"revisions":{"type":"array","items":{"type":"object","properties":{"workflowId":{"type":"string","format":"uuid"},"rev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"organisationId":{"type":"string","format":"uuid"},"createdByUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"stepCount":{"type":"integer","minimum":0},"variableCount":{"type":"integer","minimum":0}},"required":["workflowId","rev","organisationId","createdByUserId","name","description","createdAt","stepCount","variableCount"],"additionalProperties":false}}},"required":["revisions"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}},"post":{"operationId":"publish_workflow_revision","summary":"Publish workflow revision","description":"Publish the current strict draft as a new immutable workflow revision using optimistic concurrency.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedCurrentRevision":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"expectedDraftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]}},"required":["expectedCurrentRevision","expectedDraftVersion"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["workflow"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"workflow.revision.publish","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/workflows/{workflowId}/revisions/{workflowRev}":{"get":{"operationId":"get_workflow_revision","summary":"Get workflow revision","description":"Get one immutable saved workflow revision.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"workflowRev","in":"path","required":true,"schema":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"object","properties":{"workflowId":{"type":"string","format":"uuid"},"rev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"organisationId":{"type":"string","format":"uuid"},"createdByUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"definition":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time"}},"required":["workflowId","rev","organisationId","createdByUserId","name","description","definition","createdAt"],"additionalProperties":false}},"required":["revision"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/workflows/{workflowId}/draft":{"put":{"operationId":"replace_workflow_draft","summary":"Replace workflow draft","description":"Replace the complete agent-authored version 2 workflow draft using node refs plus revision, draft-version, and definition-digest concurrency guards. The response maps refs to persisted UUIDs. This explicit agent edit is audited by digest and version, not by draft contents.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"definition":{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["title","account","transactions","kind","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","condition","ref"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"ref":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["kind","title","ref"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"to":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false},"expectedCurrentRevision":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"expectedDraftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"expectedDraftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]}},"required":["name","definition","expectedCurrentRevision","expectedDraftVersion","expectedDraftDefinitionDigest"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false},"nodeIdMapping":{"type":"object","additionalProperties":{"type":"string","format":"uuid"},"propertyNames":{"minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"}}},"required":["workflow","nodeIdMapping"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"workflow.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":false},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/workflows/{workflowId}/fork":{"post":{"operationId":"fork_workflow","summary":"Fork workflow","description":"Create an editable workflow copy from an existing workflow.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"workflow":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"parentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"parent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"currentRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"organisationId":{"type":"string","format":"uuid"},"authorUserId":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":["string","null"]},"draft":{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"definitionVersion":{"type":"string","enum":["1","2"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","maxLength":64},"label":{"type":"string","maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"accountKind":{"anyOf":[{"type":"string","enum":["safe","wallet"]},{"type":"null"}]},"transactions":{"type":"array","items":{"type":"object","properties":{"mode":{"type":"string","enum":["contract","raw"]},"notes":{"type":"string","maxLength":1000},"contractQuery":{"type":"string","maxLength":512},"contractKey":{"type":"string","maxLength":512},"functionKey":{"type":"string","maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"argAddressEntryKeys":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"to":{"type":"string","maxLength":120},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"data":{"type":"string","maxLength":100000}},"required":["mode","notes","contractQuery","contractKey","functionKey","args","to","value","data"],"additionalProperties":false},"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","chainId","accountAddress","transactions"],"additionalProperties":false},"maxItems":50},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"conditionKind":{"type":"string","enum":["balance","contract_view","block_height"],"default":"balance"},"chainId":{"type":"string","maxLength":80},"accountAddress":{"type":"string","maxLength":120},"assetKind":{"type":"string","enum":["native","erc20"]},"tokenAddress":{"type":"string","maxLength":120},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":100}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"contractAddress":{"type":"string","maxLength":120,"default":""},"functionKey":{"type":"string","maxLength":512,"default":""},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64,"default":[]},"valueKind":{"anyOf":[{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},{"type":"null"}],"default":null},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn","chainId","accountAddress","assetKind","tokenAddress","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":99},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","dependsOn"],"additionalProperties":false}]},"maxItems":50,"default":[]}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"null"}]},"draftDefinition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"draftDefinitionDigest":{"anyOf":[{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},{"type":"null"}]},"draftBaseRev":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"draftVersion":{"anyOf":[{"type":"string","pattern":"^(0|[1-9]\\d*)$"},{"type":"null"}]},"definition":{"anyOf":[{"anyOf":[{"type":"object","properties":{"version":{"type":"string","const":"1"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":49},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","title","dependsOn","account","transactions"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["version","variables","steps"],"additionalProperties":false},{"type":"object","properties":{"version":{"type":"string","const":"2"},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false},"maxItems":32},"nodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string","minLength":1,"maxLength":1000},"to":{"type":"string"},"value":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"operation":{"type":"string","const":"call"},"template":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractKey":{"type":"string","minLength":1,"maxLength":512},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64}},"required":["kind","contractKey","functionKey","args"],"additionalProperties":false}]}},"required":["to","value","operation","template"],"additionalProperties":false},"minItems":1,"maxItems":50},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"maxItems":20,"default":[]}},"required":["id","title","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string","minLength":1,"maxLength":512},"args":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"literal"},"value":{"type":"string","maxLength":10000}},"required":["kind","value"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"variable"},"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"}},"required":["kind","key"],"additionalProperties":false}]},"maxItems":64},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string","minLength":1,"maxLength":160},"description":{"type":"string","maxLength":1000},"ui":{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"}},"required":["x","y"],"additionalProperties":false}},"additionalProperties":false}},"required":["kind","id","title"],"additionalProperties":false}]},"minItems":1,"maxItems":100},"edges":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"uuid"},"to":{"type":"string","format":"uuid"}},"required":["from","to"],"additionalProperties":false},"maxItems":200}},"required":["version","variables","nodes","edges"],"additionalProperties":false}]},{"type":"null"}]},"hasUnsavedChanges":{"type":"boolean"},"isStarred":{"type":"boolean"},"runCount":{"type":"integer","minimum":0},"lastRunAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parentId","parent","currentRev","organisationId","authorUserId","name","description","draft","draftDefinitionDigest","definition","hasUnsavedChanges","isStarred","runCount","lastRunAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["workflow"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"workflow.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false}}},"/runs":{"get":{"operationId":"list_workflow_runs","summary":"List workflow runs","description":"List organisation workflow runs, optionally filtered to one workflow or a set of statuses.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"minItems":1,"maxItems":6}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["newest","oldest","recently_updated"],"default":"newest"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"runs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}}},"required":["runs"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false}}},"/runs/{runId}":{"get":{"operationId":"get_workflow_run","summary":"Get workflow run","description":"Get a workflow run and its current execution state. Returned state can depend on external chain and Safe state.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}},"/runs/{runId}/validation":{"get":{"operationId":"validate_workflow_run","summary":"Validate workflow run","description":"Run preflight validation for a workflow run against current external chain and Safe state.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"validation":{"type":"object","properties":{"status":{"type":"string","enum":["valid","warning","blocked","unknown"]},"checkedAt":{"type":"string","format":"date-time"},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"scope":{"type":"string","enum":["run","step"]},"stepId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"status":{"type":"string","enum":["passed","warning","blocked","unknown"]},"message":{"type":"string","minLength":1},"detail":{"type":["string","null"],"default":null},"checkedAt":{"type":"string","format":"date-time"}},"required":["id","scope","stepId","status","message","checkedAt"],"additionalProperties":false}}},"required":["status","checkedAt","checks"],"additionalProperties":false}},"required":["validation"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"organisation.read","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}},"/workflows/{workflowId}/runs":{"post":{"operationId":"create_workflow_run","summary":"Create workflow run","description":"Stage a new run from a saved workflow revision and optional variable values.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"workflowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"variableValues":{"type":"object","additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}}},"/runs/{runId}/variables":{"patch":{"operationId":"update_workflow_run_variables","summary":"Update workflow run variables","description":"Replace variable values on a staged workflow run. Publishing freezes the values and rendered transactions.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variableValues":{"type":"object","additionalProperties":{}},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["variableValues","expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}}},"/runs/{runId}/publish":{"post":{"operationId":"publish_workflow_run","summary":"Publish workflow run","description":"Publish a staged workflow run, permanently freezing its variables and rendered transactions.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.publish","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/sync":{"post":{"operationId":"sync_workflow_run","summary":"Sync workflow run","description":"Reconcile a workflow run with current RPC and Safe Transaction Service state. This may advance execution state.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.prepare","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true}}},"/runs/{runId}/visibility/public":{"post":{"operationId":"set_workflow_run_public","summary":"Make workflow run public","description":"Enable unauthenticated read-only access to a workflow run through its public link.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.visibility.public","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/visibility/private":{"post":{"operationId":"set_workflow_run_private","summary":"Make workflow run private","description":"Remove unauthenticated public-link access from a workflow run.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.draft.write","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}}},"/runs/{runId}/cancel":{"post":{"operationId":"cancel_workflow_run","summary":"Cancel workflow run","description":"Cancel a workflow run. Already submitted onchain transactions cannot be undone.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":1000},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.cancel","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/attempts":{"post":{"operationId":"prepare_workflow_step_attempt","summary":"Prepare workflow step attempt","description":"Prepare a Safe or wallet execution attempt for a ready workflow step using current external state.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"adapter":{"type":"string","enum":["safe","wallet"]},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["adapter","expectedRunVersion","expectedStepVersion"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"handoff":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"expected":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"}},"required":["chainId","account"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"runDeepLink":{"type":"string","format":"uri"}},"required":["kind","expected","safeTxHash","typedData","runDeepLink"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"expected":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"}},"required":["chainId","account"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"transactionIndex":{"type":"integer","minimum":0,"maximum":49},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["transactionIndex","chainId","from","to","value","data"],"additionalProperties":false}},"runDeepLink":{"type":"string","format":"uri"}},"required":["kind","expected","transactions","runDeepLink"],"additionalProperties":false}]}},"required":["run","handoff"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.prepare","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true}}},"/runs/{runId}/steps/{stepId}/attempts/{attemptId}/safe-rejection-attempts":{"post":{"operationId":"prepare_safe_rejection","summary":"Prepare Safe rejection","description":"Prepare a competing Safe rejection transaction for an existing Safe execution attempt.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedAttemptVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion","expectedStepVersion","expectedAttemptVersion"],"additionalProperties":false}}}},"responses":{"201":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false},"handoff":{"type":"object","properties":{"kind":{"type":"string","const":"safe_rejection"},"attemptId":{"type":"string","format":"uuid"},"expected":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"}},"required":["chainId","account"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"runDeepLink":{"type":"string","format":"uri"}},"required":["kind","attemptId","expected","safeTxHash","typedData","runDeepLink"],"additionalProperties":false}},"required":["run","handoff"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.prepare","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/attempts/{attemptId}/safe-execution-request":{"get":{"operationId":"get_safe_execution_request","summary":"Get Safe execution request","description":"Build the exact unsigned Safe execTransaction request for a ready attempt. This reads current state but never signs or broadcasts.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"expected":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"}},"required":["chainId","account"],"additionalProperties":false},"transactionRequest":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"to":{"type":"string"},"value":{"type":"string","const":"0"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["chainId","to","value","data"],"additionalProperties":false},"runDeepLink":{"type":"string","format":"uri"}},"required":["expected","transactionRequest","runDeepLink"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.prepare","x-mcp-tool-annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}}},"/runs/{runId}/steps/{stepId}/attempts/{attemptId}/safe-signatures":{"post":{"operationId":"submit_safe_signature","summary":"Submit Safe signature","description":"Submit a cryptographic Safe signature and proposal metadata. Only submit a signature the caller is authorised to use.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"proposerAddress":{"type":"string"},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedAttemptVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["proposerAddress","safeTxHash","signature","expectedRunVersion","expectedStepVersion","expectedAttemptVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.safe.signature.submit","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/attempts/{attemptId}/wallet-transactions":{"post":{"operationId":"record_wallet_transaction","summary":"Record wallet transaction","description":"Record an already-submitted wallet transaction hash for a prepared step attempt. This does not broadcast the transaction.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactionIndex":{"type":"integer","minimum":0,"maximum":49},"hash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedAttemptVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["transactionIndex","hash","expectedRunVersion","expectedStepVersion","expectedAttemptVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.record","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/attempts/{attemptId}/safe-execution":{"post":{"operationId":"record_safe_execution","summary":"Record Safe execution","description":"Record an already-submitted Safe execution transaction hash. This does not broadcast the transaction.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"attemptId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedAttemptVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["hash","expectedRunVersion","expectedStepVersion","expectedAttemptVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.record","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/external-completion":{"post":{"operationId":"record_external_completion","summary":"Record external completion","description":"Verify an onchain transaction and explicitly mark a workflow step complete outside a txcast-prepared attempt.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"note":{"type":"string","maxLength":1000},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["transactionHash","expectedRunVersion","expectedStepVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.execution.record","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}},"/runs/{runId}/steps/{stepId}/manual-completion":{"post":{"operationId":"complete_manual_checkpoint","summary":"Complete manual checkpoint","description":"Explicitly complete a saved manual checkpoint and unblock its dependent graph nodes.","tags":["Agent API"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"runId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Txcast-Agent-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Txcast-Agent-Version","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[\\x20-\\x7e]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for safely retrying this explicit mutation.","schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"note":{"type":"string","maxLength":1000},"expectedRunVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"expectedStepVersion":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["expectedRunVersion","expectedStepVersion"],"additionalProperties":false}}}},"responses":{"200":{"description":"Successful command result","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowId":{"type":"string","format":"uuid"},"workflowRev":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"workflowName":{"type":"string"},"workflowAuthorUserId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"startedByUserId":{"type":"string","format":"uuid"},"visibility":{"type":"string","enum":["org","public"]},"variables":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z_][A-Za-z0-9_]*$"},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"source":{"type":"string","enum":["input","computed"],"default":"input"},"constraint":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false},"evaluation":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["key","label","kind"],"additionalProperties":false}},"variableValues":{"type":"object","additionalProperties":{"type":["string","boolean"]}},"renderedSteps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]}},"required":["id","title","description","dependsOn","account","transactions"],"additionalProperties":false}},"renderedNodes":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string","enum":["safe","wallet"]}},"required":["chainId","address","kind"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"notes":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"display":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"raw_calldata"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_call"},"contractAddress":{"type":"string"},"contractName":{"type":["string","null"]},"functionName":{"type":"string"},"functionSignature":{"type":"string"},"args":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"additionalProperties":false}}},"required":["kind","contractAddress","contractName","functionName","functionSignature","args"],"additionalProperties":false}]}},"required":["to","value","operation","data"],"additionalProperties":false}},"signatureRequirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"required":{"type":"number","const":1},"signers":{"type":"array","items":{"type":"string"},"minItems":1}},"required":["kind","required","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"proposers":{"type":"array","items":{"type":"string"}},"required":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0},"signers":{"type":"array","items":{"type":"string"}}},"required":["kind","proposers","required","total","signers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"unknown"},"message":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}]},"kind":{"type":"string","const":"step"},"outputs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["transaction_receipt","event"]}},"required":["id","label","kind"],"additionalProperties":false},"default":[]}},"required":["id","title","description","dependsOn","account","transactions","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"condition"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}},"condition":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"balance"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"account":{"type":"string"},"asset":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"native"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"erc20"},"address":{"type":"string"}},"required":["kind","address"],"additionalProperties":false}]},"comparator":{"type":"string","const":"gte"},"amount":{"type":"string","pattern":"^(0|[1-9]\\d*)$"}},"required":["kind","chainId","account","asset","comparator","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"contract_view"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"contract":{"type":"string"},"functionKey":{"type":"string"},"args":{"type":"array","items":{"type":"string","maxLength":10000}},"valueKind":{"type":"string","enum":["address","int256","uint256","string","bytes","boolean"]},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","contract","functionKey","args","valueKind","predicate"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"block_height"},"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"predicate":{"type":"object","properties":{"language":{"type":"string","const":"txcast-cel-v1"},"source":{"type":"string","minLength":1,"maxLength":2000}},"required":["language","source"],"additionalProperties":false}},"required":["kind","chainId","predicate"],"additionalProperties":false}]}},"required":["kind","id","title","description","dependsOn","condition"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"manual"},"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":["string","null"]},"dependsOn":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["kind","id","title","description","dependsOn"],"additionalProperties":false}]}},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["staged","blocked","waiting","ready","proposed","signing","ready_to_execute","executing","executed","failed","cancelled"]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"version":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"runId":{"type":"string","format":"uuid"},"stepId":{"type":"string","format":"uuid"},"organisationId":{"type":"string","format":"uuid"},"adapter":{"type":"string","enum":["safe","wallet","external"]},"purpose":{"type":"string","enum":["execution","rejection","external_completion"]},"status":{"type":"string","enum":["prepared","proposed","signing","ready_to_execute","executing","executed","invalidated","rejected","failed","cancelled"]},"safeTxHash":{"type":["string","null"]},"proposalId":{"type":["string","null"]},"metadata":{"anyOf":[{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"intent":{"type":"string","enum":["execute","reject"],"default":"execute"},"rejectsSafeTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"proposedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"safe":{},"safeTransactionData":{"type":"object","properties":{"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]},"safeTxGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"baseGas":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasPrice":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"},"nonce":{"type":"integer","minimum":0}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":false},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeVersion":{"type":"string"},"senderSignature":{"type":["string","null"]},"signatures":{"type":"array","items":{"type":"object","properties":{"signer":{"type":"string"},"signature":{"type":"string","pattern":"^0x[a-fA-F0-9]+$"},"signedAt":{"type":"string","format":"date-time"}},"required":["signer","signature","signedAt"],"additionalProperties":false},"default":[]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}],"default":null},"executionSubmittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"default":null},"lifecycle":{"type":"object","properties":{"state":{"type":"string","enum":["prepared","pending","ready_to_execute","executing","executed","execution_failed","conflicting_pending","rejection_pending","invalidated","rejected"]},"nonce":{"type":"integer","minimum":0},"currentNonce":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"checkedAt":{"type":"string","format":"date-time"},"message":{"type":["string","null"]},"competingTransactions":{"type":"array","items":{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false}},"winningTransaction":{"anyOf":[{"type":"object","properties":{"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"nonce":{"type":"integer","minimum":0},"proposerAddress":{"anyOf":[{"type":"string"},{"type":"null"}]},"submittedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"executionTxHash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"executedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"isExecuted":{"type":"boolean"},"isSuccessful":{"type":["boolean","null"]},"isRejection":{"type":"boolean"},"confirmations":{"type":"integer","minimum":0}},"required":["safeTxHash","nonce","proposerAddress","submittedAt","executionTxHash","executedAt","isExecuted","isSuccessful","isRejection","confirmations"],"additionalProperties":false},{"type":"null"}]}},"required":["state","nonce","currentNonce","checkedAt","message","competingTransactions","winningTransaction"],"additionalProperties":false},"typedData":{"type":"object","properties":{"domain":{"type":"object","additionalProperties":{}},"message":{"type":"object","additionalProperties":{}},"primaryType":{"type":"string"},"types":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}}},"required":["domain","message","primaryType","types"],"additionalProperties":false},"transactions":{"type":"integer","minimum":0,"maximum":50}},"required":["kind","account","proposedAt","proposerAddress","safeTransactionData","safeTxHash","safeVersion","senderSignature","typedData","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactions":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":49},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"operation":{"type":"string","const":"call"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"hash":{"anyOf":[{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["pending","executed"]}},"required":["index","to","value","operation","data","hash","status"],"additionalProperties":false}}},"required":["kind","account","transactions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"external"},"account":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"address":{"type":"string"}},"required":["chainId","address"],"additionalProperties":false},"transactionHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"markedByUserId":{"type":"string","format":"uuid"},"markedAt":{"type":"string","format":"date-time"},"note":{"type":["string","null"],"default":null},"verification":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"wallet"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"from":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000}},"required":["kind","blockNumber","transactionIndex","from","to","value","data"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"safe"},"blockNumber":{"type":"string"},"transactionIndex":{"type":"integer","minimum":0},"safeTxHash":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$"},"safeAddress":{"type":"string"},"to":{"type":"string"},"value":{"type":"string","pattern":"^(0|[1-9]\\d*)$"},"data":{"type":"string","pattern":"^0x(?:[a-fA-F0-9]{2})*$","maxLength":100000},"operation":{"type":"number","enum":[0,1]}},"required":["kind","blockNumber","transactionIndex","safeTxHash","safeAddress","to","value","data","operation"],"additionalProperties":false}]}},"required":["kind","account","transactionHash","markedByUserId","markedAt","verification"],"additionalProperties":false}]},{"type":"null"}]},"errorMessage":{"type":["string","null"]},"createdByUserId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","adapter","status","safeTxHash","proposalId","metadata","errorMessage","createdByUserId","createdAt","updatedAt"],"additionalProperties":false}},"errorMessage":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","runId","stepId","organisationId","status","attempts","errorMessage","createdAt","updatedAt"],"additionalProperties":false}},"safeTransactions":{"anyOf":[{"type":"array","items":{"type":"object","additionalProperties":{}}},{"type":"null"}]},"status":{"type":"string","enum":["staged","published","executing","completed","failed","cancelled"]},"errorMessage":{"type":["string","null"]},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","workflowId","workflowRev","workflowName","workflowAuthorUserId","organisationId","startedByUserId","visibility","variables","variableValues","renderedSteps","steps","safeTransactions","status","errorMessage","publishedAt","cancelledAt","createdAt","updatedAt"],"additionalProperties":false}},"required":["run"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}},"default":{"description":"Structured API error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","RATE_LIMITED","VALIDATION_ERROR","INVALID_JSON","INTERNAL_ERROR","RESPONSE_VALIDATION_ERROR","PLAN_LIMIT_EXCEEDED","ORGANISATION_SEAT_REQUIRED","BILLING_PROVIDER_UNAVAILABLE","BILLING_CHECKOUT_NOT_REQUIRED","NOTIFICATION_PLATFORM_UNAVAILABLE","REAUTHENTICATION_REQUIRED","IDEMPOTENCY_KEY_REUSED","IDEMPOTENCY_REQUEST_IN_PROGRESS","ABI_CONFLICT","ABI_DIGEST_STALE","SOURCIFY_UNAVAILABLE"]},"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"type":["string","number"]}},"message":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAt":{"type":"string","format":"date-time"},"correlationId":{"type":"string","format":"uuid"}},"required":["code","message","retryable","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},"x-txcast-required-credential-scope":"run.checkpoint.complete","x-mcp-tool-annotations":{"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false,"openWorldHint":true},"x-anthropic-requires-user-interaction":true,"x-txcast-requires-user-confirmation":true}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}