@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
@@ -99,7 +99,7 @@ Trusted contacts control who is allowed to send messages to the assistant throug
99
99
  Use this to show the user who currently has access, or to look up a specific contact.
100
100
 
101
101
  ```bash
102
- vellum contacts list --json
102
+ assistant contacts list --json
103
103
  ```
104
104
 
105
105
  Optional query parameters for filtering:
@@ -111,7 +111,7 @@ Optional query parameters for filtering:
111
111
  Example:
112
112
 
113
113
  ```bash
114
- vellum contacts list --role contact --json
114
+ assistant contacts list --role contact --json
115
115
  ```
116
116
 
117
117
  The response contains `{ ok: true, contacts: [...] }` where each contact has:
@@ -172,7 +172,7 @@ Use this when the user wants to remove someone's access. **Always confirm with t
172
172
 
173
173
  Ask the user: _"I'll revoke access for [name/identifier]. They will no longer be able to message the assistant. Should I proceed?"_
174
174
 
175
- First, list contacts to find the channel's `id` (each entry in a contact's `channels` array has an `id` field -- visible in `GET /v1/contacts` or `vellum contacts list --json` output), then revoke:
175
+ First, list contacts to find the channel's `id` (each entry in a contact's `channels` array has an `id` field -- visible in `GET /v1/contacts` or `assistant contacts list --json` output), then revoke:
176
176
 
177
177
  **Important**: Before revoking, check the channel's current `status`. If the channel is **blocked**, do not attempt to revoke it -- blocking is stronger than revoking. Inform the user that the contact is already blocked and revoking is not applicable. Only channels with `active` or `pending` status can be revoked.
178
178
 
@@ -198,14 +198,14 @@ curl -s -X PATCH "$INTERNAL_GATEWAY_BASE_URL/v1/contact-channels/<channel_id>" \
198
198
  -d '{"status": "blocked", "reason": "<optional reason>"}'
199
199
  ```
200
200
 
201
- Replace `<channel_id>` with the channel's `id` from the contact's `channels` array (visible in `GET /v1/contacts` or `vellum contacts list --json` output).
201
+ Replace `<channel_id>` with the channel's `id` from the contact's `channels` array (visible in `GET /v1/contacts` or `assistant contacts list --json` output).
202
202
 
203
203
  ## Channel Readiness
204
204
 
205
205
  Before creating an invite for any channel, check whether that channel is ready to accept messages. Creating an invite for an unready channel produces an unusable invite — the invitee redeems the code but cannot actually reach the assistant.
206
206
 
207
207
  ```bash
208
- vellum channels readiness --json
208
+ assistant channels readiness --json
209
209
  ```
210
210
 
211
211
  The response contains `{ success: true, snapshots: [...] }` where each snapshot has:
@@ -262,7 +262,7 @@ fi
262
262
 
263
263
  # Prefer backend-provided canonical link when available.
264
264
  if [ -z "$INVITE_URL" ]; then
265
- BOT_CONFIG_JSON=$(vellum integrations telegram config --json)
265
+ BOT_CONFIG_JSON=$(assistant integrations telegram config --json)
266
266
  BOT_USERNAME=$(printf '%s' "$BOT_CONFIG_JSON" | tr -d '\n' | sed -n 's/.*"botUsername"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')
267
267
  if [ -z "$BOT_USERNAME" ]; then
268
268
  echo "error:no_share_url_or_bot_username"
@@ -496,22 +496,22 @@ If the Slack bot is not available (Slack credentials not configured), tell the g
496
496
  Use this to show the guardian their active (and optionally all) invite links.
497
497
 
498
498
  ```bash
499
- vellum contacts invites list --source-channel telegram --json
499
+ assistant contacts invites list --source-channel telegram --json
500
500
  ```
501
501
 
502
502
  For voice invites:
503
503
 
504
504
  ```bash
505
- vellum contacts invites list --source-channel voice --json
505
+ assistant contacts invites list --source-channel voice --json
506
506
  ```
507
507
 
508
508
  For email, WhatsApp, SMS, or Slack invites:
509
509
 
510
510
  ```bash
511
- vellum contacts invites list --source-channel email --json
512
- vellum contacts invites list --source-channel whatsapp --json
513
- vellum contacts invites list --source-channel sms --json
514
- vellum contacts invites list --source-channel slack --json
511
+ assistant contacts invites list --source-channel email --json
512
+ assistant contacts invites list --source-channel whatsapp --json
513
+ assistant contacts invites list --source-channel sms --json
514
+ assistant contacts invites list --source-channel slack --json
515
515
  ```
516
516
 
517
517
  Optional query parameters:
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import {
8
+ ADD_CART_ITEM_QUERY,
8
9
  CREATE_ORDER_FROM_CART_QUERY,
9
10
  DETAILED_CART_QUERY,
10
11
  DROPOFF_OPTIONS_QUERY,
@@ -17,7 +18,6 @@ import {
17
18
  RETAIL_STORE_FEED_QUERY,
18
19
  SEARCH_QUERY,
19
20
  STORE_PAGE_QUERY,
20
- UPDATE_CART_ITEM_QUERY,
21
21
  } from "./queries.js";
22
22
  import { loadCapturedQueries } from "./query-extractor.js";
23
23
  import { type DoorDashSession, loadSession } from "./session.js";
@@ -583,14 +583,13 @@ export async function addToCart(opts: {
583
583
  nestedOptions?: string;
584
584
  specialInstructions?: string;
585
585
  }): Promise<CartSummary> {
586
- // Use updateCartItemV2 DoorDash now uses this for both adding and updating cart items
587
- const data = await graphql<{ updateCartItemV2: DDCart }>(
588
- "updateCartItem",
589
- getQuery("updateCartItem", UPDATE_CART_ITEM_QUERY),
586
+ // Use addCartItemV2 for adding items to cart (proper mutation for restaurant items)
587
+ const data = await graphql<{ addCartItemV2: DDCart }>(
588
+ "addCartItem",
589
+ getQuery("addCartItem", ADD_CART_ITEM_QUERY),
590
590
  {
591
- updateCartItemApiParams: {
591
+ addCartItemInput: {
592
592
  cartId: opts.cartId ?? "",
593
- cartItemId: "",
594
593
  itemId: opts.itemId,
595
594
  itemName: opts.itemName,
596
595
  itemDescription: opts.itemDescription ?? "",
@@ -612,7 +611,6 @@ export async function addToCart(opts: {
612
611
  isAdsItem: false,
613
612
  isBundle: false,
614
613
  bundleType: "BUNDLE_TYPE_UNSPECIFIED",
615
- cartFilter: null,
616
614
  },
617
615
  fulfillmentContext: {
618
616
  shouldUpdateFulfillment: false,
@@ -622,7 +620,7 @@ export async function addToCart(opts: {
622
620
  shouldKeepOnlyOneActiveCart: false,
623
621
  },
624
622
  );
625
- return extractCartSummary(data.updateCartItemV2);
623
+ return extractCartSummary(data.addCartItemV2);
626
624
  }
627
625
 
628
626
  export async function removeFromCart(
@@ -16,7 +16,7 @@ Only proceed if the user explicitly asks you to create or set up **your own** (t
16
16
  Before doing anything, check whether you already have an email address configured:
17
17
 
18
18
  ```bash
19
- vellum email status
19
+ assistant email status
20
20
  ```
21
21
 
22
22
  Inspect `addresses` in the response. If at least one address exists, tell the user the existing address and stop — do NOT create another one.
@@ -26,7 +26,7 @@ Inspect `addresses` in the response. If at least one address exists, tell the us
26
26
  Create a new inbox through the CLI:
27
27
 
28
28
  ```bash
29
- vellum email inbox create --username <your-username>
29
+ assistant email inbox create --username <your-username>
30
30
  ```
31
31
 
32
32
  For `<your-username>`, use your assistant name (lowercased, alphanumeric only). Check your identity from `IDENTITY.md` or `USER.md` to determine your name. If you don't have a name yet, ask the user what username they'd like for your email.
@@ -36,7 +36,7 @@ Use the returned `inbox.address` (or `inbox.id` if `address` is empty) as the cr
36
36
  ## Step 3: Verify Status
37
37
 
38
38
  ```bash
39
- vellum email status
39
+ assistant email status
40
40
  ```
41
41
 
42
42
  Confirm the created inbox appears in `addresses`.
@@ -53,7 +53,7 @@ After the inbox is created and visible in status:
53
53
  - **One-time only.** If an inbox already exists (Step 1), do not create another. Inform the user of the existing address.
54
54
  - **User-initiated only.** Never run this skill unless the user asks you to set up or create an email.
55
55
  - **No custom domains.** Use the default provider domain. Do not attempt domain setup.
56
- - **No API key prompting.** The email API key should already be configured. If the `vellum email` command fails with an API key error, tell the user the email integration is not yet configured and ask them to set it up.
56
+ - **No API key prompting.** The email API key should already be configured. If the `assistant email` command fails with an API key error, tell the user the email integration is not yet configured and ask them to set it up.
57
57
 
58
58
  ## Troubleshooting
59
59
 
@@ -0,0 +1,16 @@
1
+ <svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="0" y="0" width="16" height="16" fill="#f5f5f5"/>
3
+ <rect x="2" y="2" width="12" height="11" fill="#ffffff" stroke="#333333" stroke-width="1"/>
4
+ <rect x="2" y="2" width="12" height="2" fill="#ff6b6b"/>
5
+ <rect x="3" y="3" width="10" height="1" fill="#ffffff"/>
6
+ <rect x="3" y="5" width="2" height="1" fill="#4ecdc4"/>
7
+ <rect x="6" y="5" width="2" height="1" fill="#4ecdc4"/>
8
+ <rect x="9" y="5" width="2" height="1" fill="#4ecdc4"/>
9
+ <rect x="3" y="7" width="4" height="1" fill="#95e1d3"/>
10
+ <rect x="3" y="8" width="4" height="1" fill="#95e1d3"/>
11
+ <rect x="3" y="9" width="3" height="1" fill="#95e1d3"/>
12
+ <rect x="8" y="7" width="5" height="1" fill="#ffd93d"/>
13
+ <rect x="8" y="8" width="5" height="1" fill="#ffd93d"/>
14
+ <rect x="8" y="9" width="3" height="1" fill="#ffd93d"/>
15
+ <rect x="3" y="11" width="10" height="1" fill="#e8e8e8"/>
16
+ </svg>