@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,310 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-generated registry of bundled skill tool scripts.
|
|
3
|
+
*
|
|
4
|
+
* In compiled Bun binaries, bundled tool scripts can't be dynamically
|
|
5
|
+
* imported from the filesystem because their relative imports point to
|
|
6
|
+
* modules that only exist inside the binary's virtual /$bunfs/ filesystem.
|
|
7
|
+
*
|
|
8
|
+
* This registry eagerly imports every bundled tool script so it becomes
|
|
9
|
+
* part of the compiled binary. At runtime, the skill-script-runner
|
|
10
|
+
* checks this map before falling back to a dynamic import.
|
|
11
|
+
*
|
|
12
|
+
* Regenerate with:
|
|
13
|
+
* bun run scripts/generate-bundled-tool-registry.ts
|
|
14
|
+
*/
|
|
15
|
+
import type { SkillToolScript } from '../tools/skills/script-contract.js';
|
|
16
|
+
|
|
17
|
+
// ── app-builder ──────────────────────────────────────────────────────────────
|
|
18
|
+
import * as appCreate from './bundled-skills/app-builder/tools/app-create.js';
|
|
19
|
+
import * as appList from './bundled-skills/app-builder/tools/app-list.js';
|
|
20
|
+
import * as appQuery from './bundled-skills/app-builder/tools/app-query.js';
|
|
21
|
+
import * as appUpdate from './bundled-skills/app-builder/tools/app-update.js';
|
|
22
|
+
import * as appDelete from './bundled-skills/app-builder/tools/app-delete.js';
|
|
23
|
+
import * as appFileList from './bundled-skills/app-builder/tools/app-file-list.js';
|
|
24
|
+
import * as appFileRead from './bundled-skills/app-builder/tools/app-file-read.js';
|
|
25
|
+
import * as appFileEdit from './bundled-skills/app-builder/tools/app-file-edit.js';
|
|
26
|
+
import * as appFileWrite from './bundled-skills/app-builder/tools/app-file-write.js';
|
|
27
|
+
|
|
28
|
+
// ── browser ──────────────────────────────────────────────────────────────────
|
|
29
|
+
import * as browserNavigate from './bundled-skills/browser/tools/browser-navigate.js';
|
|
30
|
+
import * as browserSnapshot from './bundled-skills/browser/tools/browser-snapshot.js';
|
|
31
|
+
import * as browserScreenshot from './bundled-skills/browser/tools/browser-screenshot.js';
|
|
32
|
+
import * as browserClose from './bundled-skills/browser/tools/browser-close.js';
|
|
33
|
+
import * as browserClick from './bundled-skills/browser/tools/browser-click.js';
|
|
34
|
+
import * as browserType from './bundled-skills/browser/tools/browser-type.js';
|
|
35
|
+
import * as browserPressKey from './bundled-skills/browser/tools/browser-press-key.js';
|
|
36
|
+
import * as browserWaitFor from './bundled-skills/browser/tools/browser-wait-for.js';
|
|
37
|
+
import * as browserExtract from './bundled-skills/browser/tools/browser-extract.js';
|
|
38
|
+
import * as browserFillCredential from './bundled-skills/browser/tools/browser-fill-credential.js';
|
|
39
|
+
|
|
40
|
+
// ── claude-code ──────────────────────────────────────────────────────────────
|
|
41
|
+
import * as claudeCode from './bundled-skills/claude-code/tools/claude-code.js';
|
|
42
|
+
|
|
43
|
+
// ── computer-use ─────────────────────────────────────────────────────────────
|
|
44
|
+
import * as computerUseClick from './bundled-skills/computer-use/tools/computer-use-click.js';
|
|
45
|
+
import * as computerUseDoubleClick from './bundled-skills/computer-use/tools/computer-use-double-click.js';
|
|
46
|
+
import * as computerUseRightClick from './bundled-skills/computer-use/tools/computer-use-right-click.js';
|
|
47
|
+
import * as computerUseTypeText from './bundled-skills/computer-use/tools/computer-use-type-text.js';
|
|
48
|
+
import * as computerUseKey from './bundled-skills/computer-use/tools/computer-use-key.js';
|
|
49
|
+
import * as computerUseScroll from './bundled-skills/computer-use/tools/computer-use-scroll.js';
|
|
50
|
+
import * as computerUseDrag from './bundled-skills/computer-use/tools/computer-use-drag.js';
|
|
51
|
+
import * as computerUseWait from './bundled-skills/computer-use/tools/computer-use-wait.js';
|
|
52
|
+
import * as computerUseOpenApp from './bundled-skills/computer-use/tools/computer-use-open-app.js';
|
|
53
|
+
import * as computerUseRunApplescript from './bundled-skills/computer-use/tools/computer-use-run-applescript.js';
|
|
54
|
+
import * as computerUseDone from './bundled-skills/computer-use/tools/computer-use-done.js';
|
|
55
|
+
import * as computerUseRespond from './bundled-skills/computer-use/tools/computer-use-respond.js';
|
|
56
|
+
|
|
57
|
+
// ── contacts ─────────────────────────────────────────────────────────────────
|
|
58
|
+
import * as contactUpsert from './bundled-skills/contacts/tools/contact-upsert.js';
|
|
59
|
+
import * as contactSearch from './bundled-skills/contacts/tools/contact-search.js';
|
|
60
|
+
import * as contactMerge from './bundled-skills/contacts/tools/contact-merge.js';
|
|
61
|
+
|
|
62
|
+
// ── document ─────────────────────────────────────────────────────────────────
|
|
63
|
+
import * as documentCreate from './bundled-skills/document/tools/document-create.js';
|
|
64
|
+
import * as documentUpdate from './bundled-skills/document/tools/document-update.js';
|
|
65
|
+
|
|
66
|
+
// ── followups ────────────────────────────────────────────────────────────────
|
|
67
|
+
import * as followupCreate from './bundled-skills/followups/tools/followup-create.js';
|
|
68
|
+
import * as followupList from './bundled-skills/followups/tools/followup-list.js';
|
|
69
|
+
import * as followupResolve from './bundled-skills/followups/tools/followup-resolve.js';
|
|
70
|
+
|
|
71
|
+
// ── google-calendar ──────────────────────────────────────────────────────────
|
|
72
|
+
import * as calendarListEvents from './bundled-skills/google-calendar/tools/calendar-list-events.js';
|
|
73
|
+
import * as calendarGetEvent from './bundled-skills/google-calendar/tools/calendar-get-event.js';
|
|
74
|
+
import * as calendarCreateEvent from './bundled-skills/google-calendar/tools/calendar-create-event.js';
|
|
75
|
+
import * as calendarCheckAvailability from './bundled-skills/google-calendar/tools/calendar-check-availability.js';
|
|
76
|
+
import * as calendarRsvp from './bundled-skills/google-calendar/tools/calendar-rsvp.js';
|
|
77
|
+
|
|
78
|
+
// ── image-studio ─────────────────────────────────────────────────────────────
|
|
79
|
+
import * as mediaGenerateImage from './bundled-skills/image-studio/tools/media-generate-image.js';
|
|
80
|
+
|
|
81
|
+
// ── knowledge-graph ──────────────────────────────────────────────────────────
|
|
82
|
+
import * as graphQuery from './bundled-skills/knowledge-graph/tools/graph-query.js';
|
|
83
|
+
|
|
84
|
+
// ── media-processing ─────────────────────────────────────────────────────────
|
|
85
|
+
import * as ingestMedia from './bundled-skills/media-processing/tools/ingest-media.js';
|
|
86
|
+
import * as mediaStatus from './bundled-skills/media-processing/tools/media-status.js';
|
|
87
|
+
import * as extractKeyframes from './bundled-skills/media-processing/tools/extract-keyframes.js';
|
|
88
|
+
import * as analyzeKeyframes from './bundled-skills/media-processing/tools/analyze-keyframes.js';
|
|
89
|
+
import * as queryMediaEvents from './bundled-skills/media-processing/tools/query-media-events.js';
|
|
90
|
+
import * as generateClip from './bundled-skills/media-processing/tools/generate-clip.js';
|
|
91
|
+
import * as mediaDiagnostics from './bundled-skills/media-processing/tools/media-diagnostics.js';
|
|
92
|
+
|
|
93
|
+
// ── messaging ────────────────────────────────────────────────────────────────
|
|
94
|
+
import * as messagingAuthTest from './bundled-skills/messaging/tools/messaging-auth-test.js';
|
|
95
|
+
import * as messagingListConversations from './bundled-skills/messaging/tools/messaging-list-conversations.js';
|
|
96
|
+
import * as messagingRead from './bundled-skills/messaging/tools/messaging-read.js';
|
|
97
|
+
import * as messagingSearch from './bundled-skills/messaging/tools/messaging-search.js';
|
|
98
|
+
import * as messagingSend from './bundled-skills/messaging/tools/messaging-send.js';
|
|
99
|
+
import * as messagingReply from './bundled-skills/messaging/tools/messaging-reply.js';
|
|
100
|
+
import * as messagingMarkRead from './bundled-skills/messaging/tools/messaging-mark-read.js';
|
|
101
|
+
import * as slackAddReaction from './bundled-skills/messaging/tools/slack-add-reaction.js';
|
|
102
|
+
import * as slackLeaveChannel from './bundled-skills/messaging/tools/slack-leave-channel.js';
|
|
103
|
+
import * as messagingAnalyzeActivity from './bundled-skills/messaging/tools/messaging-analyze-activity.js';
|
|
104
|
+
import * as messagingAnalyzeStyle from './bundled-skills/messaging/tools/messaging-analyze-style.js';
|
|
105
|
+
import * as messagingDraft from './bundled-skills/messaging/tools/messaging-draft.js';
|
|
106
|
+
import * as gmailArchive from './bundled-skills/messaging/tools/gmail-archive.js';
|
|
107
|
+
import * as gmailBatchArchive from './bundled-skills/messaging/tools/gmail-batch-archive.js';
|
|
108
|
+
import * as gmailLabel from './bundled-skills/messaging/tools/gmail-label.js';
|
|
109
|
+
import * as gmailBatchLabel from './bundled-skills/messaging/tools/gmail-batch-label.js';
|
|
110
|
+
import * as gmailTrash from './bundled-skills/messaging/tools/gmail-trash.js';
|
|
111
|
+
import * as gmailUnsubscribe from './bundled-skills/messaging/tools/gmail-unsubscribe.js';
|
|
112
|
+
import * as gmailDraft from './bundled-skills/messaging/tools/gmail-draft.js';
|
|
113
|
+
|
|
114
|
+
// ── playbooks ────────────────────────────────────────────────────────────────
|
|
115
|
+
import * as playbookCreate from './bundled-skills/playbooks/tools/playbook-create.js';
|
|
116
|
+
import * as playbookList from './bundled-skills/playbooks/tools/playbook-list.js';
|
|
117
|
+
import * as playbookUpdate from './bundled-skills/playbooks/tools/playbook-update.js';
|
|
118
|
+
import * as playbookDelete from './bundled-skills/playbooks/tools/playbook-delete.js';
|
|
119
|
+
|
|
120
|
+
// ── reminder ─────────────────────────────────────────────────────────────────
|
|
121
|
+
import * as reminderCreate from './bundled-skills/reminder/tools/reminder-create.js';
|
|
122
|
+
import * as reminderList from './bundled-skills/reminder/tools/reminder-list.js';
|
|
123
|
+
import * as reminderCancel from './bundled-skills/reminder/tools/reminder-cancel.js';
|
|
124
|
+
|
|
125
|
+
// ── schedule ─────────────────────────────────────────────────────────────────
|
|
126
|
+
import * as scheduleCreate from './bundled-skills/schedule/tools/schedule-create.js';
|
|
127
|
+
import * as scheduleList from './bundled-skills/schedule/tools/schedule-list.js';
|
|
128
|
+
import * as scheduleUpdate from './bundled-skills/schedule/tools/schedule-update.js';
|
|
129
|
+
import * as scheduleDelete from './bundled-skills/schedule/tools/schedule-delete.js';
|
|
130
|
+
|
|
131
|
+
// ── subagent ─────────────────────────────────────────────────────────────────
|
|
132
|
+
import * as subagentSpawn from './bundled-skills/subagent/tools/subagent-spawn.js';
|
|
133
|
+
import * as subagentStatus from './bundled-skills/subagent/tools/subagent-status.js';
|
|
134
|
+
import * as subagentAbort from './bundled-skills/subagent/tools/subagent-abort.js';
|
|
135
|
+
import * as subagentMessage from './bundled-skills/subagent/tools/subagent-message.js';
|
|
136
|
+
import * as subagentRead from './bundled-skills/subagent/tools/subagent-read.js';
|
|
137
|
+
|
|
138
|
+
// ── tasks ────────────────────────────────────────────────────────────────────
|
|
139
|
+
import * as taskSave from './bundled-skills/tasks/tools/task-save.js';
|
|
140
|
+
import * as taskRun from './bundled-skills/tasks/tools/task-run.js';
|
|
141
|
+
import * as taskList from './bundled-skills/tasks/tools/task-list.js';
|
|
142
|
+
import * as taskDelete from './bundled-skills/tasks/tools/task-delete.js';
|
|
143
|
+
import * as taskListShow from './bundled-skills/tasks/tools/task-list-show.js';
|
|
144
|
+
import * as taskListAdd from './bundled-skills/tasks/tools/task-list-add.js';
|
|
145
|
+
import * as taskListUpdate from './bundled-skills/tasks/tools/task-list-update.js';
|
|
146
|
+
import * as taskListRemove from './bundled-skills/tasks/tools/task-list-remove.js';
|
|
147
|
+
import * as taskQueueRun from './bundled-skills/tasks/tools/task-queue-run.js';
|
|
148
|
+
|
|
149
|
+
// ── transcribe ───────────────────────────────────────────────────────────────
|
|
150
|
+
import * as transcribeMedia from './bundled-skills/transcribe/tools/transcribe-media.js';
|
|
151
|
+
|
|
152
|
+
// ── watcher ──────────────────────────────────────────────────────────────────
|
|
153
|
+
import * as watcherCreate from './bundled-skills/watcher/tools/watcher-create.js';
|
|
154
|
+
import * as watcherList from './bundled-skills/watcher/tools/watcher-list.js';
|
|
155
|
+
import * as watcherUpdate from './bundled-skills/watcher/tools/watcher-update.js';
|
|
156
|
+
import * as watcherDelete from './bundled-skills/watcher/tools/watcher-delete.js';
|
|
157
|
+
import * as watcherDigest from './bundled-skills/watcher/tools/watcher-digest.js';
|
|
158
|
+
|
|
159
|
+
// ── weather ──────────────────────────────────────────────────────────────────
|
|
160
|
+
import * as getWeather from './bundled-skills/weather/tools/get-weather.js';
|
|
161
|
+
|
|
162
|
+
// ─── Registry ────────────────────────────────────────────────────────────────
|
|
163
|
+
|
|
164
|
+
/** Key format: `skillDirBasename:executorPath` (e.g. `schedule:tools/schedule-list.ts`). */
|
|
165
|
+
export const bundledToolRegistry = new Map<string, SkillToolScript>([
|
|
166
|
+
// app-builder
|
|
167
|
+
['app-builder:tools/app-create.ts', appCreate],
|
|
168
|
+
['app-builder:tools/app-list.ts', appList],
|
|
169
|
+
['app-builder:tools/app-query.ts', appQuery],
|
|
170
|
+
['app-builder:tools/app-update.ts', appUpdate],
|
|
171
|
+
['app-builder:tools/app-delete.ts', appDelete],
|
|
172
|
+
['app-builder:tools/app-file-list.ts', appFileList],
|
|
173
|
+
['app-builder:tools/app-file-read.ts', appFileRead],
|
|
174
|
+
['app-builder:tools/app-file-edit.ts', appFileEdit],
|
|
175
|
+
['app-builder:tools/app-file-write.ts', appFileWrite],
|
|
176
|
+
|
|
177
|
+
// browser
|
|
178
|
+
['browser:tools/browser-navigate.ts', browserNavigate],
|
|
179
|
+
['browser:tools/browser-snapshot.ts', browserSnapshot],
|
|
180
|
+
['browser:tools/browser-screenshot.ts', browserScreenshot],
|
|
181
|
+
['browser:tools/browser-close.ts', browserClose],
|
|
182
|
+
['browser:tools/browser-click.ts', browserClick],
|
|
183
|
+
['browser:tools/browser-type.ts', browserType],
|
|
184
|
+
['browser:tools/browser-press-key.ts', browserPressKey],
|
|
185
|
+
['browser:tools/browser-wait-for.ts', browserWaitFor],
|
|
186
|
+
['browser:tools/browser-extract.ts', browserExtract],
|
|
187
|
+
['browser:tools/browser-fill-credential.ts', browserFillCredential],
|
|
188
|
+
|
|
189
|
+
// claude-code
|
|
190
|
+
['claude-code:tools/claude-code.ts', claudeCode],
|
|
191
|
+
|
|
192
|
+
// computer-use
|
|
193
|
+
['computer-use:tools/computer-use-click.ts', computerUseClick],
|
|
194
|
+
['computer-use:tools/computer-use-double-click.ts', computerUseDoubleClick],
|
|
195
|
+
['computer-use:tools/computer-use-right-click.ts', computerUseRightClick],
|
|
196
|
+
['computer-use:tools/computer-use-type-text.ts', computerUseTypeText],
|
|
197
|
+
['computer-use:tools/computer-use-key.ts', computerUseKey],
|
|
198
|
+
['computer-use:tools/computer-use-scroll.ts', computerUseScroll],
|
|
199
|
+
['computer-use:tools/computer-use-drag.ts', computerUseDrag],
|
|
200
|
+
['computer-use:tools/computer-use-wait.ts', computerUseWait],
|
|
201
|
+
['computer-use:tools/computer-use-open-app.ts', computerUseOpenApp],
|
|
202
|
+
['computer-use:tools/computer-use-run-applescript.ts', computerUseRunApplescript],
|
|
203
|
+
['computer-use:tools/computer-use-done.ts', computerUseDone],
|
|
204
|
+
['computer-use:tools/computer-use-respond.ts', computerUseRespond],
|
|
205
|
+
|
|
206
|
+
// contacts
|
|
207
|
+
['contacts:tools/contact-upsert.ts', contactUpsert],
|
|
208
|
+
['contacts:tools/contact-search.ts', contactSearch],
|
|
209
|
+
['contacts:tools/contact-merge.ts', contactMerge],
|
|
210
|
+
|
|
211
|
+
// document
|
|
212
|
+
['document:tools/document-create.ts', documentCreate],
|
|
213
|
+
['document:tools/document-update.ts', documentUpdate],
|
|
214
|
+
|
|
215
|
+
// followups
|
|
216
|
+
['followups:tools/followup-create.ts', followupCreate],
|
|
217
|
+
['followups:tools/followup-list.ts', followupList],
|
|
218
|
+
['followups:tools/followup-resolve.ts', followupResolve],
|
|
219
|
+
|
|
220
|
+
// google-calendar
|
|
221
|
+
['google-calendar:tools/calendar-list-events.ts', calendarListEvents],
|
|
222
|
+
['google-calendar:tools/calendar-get-event.ts', calendarGetEvent],
|
|
223
|
+
['google-calendar:tools/calendar-create-event.ts', calendarCreateEvent],
|
|
224
|
+
['google-calendar:tools/calendar-check-availability.ts', calendarCheckAvailability],
|
|
225
|
+
['google-calendar:tools/calendar-rsvp.ts', calendarRsvp],
|
|
226
|
+
|
|
227
|
+
// image-studio
|
|
228
|
+
['image-studio:tools/media-generate-image.ts', mediaGenerateImage],
|
|
229
|
+
|
|
230
|
+
// knowledge-graph
|
|
231
|
+
['knowledge-graph:tools/graph-query.ts', graphQuery],
|
|
232
|
+
|
|
233
|
+
// media-processing
|
|
234
|
+
['media-processing:tools/ingest-media.ts', ingestMedia],
|
|
235
|
+
['media-processing:tools/media-status.ts', mediaStatus],
|
|
236
|
+
['media-processing:tools/extract-keyframes.ts', extractKeyframes],
|
|
237
|
+
['media-processing:tools/analyze-keyframes.ts', analyzeKeyframes],
|
|
238
|
+
['media-processing:tools/query-media-events.ts', queryMediaEvents],
|
|
239
|
+
['media-processing:tools/generate-clip.ts', generateClip],
|
|
240
|
+
['media-processing:tools/media-diagnostics.ts', mediaDiagnostics],
|
|
241
|
+
|
|
242
|
+
// messaging
|
|
243
|
+
['messaging:tools/messaging-auth-test.ts', messagingAuthTest],
|
|
244
|
+
['messaging:tools/messaging-list-conversations.ts', messagingListConversations],
|
|
245
|
+
['messaging:tools/messaging-read.ts', messagingRead],
|
|
246
|
+
['messaging:tools/messaging-search.ts', messagingSearch],
|
|
247
|
+
['messaging:tools/messaging-send.ts', messagingSend],
|
|
248
|
+
['messaging:tools/messaging-reply.ts', messagingReply],
|
|
249
|
+
['messaging:tools/messaging-mark-read.ts', messagingMarkRead],
|
|
250
|
+
['messaging:tools/slack-add-reaction.ts', slackAddReaction],
|
|
251
|
+
['messaging:tools/slack-leave-channel.ts', slackLeaveChannel],
|
|
252
|
+
['messaging:tools/messaging-analyze-activity.ts', messagingAnalyzeActivity],
|
|
253
|
+
['messaging:tools/messaging-analyze-style.ts', messagingAnalyzeStyle],
|
|
254
|
+
['messaging:tools/messaging-draft.ts', messagingDraft],
|
|
255
|
+
['messaging:tools/gmail-archive.ts', gmailArchive],
|
|
256
|
+
['messaging:tools/gmail-batch-archive.ts', gmailBatchArchive],
|
|
257
|
+
['messaging:tools/gmail-label.ts', gmailLabel],
|
|
258
|
+
['messaging:tools/gmail-batch-label.ts', gmailBatchLabel],
|
|
259
|
+
['messaging:tools/gmail-trash.ts', gmailTrash],
|
|
260
|
+
['messaging:tools/gmail-unsubscribe.ts', gmailUnsubscribe],
|
|
261
|
+
['messaging:tools/gmail-draft.ts', gmailDraft],
|
|
262
|
+
|
|
263
|
+
// playbooks
|
|
264
|
+
['playbooks:tools/playbook-create.ts', playbookCreate],
|
|
265
|
+
['playbooks:tools/playbook-list.ts', playbookList],
|
|
266
|
+
['playbooks:tools/playbook-update.ts', playbookUpdate],
|
|
267
|
+
['playbooks:tools/playbook-delete.ts', playbookDelete],
|
|
268
|
+
|
|
269
|
+
// reminder
|
|
270
|
+
['reminder:tools/reminder-create.ts', reminderCreate],
|
|
271
|
+
['reminder:tools/reminder-list.ts', reminderList],
|
|
272
|
+
['reminder:tools/reminder-cancel.ts', reminderCancel],
|
|
273
|
+
|
|
274
|
+
// schedule
|
|
275
|
+
['schedule:tools/schedule-create.ts', scheduleCreate],
|
|
276
|
+
['schedule:tools/schedule-list.ts', scheduleList],
|
|
277
|
+
['schedule:tools/schedule-update.ts', scheduleUpdate],
|
|
278
|
+
['schedule:tools/schedule-delete.ts', scheduleDelete],
|
|
279
|
+
|
|
280
|
+
// subagent
|
|
281
|
+
['subagent:tools/subagent-spawn.ts', subagentSpawn],
|
|
282
|
+
['subagent:tools/subagent-status.ts', subagentStatus],
|
|
283
|
+
['subagent:tools/subagent-abort.ts', subagentAbort],
|
|
284
|
+
['subagent:tools/subagent-message.ts', subagentMessage],
|
|
285
|
+
['subagent:tools/subagent-read.ts', subagentRead],
|
|
286
|
+
|
|
287
|
+
// tasks
|
|
288
|
+
['tasks:tools/task-save.ts', taskSave],
|
|
289
|
+
['tasks:tools/task-run.ts', taskRun],
|
|
290
|
+
['tasks:tools/task-list.ts', taskList],
|
|
291
|
+
['tasks:tools/task-delete.ts', taskDelete],
|
|
292
|
+
['tasks:tools/task-list-show.ts', taskListShow],
|
|
293
|
+
['tasks:tools/task-list-add.ts', taskListAdd],
|
|
294
|
+
['tasks:tools/task-list-update.ts', taskListUpdate],
|
|
295
|
+
['tasks:tools/task-list-remove.ts', taskListRemove],
|
|
296
|
+
['tasks:tools/task-queue-run.ts', taskQueueRun],
|
|
297
|
+
|
|
298
|
+
// transcribe
|
|
299
|
+
['transcribe:tools/transcribe-media.ts', transcribeMedia],
|
|
300
|
+
|
|
301
|
+
// watcher
|
|
302
|
+
['watcher:tools/watcher-create.ts', watcherCreate],
|
|
303
|
+
['watcher:tools/watcher-list.ts', watcherList],
|
|
304
|
+
['watcher:tools/watcher-update.ts', watcherUpdate],
|
|
305
|
+
['watcher:tools/watcher-delete.ts', watcherDelete],
|
|
306
|
+
['watcher:tools/watcher-digest.ts', watcherDigest],
|
|
307
|
+
|
|
308
|
+
// weather
|
|
309
|
+
['weather:tools/get-weather.ts', getWeather],
|
|
310
|
+
]);
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const VALID_CALL_PROVIDERS = ['twilio'] as const;
|
|
4
|
+
const VALID_CALL_VOICE_MODES = ['twilio_standard', 'twilio_elevenlabs_tts', 'elevenlabs_agent'] as const;
|
|
5
|
+
export const VALID_CALLER_IDENTITY_MODES = ['assistant_number', 'user_number'] as const;
|
|
6
|
+
const VALID_CALL_TRANSCRIPTION_PROVIDERS = ['Deepgram', 'Google'] as const;
|
|
7
|
+
|
|
8
|
+
export const CallsDisclosureConfigSchema = z.object({
|
|
9
|
+
enabled: z
|
|
10
|
+
.boolean({ error: 'calls.disclosure.enabled must be a boolean' })
|
|
11
|
+
.default(true),
|
|
12
|
+
text: z
|
|
13
|
+
.string({ error: 'calls.disclosure.text must be a string' })
|
|
14
|
+
.default('At the very beginning of the call, introduce yourself as an assistant calling on behalf of the person you represent. Do not say "AI assistant".'),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const CallsSafetyConfigSchema = z.object({
|
|
18
|
+
denyCategories: z
|
|
19
|
+
.array(z.string({ error: 'calls.safety.denyCategories values must be strings' }))
|
|
20
|
+
.default([]),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const CallsElevenLabsConfigSchema = z.object({
|
|
24
|
+
voiceId: z
|
|
25
|
+
.string({ error: 'calls.voice.elevenlabs.voiceId must be a string' })
|
|
26
|
+
.default(''),
|
|
27
|
+
voiceModelId: z
|
|
28
|
+
.string({ error: 'calls.voice.elevenlabs.voiceModelId must be a string' })
|
|
29
|
+
.default(''),
|
|
30
|
+
speed: z
|
|
31
|
+
.number({ error: 'calls.voice.elevenlabs.speed must be a number' })
|
|
32
|
+
.min(0.7, 'calls.voice.elevenlabs.speed must be >= 0.7')
|
|
33
|
+
.max(1.2, 'calls.voice.elevenlabs.speed must be <= 1.2')
|
|
34
|
+
.default(1.0),
|
|
35
|
+
stability: z
|
|
36
|
+
.number({ error: 'calls.voice.elevenlabs.stability must be a number' })
|
|
37
|
+
.min(0, 'calls.voice.elevenlabs.stability must be >= 0')
|
|
38
|
+
.max(1, 'calls.voice.elevenlabs.stability must be <= 1')
|
|
39
|
+
.default(0.5),
|
|
40
|
+
similarityBoost: z
|
|
41
|
+
.number({ error: 'calls.voice.elevenlabs.similarityBoost must be a number' })
|
|
42
|
+
.min(0, 'calls.voice.elevenlabs.similarityBoost must be >= 0')
|
|
43
|
+
.max(1, 'calls.voice.elevenlabs.similarityBoost must be <= 1')
|
|
44
|
+
.default(0.75),
|
|
45
|
+
useSpeakerBoost: z
|
|
46
|
+
.boolean({ error: 'calls.voice.elevenlabs.useSpeakerBoost must be a boolean' })
|
|
47
|
+
.default(true),
|
|
48
|
+
agentId: z
|
|
49
|
+
.string({ error: 'calls.voice.elevenlabs.agentId must be a string' })
|
|
50
|
+
.default(''),
|
|
51
|
+
apiBaseUrl: z
|
|
52
|
+
.string({ error: 'calls.voice.elevenlabs.apiBaseUrl must be a string' })
|
|
53
|
+
.default('https://api.elevenlabs.io'),
|
|
54
|
+
registerCallTimeoutMs: z
|
|
55
|
+
.number({ error: 'calls.voice.elevenlabs.registerCallTimeoutMs must be a number' })
|
|
56
|
+
.int('calls.voice.elevenlabs.registerCallTimeoutMs must be an integer')
|
|
57
|
+
.min(1000, 'calls.voice.elevenlabs.registerCallTimeoutMs must be >= 1000')
|
|
58
|
+
.max(15000, 'calls.voice.elevenlabs.registerCallTimeoutMs must be <= 15000')
|
|
59
|
+
.default(5000),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const CallsVoiceConfigSchema = z.object({
|
|
63
|
+
mode: z
|
|
64
|
+
.enum(VALID_CALL_VOICE_MODES, {
|
|
65
|
+
error: `calls.voice.mode must be one of: ${VALID_CALL_VOICE_MODES.join(', ')}`,
|
|
66
|
+
})
|
|
67
|
+
.default('twilio_standard'),
|
|
68
|
+
language: z
|
|
69
|
+
.string({ error: 'calls.voice.language must be a string' })
|
|
70
|
+
.default('en-US'),
|
|
71
|
+
transcriptionProvider: z
|
|
72
|
+
.enum(VALID_CALL_TRANSCRIPTION_PROVIDERS, {
|
|
73
|
+
error: `calls.voice.transcriptionProvider must be one of: ${VALID_CALL_TRANSCRIPTION_PROVIDERS.join(', ')}`,
|
|
74
|
+
})
|
|
75
|
+
.default('Deepgram'),
|
|
76
|
+
fallbackToStandardOnError: z
|
|
77
|
+
.boolean({ error: 'calls.voice.fallbackToStandardOnError must be a boolean' })
|
|
78
|
+
.default(true),
|
|
79
|
+
elevenlabs: CallsElevenLabsConfigSchema.default({
|
|
80
|
+
voiceId: '',
|
|
81
|
+
voiceModelId: '',
|
|
82
|
+
speed: 1.0,
|
|
83
|
+
stability: 0.5,
|
|
84
|
+
similarityBoost: 0.75,
|
|
85
|
+
useSpeakerBoost: true,
|
|
86
|
+
agentId: '',
|
|
87
|
+
apiBaseUrl: 'https://api.elevenlabs.io',
|
|
88
|
+
registerCallTimeoutMs: 5000,
|
|
89
|
+
}),
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export const CallerIdentityConfigSchema = z.object({
|
|
93
|
+
allowPerCallOverride: z
|
|
94
|
+
.boolean({ error: 'calls.callerIdentity.allowPerCallOverride must be a boolean' })
|
|
95
|
+
.default(true),
|
|
96
|
+
userNumber: z
|
|
97
|
+
.string({ error: 'calls.callerIdentity.userNumber must be a string' })
|
|
98
|
+
.optional(),
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export const CallsVerificationConfigSchema = z.object({
|
|
102
|
+
enabled: z
|
|
103
|
+
.boolean({ error: 'calls.verification.enabled must be a boolean' })
|
|
104
|
+
.default(false),
|
|
105
|
+
maxAttempts: z
|
|
106
|
+
.number({ error: 'calls.verification.maxAttempts must be a number' })
|
|
107
|
+
.int('calls.verification.maxAttempts must be an integer')
|
|
108
|
+
.positive('calls.verification.maxAttempts must be a positive integer')
|
|
109
|
+
.default(3),
|
|
110
|
+
codeLength: z
|
|
111
|
+
.number({ error: 'calls.verification.codeLength must be a number' })
|
|
112
|
+
.int('calls.verification.codeLength must be an integer')
|
|
113
|
+
.positive('calls.verification.codeLength must be a positive integer')
|
|
114
|
+
.default(6),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export const CallsConfigSchema = z.object({
|
|
118
|
+
enabled: z
|
|
119
|
+
.boolean({ error: 'calls.enabled must be a boolean' })
|
|
120
|
+
.default(true),
|
|
121
|
+
provider: z
|
|
122
|
+
.enum(VALID_CALL_PROVIDERS, {
|
|
123
|
+
error: `calls.provider must be one of: ${VALID_CALL_PROVIDERS.join(', ')}`,
|
|
124
|
+
})
|
|
125
|
+
.default('twilio'),
|
|
126
|
+
maxDurationSeconds: z
|
|
127
|
+
.number({ error: 'calls.maxDurationSeconds must be a number' })
|
|
128
|
+
.int('calls.maxDurationSeconds must be an integer')
|
|
129
|
+
.positive('calls.maxDurationSeconds must be a positive integer')
|
|
130
|
+
.max(2_147_483, 'calls.maxDurationSeconds must be at most 2147483 (setTimeout-safe limit)')
|
|
131
|
+
.default(3600),
|
|
132
|
+
userConsultTimeoutSeconds: z
|
|
133
|
+
.number({ error: 'calls.userConsultTimeoutSeconds must be a number' })
|
|
134
|
+
.int('calls.userConsultTimeoutSeconds must be an integer')
|
|
135
|
+
.positive('calls.userConsultTimeoutSeconds must be a positive integer')
|
|
136
|
+
.max(2_147_483, 'calls.userConsultTimeoutSeconds must be at most 2147483 (setTimeout-safe limit)')
|
|
137
|
+
.default(120),
|
|
138
|
+
disclosure: CallsDisclosureConfigSchema.default({
|
|
139
|
+
enabled: true,
|
|
140
|
+
text: 'At the very beginning of the call, introduce yourself as an assistant calling on behalf of the person you represent. Do not say "AI assistant".',
|
|
141
|
+
}),
|
|
142
|
+
safety: CallsSafetyConfigSchema.default({
|
|
143
|
+
denyCategories: [],
|
|
144
|
+
}),
|
|
145
|
+
voice: CallsVoiceConfigSchema.default({
|
|
146
|
+
mode: 'twilio_standard',
|
|
147
|
+
language: 'en-US',
|
|
148
|
+
transcriptionProvider: 'Deepgram',
|
|
149
|
+
fallbackToStandardOnError: true,
|
|
150
|
+
elevenlabs: {
|
|
151
|
+
voiceId: '',
|
|
152
|
+
voiceModelId: '',
|
|
153
|
+
speed: 1.0,
|
|
154
|
+
stability: 0.5,
|
|
155
|
+
similarityBoost: 0.75,
|
|
156
|
+
useSpeakerBoost: true,
|
|
157
|
+
agentId: '',
|
|
158
|
+
apiBaseUrl: 'https://api.elevenlabs.io',
|
|
159
|
+
registerCallTimeoutMs: 5000,
|
|
160
|
+
},
|
|
161
|
+
}),
|
|
162
|
+
model: z
|
|
163
|
+
.string({ error: 'calls.model must be a string' })
|
|
164
|
+
.optional(),
|
|
165
|
+
callerIdentity: CallerIdentityConfigSchema.default({
|
|
166
|
+
allowPerCallOverride: true,
|
|
167
|
+
}),
|
|
168
|
+
verification: CallsVerificationConfigSchema.default({
|
|
169
|
+
enabled: false,
|
|
170
|
+
maxAttempts: 3,
|
|
171
|
+
codeLength: 6,
|
|
172
|
+
}),
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export type CallsConfig = z.infer<typeof CallsConfigSchema>;
|
|
176
|
+
export type CallsDisclosureConfig = z.infer<typeof CallsDisclosureConfigSchema>;
|
|
177
|
+
export type CallsSafetyConfig = z.infer<typeof CallsSafetyConfigSchema>;
|
|
178
|
+
export type CallsVoiceConfig = z.infer<typeof CallsVoiceConfigSchema>;
|
|
179
|
+
export type CallsElevenLabsConfig = z.infer<typeof CallsElevenLabsConfigSchema>;
|
|
180
|
+
export type CallerIdentityConfig = z.infer<typeof CallerIdentityConfigSchema>;
|
|
181
|
+
export type CallsVerificationConfig = z.infer<typeof CallsVerificationConfigSchema>;
|