{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Maha Context Pack request",
  "description": "Compile task-specific, source-linked context. Source text and compiled context are processed transiently and not retained in the service ledger.",
  "type": "object",
  "required": ["clientRequestId", "task", "tokenBudget", "documents"],
  "properties": {
    "clientRequestId": { "type": "string", "minLength": 8, "maxLength": 120 },
    "task": { "type": "string", "minLength": 8, "maxLength": 1200 },
    "tokenBudget": { "type": "integer", "minimum": 64, "maximum": 16000, "description": "A model-neutral estimated-token budget; not a provider billing count." },
    "documents": {
      "type": "array", "minItems": 1, "maxItems": 8,
      "items": { "type": "object", "required": ["id", "text"], "properties": { "id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$" }, "title": { "type": "string", "maxLength": 160 }, "text": { "type": "string", "minLength": 1, "maxLength": 64000 } } }
    }
  },
  "additionalProperties": false
}
