Feat v0.3.6 demo workflows + interactive demo

Four example workflow packages proving the engine end-to-end:
- Bug Report Triage: public entry, branch routing, SLA timer
- Employee Onboarding: Starlark automated stages, signoff gate
- Content Approval: multi-party signoff, revision cycle loop
- Webhook Notifier: http.post, connections fallback, delivery logging

Demo surface at /s/workflow-demo with cards, stage diagrams, Starlark
viewer, API examples, active/published status, and copyable public links.

Engine fixes: started_by in automated context, sla_seconds in package
installer, parseSnapshotStages for wrapped/legacy formats.

Platform fixes: extension SDK boot in base.html (Preact globals + boot()),
admin teams paginated response extraction, workflow adoption endpoint
(POST /teams/:teamId/workflows/:id/adopt), team-admin copyable link.

Review pass remains on roadmap for remaining UI polish.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-28 15:48:47 +00:00
parent d68451fe8e
commit f9cd5bce0f
30 changed files with 1716 additions and 30 deletions

View File

@@ -0,0 +1,79 @@
{
"id": "webhook-notifier",
"title": "Webhook Notifier",
"type": "workflow",
"version": "0.1.0",
"tier": "starlark",
"icon": "🔔",
"author": "Switchboard Core",
"description": "Outbound webhook delivery with connection credential support and delivery logging.",
"permissions": ["api.http", "connections.read", "db.write"],
"db_tables": {
"webhook_log": {
"columns": {
"url": "text",
"status_code": "text",
"event": "text",
"instance_id": "text"
}
}
},
"workflow_definition": {
"name": "Webhook Notifier",
"slug": "webhook-notifier",
"entry_mode": "team_only",
"stages": [
{
"name": "configure",
"ordinal": 0,
"stage_mode": "form",
"audience": "team",
"stage_type": "simple",
"auto_transition": false,
"form_template": {
"fieldsets": [
{
"label": "Webhook Configuration",
"fields": [
{ "key": "webhook_url", "label": "Webhook URL", "type": "text", "required": true },
{ "key": "event_name", "label": "Event Name", "type": "text", "required": true },
{ "key": "payload", "label": "Custom Payload (JSON)", "type": "textarea" }
]
}
]
}
},
{
"name": "fire-webhook",
"ordinal": 1,
"stage_mode": "automated",
"audience": "system",
"stage_type": "automated",
"auto_transition": true,
"starlark_hook": "webhook-notifier:on_fire"
},
{
"name": "result",
"ordinal": 2,
"stage_mode": "review",
"audience": "team",
"stage_type": "simple",
"auto_transition": false,
"form_template": {
"fieldsets": [
{
"label": "Delivery Result",
"fields": [
{ "key": "delivery_status", "label": "Status", "type": "text" },
{ "key": "status_code", "label": "HTTP Status Code", "type": "text" },
{ "key": "response_body", "label": "Response", "type": "textarea" }
]
}
]
}
}
]
}
}