@cursor/bdk 0.2.25 → 0.2.26

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 (433) hide show
  1. package/AGENTS.md +3 -18
  2. package/CHANGELOG.md +3 -0
  3. package/dist/artifacts.d.ts +1 -1
  4. package/dist/artifacts.js +1 -1
  5. package/dist/bin/agent-serve.js +25 -21
  6. package/dist/channels/bitbucket/api.d.ts +2 -2
  7. package/dist/channels/bitbucket/api.d.ts.map +1 -1
  8. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  9. package/dist/channels/bitbucket/bitbucket-webhook.d.ts +2 -2
  10. package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -1
  11. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  12. package/dist/channels/deployments/deployments-channel.js +1 -1
  13. package/dist/channels/github/cursor-account.d.ts +7 -0
  14. package/dist/channels/github/cursor-account.d.ts.map +1 -1
  15. package/dist/channels/github/cursor-account.js +22 -5
  16. package/dist/channels/github/github-channel.js +1 -1
  17. package/dist/channels/github/replay.d.ts +1 -1
  18. package/dist/channels/github/replay.d.ts.map +1 -1
  19. package/dist/channels/gitlab/api.d.ts +2 -2
  20. package/dist/channels/gitlab/api.d.ts.map +1 -1
  21. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  22. package/dist/channels/issues/issues-channel.js +1 -1
  23. package/dist/channels/origin/api.d.ts +4 -4
  24. package/dist/channels/origin/api.d.ts.map +1 -1
  25. package/dist/channels/origin/origin-channel.js +1 -1
  26. package/dist/channels/origin/origin-webhook.d.ts +3 -3
  27. package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
  28. package/dist/channels/pagerduty/pagerduty-webhook.d.ts +2 -2
  29. package/dist/channels/pagerduty/pagerduty-webhook.d.ts.map +1 -1
  30. package/dist/channels/runs/runs-channel.js +1 -1
  31. package/dist/channels/slack/agentic-delivery.d.ts +2 -1
  32. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
  33. package/dist/channels/slack/agentic-delivery.js +6 -10
  34. package/dist/channels/slack/agentic-signals.d.ts +2 -7
  35. package/dist/channels/slack/agentic-signals.d.ts.map +1 -1
  36. package/dist/channels/slack/agentic-signals.js +4 -3
  37. package/dist/channels/slack/api.d.ts +1 -0
  38. package/dist/channels/slack/api.d.ts.map +1 -1
  39. package/dist/channels/slack/api.js +3 -0
  40. package/dist/channels/slack/constants.d.ts +2 -0
  41. package/dist/channels/slack/constants.d.ts.map +1 -1
  42. package/dist/channels/slack/constants.js +2 -0
  43. package/dist/channels/slack/defaults.d.ts.map +1 -1
  44. package/dist/channels/slack/defaults.js +3 -2
  45. package/dist/channels/slack/dispatch.d.ts +9 -0
  46. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  47. package/dist/channels/slack/dispatch.js +3 -0
  48. package/dist/channels/slack/inbound.d.ts.map +1 -1
  49. package/dist/channels/slack/inbound.js +24 -20
  50. package/dist/channels/slack/interactive.d.ts +2 -0
  51. package/dist/channels/slack/interactive.d.ts.map +1 -1
  52. package/dist/channels/slack/interactive.js +1 -0
  53. package/dist/channels/slack/live-delivery.d.ts +3 -0
  54. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  55. package/dist/channels/slack/live-delivery.js +5 -0
  56. package/dist/channels/slack/reply-options.d.ts +9 -0
  57. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  58. package/dist/channels/slack/reply-options.js +31 -1
  59. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  60. package/dist/channels/slack/slack-channel.js +7 -0
  61. package/dist/channels/slack/stream.d.ts +5 -1
  62. package/dist/channels/slack/stream.d.ts.map +1 -1
  63. package/dist/channels/slack/types.d.ts +29 -0
  64. package/dist/channels/slack/types.d.ts.map +1 -1
  65. package/dist/channels.d.ts +1 -1
  66. package/dist/channels.js +1 -1
  67. package/dist/docs/404.html +3 -3
  68. package/dist/docs/assets/{app.BjS1QEI4.js → app.BITbgXMP.js} +4 -4
  69. package/dist/docs/assets/changelog.md.sdD6ctqK.js +1 -0
  70. package/dist/docs/assets/changelog.md.sdD6ctqK.lean.js +1 -0
  71. package/dist/docs/assets/chunks/@localSearchIndexroot.B45uCZp9.js +1 -0
  72. package/dist/docs/assets/chunks/{VPLocalSearchBox.BOuvjb5Y.js → VPLocalSearchBox.3qo4-bX9.js} +2 -2
  73. package/dist/docs/assets/chunks/{arc.3WR6Jf-y.js → arc.CTrZocKU.js} +1 -1
  74. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.Dtb6Dqh6.js → architectureDiagram-Q4EWVU46.BkgIqxrv.js} +1 -1
  75. package/dist/docs/assets/chunks/{baseUniq.BUyrgrZE.js → baseUniq.5w0JfVgo.js} +1 -1
  76. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BVLV_voZ.js → blockDiagram-DXYQGD6D.BVLtPjQc.js} +1 -1
  77. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.jXJ1q70M.js → c4Diagram-AHTNJAMY.CQ7neZTW.js} +1 -1
  78. package/dist/docs/assets/chunks/channel.Cv2w64wj.js +1 -0
  79. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.zz1SMBvK.js → chunk-4BX2VUAB.D-hJ7uKM.js} +1 -1
  80. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.CzYKuv3I.js → chunk-4TB4RGXK.RBYX5ywX.js} +1 -1
  81. package/dist/docs/assets/chunks/{chunk-55IACEB6.C7_tcJZD.js → chunk-55IACEB6.Br05HoEb.js} +1 -1
  82. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DeTwQPVO.js → chunk-EDXVE4YY.BD_7QS60.js} +1 -1
  83. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DhMTl7ut.js → chunk-FMBD7UC4.BOPnMabX.js} +1 -1
  84. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Me7f5hEp.js → chunk-OYMX7WX6.DmGIdP8i.js} +1 -1
  85. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D0E0Bb6g.js → chunk-QZHKN3VN.CGHmolCB.js} +1 -1
  86. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CdOOBFYL.js → chunk-YZCP3GAM.C_Uhs25v.js} +1 -1
  87. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CtO2atCr.js +1 -0
  88. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CtO2atCr.js +1 -0
  89. package/dist/docs/assets/chunks/clone.hfsCtgP4.js +1 -0
  90. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BNbGESzN.js → cose-bilkent-S5V4N54A.DsU6xpcZ.js} +1 -1
  91. package/dist/docs/assets/chunks/{dagre-KV5264BT.zU7Lu_xJ.js → dagre-KV5264BT.BqQLDcoU.js} +1 -1
  92. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.B9qOdE5h.js → diagram-5BDNPKRD.Cgv8uUNF.js} +1 -1
  93. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.D8X-sf77.js → diagram-G4DWMVQ6.BXHPSXh_.js} +1 -1
  94. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.CW7MvMlE.js → diagram-MMDJMWI5.CgJzo8f_.js} +1 -1
  95. package/dist/docs/assets/chunks/{diagram-TYMM5635.J489G0Nd.js → diagram-TYMM5635.CfiN6lgT.js} +1 -1
  96. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BkW7tGfs.js → erDiagram-SMLLAGMA.8n_hHzAd.js} +1 -1
  97. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.jc9iWORD.js → flowDiagram-DWJPFMVM.B2pb1Dv_.js} +1 -1
  98. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.B-UQfd9E.js → ganttDiagram-T4ZO3ILL.BFih4ucI.js} +1 -1
  99. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DFzrTSlJ.js → gitGraphDiagram-UUTBAWPF.CqZ8PTl8.js} +1 -1
  100. package/dist/docs/assets/chunks/{graph.C5IB6_e_.js → graph.0ufsI9gu.js} +1 -1
  101. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DwF0-c8L.js → infoDiagram-42DDH7IO.BkPRFww4.js} +1 -1
  102. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.fBaTqzE7.js → ishikawaDiagram-UXIWVN3A.DCRK-cVX.js} +1 -1
  103. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CM8gDVJy.js → journeyDiagram-VCZTEJTY.BFyAJo33.js} +1 -1
  104. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.YiD1p0LB.js → kanban-definition-6JOO6SKY.CmA2SoGc.js} +1 -1
  105. package/dist/docs/assets/chunks/{layout.6Um-DVJT.js → layout.CYY-CbMr.js} +1 -1
  106. package/dist/docs/assets/chunks/{linear.DcTeg4Hn.js → linear.DeeDV4Oq.js} +1 -1
  107. package/dist/docs/assets/chunks/{min.CIxkY8Fe.js → min.BL3XTBN2.js} +1 -1
  108. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.D4QM_voR.js → mindmap-definition-QFDTVHPH.BcbY-G6H.js} +1 -1
  109. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.nmB309G1.js → pieDiagram-DEJITSTG.dzDcQnPE.js} +1 -1
  110. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.D1HtZR3C.js → quadrantDiagram-34T5L4WZ.RxR0m5iK.js} +1 -1
  111. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CZgQWob-.js → requirementDiagram-MS252O5E.DflaXb6Q.js} +1 -1
  112. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DtiBfU-P.js → sankeyDiagram-XADWPNL6.BteLKQAe.js} +1 -1
  113. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.Cld4gDSt.js → sequenceDiagram-FGHM5R23.BD8jM8oz.js} +1 -1
  114. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DatP823_.js → stateDiagram-FHFEXIEX.C8SBkbPH.js} +1 -1
  115. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.BLz7Qyo3.js +1 -0
  116. package/dist/docs/assets/chunks/{theme.D5jbBys7.js → theme.DiViIOLe.js} +2 -2
  117. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.DwQLI2be.js → timeline-definition-GMOUNBTQ.D64XF5dV.js} +1 -1
  118. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.a5yMfnsa.js → vennDiagram-DHZGUBPP.CwmeYan-.js} +1 -1
  119. package/dist/docs/assets/chunks/{wardley-RL74JXVD.B-FXivgT.js → wardley-RL74JXVD.DmAlXlpu.js} +1 -1
  120. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Dz--Opy3.js → wardleyDiagram-NUSXRM2D.5VJ2-5K0.js} +1 -1
  121. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.Dl8w8TeT.js → xychartDiagram-5P7HB3ND.Cl6_fZVC.js} +1 -1
  122. package/dist/docs/assets/{guides_hooks.md.Bfj0pK91.js → guides_hooks.md.B2XfGX50.js} +7 -3
  123. package/dist/docs/assets/{guides_mcp-oauth.md.BM_eFC0L.js → guides_mcp-oauth.md.Cxq2TxBB.js} +3 -3
  124. package/dist/docs/assets/{guides_mcp-oauth.md.BM_eFC0L.lean.js → guides_mcp-oauth.md.Cxq2TxBB.lean.js} +1 -1
  125. package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.js +37 -0
  126. package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.lean.js +1 -0
  127. package/dist/docs/assets/{guides_slack.md.Bn-WupSE.js → guides_slack.md.ClIyi7FI.js} +8 -3
  128. package/dist/docs/assets/{guides_slack.md.Bn-WupSE.lean.js → guides_slack.md.ClIyi7FI.lean.js} +1 -1
  129. package/dist/docs/assets/{reference_agent-config.md.IplwL25I.js → reference_agent-config.md.CGSx8COP.js} +6 -2
  130. package/dist/docs/assets/{reference_agent-config.md.IplwL25I.lean.js → reference_agent-config.md.CGSx8COP.lean.js} +1 -1
  131. package/dist/docs/assets/{reference_channels.md.Bxaa020x.js → reference_channels.md.CNNIS6K7.js} +1 -1
  132. package/dist/docs/assets/{reference_hooks.md.B1jq3oGl.js → reference_hooks.md.CROr0QgC.js} +13 -7
  133. package/dist/docs/assets/{reference_hooks.md.B1jq3oGl.lean.js → reference_hooks.md.CROr0QgC.lean.js} +1 -1
  134. package/dist/docs/assets/{reference_schedules.md.03Ryy9ca.js → reference_schedules.md.BqWnJES4.js} +3 -3
  135. package/dist/docs/assets/reference_sessions.md.Bi6lHttM.js +22 -0
  136. package/dist/docs/assets/reference_sessions.md.Bi6lHttM.lean.js +1 -0
  137. package/dist/docs/assets/{reference_skills.md.C2GWh7g8.js → reference_skills.md.Ckddg6KX.js} +3 -3
  138. package/dist/docs/assets/{reference_tools.md.-6pypsWt.js → reference_tools.md.Bo0UfT0a.js} +1 -1
  139. package/dist/docs/assets/{style.nMsabY-V.css → style.B9o0luvp.css} +1 -1
  140. package/dist/docs/building-with-agents.html +37 -37
  141. package/dist/docs/changelog.html +60 -0
  142. package/dist/docs/changelog.md +86 -0
  143. package/dist/docs/deployment.html +37 -37
  144. package/dist/docs/evals.html +37 -37
  145. package/dist/docs/guides/agent-to-agent.html +37 -37
  146. package/dist/docs/guides/bitbucket.html +37 -37
  147. package/dist/docs/guides/cloud-agents.html +37 -37
  148. package/dist/docs/guides/convert-automation.html +37 -37
  149. package/dist/docs/guides/export-grokbot.html +37 -37
  150. package/dist/docs/guides/github.html +37 -37
  151. package/dist/docs/guides/gitlab.html +37 -37
  152. package/dist/docs/guides/grokbot-agents.html +37 -37
  153. package/dist/docs/guides/hooks.html +45 -41
  154. package/dist/docs/guides/hooks.md +7 -3
  155. package/dist/docs/guides/improve.html +37 -37
  156. package/dist/docs/guides/jev.html +37 -37
  157. package/dist/docs/guides/mcp-oauth.html +39 -39
  158. package/dist/docs/guides/mcp-oauth.md +12 -0
  159. package/dist/docs/guides/migrate.html +37 -37
  160. package/dist/docs/guides/opentelemetry.html +62 -70
  161. package/dist/docs/guides/opentelemetry.md +149 -179
  162. package/dist/docs/guides/pagerduty.html +37 -37
  163. package/dist/docs/guides/slack.html +44 -39
  164. package/dist/docs/guides/slack.md +41 -0
  165. package/dist/docs/guides/webhooks.html +37 -37
  166. package/dist/docs/hashmap.json +1 -1
  167. package/dist/docs/hillclimbing.html +37 -37
  168. package/dist/docs/index.html +37 -37
  169. package/dist/docs/llms-full.txt +385 -193
  170. package/dist/docs/llms.txt +2 -1
  171. package/dist/docs/quickstart.html +37 -37
  172. package/dist/docs/reference/agent-config.html +42 -38
  173. package/dist/docs/reference/agent-config.md +21 -1
  174. package/dist/docs/reference/artifacts.html +37 -37
  175. package/dist/docs/reference/channels.html +38 -38
  176. package/dist/docs/reference/channels.md +5 -1
  177. package/dist/docs/reference/cli.html +37 -37
  178. package/dist/docs/reference/connections.html +37 -37
  179. package/dist/docs/reference/evals.html +37 -37
  180. package/dist/docs/reference/extensions.html +37 -37
  181. package/dist/docs/reference/hooks.html +49 -43
  182. package/dist/docs/reference/hooks.md +10 -5
  183. package/dist/docs/reference/http-api.html +37 -37
  184. package/dist/docs/reference/instructions.html +37 -37
  185. package/dist/docs/reference/memory.html +37 -37
  186. package/dist/docs/reference/playground.html +36 -36
  187. package/dist/docs/reference/project-layout.html +37 -37
  188. package/dist/docs/reference/prompt.html +37 -37
  189. package/dist/docs/reference/schedules.html +40 -40
  190. package/dist/docs/reference/sessions.html +58 -37
  191. package/dist/docs/reference/sessions.md +46 -1
  192. package/dist/docs/reference/skills.html +40 -40
  193. package/dist/docs/reference/subagents.html +37 -37
  194. package/dist/docs/reference/tools.html +39 -39
  195. package/dist/docs/reference/tools.md +3 -3
  196. package/dist/docs/templates/agentic-owners.html +37 -37
  197. package/dist/docs/templates/grokbot-agents.html +37 -37
  198. package/dist/docs/templates/security-reviewer.html +37 -37
  199. package/dist/docs/templates/thermo-quality-review.html +37 -37
  200. package/dist/docs/templates/thermo-review.html +37 -37
  201. package/dist/docs/templates/triage.html +37 -37
  202. package/dist/docs/troubleshooting.html +36 -36
  203. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  204. package/dist/extensions/cursor-cloud-agents/extension.js +15 -15
  205. package/dist/extensions/cursor-cloud-agents/lib/backend.js +1 -1
  206. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  207. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts +1 -1
  208. package/dist/extensions/cursor-cloud-agents/lib/inputs.d.ts.map +1 -1
  209. package/dist/extensions/cursor-cloud-agents/lib/inputs.js +1 -1
  210. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +1 -1
  211. package/dist/extensions/cursor-cloud-agents/tools/launch.js +1 -1
  212. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  213. package/dist/extensions/cursor-cloud-agents/tools/reply.js +1 -1
  214. package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +1 -1
  215. package/dist/extensions/cursor-grokbot-agents/extension.js +7 -3
  216. package/dist/extensions/cursor-grokbot-agents/lib/backend.js +1 -1
  217. package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +1 -1
  218. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +1 -1
  219. package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +1 -1
  220. package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +1 -1
  221. package/dist/extensions/cursor-grokbot-agents/tools/ask.js +1 -1
  222. package/dist/extensions/cursor-grokbot-agents/tools/check.js +1 -1
  223. package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +1 -1
  224. package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
  225. package/dist/extensions/improve/extension.js +1 -1
  226. package/dist/extensions/jev/extension.js +2 -2
  227. package/dist/extensions/jev/tools/evaluate.js +3 -3
  228. package/dist/extensions/slack-communication/extension.js +1 -1
  229. package/dist/extensions/slack-communication/tools/delete-message.js +1 -1
  230. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -1
  231. package/dist/extensions/slack-communication/tools/edit-message.js +3 -6
  232. package/dist/extensions/slack-communication/tools/post-card.js +1 -1
  233. package/dist/extensions/slack-communication/tools/post-file.js +1 -1
  234. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -1
  235. package/dist/extensions/slack-communication/tools/post-update.js +3 -6
  236. package/dist/extensions/slack-communication/tools/react.js +1 -1
  237. package/dist/extensions/slack-communication/tools/set-status.js +1 -1
  238. package/dist/extensions.d.ts +1 -1
  239. package/dist/extensions.js +1 -1
  240. package/dist/index.d.ts +14 -11
  241. package/dist/index.d.ts.map +1 -1
  242. package/dist/index.js +8 -4
  243. package/dist/internal/as-of.d.ts +2 -0
  244. package/dist/internal/as-of.d.ts.map +1 -1
  245. package/dist/internal/as-of.js +2 -0
  246. package/dist/internal/builtin-tools/reminders.js +1 -1
  247. package/dist/internal/cli-deploy.d.ts.map +1 -1
  248. package/dist/internal/cli-deploy.js +18 -10
  249. package/dist/internal/continuation.d.ts +3 -0
  250. package/dist/internal/continuation.d.ts.map +1 -0
  251. package/dist/internal/continuation.js +1 -0
  252. package/dist/internal/conversation-mirror.d.ts +5 -0
  253. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  254. package/dist/internal/conversation-mirror.js +12 -1
  255. package/dist/internal/convert-automation/convert-workflow.js +1 -1
  256. package/dist/internal/convert-grokbot/answers.d.ts.map +1 -1
  257. package/dist/internal/convert-grokbot/answers.js +10 -8
  258. package/dist/internal/convert-grokbot/recipe.d.ts +1 -1
  259. package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -1
  260. package/dist/internal/convert-grokbot/recipe.js +1 -1
  261. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  262. package/dist/internal/cursor/account-mcp.js +2 -0
  263. package/dist/internal/cursor/backend-client.d.ts +8 -3
  264. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  265. package/dist/internal/cursor/backend-client.js +8 -3
  266. package/dist/internal/cursor/credentials.d.ts +2 -2
  267. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  268. package/dist/internal/cursor/credentials.js +1 -1
  269. package/dist/internal/cursor-account-mcp-auth.d.ts +6 -2
  270. package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
  271. package/dist/internal/cursor-account-mcp-auth.js +15 -6
  272. package/dist/internal/deferred-channel-session.d.ts +5 -4
  273. package/dist/internal/deferred-channel-session.d.ts.map +1 -1
  274. package/dist/internal/deferred-channel-session.js +6 -4
  275. package/dist/internal/deploy-client.d.ts +5 -0
  276. package/dist/internal/deploy-client.d.ts.map +1 -1
  277. package/dist/internal/deploy-client.js +3 -3
  278. package/dist/internal/deploy-manifest.js +2 -2
  279. package/dist/internal/describe-error.d.ts +2 -0
  280. package/dist/internal/describe-error.d.ts.map +1 -1
  281. package/dist/internal/describe-error.js +2 -0
  282. package/dist/internal/discovery/context.d.ts.map +1 -1
  283. package/dist/internal/discovery/context.js +1 -2
  284. package/dist/internal/discovery/cursor-plugin.js +8 -8
  285. package/dist/internal/discovery/extensions.js +15 -8
  286. package/dist/internal/discovery/info.d.ts +2 -2
  287. package/dist/internal/discovery/info.d.ts.map +1 -1
  288. package/dist/internal/discovery/info.js +6 -9
  289. package/dist/internal/discovery/instrumentation.d.ts +10 -0
  290. package/dist/internal/discovery/instrumentation.d.ts.map +1 -0
  291. package/dist/internal/discovery/instrumentation.js +29 -0
  292. package/dist/internal/discovery/modules.d.ts.map +1 -1
  293. package/dist/internal/discovery/modules.js +4 -4
  294. package/dist/internal/discovery/project-public.d.ts +16 -0
  295. package/dist/internal/discovery/project-public.d.ts.map +1 -0
  296. package/dist/internal/discovery/project-public.js +54 -0
  297. package/dist/internal/discovery/project.d.ts.map +1 -1
  298. package/dist/internal/discovery/project.js +13 -3
  299. package/dist/internal/discovery/services.d.ts +5 -4
  300. package/dist/internal/discovery/services.d.ts.map +1 -1
  301. package/dist/internal/discovery/services.js +12 -6
  302. package/dist/internal/event-mapper.d.ts.map +1 -1
  303. package/dist/internal/event-mapper.js +1 -0
  304. package/dist/internal/factory-resource-channel.d.ts +1 -1
  305. package/dist/internal/factory-resource-channel.d.ts.map +1 -1
  306. package/dist/internal/filesystem/nearest.d.ts +1 -0
  307. package/dist/internal/filesystem/nearest.d.ts.map +1 -1
  308. package/dist/internal/filesystem/nearest.js +1 -0
  309. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  310. package/dist/internal/filesystem/tools.js +1 -1
  311. package/dist/internal/handleAgentServeTrigger.d.ts +10 -0
  312. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
  313. package/dist/internal/handleAgentServeTrigger.js +3 -0
  314. package/dist/internal/hmac-secret-values.d.ts +1 -1
  315. package/dist/internal/hmac-secret-values.d.ts.map +1 -1
  316. package/dist/internal/host-otel.d.ts +1 -1
  317. package/dist/internal/host-otel.d.ts.map +1 -1
  318. package/dist/internal/host-otel.js +5 -0
  319. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  320. package/dist/internal/hosted-delivery.js +6 -2
  321. package/dist/internal/http-channel.d.ts.map +1 -1
  322. package/dist/internal/http-channel.js +1 -0
  323. package/dist/internal/ids.d.ts +8 -0
  324. package/dist/internal/ids.d.ts.map +1 -1
  325. package/dist/internal/ids.js +20 -0
  326. package/dist/internal/init-scaffold.js +1 -1
  327. package/dist/internal/interview/agent-questions.d.ts +1 -1
  328. package/dist/internal/interview/agent-questions.d.ts.map +1 -1
  329. package/dist/internal/interview/agent-questions.js +1 -1
  330. package/dist/internal/interview/question.d.ts +2 -2
  331. package/dist/internal/interview/question.d.ts.map +1 -1
  332. package/dist/internal/interview/question.js +2 -2
  333. package/dist/internal/json-schema.d.ts.map +1 -1
  334. package/dist/internal/json-schema.js +3 -7
  335. package/dist/internal/mcp-endpoint.d.ts +16 -4
  336. package/dist/internal/mcp-endpoint.d.ts.map +1 -1
  337. package/dist/internal/mcp-endpoint.js +18 -6
  338. package/dist/internal/mcp-host.d.ts +9 -0
  339. package/dist/internal/mcp-host.d.ts.map +1 -1
  340. package/dist/internal/mcp-host.js +15 -0
  341. package/dist/internal/otel/collector.d.ts +5 -0
  342. package/dist/internal/otel/collector.d.ts.map +1 -1
  343. package/dist/internal/otel/collector.js +24 -5
  344. package/dist/internal/otel/config.d.ts +31 -21
  345. package/dist/internal/otel/config.d.ts.map +1 -1
  346. package/dist/internal/otel/config.js +121 -140
  347. package/dist/internal/otel/conversation-span-processor.d.ts +9 -0
  348. package/dist/internal/otel/conversation-span-processor.d.ts.map +1 -0
  349. package/dist/internal/otel/conversation-span-processor.js +34 -0
  350. package/dist/internal/otel/customer.d.ts +52 -0
  351. package/dist/internal/otel/customer.d.ts.map +1 -0
  352. package/dist/internal/otel/customer.js +727 -0
  353. package/dist/internal/otel/runtime.d.ts +12 -16
  354. package/dist/internal/otel/runtime.d.ts.map +1 -1
  355. package/dist/internal/otel/runtime.js +30 -234
  356. package/dist/internal/otel-env.d.ts +6 -0
  357. package/dist/internal/otel-env.d.ts.map +1 -0
  358. package/dist/internal/otel-env.js +5 -0
  359. package/dist/internal/reminder-runner.d.ts +9 -4
  360. package/dist/internal/reminder-runner.d.ts.map +1 -1
  361. package/dist/internal/reminder-runner.js +12 -10
  362. package/dist/internal/reminder-schedule.d.ts +1 -0
  363. package/dist/internal/reminder-schedule.d.ts.map +1 -1
  364. package/dist/internal/reminder-schedule.js +1 -0
  365. package/dist/internal/sdk-runner.d.ts +2 -0
  366. package/dist/internal/sdk-runner.d.ts.map +1 -1
  367. package/dist/internal/sdk-runner.js +149 -13
  368. package/dist/internal/server.d.ts +4 -1
  369. package/dist/internal/server.d.ts.map +1 -1
  370. package/dist/internal/server.js +25 -24
  371. package/dist/internal/session-engine.d.ts +27 -0
  372. package/dist/internal/session-engine.d.ts.map +1 -1
  373. package/dist/internal/session-engine.js +149 -21
  374. package/dist/internal/slack-provision-client.js +1 -1
  375. package/dist/internal/store-api-protocol.d.ts +1 -1
  376. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  377. package/dist/internal/store-api-protocol.js +1 -1
  378. package/dist/internal/update-check.d.ts +2 -2
  379. package/dist/internal/update-check.d.ts.map +1 -1
  380. package/dist/internal/update-check.js +3 -3
  381. package/dist/internal/zod3-datetime.d.ts +12 -0
  382. package/dist/internal/zod3-datetime.d.ts.map +1 -0
  383. package/dist/internal/zod3-datetime.js +17 -0
  384. package/dist/otel-public.d.ts +2 -3
  385. package/dist/otel-public.d.ts.map +1 -1
  386. package/dist/otel-public.js +2 -2
  387. package/dist/otel.d.ts +3 -102
  388. package/dist/otel.d.ts.map +1 -1
  389. package/dist/otel.js +61 -97
  390. package/dist/playground/assets/index-CyPkf2y7.css +1 -0
  391. package/dist/playground/assets/{index-CHk6O92d.js → index-DpbzbqFY.js} +38 -38
  392. package/dist/playground/index.html +2 -2
  393. package/dist/public-deprecated.d.ts +36 -0
  394. package/dist/public-deprecated.d.ts.map +1 -0
  395. package/dist/public-deprecated.js +39 -0
  396. package/dist/tools.d.ts +3 -3
  397. package/dist/tools.d.ts.map +1 -1
  398. package/dist/tools.js +1 -1
  399. package/dist/types.d.ts +221 -90
  400. package/dist/types.d.ts.map +1 -1
  401. package/docs/changelog.md +91 -0
  402. package/docs/guides/hooks.md +7 -3
  403. package/docs/guides/mcp-oauth.md +12 -0
  404. package/docs/guides/opentelemetry.md +149 -184
  405. package/docs/guides/slack.md +41 -0
  406. package/docs/reference/agent-config.md +21 -1
  407. package/docs/reference/channels.md +5 -1
  408. package/docs/reference/hooks.md +10 -5
  409. package/docs/reference/sessions.md +46 -1
  410. package/docs/reference/tools.md +3 -3
  411. package/package.json +31 -7
  412. package/schemas/grokbot-answers.schema.json +11 -0
  413. package/skills/framework-map/SKILL.md +2 -1
  414. package/skills/otel/SKILL.md +28 -48
  415. package/templates/code-wiki/evals/wiki.eval.ts +2 -2
  416. package/dist/docs/assets/chunks/@localSearchIndexroot.oGqZumnJ.js +0 -1
  417. package/dist/docs/assets/chunks/channel.Dt4aweTm.js +0 -1
  418. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DGUHZs6j.js +0 -1
  419. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DGUHZs6j.js +0 -1
  420. package/dist/docs/assets/chunks/clone.DWf3k0Z0.js +0 -1
  421. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C0571l4D.js +0 -1
  422. package/dist/docs/assets/guides_opentelemetry.md.DBQtp7_V.js +0 -45
  423. package/dist/docs/assets/guides_opentelemetry.md.DBQtp7_V.lean.js +0 -1
  424. package/dist/docs/assets/reference_sessions.md.C8FXuGwk.js +0 -1
  425. package/dist/docs/assets/reference_sessions.md.C8FXuGwk.lean.js +0 -1
  426. package/dist/playground/assets/index-BdMwybMt.css +0 -1
  427. package/templates/grokbot-agents/.gitignore +0 -4
  428. package/templates/security-help/.gitignore +0 -4
  429. /package/dist/docs/assets/{guides_hooks.md.Bfj0pK91.lean.js → guides_hooks.md.B2XfGX50.lean.js} +0 -0
  430. /package/dist/docs/assets/{reference_channels.md.Bxaa020x.lean.js → reference_channels.md.CNNIS6K7.lean.js} +0 -0
  431. /package/dist/docs/assets/{reference_schedules.md.03Ryy9ca.lean.js → reference_schedules.md.BqWnJES4.lean.js} +0 -0
  432. /package/dist/docs/assets/{reference_skills.md.C2GWh7g8.lean.js → reference_skills.md.Ckddg6KX.lean.js} +0 -0
  433. /package/dist/docs/assets/{reference_tools.md.-6pypsWt.lean.js → reference_tools.md.Bo0UfT0a.lean.js} +0 -0
@@ -1,3 +1,5 @@
1
+ /** Sentence returned when an SDK agent-store failure must not reach the caller. */
2
+ export const USER_FACING_TURN_FAILURE = "I hit an error while handling your request. Please try again or rephrase.";
1
3
  /** Stable string for logging / HTTP error bodies. */
2
4
  export function describeError(error) {
3
5
  return error instanceof Error ? error.message : String(error);
@@ -1 +1 @@
1
- {"version":3,"file":"context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ACd,OAAO,EAAE,MAAM,CAAC;CACjB,GACA,IAAI,CAEN;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAE/E;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE/C"}
@@ -74,8 +74,7 @@ export function pushConfigDiagnostic(ctx, diagnostic) {
74
74
  ctx.diagnostics.push({ ...diagnostic, code: "config_error" });
75
75
  }
76
76
  export function displayPath(ctx, absolutePath) {
77
- const rel = relative(ctx.rootDir, absolutePath);
78
- return rel.startsWith("..") ? absolutePath : toPosix(rel);
77
+ return toPosix(relative(ctx.rootDir, absolutePath));
79
78
  }
80
79
  export function errorMessage(error) {
81
80
  return error instanceof Error ? error.message : String(error);
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { basename, dirname, extname, isAbsolute, join } from "node:path";
6
- import { z } from "zod/v3";
6
+ import * as z from "zod/v4";
7
7
  import { parseYamlFrontmatter } from "../frontmatter.js";
8
8
  import { isRecord } from "../is-record.js";
9
9
  import { displayPath, errorMessage, isBlank } from "./context.js";
@@ -37,8 +37,8 @@ const manifestSchema = z.object({
37
37
  mcpServers: z
38
38
  .union([
39
39
  z.string(),
40
- z.record(z.unknown()),
41
- z.array(z.union([z.string(), z.record(z.unknown())])),
40
+ z.record(z.string(), z.unknown()),
41
+ z.array(z.union([z.string(), z.record(z.string(), z.unknown())])),
42
42
  ])
43
43
  .optional()
44
44
  .transform((value) => {
@@ -58,16 +58,16 @@ const frontmatterSchema = z.object({
58
58
  const mcpServerSchema = z.object({
59
59
  type: z.string().optional(),
60
60
  url: z.string().optional(),
61
- headers: z.record(z.string()).optional(),
61
+ headers: z.record(z.string(), z.string()).optional(),
62
62
  command: z.string().optional(),
63
63
  args: z.array(z.string()).optional(),
64
- env: z.record(z.string()).optional(),
64
+ env: z.record(z.string(), z.string()).optional(),
65
65
  cwd: z.string().optional(),
66
66
  envFile: z.string().optional(),
67
67
  /** Cursor's static OAuth client hint. */
68
- auth: z.record(z.unknown()).optional(),
68
+ auth: z.record(z.string(), z.unknown()).optional(),
69
69
  /** Claude's spelling of the same hint. */
70
- oauth: z.record(z.unknown()).optional(),
70
+ oauth: z.record(z.string(), z.unknown()).optional(),
71
71
  /** Cursor disables unlisted tools; an empty list would disable them all. */
72
72
  enabledTools: z.array(z.string()).nonempty().optional(),
73
73
  });
@@ -499,7 +499,7 @@ function componentName(plugin, raw, path) {
499
499
  });
500
500
  return undefined;
501
501
  }
502
- /** `headers: Expected object, received array`; the path names the field. */
502
+ /** `headers: Invalid input: expected record, received array`; the path names the field. */
503
503
  function firstIssue(error) {
504
504
  const issue = error.issues[0];
505
505
  if (issue === undefined) {
@@ -329,23 +329,30 @@ function byId(items) {
329
329
  return new Map(items.map((item) => [item.id, item]));
330
330
  }
331
331
  /**
332
- * Agent-singleton slots: one runtime (`agent.ts`), one storage backend,
333
- * one OTLP exporter. Playground chips are a Vite glob of the agent tree,
334
- * not a discovery walk. Nested `extensions/` are not mounted.
332
+ * Agent-singleton slots: one runtime (`agent.ts`), one storage backend.
333
+ * Playground chips are a Vite glob of the agent tree, not a discovery walk.
334
+ * Nested `extensions/` are not mounted.
335
335
  */
336
336
  async function warnAgentRootOnlySlots(ctx, root) {
337
337
  const files = [
338
- ["agent.ts", "agent.ts"],
339
- ["storage.ts", "storage"],
340
- ["otel.ts", "otel"],
338
+ ["agent.ts", "The agent that mounts this extension owns agent.ts; ignoring."],
339
+ ["storage.ts", "The agent that mounts this extension owns storage; ignoring."],
340
+ [
341
+ "otel.ts",
342
+ 'otel.ts is removed. Delete this file. See "Migrating from serve({ otel })" in docs/guides/opentelemetry.md.',
343
+ ],
344
+ [
345
+ "instrumentation.ts",
346
+ 'instrumentation.ts is not loaded. Delete this file. See "Migrating from serve({ otel })" in docs/guides/opentelemetry.md.',
347
+ ],
341
348
  ];
342
- for (const [file, label] of files) {
349
+ for (const [file, message] of files) {
343
350
  const path = join(root, file);
344
351
  if (await isFile(path)) {
345
352
  ctx.diagnostics.push({
346
353
  severity: "warning",
347
354
  path: displayPath(ctx, path),
348
- message: `The agent that mounts this extension owns ${label}; ignoring.`,
355
+ message,
349
356
  });
350
357
  }
351
358
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * The `info` / `GET /v1/info` projection of an {@link AgentProject}.
3
3
  */
4
- import { type AgentProject, type AgentProjectInfo } from "../../types.js";
5
- export declare function projectInfo(project: AgentProject): AgentProjectInfo;
4
+ import { type AgentProject, type ProjectInfo } from "../../types.js";
5
+ export declare function projectInfo(project: AgentProject): ProjectInfo;
6
6
  //# sourceMappingURL=info.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAqB,MAAM,gBAAgB,CAAC;AAK7F,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAsKnE"}
1
+ {"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/info.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAqB,MAAM,gBAAgB,CAAC;AAMxF,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAkK9D"}
@@ -5,6 +5,7 @@ import { resolveArtifactsMax } from "../../artifacts.js";
5
5
  import { toPublicCloudInfo } from "../../types.js";
6
6
  import { toolInputJsonSchema } from "../json-schema.js";
7
7
  import { MCP_ENDPOINT_PATH, mcpEndpointToolNames } from "../mcp-endpoint.js";
8
+ import { DEFAULT_AGENT_ARCHITECTURE } from "./agent-config.js";
8
9
  import { connectionTransportLabel } from "./connections.js";
9
10
  export function projectInfo(project) {
10
11
  const agent = project.agent;
@@ -37,12 +38,14 @@ export function projectInfo(project) {
37
38
  },
38
39
  ];
39
40
  return {
41
+ schemaVersion: 1,
40
42
  name: project.name,
41
43
  description: agent.description,
42
44
  model: agent.model,
45
+ architecture: agent.architecture ?? DEFAULT_AGENT_ARCHITECTURE,
43
46
  runtime: agent.runtime,
44
47
  cloud: agent.cloud === undefined ? undefined : toPublicCloudInfo(agent.cloud),
45
- local: agent.local,
48
+ local: agent.local?.cwd === undefined ? undefined : { cwd: agent.local.cwd },
46
49
  hosting: agent.hosting,
47
50
  concurrency: agent.concurrency,
48
51
  mcp: { path: MCP_ENDPOINT_PATH, tools: mcpEndpointToolNames(project) },
@@ -58,7 +61,7 @@ export function projectInfo(project) {
58
61
  name: tool.name,
59
62
  description: tool.description,
60
63
  execution: tool.execution,
61
- needsApproval: tool.needsApproval,
64
+ needsApproval: typeof tool.definition.needsApproval === "function" ? "dynamic" : tool.needsApproval,
62
65
  effect: tool.effect,
63
66
  inputSchema: tool.inputSchema,
64
67
  })),
@@ -158,12 +161,6 @@ export function projectInfo(project) {
158
161
  agentTool: project.artifacts.agentTool === true,
159
162
  max: resolveArtifactsMax(project.artifacts),
160
163
  },
161
- otel: project.otel === undefined
162
- ? undefined
163
- : {
164
- enabled: true,
165
- serviceName: project.otel.serviceName,
166
- },
167
- diagnostics: project.diagnostics,
164
+ diagnostics: project.diagnostics.map((diagnostic) => ({ ...diagnostic })),
168
165
  };
169
166
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Bake-time OpenTelemetry providers. Installed before `agent.ts` so a
3
+ * module-scope meter, tracer, or logger binds to a real provider.
4
+ * `instrumentation.ts` is not loaded.
5
+ */
6
+ import { type DiscoveryContext } from "./context.js";
7
+ export declare function agentDirHasInstrumentation(agentDir: string): boolean;
8
+ export declare function resetInstrumentationRegistryForTests(): void;
9
+ export declare function loadInstrumentation(ctx: DiscoveryContext, agentDir: string): Promise<boolean>;
10
+ //# sourceMappingURL=instrumentation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/instrumentation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAKlE,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED,wBAAgB,oCAAoC,IAAI,IAAI,CAE3D;AAKD,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC,CAYlB"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Bake-time OpenTelemetry providers. Installed before `agent.ts` so a
3
+ * module-scope meter, tracer, or logger binds to a real provider.
4
+ * `instrumentation.ts` is not loaded.
5
+ */
6
+ import { installCustomerOtel } from "../otel/customer.js";
7
+ import { displayPath } from "./context.js";
8
+ import { findModuleFile } from "./fs.js";
9
+ const instrumentedAgentDirs = new Set();
10
+ export function agentDirHasInstrumentation(agentDir) {
11
+ return instrumentedAgentDirs.has(agentDir);
12
+ }
13
+ export function resetInstrumentationRegistryForTests() {
14
+ instrumentedAgentDirs.clear();
15
+ }
16
+ const INSTRUMENTATION_FILE = 'instrumentation.ts is not loaded. Delete this file. See "Migrating from serve({ otel })" in docs/guides/opentelemetry.md.';
17
+ export async function loadInstrumentation(ctx, agentDir) {
18
+ installCustomerOtel();
19
+ instrumentedAgentDirs.add(agentDir);
20
+ const path = await findModuleFile(agentDir, "instrumentation");
21
+ if (path !== undefined) {
22
+ ctx.diagnostics.push({
23
+ severity: "error",
24
+ path: displayPath(ctx, path),
25
+ message: INSTRUMENTATION_FILE,
26
+ });
27
+ }
28
+ return true;
29
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/modules.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,cAAc,CAAC;AAI5F,KAAK,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAAC,CAAC;AAEvE,4EAA4E;AAC5E,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GAAG,YAAY,GAC1B,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAwBhD;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,GACnD,OAAO,CAAC,OAAO,CAAC,CA0BlB;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAGvD"}
1
+ {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/modules.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAyC,MAAM,cAAc,CAAC;AAI5F,KAAK,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,CAAC,CAAC;AAEvE,4EAA4E;AAC5E,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GAAG,YAAY,GAC1B,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAwBhD;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,GACnD,OAAO,CAAC,OAAO,CAAC,CA2BlB;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAGvD"}
@@ -53,13 +53,14 @@ export async function importDefault(ctx, modulePath, expected) {
53
53
  const helpers = kinds.map(helperCall).join(" or ");
54
54
  const expectedKinds = kinds.join(" or ");
55
55
  const article = /^[aeiou]/.test(expectedKinds) ? "an" : "a";
56
+ const message = kind === undefined
57
+ ? `Module must default-export ${helpers}.`
58
+ : `Expected ${article} ${expectedKinds} definition but found "${kind}" (wrong authored slot?).`;
56
59
  ctx.diagnostics.push({
57
60
  severity: "error",
58
61
  code: "invalid_definition",
59
62
  path: displayPath(ctx, modulePath),
60
- message: kind === undefined
61
- ? `Module must default-export ${helpers}.`
62
- : `Expected ${article} ${expectedKinds} definition but found "${kind}" (wrong authored slot?).`,
63
+ message,
63
64
  });
64
65
  return undefined;
65
66
  }
@@ -84,5 +85,4 @@ const DEFINE_HELPER_NAME = {
84
85
  hook: "defineHook",
85
86
  storage: "defineStorage",
86
87
  artifacts: "defineArtifacts",
87
- otel: "defineOtel",
88
88
  };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Public project load. `serve` reads the compiled project back from the map.
3
+ */
4
+ import type { AgentProject, Diagnostic, Project } from "../../types.js";
5
+ export interface LoadProjectOptions {
6
+ /** When true, warnings throw {@link ProjectLoadError} as well as errors. */
7
+ strict?: boolean;
8
+ }
9
+ export declare class ProjectLoadError extends Error {
10
+ readonly diagnostics: readonly Diagnostic[];
11
+ constructor(diagnostics: readonly Diagnostic[]);
12
+ }
13
+ export declare function loadProject(dir: string, options?: LoadProjectOptions): Promise<Project>;
14
+ export declare function createProject(agentProject: AgentProject): Project;
15
+ export declare function unwrapProject(project: Project): AgentProject;
16
+ //# sourceMappingURL=project-public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-public.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project-public.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAe,MAAM,gBAAgB,CAAC;AAMrF,MAAM,WAAW,kBAAkB;IACjC,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAUD,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;IAE5C,YAAY,WAAW,EAAE,SAAS,UAAU,EAAE,EAK7C;CACF;AAED,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQjG;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAIjE;AAkBD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,CAM5D"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Public project load. `serve` reads the compiled project back from the map.
3
+ */
4
+ import { projectInfo } from "./info.js";
5
+ import { formatDiagnostics, hasErrorDiagnostics, loadAgentProject } from "./project.js";
6
+ const agentProjects = new WeakMap();
7
+ class ProjectImpl {
8
+ constructor(info) {
9
+ this.info = info;
10
+ }
11
+ }
12
+ export class ProjectLoadError extends Error {
13
+ constructor(diagnostics) {
14
+ const copy = diagnostics.map((diagnostic) => ({ ...diagnostic }));
15
+ super(formatDiagnostics(copy));
16
+ this.name = "ProjectLoadError";
17
+ this.diagnostics = copy;
18
+ }
19
+ }
20
+ export async function loadProject(dir, options = {}) {
21
+ const loaded = await loadAgentProject(dir);
22
+ const hasError = hasErrorDiagnostics(loaded);
23
+ const hasWarning = loaded.diagnostics.some((diagnostic) => diagnostic.severity === "warning");
24
+ if (hasError || (options.strict === true && hasWarning)) {
25
+ throw new ProjectLoadError(loaded.diagnostics);
26
+ }
27
+ return createProject(loaded);
28
+ }
29
+ export function createProject(agentProject) {
30
+ const project = new ProjectImpl(deepFreeze(projectInfo(agentProject)));
31
+ agentProjects.set(project, agentProject);
32
+ return project;
33
+ }
34
+ function deepFreeze(value) {
35
+ const copy = structuredClone(value);
36
+ freezeValue(copy);
37
+ return copy;
38
+ }
39
+ function freezeValue(value) {
40
+ if (value === null || typeof value !== "object" || Object.isFrozen(value)) {
41
+ return;
42
+ }
43
+ for (const nested of Object.values(value)) {
44
+ freezeValue(nested);
45
+ }
46
+ Object.freeze(value);
47
+ }
48
+ export function unwrapProject(project) {
49
+ const agentProject = project instanceof ProjectImpl ? agentProjects.get(project) : undefined;
50
+ if (agentProject === undefined) {
51
+ throw new Error("serve() accepts a Project from loadProject");
52
+ }
53
+ return agentProject;
54
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAuB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAapF,OAAO,EAIL,KAAK,uBAAuB,EAE7B,MAAM,cAAc,CAAC;AAetB;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASrE;AAYD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA2BlF;AAED;;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YD,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA2BlF;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CA6BzD;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAAuB,GAAG;IACjC,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CACtB,GACL,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CAgBzD;AAWD,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,YAAY,CAAC,CA+HvB;AA0BD,qEAAqE;AACrE,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAElE;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAOnE;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE;QAAE,WAAW,EAAE,SAAS,UAAU,EAAE,CAAA;KAAE,CAAA;CAAE,CAAC,GACvF,MAAM,CAeR"}
@@ -6,15 +6,17 @@ import { registerAuthoredModuleLoaders } from "../authored-loaders.js";
6
6
  import { channelArchitectureError, channelArchitectureMigrationWarning, } from "../channel-architecture.js";
7
7
  import { applyAgentContinuationDefaults, warnOmittedContinuationDowngrades, } from "../continuation-channel.js";
8
8
  import { httpChannel } from "../http-channel-define.js";
9
+ import { otelProvidersReplaced } from "../otel/customer.js";
9
10
  import { loadAgent, warnUnknownSlots } from "./agent.js";
10
11
  import { loadChannels } from "./channels.js";
11
12
  import { defaultImportModule, displayPath, pushConfigDiagnostic, } from "./context.js";
12
13
  import { hasFlatLayoutMarkers, isDirectory, readPackageName, sortedEntries } from "./fs.js";
13
14
  import { loadHooks } from "./hooks.js";
15
+ import { loadInstrumentation } from "./instrumentation.js";
14
16
  import { NAME_PATTERN, RESERVED_SLUGS } from "./names.js";
15
17
  import { loadReminders } from "./reminders.js";
16
18
  import { loadSchedules } from "./schedules.js";
17
- import { appendArtifactTool, loadArtifacts, loadOtel, loadStorage, mergeArtifacts, rejectLegacyResult, } from "./services.js";
19
+ import { appendArtifactTool, loadArtifacts, loadStorage, mergeArtifacts, rejectLegacyOtelModule, rejectLegacyResult, } from "./services.js";
18
20
  /**
19
21
  * True when `dir` looks like an agent project root: it has a nested `bot/`
20
22
  * directory, a compatible `agent/` directory, or flat-layout markers
@@ -158,11 +160,20 @@ export async function loadAgentProject(dir, options = {}) {
158
160
  diagnostics,
159
161
  importModule: options.importModule ?? defaultImportModule,
160
162
  };
163
+ // Before agent.ts, tools, and channels. A meter created first stays a no-op.
164
+ await loadInstrumentation(ctx, agentDir);
161
165
  const name = (await readPackageName(rootDir)) ?? basename(rootDir);
162
166
  const { agent, projectSlots } = await loadAgent(ctx, agentDir, {
163
167
  name,
164
168
  isRoot: true,
165
169
  });
170
+ if (otelProvidersReplaced()) {
171
+ ctx.diagnostics.push({
172
+ severity: "warning",
173
+ path: displayPath(ctx, join(agentDir, "agent.ts")),
174
+ message: "A module replaced an OpenTelemetry provider BDK installed. The global API now uses that module's provider. See docs/guides/opentelemetry.md.",
175
+ });
176
+ }
166
177
  const { channels, httpChannelDefinition } = await loadChannels(ctx, join(agentDir, "channels"));
167
178
  for (const channel of projectSlots.channels) {
168
179
  if (channel.id === "http" || channels.some((c) => c.id === channel.id)) {
@@ -183,7 +194,7 @@ export async function loadAgentProject(dir, options = {}) {
183
194
  hooks.push(...projectSlots.hooks);
184
195
  const storage = await loadStorage(ctx, agentDir, agent.architecture);
185
196
  const artifacts = await mergeProjectArtifacts(ctx, agentDir, projectSlots.artifacts);
186
- const otel = await loadOtel(ctx, agentDir);
197
+ await rejectLegacyOtelModule(ctx, agentDir);
187
198
  await rejectLegacyResult(ctx, agentDir);
188
199
  await appendArtifactTool(ctx, agentDir, agent, artifacts);
189
200
  if (agentDir !== rootDir) {
@@ -237,7 +248,6 @@ export async function loadAgentProject(dir, options = {}) {
237
248
  hooks,
238
249
  storage,
239
250
  artifacts,
240
- otel,
241
251
  diagnostics,
242
252
  };
243
253
  }
@@ -1,13 +1,14 @@
1
1
  /**
2
- * `agent/storage.ts`, `agent/otel.ts`, `agent/artifacts.ts`:
3
- * host services the agent configures.
2
+ * `agent/storage.ts` and `agent/artifacts.ts`: host services the agent
3
+ * configures. `agent/otel.ts` is rejected. OpenTelemetry is `OTEL_*`
4
+ * variables.
4
5
  */
5
- import type { OtelDefinition } from "../../otel.js";
6
6
  import type { StorageDefinition } from "../../storage.js";
7
7
  import type { AgentArchitecture, ArtifactsDefinition, ResolvedAgent } from "../../types.js";
8
8
  import { type DiscoveryContext } from "./context.js";
9
9
  export declare function loadStorage(ctx: DiscoveryContext, agentDir: string, architecture: AgentArchitecture | undefined): Promise<StorageDefinition | undefined>;
10
- export declare function loadOtel(ctx: DiscoveryContext, agentDir: string): Promise<OtelDefinition | undefined>;
10
+ /** Fail discovery when the retired `otel.ts` module is still present. */
11
+ export declare function rejectLegacyOtelModule(ctx: DiscoveryContext, agentDir: string): Promise<void>;
11
12
  export declare function loadArtifacts(ctx: DiscoveryContext, agentDir: string): Promise<ArtifactsDefinition | undefined>;
12
13
  /**
13
14
  * `defineResult` / `agent/result.ts` is gone. A leftover file is an
@@ -1 +1 @@
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"file":"services.d.ts","sourceRoot":"","sources":["../../../src/internal/discovery/services.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE5F,OAAO,EAAE,KAAK,gBAAgB,EAAe,MAAM,cAAc,CAAC;AAIlE,wBAAsB,WAAW,CAC/B,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,iBAAiB,GAAG,SAAS,GAC1C,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CA6BxC;AAKD,yEAAyE;AACzE,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAmB1C;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW/F;AAED,4EAA4E;AAC5E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,mBAAmB,GAAG,SAAS,EACtC,KAAK,EAAE,mBAAmB,GAAG,SAAS,GACrC,mBAAmB,GAAG,SAAS,CAYjC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,aAAa,EACpB,SAAS,EAAE,mBAAmB,GAAG,SAAS,GACzC,OAAO,CAAC,IAAI,CAAC,CAkBf"}
@@ -1,6 +1,7 @@
1
1
  /**
2
- * `agent/storage.ts`, `agent/otel.ts`, `agent/artifacts.ts`:
3
- * host services the agent configures.
2
+ * `agent/storage.ts` and `agent/artifacts.ts`: host services the agent
3
+ * configures. `agent/otel.ts` is rejected. OpenTelemetry is `OTEL_*`
4
+ * variables.
4
5
  */
5
6
  import { join } from "node:path";
6
7
  import { defineArtifacts } from "../../artifacts.js";
@@ -36,13 +37,18 @@ export async function loadStorage(ctx, agentDir, architecture) {
36
37
  const definition = await importDefault(ctx, path, "storage");
37
38
  return definition;
38
39
  }
39
- export async function loadOtel(ctx, agentDir) {
40
+ const LEGACY_OTEL_MESSAGE = 'bot/otel.ts and agent/otel.ts are removed. Delete this file. See "Migrating from serve({ otel })" in docs/guides/opentelemetry.md.';
41
+ /** Fail discovery when the retired `otel.ts` module is still present. */
42
+ export async function rejectLegacyOtelModule(ctx, agentDir) {
40
43
  const path = await findModuleFile(agentDir, "otel");
41
44
  if (path === undefined) {
42
- return undefined;
45
+ return;
43
46
  }
44
- const definition = await importDefault(ctx, path, "otel");
45
- return definition;
47
+ ctx.diagnostics.push({
48
+ severity: "error",
49
+ path: displayPath(ctx, path),
50
+ message: LEGACY_OTEL_MESSAGE,
51
+ });
46
52
  }
47
53
  export async function loadArtifacts(ctx, agentDir) {
48
54
  const path = await findModuleFile(agentDir, "artifacts");
@@ -1 +1 @@
1
- {"version":3,"file":"event-mapper.d.ts","sourceRoot":"","sources":["../../src/internal/event-mapper.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,IAAI,oBAAoB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,KAAK,EAA4B,mBAAmB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAM5F;;;;GAIG;AACH,KAAK,gBAAgB,GACjB;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,IAAI,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,OAAO,CAAC,eAAe;IA+CvB,OAAO,CAAC,iBAAiB;IAgDzB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,aAAa;IAQrB;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAyBpB;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAsBvB,OAAO,CAAC,qBAAqB;IAqB7B,OAAO,CAAC,UAAU;IAmBlB,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,yBAAyB;IAmBjC,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,gBAAgB;IAkBxB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,wBAAwB;CAYjC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,mBAAmB,CA6CxE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,qBAAqB,CA4B5E"}
@@ -306,6 +306,7 @@ export class TurnEventMapper {
306
306
  stubbed: this.isStubbed(callId) ? true : undefined,
307
307
  parentCallId,
308
308
  modelCallId,
309
+ completedAt: new Date().toISOString(),
309
310
  };
310
311
  const wave = this.waveForComplete({ parentCallId, modelCallId, callId });
311
312
  if (wave === undefined) {
@@ -1,4 +1,4 @@
1
- import type { z } from "zod/v3";
1
+ import type * as z from "zod/v4";
2
2
  import type { ChannelDefinition, ChannelHandlerArgs } from "../types.js";
3
3
  import type { ContinuationIdentity } from "./continuation-identity.js";
4
4
  type FactoryResourceChannelOptions<TEvent> = {
@@ -1 +1 @@
1
- {"version":3,"file":"factory-resource-channel.d.ts","sourceRoot":"","sources":["../../src/internal/factory-resource-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;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AAgB,4BAA4B,CAAC,MAAM,SAAS;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,EAC/E,IAAI,EAAE,0BAA0B,CAAC,MAAM,CAAC,GACvC,0BAA0B,CAAC,MAAM,CAAC,CAkEpC"}
@@ -9,6 +9,7 @@ export declare function formatMissNeighborHint(path: string, neighbors: readonly
9
9
  /**
10
10
  * One-line miss hint when the parent directory listed siblings.
11
11
  * `undefined` leaves the caller to throw the ordinary miss.
12
+ * @deprecated Deprecated on the package root.
12
13
  */
13
14
  export declare function nearestNeighborMissHint(root: Pick<FileSystem, "list">, path: string): Promise<string | undefined>;
14
15
  //# sourceMappingURL=nearest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nearest.d.ts","sourceRoot":"","sources":["../../../src/internal/filesystem/nearest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,qBAAqB,CAAC;AAK/F,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,GAAE,MAAuB,GAC7B,MAAM,EAAE,CAeV;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,MAAM,GAAG,SAAS,CAKpB;AAED;;;GAGG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B"}
1
+ {"version":3,"file":"nearest.d.ts","sourceRoot":"","sources":["../../../src/internal/filesystem/nearest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,UAAU,EAA2C,MAAM,qBAAqB,CAAC;AAK/F,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,KAAK,GAAE,MAAuB,GAC7B,MAAM,EAAE,CAeV;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,MAAM,GAAG,SAAS,CAKpB;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAC9B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAc7B"}
@@ -32,6 +32,7 @@ export function formatMissNeighborHint(path, neighbors) {
32
32
  /**
33
33
  * One-line miss hint when the parent directory listed siblings.
34
34
  * `undefined` leaves the caller to throw the ordinary miss.
35
+ * @deprecated Deprecated on the package root.
35
36
  */
36
37
  export async function nearestNeighborMissHint(root, path) {
37
38
  const missed = normalizeFsPath(path);
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/internal/filesystem/tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,kBAAkB,EAYxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,cAAc,EAAkB,MAAM,gBAAgB,CAAC;AAgCrE,eAAO,MAAM,kCAAkC,YAC7C,MAAM,EACN,IAAI,EACJ,MAAM,EACN,MAAM,EACN,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,gBAAgB,CACR,CAAC;AAEX,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAIhG,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrE;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACnC,kBAAkB,EAAE,GAAG,SAAS,CAmBlC;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,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  import { AsyncLocalStorage } from "node:async_hooks";
9
9
  import { Buffer } from "node:buffer";
10
10
  import { minimatch } from "minimatch";
11
- import { z } from "zod/v3";
11
+ import * as z from "zod/v4";
12
12
  import { canonicalizeFileSystemToolName, collectGrepMatches, FILE_SYSTEM_SCAN_LIMIT, fileSystemImage, fileSystemText, InvalidGrepPatternError, isFileNotFoundError, shapeGrepUnion, sliceReadContent, strReplaceOnFileSystem, } from "../../filesystem.js";
13
13
  import { defineTool } from "../../tools.js";
14
14
  import { toolInputJsonSchema, toolOutputJsonSchema, validateToolInput } from "../json-schema.js";
@@ -11,6 +11,7 @@ import type { GitHubChannelOptions } from "../channels/github/types.js";
11
11
  import type { OriginChannelOptions } from "../channels/origin/types.js";
12
12
  import type { ChannelHandlerArgs } from "../types.js";
13
13
  import { type RouteLocalIngressContinuation } from "./local-ingress.js";
14
+ /** @deprecated Deprecated on the package root. */
14
15
  export interface AgentServeGitHubTriggerTarget {
15
16
  /** Agent mount slug (empty string in single-agent mode). */
16
17
  slug: string;
@@ -19,6 +20,7 @@ export interface AgentServeGitHubTriggerTarget {
19
20
  /** Per-agent channel handler args (`send`, `waitUntil`, `host`, …). */
20
21
  args: ChannelHandlerArgs;
21
22
  }
23
+ /** @deprecated Deprecated on the package root. */
22
24
  export interface AgentServeGitHubTriggerEvent {
23
25
  type: "github";
24
26
  /** Raw webhook body (signature already verified by the caller). */
@@ -29,11 +31,13 @@ export interface AgentServeGitHubTriggerEvent {
29
31
  /** Local CP ingest. Defaults to {@link routeLocalIngressContinuation}. */
30
32
  routeContinuation?: RouteLocalIngressContinuation;
31
33
  }
34
+ /** @deprecated Deprecated on the package root. */
32
35
  export interface AgentServeOriginTriggerTarget {
33
36
  slug: string;
34
37
  options: OriginChannelOptions;
35
38
  args: ChannelHandlerArgs;
36
39
  }
40
+ /** @deprecated Deprecated on the package root. */
37
41
  export interface AgentServeOriginTriggerEvent {
38
42
  type: "origin";
39
43
  /** Origin envelope JSON (signature already verified by the caller). */
@@ -42,12 +46,15 @@ export interface AgentServeOriginTriggerEvent {
42
46
  /** Local CP ingest. Defaults to {@link routeLocalIngressContinuation}. */
43
47
  routeContinuation?: RouteLocalIngressContinuation;
44
48
  }
49
+ /** @deprecated Deprecated on the package root. */
45
50
  export type AgentServeTriggerEvent = AgentServeGitHubTriggerEvent | AgentServeOriginTriggerEvent;
51
+ /** @deprecated Deprecated on the package root. */
46
52
  export interface AgentServeTriggerTargetResult {
47
53
  slug: string;
48
54
  status: number;
49
55
  body: unknown;
50
56
  }
57
+ /** @deprecated Deprecated on the package root. */
51
58
  export interface AgentServeTriggerResult {
52
59
  ok: boolean;
53
60
  event: string | null;
@@ -56,6 +63,7 @@ export interface AgentServeTriggerResult {
56
63
  /**
57
64
  * Build fan-out targets from mounted agent projects that export a github
58
65
  * channel created via {@link githubChannel}.
66
+ * @deprecated Deprecated on the package root.
59
67
  */
60
68
  export declare function collectGitHubTriggerTargets(input: {
61
69
  mounts: Array<{
@@ -70,6 +78,7 @@ export declare function collectGitHubTriggerTargets(input: {
70
78
  /**
71
79
  * Build fan-out targets from mounted agent projects that export an origin
72
80
  * channel created via {@link originChannel}.
81
+ * @deprecated Deprecated on the package root.
73
82
  */
74
83
  export declare function collectOriginTriggerTargets(input: {
75
84
  mounts: Array<{
@@ -83,6 +92,7 @@ export declare function collectOriginTriggerTargets(input: {
83
92
  }): AgentServeOriginTriggerTarget[];
84
93
  /**
85
94
  * Dispatch an agent-serve trigger. GitHub and Origin webhook fan-out.
95
+ * @deprecated Deprecated on the package root.
86
96
  */
87
97
  export declare function handleAgentServeTrigger(event: AgentServeTriggerEvent): Promise<AgentServeTriggerResult>;
88
98
  //# sourceMappingURL=handleAgentServeTrigger.d.ts.map