@vellumai/assistant 0.10.0-dev.202606221405.2fda286 → 0.10.0-dev.202606222007.e9d01e2

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 (325) hide show
  1. package/ARCHITECTURE.md +21 -21
  2. package/bun.lock +3 -0
  3. package/docs/workflows.md +12 -7
  4. package/node_modules/@slack/types/LICENSE +23 -0
  5. package/node_modules/@slack/types/README.md +32 -0
  6. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts +953 -0
  7. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts.map +1 -0
  8. package/node_modules/@slack/types/dist/block-kit/block-elements.js +4 -0
  9. package/node_modules/@slack/types/dist/block-kit/block-elements.js.map +1 -0
  10. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts +474 -0
  11. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -0
  12. package/node_modules/@slack/types/dist/block-kit/blocks.js +3 -0
  13. package/node_modules/@slack/types/dist/block-kit/blocks.js.map +1 -0
  14. package/node_modules/@slack/types/dist/block-kit/composition-objects.d.ts +237 -0
  15. package/node_modules/@slack/types/dist/block-kit/composition-objects.d.ts.map +1 -0
  16. package/node_modules/@slack/types/dist/block-kit/composition-objects.js +4 -0
  17. package/node_modules/@slack/types/dist/block-kit/composition-objects.js.map +1 -0
  18. package/node_modules/@slack/types/dist/block-kit/extensions.d.ts +88 -0
  19. package/node_modules/@slack/types/dist/block-kit/extensions.d.ts.map +1 -0
  20. package/node_modules/@slack/types/dist/block-kit/extensions.js +3 -0
  21. package/node_modules/@slack/types/dist/block-kit/extensions.js.map +1 -0
  22. package/node_modules/@slack/types/dist/calls.d.ts +26 -0
  23. package/node_modules/@slack/types/dist/calls.d.ts.map +1 -0
  24. package/node_modules/@slack/types/dist/calls.js +6 -0
  25. package/node_modules/@slack/types/dist/calls.js.map +1 -0
  26. package/node_modules/@slack/types/dist/chunk.d.ts +52 -0
  27. package/node_modules/@slack/types/dist/chunk.d.ts.map +1 -0
  28. package/node_modules/@slack/types/dist/chunk.js +3 -0
  29. package/node_modules/@slack/types/dist/chunk.js.map +1 -0
  30. package/node_modules/@slack/types/dist/common/bot-profile.d.ts +12 -0
  31. package/node_modules/@slack/types/dist/common/bot-profile.d.ts.map +1 -0
  32. package/node_modules/@slack/types/dist/common/bot-profile.js +3 -0
  33. package/node_modules/@slack/types/dist/common/bot-profile.js.map +1 -0
  34. package/node_modules/@slack/types/dist/common/status-emoji-display-info.d.ts +6 -0
  35. package/node_modules/@slack/types/dist/common/status-emoji-display-info.d.ts.map +1 -0
  36. package/node_modules/@slack/types/dist/common/status-emoji-display-info.js +3 -0
  37. package/node_modules/@slack/types/dist/common/status-emoji-display-info.js.map +1 -0
  38. package/node_modules/@slack/types/dist/dialog.d.ts +36 -0
  39. package/node_modules/@slack/types/dist/dialog.d.ts.map +1 -0
  40. package/node_modules/@slack/types/dist/dialog.js +3 -0
  41. package/node_modules/@slack/types/dist/dialog.js.map +1 -0
  42. package/node_modules/@slack/types/dist/events/app.d.ts +204 -0
  43. package/node_modules/@slack/types/dist/events/app.d.ts.map +1 -0
  44. package/node_modules/@slack/types/dist/events/app.js +3 -0
  45. package/node_modules/@slack/types/dist/events/app.js.map +1 -0
  46. package/node_modules/@slack/types/dist/events/assistant.d.ts +29 -0
  47. package/node_modules/@slack/types/dist/events/assistant.d.ts.map +1 -0
  48. package/node_modules/@slack/types/dist/events/assistant.js +3 -0
  49. package/node_modules/@slack/types/dist/events/assistant.js.map +1 -0
  50. package/node_modules/@slack/types/dist/events/call.d.ts +8 -0
  51. package/node_modules/@slack/types/dist/events/call.d.ts.map +1 -0
  52. package/node_modules/@slack/types/dist/events/call.js +3 -0
  53. package/node_modules/@slack/types/dist/events/call.js.map +1 -0
  54. package/node_modules/@slack/types/dist/events/channel.d.ts +85 -0
  55. package/node_modules/@slack/types/dist/events/channel.d.ts.map +1 -0
  56. package/node_modules/@slack/types/dist/events/channel.js +3 -0
  57. package/node_modules/@slack/types/dist/events/channel.js.map +1 -0
  58. package/node_modules/@slack/types/dist/events/dnd.d.ts +24 -0
  59. package/node_modules/@slack/types/dist/events/dnd.d.ts.map +1 -0
  60. package/node_modules/@slack/types/dist/events/dnd.js +3 -0
  61. package/node_modules/@slack/types/dist/events/dnd.js.map +1 -0
  62. package/node_modules/@slack/types/dist/events/email.d.ts +6 -0
  63. package/node_modules/@slack/types/dist/events/email.d.ts.map +1 -0
  64. package/node_modules/@slack/types/dist/events/email.js +3 -0
  65. package/node_modules/@slack/types/dist/events/email.js.map +1 -0
  66. package/node_modules/@slack/types/dist/events/emoji.d.ts +11 -0
  67. package/node_modules/@slack/types/dist/events/emoji.d.ts.map +1 -0
  68. package/node_modules/@slack/types/dist/events/emoji.js +3 -0
  69. package/node_modules/@slack/types/dist/events/emoji.js.map +1 -0
  70. package/node_modules/@slack/types/dist/events/entity-details-requested.d.ts +21 -0
  71. package/node_modules/@slack/types/dist/events/entity-details-requested.d.ts.map +1 -0
  72. package/node_modules/@slack/types/dist/events/entity-details-requested.js +3 -0
  73. package/node_modules/@slack/types/dist/events/entity-details-requested.js.map +1 -0
  74. package/node_modules/@slack/types/dist/events/file.d.ts +60 -0
  75. package/node_modules/@slack/types/dist/events/file.d.ts.map +1 -0
  76. package/node_modules/@slack/types/dist/events/file.js +4 -0
  77. package/node_modules/@slack/types/dist/events/file.js.map +1 -0
  78. package/node_modules/@slack/types/dist/events/function.d.ts +33 -0
  79. package/node_modules/@slack/types/dist/events/function.d.ts.map +1 -0
  80. package/node_modules/@slack/types/dist/events/function.js +3 -0
  81. package/node_modules/@slack/types/dist/events/function.js.map +1 -0
  82. package/node_modules/@slack/types/dist/events/grid-migration.d.ts +9 -0
  83. package/node_modules/@slack/types/dist/events/grid-migration.d.ts.map +1 -0
  84. package/node_modules/@slack/types/dist/events/grid-migration.js +3 -0
  85. package/node_modules/@slack/types/dist/events/grid-migration.js.map +1 -0
  86. package/node_modules/@slack/types/dist/events/group.d.ts +55 -0
  87. package/node_modules/@slack/types/dist/events/group.d.ts.map +1 -0
  88. package/node_modules/@slack/types/dist/events/group.js +3 -0
  89. package/node_modules/@slack/types/dist/events/group.js.map +1 -0
  90. package/node_modules/@slack/types/dist/events/im.d.ts +26 -0
  91. package/node_modules/@slack/types/dist/events/im.d.ts.map +1 -0
  92. package/node_modules/@slack/types/dist/events/im.js +3 -0
  93. package/node_modules/@slack/types/dist/events/im.js.map +1 -0
  94. package/node_modules/@slack/types/dist/events/index.d.ts +60 -0
  95. package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -0
  96. package/node_modules/@slack/types/dist/events/index.js +43 -0
  97. package/node_modules/@slack/types/dist/events/index.js.map +1 -0
  98. package/node_modules/@slack/types/dist/events/invite.d.ts +20 -0
  99. package/node_modules/@slack/types/dist/events/invite.d.ts.map +1 -0
  100. package/node_modules/@slack/types/dist/events/invite.js +3 -0
  101. package/node_modules/@slack/types/dist/events/invite.js.map +1 -0
  102. package/node_modules/@slack/types/dist/events/link-shared.d.ts +16 -0
  103. package/node_modules/@slack/types/dist/events/link-shared.d.ts.map +1 -0
  104. package/node_modules/@slack/types/dist/events/link-shared.js +3 -0
  105. package/node_modules/@slack/types/dist/events/link-shared.js.map +1 -0
  106. package/node_modules/@slack/types/dist/events/member.d.ts +19 -0
  107. package/node_modules/@slack/types/dist/events/member.d.ts.map +1 -0
  108. package/node_modules/@slack/types/dist/events/member.js +3 -0
  109. package/node_modules/@slack/types/dist/events/member.js.map +1 -0
  110. package/node_modules/@slack/types/dist/events/message-metadata.d.ts +38 -0
  111. package/node_modules/@slack/types/dist/events/message-metadata.d.ts.map +1 -0
  112. package/node_modules/@slack/types/dist/events/message-metadata.js +3 -0
  113. package/node_modules/@slack/types/dist/events/message-metadata.js.map +1 -0
  114. package/node_modules/@slack/types/dist/events/message.d.ts +306 -0
  115. package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -0
  116. package/node_modules/@slack/types/dist/events/message.js +3 -0
  117. package/node_modules/@slack/types/dist/events/message.js.map +1 -0
  118. package/node_modules/@slack/types/dist/events/pin.d.ts +60 -0
  119. package/node_modules/@slack/types/dist/events/pin.d.ts.map +1 -0
  120. package/node_modules/@slack/types/dist/events/pin.js +3 -0
  121. package/node_modules/@slack/types/dist/events/pin.js.map +1 -0
  122. package/node_modules/@slack/types/dist/events/reaction.d.ts +23 -0
  123. package/node_modules/@slack/types/dist/events/reaction.d.ts.map +1 -0
  124. package/node_modules/@slack/types/dist/events/reaction.js +3 -0
  125. package/node_modules/@slack/types/dist/events/reaction.js.map +1 -0
  126. package/node_modules/@slack/types/dist/events/shared-channel.d.ts +134 -0
  127. package/node_modules/@slack/types/dist/events/shared-channel.d.ts.map +1 -0
  128. package/node_modules/@slack/types/dist/events/shared-channel.js +3 -0
  129. package/node_modules/@slack/types/dist/events/shared-channel.js.map +1 -0
  130. package/node_modules/@slack/types/dist/events/star.d.ts +13 -0
  131. package/node_modules/@slack/types/dist/events/star.d.ts.map +1 -0
  132. package/node_modules/@slack/types/dist/events/star.js +3 -0
  133. package/node_modules/@slack/types/dist/events/star.js.map +1 -0
  134. package/node_modules/@slack/types/dist/events/steps-from-apps.d.ts +82 -0
  135. package/node_modules/@slack/types/dist/events/steps-from-apps.d.ts.map +1 -0
  136. package/node_modules/@slack/types/dist/events/steps-from-apps.js +3 -0
  137. package/node_modules/@slack/types/dist/events/steps-from-apps.js.map +1 -0
  138. package/node_modules/@slack/types/dist/events/subteam.d.ts +66 -0
  139. package/node_modules/@slack/types/dist/events/subteam.d.ts.map +1 -0
  140. package/node_modules/@slack/types/dist/events/subteam.js +3 -0
  141. package/node_modules/@slack/types/dist/events/subteam.js.map +1 -0
  142. package/node_modules/@slack/types/dist/events/team.d.ts +99 -0
  143. package/node_modules/@slack/types/dist/events/team.d.ts.map +1 -0
  144. package/node_modules/@slack/types/dist/events/team.js +3 -0
  145. package/node_modules/@slack/types/dist/events/team.js.map +1 -0
  146. package/node_modules/@slack/types/dist/events/token.d.ts +8 -0
  147. package/node_modules/@slack/types/dist/events/token.d.ts.map +1 -0
  148. package/node_modules/@slack/types/dist/events/token.js +3 -0
  149. package/node_modules/@slack/types/dist/events/token.js.map +1 -0
  150. package/node_modules/@slack/types/dist/events/user.d.ts +313 -0
  151. package/node_modules/@slack/types/dist/events/user.d.ts.map +1 -0
  152. package/node_modules/@slack/types/dist/events/user.js +3 -0
  153. package/node_modules/@slack/types/dist/events/user.js.map +1 -0
  154. package/node_modules/@slack/types/dist/index.d.ts +12 -0
  155. package/node_modules/@slack/types/dist/index.d.ts.map +1 -0
  156. package/node_modules/@slack/types/dist/index.js +28 -0
  157. package/node_modules/@slack/types/dist/index.js.map +1 -0
  158. package/node_modules/@slack/types/dist/message-attachments.d.ts +171 -0
  159. package/node_modules/@slack/types/dist/message-attachments.d.ts.map +1 -0
  160. package/node_modules/@slack/types/dist/message-attachments.js +3 -0
  161. package/node_modules/@slack/types/dist/message-attachments.js.map +1 -0
  162. package/node_modules/@slack/types/dist/message-metadata.d.ts +281 -0
  163. package/node_modules/@slack/types/dist/message-metadata.d.ts.map +1 -0
  164. package/node_modules/@slack/types/dist/message-metadata.js +27 -0
  165. package/node_modules/@slack/types/dist/message-metadata.js.map +1 -0
  166. package/node_modules/@slack/types/dist/views.d.ts +71 -0
  167. package/node_modules/@slack/types/dist/views.d.ts.map +1 -0
  168. package/node_modules/@slack/types/dist/views.js +3 -0
  169. package/node_modules/@slack/types/dist/views.js.map +1 -0
  170. package/node_modules/@slack/types/package.json +47 -0
  171. package/node_modules/@vellumai/gateway-client/bun.lock +3 -0
  172. package/node_modules/@vellumai/gateway-client/package.json +1 -0
  173. package/node_modules/@vellumai/gateway-client/src/gateway-ipc-contracts.ts +80 -0
  174. package/node_modules/@vellumai/gateway-client/src/outbound-contract.ts +3 -2
  175. package/openapi.yaml +181 -15
  176. package/package.json +2 -1
  177. package/src/__tests__/app-builder-skill-instructions.test.ts +47 -5
  178. package/src/__tests__/attachment-upload-trusted-source.test.ts +11 -6
  179. package/src/__tests__/channel-guardian.test.ts +20 -0
  180. package/src/__tests__/config-loader-backfill.test.ts +83 -1
  181. package/src/__tests__/copy-composer-tc-templates.test.ts +17 -0
  182. package/src/__tests__/db-conversation-fork-lineage-migration.test.ts +6 -8
  183. package/src/__tests__/db-conversation-inference-profile-migration.test.ts +7 -8
  184. package/src/__tests__/db-llm-request-log-provider-migration.test.ts +6 -16
  185. package/src/__tests__/db-schedule-syntax-migration.test.ts +0 -11
  186. package/src/__tests__/deterministic-verification-control-plane.test.ts +8 -8
  187. package/src/__tests__/drop-capability-card-state-migration.test.ts +0 -8
  188. package/src/__tests__/emit-signal-routing-intent.test.ts +83 -0
  189. package/src/__tests__/invite-routes-http.test.ts +6 -69
  190. package/src/__tests__/invite-service-ipc.test.ts +0 -2
  191. package/src/__tests__/relay-server.test.ts +152 -65
  192. package/src/__tests__/scrub-corrupted-image-attachments.test.ts +0 -8
  193. package/src/__tests__/trusted-contact-inline-approval-integration.test.ts +72 -0
  194. package/src/__tests__/twilio-routes.test.ts +1 -2
  195. package/src/__tests__/usage-cache-backfill-migration.test.ts +2 -7
  196. package/src/__tests__/workspace-migration-109-swap-quality-profile-to-glm-5p2.test.ts +281 -0
  197. package/src/api/constants/inference-profiles.ts +22 -0
  198. package/src/api/index.ts +1 -0
  199. package/src/approvals/guardian-request-resolvers.ts +102 -52
  200. package/src/calls/__tests__/relay-setup-router.test.ts +88 -62
  201. package/src/calls/relay-server.ts +33 -22
  202. package/src/calls/relay-setup-router.ts +20 -6
  203. package/src/calls/relay-verification.ts +4 -4
  204. package/src/cli/commands/contacts.ts +6 -24
  205. package/src/cli/commands/memory/__tests__/memory-v3.test.ts +6 -1
  206. package/src/cli/commands/memory/memory-v3.ts +176 -4
  207. package/src/config/__tests__/sync-gated-profiles.test.ts +2 -2
  208. package/src/config/bundled-skills/app-builder/SKILL.md +15 -33
  209. package/src/config/bundled-skills/app-builder/references/DESIGN_SYSTEM.md +3 -8
  210. package/src/config/bundled-skills/app-builder/references/INTERACTION_HOOKS.md +64 -37
  211. package/src/config/bundled-skills/app-builder/references/RESPONSIVE.md +1 -1
  212. package/src/config/bundled-skills/app-builder/references/WIDGETS.md +14 -72
  213. package/src/config/bundled-skills/app-builder/references/examples/README.md +1 -2
  214. package/src/config/bundled-skills/contacts/SKILL.md +7 -12
  215. package/src/config/bundled-skills/workflows/SKILL.md +4 -3
  216. package/src/config/call-site-defaults.ts +5 -2
  217. package/src/config/seed-inference-profiles.ts +60 -10
  218. package/src/config/sync-gated-profiles.ts +13 -1
  219. package/src/daemon/conversation-tool-setup.ts +1 -1
  220. package/src/daemon/handlers/config-channels.ts +32 -18
  221. package/src/daemon/message-types/inbox.ts +0 -6
  222. package/src/daemon/switch-inference-profile-tool.ts +1 -1
  223. package/src/ipc/routes/invite-ipc-routes.ts +0 -3
  224. package/src/memory/migrations/126-backfill-guardian-principal-id.ts +189 -196
  225. package/src/memory/migrations/127-guardian-principal-id-not-null.ts +98 -105
  226. package/src/memory/migrations/134-contacts-notes-column.ts +66 -69
  227. package/src/memory/migrations/135-backfill-contact-interaction-stats.ts +19 -22
  228. package/src/memory/migrations/136-drop-assistant-id-columns.ts +227 -230
  229. package/src/memory/migrations/140-backfill-usage-cache-accounting.ts +204 -209
  230. package/src/memory/migrations/141-rename-verification-table.ts +45 -48
  231. package/src/memory/migrations/142-rename-verification-session-id-column.ts +16 -23
  232. package/src/memory/migrations/143-rename-guardian-verification-values.ts +23 -30
  233. package/src/memory/migrations/144-rename-voice-to-phone.ts +133 -136
  234. package/src/memory/migrations/145-drop-accounts-table.ts +4 -7
  235. package/src/memory/migrations/147-migrate-reminders-to-schedules.ts +79 -82
  236. package/src/memory/migrations/148-drop-reminders-table.ts +3 -6
  237. package/src/memory/migrations/150-oauth-apps-client-secret-path.ts +71 -78
  238. package/src/memory/migrations/157-invite-contact-id.ts +73 -76
  239. package/src/memory/migrations/162-guardian-timestamps-epoch-ms.ts +44 -58
  240. package/src/memory/migrations/169-rename-gmail-provider-key-to-google.ts +36 -43
  241. package/src/memory/migrations/174-rename-thread-starters-table.ts +30 -37
  242. package/src/memory/migrations/176-drop-capability-card-state.ts +17 -22
  243. package/src/memory/migrations/177-create-trace-events-table.ts +23 -28
  244. package/src/memory/migrations/180-backfill-inline-attachments-to-disk.ts +36 -43
  245. package/src/memory/migrations/181-rename-thread-starters-checkpoints.ts +14 -21
  246. package/src/memory/migrations/191-backfill-audio-attachment-mime-types.ts +17 -24
  247. package/src/memory/migrations/192-contacts-user-file-column.ts +6 -9
  248. package/src/memory/migrations/193-add-source-type-columns.ts +33 -36
  249. package/src/memory/migrations/194-memory-recall-logs.ts +34 -39
  250. package/src/memory/migrations/196-strip-integration-prefix-from-provider-keys.ts +59 -66
  251. package/src/memory/migrations/199-guardian-request-enrichment-columns.ts +41 -48
  252. package/src/memory/migrations/204-rename-memory-graph-type-values.ts +11 -18
  253. package/src/memory/migrations/206-scrub-corrupted-image-attachments.ts +76 -83
  254. package/src/memory/migrations/209-strip-thinking-from-consolidated.ts +50 -57
  255. package/src/memory/migrations/211-memory-recall-logs-query-context.ts +6 -11
  256. package/src/memory/migrations/212-llm-request-logs-created-at-index.ts +4 -9
  257. package/src/memory/migrations/217-conversation-host-access.ts +13 -18
  258. package/src/memory/migrations/220-normalize-user-file-by-principal.ts +86 -93
  259. package/src/memory/migrations/222-strip-placeholder-sentinels-from-messages.ts +41 -48
  260. package/src/memory/migrations/230-acp-session-history.ts +23 -28
  261. package/src/memory/migrations/231-repair-memory-graph-event-dates.ts +58 -62
  262. package/src/memory/migrations/232-activation-state.ts +11 -16
  263. package/src/memory/migrations/233-document-conversations.ts +20 -25
  264. package/src/memory/migrations/234-memory-v2-activation-logs.ts +26 -31
  265. package/src/memory/migrations/235-slack-compaction-watermark.ts +5 -10
  266. package/src/memory/migrations/236-tool-invocations-matched-rule-id.ts +6 -11
  267. package/src/memory/migrations/237-heartbeat-runs.ts +22 -27
  268. package/src/memory/migrations/239-trace-events-created-at-index.ts +4 -9
  269. package/src/memory/migrations/242-message-bookmarks.ts +17 -22
  270. package/src/memory/migrations/245-memory-retrospective-state.ts +8 -13
  271. package/src/memory/migrations/249-normalize-slack-external-content.ts +37 -41
  272. package/src/memory/migrations/251-a2a-tasks.ts +27 -32
  273. package/src/memory/migrations/254-external-conversation-binding-chat-name.ts +12 -17
  274. package/src/memory/migrations/255-channel-inbound-delivery-attempts.ts +10 -15
  275. package/src/memory/migrations/256-memory-v2-injection-events.ts +70 -74
  276. package/src/memory/migrations/259-conversation-cleaned-at.ts +4 -9
  277. package/src/memory/migrations/260-rename-cleaned-at.ts +11 -16
  278. package/src/memory/migrations/261-llm-usage-add-raw-usage.ts +3 -8
  279. package/src/memory/migrations/262-memory-v3-coactivation.ts +21 -26
  280. package/src/memory/migrations/263-memory-v3-auto-edges.ts +14 -19
  281. package/src/memory/migrations/270-schedule-description.ts +7 -12
  282. package/src/memory/migrations/272-acp-session-history-cwd.ts +8 -13
  283. package/src/memory/migrations/281-memory-retrospective-remembered-log.ts +8 -13
  284. package/src/memory/migrations/__tests__/run-migrations.test.ts +1 -12
  285. package/src/memory/migrations/run-migrations.ts +9 -30
  286. package/src/memory/v3-eval/__tests__/eval-packets.test.ts +38 -0
  287. package/src/memory/v3-eval/__tests__/eval-tally.test.ts +139 -0
  288. package/src/memory/v3-eval/eval-packets.ts +197 -12
  289. package/src/memory/v3-eval/eval-tally.ts +234 -0
  290. package/src/messaging/providers/index.ts +1 -1
  291. package/src/messaging/providers/slack/send.test.ts +87 -39
  292. package/src/messaging/providers/slack/send.ts +84 -105
  293. package/src/notifications/README.md +9 -5
  294. package/src/notifications/__tests__/deterministic-checks.test.ts +42 -0
  295. package/src/notifications/adapters/slack.ts +12 -10
  296. package/src/notifications/copy-composer.ts +48 -68
  297. package/src/notifications/deterministic-checks.ts +19 -16
  298. package/src/notifications/emit-signal.ts +29 -1
  299. package/src/notifications/trusted-contact-payloads.ts +72 -0
  300. package/src/plugin-api/model-profiles.test.ts +122 -0
  301. package/src/plugin-api/model-profiles.ts +5 -0
  302. package/src/plugin-api/vision-support.test.ts +158 -0
  303. package/src/plugin-api/vision-support.ts +9 -0
  304. package/src/runtime/AGENTS.md +8 -0
  305. package/src/runtime/__tests__/slack-block-formatting.test.ts +39 -10
  306. package/src/runtime/actor-trust-resolver.ts +0 -16
  307. package/src/runtime/invite-service.ts +35 -22
  308. package/src/runtime/routes/__tests__/channel-verification-revoke.test.ts +277 -0
  309. package/src/runtime/routes/__tests__/channel-verification-routes.test.ts +140 -0
  310. package/src/runtime/routes/__tests__/contact-routes-update-channel-relay.test.ts +164 -0
  311. package/src/runtime/routes/__tests__/invite-relay-routes.test.ts +0 -3
  312. package/src/runtime/routes/approval-strategies/guardian-callback-strategy.ts +30 -20
  313. package/src/runtime/routes/attachment-routes.ts +21 -17
  314. package/src/runtime/routes/channel-verification-routes.ts +12 -1
  315. package/src/runtime/routes/contact-routes.ts +25 -92
  316. package/src/runtime/routes/guardian-approval-interception.ts +3 -1
  317. package/src/runtime/routes/inbound-stages/admission-policy.ts +20 -5
  318. package/src/runtime/routes/memory-eval-routes.ts +92 -0
  319. package/src/runtime/slack-block-formatting.ts +46 -48
  320. package/src/tools/subagent/spawn.ts +1 -1
  321. package/src/workflows/engine.ts +22 -0
  322. package/src/workflows/leaf-runner.test.ts +39 -0
  323. package/src/workflows/leaf-runner.ts +26 -1
  324. package/src/workspace/migrations/109-swap-quality-profile-to-glm-5p2.ts +121 -0
  325. package/src/workspace/migrations/registry.ts +2 -0
package/ARCHITECTURE.md CHANGED
@@ -605,13 +605,13 @@ Audio-to-text conversion occurs in six distinct runtime boundaries, each with it
605
605
 
606
606
  **Boundary overview:**
607
607
 
608
- | Boundary | Runtime | Provider (current) | Adapter module | Caller |
609
- | ---------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
610
- | **Telephony (hybrid)** | Twilio-native ConversationRelay or daemon media-stream (provider-conditional) | Configured STT provider (via `services.stt`) | `src/calls/telephony-stt-routing.ts` | `src/calls/twilio-routes.ts` |
611
- | **Daemon batch** | Daemon process (REST API to provider) | Configured STT provider (via `services.stt`) | `src/stt/daemon-batch-transcriber.ts` | `src/runtime/routes/inbound-stages/transcribe-audio.ts` |
612
- | **Conversation streaming** | Daemon process (WebSocket-based) | Configured STT provider (via `services.stt`) | `src/stt/stt-stream-session.ts`, `src/providers/speech-to-text/deepgram-realtime.ts`, `src/providers/speech-to-text/google-gemini-live-stream.ts`, `src/providers/speech-to-text/openai-whisper-stream.ts`, `src/providers/speech-to-text/xai-realtime.ts` | Web/Electron dictation client via gateway WS proxy |
613
- | **Live voice channel** | Assistant process (gateway-authenticated WebSocket) | Configured STT provider (via `services.stt`) | `src/runtime/http-server.ts`, `src/live-voice/live-voice-session-manager.ts`, `src/live-voice/live-voice-session.ts`, `src/providers/speech-to-text/resolve.ts`, streaming provider adapters | Web/Electron live voice client via `/v1/live-voice` |
614
- | **Client service-first** | Web/Electron via gateway → daemon | Configured STT provider (via `services.stt`) | `src/runtime/routes/stt-routes.ts` | Web/Electron dictation and voice clients |
608
+ | Boundary | Runtime | Provider (current) | Adapter module | Caller |
609
+ | -------------------------- | ----------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
610
+ | **Telephony (hybrid)** | Twilio-native ConversationRelay or daemon media-stream (provider-conditional) | Configured STT provider (via `services.stt`) | `src/calls/telephony-stt-routing.ts` | `src/calls/twilio-routes.ts` |
611
+ | **Daemon batch** | Daemon process (REST API to provider) | Configured STT provider (via `services.stt`) | `src/stt/daemon-batch-transcriber.ts` | `src/runtime/routes/inbound-stages/transcribe-audio.ts` |
612
+ | **Conversation streaming** | Daemon process (WebSocket-based) | Configured STT provider (via `services.stt`) | `src/stt/stt-stream-session.ts`, `src/providers/speech-to-text/deepgram-realtime.ts`, `src/providers/speech-to-text/google-gemini-live-stream.ts`, `src/providers/speech-to-text/openai-whisper-stream.ts`, `src/providers/speech-to-text/xai-realtime.ts` | Web/Electron dictation client via gateway WS proxy |
613
+ | **Live voice channel** | Assistant process (gateway-authenticated WebSocket) | Configured STT provider (via `services.stt`) | `src/runtime/http-server.ts`, `src/live-voice/live-voice-session-manager.ts`, `src/live-voice/live-voice-session.ts`, `src/providers/speech-to-text/resolve.ts`, streaming provider adapters | Web/Electron live voice client via `/v1/live-voice` |
614
+ | **Client service-first** | Web/Electron via gateway → daemon | Configured STT provider (via `services.stt`) | `src/runtime/routes/stt-routes.ts` | Web/Electron dictation and voice clients |
615
615
 
616
616
  **Telephony boundary (hybrid routing):**
617
617
 
@@ -700,18 +700,18 @@ The conversation streaming path degrades gracefully to the existing batch STT pa
700
700
 
701
701
  **Key source files:**
702
702
 
703
- | File | Purpose |
704
- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
705
- | `src/stt/types.ts` | `StreamingTranscriber` interface, `SttStreamClientEvent`/`SttStreamServerEvent` discriminated unions, `ConversationStreamingMode` type |
706
- | `src/stt/stt-stream-session.ts` | Runtime session orchestrator: lifecycle management, idle timeout, event forwarding with `seq` ordering |
707
- | `src/providers/speech-to-text/deepgram-realtime.ts` | Deepgram realtime-ws adapter: WebSocket to Deepgram `/v1/listen`, `is_final`/`speech_final` normalization |
708
- | `src/providers/speech-to-text/google-gemini-live-stream.ts` | Google Gemini realtime-ws adapter: bidirectional Live API session, `serverContent.inputTranscription` normalization |
709
- | `src/providers/speech-to-text/provider-catalog.ts` | Provider catalog with `conversationStreamingMode` per entry (`realtime-ws`, `incremental-batch`, `none`) |
710
- | `src/providers/speech-to-text/resolve.ts` | `resolveStreamingTranscriber()`: credential-aware factory for streaming adapters; `resolveConversationStreamingSttCapability()`: capability validator |
711
- | `src/runtime/http-server.ts` | Runtime WebSocket upgrade handler for `/v1/stt/stream`, session registry (`activeSttStreamSessions`), graceful shutdown |
712
- | `gateway/src/http/routes/stt-stream-websocket.ts` | Gateway WebSocket proxy: authenticates client, opens upstream WS to daemon with service token |
713
- | `clients/web/src/domains/chat/voice/dictation-stream.ts` | Web streaming dictation client: WebSocket session, event parsing, failure reporting |
714
- | `clients/web/src/domains/chat/voice/voice-recording-store.ts` | Web voice recording state: streaming/batch priority, fallback on failure |
703
+ | File | Purpose |
704
+ | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
705
+ | `src/stt/types.ts` | `StreamingTranscriber` interface, `SttStreamClientEvent`/`SttStreamServerEvent` discriminated unions, `ConversationStreamingMode` type |
706
+ | `src/stt/stt-stream-session.ts` | Runtime session orchestrator: lifecycle management, idle timeout, event forwarding with `seq` ordering |
707
+ | `src/providers/speech-to-text/deepgram-realtime.ts` | Deepgram realtime-ws adapter: WebSocket to Deepgram `/v1/listen`, `is_final`/`speech_final` normalization |
708
+ | `src/providers/speech-to-text/google-gemini-live-stream.ts` | Google Gemini realtime-ws adapter: bidirectional Live API session, `serverContent.inputTranscription` normalization |
709
+ | `src/providers/speech-to-text/provider-catalog.ts` | Provider catalog with `conversationStreamingMode` per entry (`realtime-ws`, `incremental-batch`, `none`) |
710
+ | `src/providers/speech-to-text/resolve.ts` | `resolveStreamingTranscriber()`: credential-aware factory for streaming adapters; `resolveConversationStreamingSttCapability()`: capability validator |
711
+ | `src/runtime/http-server.ts` | Runtime WebSocket upgrade handler for `/v1/stt/stream`, session registry (`activeSttStreamSessions`), graceful shutdown |
712
+ | `gateway/src/http/routes/stt-stream-websocket.ts` | Gateway WebSocket proxy: authenticates client, opens upstream WS to daemon with service token |
713
+ | `clients/web/src/domains/chat/voice/dictation-stream.ts` | Web streaming dictation client: WebSocket session, event parsing, failure reporting |
714
+ | `clients/web/src/domains/chat/voice/voice-recording-store.ts` | Web voice recording state: streaming/batch priority, fallback on failure |
715
715
 
716
716
  **Live voice channel boundary:**
717
717
 
@@ -2054,9 +2054,9 @@ Connected channels are resolved at signal emission time: vellum is always includ
2054
2054
  | Module | Purpose |
2055
2055
  | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
2056
2056
  | `assistant/src/channels/config.ts` | Channel policy registry — single source of truth for per-channel notification behavior |
2057
- | `assistant/src/notifications/emit-signal.ts` | Single entry point for all producers; orchestrates the full pipeline |
2057
+ | `assistant/src/notifications/emit-signal.ts` | Single entry point for all producers; orchestrates the full pipeline; runs the source-active pre-decision gate |
2058
2058
  | `assistant/src/notifications/decision-engine.ts` | LLM-based routing decisions with deterministic fallback |
2059
- | `assistant/src/notifications/deterministic-checks.ts` | Hard invariant checks (dedupe, source-active suppression, channel availability) |
2059
+ | `assistant/src/notifications/deterministic-checks.ts` | Post-decision hard invariant checks (schema, dedupe, channel availability, copy quality) |
2060
2060
  | `assistant/src/notifications/broadcaster.ts` | Dispatches decisions to channel adapters; emits `notification_conversation_created` SSE event (creation-only) |
2061
2061
  | `assistant/src/notifications/conversation-pairing.ts` | Materializes conversation + message per delivery; executes conversation reuse decisions |
2062
2062
  | `assistant/src/notifications/conversation-candidates.ts` | Builds per-channel candidate set of recent conversations for the decision engine |
package/bun.lock CHANGED
@@ -13,6 +13,7 @@
13
13
  "@qdrant/js-client-rest": "1.17.0",
14
14
  "@resvg/resvg-js": "2.6.2",
15
15
  "@sentry/node": "10.43.0",
16
+ "@slack/types": "2.21.1",
16
17
  "@vellumai/ces-client": "file:../packages/ces-client",
17
18
  "@vellumai/credential-storage": "file:../packages/credential-storage",
18
19
  "@vellumai/egress-proxy": "file:../packages/egress-proxy",
@@ -391,6 +392,8 @@
391
392
 
392
393
  "@sentry/opentelemetry": ["@sentry/opentelemetry@10.43.0", "", { "dependencies": { "@sentry/core": "10.43.0" }, "peerDependencies": { "@opentelemetry/api": "^1.9.0", "@opentelemetry/context-async-hooks": "^1.30.1 || ^2.1.0", "@opentelemetry/core": "^1.30.1 || ^2.1.0", "@opentelemetry/sdk-trace-base": "^1.30.1 || ^2.1.0", "@opentelemetry/semantic-conventions": "^1.39.0" } }, "sha512-+fIcnnLdvBHdq4nKq23t9v/B9D4L97fPWEDksXbpGs11o6BsqY4Tlzmce6cP95iiQhPckCEag3FthSND+BYtYQ=="],
393
394
 
395
+ "@slack/types": ["@slack/types@2.21.1", "", {}, "sha512-I8vmSjNYWsaxuWPx6dz4yeh0h7vRBWbgAMK14LEmblbZ404BtrPbXs6jDPx4cYgGf8msDGF4A9opLZBu21FViQ=="],
396
+
394
397
  "@ts-graphviz/adapter": ["@ts-graphviz/adapter@2.0.6", "", { "dependencies": { "@ts-graphviz/common": "^2.1.5" } }, "sha512-kJ10lIMSWMJkLkkCG5gt927SnGZcBuG0s0HHswGzcHTgvtUe7yk5/3zTEr0bafzsodsOq5Gi6FhQeV775nC35Q=="],
395
398
 
396
399
  "@ts-graphviz/ast": ["@ts-graphviz/ast@2.0.7", "", { "dependencies": { "@ts-graphviz/common": "^2.1.5" } }, "sha512-e6+2qtNV99UT6DJSoLbHfkzfyqY84aIuoV8Xlb9+hZAjgpum8iVHprGeAMQ4rF6sKUAxrmY8rfF/vgAwoPc3gw=="],
package/docs/workflows.md CHANGED
@@ -150,12 +150,12 @@ only as fast as the slowest leaf in each stage.
150
150
 
151
151
  ### Leaf options (`opts` for `agent` / `leaf`)
152
152
 
153
- | Option | Type | Effect |
154
- | --------- | -------------------------- | --------------------------------------------------------------------------------------- |
155
- | `schema` | JSON Schema object literal | Forces structured output via a tool. A schema leaf runs with **no tools**. |
156
- | `label` | string | Short display/diagnostic label for the leaf. |
157
- | `profile` | string | Overrides the model profile. Must exist in `llm.profiles` or the leaf throws. |
158
- | `persona` | boolean | `true` makes the leaf speak as the assistant (identity + memory). Default is anonymous. |
153
+ | Option | Type | Effect |
154
+ | --------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------- |
155
+ | `schema` | JSON Schema object literal | Forces structured output via a tool. A schema leaf runs with **no tools** — no read/recall; pass content inline. |
156
+ | `label` | string | Short display/diagnostic label for the leaf. |
157
+ | `profile` | string | Overrides the model profile. Must exist in `llm.profiles` or the leaf throws. |
158
+ | `persona` | boolean | `true` makes the leaf speak as the assistant (identity + memory). Default is anonymous. |
159
159
 
160
160
  #### `schema` is a JSON Schema literal, not Zod
161
161
 
@@ -163,7 +163,12 @@ A script runs in the sandbox and cannot hold a host-side Zod object, so a leaf's
163
163
  `schema` is a plain **JSON Schema object literal**. The engine builds a forced
164
164
  `tool_choice` call whose synthetic tool input is that schema, validates the
165
165
  model's output against it, and returns the structured object. A leaf with a
166
- `schema` is a pure judge/extractor — it gets **no tools**:
166
+ `schema` is a pure judge/extractor — it gets **no tools**, so it has no
167
+ `file_read`/`file_list`/`recall`/`web_search` and **cannot read files or recall
168
+ memory**. Anything it must judge has to be passed **inline** in the prompt; a
169
+ schema leaf told to "read these files" will confabulate against the schema. (To
170
+ read first and then emit structured output, use a tool leaf that returns JSON in
171
+ its text and parse it yourself.)
167
172
 
168
173
  ```js
169
174
  leaf(`Score this option 0-10 for fit: ${opt}`, {
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2014- Slack Technologies, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
@@ -0,0 +1,32 @@
1
+ # Slack Types
2
+
3
+ The `@slack/types` package is intended to be used as a central location for modeling Slack interfaces, types, payloads
4
+ and constructs of all kinds.
5
+
6
+ ## Requirements
7
+
8
+ This package supports Node v18 and higher. It's highly recommended to use [the latest LTS version of
9
+ node](https://github.com/nodejs/Release#release-schedule), and the documentation is written using syntax and features
10
+ from that version.
11
+
12
+ ## Installation
13
+
14
+ ```shell
15
+ $ npm install @slack/types
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ This package exports many different types and interfaces. It is best to peruse the source code to see what is
21
+ available, but a brief list:
22
+
23
+ - Block Kit blocks and elements (`./src/block-kit/*`)
24
+ - Message attachments (`./src/message-attachments.ts`)
25
+
26
+ ## Getting Help
27
+
28
+ If you get stuck, we're here to help. The following are the best ways to get assistance working through your issue:
29
+
30
+ * [Issue Tracker](http://github.com/slackapi/node-slack-sdk/issues) for questions, feature requests, bug reports and
31
+ general discussion related to this package. Try searching before you create a new issue.
32
+ * [Email us](mailto:developers@slack.com) in Slack developer support: `developers@slack.com`