@cursor/bdk 0.2.10 → 0.2.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 (436) hide show
  1. package/dist/bin/agent-serve.js +28 -26
  2. package/dist/channels/bitbucket/api.js +8 -8
  3. package/dist/channels/bitbucket/binding.js +4 -4
  4. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  5. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  6. package/dist/channels/bitbucket/checks.js +1 -1
  7. package/dist/channels/bitbucket/cursor-account.js +1 -1
  8. package/dist/channels/bitbucket/events.js +1 -1
  9. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  10. package/dist/channels/checks.js +2 -2
  11. package/dist/channels/deployments/deployments-channel.js +1 -1
  12. package/dist/channels/github/cursor-account.js +3 -3
  13. package/dist/channels/github/defaults.js +3 -3
  14. package/dist/channels/github/events.js +1 -1
  15. package/dist/channels/github/forward.js +8 -8
  16. package/dist/channels/github/github-channel.js +2 -2
  17. package/dist/channels/gitlab/binding.js +4 -4
  18. package/dist/channels/gitlab/checks.js +1 -1
  19. package/dist/channels/gitlab/cursor-account.js +1 -1
  20. package/dist/channels/gitlab/events.js +1 -1
  21. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  22. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  23. package/dist/channels/gitlab/replay.js +2 -2
  24. package/dist/channels/origin/binding.js +3 -3
  25. package/dist/channels/origin/checks.js +1 -1
  26. package/dist/channels/origin/cursor-account.js +1 -1
  27. package/dist/channels/origin/events.js +1 -1
  28. package/dist/channels/origin/origin-channel.js +1 -1
  29. package/dist/channels/origin/origin-webhook.js +2 -2
  30. package/dist/channels/slack/agentic-delivery.js +3 -3
  31. package/dist/channels/slack/agentic-signals.js +1 -1
  32. package/dist/channels/slack/api.js +5 -5
  33. package/dist/channels/slack/approvals.js +1 -1
  34. package/dist/channels/slack/attachments.js +3 -3
  35. package/dist/channels/slack/blocks.js +3 -3
  36. package/dist/channels/slack/bot-mentions.js +4 -4
  37. package/dist/channels/slack/channel-watch.js +4 -4
  38. package/dist/channels/slack/cli-project.js +3 -3
  39. package/dist/channels/slack/dispatch.js +1 -1
  40. package/dist/channels/slack/doctor.js +1 -1
  41. package/dist/channels/slack/eval-directive.js +1 -1
  42. package/dist/channels/slack/footer.js +1 -1
  43. package/dist/channels/slack/interactive.js +2 -2
  44. package/dist/channels/slack/log.d.ts.map +1 -1
  45. package/dist/channels/slack/log.js +1 -1
  46. package/dist/channels/slack/manifest.js +1 -1
  47. package/dist/channels/slack/nudge-carrier.js +1 -1
  48. package/dist/channels/slack/nudge-store.js +2 -2
  49. package/dist/channels/slack/recording-sink.js +6 -6
  50. package/dist/channels/slack/reply-options.js +6 -6
  51. package/dist/channels/slack/self-identity.d.ts +7 -4
  52. package/dist/channels/slack/self-identity.d.ts.map +1 -1
  53. package/dist/channels/slack/self-identity.js +17 -8
  54. package/dist/channels/slack/sender-name.d.ts.map +1 -1
  55. package/dist/channels/slack/sender-name.js +2 -6
  56. package/dist/channels/slack/setup.d.ts.map +1 -1
  57. package/dist/channels/slack/setup.js +1 -1
  58. package/dist/channels/slack/slack-channel.js +2 -2
  59. package/dist/channels/slack/socket-mode.js +2 -2
  60. package/dist/channels/slack/thread-context.js +8 -8
  61. package/dist/channels/slack/tool-cards.js +1 -1
  62. package/dist/channels/slack/user-info.d.ts +2 -1
  63. package/dist/channels/slack/user-info.d.ts.map +1 -1
  64. package/dist/channels/slack/user-info.js +16 -1
  65. package/dist/channels.js +1 -1
  66. package/dist/docs/404.html +3 -3
  67. package/dist/docs/assets/{app.DXI7bwox.js → app.CKta5zX1.js} +4 -4
  68. package/dist/docs/assets/chunks/@localSearchIndexroot.DtlCe4t6.js +1 -0
  69. package/dist/docs/assets/chunks/{VPLocalSearchBox.BrbO5mEe.js → VPLocalSearchBox.4vRM3EDG.js} +2 -2
  70. package/dist/docs/assets/chunks/{arc.BOG1yms8.js → arc.CofbA8tA.js} +1 -1
  71. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C0hsMZnZ.js → architectureDiagram-Q4EWVU46.Mt2UV5M-.js} +1 -1
  72. package/dist/docs/assets/chunks/{baseUniq.H044KjKs.js → baseUniq.C_W0Aqp4.js} +1 -1
  73. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BsRW6GoB.js → blockDiagram-DXYQGD6D.dAc4goE-.js} +1 -1
  74. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.B9HV5PFR.js → c4Diagram-AHTNJAMY.dnbRC3Dm.js} +1 -1
  75. package/dist/docs/assets/chunks/channel.DpljPUVU.js +1 -0
  76. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CPoT_ajl.js → chunk-4BX2VUAB.B42ltSTd.js} +1 -1
  77. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DZBwWuCL.js → chunk-4TB4RGXK.2GbAul_E.js} +1 -1
  78. package/dist/docs/assets/chunks/{chunk-55IACEB6.CZ3yTiyq.js → chunk-55IACEB6.pjzY-v-B.js} +1 -1
  79. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.6DfvHSd8.js → chunk-EDXVE4YY.BB1GXLj2.js} +1 -1
  80. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CpBj8HfK.js → chunk-FMBD7UC4.B2WxZkoA.js} +1 -1
  81. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BdKo8YqS.js → chunk-OYMX7WX6.BMvb2w73.js} +1 -1
  82. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BnXNyxJx.js → chunk-QZHKN3VN.Bmu_2lNr.js} +1 -1
  83. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Cg1OcF8G.js → chunk-YZCP3GAM.Cth65EaC.js} +1 -1
  84. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DFNHq2OM.js +1 -0
  85. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DFNHq2OM.js +1 -0
  86. package/dist/docs/assets/chunks/clone.DssygCzX.js +1 -0
  87. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.1SP8al9c.js → cose-bilkent-S5V4N54A.CrfA7Iw_.js} +1 -1
  88. package/dist/docs/assets/chunks/{dagre-KV5264BT.DS1L6hJt.js → dagre-KV5264BT.PCD6KQDb.js} +1 -1
  89. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.ChsausbG.js → diagram-5BDNPKRD.CGNlYlP1.js} +1 -1
  90. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.3XsptNWj.js → diagram-G4DWMVQ6.C0cvryPD.js} +1 -1
  91. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DPA9Dk_P.js → diagram-MMDJMWI5.DHlkZHNV.js} +1 -1
  92. package/dist/docs/assets/chunks/{diagram-TYMM5635.BVswXWrB.js → diagram-TYMM5635.DDGqH_4B.js} +1 -1
  93. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BSak5OSP.js → erDiagram-SMLLAGMA.4gOY_C3v.js} +1 -1
  94. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.CQgN4TTz.js → flowDiagram-DWJPFMVM.8i7zsxuh.js} +1 -1
  95. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.GrT0kA4a.js → ganttDiagram-T4ZO3ILL.BEKHYdM-.js} +1 -1
  96. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CdS7Ucll.js → gitGraphDiagram-UUTBAWPF.ACzeLGiB.js} +1 -1
  97. package/dist/docs/assets/chunks/{graph.BVqKRmRo.js → graph.08C3hS6m.js} +1 -1
  98. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.C3C9FRto.js → infoDiagram-42DDH7IO.D8R9obOH.js} +1 -1
  99. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.2FuAh_Zj.js → ishikawaDiagram-UXIWVN3A.CmgYpCWL.js} +1 -1
  100. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CaHMfK4b.js → journeyDiagram-VCZTEJTY.DUzjGfoZ.js} +1 -1
  101. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CjhIUwcA.js → kanban-definition-6JOO6SKY.DbcW2iZ0.js} +1 -1
  102. package/dist/docs/assets/chunks/{layout.CGU3gfSf.js → layout.BaDEpJzu.js} +1 -1
  103. package/dist/docs/assets/chunks/{linear.DaihpW_n.js → linear.B_zRQgCU.js} +1 -1
  104. package/dist/docs/assets/chunks/{min.BS-j8kHQ.js → min.BYscCdSu.js} +1 -1
  105. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BVJ1Bbnk.js → mindmap-definition-QFDTVHPH.Ggu0jg86.js} +1 -1
  106. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Cz1WIv9r.js → pieDiagram-DEJITSTG.D_q4SVDT.js} +1 -1
  107. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DKLFxcjy.js → quadrantDiagram-34T5L4WZ.D3zGj5ok.js} +1 -1
  108. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.BHegiK7x.js → requirementDiagram-MS252O5E.DVTg7zr2.js} +1 -1
  109. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DYkY6yPc.js → sankeyDiagram-XADWPNL6.D3X8jm57.js} +1 -1
  110. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DYQ1QUrI.js → sequenceDiagram-FGHM5R23.Dpjai9YP.js} +1 -1
  111. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.Iru8BsFo.js → stateDiagram-FHFEXIEX.D_AbQBuP.js} +1 -1
  112. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CWKWRxRx.js +1 -0
  113. package/dist/docs/assets/chunks/{theme.DaplWQhQ.js → theme.BcgOnbZ6.js} +2 -2
  114. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.BwFA8hiX.js → timeline-definition-GMOUNBTQ.Cp3DKBe2.js} +1 -1
  115. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CZ60W1C_.js → vennDiagram-DHZGUBPP.Bcvg-Aqu.js} +1 -1
  116. package/dist/docs/assets/chunks/wardley-RL74JXVD.CCpdcUSq.js +162 -0
  117. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.B69D2r8-.js → wardleyDiagram-NUSXRM2D.L0yehCc5.js} +1 -1
  118. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CLPZEIU9.js → xychartDiagram-5P7HB3ND.Cw8-tJmw.js} +1 -1
  119. package/dist/docs/assets/{reference_connections.md.Bljpve-y.js → reference_connections.md.DLrgAd5f.js} +1 -1
  120. package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.js → reference_hooks.md.B-eGa2km.js} +3 -3
  121. package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.lean.js → reference_hooks.md.B-eGa2km.lean.js} +1 -1
  122. package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.js → reference_sessions.md.CyM7ARz1.js} +1 -1
  123. package/dist/docs/assets/{reference_skills.md.C0guGcH0.js → reference_skills.md.ClkMoQsV.js} +3 -3
  124. package/dist/docs/assets/{reference_tools.md.v3SXVSs_.js → reference_tools.md.DzIY9JzY.js} +3 -3
  125. package/dist/docs/assets/{reference_tools.md.v3SXVSs_.lean.js → reference_tools.md.DzIY9JzY.lean.js} +1 -1
  126. package/dist/docs/assets/{style.C130MVnH.css → style.Dwls12uf.css} +1 -1
  127. package/dist/docs/building-with-agents.html +37 -37
  128. package/dist/docs/deployment.html +37 -37
  129. package/dist/docs/evals.html +37 -37
  130. package/dist/docs/guides/agent-to-agent.html +37 -37
  131. package/dist/docs/guides/bitbucket.html +37 -37
  132. package/dist/docs/guides/cloud-agents.html +37 -37
  133. package/dist/docs/guides/convert-automation.html +37 -37
  134. package/dist/docs/guides/github.html +37 -37
  135. package/dist/docs/guides/gitlab.html +37 -37
  136. package/dist/docs/guides/grokbot-agents.html +37 -37
  137. package/dist/docs/guides/hooks.html +37 -37
  138. package/dist/docs/guides/improve.html +37 -37
  139. package/dist/docs/guides/jev.html +37 -37
  140. package/dist/docs/guides/mcp-oauth.html +37 -37
  141. package/dist/docs/guides/migrate.html +37 -37
  142. package/dist/docs/guides/opentelemetry.html +37 -37
  143. package/dist/docs/guides/slack.html +37 -37
  144. package/dist/docs/guides/webhooks.html +37 -37
  145. package/dist/docs/hashmap.json +1 -1
  146. package/dist/docs/hillclimbing.html +37 -37
  147. package/dist/docs/index.html +37 -37
  148. package/dist/docs/llms-full.txt +15 -2
  149. package/dist/docs/quickstart.html +37 -37
  150. package/dist/docs/reference/agent-config.html +37 -37
  151. package/dist/docs/reference/artifacts.html +37 -37
  152. package/dist/docs/reference/channels.html +37 -37
  153. package/dist/docs/reference/cli.html +37 -37
  154. package/dist/docs/reference/connections.html +39 -39
  155. package/dist/docs/reference/connections.md +2 -1
  156. package/dist/docs/reference/evals.html +37 -37
  157. package/dist/docs/reference/extensions.html +37 -37
  158. package/dist/docs/reference/hooks.html +39 -39
  159. package/dist/docs/reference/hooks.md +1 -0
  160. package/dist/docs/reference/http-api.html +37 -37
  161. package/dist/docs/reference/instructions.html +37 -37
  162. package/dist/docs/reference/playground.html +36 -36
  163. package/dist/docs/reference/project-layout.html +37 -37
  164. package/dist/docs/reference/prompt.html +37 -37
  165. package/dist/docs/reference/schedules.html +37 -37
  166. package/dist/docs/reference/sessions.html +37 -37
  167. package/dist/docs/reference/sessions.md +1 -1
  168. package/dist/docs/reference/skills.html +40 -40
  169. package/dist/docs/reference/subagents.html +37 -37
  170. package/dist/docs/reference/tools.html +39 -39
  171. package/dist/docs/reference/tools.md +11 -0
  172. package/dist/docs/templates/agentic-owners.html +37 -37
  173. package/dist/docs/templates/grokbot-agents.html +37 -37
  174. package/dist/docs/templates/security-reviewer.html +37 -37
  175. package/dist/docs/templates/thermo-quality-review.html +37 -37
  176. package/dist/docs/templates/thermo-review.html +37 -37
  177. package/dist/docs/templates/triage.html +37 -37
  178. package/dist/docs/troubleshooting.html +36 -36
  179. package/dist/evals/assertions.d.ts.map +1 -1
  180. package/dist/evals/assertions.js +21 -19
  181. package/dist/evals/expect.js +1 -1
  182. package/dist/evals/judge.js +1 -1
  183. package/dist/evals/reporters.js +8 -8
  184. package/dist/evals/run-facts.js +2 -2
  185. package/dist/evals.js +6 -6
  186. package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -0
  187. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  188. package/dist/extensions/cursor-cloud-agents/extension.js +2 -1
  189. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +16 -0
  190. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  191. package/dist/extensions/cursor-cloud-agents/lib/backend.js +44 -3
  192. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  193. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +23 -0
  194. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
  195. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +32 -0
  196. package/dist/extensions/cursor-cloud-agents/lib/repos.js +2 -2
  197. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  198. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
  199. package/dist/extensions/cursor-cloud-agents/lib/watch.js +1 -1
  200. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  201. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -8
  202. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  203. package/dist/extensions/cursor-grokbot-agents/extension.js +3 -3
  204. package/dist/extensions/cursor-grokbot-agents/lib/agents.js +3 -3
  205. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +3 -3
  206. package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +4 -4
  207. package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
  208. package/dist/extensions/improve/skills/yourself.js +1 -1
  209. package/dist/extensions/jev/extension.js +2 -2
  210. package/dist/extensions/jev/tools/evaluate.js +1 -1
  211. package/dist/extensions/slack-communication/tools/react.js +1 -1
  212. package/dist/files-backends/cursor-hosted.js +8 -8
  213. package/dist/files-backends/local-fs.js +1 -1
  214. package/dist/filesystem.d.ts.map +1 -1
  215. package/dist/filesystem.js +15 -15
  216. package/dist/internal/advertise-tools.d.ts +3 -2
  217. package/dist/internal/advertise-tools.d.ts.map +1 -1
  218. package/dist/internal/advertise-tools.js +11 -9
  219. package/dist/internal/approval-gate.js +1 -1
  220. package/dist/internal/artifacts-store.js +13 -13
  221. package/dist/internal/as-of.js +2 -2
  222. package/dist/internal/authored-alias-hooks.js +1 -1
  223. package/dist/internal/builtin-tools/reminders.js +2 -2
  224. package/dist/internal/chat-client.js +5 -5
  225. package/dist/internal/cli-ax.js +14 -14
  226. package/dist/internal/cli-bitbucket.js +10 -10
  227. package/dist/internal/cli-convert-automation.js +2 -2
  228. package/dist/internal/cli-cursor.js +2 -2
  229. package/dist/internal/cli-deploy.d.ts.map +1 -1
  230. package/dist/internal/cli-deploy.js +40 -40
  231. package/dist/internal/cli-docs.js +5 -5
  232. package/dist/internal/cli-github.js +15 -15
  233. package/dist/internal/cli-gitlab.js +10 -10
  234. package/dist/internal/cli-images.js +16 -16
  235. package/dist/internal/cli-manifest.js +1 -1
  236. package/dist/internal/cli-mcp-oauth.js +5 -5
  237. package/dist/internal/cli-mcp.js +3 -3
  238. package/dist/internal/cli-migrate.js +1 -1
  239. package/dist/internal/cli-skills.js +2 -2
  240. package/dist/internal/cli-slack.js +5 -5
  241. package/dist/internal/cloud-turn-cost.js +1 -1
  242. package/dist/internal/continuation-identity.js +6 -6
  243. package/dist/internal/conversation-mirror.js +5 -5
  244. package/dist/internal/convert-automation/convert-workflow.js +24 -24
  245. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  246. package/dist/internal/cursor/account-mcp.js +20 -20
  247. package/dist/internal/cursor/backend-client.js +6 -6
  248. package/dist/internal/cursor/credentials.js +1 -1
  249. package/dist/internal/cursor/store-api-client.js +1 -1
  250. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  251. package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
  252. package/dist/internal/cursor-deployment-relay.js +9 -9
  253. package/dist/internal/cursor-event-relay.js +10 -10
  254. package/dist/internal/cursor-relay-core.js +2 -2
  255. package/dist/internal/deploy-client.d.ts.map +1 -1
  256. package/dist/internal/deploy-client.js +3 -0
  257. package/dist/internal/deploy-manifest.js +10 -10
  258. package/dist/internal/discovery/agent-config.js +2 -2
  259. package/dist/internal/discovery/agent.js +6 -6
  260. package/dist/internal/discovery/connections.js +5 -5
  261. package/dist/internal/discovery/cursor-plugin.js +12 -12
  262. package/dist/internal/discovery/extension-overlay.js +3 -3
  263. package/dist/internal/discovery/extensions.js +6 -6
  264. package/dist/internal/discovery/info.js +9 -9
  265. package/dist/internal/discovery/instructions.js +1 -1
  266. package/dist/internal/discovery/project.js +3 -3
  267. package/dist/internal/discovery/services.js +1 -1
  268. package/dist/internal/discovery/tools.js +1 -1
  269. package/dist/internal/docs-site.js +2 -2
  270. package/dist/internal/env-file.js +1 -1
  271. package/dist/internal/eval-run-store.js +7 -7
  272. package/dist/internal/eval-runner.d.ts.map +1 -1
  273. package/dist/internal/eval-runner.js +14 -14
  274. package/dist/internal/eval-transport.js +1 -1
  275. package/dist/internal/evals-client.js +4 -4
  276. package/dist/internal/event-log.js +8 -8
  277. package/dist/internal/event-mapper.js +13 -13
  278. package/dist/internal/expected-delivery-failure.js +2 -2
  279. package/dist/internal/filesystem/format.js +2 -2
  280. package/dist/internal/filesystem/nearest.js +3 -3
  281. package/dist/internal/filesystem/scratch.js +3 -3
  282. package/dist/internal/filesystem/tools.js +6 -6
  283. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  284. package/dist/internal/filesystem/walk.js +2 -2
  285. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  286. package/dist/internal/framework-file-storage.js +6 -5
  287. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  288. package/dist/internal/framework-storage-selection.js +4 -2
  289. package/dist/internal/github-fanout.d.ts.map +1 -1
  290. package/dist/internal/github-fanout.js +3 -3
  291. package/dist/internal/guest-network.js +4 -4
  292. package/dist/internal/host-files.js +1 -1
  293. package/dist/internal/host-kv.js +2 -2
  294. package/dist/internal/hosted-catch-protocol.js +1 -1
  295. package/dist/internal/hosted-catch.js +1 -1
  296. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  297. package/dist/internal/hosted-delivery-protocol.js +14 -14
  298. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  299. package/dist/internal/hosted-delivery.js +23 -9
  300. package/dist/internal/hosted-eval-cases.js +4 -4
  301. package/dist/internal/hosted-execution-diag.js +3 -3
  302. package/dist/internal/hosting.js +1 -1
  303. package/dist/internal/http-channel.js +1 -1
  304. package/dist/internal/http-control-plane-session.js +2 -2
  305. package/dist/internal/init-interview.js +7 -7
  306. package/dist/internal/init-project.d.ts.map +1 -1
  307. package/dist/internal/init-project.js +12 -12
  308. package/dist/internal/inline-stdio-mcp.js +2 -2
  309. package/dist/internal/install-cursor-skills.js +11 -11
  310. package/dist/internal/json-schema.js +1 -1
  311. package/dist/internal/local-control-plane.js +3 -3
  312. package/dist/internal/local-env.js +3 -3
  313. package/dist/internal/log-ring.js +1 -1
  314. package/dist/internal/logs-client.js +1 -1
  315. package/dist/internal/mcp-endpoint.js +8 -8
  316. package/dist/internal/mcp-host.d.ts.map +1 -1
  317. package/dist/internal/mcp-host.js +5 -5
  318. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  319. package/dist/internal/mcp-oauth.js +5 -5
  320. package/dist/internal/net.js +2 -2
  321. package/dist/internal/otel/config.js +3 -3
  322. package/dist/internal/otel/runtime.js +13 -13
  323. package/dist/internal/peer-connections.js +2 -2
  324. package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
  325. package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
  326. package/dist/internal/persistent-stage-log-mirror.js +231 -0
  327. package/dist/internal/platform-schedule-sync.js +1 -1
  328. package/dist/internal/platform-timers.js +1 -1
  329. package/dist/internal/playground/static.js +2 -2
  330. package/dist/internal/playground/toolchain.js +2 -2
  331. package/dist/internal/playground-proxy.js +3 -3
  332. package/dist/internal/process-memory-telemetry.js +1 -1
  333. package/dist/internal/reminder-runner.d.ts +1 -1
  334. package/dist/internal/reminder-runner.d.ts.map +1 -1
  335. package/dist/internal/reminder-runner.js +14 -16
  336. package/dist/internal/reminder-store.js +1 -1
  337. package/dist/internal/resolved-connections.js +8 -8
  338. package/dist/internal/router.js +4 -4
  339. package/dist/internal/run-client.js +2 -2
  340. package/dist/internal/schedule-runner.js +6 -6
  341. package/dist/internal/sdk-runner.d.ts.map +1 -1
  342. package/dist/internal/sdk-runner.js +6 -6
  343. package/dist/internal/serve-restart.js +1 -1
  344. package/dist/internal/server.d.ts.map +1 -1
  345. package/dist/internal/server.js +93 -72
  346. package/dist/internal/session-cost.js +3 -3
  347. package/dist/internal/session-engine.d.ts +8 -0
  348. package/dist/internal/session-engine.d.ts.map +1 -1
  349. package/dist/internal/session-engine.js +183 -118
  350. package/dist/internal/session-live-publisher.d.ts +46 -0
  351. package/dist/internal/session-live-publisher.d.ts.map +1 -0
  352. package/dist/internal/session-live-publisher.js +352 -0
  353. package/dist/internal/session-run-log.js +6 -6
  354. package/dist/internal/sessions-client.js +3 -3
  355. package/dist/internal/skill-catalog.js +2 -2
  356. package/dist/internal/sleep.js +1 -1
  357. package/dist/internal/start-log-store.d.ts +5 -1
  358. package/dist/internal/start-log-store.d.ts.map +1 -1
  359. package/dist/internal/start-log-store.js +5 -3
  360. package/dist/internal/storage-coordinator.js +12 -12
  361. package/dist/internal/store-api-protocol.d.ts +51 -0
  362. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  363. package/dist/internal/store-api-protocol.js +39 -2
  364. package/dist/internal/store-mirror.js +4 -4
  365. package/dist/internal/stream-progress.d.ts.map +1 -1
  366. package/dist/internal/stream-progress.js +4 -0
  367. package/dist/internal/terminal-style.js +2 -2
  368. package/dist/internal/tool-call-retry.d.ts +87 -0
  369. package/dist/internal/tool-call-retry.d.ts.map +1 -0
  370. package/dist/internal/tool-call-retry.js +387 -0
  371. package/dist/internal/tool-result.js +3 -3
  372. package/dist/internal/trajectory.js +7 -7
  373. package/dist/internal/turn-governor.js +2 -2
  374. package/dist/internal/turn-outbox.js +1 -1
  375. package/dist/internal/update-check.d.ts.map +1 -1
  376. package/dist/internal/update-check.js +4 -2
  377. package/dist/internal/v2-hosting.d.ts +6 -0
  378. package/dist/internal/v2-hosting.d.ts.map +1 -1
  379. package/dist/internal/v2-hosting.js +7 -1
  380. package/dist/internal/workspace.js +4 -4
  381. package/dist/kv/memory-kv.js +3 -3
  382. package/dist/playground/assets/{index-JekUQERK.js → index-HN5lOuAX.js} +42 -42
  383. package/dist/playground/assets/index-JY1wKCMg.css +1 -0
  384. package/dist/playground/index.html +2 -2
  385. package/dist/prompt.js +1 -1
  386. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  387. package/dist/storage-backends/file-kv.js +7 -7
  388. package/dist/storage-protocol.d.ts +7 -0
  389. package/dist/storage-protocol.d.ts.map +1 -1
  390. package/dist/storage-protocol.js +7 -0
  391. package/dist/storage.js +3 -3
  392. package/dist/types.d.ts +15 -0
  393. package/dist/types.d.ts.map +1 -1
  394. package/dist/types.js +4 -4
  395. package/docs/reference/connections.md +2 -1
  396. package/docs/reference/hooks.md +1 -0
  397. package/docs/reference/sessions.md +1 -1
  398. package/docs/reference/tools.md +11 -0
  399. package/package.json +6 -6
  400. package/templates/agentic-owners/bot/channels/github.ts +2 -2
  401. package/templates/agentic-owners/bot/lib/github.ts +7 -5
  402. package/templates/agentic-owners/bot/lib/owners/decision.ts +9 -9
  403. package/templates/agentic-owners/bot/lib/owners/handles.ts +2 -2
  404. package/templates/agentic-owners/bot/lib/owners/match.ts +5 -3
  405. package/templates/agentic-owners/bot/lib/owners/matching.ts +1 -1
  406. package/templates/agentic-owners/bot/lib/owners/parse.ts +4 -4
  407. package/templates/agentic-owners/bot/lib/owners/prompt.ts +1 -1
  408. package/templates/agentic-owners/bot/lib/review.ts +18 -17
  409. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  410. package/templates/agents-md/bot/lib/collect.ts +6 -6
  411. package/templates/agents-md/bot/lib/config.ts +1 -1
  412. package/templates/agents-md/bot/tools/apply_agents.ts +4 -4
  413. package/templates/code-wiki/bot/channels/github.ts +3 -3
  414. package/templates/code-wiki/bot/lib/repos.ts +1 -1
  415. package/templates/code-wiki/bot/tools/apply_wiki.ts +2 -2
  416. package/templates/demo/bot/lib/collect.ts +1 -1
  417. package/templates/demo/bot/lib/repos.ts +1 -1
  418. package/templates/demo/bot/tools/record_demo.ts +1 -1
  419. package/templates/pr-autofixer/bot/channels/github.ts +2 -2
  420. package/templates/pr-autofixer/bot/lib/merge-watch.ts +2 -2
  421. package/templates/pr-autofixer/bot/lib/repos.ts +2 -2
  422. package/templates/pr-autofixer/bot/lib/webhook-routing.ts +1 -1
  423. package/templates/security-help/bot/lib/repos.ts +1 -1
  424. package/templates/security-reviewer/bot/lib/repos.ts +1 -1
  425. package/templates/triage/bot/lib/actuate.ts +15 -15
  426. package/dist/docs/assets/chunks/@localSearchIndexroot.CtLtpWcx.js +0 -1
  427. package/dist/docs/assets/chunks/channel.CBwrU9rP.js +0 -1
  428. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CbC_mrvB.js +0 -1
  429. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CbC_mrvB.js +0 -1
  430. package/dist/docs/assets/chunks/clone.BTvFyY1a.js +0 -1
  431. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.BYXl4LW6.js +0 -1
  432. package/dist/docs/assets/chunks/wardley-RL74JXVD.iXazD3Z7.js +0 -162
  433. package/dist/playground/assets/index-DXm_VXAQ.css +0 -1
  434. /package/dist/docs/assets/{reference_connections.md.Bljpve-y.lean.js → reference_connections.md.DLrgAd5f.lean.js} +0 -0
  435. /package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.lean.js → reference_sessions.md.CyM7ARz1.lean.js} +0 -0
  436. /package/dist/docs/assets/{reference_skills.md.C0guGcH0.lean.js → reference_skills.md.ClkMoQsV.lean.js} +0 -0
@@ -183,7 +183,7 @@ export function parseHostedAdmissionHandlerRejection(value) {
183
183
  return undefined;
184
184
  }
185
185
  const body = value;
186
- if (Object.keys(body).some(key => !HOSTED_ADMISSION_REJECTION_KEYS.has(key))) {
186
+ if (Object.keys(body).some((key) => !HOSTED_ADMISSION_REJECTION_KEYS.has(key))) {
187
187
  return undefined;
188
188
  }
189
189
  if (typeof body.reason !== "string" ||
@@ -244,18 +244,18 @@ function parseManagedAutomation(value) {
244
244
  return undefined;
245
245
  }
246
246
  const body = value;
247
- if (Object.keys(body).some(key => !MANAGED_AUTOMATION_KEYS.has(key)) ||
247
+ if (Object.keys(body).some((key) => !MANAGED_AUTOMATION_KEYS.has(key)) ||
248
248
  !boundedString(body.automationUuid, 128) ||
249
249
  !Array.isArray(body.mcpServerNames) ||
250
250
  body.mcpServerNames.length > MANAGED_AUTOMATION_MAX_SERVERS ||
251
- !body.mcpServerNames.every(name => boundedString(name, 256))) {
251
+ !body.mcpServerNames.every((name) => boundedString(name, 256))) {
252
252
  return undefined;
253
253
  }
254
254
  if (body.slackChannels !== undefined) {
255
255
  if (!Array.isArray(body.slackChannels) ||
256
256
  body.slackChannels.length === 0 ||
257
257
  body.slackChannels.length > MANAGED_AUTOMATION_MAX_SLACK_CHANNELS ||
258
- !body.slackChannels.every(channel => boundedString(channel, 64))) {
258
+ !body.slackChannels.every((channel) => boundedString(channel, 64))) {
259
259
  return undefined;
260
260
  }
261
261
  }
@@ -281,7 +281,7 @@ function parsePlatformHandoff(value) {
281
281
  return undefined;
282
282
  }
283
283
  const body = value;
284
- if (Object.keys(body).some(key => !HOSTED_PLATFORM_HANDOFF_KEYS.has(key)) || body.v !== 1) {
284
+ if (Object.keys(body).some((key) => !HOSTED_PLATFORM_HANDOFF_KEYS.has(key)) || body.v !== 1) {
285
285
  return undefined;
286
286
  }
287
287
  const placeholder = body.slackPlaceholder;
@@ -289,7 +289,7 @@ function parsePlatformHandoff(value) {
289
289
  return undefined;
290
290
  }
291
291
  const slot = placeholder;
292
- if (Object.keys(slot).some(key => !HOSTED_SLACK_PLACEHOLDER_HANDOFF_KEYS.has(key)) ||
292
+ if (Object.keys(slot).some((key) => !HOSTED_SLACK_PLACEHOLDER_HANDOFF_KEYS.has(key)) ||
293
293
  !boundedString(slot.messageTs, 64) ||
294
294
  !boundedString(slot.channelId, 64) ||
295
295
  !boundedString(slot.threadTs, 64) ||
@@ -314,13 +314,13 @@ export function parseHostedAdmission(value) {
314
314
  }
315
315
  const body = value;
316
316
  if (body.mode === "status") {
317
- return Object.keys(body).every(key => key === "v" || key === "mode" || key === "deliveryId") &&
317
+ return Object.keys(body).every((key) => key === "v" || key === "mode" || key === "deliveryId") &&
318
318
  body.v === HOSTED_DELIVERY_PROTOCOL_VERSION &&
319
319
  boundedString(body.deliveryId, 256)
320
320
  ? body
321
321
  : undefined;
322
322
  }
323
- if (Object.keys(body).some(key => !DELIVERY_KEYS.has(key)) ||
323
+ if (Object.keys(body).some((key) => !DELIVERY_KEYS.has(key)) ||
324
324
  !Object.hasOwn(body, "payload") ||
325
325
  body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
326
326
  body.mode !== "start" ||
@@ -342,7 +342,7 @@ export function parseHostedExecution(value) {
342
342
  return undefined;
343
343
  }
344
344
  const body = value;
345
- if (Object.keys(body).some(key => !EXECUTION_KEYS.has(key)) ||
345
+ if (Object.keys(body).some((key) => !EXECUTION_KEYS.has(key)) ||
346
346
  body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
347
347
  !boundedString(body.admissionToken, 128) ||
348
348
  typeof body.sessionPublicId !== "string" ||
@@ -362,7 +362,7 @@ function parseConsumedDeliveryIds(value) {
362
362
  if (value.length > HOSTED_MAX_CONSUMED_DELIVERY_IDS) {
363
363
  return undefined;
364
364
  }
365
- if (!value.every(id => boundedString(id, 256))) {
365
+ if (!value.every((id) => boundedString(id, 256))) {
366
366
  return undefined;
367
367
  }
368
368
  return value;
@@ -372,7 +372,7 @@ export function parseHostedExecutionOutcome(value) {
372
372
  return undefined;
373
373
  }
374
374
  const body = value;
375
- if (Object.keys(body).some(key => !HOSTED_EXECUTION_OUTCOME_KEYS.has(key)) ||
375
+ if (Object.keys(body).some((key) => !HOSTED_EXECUTION_OUTCOME_KEYS.has(key)) ||
376
376
  body.ok !== true ||
377
377
  body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION) {
378
378
  return undefined;
@@ -476,7 +476,7 @@ function isJsonSafeValue(value, depth) {
476
476
  return false;
477
477
  }
478
478
  if (Array.isArray(value)) {
479
- return value.every(entry => isJsonSafeValue(entry, depth + 1));
479
+ return value.every((entry) => isJsonSafeValue(entry, depth + 1));
480
480
  }
481
481
  const proto = Object.getPrototypeOf(value);
482
482
  if (proto !== Object.prototype && proto !== null) {
@@ -523,7 +523,7 @@ export function parseHostedReminderFireDescriptorPayload(value) {
523
523
  return undefined;
524
524
  }
525
525
  const body = value;
526
- if (Object.keys(body).some(key => !HOSTED_REMINDER_FIRE_DESCRIPTOR_KEYS.has(key))) {
526
+ if (Object.keys(body).some((key) => !HOSTED_REMINDER_FIRE_DESCRIPTOR_KEYS.has(key))) {
527
527
  return undefined;
528
528
  }
529
529
  if (body.protocolVersion !== 1 ||
@@ -631,7 +631,7 @@ export function parseHostedAdmissionOutcome(value) {
631
631
  return undefined;
632
632
  }
633
633
  const body = value;
634
- if (Object.keys(body).some(key => !HOSTED_ADMISSION_OUTCOME_KEYS.has(key)) ||
634
+ if (Object.keys(body).some((key) => !HOSTED_ADMISSION_OUTCOME_KEYS.has(key)) ||
635
635
  body.ok !== true ||
636
636
  body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
637
637
  (body.outcome !== "skip" &&
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-delivery.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAO1C,OAAO,EAKL,KAAK,sBAAsB,EAG5B,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EAQL,KAAK,oBAAoB,EAIzB,KAAK,mCAAmC,EASzC,MAAM,+BAA+B,CAAC;AAoBvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,mBAAmB,CAAC,CAAC;AAEjF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE;IACpC,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;CACzB,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEjC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,sBAAsB,EAAE,M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ACnF,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;QAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH;;;;;OAKG;IACH,sBAAsB,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;OAGG;IACH,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,iBAAiB,CAAC,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,8DAA8D;IAC9D,aAAa,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,wDAAwD;IACxD,YAAY,CAAC,IAAI,YAAY,EAAE,CAAC;IAChC;;;;;OAKG;IACH,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;;OAGG;IACH,mBAAmB,CAAC,IAAI,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,CAAC;IAClE;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,wBAAwB,CAAC;IACjD;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B,GAAG,IAAI,CAwoBP"}
@@ -1,4 +1,5 @@
1
1
  import { randomBytes } from "node:crypto";
2
+ import { metrics } from "@opentelemetry/api";
2
3
  import { packageVersion } from "./distribution.js";
3
4
  import { dispatchOutcome } from "./channel-dispatch.js";
4
5
  import { consumeHostedBoundSecrets, } from "./cursor/hosted-bound-secrets.js";
@@ -227,7 +228,7 @@ async function runAdmission(input, adapter) {
227
228
  captured = { message, options };
228
229
  return createDeferredChannelSession();
229
230
  },
230
- waitUntil: promise => {
231
+ waitUntil: (promise) => {
231
232
  background.push(promise);
232
233
  },
233
234
  };
@@ -473,7 +474,7 @@ export function registerHostedDeliveryRoute(input) {
473
474
  });
474
475
  // Hosted callers reach this only through Anyrun's signed pod-port URL.
475
476
  // The marker is a second, route-specific fence distinct from channel auth.
476
- const auth = request => {
477
+ const auth = (request) => {
477
478
  if (request.headers.get(HOSTED_DELIVERY_HEADER) !== "1") {
478
479
  return null;
479
480
  }
@@ -538,12 +539,12 @@ export function registerHostedDeliveryRoute(input) {
538
539
  const reminder = isHostedReminderAdmission(delivery);
539
540
  const definition = reminder
540
541
  ? undefined
541
- : input.channels.find(candidate => candidate.id === delivery.channelId)?.definition;
542
+ : input.channels.find((candidate) => candidate.id === delivery.channelId)?.definition;
542
543
  if (!reminder && definition === undefined) {
543
544
  return finish(terminalHostedError(404, "channel_not_found", `No channel named "${delivery.channelId}" is mounted.`));
544
545
  }
545
546
  let operation;
546
- const execution = runAdmissionOperation(delivery, definition).then(reply => {
547
+ const execution = runAdmissionOperation(delivery, definition).then((reply) => {
547
548
  operation.settledReply = reply;
548
549
  operation.expiresAt = Date.now() + pendingTtlMs;
549
550
  return reply;
@@ -555,7 +556,7 @@ export function registerHostedDeliveryRoute(input) {
555
556
  admissions.set(delivery.deliveryId, operation);
556
557
  const quickReply = await Promise.race([
557
558
  execution,
558
- new Promise(resolve => setImmediate(() => resolve(undefined))),
559
+ new Promise((resolve) => setImmediate(() => resolve(undefined))),
559
560
  ]);
560
561
  if (quickReply !== undefined) {
561
562
  return responseFromReply(quickReply);
@@ -824,11 +825,11 @@ export function registerHostedDeliveryRoute(input) {
824
825
  }
825
826
  }
826
827
  });
827
- }).then(reply => {
828
+ }).then((reply) => {
828
829
  admitted.settledReply = reply;
829
830
  admitted.expiresAt = Date.now() + pendingTtlMs;
830
831
  return reply;
831
- }, error => {
832
+ }, (error) => {
832
833
  admitted.settledReply = {
833
834
  status: 503,
834
835
  body: {
@@ -845,7 +846,7 @@ export function registerHostedDeliveryRoute(input) {
845
846
  if (execution.mode === "start") {
846
847
  const quickReply = await Promise.race([
847
848
  admitted.execution,
848
- new Promise(resolve => setImmediate(() => resolve(undefined))),
849
+ new Promise((resolve) => setImmediate(() => resolve(undefined))),
849
850
  ]);
850
851
  if (quickReply !== undefined) {
851
852
  return responseFromReply(quickReply);
@@ -874,7 +875,7 @@ async function enqueueIntoActiveOwner(input) {
874
875
  return { outcome: "not_active" };
875
876
  }
876
877
  let resolveResult;
877
- const resultPromise = new Promise(resolve => {
878
+ const resultPromise = new Promise((resolve) => {
878
879
  resolveResult = resolve;
879
880
  });
880
881
  owner.enqueueResults.set(input.deliveryId, resultPromise);
@@ -937,12 +938,22 @@ function evictHostedSdkSessions(evict, ...ids) {
937
938
  }
938
939
  const TRANSIENT_TURN_ERROR_CODES = new Set([
939
940
  "ABORT_ERR",
941
+ "connection_stalled",
940
942
  "UND_ERR_BODY_TIMEOUT",
941
943
  "UND_ERR_HEADERS_TIMEOUT",
942
944
  "canceled",
943
945
  "unavailable",
944
946
  "unknown",
945
947
  ]);
948
+ let stallRetriedCounter;
949
+ function recordStallRetried() {
950
+ if (stallRetriedCounter === undefined) {
951
+ stallRetriedCounter = metrics.getMeter("agent_sdk").createCounter("hosted.turn.stall_retried", {
952
+ description: "Hosted turns classified for transient retry after connection_stalled",
953
+ });
954
+ }
955
+ stallRetriedCounter.add(1, { failure_kind: "connection_stalled" });
956
+ }
946
957
  function hostedFailureForUnfinishedTurn(outcome) {
947
958
  if (outcome.errorCode === "agent_dependency_failed") {
948
959
  return {
@@ -965,6 +976,9 @@ function hostedFailureForUnfinishedTurn(outcome) {
965
976
  if (outcome.status === "error" &&
966
977
  outcome.errorCode !== undefined &&
967
978
  TRANSIENT_TURN_ERROR_CODES.has(outcome.errorCode)) {
979
+ if (outcome.errorCode === "connection_stalled") {
980
+ recordStallRetried();
981
+ }
968
982
  return {
969
983
  error: GUEST_CONNECT_STALLED,
970
984
  retry: HOSTED_GUEST_RETRY_TRANSIENT,
@@ -19,7 +19,7 @@ export async function hostedEvalCatalog(projectRoot) {
19
19
  const { evals, config } = await discoverEvals(projectRoot);
20
20
  return {
21
21
  protocol: 1,
22
- cases: evals.map(e => ({
22
+ cases: evals.map((e) => ({
23
23
  id: e.id,
24
24
  fileId: e.fileId,
25
25
  description: e.definition.description,
@@ -55,7 +55,7 @@ async function runHostedEvalCase(input) {
55
55
  const deadline = new AbortController();
56
56
  const cancel = new AbortController();
57
57
  const result = await Promise.race([
58
- runCase({ ...input, signal: cancel.signal }).catch(error => failedResult(input.evalCase, describeError(error), startedAt)),
58
+ runCase({ ...input, signal: cancel.signal }).catch((error) => failedResult(input.evalCase, describeError(error), startedAt)),
59
59
  sleep(deadlineMs, undefined, { signal: deadline.signal }).then(async () => {
60
60
  // The losing case body keeps running; it must not start turns after this verdict.
61
61
  cancel.abort();
@@ -70,7 +70,7 @@ async function runHostedEvalCase(input) {
70
70
  async function runCase(input) {
71
71
  const startedAt = Date.now();
72
72
  const { evals, config } = await discoverEvals(input.projectRoot);
73
- const discovered = evals.find(e => e.id === input.evalCase.caseId);
73
+ const discovered = evals.find((e) => e.id === input.evalCase.caseId);
74
74
  if (discovered === undefined) {
75
75
  return failedResult(input.evalCase, `No eval case ${JSON.stringify(input.evalCase.caseId)} in this release`, startedAt);
76
76
  }
@@ -152,7 +152,7 @@ function resultEventData(ref, result) {
152
152
  inputs: result.inputs,
153
153
  finalText: result.finalText,
154
154
  tools: result.tools,
155
- toolCalls: result.toolCalls?.map(call => ({
155
+ toolCalls: result.toolCalls?.map((call) => ({
156
156
  toolName: call.toolName,
157
157
  args: boundedIo(call.args),
158
158
  output: boundedIo(call.output),
@@ -65,8 +65,8 @@ export function hostedErrorStackSnippet(error) {
65
65
  if (stack !== undefined && stack.length > 0) {
66
66
  const lines = stack
67
67
  .split("\n")
68
- .map(line => line.trimEnd())
69
- .filter(line => line.trim().length > 0)
68
+ .map((line) => line.trimEnd())
69
+ .filter((line) => line.trim().length > 0)
70
70
  .slice(0, HOSTED_ERROR_STACK_LINE_COUNT);
71
71
  const text = lines.join("\n");
72
72
  return text.length > HOSTED_ERROR_SNIPPET_MAX_CHARS
@@ -129,7 +129,7 @@ export function parseHostedExecutionDiag(raw) {
129
129
  return undefined;
130
130
  }
131
131
  const body = parsed;
132
- if (Object.keys(body).some(key => !DIAG_KEYS.has(key))) {
132
+ if (Object.keys(body).some((key) => !DIAG_KEYS.has(key))) {
133
133
  return undefined;
134
134
  }
135
135
  if (body.v !== HOSTED_EXECUTION_DIAG_VERSION ||
@@ -71,7 +71,7 @@ export function isReservedSecretName(name) {
71
71
  return true;
72
72
  }
73
73
  const upper = name.toUpperCase();
74
- return PLATFORM_HOSTED_STORAGE_SECRET_NAMES.some(managed => managed === upper);
74
+ return PLATFORM_HOSTED_STORAGE_SECRET_NAMES.some((managed) => managed === upper);
75
75
  }
76
76
  /**
77
77
  * Grammar and platform-managed-name errors in declared egress domains and
@@ -181,7 +181,7 @@ export function buildHttpChannelRoutes(args) {
181
181
  playgroundUrl: playgroundUrlForSession(request, base, sessionId),
182
182
  });
183
183
  }
184
- const ndjson = `${snapshot.map(e => JSON.stringify(e)).join("\n")}${snapshot.length > 0 ? "\n" : ""}`;
184
+ const ndjson = `${snapshot.map((e) => JSON.stringify(e)).join("\n")}${snapshot.length > 0 ? "\n" : ""}`;
185
185
  return new Response(ndjson, {
186
186
  status: 200,
187
187
  headers: {
@@ -31,7 +31,7 @@ export function parseControlPlaneSessionPayload(payload) {
31
31
  if (!isRecord(payload)) {
32
32
  return { ok: false, error: "payload must be an object" };
33
33
  }
34
- if (Object.keys(payload).some(key => !PAYLOAD_KEYS.has(key))) {
34
+ if (Object.keys(payload).some((key) => !PAYLOAD_KEYS.has(key))) {
35
35
  return { ok: false, error: "payload carries an unsupported field" };
36
36
  }
37
37
  const message = typeof payload.message === "string" ? payload.message.trim() : "";
@@ -58,7 +58,7 @@ export function parseControlPlaneEvalCasePayload(payload) {
58
58
  if (!isRecord(payload)) {
59
59
  return { ok: false, error: "payload must be an object" };
60
60
  }
61
- if (Object.keys(payload).some(key => !EVAL_CASE_PAYLOAD_KEYS.has(key))) {
61
+ if (Object.keys(payload).some((key) => !EVAL_CASE_PAYLOAD_KEYS.has(key))) {
62
62
  return { ok: false, error: "payload carries an unsupported field" };
63
63
  }
64
64
  for (const key of ["runId", "caseId"]) {
@@ -22,7 +22,7 @@ export function isTemplateMetaPath(rel) {
22
22
  }
23
23
  export function templateFileHasReplacements(spec, rel) {
24
24
  const file = posixRel(rel);
25
- return spec.replace.some(rule => posixRel(rule.file) === file);
25
+ return spec.replace.some((rule) => posixRel(rule.file) === file);
26
26
  }
27
27
  export async function loadTemplateInitSpec(templateDir) {
28
28
  try {
@@ -85,7 +85,7 @@ export async function collectTemplateAnswers(input) {
85
85
  const vars = input.vars ?? {};
86
86
  const answers = {};
87
87
  const ask = input.ask ?? promptTemplateQuestion;
88
- const out = input.out ?? (text => process.stdout.write(text));
88
+ const out = input.out ?? ((text) => process.stdout.write(text));
89
89
  for (const question of input.spec.questions) {
90
90
  if (question.id in vars || !input.interactive) {
91
91
  const raw = vars[question.id]?.trim() || question.default;
@@ -143,7 +143,7 @@ export async function promptTemplateQuestion(question, options = {}) {
143
143
  if (question.hint !== undefined) {
144
144
  output.write(` ${question.hint}\n`);
145
145
  }
146
- return await new Promise(resolve => {
146
+ return await new Promise((resolve) => {
147
147
  rl.question(`${question.prompt}${suffix} `, resolve);
148
148
  });
149
149
  }
@@ -182,7 +182,7 @@ function parseQuestionValue(question, raw) {
182
182
  }
183
183
  if (question.parse === "owner-repo-list") {
184
184
  try {
185
- const scope = parseCursorGithubRepoScope(trimmed.split(",").map(repo => repo.trim()));
185
+ const scope = parseCursorGithubRepoScope(trimmed.split(",").map((repo) => repo.trim()));
186
186
  return { ok: true, value: scope.repos.join(", ") };
187
187
  }
188
188
  catch (error) {
@@ -196,10 +196,10 @@ function formatReplaceValue(rule, answers) {
196
196
  if (raw === undefined || raw === "") {
197
197
  return undefined;
198
198
  }
199
- const parts = raw.split(",").map(part => part.trim());
199
+ const parts = raw.split(",").map((part) => part.trim());
200
200
  let value = raw;
201
201
  if (rule.as === "json-array") {
202
- value = `[${parts.map(part => JSON.stringify(part)).join(", ")}]`;
202
+ value = `[${parts.map((part) => JSON.stringify(part)).join(", ")}]`;
203
203
  }
204
204
  else if (rule.as === "first") {
205
205
  const first = parts[0];
@@ -234,7 +234,7 @@ function parseQuestion(value, index) {
234
234
  question.default = value.default;
235
235
  }
236
236
  if (Array.isArray(value.choices)) {
237
- question.choices = value.choices.map(choice => String(choice));
237
+ question.choices = value.choices.map((choice) => String(choice));
238
238
  }
239
239
  if (value.parse === "owner-repo-list") {
240
240
  question.parse = "owner-repo-list";
@@ -1 +1 @@
1
- {"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAU7B,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,2BAA2B;IAC3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AAM,GAAG,SAAS,CAQhF;AA0BD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,MAAM,EAAE,CAEX;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAsCrC"}
@@ -129,7 +129,7 @@ export async function initProject(options) {
129
129
  const overlayDir = options.overlayDir;
130
130
  const overlayPaths = overlayDir ? await listTemplateFiles(overlayDir) : [];
131
131
  const overlaySet = new Set(overlayPaths);
132
- const corePaths = (await listTemplateFiles(templateDir)).filter(rel => !overlaySet.has(rel));
132
+ const corePaths = (await listTemplateFiles(templateDir)).filter((rel) => !overlaySet.has(rel));
133
133
  const templateName = options.templateName ?? basename(templateDir);
134
134
  const initSpec = options.initSpec ?? (await loadTemplateInitSpec(templateDir));
135
135
  const answers = options.answers ?? {};
@@ -170,8 +170,8 @@ export async function initProject(options) {
170
170
  return {
171
171
  rootDir,
172
172
  files,
173
- created: files.filter(entry => entry.action === "create").map(entry => entry.path),
174
- skipped: files.filter(entry => entry.action === "exist").map(entry => entry.path),
173
+ created: files.filter((entry) => entry.action === "create").map((entry) => entry.path),
174
+ skipped: files.filter((entry) => entry.action === "exist").map((entry) => entry.path),
175
175
  };
176
176
  }
177
177
  async function listTemplateFiles(root) {
@@ -180,9 +180,9 @@ async function listTemplateFiles(root) {
180
180
  withFileTypes: true,
181
181
  });
182
182
  return entries
183
- .filter(entry => entry.isFile())
184
- .map(entry => posixRel(relative(root, join(entry.parentPath, entry.name))))
185
- .filter(rel => !isTemplateMetaPath(rel))
183
+ .filter((entry) => entry.isFile())
184
+ .map((entry) => posixRel(relative(root, join(entry.parentPath, entry.name))))
185
+ .filter((rel) => !isTemplateMetaPath(rel))
186
186
  .sort();
187
187
  }
188
188
  async function writeTemplateFile(input) {
@@ -286,7 +286,7 @@ async function resolveLinkedCli(commandName) {
286
286
  }
287
287
  async function npmGlobalPrefix() {
288
288
  const command = process.platform === "win32" ? "npm.cmd" : "npm";
289
- return await new Promise(resolvePromise => {
289
+ return await new Promise((resolvePromise) => {
290
290
  const child = spawn(command, ["prefix", "-g"], {
291
291
  stdio: ["ignore", "pipe", "ignore"],
292
292
  env: process.env,
@@ -297,7 +297,7 @@ async function npmGlobalPrefix() {
297
297
  out += chunk;
298
298
  });
299
299
  child.on("error", () => resolvePromise(undefined));
300
- child.on("close", code => {
300
+ child.on("close", (code) => {
301
301
  if (code !== 0) {
302
302
  resolvePromise(undefined);
303
303
  return;
@@ -342,7 +342,7 @@ async function defaultNpmInstallRunner(args) {
342
342
  child.stdout?.resume();
343
343
  }
344
344
  child.on("error", reject);
345
- child.on("close", code => {
345
+ child.on("close", (code) => {
346
346
  resolvePromise({ exitCode: code ?? 1, stderr });
347
347
  });
348
348
  });
@@ -356,7 +356,7 @@ function formatModelLiteral(model) {
356
356
  : `,
357
357
  params: [
358
358
  ${model.params
359
- .map(param => ` { id: ${JSON.stringify(param.id)}, value: ${JSON.stringify(param.value)} },`)
359
+ .map((param) => ` { id: ${JSON.stringify(param.id)}, value: ${JSON.stringify(param.value)} },`)
360
360
  .join("\n")}
361
361
  ]`;
362
362
  return `{
@@ -399,7 +399,7 @@ export function formatInitNextSteps(options) {
399
399
  lines.push("Next steps:");
400
400
  lines.push("");
401
401
  const steps = initNextStepEntries(options);
402
- const width = Math.max(...steps.map(step => step.command.length));
402
+ const width = Math.max(...steps.map((step) => step.command.length));
403
403
  for (const [index, step] of steps.entries()) {
404
404
  const command = step.note === undefined
405
405
  ? step.command
@@ -452,7 +452,7 @@ function initNextStepEntries(options) {
452
452
  * the host already has a Cursor credential).
453
453
  */
454
454
  export function initNextCommands(options) {
455
- return initNextStepEntries(options).map(step => step.command);
455
+ return initNextStepEntries(options).map((step) => step.command);
456
456
  }
457
457
  /**
458
458
  * Coding-agent setup guide printed by `bdk init`
@@ -35,7 +35,7 @@ function validateInput(tool, args) {
35
35
  }
36
36
  const issues = parsed.error?.issues ?? [];
37
37
  const message = issues
38
- .map(issue => {
38
+ .map((issue) => {
39
39
  const path = issue.path.join(".");
40
40
  return path === "" ? issue.message : `${path}: ${issue.message}`;
41
41
  })
@@ -150,7 +150,7 @@ export function serveInlineStdioMcp(serverName, definition, catalog) {
150
150
  const tools = definition.tools ?? {};
151
151
  let buffer = "";
152
152
  process.stdin.setEncoding("utf8");
153
- process.stdin.on("data", chunk => {
153
+ process.stdin.on("data", (chunk) => {
154
154
  buffer += chunk;
155
155
  let newline = buffer.indexOf("\n");
156
156
  while (newline !== -1) {
@@ -59,7 +59,7 @@ export function bdkCursorSkillsDir(skillsHome = cursorSkillsHome()) {
59
59
  return join(skillsHome, CURSOR_SKILLS_NAMESPACE);
60
60
  }
61
61
  function legacyCursorSkillsDirs(skillsHome) {
62
- return LEGACY_CURSOR_SKILLS_NAMESPACES.map(name => join(skillsHome, name));
62
+ return LEGACY_CURSOR_SKILLS_NAMESPACES.map((name) => join(skillsHome, name));
63
63
  }
64
64
  /** Absolute install path for one skill: `…/bdk/<leafDir>`. */
65
65
  export function skillInstallPath(skill, skillsHome = cursorSkillsHome()) {
@@ -183,7 +183,7 @@ async function addOwnerWrite(path) {
183
183
  }
184
184
  /** Installed leaf dirs the package no longer ships. Installing deletes these. */
185
185
  async function orphanLeaves(namespaceDir, skills) {
186
- const shipped = new Set(skills.map(skill => skill.leafDir));
186
+ const shipped = new Set(skills.map((skill) => skill.leafDir));
187
187
  let entries;
188
188
  try {
189
189
  entries = await readdir(namespaceDir, { withFileTypes: true });
@@ -192,8 +192,8 @@ async function orphanLeaves(namespaceDir, skills) {
192
192
  return [];
193
193
  }
194
194
  return entries
195
- .filter(entry => entry.isDirectory() && !shipped.has(entry.name))
196
- .map(entry => entry.name);
195
+ .filter((entry) => entry.isDirectory() && !shipped.has(entry.name))
196
+ .map((entry) => entry.name);
197
197
  }
198
198
  /** Drop leftover earlier install folders so stale skill ids are not discovered. */
199
199
  async function removeLegacyCursorSkillsNamespaces(skillsHome) {
@@ -265,7 +265,7 @@ function withAlwaysApply(frontmatter) {
265
265
  }
266
266
  const without = frontmatter
267
267
  .split(/\r?\n/)
268
- .filter(line => !/^\s*alwaysApply\s*:/.test(line))
268
+ .filter((line) => !/^\s*alwaysApply\s*:/.test(line))
269
269
  .join("\n")
270
270
  .replace(/\n+$/, "");
271
271
  if (without === "") {
@@ -291,8 +291,8 @@ export async function planSkillInstall(options) {
291
291
  shipped,
292
292
  skillsHome,
293
293
  directory,
294
- leaves: shipped.map(skill => skill.leafDir),
295
- firstInstall: present.every(isPresent => !isPresent),
294
+ leaves: shipped.map((skill) => skill.leafDir),
295
+ firstInstall: present.every((isPresent) => !isPresent),
296
296
  orphans: await orphanLeaves(directory, shipped),
297
297
  legacyDirs: await existingLegacyCursorSkillsDirs(skillsHome),
298
298
  };
@@ -336,7 +336,7 @@ export async function syncCursorSkillsOnPackageInstall(options = {}) {
336
336
  return { status: "skipped", reason: "no-skills" };
337
337
  }
338
338
  const result = await installCursorSkills(plan.shipped, plan.skillsHome);
339
- const out = options.out ?? (text => process.stderr.write(text));
339
+ const out = options.out ?? ((text) => process.stderr.write(text));
340
340
  out(formatSkillInstall(plan, result));
341
341
  return {
342
342
  status: "installed",
@@ -355,7 +355,7 @@ export async function syncCursorSkillsOnPackageInstall(options = {}) {
355
355
  * rather than blocking the caller — see `SKILL_PROMPT_TIMEOUT_MS`.
356
356
  */
357
357
  export async function offerInstallCursorSkills(options = {}) {
358
- const out = options.out ?? (text => process.stdout.write(text));
358
+ const out = options.out ?? ((text) => process.stdout.write(text));
359
359
  const interactive = options.interactive ?? (process.stdin.isTTY === true && process.stdout.isTTY === true);
360
360
  if (!interactive) {
361
361
  return { installed: [], skipped: true };
@@ -382,7 +382,7 @@ export async function offerInstallCursorSkills(options = {}) {
382
382
  out(c.dim(` (deletes leftover ${dir})\n`));
383
383
  }
384
384
  const confirm = options.confirm ??
385
- (q => promptYesNo(q, {
385
+ ((q) => promptYesNo(q, {
386
386
  defaultYes: true,
387
387
  out,
388
388
  timeoutMs: SKILL_PROMPT_TIMEOUT_MS,
@@ -428,7 +428,7 @@ export async function promptYesNo(question, options) {
428
428
  }
429
429
  /** The line, or `undefined` when the stream ends or the clock runs out first. */
430
430
  function readOneLine(stream, timeoutMs) {
431
- return new Promise(resolve => {
431
+ return new Promise((resolve) => {
432
432
  let buffer = "";
433
433
  let timer;
434
434
  const onData = (chunk) => {
@@ -67,7 +67,7 @@ export function validateToolInput(inputSchema, args) {
67
67
  return { ok: true, value: parsed.data };
68
68
  }
69
69
  const issues = parsed.error.issues
70
- .map(issue => {
70
+ .map((issue) => {
71
71
  const path = issue.path.join(".");
72
72
  return path === "" ? issue.message : `${path}: ${issue.message}`;
73
73
  })
@@ -29,7 +29,7 @@ export async function createLocalControlPlane(opts) {
29
29
  const store = opts.stateDir === undefined ? undefined : new ReminderStore(join(opts.stateDir, "reminders"));
30
30
  const schedules = new Map();
31
31
  const reminderTimers = new Map();
32
- const reminders = new Map(((await store?.list()) ?? []).map(record => [
32
+ const reminders = new Map(((await store?.list()) ?? []).map((record) => [
33
33
  record.id,
34
34
  { ...record, generation: record.generation ?? 0 },
35
35
  ]));
@@ -68,7 +68,7 @@ export async function createLocalControlPlane(opts) {
68
68
  if (!cron.matches(now)) {
69
69
  continue;
70
70
  }
71
- void opts.fireSchedule(name).catch(error => {
71
+ void opts.fireSchedule(name).catch((error) => {
72
72
  logger(`[bdk] schedule "${name}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
73
73
  });
74
74
  }
@@ -90,7 +90,7 @@ export async function createLocalControlPlane(opts) {
90
90
  const delay = Math.min(MAX_TIMER_MS, Math.max(0, record.nextFireAtMs - Date.now()));
91
91
  const timer = setTimeout(() => {
92
92
  reminderTimers.delete(record.id);
93
- void onReminderDue(record.id).catch(error => {
93
+ void onReminderDue(record.id).catch((error) => {
94
94
  logger(`[bdk] reminder "${record.id}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
95
95
  });
96
96
  }, delay);