6dc7e72ac8
agentd webhook-serve (agentd/webhook.py, stdlib): verifies X-Plane-Signature
(HMAC-SHA256 hex of the body, constant-time; 401 on missing/bad), routes by
data.project to a configured tenant (others 202), coalesces deliveries within
3 s into one tick, runs one more tick when deliveries arrive during a tick,
and retries every 15 s for up to 2 min while the lock is held (tick command
exit 75: flock -E 75 in the cron scripts, cli tick on Busy). Ticks run in a
systemd scope so restarting the receiver never kills one. Log:
<log_dir>/webhook.log; GET /healthz.
Config: webhook section (key names only, PLANE_WEBHOOK_SECRET scrubbed from
child envs like the Plane tokens), notify: {kind: none} as a no-op hook
called on every state move; the unused per-project webhook_secret_key is
gone (Plane webhooks are workspace-level). systemd unit for the LXC and
tools/plane-webhook.py to create/rotate the Plane webhook as the workspace
admin (secret straight into the Vault, never printed).
172 lines
6.4 KiB
JSON
172 lines
6.4 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "plane-agentd configuration",
|
|
"type": "object",
|
|
"required": ["plane", "terminals", "executors", "projects"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"plane": {
|
|
"type": "object",
|
|
"required": ["base_url", "workspace"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"base_url": {"type": "string"},
|
|
"workspace": {"type": "string"},
|
|
"timeout": {"type": "integer", "minimum": 1}
|
|
}
|
|
},
|
|
"vault": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"client": {"type": "string"},
|
|
"config": {"type": "string"}
|
|
}
|
|
},
|
|
"agentd": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"state_dir": {"type": "string"},
|
|
"log_dir": {"type": "string"},
|
|
"helpers_dir": {"type": "string"},
|
|
"interval": {"type": "integer", "minimum": 10},
|
|
"max_rounds_per_thread": {"type": "integer", "minimum": 1},
|
|
"comment_max_chars": {"type": "integer", "minimum": 500},
|
|
"cli_terminal": {"type": "string"}
|
|
}
|
|
},
|
|
"webhook": {
|
|
"type": "object",
|
|
"required": ["secret_key", "tick_command"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"bind": {"type": "string"},
|
|
"port": {"type": "integer", "minimum": 1},
|
|
"path": {"type": "string"},
|
|
"secret_key": {"type": "string"},
|
|
"tick_command": {"type": "array", "minItems": 1, "items": {"type": "string"}},
|
|
"tick_timeout_seconds": {"type": "integer", "minimum": 10},
|
|
"debounce_seconds": {"type": "number", "minimum": 0},
|
|
"retry_seconds": {"type": "number", "minimum": 1},
|
|
"retry_window_seconds": {"type": "number", "minimum": 0}
|
|
}
|
|
},
|
|
"notify": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"kind": {"enum": ["none"]},
|
|
"on": {"$ref": "#/definitions/strings"}
|
|
}
|
|
},
|
|
"terminals": {"type": "object", "minProperties": 1, "additionalProperties": {"$ref": "#/definitions/terminal"}},
|
|
"executors": {"type": "object", "minProperties": 1, "additionalProperties": {"$ref": "#/definitions/executor"}},
|
|
"projects": {"type": "object", "minProperties": 1, "additionalProperties": {"$ref": "#/definitions/project"}}
|
|
},
|
|
"definitions": {
|
|
"strings": {"type": "array", "items": {"type": "string"}},
|
|
"terminal": {
|
|
"type": "object",
|
|
"required": ["transport", "os", "launch", "repo", "plane_user", "token_key", "executors"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"transport": {"enum": ["local", "warpgate-ssh"]},
|
|
"target": {"type": "string"},
|
|
"os": {"enum": ["linux", "darwin", "windows"]},
|
|
"launch": {"enum": ["subprocess", "nohup", "schtasks"]},
|
|
"repo": {"type": "string"},
|
|
"plane_user": {"type": "string"},
|
|
"token_key": {"type": "string"},
|
|
"concurrency": {"type": "integer", "minimum": 0},
|
|
"capabilities": {"$ref": "#/definitions/strings"},
|
|
"executors": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
|
"bins": {"type": "object", "additionalProperties": {"type": "string"}},
|
|
"run_root": {"type": "string"},
|
|
"busy_processes": {"$ref": "#/definitions/strings"},
|
|
"helpers_dir": {"type": "string"}
|
|
}
|
|
},
|
|
"executor": {
|
|
"type": "object",
|
|
"required": ["run"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"adapter": {"enum": ["codex", "claude-code", "shell"]},
|
|
"run": {"type": "string"},
|
|
"resume": {"type": ["string", "boolean"]},
|
|
"thread_from": {"type": "string"},
|
|
"last_message": {"type": "string"},
|
|
"models": {"$ref": "#/definitions/strings"},
|
|
"default_effort": {"type": "string"},
|
|
"permission_mode": {"type": "string"},
|
|
"tier_arg": {"type": "string"},
|
|
"tier_defaults": {"type": "object", "additionalProperties": {"type": "string"}},
|
|
"script": {"type": "string"}
|
|
}
|
|
},
|
|
"route": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"executor": {"type": "string"},
|
|
"model": {"type": "string"},
|
|
"effort": {"type": "string"},
|
|
"tier": {"type": "string"},
|
|
"serialize_group": {"type": "string"},
|
|
"script": {"type": "string"},
|
|
"timeout_hours": {"type": "number", "minimum": 0}
|
|
}
|
|
},
|
|
"project": {
|
|
"type": "object",
|
|
"required": ["id", "states", "reviewer", "routing"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {"type": "string"},
|
|
"key_prefix": {"type": "string"},
|
|
"states": {
|
|
"type": "object",
|
|
"required": ["todo", "running", "waiting", "review", "done"],
|
|
"additionalProperties": {"type": "string"}
|
|
},
|
|
"reviewer": {"type": "string"},
|
|
"answerer": {"type": "string"},
|
|
"protocol_file": {"type": "string"},
|
|
"intro": {"type": "string"},
|
|
"routing": {
|
|
"type": "object",
|
|
"required": ["by_assignee"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"by_assignee": {"type": "object", "minProperties": 1, "additionalProperties": {"type": "string"}},
|
|
"by_label": {"type": "object", "additionalProperties": {"$ref": "#/definitions/route"}},
|
|
"default_executor": {"type": "object", "additionalProperties": {"type": "string"}}
|
|
}
|
|
},
|
|
"retry": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"transient_max": {"type": "integer", "minimum": 0},
|
|
"backoff_minutes": {"type": "array", "items": {"type": "number", "minimum": 0}, "minItems": 1},
|
|
"transient_patterns": {"$ref": "#/definitions/strings"},
|
|
"env_patterns": {"$ref": "#/definitions/strings"}
|
|
}
|
|
},
|
|
"timeout_hours": {"type": "number", "minimum": 0},
|
|
"max_rounds_per_thread": {"type": "integer", "minimum": 1},
|
|
"max_progress_rounds": {"type": "integer", "minimum": 1},
|
|
"notify": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ntfy_topic": {"type": "string"},
|
|
"on": {"$ref": "#/definitions/strings"}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|