@vellumai/vellum-gateway 0.6.6 → 0.7.1

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 (508) hide show
  1. package/ARCHITECTURE.md +10 -10
  2. package/Dockerfile +10 -8
  3. package/README.md +4 -8
  4. package/bun.lock +100 -70
  5. package/knip.json +6 -1
  6. package/package.json +8 -4
  7. package/scripts/test.sh +1 -1
  8. package/src/__tests__/auto-approve-thresholds.test.ts +23 -33
  9. package/src/__tests__/bash-risk-classifier.test.ts +221 -0
  10. package/src/__tests__/browser-relay-websocket.test.ts +0 -1
  11. package/src/__tests__/channel-verification-session-proxy.test.ts +0 -1
  12. package/src/__tests__/config.test.ts +0 -1
  13. package/src/__tests__/contacts-control-plane-proxy.test.ts +60 -1
  14. package/src/__tests__/credential-watcher-managed-bootstrap.test.ts +10 -56
  15. package/src/__tests__/credential-watcher.test.ts +11 -1
  16. package/src/__tests__/db-connection-isolation.test.ts +157 -0
  17. package/src/__tests__/fake-assistant-ipc.ts +39 -0
  18. package/src/__tests__/feature-flags-route.test.ts +5 -5
  19. package/src/__tests__/guardian-channel-actor-lookup.test.ts +47 -0
  20. package/src/__tests__/guardian-init-lockfile.test.ts +412 -375
  21. package/src/__tests__/ipc-contact-routes.test.ts +17 -4
  22. package/src/__tests__/ipc-feature-flag-routes.test.ts +1 -1
  23. package/src/__tests__/ipc-server-multi-client.test.ts +129 -0
  24. package/src/__tests__/ipc-socket-path.test.ts +66 -20
  25. package/src/__tests__/live-voice-websocket.test.ts +453 -0
  26. package/src/__tests__/load-guards.test.ts +0 -1
  27. package/src/__tests__/migration-teleport-gcs-proxy.test.ts +219 -0
  28. package/src/__tests__/nonbash-trust-rule-overrides.test.ts +501 -0
  29. package/src/__tests__/oauth-callback.test.ts +0 -1
  30. package/src/__tests__/push-schema-no-prompt.test.ts +76 -0
  31. package/src/__tests__/resolve-assistant.test.ts +0 -1
  32. package/src/__tests__/route-schema-guard.test.ts +3 -3
  33. package/src/__tests__/runtime-client.test.ts +103 -1
  34. package/src/__tests__/runtime-health-proxy.test.ts +0 -1
  35. package/src/__tests__/runtime-proxy-auth.test.ts +0 -1
  36. package/src/__tests__/runtime-proxy.test.ts +0 -1
  37. package/src/__tests__/schema.test.ts +0 -26
  38. package/src/__tests__/seed-trust-rules.test.ts +150 -0
  39. package/src/__tests__/slack-control-plane-proxy.test.ts +0 -1
  40. package/src/__tests__/slack-display-name.test.ts +66 -1
  41. package/src/__tests__/slack-normalize.test.ts +158 -4
  42. package/src/__tests__/slack-reaction-normalize.test.ts +0 -1
  43. package/src/__tests__/slack-socket-mode-thread-tracking.test.ts +630 -0
  44. package/src/__tests__/stt-stream-websocket.test.ts +0 -1
  45. package/src/__tests__/telegram-control-plane-proxy.test.ts +0 -1
  46. package/src/__tests__/telegram-send-attachments.test.ts +0 -1
  47. package/src/__tests__/telegram-webhook-handler.test.ts +0 -1
  48. package/src/__tests__/telegram-webhook-manager.test.ts +7 -13
  49. package/src/__tests__/text-verification-helpers.test.ts +136 -0
  50. package/src/__tests__/trust-rule-cache.test.ts +398 -0
  51. package/src/__tests__/trust-rule-store.test.ts +601 -0
  52. package/src/__tests__/trust-rules-routes.test.ts +373 -228
  53. package/src/__tests__/twilio-media-websocket.test.ts +0 -1
  54. package/src/__tests__/twilio-relay-websocket.test.ts +0 -1
  55. package/src/__tests__/twilio-webhooks.test.ts +0 -1
  56. package/src/__tests__/upstream-transport.test.ts +319 -0
  57. package/src/__tests__/whatsapp-download.test.ts +0 -1
  58. package/src/__tests__/whatsapp-webhook.test.ts +0 -1
  59. package/src/auth/capability-tokens.ts +248 -0
  60. package/src/auth/guardian-bootstrap.ts +575 -0
  61. package/src/auth/guardian-refresh.ts +300 -0
  62. package/src/auth/ipc-route-policy.ts +217 -0
  63. package/src/auth/token-exchange.ts +38 -0
  64. package/src/channels/types.ts +25 -2
  65. package/src/cli/enable-proxy.ts +0 -1
  66. package/src/config.ts +0 -7
  67. package/src/credential-reader.ts +5 -38
  68. package/src/credential-watcher.ts +9 -21
  69. package/src/db/assistant-db-proxy.ts +68 -0
  70. package/src/db/connection.ts +137 -14
  71. package/src/db/data-migrations/index.ts +6 -4
  72. package/src/db/data-migrations/m0002-actor-token-tables-to-gateway.ts +183 -0
  73. package/src/db/denial-reply-rate-limiter.ts +126 -0
  74. package/src/db/schema.ts +172 -4
  75. package/src/db/seed-trust-rules.ts +92 -0
  76. package/src/db/trust-rule-store.ts +339 -0
  77. package/src/email/register-callback.test.ts +6 -4
  78. package/src/email/register-callback.ts +1 -4
  79. package/src/feature-flag-registry.json +38 -46
  80. package/src/feature-flag-remote-store.ts +33 -2
  81. package/src/handlers/handle-inbound.ts +33 -0
  82. package/src/http/middleware/auth.ts +43 -0
  83. package/src/http/middleware/rate-limit.ts +0 -3
  84. package/src/http/routes/auto-approve-thresholds.ts +9 -23
  85. package/src/http/routes/brain-graph-proxy.ts +52 -61
  86. package/src/http/routes/browser-extension-pair.ts +455 -0
  87. package/src/http/routes/browser-relay-websocket.ts +18 -19
  88. package/src/http/routes/channel-readiness-proxy.ts +23 -67
  89. package/src/http/routes/channel-verification-session-proxy.test.ts +245 -0
  90. package/src/http/routes/channel-verification-session-proxy.ts +214 -136
  91. package/src/http/routes/contacts-control-plane-proxy.ts +41 -83
  92. package/src/http/routes/email-webhook.test.ts +0 -1
  93. package/src/http/routes/inbound-register.ts +197 -0
  94. package/src/http/routes/ipc-runtime-proxy.test.ts +516 -0
  95. package/src/http/routes/ipc-runtime-proxy.ts +294 -0
  96. package/src/http/routes/live-voice-websocket.ts +194 -0
  97. package/src/http/routes/log-export.test.ts +55 -45
  98. package/src/http/routes/log-export.ts +9 -43
  99. package/src/http/routes/mailgun-identity.ts +70 -0
  100. package/src/http/routes/mailgun-webhook.ts +71 -0
  101. package/src/http/routes/migration-proxy.ts +196 -133
  102. package/src/http/routes/migration-rollback-proxy.ts +15 -57
  103. package/src/http/routes/oauth-apps-proxy.ts +23 -67
  104. package/src/http/routes/oauth-providers-proxy.ts +23 -67
  105. package/src/http/routes/ps.ts +77 -0
  106. package/src/http/routes/resend-identity.ts +51 -0
  107. package/src/http/routes/resend-webhook.ts +63 -0
  108. package/src/http/routes/runtime-health-proxy.ts +22 -57
  109. package/src/http/routes/runtime-proxy.ts +32 -23
  110. package/src/http/routes/slack-control-plane-proxy.ts +24 -85
  111. package/src/http/routes/stt-stream-websocket.ts +12 -14
  112. package/src/http/routes/telegram-control-plane-proxy.ts +35 -73
  113. package/src/http/routes/telegram-webhook.test.ts +0 -1
  114. package/src/http/routes/telegram-webhook.ts +47 -22
  115. package/src/http/routes/trust-rules.suggest.test.ts +260 -0
  116. package/src/http/routes/trust-rules.ts +245 -189
  117. package/src/http/routes/twilio-control-plane-proxy.ts +37 -79
  118. package/src/http/routes/twilio-media-websocket.ts +9 -5
  119. package/src/http/routes/twilio-relay-websocket.ts +9 -5
  120. package/src/http/routes/twilio-voice-verify-callback.ts +282 -0
  121. package/src/http/routes/twilio-voice-webhook.test.ts +5 -1
  122. package/src/http/routes/twilio-voice-webhook.ts +37 -1
  123. package/src/http/routes/upgrade-broadcast-proxy.ts +15 -57
  124. package/src/http/routes/vercel-control-plane-proxy.ts +31 -69
  125. package/src/http/routes/whatsapp-webhook.test.ts +0 -1
  126. package/src/http/routes/workspace-commit-proxy.ts +15 -57
  127. package/src/index.ts +193 -126
  128. package/src/ipc/assistant-client.test.ts +290 -0
  129. package/src/ipc/assistant-client.ts +358 -0
  130. package/src/ipc/capability-token-handlers.ts +30 -0
  131. package/src/ipc/risk-classification-handlers.test.ts +646 -0
  132. package/src/ipc/risk-classification-handlers.ts +542 -0
  133. package/src/ipc/route-schema-cache.ts +162 -0
  134. package/src/ipc/server.ts +28 -35
  135. package/src/ipc/socket-path.ts +54 -28
  136. package/src/ipc/threshold-handlers.ts +36 -8
  137. package/src/pairing/approved-devices-store.ts +110 -0
  138. package/src/pairing/pairing-routes.ts +379 -0
  139. package/src/pairing/pairing-store.ts +218 -0
  140. package/src/post-assistant-ready.ts +74 -0
  141. package/src/remote-feature-flag-sync.ts +8 -5
  142. package/src/risk/arg-parser.test.ts +161 -0
  143. package/src/risk/arg-parser.ts +141 -0
  144. package/src/risk/bash-risk-classifier.test.ts +1717 -0
  145. package/src/risk/bash-risk-classifier.ts +1001 -0
  146. package/src/risk/command-registry/AGENTS.md +62 -0
  147. package/src/risk/command-registry/commands/7z.ts +9 -0
  148. package/src/risk/command-registry/commands/7za.ts +9 -0
  149. package/src/risk/command-registry/commands/R.ts +8 -0
  150. package/src/risk/command-registry/commands/Rscript.ts +8 -0
  151. package/src/risk/command-registry/commands/ack.ts +19 -0
  152. package/src/risk/command-registry/commands/adduser.ts +8 -0
  153. package/src/risk/command-registry/commands/ag.ts +19 -0
  154. package/src/risk/command-registry/commands/alias.ts +7 -0
  155. package/src/risk/command-registry/commands/ant.ts +8 -0
  156. package/src/risk/command-registry/commands/apk.ts +8 -0
  157. package/src/risk/command-registry/commands/apt-get.ts +8 -0
  158. package/src/risk/command-registry/commands/apt.ts +8 -0
  159. package/src/risk/command-registry/commands/assistant.ts +497 -0
  160. package/src/risk/command-registry/commands/at.ts +8 -0
  161. package/src/risk/command-registry/commands/awk.ts +20 -0
  162. package/src/risk/command-registry/commands/aws.ts +8 -0
  163. package/src/risk/command-registry/commands/az.ts +8 -0
  164. package/src/risk/command-registry/commands/b2sum.ts +8 -0
  165. package/src/risk/command-registry/commands/base64.ts +8 -0
  166. package/src/risk/command-registry/commands/basename.ts +9 -0
  167. package/src/risk/command-registry/commands/bash.ts +9 -0
  168. package/src/risk/command-registry/commands/bazel.ts +8 -0
  169. package/src/risk/command-registry/commands/brew.ts +30 -0
  170. package/src/risk/command-registry/commands/bun.ts +26 -0
  171. package/src/risk/command-registry/commands/bunx.ts +8 -0
  172. package/src/risk/command-registry/commands/bunzip2.ts +9 -0
  173. package/src/risk/command-registry/commands/bzip2.ts +9 -0
  174. package/src/risk/command-registry/commands/cal.ts +7 -0
  175. package/src/risk/command-registry/commands/cargo.ts +29 -0
  176. package/src/risk/command-registry/commands/cat.ts +18 -0
  177. package/src/risk/command-registry/commands/cd.ts +7 -0
  178. package/src/risk/command-registry/commands/chgrp.ts +10 -0
  179. package/src/risk/command-registry/commands/chmod.ts +11 -0
  180. package/src/risk/command-registry/commands/chown.ts +11 -0
  181. package/src/risk/command-registry/commands/chroot.ts +8 -0
  182. package/src/risk/command-registry/commands/cksum.ts +8 -0
  183. package/src/risk/command-registry/commands/cmake.ts +8 -0
  184. package/src/risk/command-registry/commands/cmp.ts +9 -0
  185. package/src/risk/command-registry/commands/column.ts +9 -0
  186. package/src/risk/command-registry/commands/comm.ts +9 -0
  187. package/src/risk/command-registry/commands/command.ts +17 -0
  188. package/src/risk/command-registry/commands/composer.ts +25 -0
  189. package/src/risk/command-registry/commands/cp.ts +24 -0
  190. package/src/risk/command-registry/commands/crontab.ts +8 -0
  191. package/src/risk/command-registry/commands/csplit.ts +9 -0
  192. package/src/risk/command-registry/commands/curl.ts +69 -0
  193. package/src/risk/command-registry/commands/cut.ts +9 -0
  194. package/src/risk/command-registry/commands/dash.ts +9 -0
  195. package/src/risk/command-registry/commands/date.ts +7 -0
  196. package/src/risk/command-registry/commands/dd.ts +8 -0
  197. package/src/risk/command-registry/commands/declare.ts +8 -0
  198. package/src/risk/command-registry/commands/defaults.ts +8 -0
  199. package/src/risk/command-registry/commands/deluser.ts +8 -0
  200. package/src/risk/command-registry/commands/deno.ts +8 -0
  201. package/src/risk/command-registry/commands/df.ts +10 -0
  202. package/src/risk/command-registry/commands/diff.ts +10 -0
  203. package/src/risk/command-registry/commands/dig.ts +7 -0
  204. package/src/risk/command-registry/commands/dir.ts +9 -0
  205. package/src/risk/command-registry/commands/dirname.ts +9 -0
  206. package/src/risk/command-registry/commands/dmesg.ts +15 -0
  207. package/src/risk/command-registry/commands/dnf.ts +8 -0
  208. package/src/risk/command-registry/commands/doas.ts +9 -0
  209. package/src/risk/command-registry/commands/docker.ts +215 -0
  210. package/src/risk/command-registry/commands/dos2unix.ts +9 -0
  211. package/src/risk/command-registry/commands/du.ts +10 -0
  212. package/src/risk/command-registry/commands/echo.ts +11 -0
  213. package/src/risk/command-registry/commands/egrep.ts +19 -0
  214. package/src/risk/command-registry/commands/env.ts +8 -0
  215. package/src/risk/command-registry/commands/eval.ts +8 -0
  216. package/src/risk/command-registry/commands/exec.ts +9 -0
  217. package/src/risk/command-registry/commands/expand.ts +9 -0
  218. package/src/risk/command-registry/commands/export.ts +7 -0
  219. package/src/risk/command-registry/commands/fd.ts +9 -0
  220. package/src/risk/command-registry/commands/fdisk.ts +8 -0
  221. package/src/risk/command-registry/commands/fgrep.ts +19 -0
  222. package/src/risk/command-registry/commands/file.ts +10 -0
  223. package/src/risk/command-registry/commands/find.ts +40 -0
  224. package/src/risk/command-registry/commands/firewall-cmd.ts +8 -0
  225. package/src/risk/command-registry/commands/fish.ts +9 -0
  226. package/src/risk/command-registry/commands/fmt.ts +9 -0
  227. package/src/risk/command-registry/commands/fold.ts +9 -0
  228. package/src/risk/command-registry/commands/free.ts +7 -0
  229. package/src/risk/command-registry/commands/ftp.ts +8 -0
  230. package/src/risk/command-registry/commands/gcloud.ts +8 -0
  231. package/src/risk/command-registry/commands/gem.ts +21 -0
  232. package/src/risk/command-registry/commands/gh.ts +65 -0
  233. package/src/risk/command-registry/commands/git.ts +249 -0
  234. package/src/risk/command-registry/commands/go.ts +38 -0
  235. package/src/risk/command-registry/commands/gradle.ts +8 -0
  236. package/src/risk/command-registry/commands/grep.ts +20 -0
  237. package/src/risk/command-registry/commands/groupadd.ts +8 -0
  238. package/src/risk/command-registry/commands/groupdel.ts +8 -0
  239. package/src/risk/command-registry/commands/groupmod.ts +8 -0
  240. package/src/risk/command-registry/commands/groups.ts +7 -0
  241. package/src/risk/command-registry/commands/gunzip.ts +10 -0
  242. package/src/risk/command-registry/commands/gzip.ts +10 -0
  243. package/src/risk/command-registry/commands/halt.ts +8 -0
  244. package/src/risk/command-registry/commands/head.ts +10 -0
  245. package/src/risk/command-registry/commands/helm.ts +40 -0
  246. package/src/risk/command-registry/commands/help.ts +7 -0
  247. package/src/risk/command-registry/commands/hexdump.ts +7 -0
  248. package/src/risk/command-registry/commands/hg.ts +33 -0
  249. package/src/risk/command-registry/commands/history.ts +7 -0
  250. package/src/risk/command-registry/commands/host.ts +7 -0
  251. package/src/risk/command-registry/commands/hostname.ts +7 -0
  252. package/src/risk/command-registry/commands/htop.ts +7 -0
  253. package/src/risk/command-registry/commands/http.ts +7 -0
  254. package/src/risk/command-registry/commands/iconv.ts +8 -0
  255. package/src/risk/command-registry/commands/id.ts +7 -0
  256. package/src/risk/command-registry/commands/ifconfig.ts +8 -0
  257. package/src/risk/command-registry/commands/info.ts +7 -0
  258. package/src/risk/command-registry/commands/install.ts +23 -0
  259. package/src/risk/command-registry/commands/ionice.ts +8 -0
  260. package/src/risk/command-registry/commands/iostat.ts +7 -0
  261. package/src/risk/command-registry/commands/ip.ts +8 -0
  262. package/src/risk/command-registry/commands/ip6tables.ts +8 -0
  263. package/src/risk/command-registry/commands/iptables.ts +8 -0
  264. package/src/risk/command-registry/commands/java.ts +16 -0
  265. package/src/risk/command-registry/commands/javac.ts +8 -0
  266. package/src/risk/command-registry/commands/join.ts +9 -0
  267. package/src/risk/command-registry/commands/jq.ts +9 -0
  268. package/src/risk/command-registry/commands/kill.ts +8 -0
  269. package/src/risk/command-registry/commands/killall.ts +8 -0
  270. package/src/risk/command-registry/commands/ksh.ts +9 -0
  271. package/src/risk/command-registry/commands/kubectl.ts +66 -0
  272. package/src/risk/command-registry/commands/last.ts +7 -0
  273. package/src/risk/command-registry/commands/launchctl.ts +8 -0
  274. package/src/risk/command-registry/commands/less.ts +10 -0
  275. package/src/risk/command-registry/commands/ln.ts +16 -0
  276. package/src/risk/command-registry/commands/locate.ts +7 -0
  277. package/src/risk/command-registry/commands/loginctl.ts +8 -0
  278. package/src/risk/command-registry/commands/ls.ts +10 -0
  279. package/src/risk/command-registry/commands/lsof.ts +7 -0
  280. package/src/risk/command-registry/commands/ltrace.ts +9 -0
  281. package/src/risk/command-registry/commands/lua.ts +16 -0
  282. package/src/risk/command-registry/commands/make.ts +8 -0
  283. package/src/risk/command-registry/commands/man.ts +7 -0
  284. package/src/risk/command-registry/commands/md5.ts +8 -0
  285. package/src/risk/command-registry/commands/md5sum.ts +8 -0
  286. package/src/risk/command-registry/commands/meson.ts +8 -0
  287. package/src/risk/command-registry/commands/mkdir.ts +10 -0
  288. package/src/risk/command-registry/commands/mkfs.ts +8 -0
  289. package/src/risk/command-registry/commands/mktemp.ts +9 -0
  290. package/src/risk/command-registry/commands/more.ts +10 -0
  291. package/src/risk/command-registry/commands/mount.ts +8 -0
  292. package/src/risk/command-registry/commands/mtr.ts +7 -0
  293. package/src/risk/command-registry/commands/mv.ts +18 -0
  294. package/src/risk/command-registry/commands/mvn.ts +8 -0
  295. package/src/risk/command-registry/commands/nc.ts +8 -0
  296. package/src/risk/command-registry/commands/netcat.ts +8 -0
  297. package/src/risk/command-registry/commands/netstat.ts +7 -0
  298. package/src/risk/command-registry/commands/networksetup.ts +8 -0
  299. package/src/risk/command-registry/commands/nft.ts +8 -0
  300. package/src/risk/command-registry/commands/nice.ts +8 -0
  301. package/src/risk/command-registry/commands/ninja.ts +8 -0
  302. package/src/risk/command-registry/commands/nl.ts +9 -0
  303. package/src/risk/command-registry/commands/nmap.ts +8 -0
  304. package/src/risk/command-registry/commands/nmcli.ts +8 -0
  305. package/src/risk/command-registry/commands/node.ts +22 -0
  306. package/src/risk/command-registry/commands/nohup.ts +8 -0
  307. package/src/risk/command-registry/commands/npm.ts +54 -0
  308. package/src/risk/command-registry/commands/npx.ts +8 -0
  309. package/src/risk/command-registry/commands/nslookup.ts +7 -0
  310. package/src/risk/command-registry/commands/od.ts +9 -0
  311. package/src/risk/command-registry/commands/openssl.ts +8 -0
  312. package/src/risk/command-registry/commands/pacman.ts +8 -0
  313. package/src/risk/command-registry/commands/parted.ts +8 -0
  314. package/src/risk/command-registry/commands/passwd.ts +8 -0
  315. package/src/risk/command-registry/commands/paste.ts +9 -0
  316. package/src/risk/command-registry/commands/perl.ts +16 -0
  317. package/src/risk/command-registry/commands/pgrep.ts +7 -0
  318. package/src/risk/command-registry/commands/php.ts +16 -0
  319. package/src/risk/command-registry/commands/ping.ts +7 -0
  320. package/src/risk/command-registry/commands/pip.ts +24 -0
  321. package/src/risk/command-registry/commands/pip3.ts +24 -0
  322. package/src/risk/command-registry/commands/pipx.ts +22 -0
  323. package/src/risk/command-registry/commands/pkill.ts +8 -0
  324. package/src/risk/command-registry/commands/plocate.ts +7 -0
  325. package/src/risk/command-registry/commands/pnpm.ts +37 -0
  326. package/src/risk/command-registry/commands/pnpx.ts +8 -0
  327. package/src/risk/command-registry/commands/poetry.ts +25 -0
  328. package/src/risk/command-registry/commands/popd.ts +7 -0
  329. package/src/risk/command-registry/commands/port.ts +8 -0
  330. package/src/risk/command-registry/commands/poweroff.ts +8 -0
  331. package/src/risk/command-registry/commands/powershell.ts +8 -0
  332. package/src/risk/command-registry/commands/pr.ts +9 -0
  333. package/src/risk/command-registry/commands/printenv.ts +7 -0
  334. package/src/risk/command-registry/commands/printf.ts +11 -0
  335. package/src/risk/command-registry/commands/ps.ts +7 -0
  336. package/src/risk/command-registry/commands/pstree.ts +7 -0
  337. package/src/risk/command-registry/commands/pushd.ts +7 -0
  338. package/src/risk/command-registry/commands/pwd.ts +11 -0
  339. package/src/risk/command-registry/commands/pwsh.ts +8 -0
  340. package/src/risk/command-registry/commands/python.ts +16 -0
  341. package/src/risk/command-registry/commands/python3.ts +16 -0
  342. package/src/risk/command-registry/commands/readlink.ts +10 -0
  343. package/src/risk/command-registry/commands/readonly.ts +8 -0
  344. package/src/risk/command-registry/commands/realpath.ts +9 -0
  345. package/src/risk/command-registry/commands/reboot.ts +8 -0
  346. package/src/risk/command-registry/commands/renice.ts +8 -0
  347. package/src/risk/command-registry/commands/rev.ts +8 -0
  348. package/src/risk/command-registry/commands/rg.ts +19 -0
  349. package/src/risk/command-registry/commands/rm.ts +42 -0
  350. package/src/risk/command-registry/commands/rmdir.ts +10 -0
  351. package/src/risk/command-registry/commands/route.ts +8 -0
  352. package/src/risk/command-registry/commands/rsync.ts +8 -0
  353. package/src/risk/command-registry/commands/ruby.ts +8 -0
  354. package/src/risk/command-registry/commands/scp.ts +8 -0
  355. package/src/risk/command-registry/commands/screen.ts +8 -0
  356. package/src/risk/command-registry/commands/sed.ts +29 -0
  357. package/src/risk/command-registry/commands/seq.ts +10 -0
  358. package/src/risk/command-registry/commands/service.ts +8 -0
  359. package/src/risk/command-registry/commands/set.ts +8 -0
  360. package/src/risk/command-registry/commands/sftp.ts +8 -0
  361. package/src/risk/command-registry/commands/sh.ts +9 -0
  362. package/src/risk/command-registry/commands/sha1sum.ts +8 -0
  363. package/src/risk/command-registry/commands/sha256sum.ts +8 -0
  364. package/src/risk/command-registry/commands/sha512sum.ts +8 -0
  365. package/src/risk/command-registry/commands/shred.ts +9 -0
  366. package/src/risk/command-registry/commands/shuf.ts +8 -0
  367. package/src/risk/command-registry/commands/shutdown.ts +8 -0
  368. package/src/risk/command-registry/commands/sleep.ts +10 -0
  369. package/src/risk/command-registry/commands/sort.ts +31 -0
  370. package/src/risk/command-registry/commands/source.ts +8 -0
  371. package/src/risk/command-registry/commands/split.ts +9 -0
  372. package/src/risk/command-registry/commands/ss.ts +7 -0
  373. package/src/risk/command-registry/commands/ssh-add.ts +8 -0
  374. package/src/risk/command-registry/commands/ssh-copy-id.ts +8 -0
  375. package/src/risk/command-registry/commands/ssh-keygen.ts +10 -0
  376. package/src/risk/command-registry/commands/ssh.ts +8 -0
  377. package/src/risk/command-registry/commands/stat.ts +10 -0
  378. package/src/risk/command-registry/commands/strace.ts +9 -0
  379. package/src/risk/command-registry/commands/strings.ts +9 -0
  380. package/src/risk/command-registry/commands/su.ts +8 -0
  381. package/src/risk/command-registry/commands/sudo.ts +9 -0
  382. package/src/risk/command-registry/commands/svn.ts +33 -0
  383. package/src/risk/command-registry/commands/sw_vers.ts +7 -0
  384. package/src/risk/command-registry/commands/swift.ts +23 -0
  385. package/src/risk/command-registry/commands/sysctl.ts +24 -0
  386. package/src/risk/command-registry/commands/systemctl.ts +8 -0
  387. package/src/risk/command-registry/commands/tail.ts +10 -0
  388. package/src/risk/command-registry/commands/tar.ts +48 -0
  389. package/src/risk/command-registry/commands/taskset.ts +8 -0
  390. package/src/risk/command-registry/commands/tcsh.ts +9 -0
  391. package/src/risk/command-registry/commands/tee.ts +10 -0
  392. package/src/risk/command-registry/commands/telnet.ts +8 -0
  393. package/src/risk/command-registry/commands/terraform.ts +34 -0
  394. package/src/risk/command-registry/commands/time.ts +8 -0
  395. package/src/risk/command-registry/commands/timeout.ts +9 -0
  396. package/src/risk/command-registry/commands/tmux.ts +8 -0
  397. package/src/risk/command-registry/commands/top.ts +7 -0
  398. package/src/risk/command-registry/commands/touch.ts +10 -0
  399. package/src/risk/command-registry/commands/tr.ts +11 -0
  400. package/src/risk/command-registry/commands/tracepath.ts +7 -0
  401. package/src/risk/command-registry/commands/traceroute.ts +7 -0
  402. package/src/risk/command-registry/commands/tree.ts +10 -0
  403. package/src/risk/command-registry/commands/truncate.ts +9 -0
  404. package/src/risk/command-registry/commands/ts-node.ts +8 -0
  405. package/src/risk/command-registry/commands/tsx.ts +8 -0
  406. package/src/risk/command-registry/commands/type.ts +7 -0
  407. package/src/risk/command-registry/commands/typeset.ts +8 -0
  408. package/src/risk/command-registry/commands/ufw.ts +8 -0
  409. package/src/risk/command-registry/commands/umask.ts +8 -0
  410. package/src/risk/command-registry/commands/umount.ts +8 -0
  411. package/src/risk/command-registry/commands/uname.ts +7 -0
  412. package/src/risk/command-registry/commands/unexpand.ts +9 -0
  413. package/src/risk/command-registry/commands/uniq.ts +9 -0
  414. package/src/risk/command-registry/commands/unix2dos.ts +9 -0
  415. package/src/risk/command-registry/commands/unlink.ts +9 -0
  416. package/src/risk/command-registry/commands/unset.ts +7 -0
  417. package/src/risk/command-registry/commands/unxz.ts +9 -0
  418. package/src/risk/command-registry/commands/unzip.ts +10 -0
  419. package/src/risk/command-registry/commands/unzstd.ts +9 -0
  420. package/src/risk/command-registry/commands/uptime.ts +7 -0
  421. package/src/risk/command-registry/commands/useradd.ts +8 -0
  422. package/src/risk/command-registry/commands/userdel.ts +8 -0
  423. package/src/risk/command-registry/commands/usermod.ts +8 -0
  424. package/src/risk/command-registry/commands/users.ts +7 -0
  425. package/src/risk/command-registry/commands/uv.ts +31 -0
  426. package/src/risk/command-registry/commands/vdir.ts +9 -0
  427. package/src/risk/command-registry/commands/visudo.ts +8 -0
  428. package/src/risk/command-registry/commands/vmstat.ts +7 -0
  429. package/src/risk/command-registry/commands/w.ts +7 -0
  430. package/src/risk/command-registry/commands/watch.ts +8 -0
  431. package/src/risk/command-registry/commands/wc.ts +10 -0
  432. package/src/risk/command-registry/commands/wget.ts +41 -0
  433. package/src/risk/command-registry/commands/where.ts +7 -0
  434. package/src/risk/command-registry/commands/whereis.ts +7 -0
  435. package/src/risk/command-registry/commands/which.ts +7 -0
  436. package/src/risk/command-registry/commands/who.ts +7 -0
  437. package/src/risk/command-registry/commands/whoami.ts +7 -0
  438. package/src/risk/command-registry/commands/wipefs.ts +8 -0
  439. package/src/risk/command-registry/commands/xargs.ts +9 -0
  440. package/src/risk/command-registry/commands/xxd.ts +7 -0
  441. package/src/risk/command-registry/commands/xz.ts +9 -0
  442. package/src/risk/command-registry/commands/yarn.ts +39 -0
  443. package/src/risk/command-registry/commands/yes.ts +10 -0
  444. package/src/risk/command-registry/commands/yq.ts +9 -0
  445. package/src/risk/command-registry/commands/yum.ts +8 -0
  446. package/src/risk/command-registry/commands/zip.ts +10 -0
  447. package/src/risk/command-registry/commands/zsh.ts +9 -0
  448. package/src/risk/command-registry/commands/zstd.ts +9 -0
  449. package/src/risk/command-registry/commands/zypper.ts +8 -0
  450. package/src/risk/command-registry/index.ts +617 -0
  451. package/src/risk/command-registry.test.ts +892 -0
  452. package/src/risk/directory-scope.test.ts +527 -0
  453. package/src/risk/directory-scope.ts +208 -0
  454. package/src/risk/file-risk-classifier.test.ts +600 -0
  455. package/src/risk/file-risk-classifier.ts +386 -0
  456. package/src/risk/project-boundary.test.ts +88 -0
  457. package/src/risk/project-boundary.ts +38 -0
  458. package/src/risk/risk-classifier-parity.test.ts +197 -0
  459. package/src/risk/risk-types.ts +350 -0
  460. package/src/risk/schedule-risk-classifier.test.ts +129 -0
  461. package/src/risk/schedule-risk-classifier.ts +115 -0
  462. package/src/risk/shell-identity.test.ts +235 -0
  463. package/src/risk/shell-identity.ts +296 -0
  464. package/src/risk/shell-parser-fuzz.test.ts +629 -0
  465. package/src/risk/shell-parser-property.test.ts +652 -0
  466. package/src/risk/shell-parser.test.ts +595 -0
  467. package/src/risk/shell-parser.ts +634 -0
  468. package/src/risk/skill-risk-classifier.test.ts +238 -0
  469. package/src/risk/skill-risk-classifier.ts +252 -0
  470. package/src/risk/trust-rule-cache.ts +138 -0
  471. package/src/risk/web-risk-classifier.test.ts +170 -0
  472. package/src/risk/web-risk-classifier.ts +124 -0
  473. package/src/runtime/client.ts +191 -95
  474. package/src/schema.ts +447 -426
  475. package/src/slack/normalize.test.ts +74 -0
  476. package/src/slack/normalize.ts +99 -32
  477. package/src/slack/socket-mode.ts +187 -17
  478. package/src/telegram/send.test.ts +1 -2
  479. package/src/telegram/send.ts +11 -1
  480. package/src/telegram/webhook-manager.ts +1 -4
  481. package/src/verification/binding-helpers.ts +107 -0
  482. package/src/verification/code-parsing.ts +44 -0
  483. package/src/verification/contact-helpers.ts +205 -0
  484. package/src/verification/identity-match.ts +68 -0
  485. package/src/verification/identity.ts +61 -0
  486. package/src/verification/rate-limit-helpers.ts +205 -0
  487. package/src/verification/reply-delivery.ts +109 -0
  488. package/src/verification/session-helpers.ts +164 -0
  489. package/src/verification/text-verification.ts +372 -0
  490. package/src/voice/verification.ts +456 -0
  491. package/src/webhook-pipeline.ts +4 -0
  492. package/src/whatsapp/send.ts +11 -1
  493. package/src/__tests__/cloud-oauth-token.test.ts +0 -224
  494. package/src/__tests__/slack-deliver-ratelimit.test.ts +0 -234
  495. package/src/__tests__/slack-deliver.test.ts +0 -1422
  496. package/src/__tests__/telegram-deliver-auth.test.ts +0 -508
  497. package/src/__tests__/telegram-only-default.test.ts +0 -133
  498. package/src/__tests__/trust-store.test.ts +0 -810
  499. package/src/http/middleware/deliver-auth.ts +0 -45
  500. package/src/http/routes/cloud-oauth-token.ts +0 -145
  501. package/src/http/routes/pairing-proxy.ts +0 -151
  502. package/src/http/routes/slack-deliver.ts +0 -1030
  503. package/src/http/routes/telegram-deliver.test.ts +0 -602
  504. package/src/http/routes/telegram-deliver.ts +0 -218
  505. package/src/http/routes/whatsapp-deliver.test.ts +0 -292
  506. package/src/http/routes/whatsapp-deliver.ts +0 -217
  507. package/src/trust-store.ts +0 -556
  508. package/src/util/strip-hop-by-hop.ts +0 -34
package/ARCHITECTURE.md CHANGED
@@ -128,7 +128,7 @@ The assistant daemon does not read or distribute a feature-flag token. All featu
128
128
 
129
129
  ### Channel Verification Session Control-Plane Proxy
130
130
 
131
- Channel verification session endpoints are exposed directly by the gateway and forwarded to runtime integration handlers even when the broad runtime proxy is disabled. This keeps assistant skills and user-facing tooling on gateway URLs only.
131
+ Channel verification session endpoints are exposed directly by the gateway and forwarded to runtime integration handlers for dedicated auth handling. This keeps assistant skills and user-facing tooling on gateway URLs only.
132
132
 
133
133
  **Forwarded endpoints:**
134
134
 
@@ -158,7 +158,7 @@ The `/v1/guardian/refresh` endpoint is the only public ingress for rotating JWT
158
158
 
159
159
  ### Runtime Health Proxy
160
160
 
161
- Runtime health is exposed directly by the gateway at `GET /v1/health` and forwarded to the runtime's `GET /v1/health` endpoint even when the broad runtime proxy is disabled.
161
+ Runtime health is exposed directly by the gateway at `GET /v1/health` and forwarded to the runtime's `GET /v1/health` endpoint for dedicated auth handling.
162
162
 
163
163
  **Authentication boundary:**
164
164
 
@@ -175,7 +175,7 @@ Runtime health is exposed directly by the gateway at `GET /v1/health` and forwar
175
175
 
176
176
  ### Telegram + Contacts Control-Plane Proxies
177
177
 
178
- Telegram integration setup/config endpoints and contacts/invites endpoints are also exposed directly by the gateway and forwarded to runtime handlers even when the broad runtime proxy is disabled.
178
+ Telegram integration setup/config endpoints and contacts/invites endpoints are also exposed directly by the gateway and forwarded to runtime handlers for dedicated auth handling.
179
179
 
180
180
  **Forwarded Telegram endpoints:**
181
181
 
@@ -213,7 +213,7 @@ Telegram integration setup/config endpoints and contacts/invites endpoints are a
213
213
 
214
214
  ### Twilio Control-Plane Proxy
215
215
 
216
- Twilio integration setup/config endpoints are exposed directly by the gateway and forwarded to runtime handlers even when the broad runtime proxy is disabled. This keeps skills and clients on gateway URLs exclusively.
216
+ Twilio integration setup/config endpoints are exposed directly by the gateway and forwarded to runtime handlers for dedicated auth handling. This keeps skills and clients on gateway URLs exclusively.
217
217
 
218
218
  **Forwarded endpoints:**
219
219
 
@@ -242,7 +242,7 @@ Twilio integration setup/config endpoints are exposed directly by the gateway an
242
242
 
243
243
  ### Channel Readiness Proxy
244
244
 
245
- Channel readiness endpoints are exposed directly by the gateway and forwarded to runtime handlers even when the broad runtime proxy is disabled.
245
+ Channel readiness endpoints are exposed directly by the gateway and forwarded to runtime handlers for dedicated auth handling.
246
246
 
247
247
  **Forwarded endpoints:**
248
248
 
@@ -332,7 +332,7 @@ The `/deliver/telegram` endpoint requires bearer auth unconditionally (fail-clos
332
332
 
333
333
  ### Channel Approval Flow
334
334
 
335
- When the assistant requires tool-use confirmation during a channel session (e.g., Telegram), the approval flow intercepts the run and surfaces an interactive prompt to the user. This approval-aware path is always active when orchestrator + callback context are available. Guardian enforcement (fail-closed denial for unknown actors, `forceStrictSideEffects`, guardian-routed approval prompts) applies consistently to non-guardian/unverified actors.
335
+ When the assistant requires tool-use confirmation during a channel session (e.g., Telegram), the approval flow intercepts the run and surfaces an interactive prompt to the user. This approval-aware path is always active when orchestrator + callback context are available. Guardian enforcement (fail-closed denial for unknown actors, explicit approval prompts for side effects, guardian-routed approval prompts) applies consistently to non-guardian/unverified actors.
336
336
 
337
337
  **State machine:**
338
338
 
@@ -367,7 +367,7 @@ Runtime detects needs_confirmation
367
367
 
368
368
  **Conversational approval turn:** When a text message arrives while an approval is pending (e.g., non-Telegram channels or user typing a reply instead of clicking a button), a **conversational approval turn** is run via `runApprovalConversationTurn()` from `approval-conversation-turn.ts`. The conversational engine uses LLM structured output (native `tool_use`) to classify user intent as: `keep_pending` (reply without deciding), `approve_once`, `approve_always`, or `reject`. Non-decision messages receive a natural assistant reply and the run stays pending — no reminder spam. The engine fails closed: any model failure returns `keep_pending` with a deterministic fallback asking the user to try again. Callback/button handling remains deterministic and unchanged. The `channelSupportsRichApprovalUI()` function determines whether to send the structured `promptText` (for rich channels like Telegram) or the `plainTextFallback` string (for all other channels). Currently only `telegram` is classified as a rich channel.
369
369
 
370
- **Guardian-aware routing:** When a guardian binding exists for the channel, the approval flow resolves the sender's actor role (`guardian` vs `non-guardian`). Non-guardian actors have `forceStrictSideEffects` set on the session so all side-effect tools trigger approval prompts regardless of existing allow rules. Approval prompts for non-guardian actions are routed to the guardian's delivery chat (not the requester's chat), and a `channelGuardianApprovalRequest` record is created. When the guardian approves or denies, the decision is applied to the underlying run and the requester's chat is notified of the outcome. Guardian actors follow the standard approval flow. Guardian approval follow-ups also use the conversational engine with role-specific context; `approve_always` is downgraded to `approve_once` for guardian approvals since permanent allow-rules require guardian authority. All guardian state (bindings, challenges, approval requests) is scoped to the `(assistantId, channel)` pair -- the `assistantId` parameter flows through `handleChannelInbound`, `validateAndConsumeVerification`, `isGuardian`, `getGuardianBinding`, and `createApprovalRequest`.
370
+ **Guardian-aware routing:** When a guardian binding exists for the channel, the approval flow resolves the sender's actor role (`guardian` vs `non-guardian`). Non-guardian actors have `forcePromptSideEffects` set on the session so all side-effect tools trigger approval prompts regardless of existing allow rules. Approval prompts for non-guardian actions are routed to the guardian's delivery chat (not the requester's chat), and a `channelGuardianApprovalRequest` record is created. When the guardian approves or denies, the decision is applied to the underlying run and the requester's chat is notified of the outcome. Guardian actors follow the standard approval flow. Guardian approval follow-ups also use the conversational engine with role-specific context; `approve_always` is downgraded to `approve_once` for guardian approvals since permanent allow-rules require guardian authority. All guardian state (bindings, challenges, approval requests) is scoped to the `(assistantId, channel)` pair -- the `assistantId` parameter flows through `handleChannelInbound`, `validateAndConsumeVerification`, `isGuardian`, `getGuardianBinding`, and `createApprovalRequest`.
371
371
 
372
372
  **Proactive expiry sweep:** The runtime runs a periodic sweep every 60 seconds (`sweepExpiredGuardianApprovals`) that finds guardian approval requests past the 30-minute TTL, auto-denies the underlying runs, and notifies both the requester and guardian via the gateway's per-channel `/deliver/<channel>` endpoint. This ensures expired approvals are closed without waiting for follow-up traffic from either party. The sweep is started automatically whenever a run orchestrator is available.
373
373
 
@@ -489,10 +489,10 @@ This ordering ensures that ingress ACL decisions are finalized before any agent
489
489
 
490
490
  #### Actor Role Resolution
491
491
 
492
- When a message arrives on a channel, the runtime resolves the sender's role. Role _classification_ runs unconditionally. Guardian enforcement (`forceStrictSideEffects`, fail-closed denial, guardian approval routing) applies to non-guardian/unverified actors whenever orchestrator + callback context are available:
492
+ When a message arrives on a channel, the runtime resolves the sender's role. Role _classification_ runs unconditionally. Guardian enforcement (`forcePromptSideEffects`, fail-closed denial, guardian approval routing) applies to non-guardian/unverified actors whenever orchestrator + callback context are available:
493
493
 
494
494
  - **Guardian**: `actorExternalId` matches the binding's `guardianExternalUserId` (DB column) for the `(assistantId, channel)` pair. Self-approval is handled through the same approval-aware channel flow.
495
- - **Non-guardian**: A known sender who is not the guardian. Side-effect tools are forced through the confirmation flow (`forceStrictSideEffects`), and approval prompts are routed to the guardian's chat instead of the requester's chat.
495
+ - **Non-guardian**: A known sender who is not the guardian. Side-effect tools are forced through the confirmation flow (`forcePromptSideEffects`), and approval prompts are routed to the guardian's chat instead of the requester's chat.
496
496
  - **Unverified channel**: No guardian binding exists for the channel, or `actorExternalId` is absent. Sensitive actions are auto-denied immediately (fail-closed). This prevents unverified senders from self-approving actions or bypassing guardian enforcement by omitting identity data.
497
497
 
498
498
  #### Sensitive Action Gating (Non-Guardian Approval)
@@ -510,7 +510,7 @@ sequenceDiagram
510
510
  NG->>TG: Message triggers tool use
511
511
  TG->>GW: POST /webhooks/telegram
512
512
  GW->>Daemon: POST /v1/channels/inbound (JWT auth)
513
- Daemon->>Daemon: Detect non-guardian, set forceStrictSideEffects
513
+ Daemon->>Daemon: Detect non-guardian, set forcePromptSideEffects
514
514
  Daemon->>Daemon: Tool needs confirmation → create GuardianApprovalRequest
515
515
  Daemon->>GW: POST /deliver/telegram (approval prompt + inline keyboard)
516
516
  GW->>Guardian: sendMessage (approval prompt)
package/Dockerfile CHANGED
@@ -9,7 +9,13 @@ WORKDIR /app
9
9
  COPY --from=bun /usr/local/bin/bun /usr/local/bin/bun
10
10
 
11
11
  # Copy shared packages needed by gateway's repo-local dependencies
12
- COPY packages/ces-contracts ./packages/ces-contracts
12
+ COPY packages/assistant-client ./packages/assistant-client
13
+ COPY packages/ces-client ./packages/ces-client
14
+ COPY packages/service-contracts ./packages/service-contracts
15
+ COPY packages/slack-text ./packages/slack-text
16
+
17
+ # Install deps for shared packages that have their own file: dependencies.
18
+ RUN cd /app/packages/ces-client && bun install --frozen-lockfile
13
19
 
14
20
  # Install gateway dependencies first for cache reuse
15
21
  COPY gateway/package.json gateway/bun.lock ./gateway/
@@ -36,13 +42,9 @@ RUN groupadd --system --gid 1001 gateway && \
36
42
  useradd --system --uid 1001 --gid gateway --create-home gateway
37
43
 
38
44
  COPY --from=builder --chown=gateway:gateway /app/gateway /app
39
- # `bun install` materializes `file:../packages/ces-contracts` as a
40
- # `node_modules/@vellumai/ces-contracts/` directory whose files are symlinks
41
- # pointing at absolute `/app/packages/ces-contracts/...` source paths in
42
- # the builder. Those absolute targets have to exist in the runner too, or
43
- # every `@vellumai/ces-contracts[/…]` import resolves to a dangling link
44
- # and the gateway crashes with "Cannot find module ..." at first use.
45
- # Copy the sibling package into the runner so the symlinks resolve.
45
+ # `bun install` materializes repo-local file: dependencies as symlinks in
46
+ # node_modules pointing at absolute paths in the builder stage.
47
+ # Copy the sibling packages into the runner so the symlinks resolve.
46
48
  COPY --from=builder --chown=gateway:gateway /app/packages /app/packages
47
49
 
48
50
  RUN mkdir -p /gateway-security && chown gateway:gateway /gateway-security
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Vellum Gateway
2
2
 
3
- Standalone service that serves as the public ingress boundary for all external webhooks and callbacks. It owns Telegram integration end-to-end, routes Twilio voice webhooks, handles OAuth callbacks, and optionally acts as an authenticated reverse proxy for the assistant runtime.
3
+ Standalone service that serves as the public ingress boundary for all external webhooks and callbacks. It owns Telegram integration end-to-end, routes Twilio voice webhooks, handles OAuth callbacks, and acts as an authenticated reverse proxy for the assistant runtime.
4
4
 
5
5
  ## Architecture
6
6
 
@@ -10,7 +10,7 @@ Telegram → gateway/ → Assistant Runtime (/v1/assistants/:id/channels/inbound
10
10
  Client → gateway/ (Bearer auth) → Assistant Runtime (any path)
11
11
  ```
12
12
 
13
- The web app is **not** in the Telegram request path. When proxy mode is enabled, non-Telegram requests are forwarded to the assistant runtime with optional bearer token authentication.
13
+ The web app is **not** in the Telegram request path. All non-Telegram requests that don't match a dedicated gateway route are forwarded to the assistant runtime with bearer token authentication.
14
14
 
15
15
  For ingress and channel architecture details, see [`ARCHITECTURE.md`](ARCHITECTURE.md).
16
16
 
@@ -218,13 +218,9 @@ The gateway is the **sole public ingress point** for all external webhooks. The
218
218
 
219
219
  When the ingress public base URL is configured (via `ingress.publicBaseUrl` in workspace config, read through `ConfigFileCache`), the gateway prioritizes it as the canonical URL for Twilio signature validation. If the signature only validates against the raw local request URL (fallback), a warning is logged indicating potential drift between the configured ingress URL and the actual webhook registration. The raw URL fallback is preserved for local-dev operability.
220
220
 
221
- ## Default Mode: Dedicated Routes Only
221
+ ## Runtime Proxy
222
222
 
223
- By default, the broad runtime proxy is disabled. Dedicated gateway-managed routes (webhooks, delivery endpoints, explicit control-plane proxies such as `/v1/channel-verification-sessions/*`, `/v1/integrations/telegram/*`, `/v1/integrations/slack/*`, and `/v1/contacts/invites/*`, plus the authenticated runtime health route `/v1/health`) remain available, but arbitrary runtime passthrough routes return `404` unless the runtime proxy is enabled via workspace config.
224
-
225
- ## Runtime Proxy Mode
226
-
227
- When the runtime proxy is enabled (via workspace config), the gateway forwards all non-Telegram HTTP requests to the assistant runtime. This allows the gateway to serve as a single ingress point for both Telegram and API traffic.
223
+ The gateway acts as the single ingress point for all traffic. Dedicated gateway routes (webhooks, control-plane proxies, health checks) are matched first; any request that doesn't match a specific route is forwarded to the assistant runtime via a catch-all proxy.
228
224
 
229
225
  ### Auth behavior
230
226