@vellumai/assistant 0.8.11 → 0.8.12-dev.202606122337.5897832

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 (385) hide show
  1. package/ARCHITECTURE.md +60 -62
  2. package/README.md +1 -7
  3. package/bun.lock +169 -247
  4. package/docs/architecture/integrations.md +3 -3
  5. package/docs/architecture/memory.md +2 -2
  6. package/docs/architecture/security.md +10 -10
  7. package/docs/runbook-trusted-contacts.md +12 -12
  8. package/docs/skills.md +6 -6
  9. package/examples/plugins/echo/README.md +5 -5
  10. package/knip.json +1 -0
  11. package/node_modules/@vellumai/gateway-client/bun.lock +1 -0
  12. package/node_modules/@vellumai/gateway-client/package.json +3 -1
  13. package/node_modules/@vellumai/gateway-client/src/__tests__/gateway-client.test.ts +1 -1
  14. package/node_modules/@vellumai/gateway-client/src/gateway-ipc-contracts.ts +87 -0
  15. package/node_modules/@vellumai/gateway-client/src/index.ts +3 -5
  16. package/openapi.yaml +2575 -57
  17. package/package.json +2 -4
  18. package/src/__tests__/adaptive-thinking-repair.test.ts +185 -0
  19. package/src/__tests__/agent-loop-compaction-events.test.ts +7 -6
  20. package/src/__tests__/agent-wake-disk-pressure-callsite.test.ts +2 -0
  21. package/src/__tests__/agent-wake-override-profile.test.ts +77 -0
  22. package/src/__tests__/anthropic-provider.test.ts +129 -0
  23. package/src/__tests__/app-dir-path-guard.test.ts +1 -0
  24. package/src/__tests__/approval-cascade.test.ts +0 -5
  25. package/src/__tests__/assistant-stream-state.test.ts +107 -0
  26. package/src/__tests__/background-workers-disk-pressure.test.ts +4 -1
  27. package/src/__tests__/btw-routes.test.ts +7 -34
  28. package/src/__tests__/checker.test.ts +6 -12
  29. package/src/__tests__/compaction-events.test.ts +63 -7
  30. package/src/__tests__/compaction-trail-store.test.ts +74 -1
  31. package/src/__tests__/config-loader-backfill.test.ts +4 -2
  32. package/src/__tests__/config-loader-quarantine-notice.test.ts +167 -0
  33. package/src/__tests__/config-watcher.test.ts +2 -2
  34. package/src/__tests__/conversation-abort-tool-results.test.ts +0 -5
  35. package/src/__tests__/conversation-agent-loop-inference-profile.test.ts +1 -1
  36. package/src/__tests__/conversation-confirmation-signals.test.ts +0 -5
  37. package/src/__tests__/conversation-error.test.ts +2 -6
  38. package/src/__tests__/conversation-history-web-search.test.ts +8 -0
  39. package/src/__tests__/conversation-process-callsite.test.ts +0 -5
  40. package/src/__tests__/conversation-provider-retry-repair.test.ts +0 -5
  41. package/src/__tests__/conversation-queue.test.ts +0 -5
  42. package/src/__tests__/conversation-slash-queue.test.ts +0 -5
  43. package/src/__tests__/conversation-slash-unknown.test.ts +0 -5
  44. package/src/__tests__/conversation-speed-override.test.ts +0 -5
  45. package/src/__tests__/conversation-title-service.test.ts +2 -1
  46. package/src/__tests__/conversation-workspace-injection.test.ts +0 -5
  47. package/src/__tests__/conversation-workspace-tool-tracking.test.ts +0 -5
  48. package/src/__tests__/credential-security-invariants.test.ts +1 -1
  49. package/src/__tests__/disk-pressure-tools.test.ts +1 -1
  50. package/src/__tests__/exploration-drift-hook.test.ts +692 -0
  51. package/src/__tests__/filing-service.test.ts +8 -3
  52. package/src/__tests__/guardian-action-sweep.test.ts +56 -219
  53. package/src/__tests__/handlers-skills-memory-v2-reseed.test.ts +1 -1
  54. package/src/__tests__/heartbeat-disk-pressure.test.ts +4 -1
  55. package/src/__tests__/heartbeat-service.test.ts +5 -2
  56. package/src/__tests__/helpers/channel-test-adapter.ts +0 -2
  57. package/src/__tests__/identity-intro-cache.test.ts +12 -5
  58. package/src/__tests__/identity-routes.test.ts +16 -57
  59. package/src/__tests__/injector-chain.test.ts +8 -3
  60. package/src/__tests__/injector-config-quarantine-notice.test.ts +115 -0
  61. package/src/__tests__/llm-catalog-parity.test.ts +16 -0
  62. package/src/__tests__/llm-request-log-source-clickhouse.test.ts +87 -1
  63. package/src/__tests__/llm-resolver.test.ts +91 -0
  64. package/src/__tests__/llm-usage-store.test.ts +11 -0
  65. package/src/__tests__/log-export-workspace.test.ts +468 -3
  66. package/src/__tests__/managed-profile-guard.test.ts +6 -5
  67. package/src/__tests__/max-tokens-continue-hook.test.ts +184 -0
  68. package/src/__tests__/media-generate-image.test.ts +20 -9
  69. package/src/__tests__/memory-v2-static-injector.test.ts +22 -0
  70. package/src/__tests__/model-intents.test.ts +1 -1
  71. package/src/__tests__/oauth-cli.test.ts +19 -8
  72. package/src/__tests__/openai-provider.test.ts +34 -0
  73. package/src/__tests__/prechat-onboarding-contract.test.ts +0 -1
  74. package/src/__tests__/recurrence-engine.test.ts +45 -0
  75. package/src/__tests__/schedule-routes.test.ts +139 -1
  76. package/src/__tests__/scheduler-disk-pressure.test.ts +1 -1
  77. package/src/__tests__/script-proxy-conversation-manager.test.ts +10 -5
  78. package/src/__tests__/secret-fixtures.ts +20 -0
  79. package/src/__tests__/skill-tool-factory.test.ts +49 -0
  80. package/src/__tests__/skills.test.ts +3 -3
  81. package/src/__tests__/subagent-role-registry.test.ts +24 -1
  82. package/src/__tests__/subagent-tool-filtering.test.ts +50 -0
  83. package/src/__tests__/subagent-tool-gate-mode.test.ts +547 -0
  84. package/src/__tests__/subagent-tools.test.ts +1 -0
  85. package/src/__tests__/system-prompt.test.ts +109 -11
  86. package/src/__tests__/tool-approval-handler.test.ts +85 -0
  87. package/src/__tests__/tool-audit-listener.test.ts +86 -0
  88. package/src/__tests__/tool-error-hook.test.ts +1 -0
  89. package/src/__tests__/tool-result-spool.test.ts +337 -0
  90. package/src/__tests__/tool-result-truncate-hook.test.ts +1 -0
  91. package/src/__tests__/validate-input.test.ts +95 -1
  92. package/src/__tests__/workspace-migration-098-remove-stale-updates-bulletin-file.test.ts +65 -0
  93. package/src/__tests__/workspace-migration-099-disable-cache-one-shot-callsites.test.ts +139 -0
  94. package/src/__tests__/workspace-migration-100-upgrade-quality-profile-to-fable-5.test.ts +174 -0
  95. package/src/__tests__/workspace-migration-101-upgrade-balanced-economy-to-minimax-m3.test.ts +162 -0
  96. package/src/__tests__/workspace-release-notes-feature-flag-guard.test.ts +45 -95
  97. package/src/acp/__tests__/agent-process.test.ts +315 -2
  98. package/src/acp/__tests__/prepare-agent-env.test.ts +79 -5
  99. package/src/acp/agent-process.ts +163 -34
  100. package/src/acp/prepare-agent-env.ts +55 -15
  101. package/src/agent/loop.ts +125 -31
  102. package/src/api/events/usage-progress.ts +28 -0
  103. package/src/api/index.ts +6 -0
  104. package/src/approvals/approval-primitive.ts +2 -2
  105. package/src/background-wake/wake-intent-hooks.test.ts +2 -0
  106. package/src/bundler/app-bundler.ts +25 -42
  107. package/src/bundler/app-compiler.ts +8 -0
  108. package/src/bundler/compiler-tools.ts +1 -1
  109. package/src/calls/call-controller.ts +1 -1
  110. package/src/calls/guardian-action-sweep.ts +16 -93
  111. package/src/cli/AGENTS.md +4 -0
  112. package/src/cli/commands/__tests__/schedules.test.ts +367 -0
  113. package/src/cli/commands/image-generation.ts +23 -9
  114. package/src/cli/commands/notifications.ts +1 -1
  115. package/src/cli/commands/plugins.ts +291 -15
  116. package/src/cli/commands/schedules.ts +313 -9
  117. package/src/cli/lib/__tests__/inspect-plugin.test.ts +382 -0
  118. package/src/cli/lib/__tests__/install-from-github.test.ts +31 -9
  119. package/src/cli/lib/__tests__/plugin-artifact.test.ts +183 -0
  120. package/src/cli/lib/__tests__/plugin-details.test.ts +158 -0
  121. package/src/cli/lib/__tests__/plugin-fingerprint.test.ts +245 -0
  122. package/src/cli/lib/__tests__/upgrade-plugin.test.ts +384 -0
  123. package/src/cli/lib/inspect-plugin.ts +313 -0
  124. package/src/cli/lib/install-from-github.ts +266 -26
  125. package/src/cli/lib/list-installed-plugins.ts +17 -6
  126. package/src/cli/lib/plugin-artifact.ts +103 -0
  127. package/src/cli/lib/plugin-details.ts +18 -1
  128. package/src/cli/lib/plugin-fingerprint.ts +197 -0
  129. package/src/cli/lib/upgrade-plugin.ts +243 -0
  130. package/src/config/bundled-skills/image-studio/SKILL.md +66 -19
  131. package/src/config/bundled-skills/image-studio/TOOLS.json +1 -6
  132. package/src/config/bundled-skills/image-studio/tools/media-generate-image.ts +22 -3
  133. package/src/config/bundled-skills/personal-page/SKILL.md +57 -0
  134. package/src/config/bundled-skills/personal-page/TOOLS.json +27 -0
  135. package/src/config/bundled-skills/personal-page/tools/app-refresh.ts +17 -0
  136. package/src/config/bundled-skills/subagent/SKILL.md +2 -0
  137. package/src/config/bundled-skills/subagent/TOOLS.json +8 -2
  138. package/src/config/bundled-tool-registry.ts +7 -2
  139. package/src/config/call-site-defaults.ts +13 -2
  140. package/src/config/feature-flag-registry.json +12 -20
  141. package/src/config/llm-context-resolution.ts +8 -0
  142. package/src/config/llm-resolver.ts +30 -0
  143. package/src/config/loader.ts +52 -59
  144. package/src/config/preloaded-apps/personal-page/src/components/About.tsx +22 -0
  145. package/src/config/preloaded-apps/personal-page/src/components/App.tsx +16 -0
  146. package/src/config/preloaded-apps/personal-page/src/components/Features.tsx +77 -0
  147. package/src/config/preloaded-apps/personal-page/src/components/Hero.tsx +57 -0
  148. package/src/config/preloaded-apps/personal-page/src/components/Pending.tsx +28 -0
  149. package/src/config/preloaded-apps/personal-page/src/components/animations.tsx +234 -0
  150. package/src/config/preloaded-apps/personal-page/src/components/icons.tsx +48 -0
  151. package/src/config/preloaded-apps/personal-page/src/components/media.ts +16 -0
  152. package/src/config/preloaded-apps/personal-page/src/index.html +20 -0
  153. package/src/config/preloaded-apps/personal-page/src/main.tsx +7 -0
  154. package/src/config/preloaded-apps/personal-page/src/profile-data.ts +82 -0
  155. package/src/config/preloaded-apps/personal-page/src/styles.css +759 -0
  156. package/src/config/schema.ts +0 -2
  157. package/src/config/schemas/__tests__/memory-v2.test.ts +1 -0
  158. package/src/config/schemas/__tests__/memory-v3.test.ts +10 -0
  159. package/src/config/schemas/llm.ts +12 -2
  160. package/src/config/schemas/memory-retrospective.ts +19 -0
  161. package/src/config/schemas/memory-v2.ts +13 -0
  162. package/src/config/schemas/memory-v3.ts +92 -0
  163. package/src/config/schemas/services.ts +2 -1
  164. package/src/config/seed-inference-profiles.ts +4 -8
  165. package/src/config/skills.ts +3 -3
  166. package/src/context/post-turn-tool-result-truncation.ts +32 -18
  167. package/src/context/tool-result-spool.ts +104 -0
  168. package/src/credential-execution/executable-discovery.ts +1 -1
  169. package/src/credential-execution/feature-gates.ts +0 -1
  170. package/src/daemon/conversation-agent-loop-handlers.ts +41 -16
  171. package/src/daemon/conversation-error.ts +6 -15
  172. package/src/daemon/conversation-tool-setup.ts +101 -22
  173. package/src/daemon/conversation.ts +124 -11
  174. package/src/daemon/disk-pressure-policy.ts +0 -1
  175. package/src/daemon/lifecycle.ts +8 -20
  176. package/src/daemon/message-types/conversations.ts +2 -15
  177. package/src/daemon/parse-actual-tokens-from-error.test.ts +62 -1
  178. package/src/daemon/parse-actual-tokens-from-error.ts +43 -4
  179. package/src/daemon/tool-setup-types.ts +57 -0
  180. package/src/daemon/trust-context.ts +1 -1
  181. package/src/daemon/wake-conversation-ops.ts +18 -0
  182. package/src/events/tool-audit-listener.ts +40 -9
  183. package/src/heartbeat/__tests__/heartbeat-service.test.ts +1 -1
  184. package/src/home/__tests__/home-content-refresh.test.ts +114 -0
  185. package/src/home/__tests__/suggested-prompts.test.ts +86 -5
  186. package/src/home/feed-types.ts +1 -1
  187. package/src/home/home-content-refresh.ts +43 -31
  188. package/src/home/home-greeting-cache.ts +8 -1
  189. package/src/home/home-greeting.ts +13 -9
  190. package/src/home/suggested-prompts.ts +77 -24
  191. package/src/ipc/routes/trust-rules.test.ts +66 -72
  192. package/src/media/__tests__/image-models.test.ts +57 -0
  193. package/src/media/image-credentials.ts +2 -2
  194. package/src/media/image-models.ts +66 -0
  195. package/src/memory/__tests__/auto-analysis-enqueue.test.ts +38 -0
  196. package/src/memory/__tests__/compaction-log-store-clickhouse.test.ts +432 -0
  197. package/src/memory/__tests__/find-most-recent-retrospective-for.test.ts +12 -2
  198. package/src/memory/__tests__/memory-retrospective-job.test.ts +909 -34
  199. package/src/memory/__tests__/memory-retrospective-startup-cleanup.test.ts +227 -5
  200. package/src/memory/__tests__/memory-retrospective-state.test.ts +195 -0
  201. package/src/memory/__tests__/preloaded-apps.test.ts +85 -0
  202. package/src/memory/auto-analysis-enqueue.ts +14 -1
  203. package/src/memory/{compaction-log-writer-clickhouse.ts → compaction-log-store-clickhouse.ts} +264 -55
  204. package/src/memory/conversation-attention-store.ts +1 -0
  205. package/src/memory/conversation-bootstrap.ts +18 -9
  206. package/src/memory/conversation-crud.ts +21 -4
  207. package/src/memory/conversation-disk-view.ts +1 -1
  208. package/src/memory/conversation-title-service.ts +53 -9
  209. package/src/memory/db-init.ts +2 -0
  210. package/src/memory/delivery-channels.ts +0 -69
  211. package/src/memory/embedding-runtime-manager.ts +1 -1
  212. package/src/memory/graph/extraction-job.ts +0 -15
  213. package/src/memory/llm-request-log-source-clickhouse.ts +84 -14
  214. package/src/memory/llm-request-log-source-local.ts +8 -1
  215. package/src/memory/llm-request-log-source.ts +14 -2
  216. package/src/memory/llm-request-log-store.ts +51 -2
  217. package/src/memory/llm-usage-store.ts +5 -1
  218. package/src/memory/memory-retrospective-constants.ts +9 -0
  219. package/src/memory/memory-retrospective-enqueue.ts +3 -6
  220. package/src/memory/memory-retrospective-fork-boundary.ts +94 -0
  221. package/src/memory/memory-retrospective-job.ts +483 -208
  222. package/src/memory/memory-retrospective-startup-cleanup.ts +97 -19
  223. package/src/memory/memory-retrospective-state.ts +85 -2
  224. package/src/memory/migrations/181-rename-thread-starters-checkpoints.ts +2 -2
  225. package/src/memory/migrations/281-memory-retrospective-remembered-log.ts +40 -0
  226. package/src/memory/migrations/__tests__/281-memory-retrospective-remembered-log.test.ts +96 -0
  227. package/src/memory/migrations/index.ts +1 -0
  228. package/src/memory/preloaded-apps.ts +116 -0
  229. package/src/memory/schema/memory-core.ts +4 -0
  230. package/src/memory/v2/__tests__/consolidation-job.test.ts +183 -2
  231. package/src/memory/v2/__tests__/injection.test.ts +70 -0
  232. package/src/memory/v2/__tests__/static-context.test.ts +12 -0
  233. package/src/memory/v2/consolidation-job.ts +93 -9
  234. package/src/memory/v2/injection.ts +53 -0
  235. package/src/memory/v2/prompts/consolidation.ts +1 -0
  236. package/src/memory/v2/static-context.ts +13 -1
  237. package/src/memory/v2/sweep-job.ts +1 -1
  238. package/src/memory/v2/types.ts +5 -0
  239. package/src/messaging/draft-store.ts +1 -1
  240. package/src/plugin-api/types.ts +7 -0
  241. package/src/plugins/defaults/exploration-drift/hooks/post-tool-use.ts +300 -0
  242. package/src/plugins/defaults/exploration-drift/package.json +15 -0
  243. package/src/plugins/defaults/index.ts +49 -0
  244. package/src/plugins/defaults/max-tokens-continue/continue-state-store.ts +53 -0
  245. package/src/plugins/defaults/max-tokens-continue/hooks/post-model-call.ts +80 -0
  246. package/src/plugins/defaults/max-tokens-continue/hooks/stop.ts +20 -0
  247. package/src/plugins/defaults/max-tokens-continue/package.json +14 -0
  248. package/src/plugins/defaults/memory-retrieval/injectors.ts +132 -4
  249. package/src/plugins/defaults/memory-v3-shadow/__tests__/card.test.ts +92 -0
  250. package/src/plugins/defaults/memory-v3-shadow/__tests__/carry-integration.test.ts +2 -1
  251. package/src/plugins/defaults/memory-v3-shadow/__tests__/fresh-set.test.ts +52 -0
  252. package/src/plugins/defaults/memory-v3-shadow/__tests__/injection.test.ts +1 -0
  253. package/src/plugins/defaults/memory-v3-shadow/__tests__/live-integration.test.ts +2 -1
  254. package/src/plugins/defaults/memory-v3-shadow/__tests__/orchestrate.test.ts +136 -5
  255. package/src/plugins/defaults/memory-v3-shadow/__tests__/pool-select.test.ts +17 -0
  256. package/src/plugins/defaults/memory-v3-shadow/__tests__/selection-log-store.test.ts +6 -0
  257. package/src/plugins/defaults/memory-v3-shadow/__tests__/shadow-integration.test.ts +5 -1
  258. package/src/plugins/defaults/memory-v3-shadow/__tests__/shadow-plugin.test.ts +68 -4
  259. package/src/plugins/defaults/memory-v3-shadow/card.ts +49 -5
  260. package/src/plugins/defaults/memory-v3-shadow/fresh-set.ts +59 -0
  261. package/src/plugins/defaults/memory-v3-shadow/injector.ts +4 -2
  262. package/src/plugins/defaults/memory-v3-shadow/learned-edges.test.ts +169 -0
  263. package/src/plugins/defaults/memory-v3-shadow/learned-edges.ts +178 -0
  264. package/src/plugins/defaults/memory-v3-shadow/orchestrate.ts +115 -26
  265. package/src/plugins/defaults/memory-v3-shadow/pool-select.ts +13 -9
  266. package/src/plugins/defaults/memory-v3-shadow/shadow-plugin.ts +144 -22
  267. package/src/plugins/defaults/memory-v3-shadow/types.ts +24 -6
  268. package/src/plugins/defaults/title-generate/hooks/stop.ts +13 -0
  269. package/src/plugins/defaults/title-generate/hooks/user-prompt-submit.ts +16 -0
  270. package/src/prompts/__tests__/system-prompt.test.ts +100 -1
  271. package/src/prompts/cache-boundary.ts +17 -0
  272. package/src/prompts/sections.ts +50 -17
  273. package/src/prompts/system-prompt.ts +63 -6
  274. package/src/prompts/templates/system-sections.ts +22 -0
  275. package/src/providers/__tests__/unparseable-tool-args.test.ts +53 -0
  276. package/src/providers/anthropic/client.ts +74 -28
  277. package/src/providers/call-site-routing.ts +6 -3
  278. package/src/providers/gemini/client.ts +5 -1
  279. package/src/providers/minimax/client.ts +9 -0
  280. package/src/providers/model-catalog.ts +28 -0
  281. package/src/providers/model-intents.ts +3 -3
  282. package/src/providers/openai/chat-completions-provider.ts +4 -2
  283. package/src/providers/openai/responses-provider.ts +7 -2
  284. package/src/providers/retry.ts +16 -5
  285. package/src/providers/types.ts +21 -0
  286. package/src/providers/unparseable-tool-args.ts +56 -0
  287. package/src/runtime/AGENTS.md +6 -0
  288. package/src/runtime/__tests__/agent-wake.test.ts +631 -9
  289. package/src/runtime/agent-wake.ts +307 -56
  290. package/src/runtime/assistant-stream-state.ts +141 -8
  291. package/src/runtime/background-job-runner.ts +2 -2
  292. package/src/runtime/guardian-action-message-composer.ts +0 -54
  293. package/src/runtime/http-server.ts +6 -14
  294. package/src/runtime/http-types.ts +0 -1
  295. package/src/runtime/message-composer-types.ts +0 -9
  296. package/src/runtime/middleware/__tests__/rate-limiter.test.ts +63 -0
  297. package/src/runtime/middleware/auth.ts +27 -3
  298. package/src/runtime/middleware/rate-limiter.ts +28 -1
  299. package/src/runtime/migrations/__tests__/vbundle-legacy-user-md.test.ts +150 -3
  300. package/src/runtime/migrations/vbundle-builder.ts +3 -3
  301. package/src/runtime/migrations/vbundle-import-analyzer.ts +29 -6
  302. package/src/runtime/migrations/vbundle-import-policy.ts +23 -0
  303. package/src/runtime/migrations/vbundle-importer.ts +9 -4
  304. package/src/runtime/migrations/vbundle-streaming-importer.ts +8 -3
  305. package/src/runtime/pre-first-message-gate.ts +1 -1
  306. package/src/runtime/routes/__tests__/conversation-compaction-routes.test.ts +280 -29
  307. package/src/runtime/routes/__tests__/conversation-query-routes.test.ts +132 -0
  308. package/src/runtime/routes/__tests__/gateway-log-routes.test.ts +97 -185
  309. package/src/runtime/routes/__tests__/home-feed-routes.test.ts +17 -0
  310. package/src/runtime/routes/__tests__/plugins-routes.test.ts +366 -0
  311. package/src/runtime/routes/__tests__/task-routes.test.ts +3 -3
  312. package/src/runtime/routes/btw-routes.ts +0 -14
  313. package/src/runtime/routes/conversation-compaction-routes.ts +105 -28
  314. package/src/runtime/routes/conversation-list-routes.ts +77 -5
  315. package/src/runtime/routes/conversation-management-routes.ts +54 -0
  316. package/src/runtime/routes/conversation-query-routes.ts +261 -8
  317. package/src/runtime/routes/gateway-log-routes.ts +14 -64
  318. package/src/runtime/routes/home-feed-routes.ts +10 -0
  319. package/src/runtime/routes/identity-intro-cache.ts +1 -1
  320. package/src/runtime/routes/identity-routes.ts +76 -20
  321. package/src/runtime/routes/image-generation-routes.ts +20 -2
  322. package/src/runtime/routes/inbound-message-handler.ts +0 -36
  323. package/src/runtime/routes/index.ts +2 -0
  324. package/src/runtime/routes/log-export/AGENTS.md +1 -1
  325. package/src/runtime/routes/log-export/workspace-allowlist.ts +1 -1
  326. package/src/runtime/routes/log-export-routes.ts +143 -96
  327. package/src/runtime/routes/plugins-routes.ts +406 -0
  328. package/src/runtime/routes/redact-staged-export.ts +259 -0
  329. package/src/runtime/routes/schedule-routes.ts +102 -36
  330. package/src/runtime/routes/sounds-config-routes.ts +239 -0
  331. package/src/runtime/routes/trust-rules-routes.ts +14 -67
  332. package/src/runtime/services/__tests__/analyze-conversation.test.ts +38 -0
  333. package/src/runtime/services/analyze-conversation.ts +26 -13
  334. package/src/schedule/recurrence-engine.ts +34 -0
  335. package/src/schedule/scheduler.ts +1 -0
  336. package/src/security/redact-json.ts +61 -0
  337. package/src/security/secret-allowlist.ts +1 -1
  338. package/src/skills/path-classifier.ts +1 -1
  339. package/src/skills/validate-input.ts +41 -1
  340. package/src/subagent/types.ts +26 -1
  341. package/src/telemetry/types.ts +15 -1
  342. package/src/telemetry/usage-telemetry-reporter.test.ts +6 -1
  343. package/src/telemetry/usage-telemetry-reporter.ts +1 -0
  344. package/src/tools/apps/executors.ts +1 -1
  345. package/src/tools/skills/skill-tool-factory.ts +19 -8
  346. package/src/tools/tool-approval-handler.ts +31 -0
  347. package/src/usage/attribution.ts +24 -0
  348. package/src/usage/types.ts +8 -1
  349. package/src/util/platform.ts +33 -17
  350. package/src/watcher/engine.ts +1 -0
  351. package/src/workspace/adaptive-thinking-repair.ts +113 -0
  352. package/src/workspace/migrations/021-move-signals-to-workspace.ts +1 -1
  353. package/src/workspace/migrations/022-move-hooks-to-workspace.ts +1 -1
  354. package/src/workspace/migrations/026-backfill-install-meta.ts +1 -1
  355. package/src/workspace/migrations/030-seed-pkb-autoinject.ts +2 -1
  356. package/src/workspace/migrations/031-drop-user-md.ts +1 -4
  357. package/src/workspace/migrations/048-remove-workspace-hooks.ts +1 -1
  358. package/src/workspace/migrations/056-release-notes-inference-profile-reordering.ts +5 -2
  359. package/src/workspace/migrations/061-move-backup-key-to-workspace.ts +1 -1
  360. package/src/workspace/migrations/082-backfill-managed-profile-labels.ts +8 -2
  361. package/src/workspace/migrations/097-enable-adaptive-thinking-managed-profiles.ts +70 -67
  362. package/src/workspace/migrations/098-remove-stale-updates-bulletin-file.ts +31 -0
  363. package/src/workspace/migrations/099-disable-cache-one-shot-callsites.ts +81 -0
  364. package/src/workspace/migrations/100-upgrade-quality-profile-to-fable-5.ts +86 -0
  365. package/src/workspace/migrations/101-upgrade-balanced-economy-to-minimax-m3.ts +70 -0
  366. package/src/workspace/migrations/registry.ts +8 -0
  367. package/src/workspace/migrations/runner.ts +1 -1
  368. package/tsconfig.json +1 -1
  369. package/src/__tests__/config-loader-quarantine-bulletin.test.ts +0 -202
  370. package/src/__tests__/conversation-starters-cadence.test.ts +0 -161
  371. package/src/__tests__/guardian-action-copy-generator.test.ts +0 -200
  372. package/src/__tests__/guardian-action-followup-executor.test.ts +0 -322
  373. package/src/__tests__/guardian-action-followup-store.test.ts +0 -373
  374. package/src/__tests__/guardian-action-grant-mint-consume.test.ts +0 -579
  375. package/src/__tests__/guardian-action-late-reply.test.ts +0 -1083
  376. package/src/__tests__/guardian-action-store.test.ts +0 -273
  377. package/src/__tests__/update-bulletin-job.test.ts +0 -292
  378. package/src/config/schemas/updates.ts +0 -14
  379. package/src/daemon/guardian-action-generators.ts +0 -71
  380. package/src/memory/__tests__/compaction-log-writer-clickhouse.test.ts +0 -227
  381. package/src/memory/conversation-starters-cadence.ts +0 -78
  382. package/src/memory/guardian-action-store.ts +0 -859
  383. package/src/prompts/update-bulletin-job.ts +0 -180
  384. package/src/runtime/guardian-action-followup-executor.ts +0 -306
  385. package/src/runtime/guardian-action-grant-minter.ts +0 -150
package/ARCHITECTURE.md CHANGED
@@ -770,30 +770,28 @@ The macOS `SpeechRecognizerAdapter` protocol in `clients/macos/vellum-assistant/
770
770
  - Terminology: "STT" and "transcription" refer to the same operation (converting audio to text). "Speech recognition" is used in client-native contexts where Apple's Speech framework terminology is canonical. All three terms map to the same conceptual operation.
771
771
  - **Onboarding**: For a step-by-step guide to adding a new STT provider, see `docs/stt-provider-onboarding.md`.
772
772
 
773
- ### Update Bulletin System
773
+ ### On-Demand Home Content Generation
774
774
 
775
- Release-driven update notification system that dispatches a background conversation to process release notes when a release lands.
775
+ LLM-generated content shown by clients (personalized home greeting, suggested prompts, conversation starters, identity intro) is produced on demand, never at daemon startup or on unconditional timers.
776
776
 
777
- **Data flow:**
777
+ **Data flow (home greeting + suggested prompts):**
778
778
 
779
- 1. **Storage** — Release notes live at `<workspace>/UPDATES.md`. The file is written by workspace migrations; each release that needs to surface notes ships a dedicated migration in `src/workspace/migrations/` that appends a release-notes block to the file. The workspace-migration runner is the authoritative idempotency mechanism: `runWorkspaceMigrations()` records each migration's `WorkspaceMigration.id` in `<workspace>/data/.workspace-migrations.json` and never re-runs an ID that is already in the `applied` set.
780
- 2. **Dispatch** — At daemon startup (after `runWorkspaceMigrations()`), `runUpdateBulletinJobIfNeeded()` is invoked fire-and-forget. It hashes the current `UPDATES.md` content and compares against the `updates:last_processed_hash` checkpoint. When the hashes differ, it bootstraps a `conversationType: "background"` conversation and calls `wakeAgentForOpportunity()` so the agent processes the bulletin without any interactive session.
781
- 3. **Completion** — The agent acts on the contents and deletes `UPDATES.md` when done. The job persists the new hash to `updates:last_processed_hash` post-wake, so subsequent startups short-circuit until the file is repopulated by a future migration.
779
+ 1. **Read** — `GET /v1/home/feed` reads both caches synchronously: the greeting from `memory_checkpoints` (`home:greeting:*`, 4-hour TTL, busted when identity files change) and suggested prompts from `memory_checkpoints` (`home:suggested_prompts:*`, 4-hour TTL, invalidated on OAuth connect/disconnect). When a cache is empty the handler falls back to a time-of-day greeting and an empty prompt list.
780
+ 2. **Revalidate** — The same GET fires `revalidateHomeContentInBackground()` (`src/home/home-content-refresh.ts`) fire-and-forget. It is single-flight (concurrent GETs share one run) and each refresher no-ops while its cache is fresh, so generation happens at most once per TTL window — and only when a user actually views Home.
781
+ 3. **Notify** — When fresh content lands, the coordinator publishes a `home_feed_updated` event; connected clients refetch the feed and the personalized content swaps in.
782
782
 
783
- **Checkpoint keys** (in `memory_checkpoints` table):
784
-
785
- - `updates:last_processed_hash` — content hash of the `UPDATES.md` payload most recently dispatched to the background job.
783
+ Conversation starters follow the same pattern via `GET /v1/conversation-starters`, which enqueues a `generate_conversation_starters` memory job when the starter set is stale (cooldown-gated, deduped against in-flight jobs).
786
784
 
787
785
  **Key source files:**
788
786
 
789
- | File | Purpose |
790
- | -------------------------------------- | ----------------------------------------------------------------------------------------- |
791
- | `src/workspace/migrations/` | Per-release migrations that append release notes to `UPDATES.md` |
792
- | `src/workspace/migrations/registry.ts` | Append-only `WORKSPACE_MIGRATIONS` registry |
793
- | `src/prompts/update-bulletin-job.ts` | `runUpdateBulletinJobIfNeeded()` — hash check, background dispatch, and checkpoint update |
794
- | `src/daemon/lifecycle.ts` | Fire-and-forget dispatch of `runUpdateBulletinJobIfNeeded()` after DB init at startup |
795
- | `src/config/schemas/updates.ts` | `updates.enabled` config toggle (defaults to `true`; disables the background dispatch) |
796
- | `src/permissions/defaults.ts` | Auto-allow rules for file_read/write/edit + bare-filename `rm UPDATES.md` |
787
+ | File | Purpose |
788
+ | --------------------------------------------------- | ------------------------------------------------------------------------ |
789
+ | `src/home/home-content-refresh.ts` | Single-flight on-demand revalidation coordinator + SSE notify |
790
+ | `src/home/home-greeting.ts` | Greeting generation (BTW side-chain, `homeGreeting` call site) |
791
+ | `src/home/home-greeting-cache.ts` | Checkpoint-backed greeting cache with identity-hash invalidation |
792
+ | `src/home/suggested-prompts.ts` | Prompt generation + checkpoint-backed cache + OAuth invalidation |
793
+ | `src/runtime/routes/home-feed-routes.ts` | `GET /v1/home/feed` — cached read + fire-and-forget revalidation trigger |
794
+ | `src/runtime/routes/conversation-starter-routes.ts` | On-demand starter refresh via memory job enqueue |
797
795
 
798
796
  ---
799
797
 
@@ -870,7 +868,7 @@ graph LR
870
868
  SL["logs/session-*.json<br/>───────────────<br/>Per-session JSON log<br/>task, start/end times, result<br/>Per-turn: AX tree, screenshot,<br/>action, token usage"]
871
869
  end
872
870
 
873
- subgraph "~/.vellum/workspace/data/db/assistant.db (SQLite + WAL)"
871
+ subgraph "$VELLUM_WORKSPACE_DIR/data/db/assistant.db (SQLite + WAL)"
874
872
  direction TB
875
873
  CONV["conversations<br/>───────────────<br/>id, title, timestamps<br/>token counts, estimated cost<br/>context_summary (compaction)<br/>conversation_type: 'standard' | 'background' | 'scheduled'<br/>memory_scope_id: 'default' | '_pkb_workspace' | 'subagent:&lt;id&gt;'"]
876
874
  MSG["messages<br/>───────────────<br/>id, conversation_id (FK)<br/>role: user | assistant<br/>content: JSON array<br/>created_at"]
@@ -893,7 +891,7 @@ graph LR
893
891
  TRUST["protected/trust.json<br/>Tool permission rules"]
894
892
  end
895
893
 
896
- subgraph "~/.vellum/workspace/ (Workspace Files)"
894
+ subgraph "$VELLUM_WORKSPACE_DIR/ (Workspace Files)"
897
895
  CONFIG["config files<br/>Hot-reloaded by daemon"]
898
896
  ONBOARD_PLAYBOOKS["onboarding/playbooks/<br/>[channel]_onboarding.md<br/>assistant-updatable checklists"]
899
897
  ONBOARD_REGISTRY["onboarding/playbooks/registry.json<br/>channel-start index for fast-path + reconciliation"]
@@ -925,7 +923,7 @@ graph TB
925
923
  LOCAL_CLIENT["RuntimeClient"]
926
924
  LOCAL_HTTP["HTTP API<br/>localhost:RUNTIME_HTTP_PORT"]
927
925
  LOCAL_DAEMON["Local Daemon<br/>(same machine)"]
928
- LOCAL_DB["~/.vellum/workspace/data/db/assistant.db"]
926
+ LOCAL_DB["$VELLUM_WORKSPACE_DIR/data/db/assistant.db"]
929
927
  end
930
928
 
931
929
  subgraph "Cloud Mode"
@@ -1159,7 +1157,7 @@ graph TB
1159
1157
 
1160
1158
  NATIVE -->|"macOS"| SBPL["sandbox-exec<br/>SBPL profile<br/>deny-default + allow workdir"]
1161
1159
  NATIVE -->|"Linux"| BWRAP["bwrap<br/>bubblewrap<br/>ro-root + rw-workdir<br/>unshare-net + unshare-pid"]
1162
- SBPL --> SB_FS["Sandbox filesystem root<br/>~/.vellum/workspace"]
1160
+ SBPL --> SB_FS["Sandbox filesystem root<br/>$VELLUM_WORKSPACE_DIR"]
1163
1161
  BWRAP --> SB_FS
1164
1162
 
1165
1163
  EXEC -->|"host_file_* / host_bash"| HOST_TOOLS["Host-target tools<br/>(unchanged by backend choice)"]
@@ -1177,7 +1175,7 @@ graph TB
1177
1175
  - **Native backend**: Uses OS-level sandboxing — `sandbox-exec` with SBPL profiles on macOS, `bwrap` (bubblewrap) on Linux. Denies network access and restricts filesystem writes to the sandbox root, `/tmp`, `/private/tmp`, and `/var/folders` (macOS) or the sandbox root and `/tmp` (Linux).
1178
1176
  - **Fail-closed**: The native backend refuses to execute unsandboxed if its prerequisites are unavailable, throwing `ToolError` with actionable messages on failure.
1179
1177
  - **Host tools unchanged**: `host_bash`, `host_file_read`, `host_file_write`, and `host_file_edit` always execute directly on the host regardless of which sandbox backend is active.
1180
- - Sandbox defaults: `file_*` and `bash` execute within `~/.vellum/workspace`.
1178
+ - Sandbox defaults: `file_*` and `bash` execute within `$VELLUM_WORKSPACE_DIR`.
1181
1179
  - Host access is explicit: `host_file_read`, `host_file_write`, `host_file_edit`, and `host_bash` are separate tools.
1182
1180
  - Prompt defaults: host tools and `computer_use_*` skill-projected actions default to `ask` unless a trust rule allowlists/denylists them.
1183
1181
  - Browser tool defaults: all `browser_*` tools are auto-allowed by default via seeded allow rules at priority 100, preserving the frictionless UX from when browser was a core tool.
@@ -1211,7 +1209,7 @@ Key behaviors:
1211
1209
 
1212
1210
  ## Dynamic Skill Authoring — Tool Flow
1213
1211
 
1214
- The assistant can author, test, and persist new skills at runtime through a three-tool workflow. All operations target `~/.vellum/workspace/skills/` (managed skills directory) and require explicit user confirmation.
1212
+ The assistant can author, test, and persist new skills at runtime through a three-tool workflow. All operations target `$VELLUM_WORKSPACE_DIR/skills/` (managed skills directory) and require explicit user confirmation.
1215
1213
 
1216
1214
  ```mermaid
1217
1215
  graph TB
@@ -1227,7 +1225,7 @@ graph TB
1227
1225
  subgraph "2. Persist (Filesystem)"
1228
1226
  SCAFFOLD["scaffold_managed_skill<br/>───────────────<br/>RiskLevel: High<br/>Requires user consent"]
1229
1227
  MANAGED_STORE["managed-store.ts<br/>───────────────<br/>validateManagedSkillId()<br/>buildSkillMarkdown()<br/>createManagedSkill()"]
1230
- SKILL_DIR["~/.vellum/workspace/skills/&lt;id&gt;/<br/>SKILL.md (frontmatter + body)"]
1228
+ SKILL_DIR["$VELLUM_WORKSPACE_DIR/skills/&lt;id&gt;/<br/>SKILL.md (frontmatter + body)"]
1231
1229
  end
1232
1230
 
1233
1231
  subgraph "3. Load & Use"
@@ -2095,44 +2093,44 @@ Connected channels are resolved at signal emission time: vellum is always includ
2095
2093
 
2096
2094
  ## Storage Summary
2097
2095
 
2098
- | What | Where | Format | ORM/Driver | Retention |
2099
- | ---------------------------------------- | ---------------------------------------------------- | ----------------------------------- | ---------------------------------- | ------------------------------------------------------- |
2100
- | API key | CES / encrypted file store | Encrypted binary | CES API / `secure-keys.ts` | Permanent |
2101
- | Credential secrets | CES / encrypted file store | Encrypted binary | `secure-keys.ts` wrapper | Permanent (until deleted via tool) |
2102
- | Credential metadata | `~/.vellum/workspace/data/credentials/metadata.json` | JSON | Atomic file write | Permanent (until deleted via tool) |
2103
- | Integration OAuth tokens | CES / encrypted file store (via `secure-keys.ts`) | Encrypted binary | `TokenManager` auto-refresh | Until disconnected or revoked |
2104
- | User preferences | UserDefaults | plist | Foundation | Permanent |
2105
- | Session logs | `~/Library/.../logs/session-*.json` | JSON per session | Swift Codable | Unbounded |
2106
- | Conversations & messages | `~/.vellum/workspace/data/db/assistant.db` | SQLite + WAL | Drizzle ORM (Bun) | Permanent |
2107
- | Memory segments | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
2108
- | Extracted facts | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, deduped |
2109
- | Embeddings | `~/.vellum/workspace/data/db/assistant.db` | JSON float arrays | Drizzle ORM | Permanent |
2110
- | Async job queue | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Completed jobs persist |
2111
- | Attachments | `~/.vellum/workspace/data/db/assistant.db` | Base64 in SQLite | Drizzle ORM | Permanent |
2112
- | Sandbox filesystem | `~/.vellum/workspace` | Real filesystem tree | Node FS APIs | Persistent across sessions |
2113
- | Tool permission rules | `~/.vellum/protected/trust.json` | JSON | File I/O | Permanent |
2114
- | Web users & assistants | PostgreSQL | Relational | Drizzle ORM (pg) | Permanent |
2115
- | Trace events | In-memory (TraceStore) | Structured events | Swift ObservableObject | Max 5,000 per session, ephemeral |
2116
- | Media embed settings | `~/.vellum/workspace/config.json` (`ui.mediaEmbeds`) | JSON | `WorkspaceConfigIO` (atomic merge) | Permanent |
2117
- | Media embed MIME cache | In-memory (`ImageMIMEProbe`) | `NSCache` (500 entries) | HTTP HEAD | Ephemeral; cleared on app restart |
2118
- | Tasks & task runs | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
2119
- | Work items (Task Queue) | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; archived items retained |
2120
- | Recurrence schedules & runs | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; supports cron and RRULE syntax |
2121
- | Watchers & events | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on watcher delete |
2122
- | Proxy CA cert + key | `{dataDir}/proxy-ca/` | PEM files (ca.pem, ca-key.pem) | openssl CLI | Permanent (10-year validity) |
2123
- | Proxy leaf certs | `{dataDir}/proxy-ca/issued/` | PEM files per hostname | openssl CLI, cached | 1-year validity, re-issued on CA change |
2124
- | Proxy sessions | In-memory (SessionManager) | Map<ProxySessionId, ManagedSession> | Manual lifecycle | Ephemeral; 5min idle timeout, cleared on shutdown |
2125
- | Call sessions, events, pending questions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on session delete |
2126
- | Active call controllers | In-memory (CallState) | Map<callSessionId, CallController> | Manual lifecycle | Ephemeral; cleared on call end or destroy |
2127
- | Guardian bindings | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked bindings retained |
2128
- | Channel verification sessions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; consumed/expired sessions retained |
2129
- | Guardian approval requests | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; decision outcome retained |
2130
- | Contact invites | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; token hash stored, raw token never persisted |
2131
- | Contacts & channels | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked/blocked contacts retained |
2132
- | Notification events | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; deduplicated by dedupeKey |
2133
- | Notification decisions | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_events |
2134
- | Notification deliveries | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_decisions |
2135
- | Notification preferences | `~/.vellum/workspace/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; per-assistant conversational preferences |
2096
+ | What | Where | Format | ORM/Driver | Retention |
2097
+ | ---------------------------------------- | ------------------------------------------------------ | ----------------------------------- | ---------------------------------- | ------------------------------------------------------- |
2098
+ | API key | CES / encrypted file store | Encrypted binary | CES API / `secure-keys.ts` | Permanent |
2099
+ | Credential secrets | CES / encrypted file store | Encrypted binary | `secure-keys.ts` wrapper | Permanent (until deleted via tool) |
2100
+ | Credential metadata | `$VELLUM_WORKSPACE_DIR/data/credentials/metadata.json` | JSON | Atomic file write | Permanent (until deleted via tool) |
2101
+ | Integration OAuth tokens | CES / encrypted file store (via `secure-keys.ts`) | Encrypted binary | `TokenManager` auto-refresh | Until disconnected or revoked |
2102
+ | User preferences | UserDefaults | plist | Foundation | Permanent |
2103
+ | Session logs | `~/Library/.../logs/session-*.json` | JSON per session | Swift Codable | Unbounded |
2104
+ | Conversations & messages | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite + WAL | Drizzle ORM (Bun) | Permanent |
2105
+ | Memory segments | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
2106
+ | Extracted facts | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, deduped |
2107
+ | Embeddings | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | JSON float arrays | Drizzle ORM | Permanent |
2108
+ | Async job queue | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Completed jobs persist |
2109
+ | Attachments | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | Base64 in SQLite | Drizzle ORM | Permanent |
2110
+ | Sandbox filesystem | `$VELLUM_WORKSPACE_DIR` | Real filesystem tree | Node FS APIs | Persistent across sessions |
2111
+ | Tool permission rules | `~/.vellum/protected/trust.json` | JSON | File I/O | Permanent |
2112
+ | Web users & assistants | PostgreSQL | Relational | Drizzle ORM (pg) | Permanent |
2113
+ | Trace events | In-memory (TraceStore) | Structured events | Swift ObservableObject | Max 5,000 per session, ephemeral |
2114
+ | Media embed settings | `$VELLUM_WORKSPACE_DIR/config.json` (`ui.mediaEmbeds`) | JSON | `WorkspaceConfigIO` (atomic merge) | Permanent |
2115
+ | Media embed MIME cache | In-memory (`ImageMIMEProbe`) | `NSCache` (500 entries) | HTTP HEAD | Ephemeral; cleared on app restart |
2116
+ | Tasks & task runs | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent |
2117
+ | Work items (Task Queue) | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; archived items retained |
2118
+ | Recurrence schedules & runs | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; supports cron and RRULE syntax |
2119
+ | Watchers & events | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on watcher delete |
2120
+ | Proxy CA cert + key | `{dataDir}/proxy-ca/` | PEM files (ca.pem, ca-key.pem) | openssl CLI | Permanent (10-year validity) |
2121
+ | Proxy leaf certs | `{dataDir}/proxy-ca/issued/` | PEM files per hostname | openssl CLI, cached | 1-year validity, re-issued on CA change |
2122
+ | Proxy sessions | In-memory (SessionManager) | Map<ProxySessionId, ManagedSession> | Manual lifecycle | Ephemeral; 5min idle timeout, cleared on shutdown |
2123
+ | Call sessions, events, pending questions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent, cascade on session delete |
2124
+ | Active call controllers | In-memory (CallState) | Map<callSessionId, CallController> | Manual lifecycle | Ephemeral; cleared on call end or destroy |
2125
+ | Guardian bindings | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked bindings retained |
2126
+ | Channel verification sessions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; consumed/expired sessions retained |
2127
+ | Guardian approval requests | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; decision outcome retained |
2128
+ | Contact invites | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; token hash stored, raw token never persisted |
2129
+ | Contacts & channels | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; revoked/blocked contacts retained |
2130
+ | Notification events | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; deduplicated by dedupeKey |
2131
+ | Notification decisions | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_events |
2132
+ | Notification deliveries | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; FK to notification_decisions |
2133
+ | Notification preferences | `$VELLUM_WORKSPACE_DIR/data/db/assistant.db` | SQLite | Drizzle ORM | Permanent; per-assistant conversational preferences |
2136
2134
 
2137
2135
  ### Sensitive Tool Output Placeholder Substitution
2138
2136
 
package/README.md CHANGED
@@ -45,12 +45,6 @@ cp .env.example .env
45
45
  | `RUNTIME_HTTP_PORT` | No | — | Enable the HTTP server (required for gateway/web) |
46
46
  | `RUNTIME_HTTP_HOST` | No | `127.0.0.1` | HTTP server bind address |
47
47
 
48
- ## Update Bulletin
49
-
50
- Release notes are surfaced via a background conversation dispatched at daemon startup. Workspace migrations write release notes to `<workspace>/UPDATES.md`; `runUpdateBulletinJobIfNeeded()` then spawns a `conversationType: "background"` conversation via `runBackgroundJob()` (see `runtime/background-job-runner.ts`) whenever the file's content hash changes. The agent uses judgment to surface updates to the user when relevant, and deletes the file when done.
51
-
52
- **For release maintainers:** Add a new migration under `assistant/src/workspace/migrations/0XX-release-notes-<slug>.ts` with the release notes inline as a string literal, and append the export to `WORKSPACE_MIGRATIONS` in `assistant/src/workspace/migrations/registry.ts`. Migrations are append-only. Idempotency requires both the workspace-migration runner AND an in-file marker: `runWorkspaceMigrations()` records each migration's `WorkspaceMigration.id` in `<workspace>/data/.workspace-migrations.json` and skips IDs already in the `applied` set, but a crash between `UPDATES.md` append and checkpoint finalize can cause a duplicate append on next boot. Embed an HTML marker like `<!-- release-note-id:<migration-id> -->` in the appended block, and short-circuit when the marker is already present. See the root `AGENTS.md` "Release Update Hygiene" section for the full rationale. Skip the migration entirely for releases with no user/assistant-facing changes.
53
-
54
48
  ## Usage
55
49
 
56
50
  ### Lifecycle management (recommended)
@@ -441,7 +435,7 @@ If no guardian binding exists, escalation fails closed — the message is denied
441
435
 
442
436
  ## Database
443
437
 
444
- SQLite via Drizzle ORM, stored at `~/.vellum/workspace/data/db/assistant.db`. Key tables include conversations, messages, tool invocations, attachments, memory segments, memory items, reminders, and recurrence schedules (cron + RRULE).
438
+ SQLite via Drizzle ORM, stored at `$VELLUM_WORKSPACE_DIR/data/db/assistant.db`. Key tables include conversations, messages, tool invocations, attachments, memory segments, memory items, reminders, and recurrence schedules (cron + RRULE).
445
439
 
446
440
  > **Note:** The recurrence schedule system supports both cron expressions and iCalendar RRULE syntax. Use the `expression` field with an explicit `syntax` discriminator. See [`docs/architecture/scheduling.md`](docs/architecture/scheduling.md) for details.
447
441