@vellumai/assistant 0.4.52 → 0.4.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/ARCHITECTURE.md +2 -2
  2. package/bun.lock +62 -349
  3. package/docs/architecture/integrations.md +1 -1
  4. package/docs/architecture/keychain-broker.md +91 -40
  5. package/docs/architecture/memory.md +3 -3
  6. package/docs/architecture/security.md +2 -2
  7. package/knip.json +7 -29
  8. package/package.json +2 -9
  9. package/src/__tests__/agent-loop.test.ts +1 -1
  10. package/src/__tests__/app-git-history.test.ts +0 -2
  11. package/src/__tests__/app-git-service.test.ts +1 -6
  12. package/src/__tests__/approval-cascade.test.ts +3 -2
  13. package/src/__tests__/approval-routes-http.test.ts +0 -1
  14. package/src/__tests__/asset-materialize-tool.test.ts +0 -1
  15. package/src/__tests__/asset-search-tool.test.ts +0 -1
  16. package/src/__tests__/assistant-events-sse-hardening.test.ts +0 -1
  17. package/src/__tests__/attachments-store.test.ts +0 -1
  18. package/src/__tests__/avatar-e2e.test.ts +5 -1
  19. package/src/__tests__/browser-fill-credential.test.ts +4 -6
  20. package/src/__tests__/btw-routes.test.ts +39 -0
  21. package/src/__tests__/call-controller.test.ts +0 -1
  22. package/src/__tests__/call-domain.test.ts +1 -1
  23. package/src/__tests__/call-routes-http.test.ts +1 -3
  24. package/src/__tests__/canonical-guardian-store.test.ts +33 -2
  25. package/src/__tests__/channel-guardian.test.ts +4 -4
  26. package/src/__tests__/channel-readiness-routes.test.ts +0 -1
  27. package/src/__tests__/channel-readiness-service.test.ts +1 -1
  28. package/src/__tests__/checker.test.ts +13 -11
  29. package/src/__tests__/claude-code-skill-regression.test.ts +5 -2
  30. package/src/__tests__/claude-code-tool-profiles.test.ts +7 -3
  31. package/src/__tests__/config-loader-backfill.test.ts +1 -5
  32. package/src/__tests__/config-schema.test.ts +9 -46
  33. package/src/__tests__/config-watcher.test.ts +11 -3
  34. package/src/__tests__/conversation-routes-slash-commands.test.ts +0 -1
  35. package/src/__tests__/credential-broker-browser-fill.test.ts +27 -24
  36. package/src/__tests__/credential-broker-server-use.test.ts +76 -40
  37. package/src/__tests__/credential-security-e2e.test.ts +1 -6
  38. package/src/__tests__/credential-security-invariants.test.ts +27 -8
  39. package/src/__tests__/credential-vault-unit.test.ts +32 -16
  40. package/src/__tests__/credential-vault.test.ts +40 -28
  41. package/src/__tests__/credentials-cli.test.ts +1 -21
  42. package/src/__tests__/email-invite-adapter.test.ts +0 -1
  43. package/src/__tests__/error-handler-friendly-messages.test.ts +4 -5
  44. package/src/__tests__/fixtures/credential-security-fixtures.ts +3 -3
  45. package/src/__tests__/fixtures/media-reuse-fixtures.ts +3 -79
  46. package/src/__tests__/gateway-only-enforcement.test.ts +1 -23
  47. package/src/__tests__/guardian-action-conversation-turn.test.ts +8 -8
  48. package/src/__tests__/guardian-action-late-reply.test.ts +13 -14
  49. package/src/__tests__/guardian-action-store.test.ts +0 -57
  50. package/src/__tests__/guardian-outbound-http.test.ts +1 -1
  51. package/src/__tests__/guardian-verification-voice-binding.test.ts +1 -3
  52. package/src/__tests__/hooks-blocking.test.ts +1 -1
  53. package/src/__tests__/hooks-config.test.ts +5 -29
  54. package/src/__tests__/hooks-discovery.test.ts +1 -1
  55. package/src/__tests__/hooks-integration.test.ts +1 -1
  56. package/src/__tests__/hooks-manager.test.ts +1 -1
  57. package/src/__tests__/hooks-runner.test.ts +1 -23
  58. package/src/__tests__/hooks-settings.test.ts +1 -1
  59. package/src/__tests__/hooks-templates.test.ts +1 -1
  60. package/src/__tests__/host-shell-tool.test.ts +0 -1
  61. package/src/__tests__/http-user-message-parity.test.ts +19 -0
  62. package/src/__tests__/integration-status.test.ts +0 -1
  63. package/src/__tests__/invite-routes-http.test.ts +0 -3
  64. package/src/__tests__/list-messages-attachments.test.ts +0 -1
  65. package/src/__tests__/llm-usage-store.test.ts +50 -0
  66. package/src/__tests__/log-export-workspace.test.ts +233 -0
  67. package/src/__tests__/managed-proxy-context.test.ts +41 -41
  68. package/src/__tests__/managed-skill-lifecycle.test.ts +0 -1
  69. package/src/__tests__/media-generate-image.test.ts +9 -4
  70. package/src/__tests__/media-reuse-story.e2e.test.ts +1 -7
  71. package/src/__tests__/memory-regressions.experimental.test.ts +4 -4
  72. package/src/__tests__/memory-regressions.test.ts +27 -28
  73. package/src/__tests__/memory-retrieval.benchmark.test.ts +1 -1
  74. package/src/__tests__/memory-upsert-concurrency.test.ts +4 -4
  75. package/src/__tests__/migration-cross-version-compatibility.test.ts +0 -1
  76. package/src/__tests__/migration-export-http.test.ts +0 -1
  77. package/src/__tests__/migration-import-commit-http.test.ts +0 -1
  78. package/src/__tests__/migration-import-preflight-http.test.ts +0 -1
  79. package/src/__tests__/migration-validate-http.test.ts +0 -1
  80. package/src/__tests__/notification-decision-fallback.test.ts +1 -1
  81. package/src/__tests__/notification-schedule-dedup.test.ts +237 -0
  82. package/src/__tests__/oauth-cli.test.ts +2 -14
  83. package/src/__tests__/oauth-store.test.ts +3 -7
  84. package/src/__tests__/oauth2-gateway-transport.test.ts +5 -4
  85. package/src/__tests__/onboarding-starter-tasks.test.ts +1 -1
  86. package/src/__tests__/onboarding-template-contract.test.ts +1 -2
  87. package/src/__tests__/openai-provider.test.ts +7 -7
  88. package/src/__tests__/platform.test.ts +14 -4
  89. package/src/__tests__/pricing.test.ts +0 -234
  90. package/src/__tests__/provider-commit-message-generator.test.ts +19 -15
  91. package/src/__tests__/provider-fail-open-selection.test.ts +67 -62
  92. package/src/__tests__/provider-managed-proxy-integration.test.ts +88 -85
  93. package/src/__tests__/provider-registry-ollama.test.ts +10 -4
  94. package/src/__tests__/public-ingress-urls.test.ts +1 -1
  95. package/src/__tests__/recording-handler.test.ts +0 -1
  96. package/src/__tests__/registry.test.ts +3 -103
  97. package/src/__tests__/relay-server.test.ts +0 -1
  98. package/src/__tests__/runtime-attachment-metadata.test.ts +0 -1
  99. package/src/__tests__/runtime-events-sse-parity.test.ts +0 -1
  100. package/src/__tests__/runtime-events-sse.test.ts +0 -1
  101. package/src/__tests__/script-proxy-injection-runtime.test.ts +2 -7
  102. package/src/__tests__/secret-onetime-send.test.ts +1 -6
  103. package/src/__tests__/secret-routes-managed-proxy.test.ts +6 -14
  104. package/src/__tests__/secret-scanner-executor.test.ts +0 -1
  105. package/src/__tests__/secure-keys.test.ts +241 -229
  106. package/src/__tests__/send-endpoint-busy.test.ts +0 -1
  107. package/src/__tests__/session-abort-tool-results.test.ts +3 -2
  108. package/src/__tests__/session-agent-loop-overflow.test.ts +1012 -838
  109. package/src/__tests__/session-agent-loop.test.ts +2 -2
  110. package/src/__tests__/session-confirmation-signals.test.ts +3 -2
  111. package/src/__tests__/session-error.test.ts +5 -4
  112. package/src/__tests__/session-history-web-search.test.ts +34 -9
  113. package/src/__tests__/session-messaging-secret-redirect.test.ts +1 -7
  114. package/src/__tests__/session-pre-run-repair.test.ts +3 -2
  115. package/src/__tests__/session-provider-retry-repair.test.ts +31 -27
  116. package/src/__tests__/session-queue.test.ts +5 -5
  117. package/src/__tests__/session-runtime-assembly.test.ts +118 -0
  118. package/src/__tests__/session-slash-known.test.ts +31 -14
  119. package/src/__tests__/session-slash-queue.test.ts +3 -2
  120. package/src/__tests__/session-slash-unknown.test.ts +3 -2
  121. package/src/__tests__/session-workspace-cache-state.test.ts +3 -1
  122. package/src/__tests__/session-workspace-injection.test.ts +3 -2
  123. package/src/__tests__/session-workspace-tool-tracking.test.ts +3 -2
  124. package/src/__tests__/shell-tool-proxy-mode.test.ts +0 -1
  125. package/src/__tests__/skill-projection-feature-flag.test.ts +0 -1
  126. package/src/__tests__/skill-script-runner-sandbox.test.ts +0 -1
  127. package/src/__tests__/skillssh-registry.test.ts +21 -0
  128. package/src/__tests__/slack-channel-config.test.ts +1 -7
  129. package/src/__tests__/slack-share-routes.test.ts +1 -1
  130. package/src/__tests__/swarm-recursion.test.ts +4 -1
  131. package/src/__tests__/swarm-session-integration.test.ts +24 -14
  132. package/src/__tests__/swarm-tool.test.ts +4 -2
  133. package/src/__tests__/task-compiler.test.ts +1 -1
  134. package/src/__tests__/telegram-bot-username-resolution.test.ts +2 -4
  135. package/src/__tests__/test-support/browser-skill-harness.ts +0 -18
  136. package/src/__tests__/test-support/computer-use-skill-harness.ts +0 -23
  137. package/src/__tests__/token-estimator-accuracy.benchmark.test.ts +1521 -0
  138. package/src/__tests__/tool-execution-abort-cleanup.test.ts +0 -1
  139. package/src/__tests__/tool-executor-lifecycle-events.test.ts +0 -1
  140. package/src/__tests__/tool-executor-shell-integration.test.ts +0 -1
  141. package/src/__tests__/tool-executor.test.ts +1 -2
  142. package/src/__tests__/trust-store.test.ts +8 -83
  143. package/src/__tests__/twilio-config.test.ts +0 -1
  144. package/src/__tests__/twilio-provider.test.ts +0 -5
  145. package/src/__tests__/twilio-routes.test.ts +2 -3
  146. package/src/__tests__/usage-cache-backfill-migration.test.ts +10 -10
  147. package/src/__tests__/verification-control-plane-policy.test.ts +0 -1
  148. package/src/__tests__/voice-quality.test.ts +2 -1
  149. package/src/__tests__/voice-scoped-grant-consumer.test.ts +0 -1
  150. package/src/__tests__/web-search.test.ts +1 -1
  151. package/src/agent/loop.ts +17 -1
  152. package/src/bundler/app-bundler.ts +40 -24
  153. package/src/calls/call-controller.ts +16 -0
  154. package/src/calls/guardian-question-copy.ts +1 -1
  155. package/src/calls/relay-server.ts +29 -13
  156. package/src/calls/voice-control-protocol.ts +1 -0
  157. package/src/calls/voice-quality.ts +1 -1
  158. package/src/calls/voice-session-bridge.ts +9 -3
  159. package/src/channels/types.ts +16 -0
  160. package/src/cli/commands/bash.ts +173 -0
  161. package/src/cli/commands/doctor.ts +15 -57
  162. package/src/cli/commands/memory.ts +3 -5
  163. package/src/cli/commands/oauth/connections.ts +4 -2
  164. package/src/cli/commands/oauth/providers.ts +1 -13
  165. package/src/cli/commands/sessions.ts +1 -1
  166. package/src/cli/commands/usage.ts +359 -0
  167. package/src/cli/http-client.ts +22 -12
  168. package/src/cli/program.ts +4 -0
  169. package/src/cli/reference.ts +2 -0
  170. package/src/cli.ts +251 -181
  171. package/src/config/assistant-feature-flags.ts +0 -7
  172. package/src/config/bundled-skills/chatgpt-import/tools/chatgpt-import.ts +1 -1
  173. package/src/config/bundled-skills/claude-code/SKILL.md +1 -1
  174. package/src/config/bundled-skills/claude-code/TOOLS.json +1 -1
  175. package/src/config/bundled-skills/gmail/SKILL.md +0 -1
  176. package/src/config/bundled-skills/image-studio/tools/media-generate-image.ts +4 -3
  177. package/src/config/bundled-skills/media-processing/services/reduce.ts +1 -1
  178. package/src/config/bundled-skills/media-processing/tools/analyze-keyframes.ts +3 -5
  179. package/src/config/bundled-skills/media-processing/tools/extract-keyframes.ts +2 -3
  180. package/src/config/bundled-skills/messaging/SKILL.md +0 -1
  181. package/src/config/bundled-skills/phone-calls/references/CONFIG.md +1 -1
  182. package/src/config/bundled-skills/sequences/SKILL.md +0 -1
  183. package/src/config/bundled-skills/transcribe/tools/transcribe-media.ts +5 -6
  184. package/src/config/env.ts +13 -0
  185. package/src/config/feature-flag-registry.json +15 -39
  186. package/src/config/loader.ts +7 -135
  187. package/src/config/schema.ts +0 -6
  188. package/src/config/schemas/channels.ts +1 -0
  189. package/src/config/schemas/elevenlabs.ts +2 -2
  190. package/src/config/schemas/security.ts +1 -2
  191. package/src/config/skills.ts +1 -1
  192. package/src/contacts/contact-store.ts +21 -75
  193. package/src/contacts/contacts-write.ts +6 -6
  194. package/src/contacts/types.ts +2 -0
  195. package/src/context/token-estimator.ts +35 -2
  196. package/src/context/window-manager.ts +16 -2
  197. package/src/daemon/approved-devices-store.ts +0 -44
  198. package/src/daemon/classifier.ts +1 -1
  199. package/src/daemon/config-watcher.ts +35 -11
  200. package/src/daemon/context-overflow-reducer.ts +13 -2
  201. package/src/daemon/handlers/config-ingress.ts +25 -8
  202. package/src/daemon/handlers/config-model.ts +22 -16
  203. package/src/daemon/handlers/config-telegram.ts +18 -6
  204. package/src/daemon/handlers/dictation.ts +0 -429
  205. package/src/daemon/handlers/sessions.ts +4 -116
  206. package/src/daemon/handlers/skills.ts +2 -201
  207. package/src/daemon/lifecycle.ts +21 -20
  208. package/src/daemon/message-types/contacts.ts +2 -0
  209. package/src/daemon/message-types/integrations.ts +1 -0
  210. package/src/daemon/message-types/sessions.ts +2 -0
  211. package/src/daemon/parse-actual-tokens-from-error.test.ts +75 -0
  212. package/src/daemon/providers-setup.ts +1 -1
  213. package/src/daemon/server.ts +42 -5
  214. package/src/daemon/session-agent-loop-handlers.ts +1 -1
  215. package/src/daemon/session-agent-loop.ts +27 -79
  216. package/src/daemon/session-error.ts +5 -4
  217. package/src/daemon/session-process.ts +17 -10
  218. package/src/daemon/session-runtime-assembly.ts +50 -0
  219. package/src/daemon/session-slash.ts +34 -22
  220. package/src/daemon/session.ts +1 -0
  221. package/src/daemon/shutdown-handlers.ts +15 -0
  222. package/src/daemon/watch-handler.ts +2 -2
  223. package/src/email/guardrails.ts +1 -1
  224. package/src/email/service.ts +0 -5
  225. package/src/events/domain-events.ts +1 -0
  226. package/src/hooks/templates.ts +1 -1
  227. package/src/media/app-icon-generator.ts +4 -3
  228. package/src/media/avatar-router.ts +5 -4
  229. package/src/media/gemini-image-service.ts +5 -5
  230. package/src/memory/admin.ts +2 -2
  231. package/src/memory/app-git-service.ts +0 -7
  232. package/src/memory/canonical-guardian-store.ts +25 -3
  233. package/src/memory/conversation-crud.ts +1 -1
  234. package/src/memory/conversation-title-service.ts +2 -2
  235. package/src/memory/db-init.ts +12 -0
  236. package/src/memory/embedding-backend.ts +46 -33
  237. package/src/memory/external-conversation-store.ts +0 -30
  238. package/src/memory/guardian-action-store.ts +0 -31
  239. package/src/memory/guardian-approvals.ts +1 -56
  240. package/src/memory/indexer.ts +4 -3
  241. package/src/memory/items-extractor.ts +1 -1
  242. package/src/memory/job-handlers/backfill.ts +5 -2
  243. package/src/memory/job-handlers/index-maintenance.ts +2 -2
  244. package/src/memory/job-handlers/media-processing.ts +2 -2
  245. package/src/memory/job-handlers/summarization.ts +1 -1
  246. package/src/memory/job-utils.ts +1 -2
  247. package/src/memory/jobs-worker.ts +2 -2
  248. package/src/memory/llm-usage-store.ts +57 -11
  249. package/src/memory/media-store.ts +4 -535
  250. package/src/memory/migrations/032-guardian-delivery-conversation-index.ts +2 -2
  251. package/src/memory/migrations/110-channel-guardian.ts +0 -1
  252. package/src/memory/migrations/158-channel-interaction-columns.ts +18 -0
  253. package/src/memory/migrations/159-drop-contact-interaction-columns.ts +16 -0
  254. package/src/memory/migrations/160-drop-loopback-port-column.ts +13 -0
  255. package/src/memory/migrations/index.ts +3 -0
  256. package/src/memory/published-pages-store.ts +0 -83
  257. package/src/memory/qdrant-circuit-breaker.ts +0 -8
  258. package/src/memory/retriever.test.ts +19 -12
  259. package/src/memory/retriever.ts +1 -1
  260. package/src/memory/schema/contacts.ts +2 -2
  261. package/src/memory/schema/oauth.ts +0 -1
  262. package/src/memory/search/semantic.ts +1 -8
  263. package/src/memory/shared-app-links-store.ts +0 -15
  264. package/src/messaging/registry.ts +0 -5
  265. package/src/messaging/style-analyzer.ts +1 -1
  266. package/src/notifications/copy-composer.ts +5 -13
  267. package/src/notifications/decision-engine.ts +2 -2
  268. package/src/notifications/deliveries-store.ts +0 -39
  269. package/src/notifications/guardian-question-mode.ts +6 -10
  270. package/src/notifications/preference-extractor.ts +1 -1
  271. package/src/oauth/byo-connection.test.ts +29 -20
  272. package/src/oauth/connect-orchestrator.ts +5 -3
  273. package/src/oauth/connect-types.ts +9 -2
  274. package/src/oauth/manual-token-connection.ts +9 -7
  275. package/src/oauth/oauth-store.ts +2 -8
  276. package/src/oauth/provider-behaviors.ts +11 -1
  277. package/src/oauth/seed-providers.ts +13 -5
  278. package/src/permissions/checker.ts +21 -2
  279. package/src/permissions/shell-identity.ts +0 -5
  280. package/src/permissions/trust-store.ts +0 -37
  281. package/src/prompts/__tests__/build-cli-reference-section.test.ts +1 -1
  282. package/src/prompts/system-prompt.ts +5 -14
  283. package/src/prompts/templates/BOOTSTRAP.md +1 -3
  284. package/src/providers/anthropic/client.ts +16 -8
  285. package/src/providers/managed-proxy/constants.ts +9 -11
  286. package/src/providers/managed-proxy/context.ts +14 -9
  287. package/src/providers/provider-send-message.ts +4 -52
  288. package/src/providers/registry.ts +29 -57
  289. package/src/providers/types.ts +1 -1
  290. package/src/runtime/actor-token-store.ts +0 -23
  291. package/src/runtime/auth/route-policy.ts +4 -0
  292. package/src/runtime/channel-invite-transports/telegram.ts +12 -6
  293. package/src/runtime/channel-retry-sweep.ts +6 -0
  294. package/src/runtime/http-router.ts +5 -1
  295. package/src/runtime/http-server.ts +101 -4
  296. package/src/runtime/http-types.ts +1 -0
  297. package/src/runtime/invite-instruction-generator.ts +25 -51
  298. package/src/runtime/invite-service.ts +0 -20
  299. package/src/runtime/middleware/error-handler.ts +1 -2
  300. package/src/runtime/routes/app-management-routes.ts +1 -0
  301. package/src/runtime/routes/attachment-routes.ts +1 -1
  302. package/src/runtime/routes/brain-graph-routes.ts +1 -1
  303. package/src/runtime/routes/btw-routes.ts +20 -1
  304. package/src/runtime/routes/call-routes.ts +1 -1
  305. package/src/runtime/routes/conversation-routes.ts +64 -24
  306. package/src/runtime/routes/debug-routes.ts +1 -1
  307. package/src/runtime/routes/diagnostics-routes.ts +2 -2
  308. package/src/runtime/routes/documents-routes.ts +3 -3
  309. package/src/runtime/routes/global-search-routes.ts +1 -1
  310. package/src/runtime/routes/guardian-bootstrap-routes.ts +0 -20
  311. package/src/runtime/routes/guardian-refresh-routes.ts +0 -20
  312. package/src/runtime/routes/inbound-message-handler.ts +10 -2
  313. package/src/runtime/routes/inbound-stages/background-dispatch.ts +4 -0
  314. package/src/runtime/routes/inbound-stages/edit-intercept.ts +5 -5
  315. package/src/runtime/routes/integrations/slack/share.ts +5 -5
  316. package/src/runtime/routes/log-export-routes.ts +122 -10
  317. package/src/runtime/routes/secret-routes.ts +4 -4
  318. package/src/runtime/routes/session-query-routes.ts +3 -3
  319. package/src/runtime/routes/settings-routes.ts +53 -0
  320. package/src/runtime/routes/trust-rules-routes.ts +1 -1
  321. package/src/runtime/routes/workspace-routes.ts +3 -0
  322. package/src/runtime/verification-templates.ts +1 -1
  323. package/src/security/credential-backend.ts +148 -0
  324. package/src/security/oauth2.ts +5 -5
  325. package/src/security/secret-allowlist.ts +1 -1
  326. package/src/security/secure-keys.ts +98 -160
  327. package/src/security/token-manager.ts +0 -7
  328. package/src/sequence/guardrails.ts +0 -4
  329. package/src/sequence/store.ts +1 -20
  330. package/src/sequence/types.ts +1 -36
  331. package/src/signals/bash.ts +157 -0
  332. package/src/signals/cancel.ts +69 -0
  333. package/src/signals/conversation-undo.ts +127 -0
  334. package/src/signals/trust-rule.ts +174 -0
  335. package/src/skills/clawhub.ts +5 -5
  336. package/src/skills/managed-store.ts +4 -4
  337. package/src/skills/skillssh-registry.ts +6 -1
  338. package/src/swarm/backend-claude-code.ts +6 -6
  339. package/src/swarm/worker-backend.ts +1 -1
  340. package/src/swarm/worker-runner.ts +1 -1
  341. package/src/telegram/bot-username.ts +11 -0
  342. package/src/telemetry/usage-telemetry-reporter.test.ts +366 -0
  343. package/src/telemetry/usage-telemetry-reporter.ts +181 -0
  344. package/src/tools/claude-code/claude-code.ts +6 -6
  345. package/src/tools/credentials/broker.ts +7 -5
  346. package/src/tools/credentials/vault.ts +11 -6
  347. package/src/tools/memory/handlers.test.ts +24 -26
  348. package/src/tools/memory/handlers.ts +1 -13
  349. package/src/tools/network/__tests__/web-search.test.ts +18 -86
  350. package/src/tools/network/web-search.ts +9 -15
  351. package/src/tools/registry.ts +5 -100
  352. package/src/tools/terminal/parser.ts +34 -4
  353. package/src/tools/tool-manifest.ts +0 -10
  354. package/src/usage/actors.ts +0 -12
  355. package/src/util/canonicalize-identity.ts +0 -9
  356. package/src/util/errors.ts +0 -3
  357. package/src/util/platform.ts +31 -8
  358. package/src/util/pricing.ts +0 -39
  359. package/src/watcher/constants.ts +0 -7
  360. package/src/watcher/providers/linear.ts +1 -1
  361. package/src/work-items/work-item-store.ts +4 -4
  362. package/src/workspace/commit-message-provider.ts +1 -1
  363. package/src/workspace/git-service.ts +44 -1
  364. package/src/workspace/provider-commit-message-generator.ts +11 -7
  365. package/src/__tests__/fixtures/proxy-fixtures.ts +0 -147
  366. package/src/browser-extension-relay/client.ts +0 -155
  367. package/src/contacts/index.ts +0 -18
  368. package/src/daemon/tls-certs.ts +0 -270
  369. package/src/errors.ts +0 -41
  370. package/src/events/index.ts +0 -18
  371. package/src/followups/index.ts +0 -10
  372. package/src/playbooks/index.ts +0 -10
  373. package/src/runtime/auth/index.ts +0 -44
  374. package/src/tasks/candidate-store.ts +0 -95
  375. package/src/tools/browser/api-map.ts +0 -313
  376. package/src/tools/browser/auto-navigate.ts +0 -469
  377. package/src/tools/browser/headless-browser.ts +0 -590
  378. package/src/tools/browser/recording-store.ts +0 -75
  379. package/src/tools/computer-use/registry.ts +0 -21
  380. package/src/tools/tasks/index.ts +0 -27
@@ -1,590 +0,0 @@
1
- import { RiskLevel } from "../../permissions/types.js";
2
- import type { ToolDefinition } from "../../providers/types.js";
3
- import { registerTool } from "../registry.js";
4
- import type { Tool, ToolContext, ToolExecutionResult } from "../types.js";
5
- import {
6
- executeBrowserClick,
7
- executeBrowserClose,
8
- executeBrowserExtract,
9
- executeBrowserFillCredential,
10
- executeBrowserHover,
11
- executeBrowserNavigate,
12
- executeBrowserPressKey,
13
- executeBrowserScreenshot,
14
- executeBrowserScroll,
15
- executeBrowserSelectOption,
16
- executeBrowserSnapshot,
17
- executeBrowserType,
18
- executeBrowserWaitFor,
19
- } from "./browser-execution.js";
20
-
21
- // ── browser_navigate ─────────────────────────────────────────────────
22
-
23
- class BrowserNavigateTool implements Tool {
24
- name = "browser_navigate";
25
- description =
26
- "Navigate a headless browser to a URL and return the page title and status. Use this to load web pages for inspection or interaction.";
27
- category = "browser";
28
- defaultRiskLevel = RiskLevel.Low;
29
-
30
- getDefinition(): ToolDefinition {
31
- return {
32
- name: this.name,
33
- description: this.description,
34
- input_schema: {
35
- type: "object",
36
- properties: {
37
- url: {
38
- type: "string",
39
- description:
40
- "The URL to navigate to. If scheme is missing, https:// is assumed.",
41
- },
42
- allow_private_network: {
43
- type: "boolean",
44
- description:
45
- "If true, allows navigation to localhost/private-network hosts. Disabled by default for SSRF safety.",
46
- },
47
- },
48
- required: ["url"],
49
- },
50
- };
51
- }
52
-
53
- async execute(
54
- input: Record<string, unknown>,
55
- context: ToolContext,
56
- ): Promise<ToolExecutionResult> {
57
- return executeBrowserNavigate(input, context);
58
- }
59
- }
60
-
61
- registerTool(new BrowserNavigateTool());
62
-
63
- // ── browser_snapshot ─────────────────────────────────────────────────
64
-
65
- class BrowserSnapshotTool implements Tool {
66
- name = "browser_snapshot";
67
- description =
68
- 'List interactive elements on the current page. Returns elements with unique IDs (e.g. "e1", "e5") that MUST be used with browser_click, browser_type, and browser_press_key. Always run this before interacting with elements — never guess or fabricate selectors.';
69
- category = "browser";
70
- defaultRiskLevel = RiskLevel.Low;
71
-
72
- getDefinition(): ToolDefinition {
73
- return {
74
- name: this.name,
75
- description: this.description,
76
- input_schema: {
77
- type: "object",
78
- properties: {},
79
- },
80
- };
81
- }
82
-
83
- async execute(
84
- input: Record<string, unknown>,
85
- context: ToolContext,
86
- ): Promise<ToolExecutionResult> {
87
- return executeBrowserSnapshot(input, context);
88
- }
89
- }
90
-
91
- registerTool(new BrowserSnapshotTool());
92
-
93
- // ── browser_screenshot ───────────────────────────────────────────────
94
-
95
- class BrowserScreenshotTool implements Tool {
96
- name = "browser_screenshot";
97
- description =
98
- "Take a visual screenshot of the current page. Returns a JPEG image.";
99
- category = "browser";
100
- defaultRiskLevel = RiskLevel.Low;
101
-
102
- getDefinition(): ToolDefinition {
103
- return {
104
- name: this.name,
105
- description: this.description,
106
- input_schema: {
107
- type: "object",
108
- properties: {
109
- full_page: {
110
- type: "boolean",
111
- description:
112
- "Capture the full scrollable page instead of just the viewport.",
113
- },
114
- },
115
- },
116
- };
117
- }
118
-
119
- async execute(
120
- input: Record<string, unknown>,
121
- context: ToolContext,
122
- ): Promise<ToolExecutionResult> {
123
- return executeBrowserScreenshot(input, context);
124
- }
125
- }
126
-
127
- registerTool(new BrowserScreenshotTool());
128
-
129
- // ── browser_close ────────────────────────────────────────────────────
130
-
131
- class BrowserCloseTool implements Tool {
132
- name = "browser_close";
133
- description =
134
- "Close the browser page for the current session, or all pages if close_all_pages is true.";
135
- category = "browser";
136
- defaultRiskLevel = RiskLevel.Low;
137
-
138
- getDefinition(): ToolDefinition {
139
- return {
140
- name: this.name,
141
- description: this.description,
142
- input_schema: {
143
- type: "object",
144
- properties: {
145
- close_all_pages: {
146
- type: "boolean",
147
- description:
148
- "If true, close all browser pages and the browser context. Default: false (close only the current session page).",
149
- },
150
- },
151
- },
152
- };
153
- }
154
-
155
- async execute(
156
- input: Record<string, unknown>,
157
- context: ToolContext,
158
- ): Promise<ToolExecutionResult> {
159
- return executeBrowserClose(input, context);
160
- }
161
- }
162
-
163
- registerTool(new BrowserCloseTool());
164
-
165
- // ── browser_click ────────────────────────────────────────────────────
166
-
167
- class BrowserClickTool implements Tool {
168
- name = "browser_click";
169
- description =
170
- "Click an element on the page. Always use element_id from browser_snapshot — do not fabricate CSS selectors. For native <select> elements, use browser_select_option instead. For autocomplete dropdowns, search suggestion lists, or address pickers, prefer browser_press_key with ArrowDown/ArrowUp + Enter instead of clicking dropdown items.";
171
- category = "browser";
172
- defaultRiskLevel = RiskLevel.Low;
173
-
174
- getDefinition(): ToolDefinition {
175
- return {
176
- name: this.name,
177
- description: this.description,
178
- input_schema: {
179
- type: "object",
180
- properties: {
181
- element_id: {
182
- type: "string",
183
- description:
184
- 'The element ID from a previous browser_snapshot result (e.g. "e1").',
185
- },
186
- selector: {
187
- type: "string",
188
- description:
189
- "A CSS selector to target. Used as fallback when element_id is not available.",
190
- },
191
- timeout: {
192
- type: "number",
193
- description:
194
- "Max time in ms to wait for the element to be clickable (default: 10000).",
195
- },
196
- },
197
- },
198
- };
199
- }
200
-
201
- async execute(
202
- input: Record<string, unknown>,
203
- context: ToolContext,
204
- ): Promise<ToolExecutionResult> {
205
- return executeBrowserClick(input, context);
206
- }
207
- }
208
-
209
- registerTool(new BrowserClickTool());
210
-
211
- // ── browser_type ─────────────────────────────────────────────────────
212
-
213
- class BrowserTypeTool implements Tool {
214
- name = "browser_type";
215
- description =
216
- "Type text into an input element. Target by element_id (from browser_snapshot) or CSS selector.";
217
- category = "browser";
218
- defaultRiskLevel = RiskLevel.Low;
219
-
220
- getDefinition(): ToolDefinition {
221
- return {
222
- name: this.name,
223
- description: this.description,
224
- input_schema: {
225
- type: "object",
226
- properties: {
227
- element_id: {
228
- type: "string",
229
- description:
230
- 'The element ID from a previous browser_snapshot result (e.g. "e3").',
231
- },
232
- selector: {
233
- type: "string",
234
- description:
235
- "A CSS selector to target. Used as fallback when element_id is not available.",
236
- },
237
- text: {
238
- type: "string",
239
- description: "The text to type into the element.",
240
- },
241
- clear_first: {
242
- type: "boolean",
243
- description:
244
- "If true (default), clear existing content before typing. Set to false to append.",
245
- },
246
- press_enter: {
247
- type: "boolean",
248
- description: "If true, press Enter after typing the text.",
249
- },
250
- },
251
- required: ["text"],
252
- },
253
- };
254
- }
255
-
256
- async execute(
257
- input: Record<string, unknown>,
258
- context: ToolContext,
259
- ): Promise<ToolExecutionResult> {
260
- return executeBrowserType(input, context);
261
- }
262
- }
263
-
264
- registerTool(new BrowserTypeTool());
265
-
266
- // ── browser_press_key ────────────────────────────────────────────────
267
-
268
- class BrowserPressKeyTool implements Tool {
269
- name = "browser_press_key";
270
- description =
271
- "Press a keyboard key, optionally targeting a specific element. Use for Enter, Escape, Tab, arrow keys, etc. Preferred method for navigating autocomplete dropdowns and search suggestion lists: use ArrowDown/ArrowUp to move through options, then Enter to select.";
272
- category = "browser";
273
- defaultRiskLevel = RiskLevel.Low;
274
-
275
- getDefinition(): ToolDefinition {
276
- return {
277
- name: this.name,
278
- description: this.description,
279
- input_schema: {
280
- type: "object",
281
- properties: {
282
- key: {
283
- type: "string",
284
- description:
285
- 'The key to press (e.g. "Enter", "Escape", "Tab", "ArrowDown", "a").',
286
- },
287
- element_id: {
288
- type: "string",
289
- description: "Optional element ID from browser_snapshot to target.",
290
- },
291
- selector: {
292
- type: "string",
293
- description: "Optional CSS selector to target.",
294
- },
295
- },
296
- required: ["key"],
297
- },
298
- };
299
- }
300
-
301
- async execute(
302
- input: Record<string, unknown>,
303
- context: ToolContext,
304
- ): Promise<ToolExecutionResult> {
305
- return executeBrowserPressKey(input, context);
306
- }
307
- }
308
-
309
- registerTool(new BrowserPressKeyTool());
310
-
311
- // ── browser_scroll ───────────────────────────────────────────────────
312
-
313
- class BrowserScrollTool implements Tool {
314
- name = "browser_scroll";
315
- description =
316
- "Scroll the page or a specific element in a given direction. Useful for viewing content below the fold on long pages.";
317
- category = "browser";
318
- defaultRiskLevel = RiskLevel.Low;
319
-
320
- getDefinition(): ToolDefinition {
321
- return {
322
- name: this.name,
323
- description: this.description,
324
- input_schema: {
325
- type: "object",
326
- properties: {
327
- direction: {
328
- type: "string",
329
- enum: ["up", "down", "left", "right"],
330
- description: "The direction to scroll.",
331
- },
332
- amount: {
333
- type: "number",
334
- description: "The number of pixels to scroll (default: 500).",
335
- },
336
- element_id: {
337
- type: "string",
338
- description:
339
- "Optional element ID from browser_snapshot to scroll within.",
340
- },
341
- selector: {
342
- type: "string",
343
- description: "Optional CSS selector of element to scroll within.",
344
- },
345
- },
346
- required: ["direction"],
347
- },
348
- };
349
- }
350
-
351
- async execute(
352
- input: Record<string, unknown>,
353
- context: ToolContext,
354
- ): Promise<ToolExecutionResult> {
355
- return executeBrowserScroll(input, context);
356
- }
357
- }
358
-
359
- registerTool(new BrowserScrollTool());
360
-
361
- // ── browser_select_option ────────────────────────────────────────────
362
-
363
- class BrowserSelectOptionTool implements Tool {
364
- name = "browser_select_option";
365
- description =
366
- "Select an option from a native <select> element. Target by element_id (from browser_snapshot) or CSS selector. Specify the option by value, label, or index.";
367
- category = "browser";
368
- defaultRiskLevel = RiskLevel.Low;
369
-
370
- getDefinition(): ToolDefinition {
371
- return {
372
- name: this.name,
373
- description: this.description,
374
- input_schema: {
375
- type: "object",
376
- properties: {
377
- element_id: {
378
- type: "string",
379
- description:
380
- 'The element ID of the <select> from browser_snapshot (e.g. "e4").',
381
- },
382
- selector: {
383
- type: "string",
384
- description:
385
- "A CSS selector for the <select> element. Used as fallback when element_id is not available.",
386
- },
387
- value: {
388
- type: "string",
389
- description: "The value attribute of the <option> to select.",
390
- },
391
- label: {
392
- type: "string",
393
- description: "The visible text of the <option> to select.",
394
- },
395
- index: {
396
- type: "number",
397
- description: "The zero-based index of the <option> to select.",
398
- },
399
- },
400
- },
401
- };
402
- }
403
-
404
- async execute(
405
- input: Record<string, unknown>,
406
- context: ToolContext,
407
- ): Promise<ToolExecutionResult> {
408
- return executeBrowserSelectOption(input, context);
409
- }
410
- }
411
-
412
- registerTool(new BrowserSelectOptionTool());
413
-
414
- // ── browser_hover ────────────────────────────────────────────────────
415
-
416
- class BrowserHoverTool implements Tool {
417
- name = "browser_hover";
418
- description =
419
- "Hover over an element on the page. Useful for revealing hover menus, tooltips, or dropdown content. Take a browser_snapshot after hovering to see newly revealed elements.";
420
- category = "browser";
421
- defaultRiskLevel = RiskLevel.Low;
422
-
423
- getDefinition(): ToolDefinition {
424
- return {
425
- name: this.name,
426
- description: this.description,
427
- input_schema: {
428
- type: "object",
429
- properties: {
430
- element_id: {
431
- type: "string",
432
- description:
433
- 'The element ID from a previous browser_snapshot result (e.g. "e2").',
434
- },
435
- selector: {
436
- type: "string",
437
- description:
438
- "A CSS selector to target. Used as fallback when element_id is not available.",
439
- },
440
- },
441
- },
442
- };
443
- }
444
-
445
- async execute(
446
- input: Record<string, unknown>,
447
- context: ToolContext,
448
- ): Promise<ToolExecutionResult> {
449
- return executeBrowserHover(input, context);
450
- }
451
- }
452
-
453
- registerTool(new BrowserHoverTool());
454
-
455
- // ── browser_wait_for ─────────────────────────────────────────────────
456
-
457
- class BrowserWaitForTool implements Tool {
458
- name = "browser_wait_for";
459
- description =
460
- "Wait for a condition: a CSS selector to appear, text to appear on the page, or a fixed duration in milliseconds. Provide exactly one mode.";
461
- category = "browser";
462
- defaultRiskLevel = RiskLevel.Low;
463
-
464
- getDefinition(): ToolDefinition {
465
- return {
466
- name: this.name,
467
- description: this.description,
468
- input_schema: {
469
- type: "object",
470
- properties: {
471
- selector: {
472
- type: "string",
473
- description:
474
- "Wait for an element matching this CSS selector to appear.",
475
- },
476
- text: {
477
- type: "string",
478
- description: "Wait for this text to appear on the page.",
479
- },
480
- duration: {
481
- type: "number",
482
- description: "Wait for this many milliseconds.",
483
- },
484
- timeout: {
485
- type: "number",
486
- description:
487
- "Maximum wait time in milliseconds (default and max: 30000).",
488
- },
489
- },
490
- },
491
- };
492
- }
493
-
494
- async execute(
495
- input: Record<string, unknown>,
496
- context: ToolContext,
497
- ): Promise<ToolExecutionResult> {
498
- return executeBrowserWaitFor(input, context);
499
- }
500
- }
501
-
502
- registerTool(new BrowserWaitForTool());
503
-
504
- // ── browser_extract ──────────────────────────────────────────────────
505
-
506
- class BrowserExtractTool implements Tool {
507
- name = "browser_extract";
508
- description =
509
- "Extract the text content of the current page. Optionally include links. Output is capped to prevent excessive token usage.";
510
- category = "browser";
511
- defaultRiskLevel = RiskLevel.Low;
512
-
513
- getDefinition(): ToolDefinition {
514
- return {
515
- name: this.name,
516
- description: this.description,
517
- input_schema: {
518
- type: "object",
519
- properties: {
520
- include_links: {
521
- type: "boolean",
522
- description:
523
- "If true, include a list of links found on the page (up to 200).",
524
- },
525
- },
526
- },
527
- };
528
- }
529
-
530
- async execute(
531
- input: Record<string, unknown>,
532
- context: ToolContext,
533
- ): Promise<ToolExecutionResult> {
534
- return executeBrowserExtract(input, context);
535
- }
536
- }
537
-
538
- registerTool(new BrowserExtractTool());
539
-
540
- // ── browser_fill_credential ──────────────────────────────────────────
541
-
542
- class BrowserFillCredentialTool implements Tool {
543
- name = "browser_fill_credential";
544
- description =
545
- "Fill a stored credential into a form field without exposing the value. Target by element_id (from browser_snapshot) or CSS selector.";
546
- category = "browser";
547
- defaultRiskLevel = RiskLevel.Low;
548
-
549
- getDefinition(): ToolDefinition {
550
- return {
551
- name: this.name,
552
- description: this.description,
553
- input_schema: {
554
- type: "object",
555
- properties: {
556
- service: {
557
- type: "string",
558
- description: "Credential vault service name (e.g. gmail)",
559
- },
560
- field: {
561
- type: "string",
562
- description: "Credential vault field name (e.g. password)",
563
- },
564
- element_id: {
565
- type: "string",
566
- description: "Element ID from browser_snapshot",
567
- },
568
- selector: {
569
- type: "string",
570
- description: "CSS selector for target element",
571
- },
572
- press_enter: {
573
- type: "boolean",
574
- description: "Press Enter after filling",
575
- },
576
- },
577
- required: ["service", "field"],
578
- },
579
- };
580
- }
581
-
582
- async execute(
583
- input: Record<string, unknown>,
584
- context: ToolContext,
585
- ): Promise<ToolExecutionResult> {
586
- return executeBrowserFillCredential(input, context);
587
- }
588
- }
589
-
590
- registerTool(new BrowserFillCredentialTool());
@@ -1,75 +0,0 @@
1
- /**
2
- * Simple read/write for session recording JSON files.
3
- * Stores recordings at ~/.vellum/workspace/data/recordings/<id>.json
4
- */
5
-
6
- import {
7
- existsSync,
8
- mkdirSync,
9
- readdirSync,
10
- readFileSync,
11
- writeFileSync,
12
- } from "node:fs";
13
- import { join, resolve } from "node:path";
14
-
15
- import { getLogger } from "../../util/logger.js";
16
- import { getDataDir } from "../../util/platform.js";
17
- import type { SessionRecording } from "./network-recording-types.js";
18
-
19
- const log = getLogger("recording-store");
20
-
21
- function getRecordingsDir(): string {
22
- return join(getDataDir(), "recordings");
23
- }
24
-
25
- export function saveRecording(recording: SessionRecording): string {
26
- const dir = getRecordingsDir();
27
- mkdirSync(dir, { recursive: true });
28
-
29
- const filePath = resolve(dir, `${recording.id}.json`);
30
- if (!filePath.startsWith(resolve(dir) + "/")) {
31
- throw new Error(`Invalid recording ID: ${recording.id}`);
32
- }
33
- writeFileSync(filePath, JSON.stringify(recording, null, 2), "utf-8");
34
- log.info(
35
- {
36
- recordingId: recording.id,
37
- path: filePath,
38
- entries: recording.networkEntries.length,
39
- },
40
- "Recording saved",
41
- );
42
- return filePath;
43
- }
44
-
45
- /** List all recording file paths in the recordings directory. */
46
- export function listRecordingFiles(): string[] {
47
- const dir = getRecordingsDir();
48
- try {
49
- return readdirSync(dir)
50
- .filter((f) => f.endsWith(".json"))
51
- .map((f) => join(dir, f));
52
- } catch {
53
- return [];
54
- }
55
- }
56
-
57
- export function loadRecording(recordingId: string): SessionRecording | null {
58
- const dir = getRecordingsDir();
59
- const filePath = resolve(dir, `${recordingId}.json`);
60
- if (!filePath.startsWith(resolve(dir) + "/")) {
61
- log.warn({ recordingId }, "Invalid recording ID");
62
- return null;
63
- }
64
- if (!existsSync(filePath)) {
65
- log.warn({ recordingId, path: filePath }, "Recording file not found");
66
- return null;
67
- }
68
- try {
69
- const data = readFileSync(filePath, "utf-8");
70
- return JSON.parse(data) as SessionRecording;
71
- } catch (err) {
72
- log.warn({ err, recordingId }, "Failed to load recording");
73
- return null;
74
- }
75
- }
@@ -1,21 +0,0 @@
1
- /**
2
- * Registers computer-use tools with the daemon's tool registry.
3
- *
4
- * The computer_use_* action tools are now provided by the bundled
5
- * computer-use skill. This module retains registerComputerUseActionTools()
6
- * for backward compatibility (used by tests), but it is no longer called
7
- * during normal startup.
8
- */
9
-
10
- import { registerTool } from "../registry.js";
11
- import { allComputerUseTools } from "./definitions.js";
12
-
13
- /**
14
- * Register the 11 `computer_use_*` action proxy tools.
15
- * After cutover these are provided by the bundled computer-use skill instead.
16
- */
17
- export function registerComputerUseActionTools(): void {
18
- for (const tool of allComputerUseTools) {
19
- registerTool(tool);
20
- }
21
- }