@cursor/bdk 0.2.11 → 0.2.13

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 (457) 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/github/index.d.ts +22 -12
  18. package/dist/channels/github/index.d.ts.map +1 -1
  19. package/dist/channels/github/index.js +11 -12
  20. package/dist/channels/gitlab/binding.js +4 -4
  21. package/dist/channels/gitlab/checks.js +1 -1
  22. package/dist/channels/gitlab/cursor-account.js +1 -1
  23. package/dist/channels/gitlab/events.js +1 -1
  24. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  25. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  26. package/dist/channels/gitlab/replay.js +2 -2
  27. package/dist/channels/origin/binding.js +3 -3
  28. package/dist/channels/origin/checks.js +1 -1
  29. package/dist/channels/origin/cursor-account.js +1 -1
  30. package/dist/channels/origin/events.js +1 -1
  31. package/dist/channels/origin/index.d.ts +21 -11
  32. package/dist/channels/origin/index.d.ts.map +1 -1
  33. package/dist/channels/origin/index.js +10 -11
  34. package/dist/channels/origin/origin-channel.js +1 -1
  35. package/dist/channels/origin/origin-webhook.js +2 -2
  36. package/dist/channels/slack/agentic-delivery.js +3 -3
  37. package/dist/channels/slack/agentic-signals.js +1 -1
  38. package/dist/channels/slack/api.js +5 -5
  39. package/dist/channels/slack/approvals.js +1 -1
  40. package/dist/channels/slack/attachments.js +3 -3
  41. package/dist/channels/slack/blocks.js +3 -3
  42. package/dist/channels/slack/bot-mentions.js +4 -4
  43. package/dist/channels/slack/channel-watch.js +4 -4
  44. package/dist/channels/slack/cli-project.js +3 -3
  45. package/dist/channels/slack/dispatch.js +1 -1
  46. package/dist/channels/slack/doctor.js +1 -1
  47. package/dist/channels/slack/eval-directive.js +1 -1
  48. package/dist/channels/slack/footer.js +1 -1
  49. package/dist/channels/slack/interactive.js +2 -2
  50. package/dist/channels/slack/log.d.ts.map +1 -1
  51. package/dist/channels/slack/log.js +1 -1
  52. package/dist/channels/slack/manifest.js +1 -1
  53. package/dist/channels/slack/nudge-carrier.js +1 -1
  54. package/dist/channels/slack/nudge-store.js +2 -2
  55. package/dist/channels/slack/recording-sink.js +6 -6
  56. package/dist/channels/slack/reply-options.js +6 -6
  57. package/dist/channels/slack/self-identity.d.ts +7 -4
  58. package/dist/channels/slack/self-identity.d.ts.map +1 -1
  59. package/dist/channels/slack/self-identity.js +17 -8
  60. package/dist/channels/slack/sender-name.d.ts.map +1 -1
  61. package/dist/channels/slack/sender-name.js +2 -6
  62. package/dist/channels/slack/setup.d.ts.map +1 -1
  63. package/dist/channels/slack/setup.js +1 -1
  64. package/dist/channels/slack/slack-channel.js +2 -2
  65. package/dist/channels/slack/socket-mode.js +2 -2
  66. package/dist/channels/slack/thread-context.js +8 -8
  67. package/dist/channels/slack/tool-cards.js +1 -1
  68. package/dist/channels/slack/user-info.d.ts +2 -1
  69. package/dist/channels/slack/user-info.d.ts.map +1 -1
  70. package/dist/channels/slack/user-info.js +16 -1
  71. package/dist/channels.js +1 -1
  72. package/dist/docs/404.html +3 -3
  73. package/dist/docs/assets/{app.DXI7bwox.js → app.CaLG1pPt.js} +4 -4
  74. package/dist/docs/assets/chunks/@localSearchIndexroot.DvlKuIO-.js +1 -0
  75. package/dist/docs/assets/chunks/{VPLocalSearchBox.BrbO5mEe.js → VPLocalSearchBox.YsP_2wqD.js} +2 -2
  76. package/dist/docs/assets/chunks/{arc.BOG1yms8.js → arc.C2j9hR7c.js} +1 -1
  77. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C0hsMZnZ.js → architectureDiagram-Q4EWVU46.C5qkGp7y.js} +1 -1
  78. package/dist/docs/assets/chunks/{baseUniq.H044KjKs.js → baseUniq.U6GgTHOD.js} +1 -1
  79. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BsRW6GoB.js → blockDiagram-DXYQGD6D.D51mJop2.js} +1 -1
  80. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.B9HV5PFR.js → c4Diagram-AHTNJAMY.w1d6QxV7.js} +1 -1
  81. package/dist/docs/assets/chunks/channel.BRSFxCcD.js +1 -0
  82. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CPoT_ajl.js → chunk-4BX2VUAB.B_A815un.js} +1 -1
  83. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DZBwWuCL.js → chunk-4TB4RGXK.DMrm-ZCb.js} +1 -1
  84. package/dist/docs/assets/chunks/{chunk-55IACEB6.CZ3yTiyq.js → chunk-55IACEB6.8qw6Xdal.js} +1 -1
  85. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.6DfvHSd8.js → chunk-EDXVE4YY.Cq_nHODn.js} +1 -1
  86. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CpBj8HfK.js → chunk-FMBD7UC4.B67ohCYn.js} +1 -1
  87. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BdKo8YqS.js → chunk-OYMX7WX6.Bo8rQI8F.js} +1 -1
  88. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BnXNyxJx.js → chunk-QZHKN3VN.BERUMfE9.js} +1 -1
  89. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Cg1OcF8G.js → chunk-YZCP3GAM.DWG2tXIX.js} +1 -1
  90. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Cmtm6WkN.js +1 -0
  91. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Cmtm6WkN.js +1 -0
  92. package/dist/docs/assets/chunks/clone.JMC96Eo6.js +1 -0
  93. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.1SP8al9c.js → cose-bilkent-S5V4N54A.tezXBs9b.js} +1 -1
  94. package/dist/docs/assets/chunks/{dagre-KV5264BT.DS1L6hJt.js → dagre-KV5264BT.aSbEUwT7.js} +1 -1
  95. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.ChsausbG.js → diagram-5BDNPKRD.vnT6aJ57.js} +1 -1
  96. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.3XsptNWj.js → diagram-G4DWMVQ6.hGYdrDa2.js} +1 -1
  97. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DPA9Dk_P.js → diagram-MMDJMWI5.CmdSUP6L.js} +1 -1
  98. package/dist/docs/assets/chunks/{diagram-TYMM5635.BVswXWrB.js → diagram-TYMM5635.BbAnLEBB.js} +1 -1
  99. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BSak5OSP.js → erDiagram-SMLLAGMA.H40W4HWE.js} +1 -1
  100. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.CQgN4TTz.js → flowDiagram-DWJPFMVM.BFMtUSv-.js} +1 -1
  101. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.GrT0kA4a.js → ganttDiagram-T4ZO3ILL.CbYiu7Dt.js} +1 -1
  102. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CdS7Ucll.js → gitGraphDiagram-UUTBAWPF.Cyc5mzZD.js} +1 -1
  103. package/dist/docs/assets/chunks/{graph.BVqKRmRo.js → graph.BRptDG1H.js} +1 -1
  104. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.C3C9FRto.js → infoDiagram-42DDH7IO.Bz6KCA3a.js} +1 -1
  105. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.2FuAh_Zj.js → ishikawaDiagram-UXIWVN3A.DDJ_7_Fq.js} +1 -1
  106. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CaHMfK4b.js → journeyDiagram-VCZTEJTY.D0t_ltlb.js} +1 -1
  107. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CjhIUwcA.js → kanban-definition-6JOO6SKY.DyyNsMfi.js} +1 -1
  108. package/dist/docs/assets/chunks/{layout.CGU3gfSf.js → layout.Cbxq-Rhp.js} +1 -1
  109. package/dist/docs/assets/chunks/{linear.DaihpW_n.js → linear.DxGYL0MP.js} +1 -1
  110. package/dist/docs/assets/chunks/{min.BS-j8kHQ.js → min.DA5KL8wu.js} +1 -1
  111. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BVJ1Bbnk.js → mindmap-definition-QFDTVHPH.Bc72Utls.js} +1 -1
  112. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Cz1WIv9r.js → pieDiagram-DEJITSTG.BtpHnIB_.js} +1 -1
  113. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DKLFxcjy.js → quadrantDiagram-34T5L4WZ.Cx4oCSRR.js} +1 -1
  114. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.BHegiK7x.js → requirementDiagram-MS252O5E.BC0hXWlW.js} +1 -1
  115. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DYkY6yPc.js → sankeyDiagram-XADWPNL6.Dg8T1SEp.js} +1 -1
  116. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DYQ1QUrI.js → sequenceDiagram-FGHM5R23.CWSdHYAF.js} +1 -1
  117. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.Iru8BsFo.js → stateDiagram-FHFEXIEX.0MVPRI28.js} +1 -1
  118. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.N4Am6sXd.js +1 -0
  119. package/dist/docs/assets/chunks/{theme.DaplWQhQ.js → theme.DO1avLBn.js} +2 -2
  120. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.BwFA8hiX.js → timeline-definition-GMOUNBTQ.BuRinAVi.js} +1 -1
  121. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CZ60W1C_.js → vennDiagram-DHZGUBPP.DXf0PCoJ.js} +1 -1
  122. package/dist/docs/assets/chunks/wardley-RL74JXVD._eATmGtu.js +162 -0
  123. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.B69D2r8-.js → wardleyDiagram-NUSXRM2D.T4ThngYV.js} +1 -1
  124. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CLPZEIU9.js → xychartDiagram-5P7HB3ND.b4pZF3D5.js} +1 -1
  125. package/dist/docs/assets/{reference_connections.md.Bljpve-y.js → reference_connections.md.DLrgAd5f.js} +1 -1
  126. package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.js → reference_hooks.md.B-eGa2km.js} +3 -3
  127. package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.lean.js → reference_hooks.md.B-eGa2km.lean.js} +1 -1
  128. package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.js → reference_sessions.md.CyM7ARz1.js} +1 -1
  129. package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C0guGcH0.js} +3 -3
  130. package/dist/docs/assets/{reference_tools.md.v3SXVSs_.js → reference_tools.md.DzIY9JzY.js} +3 -3
  131. package/dist/docs/assets/{reference_tools.md.v3SXVSs_.lean.js → reference_tools.md.DzIY9JzY.lean.js} +1 -1
  132. package/dist/docs/assets/{style.C130MVnH.css → style.Dwls12uf.css} +1 -1
  133. package/dist/docs/building-with-agents.html +37 -37
  134. package/dist/docs/deployment.html +37 -37
  135. package/dist/docs/evals.html +37 -37
  136. package/dist/docs/guides/agent-to-agent.html +37 -37
  137. package/dist/docs/guides/bitbucket.html +37 -37
  138. package/dist/docs/guides/cloud-agents.html +37 -37
  139. package/dist/docs/guides/convert-automation.html +37 -37
  140. package/dist/docs/guides/github.html +37 -37
  141. package/dist/docs/guides/gitlab.html +37 -37
  142. package/dist/docs/guides/grokbot-agents.html +37 -37
  143. package/dist/docs/guides/hooks.html +37 -37
  144. package/dist/docs/guides/improve.html +37 -37
  145. package/dist/docs/guides/jev.html +37 -37
  146. package/dist/docs/guides/mcp-oauth.html +37 -37
  147. package/dist/docs/guides/migrate.html +37 -37
  148. package/dist/docs/guides/opentelemetry.html +37 -37
  149. package/dist/docs/guides/slack.html +37 -37
  150. package/dist/docs/guides/webhooks.html +37 -37
  151. package/dist/docs/hashmap.json +1 -1
  152. package/dist/docs/hillclimbing.html +37 -37
  153. package/dist/docs/index.html +37 -37
  154. package/dist/docs/llms-full.txt +15 -2
  155. package/dist/docs/quickstart.html +37 -37
  156. package/dist/docs/reference/agent-config.html +37 -37
  157. package/dist/docs/reference/artifacts.html +37 -37
  158. package/dist/docs/reference/channels.html +37 -37
  159. package/dist/docs/reference/cli.html +37 -37
  160. package/dist/docs/reference/connections.html +39 -39
  161. package/dist/docs/reference/connections.md +2 -1
  162. package/dist/docs/reference/evals.html +37 -37
  163. package/dist/docs/reference/extensions.html +37 -37
  164. package/dist/docs/reference/hooks.html +39 -39
  165. package/dist/docs/reference/hooks.md +1 -0
  166. package/dist/docs/reference/http-api.html +37 -37
  167. package/dist/docs/reference/instructions.html +37 -37
  168. package/dist/docs/reference/playground.html +36 -36
  169. package/dist/docs/reference/project-layout.html +37 -37
  170. package/dist/docs/reference/prompt.html +37 -37
  171. package/dist/docs/reference/schedules.html +37 -37
  172. package/dist/docs/reference/sessions.html +37 -37
  173. package/dist/docs/reference/sessions.md +1 -1
  174. package/dist/docs/reference/skills.html +40 -40
  175. package/dist/docs/reference/subagents.html +37 -37
  176. package/dist/docs/reference/tools.html +39 -39
  177. package/dist/docs/reference/tools.md +11 -0
  178. package/dist/docs/templates/agentic-owners.html +37 -37
  179. package/dist/docs/templates/grokbot-agents.html +37 -37
  180. package/dist/docs/templates/security-reviewer.html +37 -37
  181. package/dist/docs/templates/thermo-quality-review.html +37 -37
  182. package/dist/docs/templates/thermo-review.html +37 -37
  183. package/dist/docs/templates/triage.html +37 -37
  184. package/dist/docs/troubleshooting.html +36 -36
  185. package/dist/evals/assertions.d.ts.map +1 -1
  186. package/dist/evals/assertions.js +21 -19
  187. package/dist/evals/expect.js +1 -1
  188. package/dist/evals/judge.js +1 -1
  189. package/dist/evals/reporters.js +8 -8
  190. package/dist/evals/run-facts.js +2 -2
  191. package/dist/evals.js +6 -6
  192. package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -0
  193. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  194. package/dist/extensions/cursor-cloud-agents/extension.js +2 -1
  195. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +16 -0
  196. package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
  197. package/dist/extensions/cursor-cloud-agents/lib/backend.js +44 -3
  198. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  199. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +23 -0
  200. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
  201. package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +32 -0
  202. package/dist/extensions/cursor-cloud-agents/lib/repos.js +2 -2
  203. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  204. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
  205. package/dist/extensions/cursor-cloud-agents/lib/watch.js +1 -1
  206. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  207. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -8
  208. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  209. package/dist/extensions/cursor-grokbot-agents/extension.js +3 -3
  210. package/dist/extensions/cursor-grokbot-agents/lib/agents.js +3 -3
  211. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +3 -3
  212. package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +4 -4
  213. package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
  214. package/dist/extensions/improve/skills/yourself.js +1 -1
  215. package/dist/extensions/jev/extension.js +2 -2
  216. package/dist/extensions/jev/tools/evaluate.js +1 -1
  217. package/dist/extensions/slack-communication/tools/react.js +1 -1
  218. package/dist/files-backends/cursor-hosted.js +8 -8
  219. package/dist/files-backends/local-fs.js +1 -1
  220. package/dist/filesystem.d.ts.map +1 -1
  221. package/dist/filesystem.js +15 -15
  222. package/dist/internal/advertise-tools.d.ts +3 -2
  223. package/dist/internal/advertise-tools.d.ts.map +1 -1
  224. package/dist/internal/advertise-tools.js +11 -9
  225. package/dist/internal/approval-gate.js +1 -1
  226. package/dist/internal/artifacts-store.js +13 -13
  227. package/dist/internal/as-of.js +2 -2
  228. package/dist/internal/authored-alias-hooks.d.ts +4 -3
  229. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  230. package/dist/internal/authored-alias-hooks.js +16 -7
  231. package/dist/internal/authored-loaders.d.ts.map +1 -1
  232. package/dist/internal/authored-loaders.js +21 -5
  233. package/dist/internal/builtin-tools/reminders.js +2 -2
  234. package/dist/internal/chat-client.js +5 -5
  235. package/dist/internal/cli-ax.js +14 -14
  236. package/dist/internal/cli-bitbucket.js +10 -10
  237. package/dist/internal/cli-convert-automation.js +2 -2
  238. package/dist/internal/cli-cursor.js +2 -2
  239. package/dist/internal/cli-deploy.d.ts.map +1 -1
  240. package/dist/internal/cli-deploy.js +40 -40
  241. package/dist/internal/cli-docs.js +5 -5
  242. package/dist/internal/cli-github.js +15 -15
  243. package/dist/internal/cli-gitlab.js +10 -10
  244. package/dist/internal/cli-images.js +16 -16
  245. package/dist/internal/cli-manifest.js +1 -1
  246. package/dist/internal/cli-mcp-oauth.js +5 -5
  247. package/dist/internal/cli-mcp.js +3 -3
  248. package/dist/internal/cli-migrate.js +1 -1
  249. package/dist/internal/cli-skills.js +2 -2
  250. package/dist/internal/cli-slack.js +5 -5
  251. package/dist/internal/cloud-turn-cost.js +1 -1
  252. package/dist/internal/continuation-identity.js +6 -6
  253. package/dist/internal/conversation-mirror.js +5 -5
  254. package/dist/internal/convert-automation/convert-workflow.js +24 -24
  255. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  256. package/dist/internal/cursor/account-mcp.js +20 -20
  257. package/dist/internal/cursor/backend-client.js +6 -6
  258. package/dist/internal/cursor/credentials.js +1 -1
  259. package/dist/internal/cursor/store-api-client.js +1 -1
  260. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  261. package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
  262. package/dist/internal/cursor-deployment-relay.js +9 -9
  263. package/dist/internal/cursor-event-relay.js +10 -10
  264. package/dist/internal/cursor-relay-core.js +2 -2
  265. package/dist/internal/deploy-manifest.d.ts +14 -0
  266. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  267. package/dist/internal/deploy-manifest.js +33 -10
  268. package/dist/internal/discovery/agent-config.js +2 -2
  269. package/dist/internal/discovery/agent.js +6 -6
  270. package/dist/internal/discovery/connections.js +5 -5
  271. package/dist/internal/discovery/cursor-plugin.js +12 -12
  272. package/dist/internal/discovery/extension-overlay.js +3 -3
  273. package/dist/internal/discovery/extensions.js +6 -6
  274. package/dist/internal/discovery/info.js +9 -9
  275. package/dist/internal/discovery/instructions.js +1 -1
  276. package/dist/internal/discovery/project.js +3 -3
  277. package/dist/internal/discovery/services.js +1 -1
  278. package/dist/internal/discovery/tools.js +1 -1
  279. package/dist/internal/docs-site.js +2 -2
  280. package/dist/internal/env-file.js +1 -1
  281. package/dist/internal/eval-run-store.js +7 -7
  282. package/dist/internal/eval-runner.d.ts.map +1 -1
  283. package/dist/internal/eval-runner.js +14 -14
  284. package/dist/internal/eval-transport.js +1 -1
  285. package/dist/internal/evals-client.d.ts.map +1 -1
  286. package/dist/internal/evals-client.js +4 -4
  287. package/dist/internal/event-log.js +8 -8
  288. package/dist/internal/event-mapper.js +13 -13
  289. package/dist/internal/expected-delivery-failure.js +2 -2
  290. package/dist/internal/filesystem/format.js +2 -2
  291. package/dist/internal/filesystem/nearest.js +3 -3
  292. package/dist/internal/filesystem/scratch.js +3 -3
  293. package/dist/internal/filesystem/tools.js +6 -6
  294. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  295. package/dist/internal/filesystem/walk.js +2 -2
  296. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  297. package/dist/internal/framework-file-storage.js +6 -5
  298. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  299. package/dist/internal/framework-storage-selection.js +4 -2
  300. package/dist/internal/github-fanout.d.ts.map +1 -1
  301. package/dist/internal/github-fanout.js +3 -3
  302. package/dist/internal/guest-network.js +4 -4
  303. package/dist/internal/host-files.js +1 -1
  304. package/dist/internal/host-kv.js +2 -2
  305. package/dist/internal/hosted-catch-protocol.js +1 -1
  306. package/dist/internal/hosted-catch.js +1 -1
  307. package/dist/internal/hosted-delivery-protocol.d.ts +24 -0
  308. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  309. package/dist/internal/hosted-delivery-protocol.js +58 -14
  310. package/dist/internal/hosted-delivery.d.ts +6 -0
  311. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  312. package/dist/internal/hosted-delivery.js +64 -13
  313. package/dist/internal/hosted-eval-cases.js +4 -4
  314. package/dist/internal/hosted-execution-diag.js +3 -3
  315. package/dist/internal/hosted-managed-automation.d.ts +3 -3
  316. package/dist/internal/hosted-managed-automation.js +3 -3
  317. package/dist/internal/hosting.js +1 -1
  318. package/dist/internal/http-channel.js +1 -1
  319. package/dist/internal/http-control-plane-session.js +2 -2
  320. package/dist/internal/init-interview.js +7 -7
  321. package/dist/internal/init-project.d.ts.map +1 -1
  322. package/dist/internal/init-project.js +12 -12
  323. package/dist/internal/inline-stdio-mcp.js +2 -2
  324. package/dist/internal/install-cursor-skills.js +11 -11
  325. package/dist/internal/json-schema.js +1 -1
  326. package/dist/internal/local-control-plane.js +3 -3
  327. package/dist/internal/local-env.js +3 -3
  328. package/dist/internal/log-ring.js +1 -1
  329. package/dist/internal/logs-client.js +1 -1
  330. package/dist/internal/mcp-endpoint.js +8 -8
  331. package/dist/internal/mcp-host.d.ts.map +1 -1
  332. package/dist/internal/mcp-host.js +5 -5
  333. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  334. package/dist/internal/mcp-oauth.js +5 -5
  335. package/dist/internal/net.js +2 -2
  336. package/dist/internal/otel/config.js +3 -3
  337. package/dist/internal/otel/runtime.js +13 -13
  338. package/dist/internal/peer-connections.js +2 -2
  339. package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
  340. package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
  341. package/dist/internal/persistent-stage-log-mirror.js +231 -0
  342. package/dist/internal/platform-schedule-sync.js +1 -1
  343. package/dist/internal/platform-timers.js +1 -1
  344. package/dist/internal/playground/static.js +2 -2
  345. package/dist/internal/playground/toolchain.js +2 -2
  346. package/dist/internal/playground-proxy.js +3 -3
  347. package/dist/internal/process-memory-telemetry.js +1 -1
  348. package/dist/internal/reminder-runner.d.ts +1 -1
  349. package/dist/internal/reminder-runner.d.ts.map +1 -1
  350. package/dist/internal/reminder-runner.js +14 -16
  351. package/dist/internal/reminder-store.js +1 -1
  352. package/dist/internal/resolved-connections.js +8 -8
  353. package/dist/internal/router.js +4 -4
  354. package/dist/internal/run-client.js +2 -2
  355. package/dist/internal/schedule-runner.d.ts +13 -2
  356. package/dist/internal/schedule-runner.d.ts.map +1 -1
  357. package/dist/internal/schedule-runner.js +48 -9
  358. package/dist/internal/sdk-runner.d.ts +2 -1
  359. package/dist/internal/sdk-runner.d.ts.map +1 -1
  360. package/dist/internal/sdk-runner.js +13 -8
  361. package/dist/internal/serve-restart.js +1 -1
  362. package/dist/internal/server.d.ts.map +1 -1
  363. package/dist/internal/server.js +101 -76
  364. package/dist/internal/session-cost.js +3 -3
  365. package/dist/internal/session-engine.d.ts +8 -0
  366. package/dist/internal/session-engine.d.ts.map +1 -1
  367. package/dist/internal/session-engine.js +183 -118
  368. package/dist/internal/session-live-publisher.d.ts +48 -0
  369. package/dist/internal/session-live-publisher.d.ts.map +1 -0
  370. package/dist/internal/session-live-publisher.js +415 -0
  371. package/dist/internal/session-run-log.js +6 -6
  372. package/dist/internal/sessions-client.js +3 -3
  373. package/dist/internal/skill-catalog.js +2 -2
  374. package/dist/internal/sleep.js +1 -1
  375. package/dist/internal/start-log-store.d.ts +5 -1
  376. package/dist/internal/start-log-store.d.ts.map +1 -1
  377. package/dist/internal/start-log-store.js +5 -3
  378. package/dist/internal/storage-coordinator.js +12 -12
  379. package/dist/internal/store-api-protocol.d.ts +51 -0
  380. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  381. package/dist/internal/store-api-protocol.js +39 -2
  382. package/dist/internal/store-mirror.js +4 -4
  383. package/dist/internal/stream-progress.d.ts.map +1 -1
  384. package/dist/internal/stream-progress.js +4 -0
  385. package/dist/internal/terminal-style.js +2 -2
  386. package/dist/internal/testing/conversation-identity-vectors.d.ts +48 -0
  387. package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -0
  388. package/dist/internal/testing/conversation-identity-vectors.js +136 -0
  389. package/dist/internal/tool-call-retry.d.ts +87 -0
  390. package/dist/internal/tool-call-retry.d.ts.map +1 -0
  391. package/dist/internal/tool-call-retry.js +387 -0
  392. package/dist/internal/tool-result.js +3 -3
  393. package/dist/internal/trajectory.js +7 -7
  394. package/dist/internal/turn-governor.js +2 -2
  395. package/dist/internal/turn-outbox.js +1 -1
  396. package/dist/internal/update-check.d.ts.map +1 -1
  397. package/dist/internal/update-check.js +4 -2
  398. package/dist/internal/v2-hosting.d.ts +6 -0
  399. package/dist/internal/v2-hosting.d.ts.map +1 -1
  400. package/dist/internal/v2-hosting.js +7 -1
  401. package/dist/internal/workspace.js +4 -4
  402. package/dist/kv/memory-kv.js +3 -3
  403. package/dist/playground/assets/index-CzttDc-d.css +1 -0
  404. package/dist/playground/assets/{index-Be0-1hw2.js → index-DIiKbZ25.js} +42 -42
  405. package/dist/playground/index.html +2 -2
  406. package/dist/prompt.js +1 -1
  407. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  408. package/dist/storage-backends/file-kv.js +7 -7
  409. package/dist/storage-protocol.d.ts +7 -0
  410. package/dist/storage-protocol.d.ts.map +1 -1
  411. package/dist/storage-protocol.js +7 -0
  412. package/dist/storage.js +3 -3
  413. package/dist/types.d.ts +21 -4
  414. package/dist/types.d.ts.map +1 -1
  415. package/dist/types.js +4 -4
  416. package/docs/reference/connections.md +2 -1
  417. package/docs/reference/hooks.md +1 -0
  418. package/docs/reference/sessions.md +1 -1
  419. package/docs/reference/tools.md +11 -0
  420. package/package.json +6 -6
  421. package/templates/agentic-owners/bot/channels/github.ts +2 -2
  422. package/templates/agentic-owners/bot/lib/github.ts +7 -5
  423. package/templates/agentic-owners/bot/lib/owners/decision.ts +9 -9
  424. package/templates/agentic-owners/bot/lib/owners/handles.ts +2 -2
  425. package/templates/agentic-owners/bot/lib/owners/match.ts +5 -3
  426. package/templates/agentic-owners/bot/lib/owners/matching.ts +1 -1
  427. package/templates/agentic-owners/bot/lib/owners/parse.ts +4 -4
  428. package/templates/agentic-owners/bot/lib/owners/prompt.ts +1 -1
  429. package/templates/agentic-owners/bot/lib/review.ts +18 -17
  430. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  431. package/templates/agents-md/bot/lib/collect.ts +6 -6
  432. package/templates/agents-md/bot/lib/config.ts +1 -1
  433. package/templates/agents-md/bot/tools/apply_agents.ts +4 -4
  434. package/templates/code-wiki/bot/channels/github.ts +3 -3
  435. package/templates/code-wiki/bot/lib/repos.ts +1 -1
  436. package/templates/code-wiki/bot/tools/apply_wiki.ts +2 -2
  437. package/templates/demo/bot/lib/collect.ts +1 -1
  438. package/templates/demo/bot/lib/repos.ts +1 -1
  439. package/templates/demo/bot/tools/record_demo.ts +1 -1
  440. package/templates/pr-autofixer/bot/channels/github.ts +2 -2
  441. package/templates/pr-autofixer/bot/lib/merge-watch.ts +2 -2
  442. package/templates/pr-autofixer/bot/lib/repos.ts +2 -2
  443. package/templates/pr-autofixer/bot/lib/webhook-routing.ts +1 -1
  444. package/templates/security-help/bot/lib/repos.ts +1 -1
  445. package/templates/security-reviewer/bot/lib/repos.ts +1 -1
  446. package/templates/triage/bot/lib/actuate.ts +15 -15
  447. package/dist/docs/assets/chunks/@localSearchIndexroot.CtLtpWcx.js +0 -1
  448. package/dist/docs/assets/chunks/channel.CBwrU9rP.js +0 -1
  449. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CbC_mrvB.js +0 -1
  450. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CbC_mrvB.js +0 -1
  451. package/dist/docs/assets/chunks/clone.BTvFyY1a.js +0 -1
  452. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.BYXl4LW6.js +0 -1
  453. package/dist/docs/assets/chunks/wardley-RL74JXVD.iXazD3Z7.js +0 -162
  454. package/dist/playground/assets/index-Clz6uHj9.css +0 -1
  455. /package/dist/docs/assets/{reference_connections.md.Bljpve-y.lean.js → reference_connections.md.DLrgAd5f.lean.js} +0 -0
  456. /package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.lean.js → reference_sessions.md.CyM7ARz1.lean.js} +0 -0
  457. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C0guGcH0.lean.js} +0 -0
@@ -78,7 +78,7 @@ export function convertWorkflow(input) {
78
78
  emitBoilerplateChannel(automation, trigger, kind, channelSlugs, out);
79
79
  }
80
80
  emitMcpConnections(automation, mcpServers, out);
81
- const hasSlackAction = (workflow.actions ?? []).some(action => action.slack !== undefined || action.readSlack !== undefined);
81
+ const hasSlackAction = (workflow.actions ?? []).some((action) => action.slack !== undefined || action.readSlack !== undefined);
82
82
  const hasSlackConnection = hasSlackAction && emitSlackAccountConnection(automation, out);
83
83
  if (workflow.memoryEnabled === true) {
84
84
  out.files.push({
@@ -284,7 +284,7 @@ function emitGithubChannel(automation, workflow, triggers, slugs, out) {
284
284
  const userAllowlist = [];
285
285
  for (const trigger of triggers) {
286
286
  const git = trigger.git;
287
- userAllowlist.push(...(git.userAllowlist ?? []).filter(user => user !== ""));
287
+ userAllowlist.push(...(git.userAllowlist ?? []).filter((user) => user !== ""));
288
288
  for (const [eventKey, events] of Object.entries(GIT_EVENT_WEBHOOKS)) {
289
289
  const event = git[eventKey];
290
290
  if (event === undefined || typeof event !== "object") {
@@ -407,7 +407,7 @@ function emitGithubChannel(automation, workflow, triggers, slugs, out) {
407
407
  }
408
408
  if (label.pullRequests === true || label.issues !== true) {
409
409
  webhookEvents.push("pull_request");
410
- prConditions.push(...labelActions.map(action => `(pr.action === ${JSON.stringify(action)})`));
410
+ prConditions.push(...labelActions.map((action) => `(pr.action === ${JSON.stringify(action)})`));
411
411
  }
412
412
  if (label.issues === true) {
413
413
  webhookEvents.push("issues");
@@ -420,7 +420,7 @@ function emitGithubChannel(automation, workflow, triggers, slugs, out) {
420
420
  }
421
421
  repos.push(...(workflow.gitConfig?.repos ?? []));
422
422
  const uniqueEvents = dedupe(webhookEvents);
423
- const uniqueRepos = dedupe(dedupe(repos.filter(repo => repo !== "")).flatMap(repo => {
423
+ const uniqueRepos = dedupe(dedupe(repos.filter((repo) => repo !== "")).flatMap((repo) => {
424
424
  const normalized = normalizeRepoIdentifier(repo, out);
425
425
  return normalized === undefined ? [] : [normalized];
426
426
  }));
@@ -437,11 +437,11 @@ function emitGithubChannel(automation, workflow, triggers, slugs, out) {
437
437
  const configLines = [];
438
438
  if (uniqueRepos.length > 0) {
439
439
  configLines.push(" cursorAccount: {");
440
- configLines.push(` repos: [${uniqueRepos.map(repo => JSON.stringify(repo)).join(", ")}],`);
440
+ configLines.push(` repos: [${uniqueRepos.map((repo) => JSON.stringify(repo)).join(", ")}],`);
441
441
  configLines.push(" },");
442
442
  }
443
- configLines.push(` webhookEvents: [${uniqueEvents.map(event => JSON.stringify(event)).join(", ")}],`);
444
- const uniqueAllowlist = dedupe(userAllowlist.map(user => user.toLowerCase()));
443
+ configLines.push(` webhookEvents: [${uniqueEvents.map((event) => JSON.stringify(event)).join(", ")}],`);
444
+ const uniqueAllowlist = dedupe(userAllowlist.map((user) => user.toLowerCase()));
445
445
  if (triggers.length > 1 && uniqueAllowlist.length > 0) {
446
446
  out.warnings.push(`user_allowlist applies per trigger in the backend; the export unions every trigger's allowlist across all hooks in ${path} — tighten per hook if the triggers differed.`);
447
447
  }
@@ -488,7 +488,7 @@ function emitGithubChannel(automation, workflow, triggers, slugs, out) {
488
488
  "",
489
489
  `// Exported from Cursor automation "${commentSafe(automation.name)}" git trigger(s).`,
490
490
  "// Original trigger config:",
491
- ...jsonComment(triggers.map(trigger => trigger.git)),
491
+ ...jsonComment(triggers.map((trigger) => trigger.git)),
492
492
  "//",
493
493
  "// The hooks below reproduce the triggers' mechanical filters. Cursor's",
494
494
  "// backend also enforced any bespoke conditions (comment matching, CI",
@@ -532,7 +532,7 @@ function renderGithubHooks(args) {
532
532
  allowlistUsed = true;
533
533
  lines.push(" // The backend gated push on the user allowlist (actor).", " if (", " ctx.senderLogin === undefined ||", " !ALLOWED_USERS.includes(ctx.senderLogin.toLowerCase())", " ) {", " return null;", " }");
534
534
  }
535
- const refs = args.pushBranches.map(branch => JSON.stringify(`refs/heads/${branch}`));
535
+ const refs = args.pushBranches.map((branch) => JSON.stringify(`refs/heads/${branch}`));
536
536
  lines.push(' if (event.eventName === "push") {', " // Branch filter from the original trigger.", " const ref = (event.payload as { ref?: string }).ref;", refs.length === 1
537
537
  ? ` if (ref !== ${refs[0]}) {`
538
538
  : ` if (ref === undefined || ![${refs.join(", ")}].includes(ref)) {`, " return null;", " }", " return { auth: defaultGitHubAuth(ctx) };", " }");
@@ -554,7 +554,7 @@ function renderGithubHooks(args) {
554
554
  if (args.issueActions.length > 0) {
555
555
  const condition = args.issueActions.length === 1
556
556
  ? `issue.action === ${JSON.stringify(args.issueActions[0])}`
557
- : `[${args.issueActions.map(action => JSON.stringify(action)).join(", ")}].includes(issue.action)`;
557
+ : `[${args.issueActions.map((action) => JSON.stringify(action)).join(", ")}].includes(issue.action)`;
558
558
  lines.push(" onIssue: (ctx, issue) => {");
559
559
  if (hasAllowlist) {
560
560
  allowlistUsed = true;
@@ -580,7 +580,7 @@ function renderGithubHooks(args) {
580
580
  ? [
581
581
  "// user_allowlist from the original trigger(s), lowercased — GitHub",
582
582
  "// logins are case-insensitive and the backend compared them that way.",
583
- `const ALLOWED_USERS = [${args.userAllowlist.map(user => JSON.stringify(user)).join(", ")}];`,
583
+ `const ALLOWED_USERS = [${args.userAllowlist.map((user) => JSON.stringify(user)).join(", ")}];`,
584
584
  "",
585
585
  ]
586
586
  : [];
@@ -592,7 +592,7 @@ function repoLabel(eventObject) {
592
592
  ...(Array.isArray(eventObject.repos)
593
593
  ? eventObject.repos.filter((repo) => typeof repo === "string")
594
594
  : []),
595
- ].filter(repo => repo !== ""));
595
+ ].filter((repo) => repo !== ""));
596
596
  return repos.length > 0 ? ` (${repos.join(", ")})` : "";
597
597
  }
598
598
  /**
@@ -623,7 +623,7 @@ function normalizeRepoIdentifier(raw, out) {
623
623
  out.setupSteps.push(`Trigger repo ${JSON.stringify(raw)} is not on GitHub, so its events will NOT reach this agent. Re-deliver them yourself (e.g. a webhook to the deployed agent's /v1/channels/github route) or drop that trigger.`);
624
624
  return undefined;
625
625
  }
626
- const segments = url.pathname.split("/").filter(s => s !== "");
626
+ const segments = url.pathname.split("/").filter((s) => s !== "");
627
627
  if (segments.length < 2) {
628
628
  out.warnings.push(`Repo URL ${JSON.stringify(raw)} has no owner/repo path — excluded from the GitHub channel's cursorAccount repos.`);
629
629
  return undefined;
@@ -643,8 +643,8 @@ function isSlackTrigger(trigger) {
643
643
  function emitSlackChannel(automation, triggers, slugs, out) {
644
644
  const slug = slugs.claim("slack");
645
645
  const path = projectPath(out.projectRoot, `channels/${slug}.ts`);
646
- const watches = triggers.filter(t => t.slackTrigger !== undefined);
647
- const unsupported = triggers.filter(t => t.slackReactionAdded !== undefined ||
646
+ const watches = triggers.filter((t) => t.slackTrigger !== undefined);
647
+ const unsupported = triggers.filter((t) => t.slackReactionAdded !== undefined ||
648
648
  t.slackAnyReactionAdded !== undefined ||
649
649
  t.slackChannelCreated !== undefined);
650
650
  const socketMode = watches.length > 0 || unsupported.length > 0;
@@ -680,17 +680,17 @@ function emitSlackChannel(automation, triggers, slugs, out) {
680
680
  ];
681
681
  let body;
682
682
  if (socketMode) {
683
- const allow = dedupe(watches.flatMap(watch => slackChannelList(watch.slackTrigger)));
684
- const anyThreadReplies = watches.some(watch => watch.slackTrigger.topLevelOnly === false);
683
+ const allow = dedupe(watches.flatMap((watch) => slackChannelList(watch.slackTrigger)));
684
+ const anyThreadReplies = watches.some((watch) => watch.slackTrigger.topLevelOnly === false);
685
685
  // "Authenticated Cursor users" watches require a linked Cursor account
686
686
  // on the owning team, which bots never have — so the backend blocked
687
687
  // bot posts for them, and the sender gate itself has no SDK equivalent.
688
688
  // The SDK has ONE bot-post setting per channel, so mixed watches must
689
689
  // pick a side: keep bots when any watch allowed everyone (alert /
690
690
  // scorebot watches depend on them), and say so loudly.
691
- const blocksUnauthenticated = watches.some(watch => watch.slackTrigger.blockUnauthenticatedSlackUsers === true);
691
+ const blocksUnauthenticated = watches.some((watch) => watch.slackTrigger.blockUnauthenticatedSlackUsers === true);
692
692
  const includeBotPosts = watches.length > 0 &&
693
- watches.some(watch => watch.slackTrigger.blockUnauthenticatedSlackUsers !== true);
693
+ watches.some((watch) => watch.slackTrigger.blockUnauthenticatedSlackUsers !== true);
694
694
  if (blocksUnauthenticated) {
695
695
  out.warnings.push(includeBotPosts
696
696
  ? "Some Slack watches only fired for authenticated Cursor users while others allowed anyone; BDK has one bot-post setting per channel, so the export keeps bot posts ENABLED (the open watches depend on them) and the authenticated-only watches lose both their sender gate and their bot exclusion. Split the channels or add an onChannelPost gate."
@@ -700,7 +700,7 @@ function emitSlackChannel(automation, triggers, slugs, out) {
700
700
  if (allow.length > 0) {
701
701
  engagement.push(" engagement: {");
702
702
  engagement.push(" channelPosts: {");
703
- engagement.push(` allow: [${allow.map(channel => JSON.stringify(channel)).join(", ")}],`);
703
+ engagement.push(` allow: [${allow.map((channel) => JSON.stringify(channel)).join(", ")}],`);
704
704
  if (anyThreadReplies) {
705
705
  engagement.push(' posts: "all",');
706
706
  }
@@ -763,7 +763,7 @@ const BOILERPLATE_KINDS = [
763
763
  },
764
764
  ];
765
765
  function boilerplateKind(trigger) {
766
- return BOILERPLATE_KINDS.find(kind => trigger[kind.key] !== undefined);
766
+ return BOILERPLATE_KINDS.find((kind) => trigger[kind.key] !== undefined);
767
767
  }
768
768
  function emitBoilerplateChannel(automation, trigger, kind, slugs, out) {
769
769
  const slug = slugs.claim(kind.slug);
@@ -876,7 +876,7 @@ function emitMcpConnections(automation, mcpServers, out) {
876
876
  */
877
877
  function emitSlackAccountConnection(automation, out) {
878
878
  const path = projectPath(out.projectRoot, "mcp-connections/slack.ts");
879
- if (out.files.some(file => file.path === path)) {
879
+ if (out.files.some((file) => file.path === path)) {
880
880
  return true;
881
881
  }
882
882
  const lines = [
@@ -893,7 +893,7 @@ function emitSlackAccountConnection(automation, out) {
893
893
  "",
894
894
  ];
895
895
  out.files.push({ path, contents: lines.join("\n") });
896
- if (!out.mcpConnections.some(connection => connection.name === "slack")) {
896
+ if (!out.mcpConnections.some((connection) => connection.name === "slack")) {
897
897
  out.mcpConnections.push({ name: "slack", kind: "cursorAccount" });
898
898
  }
899
899
  return true;
@@ -981,7 +981,7 @@ function jsonComment(value) {
981
981
  .replace(/\u2028/g, "\\u2028")
982
982
  .replace(/\u2029/g, "\\u2029")
983
983
  .split("\n")
984
- .map(line => `// ${line}`);
984
+ .map((line) => `// ${line}`);
985
985
  }
986
986
  function dedupe(values) {
987
987
  return [...new Set(values)];
@@ -1 +1 @@
1
- {"version":3,"file":"account-mcp.d.ts","sourceRoot":"","sources":["../../../src/internal/cursor/account-mcp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAsB,MAAM,gBAAgB,CAAC;AAQnF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAIL,KAAK,eAAe,EAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAU7B,0EAA0E;AAC1E,eAAO,MAAM,gCAAgC,8CAA8C,CAAC;AAC5F,2EAA2E;AAC3E,eAAO,MAAM,oCAAoC,yDACO,CAAC;AAMzD,MAAM,WAAW,0BAA0B;IACzC,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,GACrD,GAAG,CAAC,MAAM,EAAE,0BAA0B,EAAE,CAAC,CAuB3C;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,0BAA0B,EAAE,CAAC;IACnC,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,wB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AO,CAAC,MAAM,GAAG,SAAS,CAAC,CAwB7B"}
@@ -79,7 +79,7 @@ export function resolveCursorAccountConnections(args) {
79
79
  const serverBase = trimTrailingSlash(args.serverUrl);
80
80
  const publicBase = args.publicUrl === undefined ? undefined : trimTrailingSlash(args.publicUrl);
81
81
  const headers = { authorization: `Bearer ${args.bridgeSecret}` };
82
- return args.refs.map(ref => ({
82
+ return args.refs.map((ref) => ({
83
83
  name: ref.name,
84
84
  localUrl: `${serverBase}${args.basePath}${cursorAccountMcpPath(ref.name)}`,
85
85
  ...(publicBase === undefined
@@ -148,7 +148,7 @@ export class CursorAccountMcpBridge {
148
148
  async probeAuthUrl(ref) {
149
149
  const identifiers = ref.servers !== undefined && ref.servers.length > 0
150
150
  ? [...ref.servers]
151
- : (await this.client.getAvailableMcpServers()).map(server => server.serverIdentifier ?? server.name);
151
+ : (await this.client.getAvailableMcpServers()).map((server) => server.serverIdentifier ?? server.name);
152
152
  const urls = await probeConnectorAuthUrls({
153
153
  client: this.client,
154
154
  identifiers,
@@ -161,22 +161,22 @@ export class CursorAccountMcpBridge {
161
161
  return undefined;
162
162
  }
163
163
  logPreflight(refs) {
164
- return Promise.all(refs.map(ref => this.runPreflight(ref))).then(() => undefined);
164
+ return Promise.all(refs.map((ref) => this.runPreflight(ref))).then(() => undefined);
165
165
  }
166
166
  async runPreflight(ref) {
167
167
  try {
168
168
  const catalog = await this.getCatalog(ref);
169
169
  const errorDetails = new Map();
170
170
  const needsAuthNames = catalog.servers
171
- .filter(server => server.status === "needsAuth")
172
- .map(server => server.serverIdentifier);
171
+ .filter((server) => server.status === "needsAuth")
172
+ .map((server) => server.serverIdentifier);
173
173
  const [authUrls] = await Promise.all([
174
174
  probeConnectorAuthUrls({
175
175
  client: this.client,
176
176
  identifiers: needsAuthNames,
177
177
  }),
178
178
  Promise.all(catalog.servers
179
- .filter(server => server.status === "error")
179
+ .filter((server) => server.status === "error")
180
180
  .map(async (server) => {
181
181
  const detail = await diagnoseConnectorError(this.client, server.serverIdentifier);
182
182
  if (detail !== undefined) {
@@ -184,11 +184,11 @@ export class CursorAccountMcpBridge {
184
184
  }
185
185
  })),
186
186
  ]);
187
- const unhealthy = catalog.servers.some(server => server.status === "needsAuth" || server.status === "error");
187
+ const unhealthy = catalog.servers.some((server) => server.status === "needsAuth" || server.status === "error");
188
188
  if (catalog.servers.length === 0 || unhealthy) {
189
189
  this.logger(formatCursorAccountMcpWarningBox({
190
190
  connectionName: ref.name,
191
- servers: catalog.servers.map(server => ({
191
+ servers: catalog.servers.map((server) => ({
192
192
  serverIdentifier: server.serverIdentifier,
193
193
  status: server.status,
194
194
  toolCount: server.tools.length,
@@ -200,7 +200,7 @@ export class CursorAccountMcpBridge {
200
200
  return;
201
201
  }
202
202
  const summary = catalog.servers
203
- .map(server => formatServerStatusSummary(server, errorDetails.get(server.serverIdentifier)))
203
+ .map((server) => formatServerStatusSummary(server, errorDetails.get(server.serverIdentifier)))
204
204
  .join(", ");
205
205
  this.logger(`${LOG_PREFIX} Cursor account MCP connection "${ref.name}": ${summary}`);
206
206
  }
@@ -216,7 +216,7 @@ export class CursorAccountMcpBridge {
216
216
  server.setRequestHandler(ListToolsRequestSchema, async () => {
217
217
  const catalog = await this.getCatalog(ref);
218
218
  return {
219
- tools: catalog.tools.map(tool => ({
219
+ tools: catalog.tools.map((tool) => ({
220
220
  name: tool.exposedName,
221
221
  description: tool.description,
222
222
  inputSchema: tool.inputSchema,
@@ -231,17 +231,17 @@ export class CursorAccountMcpBridge {
231
231
  const tool = await this.findTool(ref, request.params.name);
232
232
  if (tool === undefined) {
233
233
  const catalog = await this.getCatalog(ref);
234
- const unhealthy = catalog.servers.filter(server => server.status !== "connected");
234
+ const unhealthy = catalog.servers.filter((server) => server.status !== "connected");
235
235
  const statusHint = unhealthy.length === 0
236
236
  ? ""
237
237
  : ` Unhealthy connectors: ${unhealthy
238
- .map(server => `${server.serverIdentifier}=${server.status}`)
238
+ .map((server) => `${server.serverIdentifier}=${server.status}`)
239
239
  .join(", ")}.`;
240
240
  return {
241
241
  content: [
242
242
  {
243
243
  type: "text",
244
- text: `Unknown tool "${request.params.name}". Available: ${catalog.tools.map(t => t.exposedName).join(", ") || "(none)"}.${statusHint}`,
244
+ text: `Unknown tool "${request.params.name}". Available: ${catalog.tools.map((t) => t.exposedName).join(", ") || "(none)"}.${statusHint}`,
245
245
  },
246
246
  ],
247
247
  isError: true,
@@ -305,7 +305,7 @@ export class CursorAccountMcpBridge {
305
305
  const fresh = {
306
306
  promise: this.client
307
307
  .listAccountMcpTools(ref.servers ?? [])
308
- .then(servers => {
308
+ .then((servers) => {
309
309
  const catalog = buildCatalog(servers);
310
310
  fresh.freshAtMs = Date.now();
311
311
  return catalog;
@@ -430,10 +430,10 @@ export function formatCursorAccountMcpWarningBox(args) {
430
430
  }
431
431
  function warningCopy(args) {
432
432
  const empty = args.servers.length === 0;
433
- const hasAuth = args.servers.some(server => server.status === "needsAuth");
434
- const hasError = args.servers.some(server => server.status === "error");
435
- const nameWidth = Math.max(0, ...args.servers.map(server => server.serverIdentifier.length));
436
- const statusRows = args.servers.map(server => formatWarningStatusRow(server, nameWidth, args.hyperlinks));
433
+ const hasAuth = args.servers.some((server) => server.status === "needsAuth");
434
+ const hasError = args.servers.some((server) => server.status === "error");
435
+ const nameWidth = Math.max(0, ...args.servers.map((server) => server.serverIdentifier.length));
436
+ const statusRows = args.servers.map((server) => formatWarningStatusRow(server, nameWidth, args.hyperlinks));
437
437
  const links = [
438
438
  ` ${CURSOR_ACCOUNT_MCP_SETTINGS_DEEPLINK}`,
439
439
  ` ${CURSOR_ACCOUNT_MCP_DASHBOARD_URL}`,
@@ -494,8 +494,8 @@ export async function diagnoseConnectorError(client, serverIdentifier) {
494
494
  });
495
495
  const text = result.content
496
496
  .filter((part) => part.type === "text")
497
- .map(part => part.text.trim())
498
- .filter(part => part.length > 0)
497
+ .map((part) => part.text.trim())
498
+ .filter((part) => part.length > 0)
499
499
  .join(" ");
500
500
  if (result.isError) {
501
501
  return text.length > 0 ? text : "backend reported an error with no detail";
@@ -209,10 +209,10 @@ export class CursorBackendClient {
209
209
  async listAccountMcpTools(serverIdentifiers) {
210
210
  const raw = await this.rpc("ListSandMcpTools", { serverIdentifiers: [...serverIdentifiers] }, LIST_TIMEOUT_MS);
211
211
  const parsed = listSandMcpToolsResponseSchema.parse(raw);
212
- return (parsed.servers ?? []).map(server => ({
212
+ return (parsed.servers ?? []).map((server) => ({
213
213
  serverIdentifier: server.serverIdentifier,
214
214
  status: server.status,
215
- tools: (server.tools ?? []).map(tool => {
215
+ tools: (server.tools ?? []).map((tool) => {
216
216
  const outputSchema = parseOutputSchemaJson(tool.outputSchemaJson);
217
217
  const annotations = parseAnnotationsJson(tool.annotationsJson);
218
218
  return {
@@ -251,8 +251,8 @@ export class CursorBackendClient {
251
251
  });
252
252
  const parsed = getAvailableMcpServersResponseSchema.parse(raw);
253
253
  return (parsed.servers ?? [])
254
- .filter(server => server.id !== undefined && server.id > 0)
255
- .map(server => ({
254
+ .filter((server) => server.id !== undefined && server.id > 0)
255
+ .map((server) => ({
256
256
  id: server.id,
257
257
  name: server.name ?? "",
258
258
  isTeamServer: server.isTeamServer === true,
@@ -272,7 +272,7 @@ export class CursorBackendClient {
272
272
  serviceAccountId: args.serviceAccountId,
273
273
  }, LIST_TIMEOUT_MS);
274
274
  const parsed = checkHttpMcpStatusResponseSchema.parse(raw);
275
- return (parsed.statuses ?? []).map(status => ({
275
+ return (parsed.statuses ?? []).map((status) => ({
276
276
  id: status.id ?? 0,
277
277
  requiresAuth: status.requiresAuth === true,
278
278
  authUrl: status.authUrl,
@@ -511,7 +511,7 @@ export async function revokeMintedUserApiKey(args) {
511
511
  });
512
512
  const listed = listUserApiKeysResponseSchema.parse(await parseRpcResponse("ListUserApiKeys", listResponse));
513
513
  const masked = maskApiKey(args.apiKey);
514
- const match = (listed.apiKeys ?? []).find(key => key.name === args.keyName && key.maskedKey === masked);
514
+ const match = (listed.apiKeys ?? []).find((key) => key.name === args.keyName && key.maskedKey === masked);
515
515
  if (match === undefined) {
516
516
  // CreateUserApiKey writes the primary while ListUserApiKeys may read a
517
517
  // lagging replica — skip rather than touch any other key.
@@ -445,7 +445,7 @@ function isAborted(signal) {
445
445
  return signal?.aborted === true;
446
446
  }
447
447
  function sleep(ms, signal) {
448
- return new Promise(resolve => {
448
+ return new Promise((resolve) => {
449
449
  if (signal?.aborted === true) {
450
450
  resolve();
451
451
  return;
@@ -45,7 +45,7 @@ export function isStoreApiLaneEnabled(options = {}) {
45
45
  return sourceId !== undefined && sourceId !== "";
46
46
  }
47
47
  export function createStoreApiClient(options = {}) {
48
- const sleep = options.sleep ?? ((ms) => new Promise(resolve => setTimeout(resolve, ms)));
48
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
49
49
  const random = options.random ?? Math.random;
50
50
  /** One POST of a versioned envelope; returns the parsed 2xx body. */
51
51
  const postOnce = async (call, envelope) => {
@@ -39,7 +39,7 @@ export async function authorizeCursorAccountConnectors(args) {
39
39
  const redirectUri = mcpOauthRedirectUri();
40
40
  // Team-scoped connectors only: the hosted bridge resolves the SA's team
41
41
  // servers, so personal connectors can never apply to a deployment.
42
- const available = (await backendClient.getAvailableMcpServers({ teamId })).filter(server => server.isTeamServer);
42
+ const available = (await backendClient.getAvailableMcpServers({ teamId })).filter((server) => server.isTeamServer);
43
43
  const selected = selectConnectors(available, args.servers);
44
44
  for (const missing of selected.unmatched) {
45
45
  err(`${LOG_PREFIX} Connection "${connectionName}" lists connector ${JSON.stringify(missing)}, but the team has no such connector (dashboard → MCP).\n`);
@@ -48,9 +48,9 @@ export async function authorizeCursorAccountConnectors(args) {
48
48
  err(`${LOG_PREFIX} No matching team connectors for connection "${connectionName}".\n`);
49
49
  return { authorized: [], pending: [], errored: [] };
50
50
  }
51
- const nameById = new Map(selected.servers.map(server => [server.id, server.name]));
51
+ const nameById = new Map(selected.servers.map((server) => [server.id, server.name]));
52
52
  const statuses = await backendClient.checkHttpMcpStatus({
53
- serverIds: selected.servers.map(server => server.id),
53
+ serverIds: selected.servers.map((server) => server.id),
54
54
  oauthRedirectUri: redirectUri,
55
55
  serviceAccountId,
56
56
  });
@@ -114,7 +114,7 @@ function selectConnectors(available, filter) {
114
114
  const unmatched = [];
115
115
  for (const name of filter) {
116
116
  const wanted = name.trim().toLowerCase();
117
- const matches = available.filter(server => server.name.toLowerCase() === wanted || server.serverIdentifier?.toLowerCase() === wanted);
117
+ const matches = available.filter((server) => server.name.toLowerCase() === wanted || server.serverIdentifier?.toLowerCase() === wanted);
118
118
  if (matches.length === 0) {
119
119
  unmatched.push(name);
120
120
  continue;
@@ -133,14 +133,14 @@ function uniqueConnectorMatch(available, identifier) {
133
133
  if (wanted === "") {
134
134
  return undefined;
135
135
  }
136
- const byIdentifier = available.filter(server => server.serverIdentifier?.toLowerCase() === wanted);
136
+ const byIdentifier = available.filter((server) => server.serverIdentifier?.toLowerCase() === wanted);
137
137
  if (byIdentifier.length === 1) {
138
138
  return byIdentifier[0];
139
139
  }
140
140
  if (byIdentifier.length > 1) {
141
141
  return undefined;
142
142
  }
143
- const byName = available.filter(server => server.name.toLowerCase() === wanted);
143
+ const byName = available.filter((server) => server.name.toLowerCase() === wanted);
144
144
  if (byName.length === 1) {
145
145
  return byName[0];
146
146
  }
@@ -173,11 +173,11 @@ export async function probeConnectorAuthUrls(args) {
173
173
  return urls;
174
174
  }
175
175
  const statuses = await args.client.checkHttpMcpStatus({
176
- serverIds: matched.map(server => server.id),
176
+ serverIds: matched.map((server) => server.id),
177
177
  oauthRedirectUri: mcpOauthRedirectUri(),
178
178
  serviceAccountId: args.serviceAccountId,
179
179
  });
180
- const statusById = new Map(statuses.map(status => [status.id, status]));
180
+ const statusById = new Map(statuses.map((status) => [status.id, status]));
181
181
  for (const identifier of args.identifiers) {
182
182
  const match = uniqueConnectorMatch(available, identifier);
183
183
  if (match === undefined) {
@@ -215,7 +215,7 @@ async function pollUntilAuthorized(args) {
215
215
  // Transient probe errors; keep polling until the deadline.
216
216
  continue;
217
217
  }
218
- const status = statuses.find(entry => entry.id === args.serverId);
218
+ const status = statuses.find((entry) => entry.id === args.serverId);
219
219
  if (status !== undefined && !status.requiresAuth) {
220
220
  return true;
221
221
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-deployment-relay.d.ts","sourceRoot":"","sources":["../../src/internal/cursor-deployment-relay.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AAK1C;yBACyB;AACzB,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACnC,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,GAAG,CAAC,mBAAmB,CAAC,CAAC;CAClC;AAQD,MAAM,MAAM,4BAA4B,GACpC,SAAS,oBAAoB,EAAE,GAC/B,CAAC,MAAM,SAAS,oBAAoB,EAAE,CAAC,CAAC;AAE5C,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,EAAE,4BAA4B,CAAC;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,oEAAoE;AACpE,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,4BAA4B,GAC1C,SAAS,oBAAoB,EAAE,CAEjC;AAED;;;;GAIG;AACH,wBAAg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31
  const environments = [
32
32
  ...new Set((subscription.environments ?? options.environments ?? [])
33
- .map(value => value.trim())
33
+ .map((value) => value.trim())
34
34
  .filter(Boolean)),
35
35
  ];
36
36
  const events = new Set(subscription.events ?? options.events ?? DEFAULT_EVENTS);
@@ -104,7 +104,7 @@ export function deploymentEventMatches(subscription, envelope) {
104
104
  */
105
105
  export async function fanOutDeploymentEvent(input) {
106
106
  const { event, logger } = input;
107
- const matched = input.targets.filter(target => target.subscriptions.some(subscription => subscription.deploySourceUri === event.deploySourceUri &&
107
+ const matched = input.targets.filter((target) => target.subscriptions.some((subscription) => subscription.deploySourceUri === event.deploySourceUri &&
108
108
  deploymentEventMatches(subscription, event)));
109
109
  const failures = [];
110
110
  for (const target of matched) {
@@ -130,9 +130,9 @@ export class DeploymentEventRelay {
130
130
  logPrefix: "deployment-events",
131
131
  subscribePath: "/v0/deployment-events/subscriptions",
132
132
  pollPath: "/v0/deployment-events",
133
- buildRegistrationBody: consumerId => ({
133
+ buildRegistrationBody: (consumerId) => ({
134
134
  consumerId,
135
- subscriptions: currentDeploymentSubscriptions(options.subscriptions).map(subscription => ({
135
+ subscriptions: currentDeploymentSubscriptions(options.subscriptions).map((subscription) => ({
136
136
  deploySourceUri: subscription.deploySourceUri,
137
137
  environments: subscription.environments,
138
138
  events: [...subscription.events],
@@ -140,11 +140,11 @@ export class DeploymentEventRelay {
140
140
  }),
141
141
  // Empty subscriptions drop this consumer's registration on clean stop
142
142
  // instead of leaving it to lapse by TTL.
143
- buildDeregistrationBody: consumerId => ({
143
+ buildDeregistrationBody: (consumerId) => ({
144
144
  consumerId,
145
145
  subscriptions: [],
146
146
  }),
147
- applyRegistrationResponse: json => {
147
+ applyRegistrationResponse: (json) => {
148
148
  const result = json;
149
149
  const wantedSubscriptions = currentDeploymentSubscriptions(options.subscriptions);
150
150
  this.subscribed = new Map();
@@ -152,7 +152,7 @@ export class DeploymentEventRelay {
152
152
  const lines = [];
153
153
  const confirmed = [];
154
154
  for (const status of result.deploySourceUris ?? []) {
155
- const wanted = wantedSubscriptions.find(subscription => subscription.deploySourceUri === status.deploySourceUri);
155
+ const wanted = wantedSubscriptions.find((subscription) => subscription.deploySourceUri === status.deploySourceUri);
156
156
  if (!status.isSubscribed || wanted === undefined) {
157
157
  lines.push(`not subscribed to ${status.deploySourceUri}: ${status.detail ?? "unknown reason"}`);
158
158
  continue;
@@ -161,12 +161,12 @@ export class DeploymentEventRelay {
161
161
  confirmed.push(status.deploySourceUri);
162
162
  }
163
163
  if (confirmed.length > 0) {
164
- const kinds = [...new Set(wantedSubscriptions.flatMap(s => [...s.events]))];
164
+ const kinds = [...new Set(wantedSubscriptions.flatMap((s) => [...s.events]))];
165
165
  lines.push(`subscribed to ${confirmed.join(", ")} for events: ${kinds.join(", ")}`);
166
166
  }
167
167
  return lines;
168
168
  },
169
- shouldDispatch: event => this.shouldDispatch(event),
169
+ shouldDispatch: (event) => this.shouldDispatch(event),
170
170
  dispatch: ({ offset: _offset, ...envelope }) => options.dispatch(envelope),
171
171
  };
172
172
  this.core = new CursorRelayCore({
@@ -175,7 +175,7 @@ export function scmMetadataToGitHubPayload(event) {
175
175
  }
176
176
  function stubGitHubCiPullRequests(input) {
177
177
  if (input.snapshot !== undefined && input.snapshot.length > 0) {
178
- return input.snapshot.map(pr => ({
178
+ return input.snapshot.map((pr) => ({
179
179
  number: pr.number,
180
180
  ...(pr.url === undefined ? {} : { html_url: pr.url }),
181
181
  }));
@@ -319,14 +319,14 @@ function subscriptionLabel(provider, repo) {
319
319
  }
320
320
  export function resolveCursorScmSubscriptions(options) {
321
321
  if (options.subscriptions !== undefined) {
322
- return options.subscriptions.map(subscription => ({
322
+ return options.subscriptions.map((subscription) => ({
323
323
  provider: subscription.provider,
324
324
  repo: subscription.repo.trim().toLowerCase(),
325
325
  events: [...subscription.events],
326
326
  }));
327
327
  }
328
328
  const events = [...(options.events ?? [])];
329
- return (options.repos ?? []).map(repo => ({
329
+ return (options.repos ?? []).map((repo) => ({
330
330
  provider: "github",
331
331
  repo: repo.trim().toLowerCase(),
332
332
  events,
@@ -347,7 +347,7 @@ export class CursorEventRelay {
347
347
  this.subscribedEvents = new Map();
348
348
  this.loggedSkippedKeys = new Set();
349
349
  this.subscriptions = resolveCursorScmSubscriptions(options);
350
- const requestedEvents = new Map(this.subscriptions.map(subscription => [
350
+ const requestedEvents = new Map(this.subscriptions.map((subscription) => [
351
351
  subscriptionKey(subscription.provider, subscription.repo),
352
352
  new Set(subscription.events),
353
353
  ]));
@@ -355,9 +355,9 @@ export class CursorEventRelay {
355
355
  logPrefix: "cursor-events",
356
356
  subscribePath: "/v0/scm-events/subscriptions",
357
357
  pollPath: "/v0/scm-events",
358
- buildRegistrationBody: consumerId => ({
358
+ buildRegistrationBody: (consumerId) => ({
359
359
  consumerId,
360
- subscriptions: this.subscriptions.map(subscription => ({
360
+ subscriptions: this.subscriptions.map((subscription) => ({
361
361
  provider: subscription.provider,
362
362
  repo: subscription.repo,
363
363
  events: [...subscription.events],
@@ -368,7 +368,7 @@ export class CursorEventRelay {
368
368
  // registration leaves a hole in the log until the next process
369
369
  // registers, and the durable offset cannot replay what was never
370
370
  // written. A consumer that does not come back lapses by TTL.
371
- applyRegistrationResponse: json => {
371
+ applyRegistrationResponse: (json) => {
372
372
  const result = json;
373
373
  const statuses = result.repos ?? [];
374
374
  this.subscribedEvents = new Map();
@@ -385,13 +385,13 @@ export class CursorEventRelay {
385
385
  confirmed.push(subscriptionLabel(provider, status.repo));
386
386
  }
387
387
  if (confirmed.length > 0) {
388
- const eventKinds = [...new Set(this.subscriptions.flatMap(s => [...s.events]))];
388
+ const eventKinds = [...new Set(this.subscriptions.flatMap((s) => [...s.events]))];
389
389
  lines.push(`subscribed to ${confirmed.join(", ")} for events: ${eventKinds.join(", ")}`);
390
390
  }
391
391
  return lines;
392
392
  },
393
- shouldDispatch: event => this.shouldDispatch(event),
394
- dispatch: event => this.options.dispatch(event),
393
+ shouldDispatch: (event) => this.shouldDispatch(event),
394
+ dispatch: (event) => this.options.dispatch(event),
395
395
  };
396
396
  this.core = new CursorRelayCore({
397
397
  baseUrl: options.baseUrl,
@@ -181,7 +181,7 @@ export class CursorRelayCore {
181
181
  // loose loses nothing).
182
182
  await Promise.race([
183
183
  this.consumePromise?.catch(() => { }),
184
- new Promise(resolve => {
184
+ new Promise((resolve) => {
185
185
  const timer = setTimeout(resolve, 2_000);
186
186
  timer.unref?.();
187
187
  }),
@@ -420,7 +420,7 @@ export class CursorRelayCore {
420
420
  return isAuthOrFenceFailure ? AUTH_FAILURE_BACKOFF_MS : Math.min(backoffMs * 2, MAX_BACKOFF_MS);
421
421
  }
422
422
  sleep(ms) {
423
- return new Promise(resolve => {
423
+ return new Promise((resolve) => {
424
424
  const signal = this.abort?.signal;
425
425
  if (signal?.aborted === true) {
426
426
  resolve();