@vellumai/assistant 0.5.10 → 0.5.12

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 (395) hide show
  1. package/AGENTS.md +8 -0
  2. package/ARCHITECTURE.md +43 -43
  3. package/Dockerfile +3 -0
  4. package/docs/architecture/integrations.md +37 -42
  5. package/docs/architecture/memory.md +7 -12
  6. package/docs/credential-execution-service.md +9 -9
  7. package/docs/skills.md +1 -1
  8. package/node_modules/@vellumai/ces-contracts/src/__tests__/grants.test.ts +7 -7
  9. package/node_modules/@vellumai/ces-contracts/src/handles.ts +5 -4
  10. package/node_modules/@vellumai/credential-storage/src/index.ts +3 -3
  11. package/node_modules/@vellumai/credential-storage/src/static-credentials.ts +1 -1
  12. package/openapi.yaml +7208 -0
  13. package/package.json +2 -1
  14. package/scripts/generate-openapi.ts +562 -0
  15. package/src/__tests__/acp-session.test.ts +239 -44
  16. package/src/__tests__/assistant-feature-flag-guard.test.ts +8 -8
  17. package/src/__tests__/assistant-feature-flag-guardrails.test.ts +5 -86
  18. package/src/__tests__/assistant-feature-flags-integration.test.ts +7 -14
  19. package/src/__tests__/browser-skill-endstate.test.ts +1 -1
  20. package/src/__tests__/btw-routes.test.ts +8 -0
  21. package/src/__tests__/bundled-skill-retrieval-guard.test.ts +10 -10
  22. package/src/__tests__/catalog-cache.test.ts +164 -0
  23. package/src/__tests__/catalog-search.test.ts +61 -0
  24. package/src/__tests__/channel-approvals.test.ts +7 -7
  25. package/src/__tests__/channel-readiness-service.test.ts +41 -0
  26. package/src/__tests__/cli-command-risk-guard.test.ts +181 -6
  27. package/src/__tests__/config-schema.test.ts +10 -2
  28. package/src/__tests__/context-memory-e2e.test.ts +2 -6
  29. package/src/__tests__/conversation-delete-schedule-cleanup.test.ts +396 -0
  30. package/src/__tests__/conversation-error.test.ts +3 -2
  31. package/src/__tests__/conversation-skill-tools.test.ts +1 -3
  32. package/src/__tests__/conversation-title-service.test.ts +2 -15
  33. package/src/__tests__/credential-execution-feature-gates.test.ts +4 -8
  34. package/src/__tests__/credential-execution-managed-contract.test.ts +8 -8
  35. package/src/__tests__/credential-security-e2e.test.ts +4 -4
  36. package/src/__tests__/credential-security-invariants.test.ts +12 -18
  37. package/src/__tests__/credential-vault-unit.test.ts +32 -34
  38. package/src/__tests__/credential-vault.test.ts +25 -33
  39. package/src/__tests__/credentials-cli.test.ts +3 -3
  40. package/src/__tests__/daemon-credential-client.test.ts +2 -2
  41. package/src/__tests__/dynamic-skill-workflow-prompt.test.ts +1 -1
  42. package/src/__tests__/gateway-only-guard.test.ts +3 -0
  43. package/src/__tests__/heartbeat-service.test.ts +35 -0
  44. package/src/__tests__/host-bash-proxy.test.ts +79 -0
  45. package/src/__tests__/host-cu-proxy.test.ts +90 -0
  46. package/src/__tests__/host-file-proxy.test.ts +89 -0
  47. package/src/__tests__/host-shell-tool.test.ts +1 -1
  48. package/src/__tests__/inline-skill-load-permissions.test.ts +3 -3
  49. package/src/__tests__/integration-status.test.ts +5 -5
  50. package/src/__tests__/list-messages-attachments.test.ts +171 -0
  51. package/src/__tests__/llm-request-log-turn-query.test.ts +64 -0
  52. package/src/__tests__/log-export-workspace.test.ts +1 -1
  53. package/src/__tests__/mcp-abort-signal.test.ts +205 -0
  54. package/src/__tests__/mcp-client-auth.test.ts +1 -1
  55. package/src/__tests__/memory-lifecycle-e2e.test.ts +2 -2
  56. package/src/__tests__/memory-recall-log-store.test.ts +182 -0
  57. package/src/__tests__/memory-recall-quality.test.ts +6 -8
  58. package/src/__tests__/memory-regressions.test.ts +53 -42
  59. package/src/__tests__/memory-retrieval.benchmark.test.ts +5 -9
  60. package/src/__tests__/messaging-send-tool.test.ts +5 -5
  61. package/src/__tests__/messaging-skill-split.test.ts +2 -17
  62. package/src/__tests__/notification-telegram-adapter.test.ts +125 -0
  63. package/src/__tests__/oauth-cli.test.ts +203 -649
  64. package/src/__tests__/oauth-provider-profiles.test.ts +55 -20
  65. package/src/__tests__/oauth-scope-policy.test.ts +4 -6
  66. package/src/__tests__/onboarding-template-contract.test.ts +2 -2
  67. package/src/__tests__/platform-callback-registration.test.ts +119 -0
  68. package/src/__tests__/secret-ingress-channel.test.ts +261 -0
  69. package/src/__tests__/secret-ingress-cli.test.ts +201 -0
  70. package/src/__tests__/secret-ingress-http.test.ts +312 -0
  71. package/src/__tests__/secret-ingress.test.ts +283 -0
  72. package/src/__tests__/secret-onetime-send.test.ts +4 -4
  73. package/src/__tests__/secret-routes-managed-proxy.test.ts +78 -0
  74. package/src/__tests__/secure-keys-managed-failover.test.ts +73 -0
  75. package/src/__tests__/skill-feature-flags-integration.test.ts +4 -4
  76. package/src/__tests__/skill-feature-flags.test.ts +11 -19
  77. package/src/__tests__/skill-load-feature-flag.test.ts +1 -1
  78. package/src/__tests__/skill-load-inline-command.test.ts +3 -3
  79. package/src/__tests__/skill-load-inline-includes.test.ts +2 -2
  80. package/src/__tests__/skill-memory.test.ts +2 -4
  81. package/src/__tests__/skill-projection-feature-flag.test.ts +2 -4
  82. package/src/__tests__/skill-projection.benchmark.test.ts +1 -3
  83. package/src/__tests__/skills-uninstall.test.ts +2 -2
  84. package/src/__tests__/skills.test.ts +16 -2
  85. package/src/__tests__/slack-channel-config.test.ts +1 -1
  86. package/src/__tests__/slack-messaging-token-resolution.test.ts +22 -24
  87. package/src/__tests__/slack-share-routes.test.ts +5 -5
  88. package/src/__tests__/slack-skill.test.ts +5 -69
  89. package/src/__tests__/system-prompt.test.ts +39 -0
  90. package/src/__tests__/vellum-self-knowledge-inline-command.test.ts +1 -1
  91. package/src/__tests__/workspace-migration-018-rekey-compound-credential-keys.test.ts +181 -0
  92. package/src/__tests__/workspace-migration-backfill-installation-id.test.ts +5 -4
  93. package/src/acp/client-handler.ts +113 -31
  94. package/src/acp/session-manager.ts +29 -27
  95. package/src/approvals/guardian-request-resolvers.ts +1 -1
  96. package/src/cli/AGENTS.md +113 -0
  97. package/src/cli/commands/autonomy.ts +3 -5
  98. package/src/cli/commands/browser-relay.ts +2 -17
  99. package/src/cli/commands/contacts.ts +6 -4
  100. package/src/cli/commands/conversations.ts +13 -1
  101. package/src/cli/commands/credential-execution.ts +17 -3
  102. package/src/cli/commands/credentials.ts +2 -8
  103. package/src/cli/commands/memory.ts +2 -3
  104. package/src/cli/commands/oauth/__tests__/connect.test.ts +706 -0
  105. package/src/cli/commands/oauth/__tests__/disconnect.test.ts +686 -0
  106. package/src/cli/commands/oauth/__tests__/mode.test.ts +625 -0
  107. package/src/cli/commands/oauth/__tests__/ping.test.ts +631 -0
  108. package/src/cli/commands/oauth/__tests__/providers-delete.test.ts +574 -0
  109. package/src/cli/commands/oauth/__tests__/providers-update.test.ts +416 -0
  110. package/src/cli/commands/oauth/__tests__/status.test.ts +551 -0
  111. package/src/cli/commands/oauth/__tests__/token.test.ts +420 -0
  112. package/src/cli/commands/oauth/apps.ts +87 -50
  113. package/src/cli/commands/oauth/connect.ts +405 -0
  114. package/src/cli/commands/oauth/disconnect.ts +285 -0
  115. package/src/cli/commands/oauth/index.ts +62 -20
  116. package/src/cli/commands/oauth/mode.ts +251 -0
  117. package/src/cli/commands/oauth/ping.ts +196 -0
  118. package/src/cli/commands/oauth/providers.ts +589 -55
  119. package/src/cli/commands/oauth/request.ts +564 -0
  120. package/src/cli/commands/oauth/shared.ts +114 -0
  121. package/src/cli/commands/oauth/status.ts +191 -0
  122. package/src/cli/commands/oauth/token.ts +150 -0
  123. package/src/cli/commands/platform/connect.ts +104 -0
  124. package/src/cli/commands/platform/disconnect.ts +118 -0
  125. package/src/cli/commands/platform/index.ts +252 -0
  126. package/src/cli/commands/sequence.ts +5 -4
  127. package/src/cli/commands/shotgun.ts +16 -0
  128. package/src/cli/commands/skills.ts +173 -41
  129. package/src/cli/commands/usage.ts +5 -11
  130. package/src/cli/lib/daemon-credential-client.ts +22 -38
  131. package/src/cli/program.ts +1 -1
  132. package/src/cli.ts +82 -17
  133. package/src/config/assistant-feature-flags.ts +77 -18
  134. package/src/config/bundled-skills/_shared/CLI_RETRIEVAL_PATTERN.md +1 -1
  135. package/src/config/bundled-skills/app-builder/tools/app-create.ts +1 -1
  136. package/src/config/bundled-skills/contacts/tools/google-contacts.ts +1 -1
  137. package/src/config/bundled-skills/conversations/SKILL.md +20 -0
  138. package/src/config/bundled-skills/conversations/TOOLS.json +23 -0
  139. package/src/config/bundled-skills/conversations/tools/rename-conversation.ts +66 -0
  140. package/src/config/bundled-skills/gmail/SKILL.md +13 -13
  141. package/src/config/bundled-skills/gmail/tools/gmail-archive.ts +3 -3
  142. package/src/config/bundled-skills/gmail/tools/gmail-attachments.ts +2 -2
  143. package/src/config/bundled-skills/gmail/tools/gmail-draft.ts +1 -1
  144. package/src/config/bundled-skills/gmail/tools/gmail-filters.ts +1 -1
  145. package/src/config/bundled-skills/gmail/tools/gmail-follow-up.ts +1 -1
  146. package/src/config/bundled-skills/gmail/tools/gmail-forward.ts +1 -1
  147. package/src/config/bundled-skills/gmail/tools/gmail-label.ts +2 -2
  148. package/src/config/bundled-skills/gmail/tools/gmail-outreach-scan.ts +1 -1
  149. package/src/config/bundled-skills/gmail/tools/gmail-send-draft.ts +1 -1
  150. package/src/config/bundled-skills/gmail/tools/gmail-sender-digest.ts +1 -1
  151. package/src/config/bundled-skills/gmail/tools/gmail-trash.ts +1 -1
  152. package/src/config/bundled-skills/gmail/tools/gmail-unsubscribe.ts +1 -1
  153. package/src/config/bundled-skills/gmail/tools/gmail-vacation.ts +1 -1
  154. package/src/config/bundled-skills/google-calendar/SKILL.md +10 -4
  155. package/src/config/bundled-skills/google-calendar/tools/shared.ts +1 -1
  156. package/src/config/bundled-skills/messaging/SKILL.md +19 -42
  157. package/src/config/bundled-skills/messaging/TOOLS.json +9 -9
  158. package/src/config/bundled-skills/messaging/tools/messaging-analyze-style.ts +1 -1
  159. package/src/config/bundled-skills/messaging/tools/messaging-send.ts +5 -2
  160. package/src/config/bundled-skills/messaging/tools/shared.ts +5 -6
  161. package/src/config/bundled-skills/notifications/SKILL.md +1 -1
  162. package/src/config/bundled-skills/schedule/SKILL.md +2 -2
  163. package/src/config/bundled-skills/settings/SKILL.md +5 -3
  164. package/src/config/bundled-skills/settings/TOOLS.json +17 -0
  165. package/src/config/bundled-skills/settings/tools/avatar-get.ts +50 -0
  166. package/src/config/bundled-skills/settings/tools/avatar-remove.ts +7 -0
  167. package/src/config/bundled-skills/settings/tools/avatar-update.ts +6 -1
  168. package/src/config/bundled-skills/settings/tools/identity-avatar.ts +55 -0
  169. package/src/config/bundled-skills/skills-catalog/SKILL.md +3 -3
  170. package/src/config/bundled-skills/slack/SKILL.md +58 -44
  171. package/src/config/bundled-tool-registry.ts +7 -19
  172. package/src/config/env.ts +5 -1
  173. package/src/config/feature-flag-registry.json +58 -42
  174. package/src/config/loader.ts +4 -0
  175. package/src/config/schemas/platform.ts +0 -8
  176. package/src/config/schemas/security.ts +9 -1
  177. package/src/config/schemas/services.ts +1 -1
  178. package/src/config/skill-state.ts +1 -3
  179. package/src/config/skills.ts +2 -4
  180. package/src/credential-execution/client.ts +1 -1
  181. package/src/credential-execution/feature-gates.ts +9 -16
  182. package/src/credential-execution/process-manager.ts +12 -0
  183. package/src/daemon/config-watcher.ts +4 -0
  184. package/src/daemon/conversation-agent-loop-handlers.ts +10 -0
  185. package/src/daemon/conversation-agent-loop.ts +51 -2
  186. package/src/daemon/conversation-error.ts +36 -6
  187. package/src/daemon/conversation-memory.ts +0 -1
  188. package/src/daemon/conversation-messaging.ts +9 -0
  189. package/src/daemon/conversation-runtime-assembly.ts +33 -0
  190. package/src/daemon/conversation-surfaces.ts +120 -14
  191. package/src/daemon/conversation.ts +5 -0
  192. package/src/daemon/handlers/config-slack-channel.ts +43 -1
  193. package/src/daemon/handlers/conversations.ts +41 -33
  194. package/src/daemon/handlers/skills.ts +148 -3
  195. package/src/daemon/host-bash-proxy.ts +16 -0
  196. package/src/daemon/host-cu-proxy.ts +16 -0
  197. package/src/daemon/host-file-proxy.ts +16 -0
  198. package/src/daemon/lifecycle.ts +73 -3
  199. package/src/daemon/message-types/acp.ts +0 -15
  200. package/src/daemon/message-types/conversations.ts +1 -0
  201. package/src/daemon/message-types/guardian-actions.ts +2 -0
  202. package/src/daemon/message-types/host-bash.ts +6 -1
  203. package/src/daemon/message-types/host-cu.ts +6 -1
  204. package/src/daemon/message-types/host-file.ts +6 -1
  205. package/src/daemon/message-types/integrations.ts +0 -1
  206. package/src/daemon/message-types/memory.ts +0 -1
  207. package/src/daemon/message-types/messages.ts +9 -1
  208. package/src/daemon/message-types/schedules.ts +9 -0
  209. package/src/daemon/server.ts +48 -9
  210. package/src/email/feature-gate.ts +3 -3
  211. package/src/heartbeat/heartbeat-service.ts +48 -0
  212. package/src/hooks/cli.ts +74 -0
  213. package/src/inbound/platform-callback-registration.ts +68 -19
  214. package/src/mcp/client.ts +6 -1
  215. package/src/mcp/manager.ts +2 -1
  216. package/src/mcp/mcp-oauth-provider.ts +3 -3
  217. package/src/memory/app-store.ts +3 -3
  218. package/src/memory/conversation-crud.ts +213 -0
  219. package/src/memory/conversation-key-store.ts +26 -0
  220. package/src/memory/conversation-title-service.ts +7 -17
  221. package/src/memory/db-init.ts +24 -0
  222. package/src/memory/embedding-local.ts +47 -2
  223. package/src/memory/indexer.ts +13 -10
  224. package/src/memory/items-extractor.ts +12 -4
  225. package/src/memory/job-utils.ts +5 -0
  226. package/src/memory/jobs-store.ts +10 -2
  227. package/src/memory/journal-memory.ts +6 -2
  228. package/src/memory/llm-request-log-store.ts +88 -21
  229. package/src/memory/memory-recall-log-store.ts +128 -0
  230. package/src/memory/migrations/194-memory-recall-logs.ts +50 -0
  231. package/src/memory/migrations/195-oauth-providers-ping-config.ts +23 -0
  232. package/src/memory/migrations/196-messages-conversation-created-at-index.ts +9 -0
  233. package/src/memory/migrations/196-strip-integration-prefix-from-provider-keys.ts +186 -0
  234. package/src/memory/migrations/197-oauth-providers-behavior-columns.ts +29 -0
  235. package/src/memory/migrations/198-drop-setup-skill-id-column.ts +11 -0
  236. package/src/memory/migrations/index.ts +6 -0
  237. package/src/memory/migrations/registry.ts +8 -0
  238. package/src/memory/retriever.test.ts +4 -5
  239. package/src/memory/schema/infrastructure.ts +31 -0
  240. package/src/memory/schema/oauth.ts +14 -0
  241. package/src/messaging/provider.ts +13 -12
  242. package/src/messaging/providers/gmail/adapter.ts +44 -35
  243. package/src/messaging/providers/slack/adapter.ts +63 -33
  244. package/src/messaging/providers/telegram-bot/adapter.ts +7 -9
  245. package/src/messaging/providers/whatsapp/adapter.ts +6 -8
  246. package/src/notifications/adapters/telegram.ts +78 -2
  247. package/src/oauth/__tests__/identity-verifier.test.ts +464 -0
  248. package/src/oauth/byo-connection.test.ts +22 -24
  249. package/src/oauth/connect-orchestrator.ts +79 -64
  250. package/src/oauth/connect-types.ts +7 -65
  251. package/src/oauth/connection-resolver.test.ts +13 -13
  252. package/src/oauth/connection-resolver.ts +3 -4
  253. package/src/oauth/identity-verifier.ts +177 -0
  254. package/src/oauth/manual-token-connection.ts +5 -5
  255. package/src/oauth/oauth-store.ts +251 -5
  256. package/src/oauth/platform-connection.test.ts +56 -6
  257. package/src/oauth/platform-connection.ts +8 -1
  258. package/src/oauth/seed-providers.ts +256 -34
  259. package/src/permissions/checker.ts +129 -3
  260. package/src/permissions/trust-client.ts +2 -2
  261. package/src/platform/client.ts +2 -2
  262. package/src/prompts/journal-context.ts +6 -1
  263. package/src/prompts/system-prompt.ts +43 -9
  264. package/src/prompts/templates/BOOTSTRAP.md +16 -5
  265. package/src/providers/anthropic/client.ts +139 -28
  266. package/src/runtime/auth/__tests__/middleware.test.ts +19 -0
  267. package/src/runtime/auth/route-policy.ts +0 -1
  268. package/src/runtime/btw-sidechain.ts +7 -1
  269. package/src/runtime/channel-approvals.ts +2 -2
  270. package/src/runtime/channel-readiness-service.ts +30 -7
  271. package/src/runtime/guardian-action-service.ts +7 -2
  272. package/src/runtime/http-router.ts +31 -0
  273. package/src/runtime/http-server.ts +26 -7
  274. package/src/runtime/http-types.ts +9 -0
  275. package/src/runtime/pending-interactions.ts +21 -3
  276. package/src/runtime/routes/acp-routes.ts +46 -28
  277. package/src/runtime/routes/app-management-routes.ts +123 -0
  278. package/src/runtime/routes/app-routes.ts +31 -0
  279. package/src/runtime/routes/approval-routes.ts +108 -3
  280. package/src/runtime/routes/attachment-routes.ts +45 -0
  281. package/src/runtime/routes/avatar-routes.ts +16 -0
  282. package/src/runtime/routes/brain-graph-routes.ts +18 -0
  283. package/src/runtime/routes/btw-routes.ts +20 -0
  284. package/src/runtime/routes/call-routes.ts +81 -0
  285. package/src/runtime/routes/channel-readiness-routes.ts +48 -7
  286. package/src/runtime/routes/channel-routes.ts +18 -0
  287. package/src/runtime/routes/channel-verification-routes.ts +49 -1
  288. package/src/runtime/routes/contact-routes.ts +77 -0
  289. package/src/runtime/routes/conversation-attention-routes.ts +37 -0
  290. package/src/runtime/routes/conversation-management-routes.ts +125 -0
  291. package/src/runtime/routes/conversation-query-routes.ts +78 -0
  292. package/src/runtime/routes/conversation-routes.ts +191 -39
  293. package/src/runtime/routes/conversation-starter-routes.ts +29 -0
  294. package/src/runtime/routes/debug-routes.ts +23 -0
  295. package/src/runtime/routes/diagnostics-routes.ts +30 -0
  296. package/src/runtime/routes/documents-routes.ts +42 -0
  297. package/src/runtime/routes/events-routes.ts +10 -0
  298. package/src/runtime/routes/global-search-routes.ts +35 -0
  299. package/src/runtime/routes/guardian-action-routes.ts +61 -3
  300. package/src/runtime/routes/guardian-approval-prompt.ts +77 -2
  301. package/src/runtime/routes/heartbeat-routes.ts +278 -0
  302. package/src/runtime/routes/host-bash-routes.ts +16 -1
  303. package/src/runtime/routes/host-cu-routes.ts +23 -1
  304. package/src/runtime/routes/host-file-routes.ts +18 -1
  305. package/src/runtime/routes/identity-routes.ts +35 -0
  306. package/src/runtime/routes/inbound-message-handler.ts +46 -25
  307. package/src/runtime/routes/inbound-stages/acl-enforcement.ts +21 -8
  308. package/src/runtime/routes/inbound-stages/secret-ingress-check.ts +30 -2
  309. package/src/runtime/routes/inbound-stages/transcribe-audio.ts +1 -2
  310. package/src/runtime/routes/integrations/slack/share.ts +1 -1
  311. package/src/runtime/routes/integrations/twilio.ts +32 -22
  312. package/src/runtime/routes/invite-routes.ts +83 -0
  313. package/src/runtime/routes/log-export-routes.ts +14 -0
  314. package/src/runtime/routes/memory-item-routes.ts +99 -1
  315. package/src/runtime/routes/migration-rollback-routes.ts +25 -0
  316. package/src/runtime/routes/migration-routes.ts +40 -0
  317. package/src/runtime/routes/notification-routes.ts +20 -0
  318. package/src/runtime/routes/oauth-apps.ts +13 -4
  319. package/src/runtime/routes/pairing-routes.ts +15 -0
  320. package/src/runtime/routes/recording-routes.ts +72 -0
  321. package/src/runtime/routes/schedule-routes.ts +77 -5
  322. package/src/runtime/routes/secret-routes.ts +99 -14
  323. package/src/runtime/routes/settings-routes.ts +102 -19
  324. package/src/runtime/routes/skills-routes.ts +141 -18
  325. package/src/runtime/routes/subagents-routes.ts +38 -3
  326. package/src/runtime/routes/surface-action-routes.ts +66 -24
  327. package/src/runtime/routes/surface-content-routes.ts +20 -0
  328. package/src/runtime/routes/telemetry-routes.ts +12 -0
  329. package/src/runtime/routes/trace-event-routes.ts +25 -0
  330. package/src/runtime/routes/trust-rules-routes.ts +46 -0
  331. package/src/runtime/routes/tts-routes.ts +15 -4
  332. package/src/runtime/routes/upgrade-broadcast-routes.ts +38 -0
  333. package/src/runtime/routes/usage-routes.ts +59 -0
  334. package/src/runtime/routes/watch-routes.ts +28 -0
  335. package/src/runtime/routes/work-items-routes.ts +59 -0
  336. package/src/runtime/routes/workspace-commit-routes.ts +12 -0
  337. package/src/runtime/routes/workspace-routes.ts +102 -0
  338. package/src/schedule/integration-status.ts +2 -2
  339. package/src/schedule/scheduler.ts +7 -1
  340. package/src/security/AGENTS.md +7 -0
  341. package/src/security/ces-rpc-credential-backend.ts +19 -16
  342. package/src/security/credential-backend.ts +1 -1
  343. package/src/security/encrypted-store.ts +3 -3
  344. package/src/security/oauth-completion-page.ts +153 -0
  345. package/src/security/oauth2.ts +58 -17
  346. package/src/security/secret-ingress.ts +174 -0
  347. package/src/security/secret-patterns.ts +133 -0
  348. package/src/security/secret-scanner.ts +28 -117
  349. package/src/security/secure-keys.ts +207 -7
  350. package/src/security/token-manager.ts +3 -6
  351. package/src/signals/bash.ts +6 -1
  352. package/src/signals/confirm.ts +12 -8
  353. package/src/signals/user-message.ts +18 -3
  354. package/src/skills/catalog-cache.ts +44 -0
  355. package/src/skills/catalog-search.ts +18 -0
  356. package/src/skills/skill-memory.ts +1 -2
  357. package/src/tasks/task-runner.ts +7 -1
  358. package/src/tools/credentials/broker.ts +1 -1
  359. package/src/tools/credentials/metadata-store.ts +1 -1
  360. package/src/tools/credentials/post-connect-hooks.ts +1 -1
  361. package/src/tools/credentials/vault.ts +36 -48
  362. package/src/tools/host-terminal/host-shell.ts +16 -3
  363. package/src/tools/mcp/mcp-tool-factory.ts +2 -1
  364. package/src/tools/memory/definitions.ts +1 -1
  365. package/src/tools/memory/handlers.test.ts +2 -4
  366. package/src/tools/skills/load.ts +1 -1
  367. package/src/tools/skills/sandbox-runner.ts +16 -3
  368. package/src/tools/terminal/safe-env.ts +7 -0
  369. package/src/tools/terminal/shell.ts +16 -3
  370. package/src/tools/tool-manifest.ts +1 -1
  371. package/src/util/log-redact.ts +9 -34
  372. package/src/util/logger.ts +11 -1
  373. package/src/util/sentry-log-stream.ts +51 -0
  374. package/src/watcher/providers/github.ts +2 -2
  375. package/src/watcher/providers/gmail.ts +1 -1
  376. package/src/watcher/providers/google-calendar.ts +1 -1
  377. package/src/watcher/providers/linear.ts +2 -2
  378. package/src/workspace/migrations/011-backfill-installation-id.ts +5 -3
  379. package/src/workspace/migrations/020-rename-oauth-skill-dirs.ts +119 -0
  380. package/src/workspace/migrations/registry.ts +2 -0
  381. package/docs/architecture/keychain-broker.md +0 -68
  382. package/src/cli/commands/oauth/connections.ts +0 -734
  383. package/src/cli/commands/oauth/platform.ts +0 -525
  384. package/src/cli/commands/platform.ts +0 -176
  385. package/src/config/bundled-skills/slack/TOOLS.json +0 -272
  386. package/src/config/bundled-skills/slack/tools/shared.ts +0 -34
  387. package/src/config/bundled-skills/slack/tools/slack-add-reaction.ts +0 -27
  388. package/src/config/bundled-skills/slack/tools/slack-channel-details.ts +0 -38
  389. package/src/config/bundled-skills/slack/tools/slack-channel-permissions.ts +0 -146
  390. package/src/config/bundled-skills/slack/tools/slack-configure-channels.ts +0 -105
  391. package/src/config/bundled-skills/slack/tools/slack-delete-message.ts +0 -26
  392. package/src/config/bundled-skills/slack/tools/slack-edit-message.ts +0 -27
  393. package/src/config/bundled-skills/slack/tools/slack-leave-channel.ts +0 -25
  394. package/src/config/bundled-skills/slack/tools/slack-scan-digest.ts +0 -372
  395. package/src/oauth/provider-behaviors.ts +0 -634
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "id": "browser",
6
6
  "scope": "assistant",
7
- "key": "feature_flags.browser.enabled",
7
+ "key": "browser",
8
8
  "label": "Browser",
9
9
  "description": "Enable browser skill prerequisites section in the system prompt",
10
10
  "defaultEnabled": true
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "id": "user-hosted-enabled",
14
14
  "scope": "macos",
15
- "key": "user_hosted_enabled",
15
+ "key": "user-hosted-enabled",
16
16
  "label": "User Hosted Enabled",
17
17
  "description": "Enable user-hosted onboarding flow",
18
18
  "defaultEnabled": false
@@ -20,7 +20,7 @@
20
20
  {
21
21
  "id": "platform-hosted-enabled",
22
22
  "scope": "macos",
23
- "key": "platform_hosted_enabled",
23
+ "key": "platform-hosted-enabled",
24
24
  "label": "Platform Hosted Assistants",
25
25
  "description": "Enable the Vellum Cloud hosting option on the Hosting screen",
26
26
  "defaultEnabled": false
@@ -28,7 +28,7 @@
28
28
  {
29
29
  "id": "contacts",
30
30
  "scope": "assistant",
31
- "key": "feature_flags.contacts.enabled",
31
+ "key": "contacts",
32
32
  "label": "Contacts",
33
33
  "description": "Show the Contacts tab in Settings for viewing and managing contacts",
34
34
  "defaultEnabled": true
@@ -36,7 +36,7 @@
36
36
  {
37
37
  "id": "email-channel",
38
38
  "scope": "assistant",
39
- "key": "feature_flags.email-channel.enabled",
39
+ "key": "email-channel",
40
40
  "label": "Email Channel",
41
41
  "description": "Enable the entire email integration: email CLI commands, email channel, sequences, email readiness probes, invite adapters, and the email-setup skill",
42
42
  "defaultEnabled": false
@@ -44,7 +44,7 @@
44
44
  {
45
45
  "id": "app-builder-multifile",
46
46
  "scope": "assistant",
47
- "key": "feature_flags.app-builder-multifile.enabled",
47
+ "key": "app-builder-multifile",
48
48
  "label": "App Builder Multi-file",
49
49
  "description": "Enable multi-file TSX app creation with esbuild compilation instead of single-HTML apps",
50
50
  "defaultEnabled": false
@@ -52,7 +52,7 @@
52
52
  {
53
53
  "id": "mobile-pairing",
54
54
  "scope": "macos",
55
- "key": "mobile_pairing_enabled",
55
+ "key": "mobile-pairing",
56
56
  "label": "Mobile Pairing",
57
57
  "description": "Show the Mobile (iOS) pairing card in Settings > Account",
58
58
  "defaultEnabled": false
@@ -60,7 +60,7 @@
60
60
  {
61
61
  "id": "settings-developer-nav",
62
62
  "scope": "assistant",
63
- "key": "feature_flags.settings-developer-nav.enabled",
63
+ "key": "settings-developer-nav",
64
64
  "label": "Settings Developer Nav",
65
65
  "description": "Control Developer nav visibility in macOS settings",
66
66
  "defaultEnabled": true
@@ -68,7 +68,7 @@
68
68
  {
69
69
  "id": "developer-menu-items",
70
70
  "scope": "macos",
71
- "key": "developer_menu_items_enabled",
71
+ "key": "developer-menu-items",
72
72
  "label": "Developer Menu Items",
73
73
  "description": "Show Component Gallery and Replay Onboarding in the menu bar",
74
74
  "defaultEnabled": false
@@ -76,7 +76,7 @@
76
76
  {
77
77
  "id": "ces-tools",
78
78
  "scope": "assistant",
79
- "key": "feature_flags.ces-tools.enabled",
79
+ "key": "ces-tools",
80
80
  "label": "CES Tool Exposure",
81
81
  "description": "Register Credential Execution Service tools (credential-grant, credential-revoke, credential-list) in the agent loop",
82
82
  "defaultEnabled": false
@@ -84,7 +84,7 @@
84
84
  {
85
85
  "id": "ces-shell-lockdown",
86
86
  "scope": "assistant",
87
- "key": "feature_flags.ces-shell-lockdown.enabled",
87
+ "key": "ces-shell-lockdown",
88
88
  "label": "CES Shell Lockdown",
89
89
  "description": "Enforce untrusted-agent shell lockdown when CES credentials are active, restricting direct shell access to credentialed services",
90
90
  "defaultEnabled": false
@@ -92,7 +92,7 @@
92
92
  {
93
93
  "id": "ces-secure-install",
94
94
  "scope": "assistant",
95
- "key": "feature_flags.ces-secure-install.enabled",
95
+ "key": "ces-secure-install",
96
96
  "label": "CES Secure Command Installation",
97
97
  "description": "Enable secure tool/command installation via CES instead of direct shell execution for untrusted agents",
98
98
  "defaultEnabled": false
@@ -100,7 +100,7 @@
100
100
  {
101
101
  "id": "ces-grant-audit",
102
102
  "scope": "assistant",
103
- "key": "feature_flags.ces-grant-audit.enabled",
103
+ "key": "ces-grant-audit",
104
104
  "label": "CES Grant & Audit Inspection",
105
105
  "description": "Surface credential grant and audit inspection endpoints for reviewing active grants and access logs",
106
106
  "defaultEnabled": false
@@ -108,7 +108,7 @@
108
108
  {
109
109
  "id": "ces-managed-sidecar",
110
110
  "scope": "assistant",
111
- "key": "feature_flags.ces-managed-sidecar.enabled",
111
+ "key": "ces-managed-sidecar",
112
112
  "label": "CES Managed Sidecar Transport",
113
113
  "description": "Use managed sidecar transport for CES communication when running in a containerized environment",
114
114
  "defaultEnabled": true
@@ -116,7 +116,7 @@
116
116
  {
117
117
  "id": "ces-credential-backend",
118
118
  "scope": "assistant",
119
- "key": "feature_flags.ces-credential-backend.enabled",
119
+ "key": "ces-credential-backend",
120
120
  "label": "CES Credential Backend",
121
121
  "description": "Route credential reads and writes through the CES process instead of accessing the encrypted store directly",
122
122
  "defaultEnabled": true
@@ -124,7 +124,7 @@
124
124
  {
125
125
  "id": "settings-billing",
126
126
  "scope": "macos",
127
- "key": "settings_billing_enabled",
127
+ "key": "settings-billing",
128
128
  "label": "Billing Settings Tab",
129
129
  "description": "Show the Billing tab in Settings when signed in, displaying credits balance and top-up",
130
130
  "defaultEnabled": true
@@ -132,7 +132,7 @@
132
132
  {
133
133
  "id": "managed-sign-in",
134
134
  "scope": "macos",
135
- "key": "managed_sign_in_enabled",
135
+ "key": "managed-sign-in",
136
136
  "label": "Managed Sign In",
137
137
  "description": "Enable managed (organization-hosted) sign-in flow in the onboarding experience",
138
138
  "defaultEnabled": true
@@ -140,7 +140,7 @@
140
140
  {
141
141
  "id": "integration-twitter",
142
142
  "scope": "assistant",
143
- "key": "feature_flags.integration-twitter.enabled",
143
+ "key": "integration-twitter",
144
144
  "label": "Twitter / X Integration",
145
145
  "description": "Enable the Twitter / X OAuth setup skill for connecting to the Twitter API",
146
146
  "defaultEnabled": false
@@ -148,7 +148,7 @@
148
148
  {
149
149
  "id": "integration-github",
150
150
  "scope": "assistant",
151
- "key": "feature_flags.integration-github.enabled",
151
+ "key": "integration-github",
152
152
  "label": "GitHub Integration",
153
153
  "description": "Enable the GitHub OAuth setup skill for connecting to GitHub",
154
154
  "defaultEnabled": false
@@ -156,7 +156,7 @@
156
156
  {
157
157
  "id": "integration-linear",
158
158
  "scope": "assistant",
159
- "key": "feature_flags.integration-linear.enabled",
159
+ "key": "integration-linear",
160
160
  "label": "Linear Integration",
161
161
  "description": "Enable the Linear OAuth setup skill for connecting to Linear",
162
162
  "defaultEnabled": false
@@ -164,7 +164,7 @@
164
164
  {
165
165
  "id": "integration-spotify",
166
166
  "scope": "assistant",
167
- "key": "feature_flags.integration-spotify.enabled",
167
+ "key": "integration-spotify",
168
168
  "label": "Spotify Integration",
169
169
  "description": "Enable the Spotify OAuth setup skill for connecting to the Spotify API",
170
170
  "defaultEnabled": false
@@ -172,7 +172,7 @@
172
172
  {
173
173
  "id": "integration-todoist",
174
174
  "scope": "assistant",
175
- "key": "feature_flags.integration-todoist.enabled",
175
+ "key": "integration-todoist",
176
176
  "label": "Todoist Integration",
177
177
  "description": "Enable the Todoist OAuth setup skill for connecting to Todoist",
178
178
  "defaultEnabled": false
@@ -180,7 +180,7 @@
180
180
  {
181
181
  "id": "integration-discord",
182
182
  "scope": "assistant",
183
- "key": "feature_flags.integration-discord.enabled",
183
+ "key": "integration-discord",
184
184
  "label": "Discord Integration",
185
185
  "description": "Enable the Discord OAuth setup skill for connecting to Discord",
186
186
  "defaultEnabled": false
@@ -188,7 +188,7 @@
188
188
  {
189
189
  "id": "integration-dropbox",
190
190
  "scope": "assistant",
191
- "key": "feature_flags.integration-dropbox.enabled",
191
+ "key": "integration-dropbox",
192
192
  "label": "Dropbox Integration",
193
193
  "description": "Enable the Dropbox OAuth setup skill for connecting to Dropbox",
194
194
  "defaultEnabled": false
@@ -196,7 +196,7 @@
196
196
  {
197
197
  "id": "integration-asana",
198
198
  "scope": "assistant",
199
- "key": "feature_flags.integration-asana.enabled",
199
+ "key": "integration-asana",
200
200
  "label": "Asana Integration",
201
201
  "description": "Enable the Asana OAuth setup skill for connecting to Asana",
202
202
  "defaultEnabled": false
@@ -204,7 +204,7 @@
204
204
  {
205
205
  "id": "integration-airtable",
206
206
  "scope": "assistant",
207
- "key": "feature_flags.integration-airtable.enabled",
207
+ "key": "integration-airtable",
208
208
  "label": "Airtable Integration",
209
209
  "description": "Enable the Airtable OAuth setup skill for connecting to Airtable",
210
210
  "defaultEnabled": false
@@ -212,7 +212,7 @@
212
212
  {
213
213
  "id": "integration-hubspot",
214
214
  "scope": "assistant",
215
- "key": "feature_flags.integration-hubspot.enabled",
215
+ "key": "integration-hubspot",
216
216
  "label": "HubSpot Integration",
217
217
  "description": "Enable the HubSpot OAuth setup skill for connecting to HubSpot CRM",
218
218
  "defaultEnabled": false
@@ -220,7 +220,7 @@
220
220
  {
221
221
  "id": "integration-figma",
222
222
  "scope": "assistant",
223
- "key": "feature_flags.integration-figma.enabled",
223
+ "key": "integration-figma",
224
224
  "label": "Figma Integration",
225
225
  "description": "Enable the Figma OAuth setup skill for connecting to Figma",
226
226
  "defaultEnabled": false
@@ -228,7 +228,7 @@
228
228
  {
229
229
  "id": "integration-notion",
230
230
  "scope": "assistant",
231
- "key": "feature_flags.integration-notion.enabled",
231
+ "key": "integration-notion",
232
232
  "label": "Notion Integration",
233
233
  "description": "Enable the Notion setup skill for connecting to Notion",
234
234
  "defaultEnabled": false
@@ -236,7 +236,7 @@
236
236
  {
237
237
  "id": "conversation-starters",
238
238
  "scope": "assistant",
239
- "key": "feature_flags.conversation-starters.enabled",
239
+ "key": "conversation-starters",
240
240
  "label": "Recommended Starts",
241
241
  "description": "Show a curated row of recommended starting actions on the empty conversation page, ordered by relevance as confident first-click options",
242
242
  "defaultEnabled": true
@@ -244,7 +244,7 @@
244
244
  {
245
245
  "id": "deploy-to-vercel",
246
246
  "scope": "assistant",
247
- "key": "feature_flags.deploy-to-vercel.enabled",
247
+ "key": "deploy-to-vercel",
248
248
  "label": "Deploy to Vercel",
249
249
  "description": "Enable the Deploy to Vercel / Publish option in the app workspace header share menu",
250
250
  "defaultEnabled": false
@@ -252,15 +252,15 @@
252
252
  {
253
253
  "id": "managed-google-oauth",
254
254
  "scope": "assistant",
255
- "key": "feature_flags.managed-google-oauth.enabled",
255
+ "key": "managed-google-oauth",
256
256
  "label": "Managed Google OAuth",
257
257
  "description": "Show the Google OAuth service card in Models & Services settings",
258
- "defaultEnabled": false
258
+ "defaultEnabled": true
259
259
  },
260
260
  {
261
261
  "id": "settings-embedding-provider",
262
262
  "scope": "assistant",
263
- "key": "feature_flags.settings-embedding-provider.enabled",
263
+ "key": "settings-embedding-provider",
264
264
  "label": "Embedding Provider Settings",
265
265
  "description": "Show the Embedding service card in Models & Services settings",
266
266
  "defaultEnabled": false
@@ -268,7 +268,7 @@
268
268
  {
269
269
  "id": "settings-schedules",
270
270
  "scope": "assistant",
271
- "key": "feature_flags.settings-schedules.enabled",
271
+ "key": "settings-schedules",
272
272
  "label": "Schedules Settings Tab",
273
273
  "description": "Show the Schedules tab in Settings for viewing and managing schedules",
274
274
  "defaultEnabled": false
@@ -276,7 +276,7 @@
276
276
  {
277
277
  "id": "quick-input",
278
278
  "scope": "macos",
279
- "key": "quick_input_enabled",
279
+ "key": "quick-input",
280
280
  "label": "Quick Input",
281
281
  "description": "Enable the Quick Input popover on right-click of the menu bar icon",
282
282
  "defaultEnabled": false
@@ -284,7 +284,7 @@
284
284
  {
285
285
  "id": "expand-completed-steps",
286
286
  "scope": "macos",
287
- "key": "expand_completed_steps",
287
+ "key": "expand-completed-steps",
288
288
  "label": "Expand Completed Steps",
289
289
  "description": "Auto-expand completed tool call step groups instead of showing them collapsed",
290
290
  "defaultEnabled": false
@@ -292,7 +292,7 @@
292
292
  {
293
293
  "id": "inline-skill-commands",
294
294
  "scope": "assistant",
295
- "key": "feature_flags.inline-skill-commands.enabled",
295
+ "key": "inline-skill-commands",
296
296
  "label": "Inline Skill Command Expansion",
297
297
  "description": "Enable secure inline skill command expansion via !`command` syntax, with version-pinned approval and sandboxed execution at skill load time",
298
298
  "defaultEnabled": true
@@ -300,7 +300,7 @@
300
300
  {
301
301
  "id": "channel-voice-transcription",
302
302
  "scope": "assistant",
303
- "key": "feature_flags.channel-voice-transcription.enabled",
303
+ "key": "channel-voice-transcription",
304
304
  "label": "Channel Voice Transcription",
305
305
  "description": "Auto-transcribe voice/audio messages received from channels (Telegram, WhatsApp) before processing",
306
306
  "defaultEnabled": true
@@ -308,7 +308,7 @@
308
308
  {
309
309
  "id": "sounds",
310
310
  "scope": "assistant",
311
- "key": "feature_flags.sounds.enabled",
311
+ "key": "sounds",
312
312
  "label": "Sounds",
313
313
  "description": "Enable the Sounds tab in Settings and all app sound playback (event sounds, random ambient sounds)",
314
314
  "defaultEnabled": true
@@ -316,7 +316,7 @@
316
316
  {
317
317
  "id": "message-tts",
318
318
  "scope": "assistant",
319
- "key": "feature_flags.message-tts.enabled",
319
+ "key": "message-tts",
320
320
  "label": "Message Text-to-Speech",
321
321
  "description": "Show a speaker button on assistant messages to generate and play the message as audio via Fish Audio TTS",
322
322
  "defaultEnabled": false
@@ -324,10 +324,26 @@
324
324
  {
325
325
  "id": "backward-releases",
326
326
  "scope": "assistant",
327
- "key": "feature_flags.backward-releases.enabled",
327
+ "key": "backward-releases",
328
328
  "label": "Backward Releases",
329
329
  "description": "Show older versions in the version picker, allowing rollback to previous releases",
330
330
  "defaultEnabled": true
331
+ },
332
+ {
333
+ "id": "show-background-conversations",
334
+ "scope": "assistant",
335
+ "key": "show-background-conversations",
336
+ "label": "Show Background Conversations",
337
+ "description": "Include background conversations (heartbeat, tasks) in the sidebar conversation list",
338
+ "defaultEnabled": false
339
+ },
340
+ {
341
+ "id": "voice-mode",
342
+ "scope": "assistant",
343
+ "key": "voice-mode",
344
+ "label": "Voice Mode",
345
+ "description": "Show the live voice conversation button in the composer",
346
+ "defaultEnabled": false
331
347
  }
332
348
  ]
333
349
  }
@@ -120,6 +120,10 @@ const DEPRECATED_FIELDS: Record<string, string> = {
120
120
  "rateLimit.maxTokensPerSession has been removed and is no longer enforced. " +
121
121
  "Per-session token budget tracking is no longer supported. " +
122
122
  "The field will be removed from your config file.",
123
+ providerOrder:
124
+ "providerOrder has been removed from the config schema. " +
125
+ "Provider selection is now handled automatically. " +
126
+ "The field will be removed from your config file.",
123
127
  };
124
128
 
125
129
  /**
@@ -39,14 +39,6 @@ export const DaemonConfigSchema = z
39
39
  .positive("daemon.sigkillGracePeriodMs must be a positive integer")
40
40
  .default(2000)
41
41
  .describe("Grace period after SIGTERM before sending SIGKILL (ms)"),
42
- titleGenerationMaxTokens: z
43
- .number({ error: "daemon.titleGenerationMaxTokens must be a number" })
44
- .int("daemon.titleGenerationMaxTokens must be an integer")
45
- .positive("daemon.titleGenerationMaxTokens must be a positive integer")
46
- .default(50)
47
- .describe(
48
- "Maximum number of tokens for auto-generated conversation titles",
49
- ),
50
42
  standaloneRecording: z
51
43
  .boolean({ error: "daemon.standaloneRecording must be a boolean" })
52
44
  .default(true)
@@ -44,6 +44,12 @@ export const SecretDetectionConfigSchema = z
44
44
  .describe(
45
45
  "Shannon entropy threshold for detecting high-entropy strings as potential secrets",
46
46
  ),
47
+ blockIngress: z
48
+ .boolean({ error: "secretDetection.blockIngress must be a boolean" })
49
+ .default(true)
50
+ .describe(
51
+ "Whether to block user messages containing detected secrets at ingress",
52
+ ),
47
53
  allowOneTimeSend: z
48
54
  .boolean({ error: "secretDetection.allowOneTimeSend must be a boolean" })
49
55
  .default(false)
@@ -74,7 +80,9 @@ export const PermissionsConfigSchema = z
74
80
  "Permission mode — 'strict' requires explicit approval for all operations, 'workspace' allows operations within the workspace",
75
81
  ),
76
82
  dangerouslySkipPermissions: z
77
- .boolean({ error: "permissions.dangerouslySkipPermissions must be a boolean" })
83
+ .boolean({
84
+ error: "permissions.dangerouslySkipPermissions must be a boolean",
85
+ })
78
86
  .default(false)
79
87
  .describe("Auto-accept all permission prompts without asking"),
80
88
  })
@@ -47,7 +47,7 @@ export const WebSearchServiceSchema = BaseServiceSchema.extend({
47
47
  export type WebSearchService = z.infer<typeof WebSearchServiceSchema>;
48
48
 
49
49
  export const GoogleOAuthServiceSchema = BaseServiceSchema.extend({
50
- mode: ServiceModeSchema.default("managed"),
50
+ mode: ServiceModeSchema.default("your-own"),
51
51
  });
52
52
  export type GoogleOAuthService = z.infer<typeof GoogleOAuthServiceSchema>;
53
53
 
@@ -17,9 +17,7 @@ export interface ResolvedSkill {
17
17
  export function skillFlagKey(
18
18
  skill: Pick<SkillSummary, "featureFlag">,
19
19
  ): string | undefined {
20
- return skill.featureFlag
21
- ? `feature_flags.${skill.featureFlag}.enabled`
22
- : undefined;
20
+ return skill.featureFlag || undefined;
23
21
  }
24
22
 
25
23
  export function resolveSkillStates(
@@ -928,13 +928,11 @@ function applyFeatureGatedSections(body: string): string {
928
928
  let result = body;
929
929
 
930
930
  result = result.replace(mainRe, (_match, flagId: string, content: string) => {
931
- const key = `feature_flags.${flagId}.enabled`;
932
- return isAssistantFeatureFlagEnabled(key, config) ? content : "";
931
+ return isAssistantFeatureFlagEnabled(flagId, config) ? content : "";
933
932
  });
934
933
 
935
934
  result = result.replace(altRe, (_match, flagId: string, content: string) => {
936
- const key = `feature_flags.${flagId}.enabled`;
937
- return isAssistantFeatureFlagEnabled(key, config) ? "" : content;
935
+ return isAssistantFeatureFlagEnabled(flagId, config) ? "" : content;
938
936
  });
939
937
 
940
938
  return result;
@@ -348,7 +348,7 @@ export function createCesClient(
348
348
  },
349
349
 
350
350
  isReady(): boolean {
351
- return ready;
351
+ return ready && transport.isAlive();
352
352
  },
353
353
 
354
354
  close(): void {
@@ -5,8 +5,8 @@
5
5
  * All checks delegate to the unified feature-flag resolver so that
6
6
  * config overrides and registry defaults are respected uniformly.
7
7
  *
8
- * Flag keys follow the canonical `feature_flags.<id>.enabled` format
9
- * and are declared in `meta/feature-flags/feature-flag-registry.json`.
8
+ * Flag keys use simple kebab-case format (e.g., "ces-tools") and are
9
+ * declared in `meta/feature-flags/feature-flag-registry.json`.
10
10
  */
11
11
 
12
12
  import { isAssistantFeatureFlagEnabled } from "../config/assistant-feature-flags.js";
@@ -17,27 +17,23 @@ import type { AssistantConfig } from "../config/schema.js";
17
17
  // ---------------------------------------------------------------------------
18
18
 
19
19
  /** Gate for CES tool registration (credential-grant, credential-revoke, credential-list). */
20
- export const CES_TOOLS_FLAG_KEY = "feature_flags.ces-tools.enabled" as const;
20
+ export const CES_TOOLS_FLAG_KEY = "ces-tools" as const;
21
21
 
22
22
  /** Gate for untrusted-agent shell lockdown when CES credentials are active. */
23
- export const CES_SHELL_LOCKDOWN_FLAG_KEY =
24
- "feature_flags.ces-shell-lockdown.enabled" as const;
23
+ export const CES_SHELL_LOCKDOWN_FLAG_KEY = "ces-shell-lockdown" as const;
25
24
 
26
25
  /** Gate for secure tool/command installation via CES. */
27
- export const CES_SECURE_INSTALL_FLAG_KEY =
28
- "feature_flags.ces-secure-install.enabled" as const;
26
+ export const CES_SECURE_INSTALL_FLAG_KEY = "ces-secure-install" as const;
29
27
 
30
28
  /** Gate for credential grant and audit inspection surfaces. */
31
- export const CES_GRANT_AUDIT_FLAG_KEY =
32
- "feature_flags.ces-grant-audit.enabled" as const;
29
+ export const CES_GRANT_AUDIT_FLAG_KEY = "ces-grant-audit" as const;
33
30
 
34
31
  /** Gate for managed sidecar transport in containerized environments. */
35
- export const CES_MANAGED_SIDECAR_FLAG_KEY =
36
- "feature_flags.ces-managed-sidecar.enabled" as const;
32
+ export const CES_MANAGED_SIDECAR_FLAG_KEY = "ces-managed-sidecar" as const;
37
33
 
38
34
  /** Gate for routing credential reads/writes through the CES process. */
39
35
  export const CES_CREDENTIAL_BACKEND_FLAG_KEY =
40
- "feature_flags.ces-credential-backend.enabled" as const;
36
+ "ces-credential-backend" as const;
41
37
 
42
38
  // ---------------------------------------------------------------------------
43
39
  // Public API — predicate functions
@@ -84,8 +80,5 @@ export function isCesManagedSidecarEnabled(config: AssistantConfig): boolean {
84
80
  export function isCesCredentialBackendEnabled(
85
81
  config: AssistantConfig,
86
82
  ): boolean {
87
- return isAssistantFeatureFlagEnabled(
88
- CES_CREDENTIAL_BACKEND_FLAG_KEY,
89
- config,
90
- );
83
+ return isAssistantFeatureFlagEnabled(CES_CREDENTIAL_BACKEND_FLAG_KEY, config);
91
84
  }
@@ -140,6 +140,18 @@ export function createCesProcessManager(
140
140
 
141
141
  if (managedAllowed) {
142
142
  discoveryResult = await discoverCes();
143
+ if (discoveryResult.mode === "unavailable") {
144
+ // The managed sidecar bootstrap socket is not present — this happens
145
+ // when the flag is enabled by default but the instance pre-dates the
146
+ // socket volume mount (e.g. existing Docker configs without the
147
+ // ces-bootstrap volume). Warn and fall back to local discovery so
148
+ // these deployments don't fail on upgrade.
149
+ log.warn(
150
+ { reason: discoveryResult.reason },
151
+ "CES managed sidecar bootstrap socket unavailable — falling back to local CES discovery",
152
+ );
153
+ discoveryResult = discoverLocalCes();
154
+ }
143
155
  } else {
144
156
  log.info(
145
157
  "CES managed sidecar feature flag is off — skipping managed discovery, falling back to local",
@@ -158,6 +158,10 @@ export class ConfigWatcher {
158
158
  clearFeatureFlagOverridesCache();
159
159
  onConversationEvict();
160
160
  },
161
+ "feature-flags-remote.json": () => {
162
+ clearFeatureFlagOverridesCache();
163
+ onConversationEvict();
164
+ },
161
165
  "secret-allowlist.json": () => {
162
166
  resetAllowlist();
163
167
  try {
@@ -25,6 +25,7 @@ import {
25
25
  backfillMessageIdOnLogs,
26
26
  recordRequestLog,
27
27
  } from "../memory/llm-request-log-store.js";
28
+ import { backfillMemoryRecallLogMessageId } from "../memory/memory-recall-log-store.js";
28
29
  import type { ContentBlock, ImageContent } from "../providers/types.js";
29
30
  import type { DirectiveRequest } from "./assistant-attachments.js";
30
31
  import {
@@ -739,6 +740,15 @@ export async function handleMessageComplete(
739
740
  );
740
741
  }
741
742
 
743
+ try {
744
+ backfillMemoryRecallLogMessageId(deps.ctx.conversationId, assistantMsg.id);
745
+ } catch (err) {
746
+ deps.rlog.warn(
747
+ { err },
748
+ "Failed to backfill message_id on memory recall log (non-fatal)",
749
+ );
750
+ }
751
+
742
752
  deps.ctx.currentTurnSurfaces = [];
743
753
 
744
754
  // Emit trace event