patchwork-os 0.2.0-alpha.34 → 0.2.0-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +202 -93
- package/deploy/bootstrap-new-vps.sh +12 -12
- package/deploy/bootstrap-vps.sh +6 -3
- package/deploy/deploy-landing.sh +59 -2
- package/dist/activityLog.d.ts +49 -0
- package/dist/activityLog.js +78 -0
- package/dist/activityLog.js.map +1 -1
- package/dist/approvalHttp.d.ts +25 -0
- package/dist/approvalHttp.js +74 -18
- package/dist/approvalHttp.js.map +1 -1
- package/dist/approvalInsights.d.ts +49 -0
- package/dist/approvalInsights.js +97 -0
- package/dist/approvalInsights.js.map +1 -0
- package/dist/approvalQueue.d.ts +11 -0
- package/dist/approvalQueue.js +80 -1
- package/dist/approvalQueue.js.map +1 -1
- package/dist/approvalSignals.d.ts +124 -0
- package/dist/approvalSignals.js +512 -0
- package/dist/approvalSignals.js.map +1 -0
- package/dist/automation.d.ts +37 -0
- package/dist/automation.js +105 -61
- package/dist/automation.js.map +1 -1
- package/dist/automationSuggestions.d.ts +79 -0
- package/dist/automationSuggestions.js +150 -0
- package/dist/automationSuggestions.js.map +1 -0
- package/dist/bridge.js +78 -1
- package/dist/bridge.js.map +1 -1
- package/dist/ccPermissions.d.ts +15 -0
- package/dist/ccPermissions.js +15 -0
- package/dist/ccPermissions.js.map +1 -1
- package/dist/claudeDriver.js +74 -16
- package/dist/claudeDriver.js.map +1 -1
- package/dist/commands/patchworkInit.d.ts +8 -0
- package/dist/commands/patchworkInit.js +41 -5
- package/dist/commands/patchworkInit.js.map +1 -1
- package/dist/commands/recipe.d.ts +20 -0
- package/dist/commands/recipe.js +212 -6
- package/dist/commands/recipe.js.map +1 -1
- package/dist/commands/recipeInstall.d.ts +79 -1
- package/dist/commands/recipeInstall.js +333 -16
- package/dist/commands/recipeInstall.js.map +1 -1
- package/dist/commands/tracesExport.d.ts +83 -0
- package/dist/commands/tracesExport.js +269 -0
- package/dist/commands/tracesExport.js.map +1 -0
- package/dist/commands/tracesImport.d.ts +56 -0
- package/dist/commands/tracesImport.js +161 -0
- package/dist/commands/tracesImport.js.map +1 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.js +9 -1
- package/dist/config.js.map +1 -1
- package/dist/connectorRoutes.d.ts +43 -0
- package/dist/connectorRoutes.js +1023 -0
- package/dist/connectorRoutes.js.map +1 -0
- package/dist/connectors/asana.d.ts +198 -0
- package/dist/connectors/asana.js +679 -0
- package/dist/connectors/asana.js.map +1 -0
- package/dist/connectors/baseConnector.d.ts +36 -0
- package/dist/connectors/baseConnector.js +151 -28
- package/dist/connectors/baseConnector.js.map +1 -1
- package/dist/connectors/discord.d.ts +150 -0
- package/dist/connectors/discord.js +543 -0
- package/dist/connectors/discord.js.map +1 -0
- package/dist/connectors/github.js +11 -4
- package/dist/connectors/github.js.map +1 -1
- package/dist/connectors/gitlab.d.ts +180 -0
- package/dist/connectors/gitlab.js +582 -0
- package/dist/connectors/gitlab.js.map +1 -0
- package/dist/connectors/gmail.js +50 -10
- package/dist/connectors/gmail.js.map +1 -1
- package/dist/connectors/googleCalendar.js +36 -10
- package/dist/connectors/googleCalendar.js.map +1 -1
- package/dist/connectors/googleDrive.d.ts +34 -0
- package/dist/connectors/googleDrive.js +321 -0
- package/dist/connectors/googleDrive.js.map +1 -0
- package/dist/connectors/linear.js +23 -4
- package/dist/connectors/linear.js.map +1 -1
- package/dist/connectors/mcpOAuth.js +26 -2
- package/dist/connectors/mcpOAuth.js.map +1 -1
- package/dist/connectors/oauthStateStore.d.ts +31 -0
- package/dist/connectors/oauthStateStore.js +52 -0
- package/dist/connectors/oauthStateStore.js.map +1 -0
- package/dist/connectors/pagerduty.d.ts +160 -0
- package/dist/connectors/pagerduty.js +464 -0
- package/dist/connectors/pagerduty.js.map +1 -0
- package/dist/connectors/slack.d.ts +16 -1
- package/dist/connectors/slack.js +57 -5
- package/dist/connectors/slack.js.map +1 -1
- package/dist/connectors/tokenStorage.js +27 -2
- package/dist/connectors/tokenStorage.js.map +1 -1
- package/dist/connectors/zendesk.js +19 -1
- package/dist/connectors/zendesk.js.map +1 -1
- package/dist/cors.d.ts +10 -0
- package/dist/cors.js +29 -0
- package/dist/cors.js.map +1 -0
- package/dist/decisionReplay.d.ts +72 -0
- package/dist/decisionReplay.js +92 -0
- package/dist/decisionReplay.js.map +1 -0
- package/dist/decisionTraceLog.d.ts +6 -0
- package/dist/decisionTraceLog.js +54 -2
- package/dist/decisionTraceLog.js.map +1 -1
- package/dist/featureFlags.d.ts +17 -11
- package/dist/featureFlags.js +52 -47
- package/dist/featureFlags.js.map +1 -1
- package/dist/fp/automationInterpreter.js +25 -21
- package/dist/fp/automationInterpreter.js.map +1 -1
- package/dist/fp/automationState.js +4 -1
- package/dist/fp/automationState.js.map +1 -1
- package/dist/fp/policyParser.js +4 -1
- package/dist/fp/policyParser.js.map +1 -1
- package/dist/inboxRoutes.d.ts +22 -0
- package/dist/inboxRoutes.js +114 -0
- package/dist/inboxRoutes.js.map +1 -0
- package/dist/index.js +734 -144
- package/dist/index.js.map +1 -1
- package/dist/mcpRoutes.d.ts +37 -0
- package/dist/mcpRoutes.js +76 -0
- package/dist/mcpRoutes.js.map +1 -0
- package/dist/oauth.d.ts +3 -0
- package/dist/oauth.js +151 -26
- package/dist/oauth.js.map +1 -1
- package/dist/oauthRoutes.d.ts +32 -0
- package/dist/oauthRoutes.js +124 -0
- package/dist/oauthRoutes.js.map +1 -0
- package/dist/orchestrator/orchestratorBridge.js +2 -2
- package/dist/orchestrator/orchestratorBridge.js.map +1 -1
- package/dist/patchworkConfig.d.ts +7 -0
- package/dist/patchworkConfig.js.map +1 -1
- package/dist/pluginLoader.d.ts +12 -0
- package/dist/pluginLoader.js +43 -4
- package/dist/pluginLoader.js.map +1 -1
- package/dist/pluginWatcher.js +8 -3
- package/dist/pluginWatcher.js.map +1 -1
- package/dist/preToolUseHook.d.ts +12 -0
- package/dist/preToolUseHook.js +23 -0
- package/dist/preToolUseHook.js.map +1 -1
- package/dist/recipeOrchestration.d.ts +8 -0
- package/dist/recipeOrchestration.js +320 -39
- package/dist/recipeOrchestration.js.map +1 -1
- package/dist/recipeRoutes.d.ts +154 -0
- package/dist/recipeRoutes.js +1098 -0
- package/dist/recipeRoutes.js.map +1 -0
- package/dist/recipes/captureForRunlog.d.ts +27 -0
- package/dist/recipes/captureForRunlog.js +128 -0
- package/dist/recipes/captureForRunlog.js.map +1 -0
- package/dist/recipes/chainedRunner.d.ts +54 -3
- package/dist/recipes/chainedRunner.js +256 -36
- package/dist/recipes/chainedRunner.js.map +1 -1
- package/dist/recipes/compiler.js +3 -3
- package/dist/recipes/compiler.js.map +1 -1
- package/dist/recipes/detectSilentFail.d.ts +34 -0
- package/dist/recipes/detectSilentFail.js +105 -0
- package/dist/recipes/detectSilentFail.js.map +1 -0
- package/dist/recipes/installer.js +3 -3
- package/dist/recipes/installer.js.map +1 -1
- package/dist/recipes/manifest.js +21 -6
- package/dist/recipes/manifest.js.map +1 -1
- package/dist/recipes/migrationWarnings.d.ts +12 -0
- package/dist/recipes/migrationWarnings.js +44 -0
- package/dist/recipes/migrationWarnings.js.map +1 -0
- package/dist/recipes/replayRun.d.ts +62 -0
- package/dist/recipes/replayRun.js +97 -0
- package/dist/recipes/replayRun.js.map +1 -0
- package/dist/recipes/resolveRecipePath.d.ts +69 -0
- package/dist/recipes/resolveRecipePath.js +202 -0
- package/dist/recipes/resolveRecipePath.js.map +1 -0
- package/dist/recipes/scheduler.js +102 -11
- package/dist/recipes/scheduler.js.map +1 -1
- package/dist/recipes/schemaGenerator.js +3 -3
- package/dist/recipes/schemaGenerator.js.map +1 -1
- package/dist/recipes/toolRegistry.d.ts +5 -0
- package/dist/recipes/toolRegistry.js +9 -0
- package/dist/recipes/toolRegistry.js.map +1 -1
- package/dist/recipes/tools/asana.d.ts +16 -0
- package/dist/recipes/tools/asana.js +524 -0
- package/dist/recipes/tools/asana.js.map +1 -0
- package/dist/recipes/tools/discord.d.ts +18 -0
- package/dist/recipes/tools/discord.js +254 -0
- package/dist/recipes/tools/discord.js.map +1 -0
- package/dist/recipes/tools/file.d.ts +6 -0
- package/dist/recipes/tools/file.js +12 -8
- package/dist/recipes/tools/file.js.map +1 -1
- package/dist/recipes/tools/github.js +29 -4
- package/dist/recipes/tools/github.js.map +1 -1
- package/dist/recipes/tools/gitlab.d.ts +11 -0
- package/dist/recipes/tools/gitlab.js +285 -0
- package/dist/recipes/tools/gitlab.js.map +1 -0
- package/dist/recipes/tools/gmail.d.ts +1 -1
- package/dist/recipes/tools/gmail.js +230 -6
- package/dist/recipes/tools/gmail.js.map +1 -1
- package/dist/recipes/tools/googleDrive.d.ts +1 -0
- package/dist/recipes/tools/googleDrive.js +55 -0
- package/dist/recipes/tools/googleDrive.js.map +1 -0
- package/dist/recipes/tools/index.d.ts +8 -0
- package/dist/recipes/tools/index.js +8 -0
- package/dist/recipes/tools/index.js.map +1 -1
- package/dist/recipes/tools/jira.d.ts +14 -0
- package/dist/recipes/tools/jira.js +369 -0
- package/dist/recipes/tools/jira.js.map +1 -0
- package/dist/recipes/tools/linear.d.ts +2 -1
- package/dist/recipes/tools/linear.js +227 -3
- package/dist/recipes/tools/linear.js.map +1 -1
- package/dist/recipes/tools/meetingNotes.d.ts +21 -0
- package/dist/recipes/tools/meetingNotes.js +701 -0
- package/dist/recipes/tools/meetingNotes.js.map +1 -0
- package/dist/recipes/tools/pagerduty.d.ts +15 -0
- package/dist/recipes/tools/pagerduty.js +451 -0
- package/dist/recipes/tools/pagerduty.js.map +1 -0
- package/dist/recipes/tools/sentry.d.ts +12 -0
- package/dist/recipes/tools/sentry.js +73 -0
- package/dist/recipes/tools/sentry.js.map +1 -0
- package/dist/recipes/tools/slack.js +15 -5
- package/dist/recipes/tools/slack.js.map +1 -1
- package/dist/recipes/validation.js +83 -14
- package/dist/recipes/validation.js.map +1 -1
- package/dist/recipes/yamlRunner.d.ts +30 -2
- package/dist/recipes/yamlRunner.js +369 -70
- package/dist/recipes/yamlRunner.js.map +1 -1
- package/dist/recipesHttp.d.ts +76 -1
- package/dist/recipesHttp.js +474 -12
- package/dist/recipesHttp.js.map +1 -1
- package/dist/runLog.d.ts +78 -2
- package/dist/runLog.js +204 -6
- package/dist/runLog.js.map +1 -1
- package/dist/schemas/dry-run-plan.v1.json +139 -0
- package/dist/schemas/recipe.v1.json +684 -0
- package/dist/server.d.ts +79 -10
- package/dist/server.js +366 -1384
- package/dist/server.js.map +1 -1
- package/dist/ssrfGuard.d.ts +54 -0
- package/dist/ssrfGuard.js +122 -0
- package/dist/ssrfGuard.js.map +1 -0
- package/dist/streamableHttp.d.ts +39 -1
- package/dist/streamableHttp.js +126 -17
- package/dist/streamableHttp.js.map +1 -1
- package/dist/tools/getDocumentSymbols.d.ts +24 -0
- package/dist/tools/getDocumentSymbols.js +74 -8
- package/dist/tools/getDocumentSymbols.js.map +1 -1
- package/dist/tools/getSecurityAdvisories.js +10 -1
- package/dist/tools/getSecurityAdvisories.js.map +1 -1
- package/dist/tools/getSessionUsage.d.ts +3 -0
- package/dist/tools/getSessionUsage.js +3 -0
- package/dist/tools/getSessionUsage.js.map +1 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +32 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/slackPostMessage.js +1 -1
- package/dist/tools/slackPostMessage.js.map +1 -1
- package/dist/tools/transaction.d.ts +19 -0
- package/dist/tools/transaction.js +29 -0
- package/dist/tools/transaction.js.map +1 -1
- package/dist/traceEncryption.d.ts +46 -0
- package/dist/traceEncryption.js +124 -0
- package/dist/traceEncryption.js.map +1 -0
- package/dist/transport.d.ts +39 -0
- package/dist/transport.js +88 -8
- package/dist/transport.js.map +1 -1
- package/package.json +22 -5
- package/templates/policies/README.md +72 -0
- package/templates/policies/conservative.json +14 -0
- package/templates/policies/developer.json +14 -0
- package/templates/policies/headless-ci.json +24 -0
- package/templates/policies/personal-assistant.json +15 -0
- package/templates/policies/regulated-industry.json +18 -0
- package/templates/recipes/project-health-check.yaml +1 -1
- package/templates/recipes/webhook/README.md +70 -0
- package/templates/recipes/webhook/capture-thought.yaml +26 -0
- package/templates/recipes/webhook/customer-escalation.yaml +49 -0
- package/templates/recipes/webhook/incident-intake.yaml +46 -0
- package/templates/recipes/webhook/meeting-prep.yaml +48 -0
- package/templates/recipes/webhook/morning-brief.yaml +57 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Webhook recipe templates
|
|
2
|
+
|
|
3
|
+
> **Anything that can send HTTP can trigger your AI.** iPhone Shortcut, Stream
|
|
4
|
+
> Deck, Home Assistant, NFC tag, cron job, monitoring tool, another service —
|
|
5
|
+
> if it can POST a body, it can drive a Patchwork recipe.
|
|
6
|
+
|
|
7
|
+
Five starter templates demonstrating common webhook-triggered workflows. Each
|
|
8
|
+
file is a copy-and-adjust starting point.
|
|
9
|
+
|
|
10
|
+
## Templates
|
|
11
|
+
|
|
12
|
+
| File | Purpose | Likely trigger sources |
|
|
13
|
+
|---|---|---|
|
|
14
|
+
| [`capture-thought.yaml`](capture-thought.yaml) | Append a thought to today's journal. | iOS Shortcut + Siri, Stream Deck, NFC tag |
|
|
15
|
+
| [`morning-brief.yaml`](morning-brief.yaml) | On-demand morning digest (vs. the cron version). | iOS Shortcut on first unlock, Apple Watch complication |
|
|
16
|
+
| [`meeting-prep.yaml`](meeting-prep.yaml) | Brief on attendees + context before the next meeting. | Calendar webhook, Apple Calendar event-start automation |
|
|
17
|
+
| [`incident-intake.yaml`](incident-intake.yaml) | Catch-all for monitoring → Linear + Slack alert. | PagerDuty, Sentry, Datadog, uptime checkers |
|
|
18
|
+
| [`customer-escalation.yaml`](customer-escalation.yaml) | Enrich a flagged support ticket with CRM data and post to Slack. | Intercom, Zendesk, HelpScout, Front |
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
cp templates/recipes/webhook/capture-thought.yaml ~/.patchwork/recipes/
|
|
24
|
+
patchwork stop
|
|
25
|
+
patchwork start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The dashboard's [Recipes page](http://localhost:3000/dashboard/recipes) will
|
|
29
|
+
show the recipe with its full webhook URL + a copyable curl example as soon as
|
|
30
|
+
the bridge picks up the new file.
|
|
31
|
+
|
|
32
|
+
## Triggering from common sources
|
|
33
|
+
|
|
34
|
+
### iOS Shortcut
|
|
35
|
+
1. Shortcuts app → New Shortcut → Add action **Get Contents of URL**
|
|
36
|
+
2. Method: `POST`. URL: `http://YOUR-MAC.local:3101/hooks/<path>` (or via Tailscale / your reverse proxy if remote)
|
|
37
|
+
3. Headers: `Content-Type: application/json`
|
|
38
|
+
4. Request Body → JSON → fill in payload fields the recipe expects
|
|
39
|
+
5. Add a Siri phrase ("Hey Siri, capture thought")
|
|
40
|
+
|
|
41
|
+
### Stream Deck
|
|
42
|
+
- Action: **HTTP Request** plugin
|
|
43
|
+
- Method: POST, URL as above, body matching the recipe's payload conventions
|
|
44
|
+
|
|
45
|
+
### Home Assistant
|
|
46
|
+
- `automation` block → `service: rest_command.<your-name>` → `url: http://patchwork-bridge:3101/hooks/<path>`
|
|
47
|
+
|
|
48
|
+
### Plain curl
|
|
49
|
+
Each template includes a runnable `curl` example in its docstring — paste it
|
|
50
|
+
into a script, a cron job, or your monitoring tool's webhook config.
|
|
51
|
+
|
|
52
|
+
## Payload conventions
|
|
53
|
+
|
|
54
|
+
Every recipe references the request body via `{{payload.<field>}}`. The
|
|
55
|
+
convention shown in each template's docstring is suggestive, not mandatory —
|
|
56
|
+
you can change field names freely; the bridge passes the full JSON body
|
|
57
|
+
through.
|
|
58
|
+
|
|
59
|
+
## Security notes
|
|
60
|
+
|
|
61
|
+
- Webhook endpoints are unauthenticated by default and bound to localhost
|
|
62
|
+
(`127.0.0.1`). Anything that needs the bridge from another machine should
|
|
63
|
+
go through a reverse proxy with auth (Tailscale, Caddy + Basic Auth,
|
|
64
|
+
Cloudflare Tunnel + Access).
|
|
65
|
+
- The receiving recipe's tools still go through your delegation policy — see
|
|
66
|
+
[`templates/policies/`](../../policies/) for tier presets.
|
|
67
|
+
- Don't trust payload contents blindly. The agent step in
|
|
68
|
+
`customer-escalation.yaml` and `meeting-prep.yaml` reads the body but
|
|
69
|
+
doesn't auto-act on it; final actions go through Slack/Linear with their
|
|
70
|
+
own auth scopes.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: capture-thought
|
|
2
|
+
description: |
|
|
3
|
+
Append a thought to your daily journal from anywhere that can POST HTTP.
|
|
4
|
+
|
|
5
|
+
Suggested triggers:
|
|
6
|
+
- iOS Shortcut (Hey Siri, "capture thought") — see docs/triggers
|
|
7
|
+
- Stream Deck button
|
|
8
|
+
- NFC tag near your desk
|
|
9
|
+
- curl from another script
|
|
10
|
+
|
|
11
|
+
Example request:
|
|
12
|
+
curl -X POST http://localhost:3101/hooks/capture-thought \
|
|
13
|
+
-H 'Content-Type: application/json' \
|
|
14
|
+
-d '{"text":"the auth refresh path needs a circuit breaker"}'
|
|
15
|
+
|
|
16
|
+
trigger:
|
|
17
|
+
type: webhook
|
|
18
|
+
path: /capture-thought
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- tool: file.append
|
|
22
|
+
path: ~/.patchwork/journal/{{date}}.md
|
|
23
|
+
content: "- {{time}} {{payload.text}}\n"
|
|
24
|
+
|
|
25
|
+
output:
|
|
26
|
+
path: ~/.patchwork/journal/{{date}}.md
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: customer-escalation
|
|
2
|
+
description: |
|
|
3
|
+
When a customer support tool flags a high-priority ticket, enrich it with
|
|
4
|
+
HubSpot CRM data and ping the right Slack channel with full context. The
|
|
5
|
+
human still decides how to respond — this just shaves the lookup time.
|
|
6
|
+
|
|
7
|
+
Suggested triggers:
|
|
8
|
+
- Intercom webhook (conversation.tagged-priority)
|
|
9
|
+
- Zendesk webhook (ticket priority changed)
|
|
10
|
+
- HelpScout / Front custom rule
|
|
11
|
+
- manual paste from CSAT dashboards via curl
|
|
12
|
+
|
|
13
|
+
Payload conventions:
|
|
14
|
+
customer_email the contact email (required — used for HubSpot lookup)
|
|
15
|
+
ticket_url deep link back to the support tool
|
|
16
|
+
summary short description of what they said
|
|
17
|
+
|
|
18
|
+
Example request:
|
|
19
|
+
curl -X POST http://localhost:3101/hooks/customer-escalation \
|
|
20
|
+
-H 'Content-Type: application/json' \
|
|
21
|
+
-d '{"customer_email":"jane@bigco.com","ticket_url":"https://app.intercom.com/conversations/9876","summary":"Says checkout has been broken for 3 days"}'
|
|
22
|
+
|
|
23
|
+
trigger:
|
|
24
|
+
type: webhook
|
|
25
|
+
path: /customer-escalation
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- tool: hubspot.find_contact
|
|
29
|
+
email: "{{payload.customer_email}}"
|
|
30
|
+
into: contact
|
|
31
|
+
- tool: hubspot.list_recent_deals
|
|
32
|
+
contact_id: "{{contact.id}}"
|
|
33
|
+
max: 3
|
|
34
|
+
into: deals
|
|
35
|
+
- agent:
|
|
36
|
+
prompt: |
|
|
37
|
+
Compose a Slack alert for the customer-success team. Keep it under
|
|
38
|
+
12 lines. Include: customer name + company, tier (from contact.tier
|
|
39
|
+
if present), recent deal context, what they said, and the ticket
|
|
40
|
+
link. End with a single suggested first move.
|
|
41
|
+
|
|
42
|
+
Contact: {{contact}}
|
|
43
|
+
Deals: {{deals}}
|
|
44
|
+
Summary: {{payload.summary}}
|
|
45
|
+
Ticket: {{payload.ticket_url}}
|
|
46
|
+
into: alert
|
|
47
|
+
- tool: slack.post_message
|
|
48
|
+
channel: "#customer-success"
|
|
49
|
+
text: "{{alert}}"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: incident-intake
|
|
2
|
+
description: |
|
|
3
|
+
Convert any external incident signal into a Linear issue + Slack alert.
|
|
4
|
+
Designed as the catch-all webhook your monitoring stack POSTs to so on-call
|
|
5
|
+
has one place to look.
|
|
6
|
+
|
|
7
|
+
Suggested triggers:
|
|
8
|
+
- PagerDuty webhook
|
|
9
|
+
- Sentry alert webhook
|
|
10
|
+
- Datadog monitor
|
|
11
|
+
- GitHub Actions failure
|
|
12
|
+
- external uptime checker
|
|
13
|
+
|
|
14
|
+
Payload conventions (all optional except `title`):
|
|
15
|
+
title short summary, becomes the Linear issue title
|
|
16
|
+
severity "critical" | "high" | "medium" | "low" (default: "high")
|
|
17
|
+
source "pagerduty" | "sentry" | "datadog" | ...
|
|
18
|
+
url deep link back to the source incident page
|
|
19
|
+
body extra detail (markdown ok)
|
|
20
|
+
|
|
21
|
+
Example request:
|
|
22
|
+
curl -X POST http://localhost:3101/hooks/incident-intake \
|
|
23
|
+
-H 'Content-Type: application/json' \
|
|
24
|
+
-d '{"title":"checkout p99 over 2s","severity":"high","source":"datadog","url":"https://app.datadoghq.com/monitor/123"}'
|
|
25
|
+
|
|
26
|
+
trigger:
|
|
27
|
+
type: webhook
|
|
28
|
+
path: /incident-intake
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- tool: linear.create_issue
|
|
32
|
+
title: "[{{payload.severity}}] {{payload.title}}"
|
|
33
|
+
description: |
|
|
34
|
+
Source: {{payload.source}}
|
|
35
|
+
Link: {{payload.url}}
|
|
36
|
+
|
|
37
|
+
{{payload.body}}
|
|
38
|
+
priority: 1
|
|
39
|
+
into: issue
|
|
40
|
+
- tool: slack.post_message
|
|
41
|
+
channel: "#incidents"
|
|
42
|
+
text: |
|
|
43
|
+
:rotating_light: New incident: *{{payload.title}}*
|
|
44
|
+
Severity: {{payload.severity}}
|
|
45
|
+
Source: {{payload.source}} — {{payload.url}}
|
|
46
|
+
Linear: {{issue.url}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: meeting-prep
|
|
2
|
+
description: |
|
|
3
|
+
Two minutes before any meeting starts, post a brief on the attendees and
|
|
4
|
+
recent context (recent email threads, related Linear issues, last meeting
|
|
5
|
+
notes). Drops the brief into ~/.patchwork/inbox/ and pings you on Slack.
|
|
6
|
+
|
|
7
|
+
Suggested triggers:
|
|
8
|
+
- Calendar webhook ("notify before event") — most reliable
|
|
9
|
+
- Apple Watch / iOS Shortcut tied to a calendar reminder
|
|
10
|
+
- Home Assistant routine fired by Apple Calendar event start
|
|
11
|
+
|
|
12
|
+
Example request (with attendees + topic in payload):
|
|
13
|
+
curl -X POST http://localhost:3101/hooks/meeting-prep \
|
|
14
|
+
-H 'Content-Type: application/json' \
|
|
15
|
+
-d '{"attendees":["alex@example.com","sam@example.com"],"topic":"Q3 planning"}'
|
|
16
|
+
|
|
17
|
+
trigger:
|
|
18
|
+
type: webhook
|
|
19
|
+
path: /meeting-prep
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- tool: gmail.search_threads
|
|
23
|
+
query: "from:({{payload.attendees}}) newer_than:7d"
|
|
24
|
+
max: 10
|
|
25
|
+
into: recent_threads
|
|
26
|
+
- tool: linear.search_issues
|
|
27
|
+
query: "{{payload.topic}}"
|
|
28
|
+
max: 5
|
|
29
|
+
into: related_issues
|
|
30
|
+
- agent:
|
|
31
|
+
prompt: |
|
|
32
|
+
You are about to walk into a meeting. Produce a 10-line briefing.
|
|
33
|
+
|
|
34
|
+
Topic: {{payload.topic}}
|
|
35
|
+
Attendees: {{payload.attendees}}
|
|
36
|
+
Recent email threads with attendees: {{recent_threads}}
|
|
37
|
+
Related Linear issues: {{related_issues}}
|
|
38
|
+
|
|
39
|
+
Output sections: Context, Open questions, Suggested first move.
|
|
40
|
+
into: brief
|
|
41
|
+
- tool: file.write
|
|
42
|
+
path: ~/.patchwork/inbox/meeting-{{date}}-{{time}}.md
|
|
43
|
+
content: |
|
|
44
|
+
# Meeting prep — {{payload.topic}}
|
|
45
|
+
{{brief}}
|
|
46
|
+
|
|
47
|
+
output:
|
|
48
|
+
path: ~/.patchwork/inbox/meeting-{{date}}-{{time}}.md
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: morning-brief-webhook
|
|
2
|
+
description: |
|
|
3
|
+
On-demand morning brief — fires the moment you POST. Pair this with an
|
|
4
|
+
iOS Shortcut on your home screen ("Brief me") so you get the digest
|
|
5
|
+
whenever you're ready, not on a fixed cron schedule.
|
|
6
|
+
|
|
7
|
+
For the scheduled (cron) version, see ../morning-brief.yaml.
|
|
8
|
+
|
|
9
|
+
Suggested triggers:
|
|
10
|
+
- iOS Shortcut on first phone unlock
|
|
11
|
+
- Apple Watch complication tap
|
|
12
|
+
- Home Assistant motion sensor at the kitchen counter
|
|
13
|
+
- Stream Deck "morning routine" macro
|
|
14
|
+
|
|
15
|
+
Example request:
|
|
16
|
+
curl -X POST http://localhost:3101/hooks/morning-brief
|
|
17
|
+
|
|
18
|
+
trigger:
|
|
19
|
+
type: webhook
|
|
20
|
+
path: /morning-brief
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- tool: gmail.fetch_unread
|
|
24
|
+
since: 24h
|
|
25
|
+
max: 30
|
|
26
|
+
into: messages
|
|
27
|
+
- tool: github.list_issues
|
|
28
|
+
assignee: "@me"
|
|
29
|
+
max: 10
|
|
30
|
+
into: issues
|
|
31
|
+
- tool: linear.list_issues
|
|
32
|
+
assignee: "@me"
|
|
33
|
+
state: "started,unstarted"
|
|
34
|
+
max: 15
|
|
35
|
+
into: linear_issues
|
|
36
|
+
- tool: calendar.list_events
|
|
37
|
+
days_ahead: 1
|
|
38
|
+
max: 10
|
|
39
|
+
into: calendar
|
|
40
|
+
- agent:
|
|
41
|
+
prompt: |
|
|
42
|
+
Write a 12-line morning brief from this data, in plain English,
|
|
43
|
+
prioritising what needs attention today.
|
|
44
|
+
|
|
45
|
+
Email (unread, 24h): {{messages}}
|
|
46
|
+
GitHub issues (mine): {{issues}}
|
|
47
|
+
Linear (mine): {{linear_issues}}
|
|
48
|
+
Calendar (next 24h): {{calendar}}
|
|
49
|
+
into: brief
|
|
50
|
+
- tool: file.write
|
|
51
|
+
path: ~/.patchwork/inbox/morning-brief-{{date}}.md
|
|
52
|
+
content: |
|
|
53
|
+
# Morning brief — {{date}}
|
|
54
|
+
{{brief}}
|
|
55
|
+
|
|
56
|
+
output:
|
|
57
|
+
path: ~/.patchwork/inbox/morning-brief-{{date}}.md
|