{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/claw-link-dev/json-schema/claw-link-dev-execution-result-schema.json",
  "title": "ExecutionResult",
  "description": "Execution envelope returned for both success and failure. On failure, \"error.message\" and \"hint\" are written for agent self-correction; \"details\" may carry additional lines.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/claw-link-dev-openapi.json#/components/schemas/ExecutionResult",
  "type": "object",
  "required": [
    "ok"
  ],
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "result": {
      "description": "Tool output on success. Large outputs may be replaced by a compact offload envelope for clients that opt in."
    },
    "data": {
      "description": "Alias of result carried for compatibility."
    },
    "error": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "code": {
          "type": "string",
          "description": "Machine-readable code, for example needs_connection, confirmation_required, tool_not_found."
        },
        "type": {
          "type": "string",
          "description": "Error class, for example validation, auth, missing_scopes, rate_limit."
        },
        "message": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "hint": {
      "type": "string",
      "description": "Actionable next step for the agent."
    },
    "details": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "requiresConfirmation": {
      "type": "boolean"
    },
    "canonical": {
      "type": "object",
      "description": "Canonical execution summary.",
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}