@vellumai/assistant 0.4.37 → 0.4.41

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 (169) hide show
  1. package/ARCHITECTURE.md +3 -3
  2. package/README.md +13 -13
  3. package/bun.lock +80 -24
  4. package/docs/architecture/integrations.md +126 -128
  5. package/docs/runbook-trusted-contacts.md +1 -1
  6. package/docs/trusted-contact-access.md +12 -12
  7. package/package.json +3 -1
  8. package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +0 -14
  9. package/src/__tests__/app-bundler.test.ts +209 -0
  10. package/src/__tests__/app-compiler.test.ts +279 -0
  11. package/src/__tests__/app-executors.test.ts +293 -483
  12. package/src/__tests__/app-migration.test.ts +148 -0
  13. package/src/__tests__/app-routes-csp.test.ts +202 -0
  14. package/src/__tests__/avatar-e2e.test.ts +452 -0
  15. package/src/__tests__/avatar-generator.test.ts +193 -0
  16. package/src/__tests__/avatar-router.test.ts +186 -0
  17. package/src/__tests__/browser-download-timeout.test.ts +28 -0
  18. package/src/__tests__/bundled-skill-retrieval-guard.test.ts +9 -9
  19. package/src/__tests__/call-domain.test.ts +3 -7
  20. package/src/__tests__/credential-security-e2e.test.ts +19 -12
  21. package/src/__tests__/credentials-cli.test.ts +30 -4
  22. package/src/__tests__/guardian-verify-setup-skill-regression.test.ts +1 -1
  23. package/src/__tests__/handlers-slack-config.test.ts +0 -72
  24. package/src/__tests__/handlers-telegram-config.test.ts +19 -12
  25. package/src/__tests__/handlers-twitter-config.test.ts +105 -48
  26. package/src/__tests__/inbound-invite-redemption.test.ts +4 -4
  27. package/src/__tests__/integration-status.test.ts +15 -5
  28. package/src/__tests__/integrations-cli.test.ts +1 -1
  29. package/src/__tests__/invite-redemption-service.test.ts +62 -7
  30. package/src/__tests__/ipc-snapshot.test.ts +0 -8
  31. package/src/__tests__/managed-avatar-client.test.ts +280 -0
  32. package/src/__tests__/mcp-cli.test.ts +3 -3
  33. package/src/__tests__/oauth-cli.test.ts +203 -0
  34. package/src/__tests__/relay-server.test.ts +3 -3
  35. package/src/__tests__/secret-onetime-send.test.ts +19 -12
  36. package/src/__tests__/secure-keys.test.ts +78 -0
  37. package/src/__tests__/session-messaging-secret-redirect.test.ts +3 -0
  38. package/src/__tests__/slack-channel-config.test.ts +23 -16
  39. package/src/__tests__/slack-share-routes.test.ts +263 -0
  40. package/src/__tests__/sms-messaging-provider.test.ts +3 -1
  41. package/src/__tests__/trusted-contact-lifecycle-notifications.test.ts +7 -7
  42. package/src/__tests__/trusted-contact-multichannel.test.ts +3 -3
  43. package/src/__tests__/trusted-contact-verification.test.ts +10 -10
  44. package/src/__tests__/twilio-config.test.ts +15 -36
  45. package/src/__tests__/twilio-provider.test.ts +4 -0
  46. package/src/__tests__/twitter-auth-handler.test.ts +27 -14
  47. package/src/__tests__/twitter-cli-error-shaping.test.ts +1 -1
  48. package/src/__tests__/twitter-cli-routing.test.ts +38 -53
  49. package/src/__tests__/twitter-oauth-client.test.ts +18 -47
  50. package/src/__tests__/voice-invite-redemption.test.ts +27 -3
  51. package/src/amazon/cart.ts +1 -1
  52. package/src/amazon/client.ts +89 -7
  53. package/src/approvals/guardian-request-resolvers.ts +2 -2
  54. package/src/bundler/app-bundler.ts +77 -32
  55. package/src/bundler/app-compiler.ts +195 -0
  56. package/src/bundler/manifest.ts +1 -1
  57. package/src/bundler/package-resolver.ts +185 -0
  58. package/src/calls/call-domain.ts +4 -14
  59. package/src/calls/relay-server.ts +2 -2
  60. package/src/calls/twilio-config.ts +5 -24
  61. package/src/calls/twilio-rest.ts +19 -5
  62. package/src/cli/amazon.ts +74 -249
  63. package/src/cli/audit.ts +2 -2
  64. package/src/cli/autonomy.ts +9 -9
  65. package/src/cli/channels.ts +5 -5
  66. package/src/cli/completions.ts +27 -27
  67. package/src/cli/config.ts +14 -14
  68. package/src/cli/contacts.ts +27 -27
  69. package/src/cli/credentials.ts +28 -28
  70. package/src/cli/dev.ts +2 -2
  71. package/src/cli/doctor.ts +2 -2
  72. package/src/cli/email.ts +82 -82
  73. package/src/cli/influencer.ts +13 -13
  74. package/src/cli/integrations.ts +19 -144
  75. package/src/cli/keys.ts +10 -10
  76. package/src/cli/map.ts +4 -4
  77. package/src/cli/mcp.ts +17 -17
  78. package/src/cli/memory.ts +18 -18
  79. package/src/cli/notifications.ts +13 -13
  80. package/src/cli/oauth.ts +77 -0
  81. package/src/cli/program.ts +2 -0
  82. package/src/cli/sequence.ts +27 -27
  83. package/src/cli/sessions.ts +12 -12
  84. package/src/cli/trust.ts +8 -8
  85. package/src/cli/twitter.ts +124 -70
  86. package/src/config/bundled-skills/_shared/CLI_RETRIEVAL_PATTERN.md +1 -1
  87. package/src/config/bundled-skills/agentmail/SKILL.md +34 -34
  88. package/src/config/bundled-skills/amazon/SKILL.md +54 -54
  89. package/src/config/bundled-skills/app-builder/SKILL.md +137 -3
  90. package/src/config/bundled-skills/app-builder/tools/app-create.ts +10 -4
  91. package/src/config/bundled-skills/configure-settings/SKILL.md +18 -18
  92. package/src/config/bundled-skills/contacts/SKILL.md +12 -12
  93. package/src/config/bundled-skills/doordash/lib/client.ts +7 -9
  94. package/src/config/bundled-skills/email-setup/SKILL.md +4 -4
  95. package/src/config/bundled-skills/frontend-design/icon.svg +16 -0
  96. package/src/config/bundled-skills/google-oauth-setup/SKILL.md +143 -162
  97. package/src/config/bundled-skills/guardian-verify-setup/SKILL.md +4 -4
  98. package/src/config/bundled-skills/influencer/SKILL.md +13 -13
  99. package/src/config/bundled-skills/mcp-setup/SKILL.md +11 -11
  100. package/src/config/bundled-skills/phone-calls/SKILL.md +48 -54
  101. package/src/config/bundled-skills/public-ingress/SKILL.md +6 -6
  102. package/src/config/bundled-skills/slack-app-setup/SKILL.md +1 -1
  103. package/src/config/bundled-skills/sms-setup/SKILL.md +3 -3
  104. package/src/config/bundled-skills/telegram-setup/SKILL.md +2 -2
  105. package/src/config/bundled-skills/twilio-setup/SKILL.md +136 -225
  106. package/src/config/bundled-skills/twitter/SKILL.md +68 -44
  107. package/src/config/bundled-skills/voice-setup/SKILL.md +2 -2
  108. package/src/config/core-schema.ts +26 -0
  109. package/src/config/env.ts +4 -0
  110. package/src/config/feature-flag-registry.json +9 -1
  111. package/src/config/schema.ts +8 -0
  112. package/src/config/system-prompt.ts +6 -3
  113. package/src/config/templates/BOOTSTRAP.md +7 -5
  114. package/src/contacts/contacts-write.ts +5 -1
  115. package/src/daemon/handlers/apps.ts +31 -4
  116. package/src/daemon/handlers/config-ingress.ts +3 -3
  117. package/src/daemon/handlers/config-integrations.ts +120 -49
  118. package/src/daemon/handlers/config-slack-channel.ts +26 -7
  119. package/src/daemon/handlers/config-slack.ts +1 -54
  120. package/src/daemon/handlers/config-telegram.ts +28 -10
  121. package/src/daemon/handlers/config.ts +1 -4
  122. package/src/daemon/handlers/twitter-auth.ts +11 -4
  123. package/src/daemon/ipc-contract/apps.ts +0 -13
  124. package/src/daemon/ipc-contract-inventory.json +0 -2
  125. package/src/daemon/lifecycle.ts +8 -1
  126. package/src/daemon/session-messaging.ts +2 -2
  127. package/src/daemon/tool-side-effects.ts +30 -0
  128. package/src/email/providers/agentmail.ts +1 -1
  129. package/src/email/providers/index.ts +1 -1
  130. package/src/email/service.ts +1 -1
  131. package/src/gallery/default-gallery.ts +538 -0
  132. package/src/gallery/gallery-manifest.ts +5 -1
  133. package/src/influencer/client.ts +8 -6
  134. package/src/mcp/client.ts +1 -1
  135. package/src/media/avatar-router.ts +99 -0
  136. package/src/media/avatar-types.ts +60 -0
  137. package/src/media/managed-avatar-client.ts +189 -0
  138. package/src/memory/app-migration.ts +114 -0
  139. package/src/memory/app-store.ts +11 -0
  140. package/src/memory/qdrant-client.ts +1 -1
  141. package/src/messaging/providers/slack/client.ts +12 -2
  142. package/src/messaging/providers/sms/adapter.ts +6 -10
  143. package/src/migrations/data-layout.ts +8 -1
  144. package/src/oauth/token-persistence.ts +9 -6
  145. package/src/runtime/assistant-scope.ts +5 -0
  146. package/src/runtime/auth/route-policy.ts +4 -0
  147. package/src/runtime/channel-readiness-service.ts +9 -4
  148. package/src/runtime/gateway-internal-client.ts +11 -3
  149. package/src/runtime/http-server.ts +2 -0
  150. package/src/runtime/invite-redemption-service.ts +23 -13
  151. package/src/runtime/middleware/twilio-validation.ts +2 -2
  152. package/src/runtime/routes/app-routes.ts +131 -3
  153. package/src/runtime/routes/inbound-stages/verification-intercept.ts +3 -3
  154. package/src/runtime/routes/integration-routes.ts +2 -2
  155. package/src/runtime/routes/slack-share-routes.ts +235 -0
  156. package/src/runtime/routes/twilio-routes.ts +47 -34
  157. package/src/schedule/integration-status.ts +2 -3
  158. package/src/security/token-manager.ts +11 -3
  159. package/src/tools/apps/executors.ts +116 -8
  160. package/src/tools/browser/browser-manager.ts +30 -2
  161. package/src/tools/browser/chrome-cdp.ts +31 -3
  162. package/src/tools/credentials/vault.ts +9 -7
  163. package/src/tools/executor.ts +4 -0
  164. package/src/tools/system/avatar-generator.ts +55 -34
  165. package/src/twitter/client.ts +1 -1
  166. package/src/twitter/oauth-client.ts +31 -43
  167. package/src/twitter/router.ts +25 -23
  168. package/src/util/platform.ts +5 -0
  169. package/src/slack/slack-webhook.ts +0 -66
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: "Google OAuth Setup"
3
- description: "Set up Google Cloud OAuth credentials for Gmail and Calendar"
3
+ description: "Set up Google Cloud OAuth credentials for Gmail and Calendar using browser automation"
4
4
  user-invocable: true
5
5
  credential-setup-for: "gmail"
6
- includes: ["public-ingress", "browser"]
6
+ includes: ["browser", "public-ingress"]
7
7
  metadata: { "vellum": { "emoji": "\ud83d\udd11" } }
8
8
  ---
9
9
 
@@ -11,10 +11,10 @@ You are helping your user set up Google Cloud OAuth credentials so Gmail and Goo
11
11
 
12
12
  ## Client Check
13
13
 
14
- Determine which setup path to use based on the user's client:
14
+ Determine whether the user has browser automation available (macOS desktop app) or is on a non-interactive channel (Telegram, SMS, etc.).
15
15
 
16
- - **macOS desktop app**: Follow **Path B: CLI Setup** below.
17
- - **Telegram or other channel** (no browser automation): Follow **Path A: Manual Setup for Channels** below.
16
+ - **macOS desktop app**: Follow the **Automated Setup** path below.
17
+ - **Telegram or other channel** (no browser automation): Follow the **Manual Setup for Channels** path below.
18
18
 
19
19
  ---
20
20
 
@@ -88,7 +88,6 @@ Tell the user:
88
88
  > - `https://www.googleapis.com/auth/calendar.readonly`
89
89
  > - `https://www.googleapis.com/auth/calendar.events`
90
90
  > - `https://www.googleapis.com/auth/userinfo.email`
91
- > - `https://www.googleapis.com/auth/contacts.readonly`
92
91
  > - Click **Update**, then **Save and Continue**
93
92
  > 5. On the Test users page, add **your email**, click **Save and Continue**
94
93
  > 6. On the Summary page, click **Back to Dashboard**
@@ -195,265 +194,238 @@ After the user authorizes (they'll come back and say so, or you can suggest they
195
194
 
196
195
  ---
197
196
 
198
- # Path B: CLI Setup (macOS Desktop App)
197
+ # Path B: Automated Setup (macOS Desktop App)
199
198
 
200
- **IMPORTANT: Always use `host_bash` (not `bash`) for all commands in this path.** The `gcloud` and `gws` CLIs need host access for Homebrew/npm installation, browser-based authentication, and interactive terminal prompts none of which are available inside the sandbox.
201
-
202
- You will set up Google Cloud OAuth credentials using the `gcloud` and `gws` command-line tools plus browser automation. The user signs in once via the browser, the CLI handles project setup, and the browser automates credential creation — the user only needs to copy-paste the Client Secret.
199
+ You will automate the entire GCP setup via the browser while the user watches in the Chrome window on the side. The user's only manual actions are: signing in to their Google account, and copy-pasting credentials from the Chrome window into secure prompts.
203
200
 
204
201
  ## Browser Interaction Principles
205
202
 
206
- Google Cloud Console's UI may change over time. Do NOT memorize or depend on specific element IDs, CSS selectors, or DOM structures. Instead:
203
+ Google Cloud Console's UI changes frequently. Do NOT memorize or depend on specific element IDs, CSS selectors, or DOM structures. Instead:
207
204
 
208
- 1. **Screenshot first, act second.** Before every interaction, take a `browser_screenshot` to see the current visual state. Use `browser_snapshot` to find interactive elements.
209
- 2. **Adapt to what you see.** If a button's label or position differs from what you expect, use the screenshot to find the correct element.
210
- 3. **Verify after every action.** After clicking, typing, or navigating, take a new screenshot to confirm the action succeeded.
211
- 4. **Never assume DOM structure.** Use the snapshot to identify what's on the page and interact accordingly.
212
- 5. **When stuck, screenshot and describe.** If you cannot find an expected element after 2 attempts, take a screenshot, describe what you see to the user, and ask for guidance.
205
+ 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.
206
+ 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.
207
+ 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).
208
+ 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.
209
+ 5. **When stuck after 2 attempts, describe and ask.** Take a screenshot, describe what you see to the user, and ask for guidance.
213
210
 
214
211
  ## Anti-Loop Guardrails
215
212
 
216
213
  Each step has a **retry budget of 3 attempts**. An attempt is one try at the step's primary action (e.g., clicking a button, filling a form). If a step fails after 3 attempts:
217
214
 
218
215
  1. **Stop trying.** Do not continue retrying the same approach.
219
- 2. **Fall back to manual.** Tell the user what you were trying to do and ask them to complete that step manually in the browser. Give them the direct URL and clear text instructions.
216
+ 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.
220
217
  3. **Resume automation** at the next step once the user confirms the manual step is done.
221
218
 
222
- 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.
223
-
224
- ## Things That Do Not Work — Do Not Attempt
219
+ 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.
225
220
 
226
- These actions are technically impossible in the browser automation environment:
221
+ ## Things That Do Not Work: Do Not Attempt
227
222
 
228
- - **Downloading files.** `browser_click` on a Download button does not save files to disk. Do NOT click "Download JSON" in the OAuth client creation dialog.
229
- - **Reading the Client Secret from a screenshot.** The secret IS visible in the creation dialog, but you MUST NOT attempt to read it from a screenshot — it is too easy to misread characters, and the value must be exact. Always use the `credential_store prompt` approach to let the user copy-paste it accurately.
230
- - **Clipboard operations.** You cannot copy/paste via browser automation.
223
+ These actions are technically impossible in the browser automation environment. Attempting them wastes time and leads to loops:
231
224
 
232
- ## Error Handling
233
-
234
- - **Page load failures:** Retry navigation once. If it still fails, tell the user and ask them to check their internet connection.
235
- - **Element not found:** Take a fresh screenshot to re-assess. The GCP Console UI may have changed. Describe what you see and try alternative approaches. If stuck after 2 attempts, ask the user for guidance.
236
- - **OAuth client already exists with same name:** This is fine — GCP allows multiple clients with the same name. Proceed with creation.
237
- - **Any unexpected state:** Take a `browser_screenshot`, describe what you see, and ask the user for guidance.
225
+ - **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.
226
+ - **Clipboard operations.** You cannot copy/paste via browser automation. The user must manually copy values from the Chrome window.
227
+ - **Deleting and recreating OAuth clients** to get a fresh secret. This orphans the stored client_id and causes `invalid_client` errors.
228
+ - **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.
238
229
 
239
- ## CLI Step 1: Confirm
230
+ ## Step 1: Single Upfront Confirmation
240
231
 
241
- Use `ui_show` with `surface_type: "confirmation"`:
232
+ Use `ui_show` with `surface_type: "confirmation"`. Set `message` to just the title, and `detail` to the body:
242
233
 
243
234
  - **message:** `Set up Google Cloud for Gmail & Calendar`
244
235
  - **detail:**
245
236
  > Here's what will happen:
246
237
  >
247
- > 1. **Install CLI tools** (`gcloud` and `gws`) if not already installed
248
- > 2. **You sign in** to your Google account once via the browser
249
- > 3. **CLI automates everything** project creation, APIs, and consent screen
250
- > 4. **I create OAuth credentials** in the browser you just watch
251
- > 5. **One quick copy-paste** you copy the Client Secret into a secure prompt
252
- > 6. **You authorize Vellum** with one click
238
+ > 1. **A browser opens on the side** so you can watch everything I do
239
+ > 2. **You sign in** to your Google account in the browser
240
+ > 3. **I automate everything** including project creation, APIs, OAuth config, and credentials
241
+ > 4. **One copy-paste** where I'll ask you to copy the Client Secret from the browser into a secure prompt
242
+ > 5. **You authorize Vellum** with one click
253
243
  >
254
- > Takes about a minute after first-time setup. Ready?
244
+ > The whole thing takes 2-3 minutes. Ready?
255
245
 
256
- If the user declines, acknowledge and stop.
246
+ If the user declines, acknowledge and stop. No further confirmations are needed after this point.
257
247
 
258
- ## CLI Step 2: Install Prerequisites
248
+ ## Step 2: Open Google Cloud Console and Sign In
259
249
 
260
- Check for and install each prerequisite. If any installation fails (e.g., Homebrew not available, corporate restrictions), tell the user what went wrong and provide manual installation instructions.
250
+ **Goal:** The user is signed in and the Google Cloud Console dashboard is loaded.
261
251
 
262
- ### gcloud
252
+ Navigate to `https://console.cloud.google.com/`.
263
253
 
264
- ```bash
265
- which gcloud
266
- ```
254
+ Take a screenshot to check the page state:
267
255
 
268
- If missing:
256
+ - **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..."
257
+ - **Already signed in:** Tell the user: "Already signed in, starting setup now..." and continue immediately.
258
+ - **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."
269
259
 
270
- ```bash
271
- brew install google-cloud-sdk
272
- ```
260
+ **What you should see when done:** URL contains `console.cloud.google.com` and no sign-in overlay is visible.
273
261
 
274
- After installation, verify it works:
262
+ ## Step 3: Create or Select a Project
275
263
 
276
- ```bash
277
- gcloud --version
278
- ```
264
+ **Goal:** A GCP project named "Vellum Assistant" exists and is selected.
279
265
 
280
- ### gws
266
+ Tell the user: "Creating Google Cloud project..."
281
267
 
282
- ```bash
283
- which gws
284
- ```
268
+ Navigate to `https://console.cloud.google.com/projectcreate`.
285
269
 
286
- If missing:
270
+ 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.
287
271
 
288
- ```bash
289
- npm install -g @googleworkspace/cli
290
- ```
272
+ 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:
291
273
 
292
- After installation, verify it works:
274
+ - **Success message** or redirect to the new project dashboard. Note the project ID from the URL or page content.
275
+ - **"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.
276
+ - **Organization restriction or quota error**: tell the user what happened and ask them to resolve it.
293
277
 
294
- ```bash
295
- gws --version
296
- ```
278
+ **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`).
297
279
 
298
- ## CLI Step 3: Sign In to Google
280
+ Tell the user: "Project created!"
299
281
 
300
- Tell the user: "Opening your browser so you can sign in to Google..."
282
+ ## Step 4: Enable Gmail and Calendar APIs
301
283
 
302
- ```bash
303
- gcloud auth login
304
- ```
284
+ **Goal:** Both the Gmail API and Google Calendar API are enabled for the project.
305
285
 
306
- This opens the browser for Google sign-in. Wait for the command to complete — it prints the authenticated account email on success.
286
+ Tell the user: "Enabling Gmail and Calendar APIs..."
307
287
 
308
- If the user is already authenticated (`gcloud auth list` shows an active account), skip this step and tell the user: "Already signed in, continuing setup..."
288
+ Navigate to each API's library page and enable it if not already enabled:
309
289
 
310
- ## CLI Step 4: GCP Project Setup
290
+ 1. `https://console.cloud.google.com/apis/library/gmail.googleapis.com?project=PROJECT_ID`
291
+ 2. `https://console.cloud.google.com/apis/library/calendar-json.googleapis.com?project=PROJECT_ID`
311
292
 
312
- Tell the user: "Setting up your Google Cloud project, APIs, and credentials..."
293
+ For each page: take a `browser_snapshot`. Look for:
313
294
 
314
- ### Primary: `gws auth setup`
295
+ - **"Enable" button**: click it, wait a few seconds, take another snapshot to confirm.
296
+ - **"Manage" button or "API enabled" text**: the API is already enabled. Skip it.
315
297
 
316
- ```bash
317
- gws auth setup
318
- ```
298
+ **What you should see when done:** Both API pages show "Manage" or "API enabled" status.
319
299
 
320
- This command automates:
300
+ Tell the user: "APIs enabled!"
321
301
 
322
- - GCP project creation (or selection of an existing one)
323
- - OAuth consent screen configuration
324
- - OAuth credential creation
302
+ ## Step 5: Configure OAuth Consent Screen
325
303
 
326
- Wait for the command to complete. It may have interactive prompts let them run in the terminal and the user can respond if needed.
304
+ **Goal:** An OAuth consent screen is configured with External user type, the required scopes, and the user added as a test user.
327
305
 
328
- If `gws auth setup` **succeeds**, note the **project ID** from the output and continue to **CLI Step 5**.
306
+ Tell the user: "Setting up OAuth consent screen. This is the longest step but it's fully automated..."
329
307
 
330
- ### Fallback: `gcloud` CLI + browser automation
308
+ Navigate to `https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID`.
331
309
 
332
- If `gws auth setup` **fails** (common with personal Google accounts due to workspace-admin scope errors), use `gcloud` CLI and browser automation instead.
310
+ Take a `browser_snapshot` and `browser_screenshot`. Check the page state:
333
311
 
334
- **Step 4f-1: Create GCP project**
312
+ ### If the consent screen is already configured
335
313
 
336
- Generate a unique suffix (4-6 random alphanumeric characters):
314
+ You'll see a dashboard showing the app name ("Vellum Assistant" or similar) with an "Edit App" button. **Skip to Step 6.**
337
315
 
338
- ```bash
339
- gcloud projects create vellum-assistant-SUFFIX --name="Vellum Assistant"
340
- ```
316
+ ### If you see a user type selection (External / Internal)
341
317
 
342
- If the project already exists, use it. Note the **project ID**.
318
+ Select **"External"** and click **Create** or **Get Started**.
343
319
 
344
- **Step 4f-2: Enable APIs**
320
+ ### Consent screen form (wizard or single-page)
345
321
 
346
- ```bash
347
- gcloud services enable gmail.googleapis.com --project=PROJECT_ID
348
- gcloud services enable calendar-json.googleapis.com --project=PROJECT_ID
349
- gcloud services enable people.googleapis.com --project=PROJECT_ID
350
- ```
322
+ Google Cloud uses either a multi-page wizard or a single-page form. Adapt to what you see:
351
323
 
352
- **Step 4f-3: Configure OAuth consent screen via browser**
324
+ **App information section:**
353
325
 
354
- Navigate to `https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID`.
326
+ - **App name**: Type "Vellum Assistant" in the app name field.
327
+ - **User support email**: This is typically a dropdown showing the signed-in user's email. Use `browser_snapshot` to find a `<select>` or clickable dropdown element near "User support email". Select the user's email.
328
+ - **Developer contact email**: Type the user's email into this field. (Use the same email visible in the support email dropdown if you can read it, or use `browser_extract` to find the email shown on the page.)
329
+ - Click **Save and Continue** if on a multi-page wizard.
355
330
 
356
- Take a screenshot and snapshot, then:
331
+ **Scopes section:**
357
332
 
358
- 1. Select **"External"** user type, click **Create**
359
- 2. Fill in the app registration form:
360
- - App name: **"Vellum Assistant"**
361
- - User support email: select the authenticated email from the dropdown
362
- - Developer contact email: type the same email
363
- - Click **Save and Continue**
364
- 3. On the Scopes page, click **Save and Continue** (scopes are not needed for test-mode apps)
365
- 4. On the Test users page:
366
- - Click **+ Add Users**
367
- - Enter the authenticated email address
368
- - Click **Add**, then **Save and Continue**
369
- 5. On the Summary page, click **Back to Dashboard**
333
+ - Click **"Add or Remove Scopes"** (or similar button).
334
+ - In the scope picker dialog, look for a text input labeled **"Manually add scopes"** or **"Filter"** at the bottom or top of the dialog.
335
+ - Paste all 6 scopes at once as a comma-separated string into that input:
336
+ ```
337
+ https://www.googleapis.com/auth/gmail.readonly,https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/gmail.send,https://www.googleapis.com/auth/calendar.readonly,https://www.googleapis.com/auth/calendar.events,https://www.googleapis.com/auth/userinfo.email
338
+ ```
339
+ - Click **"Add to Table"** or **"Update"** to confirm the scopes.
340
+ - If no manual input is available, you'll need to search for and check each scope individually using the scope tree. Search for each scope URL in the filter box and check its checkbox.
341
+ - Click **Save and Continue** (or **Update** then **Save and Continue**).
370
342
 
371
- **Verify:** Take a screenshot. The consent screen should show "Testing" publishing status.
343
+ **Test users section:**
372
344
 
373
- After the fallback completes, skip CLI Step 5 (APIs already enabled above) and CLI Step 5c (test user already added above) — continue directly to **CLI Step 6**.
345
+ - Click **"Add Users"** or similar.
346
+ - Enter the user's email address.
347
+ - Click **Add** then **Save and Continue**.
374
348
 
375
- ## CLI Step 5: Enable Additional APIs
349
+ **Summary section:**
376
350
 
377
- `gws auth setup` enables the APIs it needs, but Vellum also requires the Calendar and People APIs. Enable them explicitly using the project ID from step 4:
351
+ - Click **"Back to Dashboard"** or **"Submit"**.
378
352
 
379
- ```bash
380
- gcloud services enable calendar-json.googleapis.com --project=PROJECT_ID
381
- gcloud services enable people.googleapis.com --project=PROJECT_ID
382
- ```
353
+ **What you should see when done:** A consent screen dashboard showing "Vellum Assistant" as the app name.
383
354
 
384
- If either command reports the API is already enabled, that's fine — continue.
355
+ Tell the user: "Consent screen configured!"
385
356
 
386
- ## CLI Step 5c: Add Test User
357
+ ## Step 6: Create OAuth Credentials and Capture Them
387
358
 
388
- `gws auth setup` does not add test users to the consent screen, and there is no CLI/API for it. Use browser automation to add the authenticated email as a test user.
359
+ **Goal:** A "Desktop app" OAuth client exists, and both its Client ID and Client Secret are stored in the vault.
389
360
 
390
- Navigate to `https://console.cloud.google.com/apis/credentials/consent?project=PROJECT_ID`.
391
-
392
- Take a screenshot and snapshot. Find the **Test users** section (you may need to click **Edit App** or navigate to the consent screen edit flow):
393
-
394
- 1. Find and click the option to add test users (e.g., **+ Add Users** button)
395
- 2. Enter the authenticated email address (from `gcloud auth list`)
396
- 3. Click **Add** or **Save**
361
+ Tell the user: "Creating OAuth credentials..."
397
362
 
398
- **Verify:** Take a screenshot confirming the email appears in the test users list.
363
+ ### 6a: Create the credential
399
364
 
400
- If the user is already listed as a test user, skip this step.
365
+ Navigate to `https://console.cloud.google.com/apis/credentials?project=PROJECT_ID`.
401
366
 
402
- ## CLI Step 6: Create OAuth Credentials via Browser
367
+ 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"**.
403
368
 
404
- **Goal:** Create a Desktop OAuth client in GCP Console and capture both credentials.
369
+ On the creation form (take a snapshot to see the fields):
405
370
 
406
- Navigate to `https://console.cloud.google.com/apis/credentials?project=PROJECT_ID` (substitute the actual project ID from step 4).
371
+ - **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".
372
+ - **Name**: Type "Vellum Assistant" in the name field.
373
+ - Do NOT add any redirect URIs. The desktop app flow doesn't need them.
407
374
 
408
- Take a screenshot and snapshot to check the page state:
375
+ Click **"Create"** to submit the form.
409
376
 
410
- - **Sign-in page:** Tell the user: "Please sign in to your Google account in the browser." Then auto-detect sign-in completion by polling screenshots every 5-10 seconds. Once signed in, continue.
411
- - **Already signed in / Credentials page loaded:** Continue immediately.
377
+ ### 6b: Capture credentials from the dialog
412
378
 
413
- ### Step 6a: Create the OAuth Client
379
+ After creation, a dialog will display the **Client ID** and **Client Secret**. This is the critical step.
414
380
 
415
- 1. Take a screenshot and snapshot. Find and click **+ Create Credentials**, then select **OAuth client ID**.
416
- 2. On the creation form:
417
- - Application type: Select **"Desktop app"**
418
- - Name: **"Vellum Assistant"**
419
- - Click **Create**
420
- 3. **Verify:** Take a screenshot. A dialog should appear showing both the **Client ID** and **Client Secret**.
381
+ **First**, try to auto-read the **Client ID** using `browser_extract`. The Client ID matches the pattern `*.apps.googleusercontent.com`. Search the extracted text for this pattern. If found, store it:
421
382
 
422
- ### Step 6b: Extract Client ID
423
-
424
- Use `browser_extract` to read the Client ID from the creation dialog. It looks like `123456789-xxxxx.apps.googleusercontent.com`.
383
+ ```
384
+ credential_store store:
385
+ service: "integration:gmail"
386
+ field: "client_id"
387
+ value: "<the Client ID extracted from the page>"
388
+ ```
425
389
 
426
- Store it immediately:
390
+ If `browser_extract` fails to find the Client ID, prompt the user instead:
427
391
 
428
392
  ```
429
- credential_store store:
393
+ credential_store prompt:
430
394
  service: "integration:gmail"
431
395
  field: "client_id"
432
- value: "<the extracted Client ID>"
396
+ label: "Google OAuth Client ID"
397
+ description: "Copy the Client ID from the dialog in the Chrome window and paste it here. It looks like 123456789-xxxxx.apps.googleusercontent.com"
398
+ placeholder: "xxxxx.apps.googleusercontent.com"
433
399
  ```
434
400
 
435
- ### Step 6c: Capture Client Secret via Secure Prompt
401
+ **Then**, whether the Client ID was auto-read or prompted, tell the user:
436
402
 
437
- The Client Secret is visible in the same dialog. Do NOT attempt to read it from the screenshot use a secure prompt so the user copies it accurately.
403
+ > "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."
438
404
 
439
- Tell the user: "Your OAuth credentials have been created! Please copy the **Client Secret** shown in the dialog and paste it into the secure prompt below."
405
+ And present the secure prompt:
440
406
 
441
407
  ```
442
408
  credential_store prompt:
443
409
  service: "integration:gmail"
444
410
  field: "client_secret"
445
411
  label: "Google OAuth Client Secret"
446
- description: "Copy the Client Secret from the dialog on screen. It starts with GOCSPX-"
412
+ description: "Copy the Client Secret from the Google Cloud Console dialog and paste it here."
447
413
  placeholder: "GOCSPX-..."
448
414
  ```
449
415
 
450
- **CRITICAL do NOT dismiss the creation dialog before the user has copied the secret.** Wait for the secure prompt to be completed before clicking OK or navigating away.
416
+ 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.
417
+
418
+ 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.
419
+
420
+ **What you should see when done:** `credential_store list` shows both `client_id` and `client_secret` for `integration:gmail`.
451
421
 
452
- After the secret is stored, you may close the dialog.
422
+ Tell the user: "Credentials stored securely!"
453
423
 
454
- ## CLI Step 7: Authorize
424
+ ## Step 7: OAuth2 Authorization
455
425
 
456
- Tell the user: "Starting the authorization flow a Google sign-in page will open. Just click 'Allow' when it appears."
426
+ **Goal:** The user authorizes Vellum to access their Gmail and Calendar via OAuth.
427
+
428
+ Tell the user: "Starting the authorization flow — a Google sign-in page will open in a few seconds. Just click 'Allow' when it appears."
457
429
 
458
430
  Use `credential_store` with:
459
431
 
@@ -468,6 +440,15 @@ This auto-reads client_id and client_secret from the secure store and auto-fills
468
440
 
469
441
  **Verify:** The `oauth2_connect` call returns a success message with the connected account email.
470
442
 
471
- ## CLI Step 8: Done!
443
+ ## Step 8: Done!
472
444
 
473
445
  Tell the user: "**Gmail and Calendar are connected!** You can now read, search, and send emails, plus view and manage your calendar. Try asking me to check your inbox or show your upcoming events!"
446
+
447
+ ## Error Handling
448
+
449
+ - **Page load failures:** Retry navigation once. If it still fails, tell the user and ask them to check their internet connection.
450
+ - **Permission errors in GCP:** The user may need billing enabled or organization-level permissions. Explain clearly and ask them to resolve it.
451
+ - **Consent screen already configured:** Don't overwrite. Skip to credential creation.
452
+ - **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.
453
+ - **OAuth flow timeout or failure:** Offer to retry. The credentials are already stored, so reconnecting only requires re-running the authorization flow.
454
+ - **Any unexpected state:** Take a `browser_screenshot`, describe what you see, and ask the user for guidance.
@@ -5,7 +5,7 @@ user-invocable: true
5
5
  metadata: { "vellum": { "emoji": "\ud83d\udd10" } }
6
6
  ---
7
7
 
8
- You are helping your user set up guardian verification for a messaging channel (voice, Telegram, or Slack). This links their identity as the trusted guardian for the chosen channel. Use gateway control-plane APIs for outbound actions, and use `vellum integrations guardian status` for status reads.
8
+ You are helping your user set up guardian verification for a messaging channel (voice, Telegram, or Slack). This links their identity as the trusted guardian for the chosen channel. Use gateway control-plane APIs for outbound actions, and use `assistant integrations guardian status` for status reads.
9
9
 
10
10
  ## Prerequisites
11
11
 
@@ -124,7 +124,7 @@ For **voice** verification only: after telling the user their code and instructi
124
124
  2. Check the binding status via Vellum CLI:
125
125
 
126
126
  ```bash
127
- vellum integrations guardian status --channel voice --json
127
+ assistant integrations guardian status --channel voice --json
128
128
  ```
129
129
 
130
130
  3. If the response shows `bound: true`: immediately send a proactive success message in the current chat — "Voice verification complete! Your phone number is now the trusted guardian." Stop polling.
@@ -155,7 +155,7 @@ For **Slack** verification: after telling the user their code and instructing th
155
155
  2. Check the binding status via Vellum CLI:
156
156
 
157
157
  ```bash
158
- vellum integrations guardian status --channel slack --json
158
+ assistant integrations guardian status --channel slack --json
159
159
  ```
160
160
 
161
161
  3. If the response shows `bound: true`: immediately send a proactive success message in the current chat — "Slack verification complete! Your Slack account is now the trusted guardian. The DM channel has been captured for future message delivery." Stop polling.
@@ -181,7 +181,7 @@ After the user reports entering the code, verify the binding was created:
181
181
 
182
182
  ```bash
183
183
  CHANNEL="<channel>"
184
- vellum integrations guardian status --channel "$CHANNEL" --json
184
+ assistant integrations guardian status --channel "$CHANNEL" --json
185
185
  ```
186
186
 
187
187
  If the response shows the guardian is bound, confirm success: "Guardian verified! Your [channel] identity is now the trusted guardian."
@@ -5,13 +5,13 @@ user-invocable: true
5
5
  metadata: {"vellum": {"emoji": "🔍"}}
6
6
  ---
7
7
 
8
- You can research and discover influencers across Instagram, TikTok, and X/Twitter using the `vellum influencer` CLI.
8
+ You can research and discover influencers across Instagram, TikTok, and X/Twitter using the `assistant influencer` CLI.
9
9
 
10
10
  ## CLI Setup
11
11
 
12
- **IMPORTANT: Always use `host_bash` (not `bash`) for all `vellum influencer` commands.** The influencer CLI needs host access for the Chrome extension relay and the `vellum` binary, neither of which are available inside the sandbox.
12
+ **IMPORTANT: Always use `host_bash` (not `bash`) for all `assistant influencer` commands.** The influencer CLI needs host access for the Chrome extension relay and the `vellum` binary, neither of which are available inside the sandbox.
13
13
 
14
- `vellum influencer` is a built-in subcommand of the Vellum assistant CLI. If `vellum` is not found, prepend `PATH="$HOME/.local/bin:$PATH"` to the command.
14
+ `assistant influencer` is a built-in subcommand of the Vellum assistant CLI. If `vellum` is not found, prepend `PATH="$HOME/.local/bin:$PATH"` to the command.
15
15
 
16
16
  ## Prerequisites
17
17
 
@@ -60,7 +60,7 @@ When the user asks to find or research influencers:
60
60
  - **Verified only?** — do they need the blue checkmark?
61
61
  - Don't over-ask. If the user says "find me fitness influencers on Instagram", that's enough to start.
62
62
 
63
- 2. **Search** — run `vellum influencer search "<query>" --platforms <platforms> [options] --json`
63
+ 2. **Search** — run `assistant influencer search "<query>" --platforms <platforms> [options] --json`
64
64
 
65
65
  3. **Present results** — show a clean summary of each influencer found:
66
66
  - Username and display name
@@ -71,9 +71,9 @@ When the user asks to find or research influencers:
71
71
  - Content themes detected
72
72
  - Profile URL
73
73
 
74
- 4. **Deep dive** (if needed) — run `vellum influencer profile <username> --platform <platform> --json` to get detailed data on a specific influencer.
74
+ 4. **Deep dive** (if needed) — run `assistant influencer profile <username> --platform <platform> --json` to get detailed data on a specific influencer.
75
75
 
76
- 5. **Compare** (if needed) — run `vellum influencer compare instagram:user1 twitter:user2 tiktok:user3 --json` to compare influencers side by side.
76
+ 5. **Compare** (if needed) — run `assistant influencer compare instagram:user1 twitter:user2 tiktok:user3 --json` to compare influencers side by side.
77
77
 
78
78
  ## Follower Range Shortcuts
79
79
 
@@ -89,17 +89,17 @@ Human-friendly numbers are supported: `10k`, `100k`, `1m`, etc.
89
89
  ## Command Reference
90
90
 
91
91
  ```
92
- vellum influencer search "<query>" [options] --json
92
+ assistant influencer search "<query>" [options] --json
93
93
  --platforms <list> Comma-separated: instagram,tiktok,twitter (default: all three)
94
94
  --min-followers <n> Minimum follower count (e.g. 10k, 100000)
95
95
  --max-followers <n> Maximum follower count (e.g. 1m, 500k)
96
96
  --limit <n> Max results per platform (default: 10)
97
97
  --verified Only return verified accounts
98
98
 
99
- vellum influencer profile <username> --platform <platform> --json
99
+ assistant influencer profile <username> --platform <platform> --json
100
100
  --platform <platform> instagram, tiktok, or twitter (default: instagram)
101
101
 
102
- vellum influencer compare <platform:username ...> --json
102
+ assistant influencer compare <platform:username ...> --json
103
103
  Arguments are space-separated platform:username pairs
104
104
  e.g. instagram:nike twitter:nike tiktok:nike
105
105
  ```
@@ -123,22 +123,22 @@ vellum influencer compare <platform:username ...> --json
123
123
 
124
124
  **User**: "Find me fitness influencers on Instagram and TikTok"
125
125
 
126
- 1. `vellum influencer search "fitness coach workout" --platforms instagram,tiktok --limit 10 --json`
126
+ 1. `assistant influencer search "fitness coach workout" --platforms instagram,tiktok --limit 10 --json`
127
127
  2. Present results grouped by platform with follower counts and bios
128
128
  3. "I found 8 fitness influencers on Instagram and 6 on TikTok. Want me to dig deeper into any of these profiles?"
129
129
 
130
130
  **User**: "I need micro-influencers in the beauty niche, verified only"
131
131
 
132
- 1. `vellum influencer search "beauty makeup skincare" --platforms instagram,tiktok,twitter --min-followers 10k --max-followers 100k --verified --limit 10 --json`
132
+ 1. `assistant influencer search "beauty makeup skincare" --platforms instagram,tiktok,twitter --min-followers 10k --max-followers 100k --verified --limit 10 --json`
133
133
  2. Present filtered results
134
134
  3. Offer to compare top picks
135
135
 
136
136
  **User**: "Compare @username1 on Instagram with @username2 on TikTok"
137
137
 
138
- 1. `vellum influencer compare instagram:username1 tiktok:username2 --json`
138
+ 1. `assistant influencer compare instagram:username1 tiktok:username2 --json`
139
139
  2. Present side-by-side comparison with followers, engagement, bio, themes
140
140
 
141
141
  **User**: "Tell me more about @specificuser on Instagram"
142
142
 
143
- 1. `vellum influencer profile specificuser --platform instagram --json`
143
+ 1. `assistant influencer profile specificuser --platform instagram --json`
144
144
  2. Show full profile details including bio, follower/following counts, verified status, content themes