{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:sensorium-action-semantics:v1",
  "title": "Sensorium Action Semantics v1",
  "description": "Versioned map from an (owner, kind, operation) triple to the registered capability it consumes and the rule that yields its effect class. Consumers derive capabilities and effect classes from it; a triple without a row refuses. Interface management operations have no row. Owner validation admits only these triples and rules: workbench observe/run from-command-profile; workbench process/run from-command-profile or fixed-mutation; workbench patch/apply and service-control/control fixed-mutation; interface observe/read and observe/subscribe fixed-observation; interface actuate/invoke from-descriptor or fixed-mutation.",
  "x-dia-workflow": "project",
  "x-dia-status": "draft",
  "x-dia-basis": [
    "doc/project/40-proposals/071-sensorium-workbench.md",
    "doc/project/40-proposals/094-operator-task-packs-for-bounded-problem-solving.md",
    "doc/project/40-proposals/083-sensorium-interactive-interfaces.md"
  ],
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "schema/v",
    "map/ref",
    "map/revision",
    "rows"
  ],
  "properties": {
    "schema": {
      "const": "sensorium-action-semantics.v1"
    },
    "schema/v": {
      "const": 1
    },
    "map/ref": {
      "$ref": "#/$defs/ref"
    },
    "map/revision": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "rows": {
      "type": "array",
      "minItems": 1,
      "maxItems": 256,
      "uniqueItems": true,
      "items": {
        "$ref": "#/$defs/row"
      }
    }
  },
  "$defs": {
    "ref": {
      "type": "string",
      "minLength": 3,
      "maxLength": 512,
      "pattern": "^[a-z][a-z0-9-]*:[^\\s/\\\\][^\\s\\\\]*$"
    },
    "row": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "owner",
        "kind",
        "operation",
        "capability/id",
        "effect/rule"
      ],
      "properties": {
        "owner": {
          "enum": [
            "workbench",
            "interface"
          ]
        },
        "kind": {
          "enum": [
            "observe",
            "process",
            "patch",
            "service-control",
            "actuate"
          ]
        },
        "operation": {
          "enum": [
            "run",
            "apply",
            "control",
            "read",
            "subscribe",
            "invoke"
          ]
        },
        "capability/id": {
          "type": "string",
          "minLength": 3,
          "maxLength": 256,
          "pattern": "^[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)+$"
        },
        "effect/rule": {
          "enum": [
            "fixed-observation",
            "fixed-mutation",
            "from-command-profile",
            "from-descriptor"
          ]
        }
      }
    }
  }
}
