@pinet/slack-bridge 0.1.0
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/LICENSE +21 -0
- package/README.md +570 -0
- package/dist/activity-log.d.ts +62 -0
- package/dist/activity-log.js +293 -0
- package/dist/agent-completion-runtime.d.ts +17 -0
- package/dist/agent-completion-runtime.js +26 -0
- package/dist/agent-event-runtime.d.ts +13 -0
- package/dist/agent-event-runtime.js +27 -0
- package/dist/agent-prompt-guidance.d.ts +22 -0
- package/dist/agent-prompt-guidance.js +46 -0
- package/dist/broker/adapters/slack.d.ts +74 -0
- package/dist/broker/adapters/slack.js +563 -0
- package/dist/broker/adapters/types.d.ts +1 -0
- package/dist/broker/adapters/types.js +1 -0
- package/dist/broker/agent-messaging.d.ts +1 -0
- package/dist/broker/agent-messaging.js +1 -0
- package/dist/broker/auth.d.ts +1 -0
- package/dist/broker/auth.js +1 -0
- package/dist/broker/client.d.ts +167 -0
- package/dist/broker/client.js +624 -0
- package/dist/broker/control-plane-dashboard.d.ts +98 -0
- package/dist/broker/control-plane-dashboard.js +213 -0
- package/dist/broker/ghost-reaper.d.ts +49 -0
- package/dist/broker/ghost-reaper.js +209 -0
- package/dist/broker/index.d.ts +36 -0
- package/dist/broker/index.js +90 -0
- package/dist/broker/leader.d.ts +1 -0
- package/dist/broker/leader.js +1 -0
- package/dist/broker/maintenance.d.ts +1 -0
- package/dist/broker/maintenance.js +1 -0
- package/dist/broker/message-send.d.ts +1 -0
- package/dist/broker/message-send.js +1 -0
- package/dist/broker/paths.d.ts +1 -0
- package/dist/broker/paths.js +1 -0
- package/dist/broker/raw-tcp-loopback.d.ts +1 -0
- package/dist/broker/raw-tcp-loopback.js +1 -0
- package/dist/broker/router.d.ts +1 -0
- package/dist/broker/router.js +1 -0
- package/dist/broker/schema.d.ts +9 -0
- package/dist/broker/schema.js +63 -0
- package/dist/broker/socket-server.d.ts +120 -0
- package/dist/broker/socket-server.js +1087 -0
- package/dist/broker/types.d.ts +1 -0
- package/dist/broker/types.js +1 -0
- package/dist/broker-delivery.d.ts +10 -0
- package/dist/broker-delivery.js +26 -0
- package/dist/broker-inbound-persistence.d.ts +11 -0
- package/dist/broker-inbound-persistence.js +22 -0
- package/dist/broker-prompt-loader.d.ts +34 -0
- package/dist/broker-prompt-loader.js +185 -0
- package/dist/broker-runtime-access.d.ts +14 -0
- package/dist/broker-runtime-access.js +20 -0
- package/dist/broker-runtime.d.ts +100 -0
- package/dist/broker-runtime.js +533 -0
- package/dist/broker-thread-owner-hints.d.ts +10 -0
- package/dist/broker-thread-owner-hints.js +14 -0
- package/dist/canvases.d.ts +80 -0
- package/dist/canvases.js +221 -0
- package/dist/command-registration-runtime.d.ts +9 -0
- package/dist/command-registration-runtime.js +9 -0
- package/dist/core-tool-guardrails.d.ts +24 -0
- package/dist/core-tool-guardrails.js +66 -0
- package/dist/deploy-manifest.d.ts +27 -0
- package/dist/deploy-manifest.js +197 -0
- package/dist/follower-delivery.d.ts +16 -0
- package/dist/follower-delivery.js +70 -0
- package/dist/follower-runtime.d.ts +61 -0
- package/dist/follower-runtime.js +350 -0
- package/dist/git-metadata.d.ts +35 -0
- package/dist/git-metadata.js +88 -0
- package/dist/guardrails.d.ts +69 -0
- package/dist/guardrails.js +283 -0
- package/dist/helpers.d.ts +550 -0
- package/dist/helpers.js +2711 -0
- package/dist/home-tab.d.ts +27 -0
- package/dist/home-tab.js +242 -0
- package/dist/imessage-tools.d.ts +33 -0
- package/dist/imessage-tools.js +96 -0
- package/dist/inbox-drain-runtime.d.ts +30 -0
- package/dist/inbox-drain-runtime.js +71 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1330 -0
- package/dist/persisted-runtime-state.d.ts +52 -0
- package/dist/persisted-runtime-state.js +98 -0
- package/dist/pinet-activity-formatting.d.ts +20 -0
- package/dist/pinet-activity-formatting.js +43 -0
- package/dist/pinet-agent-status.d.ts +36 -0
- package/dist/pinet-agent-status.js +48 -0
- package/dist/pinet-commands.d.ts +70 -0
- package/dist/pinet-commands.js +402 -0
- package/dist/pinet-confirmation-replies.d.ts +7 -0
- package/dist/pinet-confirmation-replies.js +30 -0
- package/dist/pinet-control-plane-dashboard.d.ts +34 -0
- package/dist/pinet-control-plane-dashboard.js +86 -0
- package/dist/pinet-home-tabs.d.ts +36 -0
- package/dist/pinet-home-tabs.js +101 -0
- package/dist/pinet-maintenance-delivery.d.ts +22 -0
- package/dist/pinet-maintenance-delivery.js +45 -0
- package/dist/pinet-mesh-ops.d.ts +97 -0
- package/dist/pinet-mesh-ops.js +266 -0
- package/dist/pinet-registration-gate.d.ts +14 -0
- package/dist/pinet-registration-gate.js +42 -0
- package/dist/pinet-remote-control-acks.d.ts +16 -0
- package/dist/pinet-remote-control-acks.js +46 -0
- package/dist/pinet-remote-control.d.ts +17 -0
- package/dist/pinet-remote-control.js +74 -0
- package/dist/pinet-runtime-composition.d.ts +27 -0
- package/dist/pinet-runtime-composition.js +20 -0
- package/dist/pinet-tools.d.ts +67 -0
- package/dist/pinet-tools.js +1211 -0
- package/dist/prompts/broker/default.md +41 -0
- package/dist/prompts/broker/tmux.md +49 -0
- package/dist/ralph-loop.d.ts +76 -0
- package/dist/ralph-loop.js +524 -0
- package/dist/reaction-triggers.d.ts +25 -0
- package/dist/reaction-triggers.js +171 -0
- package/dist/repo-tool-guardrails.d.ts +20 -0
- package/dist/repo-tool-guardrails.js +81 -0
- package/dist/runtime-agent-context.d.ts +93 -0
- package/dist/runtime-agent-context.js +302 -0
- package/dist/runtime-mode.d.ts +10 -0
- package/dist/runtime-mode.js +39 -0
- package/dist/scheduled-wakeups.d.ts +1 -0
- package/dist/scheduled-wakeups.js +1 -0
- package/dist/session-ui-runtime.d.ts +20 -0
- package/dist/session-ui-runtime.js +163 -0
- package/dist/single-player-runtime.d.ts +71 -0
- package/dist/single-player-runtime.js +436 -0
- package/dist/skins/cosmere.json +1571 -0
- package/dist/skins/foundation.json +1304 -0
- package/dist/slack-access.d.ts +186 -0
- package/dist/slack-access.js +462 -0
- package/dist/slack-api.d.ts +2 -0
- package/dist/slack-api.js +1 -0
- package/dist/slack-block-kit.d.ts +36 -0
- package/dist/slack-block-kit.js +242 -0
- package/dist/slack-export.d.ts +31 -0
- package/dist/slack-export.js +206 -0
- package/dist/slack-message-context.d.ts +15 -0
- package/dist/slack-message-context.js +207 -0
- package/dist/slack-modals.d.ts +13 -0
- package/dist/slack-modals.js +79 -0
- package/dist/slack-pinet-runtime-adapter.d.ts +16 -0
- package/dist/slack-pinet-runtime-adapter.js +72 -0
- package/dist/slack-presence.d.ts +36 -0
- package/dist/slack-presence.js +89 -0
- package/dist/slack-request-runtime.d.ts +8 -0
- package/dist/slack-request-runtime.js +19 -0
- package/dist/slack-runtime-access.d.ts +28 -0
- package/dist/slack-runtime-access.js +107 -0
- package/dist/slack-scope-diagnostics.d.ts +31 -0
- package/dist/slack-scope-diagnostics.js +235 -0
- package/dist/slack-socket-dedup.d.ts +7 -0
- package/dist/slack-socket-dedup.js +135 -0
- package/dist/slack-thread-status.d.ts +41 -0
- package/dist/slack-thread-status.js +156 -0
- package/dist/slack-tool-policy-runtime.d.ts +36 -0
- package/dist/slack-tool-policy-runtime.js +96 -0
- package/dist/slack-tools.d.ts +52 -0
- package/dist/slack-tools.js +2688 -0
- package/dist/slack-turn-guardrails.d.ts +19 -0
- package/dist/slack-turn-guardrails.js +36 -0
- package/dist/slack-upload.d.ts +49 -0
- package/dist/slack-upload.js +224 -0
- package/dist/task-assignments.d.ts +45 -0
- package/dist/task-assignments.js +527 -0
- package/dist/thread-confirmations.d.ts +22 -0
- package/dist/thread-confirmations.js +139 -0
- package/dist/tool-registration-runtime.d.ts +13 -0
- package/dist/tool-registration-runtime.js +13 -0
- package/dist/ttl-cache.d.ts +47 -0
- package/dist/ttl-cache.js +105 -0
- package/manifest.yaml +57 -0
- package/package.json +60 -0
- package/skills/pinet-skin-creator/SKILL.md +109 -0
- package/skills/pinet-skin-creator/references/descriptor-format.md +99 -0
- package/skills/pinet-skin-creator/references/safety-checklist.md +56 -0
- package/skills/pinet-skin-creator/templates/pinet-skin-descriptor.json +77 -0
- package/skills/slack-bridge/SKILL.md +360 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: slack-bridge
|
|
3
|
+
description: Warm reference for the @pinet/slack-bridge Slack dispatcher. Use when building Slack Block Kit messages, modals, canvases, uploads, schedules, pins/bookmarks, or when you need per-action usage patterns beyond slack action=help schemas.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Slack Bridge Warm Reference
|
|
7
|
+
|
|
8
|
+
Use this skill when the compact `slack` dispatcher schema is not enough. The
|
|
9
|
+
hot path stays small: `slack_inbox` receives work, `slack_send` replies in the
|
|
10
|
+
current assistant thread, and `slack` handles the cold action surface.
|
|
11
|
+
|
|
12
|
+
## Dispatcher contract
|
|
13
|
+
|
|
14
|
+
Call the dispatcher with an action and action-specific args:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"action": "help",
|
|
19
|
+
"args": { "topic": "canvas_update" }
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Every dispatcher response has this envelope in tool `details`, while the default
|
|
24
|
+
visible `content` is compact CLI-style text:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"status": "succeeded",
|
|
29
|
+
"data": {},
|
|
30
|
+
"errors": [],
|
|
31
|
+
"warnings": []
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Pass `args.format="json"` when you need the envelope in visible content, and
|
|
36
|
+
`args.full=true` when you need full structured details instead of compact
|
|
37
|
+
defaults. If an action already owns a `format` argument, such as `export`, use
|
|
38
|
+
`args.response_format="json"` for response presentation.
|
|
39
|
+
|
|
40
|
+
On failure, inspect `errors[0].class`, `retryable`, and `hint`. Prefer
|
|
41
|
+
`slack({"action":"help","args":{"topic":"..."}})` before guessing an action
|
|
42
|
+
schema.
|
|
43
|
+
|
|
44
|
+
Guardrails match cold actions as `slack:<action>` (for example
|
|
45
|
+
`slack:upload`, `slack:delete`, `slack:canvas_update`). Legacy
|
|
46
|
+
`slack_<action>` patterns may be accepted during migration, but new configs
|
|
47
|
+
should use the colon form.
|
|
48
|
+
|
|
49
|
+
## Action quick map
|
|
50
|
+
|
|
51
|
+
- Thread/channel messaging: `post_channel`, `read`, `read_channel`, `export`
|
|
52
|
+
- Lightweight acknowledgement: `react`
|
|
53
|
+
- Files/snippets: `upload`
|
|
54
|
+
- Time-based follow-up: `schedule`
|
|
55
|
+
- People/timing: `presence`
|
|
56
|
+
- Durable channel affordances: `pin`, `bookmark`
|
|
57
|
+
- Channel/project setup: `create_channel`, `project_create`
|
|
58
|
+
- Canvases: `canvas_comments_read`, `canvas_create`, `canvas_update`
|
|
59
|
+
- Modals: `modal_open`, `modal_push`, `modal_update`
|
|
60
|
+
- Guardrail approvals: `confirm_action`
|
|
61
|
+
- Destructive cleanup: `delete`
|
|
62
|
+
|
|
63
|
+
## Block Kit patterns
|
|
64
|
+
|
|
65
|
+
No Block Kit builder tool is registered. Build the JSON inline and pass it to
|
|
66
|
+
`slack_send` or `slack` action `post_channel` as `blocks`.
|
|
67
|
+
|
|
68
|
+
### Status report
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
[
|
|
72
|
+
{
|
|
73
|
+
"type": "header",
|
|
74
|
+
"text": { "type": "plain_text", "text": "Deploy complete" }
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"type": "section",
|
|
78
|
+
"fields": [
|
|
79
|
+
{ "type": "mrkdwn", "text": "*Branch*\n`main`" },
|
|
80
|
+
{ "type": "mrkdwn", "text": "*Checks*\n✅ lint/typecheck/test" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "context",
|
|
85
|
+
"elements": [{ "type": "mrkdwn", "text": "PR #123 is ready for review." }]
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Use with:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"text": "Deploy complete — branch main, checks passed.",
|
|
95
|
+
"thread_ts": "1712345678.000100",
|
|
96
|
+
"blocks": []
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Action buttons
|
|
101
|
+
|
|
102
|
+
Stable `action_id` values make incoming `slack_block_action` metadata easy to
|
|
103
|
+
route. Put machine-readable context in `value` as plain text or JSON.
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
[
|
|
107
|
+
{
|
|
108
|
+
"type": "section",
|
|
109
|
+
"text": { "type": "mrkdwn", "text": "Approve the production deploy?" }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "actions",
|
|
113
|
+
"elements": [
|
|
114
|
+
{
|
|
115
|
+
"type": "button",
|
|
116
|
+
"text": { "type": "plain_text", "text": "Approve" },
|
|
117
|
+
"style": "primary",
|
|
118
|
+
"action_id": "deploy.approve",
|
|
119
|
+
"value": "{\"deployId\":\"2026-04-24-main\",\"decision\":\"approve\"}"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "button",
|
|
123
|
+
"text": { "type": "plain_text", "text": "Reject" },
|
|
124
|
+
"style": "danger",
|
|
125
|
+
"action_id": "deploy.reject",
|
|
126
|
+
"value": "{\"deployId\":\"2026-04-24-main\",\"decision\":\"reject\"}"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Diff/code snippet
|
|
134
|
+
|
|
135
|
+
For long diffs or logs, prefer `upload` over huge inline blocks. For short
|
|
136
|
+
snippets:
|
|
137
|
+
|
|
138
|
+
````json
|
|
139
|
+
[
|
|
140
|
+
{
|
|
141
|
+
"type": "section",
|
|
142
|
+
"text": { "type": "mrkdwn", "text": "```ts\nconst ok = true;\n```" }
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
````
|
|
146
|
+
|
|
147
|
+
## Modal patterns
|
|
148
|
+
|
|
149
|
+
Modal actions require a fresh Slack `trigger_id` from a recent interaction. The
|
|
150
|
+
window is short (about three seconds), so do not spend an extra human turn after
|
|
151
|
+
receiving a trigger; call `modal_open` or `modal_push` immediately.
|
|
152
|
+
|
|
153
|
+
### Confirmation modal
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"type": "modal",
|
|
158
|
+
"callback_id": "deploy.confirm",
|
|
159
|
+
"title": { "type": "plain_text", "text": "Deploy approval" },
|
|
160
|
+
"submit": { "type": "plain_text", "text": "Approve" },
|
|
161
|
+
"close": { "type": "plain_text", "text": "Cancel" },
|
|
162
|
+
"private_metadata": "{\"workflow\":\"deploy\"}",
|
|
163
|
+
"blocks": [
|
|
164
|
+
{
|
|
165
|
+
"type": "section",
|
|
166
|
+
"text": { "type": "mrkdwn", "text": "Ready to deploy `main` to production." }
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "input",
|
|
170
|
+
"block_id": "confirm_phrase",
|
|
171
|
+
"element": {
|
|
172
|
+
"type": "plain_text_input",
|
|
173
|
+
"action_id": "confirm_phrase",
|
|
174
|
+
"placeholder": { "type": "plain_text", "text": "Type CONFIRM" }
|
|
175
|
+
},
|
|
176
|
+
"label": { "type": "plain_text", "text": "Confirmation" }
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Open it:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"action": "modal_open",
|
|
187
|
+
"args": {
|
|
188
|
+
"trigger_id": "fresh-trigger-id",
|
|
189
|
+
"thread_ts": "1712345678.000100",
|
|
190
|
+
"view": { "type": "modal", "blocks": [] }
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
When `thread_ts` is provided, slack-bridge embeds routing metadata in
|
|
196
|
+
`private_metadata` so modal submissions return to the original thread.
|
|
197
|
+
|
|
198
|
+
### Simple form input
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"type": "modal",
|
|
203
|
+
"callback_id": "incident.update",
|
|
204
|
+
"title": { "type": "plain_text", "text": "Incident update" },
|
|
205
|
+
"submit": { "type": "plain_text", "text": "Submit" },
|
|
206
|
+
"close": { "type": "plain_text", "text": "Cancel" },
|
|
207
|
+
"blocks": [
|
|
208
|
+
{
|
|
209
|
+
"type": "input",
|
|
210
|
+
"block_id": "summary",
|
|
211
|
+
"element": {
|
|
212
|
+
"type": "plain_text_input",
|
|
213
|
+
"action_id": "summary",
|
|
214
|
+
"multiline": true
|
|
215
|
+
},
|
|
216
|
+
"label": { "type": "plain_text", "text": "Summary" }
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Canvas patterns
|
|
223
|
+
|
|
224
|
+
Create a standalone canvas:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"action": "canvas_create",
|
|
229
|
+
"args": { "title": "Launch plan", "markdown": "# Launch plan\n\n## Goals" }
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Create/update a channel canvas:
|
|
234
|
+
|
|
235
|
+
```json
|
|
236
|
+
{
|
|
237
|
+
"action": "canvas_create",
|
|
238
|
+
"args": { "kind": "channel", "channel": "#proj-alpha", "title": "Alpha RFC" }
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
If Slack returns `canvas_tab_creation_failed`, `canvas_create` creates a
|
|
243
|
+
standalone fallback attached to the channel, attempts to add a channel bookmark,
|
|
244
|
+
and returns the fallback `canvas_id`. Use that `canvas_id` for later
|
|
245
|
+
`canvas_update` calls if Slack still does not expose a channel canvas ID.
|
|
246
|
+
|
|
247
|
+
Append to a canvas:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"action": "canvas_update",
|
|
252
|
+
"args": { "canvas_id": "F0123", "mode": "append", "markdown": "\n## Update\nDone." }
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Replace a section by lookup text:
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"action": "canvas_update",
|
|
261
|
+
"args": {
|
|
262
|
+
"canvas_id": "F0123",
|
|
263
|
+
"mode": "replace",
|
|
264
|
+
"section_contains_text": "## Rollout",
|
|
265
|
+
"section_type": "h2",
|
|
266
|
+
"markdown": "## Rollout\nPhase 1 complete."
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Read comments only for verified canvases:
|
|
272
|
+
|
|
273
|
+
```json
|
|
274
|
+
{
|
|
275
|
+
"action": "canvas_comments_read",
|
|
276
|
+
"args": { "canvas_id": "F0123", "limit": 20 }
|
|
277
|
+
}
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Upload, schedule, pin, bookmark examples
|
|
281
|
+
|
|
282
|
+
Upload inline content:
|
|
283
|
+
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"action": "upload",
|
|
287
|
+
"args": {
|
|
288
|
+
"content": "test log contents",
|
|
289
|
+
"filename": "test.log",
|
|
290
|
+
"filetype": "text",
|
|
291
|
+
"thread_ts": "1712345678.000100"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Upload local paths only when the file is inside the current working directory
|
|
297
|
+
or the system temp directory. Otherwise read the file content explicitly and use
|
|
298
|
+
`content`.
|
|
299
|
+
|
|
300
|
+
Schedule a follow-up:
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
{
|
|
304
|
+
"action": "schedule",
|
|
305
|
+
"args": { "text": "Checking back in.", "thread_ts": "1712345678.000100", "delay": "1h" }
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Pin a decision:
|
|
310
|
+
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"action": "pin",
|
|
314
|
+
"args": { "action": "pin", "message_ts": "1712345678.000200", "thread_ts": "1712345678.000100" }
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Add a bookmark:
|
|
319
|
+
|
|
320
|
+
```json
|
|
321
|
+
{
|
|
322
|
+
"action": "bookmark",
|
|
323
|
+
"args": {
|
|
324
|
+
"action": "add",
|
|
325
|
+
"channel": "#proj-alpha",
|
|
326
|
+
"title": "Runbook",
|
|
327
|
+
"url": "https://example.com/runbook"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
## Confirmation and destructive actions
|
|
333
|
+
|
|
334
|
+
If guardrails require confirmation, request it in the same Slack thread. The
|
|
335
|
+
`action` value must be the exact action string required by the guarded tool;
|
|
336
|
+
the safest flow is to copy it from the `requires confirmation for action ...`
|
|
337
|
+
error and retry the guarded call unchanged after approval:
|
|
338
|
+
|
|
339
|
+
```json
|
|
340
|
+
{
|
|
341
|
+
"action": "confirm_action",
|
|
342
|
+
"args": {
|
|
343
|
+
"thread_ts": "1712345678.000100",
|
|
344
|
+
"tool": "slack:delete",
|
|
345
|
+
"action": "channel=#proj-alpha | thread_ts=1712345678.000100 | ts=1712345678.000200 | thread=false"
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
Wait for `slack_inbox` to deliver the approval before retrying the guarded
|
|
351
|
+
action. Every destructive delete also needs `confirm: true` after verifying the
|
|
352
|
+
target; whole-thread deletion additionally needs `thread: true` and only works
|
|
353
|
+
when every message in the target thread was posted by the current bot:
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"action": "delete",
|
|
358
|
+
"args": { "ts": "1712345678.000200", "thread_ts": "1712345678.000100", "confirm": true }
|
|
359
|
+
}
|
|
360
|
+
```
|