@cursor/bdk 0.2.11 → 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 (432) 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_tools.md.v3SXVSs_.js → reference_tools.md.DzIY9JzY.js} +3 -3
  124. package/dist/docs/assets/{reference_tools.md.v3SXVSs_.lean.js → reference_tools.md.DzIY9JzY.lean.js} +1 -1
  125. package/dist/docs/assets/{style.C130MVnH.css → style.Dwls12uf.css} +1 -1
  126. package/dist/docs/building-with-agents.html +37 -37
  127. package/dist/docs/deployment.html +37 -37
  128. package/dist/docs/evals.html +37 -37
  129. package/dist/docs/guides/agent-to-agent.html +37 -37
  130. package/dist/docs/guides/bitbucket.html +37 -37
  131. package/dist/docs/guides/cloud-agents.html +37 -37
  132. package/dist/docs/guides/convert-automation.html +37 -37
  133. package/dist/docs/guides/github.html +37 -37
  134. package/dist/docs/guides/gitlab.html +37 -37
  135. package/dist/docs/guides/grokbot-agents.html +37 -37
  136. package/dist/docs/guides/hooks.html +37 -37
  137. package/dist/docs/guides/improve.html +37 -37
  138. package/dist/docs/guides/jev.html +37 -37
  139. package/dist/docs/guides/mcp-oauth.html +37 -37
  140. package/dist/docs/guides/migrate.html +37 -37
  141. package/dist/docs/guides/opentelemetry.html +37 -37
  142. package/dist/docs/guides/slack.html +37 -37
  143. package/dist/docs/guides/webhooks.html +37 -37
  144. package/dist/docs/hashmap.json +1 -1
  145. package/dist/docs/hillclimbing.html +37 -37
  146. package/dist/docs/index.html +37 -37
  147. package/dist/docs/llms-full.txt +15 -2
  148. package/dist/docs/quickstart.html +37 -37
  149. package/dist/docs/reference/agent-config.html +37 -37
  150. package/dist/docs/reference/artifacts.html +37 -37
  151. package/dist/docs/reference/channels.html +37 -37
  152. package/dist/docs/reference/cli.html +37 -37
  153. package/dist/docs/reference/connections.html +39 -39
  154. package/dist/docs/reference/connections.md +2 -1
  155. package/dist/docs/reference/evals.html +37 -37
  156. package/dist/docs/reference/extensions.html +37 -37
  157. package/dist/docs/reference/hooks.html +39 -39
  158. package/dist/docs/reference/hooks.md +1 -0
  159. package/dist/docs/reference/http-api.html +37 -37
  160. package/dist/docs/reference/instructions.html +37 -37
  161. package/dist/docs/reference/playground.html +36 -36
  162. package/dist/docs/reference/project-layout.html +37 -37
  163. package/dist/docs/reference/prompt.html +37 -37
  164. package/dist/docs/reference/schedules.html +37 -37
  165. package/dist/docs/reference/sessions.html +37 -37
  166. package/dist/docs/reference/sessions.md +1 -1
  167. package/dist/docs/reference/skills.html +37 -37
  168. package/dist/docs/reference/subagents.html +37 -37
  169. package/dist/docs/reference/tools.html +39 -39
  170. package/dist/docs/reference/tools.md +11 -0
  171. package/dist/docs/templates/agentic-owners.html +37 -37
  172. package/dist/docs/templates/grokbot-agents.html +37 -37
  173. package/dist/docs/templates/security-reviewer.html +37 -37
  174. package/dist/docs/templates/thermo-quality-review.html +37 -37
  175. package/dist/docs/templates/thermo-review.html +37 -37
  176. package/dist/docs/templates/triage.html +37 -37
  177. package/dist/docs/troubleshooting.html +36 -36
  178. package/dist/evals/assertions.d.ts.map +1 -1
  179. package/dist/evals/assertions.js +21 -19
  180. package/dist/evals/expect.js +1 -1
  181. package/dist/evals/judge.js +1 -1
  182. package/dist/evals/reporters.js +8 -8
  183. package/dist/evals/run-facts.js +2 -2
  184. package/dist/evals.js +6 -6
  185. package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -0
  186. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  187. package/dist/extensions/cursor-cloud-agents/extension.js +2 -1
  188. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +16 -0
  189. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  190. package/dist/extensions/cursor-cloud-agents/lib/backend.js +44 -3
  191. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  192. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +23 -0
  193. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
  194. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +32 -0
  195. package/dist/extensions/cursor-cloud-agents/lib/repos.js +2 -2
  196. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  197. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
  198. package/dist/extensions/cursor-cloud-agents/lib/watch.js +1 -1
  199. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  200. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -8
  201. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  202. package/dist/extensions/cursor-grokbot-agents/extension.js +3 -3
  203. package/dist/extensions/cursor-grokbot-agents/lib/agents.js +3 -3
  204. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +3 -3
  205. package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +4 -4
  206. package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
  207. package/dist/extensions/improve/skills/yourself.js +1 -1
  208. package/dist/extensions/jev/extension.js +2 -2
  209. package/dist/extensions/jev/tools/evaluate.js +1 -1
  210. package/dist/extensions/slack-communication/tools/react.js +1 -1
  211. package/dist/files-backends/cursor-hosted.js +8 -8
  212. package/dist/files-backends/local-fs.js +1 -1
  213. package/dist/filesystem.d.ts.map +1 -1
  214. package/dist/filesystem.js +15 -15
  215. package/dist/internal/advertise-tools.d.ts +3 -2
  216. package/dist/internal/advertise-tools.d.ts.map +1 -1
  217. package/dist/internal/advertise-tools.js +11 -9
  218. package/dist/internal/approval-gate.js +1 -1
  219. package/dist/internal/artifacts-store.js +13 -13
  220. package/dist/internal/as-of.js +2 -2
  221. package/dist/internal/authored-alias-hooks.js +1 -1
  222. package/dist/internal/builtin-tools/reminders.js +2 -2
  223. package/dist/internal/chat-client.js +5 -5
  224. package/dist/internal/cli-ax.js +14 -14
  225. package/dist/internal/cli-bitbucket.js +10 -10
  226. package/dist/internal/cli-convert-automation.js +2 -2
  227. package/dist/internal/cli-cursor.js +2 -2
  228. package/dist/internal/cli-deploy.d.ts.map +1 -1
  229. package/dist/internal/cli-deploy.js +40 -40
  230. package/dist/internal/cli-docs.js +5 -5
  231. package/dist/internal/cli-github.js +15 -15
  232. package/dist/internal/cli-gitlab.js +10 -10
  233. package/dist/internal/cli-images.js +16 -16
  234. package/dist/internal/cli-manifest.js +1 -1
  235. package/dist/internal/cli-mcp-oauth.js +5 -5
  236. package/dist/internal/cli-mcp.js +3 -3
  237. package/dist/internal/cli-migrate.js +1 -1
  238. package/dist/internal/cli-skills.js +2 -2
  239. package/dist/internal/cli-slack.js +5 -5
  240. package/dist/internal/cloud-turn-cost.js +1 -1
  241. package/dist/internal/continuation-identity.js +6 -6
  242. package/dist/internal/conversation-mirror.js +5 -5
  243. package/dist/internal/convert-automation/convert-workflow.js +24 -24
  244. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  245. package/dist/internal/cursor/account-mcp.js +20 -20
  246. package/dist/internal/cursor/backend-client.js +6 -6
  247. package/dist/internal/cursor/credentials.js +1 -1
  248. package/dist/internal/cursor/store-api-client.js +1 -1
  249. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  250. package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
  251. package/dist/internal/cursor-deployment-relay.js +9 -9
  252. package/dist/internal/cursor-event-relay.js +10 -10
  253. package/dist/internal/cursor-relay-core.js +2 -2
  254. package/dist/internal/deploy-manifest.js +10 -10
  255. package/dist/internal/discovery/agent-config.js +2 -2
  256. package/dist/internal/discovery/agent.js +6 -6
  257. package/dist/internal/discovery/connections.js +5 -5
  258. package/dist/internal/discovery/cursor-plugin.js +12 -12
  259. package/dist/internal/discovery/extension-overlay.js +3 -3
  260. package/dist/internal/discovery/extensions.js +6 -6
  261. package/dist/internal/discovery/info.js +9 -9
  262. package/dist/internal/discovery/instructions.js +1 -1
  263. package/dist/internal/discovery/project.js +3 -3
  264. package/dist/internal/discovery/services.js +1 -1
  265. package/dist/internal/discovery/tools.js +1 -1
  266. package/dist/internal/docs-site.js +2 -2
  267. package/dist/internal/env-file.js +1 -1
  268. package/dist/internal/eval-run-store.js +7 -7
  269. package/dist/internal/eval-runner.d.ts.map +1 -1
  270. package/dist/internal/eval-runner.js +14 -14
  271. package/dist/internal/eval-transport.js +1 -1
  272. package/dist/internal/evals-client.js +4 -4
  273. package/dist/internal/event-log.js +8 -8
  274. package/dist/internal/event-mapper.js +13 -13
  275. package/dist/internal/expected-delivery-failure.js +2 -2
  276. package/dist/internal/filesystem/format.js +2 -2
  277. package/dist/internal/filesystem/nearest.js +3 -3
  278. package/dist/internal/filesystem/scratch.js +3 -3
  279. package/dist/internal/filesystem/tools.js +6 -6
  280. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  281. package/dist/internal/filesystem/walk.js +2 -2
  282. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  283. package/dist/internal/framework-file-storage.js +6 -5
  284. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  285. package/dist/internal/framework-storage-selection.js +4 -2
  286. package/dist/internal/github-fanout.d.ts.map +1 -1
  287. package/dist/internal/github-fanout.js +3 -3
  288. package/dist/internal/guest-network.js +4 -4
  289. package/dist/internal/host-files.js +1 -1
  290. package/dist/internal/host-kv.js +2 -2
  291. package/dist/internal/hosted-catch-protocol.js +1 -1
  292. package/dist/internal/hosted-catch.js +1 -1
  293. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  294. package/dist/internal/hosted-delivery-protocol.js +14 -14
  295. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  296. package/dist/internal/hosted-delivery.js +23 -9
  297. package/dist/internal/hosted-eval-cases.js +4 -4
  298. package/dist/internal/hosted-execution-diag.js +3 -3
  299. package/dist/internal/hosting.js +1 -1
  300. package/dist/internal/http-channel.js +1 -1
  301. package/dist/internal/http-control-plane-session.js +2 -2
  302. package/dist/internal/init-interview.js +7 -7
  303. package/dist/internal/init-project.d.ts.map +1 -1
  304. package/dist/internal/init-project.js +12 -12
  305. package/dist/internal/inline-stdio-mcp.js +2 -2
  306. package/dist/internal/install-cursor-skills.js +11 -11
  307. package/dist/internal/json-schema.js +1 -1
  308. package/dist/internal/local-control-plane.js +3 -3
  309. package/dist/internal/local-env.js +3 -3
  310. package/dist/internal/log-ring.js +1 -1
  311. package/dist/internal/logs-client.js +1 -1
  312. package/dist/internal/mcp-endpoint.js +8 -8
  313. package/dist/internal/mcp-host.d.ts.map +1 -1
  314. package/dist/internal/mcp-host.js +5 -5
  315. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  316. package/dist/internal/mcp-oauth.js +5 -5
  317. package/dist/internal/net.js +2 -2
  318. package/dist/internal/otel/config.js +3 -3
  319. package/dist/internal/otel/runtime.js +13 -13
  320. package/dist/internal/peer-connections.js +2 -2
  321. package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
  322. package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
  323. package/dist/internal/persistent-stage-log-mirror.js +231 -0
  324. package/dist/internal/platform-schedule-sync.js +1 -1
  325. package/dist/internal/platform-timers.js +1 -1
  326. package/dist/internal/playground/static.js +2 -2
  327. package/dist/internal/playground/toolchain.js +2 -2
  328. package/dist/internal/playground-proxy.js +3 -3
  329. package/dist/internal/process-memory-telemetry.js +1 -1
  330. package/dist/internal/reminder-runner.d.ts +1 -1
  331. package/dist/internal/reminder-runner.d.ts.map +1 -1
  332. package/dist/internal/reminder-runner.js +14 -16
  333. package/dist/internal/reminder-store.js +1 -1
  334. package/dist/internal/resolved-connections.js +8 -8
  335. package/dist/internal/router.js +4 -4
  336. package/dist/internal/run-client.js +2 -2
  337. package/dist/internal/schedule-runner.js +6 -6
  338. package/dist/internal/sdk-runner.d.ts.map +1 -1
  339. package/dist/internal/sdk-runner.js +6 -6
  340. package/dist/internal/serve-restart.js +1 -1
  341. package/dist/internal/server.d.ts.map +1 -1
  342. package/dist/internal/server.js +93 -72
  343. package/dist/internal/session-cost.js +3 -3
  344. package/dist/internal/session-engine.d.ts +8 -0
  345. package/dist/internal/session-engine.d.ts.map +1 -1
  346. package/dist/internal/session-engine.js +183 -118
  347. package/dist/internal/session-live-publisher.d.ts +46 -0
  348. package/dist/internal/session-live-publisher.d.ts.map +1 -0
  349. package/dist/internal/session-live-publisher.js +352 -0
  350. package/dist/internal/session-run-log.js +6 -6
  351. package/dist/internal/sessions-client.js +3 -3
  352. package/dist/internal/skill-catalog.js +2 -2
  353. package/dist/internal/sleep.js +1 -1
  354. package/dist/internal/start-log-store.d.ts +5 -1
  355. package/dist/internal/start-log-store.d.ts.map +1 -1
  356. package/dist/internal/start-log-store.js +5 -3
  357. package/dist/internal/storage-coordinator.js +12 -12
  358. package/dist/internal/store-api-protocol.d.ts +51 -0
  359. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  360. package/dist/internal/store-api-protocol.js +39 -2
  361. package/dist/internal/store-mirror.js +4 -4
  362. package/dist/internal/stream-progress.d.ts.map +1 -1
  363. package/dist/internal/stream-progress.js +4 -0
  364. package/dist/internal/terminal-style.js +2 -2
  365. package/dist/internal/tool-call-retry.d.ts +87 -0
  366. package/dist/internal/tool-call-retry.d.ts.map +1 -0
  367. package/dist/internal/tool-call-retry.js +387 -0
  368. package/dist/internal/tool-result.js +3 -3
  369. package/dist/internal/trajectory.js +7 -7
  370. package/dist/internal/turn-governor.js +2 -2
  371. package/dist/internal/turn-outbox.js +1 -1
  372. package/dist/internal/update-check.d.ts.map +1 -1
  373. package/dist/internal/update-check.js +4 -2
  374. package/dist/internal/v2-hosting.d.ts +6 -0
  375. package/dist/internal/v2-hosting.d.ts.map +1 -1
  376. package/dist/internal/v2-hosting.js +7 -1
  377. package/dist/internal/workspace.js +4 -4
  378. package/dist/kv/memory-kv.js +3 -3
  379. package/dist/playground/assets/{index-Be0-1hw2.js → index-HN5lOuAX.js} +42 -42
  380. package/dist/playground/assets/index-JY1wKCMg.css +1 -0
  381. package/dist/playground/index.html +2 -2
  382. package/dist/prompt.js +1 -1
  383. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  384. package/dist/storage-backends/file-kv.js +7 -7
  385. package/dist/storage-protocol.d.ts +7 -0
  386. package/dist/storage-protocol.d.ts.map +1 -1
  387. package/dist/storage-protocol.js +7 -0
  388. package/dist/storage.js +3 -3
  389. package/dist/types.d.ts +15 -0
  390. package/dist/types.d.ts.map +1 -1
  391. package/dist/types.js +4 -4
  392. package/docs/reference/connections.md +2 -1
  393. package/docs/reference/hooks.md +1 -0
  394. package/docs/reference/sessions.md +1 -1
  395. package/docs/reference/tools.md +11 -0
  396. package/package.json +6 -6
  397. package/templates/agentic-owners/bot/channels/github.ts +2 -2
  398. package/templates/agentic-owners/bot/lib/github.ts +7 -5
  399. package/templates/agentic-owners/bot/lib/owners/decision.ts +9 -9
  400. package/templates/agentic-owners/bot/lib/owners/handles.ts +2 -2
  401. package/templates/agentic-owners/bot/lib/owners/match.ts +5 -3
  402. package/templates/agentic-owners/bot/lib/owners/matching.ts +1 -1
  403. package/templates/agentic-owners/bot/lib/owners/parse.ts +4 -4
  404. package/templates/agentic-owners/bot/lib/owners/prompt.ts +1 -1
  405. package/templates/agentic-owners/bot/lib/review.ts +18 -17
  406. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  407. package/templates/agents-md/bot/lib/collect.ts +6 -6
  408. package/templates/agents-md/bot/lib/config.ts +1 -1
  409. package/templates/agents-md/bot/tools/apply_agents.ts +4 -4
  410. package/templates/code-wiki/bot/channels/github.ts +3 -3
  411. package/templates/code-wiki/bot/lib/repos.ts +1 -1
  412. package/templates/code-wiki/bot/tools/apply_wiki.ts +2 -2
  413. package/templates/demo/bot/lib/collect.ts +1 -1
  414. package/templates/demo/bot/lib/repos.ts +1 -1
  415. package/templates/demo/bot/tools/record_demo.ts +1 -1
  416. package/templates/pr-autofixer/bot/channels/github.ts +2 -2
  417. package/templates/pr-autofixer/bot/lib/merge-watch.ts +2 -2
  418. package/templates/pr-autofixer/bot/lib/repos.ts +2 -2
  419. package/templates/pr-autofixer/bot/lib/webhook-routing.ts +1 -1
  420. package/templates/security-help/bot/lib/repos.ts +1 -1
  421. package/templates/security-reviewer/bot/lib/repos.ts +1 -1
  422. package/templates/triage/bot/lib/actuate.ts +15 -15
  423. package/dist/docs/assets/chunks/@localSearchIndexroot.CtLtpWcx.js +0 -1
  424. package/dist/docs/assets/chunks/channel.CBwrU9rP.js +0 -1
  425. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CbC_mrvB.js +0 -1
  426. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CbC_mrvB.js +0 -1
  427. package/dist/docs/assets/chunks/clone.BTvFyY1a.js +0 -1
  428. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.BYXl4LW6.js +0 -1
  429. package/dist/docs/assets/chunks/wardley-RL74JXVD.iXazD3Z7.js +0 -162
  430. package/dist/playground/assets/index-Clz6uHj9.css +0 -1
  431. /package/dist/docs/assets/{reference_connections.md.Bljpve-y.lean.js → reference_connections.md.DLrgAd5f.lean.js} +0 -0
  432. /package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.lean.js → reference_sessions.md.CyM7ARz1.lean.js} +0 -0
@@ -481,7 +481,7 @@ Options:
481
481
  `;
482
482
  function writeStdout(text) {
483
483
  return new Promise((resolve, reject) => {
484
- process.stdout.write(text, error => {
484
+ process.stdout.write(text, (error) => {
485
485
  if (error) {
486
486
  reject(error);
487
487
  return;
@@ -504,7 +504,9 @@ async function main(argv) {
504
504
  }
505
505
  // `session --events` means "dump raw events" (boolean). Rewrite so it does
506
506
  // not collide with run/trajectory's `--events <file.ndjson>` string flag.
507
- const rest = command === "session" ? restIn.map(arg => (arg === "--events" ? "--raw-events" : arg)) : restIn;
507
+ const rest = command === "session"
508
+ ? restIn.map((arg) => (arg === "--events" ? "--raw-events" : arg))
509
+ : restIn;
508
510
  const { values, positionals } = parseArgs({
509
511
  args: rest,
510
512
  allowPositionals: true,
@@ -738,7 +740,7 @@ async function main(argv) {
738
740
  }
739
741
  case "convert-automation": {
740
742
  const { cmdConvertAutomation } = await import("../internal/cli-convert-automation.js");
741
- const dirFlagPassed = rest.includes("--dir") || rest.some(arg => arg.startsWith("--dir="));
743
+ const dirFlagPassed = rest.includes("--dir") || rest.some((arg) => arg.startsWith("--dir="));
742
744
  return cmdConvertAutomation({
743
745
  url: positionals[0],
744
746
  // Default target is ./<automation-name-slug>, not the cwd.
@@ -807,7 +809,7 @@ async function main(argv) {
807
809
  // `--repo` is repeatable for `serve --cursor-events`; deploy targets a
808
810
  // single source repo, so the last one wins.
809
811
  const repo = values.repo?.at(-1);
810
- const dirFlagPassed = rest.includes("--dir") || rest.some(arg => arg.startsWith("--dir="));
812
+ const dirFlagPassed = rest.includes("--dir") || rest.some((arg) => arg.startsWith("--dir="));
811
813
  return cmdDeploy({
812
814
  ...deployOptionsFromValues(values),
813
815
  dir: dirFlagPassed ? dir : undefined,
@@ -1134,7 +1136,7 @@ async function main(argv) {
1134
1136
  continue;
1135
1137
  }
1136
1138
  process.stdout.write(`${label}:\n${formatDiagnostics(project.diagnostics)}\n`);
1137
- hasError ||= project.diagnostics.some(d => d.severity === "error");
1139
+ hasError ||= project.diagnostics.some((d) => d.severity === "error");
1138
1140
  }
1139
1141
  return hasError ? 1 : 0;
1140
1142
  }
@@ -1158,7 +1160,7 @@ async function main(argv) {
1158
1160
  const info = projectInfo(project);
1159
1161
  process.stdout.write(` /${slug} — ${info.name} (${formatModel(info.model)}, ${info.tools.length} tools, ${info.channels.length} channels)\n`);
1160
1162
  }
1161
- const anyError = mounts.some(m => m.project.diagnostics.some(d => d.severity === "error"));
1163
+ const anyError = mounts.some((m) => m.project.diagnostics.some((d) => d.severity === "error"));
1162
1164
  return anyError ? 1 : 0;
1163
1165
  }
1164
1166
  const project = mounts[0]?.project;
@@ -1170,27 +1172,27 @@ async function main(argv) {
1170
1172
  if (info.instructions !== undefined) {
1171
1173
  lines.push(`instructions: ${info.instructions.chars} chars`);
1172
1174
  }
1173
- lines.push(section("tools", info.tools.map(t => `${t.name} — ${t.description}`)));
1174
- lines.push(section("skills", info.skills.map(s => `${s.name} — ${s.description}`)));
1175
- lines.push(section("extensions", info.extensions.map(e => {
1175
+ lines.push(section("tools", info.tools.map((t) => `${t.name} — ${t.description}`)));
1176
+ lines.push(section("skills", info.skills.map((s) => `${s.name} — ${s.description}`)));
1177
+ lines.push(section("extensions", info.extensions.map((e) => {
1176
1178
  const contributed = [...e.tools, ...e.skills].join(", ") || "(nothing contributed)";
1177
1179
  const egress = e.hosting?.egressDomains ?? [];
1178
1180
  return egress.length === 0
1179
1181
  ? `${e.name} — ${contributed}`
1180
1182
  : `${e.name} — ${contributed}; egress: ${egress.join(", ")}`;
1181
1183
  })));
1182
- lines.push(section("MCP connections", info.connections.map(c => `${c.name} — ${c.transport}`)));
1183
- lines.push(section("subagents", info.subagents.map(s => `${s.name} — ${s.description ?? ""}`)));
1184
- lines.push(section("channels", info.channels.map(c => `${c.id}: ${c.routes.map(r => `${r.method} ${r.url}`).join(", ") || "(events only)"}`)));
1185
- lines.push(section("schedules", info.schedules.map(s => `${s.name} (${s.cron}, ${s.kind})`)));
1184
+ lines.push(section("MCP connections", info.connections.map((c) => `${c.name} — ${c.transport}`)));
1185
+ lines.push(section("subagents", info.subagents.map((s) => `${s.name} — ${s.description ?? ""}`)));
1186
+ lines.push(section("channels", info.channels.map((c) => `${c.id}: ${c.routes.map((r) => `${r.method} ${r.url}`).join(", ") || "(events only)"}`)));
1187
+ lines.push(section("schedules", info.schedules.map((s) => `${s.name} (${s.cron}, ${s.kind})`)));
1186
1188
  lines.push(section("hooks", info.hooks));
1187
1189
  lines.push(section("hosting egress domains", info.hosting?.egressDomains ?? []));
1188
1190
  lines.push(section("hosting secret names", info.hosting?.secretNames ?? []));
1189
1191
  if (info.diagnostics.length > 0) {
1190
1192
  lines.push(`\ndiagnostics:\n${formatDiagnostics(info.diagnostics)}`);
1191
1193
  }
1192
- process.stdout.write(`${lines.filter(line => line !== "").join("\n")}\n`);
1193
- return info.diagnostics.some(d => d.severity === "error") ? 1 : 0;
1194
+ process.stdout.write(`${lines.filter((line) => line !== "").join("\n")}\n`);
1195
+ return info.diagnostics.some((d) => d.severity === "error") ? 1 : 0;
1194
1196
  }
1195
1197
  case "dev":
1196
1198
  case "serve": {
@@ -1282,7 +1284,7 @@ async function main(argv) {
1282
1284
  const handle = await start();
1283
1285
  let closing = false;
1284
1286
  let restartRequested = false;
1285
- await new Promise(resolve => {
1287
+ await new Promise((resolve) => {
1286
1288
  const shutdown = () => {
1287
1289
  if (closing) {
1288
1290
  return;
@@ -1422,10 +1424,10 @@ function section(title, items) {
1422
1424
  if (items.length === 0) {
1423
1425
  return "";
1424
1426
  }
1425
- return `${title}:\n${items.map(item => ` - ${item}`).join("\n")}`;
1427
+ return `${title}:\n${items.map((item) => ` - ${item}`).join("\n")}`;
1426
1428
  }
1427
1429
  function isEnterOnly(text) {
1428
- return text.length > 0 && [...text].every(ch => ch === "\n" || ch === "\r");
1430
+ return text.length > 0 && [...text].every((ch) => ch === "\n" || ch === "\r");
1429
1431
  }
1430
1432
  /**
1431
1433
  * `dev [path]` takes a positional project root; `serve` keeps `--dir` only.
@@ -1497,7 +1499,7 @@ function printServeBanner(handle, opts) {
1497
1499
  }
1498
1500
  if (info.schedules.length > 0) {
1499
1501
  const scheduleMode = opts.noSchedules ? "disabled" : "running on cron cadence (UTC)";
1500
- process.stdout.write(c.dim(` schedules: ${info.schedules.map(s => s.name).join(", ")} — ${scheduleMode}\n`));
1502
+ process.stdout.write(c.dim(` schedules: ${info.schedules.map((s) => s.name).join(", ")} — ${scheduleMode}\n`));
1501
1503
  }
1502
1504
  }
1503
1505
  if (handle.docsUrl !== undefined) {
@@ -1509,18 +1511,18 @@ function printServeBanner(handle, opts) {
1509
1511
  }
1510
1512
  if (opts.dev &&
1511
1513
  (process.env.GITHUB_WEBHOOK_SECRET === undefined || process.env.GITHUB_WEBHOOK_SECRET === "") &&
1512
- handle.agents.some(agent => projectInfo(agent.project).channels.some(c => c.kind === "github"))) {
1514
+ handle.agents.some((agent) => projectInfo(agent.project).channels.some((c) => c.kind === "github"))) {
1513
1515
  process.stdout.write(c.dim(` github: dev accepts unsigned loopback deliveries (${CLI} github forward works without a secret; set GITHUB_WEBHOOK_SECRET to verify signatures)\n`));
1514
1516
  }
1515
1517
  if (opts.dev &&
1516
1518
  (process.env.GITLAB_WEBHOOK_SECRET === undefined || process.env.GITLAB_WEBHOOK_SECRET === "") &&
1517
- handle.agents.some(agent => projectInfo(agent.project).channels.some(c => c.kind === "gitlab"))) {
1519
+ handle.agents.some((agent) => projectInfo(agent.project).channels.some((c) => c.kind === "gitlab"))) {
1518
1520
  process.stdout.write(c.dim(` gitlab: dev accepts unsigned loopback deliveries (${CLI} gitlab replay works without a secret; set GITLAB_WEBHOOK_SECRET to verify X-Gitlab-Token)\n`));
1519
1521
  }
1520
1522
  if (opts.dev &&
1521
1523
  (process.env.BITBUCKET_WEBHOOK_SECRET === undefined ||
1522
1524
  process.env.BITBUCKET_WEBHOOK_SECRET === "") &&
1523
- handle.agents.some(agent => projectInfo(agent.project).channels.some(c => c.kind === "bitbucket"))) {
1525
+ handle.agents.some((agent) => projectInfo(agent.project).channels.some((c) => c.kind === "bitbucket"))) {
1524
1526
  process.stdout.write(c.dim(` bitbucket: dev accepts unsigned loopback deliveries (${CLI} bitbucket replay works without a secret; set BITBUCKET_WEBHOOK_SECRET to verify X-Hub-Signature)\n`));
1525
1527
  }
1526
1528
  }
@@ -1583,14 +1585,14 @@ function installTransportErrorGuards() {
1583
1585
  const text = reason instanceof Error ? reason.message : String(reason);
1584
1586
  process.stderr.write(`[bdk] ${label} (server stays up): ${text.slice(0, 400)}\n`);
1585
1587
  };
1586
- process.on("unhandledRejection", reason => {
1588
+ process.on("unhandledRejection", (reason) => {
1587
1589
  if (isTransportNoise(reason)) {
1588
1590
  log("swallowed unhandledRejection", reason);
1589
1591
  return;
1590
1592
  }
1591
1593
  log("unhandledRejection", reason);
1592
1594
  });
1593
- process.on("uncaughtException", error => {
1595
+ process.on("uncaughtException", (error) => {
1594
1596
  if (isTransportNoise(error)) {
1595
1597
  log("swallowed uncaughtException", error);
1596
1598
  return;
@@ -1607,10 +1609,10 @@ installTransportErrorGuards();
1607
1609
  // command touches a project. In-repo CLI is `bin/agent-serve.ts`.
1608
1610
  registerAuthoredModuleLoaders()
1609
1611
  .then(() => main(process.argv.slice(2)))
1610
- .then(code => {
1612
+ .then((code) => {
1611
1613
  // Ephemeral run/eval can leave SDK/HTTP handles open; force exit.
1612
1614
  process.exit(code);
1613
- }, error => {
1615
+ }, (error) => {
1614
1616
  process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
1615
1617
  process.exit(1);
1616
1618
  });
@@ -251,8 +251,8 @@ export function splitBitbucketUnifiedDiff(diff) {
251
251
  function encodePath(path) {
252
252
  return path
253
253
  .split("/")
254
- .filter(segment => segment !== "")
255
- .map(segment => encodeURIComponent(segment))
254
+ .filter((segment) => segment !== "")
255
+ .map((segment) => encodeURIComponent(segment))
256
256
  .join("/");
257
257
  }
258
258
  function fallbackUrl(repository) {
@@ -361,14 +361,14 @@ export function createBitbucketPullRequestReadApi(bitbucket, options = {}) {
361
361
  return normalized;
362
362
  }
363
363
  const [headSha, baseSha] = await Promise.all([
364
- expandBitbucketCloudCommitSha(bitbucket, repository, pullRequest.headSha, error => pullRequest.headSha === undefined
364
+ expandBitbucketCloudCommitSha(bitbucket, repository, pullRequest.headSha, (error) => pullRequest.headSha === undefined
365
365
  ? undefined
366
366
  : options.onDiagnostic?.({
367
367
  kind: "commit-expansion-failed",
368
368
  sha: pullRequest.headSha,
369
369
  error,
370
370
  })),
371
- expandBitbucketCloudCommitSha(bitbucket, repository, pullRequest.baseSha, error => pullRequest.baseSha === undefined
371
+ expandBitbucketCloudCommitSha(bitbucket, repository, pullRequest.baseSha, (error) => pullRequest.baseSha === undefined
372
372
  ? undefined
373
373
  : options.onDiagnostic?.({
374
374
  kind: "commit-expansion-failed",
@@ -455,7 +455,7 @@ export function cloudBitbucketApi(client, repository) {
455
455
  raw,
456
456
  };
457
457
  },
458
- getPullRequestDiff: id => client.request({
458
+ getPullRequestDiff: (id) => client.request({
459
459
  method: "GET",
460
460
  path: `${repo}/pullrequests/${id}/diff`,
461
461
  accept: "text/plain",
@@ -506,7 +506,7 @@ export function cloudBitbucketApi(client, repository) {
506
506
  });
507
507
  return mapComment(raw);
508
508
  },
509
- setBuildStatus: input => client.request({
509
+ setBuildStatus: (input) => client.request({
510
510
  method: "POST",
511
511
  path: `${repo}/commit/${encodeURIComponent(input.sha)}/statuses/build`,
512
512
  body: {
@@ -565,7 +565,7 @@ export function dcBitbucketApi(client, repository) {
565
565
  },
566
566
  // `/pull-requests/{id}.diff` streams the raw unified diff; the sibling
567
567
  // `/pull-requests/{id}/diff` route returns a JSON `RestDiff` instead.
568
- getPullRequestDiff: id => client.request({
568
+ getPullRequestDiff: (id) => client.request({
569
569
  method: "GET",
570
570
  path: `${repo}/pull-requests/${id}.diff`,
571
571
  accept: "text/plain",
@@ -621,7 +621,7 @@ export function dcBitbucketApi(client, repository) {
621
621
  // Repository-scoped build status (DC 7.14+), which lives under
622
622
  // `rest/api/1.0` so the proxy's single upstream base reaches it; the
623
623
  // older `rest/build-status/1.0/commits/{sha}` sits outside that base.
624
- setBuildStatus: input => client.request({
624
+ setBuildStatus: (input) => client.request({
625
625
  method: "POST",
626
626
  path: `${repo}/commits/${encodeURIComponent(input.sha)}/builds`,
627
627
  body: {
@@ -45,9 +45,9 @@ export function buildBitbucketBinding(input) {
45
45
  get api() {
46
46
  return getApi();
47
47
  },
48
- request: request => getClient().request(request),
49
- setBuildStatus: status => getApi().setBuildStatus(status),
50
- createCheck: check => createBitbucketCheck({ ...check, bitbucket: getApi() }),
48
+ request: (request) => getClient().request(request),
49
+ setBuildStatus: (status) => getApi().setBuildStatus(status),
50
+ createCheck: (check) => createBitbucketCheck({ ...check, bitbucket: getApi() }),
51
51
  };
52
52
  }
53
53
  export function asRecord(value) {
@@ -280,7 +280,7 @@ export function bitbucketPushFromPayload(payload) {
280
280
  return undefined;
281
281
  }
282
282
  return {
283
- changes: changes.flatMap(entry => {
283
+ changes: changes.flatMap((entry) => {
284
284
  const change = asRecord(entry);
285
285
  if (change === undefined) {
286
286
  return [];
@@ -160,7 +160,7 @@ export function findBitbucketChannelTargets(mounts) {
160
160
  if (meta?.kind !== BITBUCKET_CHANNEL_KIND) {
161
161
  continue;
162
162
  }
163
- const postRoute = (channel.definition.routes ?? []).find(route => route.method === "POST");
163
+ const postRoute = (channel.definition.routes ?? []).find((route) => route.method === "POST");
164
164
  targets.push({
165
165
  slug,
166
166
  channelId: channel.id,
@@ -134,7 +134,7 @@ function configuredRepoAllowlist(options) {
134
134
  repos.push(...options.cursorAccount.repos);
135
135
  }
136
136
  const normalized = repos
137
- .map(repo => repo
137
+ .map((repo) => repo
138
138
  .trim()
139
139
  .replace(/^\/+|\/+$/g, "")
140
140
  .toLowerCase())
@@ -85,6 +85,6 @@ export function resumeBitbucketCheck(input) {
85
85
  */
86
86
  export function bindBitbucketChecks(input) {
87
87
  return {
88
- createCheck: check => createBitbucketCheck({ ...check, bitbucket: input.bitbucket }),
88
+ createCheck: (check) => createBitbucketCheck({ ...check, bitbucket: input.bitbucket }),
89
89
  };
90
90
  }
@@ -16,7 +16,7 @@ const runtimeByDefinition = new WeakMap();
16
16
  export function parseCursorBitbucketRepoScope(values) {
17
17
  const repos = [
18
18
  ...new Set(values
19
- .map(repo => repo
19
+ .map((repo) => repo
20
20
  .trim()
21
21
  .replace(/^\/+|\/+$/g, "")
22
22
  .toLowerCase())
@@ -46,7 +46,7 @@ const HOOK_EVENTS = [
46
46
  export function deriveBitbucketWebhookEvents(options) {
47
47
  if (options.webhookEvents !== undefined) {
48
48
  return [
49
- ...new Set(options.webhookEvents.map(event => normalizeBitbucketEventKey(event)).filter(Boolean)),
49
+ ...new Set(options.webhookEvents.map((event) => normalizeBitbucketEventKey(event)).filter(Boolean)),
50
50
  ];
51
51
  }
52
52
  const events = ["pullrequest:created", "pullrequest:updated"];
@@ -22,7 +22,7 @@ const checkpointResourceSchema = z
22
22
  .optional(),
23
23
  })
24
24
  .passthrough()
25
- .refine(checkpoint => [checkpoint.clear, checkpoint.issues, checkpoint.inconclusive, checkpoint.deferred].filter(arm => arm !== undefined).length === 1, { message: "checkpoint must have exactly one result arm" });
25
+ .refine((checkpoint) => [checkpoint.clear, checkpoint.issues, checkpoint.inconclusive, checkpoint.deferred].filter((arm) => arm !== undefined).length === 1, { message: "checkpoint must have exactly one result arm" });
26
26
  const checkpointCreatedEventSchema = z.object({
27
27
  eventId: z.string().min(1),
28
28
  eventType: z.literal(CHECKPOINT_CREATED_EVENT_TYPE),
@@ -61,11 +61,11 @@ export function resumeCiCheck(writer, ref) {
61
61
  get url() {
62
62
  return url;
63
63
  },
64
- update: update => write({
64
+ update: (update) => write({
65
65
  ...update,
66
66
  completedAt: update.status === "completed" ? new Date().toISOString() : undefined,
67
67
  }),
68
- conclude: conclude => write({
68
+ conclude: (conclude) => write({
69
69
  status: "completed",
70
70
  conclusion: conclude.conclusion,
71
71
  completedAt: new Date().toISOString(),
@@ -94,7 +94,7 @@ export function deploymentEventMatchesChannel(options, event) {
94
94
  if (subscriptions.length === 0) {
95
95
  return true;
96
96
  }
97
- return subscriptions.some(subscription => subscription.deploySourceUri === event.deploySourceUri.toLowerCase() &&
97
+ return subscriptions.some((subscription) => subscription.deploySourceUri === event.deploySourceUri.toLowerCase() &&
98
98
  deploymentEventMatches(subscription, event));
99
99
  }
100
100
  /**
@@ -55,14 +55,14 @@ export function githubRepoFromOctokitRequest(request) {
55
55
  * github-proxy fills `x-cursor-github-repos` per Octokit call.
56
56
  */
57
57
  export function resolveCursorGithubCredentialScope(values, permissions = "pr-write") {
58
- const repos = [...new Set(values.map(repo => repo.trim().toLowerCase()).filter(Boolean))];
58
+ const repos = [...new Set(values.map((repo) => repo.trim().toLowerCase()).filter(Boolean))];
59
59
  if (repos.length === 0) {
60
60
  return undefined;
61
61
  }
62
62
  return parseCursorGithubRepoScope(repos, permissions);
63
63
  }
64
64
  export function parseCursorGithubRepoScope(values, permissions = "pr-write") {
65
- const repos = [...new Set(values.map(repo => repo.trim().toLowerCase()).filter(Boolean))];
65
+ const repos = [...new Set(values.map((repo) => repo.trim().toLowerCase()).filter(Boolean))];
66
66
  if (repos.length === 0) {
67
67
  throw new Error("Cursor account GitHub credentials require at least one repository.");
68
68
  }
@@ -78,7 +78,7 @@ export function parseCursorGithubRepoScope(values, permissions = "pr-write") {
78
78
  if (owner === undefined) {
79
79
  throw new Error("Cursor account GitHub repository owner is missing.");
80
80
  }
81
- if (repos.some(repo => repo.split("/", 1)[0] !== owner)) {
81
+ if (repos.some((repo) => repo.split("/", 1)[0] !== owner)) {
82
82
  throw new Error("Cursor account GitHub repositories must share one owner for a single installation token.");
83
83
  }
84
84
  return {
@@ -11,8 +11,8 @@ import { applyGitHubProgress } from "./progress.js";
11
11
  export function buildDefaultGitHubEvents(options = {}) {
12
12
  const deliverReplies = options.deliverReplies !== false;
13
13
  const requiredSuccessfulTools = new Set(options.progress?.requireSuccessfulTools
14
- ?.map(toolName => toolName.trim())
15
- .filter(toolName => toolName !== "") ?? []);
14
+ ?.map((toolName) => toolName.trim())
15
+ .filter((toolName) => toolName !== "") ?? []);
16
16
  const toolOutcomesBySession = new Map();
17
17
  return {
18
18
  async "turn.started"(event, channel) {
@@ -54,7 +54,7 @@ export function buildDefaultGitHubEvents(options = {}) {
54
54
  async "turn.completed"(event, channel) {
55
55
  const outcomes = toolOutcomesBySession.get(event.sessionId);
56
56
  const pipelineSucceeded = requiredSuccessfulTools.size === 0 ||
57
- [...requiredSuccessfulTools].every(toolName => outcomes?.get(toolName) === true);
57
+ [...requiredSuccessfulTools].every((toolName) => outcomes?.get(toolName) === true);
58
58
  toolOutcomesBySession.delete(event.sessionId);
59
59
  await applyGitHubProgress({
60
60
  phase: pipelineSucceeded ? "success" : "failure",
@@ -52,5 +52,5 @@ export function deriveGitHubWebhookEvents(options) {
52
52
  return dedupe(events);
53
53
  }
54
54
  function dedupe(events) {
55
- return [...new Set(events.map(event => event.trim()).filter(Boolean))];
55
+ return [...new Set(events.map((event) => event.trim()).filter(Boolean))];
56
56
  }
@@ -44,7 +44,7 @@ export function findGitHubChannelTargets(mounts) {
44
44
  if (meta?.kind !== GITHUB_CHANNEL_KIND) {
45
45
  continue;
46
46
  }
47
- const postRoute = (channel.definition.routes ?? []).find(route => route.method === "POST");
47
+ const postRoute = (channel.definition.routes ?? []).find((route) => route.method === "POST");
48
48
  targets.push({
49
49
  slug,
50
50
  channelId: channel.id,
@@ -70,10 +70,10 @@ export function channelForwardUrl(input) {
70
70
  export function resolveGitHubForwardTargets(input) {
71
71
  let candidates = [...input.targets];
72
72
  if (input.slug !== undefined) {
73
- candidates = candidates.filter(t => t.slug === input.slug);
73
+ candidates = candidates.filter((t) => t.slug === input.slug);
74
74
  }
75
75
  if (input.channel !== undefined) {
76
- candidates = candidates.filter(t => t.channelId === input.channel);
76
+ candidates = candidates.filter((t) => t.channelId === input.channel);
77
77
  }
78
78
  const overrideEvents = input.events === undefined ? undefined : dedupeEvents(input.events);
79
79
  if (input.url !== undefined) {
@@ -116,7 +116,7 @@ export function resolveGitHubForwardTargets(input) {
116
116
  };
117
117
  }
118
118
  const resolved = candidates
119
- .map(target => ({
119
+ .map((target) => ({
120
120
  slug: target.slug,
121
121
  channelId: target.channelId,
122
122
  url: channelForwardUrl({
@@ -128,7 +128,7 @@ export function resolveGitHubForwardTargets(input) {
128
128
  }),
129
129
  events: overrideEvents ?? target.events,
130
130
  }))
131
- .filter(target => target.events.length > 0);
131
+ .filter((target) => target.events.length > 0);
132
132
  if (resolved.length === 0) {
133
133
  return {
134
134
  ok: false,
@@ -139,7 +139,7 @@ export function resolveGitHubForwardTargets(input) {
139
139
  }
140
140
  /** Union of the webhook events across every forward target (deduped). */
141
141
  export function unionForwardEvents(targets) {
142
- return dedupeEvents(targets.flatMap(target => target.events));
142
+ return dedupeEvents(targets.flatMap((target) => target.events));
143
143
  }
144
144
  /**
145
145
  * Build the argv for `gh <argv>` that runs `gh webhook forward` with the
@@ -254,10 +254,10 @@ export function targetLabel(target) {
254
254
  return target.slug === "" ? target.channelId : `${target.slug}/${target.channelId}`;
255
255
  }
256
256
  function dedupeEvents(events) {
257
- return [...new Set(events.map(event => event.trim()).filter(Boolean))];
257
+ return [...new Set(events.map((event) => event.trim()).filter(Boolean))];
258
258
  }
259
259
  function describeTargets(targets) {
260
260
  return targets
261
- .map(t => ` - ${targetLabel(t)} (events: ${t.events.join(", ") || "none"})`)
261
+ .map((t) => ` - ${targetLabel(t)} (events: ${t.events.join(", ") || "none"})`)
262
262
  .join("\n");
263
263
  }
@@ -1869,7 +1869,7 @@ function parseStatusEvent(args) {
1869
1869
  ...(payload.target_url === undefined ? {} : { targetUrl: payload.target_url }),
1870
1870
  sha: payload.sha,
1871
1871
  ...(payload.name === undefined ? {} : { name: payload.name }),
1872
- branches: (payload.branches ?? []).map(branch => ({
1872
+ branches: (payload.branches ?? []).map((branch) => ({
1873
1873
  name: branch.name,
1874
1874
  ...(branch.commit === undefined ? {} : { commit: branch.commit }),
1875
1875
  })),
@@ -1985,7 +1985,7 @@ function toUser(raw) {
1985
1985
  };
1986
1986
  }
1987
1987
  function toCiPullRequests(raw) {
1988
- return (raw ?? []).map(pr => ({
1988
+ return (raw ?? []).map((pr) => ({
1989
1989
  number: pr.number,
1990
1990
  ...(pr.html_url !== undefined
1991
1991
  ? { url: pr.html_url }
@@ -34,12 +34,12 @@ export function buildGitLabBinding(input) {
34
34
  };
35
35
  return {
36
36
  project: input.project,
37
- request: request => getClient().request(request),
38
- setCommitStatus: status => setGitLabCommitStatus(getClient(), {
37
+ request: (request) => getClient().request(request),
38
+ setCommitStatus: (status) => setGitLabCommitStatus(getClient(), {
39
39
  ...status,
40
40
  project: input.project.pathWithNamespace,
41
41
  }),
42
- createCheck: check => createGitLabCheck({
42
+ createCheck: (check) => createGitLabCheck({
43
43
  ...check,
44
44
  gitlab: getClient(),
45
45
  project: input.project.pathWithNamespace,
@@ -125,7 +125,7 @@ export function gitlabMergeRequestFromRecord(project, record) {
125
125
  }
126
126
  const labels = Array.isArray(record.labels)
127
127
  ? record.labels
128
- .map(label => asNonEmptyString(asRecord(label)?.title))
128
+ .map((label) => asNonEmptyString(asRecord(label)?.title))
129
129
  .filter((title) => title !== undefined)
130
130
  : undefined;
131
131
  const description = record.description === null
@@ -112,7 +112,7 @@ export function resumeGitLabCheck(input) {
112
112
  */
113
113
  export function bindGitLabChecks(input) {
114
114
  return {
115
- createCheck: check => createGitLabCheck({
115
+ createCheck: (check) => createGitLabCheck({
116
116
  ...check,
117
117
  gitlab: input.gitlab,
118
118
  project: input.project,
@@ -15,7 +15,7 @@ const runtimeByDefinition = new WeakMap();
15
15
  export function parseCursorGitLabProjectScope(values) {
16
16
  const projects = [
17
17
  ...new Set(values
18
- .map(project => project
18
+ .map((project) => project
19
19
  .trim()
20
20
  .replace(/^\/+|\/+$/g, "")
21
21
  .toLowerCase())
@@ -14,7 +14,7 @@ const HOOK_EVENTS = [
14
14
  ];
15
15
  export function deriveGitLabWebhookEvents(options) {
16
16
  if (options.webhookEvents !== undefined) {
17
- return [...new Set(options.webhookEvents.map(event => event.trim()).filter(Boolean))];
17
+ return [...new Set(options.webhookEvents.map((event) => event.trim()).filter(Boolean))];
18
18
  }
19
19
  const events = ["merge_request"];
20
20
  for (const [hook, objectKind] of HOOK_EVENTS) {
@@ -160,7 +160,7 @@ export function findGitLabChannelTargets(mounts) {
160
160
  if (meta?.kind !== GITLAB_CHANNEL_KIND) {
161
161
  continue;
162
162
  }
163
- const postRoute = (channel.definition.routes ?? []).find(route => route.method === "POST");
163
+ const postRoute = (channel.definition.routes ?? []).find((route) => route.method === "POST");
164
164
  targets.push({
165
165
  slug,
166
166
  channelId: channel.id,
@@ -80,7 +80,7 @@ function configuredProjectAllowlist(options) {
80
80
  projects.push(...options.cursorAccount.projects);
81
81
  }
82
82
  const normalized = projects
83
- .map(project => project
83
+ .map((project) => project
84
84
  .trim()
85
85
  .replace(/^\/+|\/+$/g, "")
86
86
  .toLowerCase())
@@ -84,7 +84,7 @@ function mergeRequestAttributes(input) {
84
84
  author_id: mergeRequest.author?.id,
85
85
  url: mergeRequest.web_url,
86
86
  last_commit: { id: headSha },
87
- labels: (mergeRequest.labels ?? []).map(title => ({ title })),
87
+ labels: (mergeRequest.labels ?? []).map((title) => ({ title })),
88
88
  ...(action === undefined ? {} : { action }),
89
89
  ...extra,
90
90
  };
@@ -123,7 +123,7 @@ export function synthesizeGitLabEvent(input) {
123
123
  action,
124
124
  extra,
125
125
  }),
126
- labels: (mergeRequest.labels ?? []).map(title => ({ title })),
126
+ labels: (mergeRequest.labels ?? []).map((title) => ({ title })),
127
127
  },
128
128
  };
129
129
  }
@@ -43,14 +43,14 @@ export function buildOriginBinding(input) {
43
43
  return {
44
44
  installationId: input.app?.installationId ?? input.installationId,
45
45
  repository: input.repository,
46
- request: request => getRestClient().request(request),
47
- createCheck: check => createOriginCheck({
46
+ request: (request) => getRestClient().request(request),
47
+ createCheck: (check) => createOriginCheck({
48
48
  ...check,
49
49
  executionId: check.executionId ?? input.executionId,
50
50
  origin: getRestClient(),
51
51
  owner: input.repository.owner,
52
52
  repo: input.repository.name,
53
53
  }),
54
- reactToComment: reaction => setOriginCommentReaction({ ...reaction, origin: getRpcClient() }),
54
+ reactToComment: (reaction) => setOriginCommentReaction({ ...reaction, origin: getRpcClient() }),
55
55
  };
56
56
  }
@@ -137,7 +137,7 @@ export function resumeOriginCheck(input) {
137
137
  */
138
138
  export function bindOriginChecks(input) {
139
139
  return {
140
- createCheck: check => createOriginCheck({
140
+ createCheck: (check) => createOriginCheck({
141
141
  ...check,
142
142
  origin: input.origin,
143
143
  owner: input.owner,
@@ -13,7 +13,7 @@ export const CURSOR_ORIGIN_MAX_REPOS = 20;
13
13
  const CURSOR_ORIGIN_REPO_PATTERN = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/;
14
14
  const runtimeByDefinition = new WeakMap();
15
15
  export function parseCursorOriginRepoScope(values) {
16
- const repos = [...new Set(values.map(repo => repo.trim().toLowerCase()).filter(Boolean))];
16
+ const repos = [...new Set(values.map((repo) => repo.trim().toLowerCase()).filter(Boolean))];
17
17
  if (repos.length === 0) {
18
18
  throw new Error("originChannel({ cursorAccount }) requires at least one repository.");
19
19
  }
@@ -12,7 +12,7 @@ const COMMENT_EVENTS = ["pull_request.comment.created"];
12
12
  const REVIEW_EVENTS = ["pull_request.review.submitted"];
13
13
  export function deriveOriginWebhookEvents(options) {
14
14
  if (options.webhookEvents !== undefined) {
15
- return [...new Set(options.webhookEvents.map(event => event.trim()).filter(Boolean))];
15
+ return [...new Set(options.webhookEvents.map((event) => event.trim()).filter(Boolean))];
16
16
  }
17
17
  const events = [...BASE_WEBHOOK_EVENTS];
18
18
  if (options.onComment !== undefined) {
@@ -84,7 +84,7 @@ function asIdList(value) {
84
84
  if (value === undefined)
85
85
  return [];
86
86
  const items = typeof value === "string" ? [value] : [...value];
87
- return [...new Set(items.map(id => id.trim()).filter(Boolean))];
87
+ return [...new Set(items.map((id) => id.trim()).filter(Boolean))];
88
88
  }
89
89
  /** `AGENT_SERVE_ORIGIN_APP_ID` fallback for {@link OriginChannelOptions.appId}. */
90
90
  export function envOriginAppId() {