@vellumai/assistant 0.4.11 → 0.4.13

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.
Files changed (111) hide show
  1. package/ARCHITECTURE.md +401 -385
  2. package/package.json +1 -1
  3. package/src/__tests__/guardian-verify-setup-skill-regression.test.ts +75 -61
  4. package/src/__tests__/registry.test.ts +235 -187
  5. package/src/__tests__/secure-keys.test.ts +27 -0
  6. package/src/__tests__/session-agent-loop.test.ts +521 -256
  7. package/src/__tests__/session-surfaces-task-progress.test.ts +1 -0
  8. package/src/__tests__/session-tool-setup-app-refresh.test.ts +1 -0
  9. package/src/__tests__/session-tool-setup-memory-scope.test.ts +1 -0
  10. package/src/__tests__/session-tool-setup-side-effect-flag.test.ts +1 -0
  11. package/src/__tests__/skills.test.ts +334 -276
  12. package/src/__tests__/slack-skill.test.ts +124 -0
  13. package/src/__tests__/starter-task-flow.test.ts +7 -17
  14. package/src/agent/loop.ts +10 -3
  15. package/src/config/bundled-skills/chatgpt-import/tools/chatgpt-import.ts +449 -0
  16. package/src/config/bundled-skills/doordash/SKILL.md +171 -0
  17. package/src/config/bundled-skills/doordash/__tests__/doordash-client.test.ts +203 -0
  18. package/src/config/bundled-skills/doordash/__tests__/doordash-session.test.ts +164 -0
  19. package/src/config/bundled-skills/doordash/doordash-cli.ts +1193 -0
  20. package/src/config/bundled-skills/doordash/doordash-entry.ts +22 -0
  21. package/src/config/bundled-skills/doordash/lib/cart-queries.ts +787 -0
  22. package/src/config/bundled-skills/doordash/lib/client.ts +1071 -0
  23. package/src/config/bundled-skills/doordash/lib/order-queries.ts +85 -0
  24. package/src/config/bundled-skills/doordash/lib/queries.ts +28 -0
  25. package/src/config/bundled-skills/doordash/lib/query-extractor.ts +94 -0
  26. package/src/config/bundled-skills/doordash/lib/search-queries.ts +203 -0
  27. package/src/config/bundled-skills/doordash/lib/session.ts +93 -0
  28. package/src/config/bundled-skills/doordash/lib/shared/errors.ts +61 -0
  29. package/src/config/bundled-skills/doordash/lib/shared/ipc.ts +32 -0
  30. package/src/config/bundled-skills/doordash/lib/shared/network-recorder.ts +380 -0
  31. package/src/config/bundled-skills/doordash/lib/shared/platform.ts +35 -0
  32. package/src/config/bundled-skills/doordash/lib/shared/recording-store.ts +43 -0
  33. package/src/config/bundled-skills/doordash/lib/shared/recording-types.ts +49 -0
  34. package/src/config/bundled-skills/doordash/lib/shared/truncate.ts +6 -0
  35. package/src/config/bundled-skills/doordash/lib/store-queries.ts +246 -0
  36. package/src/config/bundled-skills/doordash/lib/types.ts +367 -0
  37. package/src/config/bundled-skills/google-calendar/SKILL.md +4 -5
  38. package/src/config/bundled-skills/google-oauth-setup/SKILL.md +41 -41
  39. package/src/config/bundled-skills/messaging/SKILL.md +59 -42
  40. package/src/config/bundled-skills/messaging/TOOLS.json +14 -92
  41. package/src/config/bundled-skills/messaging/tools/gmail-archive-by-query.ts +5 -1
  42. package/src/config/bundled-skills/messaging/tools/gmail-batch-archive.ts +11 -2
  43. package/src/config/bundled-skills/messaging/tools/gmail-outreach-scan.ts +8 -1
  44. package/src/config/bundled-skills/messaging/tools/gmail-sender-digest.ts +12 -4
  45. package/src/config/bundled-skills/messaging/tools/gmail-unsubscribe.ts +5 -1
  46. package/src/config/bundled-skills/messaging/tools/messaging-archive-by-sender.ts +5 -1
  47. package/src/config/bundled-skills/messaging/tools/messaging-sender-digest.ts +5 -2
  48. package/src/config/bundled-skills/notion/SKILL.md +240 -0
  49. package/src/config/bundled-skills/notion-oauth-setup/SKILL.md +127 -0
  50. package/src/config/bundled-skills/oauth-setup/SKILL.md +144 -0
  51. package/src/config/bundled-skills/phone-calls/SKILL.md +76 -45
  52. package/src/config/bundled-skills/skills-catalog/SKILL.md +32 -29
  53. package/src/config/bundled-skills/slack/SKILL.md +49 -0
  54. package/src/config/bundled-skills/slack/TOOLS.json +167 -0
  55. package/src/config/bundled-skills/slack/tools/shared.ts +23 -0
  56. package/src/config/bundled-skills/{messaging → slack}/tools/slack-add-reaction.ts +2 -5
  57. package/src/config/bundled-skills/slack/tools/slack-channel-details.ts +33 -0
  58. package/src/config/bundled-skills/slack/tools/slack-configure-channels.ts +75 -0
  59. package/src/config/bundled-skills/{messaging → slack}/tools/slack-delete-message.ts +2 -5
  60. package/src/config/bundled-skills/{messaging → slack}/tools/slack-leave-channel.ts +2 -5
  61. package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +193 -0
  62. package/src/config/{vellum-skills → bundled-skills}/sms-setup/SKILL.md +29 -22
  63. package/src/config/{vellum-skills → bundled-skills}/telegram-setup/SKILL.md +17 -14
  64. package/src/config/{vellum-skills → bundled-skills}/twilio-setup/SKILL.md +20 -5
  65. package/src/config/bundled-tool-registry.ts +292 -267
  66. package/src/config/schema.ts +1 -1
  67. package/src/daemon/handlers/skills.ts +334 -234
  68. package/src/daemon/ipc-contract/messages.ts +2 -0
  69. package/src/daemon/ipc-contract/surfaces.ts +2 -0
  70. package/src/daemon/lifecycle.ts +358 -221
  71. package/src/daemon/response-tier.ts +2 -0
  72. package/src/daemon/server.ts +453 -193
  73. package/src/daemon/session-agent-loop-handlers.ts +43 -2
  74. package/src/daemon/session-agent-loop.ts +3 -0
  75. package/src/daemon/session-lifecycle.ts +3 -0
  76. package/src/daemon/session-process.ts +1 -0
  77. package/src/daemon/session-surfaces.ts +22 -20
  78. package/src/daemon/session-tool-setup.ts +1 -0
  79. package/src/daemon/session.ts +5 -2
  80. package/src/messaging/outreach-classifier.ts +12 -5
  81. package/src/messaging/provider-types.ts +5 -0
  82. package/src/messaging/provider.ts +1 -1
  83. package/src/messaging/providers/gmail/adapter.ts +11 -5
  84. package/src/messaging/providers/gmail/client.ts +2 -0
  85. package/src/messaging/providers/slack/adapter.ts +1 -0
  86. package/src/messaging/providers/slack/client.ts +8 -0
  87. package/src/messaging/providers/slack/types.ts +5 -0
  88. package/src/runtime/http-errors.ts +33 -20
  89. package/src/runtime/http-server.ts +706 -291
  90. package/src/runtime/http-types.ts +26 -16
  91. package/src/runtime/routes/secret-routes.ts +57 -2
  92. package/src/runtime/routes/surface-action-routes.ts +66 -0
  93. package/src/runtime/routes/trust-rules-routes.ts +140 -0
  94. package/src/security/keychain-to-encrypted-migration.ts +59 -0
  95. package/src/security/secure-keys.ts +17 -0
  96. package/src/skills/frontmatter.ts +9 -7
  97. package/src/tools/apps/executors.ts +2 -1
  98. package/src/tools/tool-manifest.ts +44 -42
  99. package/src/tools/types.ts +9 -0
  100. package/src/__tests__/skill-mirror-parity.test.ts +0 -176
  101. package/src/config/vellum-skills/catalog.json +0 -63
  102. package/src/config/vellum-skills/chatgpt-import/tools/chatgpt-import.ts +0 -295
  103. package/src/skills/vellum-catalog-remote.ts +0 -166
  104. package/src/tools/skills/vellum-catalog.ts +0 -168
  105. /package/src/config/{vellum-skills → bundled-skills}/chatgpt-import/SKILL.md +0 -0
  106. /package/src/config/{vellum-skills → bundled-skills}/chatgpt-import/TOOLS.json +0 -0
  107. /package/src/config/{vellum-skills → bundled-skills}/deploy-fullstack-vercel/SKILL.md +0 -0
  108. /package/src/config/{vellum-skills → bundled-skills}/document-writer/SKILL.md +0 -0
  109. /package/src/config/{vellum-skills → bundled-skills}/guardian-verify-setup/SKILL.md +0 -0
  110. /package/src/config/{vellum-skills → bundled-skills}/slack-oauth-setup/SKILL.md +0 -0
  111. /package/src/config/{vellum-skills → bundled-skills}/trusted-contacts/SKILL.md +0 -0
@@ -20,7 +20,7 @@ Determine whether the user has browser automation available (macOS desktop app)
20
20
 
21
21
  # Path A: Manual Setup for Channels (Telegram, SMS, etc.)
22
22
 
23
- When the user is on Telegram or any non-macOS client, walk them through a text-based setup. No browser automation is used the user follows links and performs each action manually.
23
+ When the user is on Telegram or any non-macOS client, walk them through a text-based setup. No browser automation is used; the user follows links and performs each action manually.
24
24
 
25
25
  ### Channel Step 1: Confirm and Explain
26
26
 
@@ -47,7 +47,7 @@ Tell the user:
47
47
  >
48
48
  > Set the project name to **"Vellum Assistant"** and click **Create**.
49
49
  >
50
- > Let me know when it's done (or if you already have a project you'd like to use just tell me the project ID).
50
+ > Let me know when it's done (or if you already have a project you'd like to use, just tell me the project ID).
51
51
 
52
52
  Wait for confirmation. Note the project ID for subsequent steps.
53
53
 
@@ -115,13 +115,13 @@ Tell the user:
115
115
  > 4. Under **Authorized redirect URIs**, click **Add URI** and paste the redirect URI shown above
116
116
  > 5. Click **Create**
117
117
  >
118
- > A dialog will show your **Client ID** and **Client Secret**. Copy both values you'll need them in the next step.
118
+ > A dialog will show your **Client ID** and **Client Secret**. Copy both values, you'll need them in the next step.
119
119
 
120
120
  **Important:** Channel users must use **"Web application"** credentials (not Desktop app) because the OAuth callback goes through the gateway URL.
121
121
 
122
122
  ### Channel Step 6: Store Credentials
123
123
 
124
- **Step 6a Client ID (safe to send in chat):**
124
+ **Step 6a: Client ID (safe to send in chat)**
125
125
 
126
126
  Tell the user:
127
127
 
@@ -138,7 +138,7 @@ credential_store store:
138
138
  value: "<the Client ID the user sent>"
139
139
  ```
140
140
 
141
- **Step 6b Client Secret (requires split entry to avoid security filters):**
141
+ **Step 6b: Client Secret (requires split entry to avoid security filters)**
142
142
 
143
143
  The Client Secret starts with `GOCSPX-` which triggers the ingress secret scanner on channel messages. To work around this, ask the user to send only the portion *after* the prefix.
144
144
 
@@ -200,7 +200,7 @@ You will automate the entire GCP setup via the browser while the user watches in
200
200
 
201
201
  Google Cloud Console's UI changes frequently. Do NOT memorize or depend on specific element IDs, CSS selectors, or DOM structures. Instead:
202
202
 
203
- 1. **Snapshot first, act second.** Before every interaction, use `browser_snapshot` to discover interactive elements and their IDs. This is your primary navigation tool it gives you the accessibility tree with clickable/typeable element IDs. Use `browser_screenshot` for visual context when the snapshot alone isn't enough.
203
+ 1. **Snapshot first, act second.** Before every interaction, use `browser_snapshot` to discover interactive elements and their IDs. This is your primary navigation tool; it gives you the accessibility tree with clickable/typeable element IDs. Use `browser_screenshot` for visual context when the snapshot alone isn't enough.
204
204
  2. **Adapt to what you see.** If an element's label or position differs from what you expect, use the snapshot to find the correct element. GCP may rename buttons, reorganize menus, or change form layouts at any time.
205
205
  3. **Verify after every action.** After clicking, typing, or navigating, take a new snapshot to confirm the action succeeded. If it didn't, try an alternative interaction (e.g., if a dropdown didn't open on click, try pressing Space or Enter on the element).
206
206
  4. **Never assume DOM structure.** Dropdowns may be `<select>`, `<mat-select>`, `<div role="listbox">`, or something else entirely. Use the snapshot to identify element types and interact accordingly.
@@ -214,31 +214,31 @@ Each step has a **retry budget of 3 attempts**. An attempt is one try at the ste
214
214
  2. **Fall back to manual.** Tell the user what you were trying to do and ask them to complete that step manually in the Chrome window (which they can see on the side). Give them the direct URL and clear text instructions.
215
215
  3. **Resume automation** at the next step once the user confirms the manual step is done.
216
216
 
217
- If **two or more steps** require manual fallback, abandon the automated flow entirely and switch to giving the user the remaining steps as clear text instructions with links using "Desktop app" as the OAuth application type.
217
+ If **two or more steps** require manual fallback, abandon the automated flow entirely and switch to giving the user the remaining steps as clear text instructions with links, using "Desktop app" as the OAuth application type.
218
218
 
219
- ## Things That Do Not Work Do Not Attempt
219
+ ## Things That Do Not Work: Do Not Attempt
220
220
 
221
221
  These actions are technically impossible in the browser automation environment. Attempting them wastes time and leads to loops:
222
222
 
223
223
  - **Downloading files.** `browser_click` on a Download button does not save files to disk. There is NO JSON file to find at `~/Downloads` or anywhere else. Never click Download buttons.
224
224
  - **Clipboard operations.** You cannot copy/paste via browser automation. The user must manually copy values from the Chrome window.
225
- - **Deleting and recreating OAuth clients** to get a fresh secret this orphans the stored client_id and causes `invalid_client` errors.
226
- - **Navigating away from the credential dialog** before both credentials are stored you will lose the Client Secret display and cannot get it back without creating a new client.
225
+ - **Deleting and recreating OAuth clients** to get a fresh secret. This orphans the stored client_id and causes `invalid_client` errors.
226
+ - **Navigating away from the credential dialog** before both credentials are stored. You will lose the Client Secret display and cannot get it back without creating a new client.
227
227
 
228
228
  ## Step 1: Single Upfront Confirmation
229
229
 
230
- Use `ui_show` with `surface_type: "confirmation"` and this message:
230
+ Use `ui_show` with `surface_type: "confirmation"`. Set `message` to just the title, and `detail` to the body:
231
231
 
232
- > **Set up Google Cloud for Gmail & Calendar**
233
- >
234
- > Here's what will happen:
235
- > 1. **A browser opens on the side** you'll be able to watch everything I do
236
- > 2. **You sign in** to your Google account in the browser
237
- > 3. **I automate everything** project creation, APIs, OAuth config, credentials
238
- > 4. **One copy-paste** I'll ask you to copy the Client Secret from the browser into a secure prompt
239
- > 5. **You authorize Vellum** with one click
240
- >
241
- > The whole thing takes 2-3 minutes. Ready?
232
+ - **message:** `Set up Google Cloud for Gmail & Calendar`
233
+ - **detail:**
234
+ > Here's what will happen:
235
+ > 1. **A browser opens on the side** so you can watch everything I do
236
+ > 2. **You sign in** to your Google account in the browser
237
+ > 3. **I automate everything** including project creation, APIs, OAuth config, and credentials
238
+ > 4. **One copy-paste** where I'll ask you to copy the Client Secret from the browser into a secure prompt
239
+ > 5. **You authorize Vellum** with one click
240
+ >
241
+ > The whole thing takes 2-3 minutes. Ready?
242
242
 
243
243
  If the user declines, acknowledge and stop. No further confirmations are needed after this point.
244
244
 
@@ -250,9 +250,9 @@ Navigate to `https://console.cloud.google.com/`.
250
250
 
251
251
  Take a screenshot to check the page state:
252
252
 
253
- - **Sign-in page:** Tell the user: "Please sign in to your Google account in the Chrome window on the right side of your screen." Then auto-detect sign-in completion by polling with `browser_screenshot` every 5-10 seconds check if the URL has moved away from `accounts.google.com` to `console.cloud.google.com`. Do NOT ask the user to "let me know when you're done" detect it automatically. Once sign-in is detected, tell the user: "Signed in! Starting the automated setup now..."
254
- - **Already signed in:** Tell the user: "Already signed in starting setup now..." and continue immediately.
255
- - **CAPTCHA:** The browser automation's built-in handoff will handle this. If it persists, tell the user: "There's a CAPTCHA in the browser please complete it and I'll continue automatically."
253
+ - **Sign-in page:** Tell the user: "Please sign in to your Google account in the Chrome window on the right side of your screen." Then auto-detect sign-in completion by polling with `browser_screenshot` every 5-10 seconds to check if the URL has moved away from `accounts.google.com` to `console.cloud.google.com`. Do NOT ask the user to "let me know when you're done"; detect it automatically. Once sign-in is detected, tell the user: "Signed in! Starting the automated setup now..."
254
+ - **Already signed in:** Tell the user: "Already signed in, starting setup now..." and continue immediately.
255
+ - **CAPTCHA:** The browser automation's built-in handoff will handle this. If it persists, tell the user: "There's a CAPTCHA in the browser, please complete it and I'll continue automatically."
256
256
 
257
257
  **What you should see when done:** URL contains `console.cloud.google.com` and no sign-in overlay is visible.
258
258
 
@@ -266,10 +266,10 @@ Navigate to `https://console.cloud.google.com/projectcreate`.
266
266
 
267
267
  Take a `browser_snapshot`. Find the project name input field (look for an element with label containing "Project name" or a text input near the top of the form). Type "Vellum Assistant" into it.
268
268
 
269
- Look for a "Create" button in the snapshot and click it. Wait 10-15 seconds for project creation take a screenshot to check for:
270
- - **Success message** or redirect to the new project dashboard note the project ID from the URL or page content.
271
- - **"Project name already in use" error** that's fine. Navigate to `https://console.cloud.google.com/cloud-resource-manager` to find and select the existing "Vellum Assistant" project. Use `browser_extract` to read the project ID from the page.
272
- - **Organization restriction or quota error** tell the user what happened and ask them to resolve it.
269
+ Look for a "Create" button in the snapshot and click it. Wait 10-15 seconds for project creation, then take a screenshot to check for:
270
+ - **Success message** or redirect to the new project dashboard. Note the project ID from the URL or page content.
271
+ - **"Project name already in use" error**: that's fine. Navigate to `https://console.cloud.google.com/cloud-resource-manager` to find and select the existing "Vellum Assistant" project. Use `browser_extract` to read the project ID from the page.
272
+ - **Organization restriction or quota error**: tell the user what happened and ask them to resolve it.
273
273
 
274
274
  **What you should see when done:** The project selector in the top bar shows the project name, and you have the project ID (something like `vellum-assistant-12345`).
275
275
 
@@ -286,8 +286,8 @@ Navigate to each API's library page and enable it if not already enabled:
286
286
  2. `https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=PROJECT_ID`
287
287
 
288
288
  For each page: take a `browser_snapshot`. Look for:
289
- - **"Enable" button** click it, wait a few seconds, take another snapshot to confirm.
290
- - **"Manage" button or "API enabled" text** the API is already enabled. Skip it.
289
+ - **"Enable" button**: click it, wait a few seconds, take another snapshot to confirm.
290
+ - **"Manage" button or "API enabled" text**: the API is already enabled. Skip it.
291
291
 
292
292
  **What you should see when done:** Both API pages show "Manage" or "API enabled" status.
293
293
 
@@ -297,7 +297,7 @@ Tell the user: "APIs enabled!"
297
297
 
298
298
  **Goal:** An OAuth consent screen is configured with External user type, the required scopes, and the user added as a test user.
299
299
 
300
- Tell the user: "Setting up OAuth consent screen this is the longest step but it's fully automated..."
300
+ Tell the user: "Setting up OAuth consent screen. This is the longest step but it's fully automated..."
301
301
 
302
302
  Navigate to `https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID`.
303
303
 
@@ -354,12 +354,12 @@ Tell the user: "Creating OAuth credentials..."
354
354
 
355
355
  Navigate to `https://console.cloud.google.com/apis/credentials?project=PROJECT_ID`.
356
356
 
357
- Take a `browser_snapshot`. Find and click a button labeled **"Create Credentials"** or **"+ Create Credentials"**. A dropdown menu should appear take another snapshot and click **"OAuth client ID"**.
357
+ Take a `browser_snapshot`. Find and click a button labeled **"Create Credentials"** or **"+ Create Credentials"**. A dropdown menu should appear. Take another snapshot and click **"OAuth client ID"**.
358
358
 
359
359
  On the creation form (take a snapshot to see the fields):
360
- - **Application type**: Find the dropdown and select **"Desktop app"**. This may be a `<select>` element or a custom dropdown use the snapshot to identify it. You might need to click the dropdown first, then take another snapshot to see the options, then click "Desktop app".
360
+ - **Application type**: Find the dropdown and select **"Desktop app"**. This may be a `<select>` element or a custom dropdown. Use the snapshot to identify it. You might need to click the dropdown first, then take another snapshot to see the options, then click "Desktop app".
361
361
  - **Name**: Type "Vellum Assistant" in the name field.
362
- - Do NOT add any redirect URIs the desktop app flow doesn't need them.
362
+ - Do NOT add any redirect URIs. The desktop app flow doesn't need them.
363
363
 
364
364
  Click **"Create"** to submit the form.
365
365
 
@@ -387,9 +387,9 @@ credential_store prompt:
387
387
  placeholder: "xxxxx.apps.googleusercontent.com"
388
388
  ```
389
389
 
390
- **Then** whether the Client ID was auto-read or prompted tell the user:
390
+ **Then**, whether the Client ID was auto-read or prompted, tell the user:
391
391
 
392
- > "Got the Client ID! Now I need the Client Secret. You can see it in the dialog in the Chrome window it starts with `GOCSPX-`. Please copy it and paste it into the secure prompt below."
392
+ > "Got the Client ID! Now I need the Client Secret. You can see it in the dialog in the Chrome window. It starts with `GOCSPX-`. Please copy it and paste it into the secure prompt below."
393
393
 
394
394
  And present the secure prompt:
395
395
 
@@ -404,7 +404,7 @@ credential_store prompt:
404
404
 
405
405
  Wait for the user to complete the prompt. **Do not take any other browser actions until the user has pasted the secret.** The dialog must stay open so they can see and copy the value.
406
406
 
407
- If the user has trouble locating the secret, take a `browser_screenshot` and describe where the secret field is on the screen but do NOT attempt to read the secret value yourself. It must come from the user for accuracy.
407
+ If the user has trouble locating the secret, take a `browser_screenshot` and describe where the secret field is on the screen, but do NOT attempt to read the secret value yourself. It must come from the user for accuracy.
408
408
 
409
409
  **What you should see when done:** `credential_store list` shows both `client_id` and `client_secret` for `integration:gmail`.
410
410
 
@@ -414,7 +414,7 @@ Tell the user: "Credentials stored securely!"
414
414
 
415
415
  **Goal:** The user authorizes Vellum to access their Gmail and Calendar via OAuth.
416
416
 
417
- Tell the user: "Opening Google authorization — just click 'Allow' on the consent page."
417
+ Tell the user: "Starting the authorization flow a Google sign-in page will open in a few seconds. Just click 'Allow' when it appears."
418
418
 
419
419
  Use `credential_store` with:
420
420
 
@@ -425,7 +425,7 @@ service: "integration:gmail"
425
425
 
426
426
  This auto-reads client_id and client_secret from the secure store and auto-fills auth_url, token_url, scopes, and extra_params from well-known config.
427
427
 
428
- **If the user sees a "This app isn't verified" warning:** Tell them: "You'll see an 'app isn't verified' warning this is normal for personal apps in testing mode. Click **Advanced**, then **Go to Vellum Assistant (unsafe)** to proceed."
428
+ **If the user sees a "This app isn't verified" warning:** Tell them: "You'll see an 'app isn't verified' warning. This is normal for personal apps in testing mode. Click **Advanced**, then **Go to Vellum Assistant (unsafe)** to proceed."
429
429
 
430
430
  **Verify:** The `oauth2_connect` call returns a success message with the connected account email.
431
431
 
@@ -437,7 +437,7 @@ Tell the user: "**Gmail and Calendar are connected!** You can now read, search,
437
437
 
438
438
  - **Page load failures:** Retry navigation once. If it still fails, tell the user and ask them to check their internet connection.
439
439
  - **Permission errors in GCP:** The user may need billing enabled or organization-level permissions. Explain clearly and ask them to resolve it.
440
- - **Consent screen already configured:** Don't overwrite skip to credential creation.
441
- - **Element not found:** Take a fresh `browser_snapshot` to re-assess. The GCP UI may have changed. Describe what you see and try alternative approaches. If stuck after 2 attempts, ask the user for guidance they can see the Chrome window too.
440
+ - **Consent screen already configured:** Don't overwrite. Skip to credential creation.
441
+ - **Element not found:** Take a fresh `browser_snapshot` to re-assess. The GCP UI may have changed. Describe what you see and try alternative approaches. If stuck after 2 attempts, ask the user for guidance. They can see the Chrome window too.
442
442
  - **OAuth flow timeout or failure:** Offer to retry. The credentials are already stored, so reconnecting only requires re-running the authorization flow.
443
443
  - **Any unexpected state:** Take a `browser_screenshot`, describe what you see, and ask the user for guidance.
@@ -2,7 +2,7 @@
2
2
  name: "Messaging"
3
3
  description: "Read, search, send, and manage messages across Slack, Gmail, Telegram, and other platforms"
4
4
  user-invocable: true
5
- metadata: {"vellum": {"emoji": "💬"}}
5
+ metadata: { "vellum": { "emoji": "💬" } }
6
6
  ---
7
7
 
8
8
  You are a unified messaging assistant with access to multiple platforms (Slack, Gmail, Telegram, and more). Use the messaging tools to help users read, search, organize, draft, and send messages across all connected platforms.
@@ -39,10 +39,10 @@ When the user asks to "connect my email", "set up email", "manage my email", or
39
39
  3. **Once the provider is known, act immediately.** Don't present setup options or explain OAuth. If it's Gmail, follow the Gmail section below. For any other provider, let the user know that only Gmail is fully supported right now, and offer to set up Gmail instead.
40
40
 
41
41
  ### Gmail
42
+
42
43
  1. **Try connecting directly first.** Call `credential_store` with `action: "oauth2_connect"` and `service: "gmail"`. The tool auto-fills Google's OAuth endpoints and looks up any previously stored client credentials — so this single call may be all that's needed.
43
- 2. **If it fails because no client_id is found:** The user needs to create Google Cloud OAuth credentials first. Install and load the **google-oauth-setup** skill (which depends on **public-ingress** for the redirect URI):
44
- - Call `vellum_skills_catalog` with `action: "install"` and `skill_id: "google-oauth-setup"`.
45
- - Then call `skill_load` with `skill: "google-oauth-setup"`.
44
+ 2. **If it fails because no client_id is found:** The user needs to create Google Cloud OAuth credentials first. Load the **google-oauth-setup** skill (which depends on **public-ingress** for the redirect URI):
45
+ - Call `skill_load` with `skill_id: "google-oauth-setup"` to load the dependency skill.
46
46
  - Tell the user Gmail isn't connected yet and briefly explain what the setup involves, then use `ui_show` with `surface_type: "confirmation"` to ask for permission to start:
47
47
  - **message:** "Ready to set up Gmail?"
48
48
  - **detail:** "I'll open a browser where you sign in to Google, then automate everything else — creating a project, enabling APIs, and connecting your account. Takes 2-3 minutes and you can watch in the browser preview panel."
@@ -52,10 +52,10 @@ When the user asks to "connect my email", "set up email", "manage my email", or
52
52
  3. **If the user provides a client_id directly in chat:** Call `credential_store` with `action: "oauth2_connect"`, `service: "gmail"`, and `client_id: "<their value>"`. Include `client_secret` too if they provide one. Everything else is auto-filled.
53
53
 
54
54
  ### Slack
55
+
55
56
  1. **Try connecting directly first.** Call `credential_store` with `action: "oauth2_connect"` and `service: "slack"`. The tool auto-fills Slack's OAuth endpoints and looks up any previously stored client credentials.
56
- 2. **If it fails because no client_id is found:** The user needs to create a Slack App first. Install and load the **slack-oauth-setup** skill:
57
- - Call `vellum_skills_catalog` with `action: "install"` and `skill_id: "slack-oauth-setup"`.
58
- - Then call `skill_load` with `skill: "slack-oauth-setup"`.
57
+ 2. **If it fails because no client_id is found:** The user needs to create a Slack App first. Load the **slack-oauth-setup** skill:
58
+ - Call `skill_load` with `skill_id: "slack-oauth-setup"` to load the dependency skill.
59
59
  - Tell the user Slack isn't connected yet and briefly explain what the setup involves, then use `ui_show` with `surface_type: "confirmation"` to ask for permission to start:
60
60
  - **message:** "Ready to set up Slack?"
61
61
  - **detail:** "I'll walk you through creating a Slack App and connecting your workspace. The process takes a few minutes, and I'll ask for your approval before each step."
@@ -65,20 +65,22 @@ When the user asks to "connect my email", "set up email", "manage my email", or
65
65
  3. **If the user provides client_id and client_secret directly in chat:** Call `credential_store` with `action: "oauth2_connect"`, `service: "slack"`, `client_id`, and `client_secret`. Everything else is auto-filled. Note: Slack always requires a client_secret.
66
66
 
67
67
  ### Telegram
68
- Telegram uses a bot token (not OAuth). Install and load the **telegram-setup** skill (which depends on **public-ingress** for the webhook URL) which automates the full setup:
69
- - Call `vellum_skills_catalog` with `action: "install"` and `skill_id: "telegram-setup"`.
70
- - Then call `skill_load` with `skill: "telegram-setup"`.
71
- - Tell the user: *"I've loaded a setup guide for Telegram. It will walk you through connecting a Telegram bot to your assistant."*
68
+
69
+ Telegram uses a bot token (not OAuth). Load the **telegram-setup** skill (which depends on **public-ingress** for the webhook URL) which automates the full setup:
70
+
71
+ - Call `skill_load` with `skill_id: "telegram-setup"` to load the dependency skill.
72
+ - Tell the user: _"I've loaded a setup guide for Telegram. It will walk you through connecting a Telegram bot to your assistant."_
72
73
 
73
74
  The telegram-setup skill handles: verifying the bot token from @BotFather, generating a webhook secret, registering bot commands, and storing credentials securely via the secure credential prompt flow. **Never accept a Telegram bot token pasted in plaintext chat — always use the secure prompt.** Webhook registration with Telegram is handled automatically by the gateway on startup and whenever credentials change.
74
75
 
75
76
  The telegram-setup skill also includes **guardian verification**, which links your Telegram account as the trusted guardian for the bot.
76
77
 
77
78
  ### SMS (Twilio)
79
+
78
80
  SMS messaging uses Twilio as the telephony provider. Twilio credentials and phone number configuration are shared with the **phone-calls** skill. Load the **sms-setup** skill for complete SMS configuration including compliance and testing:
79
- - Call `vellum_skills_catalog` with `action: "install"` and `skill_id: "sms-setup"`.
80
- - Then call `skill_load` with `skill: "sms-setup"`.
81
- - Tell the user: *"I've loaded the SMS setup guide. It will walk you through configuring Twilio, handling compliance requirements, and testing SMS delivery."*
81
+
82
+ - Call `skill_load` with `skill_id: "sms-setup"` to load the dependency skill.
83
+ - Tell the user: _"I've loaded the SMS setup guide. It will walk you through configuring Twilio, handling compliance requirements, and testing SMS delivery."_
82
84
 
83
85
  The sms-setup skill handles: Twilio credential storage (Account SID + Auth Token), phone number provisioning or assignment, public ingress setup, SMS compliance verification, and end-to-end test sending. Once SMS is set up, messaging is available automatically — no additional feature flag is needed.
84
86
 
@@ -86,10 +88,9 @@ The sms-setup skill also includes optional **guardian verification** for SMS, wh
86
88
 
87
89
  ### Guardian Verification (SMS, Voice, or Telegram)
88
90
 
89
- If the user asks to verify their guardian identity for any channel (SMS, voice, or Telegram), install and load the **guardian-verify-setup** skill:
91
+ If the user asks to verify their guardian identity for any channel (SMS, voice, or Telegram), load the **guardian-verify-setup** skill:
90
92
 
91
- - Call `vellum_skills_catalog` with `action: "install"` and `skill_id: "guardian-verify-setup"`.
92
- - Then call `skill_load` with `skill: "guardian-verify-setup"`.
93
+ - Call `skill_load` with `skill_id: "guardian-verify-setup"` to load the dependency skill.
93
94
 
94
95
  The guardian-verify-setup skill handles the full outbound verification flow for all supported channels. It collects the user's destination (phone number or Telegram chat ID/handle), initiates an outbound verification session, and guides the user through entering or replying with the verification code. This is the single source of truth for guardian verification setup -- do not duplicate the verification flow inline.
95
96
 
@@ -107,11 +108,12 @@ When a messaging tool fails with a token or authorization error:
107
108
  - If the user specifies a platform (e.g., "check my Slack"), pass it as the `platform` parameter.
108
109
  - If only one platform is connected, it is auto-selected.
109
110
  - If multiple platforms are connected and the user doesn't specify, ask which platform they mean — or search across all of them.
110
- - **Be action-oriented with email.** When the user says "email" and wants to *do* something (declutter, check, search, send), check what's connected first. If nothing is connected, ask which provider briefly and then go straight into setup — don't present menus, options lists, or explain the setup process. Just do it.
111
+ - **Be action-oriented with email.** When the user says "email" and wants to _do_ something (declutter, check, search, send), check what's connected first. If nothing is connected, ask which provider briefly and then go straight into setup — don't present menus, options lists, or explain the setup process. Just do it.
111
112
 
112
113
  ## Capabilities
113
114
 
114
115
  ### Universal (Slack, Gmail)
116
+
115
117
  - **Auth Test**: Verify connection and show account info
116
118
  - **List Conversations**: Show channels, inboxes, DMs with unread counts
117
119
  - **Read Messages**: Read message history from a conversation
@@ -121,40 +123,48 @@ When a messaging tool fails with a token or authorization error:
121
123
  - **Mark Read**: Mark conversation as read
122
124
 
123
125
  ### Telegram
126
+
124
127
  Telegram is supported as a messaging provider with limited capabilities compared to Slack and Gmail due to Bot API constraints:
125
128
 
126
129
  - **Send**: Send a message to a known chat ID (high risk — requires user approval)
127
130
  - **Auth Test**: Verify bot token and show bot info
128
131
 
129
132
  **Not available** (Bot API limitations):
133
+
130
134
  - List conversations — the Bot API does not expose a method to enumerate chats a bot belongs to
131
135
  - Read message history — bots cannot retrieve past messages from a chat
132
136
  - Search messages — no search API is available for bots
133
137
 
134
138
  **Bot-account limits:**
139
+
135
140
  - The bot can only message users or groups that have previously interacted with it (sent `/start` or been added to a group). Bots cannot initiate conversations with arbitrary phone numbers.
136
141
  - Future support for MTProto user-account sessions may lift some of these restrictions.
137
142
 
138
143
  ### SMS (Twilio)
144
+
139
145
  SMS is supported as a messaging provider with limited capabilities. The conversation ID is the recipient's phone number in E.164 format (e.g. `+14155551234`):
140
146
 
141
147
  - **Send**: Send an SMS to a phone number (high risk — requires user approval)
142
148
  - **Auth Test**: Verify Twilio credentials and show the configured phone number
143
149
 
144
150
  **Not available** (SMS limitations):
151
+
145
152
  - List conversations — SMS is stateless; there is no API to enumerate past conversations
146
153
  - Read message history — message history is not available through the gateway
147
154
  - Search messages — no search API is available for SMS
148
155
 
149
156
  **SMS limits:**
157
+
150
158
  - Outbound SMS uses the assistant's configured Twilio phone number as the sender. The phone number must be provisioned and assigned via the twilio-setup skill.
151
159
  - SMS messages are subject to Twilio's character limits and carrier filtering. Long messages may be split into multiple segments.
152
160
 
153
161
  ### Slack-specific
162
+
154
163
  - **Add Reaction**: Add an emoji reaction to a message
155
164
  - **Leave Channel**: Leave a Slack channel
156
165
 
157
166
  ### Gmail-specific
167
+
158
168
  - **Archive**: Remove message from inbox
159
169
  - **Label**: Add/remove labels
160
170
  - **Trash**: Move to trash
@@ -162,6 +172,7 @@ SMS is supported as a messaging provider with limited capabilities. The conversa
162
172
  - **Draft (native)**: Create a draft in Gmail's Drafts folder
163
173
 
164
174
  ### Attachments (Gmail)
175
+
165
176
  - **List Attachments**: `gmail_list_attachments` — list all attachments on a message with filename, MIME type, size, and attachment ID
166
177
  - **Download Attachment**: `gmail_download_attachment` — download an attachment to the working directory by message ID + attachment ID
167
178
  - **Send with Attachments**: `gmail_send_with_attachments` — send an email with file attachments (reads files from disk, builds multipart MIME)
@@ -169,21 +180,25 @@ SMS is supported as a messaging provider with limited capabilities. The conversa
169
180
  Workflow: use `gmail_list_attachments` to discover attachments, then `gmail_download_attachment` to save them locally.
170
181
 
171
182
  ### Forward & Thread Operations (Gmail)
183
+
172
184
  - **Forward**: `gmail_forward` — forward a message to another recipient, preserving all attachments. Optionally prepend your own text
173
185
  - **Summarize Thread**: `gmail_summarize_thread` — LLM-powered thread summary with participants, decisions, open questions, and sentiment
174
186
  - **Follow-up Tracking**: `gmail_follow_up` — track/untrack messages for follow-up using a dedicated "Follow-up" label, or list all tracked messages
175
187
 
176
188
  ### Smart Triage (Gmail)
189
+
177
190
  - **Triage**: `gmail_triage` — LLM-powered inbox classification of unread emails into categories: `needs_reply`, `fyi_only`, `can_archive`, `urgent`, `newsletter`, `promotional`
178
191
  - Returns grouped report with reasoning and suggested actions per email
179
192
  - Set `auto_apply: true` to auto-archive `can_archive` emails and label `needs_reply` as "Follow-up"
180
193
  - Custom query support (default: `is:unread in:inbox`)
181
194
 
182
195
  ### Inbox Automation (Gmail)
196
+
183
197
  - **Filters**: `gmail_filters` — list, create, or delete Gmail filters. Filter criteria include from, to, subject, query, has_attachment. Actions include adding/removing labels and forwarding
184
198
  - **Vacation Responder**: `gmail_vacation` — get, enable, or disable the vacation auto-responder with custom message, date range, and domain/contact restrictions
185
199
 
186
200
  ### Google Contacts
201
+
187
202
  - **Contacts**: `google_contacts` — list or search Google Contacts by name or email. Returns name, email, phone, and organization
188
203
  - Requires the `contacts.readonly` scope — users may need to re-authorize Gmail to grant this additional permission
189
204
 
@@ -191,30 +206,30 @@ Workflow: use `gmail_list_attachments` to discover attachments, then `gmail_down
191
206
 
192
207
  When searching Slack, the query is passed directly to Slack's search API:
193
208
 
194
- | Operator | Example | What it finds |
195
- |---|---|---|
196
- | `from:` | `from:@alice` | Messages from a specific user |
197
- | `in:` | `in:#general` | Messages in a specific channel |
198
- | `has:` | `has:link` | Messages containing links |
199
- | `before:` | `before:2024-01-01` | Messages before a date |
200
- | `after:` | `after:2024-01-01` | Messages after a date |
201
- | `has:reaction` | `has:reaction` | Messages with reactions |
202
- | `has:star` | `has:star` | Starred messages |
209
+ | Operator | Example | What it finds |
210
+ | -------------- | ------------------- | ------------------------------ |
211
+ | `from:` | `from:@alice` | Messages from a specific user |
212
+ | `in:` | `in:#general` | Messages in a specific channel |
213
+ | `has:` | `has:link` | Messages containing links |
214
+ | `before:` | `before:2024-01-01` | Messages before a date |
215
+ | `after:` | `after:2024-01-01` | Messages after a date |
216
+ | `has:reaction` | `has:reaction` | Messages with reactions |
217
+ | `has:star` | `has:star` | Starred messages |
203
218
 
204
219
  ## Gmail Search Syntax
205
220
 
206
221
  When searching Gmail, the query uses Gmail's search operators:
207
222
 
208
- | Operator | Example | What it finds |
209
- |---|---|---|
210
- | `from:` | `from:alice@example.com` | Messages from a specific sender |
211
- | `to:` | `to:bob@example.com` | Messages sent to a recipient |
212
- | `subject:` | `subject:meeting` | Messages with a word in the subject |
213
- | `newer_than:` | `newer_than:7d` | Messages from the last 7 days |
214
- | `older_than:` | `older_than:30d` | Messages older than 30 days |
215
- | `is:unread` | `is:unread` | Unread messages |
216
- | `has:attachment` | `has:attachment` | Messages with attachments |
217
- | `label:` | `label:work` | Messages with a specific label |
223
+ | Operator | Example | What it finds |
224
+ | ---------------- | ------------------------ | ----------------------------------- |
225
+ | `from:` | `from:alice@example.com` | Messages from a specific sender |
226
+ | `to:` | `to:bob@example.com` | Messages sent to a recipient |
227
+ | `subject:` | `subject:meeting` | Messages with a word in the subject |
228
+ | `newer_than:` | `newer_than:7d` | Messages from the last 7 days |
229
+ | `older_than:` | `older_than:30d` | Messages older than 30 days |
230
+ | `is:unread` | `is:unread` | Unread messages |
231
+ | `has:attachment` | `has:attachment` | Messages with attachments |
232
+ | `label:` | `label:work` | Messages with a specific label |
218
233
 
219
234
  ## Drafting vs Sending
220
235
 
@@ -253,9 +268,11 @@ Use `messaging_analyze_activity` to classify channels or conversations by activi
253
268
 
254
269
  When a user asks to declutter, clean up, or organize their email — start scanning immediately. Don't ask what kind of cleanup they want or request permission to read their inbox. Go straight to scanning — but once results are ready, always show them via `ui_show` and let the user choose actions before archiving or unsubscribing.
255
270
 
271
+ **CRITICAL**: Never call `gmail_batch_archive`, `gmail_archive_by_query`, `gmail_unsubscribe`, or `messaging_archive_by_sender` unless the user has clicked an action button on the table for that specific batch. Each batch of results requires its own explicit user confirmation via the table UI. If the user says "keep going" or "keep decluttering," that means scan and present a new table — NOT auto-archive. Previous batch approvals do not carry forward.
272
+
256
273
  ### Provider Selection
257
274
 
258
- - **Gmail connected**: Use the Gmail-specific tools (`gmail_sender_digest`, `gmail_archive_by_query`, `gmail_unsubscribe`, `gmail_filters`) — they have richer features like unsubscribe support and filter creation.
275
+ - **Gmail connected**: Use the Gmail-specific tools (`gmail_sender_digest`, `gmail_batch_archive`, `gmail_unsubscribe`, `gmail_filters`) — they have richer features like unsubscribe support and filter creation.
259
276
  - **Non-Gmail email connected**: Use the generic tools (`messaging_sender_digest`, `messaging_archive_by_sender`) — they work with any provider that supports these operations. Skip unsubscribe and filter offers since they are Gmail-specific.
260
277
  - **Nothing connected**: Ask which email provider they use. If it's Gmail, go straight into the Gmail connection flow. For other providers, let the user know only Gmail is supported right now and offer to set up Gmail instead. Don't present a menu of options or explain what OAuth is.
261
278
 
@@ -269,14 +286,14 @@ When a user asks to declutter, clean up, or organize their email — start scann
269
286
  - **Caption**: "Showing emails from last 90 days in Promotions" (or adjusted to match the query used)
270
287
  - **Gmail action buttons (exactly 2)**: "Archive & Unsubscribe" (primary), "Archive Only" (secondary). **NEVER offer Delete, Trash, or any destructive action.**
271
288
  - **Non-Gmail action button (exactly 1)**: "Archive Selected" (primary). Do not offer an unsubscribe button — it is Gmail-specific. **NEVER offer Delete, Trash, or any destructive action.**
272
- 3. **Live progress**: After the user clicks an action button:
289
+ 3. **Wait for user action**: Stop and wait. Do NOT proceed to archiving or unsubscribing until the user clicks one of the action buttons on the table. When the user clicks an action button:
273
290
  - **Dismiss the table immediately** with `ui_dismiss` — it collapses to a completion chip
274
291
  - **Show a `task_progress` card** with one step per selected sender (e.g., "Archiving TechCrunch (247 emails)"). Update each step from `in_progress` → `completed` as each sender finishes.
275
292
  - When all senders are processed, set the progress card's `status: "completed"`.
276
293
  4. **Act on selection**: For each selected sender:
277
- - Use `gmail_archive_by_query` (or `messaging_archive_by_sender` for non-Gmail) with the sender's `search_query` — this archives all matching messages in one call, regardless of volume
294
+ - Use `gmail_batch_archive` (or `messaging_archive_by_sender` for non-Gmail) with the sender's `message_ids` array — this archives exactly the messages that were scanned and counted
278
295
  - If Gmail and the action is "Archive & Unsubscribe" and `has_unsubscribe` is true, call `gmail_unsubscribe` with the sender's `newest_message_id`
279
- 5. **Accurate summary**: Use the **actual counts returned by the archive tool**, not the scan counts from the digest. The scan is a sample; the archive is comprehensive. Format: "Cleaned up [total_archived] emails from [sender_count] senders." For Gmail, append: "Unsubscribed from [unsub_count]."
296
+ 5. **Accurate summary**: The scan counts are exact the `message_count` shown in the table matches the number of `message_ids` that were archived. Format: "Cleaned up [total_archived] emails from [sender_count] senders." For Gmail, append: "Unsubscribed from [unsub_count]."
280
297
  6. **Ongoing protection offer (Gmail only)**: After reporting results, offer auto-archive filters:
281
298
  - "Want me to set up auto-archive filters so future emails from these senders skip your inbox?"
282
299
  - If yes, call `gmail_filters` with `action: "create"` for each sender with `from` set to the sender's email and `remove_label_ids: ["INBOX"]`.
@@ -286,7 +303,7 @@ When a user asks to declutter, clean up, or organize their email — start scann
286
303
 
287
304
  - **Zero results**: Tell the user "No newsletter emails found" and suggest broadening the query (e.g. removing the category filter or extending the date range)
288
305
  - **Unsubscribe failures**: Report per-sender success/failure; the existing `gmail_unsubscribe` tool handles edge cases
289
- - **Large sender counts**: The `has_more` flag indicates a sender had more messages than collected`gmail_archive_by_query` handles this automatically via its own pagination
306
+ - **Large sender counts**: The scan covers up to 2000 messages. If `truncated` is true in the top-level response, the scan was capped and there are more matching emails beyond what was scanned — tell the user the cleanup was partial and offer to run another pass. If `has_more` is true for a sender, it means they had more messages than could be tracked mention this to the user in the summary
290
307
 
291
308
  ## Batch Operations
292
309
 
@@ -221,96 +221,6 @@
221
221
  "executor": "tools/messaging-mark-read.ts",
222
222
  "execution_target": "host"
223
223
  },
224
- {
225
- "name": "slack_add_reaction",
226
- "description": "Add an emoji reaction to a Slack message. Include a confidence score (0-1).",
227
- "category": "messaging",
228
- "risk": "medium",
229
- "input_schema": {
230
- "type": "object",
231
- "properties": {
232
- "channel": {
233
- "type": "string",
234
- "description": "Slack channel ID"
235
- },
236
- "timestamp": {
237
- "type": "string",
238
- "description": "Message timestamp (ts)"
239
- },
240
- "emoji": {
241
- "type": "string",
242
- "description": "Emoji name without colons (e.g. \"thumbsup\")"
243
- },
244
- "confidence": {
245
- "type": "number",
246
- "description": "Confidence score (0-1) for this action"
247
- }
248
- },
249
- "required": [
250
- "channel",
251
- "timestamp",
252
- "emoji",
253
- "confidence"
254
- ]
255
- },
256
- "executor": "tools/slack-add-reaction.ts",
257
- "execution_target": "host"
258
- },
259
- {
260
- "name": "slack_delete_message",
261
- "description": "Delete a Slack message posted by the bot. Include a confidence score (0-1).",
262
- "category": "messaging",
263
- "risk": "high",
264
- "input_schema": {
265
- "type": "object",
266
- "properties": {
267
- "channel": {
268
- "type": "string",
269
- "description": "Slack channel ID"
270
- },
271
- "timestamp": {
272
- "type": "string",
273
- "description": "Message timestamp (ts) to delete"
274
- },
275
- "confidence": {
276
- "type": "number",
277
- "description": "Confidence score (0-1) for this action"
278
- }
279
- },
280
- "required": [
281
- "channel",
282
- "timestamp",
283
- "confidence"
284
- ]
285
- },
286
- "executor": "tools/slack-delete-message.ts",
287
- "execution_target": "host"
288
- },
289
- {
290
- "name": "slack_leave_channel",
291
- "description": "Leave a Slack channel. Include a confidence score (0-1).",
292
- "category": "messaging",
293
- "risk": "medium",
294
- "input_schema": {
295
- "type": "object",
296
- "properties": {
297
- "channel": {
298
- "type": "string",
299
- "description": "Slack channel ID to leave"
300
- },
301
- "confidence": {
302
- "type": "number",
303
- "description": "Confidence score (0-1) for this action"
304
- }
305
- },
306
- "required": [
307
- "channel",
308
- "confidence"
309
- ]
310
- },
311
- "executor": "tools/slack-leave-channel.ts",
312
- "execution_target": "host"
313
- },
314
224
  {
315
225
  "name": "messaging_analyze_activity",
316
226
  "description": "Analyze channel or conversation activity levels. Groups conversations as high/medium/low/dead activity.",
@@ -1006,11 +916,15 @@
1006
916
  },
1007
917
  "max_messages": {
1008
918
  "type": "number",
1009
- "description": "Maximum messages to scan (default 500, cap 2000)"
919
+ "description": "Maximum messages to scan (default 2000, cap 2000)"
1010
920
  },
1011
921
  "max_senders": {
1012
922
  "type": "number",
1013
923
  "description": "Maximum senders to return (default 30)"
924
+ },
925
+ "page_token": {
926
+ "type": "string",
927
+ "description": "Resume token from a previous scan's next_page_token to continue scanning beyond the cap"
1014
928
  }
1015
929
  }
1016
930
  },
@@ -1035,11 +949,15 @@
1035
949
  },
1036
950
  "max_messages": {
1037
951
  "type": "number",
1038
- "description": "Maximum messages to scan (default 500, cap 2000)"
952
+ "description": "Maximum messages to scan (default 2000, cap 2000)"
1039
953
  },
1040
954
  "max_senders": {
1041
955
  "type": "number",
1042
956
  "description": "Maximum senders to return (default 30)"
957
+ },
958
+ "page_token": {
959
+ "type": "string",
960
+ "description": "Resume token from a previous scan's next_page_token to continue scanning beyond the cap"
1043
961
  }
1044
962
  }
1045
963
  },
@@ -1098,6 +1016,10 @@
1098
1016
  "min_confidence": {
1099
1017
  "type": "number",
1100
1018
  "description": "Minimum confidence threshold 0-1 (default 0.5)"
1019
+ },
1020
+ "page_token": {
1021
+ "type": "string",
1022
+ "description": "Resume token from a previous scan's next_page_token to continue scanning beyond the cap"
1101
1023
  }
1102
1024
  }
1103
1025
  },