@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.
- package/ARCHITECTURE.md +3 -3
- package/README.md +13 -13
- package/bun.lock +80 -24
- package/docs/architecture/integrations.md +126 -128
- package/docs/runbook-trusted-contacts.md +1 -1
- package/docs/trusted-contact-access.md +12 -12
- package/package.json +3 -1
- package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +0 -14
- package/src/__tests__/app-bundler.test.ts +209 -0
- package/src/__tests__/app-compiler.test.ts +279 -0
- package/src/__tests__/app-executors.test.ts +293 -483
- package/src/__tests__/app-migration.test.ts +148 -0
- package/src/__tests__/app-routes-csp.test.ts +202 -0
- package/src/__tests__/avatar-e2e.test.ts +452 -0
- package/src/__tests__/avatar-generator.test.ts +193 -0
- package/src/__tests__/avatar-router.test.ts +186 -0
- package/src/__tests__/browser-download-timeout.test.ts +28 -0
- package/src/__tests__/bundled-skill-retrieval-guard.test.ts +9 -9
- package/src/__tests__/call-domain.test.ts +3 -7
- package/src/__tests__/credential-security-e2e.test.ts +19 -12
- package/src/__tests__/credentials-cli.test.ts +30 -4
- package/src/__tests__/guardian-verify-setup-skill-regression.test.ts +1 -1
- package/src/__tests__/handlers-slack-config.test.ts +0 -72
- package/src/__tests__/handlers-telegram-config.test.ts +19 -12
- package/src/__tests__/handlers-twitter-config.test.ts +105 -48
- package/src/__tests__/inbound-invite-redemption.test.ts +4 -4
- package/src/__tests__/integration-status.test.ts +15 -5
- package/src/__tests__/integrations-cli.test.ts +1 -1
- package/src/__tests__/invite-redemption-service.test.ts +62 -7
- package/src/__tests__/ipc-snapshot.test.ts +0 -8
- package/src/__tests__/managed-avatar-client.test.ts +280 -0
- package/src/__tests__/mcp-cli.test.ts +3 -3
- package/src/__tests__/oauth-cli.test.ts +203 -0
- package/src/__tests__/relay-server.test.ts +3 -3
- package/src/__tests__/secret-onetime-send.test.ts +19 -12
- package/src/__tests__/secure-keys.test.ts +78 -0
- package/src/__tests__/session-messaging-secret-redirect.test.ts +3 -0
- package/src/__tests__/slack-channel-config.test.ts +23 -16
- package/src/__tests__/slack-share-routes.test.ts +263 -0
- package/src/__tests__/sms-messaging-provider.test.ts +3 -1
- package/src/__tests__/trusted-contact-lifecycle-notifications.test.ts +7 -7
- package/src/__tests__/trusted-contact-multichannel.test.ts +3 -3
- package/src/__tests__/trusted-contact-verification.test.ts +10 -10
- package/src/__tests__/twilio-config.test.ts +15 -36
- package/src/__tests__/twilio-provider.test.ts +4 -0
- package/src/__tests__/twitter-auth-handler.test.ts +27 -14
- package/src/__tests__/twitter-cli-error-shaping.test.ts +1 -1
- package/src/__tests__/twitter-cli-routing.test.ts +38 -53
- package/src/__tests__/twitter-oauth-client.test.ts +18 -47
- package/src/__tests__/voice-invite-redemption.test.ts +27 -3
- package/src/amazon/cart.ts +1 -1
- package/src/amazon/client.ts +89 -7
- package/src/approvals/guardian-request-resolvers.ts +2 -2
- package/src/bundler/app-bundler.ts +77 -32
- package/src/bundler/app-compiler.ts +195 -0
- package/src/bundler/manifest.ts +1 -1
- package/src/bundler/package-resolver.ts +185 -0
- package/src/calls/call-domain.ts +4 -14
- package/src/calls/relay-server.ts +2 -2
- package/src/calls/twilio-config.ts +5 -24
- package/src/calls/twilio-rest.ts +19 -5
- package/src/cli/amazon.ts +74 -249
- package/src/cli/audit.ts +2 -2
- package/src/cli/autonomy.ts +9 -9
- package/src/cli/channels.ts +5 -5
- package/src/cli/completions.ts +27 -27
- package/src/cli/config.ts +14 -14
- package/src/cli/contacts.ts +27 -27
- package/src/cli/credentials.ts +28 -28
- package/src/cli/dev.ts +2 -2
- package/src/cli/doctor.ts +2 -2
- package/src/cli/email.ts +82 -82
- package/src/cli/influencer.ts +13 -13
- package/src/cli/integrations.ts +19 -144
- package/src/cli/keys.ts +10 -10
- package/src/cli/map.ts +4 -4
- package/src/cli/mcp.ts +17 -17
- package/src/cli/memory.ts +18 -18
- package/src/cli/notifications.ts +13 -13
- package/src/cli/oauth.ts +77 -0
- package/src/cli/program.ts +2 -0
- package/src/cli/sequence.ts +27 -27
- package/src/cli/sessions.ts +12 -12
- package/src/cli/trust.ts +8 -8
- package/src/cli/twitter.ts +124 -70
- package/src/config/bundled-skills/_shared/CLI_RETRIEVAL_PATTERN.md +1 -1
- package/src/config/bundled-skills/agentmail/SKILL.md +34 -34
- package/src/config/bundled-skills/amazon/SKILL.md +54 -54
- package/src/config/bundled-skills/app-builder/SKILL.md +137 -3
- package/src/config/bundled-skills/app-builder/tools/app-create.ts +10 -4
- package/src/config/bundled-skills/configure-settings/SKILL.md +18 -18
- package/src/config/bundled-skills/contacts/SKILL.md +12 -12
- package/src/config/bundled-skills/doordash/lib/client.ts +7 -9
- package/src/config/bundled-skills/email-setup/SKILL.md +4 -4
- package/src/config/bundled-skills/frontend-design/icon.svg +16 -0
- package/src/config/bundled-skills/google-oauth-setup/SKILL.md +143 -162
- package/src/config/bundled-skills/guardian-verify-setup/SKILL.md +4 -4
- package/src/config/bundled-skills/influencer/SKILL.md +13 -13
- package/src/config/bundled-skills/mcp-setup/SKILL.md +11 -11
- package/src/config/bundled-skills/phone-calls/SKILL.md +48 -54
- package/src/config/bundled-skills/public-ingress/SKILL.md +6 -6
- package/src/config/bundled-skills/slack-app-setup/SKILL.md +1 -1
- package/src/config/bundled-skills/sms-setup/SKILL.md +3 -3
- package/src/config/bundled-skills/telegram-setup/SKILL.md +2 -2
- package/src/config/bundled-skills/twilio-setup/SKILL.md +136 -225
- package/src/config/bundled-skills/twitter/SKILL.md +68 -44
- package/src/config/bundled-skills/voice-setup/SKILL.md +2 -2
- package/src/config/core-schema.ts +26 -0
- package/src/config/env.ts +4 -0
- package/src/config/feature-flag-registry.json +9 -1
- package/src/config/schema.ts +8 -0
- package/src/config/system-prompt.ts +6 -3
- package/src/config/templates/BOOTSTRAP.md +7 -5
- package/src/contacts/contacts-write.ts +5 -1
- package/src/daemon/handlers/apps.ts +31 -4
- package/src/daemon/handlers/config-ingress.ts +3 -3
- package/src/daemon/handlers/config-integrations.ts +120 -49
- package/src/daemon/handlers/config-slack-channel.ts +26 -7
- package/src/daemon/handlers/config-slack.ts +1 -54
- package/src/daemon/handlers/config-telegram.ts +28 -10
- package/src/daemon/handlers/config.ts +1 -4
- package/src/daemon/handlers/twitter-auth.ts +11 -4
- package/src/daemon/ipc-contract/apps.ts +0 -13
- package/src/daemon/ipc-contract-inventory.json +0 -2
- package/src/daemon/lifecycle.ts +8 -1
- package/src/daemon/session-messaging.ts +2 -2
- package/src/daemon/tool-side-effects.ts +30 -0
- package/src/email/providers/agentmail.ts +1 -1
- package/src/email/providers/index.ts +1 -1
- package/src/email/service.ts +1 -1
- package/src/gallery/default-gallery.ts +538 -0
- package/src/gallery/gallery-manifest.ts +5 -1
- package/src/influencer/client.ts +8 -6
- package/src/mcp/client.ts +1 -1
- package/src/media/avatar-router.ts +99 -0
- package/src/media/avatar-types.ts +60 -0
- package/src/media/managed-avatar-client.ts +189 -0
- package/src/memory/app-migration.ts +114 -0
- package/src/memory/app-store.ts +11 -0
- package/src/memory/qdrant-client.ts +1 -1
- package/src/messaging/providers/slack/client.ts +12 -2
- package/src/messaging/providers/sms/adapter.ts +6 -10
- package/src/migrations/data-layout.ts +8 -1
- package/src/oauth/token-persistence.ts +9 -6
- package/src/runtime/assistant-scope.ts +5 -0
- package/src/runtime/auth/route-policy.ts +4 -0
- package/src/runtime/channel-readiness-service.ts +9 -4
- package/src/runtime/gateway-internal-client.ts +11 -3
- package/src/runtime/http-server.ts +2 -0
- package/src/runtime/invite-redemption-service.ts +23 -13
- package/src/runtime/middleware/twilio-validation.ts +2 -2
- package/src/runtime/routes/app-routes.ts +131 -3
- package/src/runtime/routes/inbound-stages/verification-intercept.ts +3 -3
- package/src/runtime/routes/integration-routes.ts +2 -2
- package/src/runtime/routes/slack-share-routes.ts +235 -0
- package/src/runtime/routes/twilio-routes.ts +47 -34
- package/src/schedule/integration-status.ts +2 -3
- package/src/security/token-manager.ts +11 -3
- package/src/tools/apps/executors.ts +116 -8
- package/src/tools/browser/browser-manager.ts +30 -2
- package/src/tools/browser/chrome-cdp.ts +31 -3
- package/src/tools/credentials/vault.ts +9 -7
- package/src/tools/executor.ts +4 -0
- package/src/tools/system/avatar-generator.ts +55 -34
- package/src/twitter/client.ts +1 -1
- package/src/twitter/oauth-client.ts +31 -43
- package/src/twitter/router.ts +25 -23
- package/src/util/platform.ts +5 -0
- 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("
|
|
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 `
|
|
24
|
-
- Always do `
|
|
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 `
|
|
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 `
|
|
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:** `
|
|
49
|
-
2. **Quick inbox:** `
|
|
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:** `
|
|
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
|
-
|
|
62
|
-
|
|
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
|
-
|
|
68
|
+
assistant email status [--json] # Provider health + guardrails
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### Inbox Management
|
|
72
72
|
|
|
73
73
|
```
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
103
|
-
|
|
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
|
-
|
|
110
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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 `
|
|
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 `
|
|
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
|
-
`
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
30
|
+
6. **Payment methods** — run `assistant amazon payment-methods --json` to see saved cards.
|
|
31
31
|
|
|
32
|
-
7. **Checkout summary** — run `
|
|
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 `
|
|
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: `
|
|
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: `
|
|
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
|
-
- `
|
|
46
|
-
- `
|
|
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 `
|
|
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: `
|
|
57
|
+
3. Use the child ASIN when adding to cart: `assistant amazon cart add --asin <child-asin> --json`
|
|
58
58
|
|
|
59
|
-
Alternatively, run `
|
|
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 `
|
|
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 `
|
|
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 `
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
|
|
91
|
-
|
|
90
|
+
assistant amazon fresh delivery-slots --json
|
|
91
|
+
assistant amazon fresh select-slot --slot-id <id> --json
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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. `
|
|
103
|
-
2. `
|
|
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 → `
|
|
106
|
-
5. `
|
|
107
|
-
6. `
|
|
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 → `
|
|
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. `
|
|
114
|
-
2. User picks a shirt → `
|
|
115
|
-
3. Find the child ASIN for Large + Blue → `
|
|
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. `
|
|
120
|
-
2. `
|
|
121
|
-
3. `
|
|
122
|
-
4. `
|
|
123
|
-
5. `
|
|
124
|
-
6. `
|
|
125
|
-
7. User picks a slot → `
|
|
126
|
-
8. `
|
|
127
|
-
9. User confirms → `
|
|
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
|
|
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
|
|
204
|
+
Use this format only for the simplest one-off pages. Write a complete, self-contained HTML document.
|
|
71
205
|
|
|
72
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
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 `
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 `
|
|
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
|
-
|
|
26
|
+
assistant config get <key>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Examples:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
42
|
+
assistant config set <key> <value>
|
|
43
43
|
```
|
|
44
44
|
|
|
45
45
|
Examples:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
59
|
+
assistant config set <key> ""
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## Listing all configuration
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
|
|
65
|
+
assistant config list
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Common configuration keys
|