{"$id":"https://ptc-runner.dev/schemas/ptc-host-config.schema.json","$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"description":"Operator-owned provider installation. Runtime loading remains authoritative.","properties":{"$schema":{"maxLength":2048,"minLength":1,"type":"string"},"credentials":{"additionalProperties":{"oneOf":[{"additionalProperties":false,"properties":{"env":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"}},"required":["env"],"type":"object"},{"additionalProperties":false,"properties":{"file":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["file"],"type":"object"},{"additionalProperties":false,"properties":{"literal":{"maxLength":65536,"minLength":1,"type":"string"}},"required":["literal"],"type":"object"}]},"maxProperties":128,"propertyNames":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"type":"object"},"install":{"additionalProperties":{"oneOf":[{"additionalProperties":false,"properties":{"accepts_data":{"default":["normal"],"items":{"enum":["normal","private_inspection"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"ceilings":{"additionalProperties":false,"properties":{"max_catalog_tools":{"default":128,"maximum":128,"minimum":1,"type":"integer"},"max_result_bytes":{"default":1000000,"maximum":1048576,"minimum":1,"type":"integer"},"timeout_ms":{"default":5000,"maximum":300000,"minimum":1,"type":"integer"}},"type":"object"},"data_class":{"default":"normal","enum":["normal","private_inspection"],"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"snapshot_identity":{"additionalProperties":false,"properties":{"field":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"tool":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"}},"required":["tool","field"],"type":"object"},"source":{"const":"mcp"},"tools":{"additionalProperties":{"additionalProperties":false,"properties":{"as":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"description":{"maxLength":4096,"minLength":1,"type":"string"},"effect":{"enum":["read","write"]},"error_feedback":{"default":"closed","enum":["closed","bounded"]},"model_visible":{"default":false,"type":"boolean"}},"required":["as","effect"],"type":"object"},"maxProperties":128,"minProperties":1,"propertyNames":{"pattern":"^[^\\s\\x00-\\x1f\\x7f]{1,128}$","type":"string"},"type":"object"},"transport":{"oneOf":[{"additionalProperties":false,"properties":{"args":{"default":[],"items":{"maxLength":131072,"minLength":1,"type":"string"},"maxItems":256,"type":"array"},"command":{"maxLength":4096,"minLength":1,"type":"string"},"cwd":{"default":".","maxLength":4096,"minLength":1,"type":"string"},"env":{"additionalProperties":{"additionalProperties":false,"properties":{"binding":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"}},"required":["binding"],"type":"object"},"default":{},"maxProperties":249,"propertyNames":{"pattern":"^[A-Za-z_][A-Za-z0-9_]*$","type":"string"},"type":"object"},"grace_ms":{"default":250,"maximum":5000,"minimum":1,"type":"integer"},"inherit_environment":{"default":true,"type":"boolean"},"start_timeout_ms":{"default":5000,"maximum":60000,"minimum":1,"type":"integer"},"stderr_bytes":{"default":65536,"maximum":1048576,"minimum":0,"type":"integer"},"type":{"const":"stdio"}},"required":["type","command"],"type":"object"},{"additionalProperties":false,"not":{"properties":{"auth":{"minItems":1}},"required":["auth","oauth"]},"oneOf":[{"properties":{"allow_insecure_loopback":{"const":false},"endpoint":{"pattern":"^https://[^\\s\\x00-\\x1f\\x7f-\\x9f]*$"}}},{"not":{"required":["oauth"]},"properties":{"allow_insecure_loopback":{"const":true},"auth":{"maxItems":0},"endpoint":{"pattern":"^http://(127\\.0\\.0\\.1|\\[::1\\])(:[0-9]+)?([/?][^\\s\\x00-\\x1f\\x7f-\\x9f]*)?$"}},"required":["allow_insecure_loopback"]}],"properties":{"allow_insecure_loopback":{"default":false,"type":"boolean"},"auth":{"default":[],"items":{"oneOf":[{"additionalProperties":false,"properties":{"binding":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"scheme":{"enum":["bearer","basic"]}},"required":["scheme","binding"],"type":"object"},{"additionalProperties":false,"properties":{"binding":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"header":{"maxLength":256,"minLength":1,"type":"string"},"scheme":{"const":"api_key"}},"required":["scheme","binding","header"],"type":"object"}]},"maxItems":8,"type":"array"},"endpoint":{"maxLength":4096,"minLength":1,"type":"string"},"oauth":{"additionalProperties":false,"properties":{"authorization_timeout_ms":{"default":300000,"maximum":900000,"minimum":1,"type":"integer"},"client":{"oneOf":[{"additionalProperties":false,"properties":{"client_id":{"maxLength":2048,"minLength":1,"type":"string"},"grant_types":{"contains":{"const":"authorization_code"},"items":{"enum":["authorization_code","refresh_token"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"loopback_redirect":{"additionalProperties":false,"properties":{"host":{"enum":["127.0.0.1","::1"]},"path":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["host","path"],"type":"object"},"registration":{"const":"pre_registered"},"token_endpoint_auth_method":{"const":"none"}},"required":["registration","client_id","token_endpoint_auth_method","grant_types","loopback_redirect"],"type":"object"},{"additionalProperties":false,"properties":{"client_id":{"maxLength":2048,"minLength":1,"type":"string"},"grant_types":{"contains":{"const":"authorization_code"},"items":{"enum":["authorization_code","refresh_token"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"redirect_uris":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":16,"minItems":1,"type":"array","uniqueItems":true},"registration":{"const":"pre_registered"},"token_endpoint_auth_method":{"const":"none"}},"required":["registration","client_id","token_endpoint_auth_method","grant_types","redirect_uris"],"type":"object"},{"additionalProperties":false,"properties":{"client_id":{"maxLength":2048,"minLength":1,"type":"string"},"client_secret_binding":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"grant_types":{"contains":{"const":"authorization_code"},"items":{"enum":["authorization_code","refresh_token"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"redirect_uris":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":16,"minItems":1,"type":"array","uniqueItems":true},"registration":{"const":"pre_registered"},"token_endpoint_auth_method":{"const":"client_secret_basic"}},"required":["registration","client_id","token_endpoint_auth_method","client_secret_binding","grant_types","redirect_uris"],"type":"object"},{"additionalProperties":false,"properties":{"client_id":{"maxLength":2048,"minLength":1,"type":"string"},"loopback_redirect":{"additionalProperties":false,"properties":{"host":{"enum":["127.0.0.1","::1"]},"path":{"maxLength":1024,"minLength":1,"type":"string"}},"required":["host","path"],"type":"object"},"registration":{"const":"client_id_metadata_document"},"token_endpoint_auth_method":{"const":"none"}},"required":["registration","client_id","token_endpoint_auth_method","loopback_redirect"],"type":"object"},{"additionalProperties":false,"properties":{"client_id":{"maxLength":2048,"minLength":1,"type":"string"},"redirect_uris":{"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":16,"minItems":1,"type":"array","uniqueItems":true},"registration":{"const":"client_id_metadata_document"},"token_endpoint_auth_method":{"const":"none"}},"required":["registration","client_id","token_endpoint_auth_method","redirect_uris"],"type":"object"}]},"default_scopes":{"default":[],"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"minItems":0,"type":"array","uniqueItems":true},"installation_id":{"maxLength":256,"minLength":1,"type":"string"},"issuer":{"maxLength":4096,"minLength":1,"type":"string"},"network":{"additionalProperties":false,"properties":{"additional_origins":{"default":[],"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"type":"array","uniqueItems":true},"private_network_origins":{"default":[],"items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":32,"type":"array","uniqueItems":true}},"type":"object"},"refresh_access":{"default":"none","enum":["none","when_supported"]},"resource":{"maxLength":4096,"minLength":1,"type":"string"},"scope_ceiling":{"items":{"maxLength":256,"minLength":1,"type":"string"},"maxItems":64,"minItems":0,"type":"array","uniqueItems":true},"unknown_expiry_ttl_ms":{"default":300000,"maximum":86400000,"minimum":1,"type":"integer"}},"required":["installation_id","issuer","scope_ceiling","client"],"type":"object"},"type":{"const":"streamable_http"}},"required":["type","endpoint"],"type":"object"}]}},"required":["source","transport","tools","installation_revision"],"type":"object"},{"additionalProperties":false,"properties":{"accepts_data":{"default":["normal"],"items":{"enum":["normal","private_inspection"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"cache":{"default":false,"type":"boolean"},"ceilings":{"additionalProperties":false,"properties":{"max_request_bytes":{"default":1000000,"maximum":1048576,"minimum":1,"type":"integer"},"max_response_bytes":{"default":1000000,"maximum":1048576,"minimum":1,"type":"integer"}},"type":"object"},"credential":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"data_class":{"default":"normal","enum":["normal","private_inspection"],"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"model":{"maxLength":256,"minLength":1,"type":"string"},"params":{"additionalProperties":false,"properties":{"max_tokens":{"maximum":1000000,"minimum":1,"type":"integer"},"seed":{"maximum":2147483647,"minimum":0,"type":"integer"},"temperature":{"maximum":2,"minimum":0,"type":"number"}},"type":"object"},"source":{"const":"llm"}},"required":["source","model","credential","installation_revision"],"type":"object"},{"additionalProperties":false,"properties":{"ceilings":{"additionalProperties":false,"properties":{"max_result_bytes":{"default":1048576,"maximum":1048576,"minimum":450,"type":"integer"},"max_source_bytes":{"default":8000000,"maximum":8000000,"minimum":1,"type":"integer"}},"type":"object"},"directory":{"maxLength":4096,"minLength":1,"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"source":{"const":"ptc_trace_snapshot"}},"required":["source","directory","installation_revision"],"type":"object"},{"additionalProperties":false,"properties":{"ceilings":{"additionalProperties":false,"properties":{"max_result_bytes":{"default":1048576,"maximum":1048576,"minimum":450,"type":"integer"},"max_source_bytes":{"default":8000000,"maximum":8000000,"minimum":1,"type":"integer"}},"type":"object"},"directory":{"maxLength":4096,"minLength":1,"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"source":{"const":"ptc_private_trace_snapshot"}},"required":["source","directory","installation_revision"],"type":"object"},{"additionalProperties":false,"properties":{"ceilings":{"additionalProperties":false,"properties":{"max_files":{"default":1024,"maximum":1024,"minimum":1,"type":"integer"},"max_result_bytes":{"default":1048576,"maximum":1048576,"minimum":450,"type":"integer"},"max_source_bytes":{"default":64000000,"maximum":64000000,"minimum":1,"type":"integer"}},"type":"object"},"directory":{"maxLength":4096,"minLength":1,"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"source":{"const":"ptc_inspection_snapshot"}},"required":["source","directory","installation_revision"],"type":"object"},{"additionalProperties":false,"properties":{"accepts_data":{"default":["normal"],"items":{"enum":["normal","private_inspection"]},"maxItems":2,"minItems":1,"type":"array","uniqueItems":true},"ceilings":{"additionalProperties":false,"properties":{"max_entries":{"default":10000,"maximum":10000,"minimum":1,"type":"integer"},"max_result_bytes":{"default":1048576,"maximum":1048576,"minimum":1,"type":"integer"}},"type":"object"},"data_class":{"default":"normal","enum":["normal","private_inspection"],"type":"string"},"fixtures":{"maxLength":4096,"minLength":1,"type":"string"},"installation_revision":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"source":{"const":"llm_replay"}},"required":["source","fixtures","installation_revision"],"type":"object"}]},"maxProperties":128,"minProperties":1,"propertyNames":{"pattern":"^[a-z][a-z0-9._-]{0,127}$","type":"string"},"type":"object"},"limits":{"additionalProperties":false,"description":"Optional operator-owned installed ceilings. Omitted limits keep their cataloged installed defaults.","properties":{"capability_argument_bytes":{"description":"Installed ceiling for capability_argument_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"capability_result_bytes":{"description":"Installed ceiling for capability_result_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"doctor_connectivity_timeout_ms":{"description":"Installed-only operational limit for doctor_connectivity_timeout_ms; applications cannot declare it.","maximum":30000,"minimum":100,"type":"integer"},"entry_source_bytes":{"description":"Installed ceiling for entry_source_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"evaluation_admission_timeout_ms":{"description":"Installed ceiling for evaluation_admission_timeout_ms; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"evaluation_heap_words":{"description":"Installed ceiling for evaluation_heap_words; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"evaluation_history_bytes":{"description":"Installed ceiling for evaluation_history_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"evaluation_memory_bytes":{"description":"Installed ceiling for evaluation_memory_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"evaluation_timeout_ms":{"description":"Installed ceiling for evaluation_timeout_ms; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"event_payload_bytes":{"description":"Installed ceiling for event_payload_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"live_provider_tasks":{"description":"Installed ceiling for live_provider_tasks; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"local_preflight_timeout_ms":{"description":"Installed-only operational limit for local_preflight_timeout_ms; applications cannot declare it.","maximum":30000,"minimum":100,"type":"integer"},"mission_capability_calls":{"description":"Installed ceiling for mission_capability_calls; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"mission_capability_calls_per_name":{"description":"Installed ceiling for mission_capability_calls_per_name; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"normal_event_bytes":{"description":"Installed ceiling for normal_event_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"normal_event_count":{"description":"Installed ceiling for normal_event_count; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"parallel_timeout_ms":{"description":"Installed ceiling for parallel_timeout_ms; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"protocol_errors":{"description":"Installed ceiling for protocol_errors; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"provider_cleanup_timeout_ms":{"description":"Installed-only operational limit for provider_cleanup_timeout_ms; applications cannot declare it.","maximum":30000,"minimum":100,"type":"integer"},"provider_heap_words":{"description":"Installed ceiling for provider_heap_words; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"run_duration_ms":{"description":"Installed ceiling for run_duration_ms; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"selection_validation_timeout_ms":{"description":"Installed-only operational limit for selection_validation_timeout_ms; applications cannot declare it.","maximum":30000,"minimum":100,"type":"integer"},"subordinate_evaluations":{"description":"Installed ceiling for subordinate_evaluations; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"subordinate_source_bytes":{"description":"Installed ceiling for subordinate_source_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"subordinate_source_checks":{"description":"Installed ceiling for subordinate_source_checks; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"terminal_result_bytes":{"description":"Installed ceiling for terminal_result_bytes; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"workflow_capability_calls":{"description":"Installed ceiling for workflow_capability_calls; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"workflow_capability_calls_per_name":{"description":"Installed ceiling for workflow_capability_calls_per_name; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"workflow_heap_words":{"description":"Installed ceiling for workflow_heap_words; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"},"workflow_timeout_ms":{"description":"Installed ceiling for workflow_timeout_ms; a manifest may only request less.","maximum":2592000000,"minimum":1,"type":"integer"}},"type":"object"},"runtime":{"additionalProperties":false,"properties":{"stdio_launcher":{"description":"Optional absolute trusted launcher override.","maxLength":4096,"minLength":1,"pattern":"^/","type":"string"}},"type":"object"}},"required":["install"],"title":"PtcRunner host configuration","type":"object"}
