pub const STEP_SCHEMA_JSON: &str = "{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://schemas.fleetforge.dev/step.json\",\n \"type\": \"object\",\n \"required\": [\"id\", \"type\", \"inputs\"],\n \"properties\": {\n \"id\": { \"type\": \"string\", \"format\": \"uuid\" },\n \"type\": { \"enum\": [\"llm\", \"tool\", \"map\", \"reduce\", \"branch\", \"replay\", \"agent\"] },\n \"inputs\": {\n \"type\": \"object\",\n \"properties\": {\n \"messages\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"role\", \"content\"],\n \"properties\": {\n \"role\": { \"enum\": [\"system\", \"user\", \"assistant\", \"tool\"] },\n \"content\": { \"type\": \"string\" }\n }\n }\n },\n \"prompt_ref\": { \"type\": \"string\" },\n \"prompt_params\": { \"type\": \"object\" },\n \"tools\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/toolSpec\" }\n },\n \"tool_choice\": {\n \"anyOf\": [\n { \"type\": \"string\", \"enum\": [\"auto\", \"none\"] },\n { \"type\": \"string\", \"pattern\": \"^required:[a-zA-Z0-9_.-]+$\" }\n ]\n },\n \"response_schema\": {\n \"anyOf\": [\n { \"type\": \"object\" },\n { \"type\": \"string\" }\n ]\n },\n \"response_strict\": { \"type\": \"boolean\", \"default\": true },\n \"model\": { \"type\": \"string\" },\n \"temperature\": { \"type\": \"number\", \"minimum\": 0, \"maximum\": 2 },\n \"context_sources\": {\n \"type\": \"array\",\n \"items\": { \"$ref\": \"#/$defs/contextSource\" }\n }\n },\n \"additionalProperties\": true\n },\n \"policy\": {\n \"type\": \"object\",\n \"properties\": {\n \"guardrails\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n },\n \"packs\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"required\": [\"name\"],\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"id\": { \"type\": \"string\" },\n \"phase\": {\n \"anyOf\": [\n { \"type\": \"string\", \"enum\": [\"pre\", \"mid\", \"post\"] },\n {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\", \"enum\": [\"pre\", \"mid\", \"post\"] },\n \"minItems\": 1\n }\n ]\n },\n \"hooks\": {\n \"anyOf\": [\n { \"type\": \"string\", \"enum\": [\"pre\", \"mid\", \"post\"] },\n {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\", \"enum\": [\"pre\", \"mid\", \"post\"] },\n \"minItems\": 1\n }\n ]\n },\n \"options\": { \"type\": \"object\" }\n },\n \"additionalProperties\": false\n }\n },\n \"egress_profile\": {\n \"type\": \"string\",\n \"enum\": [\"none\", \"allowlist\", \"tenant-default\"]\n },\n \"isolation\": {\n \"type\": \"string\",\n \"enum\": [\"docker\", \"firecracker\"]\n }\n },\n \"additionalProperties\": true\n },\n \"execution\": {\n \"type\": \"object\",\n \"properties\": {\n \"max_attempts\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"default\": 1\n },\n \"retry_backoff_ms\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"default\": 0\n },\n \"retry_backoff_factor\": {\n \"type\": \"number\",\n \"minimum\": 1,\n \"default\": 1\n },\n \"deadline_ms\": {\n \"type\": \"integer\",\n \"minimum\": 1\n },\n \"checkpoint\": {\n \"type\": \"boolean\",\n \"default\": false\n },\n \"compensation\": {\n \"type\": \"object\",\n \"properties\": {\n \"step\": { \"type\": \"string\", \"minLength\": 1 },\n \"reason\": { \"type\": \"string\" }\n },\n \"required\": [\"step\"],\n \"additionalProperties\": false\n },\n \"cost_hint\": {\n \"type\": \"object\",\n \"properties\": {\n \"tokens\": { \"type\": \"integer\", \"minimum\": 0 },\n \"usd\": { \"type\": \"number\", \"minimum\": 0 }\n },\n \"additionalProperties\": false\n }\n },\n \"additionalProperties\": false\n }\n },\n \"additionalProperties\": false,\n \"$defs\": {\n \"toolSpec\": {\n \"type\": \"object\",\n \"required\": [\"name\", \"schema\", \"description\"],\n \"properties\": {\n \"name\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"schema\": { \"type\": \"object\" }\n }\n },\n \"contextSource\": {\n \"type\": \"object\",\n \"required\": [\"kind\"],\n \"properties\": {\n \"kind\": { \"enum\": [\"memory:kv\", \"memory:vector\", \"artifact\", \"input\"] },\n \"namespace\": { \"type\": \"string\" },\n \"key\": { \"type\": \"string\" },\n \"top_k\": { \"type\": \"integer\" },\n \"query\": { \"type\": \"string\" }\n }\n }\n }\n}\n";Expand description
Embedded JSON schemas shared across FleetForge surfaces.