@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
@@ -10,7 +10,7 @@ metadata: {"vellum": {"emoji": "📬"}}
10
10
  `vellum` is your own CLI binary — it is already installed and available on the PATH.
11
11
  Run all commands via `bash`. Do NOT attempt to install, build, or locate the CLI — just execute it directly.
12
12
 
13
- Example: `bash("vellum email status --json")`
13
+ Example: `bash("assistant email status --json")`
14
14
 
15
15
  Never use browser/computer-use unless user explicitly approves fallback.
16
16
 
@@ -20,8 +20,8 @@ This skill manages the **assistant's own** AgentMail address (`@agentmail.to`)
20
20
 
21
21
  ## Rules
22
22
 
23
- - Always run `vellum email` commands via `bash` and parse JSON output.
24
- - Always do `vellum email status --json` preflight first.
23
+ - Always run `assistant email` commands via `bash` and parse JSON output.
24
+ - Always do `assistant email status --json` preflight first.
25
25
  - Prefer `draft create` before any send — never bypass draft flow.
26
26
  - Require explicit user confirmation before `draft approve-send --confirm`.
27
27
  - When uncertain, draft to ops@ inbox and notify user.
@@ -29,7 +29,7 @@ This skill manages the **assistant's own** AgentMail address (`@agentmail.to`)
29
29
 
30
30
  ## API Key Setup
31
31
 
32
- If `vellum email status --json` returns an error about a missing API key, prompt the user for their AgentMail API key using the secure credential prompt. **Never ask the user to paste the key in chat.**
32
+ If `assistant email status --json` returns an error about a missing API key, prompt the user for their AgentMail API key using the secure credential prompt. **Never ask the user to paste the key in chat.**
33
33
 
34
34
  Use `credential_store` with:
35
35
  - action: `prompt`
@@ -41,14 +41,14 @@ Use `credential_store` with:
41
41
  - allowed_tools: `["bash"]`
42
42
  - usage_description: `AgentMail email operations via vellum CLI`
43
43
 
44
- After the credential is stored, retry `vellum email status --json` to confirm it works.
44
+ After the credential is stored, retry `assistant email status --json` to confirm it works.
45
45
 
46
46
  ## Workflow
47
47
 
48
- 1. **Preflight:** `vellum email status --json` (if API key error, run API Key Setup above)
49
- 2. **Quick inbox:** `vellum email inbox create --username <name>` (creates e.g. sam@agentmail.to — no custom domain needed)
48
+ 1. **Preflight:** `assistant email status --json` (if API key error, run API Key Setup above)
49
+ 2. **Quick inbox:** `assistant email inbox create --username <name>` (creates e.g. sam@agentmail.to — no custom domain needed)
50
50
  3. **Custom domain setup (optional):** domain -> dns -> verify -> inboxes -> webhook
51
- 4. **Draft path:** `vellum email draft create ...` — always draft first
51
+ 4. **Draft path:** `assistant email draft create ...` — always draft first
52
52
  5. **Send path:** show draft -> user confirms -> `draft approve-send --draft-id <id> --confirm`
53
53
  6. **Inbound triage:** list -> get -> summarize -> propose reply draft
54
54
  7. **Guardrails:** check with `guardrails get`, use `guardrails set` to change
@@ -58,67 +58,67 @@ After the credential is stored, retry `vellum email status --json` to confirm it
58
58
  ### Provider
59
59
 
60
60
  ```
61
- vellum email provider get [--json] # Show active provider
62
- vellum email provider set <provider> [--json] # Switch provider
61
+ assistant email provider get [--json] # Show active provider
62
+ assistant email provider set <provider> [--json] # Switch provider
63
63
  ```
64
64
 
65
65
  ### Status
66
66
 
67
67
  ```
68
- vellum email status [--json] # Provider health + guardrails
68
+ assistant email status [--json] # Provider health + guardrails
69
69
  ```
70
70
 
71
71
  ### Inbox Management
72
72
 
73
73
  ```
74
- vellum email inbox create --username <name> [--domain <d>] [--display-name <n>] [--json] # Create a new inbox (e.g. --username sam)
75
- vellum email inbox list [--json] # List all inboxes
74
+ assistant email inbox create --username <name> [--domain <d>] [--display-name <n>] [--json] # Create a new inbox (e.g. --username sam)
75
+ assistant email inbox list [--json] # List all inboxes
76
76
  ```
77
77
 
78
78
  ### Setup
79
79
 
80
80
  ```
81
- vellum email setup domain --domain <d> [--dry-run] [--json]
82
- vellum email setup dns --domain <d> [--json]
83
- vellum email setup verify --domain <d> [--json]
84
- vellum email setup inboxes --domain <d> [--json] # Creates standard hello@/support@/ops@ inboxes
85
- vellum email setup webhook --url <u> [--secret <s>] [--json]
81
+ assistant email setup domain --domain <d> [--dry-run] [--json]
82
+ assistant email setup dns --domain <d> [--json]
83
+ assistant email setup verify --domain <d> [--json]
84
+ assistant email setup inboxes --domain <d> [--json] # Creates standard hello@/support@/ops@ inboxes
85
+ assistant email setup webhook --url <u> [--secret <s>] [--json]
86
86
  ```
87
87
 
88
88
  ### Drafts
89
89
 
90
90
  ```
91
- vellum email draft create --from <addr> --to <addr> --subject <s> --body <b> [--cc <addr>] [--in-reply-to <msg-id>] [--json]
92
- vellum email draft list [--status pending|approved|sent|rejected] [--json]
93
- vellum email draft get <draft-id> [--json]
94
- vellum email draft approve-send --draft-id <id> --confirm [--json]
95
- vellum email draft reject --draft-id <id> [--reason <text>] [--json]
96
- vellum email draft delete <draft-id> [--json]
91
+ assistant email draft create --from <addr> --to <addr> --subject <s> --body <b> [--cc <addr>] [--in-reply-to <msg-id>] [--json]
92
+ assistant email draft list [--status pending|approved|sent|rejected] [--json]
93
+ assistant email draft get <draft-id> [--json]
94
+ assistant email draft approve-send --draft-id <id> --confirm [--json]
95
+ assistant email draft reject --draft-id <id> [--reason <text>] [--json]
96
+ assistant email draft delete <draft-id> [--json]
97
97
  ```
98
98
 
99
99
  ### Inbound
100
100
 
101
101
  ```
102
- vellum email inbound list [--thread-id <id>] [--json]
103
- vellum email inbound get <message-id> [--json]
102
+ assistant email inbound list [--thread-id <id>] [--json]
103
+ assistant email inbound get <message-id> [--json]
104
104
  ```
105
105
 
106
106
  ### Threads
107
107
 
108
108
  ```
109
- vellum email thread list [--json]
110
- vellum email thread get <thread-id> [--json]
109
+ assistant email thread list [--json]
110
+ assistant email thread get <thread-id> [--json]
111
111
  ```
112
112
 
113
113
  ### Guardrails
114
114
 
115
115
  ```
116
- vellum email guardrails get [--json]
117
- vellum email guardrails set --paused <true|false> --daily-cap <n> [--json]
118
- vellum email guardrails block <pattern> [--json]
119
- vellum email guardrails allow <pattern> [--json]
120
- vellum email guardrails rules [--json]
121
- vellum email guardrails unrule <rule-id> [--json]
116
+ assistant email guardrails get [--json]
117
+ assistant email guardrails set --paused <true|false> --daily-cap <n> [--json]
118
+ assistant email guardrails block <pattern> [--json]
119
+ assistant email guardrails allow <pattern> [--json]
120
+ assistant email guardrails rules [--json]
121
+ assistant email guardrails unrule <rule-id> [--json]
122
122
  ```
123
123
 
124
124
  ## Output Format
@@ -5,45 +5,45 @@ user-invocable: true
5
5
  metadata: { "vellum": { "emoji": "\uD83D\uDCE6" } }
6
6
  ---
7
7
 
8
- You can shop on Amazon (and Amazon Fresh for groceries) for the user using the `vellum amazon` CLI.
8
+ You can shop on Amazon (and Amazon Fresh for groceries) for the user using the `assistant amazon` CLI.
9
9
 
10
10
  ## CLI Setup
11
11
 
12
- **IMPORTANT: Always use `host_bash` (not `bash`) for all `vellum amazon` commands.** The Amazon CLI needs host access for session cookies and the `vellum` binary — neither of which are available inside the sandbox.
12
+ **IMPORTANT: Always use `host_bash` (not `bash`) for all `assistant amazon` commands.** The Amazon CLI needs host access for session cookies and the `vellum` binary — neither of which are available inside the sandbox.
13
13
 
14
- `vellum amazon` is a built-in subcommand of the Vellum assistant CLI — it is NOT a separate tool you need to find or install. It should already be on your PATH. If `vellum` is not found, prepend `PATH="$HOME/.local/bin:$PATH"` to the command. Do NOT search for the binary, inspect wrapper scripts, or try to discover how the CLI works. Just run the commands as documented below.
14
+ `assistant amazon` is a built-in subcommand of the Vellum assistant CLI — it is NOT a separate tool you need to find or install. It should already be on your PATH. If `vellum` is not found, prepend `PATH="$HOME/.local/bin:$PATH"` to the command. Do NOT search for the binary, inspect wrapper scripts, or try to discover how the CLI works. Just run the commands as documented below.
15
15
 
16
16
  ## Typical Flow — Regular Amazon Shopping
17
17
 
18
18
  When the user asks you to order something from Amazon:
19
19
 
20
- 1. **Check session** — run `vellum amazon status --json`. If `loggedIn` is false or the session is expired, tell the user: "A Chrome window will open to the Amazon login page. Please sign in there — I'll detect your login automatically and minimize the window." Then run `vellum amazon refresh --json`. This starts a Ride Shotgun learn session that records your login and auto-stops once it detects you've signed in. The session is imported automatically. **This command blocks until login is complete — just wait for it.**
20
+ 1. **Check session** — run `assistant amazon status --json`. If `loggedIn` is false or the session is expired, tell the user: "A Chrome window will open to the Amazon login page. Please sign in there — I'll detect your login automatically and minimize the window." Then run `assistant amazon refresh --json`. This starts a Ride Shotgun learn session that records your login and auto-stops once it detects you've signed in. The session is imported automatically. **This command blocks until login is complete — just wait for it.**
21
21
 
22
- 2. **Search** — run `vellum amazon search "<query>" --json` to find matching products. Present the top results with ASIN, title, price, and Prime status. If the user named a specific product, pick the best match. If ambiguous, ask.
22
+ 2. **Search** — run `assistant amazon search "<query>" --json` to find matching products. Present the top results with ASIN, title, price, and Prime status. If the user named a specific product, pick the best match. If ambiguous, ask.
23
23
 
24
- 3. **Product details** (if needed) — run `vellum amazon product <asin> --json` to get full details including price and variations. For products with variants (size, color, etc.), see the Variations section below.
24
+ 3. **Product details** (if needed) — run `assistant amazon product <asin> --json` to get full details including price and variations. For products with variants (size, color, etc.), see the Variations section below.
25
25
 
26
- 4. **Add to cart** — run `vellum amazon cart add --asin <asin> [--quantity <n>] --json`. The response includes the updated cart with all items.
26
+ 4. **Add to cart** — run `assistant amazon cart add --asin <asin> [--quantity <n>] --json`. The response includes the updated cart with all items.
27
27
 
28
- 5. **Review cart** — run `vellum amazon cart view --json` and show the user what's in their cart with prices. Ask if they want to add anything else or proceed.
28
+ 5. **Review cart** — run `assistant amazon cart view --json` and show the user what's in their cart with prices. Ask if they want to add anything else or proceed.
29
29
 
30
- 6. **Payment methods** — run `vellum amazon payment-methods --json` to see saved cards.
30
+ 6. **Payment methods** — run `assistant amazon payment-methods --json` to see saved cards.
31
31
 
32
- 7. **Checkout summary** — run `vellum amazon checkout --json` to get order totals (subtotal, shipping, tax, total).
32
+ 7. **Checkout summary** — run `assistant amazon checkout --json` to get order totals (subtotal, shipping, tax, total).
33
33
 
34
- 8. **Place order** — after the user explicitly confirms, run `vellum amazon order place [--payment-method-id <id>] --json`. The response contains `orderId` on success.
34
+ 8. **Place order** — after the user explicitly confirms, run `assistant amazon order place [--payment-method-id <id>] --json`. The response contains `orderId` on success.
35
35
 
36
36
  ## Typical Flow — Amazon Fresh Groceries
37
37
 
38
38
  Amazon Fresh delivers groceries. The flow is the same as regular Amazon, with these additions:
39
39
 
40
- 1. **Search Fresh** — use the `--fresh` flag: `vellum amazon search "<query>" --fresh --json`
40
+ 1. **Search Fresh** — use the `--fresh` flag: `assistant amazon search "<query>" --fresh --json`
41
41
 
42
- 2. **Add Fresh items** — use the `--fresh` flag: `vellum amazon cart add --asin <asin> --fresh --json`
42
+ 2. **Add Fresh items** — use the `--fresh` flag: `assistant amazon cart add --asin <asin> --fresh --json`
43
43
 
44
44
  3. **Select delivery slot** — Fresh orders require a delivery window:
45
- - `vellum amazon fresh delivery-slots --json` — list available slots
46
- - `vellum amazon fresh select-slot --slot-id <id> --json` — select a slot
45
+ - `assistant amazon fresh delivery-slots --json` — list available slots
46
+ - `assistant amazon fresh select-slot --slot-id <id> --json` — select a slot
47
47
  - Do this BEFORE checkout.
48
48
 
49
49
  4. **Checkout and order** — same as regular Amazon.
@@ -52,76 +52,76 @@ Amazon Fresh delivers groceries. The flow is the same as regular Amazon, with th
52
52
 
53
53
  Many Amazon products (clothing, electronics) have variations (size, color, style):
54
54
 
55
- 1. Run `vellum amazon product <asin> --json` to get the product and its `variations[]` array
55
+ 1. Run `assistant amazon product <asin> --json` to get the product and its `variations[]` array
56
56
  2. Each variation has: `dimensionName` (e.g. "size"), `value` (e.g. "Large"), `asin` (child ASIN), `isAvailable`, `priceValue`
57
- 3. Use the child ASIN when adding to cart: `vellum amazon cart add --asin <child-asin> --json`
57
+ 3. Use the child ASIN when adding to cart: `assistant amazon cart add --asin <child-asin> --json`
58
58
 
59
- Alternatively, run `vellum amazon variations <asin> --json` to list just the variations.
59
+ Alternatively, run `assistant amazon variations <asin> --json` to list just the variations.
60
60
 
61
61
  ## Important Behavior
62
62
 
63
63
  - **Always confirm before placing order.** Never call `order place` without explicit user approval. Show the cart and total first.
64
64
  - **Be proactive.** If the user says "order AA batteries", don't ask clarifying questions upfront — search, find the product, and suggest it. Only ask when you need a choice the user hasn't specified.
65
- - **Handle expired sessions gracefully.** If any command returns `"error": "session_expired"`, run `vellum amazon refresh --json` to re-capture the session.
65
+ - **Handle expired sessions gracefully.** If any command returns `"error": "session_expired"`, run `assistant amazon refresh --json` to re-capture the session.
66
66
  - **Handle extension errors.** If a command fails with a message about the browser extension not being connected, tell the user: "Please open Chrome, click the Vellum extension icon, and click Connect — then I'll retry." Do NOT try to interact with the relay directly.
67
67
  - **Show prices.** Always show prices when presenting products or the cart summary.
68
68
  - **Use `--json` flag** on all commands for reliable parsing.
69
69
  - **Do NOT use the browser skill.** All Amazon interaction goes through the CLI, not browser automation.
70
70
  - **Rate limiting.** Amazon may rate-limit rapid sequential requests. Wait 8–10 seconds between cart operations. If you get a 403 error, wait 15–20 seconds and retry.
71
- - **Always-allow tip.** At the start of an ordering flow, suggest the user enable "always allow" for `vellum amazon` commands: "Tip: You can type 'a' to always allow `vellum amazon` commands for this session so you won't be prompted each time."
72
- - **Fresh slot required.** Amazon Fresh orders require a delivery slot to be selected before checkout. If the user skips this step, remind them to run `vellum amazon fresh delivery-slots --json` and select a slot.
71
+ - **Always-allow tip.** At the start of an ordering flow, suggest the user enable "always allow" for `assistant amazon` commands: "Tip: You can type 'a' to always allow `assistant amazon` commands for this session so you won't be prompted each time."
72
+ - **Fresh slot required.** Amazon Fresh orders require a delivery slot to be selected before checkout. If the user skips this step, remind them to run `assistant amazon fresh delivery-slots --json` and select a slot.
73
73
 
74
74
  ## Command Reference
75
75
 
76
76
  ```
77
- vellum amazon status --json # Check if logged in
78
- vellum amazon refresh --json # Capture fresh session via Ride Shotgun
79
- vellum amazon login --recording <path> # Import session from a recording file
80
- vellum amazon logout # Clear session
77
+ assistant amazon status --json # Check if logged in
78
+ assistant amazon refresh --json # Capture fresh session via Ride Shotgun
79
+ assistant amazon login --recording <path> # Import session from a recording file
80
+ assistant amazon logout # Clear session
81
81
 
82
- vellum amazon search "<query>" [--fresh] [--limit <n>] --json
83
- vellum amazon product <asin> [--fresh] --json
84
- vellum amazon variations <asin> --json
82
+ assistant amazon search "<query>" [--fresh] [--limit <n>] --json
83
+ assistant amazon product <asin> [--fresh] --json
84
+ assistant amazon variations <asin> --json
85
85
 
86
- vellum amazon cart view --json
87
- vellum amazon cart add --asin <asin> [--quantity <n>] [--fresh] --json
88
- vellum amazon cart remove --cart-item-id <id> --json
86
+ assistant amazon cart view --json
87
+ assistant amazon cart add --asin <asin> [--quantity <n>] [--fresh] --json
88
+ assistant amazon cart remove --cart-item-id <id> --json
89
89
 
90
- vellum amazon fresh delivery-slots --json
91
- vellum amazon fresh select-slot --slot-id <id> --json
90
+ assistant amazon fresh delivery-slots --json
91
+ assistant amazon fresh select-slot --slot-id <id> --json
92
92
 
93
- vellum amazon payment-methods --json
94
- vellum amazon checkout --json
95
- vellum amazon order place [--payment-method-id <id>] --json
93
+ assistant amazon payment-methods --json
94
+ assistant amazon checkout --json
95
+ assistant amazon order place [--payment-method-id <id>] --json
96
96
  ```
97
97
 
98
98
  ## Example Interactions
99
99
 
100
100
  **User**: "Order a pack of AA batteries from Amazon"
101
101
 
102
- 1. `vellum amazon status --json` → logged in
103
- 2. `vellum amazon search "AA batteries" --json` → finds products
102
+ 1. `assistant amazon status --json` → logged in
103
+ 2. `assistant amazon search "AA batteries" --json` → finds products
104
104
  3. Show top results: "Duracell AA 20-pack ($12.99, Prime), Amazon Basics AA 48-pack ($14.49, Prime)..."
105
- 4. User picks Duracell → `vellum amazon cart add --asin B00000J1ER --json`
106
- 5. `vellum amazon cart view --json` → show cart summary
107
- 6. `vellum amazon checkout --json` → show total
105
+ 4. User picks Duracell → `assistant amazon cart add --asin B00000J1ER --json`
106
+ 5. `assistant amazon cart view --json` → show cart summary
107
+ 6. `assistant amazon checkout --json` → show total
108
108
  7. "Your cart has 1x Duracell AA Batteries 20-pack ($12.99), total $12.99 with free Prime shipping. Ready to order?"
109
- 8. User confirms → `vellum amazon order place --json`
109
+ 8. User confirms → `assistant amazon order place --json`
110
110
 
111
111
  **User**: "Order a large blue t-shirt from Amazon"
112
112
 
113
- 1. `vellum amazon search "blue t-shirt" --json` → finds products
114
- 2. User picks a shirt → `vellum amazon variations <parentAsin> --json` → shows Size + Color combinations
115
- 3. Find the child ASIN for Large + Blue → `vellum amazon cart add --asin <childAsin> --json`
113
+ 1. `assistant amazon search "blue t-shirt" --json` → finds products
114
+ 2. User picks a shirt → `assistant amazon variations <parentAsin> --json` → shows Size + Color combinations
115
+ 3. Find the child ASIN for Large + Blue → `assistant amazon cart add --asin <childAsin> --json`
116
116
 
117
117
  **User**: "Order milk and eggs from Amazon Fresh"
118
118
 
119
- 1. `vellum amazon status --json` → logged in
120
- 2. `vellum amazon search "whole milk" --fresh --json` → Fresh results
121
- 3. `vellum amazon cart add --asin <milkAsin> --fresh --json`
122
- 4. `vellum amazon search "eggs" --fresh --json` → Fresh results
123
- 5. `vellum amazon cart add --asin <eggsAsin> --fresh --json`
124
- 6. `vellum amazon fresh delivery-slots --json` → show available slots
125
- 7. User picks a slot → `vellum amazon fresh select-slot --slot-id <id> --json`
126
- 8. `vellum amazon checkout --json` → show totals
127
- 9. User confirms → `vellum amazon order place --json`
119
+ 1. `assistant amazon status --json` → logged in
120
+ 2. `assistant amazon search "whole milk" --fresh --json` → Fresh results
121
+ 3. `assistant amazon cart add --asin <milkAsin> --fresh --json`
122
+ 4. `assistant amazon search "eggs" --fresh --json` → Fresh results
123
+ 5. `assistant amazon cart add --asin <eggsAsin> --fresh --json`
124
+ 6. `assistant amazon fresh delivery-slots --json` → show available slots
125
+ 7. User picks a slot → `assistant amazon fresh select-slot --slot-id <id> --json`
126
+ 8. `assistant amazon checkout --json` → show totals
127
+ 9. User confirms → `assistant amazon order place --json`
@@ -25,6 +25,8 @@ You are an expert app builder and visual designer. When the user asks you to cre
25
25
 
26
26
  **Make creative decisions on behalf of the user.** They want to be delighted, not consulted. Pick the accent color. Choose between a dark moody aesthetic or a light airy one. Decide if cards should have glassmorphism or layered shadows. Add a background pattern or gradient. These are YOUR decisions as the designer.
27
27
 
28
+ **Prefer multi-file TSX projects** for any non-trivial app. They give you component reuse, TypeScript safety, and cleaner organization. Fall back to single-file HTML only for the simplest one-off pages.
29
+
28
30
  **Only ask questions when the request is genuinely ambiguous** — e.g., "build me an app" with no indication of what kind. Even then, prefer building something impressive based on context clues over asking a battery of questions.
29
31
 
30
32
  **When in doubt, build something impressive** and let the user refine with `app_update`. The first impression matters most — a beautiful app with the wrong shade of blue is easy to fix. A correct but ugly app is hard to come back from.
@@ -65,11 +67,143 @@ Example schema for a project tracker:
65
67
  }
66
68
  ```
67
69
 
68
- ### 3. Build the HTML Interface
70
+ ### 3. Build the App
71
+
72
+ Apps are rendered inside a sandboxed WebView on macOS. You can build them in two formats: **multi-file TSX** (preferred) or **single-file HTML** (legacy).
73
+
74
+ #### Multi-file TSX projects (preferred)
75
+
76
+ Use this format for any non-trivial app. You get component reuse, TypeScript type-checking, and clean file organization. The build system uses esbuild to bundle everything automatically.
77
+
78
+ **Project structure:**
79
+
80
+ ```
81
+ src/
82
+ index.html # Entry HTML — minimal shell, loads compiled bundle
83
+ main.tsx # App entry — renders root component into #app
84
+ components/ # Preact functional components
85
+ Header.tsx
86
+ RecordList.tsx
87
+ ...
88
+ styles.css # Global styles (imported from TSX)
89
+ ```
90
+
91
+ **Preact usage:**
92
+
93
+ ```tsx
94
+ import { render } from "preact";
95
+ import { useState, useEffect } from "preact/hooks";
96
+ import { App } from "./components/App";
97
+
98
+ render(<App />, document.getElementById("app")!);
99
+ ```
100
+
101
+ Functional components with hooks:
102
+
103
+ ```tsx
104
+ import { FunctionComponent } from "preact";
105
+
106
+ interface Props {
107
+ title: string;
108
+ count: number;
109
+ }
110
+
111
+ export const Header: FunctionComponent<Props> = ({ title, count }) => {
112
+ return (
113
+ <header>
114
+ <h1>{title}</h1>
115
+ <span className="badge">{count}</span>
116
+ </header>
117
+ );
118
+ };
119
+ ```
120
+
121
+ **TypeScript:** Use types for props, state, and data records. Define shared types in a `types.ts` file when multiple components need them.
122
+
123
+ **CSS:** Import CSS files directly in TSX (`import './styles.css'`). You can also use inline styles via the `style` attribute on JSX elements.
124
+
125
+ **Data bridge:** The same `window.vellum.data` API works in TSX components — call it from `useEffect` hooks or event handlers:
126
+
127
+ ```tsx
128
+ const [records, setRecords] = useState<Record[]>([]);
129
+
130
+ useEffect(() => {
131
+ window.vellum.data.query().then(setRecords).catch(console.error);
132
+ }, []);
133
+ ```
134
+
135
+ **File workflow:** Use `app_file_write` for each source file. The build happens automatically when you call `app_open`.
136
+
137
+ **Allowed third-party packages:** `date-fns`, `chart.js`, `lodash-es`, `zod`, `clsx`, `lucide`. Import them directly — esbuild resolves them at build time. No CDN imports. Note: `lucide` is the vanilla JS icon library (not `lucide-react`). Use its `createElement` or `createIcons` API, or manually inline SVG — do not import JSX icon components.
138
+
139
+ **Example — creating a multi-file project:**
140
+
141
+ ```
142
+ app_file_write(app_id, "src/index.html", `<!DOCTYPE html>
143
+ <html lang="en">
144
+ <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
145
+ <title>Project Tracker</title></head>
146
+ <body><div id="app"></div></body>
147
+ </html>`)
148
+
149
+ app_file_write(app_id, "src/main.tsx", `import { render } from 'preact';
150
+ import { App } from './components/App';
151
+ import './styles.css';
152
+
153
+ render(<App />, document.getElementById('app')!);`)
154
+
155
+ app_file_write(app_id, "src/components/App.tsx", `import { FunctionComponent } from 'preact';
156
+ import { useState, useEffect } from 'preact/hooks';
157
+ import { Header } from './Header';
158
+
159
+ export const App: FunctionComponent = () => {
160
+ const [records, setRecords] = useState([]);
161
+
162
+ useEffect(() => {
163
+ window.vellum.data.query().then(setRecords);
164
+ }, []);
165
+
166
+ return (
167
+ <div className="app">
168
+ <Header title="Project Tracker" count={records.length} />
169
+ {/* ... */}
170
+ </div>
171
+ );
172
+ };`)
173
+
174
+ app_file_write(app_id, "src/components/Header.tsx", `import { FunctionComponent } from 'preact';
175
+
176
+ interface HeaderProps {
177
+ title: string;
178
+ count: number;
179
+ }
180
+
181
+ export const Header: FunctionComponent<HeaderProps> = ({ title, count }) => (
182
+ <header className="header">
183
+ <h1>{title}</h1>
184
+ <span className="badge">{count} items</span>
185
+ </header>
186
+ );`)
187
+
188
+ app_file_write(app_id, "src/styles.css", `.app { padding: var(--v-spacing-lg); }
189
+ .header { display: flex; justify-content: space-between; align-items: center; }
190
+ .badge { background: var(--v-accent); color: white; padding: var(--v-spacing-xs) var(--v-spacing-sm); border-radius: var(--v-radius-pill); }`)
191
+ ```
192
+
193
+ **Technical constraints (multi-file):**
194
+
195
+ - No CDN imports — use esbuild-resolved packages from the allowlist above
196
+ - Preact for UI (not React) — `import { render } from 'preact'`
197
+ - TypeScript encouraged for all `.tsx`/`.ts` files
198
+ - No external fonts, images, or resources — use system fonts and CSS/SVG for visuals
199
+ - Design for 400-600px width with graceful resizing
200
+ - The WebView blocks all navigation — links and form `action` attributes won't work
201
+
202
+ #### Single HTML file (legacy)
69
203
 
70
- Write a complete, self-contained HTML document rendered inside a sandboxed WebView on macOS.
204
+ Use this format only for the simplest one-off pages. Write a complete, self-contained HTML document.
71
205
 
72
- #### Technical constraints
206
+ **Technical constraints (single-file):**
73
207
 
74
208
  - Single HTML string — no external files, CDNs, or imports
75
209
  - All CSS in `<style>` in `<head>`, all JavaScript in `<script>` before `</body>`
@@ -1,3 +1,5 @@
1
+ import { isAssistantFeatureFlagEnabled } from "../../../../config/assistant-feature-flags.js";
2
+ import { getConfig } from "../../../../config/loader.js";
1
3
  import * as appStore from "../../../../memory/app-store.js";
2
4
  import type { AppCreateInput } from "../../../../tools/apps/executors.js";
3
5
  import { executeAppCreate } from "../../../../tools/apps/executors.js";
@@ -10,9 +12,13 @@ export async function run(
10
12
  input: Record<string, unknown>,
11
13
  context: ToolContext,
12
14
  ): Promise<ToolExecutionResult> {
13
- return executeAppCreate(
14
- input as unknown as AppCreateInput,
15
- appStore,
16
- context.proxyToolResolver,
15
+ const multifileEnabled = isAssistantFeatureFlagEnabled(
16
+ "feature_flags.app-builder-multifile.enabled",
17
+ getConfig(),
17
18
  );
19
+ const createInput: AppCreateInput = {
20
+ ...(input as unknown as AppCreateInput),
21
+ featureFlags: { multifileEnabled },
22
+ };
23
+ return executeAppCreate(createInput, appStore, context.proxyToolResolver);
18
24
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "Configure Settings"
3
- description: "Read, update, or reset assistant configuration values using the vellum config CLI"
3
+ description: "Read, update, or reset assistant configuration values using the assistant config CLI"
4
4
  user-invocable: true
5
5
  metadata: { "vellum": { "emoji": "⚙️" } }
6
6
  ---
@@ -9,29 +9,29 @@ You are helping the user view or change assistant configuration through the `vel
9
9
 
10
10
  ## Domain Status Reads First
11
11
 
12
- When a user asks for setup/status of a specific capability, prefer domain commands before generic `vellum config get`:
12
+ When a user asks for setup/status of a specific capability, prefer domain commands before generic `assistant config get`:
13
13
 
14
14
  ```bash
15
- vellum integrations voice config --json
16
- vellum integrations ingress config --json
17
- vellum integrations twilio config --json
18
- vellum email status --json
15
+ assistant integrations voice config --json
16
+ assistant integrations ingress config --json
17
+ assistant integrations twilio config --json
18
+ assistant email status --json
19
19
  ```
20
20
 
21
- Use `vellum config get` for generic keys that do not have a domain command.
21
+ Use `assistant config get` for generic keys that do not have a domain command.
22
22
 
23
23
  ## Reading a value
24
24
 
25
25
  ```bash
26
- vellum config get <key>
26
+ assistant config get <key>
27
27
  ```
28
28
 
29
29
  Examples:
30
30
 
31
31
  ```bash
32
- vellum config get platform.baseUrl
33
- vellum config get memory.qdrant.url
34
- vellum config get provider
32
+ assistant config get platform.baseUrl
33
+ assistant config get memory.qdrant.url
34
+ assistant config get provider
35
35
  ```
36
36
 
37
37
  If the result is empty, the compiled default is in effect.
@@ -39,16 +39,16 @@ If the result is empty, the compiled default is in effect.
39
39
  ## Setting a value
40
40
 
41
41
  ```bash
42
- vellum config set <key> <value>
42
+ assistant config set <key> <value>
43
43
  ```
44
44
 
45
45
  Examples:
46
46
 
47
47
  ```bash
48
- vellum config set platform.baseUrl "https://platform.vellum.ai"
49
- vellum config set provider "openai"
50
- vellum config set memory.enabled false
51
- vellum config set maxTokens 8000
48
+ assistant config set platform.baseUrl "https://platform.vellum.ai"
49
+ assistant config set provider "openai"
50
+ assistant config set memory.enabled false
51
+ assistant config set maxTokens 8000
52
52
  ```
53
53
 
54
54
  ## Resetting a value to its default
@@ -56,13 +56,13 @@ vellum config set maxTokens 8000
56
56
  Set the key to an empty string (for strings) or omit it from the config file:
57
57
 
58
58
  ```bash
59
- vellum config set <key> ""
59
+ assistant config set <key> ""
60
60
  ```
61
61
 
62
62
  ## Listing all configuration
63
63
 
64
64
  ```bash
65
- vellum config list
65
+ assistant config list
66
66
  ```
67
67
 
68
68
  ## Common configuration keys