{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hydracept-com/json-schema/hydracept-com-public-capability-descriptor-schema.json",
  "title": "PublicCapabilityDescriptor",
  "description": "Anonymous discovery shape — no provider/routing/operator internals.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hydracept-com-openapi.json#/components/schemas/PublicCapabilityDescriptor",
  "properties": {
    "key": {
      "title": "Key",
      "type": "string"
    },
    "title": {
      "title": "Title",
      "type": "string"
    },
    "description": {
      "default": "",
      "title": "Description",
      "type": "string"
    },
    "modality": {
      "$ref": "#/$defs/CapabilityModality"
    },
    "inputSchema": {
      "additionalProperties": true,
      "title": "Inputschema",
      "type": "object"
    },
    "outputSchema": {
      "additionalProperties": true,
      "title": "Outputschema",
      "type": "object"
    },
    "outputSchemas": {
      "additionalProperties": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Outputschemas",
      "type": "object"
    },
    "requestTemplate": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Requesttemplate"
    },
    "executionModes": {
      "items": {
        "$ref": "#/$defs/CapabilityExecutionMode"
      },
      "title": "Executionmodes",
      "type": "array"
    },
    "idempotencyRequired": {
      "default": false,
      "title": "Idempotencyrequired",
      "type": "boolean"
    },
    "estimateAvailable": {
      "default": false,
      "title": "Estimateavailable",
      "type": "boolean"
    },
    "family": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Family"
    },
    "category": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Category"
    },
    "constraints": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Constraints"
    },
    "features": {
      "additionalProperties": true,
      "title": "Features",
      "type": "object"
    },
    "billingModes": {
      "anyOf": [
        {
          "$ref": "#/$defs/CapabilityBillingModes"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "inputConstraints": {
      "additionalProperties": {
        "$ref": "#/$defs/FieldInputConstraint"
      },
      "title": "Inputconstraints",
      "type": "object"
    },
    "inputMediaTypes": {
      "items": {
        "type": "string"
      },
      "title": "Inputmediatypes",
      "type": "array"
    },
    "pricing": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pricing"
    },
    "credentialSources": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Credentialsources"
    },
    "defaultCredentialSource": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Defaultcredentialsource"
    },
    "execution": {
      "anyOf": [
        {
          "$ref": "#/$defs/CapabilityExecutionFacts"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "output": {
      "anyOf": [
        {
          "$ref": "#/$defs/CapabilityOutputShape"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "interaction": {
      "anyOf": [
        {
          "$ref": "#/$defs/CapabilityInteractionFacts"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "funding": {
      "anyOf": [
        {
          "$ref": "#/$defs/CapabilityFundingFacts"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "readySummary": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Readysummary"
    },
    "routingProfiles": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Routingprofiles",
      "type": "array"
    }
  },
  "required": [
    "key",
    "title",
    "modality"
  ],
  "type": "object",
  "$defs": {
    "BillingModeAvailability": {
      "properties": {
        "available": {
          "title": "Available",
          "type": "boolean"
        },
        "serviceFeeBps": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Servicefeebps"
        }
      },
      "required": [
        "available"
      ],
      "title": "BillingModeAvailability",
      "type": "object"
    },
    "CapabilityBillingModes": {
      "properties": {
        "byok": {
          "$ref": "#/$defs/BillingModeAvailability"
        },
        "managed": {
          "$ref": "#/$defs/BillingModeAvailability"
        }
      },
      "required": [
        "byok",
        "managed"
      ],
      "title": "CapabilityBillingModes",
      "type": "object"
    },
    "CapabilityExecutionFacts": {
      "description": "Static invocation facts; authenticated runnability lives in workspaceRunnable.",
      "properties": {
        "oneShot": {
          "default": true,
          "title": "Oneshot",
          "type": "boolean"
        },
        "managedInferenceAvailable": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Managedinferenceavailable"
        },
        "inferenceProviderSetupRequired": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Inferenceprovidersetuprequired"
        },
        "projectLocalRequired": {
          "default": false,
          "title": "Projectlocalrequired",
          "type": "boolean"
        },
        "estimateAvailable": {
          "default": false,
          "title": "Estimateavailable",
          "type": "boolean"
        },
        "trialEligible": {
          "default": false,
          "title": "Trialeligible",
          "type": "boolean"
        },
        "selection": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Selection"
        },
        "supportsExplicitTarget": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Supportsexplicittarget"
        },
        "targetsHref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Targetshref"
        },
        "benchmarksHref": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Benchmarkshref"
        }
      },
      "title": "CapabilityExecutionFacts",
      "type": "object"
    },
    "CapabilityExecutionMode": {
      "type": "string",
      "enum": [
        "invoke_sync",
        "invoke_stream",
        "job_async"
      ],
      "title": "CapabilityExecutionMode"
    },
    "CapabilityFundingFacts": {
      "description": "Catalog funding facts only; authenticated access is a separate authority.",
      "properties": {
        "mode": {
          "title": "Mode",
          "type": "string"
        },
        "eligible": {
          "default": false,
          "title": "Eligible",
          "type": "boolean"
        },
        "status": {
          "default": "ready",
          "title": "Status",
          "type": "string"
        },
        "fundingOptions": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fundingoptions"
        },
        "remainingMicros": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Remainingmicros"
        }
      },
      "required": [
        "mode"
      ],
      "title": "CapabilityFundingFacts",
      "type": "object"
    },
    "CapabilityInteractionFacts": {
      "description": "Whether an ordinary requested invocation typically interrupts the user.",
      "properties": {
        "typicallyRequired": {
          "default": false,
          "title": "Typicallyrequired",
          "type": "boolean"
        },
        "reason": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Reason"
        }
      },
      "title": "CapabilityInteractionFacts",
      "type": "object"
    },
    "CapabilityModality": {
      "type": "string",
      "enum": [
        "text",
        "image",
        "video",
        "audio",
        "mesh",
        "embedding",
        "moderation",
        "decision",
        "infrastructure"
      ],
      "title": "CapabilityModality"
    },
    "CapabilityOutputShape": {
      "description": "Canonical useful terminal representation for a capability result.",
      "properties": {
        "kind": {
          "enum": [
            "artifact",
            "structured",
            "text"
          ],
          "title": "Kind",
          "type": "string"
        },
        "mediaType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Mediatype"
        }
      },
      "required": [
        "kind"
      ],
      "title": "CapabilityOutputShape",
      "type": "object"
    },
    "ConstraintMeasurement": {
      "enum": [
        "characters",
        "tokens"
      ],
      "title": "ConstraintMeasurement",
      "type": "string"
    },
    "FieldInputConstraint": {
      "description": "Normative limit for one capability input field.",
      "properties": {
        "measurement": {
          "$ref": "#/$defs/ConstraintMeasurement",
          "default": "characters"
        },
        "max": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max"
        },
        "overflow": {
          "$ref": "#/$defs/OverflowPolicy",
          "default": "reject"
        },
        "semantic": {
          "default": true,
          "title": "Semantic",
          "type": "boolean"
        },
        "byModel": {
          "additionalProperties": {
            "$ref": "#/$defs/ModelFieldConstraint"
          },
          "title": "Bymodel",
          "type": "object"
        }
      },
      "title": "FieldInputConstraint",
      "type": "object"
    },
    "ModelFieldConstraint": {
      "description": "Per-model overlay on a field constraint.",
      "properties": {
        "max": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Max"
        },
        "overflow": {
          "anyOf": [
            {
              "$ref": "#/$defs/OverflowPolicy"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "title": "ModelFieldConstraint",
      "type": "object"
    },
    "OverflowPolicy": {
      "description": "What Hydracept does when a field exceeds its measured maximum.",
      "enum": [
        "reject",
        "chunk",
        "prune"
      ],
      "title": "OverflowPolicy",
      "type": "string"
    }
  }
}