@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
@@ -1 +1 @@
1
- {"version":3,"file":"init-project.d.ts","sourceRoot":"","sources":["../../src/internal/init-project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAeH,OAAO,EAKL,KAAK,gBAAgB,EAEtB,MAAM,qBAAqB,CAAC;AAU7B,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;I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oBAAoB;IACnC,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,0BAA0B,GAAG,oBAAoB,CAAC;AAMnF;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM,CAkBrF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAgBzE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAErE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAQhF;AA0BD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,MAAM,EAAE,CAEX;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAsCrC"}
@@ -129,7 +129,7 @@ export async function initProject(options) {
129
129
  const overlayDir = options.overlayDir;
130
130
  const overlayPaths = overlayDir ? await listTemplateFiles(overlayDir) : [];
131
131
  const overlaySet = new Set(overlayPaths);
132
- const corePaths = (await listTemplateFiles(templateDir)).filter(rel => !overlaySet.has(rel));
132
+ const corePaths = (await listTemplateFiles(templateDir)).filter((rel) => !overlaySet.has(rel));
133
133
  const templateName = options.templateName ?? basename(templateDir);
134
134
  const initSpec = options.initSpec ?? (await loadTemplateInitSpec(templateDir));
135
135
  const answers = options.answers ?? {};
@@ -170,8 +170,8 @@ export async function initProject(options) {
170
170
  return {
171
171
  rootDir,
172
172
  files,
173
- created: files.filter(entry => entry.action === "create").map(entry => entry.path),
174
- skipped: files.filter(entry => entry.action === "exist").map(entry => entry.path),
173
+ created: files.filter((entry) => entry.action === "create").map((entry) => entry.path),
174
+ skipped: files.filter((entry) => entry.action === "exist").map((entry) => entry.path),
175
175
  };
176
176
  }
177
177
  async function listTemplateFiles(root) {
@@ -180,9 +180,9 @@ async function listTemplateFiles(root) {
180
180
  withFileTypes: true,
181
181
  });
182
182
  return entries
183
- .filter(entry => entry.isFile())
184
- .map(entry => posixRel(relative(root, join(entry.parentPath, entry.name))))
185
- .filter(rel => !isTemplateMetaPath(rel))
183
+ .filter((entry) => entry.isFile())
184
+ .map((entry) => posixRel(relative(root, join(entry.parentPath, entry.name))))
185
+ .filter((rel) => !isTemplateMetaPath(rel))
186
186
  .sort();
187
187
  }
188
188
  async function writeTemplateFile(input) {
@@ -286,7 +286,7 @@ async function resolveLinkedCli(commandName) {
286
286
  }
287
287
  async function npmGlobalPrefix() {
288
288
  const command = process.platform === "win32" ? "npm.cmd" : "npm";
289
- return await new Promise(resolvePromise => {
289
+ return await new Promise((resolvePromise) => {
290
290
  const child = spawn(command, ["prefix", "-g"], {
291
291
  stdio: ["ignore", "pipe", "ignore"],
292
292
  env: process.env,
@@ -297,7 +297,7 @@ async function npmGlobalPrefix() {
297
297
  out += chunk;
298
298
  });
299
299
  child.on("error", () => resolvePromise(undefined));
300
- child.on("close", code => {
300
+ child.on("close", (code) => {
301
301
  if (code !== 0) {
302
302
  resolvePromise(undefined);
303
303
  return;
@@ -342,7 +342,7 @@ async function defaultNpmInstallRunner(args) {
342
342
  child.stdout?.resume();
343
343
  }
344
344
  child.on("error", reject);
345
- child.on("close", code => {
345
+ child.on("close", (code) => {
346
346
  resolvePromise({ exitCode: code ?? 1, stderr });
347
347
  });
348
348
  });
@@ -356,7 +356,7 @@ function formatModelLiteral(model) {
356
356
  : `,
357
357
  params: [
358
358
  ${model.params
359
- .map(param => ` { id: ${JSON.stringify(param.id)}, value: ${JSON.stringify(param.value)} },`)
359
+ .map((param) => ` { id: ${JSON.stringify(param.id)}, value: ${JSON.stringify(param.value)} },`)
360
360
  .join("\n")}
361
361
  ]`;
362
362
  return `{
@@ -399,7 +399,7 @@ export function formatInitNextSteps(options) {
399
399
  lines.push("Next steps:");
400
400
  lines.push("");
401
401
  const steps = initNextStepEntries(options);
402
- const width = Math.max(...steps.map(step => step.command.length));
402
+ const width = Math.max(...steps.map((step) => step.command.length));
403
403
  for (const [index, step] of steps.entries()) {
404
404
  const command = step.note === undefined
405
405
  ? step.command
@@ -452,7 +452,7 @@ function initNextStepEntries(options) {
452
452
  * the host already has a Cursor credential).
453
453
  */
454
454
  export function initNextCommands(options) {
455
- return initNextStepEntries(options).map(step => step.command);
455
+ return initNextStepEntries(options).map((step) => step.command);
456
456
  }
457
457
  /**
458
458
  * Coding-agent setup guide printed by `bdk init`
@@ -35,7 +35,7 @@ function validateInput(tool, args) {
35
35
  }
36
36
  const issues = parsed.error?.issues ?? [];
37
37
  const message = issues
38
- .map(issue => {
38
+ .map((issue) => {
39
39
  const path = issue.path.join(".");
40
40
  return path === "" ? issue.message : `${path}: ${issue.message}`;
41
41
  })
@@ -150,7 +150,7 @@ export function serveInlineStdioMcp(serverName, definition, catalog) {
150
150
  const tools = definition.tools ?? {};
151
151
  let buffer = "";
152
152
  process.stdin.setEncoding("utf8");
153
- process.stdin.on("data", chunk => {
153
+ process.stdin.on("data", (chunk) => {
154
154
  buffer += chunk;
155
155
  let newline = buffer.indexOf("\n");
156
156
  while (newline !== -1) {
@@ -59,7 +59,7 @@ export function bdkCursorSkillsDir(skillsHome = cursorSkillsHome()) {
59
59
  return join(skillsHome, CURSOR_SKILLS_NAMESPACE);
60
60
  }
61
61
  function legacyCursorSkillsDirs(skillsHome) {
62
- return LEGACY_CURSOR_SKILLS_NAMESPACES.map(name => join(skillsHome, name));
62
+ return LEGACY_CURSOR_SKILLS_NAMESPACES.map((name) => join(skillsHome, name));
63
63
  }
64
64
  /** Absolute install path for one skill: `…/bdk/<leafDir>`. */
65
65
  export function skillInstallPath(skill, skillsHome = cursorSkillsHome()) {
@@ -183,7 +183,7 @@ async function addOwnerWrite(path) {
183
183
  }
184
184
  /** Installed leaf dirs the package no longer ships. Installing deletes these. */
185
185
  async function orphanLeaves(namespaceDir, skills) {
186
- const shipped = new Set(skills.map(skill => skill.leafDir));
186
+ const shipped = new Set(skills.map((skill) => skill.leafDir));
187
187
  let entries;
188
188
  try {
189
189
  entries = await readdir(namespaceDir, { withFileTypes: true });
@@ -192,8 +192,8 @@ async function orphanLeaves(namespaceDir, skills) {
192
192
  return [];
193
193
  }
194
194
  return entries
195
- .filter(entry => entry.isDirectory() && !shipped.has(entry.name))
196
- .map(entry => entry.name);
195
+ .filter((entry) => entry.isDirectory() && !shipped.has(entry.name))
196
+ .map((entry) => entry.name);
197
197
  }
198
198
  /** Drop leftover earlier install folders so stale skill ids are not discovered. */
199
199
  async function removeLegacyCursorSkillsNamespaces(skillsHome) {
@@ -265,7 +265,7 @@ function withAlwaysApply(frontmatter) {
265
265
  }
266
266
  const without = frontmatter
267
267
  .split(/\r?\n/)
268
- .filter(line => !/^\s*alwaysApply\s*:/.test(line))
268
+ .filter((line) => !/^\s*alwaysApply\s*:/.test(line))
269
269
  .join("\n")
270
270
  .replace(/\n+$/, "");
271
271
  if (without === "") {
@@ -291,8 +291,8 @@ export async function planSkillInstall(options) {
291
291
  shipped,
292
292
  skillsHome,
293
293
  directory,
294
- leaves: shipped.map(skill => skill.leafDir),
295
- firstInstall: present.every(isPresent => !isPresent),
294
+ leaves: shipped.map((skill) => skill.leafDir),
295
+ firstInstall: present.every((isPresent) => !isPresent),
296
296
  orphans: await orphanLeaves(directory, shipped),
297
297
  legacyDirs: await existingLegacyCursorSkillsDirs(skillsHome),
298
298
  };
@@ -336,7 +336,7 @@ export async function syncCursorSkillsOnPackageInstall(options = {}) {
336
336
  return { status: "skipped", reason: "no-skills" };
337
337
  }
338
338
  const result = await installCursorSkills(plan.shipped, plan.skillsHome);
339
- const out = options.out ?? (text => process.stderr.write(text));
339
+ const out = options.out ?? ((text) => process.stderr.write(text));
340
340
  out(formatSkillInstall(plan, result));
341
341
  return {
342
342
  status: "installed",
@@ -355,7 +355,7 @@ export async function syncCursorSkillsOnPackageInstall(options = {}) {
355
355
  * rather than blocking the caller — see `SKILL_PROMPT_TIMEOUT_MS`.
356
356
  */
357
357
  export async function offerInstallCursorSkills(options = {}) {
358
- const out = options.out ?? (text => process.stdout.write(text));
358
+ const out = options.out ?? ((text) => process.stdout.write(text));
359
359
  const interactive = options.interactive ?? (process.stdin.isTTY === true && process.stdout.isTTY === true);
360
360
  if (!interactive) {
361
361
  return { installed: [], skipped: true };
@@ -382,7 +382,7 @@ export async function offerInstallCursorSkills(options = {}) {
382
382
  out(c.dim(` (deletes leftover ${dir})\n`));
383
383
  }
384
384
  const confirm = options.confirm ??
385
- (q => promptYesNo(q, {
385
+ ((q) => promptYesNo(q, {
386
386
  defaultYes: true,
387
387
  out,
388
388
  timeoutMs: SKILL_PROMPT_TIMEOUT_MS,
@@ -428,7 +428,7 @@ export async function promptYesNo(question, options) {
428
428
  }
429
429
  /** The line, or `undefined` when the stream ends or the clock runs out first. */
430
430
  function readOneLine(stream, timeoutMs) {
431
- return new Promise(resolve => {
431
+ return new Promise((resolve) => {
432
432
  let buffer = "";
433
433
  let timer;
434
434
  const onData = (chunk) => {
@@ -67,7 +67,7 @@ export function validateToolInput(inputSchema, args) {
67
67
  return { ok: true, value: parsed.data };
68
68
  }
69
69
  const issues = parsed.error.issues
70
- .map(issue => {
70
+ .map((issue) => {
71
71
  const path = issue.path.join(".");
72
72
  return path === "" ? issue.message : `${path}: ${issue.message}`;
73
73
  })
@@ -29,7 +29,7 @@ export async function createLocalControlPlane(opts) {
29
29
  const store = opts.stateDir === undefined ? undefined : new ReminderStore(join(opts.stateDir, "reminders"));
30
30
  const schedules = new Map();
31
31
  const reminderTimers = new Map();
32
- const reminders = new Map(((await store?.list()) ?? []).map(record => [
32
+ const reminders = new Map(((await store?.list()) ?? []).map((record) => [
33
33
  record.id,
34
34
  { ...record, generation: record.generation ?? 0 },
35
35
  ]));
@@ -68,7 +68,7 @@ export async function createLocalControlPlane(opts) {
68
68
  if (!cron.matches(now)) {
69
69
  continue;
70
70
  }
71
- void opts.fireSchedule(name).catch(error => {
71
+ void opts.fireSchedule(name).catch((error) => {
72
72
  logger(`[bdk] schedule "${name}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
73
73
  });
74
74
  }
@@ -90,7 +90,7 @@ export async function createLocalControlPlane(opts) {
90
90
  const delay = Math.min(MAX_TIMER_MS, Math.max(0, record.nextFireAtMs - Date.now()));
91
91
  const timer = setTimeout(() => {
92
92
  reminderTimers.delete(record.id);
93
- void onReminderDue(record.id).catch(error => {
93
+ void onReminderDue(record.id).catch((error) => {
94
94
  logger(`[bdk] reminder "${record.id}" dispatch failed: ${error instanceof Error ? error.message : String(error)}`);
95
95
  });
96
96
  }, delay);
@@ -25,7 +25,7 @@ export function loadAgentLocalEnv(dir) {
25
25
  loaded.push(path);
26
26
  };
27
27
  const trackLoadedKeys = () => {
28
- fileLoadedKeys = new Set(Object.keys(process.env).filter(key => !realKeys.has(key)));
28
+ fileLoadedKeys = new Set(Object.keys(process.env).filter((key) => !realKeys.has(key)));
29
29
  };
30
30
  const tryLoadDir = (agentDir) => {
31
31
  // `.env.local` first so its values win over checked-in `.env` defaults
@@ -37,8 +37,8 @@ export function loadAgentLocalEnv(dir) {
37
37
  let children;
38
38
  try {
39
39
  children = readdirSync(dir, { withFileTypes: true })
40
- .filter(entry => entry.isDirectory() && !entry.name.startsWith("."))
41
- .map(entry => entry.name);
40
+ .filter((entry) => entry.isDirectory() && !entry.name.startsWith("."))
41
+ .map((entry) => entry.name);
42
42
  }
43
43
  catch {
44
44
  trackLoadedKeys();
@@ -25,7 +25,7 @@ export function createLogRing(options = {}) {
25
25
  if (entries.length === 0) {
26
26
  return [];
27
27
  }
28
- const start = entries.findIndex(e => e.index > after);
28
+ const start = entries.findIndex((e) => e.index > after);
29
29
  if (start < 0) {
30
30
  return [];
31
31
  }
@@ -404,7 +404,7 @@ async function sleepMs(ms, signal) {
404
404
  if (isAborted(signal)) {
405
405
  return;
406
406
  }
407
- await new Promise(resolve => {
407
+ await new Promise((resolve) => {
408
408
  const timer = setTimeout(() => {
409
409
  signal?.removeEventListener("abort", onAbort);
410
410
  resolve();
@@ -90,7 +90,7 @@ export async function handleStatelessMcpRequest(args) {
90
90
  /** Tool names the MCP surface exposes for `project` (info projection). */
91
91
  export function mcpEndpointToolNames(project) {
92
92
  const names = ["ask", "check"];
93
- if (project.agent.tools.some(tool => tool.execution === "server")) {
93
+ if (project.agent.tools.some((tool) => tool.execution === "server")) {
94
94
  names.push("call_tool");
95
95
  }
96
96
  return names;
@@ -137,9 +137,9 @@ function buildToolMcpServer(engine, sessionId) {
137
137
  capabilities: { tools: {} },
138
138
  instructions: "Direct tools implemented by the AgentSDK deployment for its active cloud turn.",
139
139
  });
140
- const tools = engine.project.agent.tools.filter(tool => tool.execution === "server");
140
+ const tools = engine.project.agent.tools.filter((tool) => tool.execution === "server");
141
141
  server.setRequestHandler(ListToolsRequestSchema, () => Promise.resolve({
142
- tools: tools.map(tool => ({
142
+ tools: tools.map((tool) => ({
143
143
  name: tool.name,
144
144
  description: tool.description,
145
145
  inputSchema: tool.inputSchema,
@@ -150,7 +150,7 @@ function buildToolMcpServer(engine, sessionId) {
150
150
  if (sessionId === null || sessionId === "") {
151
151
  return errorResult("Missing AgentSDK session binding.");
152
152
  }
153
- const tool = tools.find(candidate => candidate.name === request.params.name);
153
+ const tool = tools.find((candidate) => candidate.name === request.params.name);
154
154
  if (tool === undefined) {
155
155
  return errorResult(`Unknown server tool "${request.params.name}".`);
156
156
  }
@@ -203,7 +203,7 @@ function buildConnectionBridgeMcpServer(engine, sessionId, connectionName) {
203
203
  }
204
204
  const tools = await engine.runWithMcpPark(sessionId ?? "", "tools/list", () => engine.host.mcp.listTools(connectionName));
205
205
  return {
206
- tools: tools.map(tool => ({
206
+ tools: tools.map((tool) => ({
207
207
  name: tool.name,
208
208
  ...(tool.description === undefined ? {} : { description: tool.description }),
209
209
  inputSchema: tool.inputSchema ?? { type: "object" },
@@ -303,11 +303,11 @@ function buildAgentMcpServer(engine, auth) {
303
303
  return errorResult(describeError(error));
304
304
  }
305
305
  });
306
- const serverTools = agent.tools.filter(tool => tool.execution === "server");
306
+ const serverTools = agent.tools.filter((tool) => tool.execution === "server");
307
307
  if (serverTools.length > 0) {
308
308
  server.registerTool("call_tool", {
309
309
  description: `Call one of this agent's deterministic server tools directly (no model turn decides anything). Available tools: ${serverTools
310
- .map(tool => tool.name)
310
+ .map((tool) => tool.name)
311
311
  .join(", ")}.`,
312
312
  inputSchema: {
313
313
  toolName: z.string().describe("Name of the server tool to call."),
@@ -543,7 +543,7 @@ function raceTimeout(promise, ms) {
543
543
  const timer = setTimeout(() => {
544
544
  resolve(undefined);
545
545
  }, ms);
546
- promise.then(value => {
546
+ promise.then((value) => {
547
547
  clearTimeout(timer);
548
548
  resolve(value);
549
549
  }, (error) => {
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-host.d.ts","sourceRoot":"","sources":["../../src/internal/mcp-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAOH,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACxB,MAAM,aAAa,CAAC;AASrB,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B,YAAY,UAAU,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAS9C;CACF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,O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gF;IAChF,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAErC;IAED;;;OAGG;IACH,aAAa,CAAC,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAEpD;IAED,KAAK,IAAI,MAAM,EAAE,CAEhB;IAEK,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAUlE;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,UAAU,EAAE,oBAAoB,GAAG,aAAa,CAwCtD;IAEK,QAAQ,CACZ,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACjC,OAAO,CAAC,iBAAiB,CAAC,CAa5B;IAEK,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW5C;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAY3B;IAED;;;;;;;;OAQG;YACW,UAAU;IAcxB;;;;;OAKG;IACH,OAAO,CAAC,SAAS;YAwBH,gBAAgB;IAc9B,OAAO,CAAC,iBAAiB;YASX,OAAO;CAGtB;AASD,+BAA+B;AAC/B,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAU9D;AAKD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,OAAO,GAAG,kBAAkB,GAAG,SAAS,CAqB3F"}
@@ -36,7 +36,7 @@ export function hostMcpCallNeedsAuth(result) {
36
36
  if (result.isError !== true) {
37
37
  return false;
38
38
  }
39
- const text = result.content.map(part => (part.type === "text" ? part.text : "")).join("\n");
39
+ const text = result.content.map((part) => (part.type === "text" ? part.text : "")).join("\n");
40
40
  return text.includes("needsAuth") || text.includes("needs authorization");
41
41
  }
42
42
  function throwIfCallNeedsAuth(connection, result) {
@@ -73,7 +73,7 @@ export class McpHost {
73
73
  const listed = await client.listTools(mcpListParams());
74
74
  return listed.tools
75
75
  .map(toToolInfo)
76
- .filter(tool => connectionAllowsTool(connection, tool.name));
76
+ .filter((tool) => connectionAllowsTool(connection, tool.name));
77
77
  }));
78
78
  }
79
79
  /**
@@ -101,7 +101,7 @@ export class McpHost {
101
101
  const listed = await client.listTools(mcpListParams());
102
102
  return listed.tools
103
103
  .map(toToolInfo)
104
- .filter(tool => connectionAllowsTool(connection, tool.name));
104
+ .filter((tool) => connectionAllowsTool(connection, tool.name));
105
105
  })),
106
106
  callTool: (toolName, args = {}) => {
107
107
  assertConnectionAllowsTool(connection, toolName);
@@ -146,7 +146,7 @@ export class McpHost {
146
146
  }
147
147
  }
148
148
  async close() {
149
- const opened = await Promise.allSettled([...this.clients.values()].map(entry => entry.opened));
149
+ const opened = await Promise.allSettled([...this.clients.values()].map((entry) => entry.opened));
150
150
  this.clients.clear();
151
151
  await Promise.allSettled(opened.map(async (settled) => {
152
152
  if (settled.status === "fulfilled") {
@@ -196,7 +196,7 @@ export class McpHost {
196
196
  // replaced would otherwise orphan the client that replaced it.
197
197
  const entry = {
198
198
  credentials,
199
- opened: this.connect(name).catch(error => {
199
+ opened: this.connect(name).catch((error) => {
200
200
  if (this.clients.get(name) === entry) {
201
201
  this.clients.delete(name);
202
202
  }
@@ -27,7 +27,7 @@ export async function beginHostMcpOauth(args) {
27
27
  resourceUrl: args.url,
28
28
  store: args.store,
29
29
  redirectUrl: args.redirectUrl,
30
- onRedirect: url => {
30
+ onRedirect: (url) => {
31
31
  authorizationUrl = url;
32
32
  },
33
33
  });
@@ -109,10 +109,10 @@ export class McpOauthOnDemandHub {
109
109
  return { authUrl: started.authUrl, state: started.state };
110
110
  }
111
111
  async abortCall(sessionId, callId) {
112
- await this.dropWhere(attempt => attempt.sessionId === sessionId && attempt.callId === callId, true);
112
+ await this.dropWhere((attempt) => attempt.sessionId === sessionId && attempt.callId === callId, true);
113
113
  }
114
114
  async abortSession(sessionId) {
115
- await this.dropWhere(attempt => attempt.sessionId === sessionId, false);
115
+ await this.dropWhere((attempt) => attempt.sessionId === sessionId, false);
116
116
  }
117
117
  async close() {
118
118
  await this.dropWhere(() => true, true);
@@ -83,12 +83,12 @@ export class FileMcpOAuthStore {
83
83
  return (await this.entryFor(id, resourceUrl))?.clientInfo;
84
84
  }
85
85
  async saveTokens(id, resourceUrl, tokens) {
86
- await this.update(id, resourceUrl, entry => {
86
+ await this.update(id, resourceUrl, (entry) => {
87
87
  entry.tokens = tokens;
88
88
  });
89
89
  }
90
90
  async saveClientInformation(id, resourceUrl, clientInfo) {
91
- await this.update(id, resourceUrl, entry => {
91
+ await this.update(id, resourceUrl, (entry) => {
92
92
  entry.clientInfo = clientInfo;
93
93
  });
94
94
  }
@@ -126,7 +126,7 @@ export class FileMcpOAuthStore {
126
126
  if (this.cache !== undefined) {
127
127
  return this.cache;
128
128
  }
129
- this.loading ??= this.readDisk().then(data => {
129
+ this.loading ??= this.readDisk().then((data) => {
130
130
  this.cache = data;
131
131
  return data;
132
132
  });
@@ -161,7 +161,7 @@ export class FileMcpOAuthStore {
161
161
  async withLock(fn) {
162
162
  const prev = locks.get(this.path) ?? Promise.resolve();
163
163
  let release;
164
- locks.set(this.path, new Promise(resolve => {
164
+ locks.set(this.path, new Promise((resolve) => {
165
165
  release = resolve;
166
166
  }));
167
167
  try {
@@ -368,7 +368,7 @@ export async function waitForMcpOAuthCallback(args) {
368
368
  const timer = setTimeout(() => {
369
369
  finish(undefined, new Error(`Timed out waiting for OAuth callback on http://localhost:${port}${path}`));
370
370
  }, timeoutMs);
371
- server.on("error", error => {
371
+ server.on("error", (error) => {
372
372
  finish(undefined, new Error(`OAuth callback port ${port} failed: ${error instanceof Error ? error.message : String(error)}`));
373
373
  });
374
374
  server.listen(port, "127.0.0.1");
@@ -20,8 +20,8 @@ export function isLoopbackHostname(hostname) {
20
20
  if (ipv4 === null) {
21
21
  return false;
22
22
  }
23
- const octets = ipv4.slice(1, 5).map(part => Number(part));
24
- if (octets.some(octet => octet > 255)) {
23
+ const octets = ipv4.slice(1, 5).map((part) => Number(part));
24
+ if (octets.some((octet) => octet > 255)) {
25
25
  return false;
26
26
  }
27
27
  return octets[0] === 127;
@@ -49,7 +49,7 @@ export function resolveOtelConfig(input) {
49
49
  };
50
50
  const envExporters = exportersFromEnv(env);
51
51
  const exporters = merged.exporters !== undefined && merged.exporters.length > 0
52
- ? merged.exporters.map(e => withEnvHeaders(e, env))
52
+ ? merged.exporters.map((e) => withEnvHeaders(e, env))
53
53
  : envExporters;
54
54
  const optedIn = input.authored !== undefined || input.serve !== undefined || envExporters.length > 0;
55
55
  if (!optedIn) {
@@ -96,7 +96,7 @@ export function stripSignalPath(url) {
96
96
  }
97
97
  /** Exporters that apply to one signal (honors per-exporter `signals`). */
98
98
  export function exportersForSignal(exporters, signal) {
99
- return exporters.filter(exporter => exporter.signals === undefined || exporter.signals.includes(signal));
99
+ return exporters.filter((exporter) => exporter.signals === undefined || exporter.signals.includes(signal));
100
100
  }
101
101
  function disabled() {
102
102
  return {
@@ -210,7 +210,7 @@ function stable(value) {
210
210
  const obj = value;
211
211
  return `{${Object.keys(obj)
212
212
  .sort()
213
- .map(key => `${JSON.stringify(key)}:${stable(obj[key])}`)
213
+ .map((key) => `${JSON.stringify(key)}:${stable(obj[key])}`)
214
214
  .join(",")}}`;
215
215
  }
216
216
  function nonEmpty(value) {
@@ -75,7 +75,7 @@ export async function shutdownOtelRuntime(runtime) {
75
75
  }
76
76
  export async function raceOtelForceFlush(work, log, timeoutMs = OTEL_FORCE_FLUSH_TIMEOUT_MS) {
77
77
  let timer;
78
- const timeout = new Promise(resolve => {
78
+ const timeout = new Promise((resolve) => {
79
79
  timer = setTimeout(() => resolve("timeout"), timeoutMs);
80
80
  });
81
81
  const result = await Promise.race([
@@ -91,11 +91,11 @@ export async function raceOtelForceFlush(work, log, timeoutMs = OTEL_FORCE_FLUSH
91
91
  }
92
92
  function startOtelSdk(config, logger, resolveExport) {
93
93
  diag.setLogger({
94
- verbose: m => logger(`[bdk:otel] ${m}`),
95
- debug: m => logger(`[bdk:otel] ${m}`),
96
- info: m => logger(`[bdk:otel] ${m}`),
97
- warn: m => logger(`[bdk:otel] warn: ${m}`),
98
- error: m => logger(`[bdk:otel] error: ${m}`),
94
+ verbose: (m) => logger(`[bdk:otel] ${m}`),
95
+ debug: (m) => logger(`[bdk:otel] ${m}`),
96
+ info: (m) => logger(`[bdk:otel] ${m}`),
97
+ warn: (m) => logger(`[bdk:otel] warn: ${m}`),
98
+ error: (m) => logger(`[bdk:otel] error: ${m}`),
99
99
  }, DiagLogLevel.ERROR);
100
100
  const resource = buildResource(config);
101
101
  let tracerProvider;
@@ -136,7 +136,7 @@ function startOtelSdk(config, logger, resolveExport) {
136
136
  const exportIntervalMillis = metricOpts.exportIntervalMillis ?? 10_000;
137
137
  const provider = new MeterProvider({
138
138
  resource,
139
- readers: exporters.map(exporter => new PeriodicExportingMetricReader({
139
+ readers: exporters.map((exporter) => new PeriodicExportingMetricReader({
140
140
  exporter: createMetricExporter(exporter, signalUrl(exporter.url, "metrics")),
141
141
  exportIntervalMillis,
142
142
  })),
@@ -155,7 +155,7 @@ function startOtelSdk(config, logger, resolveExport) {
155
155
  if (exporters.length > 0) {
156
156
  const provider = new LoggerProvider({
157
157
  resource,
158
- processors: exporters.map(exporter => new BatchLogRecordProcessor(createLogExporter(exporter, signalUrl(exporter.url, "logs")))),
158
+ processors: exporters.map((exporter) => new BatchLogRecordProcessor(createLogExporter(exporter, signalUrl(exporter.url, "logs")))),
159
159
  });
160
160
  // api-logs returns the active provider (ours on success, existing otherwise).
161
161
  if (logs.setGlobalLoggerProvider(provider) === provider) {
@@ -226,22 +226,22 @@ function withExportResource(span, resource) {
226
226
  });
227
227
  }
228
228
  async function exportQueuedSpans(spans, destinations, logger, resource) {
229
- const payload = spans.map(span => withExportResource(span, resource));
230
- const exporters = destinations.map(destination => createTraceExporter(destination, signalUrl(destination.url, "traces")));
229
+ const payload = spans.map((span) => withExportResource(span, resource));
230
+ const exporters = destinations.map((destination) => createTraceExporter(destination, signalUrl(destination.url, "traces")));
231
231
  try {
232
- const results = await Promise.all(exporters.map(exporter => new Promise(resolve => {
232
+ const results = await Promise.all(exporters.map((exporter) => new Promise((resolve) => {
233
233
  exporter.export(payload, (result) => {
234
234
  resolve(result.code === ExportResultCode.SUCCESS);
235
235
  });
236
236
  })));
237
- return results.every(ok => ok);
237
+ return results.every((ok) => ok);
238
238
  }
239
239
  catch (error) {
240
240
  logger(`[bdk:otel] deferred export failed: ${error instanceof Error ? error.message : String(error)}`);
241
241
  return false;
242
242
  }
243
243
  finally {
244
- await Promise.allSettled(exporters.map(exporter => exporter.shutdown()));
244
+ await Promise.allSettled(exporters.map((exporter) => exporter.shutdown()));
245
245
  }
246
246
  }
247
247
  function buildResource(config) {
@@ -18,7 +18,7 @@ import { MCP_ENDPOINT_PATH } from "./mcp-endpoint.js";
18
18
  * self-references (an agent asking itself recurses forever).
19
19
  */
20
20
  export function collectPeerConnections(mounts) {
21
- const knownSlugs = new Set(mounts.map(({ slug }) => slug).filter(slug => slug !== ""));
21
+ const knownSlugs = new Set(mounts.map(({ slug }) => slug).filter((slug) => slug !== ""));
22
22
  const bySlug = new Map();
23
23
  for (const { slug, project } of mounts) {
24
24
  const refs = [];
@@ -57,7 +57,7 @@ export function resolvePeerConnections(args) {
57
57
  const serverBase = trimTrailingSlash(args.serverUrl);
58
58
  const publicBase = args.publicUrl === undefined ? undefined : trimTrailingSlash(args.publicUrl);
59
59
  const headers = args.authToken === undefined ? undefined : { authorization: `Bearer ${args.authToken}` };
60
- return args.refs.map(ref => ({
60
+ return args.refs.map((ref) => ({
61
61
  name: ref.name,
62
62
  localUrl: `${serverBase}/${ref.targetSlug}${MCP_ENDPOINT_PATH}`,
63
63
  ...(publicBase === undefined