{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://warmplane.dev/schemas/config.schema.json",
"title": "Warmplane Config",
"type": "object",
"required": ["mcpServers"],
"properties": {
"port": { "type": "integer", "minimum": 1, "maximum": 65535 },
"authToken": { "type": "string" },
"toolTimeoutMs": { "type": "integer", "minimum": 1 },
"capabilityAliases": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"resourceAliases": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"promptAliases": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"policy": {
"type": "object",
"properties": {
"allow": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"deny": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"redactKeys": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"requireApproval": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"approvalTimeoutSecs": {
"type": "integer",
"minimum": 1
},
"webhook": {
"$ref": "#/$defs/webhookConfig"
}
},
"additionalProperties": false
},
"audit": {
"type": "object",
"properties": {
"enabled": { "type": "boolean", "default": true },
"filePath": { "type": "string" },
"hmacKey": { "type": "string" },
"hmacKeyEnv": { "type": "string" },
"bufferCapacity": { "type": "integer", "minimum": 1 },
"flushIntervalMs": { "type": "integer", "minimum": 1 },
"maxBatchSize": { "type": "integer", "minimum": 1 },
"siem": {
"type": "object",
"properties": {
"targets": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"required": ["type", "url"],
"properties": {
"type": { "const": "webhook" },
"url": { "type": "string", "format": "uri" },
"authHeader": { "type": "string" },
"headers": {
"type": "object",
"additionalProperties": { "type": "string" }
}
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "url", "token"],
"properties": {
"type": { "const": "splunk_hec" },
"url": { "type": "string", "format": "uri" },
"token": { "type": "string" },
"index": { "type": "string" },
"source": { "type": "string" }
},
"additionalProperties": false
}
]
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"resilience": {
"$ref": "#/$defs/resilienceConfig"
},
"mcpServers": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"$ref": "#/$defs/serverConfig"
}
},
"mcpHttpServer": {
"type": "object",
"description": "Streamable HTTP/SSE MCP server facade. When present the daemon co-hosts a second MCP listener. Non-loopback bind requires authToken or rbac.",
"properties": {
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535,
"default": 9191,
"description": "TCP port to listen on."
},
"bind": {
"type": "string",
"default": "127.0.0.1",
"description": "Bind address. Use 0.0.0.0 for network access (requires authToken or rbac)."
},
"sseKeepAliveMs": {
"type": ["integer", "null"],
"minimum": 0,
"default": 15000,
"description": "SSE keep-alive ping interval in milliseconds. null disables pings."
},
"jsonResponse": {
"type": "boolean",
"default": true,
"description": "Prefer application/json responses for simple request/response. Falls back to SSE when streaming is required."
},
"profile": {
"type": ["string", "null"],
"description": "Optional profile name restricting the exposed capability surface."
},
"allowedHosts": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Additional Host header values to accept. Loopback addresses are always permitted."
},
"allowedOrigins": {
"type": "array",
"items": { "type": "string" },
"default": [],
"description": "Browser origins (Origin header) to accept. Empty list disables origin checking."
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"$defs": {
"webhookConfig": {
"type": "object",
"required": ["url"],
"properties": {
"url": { "type": "string", "format": "uri" },
"secret": { "type": "string" },
"secretEnv": { "type": "string" },
"authHeader": { "type": "string" },
"headers": {
"type": "object",
"additionalProperties": { "type": "string" }
}
},
"additionalProperties": false
},
"resilienceConfig": {
"type": "object",
"properties": {
"failureThreshold": { "type": "integer", "minimum": 1, "default": 3 },
"cooldownMs": { "type": "integer", "minimum": 1, "default": 30000 },
"consecutiveSuccesses": { "type": "integer", "minimum": 1, "default": 2 },
"autoRestart": { "type": "boolean", "default": true },
"maxRestarts": { "type": "integer", "minimum": 0, "default": 5 },
"healthCheckIntervalSecs": { "type": "integer", "minimum": 1 }
},
"additionalProperties": false
},
"serverConfig": {
"type": "object",
"properties": {
"command": { "type": "string" },
"args": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"env": {
"type": "object",
"additionalProperties": { "type": "string" },
"default": {}
},
"url": { "type": "string", "format": "uri" },
"protocolVersion": { "type": "string" },
"allowStateless": { "type": "boolean" },
"headers": {
"type": "object",
"additionalProperties": { "type": "string" },
"default": {}
},
"resilience": {
"$ref": "#/$defs/resilienceConfig"
},
"auth": {
"oneOf": [
{
"type": "object",
"required": ["type"],
"properties": {
"type": { "const": "bearer" },
"token": { "type": "string" },
"tokenEnv": { "type": "string" }
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "username"],
"properties": {
"type": { "const": "basic" },
"username": { "type": "string" },
"password": { "type": "string" },
"passwordEnv": { "type": "string" }
},
"additionalProperties": false
},
{
"type": "object",
"required": ["type", "clientId", "authorizationServerUrl"],
"properties": {
"type": { "const": "oauth2" },
"clientId": { "type": "string" },
"authorizationServerUrl": { "type": "string", "format": "uri" },
"scopes": {
"type": "array",
"items": { "type": "string" },
"default": []
},
"clientMetadataUrl": { "type": "string", "format": "uri" }
},
"additionalProperties": false
}
]
}
},
"allOf": [
{
"if": {
"required": ["command"]
},
"then": {
"not": { "required": ["url"] }
}
},
{
"if": {
"required": ["url"]
},
"then": {
"not": { "required": ["command"] }
}
}
],
"anyOf": [
{ "required": ["command"] },
{ "required": ["url"] }
],
"additionalProperties": false
}
}
}