@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
@@ -304,7 +304,7 @@ export function cursorHostedFiles(options = {}) {
304
304
  if (files.wire === "flush") {
305
305
  const response = await flushPost(options, "/flush", {
306
306
  store: files.store,
307
- ops: specs.map(spec => ({
307
+ ops: specs.map((spec) => ({
308
308
  op: "put",
309
309
  path: spec.key,
310
310
  sha: createHash("sha256").update(spec.body).digest("hex"),
@@ -317,7 +317,7 @@ export function cursorHostedFiles(options = {}) {
317
317
  // instruction matching below cannot hand its sibling's presign to it,
318
318
  // and the missing url surfaces as that key's own error.
319
319
  return {
320
- files: (response.ops ?? []).map(op => ({
320
+ files: (response.ops ?? []).map((op) => ({
321
321
  path: op.path,
322
322
  ...(typeof op.url === "string" && op.url !== "" ? { url: op.url } : {}),
323
323
  headers: op.headers,
@@ -325,7 +325,7 @@ export function cursorHostedFiles(options = {}) {
325
325
  };
326
326
  }
327
327
  return await storePost(options, files.path("/upload"), {
328
- files: specs.map(spec => ({
328
+ files: specs.map((spec) => ({
329
329
  path: spec.key,
330
330
  sha: createHash("sha256").update(spec.body).digest("hex"),
331
331
  size: spec.body.byteLength,
@@ -344,7 +344,7 @@ export function cursorHostedFiles(options = {}) {
344
344
  return await Promise.all(specs.map(async (spec, index) => {
345
345
  // Match by path, falling back to position for servers that answer
346
346
  // in request order without echoing the path.
347
- const instruction = presigned.files?.find(file => file.path === spec.key) ?? presigned.files?.[index];
347
+ const instruction = presigned.files?.find((file) => file.path === spec.key) ?? presigned.files?.[index];
348
348
  if (instruction?.url === undefined) {
349
349
  // Files past the single-part threshold come back with a multipart
350
350
  // plan instead of a url; this backend does not implement multipart.
@@ -486,7 +486,7 @@ export function cursorHostedFiles(options = {}) {
486
486
  return [];
487
487
  }
488
488
  return await withFiles(async (files) => {
489
- const resolved = entries.map(entry => ({
489
+ const resolved = entries.map((entry) => ({
490
490
  entry,
491
491
  ...preconditionFor(entry),
492
492
  }));
@@ -709,7 +709,7 @@ export function cursorHostedFiles(options = {}) {
709
709
  });
710
710
  // The API answers 200 with a per-file status, so a lost race would look
711
711
  // like success unless the outcome is read.
712
- const outcome = (raw.files ?? []).find(entry => entry.path === key);
712
+ const outcome = (raw.files ?? []).find((entry) => entry.path === key);
713
713
  if (outcome?.status === "conflict") {
714
714
  observedEtags.delete(key);
715
715
  throw new FileConflictError(key, {
@@ -771,8 +771,8 @@ function resolveStoreSourceId(options) {
771
771
  }
772
772
  const DEV_PRESIGN_HOSTS = new Set((process.env.CURSOR_HOSTED_FILES_DEV_PRESIGN_HOSTS ?? "")
773
773
  .split(",")
774
- .map(host => host.trim().toLowerCase())
775
- .filter(host => host.length > 0));
774
+ .map((host) => host.trim().toLowerCase())
775
+ .filter((host) => host.length > 0));
776
776
  /** Send a file request with the deployment pod credential. */
777
777
  async function storePost(options, path, body) {
778
778
  return await postJson(options, `${resolveCursorApiBaseUrl(options)}${AGENT_SERVE_FILES_PATH}${path}`, body);
@@ -47,7 +47,7 @@ export function localFiles(options) {
47
47
  };
48
48
  return {
49
49
  capabilities: { materialized: true },
50
- materializedPath: key => pathForKey(key),
50
+ materializedPath: (key) => pathForKey(key),
51
51
  async put(key, body) {
52
52
  const target = pathForKey(key);
53
53
  await mkdir(join(target, ".."), { recursive: true });
@@ -1 +1 @@
1
- {"version":3,"file":"filesystem.d.ts","sourceRoot":"","sources":["../src/filesystem.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAiB5C,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,iCAAiC,CAAC;AASzC,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAC1B;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,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f;AAwED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,EACxC,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,UAAU,CAAC,CAcrB;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAYzF;AAMD;;;;;GAKG;AACH,wBAAgB,OAAO,IAAI,UAAU,CA0BpC;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAM,GAAG,UAAU,CA+GlF;AAyDD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,CAqGpE;AA8GD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,UAAU,CAoJtE;AAcD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,CAgJnE;AAeD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,GAAG,UAAU,CA0J7E"}
@@ -107,7 +107,7 @@ export class FileSystemConfigError extends Error {
107
107
  }
108
108
  }
109
109
  function allowlistHas(tools, ...names) {
110
- return tools.some(name => names.includes(name));
110
+ return tools.some((name) => names.includes(name));
111
111
  }
112
112
  export function resolveRootHarnessAllowlist(tools) {
113
113
  if (tools === undefined) {
@@ -130,7 +130,7 @@ export function resolveRootHarnessAllowlist(tools) {
130
130
  throw new FileSystemConfigError("`root` cannot list `readLints`: FileSystem has no diagnostics " +
131
131
  "verb, so the host language service would run against the real workspace.");
132
132
  }
133
- const extras = tools.filter(name => !isFileSystemToolAlias(name));
133
+ const extras = tools.filter((name) => !isFileSystemToolAlias(name));
134
134
  return withMcpGrant(extras);
135
135
  }
136
136
  export function resolveFileSystemTools(options) {
@@ -182,7 +182,7 @@ export function resolveHostHarnessToolOptions(tools) {
182
182
  return { tools: [] };
183
183
  }
184
184
  return {
185
- tools: withMcpGrant(tools.filter(name => !isReplacedHostFileAlias(name))),
185
+ tools: withMcpGrant(tools.filter((name) => !isReplacedHostFileAlias(name))),
186
186
  };
187
187
  }
188
188
  /** File aliases host-default synthesizes. Native `semSearch` stays. */
@@ -362,7 +362,7 @@ export async function collectGrepMatches(root, query, opts) {
362
362
  }
363
363
  export function shapeGrepUnion(matches, outputMode) {
364
364
  if (outputMode === "files_with_matches") {
365
- const files = [...new Set(matches.map(match => match.path))];
365
+ const files = [...new Set(matches.map((match) => match.path))];
366
366
  return { type: "files", output: { files, count: files.length } };
367
367
  }
368
368
  if (outputMode === "count") {
@@ -381,7 +381,7 @@ export function shapeGrepUnion(matches, outputMode) {
381
381
  return {
382
382
  type: "content",
383
383
  output: {
384
- matches: matches.map(match => ({
384
+ matches: matches.map((match) => ({
385
385
  file: match.path,
386
386
  lineNumber: match.lineNumber,
387
387
  line: match.line,
@@ -996,7 +996,7 @@ export function unionFs(mounts) {
996
996
  yield* limitResults(uncapped(), options?.limit);
997
997
  async function* uncapped() {
998
998
  if (isRootPath(prefix)) {
999
- yield* mergeSortedByPath(entries.map(mount => mapMountEntries(mount.fs.list(undefined, options), mount.prefix)), { unique: true });
999
+ yield* mergeSortedByPath(entries.map((mount) => mapMountEntries(mount.fs.list(undefined, options), mount.prefix)), { unique: true });
1000
1000
  return;
1001
1001
  }
1002
1002
  const path = normalizeFsPath(prefix ?? "/");
@@ -1013,7 +1013,7 @@ export function unionFs(mounts) {
1013
1013
  if (normalized === "/") {
1014
1014
  return { kind: "directory" };
1015
1015
  }
1016
- if (entries.some(entry => entry.prefix === normalized)) {
1016
+ if (entries.some((entry) => entry.prefix === normalized)) {
1017
1017
  return { kind: "directory" };
1018
1018
  }
1019
1019
  const mount = longestMount(normalized, entries);
@@ -1039,7 +1039,7 @@ export function unionFs(mounts) {
1039
1039
  async function* uncapped() {
1040
1040
  const scope = query.path === undefined || query.path === "" ? "/" : normalizeFsPath(query.path);
1041
1041
  if (scope === "/") {
1042
- yield* mergeSorted(entries.map(mount => mapMountGrep(mount.fs.grep({ ...query, path: undefined }), mount.prefix)), { compare: compareGrepResult });
1042
+ yield* mergeSorted(entries.map((mount) => mapMountGrep(mount.fs.grep({ ...query, path: undefined }), mount.prefix)), { compare: compareGrepResult });
1043
1043
  return;
1044
1044
  }
1045
1045
  const mount = longestMount(scope, entries);
@@ -1072,7 +1072,7 @@ export function unionFs(mounts) {
1072
1072
  async function* uncapped() {
1073
1073
  const scope = dir === undefined || dir === "" ? "/" : normalizeFsPath(dir);
1074
1074
  if (scope === "/") {
1075
- yield* mergeSortedByPath(entries.map(mount => mapMountEntries(mount.fs.glob(pattern, undefined, options), mount.prefix)), { unique: true });
1075
+ yield* mergeSortedByPath(entries.map((mount) => mapMountEntries(mount.fs.glob(pattern, undefined, options), mount.prefix)), { unique: true });
1076
1076
  return;
1077
1077
  }
1078
1078
  const mount = longestMount(scope, entries);
@@ -1162,7 +1162,7 @@ export function overlayFs(layers) {
1162
1162
  };
1163
1163
  return {
1164
1164
  async *list(prefix, options) {
1165
- const { streams, failure, served } = await walkLayers(layer => layer.list(prefix, options));
1165
+ const { streams, failure, served } = await walkLayers((layer) => layer.list(prefix, options));
1166
1166
  if (!served && failure !== undefined) {
1167
1167
  throw failure;
1168
1168
  }
@@ -1189,7 +1189,7 @@ export function overlayFs(layers) {
1189
1189
  return { kind: "missing" };
1190
1190
  },
1191
1191
  async *glob(pattern, dir, options) {
1192
- const { streams, failure, served } = await walkLayers(layer => layer.glob(pattern, dir, options));
1192
+ const { streams, failure, served } = await walkLayers((layer) => layer.glob(pattern, dir, options));
1193
1193
  if (!served && failure !== undefined) {
1194
1194
  throw failure;
1195
1195
  }
@@ -1215,7 +1215,7 @@ export function overlayFs(layers) {
1215
1215
  },
1216
1216
  async *grep(query) {
1217
1217
  const { maxResults, ...uncappedQuery } = query;
1218
- yield* limitResults(mergeSorted(await collectOverlayHits(layer => layer.grep(uncappedQuery), error => isInvalidGrepPatternError(error)), { compare: compareGrepResult }), maxResults);
1218
+ yield* limitResults(mergeSorted(await collectOverlayHits((layer) => layer.grep(uncappedQuery), (error) => isInvalidGrepPatternError(error)), { compare: compareGrepResult }), maxResults);
1219
1219
  },
1220
1220
  async write(path) {
1221
1221
  throw new ReadOnlyMountError(path);
@@ -1225,7 +1225,7 @@ export function overlayFs(layers) {
1225
1225
  },
1226
1226
  async *search(query) {
1227
1227
  const { maxResults, ...uncappedQuery } = query;
1228
- yield* limitResults(mergeSorted(await collectOverlayHits(layer => layer.search(uncappedQuery)), {
1228
+ yield* limitResults(mergeSorted(await collectOverlayHits((layer) => layer.search(uncappedQuery)), {
1229
1229
  compare: compareSearchResult,
1230
1230
  }), maxResults);
1231
1231
  },
@@ -1254,14 +1254,14 @@ export function hostFs(files, scope) {
1254
1254
  const listed = {
1255
1255
  async *list(prefix, options) {
1256
1256
  const entries = await files.list(undefined, callOptions);
1257
- yield* listFilesFromPaths(entries.map(entry => ({
1257
+ yield* listFilesFromPaths(entries.map((entry) => ({
1258
1258
  path: normalizeFsPath(entry.path),
1259
1259
  size: entry.size,
1260
1260
  })), prefix, options);
1261
1261
  },
1262
1262
  async stat(path) {
1263
1263
  const entries = await files.list(undefined, callOptions);
1264
- return statFromFilePaths(entries.map(entry => normalizeFsPath(entry.path)), path);
1264
+ return statFromFilePaths(entries.map((entry) => normalizeFsPath(entry.path)), path);
1265
1265
  },
1266
1266
  };
1267
1267
  const readText = async (inputPath) => {
@@ -88,8 +88,9 @@ export declare function resolveAdvertisedTools(args: {
88
88
  export declare function sourceForConnection(connection: DiscoveredConnection, session: SessionInfo, hostMcp: AdvertiseHostMcp): Promise<AdvertisedToolSource>;
89
89
  /**
90
90
  * Render an MCP call result for the model: text parts joined, non-text
91
- * parts noted by type, `isError` surfaced as a thrown error so the turn
92
- * records a tool error instead of error-shaped prose.
91
+ * parts noted by type, `isError` surfaced as a {@link McpToolError} so the
92
+ * turn records a tool error and read-only retry can tell a vendor-reported
93
+ * error from a transport failure.
93
94
  */
94
95
  export declare function formatMcpToolResult(connectionName: string, toolName: string, result: HostMcpCallResult): string;
95
96
  //# sourceMappingURL=advertise-tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"advertise-tools.d.ts","sourceRoot":"","sources":["../../src/internal/advertise-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAGpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAGjB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9D,QAAQ,CACN,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC9B,MAAM,CAAC,UAAU,EAAE,oBAAoB,GAAG,aAAa,CAAC;CACzD;AAED;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAiC,CAAC;AAO7E,2DAA2D;AAC3D,MAAM,WAAW,oBAAoB;IACnC,SAAS,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACxC,QAAQ,CAAC,QAAQ,EA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/B;AAkHD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,iBAAiB,GACxB,MAAM,CAgBR"}
@@ -37,6 +37,7 @@ import { connectionAllowsTool, } from "../types.js";
37
37
  import { brandDefinition } from "./brand.js";
38
38
  import { describeError } from "./describe-error.js";
39
39
  import { sanitizeMcpToolName, suffixMcpToolName } from "./sanitize-mcp-tool-name.js";
40
+ import { McpToolError } from "./tool-call-retry.js";
40
41
  import { classifyAnnotationsEffect } from "./tool-policy.js";
41
42
  /**
42
43
  * Model-facing advertised names after {@link sanitizeMcpToolName} — the
@@ -55,7 +56,7 @@ const ANY_OBJECT_SCHEMA = {
55
56
  * or a definition is invalid.
56
57
  */
57
58
  export async function resolveAdvertisedTools(args) {
58
- const advertising = args.agent.connections.filter(connection => connection.advertiseTools === true);
59
+ const advertising = args.agent.connections.filter((connection) => connection.advertiseTools === true);
59
60
  if (advertising.length === 0) {
60
61
  return [];
61
62
  }
@@ -68,14 +69,14 @@ export async function resolveAdvertisedTools(args) {
68
69
  connection,
69
70
  ok: true,
70
71
  source,
71
- listed: listed.filter(info => connectionAllowsTool(connection, info.name)),
72
+ listed: listed.filter((info) => connectionAllowsTool(connection, info.name)),
72
73
  };
73
74
  }
74
75
  catch (error) {
75
76
  return { connection, ok: false, error };
76
77
  }
77
78
  }));
78
- const claimed = new Set(args.agent.tools.map(tool => tool.name));
79
+ const claimed = new Set(args.agent.tools.map((tool) => tool.name));
79
80
  const resolved = [];
80
81
  for (const listing of listings) {
81
82
  const { connection } = listing;
@@ -102,7 +103,7 @@ export async function resolveAdvertisedTools(args) {
102
103
  }
103
104
  throw error;
104
105
  }
105
- const intended = listed.filter(info => !isDoNotCallTool(info.annotations) &&
106
+ const intended = listed.filter((info) => !isDoNotCallTool(info.annotations) &&
106
107
  matchesIntendedEffects(info.annotations, connection.effects));
107
108
  const exposed = exposeListedTools(intended, claimed);
108
109
  for (const { info, exposedName } of exposed) {
@@ -178,7 +179,7 @@ function exposeListedTools(listed, claimed) {
178
179
  exposedNameByInfo.set(info, exposedName);
179
180
  });
180
181
  }
181
- return listed.map(info => ({
182
+ return listed.map((info) => ({
182
183
  info,
183
184
  exposedName: exposedNameByInfo.get(info),
184
185
  }));
@@ -233,16 +234,17 @@ function toDiscoveredTool(connection, info, exposedName, source) {
233
234
  }
234
235
  /**
235
236
  * Render an MCP call result for the model: text parts joined, non-text
236
- * parts noted by type, `isError` surfaced as a thrown error so the turn
237
- * records a tool error instead of error-shaped prose.
237
+ * parts noted by type, `isError` surfaced as a {@link McpToolError} so the
238
+ * turn records a tool error and read-only retry can tell a vendor-reported
239
+ * error from a transport failure.
238
240
  */
239
241
  export function formatMcpToolResult(connectionName, toolName, result) {
240
- const parts = result.content.map(item => item.type === "text" && typeof item.text === "string"
242
+ const parts = result.content.map((item) => item.type === "text" && typeof item.text === "string"
241
243
  ? item.text
242
244
  : `[${item.type} content omitted]`);
243
245
  const text = parts.join("\n").trim();
244
246
  if (result.isError === true) {
245
- throw new Error(text === "" ? `${connectionName} tool ${toolName} failed` : text);
247
+ throw new McpToolError({ connection: connectionName, toolName, vendorMessage: text });
246
248
  }
247
249
  if (text !== "") {
248
250
  return text;
@@ -21,7 +21,7 @@ export class ApprovalGate {
21
21
  if (existing !== undefined) {
22
22
  throw new Error(`Approval already pending for session ${sessionId} call ${meta.callId}`);
23
23
  }
24
- return new Promise(resolveDecision => {
24
+ return new Promise((resolveDecision) => {
25
25
  this.waiters.set(key, {
26
26
  meta,
27
27
  resolve: resolveDecision,
@@ -159,7 +159,7 @@ export class ArtifactsStore {
159
159
  (options?.matches === undefined || options.matches(record));
160
160
  if (options?.matches === undefined) {
161
161
  const metas = await this.rows.listMeta();
162
- if (metas.some(meta => meta.mtimeMs !== undefined)) {
162
+ if (metas.some((meta) => meta.mtimeMs !== undefined)) {
163
163
  return this.pageFromMetadata(metas, limit, cursor, matches, options?.kind !== undefined || options?.sessionId !== undefined);
164
164
  }
165
165
  }
@@ -178,7 +178,7 @@ export class ArtifactsStore {
178
178
  // Resume after (boundary stamp, rows of that cohort already
179
179
  // examined). Same-stamp rows sit contiguously in the sort, so the
180
180
  // pair names an exact position without identifying any row.
181
- start = newestFirst.findIndex(meta => (meta.mtimeMs ?? 0) <= cursor.m);
181
+ start = newestFirst.findIndex((meta) => (meta.mtimeMs ?? 0) <= cursor.m);
182
182
  if (start === -1) {
183
183
  return { records: [] };
184
184
  }
@@ -213,8 +213,8 @@ export class ArtifactsStore {
213
213
  const sliceCap = filtered ? scanBatchSize : Math.min(scanBatchSize, limit - records.length);
214
214
  const batch = newestFirst.slice(from, from + Math.min(sliceCap, budget - examined));
215
215
  const bodies = this.rows.getMany !== undefined
216
- ? await this.rows.getMany(batch.map(meta => meta.id))
217
- : await mapBounded(batch, ROW_HYDRATION_CONCURRENCY, meta => this.rows.get(meta.id));
216
+ ? await this.rows.getMany(batch.map((meta) => meta.id))
217
+ : await mapBounded(batch, ROW_HYDRATION_CONCURRENCY, (meta) => this.rows.get(meta.id));
218
218
  for (let i = 0; i < batch.length; i += 1) {
219
219
  lastExamined = from + i;
220
220
  examined += 1;
@@ -263,7 +263,7 @@ export class ArtifactsStore {
263
263
  createdAt: cursor.c,
264
264
  id: cursor.id,
265
265
  };
266
- start = records.findIndex(record => byNewestUpdated(record, position) > 0);
266
+ start = records.findIndex((record) => byNewestUpdated(record, position) > 0);
267
267
  if (start === -1) {
268
268
  return { records: [] };
269
269
  }
@@ -336,14 +336,14 @@ export class ArtifactsStore {
336
336
  }
337
337
  /** The `excess` oldest row ids, cheapest available ordering first. */
338
338
  async oldestRowIds(metas, excess) {
339
- if (metas.some(meta => meta.mtimeMs !== undefined)) {
339
+ if (metas.some((meta) => meta.mtimeMs !== undefined)) {
340
340
  // A store that tracks mtimes must never regress to per-insert
341
341
  // hydration. An entry missing one sorts oldest via the comparator's
342
342
  // `?? 0` and is evicted first, avoiding a full hydration on each insert.
343
343
  return metas
344
344
  .sort(byOldestModified)
345
345
  .slice(0, excess)
346
- .map(meta => meta.id);
346
+ .map((meta) => meta.id);
347
347
  }
348
348
  // A store that tracks no modification times at all (the local
349
349
  // filesystem store, deliberately) leaves only the rows' own
@@ -354,7 +354,7 @@ export class ArtifactsStore {
354
354
  return records
355
355
  .sort((a, b) => byNewestUpdated(b, a))
356
356
  .slice(0, Math.min(excess, Math.max(0, records.length - this.max)))
357
- .map(record => record.id);
357
+ .map((record) => record.id);
358
358
  }
359
359
  }
360
360
  /** A syntactically invalid {@link ArtifactPageOptions.cursor}. */
@@ -479,17 +479,17 @@ function createSinkRowStore(sink, agentName) {
479
479
  await sink.delete(key(id));
480
480
  },
481
481
  async getMany(ids) {
482
- const keys = ids.map(id => key(id));
482
+ const keys = ids.map((id) => key(id));
483
483
  const bodies = sink.getMany !== undefined
484
484
  ? await sink.getMany(keys)
485
- : await mapBounded(keys, ROW_HYDRATION_CONCURRENCY, rowKey => sink.get(rowKey));
486
- return bodies.map(body => parseRecordBytes(sinkBody(body)));
485
+ : await mapBounded(keys, ROW_HYDRATION_CONCURRENCY, (rowKey) => sink.get(rowKey));
486
+ return bodies.map((body) => parseRecordBytes(sinkBody(body)));
487
487
  },
488
488
  async list() {
489
489
  const entries = await sink.list(agentStoreKeys.artifactRowPrefix(agentName));
490
490
  const bodies = sink.getMany !== undefined
491
- ? await sink.getMany(entries.map(entry => entry.key))
492
- : await mapBounded(entries, ROW_HYDRATION_CONCURRENCY, entry => sink.get(entry.key));
491
+ ? await sink.getMany(entries.map((entry) => entry.key))
492
+ : await mapBounded(entries, ROW_HYDRATION_CONCURRENCY, (entry) => sink.get(entry.key));
493
493
  const records = [];
494
494
  for (const body of bodies) {
495
495
  const record = parseRecordBytes(sinkBody(body));
@@ -50,7 +50,7 @@ export function assertTimeArgs(tools, asOf) {
50
50
  continue;
51
51
  }
52
52
  const properties = tool.inputSchema?.properties ?? {};
53
- const missing = declared.filter(name => !(name in properties));
53
+ const missing = declared.filter((name) => !(name in properties));
54
54
  if (missing.length > 0) {
55
55
  throw new VacuousTimeArgsError(tool.name, missing);
56
56
  }
@@ -194,7 +194,7 @@ export function missingTimeWindow(input, windowKeys, asOf) {
194
194
  return undefined;
195
195
  }
196
196
  const record = typeof input === "object" && input !== null ? input : {};
197
- const missing = windowKeys.filter(key => record[key] === undefined);
197
+ const missing = windowKeys.filter((key) => record[key] === undefined);
198
198
  if (missing.length === 0) {
199
199
  return undefined;
200
200
  }
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Node module-customization hooks for authored agent files (registered via
3
- * node:module `register()` from authored-loaders.ts; runs on Node's loader
4
- * thread — keep this module dependency-free).
2
+ * Node module-customization hooks for authored agent files.
3
+ * authored-loaders.ts registers them with `registerHooks` on Node 22.15+
4
+ * (this thread). Older Node loads this file on the loader thread via
5
+ * `register()`. Keep this module dependency-free.
5
6
  *
6
7
  * Authored files import the framework by bare specifier. On compiled runs the
7
8
  * CLI pins `@cursor/bdk[/subpath]` onto its own entry files via
@@ -1 +1 @@
1
- {"version":3,"file":"authored-alias-hooks.d.ts","sourceRoot":"","sources":["../../src/internal/authored-alias-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAQH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC;AAMD,wBAAgB,UAAU,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAO5D;AAED,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,KAAK,WAAW,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEnG,wBAAgB,OAAO,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,GACvB,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAqBxC"}
1
+ {"version":3,"file":"authored-alias-hooks.d.ts","sourceRoot":"","sources":["../../src/internal/authored-alias-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC;;;;OAIG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACtC;AAMD,wBAAgB,UAAU,CAAC,IAAI,EAAE,qBAAqB,GAAG,IAAI,CAO5D;AAED,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,KAAK,WAAW,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEnG,wBAAgB,OAAO,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,GACvB,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CA4BxC"}
@@ -1,7 +1,8 @@
1
1
  /**
2
- * Node module-customization hooks for authored agent files (registered via
3
- * node:module `register()` from authored-loaders.ts; runs on Node's loader
4
- * thread — keep this module dependency-free).
2
+ * Node module-customization hooks for authored agent files.
3
+ * authored-loaders.ts registers them with `registerHooks` on Node 22.15+
4
+ * (this thread). Older Node loads this file on the loader thread via
5
+ * `register()`. Keep this module dependency-free.
5
6
  *
6
7
  * Authored files import the framework by bare specifier. On compiled runs the
7
8
  * CLI pins `@cursor/bdk[/subpath]` onto its own entry files via
@@ -26,7 +27,7 @@ function toNullProtoMap(source) {
26
27
  }
27
28
  export function initialize(data) {
28
29
  directAliases = toNullProtoMap(data.directAliases);
29
- sourceFallbackAliases = toNullProtoMap(Object.fromEntries((data.sourceFallbackAliases ?? []).map(specifier => [specifier, "1"])));
30
+ sourceFallbackAliases = toNullProtoMap(Object.fromEntries((data.sourceFallbackAliases ?? []).map((specifier) => [specifier, "1"])));
30
31
  const parent = data.sourceTreeFallbackParentURL;
31
32
  sourceTreeFallbackParentURL = typeof parent === "string" && parent !== "" ? parent : undefined;
32
33
  }
@@ -42,9 +43,17 @@ export function resolve(specifier, context, nextResolve) {
42
43
  isBarePackageSpecifier(specifier) &&
43
44
  isMonorepoAgentServeSource(parentURLOf(context))) {
44
45
  const retryParent = sourceTreeFallbackParentURL;
45
- return Promise.resolve()
46
- .then(() => nextResolve(specifier, context))
47
- .catch(() => nextResolve(specifier, withParentURL(context, retryParent)));
46
+ const retry = () => nextResolve(specifier, withParentURL(context, retryParent));
47
+ // `registerHooks` requires nextResolve to be called synchronously and
48
+ // throws on a returned Promise; `register()` hands us an async
49
+ // nextResolve that rejects instead of throwing.
50
+ try {
51
+ const result = nextResolve(specifier, context);
52
+ return result instanceof Promise ? result.catch(retry) : result;
53
+ }
54
+ catch {
55
+ return retry();
56
+ }
48
57
  }
49
58
  // Not ours: pass through with no promise/try-catch overhead. This hook
50
59
  // runs on every module resolution in the process.
@@ -1 +1 @@
1
- {"version":3,"file":"authored-loaders.d.ts","sourceRoot":"","sources":["../../src/internal/authored-loaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAwBH;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIrF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAC1E,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAWA;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAYjG;AAID;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAS7D"}
1
+ {"version":3,"file":"authored-loaders.d.ts","sourceRoot":"","sources":["../../src/internal/authored-loaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA4BH;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAIrF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG;IAC1E,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACjC,CAWA;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAYjG;AAID;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,OAAO,CAAC,IAAI,CAAC,CAS7D"}
@@ -19,9 +19,10 @@
19
19
  */
20
20
  import { existsSync } from "node:fs";
21
21
  import { stat } from "node:fs/promises";
22
- import { register as registerModuleHooks } from "node:module";
22
+ import * as nodeModule from "node:module";
23
23
  import { join } from "node:path";
24
24
  import { fileURLToPath, pathToFileURL } from "node:url";
25
+ import { initialize as initializeAliasHooks, resolve as resolveWithAliasHooks, } from "./authored-alias-hooks.js";
25
26
  import { CLI_COMMAND_NAME, frameworkAliases, isCompiledDistribution, packageRootDir, } from "./distribution.js";
26
27
  /**
27
28
  * Cross-copy markers: a user project with its own `@cursor/bdk` install
@@ -147,7 +148,6 @@ function registerFrameworkAliases() {
147
148
  if (markers[ALIASES_REGISTERED_KEY] === true) {
148
149
  return;
149
150
  }
150
- const hooksUrl = new URL("./authored-alias-hooks.js", import.meta.url);
151
151
  const { directAliases, sourceFallbackAliases } = partitionFrameworkAliases(frameworkAliases());
152
152
  const data = {
153
153
  directAliases,
@@ -160,8 +160,24 @@ function registerFrameworkAliases() {
160
160
  // Bare specifiers from that tree retry against this package.json.
161
161
  sourceTreeFallbackParentURL: pathToFileURL(join(packageRootDir(), "package.json")).href,
162
162
  };
163
- // `node:module`'s register() is synchronous: it blocks until the hooks
164
- // thread has initialized, so the aliases are active when it returns.
165
- registerModuleHooks(hooksUrl, { data });
163
+ // Both registrars block until the hooks are active. `registerHooks`
164
+ // (Node 22.15+) runs on this thread and is the API Node 26 accepts
165
+ // without a deprecation warning. Older 22.x still loads the hooks
166
+ // module on a separate thread and calls `initialize(data)` there.
167
+ const registerHooks = moduleRegisterHooks();
168
+ if (registerHooks !== undefined) {
169
+ initializeAliasHooks(data);
170
+ registerHooks({ resolve: resolveWithAliasHooks });
171
+ }
172
+ else {
173
+ nodeModule.register(new URL("./authored-alias-hooks.js", import.meta.url), { data });
174
+ }
166
175
  markers[ALIASES_REGISTERED_KEY] = true;
167
176
  }
177
+ function moduleRegisterHooks() {
178
+ const candidate = nodeModule.registerHooks;
179
+ if (typeof candidate !== "function") {
180
+ return undefined;
181
+ }
182
+ return candidate;
183
+ }
@@ -30,7 +30,7 @@ async function listMine(ctx, status) {
30
30
  status,
31
31
  continuationToken: conv.continuationToken,
32
32
  });
33
- return all.filter(r => r.channelId === conv.channelId);
33
+ return all.filter((r) => r.channelId === conv.channelId);
34
34
  }
35
35
  function toResult(r) {
36
36
  return {
@@ -100,7 +100,7 @@ const cancel = defineTool({
100
100
  id: z.string().min(1).describe("Reminder id from reminders_create or reminders_list."),
101
101
  }),
102
102
  async execute(input, ctx) {
103
- const mine = (await listMine(ctx)).find(r => r.id === input.id);
103
+ const mine = (await listMine(ctx)).find((r) => r.id === input.id);
104
104
  if (mine === undefined) {
105
105
  throw new Error(`No reminder "${input.id}" in this conversation.`);
106
106
  }
@@ -121,13 +121,13 @@ export async function runChat(options) {
121
121
  }
122
122
  write(c.dim("Type a message and press Enter. Ctrl-D or /quit to exit.\n\n"));
123
123
  const rl = createInterface({ input: process.stdin, output: process.stdout });
124
- await new Promise(resolve => {
124
+ await new Promise((resolve) => {
125
125
  const prompt = () => {
126
126
  rl.setPrompt(c.cyan("› "));
127
127
  rl.prompt();
128
128
  };
129
129
  prompt();
130
- rl.on("line", line => {
130
+ rl.on("line", (line) => {
131
131
  const text = line.trim();
132
132
  if (text === "") {
133
133
  prompt();
@@ -139,7 +139,7 @@ export async function runChat(options) {
139
139
  }
140
140
  rl.pause();
141
141
  runTurn(text, { echoUser: false })
142
- .catch(err => {
142
+ .catch((err) => {
143
143
  write(`${c.red("error")} ${describe(err)}\n\n`);
144
144
  })
145
145
  .finally(() => {
@@ -162,7 +162,7 @@ export async function lookupSessionContinuation(args) {
162
162
  baseUrl: args.baseUrl,
163
163
  auth: args.auth,
164
164
  });
165
- const match = sessions.find(s => s.sessionId === args.sessionId);
165
+ const match = sessions.find((s) => s.sessionId === args.sessionId);
166
166
  if (match === undefined) {
167
167
  throw new Error(`Session ${args.sessionId} not found in /v1/sessions (wrong id, or not owned by this caller). ` +
168
168
  `Pass --continuation-token if you have it.`);
@@ -199,7 +199,7 @@ async function attachSession(args) {
199
199
  }
200
200
  const lastIndex = events.length === 0
201
201
  ? -1
202
- : Math.max(...events.map(e => (typeof e.index === "number" ? e.index : -1)));
202
+ : Math.max(...events.map((e) => (typeof e.index === "number" ? e.index : -1)));
203
203
  return {
204
204
  sessionId: args.sessionId,
205
205
  continuationToken,