{
  "name": "com.acme.plc.start_batch",
  "kind": "command",
  "title": "Start batch",
  "description": "Call a PLC method to start a production batch.",
  "inputSchema": {
    "type": "object",
    "required": [
      "recipe"
    ],
    "properties": {
      "recipe": {
        "type": "string",
        "enum": [
          "A",
          "B",
          "C"
        ]
      }
    },
    "additionalProperties": false
  },
  "risk": "destructive",
  "privacy": "internal",
  "physical": true,
  "callers": [
    "human"
  ],
  "native": {
    "protocol": "opcua",
    "target": "opc.tcp://plc1:4840",
    "request": {
      "objectId": "ns=2;s=Line1",
      "methodId": "ns=2;s=StartBatch",
      "inputs": [
        "{{arguments.recipe}}"
      ]
    },
    "timeoutMs": 2000
  },
  "guards": {
    "whenStates": [
      "line-ready"
    ],
    "requiresMaintenance": false
  }
}
