@vellumai/assistant 0.3.4 → 0.3.6
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/Dockerfile +2 -0
- package/README.md +88 -2
- package/eslint.config.mjs +31 -0
- package/package.json +1 -1
- package/scripts/ipc/check-swift-decoder-drift.ts +4 -1
- package/scripts/ipc/generate-swift.ts +31 -2
- package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +438 -1
- package/src/__tests__/approval-conversation-turn.test.ts +214 -0
- package/src/__tests__/approval-hardcoded-copy-guard.test.ts +41 -0
- package/src/__tests__/approval-message-composer.test.ts +253 -0
- package/src/__tests__/browser-manager.test.ts +1 -0
- package/src/__tests__/call-conversation-messages.test.ts +130 -0
- package/src/__tests__/call-domain.test.ts +12 -2
- package/src/__tests__/call-orchestrator.test.ts +799 -249
- package/src/__tests__/call-pointer-messages.test.ts +148 -0
- package/src/__tests__/call-recovery.test.ts +3 -0
- package/src/__tests__/call-routes-http.test.ts +32 -2
- package/src/__tests__/call-store.test.ts +3 -0
- package/src/__tests__/channel-approval-routes.test.ts +1277 -98
- package/src/__tests__/channel-approval.test.ts +37 -0
- package/src/__tests__/channel-approvals.test.ts +36 -50
- package/src/__tests__/channel-guardian.test.ts +630 -22
- package/src/__tests__/channel-readiness-service.test.ts +324 -0
- package/src/__tests__/checker.test.ts +14 -7
- package/src/__tests__/clarification-resolver.test.ts +44 -24
- package/src/__tests__/commit-message-enrichment-service.test.ts +9 -4
- package/src/__tests__/computer-use-session-working-dir.test.ts +8 -0
- package/src/__tests__/config-schema.test.ts +14 -8
- package/src/__tests__/context-window-manager.test.ts +30 -2
- package/src/__tests__/contradiction-checker.test.ts +20 -5
- package/src/__tests__/credential-security-invariants.test.ts +7 -2
- package/src/__tests__/daemon-lifecycle.test.ts +13 -12
- package/src/__tests__/db-migration-rollback.test.ts +752 -0
- package/src/__tests__/dictation-mode-detection.test.ts +63 -0
- package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +2 -0
- package/src/__tests__/entity-search.test.ts +615 -0
- package/src/__tests__/fuzzy-match-property.test.ts +5 -5
- package/src/__tests__/guardian-action-store.test.ts +123 -0
- package/src/__tests__/guardian-action-sweep.test.ts +277 -0
- package/src/__tests__/guardian-dispatch.test.ts +389 -0
- package/src/__tests__/guardian-question-copy.test.ts +47 -0
- package/src/__tests__/handlers-telegram-config.test.ts +4 -2
- package/src/__tests__/handlers-twilio-config.test.ts +533 -0
- package/src/__tests__/intent-routing.test.ts +2 -0
- package/src/__tests__/ipc-snapshot.test.ts +291 -1
- package/src/__tests__/memory-upsert-concurrency.test.ts +828 -0
- package/src/__tests__/messaging-send-tool.test.ts +65 -0
- package/src/__tests__/model-intents.test.ts +96 -0
- package/src/__tests__/no-direct-anthropic-sdk-imports.test.ts +42 -0
- package/src/__tests__/oauth2-gateway-transport.test.ts +130 -0
- package/src/__tests__/onboarding-starter-tasks.test.ts +2 -0
- package/src/__tests__/provider-commit-message-generator.test.ts +89 -13
- package/src/__tests__/provider-error-scenarios.test.ts +621 -0
- package/src/__tests__/provider-fail-open-selection.test.ts +119 -0
- package/src/__tests__/qdrant-manager.test.ts +27 -20
- package/src/__tests__/relay-server.test.ts +779 -40
- package/src/__tests__/run-orchestrator-assistant-events.test.ts +6 -0
- package/src/__tests__/run-orchestrator.test.ts +42 -4
- package/src/__tests__/runtime-runs-http.test.ts +17 -1
- package/src/__tests__/runtime-runs.test.ts +16 -0
- package/src/__tests__/schedule-store.test.ts +18 -4
- package/src/__tests__/scheduler-recurrence.test.ts +13 -4
- package/src/__tests__/session-abort-tool-results.test.ts +6 -0
- package/src/__tests__/session-agent-loop.test.ts +857 -0
- package/src/__tests__/session-conflict-gate.test.ts +6 -0
- package/src/__tests__/session-pre-run-repair.test.ts +6 -0
- package/src/__tests__/session-profile-injection.test.ts +6 -0
- package/src/__tests__/session-provider-retry-repair.test.ts +6 -0
- package/src/__tests__/session-queue.test.ts +6 -0
- package/src/__tests__/session-runtime-assembly.test.ts +321 -13
- package/src/__tests__/session-slash-known.test.ts +6 -0
- package/src/__tests__/session-slash-queue.test.ts +6 -0
- package/src/__tests__/session-slash-unknown.test.ts +6 -0
- package/src/__tests__/session-surfaces-task-progress.test.ts +2 -0
- package/src/__tests__/session-tool-setup-app-refresh.test.ts +1 -0
- package/src/__tests__/session-tool-setup-memory-scope.test.ts +1 -0
- package/src/__tests__/session-tool-setup-side-effect-flag.test.ts +1 -0
- package/src/__tests__/session-workspace-injection.test.ts +6 -0
- package/src/__tests__/session-workspace-tool-tracking.test.ts +6 -0
- package/src/__tests__/skills.test.ts +2 -0
- package/src/__tests__/sms-messaging-provider.test.ts +126 -0
- package/src/__tests__/starter-task-flow.test.ts +2 -0
- package/src/__tests__/swarm-dag-pathological.test.ts +535 -0
- package/src/__tests__/system-prompt.test.ts +2 -0
- package/src/__tests__/task-management-tools.test.ts +2 -2
- package/src/__tests__/task-runner.test.ts +14 -4
- package/src/__tests__/terminal-tools.test.ts +25 -19
- package/src/__tests__/tool-execution-abort-cleanup.test.ts +545 -0
- package/src/__tests__/tool-executor-shell-integration.test.ts +11 -11
- package/src/__tests__/tool-executor.test.ts +23 -24
- package/src/__tests__/trust-store.test.ts +3 -3
- package/src/__tests__/twilio-rest.test.ts +29 -0
- package/src/__tests__/twilio-routes-elevenlabs.test.ts +3 -0
- package/src/__tests__/twilio-routes-twiml.test.ts +11 -0
- package/src/__tests__/twilio-routes.test.ts +167 -11
- package/src/__tests__/twitter-cli-error-shaping.test.ts +2 -2
- package/src/__tests__/user-reference.test.ts +2 -0
- package/src/__tests__/voice-quality.test.ts +222 -0
- package/src/__tests__/web-search.test.ts +46 -30
- package/src/__tests__/work-item-output.test.ts +110 -0
- package/src/agent/loop.ts +1 -1
- package/src/agent-heartbeat/agent-heartbeat-service.ts +2 -10
- package/src/amazon/client.ts +1418 -0
- package/src/amazon/request-extractor.ts +135 -0
- package/src/amazon/session.ts +109 -0
- package/src/autonomy/autonomy-store.ts +5 -5
- package/src/browser-extension-relay/client.ts +124 -0
- package/src/browser-extension-relay/protocol.ts +63 -0
- package/src/browser-extension-relay/server.ts +177 -0
- package/src/bundler/app-bundler.ts +3 -3
- package/src/bundler/bundle-signer.ts +1 -1
- package/src/bundler/signature-verifier.ts +1 -1
- package/src/calls/call-conversation-messages.ts +33 -0
- package/src/calls/call-domain.ts +114 -10
- package/src/calls/call-orchestrator.ts +268 -59
- package/src/calls/call-pointer-messages.ts +53 -0
- package/src/calls/call-recovery.ts +3 -8
- package/src/calls/call-store.ts +69 -87
- package/src/calls/elevenlabs-config.ts +3 -2
- package/src/calls/guardian-action-sweep.ts +105 -0
- package/src/calls/guardian-dispatch.ts +203 -0
- package/src/calls/guardian-question-copy.ts +133 -0
- package/src/calls/relay-server.ts +466 -8
- package/src/calls/speaker-identification.ts +1 -1
- package/src/calls/twilio-config.ts +22 -14
- package/src/calls/twilio-provider.ts +6 -4
- package/src/calls/twilio-rest.ts +308 -7
- package/src/calls/twilio-routes.ts +65 -12
- package/src/calls/types.ts +3 -1
- package/src/channels/types.ts +25 -0
- package/src/cli/amazon.ts +815 -0
- package/src/cli/config-commands.ts +2 -2
- package/src/cli/core-commands.ts +4 -3
- package/src/cli/influencer.ts +244 -0
- package/src/cli/map.ts +89 -6
- package/src/cli.ts +1 -1
- package/src/config/agent-schema.ts +171 -0
- package/src/config/bundled-skills/amazon/SKILL.md +127 -0
- package/src/config/bundled-skills/amazon/icon.svg +13 -0
- package/src/config/bundled-skills/api-mapping/SKILL.md +78 -0
- package/src/config/bundled-skills/browser/SKILL.md +1 -0
- package/src/config/bundled-skills/browser/TOOLS.json +17 -0
- package/src/config/bundled-skills/browser/tools/browser-wait-for-download.ts +25 -0
- package/src/config/bundled-skills/doordash/SKILL.md +51 -51
- package/src/config/bundled-skills/email-setup/SKILL.md +14 -5
- package/src/config/bundled-skills/google-oauth-setup/SKILL.md +183 -0
- package/src/config/bundled-skills/influencer/SKILL.md +144 -0
- package/src/config/bundled-skills/knowledge-graph/SKILL.md +15 -0
- package/src/config/bundled-skills/knowledge-graph/TOOLS.json +56 -0
- package/src/config/bundled-skills/knowledge-graph/tools/graph-query.ts +185 -0
- package/src/config/bundled-skills/macos-automation/icon.svg +12 -0
- package/src/config/bundled-skills/media-processing/SKILL.md +176 -0
- package/src/config/bundled-skills/media-processing/TOOLS.json +230 -0
- package/src/config/bundled-skills/media-processing/__tests__/concurrency-pool.test.ts +77 -0
- package/src/config/bundled-skills/media-processing/__tests__/cost-tracker.test.ts +69 -0
- package/src/config/bundled-skills/media-processing/__tests__/preprocess.test.ts +303 -0
- package/src/config/bundled-skills/media-processing/services/concurrency-pool.ts +55 -0
- package/src/config/bundled-skills/media-processing/services/cost-tracker.ts +86 -0
- package/src/config/bundled-skills/media-processing/services/gemini-map.ts +339 -0
- package/src/config/bundled-skills/media-processing/services/preprocess.ts +551 -0
- package/src/config/bundled-skills/media-processing/services/processing-pipeline.ts +259 -0
- package/src/config/bundled-skills/media-processing/services/reduce.ts +197 -0
- package/src/config/bundled-skills/media-processing/tools/analyze-keyframes.ts +136 -0
- package/src/config/bundled-skills/media-processing/tools/extract-keyframes.ts +59 -0
- package/src/config/bundled-skills/media-processing/tools/generate-clip.ts +195 -0
- package/src/config/bundled-skills/media-processing/tools/ingest-media.ts +197 -0
- package/src/config/bundled-skills/media-processing/tools/media-diagnostics.ts +143 -0
- package/src/config/bundled-skills/media-processing/tools/media-status.ts +75 -0
- package/src/config/bundled-skills/media-processing/tools/query-media-events.ts +65 -0
- package/src/config/bundled-skills/messaging/SKILL.md +33 -8
- package/src/config/bundled-skills/messaging/tools/messaging-analyze-style.ts +4 -7
- package/src/config/bundled-skills/messaging/tools/messaging-reply.ts +2 -1
- package/src/config/bundled-skills/messaging/tools/messaging-send.ts +5 -1
- package/src/config/bundled-skills/phone-calls/SKILL.md +88 -23
- package/src/config/bundled-skills/twitter/SKILL.md +19 -3
- package/src/config/bundled-skills/twitter/icon.svg +14 -0
- package/src/config/bundled-tool-registry.ts +310 -0
- package/src/config/calls-schema.ts +181 -0
- package/src/config/core-schema.ts +309 -0
- package/src/config/defaults.ts +28 -3
- package/src/config/env-registry.ts +162 -0
- package/src/config/env.ts +175 -0
- package/src/config/loader.ts +6 -6
- package/src/config/memory-schema.ts +528 -0
- package/src/config/sandbox-schema.ts +55 -0
- package/src/config/schema.ts +158 -1133
- package/src/config/skill-state.ts +1 -1
- package/src/config/skills-schema.ts +32 -0
- package/src/config/skills.ts +35 -24
- package/src/config/system-prompt.ts +131 -56
- package/src/config/templates/IDENTITY.md +2 -2
- package/src/config/templates/SOUL.md +1 -1
- package/src/config/types.ts +1 -0
- package/src/config/user-reference.ts +4 -9
- package/src/config/vellum-skills/catalog.json +6 -7
- package/src/config/vellum-skills/chatgpt-import/tools/chatgpt-import.ts +5 -1
- package/src/config/vellum-skills/slack-oauth-setup/SKILL.md +4 -3
- package/src/config/vellum-skills/sms-setup/SKILL.md +216 -0
- package/src/config/vellum-skills/twilio-setup/SKILL.md +40 -8
- package/src/context/window-manager.ts +27 -7
- package/src/daemon/approval-generators.ts +186 -0
- package/src/daemon/approved-devices-store.ts +140 -0
- package/src/daemon/assistant-attachments.ts +1 -1
- package/src/daemon/classifier.ts +35 -32
- package/src/daemon/config-watcher.ts +1 -1
- package/src/daemon/daemon-control.ts +217 -0
- package/src/daemon/handlers/apps.ts +2 -3
- package/src/daemon/handlers/config-channels.ts +158 -0
- package/src/daemon/handlers/config-inbox.ts +540 -0
- package/src/daemon/handlers/config-ingress.ts +231 -0
- package/src/daemon/handlers/config-integrations.ts +258 -0
- package/src/daemon/handlers/config-model.ts +143 -0
- package/src/daemon/handlers/config-parental.ts +163 -0
- package/src/daemon/handlers/config-scheduling.ts +172 -0
- package/src/daemon/handlers/config-slack.ts +92 -0
- package/src/daemon/handlers/config-telegram.ts +301 -0
- package/src/daemon/handlers/config-tools.ts +177 -0
- package/src/daemon/handlers/config-trust.ts +104 -0
- package/src/daemon/handlers/config-twilio.ts +1080 -0
- package/src/daemon/handlers/config.ts +53 -1689
- package/src/daemon/handlers/diagnostics.ts +1 -1
- package/src/daemon/handlers/dictation.ts +180 -0
- package/src/daemon/handlers/documents.ts +18 -32
- package/src/daemon/handlers/identity.ts +14 -23
- package/src/daemon/handlers/index.ts +11 -0
- package/src/daemon/handlers/misc.ts +3 -5
- package/src/daemon/handlers/pairing.ts +98 -0
- package/src/daemon/handlers/sessions.ts +56 -5
- package/src/daemon/handlers/shared.ts +6 -1
- package/src/daemon/handlers/skills.ts +1 -1
- package/src/daemon/handlers/twitter-auth.ts +2 -0
- package/src/daemon/handlers/work-items.ts +17 -9
- package/src/daemon/handlers/workspace-files.ts +4 -3
- package/src/daemon/install-cli-launchers.ts +113 -0
- package/src/daemon/ipc-contract/apps.ts +356 -0
- package/src/daemon/ipc-contract/browser.ts +74 -0
- package/src/daemon/ipc-contract/computer-use.ts +151 -0
- package/src/daemon/ipc-contract/diagnostics.ts +56 -0
- package/src/daemon/ipc-contract/documents.ts +74 -0
- package/src/daemon/ipc-contract/inbox.ts +209 -0
- package/src/daemon/ipc-contract/integrations.ts +284 -0
- package/src/daemon/ipc-contract/memory.ts +48 -0
- package/src/daemon/ipc-contract/messages.ts +211 -0
- package/src/daemon/ipc-contract/pairing.ts +45 -0
- package/src/daemon/ipc-contract/parental-control.ts +95 -0
- package/src/daemon/ipc-contract/schedules.ts +97 -0
- package/src/daemon/ipc-contract/sessions.ts +315 -0
- package/src/daemon/ipc-contract/shared.ts +42 -0
- package/src/daemon/ipc-contract/skills.ts +120 -0
- package/src/daemon/ipc-contract/subagents.ts +58 -0
- package/src/daemon/ipc-contract/surfaces.ts +250 -0
- package/src/daemon/ipc-contract/trust.ts +60 -0
- package/src/daemon/ipc-contract/work-items.ts +225 -0
- package/src/daemon/ipc-contract/workspace.ts +113 -0
- package/src/daemon/ipc-contract-inventory.json +70 -0
- package/src/daemon/ipc-contract-inventory.ts +55 -29
- package/src/daemon/ipc-contract.ts +229 -2426
- package/src/daemon/ipc-protocol.ts +1 -1
- package/src/daemon/ipc-validate.ts +7 -0
- package/src/daemon/lifecycle.ts +97 -377
- package/src/daemon/pairing-store.ts +177 -0
- package/src/daemon/providers-setup.ts +43 -0
- package/src/daemon/ride-shotgun-handler.ts +68 -3
- package/src/daemon/server.ts +66 -46
- package/src/daemon/session-agent-loop-handlers.ts +421 -0
- package/src/daemon/session-agent-loop.ts +117 -275
- package/src/daemon/session-dynamic-profile.ts +1 -1
- package/src/daemon/session-history.ts +1 -1
- package/src/daemon/session-media-retry.ts +1 -1
- package/src/daemon/session-messaging.ts +37 -2
- package/src/daemon/session-notifiers.ts +5 -25
- package/src/daemon/session-process.ts +99 -59
- package/src/daemon/session-queue-manager.ts +96 -4
- package/src/daemon/session-runtime-assembly.ts +199 -10
- package/src/daemon/session-surfaces.ts +19 -4
- package/src/daemon/session-tool-setup.ts +30 -30
- package/src/daemon/session-workspace.ts +1 -1
- package/src/daemon/session.ts +35 -2
- package/src/daemon/shutdown-handlers.ts +122 -0
- package/src/daemon/trace-emitter.ts +1 -1
- package/src/daemon/watch-handler.ts +36 -33
- package/src/doordash/cart-queries.ts +787 -0
- package/src/doordash/client.ts +144 -127
- package/src/doordash/order-queries.ts +85 -0
- package/src/doordash/queries.ts +10 -1308
- package/src/doordash/search-queries.ts +203 -0
- package/src/doordash/session.ts +3 -2
- package/src/doordash/store-queries.ts +246 -0
- package/src/doordash/types.ts +367 -0
- package/src/email/providers/agentmail.ts +2 -1
- package/src/email/providers/index.ts +3 -2
- package/src/email/service.ts +3 -2
- package/src/errors.ts +43 -0
- package/src/home-base/prebuilt/seed.ts +1 -1
- package/src/hooks/cli.ts +6 -5
- package/src/hooks/config.ts +6 -8
- package/src/hooks/discovery.ts +6 -5
- package/src/hooks/manager.ts +4 -3
- package/src/hooks/runner.ts +2 -2
- package/src/hooks/templates.ts +5 -5
- package/src/inbound/public-ingress-urls.ts +6 -4
- package/src/index.ts +4 -2
- package/src/influencer/client.ts +1104 -0
- package/src/instrument.ts +4 -3
- package/src/logfire.ts +4 -3
- package/src/memory/admin.ts +25 -35
- package/src/memory/attachments-store.ts +4 -7
- package/src/memory/channel-delivery-store.ts +30 -1
- package/src/memory/channel-guardian-store.ts +202 -2
- package/src/memory/clarification-resolver.ts +37 -33
- package/src/memory/conflict-store.ts +67 -61
- package/src/memory/contradiction-checker.ts +141 -117
- package/src/memory/conversation-store.ts +335 -51
- package/src/memory/db-connection.ts +27 -4
- package/src/memory/db-init.ts +265 -4
- package/src/memory/db.ts +14 -1
- package/src/memory/embedding-backend.ts +27 -5
- package/src/memory/embedding-ollama.ts +2 -1
- package/src/memory/entity-extractor.ts +38 -35
- package/src/memory/guardian-action-store.ts +430 -0
- package/src/memory/inbox-escalation-projection.ts +59 -0
- package/src/memory/inbox-thread-store.ts +218 -0
- package/src/memory/ingress-invite-store.ts +338 -0
- package/src/memory/ingress-member-store.ts +350 -0
- package/src/memory/items-extractor.ts +91 -97
- package/src/memory/job-handlers/index-maintenance.ts +3 -3
- package/src/memory/job-handlers/media-processing.ts +69 -0
- package/src/memory/job-handlers/summarization.ts +32 -26
- package/src/memory/job-utils.ts +3 -10
- package/src/memory/jobs-store.ts +8 -10
- package/src/memory/jobs-worker.ts +55 -36
- package/src/memory/media-store.ts +759 -0
- package/src/memory/migrations/001-job-deferrals.ts +45 -0
- package/src/memory/migrations/002-tool-invocations-fk.ts +43 -0
- package/src/memory/migrations/003-memory-fts-backfill.ts +24 -0
- package/src/memory/migrations/004-entity-relation-dedup.ts +87 -0
- package/src/memory/migrations/005-fingerprint-scope-unique.ts +80 -0
- package/src/memory/migrations/006-scope-salted-fingerprints.ts +62 -0
- package/src/memory/migrations/007-assistant-id-to-self.ts +254 -0
- package/src/memory/migrations/008-remove-assistant-id-columns.ts +208 -0
- package/src/memory/migrations/009-llm-usage-events-drop-assistant-id.ts +83 -0
- package/src/memory/migrations/010-ext-conv-bindings-channel-chat-unique.ts +56 -0
- package/src/memory/migrations/011-call-sessions-provider-sid-dedup.ts +63 -0
- package/src/memory/migrations/012-call-sessions-add-initiated-from.ts +19 -0
- package/src/memory/migrations/013-guardian-action-tables.ts +68 -0
- package/src/memory/migrations/014-backfill-inbox-thread-state.ts +76 -0
- package/src/memory/migrations/015-drop-active-search-index.ts +27 -0
- package/src/memory/migrations/016-memory-segments-indexes.ts +11 -0
- package/src/memory/migrations/017-memory-items-indexes.ts +10 -0
- package/src/memory/migrations/018-remaining-table-indexes.ts +13 -0
- package/src/memory/migrations/index.ts +24 -0
- package/src/memory/migrations/registry.ts +79 -0
- package/src/memory/migrations/validate-migration-state.ts +69 -0
- package/src/memory/qdrant-manager.ts +49 -8
- package/src/memory/query-builder.ts +1 -1
- package/src/memory/raw-query.ts +119 -0
- package/src/memory/recall-cache.ts +4 -1
- package/src/memory/retriever.ts +165 -47
- package/src/memory/schema-migration.ts +25 -984
- package/src/memory/schema.ts +228 -7
- package/src/memory/search/entity.ts +205 -31
- package/src/memory/search/lexical.ts +81 -52
- package/src/memory/search/ranking.ts +27 -23
- package/src/memory/search/semantic.ts +157 -19
- package/src/memory/search/types.ts +24 -0
- package/src/memory/shared-app-links-store.ts +4 -5
- package/src/memory/validation.ts +19 -0
- package/src/messaging/draft-store.ts +5 -6
- package/src/messaging/provider-types.ts +2 -0
- package/src/messaging/providers/sms/adapter.ts +201 -0
- package/src/messaging/providers/sms/client.ts +93 -0
- package/src/messaging/providers/sms/types.ts +7 -0
- package/src/messaging/providers/telegram-bot/adapter.ts +2 -5
- package/src/messaging/providers/whatsapp/adapter.ts +136 -0
- package/src/messaging/providers/whatsapp/client.ts +67 -0
- package/src/messaging/style-analyzer.ts +5 -4
- package/src/messaging/thread-summarizer.ts +61 -69
- package/src/messaging/triage-engine.ts +62 -71
- package/src/migrations/config-merge.ts +53 -0
- package/src/migrations/data-layout.ts +68 -0
- package/src/migrations/data-merge.ts +33 -0
- package/src/migrations/hooks-merge.ts +90 -0
- package/src/migrations/index.ts +6 -0
- package/src/migrations/log.ts +23 -0
- package/src/migrations/skills-merge.ts +33 -0
- package/src/migrations/workspace-layout.ts +79 -0
- package/src/permissions/checker.ts +133 -11
- package/src/permissions/prompter.ts +14 -0
- package/src/permissions/shell-identity.ts +31 -1
- package/src/permissions/trust-store.ts +21 -1
- package/src/providers/anthropic/client.ts +4 -4
- package/src/providers/failover.ts +2 -2
- package/src/providers/model-intents.ts +70 -0
- package/src/providers/ollama/client.ts +2 -1
- package/src/providers/provider-send-message.ts +176 -0
- package/src/providers/registry.ts +71 -30
- package/src/providers/retry.ts +35 -1
- package/src/providers/types.ts +12 -1
- package/src/runtime/approval-conversation-turn.ts +97 -0
- package/src/runtime/approval-message-composer.ts +253 -0
- package/src/runtime/channel-approval-parser.ts +36 -2
- package/src/runtime/channel-approvals.ts +11 -24
- package/src/runtime/channel-guardian-service.ts +88 -21
- package/src/runtime/channel-readiness-service.ts +418 -0
- package/src/runtime/channel-readiness-types.ts +35 -0
- package/src/runtime/channel-retry-sweep.ts +184 -0
- package/src/runtime/guardian-context-resolver.ts +108 -0
- package/src/runtime/http-server.ts +275 -717
- package/src/runtime/http-types.ts +59 -3
- package/src/runtime/middleware/auth.ts +116 -0
- package/src/runtime/middleware/error-handler.ts +33 -0
- package/src/runtime/middleware/twilio-validation.ts +127 -0
- package/src/runtime/routes/app-routes.ts +1 -1
- package/src/runtime/routes/call-routes.ts +51 -7
- package/src/runtime/routes/channel-delivery-routes.ts +170 -0
- package/src/runtime/routes/channel-guardian-routes.ts +1191 -0
- package/src/runtime/routes/channel-inbound-routes.ts +1152 -0
- package/src/runtime/routes/channel-route-shared.ts +144 -0
- package/src/runtime/routes/channel-routes.ts +32 -1588
- package/src/runtime/routes/conversation-routes.ts +50 -7
- package/src/runtime/routes/events-routes.ts +2 -2
- package/src/runtime/routes/identity-routes.ts +126 -0
- package/src/runtime/routes/pairing-routes.ts +143 -0
- package/src/runtime/routes/run-routes.ts +15 -1
- package/src/runtime/run-orchestrator.ts +86 -35
- package/src/schedule/schedule-store.ts +36 -32
- package/src/schedule/scheduler.ts +3 -3
- package/src/security/encrypted-store.ts +5 -7
- package/src/security/oauth2.ts +45 -15
- package/src/security/parental-control-store.ts +183 -0
- package/src/security/secret-allowlist.ts +4 -3
- package/src/security/secret-scanner.ts +5 -5
- package/src/security/secure-keys.ts +1 -1
- package/src/security/token-manager.ts +3 -2
- package/src/services/vercel-deploy.ts +6 -2
- package/src/skills/tool-manifest.ts +3 -3
- package/src/skills/vellum-catalog-remote.ts +75 -16
- package/src/slack/slack-webhook.ts +2 -1
- package/src/swarm/orchestrator.ts +92 -1
- package/src/swarm/router-planner.ts +6 -9
- package/src/swarm/worker-prompts.ts +9 -12
- package/src/tasks/task-compiler.ts +19 -28
- package/src/tasks/task-runner.ts +1 -1
- package/src/tools/assets/materialize.ts +2 -2
- package/src/tools/assets/search.ts +15 -14
- package/src/tools/browser/__tests__/auth-detector.test.ts +1 -0
- package/src/tools/browser/auto-navigate.ts +1 -0
- package/src/tools/browser/browser-execution.ts +10 -1
- package/src/tools/browser/browser-manager.ts +119 -4
- package/src/tools/browser/network-recorder.ts +5 -0
- package/src/tools/calls/call-start.ts +1 -0
- package/src/tools/credentials/broker.ts +11 -2
- package/src/tools/credentials/metadata-store.ts +18 -14
- package/src/tools/credentials/post-connect-hooks.ts +61 -0
- package/src/tools/credentials/vault.ts +49 -23
- package/src/tools/execution-target.ts +11 -1
- package/src/tools/executor.ts +68 -9
- package/src/tools/host-terminal/cli-discover.ts +1 -1
- package/src/tools/network/script-proxy/http-forwarder.ts +1 -1
- package/src/tools/network/script-proxy/mitm-handler.ts +1 -1
- package/src/tools/network/script-proxy/server.ts +1 -1
- package/src/tools/network/script-proxy/session-manager.ts +6 -5
- package/src/tools/network/web-fetch.ts +18 -2
- package/src/tools/network/web-search.ts +8 -4
- package/src/tools/reminder/reminder-store.ts +14 -15
- package/src/tools/schedule/create.ts +1 -0
- package/src/tools/schedule/list.ts +2 -1
- package/src/tools/shared/filesystem/file-ops-service.ts +5 -7
- package/src/tools/skills/skill-script-runner.ts +24 -9
- package/src/tools/skills/skill-tool-factory.ts +1 -0
- package/src/tools/tasks/work-item-enqueue.ts +2 -2
- package/src/tools/terminal/evaluate-typescript.ts +21 -12
- package/src/tools/terminal/parser.ts +50 -0
- package/src/tools/types.ts +2 -0
- package/src/tools/watcher/delete.ts +6 -0
- package/src/tools/weather/service.ts +1 -1
- package/src/twitter/client.ts +190 -24
- package/src/twitter/router.ts +1 -1
- package/src/twitter/session.ts +4 -3
- package/src/util/clipboard.ts +1 -1
- package/src/util/errors.ts +65 -8
- package/src/util/fs.ts +40 -0
- package/src/util/json.ts +10 -0
- package/src/util/log-redact.ts +189 -0
- package/src/util/logger.ts +19 -17
- package/src/util/object.ts +3 -0
- package/src/util/platform.ts +105 -363
- package/src/util/pricing.ts +1 -1
- package/src/util/promise-guard.ts +1 -1
- package/src/util/retry.ts +19 -0
- package/src/util/row-mapper.ts +79 -0
- package/src/util/silently.ts +21 -0
- package/src/watcher/engine.ts +5 -1
- package/src/watcher/provider-types.ts +20 -0
- package/src/watcher/providers/github.ts +156 -0
- package/src/watcher/providers/gmail.ts +1 -0
- package/src/watcher/providers/google-calendar.ts +1 -0
- package/src/watcher/providers/linear.ts +460 -0
- package/src/watcher/providers/slack.ts +1 -0
- package/src/work-items/work-item-runner.ts +1 -1
- package/src/workspace/git-service.ts +1 -1
- package/src/workspace/provider-commit-message-generator.ts +51 -22
- package/src/__tests__/call-bridge.test.ts +0 -517
- package/src/__tests__/session-process-bridge.test.ts +0 -244
- package/src/calls/call-bridge.ts +0 -168
- package/src/config/vellum-skills/google-oauth-setup/SKILL.md +0 -199
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "Amazon"
|
|
3
|
+
description: "Shop on Amazon and Amazon Fresh using the built-in CLI integration"
|
|
4
|
+
user-invocable: true
|
|
5
|
+
metadata: {"vellum": {"emoji": "\uD83D\uDCE6"}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You can shop on Amazon (and Amazon Fresh for groceries) for the user using the `vellum amazon` CLI.
|
|
9
|
+
|
|
10
|
+
## CLI Setup
|
|
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.
|
|
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.
|
|
15
|
+
|
|
16
|
+
## Typical Flow — Regular Amazon Shopping
|
|
17
|
+
|
|
18
|
+
When the user asks you to order something from Amazon:
|
|
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.**
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
29
|
+
|
|
30
|
+
6. **Payment methods** — run `vellum amazon payment-methods --json` to see saved cards.
|
|
31
|
+
|
|
32
|
+
7. **Checkout summary** — run `vellum amazon checkout --json` to get order totals (subtotal, shipping, tax, total).
|
|
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.
|
|
35
|
+
|
|
36
|
+
## Typical Flow — Amazon Fresh Groceries
|
|
37
|
+
|
|
38
|
+
Amazon Fresh delivers groceries. The flow is the same as regular Amazon, with these additions:
|
|
39
|
+
|
|
40
|
+
1. **Search Fresh** — use the `--fresh` flag: `vellum amazon search "<query>" --fresh --json`
|
|
41
|
+
|
|
42
|
+
2. **Add Fresh items** — use the `--fresh` flag: `vellum amazon cart add --asin <asin> --fresh --json`
|
|
43
|
+
|
|
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
|
|
47
|
+
- Do this BEFORE checkout.
|
|
48
|
+
|
|
49
|
+
4. **Checkout and order** — same as regular Amazon.
|
|
50
|
+
|
|
51
|
+
## Handling Variations
|
|
52
|
+
|
|
53
|
+
Many Amazon products (clothing, electronics) have variations (size, color, style):
|
|
54
|
+
|
|
55
|
+
1. Run `vellum amazon product <asin> --json` to get the product and its `variations[]` array
|
|
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`
|
|
58
|
+
|
|
59
|
+
Alternatively, run `vellum amazon variations <asin> --json` to list just the variations.
|
|
60
|
+
|
|
61
|
+
## Important Behavior
|
|
62
|
+
|
|
63
|
+
- **Always confirm before placing order.** Never call `order place` without explicit user approval. Show the cart and total first.
|
|
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.
|
|
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
|
+
- **Show prices.** Always show prices when presenting products or the cart summary.
|
|
68
|
+
- **Use `--json` flag** on all commands for reliable parsing.
|
|
69
|
+
- **Do NOT use the browser skill.** All Amazon interaction goes through the CLI, not browser automation.
|
|
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.
|
|
73
|
+
|
|
74
|
+
## Command Reference
|
|
75
|
+
|
|
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
|
|
81
|
+
|
|
82
|
+
vellum amazon search "<query>" [--fresh] [--limit <n>] --json
|
|
83
|
+
vellum amazon product <asin> [--fresh] --json
|
|
84
|
+
vellum amazon variations <asin> --json
|
|
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
|
|
89
|
+
|
|
90
|
+
vellum amazon fresh delivery-slots --json
|
|
91
|
+
vellum amazon fresh select-slot --slot-id <id> --json
|
|
92
|
+
|
|
93
|
+
vellum amazon payment-methods --json
|
|
94
|
+
vellum amazon checkout --json
|
|
95
|
+
vellum amazon order place [--payment-method-id <id>] [--slot-id <id>] --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Example Interactions
|
|
99
|
+
|
|
100
|
+
**User**: "Order a pack of AA batteries from Amazon"
|
|
101
|
+
|
|
102
|
+
1. `vellum amazon status --json` → logged in
|
|
103
|
+
2. `vellum amazon search "AA batteries" --json` → finds products
|
|
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
|
|
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`
|
|
110
|
+
|
|
111
|
+
**User**: "Order a large blue t-shirt from Amazon"
|
|
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`
|
|
116
|
+
|
|
117
|
+
**User**: "Order milk and eggs from Amazon Fresh"
|
|
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`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="16" height="16" fill="#ffffff"/>
|
|
3
|
+
<rect x="2" y="3" width="12" height="9" fill="#FF9900" stroke="#232F3E" stroke-width="1"/>
|
|
4
|
+
<rect x="3" y="4" width="10" height="7" fill="#FF9900"/>
|
|
5
|
+
<rect x="4" y="5" width="2" height="2" fill="#232F3E"/>
|
|
6
|
+
<rect x="7" y="5" width="2" height="2" fill="#232F3E"/>
|
|
7
|
+
<rect x="10" y="5" width="2" height="2" fill="#232F3E"/>
|
|
8
|
+
<rect x="4" y="8" width="2" height="2" fill="#232F3E"/>
|
|
9
|
+
<rect x="7" y="8" width="2" height="2" fill="#232F3E"/>
|
|
10
|
+
<rect x="10" y="8" width="2" height="2" fill="#232F3E"/>
|
|
11
|
+
<path d="M 3 13 Q 8 14 13 13" stroke="#232F3E" stroke-width="1" fill="none"/>
|
|
12
|
+
<rect x="2" y="13" width="12" height="1" fill="#232F3E"/>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "API Mapping"
|
|
3
|
+
description: "Record and analyze API surfaces of web services"
|
|
4
|
+
user-invocable: true
|
|
5
|
+
metadata: {"vellum": {"emoji": "🗺️"}}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You can record and analyze the API surface of any web service using the `map` CLI.
|
|
9
|
+
|
|
10
|
+
## CLI Setup
|
|
11
|
+
|
|
12
|
+
**IMPORTANT: Always use `host_bash` (not `bash`) for all `map` commands.** The API mapping CLI needs host access for Chrome CDP, network recording, and browser automation — none of which are available inside the sandbox.
|
|
13
|
+
|
|
14
|
+
`map` is a standalone CLI tool installed at `~/.vellum/bin/map`. It should already be on your PATH. If `map` is not found, prepend `PATH="$HOME/.vellum/bin:$PATH"` to the command. Do NOT search for the binary or try to discover how the CLI works. Just run the commands as documented below.
|
|
15
|
+
|
|
16
|
+
## Typical Flow
|
|
17
|
+
|
|
18
|
+
When the user wants to map a web service's API (e.g. "Map the Notion API" or "Figure out how Figma's API works"):
|
|
19
|
+
|
|
20
|
+
1. **Ask about the objective** — Ask the user: "What service do you want to map?" and "What are you trying to build or integrate with?" This helps focus the recording on the relevant parts of the API surface.
|
|
21
|
+
|
|
22
|
+
2. **Choose mode** — Ask the user: "Should I browse automatically, or do you want to drive?" This determines whether to use auto mode or manual mode:
|
|
23
|
+
- **Auto mode**: The CLI launches a headless browser, navigates the service, and records API calls automatically. Best for broad discovery.
|
|
24
|
+
- **Manual mode**: A Chrome window opens for the user to interact with the service while the CLI records all API traffic in the background. Best for capturing a specific workflow.
|
|
25
|
+
|
|
26
|
+
3. **Run the mapping** — Execute the appropriate `map` command:
|
|
27
|
+
- Auto mode: `map <domain> --json`
|
|
28
|
+
- Manual mode: `map <domain> --manual --json`
|
|
29
|
+
- For longer sessions: `map <domain> --duration 120 --json`
|
|
30
|
+
|
|
31
|
+
4. **Wait for recording to complete** — In auto mode, the CLI will browse and record for the default duration (60 seconds) then stop. In manual mode, the CLI blocks until the user closes the browser or presses Ctrl+C. The command outputs a JSON summary of all discovered endpoints.
|
|
32
|
+
|
|
33
|
+
5. **Analyze the API map** — Review the output and present findings to the user:
|
|
34
|
+
- List discovered endpoints grouped by resource type (e.g., `/api/v1/users`, `/api/v1/documents`)
|
|
35
|
+
- Note authentication patterns (Bearer tokens, cookies, API keys)
|
|
36
|
+
- Identify CRUD operations and their HTTP methods
|
|
37
|
+
- Highlight any WebSocket or streaming endpoints
|
|
38
|
+
- Call out rate limiting headers or pagination patterns
|
|
39
|
+
|
|
40
|
+
6. **Offer next steps** — Based on the discovered API surface, offer to:
|
|
41
|
+
- Create CLI tools that wrap the discovered endpoints
|
|
42
|
+
- Generate TypeScript types from observed request/response payloads
|
|
43
|
+
- Build a focused integration for the user's specific use case
|
|
44
|
+
- Re-record with a longer duration or manual mode to capture more endpoints
|
|
45
|
+
|
|
46
|
+
## Important Behavior
|
|
47
|
+
|
|
48
|
+
- **Be proactive.** If the user names a service, start mapping immediately rather than asking unnecessary clarifying questions. Ask about mode preference, then go.
|
|
49
|
+
- **Always use `--json` flag** on all commands for reliable parsing.
|
|
50
|
+
- **Present findings clearly.** Group endpoints logically, show HTTP methods, and highlight the most useful ones for the user's stated objective.
|
|
51
|
+
- **Suggest manual mode for authenticated services.** If auto mode returns mostly auth redirects or login pages, suggest switching to manual mode so the user can log in first.
|
|
52
|
+
- **Handle errors gracefully.** If the domain is unreachable or the recording captures no API calls, suggest checking the domain, trying manual mode, or increasing the duration.
|
|
53
|
+
|
|
54
|
+
## Command Reference
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
map <domain> --json # Auto mode: browse and record API calls (default 60s)
|
|
58
|
+
map <domain> --manual --json # Manual mode: user drives the browser, CLI records
|
|
59
|
+
map <domain> --duration <secs> --json # Auto mode with custom duration
|
|
60
|
+
map <domain> --manual --duration <secs> --json # Manual mode with custom timeout
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Example Interaction
|
|
64
|
+
|
|
65
|
+
**User**: "Map the Notion API"
|
|
66
|
+
|
|
67
|
+
1. Ask: "What are you trying to build with Notion? And should I browse automatically, or do you want to drive the browser?"
|
|
68
|
+
2. User says: "I want to build a CLI to manage my pages. I'll drive."
|
|
69
|
+
3. `map notion.com --manual --json` -> Chrome window opens
|
|
70
|
+
4. Tell user: "A Chrome window is open. Log into Notion and do a representative workflow — create a page, edit it, maybe move it. I'll record all API calls in the background. Close the browser when you're done."
|
|
71
|
+
5. User closes browser -> CLI outputs discovered endpoints
|
|
72
|
+
6. Present findings: "I found 14 API endpoints. Here are the key ones for page management:
|
|
73
|
+
- `POST /api/v3/getSpaces` — lists workspaces
|
|
74
|
+
- `POST /api/v3/syncRecordValues` — fetches page content
|
|
75
|
+
- `POST /api/v3/submitTransaction` — creates/updates pages
|
|
76
|
+
- `POST /api/v3/enqueueTask` — async operations (export, duplicate)
|
|
77
|
+
Authentication: Cookie-based session with `token_v2`."
|
|
78
|
+
7. Offer: "Want me to create a CLI tool that wraps these endpoints for managing Notion pages?"
|
|
@@ -17,6 +17,7 @@ Use this skill to browse the web. After loading this skill, the following browse
|
|
|
17
17
|
- `browser_press_key` — Press a keyboard key
|
|
18
18
|
- `browser_wait_for` — Wait for a condition
|
|
19
19
|
- `browser_extract` — Extract page text content
|
|
20
|
+
- `browser_wait_for_download` — Wait for a file download to complete
|
|
20
21
|
- `browser_fill_credential` — Fill a stored credential into a form field
|
|
21
22
|
|
|
22
23
|
## Typical Workflow
|
|
@@ -196,6 +196,23 @@
|
|
|
196
196
|
"executor": "tools/browser-extract.ts",
|
|
197
197
|
"execution_target": "host"
|
|
198
198
|
},
|
|
199
|
+
{
|
|
200
|
+
"name": "browser_wait_for_download",
|
|
201
|
+
"description": "Wait for a file download to complete on the current page. Use after clicking a download button or link. Returns the filename and local file path.",
|
|
202
|
+
"category": "browser",
|
|
203
|
+
"risk": "low",
|
|
204
|
+
"input_schema": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"timeout": {
|
|
208
|
+
"type": "number",
|
|
209
|
+
"description": "Maximum wait time in milliseconds (default: 30000, max: 120000)."
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"executor": "tools/browser-wait-for-download.ts",
|
|
214
|
+
"execution_target": "host"
|
|
215
|
+
},
|
|
199
216
|
{
|
|
200
217
|
"name": "browser_fill_credential",
|
|
201
218
|
"description": "Fill a stored credential into a form field without exposing the value. Target by element_id (from browser_snapshot) or CSS selector.",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ToolContext, ToolExecutionResult } from '../../../../tools/types.js';
|
|
2
|
+
import { browserManager } from '../../../../tools/browser/browser-manager.js';
|
|
3
|
+
|
|
4
|
+
export async function run(
|
|
5
|
+
input: Record<string, unknown>,
|
|
6
|
+
context: ToolContext,
|
|
7
|
+
): Promise<ToolExecutionResult> {
|
|
8
|
+
const timeout = typeof input.timeout === 'number'
|
|
9
|
+
? Math.min(Math.max(input.timeout, 1000), 120_000)
|
|
10
|
+
: 30_000;
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
const download = await browserManager.waitForDownload(context.sessionId, timeout);
|
|
14
|
+
return {
|
|
15
|
+
content: JSON.stringify({
|
|
16
|
+
filename: download.filename,
|
|
17
|
+
path: download.path,
|
|
18
|
+
}),
|
|
19
|
+
isError: false,
|
|
20
|
+
};
|
|
21
|
+
} catch (err) {
|
|
22
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
23
|
+
return { content: `Error: ${msg}`, isError: true };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -5,62 +5,62 @@ user-invocable: true
|
|
|
5
5
|
metadata: {"vellum": {"emoji": "\uD83C\uDF55"}}
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You can order food from DoorDash for the user using the `
|
|
8
|
+
You can order food from DoorDash for the user using the `doordash` 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 `doordash` commands.** The DoorDash CLI needs host access for Chrome CDP, session cookies, and the CLI binary — none of which are available inside the sandbox.
|
|
13
13
|
|
|
14
|
-
`
|
|
14
|
+
`doordash` is a standalone CLI tool installed at `~/.vellum/bin/doordash`. It should already be on your PATH. If `doordash` is not found, prepend `PATH="$HOME/.vellum/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
|
## Task Progress Widget
|
|
17
17
|
|
|
18
|
-
A task progress card is shown automatically when you run your first `
|
|
18
|
+
A task progress card is shown automatically when you run your first `doordash` command. Its surface ID is `doordash-progress`. As each step completes, call `ui_update` with surface ID `doordash-progress` to update step statuses. Update `data.templateData.steps` — set completed steps to `"status": "completed"` with a `"detail"` string, the current step to `"status": "in_progress"`, and future steps to `"status": "pending"`. Adapt the steps to the actual flow (e.g. skip "Search restaurants" if the user named a specific store).
|
|
19
19
|
|
|
20
20
|
## Typical Flow
|
|
21
21
|
|
|
22
22
|
When the user asks you to order food (e.g. "Order pizza from Andiamo's"):
|
|
23
23
|
|
|
24
|
-
1. **Check session** — run `
|
|
24
|
+
1. **Check session** — run `doordash status --json`. If `loggedIn` is false or the session is expired, tell the user: "A Chrome window will open to the DoorDash login page. Please sign in there — I'll detect your login automatically and minimize the window." Then run `doordash 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.**
|
|
25
25
|
|
|
26
26
|
Keep the DoorDash Chrome window open in the background — it's needed for API requests.
|
|
27
27
|
|
|
28
|
-
2. **Search** — run `
|
|
28
|
+
2. **Search** — run `doordash search "<query>" --json` to find matching restaurants. Present the top results to the user with name, rating, and delivery info. If the user named a specific restaurant, pick the best match. If ambiguous, ask.
|
|
29
29
|
|
|
30
|
-
3. **Browse menu** — run `
|
|
30
|
+
3. **Browse menu** — run `doordash menu <storeId> --json` to get the menu. Show the user the categories and items with prices. If the user already said what they want (e.g. "pepperoni pizza"), find the matching item(s). **For convenience/pharmacy stores** (CVS, Duane Reade, Walgreens etc.), the response will have `isRetail: true` and empty items — use `store-search` instead (see step 3b).
|
|
31
31
|
|
|
32
|
-
3b. **Search within a retail store** — for convenience/pharmacy stores, run `
|
|
32
|
+
3b. **Search within a retail store** — for convenience/pharmacy stores, run `doordash store-search <storeId> "<query>" --json` to find specific products. This returns items with IDs, prices, and menuIds that can be added to cart directly.
|
|
33
33
|
|
|
34
|
-
4. **Get item details** (if needed) — run `
|
|
34
|
+
4. **Get item details** (if needed) — run `doordash item <storeId> <itemId> --json` to see options/customizations. The response includes:
|
|
35
35
|
- `options`: each option group has `minSelections`/`maxSelections` indicating how many choices are required
|
|
36
36
|
- Each choice has `unitAmount` (price impact in cents), `defaultQuantity`, and possibly `nestedOptions` (sub-choices like milk type within a size selection)
|
|
37
37
|
- `specialInstructionsConfig`: whether special instructions are accepted, max length, and placeholder text
|
|
38
38
|
|
|
39
39
|
If the item has required options (like size or toppings), construct the `nestedOptions` JSON from the option/choice IDs and pass it via `--options`. Ask the user for preferences or pick sensible defaults.
|
|
40
40
|
|
|
41
|
-
5. **Add to cart** — run `
|
|
41
|
+
5. **Add to cart** — run `doordash cart add --store-id <id> --menu-id <id> --item-id <id> --item-name "<name>" --unit-price <cents> [--options '<json>'] [--special-instructions "<text>"] --json`. For subsequent items at the same store, pass `--cart-id <id>` from the first add response. Use `--special-instructions` for requests like "extra hot", "no ice", etc. Use `--options` to pass customization choices (see Customization Options below).
|
|
42
42
|
|
|
43
|
-
6. **Review cart** — run `
|
|
43
|
+
6. **Review cart** — run `doordash cart view <cartId> --json` and show the user what's in their cart with prices. Ask if they want to add anything else or proceed.
|
|
44
44
|
|
|
45
|
-
7. **Checkout** — run `
|
|
45
|
+
7. **Checkout** — run `doordash checkout <cartId> --json` to get delivery options. Present them to the user.
|
|
46
46
|
|
|
47
|
-
8. **Payment methods** — run `
|
|
47
|
+
8. **Payment methods** — run `doordash payment-methods --json` to see saved cards. Show the user which card will be used (the default one).
|
|
48
48
|
|
|
49
|
-
9. **Place order** — after the user explicitly confirms, run `
|
|
49
|
+
9. **Place order** — after the user explicitly confirms, run `doordash order place --cart-id <id> --store-id <id> --total <cents> [--tip <cents>] [--dropoff-option <id>] --json`. The command auto-selects the default payment method if `--payment-uuid` is not provided. The response contains `orderUuid` on success.
|
|
50
50
|
|
|
51
51
|
## Important Behavior
|
|
52
52
|
|
|
53
53
|
- **Always confirm before checkout.** Never place an order without explicit user approval.
|
|
54
54
|
- **Be proactive.** If the user says "order pizza from Andiamo's", don't ask clarifying questions upfront — search, find the store, show the menu, and suggest items. Only ask when you need a choice the user hasn't specified.
|
|
55
|
-
- **Handle expired sessions gracefully.** If any command returns `"error": "session_expired"`, run `
|
|
55
|
+
- **Handle expired sessions gracefully.** If any command returns `"error": "session_expired"`, run `doordash refresh --json` to re-capture the session.
|
|
56
56
|
- **Show prices.** Always show prices when presenting items or the cart summary.
|
|
57
57
|
- **Use `--json` flag** on all commands for reliable parsing.
|
|
58
58
|
- **Do NOT use the browser skill.** All DoorDash interaction goes through the CLI, not browser automation.
|
|
59
|
-
- **Rate limiting.** DoorDash rate-limits rapid sequential requests. When adding multiple items (e.g. a team order), wait 8–10 seconds between `cart add` calls. If you get a 403 error, wait 15–20 seconds and retry. For large orders (5+ items), consider running `
|
|
59
|
+
- **Rate limiting.** DoorDash rate-limits rapid sequential requests. When adding multiple items (e.g. a team order), wait 8–10 seconds between `cart add` calls. If you get a 403 error, wait 15–20 seconds and retry. For large orders (5+ items), consider running `doordash refresh --json` midway through if you hit repeated 403s.
|
|
60
60
|
- **Special instructions are unreliable.** Some merchants disable special instructions entirely. Always prefer `--options` for customizations (size, milk type, etc.). Only use `--special-instructions` for free-text requests that aren't covered by the item's option groups. If the merchant rejects special instructions, drop them and proceed without.
|
|
61
61
|
- **Customization fallback.** If `cart add` with `--options` fails, or if the item details show options that are hard to construct (deeply nested, unusual format), proactively offer to use `cart learn` so the user can customize the item visually in the browser. Don't silently drop customizations — tell the user what happened and offer alternatives.
|
|
62
|
-
- **Always-allow tip.** At the start of an ordering flow, suggest the user enable "always allow" for `
|
|
63
|
-
- **Error attribution.** When errors occur, assume it's more likely a bug in our query/parsing than a DoorDash API change. Suggest running `
|
|
62
|
+
- **Always-allow tip.** At the start of an ordering flow, suggest the user enable "always allow" for `doordash` commands: "Tip: You can type 'a' to always allow `doordash` commands for this session so you won't be prompted each time."
|
|
63
|
+
- **Error attribution.** When errors occur, assume it's more likely a bug in our query/parsing than a DoorDash API change. Suggest running `doordash record` to capture fresh queries before assuming the schema changed.
|
|
64
64
|
|
|
65
65
|
## Customization Options
|
|
66
66
|
|
|
@@ -68,7 +68,7 @@ Many items (especially coffee, boba, sandwiches) have required customization opt
|
|
|
68
68
|
|
|
69
69
|
### Constructing nestedOptions JSON
|
|
70
70
|
|
|
71
|
-
1. Run `
|
|
71
|
+
1. Run `doordash item <storeId> <itemId> --json` to get the item's option groups
|
|
72
72
|
2. Each option group has `id`, `name`, `required`, `minSelections`, `maxSelections`, and `choices`
|
|
73
73
|
3. Build a JSON array of selections matching the DoorDash format:
|
|
74
74
|
|
|
@@ -97,67 +97,67 @@ Use `--special-instructions` on `cart add` for free-text requests like "extra ho
|
|
|
97
97
|
|
|
98
98
|
For complex items where constructing the JSON manually is difficult, use `cart learn`:
|
|
99
99
|
|
|
100
|
-
1. Run `
|
|
100
|
+
1. Run `doordash cart learn --json`
|
|
101
101
|
2. A Chrome window opens — navigate to the item, customize it visually, and click "Add to Cart"
|
|
102
102
|
3. The command auto-detects the `updateCartItem` operation and extracts the exact `nestedOptions` and `specialInstructions`
|
|
103
103
|
4. Use the extracted options directly with `cart add --options '<json>'`
|
|
104
104
|
|
|
105
|
-
You can also extract options from an existing recording with `
|
|
105
|
+
You can also extract options from an existing recording with `doordash inspect <recordingId> --extract-options --json`.
|
|
106
106
|
|
|
107
107
|
### Coffee Order Example
|
|
108
108
|
|
|
109
109
|
**User**: "Order a large oat milk latte with an extra shot from Blue Bottle"
|
|
110
110
|
|
|
111
|
-
1. `
|
|
112
|
-
2. `
|
|
113
|
-
3. `
|
|
111
|
+
1. `doordash search "Blue Bottle" --json` -> finds store
|
|
112
|
+
2. `doordash menu <storeId> --json` -> finds "Latte" item
|
|
113
|
+
3. `doordash item <storeId> <latteItemId> --json` -> returns options:
|
|
114
114
|
- Size (required, min:1, max:1): Small (id:101), Medium (id:102), Large (id:103, +$1.00)
|
|
115
115
|
- Milk (required, min:1, max:1): Whole (id:201), Oat (id:202, +$0.70), Almond (id:203, +$0.70)
|
|
116
116
|
- Extras (optional, min:0, max:5): Extra Shot (id:301, +$0.90), Vanilla Syrup (id:302, +$0.60)
|
|
117
117
|
4. Construct options JSON and add to cart:
|
|
118
118
|
```
|
|
119
|
-
|
|
119
|
+
doordash cart add --store-id <id> --menu-id <id> --item-id <id> --item-name "Latte" --unit-price 550 --options '[{"optionId":"size-group-id","optionChoiceId":"103","quantity":1,"nestedOptions":[]},{"optionId":"milk-group-id","optionChoiceId":"202","quantity":1,"nestedOptions":[]},{"optionId":"extras-group-id","optionChoiceId":"301","quantity":1,"nestedOptions":[]}]' --special-instructions "Extra hot" --json
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
## Command Reference
|
|
123
123
|
|
|
124
124
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
125
|
+
doordash status --json # Check if logged in
|
|
126
|
+
doordash refresh --json # Capture fresh session via Ride Shotgun (auto-stops after login)
|
|
127
|
+
doordash login --recording <path> # Import session from a recording file manually
|
|
128
|
+
doordash logout --json # Clear session
|
|
129
|
+
doordash search "<query>" --json # Search restaurants
|
|
130
|
+
doordash menu <storeId> --json # Get store menu (auto-detects retail stores)
|
|
131
|
+
doordash store-search <storeId> "<query>" --json # Search items within a convenience/pharmacy store
|
|
132
|
+
doordash item <storeId> <itemId> --json # Get item details + options
|
|
133
|
+
doordash cart add --store-id <id> --menu-id <id> --item-id <id> --item-name "<name>" --unit-price <cents> [--quantity <n>] [--cart-id <id>] [--options '<json>'] [--special-instructions "<text>"] --json
|
|
134
|
+
doordash cart remove --cart-id <id> --item-id <orderItemId> --json
|
|
135
|
+
doordash cart view <cartId> --json
|
|
136
|
+
doordash cart list [--store-id <id>] --json
|
|
137
|
+
doordash cart learn --json # Learn customization options by recording browser interaction
|
|
138
|
+
doordash inspect <recordingId> --extract-options --json # Extract nestedOptions from a recording
|
|
139
|
+
doordash checkout <cartId> [--address-id <id>] --json
|
|
140
|
+
doordash payment-methods --json # List saved payment methods
|
|
141
|
+
doordash order place --cart-id <id> --store-id <id> --total <cents> [--tip <cents>] [--delivery-option <type>] [--dropoff-option <id>] [--payment-uuid <uuid>] --json
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
## Example Interaction
|
|
145
145
|
|
|
146
146
|
**User**: "Order a pepperoni pizza from Andiamo's"
|
|
147
147
|
|
|
148
|
-
1. `
|
|
149
|
-
2. `
|
|
150
|
-
3. `
|
|
148
|
+
1. `doordash status --json` -> logged in
|
|
149
|
+
2. `doordash search "Andiamo's" --json` -> finds store 22926474
|
|
150
|
+
3. `doordash menu 22926474 --json` -> finds "Pepperoni Pizza Pie" (item 2956709006, $28.00)
|
|
151
151
|
4. Tell user: "I found Pepperoni Pizza Pie at Andiamo's for $28.00. Adding it to your cart."
|
|
152
|
-
5. `
|
|
153
|
-
6. `
|
|
152
|
+
5. `doordash cart add --store-id 22926474 --menu-id 12847574 --item-id 2956709006 --item-name "Pepperoni Pizza Pie" --unit-price 2800 --json`
|
|
153
|
+
6. `doordash cart view <cartId> --json` -> show summary
|
|
154
154
|
7. "Your cart has 1x Pepperoni Pizza Pie ($28.00), total $28.00. Ready to check out?"
|
|
155
155
|
|
|
156
156
|
**User**: "I need Tylenol from CVS"
|
|
157
157
|
|
|
158
|
-
1. `
|
|
159
|
-
2. `
|
|
160
|
-
3. `
|
|
161
|
-
4. `
|
|
158
|
+
1. `doordash status --json` -> logged in
|
|
159
|
+
2. `doordash search "CVS" --json` -> finds store 1231787
|
|
160
|
+
3. `doordash menu 1231787 --json` -> isRetail: true, categories but no items
|
|
161
|
+
4. `doordash store-search 1231787 "tylenol" --json` -> finds results
|
|
162
162
|
5. Show top results: "Tylenol Extra Strength Gelcaps (24 ct) - $8.79, Tylenol Extra Strength Caplets (100 ct) - $13.49..."
|
|
163
163
|
6. User picks one -> add to cart with the item's `id`, `menuId`, and `unitAmount`
|
|
@@ -31,13 +31,22 @@ vellum email create <your-username>
|
|
|
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.
|
|
33
33
|
|
|
34
|
-
## Step 3:
|
|
34
|
+
## Step 3: Persist Your Email
|
|
35
35
|
|
|
36
|
-
After the inbox is created successfully:
|
|
36
|
+
After the inbox is created successfully, persist your email address to the workspace config so the desktop app can display it:
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
```bash
|
|
39
|
+
vellum config set email.address <your-new-email-address>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Replace `<your-new-email-address>` with the full email address returned from the create command (e.g. `sam@agentmail.to`).
|
|
43
|
+
|
|
44
|
+
## Step 4: Confirm Setup
|
|
45
|
+
|
|
46
|
+
After the inbox is created and persisted:
|
|
47
|
+
|
|
48
|
+
1. Tell the user your new email address.
|
|
49
|
+
2. Store a note in your memory or `USER.md` that your email has been provisioned so you remember it in future conversations.
|
|
41
50
|
|
|
42
51
|
## Rules
|
|
43
52
|
|