{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:operator-task-binding-create:v1",
  "title": "Operator Task Binding Create v1",
  "x-dia-workflow": "project",
  "x-dia-status": "draft",
  "x-dia-basis": [
    "doc/project/40-proposals/094-operator-task-packs-for-bounded-problem-solving.md"
  ],
  "description": "Request to bind one task profile an installed package pins. The operator supplies the profile document, which the host admits only at the package's registered digest, and only the choices the profile leaves open. Omitted safety values take the most restrictive admissible default, publication defaults to off, and the host fills the profile digest. A missing workspace, or a missing image variant when the profile admits several, is refused as incomplete; the request cannot carry digests, generations or portable facts. Creating a binding is an ordinary binding change: it names the operator binding under which it is made, and the host verifies that binding as current when it commits the change.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "schema/v",
    "binding/ref",
    "operator/binding-ref",
    "package/ref",
    "task-profile"
  ],
  "properties": {
    "schema": {
      "const": "operator-task-binding-create.v1"
    },
    "schema/v": {
      "const": 1
    },
    "binding/ref": {
      "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
    },
    "operator/binding-ref": {
      "$ref": "operator-task-common.v1.schema.json#/$defs/operatorBindingRef"
    },
    "package/ref": {
      "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
    },
    "task-profile": {
      "$ref": "operator-task-profile.v1.schema.json"
    },
    "workspace": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "root/ref",
        "backend/ref"
      ],
      "properties": {
        "root/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
        },
        "backend/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
        },
        "profile/root-ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref",
          "description": "Portable package root explicitly mapped to the selected local root. Absent means identity mapping; changing it changes the binding digest."
        }
      }
    },
    "inference": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "model-profile/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/inferenceRef"
        },
        "runtime/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/inferenceRef"
        }
      }
    },
    "publication": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "provider/participant-ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
        },
        "price-policy/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
        },
        "availability-policy/ref": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/ref"
        }
      }
    },
    "safety": {
      "type": "object",
      "additionalProperties": false,
      "minProperties": 1,
      "properties": {
        "hil/mode": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/hilMode"
        },
        "runtime-network": {
          "$ref": "operator-task-common.v1.schema.json#/$defs/runtimeNetwork"
        },
        "max/concurrent-runs": {
          "type": "integer",
          "minimum": 1,
          "maximum": 64
        }
      }
    },
    "image-variant/ref": {
      "$ref": "operator-task-common.v1.schema.json#/$defs/ref",
      "description": "Required when the profile admits more than one image variant; forbidden to restate otherwise by the host's admission, not by shape."
    }
  }
}
