{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://microsoft.github.io/waza/schemas/execution-budget-1.0.schema.json","title":"Waza execution budget capabilities 1.0","description":"Host capability advertisement for runner execution budgets. $defs.request is the runner-request budgets field and $defs.report is the runner-terminal budget field; both are inlined verbatim into those schemas.","type":"object","additionalProperties":false,"required":["kind","schema_version","platform","resources"],"properties":{"kind":{"const":"waza.execution-budget-capabilities"},"schema_version":{"const":"1.0"},"platform":{"type":"object","additionalProperties":false,"required":["os","arch"],"properties":{"os":{"type":"string","minLength":1,"maxLength":32},"arch":{"type":"string","minLength":1,"maxLength":32}}},"resources":{"type":"array","minItems":7,"maxItems":7,"items":{"$ref":"#/$defs/capability"}}},"$defs":{"capability":{"type":"object","additionalProperties":false,"required":["resource","enforcement","measurement","detail"],"properties":{"resource":{"enum":["wall_time_ms","model_turns","tool_calls","cpu_time_ms","memory_bytes","disk_bytes","process_count"]},"enforcement":{"enum":["enforced","unsupported"]},"measurement":{"enum":["measured","unsupported"]},"scope":{"enum":["attempt","runner_process"]},"detail":{"type":"string","minLength":1,"maxLength":512}},"if":{"properties":{"measurement":{"const":"measured"}}},"then":{"required":["scope"]},"else":{"not":{"required":["scope"]}}},"request":{"description":"Optional runner-request budgets. Limits are upper bounds; absent limits are not applied. Budgets are execution policy and do not change logical identity.","type":"object","additionalProperties":false,"required":["limits"],"properties":{"limits":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"wall_time_ms":{"type":"integer","minimum":1,"maximum":86400000},"model_turns":{"type":"integer","minimum":0,"maximum":1000000},"tool_calls":{"type":"integer","minimum":0,"maximum":1000000},"cpu_time_ms":{"type":"integer","minimum":1,"maximum":86400000},"memory_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991},"disk_bytes":{"type":"integer","minimum":1,"maximum":9007199254740991},"process_count":{"type":"integer","minimum":1,"maximum":1000000}}},"unsupported":{"enum":["reject","report"],"description":"reject (default) fails before execution when any declared limit cannot be enforced on this host; report executes and reports the unenforced limit explicitly."}}},"report":{"description":"Configured limits, host enforcement and measurement capability, measured usage and any runner-enforced termination for one selected attempt. Correlate with the enclosing terminal identity and selection.","type":"object","additionalProperties":false,"required":["schema_version","platform","unsupported","state","resources"],"properties":{"schema_version":{"const":"1.0"},"platform":{"type":"object","additionalProperties":false,"required":["os","arch"],"properties":{"os":{"type":"string","minLength":1,"maxLength":32},"arch":{"type":"string","minLength":1,"maxLength":32}}},"unsupported":{"enum":["reject","report"]},"state":{"enum":["rejected_unsupported","not_started","within_budget","exceeded","terminated"]},"resources":{"type":"array","minItems":7,"maxItems":7,"items":{"type":"object","additionalProperties":false,"required":["resource","enforcement","measurement","detail"],"properties":{"resource":{"enum":["wall_time_ms","model_turns","tool_calls","cpu_time_ms","memory_bytes","disk_bytes","process_count"]},"enforcement":{"enum":["enforced","unsupported"]},"measurement":{"enum":["measured","unsupported"]},"scope":{"enum":["attempt","runner_process"]},"detail":{"type":"string","minLength":1,"maxLength":512},"limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"used":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991},"exceeded":{"type":"boolean"}},"dependentRequired":{"remaining":["limit","used"],"exceeded":["limit","used"]},"allOf":[{"if":{"properties":{"measurement":{"const":"unsupported"}}},"then":{"not":{"anyOf":[{"required":["used"]},{"required":["scope"]}]}}},{"if":{"properties":{"measurement":{"const":"measured"}}},"then":{"required":["scope"]}}]}},"termination":{"type":"object","additionalProperties":false,"required":["resource","limit","observed"],"properties":{"resource":{"enum":["wall_time_ms","model_turns","tool_calls"]},"limit":{"type":"integer","minimum":0,"maximum":9007199254740991},"observed":{"type":"integer","minimum":0,"maximum":9007199254740991}}}},"if":{"properties":{"state":{"const":"terminated"}}},"then":{"required":["termination"]},"else":{"not":{"required":["termination"]}}}}}