{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nexuscrm.dev/schemas/runtime-worker-config-v1.json",
  "title": "NexusCRM Runtime Worker deployment configuration",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "NEXUSCRM_RUNTIME_WORKLOAD_IDENTITY_TOKEN_FILE",
    "NEXUSCRM_RUNTIME_WORKER_CONFIG_FILE"
  ],
  "properties": {
    "NEXUSCRM_RUNTIME_WORKER_ADMIN_ADDR": {
      "type": "string",
      "pattern": "^\\S*:\\d{1,5}$",
      "default": ":9191",
      "description": "Operational HTTP listen address for live, ready, version, capabilities, and metrics."
    },
    "NEXUSCRM_RUNTIME_WORKLOAD_IDENTITY_TOKEN_FILE": {
      "type": "string",
      "pattern": "^/.*",
      "description": "Absolute path to a projected workload-identity token. The worker has no business RPC identity channel; deployment and database policy own this mount."
    },
    "NEXUSCRM_RUNTIME_WORKER_CONFIG_FILE": {
      "type": "string",
      "pattern": "^/.*",
      "description": "Absolute path to the operator-authored worker role, ownership fence, queue bounds, pool bounds, and shutdown contract."
    },
    "NEXUSCRM_RUNTIME_WORKER_CATALOG_RECONCILE_CONFIG_FILE": {
      "type": "string",
      "pattern": "^/.*",
      "description": "Optional immutable Catalog reconcile v4 selection. Required only by a Layout-authoring Platform-command Worker that owns the fenced PUBLISHING phase."
    },
    "NEXUSCRM_RUNTIME_WORKER_TIMED_FLOW_OWNER_CONFIG_FILE": {
      "type": "string",
      "pattern": "^/.*",
      "description": "Optional absolute path to the exact scheduled-Flow Worker role whose active ownership and Catalog receipt the record-event role must verify before accepting timed Flow handoff."
    }
  }
}
