{
  "openapi": "3.1.0",
  "info": {
    "title": "Godpip Intelligence API",
    "description": "Turn unclear intent, unresolved problems, changing external knowledge and AI execution needs into structured intelligence another system can use immediately. Seven independently usable capabilities: Human Bridge, Prompt Package, Research, Discover, Resolve, Invent (beta) and Explain.",
    "version": "1.2.0"
  },
  "servers": [
    {
      "url": "https://api.godpip.com",
      "description": "Live and test (selected by API key prefix)"
    }
  ],
  "paths": {
    "/v1/bridge/translate": {
      "post": {
        "tags": [
          "Human Bridge"
        ],
        "summary": "Translate messy human input into professional structured intent",
        "operationId": "bridgeTranslate",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BridgeTranslateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeTranslateResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-godpip-long-running": false,
        "security": [
          {
            "ApiKey": [
              "bridge:write"
            ]
          }
        ]
      }
    },
    "/v1/prompts/package": {
      "post": {
        "tags": [
          "Prompt Package"
        ],
        "summary": "Compile intent into an execution package for a target model",
        "operationId": "promptsPackage",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromptPackageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptPackageResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-godpip-long-running": false,
        "security": [
          {
            "ApiKey": [
              "prompts:write"
            ]
          }
        ]
      }
    },
    "/v1/research": {
      "post": {
        "tags": [
          "Research"
        ],
        "summary": "Research an unresolved question with typed evidence",
        "operationId": "research",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted as a job (status queued). Poll /v1/jobs/{job_id} or subscribe to webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResearchResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "x-godpip-long-running": true,
        "security": [
          {
            "ApiKey": [
              "research:write"
            ]
          }
        ]
      }
    },
    "/v1/discover": {
      "post": {
        "tags": [
          "Discover"
        ],
        "summary": "Find current existing solutions before building custom",
        "operationId": "discover",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscoverRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoverResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted as a job (status queued). Poll /v1/jobs/{job_id} or subscribe to webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DiscoverResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "x-godpip-long-running": true,
        "security": [
          {
            "ApiKey": [
              "discover:write"
            ]
          }
        ]
      }
    },
    "/v1/resolve": {
      "post": {
        "tags": [
          "Resolve"
        ],
        "summary": "Recommend what to do about a defined problem",
        "operationId": "resolve",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResolveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted as a job (status queued). Poll /v1/jobs/{job_id} or subscribe to webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolveResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "x-godpip-long-running": true,
        "security": [
          {
            "ApiKey": [
              "resolve:write"
            ]
          }
        ]
      }
    },
    "/v1/invent": {
      "post": {
        "tags": [
          "Invent"
        ],
        "summary": "Generate novel, testable approaches when known options fail (beta)",
        "operationId": "invent",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InventRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted as a job (status queued). Poll /v1/jobs/{job_id} or subscribe to webhooks.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InventResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          }
        },
        "x-godpip-long-running": true,
        "security": [
          {
            "ApiKey": [
              "invent:write"
            ]
          }
        ]
      }
    },
    "/v1/explain": {
      "post": {
        "tags": [
          "Explain"
        ],
        "summary": "Translate system output into clear, actionable human language",
        "operationId": "explain",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExplainRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExplainResponse"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "BUDGET_INSUFFICIENT",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "IDEMPOTENCY_CONFLICT or CANCELLED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "PAYLOAD_TOO_LARGE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "RESEARCH_FAILED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "PROVIDER_UNAVAILABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-godpip-long-running": false,
        "security": [
          {
            "ApiKey": [
              "explain:write"
            ]
          }
        ]
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job",
        "operationId": "getJob",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]+$",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "jobs:read"
            ]
          }
        ]
      }
    },
    "/v1/jobs/{job_id}/cancel": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a queued, running or waiting job",
        "operationId": "cancelJob",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]+$",
              "title": "Job Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "jobs:write"
            ]
          }
        ]
      }
    },
    "/v1/jobs/{job_id}/input": {
      "post": {
        "tags": [
          "Jobs"
        ],
        "summary": "Answer the blocking questions of a waiting job",
        "operationId": "provideJobInput",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]+$",
              "title": "Job Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobInputRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "jobs:write"
            ]
          }
        ]
      }
    },
    "/v1/webhooks": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Register a webhook endpoint",
        "operationId": "createWebhook",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks:write"
            ]
          }
        ]
      },
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "operationId": "listWebhooks",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointList"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks:read"
            ]
          }
        ]
      }
    },
    "/v1/webhooks/{webhook_id}": {
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook endpoint",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^whk_[A-Za-z0-9]+$",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response",
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "webhooks:write"
            ]
          }
        ]
      }
    },
    "/v1/feedback": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "summary": "Report downstream outcome for a request (opt-in quality telemetry)",
        "operationId": "submitFeedback",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                },
                {
                  "type": "null"
                }
              ],
              "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT.",
              "title": "Idempotency-Key"
            },
            "description": "Accepted on every POST. Retries with the same key and body within 24 hours return the original response without repeating the side effect or charging again. Reusing a key with a different body or operation returns 409 IDEMPOTENCY_CONFLICT."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeedbackAck"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "feedback:write"
            ]
          }
        ]
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List downstream targets Prompt Package can compile for",
        "operationId": "listModels",
        "parameters": [
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PromptMode"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Mode"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "models:read"
            ]
          }
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Usage"
        ],
        "summary": "Usage and cost for the calling API project",
        "operationId": "getUsage",
        "parameters": [
          {
            "name": "start",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ISO-8601 date-time, inclusive.",
              "title": "Start"
            },
            "description": "ISO-8601 date-time, inclusive."
          },
          {
            "name": "end",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ISO-8601 date-time, exclusive.",
              "title": "End"
            },
            "description": "ISO-8601 date-time, exclusive."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageReport"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "description": "Request id (req_...).",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            }
          },
          "400": {
            "description": "INVALID_REQUEST",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "UNAUTHENTICATED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "PERMISSION_DENIED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "INTERNAL_ERROR",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "501": {
            "description": "UNSUPPORTED_CAPABILITY",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "INSUFFICIENT_CONTEXT, AMBIGUITY_REQUIRES_INPUT, NO_VALID_SOLUTION or SAFETY_RESTRICTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKey": [
              "usage:read"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Alternative": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name"
          },
          "summary": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Summary"
          },
          "why_not_selected": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Why Not Selected"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "summary"
        ],
        "title": "Alternative"
      },
      "Approach": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name"
          },
          "concept": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Concept"
          },
          "why_it_might_work": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Why It Might Work"
          },
          "required_capabilities": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Required Capabilities"
          },
          "risks": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Risks"
          },
          "first_proof": {
            "$ref": "#/components/schemas/Proof"
          },
          "status": {
            "type": "string",
            "const": "untested",
            "title": "Status",
            "description": "Invent never presents an idea as proven.",
            "default": "untested"
          },
          "novelty_score": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Novelty Score"
          },
          "feasibility_score": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Feasibility Score"
          },
          "testability_score": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Testability Score"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "concept",
          "why_it_might_work",
          "first_proof",
          "novelty_score",
          "feasibility_score",
          "testability_score"
        ],
        "title": "Approach"
      },
      "ArtifactRef": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Id"
          },
          "version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ArtifactRef"
      },
      "Assumption": {
        "properties": {
          "statement": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Statement"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "invalidates_when": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Invalidates When"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "statement",
          "confidence"
        ],
        "title": "Assumption"
      },
      "Attempt": {
        "properties": {
          "approach": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Approach"
          },
          "outcome": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Outcome"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "approach",
          "outcome"
        ],
        "title": "Attempt"
      },
      "BillableUnit": {
        "properties": {
          "unit": {
            "type": "string",
            "enum": [
              "bridge_unit",
              "prompt_package_unit",
              "research_unit",
              "discovery_unit",
              "resolve_unit",
              "invent_unit",
              "explain_unit"
            ],
            "title": "Unit"
          },
          "quantity": {
            "type": "number",
            "minimum": 0.0,
            "title": "Quantity"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "unit",
          "quantity"
        ],
        "title": "BillableUnit"
      },
      "BridgeBehavior": {
        "properties": {
          "infer_safe_defaults": {
            "type": "boolean",
            "title": "Infer Safe Defaults",
            "default": true
          },
          "minimize_questions": {
            "type": "boolean",
            "title": "Minimize Questions",
            "default": true
          },
          "research_if_useful": {
            "type": "boolean",
            "title": "Research If Useful",
            "default": false
          },
          "include_solution_hints": {
            "type": "boolean",
            "title": "Include Solution Hints",
            "description": "Return proposals about how to do the work. Off keeps the bridge neutral.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "BridgeBehavior"
      },
      "BridgeContext": {
        "properties": {
          "known_constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Known Constraints"
          },
          "existing_decisions": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Existing Decisions"
          },
          "background": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50000
              },
              {
                "type": "null"
              }
            ],
            "title": "Background"
          },
          "platform": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PlatformContext"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/UserContext"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "BridgeContext"
      },
      "BridgeTranslateRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "input": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "title": "Input"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "desired_output": {
            "type": "string",
            "enum": [
              "professional_brief",
              "canonical_intent",
              "routing_only",
              "handoff",
              "augment"
            ],
            "title": "Desired Output",
            "default": "professional_brief"
          },
          "context": {
            "$ref": "#/components/schemas/BridgeContext"
          },
          "behavior": {
            "$ref": "#/components/schemas/BridgeBehavior"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input"
        ],
        "title": "BridgeTranslateRequest"
      },
      "BridgeTranslateResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BridgeTranslateResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "BridgeTranslateResponse"
      },
      "BridgeTranslateResult": {
        "properties": {
          "canonical_intent": {
            "$ref": "#/components/schemas/CanonicalIntent"
          },
          "assumptions": {
            "items": {
              "$ref": "#/components/schemas/Assumption"
            },
            "type": "array",
            "title": "Assumptions"
          },
          "professional_brief": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProfessionalBrief"
              },
              {
                "type": "null"
              }
            ],
            "description": "Present when desired_output is professional_brief."
          },
          "clarification": {
            "$ref": "#/components/schemas/Clarification"
          },
          "recommended_next_action": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Recommended Next Action"
          },
          "memory_writes": {
            "items": {
              "$ref": "#/components/schemas/MemoryWrite"
            },
            "type": "array",
            "maxItems": 10,
            "title": "Memory Writes"
          },
          "context_requests": {
            "items": {
              "$ref": "#/components/schemas/ContextRequest"
            },
            "type": "array",
            "maxItems": 5,
            "title": "Context Requests"
          },
          "source_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Text",
            "description": "The person's words, verbatim. Included in handoff and augment output."
          },
          "expert_notes": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExpertNotesOut"
              },
              {
                "type": "null"
              }
            ],
            "description": "augment output: professional checks, pitfalls and quality bar."
          },
          "augmented_input": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120000
              },
              {
                "type": "null"
              }
            ],
            "title": "Augmented Input",
            "description": "augment output: the person's words, untouched, followed by the expert notes. Send this to any model in place of the raw input."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "canonical_intent",
          "clarification",
          "recommended_next_action"
        ],
        "title": "BridgeTranslateResult"
      },
      "Budget": {
        "properties": {
          "max_cost": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Cost",
            "description": "USD."
          },
          "max_latency_ms": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 3600000.0,
                "minimum": 500.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Latency Ms"
          },
          "quality_priority": {
            "$ref": "#/components/schemas/QualityPriority",
            "default": "balanced"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Budget",
        "description": "Request-level ceiling. Godpip returns BUDGET_INSUFFICIENT rather than exceed it."
      },
      "BuildVsBuy": {
        "properties": {
          "recommendation": {
            "type": "string",
            "enum": [
              "buy",
              "build",
              "hybrid",
              "defer"
            ],
            "title": "Recommendation"
          },
          "reason": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "recommendation",
          "reason"
        ],
        "title": "BuildVsBuy"
      },
      "Candidate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Name"
          },
          "type": {
            "$ref": "#/components/schemas/DiscoverCategory"
          },
          "fit": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Fit"
          },
          "strengths": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Strengths"
          },
          "weaknesses": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Weaknesses"
          },
          "integration_complexity": {
            "$ref": "#/components/schemas/Level"
          },
          "estimated_cost_class": {
            "$ref": "#/components/schemas/CostClass"
          },
          "license": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "License"
          },
          "risks": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Risks"
          },
          "source_refs": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Source Refs"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "type",
          "fit",
          "integration_complexity",
          "estimated_cost_class"
        ],
        "title": "Candidate"
      },
      "CanonicalIntent": {
        "properties": {
          "objective": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Objective"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "scope": {
            "$ref": "#/components/schemas/Scope"
          },
          "explicit": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Explicit",
            "description": "Stated by the requester, verbatim in meaning."
          },
          "inferred": {
            "items": {
              "$ref": "#/components/schemas/InferredStatement"
            },
            "type": "array",
            "title": "Inferred"
          },
          "proposed": {
            "items": {
              "$ref": "#/components/schemas/ProposedStatement"
            },
            "type": "array",
            "title": "Proposed"
          },
          "unknowns": {
            "items": {
              "$ref": "#/components/schemas/Unknown"
            },
            "type": "array",
            "title": "Unknowns"
          },
          "constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Constraints",
            "description": "Only constraints stated by the person or the caller."
          },
          "success_definition": {
            "type": "string",
            "maxLength": 2000,
            "title": "Success Definition",
            "default": ""
          },
          "deliverable": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Deliverable"
              },
              {
                "type": "null"
              }
            ]
          },
          "solution_space": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "open",
                  "guided",
                  "fixed"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Solution Space",
            "description": "open: many valid approaches, diverge first. guided: a professional norm exists. fixed: the person or caller prescribed the method."
          },
          "downstream_authority": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DownstreamAuthority"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "objective",
          "scope"
        ],
        "title": "CanonicalIntent",
        "description": "First-class intent object shared by Bridge, Prompt Package and Resolve."
      },
      "Choice": {
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Label"
          },
          "consequence": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Consequence"
          },
          "recommended": {
            "type": "boolean",
            "title": "Recommended",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "label",
          "consequence"
        ],
        "title": "Choice"
      },
      "ClaimKind": {
        "type": "string",
        "enum": [
          "fact",
          "inference",
          "recommendation",
          "hypothesis"
        ],
        "title": "ClaimKind"
      },
      "Clarification": {
        "properties": {
          "required": {
            "type": "boolean",
            "title": "Required"
          },
          "questions": {
            "items": {
              "$ref": "#/components/schemas/ClarificationQuestion"
            },
            "type": "array",
            "title": "Questions"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "required"
        ],
        "title": "Clarification"
      },
      "ClarificationQuestion": {
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question"
          },
          "why_it_matters": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Why It Matters"
          },
          "options": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Options"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "question",
          "why_it_matters"
        ],
        "title": "ClarificationQuestion"
      },
      "Conflict": {
        "properties": {
          "claim": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Claim"
          },
          "positions": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "minItems": 2,
            "title": "Positions"
          },
          "evidence_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Evidence Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "claim",
          "positions"
        ],
        "title": "Conflict"
      },
      "ContextRequest": {
        "properties": {
          "field": {
            "type": "string",
            "pattern": "^(platform|user)\\.[a-z0-9_.]{1,64}$",
            "title": "Field"
          },
          "reason": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "field",
          "reason"
        ],
        "title": "ContextRequest",
        "description": "A context field that would resolve an open unknown on a later call."
      },
      "CostClass": {
        "type": "string",
        "enum": [
          "free",
          "low",
          "medium",
          "high",
          "enterprise",
          "unknown"
        ],
        "title": "CostClass"
      },
      "Decision": {
        "properties": {
          "selected": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Selected"
          },
          "rationale": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Rationale"
          },
          "alternatives": {
            "items": {
              "$ref": "#/components/schemas/Alternative"
            },
            "type": "array",
            "title": "Alternatives"
          },
          "tradeoffs": {
            "items": {
              "$ref": "#/components/schemas/Tradeoff"
            },
            "type": "array",
            "title": "Tradeoffs"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "invalidates_when": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Invalidates When"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "selected",
          "rationale",
          "confidence"
        ],
        "title": "Decision"
      },
      "Deliverable": {
        "properties": {
          "description": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Description"
          },
          "form": {
            "type": "string",
            "enum": [
              "artifact",
              "answer",
              "plan",
              "action",
              "conversation"
            ],
            "title": "Form"
          },
          "quantity": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantity",
            "description": "How many the person asked for, when stated or clear."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "description",
          "form"
        ],
        "title": "Deliverable",
        "description": "What the person asked to receive, in their terms. Downstream produces this, not a plan for it."
      },
      "DiscoverCategory": {
        "type": "string",
        "enum": [
          "ai_model",
          "api",
          "sdk",
          "mcp_server",
          "library",
          "framework",
          "service",
          "open_source_tool",
          "platform",
          "integration",
          "workflow_system"
        ],
        "title": "DiscoverCategory"
      },
      "DiscoverEnvironment": {
        "properties": {
          "platform": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Platform"
          },
          "stack": {
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "type": "array",
            "title": "Stack"
          },
          "deployment": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Deployment"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "DiscoverEnvironment"
      },
      "DiscoverRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "execution_mode": {
            "$ref": "#/components/schemas/ExecutionMode",
            "description": "auto lets Godpip queue a job when the work cannot finish within the budget latency.",
            "default": "auto"
          },
          "capability": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Capability"
          },
          "environment": {
            "$ref": "#/components/schemas/DiscoverEnvironment"
          },
          "constraints": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Constraints"
          },
          "preference": {
            "type": "string",
            "enum": [
              "reuse_before_build",
              "build_preferred",
              "neutral"
            ],
            "title": "Preference",
            "default": "reuse_before_build"
          },
          "categories": {
            "items": {
              "$ref": "#/components/schemas/DiscoverCategory"
            },
            "type": "array",
            "title": "Categories",
            "description": "Restrict the search; empty means all."
          },
          "freshness": {
            "$ref": "#/components/schemas/Freshness",
            "default": "current"
          },
          "max_candidates": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Max Candidates",
            "default": 5
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "capability"
        ],
        "title": "DiscoverRequest"
      },
      "DiscoverResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DiscoverResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "DiscoverResponse"
      },
      "DiscoverResult": {
        "properties": {
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/Candidate"
            },
            "type": "array",
            "title": "Candidates"
          },
          "recommended": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Decision"
              },
              {
                "type": "null"
              }
            ]
          },
          "build_vs_buy": {
            "$ref": "#/components/schemas/BuildVsBuy"
          },
          "missing_capability": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Missing Capability"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/Source"
            },
            "type": "array",
            "title": "Sources"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "build_vs_buy"
        ],
        "title": "DiscoverResult"
      },
      "DownstreamAuthority": {
        "properties": {
          "may_challenge_defaults": {
            "type": "boolean",
            "title": "May Challenge Defaults"
          },
          "may_propose_alternatives": {
            "type": "boolean",
            "title": "May Propose Alternatives"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "may_challenge_defaults",
          "may_propose_alternatives"
        ],
        "title": "DownstreamAuthority"
      },
      "EnvelopeStatus": {
        "type": "string",
        "enum": [
          "completed",
          "queued",
          "running"
        ],
        "title": "EnvelopeStatus"
      },
      "Environment": {
        "type": "string",
        "enum": [
          "live",
          "test"
        ],
        "title": "Environment"
      },
      "ErrorBody": {
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Message"
          },
          "recoverable": {
            "type": "boolean",
            "title": "Recoverable"
          },
          "suggested_action": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Suggested Action"
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message",
          "recoverable"
        ],
        "title": "ErrorBody"
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "INVALID_REQUEST",
          "INSUFFICIENT_CONTEXT",
          "AMBIGUITY_REQUIRES_INPUT",
          "BUDGET_INSUFFICIENT",
          "PROVIDER_UNAVAILABLE",
          "RESEARCH_FAILED",
          "NO_VALID_SOLUTION",
          "UNSUPPORTED_CAPABILITY",
          "RATE_LIMITED",
          "SAFETY_RESTRICTED",
          "INTERNAL_ERROR",
          "UNAUTHENTICATED",
          "PERMISSION_DENIED",
          "NOT_FOUND",
          "IDEMPOTENCY_CONFLICT",
          "PAYLOAD_TOO_LARGE",
          "CANCELLED"
        ],
        "title": "ErrorCode"
      },
      "ErrorResponse": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorBody"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorResponse"
      },
      "Evidence": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^ev_[A-Za-z0-9_-]+$",
            "title": "Id"
          },
          "type": {
            "$ref": "#/components/schemas/EvidenceType"
          },
          "claim": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Claim"
          },
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source",
            "description": "Source id (src_...) or a short description."
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "retrieved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieved At"
          },
          "supports": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Supports",
            "description": "Ids of findings this evidence supports."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "claim",
          "confidence"
        ],
        "title": "Evidence"
      },
      "EvidenceType": {
        "type": "string",
        "enum": [
          "source",
          "observation",
          "benchmark",
          "inference"
        ],
        "title": "EvidenceType"
      },
      "ExecutionMode": {
        "type": "string",
        "enum": [
          "auto",
          "sync",
          "async"
        ],
        "title": "ExecutionMode"
      },
      "ExpertNotesOut": {
        "properties": {
          "checks": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 5,
            "title": "Checks"
          },
          "pitfalls": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 3,
            "title": "Pitfalls"
          },
          "quality_bar": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality Bar"
          },
          "safety": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Safety"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ExpertNotesOut",
        "description": "Professional method for requests like this one. Not the person's words; never a restatement."
      },
      "ExplainInput": {
        "properties": {
          "code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Code"
          },
          "message": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          },
          "raw": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw",
            "description": "Logs, stack traces or tool output."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ExplainInput"
      },
      "ExplainRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "input": {
            "$ref": "#/components/schemas/ExplainInput"
          },
          "audience": {
            "type": "string",
            "enum": [
              "non_technical_owner",
              "end_user",
              "developer",
              "operator",
              "executive"
            ],
            "title": "Audience",
            "default": "non_technical_owner"
          },
          "goal": {
            "type": "string",
            "enum": [
              "actionable_explanation",
              "summary",
              "status_update"
            ],
            "title": "Goal",
            "default": "actionable_explanation"
          },
          "locale": {
            "type": "string",
            "maxLength": 35,
            "title": "Locale",
            "default": "en"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "input"
        ],
        "title": "ExplainRequest"
      },
      "ExplainResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ExplainResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "ExplainResponse"
      },
      "ExplainResult": {
        "properties": {
          "summary": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Summary"
          },
          "impact": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Impact"
          },
          "recommended_action": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Recommended Action"
          },
          "choices": {
            "items": {
              "$ref": "#/components/schemas/Choice"
            },
            "type": "array",
            "title": "Choices"
          },
          "urgency": {
            "$ref": "#/components/schemas/Importance"
          },
          "requires_human_action": {
            "type": "boolean",
            "title": "Requires Human Action"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "summary",
          "impact",
          "recommended_action",
          "urgency",
          "requires_human_action"
        ],
        "title": "ExplainResult"
      },
      "FailureMode": {
        "properties": {
          "mode": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Mode"
          },
          "trigger": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Trigger"
          },
          "mitigation": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Mitigation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mode",
          "trigger"
        ],
        "title": "FailureMode"
      },
      "FeedbackAck": {
        "properties": {
          "accepted": {
            "type": "boolean",
            "title": "Accepted"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "accepted"
        ],
        "title": "FeedbackAck"
      },
      "FeedbackRequest": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "success",
              "partial",
              "failure"
            ],
            "title": "Outcome"
          },
          "first_pass": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "First Pass"
          },
          "rating": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 5.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Rating"
          },
          "failure_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "misinterpreted_intent",
                  "missing_requirement",
                  "factually_wrong",
                  "stale",
                  "target_refused",
                  "contract_violation",
                  "not_actionable",
                  "other"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Failure Type"
          },
          "notes": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Notes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "outcome"
        ],
        "title": "FeedbackRequest"
      },
      "Finding": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^fd_[A-Za-z0-9_-]+$",
            "title": "Id"
          },
          "statement": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Statement"
          },
          "kind": {
            "$ref": "#/components/schemas/ClaimKind"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "evidence_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Evidence Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "statement",
          "kind",
          "confidence"
        ],
        "title": "Finding"
      },
      "Freshness": {
        "type": "string",
        "enum": [
          "any",
          "recent",
          "current",
          "real_time"
        ],
        "title": "Freshness"
      },
      "Importance": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high",
          "critical"
        ],
        "title": "Importance"
      },
      "InferredStatement": {
        "properties": {
          "statement": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Statement"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "basis": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Basis",
            "description": "What in the input supports it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "statement",
          "confidence"
        ],
        "title": "InferredStatement"
      },
      "InventRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "execution_mode": {
            "$ref": "#/components/schemas/ExecutionMode",
            "description": "auto lets Godpip queue a job when the work cannot finish within the budget latency.",
            "default": "auto"
          },
          "mission": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "title": "Mission"
          },
          "constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Constraints"
          },
          "existing_approaches": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Existing Approaches"
          },
          "why_existing_options_fail": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Why Existing Options Fail"
          },
          "novelty": {
            "$ref": "#/components/schemas/Level",
            "default": "high"
          },
          "output": {
            "type": "string",
            "enum": [
              "approach_set",
              "single_approach"
            ],
            "title": "Output",
            "default": "approach_set"
          },
          "max_approaches": {
            "type": "integer",
            "maximum": 8.0,
            "minimum": 1.0,
            "title": "Max Approaches",
            "default": 3
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "mission"
        ],
        "title": "InventRequest"
      },
      "InventResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InventResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "InventResponse"
      },
      "InventResult": {
        "properties": {
          "approaches": {
            "items": {
              "$ref": "#/components/schemas/Approach"
            },
            "type": "array",
            "minItems": 1,
            "title": "Approaches"
          },
          "recommended_experiment": {
            "$ref": "#/components/schemas/RecommendedExperiment"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "approaches",
          "recommended_experiment"
        ],
        "title": "InventResult"
      },
      "Job": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^job_[A-Za-z0-9]+$",
            "title": "Id"
          },
          "object": {
            "type": "string",
            "const": "job",
            "title": "Object",
            "default": "job"
          },
          "capability": {
            "type": "string",
            "enum": [
              "bridge",
              "prompt_package",
              "research",
              "discover",
              "resolve",
              "invent",
              "explain"
            ],
            "title": "Capability"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At"
          },
          "finished_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "response": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response",
            "description": "The capability's full envelope once completed."
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ErrorBody"
              },
              {
                "type": "null"
              }
            ]
          },
          "input_required": {
            "items": {
              "$ref": "#/components/schemas/Unknown"
            },
            "type": "array",
            "title": "Input Required",
            "description": "Blocking questions while status is waiting."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "capability",
          "status",
          "request_id",
          "created_at"
        ],
        "title": "Job"
      },
      "JobInputRequest": {
        "properties": {
          "answers": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "minProperties": 1,
            "title": "Answers",
            "description": "Map of question text to answer."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "answers"
        ],
        "title": "JobInputRequest"
      },
      "JobStatus": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "waiting",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "JobStatus"
      },
      "Level": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ],
        "title": "Level"
      },
      "MemoryWrite": {
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "platform",
              "user"
            ],
            "title": "Scope"
          },
          "key": {
            "type": "string",
            "pattern": "^[a-z0-9_.]{1,64}$",
            "title": "Key"
          },
          "value": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Value"
          },
          "source": {
            "type": "string",
            "enum": [
              "stated",
              "inferred"
            ],
            "title": "Source"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "scope",
          "key",
          "value",
          "source",
          "confidence"
        ],
        "title": "MemoryWrite",
        "description": "A suggested write to the client's own storage. The client decides; Godpip stores nothing."
      },
      "ModelInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "modes": {
            "items": {
              "$ref": "#/components/schemas/PromptMode"
            },
            "type": "array",
            "title": "Modes"
          },
          "status": {
            "type": "string",
            "enum": [
              "supported",
              "beta",
              "deprecated"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "provider",
          "modes",
          "status"
        ],
        "title": "ModelInfo",
        "description": "A downstream target Prompt Package can compile for. Not Godpip's internal route."
      },
      "ModelList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/ModelInfo"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data"
        ],
        "title": "ModelList"
      },
      "PlatformContext": {
        "properties": {
          "conventions": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 50,
            "title": "Conventions"
          },
          "artifacts": {
            "items": {
              "$ref": "#/components/schemas/ArtifactRef"
            },
            "type": "array",
            "maxItems": 50,
            "title": "Artifacts"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PlatformContext",
        "description": "The client platform's conventions. Supplied by the client per call; never stored by Godpip."
      },
      "ProfessionalBrief": {
        "properties": {
          "problem": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Problem"
          },
          "user": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "User"
          },
          "objective": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Objective"
          },
          "requirements": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Requirements"
          },
          "constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Constraints"
          },
          "risks": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Risks"
          },
          "recommended_next_step": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Recommended Next Step"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "problem",
          "user",
          "objective",
          "recommended_next_step"
        ],
        "title": "ProfessionalBrief"
      },
      "PromptFallback": {
        "properties": {
          "when": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "When"
          },
          "prompt_delta": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "title": "Prompt Delta"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "when",
          "prompt_delta"
        ],
        "title": "PromptFallback"
      },
      "PromptMode": {
        "type": "string",
        "enum": [
          "image",
          "video",
          "audio",
          "music",
          "code",
          "reasoning",
          "structured_output",
          "copy",
          "analysis",
          "agent_task",
          "tool_call"
        ],
        "title": "PromptMode"
      },
      "PromptOutputSpec": {
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "prompt_package",
              "single_prompt"
            ],
            "title": "Format",
            "default": "prompt_package"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PromptOutputSpec"
      },
      "PromptPackage": {
        "properties": {
          "system_prompt": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt"
          },
          "task_prompt": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "title": "Task Prompt"
          },
          "reference_map": {
            "additionalProperties": {
              "$ref": "#/components/schemas/ReferenceBinding"
            },
            "type": "object",
            "title": "Reference Map"
          },
          "positive_constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Positive Constraints"
          },
          "negative_constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Negative Constraints"
          },
          "continuity_rules": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Continuity Rules"
          },
          "output_contract": {
            "additionalProperties": true,
            "type": "object",
            "title": "Output Contract"
          },
          "acceptance_criteria": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Acceptance Criteria"
          },
          "native_parameters": {
            "additionalProperties": true,
            "type": "object",
            "title": "Native Parameters",
            "description": "Target-specific settings such as aspect ratio."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_prompt"
        ],
        "title": "PromptPackage"
      },
      "PromptPackageRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "task": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptTask"
              },
              {
                "type": "null"
              }
            ]
          },
          "intent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CanonicalIntent"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pass a Bridge canonical_intent directly instead of task."
          },
          "mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptMode"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required with intent; ignored with task."
          },
          "target": {
            "$ref": "#/components/schemas/PromptTarget"
          },
          "references": {
            "items": {
              "$ref": "#/components/schemas/Reference"
            },
            "type": "array",
            "maxItems": 64,
            "title": "References"
          },
          "constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Constraints"
          },
          "output": {
            "$ref": "#/components/schemas/PromptOutputSpec"
          },
          "quality": {
            "$ref": "#/components/schemas/Quality",
            "default": "standard"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PromptPackageRequest"
      },
      "PromptPackageResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PromptPackageResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "PromptPackageResponse"
      },
      "PromptPackageResult": {
        "properties": {
          "target": {
            "$ref": "#/components/schemas/ResolvedTarget"
          },
          "canonical_intent": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Canonical Intent",
            "description": "One-sentence statement of the preserved intent."
          },
          "package": {
            "$ref": "#/components/schemas/PromptPackage"
          },
          "fallbacks": {
            "items": {
              "$ref": "#/components/schemas/PromptFallback"
            },
            "type": "array",
            "title": "Fallbacks"
          },
          "risks": {
            "items": {
              "$ref": "#/components/schemas/Risk"
            },
            "type": "array",
            "title": "Risks"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "target",
          "canonical_intent",
          "package"
        ],
        "title": "PromptPackageResult"
      },
      "PromptTarget": {
        "properties": {
          "provider": {
            "type": "string",
            "maxLength": 100,
            "title": "Provider",
            "default": "auto"
          },
          "model": {
            "type": "string",
            "maxLength": 200,
            "title": "Model",
            "default": "auto"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PromptTarget"
      },
      "PromptTask": {
        "properties": {
          "objective": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Objective"
          },
          "mode": {
            "$ref": "#/components/schemas/PromptMode"
          },
          "operation": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 64
              },
              {
                "type": "null"
              }
            ],
            "title": "Operation",
            "description": "Optional verb within the mode, for example generate, edit, transform."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "objective",
          "mode"
        ],
        "title": "PromptTask"
      },
      "Proof": {
        "properties": {
          "experiment": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Experiment"
          },
          "success_signal": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Success Signal"
          },
          "kill_signal": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Kill Signal"
          },
          "estimated_effort": {
            "type": "string",
            "enum": [
              "hours",
              "days",
              "weeks"
            ],
            "title": "Estimated Effort"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "experiment",
          "success_signal",
          "kill_signal",
          "estimated_effort"
        ],
        "title": "Proof",
        "description": "Smallest credible experiment that would validate or kill an approach."
      },
      "ProposedStatement": {
        "properties": {
          "statement": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Statement"
          },
          "reason": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Reason"
          },
          "kind": {
            "type": "string",
            "enum": [
              "intent",
              "solution"
            ],
            "title": "Kind",
            "description": "intent: fills a gap in what is wanted. solution: a hint about how to do it (omitted unless behavior.include_solution_hints).",
            "default": "intent"
          },
          "binding": {
            "type": "boolean",
            "const": false,
            "title": "Binding",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "statement",
          "reason"
        ],
        "title": "ProposedStatement",
        "description": "A non-binding proposal. Downstream systems may replace it."
      },
      "Quality": {
        "type": "string",
        "enum": [
          "draft",
          "standard",
          "production"
        ],
        "title": "Quality"
      },
      "QualityPriority": {
        "type": "string",
        "enum": [
          "cost",
          "balanced",
          "quality"
        ],
        "title": "QualityPriority"
      },
      "RecommendedExperiment": {
        "properties": {
          "approach": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Approach"
          },
          "rationale": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Rationale"
          },
          "proof": {
            "$ref": "#/components/schemas/Proof"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "approach",
          "rationale",
          "proof"
        ],
        "title": "RecommendedExperiment"
      },
      "Reference": {
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Id"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "audio",
              "document",
              "code",
              "data",
              "text"
            ],
            "title": "Type"
          },
          "role": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Role"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "uri": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "title": "Uri",
            "description": "Optional. Godpip only fetches https URIs and never private hosts."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "type",
          "role"
        ],
        "title": "Reference",
        "description": "A client-supplied asset the result must account for."
      },
      "ReferenceBinding": {
        "properties": {
          "role": {
            "type": "string",
            "title": "Role"
          },
          "usage": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Usage"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "role",
          "usage"
        ],
        "title": "ReferenceBinding"
      },
      "ResearchDepth": {
        "type": "string",
        "enum": [
          "quick",
          "standard",
          "deep",
          "critical"
        ],
        "title": "ResearchDepth"
      },
      "ResearchOutputSpec": {
        "properties": {
          "include_sources": {
            "type": "boolean",
            "title": "Include Sources",
            "default": true
          },
          "include_alternatives": {
            "type": "boolean",
            "title": "Include Alternatives",
            "default": true
          },
          "include_failure_modes": {
            "type": "boolean",
            "title": "Include Failure Modes",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ResearchOutputSpec"
      },
      "ResearchRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "execution_mode": {
            "$ref": "#/components/schemas/ExecutionMode",
            "description": "auto lets Godpip queue a job when the work cannot finish within the budget latency.",
            "default": "auto"
          },
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question"
          },
          "domain": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Domain"
          },
          "known": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Known"
          },
          "unknowns": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Unknowns"
          },
          "constraints": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Constraints"
          },
          "depth": {
            "$ref": "#/components/schemas/ResearchDepth",
            "default": "standard"
          },
          "freshness": {
            "$ref": "#/components/schemas/Freshness",
            "default": "current"
          },
          "output": {
            "$ref": "#/components/schemas/ResearchOutputSpec"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "question"
        ],
        "title": "ResearchRequest"
      },
      "ResearchResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResearchResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "ResearchResponse"
      },
      "ResearchResult": {
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question"
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/Finding"
            },
            "type": "array",
            "title": "Findings",
            "description": "Every claim, typed fact/inference/recommendation/hypothesis."
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "type": "array",
            "title": "Evidence"
          },
          "conflicts": {
            "items": {
              "$ref": "#/components/schemas/Conflict"
            },
            "type": "array",
            "title": "Conflicts"
          },
          "alternatives": {
            "items": {
              "$ref": "#/components/schemas/Alternative"
            },
            "type": "array",
            "title": "Alternatives"
          },
          "failure_modes": {
            "items": {
              "$ref": "#/components/schemas/FailureMode"
            },
            "type": "array",
            "title": "Failure Modes"
          },
          "recommendation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Decision"
              },
              {
                "type": "null"
              }
            ]
          },
          "unknowns_remaining": {
            "items": {
              "$ref": "#/components/schemas/Unknown"
            },
            "type": "array",
            "title": "Unknowns Remaining"
          },
          "sources": {
            "items": {
              "$ref": "#/components/schemas/Source"
            },
            "type": "array",
            "title": "Sources"
          },
          "depth_used": {
            "$ref": "#/components/schemas/ResearchDepth"
          },
          "depth_recommendation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResearchDepth"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when Godpip advises escalating depth."
          },
          "research_summary": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Research Summary"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "question",
          "depth_used",
          "research_summary"
        ],
        "title": "ResearchResult"
      },
      "ResolvableBy": {
        "type": "string",
        "enum": [
          "research",
          "inference",
          "user",
          "specialist"
        ],
        "title": "ResolvableBy"
      },
      "ResolveRequest": {
        "properties": {
          "budget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Budget"
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Reference",
            "description": "Opaque client correlation id, echoed in metadata. Never interpreted."
          },
          "execution_mode": {
            "$ref": "#/components/schemas/ExecutionMode",
            "description": "auto lets Godpip queue a job when the work cannot finish within the budget latency.",
            "default": "auto"
          },
          "objective": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Objective"
          },
          "problem": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 1,
            "title": "Problem"
          },
          "known_context": {
            "additionalProperties": true,
            "type": "object",
            "title": "Known Context"
          },
          "intent": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CanonicalIntent"
              },
              {
                "type": "null"
              }
            ]
          },
          "constraints": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Constraints"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/Attempt"
            },
            "type": "array",
            "title": "Attempts"
          },
          "required_output": {
            "type": "string",
            "enum": [
              "decision_plan",
              "diagnosis_only",
              "options"
            ],
            "title": "Required Output",
            "default": "decision_plan"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "objective",
          "problem"
        ],
        "title": "ResolveRequest"
      },
      "ResolveResponse": {
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^req_[A-Za-z0-9]+$",
            "title": "Request Id"
          },
          "api_version": {
            "type": "string",
            "const": "v1",
            "title": "Api Version",
            "default": "v1"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "status": {
            "$ref": "#/components/schemas/EnvelopeStatus"
          },
          "job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Job Id",
            "description": "Set when status is queued or running; poll /v1/jobs/{job_id}."
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolveResult"
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1.0,
                "minimum": 0.0,
                "description": "Calibrated confidence from 0 to 1."
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/Warning"
            },
            "type": "array",
            "title": "Warnings"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "request_id",
          "environment",
          "status"
        ],
        "title": "ResolveResponse"
      },
      "ResolveResult": {
        "properties": {
          "diagnosis": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Diagnosis"
          },
          "root_causes": {
            "items": {
              "$ref": "#/components/schemas/RootCause"
            },
            "type": "array",
            "title": "Root Causes"
          },
          "solution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Solution"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent only when required_output is diagnosis_only."
          },
          "decision": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Decision"
              },
              {
                "type": "null"
              }
            ]
          },
          "risks": {
            "items": {
              "$ref": "#/components/schemas/Risk"
            },
            "type": "array",
            "title": "Risks"
          },
          "verification_plan": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "title": "Verification Plan"
          },
          "unknowns_remaining": {
            "items": {
              "$ref": "#/components/schemas/Unknown"
            },
            "type": "array",
            "title": "Unknowns Remaining"
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/Evidence"
            },
            "type": "array",
            "title": "Evidence"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "diagnosis"
        ],
        "title": "ResolveResult"
      },
      "ResolvedTarget": {
        "properties": {
          "provider": {
            "type": "string",
            "title": "Provider"
          },
          "model": {
            "type": "string",
            "title": "Model"
          },
          "adapter": {
            "type": "string",
            "title": "Adapter",
            "description": "Internal adapter family, for example video_model."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider",
          "model",
          "adapter"
        ],
        "title": "ResolvedTarget"
      },
      "Risk": {
        "properties": {
          "risk": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Risk"
          },
          "likelihood": {
            "$ref": "#/components/schemas/Level"
          },
          "impact": {
            "$ref": "#/components/schemas/Level"
          },
          "mitigation": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Mitigation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "risk",
          "likelihood",
          "impact"
        ],
        "title": "Risk"
      },
      "RootCause": {
        "properties": {
          "cause": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Cause"
          },
          "confidence": {
            "type": "number",
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Confidence",
            "description": "Calibrated confidence from 0 to 1."
          },
          "evidence_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Evidence Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "cause",
          "confidence"
        ],
        "title": "RootCause"
      },
      "Scope": {
        "type": "string",
        "enum": [
          "conversation",
          "atomic_task",
          "change_request",
          "feature",
          "project",
          "new_product",
          "strategy",
          "research",
          "problem",
          "incident"
        ],
        "title": "Scope"
      },
      "Solution": {
        "properties": {
          "recommended": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Recommended"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/SolutionStep"
            },
            "type": "array",
            "title": "Steps"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "recommended"
        ],
        "title": "Solution"
      },
      "SolutionStep": {
        "properties": {
          "order": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Order"
          },
          "action": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Action"
          },
          "verification": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Verification"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "order",
          "action"
        ],
        "title": "SolutionStep"
      },
      "Source": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^src_[A-Za-z0-9_-]+$",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Title"
          },
          "url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2048
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "publisher": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300
              },
              {
                "type": "null"
              }
            ],
            "title": "Publisher"
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Published At"
          },
          "retrieved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Retrieved At",
            "description": "When Godpip read the source; drives freshness."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "title"
        ],
        "title": "Source"
      },
      "Tradeoff": {
        "properties": {
          "dimension": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Dimension"
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Description"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "dimension",
          "description"
        ],
        "title": "Tradeoff"
      },
      "Unknown": {
        "properties": {
          "question": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Question"
          },
          "importance": {
            "$ref": "#/components/schemas/Importance"
          },
          "blocking": {
            "type": "boolean",
            "title": "Blocking",
            "default": false
          },
          "resolvable_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ResolvableBy"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "question",
          "importance"
        ],
        "title": "Unknown",
        "description": "An open question, labelled with how it can be closed."
      },
      "Usage": {
        "properties": {
          "input_units": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Input Units",
            "default": 0
          },
          "output_units": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Output Units",
            "default": 0
          },
          "billable": {
            "items": {
              "$ref": "#/components/schemas/BillableUnit"
            },
            "type": "array",
            "title": "Billable"
          },
          "cost": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cost",
            "description": "Charged amount for this request.",
            "default": 0.0
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Usage"
      },
      "UsageLine": {
        "properties": {
          "capability": {
            "type": "string",
            "title": "Capability"
          },
          "unit": {
            "type": "string",
            "title": "Unit"
          },
          "quantity": {
            "type": "number",
            "minimum": 0.0,
            "title": "Quantity"
          },
          "requests": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Requests"
          },
          "cost": {
            "type": "number",
            "minimum": 0.0,
            "title": "Cost"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "capability",
          "unit",
          "quantity",
          "requests",
          "cost"
        ],
        "title": "UsageLine"
      },
      "UsageReport": {
        "properties": {
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "period_start": {
            "type": "string",
            "format": "date-time",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date-time",
            "title": "Period End"
          },
          "lines": {
            "items": {
              "$ref": "#/components/schemas/UsageLine"
            },
            "type": "array",
            "title": "Lines"
          },
          "total_cost": {
            "type": "number",
            "minimum": 0.0,
            "title": "Total Cost"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency",
            "default": "USD"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "environment",
          "period_start",
          "period_end",
          "lines",
          "total_cost"
        ],
        "title": "UsageReport"
      },
      "UserContext": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:-]{1,128}$",
            "title": "Id",
            "description": "Opaque client identifier. Never an email or name."
          },
          "preferences": {
            "items": {
              "type": "string",
              "maxLength": 2000,
              "minLength": 1
            },
            "type": "array",
            "maxItems": 50,
            "title": "Preferences"
          },
          "history_summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "History Summary"
          },
          "data_classes": {
            "items": {
              "type": "string",
              "enum": [
                "preference",
                "profile",
                "history",
                "brand",
                "content",
                "location",
                "contact",
                "health",
                "financial",
                "government_id",
                "credentials"
              ]
            },
            "type": "array",
            "title": "Data Classes",
            "description": "Classes of data present in this slice."
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Purpose",
            "description": "Required when a sensitive class (health, financial, government_id, credentials) is present."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "UserContext",
        "description": "One end user's private slice, from the client's storage. Used, never kept."
      },
      "Warning": {
        "properties": {
          "code": {
            "type": "string",
            "maxLength": 64,
            "minLength": 1,
            "title": "Code"
          },
          "message": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Message"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "Warning"
      },
      "WebhookCreateRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "pattern": "^https://",
            "title": "Url"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "minItems": 1,
            "title": "Events"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreateRequest"
      },
      "WebhookEndpoint": {
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^whk_[A-Za-z0-9]+$",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "events": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "type": "array",
            "title": "Events"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "signing_secret": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signing Secret",
            "description": "Returned once, on creation only."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "url",
          "events",
          "created_at"
        ],
        "title": "WebhookEndpoint"
      },
      "WebhookEndpointList": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data"
        ],
        "title": "WebhookEndpointList"
      },
      "WebhookEventType": {
        "type": "string",
        "enum": [
          "job.completed",
          "job.failed",
          "job.cancelled",
          "job.requires_input",
          "usage.threshold"
        ],
        "title": "WebhookEventType"
      },
      "WebhookEvent": {
        "additionalProperties": false,
        "description": "Body POSTed to a webhook endpoint. Verify Godpip-Signature before trusting it.\n\nGodpip-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(signing_secret, \"<t>.<raw body>\")>.\nReject t more than 300 seconds from your clock. Delivery is at least once: dedupe on\nid (also sent as Godpip-Event-Id). A non-2xx answer, a redirect or no answer within 10\nseconds is retried after 30s, 2m, 10m, 30m, 1h, 2h, 4h and 8h, then marked failed.\ndata holds job_id, request_id, capability, status and, for job.failed, error; fetch\nthe result with GET /v1/jobs/{job_id}.",
        "properties": {
          "id": {
            "pattern": "^evt_[A-Za-z0-9]+$",
            "title": "Id",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "environment": {
            "$ref": "#/components/schemas/Environment"
          },
          "data": {
            "additionalProperties": true,
            "title": "Data",
            "type": "object"
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "environment",
          "data"
        ],
        "title": "WebhookEvent",
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gp_live_... or gp_test_...",
        "description": "Project-scoped API key. The prefix selects the environment; test keys never touch live usage. Required scopes are listed per operation."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "x-godpip-scopes": [
    "bridge:write",
    "discover:write",
    "explain:write",
    "feedback:write",
    "invent:write",
    "jobs:read",
    "jobs:write",
    "models:read",
    "prompts:write",
    "research:write",
    "resolve:write",
    "usage:read",
    "webhooks:read",
    "webhooks:write"
  ],
  "x-godpip-error-status": {
    "INVALID_REQUEST": 400,
    "UNAUTHENTICATED": 401,
    "BUDGET_INSUFFICIENT": 402,
    "PERMISSION_DENIED": 403,
    "NOT_FOUND": 404,
    "IDEMPOTENCY_CONFLICT": 409,
    "CANCELLED": 409,
    "PAYLOAD_TOO_LARGE": 413,
    "INSUFFICIENT_CONTEXT": 422,
    "AMBIGUITY_REQUIRES_INPUT": 422,
    "NO_VALID_SOLUTION": 422,
    "SAFETY_RESTRICTED": 422,
    "RATE_LIMITED": 429,
    "INTERNAL_ERROR": 500,
    "UNSUPPORTED_CAPABILITY": 501,
    "RESEARCH_FAILED": 502,
    "PROVIDER_UNAVAILABLE": 503
  }
}
