{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:sensorium-actuation.bridge.request:v1",
  "title": "Sensorium Actuation Bridge Request v1",
  "description": "Bounded companion-process request used by Python Sensorium connectors to delegate safety validation to sensorium-actuation-core.",
  "type": "object",
  "additionalProperties": false,
  "x-dia-workflow": "project",
  "x-dia-status": "draft",
  "x-dia-basis": ["doc/project/40-proposals/071-sensorium-workbench.md"],
  "required": ["schema", "schema/v", "operation", "payload"],
  "properties": {
    "schema": { "const": "sensorium-actuation.bridge.request.v1" },
    "schema/v": { "const": 1 },
    "operation": { "enum": ["relative-path.validate", "command-profile.matches-argv"] },
    "payload": { "type": "object" }
  },
  "allOf": [
    {
      "if": { "properties": { "operation": { "const": "relative-path.validate" } } },
      "then": {
        "properties": {
          "payload": {
            "type": "object",
            "additionalProperties": false,
            "required": ["relative/path"],
            "properties": { "relative/path": { "type": "string" } }
          }
        }
      }
    },
    {
      "if": { "properties": { "operation": { "const": "command-profile.matches-argv" } } },
      "then": {
        "properties": {
          "payload": {
            "type": "object",
            "additionalProperties": false,
            "required": ["profile", "argv"],
            "properties": {
              "profile": { "type": "object" },
              "argv": {
                "type": "array",
                "minItems": 1,
                "items": { "type": "string" }
              }
            }
          }
        }
      }
    }
  ]
}
