63 lines
3.6 KiB
JSON
63 lines
3.6 KiB
JSON
{
|
|
"schema": 1,
|
|
"id": "approvals",
|
|
"name": "Approvals",
|
|
"version": "1.4.0",
|
|
"description": "A run asks the owner to OK a step it can't take itself (a secret, a server, money, their own app) — an owner-only form, then an owner run carries it out and reports back; standing 'always allow' rules; a light Approve / Decline decision for other plugins",
|
|
"category": "agents",
|
|
"languages": ["en", "fr"],
|
|
"icon": "icon.svg",
|
|
"color": "#563857",
|
|
"author": "gabrielvidal",
|
|
|
|
"managed": {
|
|
"defaultForGuests": true
|
|
},
|
|
|
|
"requires": ["ask-form"],
|
|
"exports": ["request", "decision"],
|
|
"emits": ["decision.resolved"],
|
|
"capabilities": ["runs.start", "conversations.read", "conversations.reply", "notify.send", "users.read"],
|
|
|
|
"skill": { "dir": "skill", "name": "ask-approval" },
|
|
|
|
"settings": {
|
|
"subtitle": "What runs asked you to OK, and your standing rules",
|
|
"fields": [
|
|
{ "key": "hubUrl", "label": "Hub address (links in the forms)", "type": "text", "default": "",
|
|
"help": "Set this: your hub's public address (e.g. https://ai-agent.example.com), so a form's link opens the conversation from a phone. Empty: the forms carry a relative /conversation/… link, which only works inside the app." },
|
|
{ "key": "model", "label": "Model of the run that carries a guest's plan out", "type": "model", "uses": "runs", "default": "",
|
|
"help": "Any model, or an agent preset. Empty: the hub's default model on Claude Code. It always runs on the Homelab." }
|
|
],
|
|
"statusAction": "health"
|
|
},
|
|
|
|
"storage": { "maxMb": 20 },
|
|
|
|
"ui": {
|
|
"settingsHtml": "ui/settings.html"
|
|
},
|
|
|
|
"events": [
|
|
{ "id": "form-submitted", "on": ["plugin:ask-form:form.submitted"], "action": "on_form_submitted" },
|
|
{ "id": "form-cancelled", "on": ["plugin:ask-form:form.cancelled"], "action": "on_form_cancelled" },
|
|
{ "id": "run-finished", "on": ["conversation.finished"], "action": "on_run_finished" }
|
|
],
|
|
|
|
"schedules": [
|
|
{ "id": "sweep", "cron": "* * * * *", "script": "handlers/sweep.py", "timeoutSec": 120, "description": "Deliver finished owner runs' reports and settle forms whose event was missed" }
|
|
],
|
|
|
|
"actions": {
|
|
"request": { "script": "handlers/request.py", "timeoutSec": 120, "runAs": "owner", "description": "A run asks the owner to OK a step (title, plan, why, key, touches, project)" },
|
|
"decision": { "script": "handlers/decision.py", "timeoutSec": 60, "runAs": "owner", "description": "An owner-only Approve / Decline form for another plugin; answers as decision.resolved" },
|
|
"on_form_submitted": { "script": "handlers/on_form_submitted.py", "timeoutSec": 120, "ownerOnly": true, "description": "The owner answered an approval form" },
|
|
"on_form_cancelled": { "script": "handlers/on_form_cancelled.py", "timeoutSec": 60, "ownerOnly": true, "description": "An approval form was closed unanswered" },
|
|
"on_run_finished": { "script": "handlers/on_run_finished.py", "timeoutSec": 90, "ownerOnly": true, "description": "An owner run ended: relay its report" },
|
|
"sweep": { "script": "handlers/sweep.py", "timeoutSec": 120, "ownerOnly": true, "description": "Deliver finished runs, settle missed forms" },
|
|
"list": { "script": "handlers/list.py", "timeoutSec": 30, "ownerOnly": true, "readOnly": true, "description": "Requests (newest first) and standing rules" },
|
|
"delete_rule": { "script": "handlers/delete_rule.py", "timeoutSec": 15, "ownerOnly": true, "description": "Revoke a standing rule" },
|
|
"health": { "script": "handlers/health.py", "timeoutSec": 15, "ownerOnly": true, "readOnly": true, "description": "Waiting, running and standing-rule counts" }
|
|
}
|
|
}
|