@vellumai/assistant 0.12.5 → 0.12.6-dev.202609292019.a6f6d85

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 (264) hide show
  1. package/.env.example +2 -0
  2. package/ARCHITECTURE.md +23 -0
  3. package/docs/automatic-done.md +32 -0
  4. package/docs/desktop-browser-cli.md +3 -2
  5. package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/package.json +2 -1
  6. package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/__tests__/mcp-oauth.test.ts +53 -0
  7. package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/index.ts +1 -0
  8. package/node_modules/@vellumai/ces-client/node_modules/@vellumai/service-contracts/src/mcp-oauth.ts +60 -0
  9. package/node_modules/@vellumai/environments/src/shell.test.ts +13 -1
  10. package/node_modules/@vellumai/environments/src/shell.ts +22 -1
  11. package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/package.json +2 -1
  12. package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/__tests__/mcp-oauth.test.ts +53 -0
  13. package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/index.ts +1 -0
  14. package/node_modules/@vellumai/gateway-client/node_modules/@vellumai/service-contracts/src/mcp-oauth.ts +60 -0
  15. package/node_modules/@vellumai/gateway-client/src/__tests__/status-contracts.test.ts +39 -0
  16. package/node_modules/@vellumai/gateway-client/src/gateway-ipc-contracts.ts +25 -0
  17. package/node_modules/@vellumai/service-contracts/package.json +2 -1
  18. package/node_modules/@vellumai/service-contracts/src/__tests__/mcp-oauth.test.ts +53 -0
  19. package/node_modules/@vellumai/service-contracts/src/index.ts +1 -0
  20. package/node_modules/@vellumai/service-contracts/src/mcp-oauth.ts +60 -0
  21. package/openapi.yaml +270 -10
  22. package/package.json +1 -1
  23. package/src/__tests__/agent-loop.test.ts +76 -0
  24. package/src/__tests__/anthropic-provider.test.ts +2 -0
  25. package/src/__tests__/byok-default-profile-ensure.test.ts +7 -0
  26. package/src/__tests__/config-get-vision-flag.test.ts +1 -1
  27. package/src/__tests__/config-loader-validation-reset-notice.test.ts +2 -2
  28. package/src/__tests__/conversation-agent-loop-overflow.test.ts +160 -154
  29. package/src/__tests__/conversation-evictor.test.ts +54 -0
  30. package/src/__tests__/conversation-pairing.test.ts +112 -0
  31. package/src/__tests__/document-append-idempotency.test.ts +13 -0
  32. package/src/__tests__/document-create-dedupe.test.ts +13 -0
  33. package/src/__tests__/document-find-replace.test.ts +13 -0
  34. package/src/__tests__/document-revision-history.test.ts +390 -0
  35. package/src/__tests__/document-revision.test.ts +425 -0
  36. package/src/__tests__/document-tool-security.test.ts +13 -0
  37. package/src/__tests__/document-update-default-surface.test.ts +13 -0
  38. package/src/__tests__/emit-signal-routing-intent.test.ts +270 -0
  39. package/src/__tests__/gateway-flag-listener.test.ts +59 -6
  40. package/src/__tests__/headless-browser-navigate.test.ts +20 -30
  41. package/src/__tests__/host-cu-proxy.test.ts +79 -0
  42. package/src/__tests__/host-cu-routes-targeted.test.ts +14 -5
  43. package/src/__tests__/host-shell-tool.test.ts +6 -2
  44. package/src/__tests__/identity-routes.test.ts +4 -3
  45. package/src/__tests__/llm-catalog-parity.test.ts +4 -4
  46. package/src/__tests__/llm-schema.test.ts +1 -1
  47. package/src/__tests__/notification-platform-adapter.test.ts +83 -1
  48. package/src/__tests__/oauth2-gateway-transport.test.ts +2 -0
  49. package/src/__tests__/openai-provider.test.ts +11 -11
  50. package/src/__tests__/pricing.test.ts +11 -0
  51. package/src/__tests__/public-ingress-urls.test.ts +26 -0
  52. package/src/__tests__/retry-thinking-tool-choice.test.ts +47 -0
  53. package/src/__tests__/usage-attribution.test.ts +31 -0
  54. package/src/__tests__/workspace-migration-133-collapse-provider-connections.test.ts +3 -3
  55. package/src/__tests__/workspace-migration-160-repair-retired-fireworks-model-ids.test.ts +262 -0
  56. package/src/__tests__/workspace-migration-161-repair-retired-fireworks-glm-5p2-model-id.test.ts +233 -0
  57. package/src/acp/agent-process.ts +6 -1
  58. package/src/acp/client-handler.ts +6 -1
  59. package/src/agent/loop.ts +29 -6
  60. package/src/api/events/document-editor-show.ts +5 -0
  61. package/src/api/events/document-editor-update.ts +10 -0
  62. package/src/api/events/tool-result.ts +1 -0
  63. package/src/calls/__tests__/voice-session-bridge.test.ts +54 -0
  64. package/src/calls/channel-admission-reader.ts +15 -9
  65. package/src/calls/twilio-provider.ts +14 -31
  66. package/src/calls/voice-session-bridge.ts +18 -1
  67. package/src/cli/commands/browser.ts +1 -2
  68. package/src/cli/lib/__tests__/plugin-artifact.test.ts +23 -0
  69. package/src/cli/lib/__tests__/plugin-catalog-visibility.test.ts +2 -0
  70. package/src/cli/lib/__tests__/plugin-details.test.ts +16 -0
  71. package/src/cli/lib/bundled-marketplace.json +41 -2
  72. package/src/cli/lib/inspect-plugin.ts +15 -15
  73. package/src/cli/lib/list-installed-plugins.ts +29 -28
  74. package/src/cli/lib/plugin-artifact.ts +74 -63
  75. package/src/cli/lib/plugin-catalog-visibility.ts +1 -0
  76. package/src/cli/lib/plugin-details.ts +27 -42
  77. package/src/cli/lib/plugin-marketplace.ts +6 -8
  78. package/src/cli/lib/plugin-surfaces.ts +8 -7
  79. package/src/cli.ts +1 -3
  80. package/src/config/__tests__/chat-settings.test.ts +121 -0
  81. package/src/config/assistant-feature-flags.ts +28 -23
  82. package/src/config/bundled-skills/computer-use/SKILL.md +20 -0
  83. package/src/config/bundled-skills/computer-use/TOOLS.json +11 -11
  84. package/src/config/chat-settings.ts +100 -0
  85. package/src/config/default-profile-catalog.ts +1 -1
  86. package/src/config/feature-flag-cache.ts +7 -25
  87. package/src/config/feature-flag-registry.json +1 -9
  88. package/src/config/loader.ts +5 -1
  89. package/src/config/profile-text-generation.ts +25 -21
  90. package/src/config/schemas/conversations.ts +14 -0
  91. package/src/config/schemas/llm.ts +1 -0
  92. package/src/config/schemas/notifications.ts +8 -1
  93. package/src/contacts/gateway-channel-read.ts +1 -1
  94. package/src/conversations/__tests__/auto-archive-activity.test.ts +136 -0
  95. package/src/conversations/__tests__/auto-archive.test.ts +304 -0
  96. package/src/conversations/auto-archive-activity.ts +61 -0
  97. package/src/conversations/auto-archive.ts +201 -0
  98. package/src/daemon/computer-use-observation.test.ts +81 -0
  99. package/src/daemon/computer-use-observation.ts +23 -0
  100. package/src/daemon/conversation-agent-loop.ts +11 -6
  101. package/src/daemon/conversation-evictor.ts +50 -16
  102. package/src/daemon/doordash-steps.ts +1 -3
  103. package/src/daemon/handlers/__tests__/config-a2a-accept.test.ts +43 -1
  104. package/src/daemon/handlers/__tests__/config-channels.test.ts +1 -1
  105. package/src/daemon/handlers/config-a2a.ts +75 -2
  106. package/src/daemon/host-cu-proxy.ts +34 -3
  107. package/src/daemon/lifecycle.ts +15 -2
  108. package/src/daemon/shutdown-handlers.ts +3 -0
  109. package/src/daemon/turn-finalization.ts +4 -0
  110. package/src/desktop/desktop-browser-endpoint.ts +11 -2
  111. package/src/desktop/desktop-chrome-policy.test.ts +1 -0
  112. package/src/desktop/desktop-chrome-policy.ts +7 -1
  113. package/src/desktop/desktop-computer-use.test.ts +14 -4
  114. package/src/desktop/desktop-session-manager.ts +5 -3
  115. package/src/documents/document-revisions-store.ts +153 -0
  116. package/src/documents/document-store.ts +471 -133
  117. package/src/followups/followup-store.ts +0 -4
  118. package/src/inbound/__tests__/oauth-callback-url.test.ts +25 -2
  119. package/src/inbound/oauth-callback-url.ts +30 -1
  120. package/src/inbound/public-ingress-urls.ts +12 -2
  121. package/src/ipc/gateway-client.test.ts +40 -0
  122. package/src/ipc/gateway-client.ts +12 -29
  123. package/src/ipc/gateway-flag-listener.ts +7 -10
  124. package/src/live-voice/__tests__/live-voice-agent-turn.test.ts +71 -0
  125. package/src/live-voice/__tests__/live-voice-flux-turn-end.test.ts +83 -0
  126. package/src/live-voice/__tests__/protocol.test.ts +77 -0
  127. package/src/live-voice/__tests__/share-targets.test.ts +163 -0
  128. package/src/live-voice/live-voice-session.ts +23 -6
  129. package/src/live-voice/protocol.ts +22 -0
  130. package/src/live-voice/share-targets.ts +225 -0
  131. package/src/mcp/__tests__/mcp-oauth-client-registration.test.ts +144 -3
  132. package/src/mcp/__tests__/mcp-oauth-provider.test.ts +2 -0
  133. package/src/mcp/client.ts +1 -19
  134. package/src/mcp/mcp-oauth-provider.ts +66 -49
  135. package/src/media/openrouter-image-service.ts +39 -22
  136. package/src/monitoring/__tests__/oom-inheritance-sweep.test.ts +86 -0
  137. package/src/monitoring/__tests__/oom-kill-reporter.test.ts +374 -0
  138. package/src/monitoring/control.ts +2 -1
  139. package/src/monitoring/oom-inheritance-sweep.ts +96 -0
  140. package/src/monitoring/oom-kill-reporter.ts +469 -0
  141. package/src/monitoring/resource-sampler.ts +30 -0
  142. package/src/notifications/README.md +53 -4
  143. package/src/notifications/__tests__/assistant-initiated-thread.test.ts +254 -0
  144. package/src/notifications/__tests__/broadcaster.test.ts +558 -6
  145. package/src/notifications/__tests__/completion-policy.test.ts +37 -0
  146. package/src/notifications/__tests__/from-me-alert-integration.test.ts +192 -0
  147. package/src/notifications/adapters/platform.ts +14 -0
  148. package/src/notifications/assistant-initiated-thread.ts +101 -0
  149. package/src/notifications/broadcaster.ts +94 -16
  150. package/src/notifications/chat-reply-policy.ts +11 -0
  151. package/src/notifications/completion-policy.ts +12 -2
  152. package/src/notifications/conversation-pairing.ts +15 -70
  153. package/src/notifications/emit-signal.ts +34 -3
  154. package/src/notifications/types.ts +2 -0
  155. package/src/oauth/connect-orchestrator.ts +1 -2
  156. package/src/persistence/__tests__/conversation-auto-archive.test.ts +330 -0
  157. package/src/persistence/conversation-auto-archive.ts +170 -0
  158. package/src/persistence/conversation-crud.ts +2 -1
  159. package/src/persistence/conversation-queries.ts +15 -8
  160. package/src/persistence/embeddings/embed.test.ts +96 -0
  161. package/src/persistence/embeddings/embed.ts +20 -2
  162. package/src/persistence/embeddings/embedding-gemini.test.ts +39 -3
  163. package/src/persistence/embeddings/embedding-gemini.ts +39 -1
  164. package/src/persistence/embeddings/embedding-local.ts +6 -0
  165. package/src/persistence/embeddings/qdrant-manager.ts +5 -0
  166. package/src/persistence/job-utils.ts +10 -0
  167. package/src/persistence/migrations/384-add-document-revision.test.ts +83 -0
  168. package/src/persistence/migrations/384-add-document-revision.ts +21 -0
  169. package/src/persistence/migrations/385-create-document-revisions.test.ts +67 -0
  170. package/src/persistence/migrations/385-create-document-revisions.ts +28 -0
  171. package/src/persistence/migrations/386-conversations-last-reopened-at.ts +10 -0
  172. package/src/persistence/migrations/__tests__/386-conversations-last-reopened-at.test.ts +32 -0
  173. package/src/persistence/schema/conversations.ts +1 -0
  174. package/src/persistence/schema/documents.ts +20 -0
  175. package/src/persistence/steps.ts +6 -0
  176. package/src/platform/managed-speech.ts +42 -46
  177. package/src/plugin-api/vision-support.test.ts +21 -21
  178. package/src/plugins/defaults/empty-response/hooks/post-model-call.ts +11 -6
  179. package/src/providers/__tests__/dispatch-connection-routing.test.ts +1 -1
  180. package/src/providers/__tests__/search-provider-catalog.test.ts +8 -0
  181. package/src/providers/anthropic/client.ts +1 -1
  182. package/src/providers/fireworks/client.test.ts +168 -0
  183. package/src/providers/fireworks/client.ts +24 -0
  184. package/src/providers/inference/adapter-factory.ts +6 -0
  185. package/src/providers/ionet/client.test.ts +143 -0
  186. package/src/providers/ionet/client.ts +37 -0
  187. package/src/providers/model-catalog.ts +141 -84
  188. package/src/providers/model-intents.ts +4 -4
  189. package/src/providers/openai/chat-completions-provider.ts +23 -1
  190. package/src/providers/retry.ts +56 -4
  191. package/src/providers/search-provider-catalog.ts +10 -0
  192. package/src/providers/types.ts +10 -2
  193. package/src/providers/usage-tracking.ts +5 -3
  194. package/src/runtime/assistant-event-hub.ts +23 -0
  195. package/src/runtime/auth/__tests__/guard-tests.test.ts +0 -7
  196. package/src/runtime/auth/__tests__/route-policy.test.ts +1 -1
  197. package/src/runtime/channel-retry-sweep.ts +1 -2
  198. package/src/runtime/migrations/__tests__/vbundle-streaming-validator.test.ts +35 -10
  199. package/src/runtime/migrations/__tests__/vbundle-validator-v1-schema.test.ts +48 -0
  200. package/src/runtime/migrations/vbundle-builder.ts +19 -3
  201. package/src/runtime/migrations/vbundle-streaming-importer.ts +14 -19
  202. package/src/runtime/migrations/vbundle-streaming-validator.ts +14 -7
  203. package/src/runtime/migrations/vbundle-validator.ts +54 -1
  204. package/src/runtime/pending-interactions.ts +20 -2
  205. package/src/runtime/routes/__tests__/contact-routes.test.ts +5 -3
  206. package/src/runtime/routes/__tests__/conversation-list-routes.test.ts +36 -0
  207. package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +375 -2
  208. package/src/runtime/routes/__tests__/inference-send-routes.test.ts +1 -1
  209. package/src/runtime/routes/__tests__/user-route-dispatcher.test.ts +12 -0
  210. package/src/runtime/routes/contact-routes.ts +2 -2
  211. package/src/runtime/routes/conversation-list-routes.ts +10 -2
  212. package/src/runtime/routes/conversation-query-routes.ts +48 -10
  213. package/src/runtime/routes/documents-routes.ts +185 -47
  214. package/src/runtime/routes/events-routes.ts +1 -3
  215. package/src/runtime/routes/host-app-control-routes.ts +1 -0
  216. package/src/runtime/routes/host-bash-routes.ts +1 -0
  217. package/src/runtime/routes/host-browser-routes.ts +15 -0
  218. package/src/runtime/routes/host-cu-routes.ts +4 -1
  219. package/src/runtime/routes/host-file-routes.ts +1 -0
  220. package/src/runtime/routes/host-proxy-result-binding.test.ts +83 -0
  221. package/src/runtime/routes/host-proxy-result-binding.ts +25 -0
  222. package/src/runtime/routes/host-transfer-routes.ts +1 -0
  223. package/src/runtime/routes/identity-routes.ts +3 -3
  224. package/src/runtime/routes/integrations/a2a.ts +4 -1
  225. package/src/runtime/routes/migration-routes.ts +3 -1
  226. package/src/runtime/routes/notification-routes.ts +1 -2
  227. package/src/runtime/routes/ui-snapshot-routes.test.ts +1 -0
  228. package/src/runtime/routes/user-route-dispatcher.ts +5 -1
  229. package/src/runtime/verification-templates.ts +1 -2
  230. package/src/sequence/analytics.ts +0 -4
  231. package/src/sequence/engine.ts +1 -11
  232. package/src/sequence/guardrails.ts +1 -6
  233. package/src/sequence/importer.ts +0 -8
  234. package/src/sequence/store.ts +0 -10
  235. package/src/signals/user-message.ts +0 -6
  236. package/src/skills/catalog-install.ts +52 -23
  237. package/src/tools/browser/browser-execution.ts +20 -23
  238. package/src/tools/browser/cdp-client/cdp-inspect/ws-transport.ts +1 -3
  239. package/src/tools/document/document-tool.ts +13 -11
  240. package/src/tools/executor.ts +1 -2
  241. package/src/tools/host-terminal/host-shell.ts +4 -2
  242. package/src/tools/network/__tests__/web-search.test.ts +105 -0
  243. package/src/tools/network/web-fetch.ts +2 -4
  244. package/src/tools/network/web-search.ts +239 -12
  245. package/src/tools/shared/filesystem/format-diff.ts +1 -2
  246. package/src/tools/shared/shell-output.test.ts +42 -0
  247. package/src/tools/shared/shell-output.ts +27 -4
  248. package/src/tools/terminal/shell.ts +3 -3
  249. package/src/tools/ui-surface/visual-validation.ts +1 -2
  250. package/src/usage/attribution.ts +18 -1
  251. package/src/util/__tests__/oom-priority.test.ts +55 -0
  252. package/src/util/__tests__/worker-memory.test.ts +16 -0
  253. package/src/util/debounce.ts +0 -4
  254. package/src/util/oom-priority.ts +79 -0
  255. package/src/util/platform.ts +0 -2
  256. package/src/util/plugin-manifest.ts +5 -7
  257. package/src/util/pricing.ts +25 -0
  258. package/src/util/worker-memory.ts +9 -3
  259. package/src/util/worker-process.ts +8 -0
  260. package/src/workspace/byok-default-profile-ensure.ts +11 -0
  261. package/src/workspace/hatched-date.ts +11 -4
  262. package/src/workspace/migrations/160-repair-retired-fireworks-model-ids.ts +209 -0
  263. package/src/workspace/migrations/161-repair-retired-fireworks-glm-5p2-model-id.ts +197 -0
  264. package/src/workspace/migrations/registry.ts +4 -0
package/openapi.yaml CHANGED
@@ -3,7 +3,7 @@
3
3
  openapi: 3.1.0
4
4
  info:
5
5
  title: Vellum Assistant API
6
- version: 0.12.5
6
+ version: 0.12.6
7
7
  description: Auto-generated OpenAPI specification for the Vellum Assistant runtime HTTP server.
8
8
  servers:
9
9
  - url: http://127.0.0.1:7821
@@ -6025,6 +6025,7 @@ paths:
6025
6025
  - minimax
6026
6026
  - atlascloud
6027
6027
  - baseten
6028
+ - ionet
6028
6029
  - poolside
6029
6030
  connectionName:
6030
6031
  type: string
@@ -8042,8 +8043,9 @@ paths:
8042
8043
  Filter by conversation type. Pass "background" to list background and scheduled conversations together (the
8043
8044
  back-compat umbrella), "scheduled" to list only scheduled conversations, or "all" for the union of the
8044
8045
  standard listing and that umbrella, so one paginated cursor spans every type. Combine "all" with
8045
- archiveStatus=all for a whole-history read; rows are recency-ordered (COALESCE(last_message_at, updated_at)
8046
- descending) like every other list read, and pinned rows are never appended to it.
8046
+ archiveStatus=all for a whole-history read; rows are ordered by last activity (the later of the last message
8047
+ and the time the row was marked done, descending) like every other list read, and pinned rows are never
8048
+ appended to it.
8047
8049
  - name: archiveStatus
8048
8050
  in: query
8049
8051
  required: false
@@ -8083,8 +8085,9 @@ paths:
8083
8085
  description:
8084
8086
  Filter to a single group, so each sidebar section can load independently of the paginated list. Pass
8085
8087
  "system:all" for conversations in no group, "system:pinned" for the Pinned section, or a custom group id. A
8086
- group-scoped request is recency-ordered like every list read (COALESCE(last_message_at, updated_at)
8087
- descending) and never has pinned rows appended to it. Omit to span every group.
8088
+ group-scoped request is ordered by last activity like every list read (the later of the last message and the
8089
+ time the row was marked done, descending) and never has pinned rows appended to it. Omit to span every
8090
+ group.
8088
8091
  - name: needsAttention
8089
8092
  in: query
8090
8093
  required: false
@@ -8340,10 +8343,14 @@ paths:
8340
8343
  - sortPosition
8341
8344
  - isSystemGroup
8342
8345
  additionalProperties: false
8346
+ orderedBy:
8347
+ type: string
8348
+ const: lastActivity
8343
8349
  required:
8344
8350
  - conversations
8345
8351
  - nextOffset
8346
8352
  - hasMore
8353
+ - orderedBy
8347
8354
  additionalProperties: false
8348
8355
  post:
8349
8356
  operationId: conversations_post
@@ -12482,6 +12489,9 @@ paths:
12482
12489
  type: number
12483
12490
  updatedAt:
12484
12491
  type: number
12492
+ revision:
12493
+ description: Bumped by one on every write. Absent from assistants that predate document revisions.
12494
+ type: number
12485
12495
  required:
12486
12496
  - surfaceId
12487
12497
  - conversationId
@@ -12496,7 +12506,10 @@ paths:
12496
12506
  post:
12497
12507
  operationId: documents_post
12498
12508
  summary: Save a document
12499
- description: Create or upsert a document (by surfaceId).
12509
+ description:
12510
+ Create or upsert a document (by surfaceId). With `baseRevision`, an existing document is only overwritten
12511
+ while its revision still equals `baseRevision`; otherwise the save is rejected with 409 CONFLICT and
12512
+ `error.details` carries the current `revision`, `title`, and `content`.
12500
12513
  tags:
12501
12514
  - documents
12502
12515
  requestBody:
@@ -12521,6 +12534,13 @@ paths:
12521
12534
  wordCount:
12522
12535
  type: number
12523
12536
  description: Word count
12537
+ baseRevision:
12538
+ description:
12539
+ The revision this save was edited from. When set and the stored revision differs, nothing is written and
12540
+ the request fails with 409. Omit for an unconditional write.
12541
+ type: integer
12542
+ minimum: 0
12543
+ maximum: 9007199254740991
12524
12544
  required:
12525
12545
  - surfaceId
12526
12546
  - conversationId
@@ -12540,6 +12560,9 @@ paths:
12540
12560
  const: true
12541
12561
  surfaceId:
12542
12562
  type: string
12563
+ revision:
12564
+ description: The document's revision after the save. Absent from assistants that predate document revisions.
12565
+ type: number
12543
12566
  required:
12544
12567
  - success
12545
12568
  - surfaceId
@@ -12581,6 +12604,9 @@ paths:
12581
12604
  type: number
12582
12605
  updatedAt:
12583
12606
  type: number
12607
+ revision:
12608
+ description: Bumped by one on every write. Absent from assistants that predate document revisions.
12609
+ type: number
12584
12610
  required:
12585
12611
  - success
12586
12612
  - surfaceId
@@ -13007,6 +13033,157 @@ paths:
13007
13033
  schema:
13008
13034
  type: string
13009
13035
  format: binary
13036
+ /v1/documents/{id}/revisions:
13037
+ get:
13038
+ operationId: documents_by_id_revisions_get
13039
+ summary: List a document's revisions
13040
+ description: Return the document's history snapshots, newest first, without their content.
13041
+ tags:
13042
+ - documents
13043
+ parameters:
13044
+ - name: id
13045
+ in: path
13046
+ required: true
13047
+ schema:
13048
+ type: string
13049
+ responses:
13050
+ "200":
13051
+ description: Successful response
13052
+ content:
13053
+ application/json:
13054
+ schema:
13055
+ type: object
13056
+ properties:
13057
+ revisions:
13058
+ type: array
13059
+ items:
13060
+ type: object
13061
+ properties:
13062
+ revision:
13063
+ type: number
13064
+ description: The document revision this snapshot holds
13065
+ author:
13066
+ type: string
13067
+ enum:
13068
+ - user
13069
+ - assistant
13070
+ description: Who made the edit that replaced this state
13071
+ createdAt:
13072
+ type: number
13073
+ description: When the snapshot was taken
13074
+ wordCount:
13075
+ type: number
13076
+ title:
13077
+ type: string
13078
+ required:
13079
+ - revision
13080
+ - author
13081
+ - createdAt
13082
+ - wordCount
13083
+ - title
13084
+ additionalProperties: false
13085
+ required:
13086
+ - revisions
13087
+ additionalProperties: false
13088
+ /v1/documents/{id}/revisions/{revision}:
13089
+ get:
13090
+ operationId: documents_by_id_revisions_by_revision_get
13091
+ summary: Get a document revision
13092
+ description: Return one history snapshot with its content.
13093
+ tags:
13094
+ - documents
13095
+ parameters:
13096
+ - name: id
13097
+ in: path
13098
+ required: true
13099
+ schema:
13100
+ type: string
13101
+ - name: revision
13102
+ in: path
13103
+ required: true
13104
+ schema:
13105
+ type: string
13106
+ responses:
13107
+ "200":
13108
+ description: Successful response
13109
+ content:
13110
+ application/json:
13111
+ schema:
13112
+ type: object
13113
+ properties:
13114
+ revision:
13115
+ type: number
13116
+ description: The document revision this snapshot holds
13117
+ author:
13118
+ type: string
13119
+ enum:
13120
+ - user
13121
+ - assistant
13122
+ description: Who made the edit that replaced this state
13123
+ createdAt:
13124
+ type: number
13125
+ description: When the snapshot was taken
13126
+ wordCount:
13127
+ type: number
13128
+ title:
13129
+ type: string
13130
+ content:
13131
+ type: string
13132
+ required:
13133
+ - revision
13134
+ - author
13135
+ - createdAt
13136
+ - wordCount
13137
+ - title
13138
+ - content
13139
+ additionalProperties: false
13140
+ /v1/documents/{id}/revisions/{revision}/restore:
13141
+ post:
13142
+ operationId: documents_by_id_revisions_by_revision_restore_post
13143
+ summary: Restore a document revision
13144
+ description:
13145
+ Write a snapshot's title and content back as a new revision. The current state is snapshotted first, so the
13146
+ restore can itself be undone.
13147
+ tags:
13148
+ - documents
13149
+ parameters:
13150
+ - name: id
13151
+ in: path
13152
+ required: true
13153
+ schema:
13154
+ type: string
13155
+ - name: revision
13156
+ in: path
13157
+ required: true
13158
+ schema:
13159
+ type: string
13160
+ responses:
13161
+ "200":
13162
+ description: Successful response
13163
+ content:
13164
+ application/json:
13165
+ schema:
13166
+ type: object
13167
+ properties:
13168
+ success:
13169
+ type: boolean
13170
+ const: true
13171
+ surfaceId:
13172
+ type: string
13173
+ revision:
13174
+ type: number
13175
+ description: The document's revision after the restore
13176
+ title:
13177
+ type: string
13178
+ content:
13179
+ type: string
13180
+ required:
13181
+ - success
13182
+ - surfaceId
13183
+ - revision
13184
+ - title
13185
+ - content
13186
+ additionalProperties: false
13010
13187
  /v1/documents/create:
13011
13188
  post:
13012
13189
  operationId: documents_create_post
@@ -13053,6 +13230,9 @@ paths:
13053
13230
  type: number
13054
13231
  updatedAt:
13055
13232
  type: number
13233
+ revision:
13234
+ description: Bumped by one on every write. Absent from assistants that predate document revisions.
13235
+ type: number
13056
13236
  required:
13057
13237
  - success
13058
13238
  - surfaceId
@@ -14289,6 +14469,8 @@ paths:
14289
14469
  type: boolean
14290
14470
  appPins:
14291
14471
  type: boolean
14472
+ chatsSettings:
14473
+ type: boolean
14292
14474
  required:
14293
14475
  - memoryOptOut
14294
14476
  - retryLastTurn
@@ -14523,6 +14705,8 @@ paths:
14523
14705
  type: boolean
14524
14706
  appPins:
14525
14707
  type: boolean
14708
+ chatsSettings:
14709
+ type: boolean
14526
14710
  required:
14527
14711
  - memoryOptOut
14528
14712
  - retryLastTurn
@@ -16790,8 +16974,8 @@ paths:
16790
16974
  type: string
16791
16975
  description:
16792
16976
  "Filter by provider id. One of: anthropic, openai, gemini, ollama, fireworks, together, openrouter,
16793
- vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, poolside, typesafe,
16794
- vellum"
16977
+ vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, ionet, poolside,
16978
+ typesafe, vellum"
16795
16979
  responses:
16796
16980
  "200":
16797
16981
  description: Successful response
@@ -17063,8 +17247,8 @@ paths:
17063
17247
  type: string
17064
17248
  description:
17065
17249
  "Filter by provider. One of: anthropic, openai, gemini, ollama, fireworks, together, openrouter,
17066
- vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, poolside, typesafe,
17067
- vellum, chatgpt"
17250
+ vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, ionet, poolside,
17251
+ typesafe, vellum, chatgpt"
17068
17252
  responses:
17069
17253
  "200":
17070
17254
  description: Successful response
@@ -21395,6 +21579,7 @@ paths:
21395
21579
  - searxng
21396
21580
  - tinyfish
21397
21581
  - exa
21582
+ - serply
21398
21583
  resultCount:
21399
21584
  type: number
21400
21585
  durationMs:
@@ -22014,6 +22199,7 @@ paths:
22014
22199
  - searxng
22015
22200
  - tinyfish
22016
22201
  - exa
22202
+ - serply
22017
22203
  resultCount:
22018
22204
  type: number
22019
22205
  durationMs:
@@ -38554,6 +38740,41 @@ components:
38554
38740
  ConfigPatchRequest:
38555
38741
  type: object
38556
38742
  properties:
38743
+ conversations:
38744
+ anyOf:
38745
+ - type: object
38746
+ properties:
38747
+ autoArchive:
38748
+ anyOf:
38749
+ - type: object
38750
+ properties:
38751
+ enabled:
38752
+ anyOf:
38753
+ - type: boolean
38754
+ - type: "null"
38755
+ afterDays:
38756
+ anyOf:
38757
+ - type: number
38758
+ enum:
38759
+ - 1
38760
+ - 7
38761
+ - 14
38762
+ - 30
38763
+ - type: "null"
38764
+ additionalProperties: {}
38765
+ - type: "null"
38766
+ additionalProperties: {}
38767
+ - type: "null"
38768
+ notifications:
38769
+ anyOf:
38770
+ - type: object
38771
+ properties:
38772
+ newMessageEnabled:
38773
+ anyOf:
38774
+ - type: boolean
38775
+ - type: "null"
38776
+ additionalProperties: {}
38777
+ - type: "null"
38557
38778
  llm:
38558
38779
  type: object
38559
38780
  properties:
@@ -39205,6 +39426,7 @@ components:
39205
39426
  - minimax
39206
39427
  - atlascloud
39207
39428
  - baseten
39429
+ - ionet
39208
39430
  - poolside
39209
39431
  - typesafe
39210
39432
  - vellum
@@ -39287,6 +39509,42 @@ components:
39287
39509
  ConfigGetResponse:
39288
39510
  type: object
39289
39511
  properties:
39512
+ conversations:
39513
+ type: object
39514
+ properties:
39515
+ autoArchive:
39516
+ type: object
39517
+ properties:
39518
+ enabled:
39519
+ default: false
39520
+ description: Automatically mark eligible inactive chats Done.
39521
+ type: boolean
39522
+ afterDays:
39523
+ default: 7
39524
+ description: Elapsed days of inactivity before a chat is eligible for Done.
39525
+ type: number
39526
+ enum:
39527
+ - 1
39528
+ - 7
39529
+ - 14
39530
+ - 30
39531
+ required:
39532
+ - enabled
39533
+ - afterDays
39534
+ additionalProperties: {}
39535
+ required:
39536
+ - autoArchive
39537
+ additionalProperties: {}
39538
+ notifications:
39539
+ type: object
39540
+ properties:
39541
+ newMessageEnabled:
39542
+ default: true
39543
+ description: Allow ordinary chat-reply alerts. Does not change unread state or action-required alerts.
39544
+ type: boolean
39545
+ required:
39546
+ - newMessageEnabled
39547
+ additionalProperties: {}
39290
39548
  llm:
39291
39549
  type: object
39292
39550
  properties:
@@ -39433,6 +39691,7 @@ components:
39433
39691
  - minimax
39434
39692
  - atlascloud
39435
39693
  - baseten
39694
+ - ionet
39436
39695
  - poolside
39437
39696
  connectionName:
39438
39697
  type: string
@@ -39821,6 +40080,7 @@ components:
39821
40080
  - minimax
39822
40081
  - atlascloud
39823
40082
  - baseten
40083
+ - ionet
39824
40084
  - poolside
39825
40085
  - type: "null"
39826
40086
  connectionName:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.12.5",
3
+ "version": "0.12.6-dev.202609292019.a6f6d85",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -181,6 +181,82 @@ describe("AgentLoop", () => {
181
181
  expect(calls[1].options?.config?.overrideProfile).toBe("quality-optimized");
182
182
  });
183
183
 
184
+ test("the auto origin follows the routed override and drops once a switch replaces it", async () => {
185
+ const toolCallId = "tool-1";
186
+ const { provider, calls } = createMockProvider([
187
+ toolUseResponse(toolCallId, "read_file", { path: "/tmp/test.txt" }),
188
+ textResponse("done"),
189
+ ]);
190
+ let overrideProfile = "quality-optimized";
191
+ const loop = new AgentLoop({
192
+ provider: provider,
193
+ systemPrompt: "system",
194
+ conversationId: "test-conversation",
195
+ tools: dummyTools,
196
+ toolExecutor: async () => {
197
+ // A confirmed profile session mid-turn: the user's pick, not Auto's.
198
+ overrideProfile = "cost-optimized";
199
+ return { content: "ok", isError: false };
200
+ },
201
+ });
202
+
203
+ await loop.run({
204
+ messages: [userMessage],
205
+ onEvent: collectEvents([]),
206
+ trust: { sourceChannel: "vellum", trustClass: "unknown" },
207
+ requestId: "req-1",
208
+ callSite: "mainAgent",
209
+ overrideProfile: "quality-optimized",
210
+ overrideProfileOrigin: "auto",
211
+ resolveOverrideProfile: () => overrideProfile,
212
+ });
213
+
214
+ expect(calls).toHaveLength(2);
215
+ expect(calls[0].options?.config?.overrideProfile).toBe("quality-optimized");
216
+ expect(calls[0].options?.config?.overrideProfileOrigin).toBe("auto");
217
+ expect(calls[1].options?.config?.overrideProfile).toBe("cost-optimized");
218
+ expect(calls[1].options?.config?.overrideProfileOrigin).toBeUndefined();
219
+ });
220
+
221
+ test("a pre-model-call hook keeps the auto origin unless it changes the profile", async () => {
222
+ let hookProfile: string | null | undefined;
223
+ registerPlugin({
224
+ manifest: { name: "profile-hook", version: "0.0.1" },
225
+ hooks: {
226
+ "pre-model-call": async (ctx) =>
227
+ hookProfile === undefined
228
+ ? ctx
229
+ : { ...ctx, modelProfile: hookProfile },
230
+ },
231
+ });
232
+ const run = async () => {
233
+ const { provider, calls } = createMockProvider([textResponse("ok")]);
234
+ const loop = new AgentLoop({
235
+ provider: provider,
236
+ systemPrompt: "system",
237
+ conversationId: "test-conversation",
238
+ tools: dummyTools,
239
+ });
240
+ await loop.run({
241
+ messages: [userMessage],
242
+ onEvent: collectEvents([]),
243
+ trust: { sourceChannel: "vellum", trustClass: "unknown" },
244
+ requestId: "req-1",
245
+ callSite: "mainAgent",
246
+ overrideProfile: "quality-optimized",
247
+ overrideProfileOrigin: "auto",
248
+ });
249
+ return calls[0].options?.config;
250
+ };
251
+
252
+ hookProfile = undefined;
253
+ expect((await run())?.overrideProfileOrigin).toBe("auto");
254
+ hookProfile = "cost-optimized";
255
+ expect((await run())?.overrideProfileOrigin).toBeUndefined();
256
+ hookProfile = null;
257
+ expect((await run())?.overrideProfileOrigin).toBeUndefined();
258
+ });
259
+
184
260
  test("re-resolves max input tokens before truncating tool results", async () => {
185
261
  const toolCallId = "tool-1";
186
262
  const toolOutput = "x".repeat(2_500);
@@ -3653,6 +3653,8 @@ describe("AnthropicProvider — deprecated sampling params (temperature / top_p
3653
3653
  "claude-opus-4-7",
3654
3654
  "claude-sonnet-5",
3655
3655
  "anthropic/claude-sonnet-5",
3656
+ "claude-sonnet-5-5",
3657
+ "anthropic/claude-sonnet-5.5",
3656
3658
  "claude-fable-5",
3657
3659
  "claude-fable-5-1",
3658
3660
  "anthropic/claude-fable-5.1",
@@ -302,6 +302,13 @@ describe("ensureByokDefaultProfiles", () => {
302
302
  "cost-optimized",
303
303
  "accounts/fireworks/models/deepseek-v4-flash",
304
304
  ],
305
+ [
306
+ "fireworks",
307
+ "cost-optimized",
308
+ "accounts/fireworks/models/deepseek-v4-flash-0731",
309
+ ],
310
+ ["fireworks", "balanced", "accounts/fireworks/models/deepseek-v4p1-flash"],
311
+ ["fireworks", "quality-optimized", "accounts/fireworks/models/kimi-k2p6"],
305
312
  ] as const)(
306
313
  "a historical intent-era copy converts (%s %s pinned to %s)",
307
314
  (provider, key, model) => {
@@ -40,7 +40,7 @@ describe("GET /v1/config profile vision enrichment", () => {
40
40
  seedProfiles({
41
41
  "test-no-vision": {
42
42
  provider: "fireworks",
43
- model: "accounts/fireworks/models/glm-5p2",
43
+ model: "accounts/fireworks/models/glm-5p3",
44
44
  },
45
45
  });
46
46
 
@@ -171,7 +171,7 @@ describe("config-validation-reset notice sentinel", () => {
171
171
  profiles: {
172
172
  "glm-default": {
173
173
  provider: "vellum",
174
- model: "accounts/fireworks/models/glm-5p2",
174
+ model: "accounts/fireworks/models/glm-5p3",
175
175
  },
176
176
  },
177
177
  activeProfile: "glm-default",
@@ -193,7 +193,7 @@ describe("config-validation-reset notice sentinel", () => {
193
193
  expect(config.llm.activeProfile).toBe("glm-default");
194
194
  expect(config.llm.callSites.mainAgent?.profile).toBe("glm-default");
195
195
  expect(config.llm.profiles["glm-default"]?.model).toBe(
196
- "accounts/fireworks/models/glm-5p2",
196
+ "accounts/fireworks/models/glm-5p3",
197
197
  );
198
198
  });
199
199