@cursor/bdk 0.2.14 → 0.2.16

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 (392) hide show
  1. package/AGENTS.md +51 -52
  2. package/README.md +1 -1
  3. package/dist/bin/agent-sdk.js +0 -0
  4. package/dist/bin/agent-serve.js +41 -3
  5. package/dist/channels/github/index.d.ts +1 -1
  6. package/dist/channels/github/index.d.ts.map +1 -1
  7. package/dist/channels/github/index.js +1 -1
  8. package/dist/channels/slack/attachments.d.ts +2 -0
  9. package/dist/channels/slack/attachments.d.ts.map +1 -1
  10. package/dist/channels/slack/attachments.js +17 -5
  11. package/dist/channels/slack/channel-watch.d.ts +4 -2
  12. package/dist/channels/slack/channel-watch.d.ts.map +1 -1
  13. package/dist/channels/slack/channel-watch.js +4 -2
  14. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  15. package/dist/channels/slack/slack-channel.js +4 -2
  16. package/dist/channels/slack/types.d.ts +6 -4
  17. package/dist/channels/slack/types.d.ts.map +1 -1
  18. package/dist/connections.d.ts +29 -0
  19. package/dist/connections.d.ts.map +1 -1
  20. package/dist/connections.js +54 -0
  21. package/dist/docs/404.html +2 -2
  22. package/dist/docs/assets/{app.BN3sgOOo.js → app.BSrZkTHD.js} +4 -4
  23. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.js → building-with-agents.md.Bi9CQ-bR.js} +3 -3
  24. package/dist/docs/assets/{building-with-agents.md.Df87rAe1.lean.js → building-with-agents.md.Bi9CQ-bR.lean.js} +1 -1
  25. package/dist/docs/assets/chunks/@localSearchIndexroot.JUnN1Be1.js +1 -0
  26. package/dist/docs/assets/chunks/{VPLocalSearchBox.CbA00dML.js → VPLocalSearchBox.BxmgcwIX.js} +1 -1
  27. package/dist/docs/assets/chunks/{arc.Byug8CZM.js → arc.CAid9y9R.js} +1 -1
  28. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.D1_qmnQy.js → architectureDiagram-Q4EWVU46.kLxg-1A5.js} +1 -1
  29. package/dist/docs/assets/chunks/{baseUniq.Dj-Nurf-.js → baseUniq.BWvpjFlO.js} +1 -1
  30. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BZwq3EIg.js → blockDiagram-DXYQGD6D.DyjX8R7M.js} +1 -1
  31. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.dx75urO7.js → c4Diagram-AHTNJAMY.DBdWlnqr.js} +1 -1
  32. package/dist/docs/assets/chunks/channel.CWc3NN9g.js +1 -0
  33. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CIoddsDQ.js → chunk-4BX2VUAB.T5enPS2D.js} +1 -1
  34. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.O3VsVBES.js → chunk-4TB4RGXK.D6zswRAS.js} +1 -1
  35. package/dist/docs/assets/chunks/{chunk-55IACEB6.WNNWh0Pe.js → chunk-55IACEB6.Bh05N-a3.js} +1 -1
  36. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.BKVQwEME.js → chunk-EDXVE4YY.DZv_O-d9.js} +1 -1
  37. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.Cv5iBz7A.js → chunk-FMBD7UC4.BY53CZaL.js} +1 -1
  38. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.wCDCToee.js → chunk-OYMX7WX6.CO5lI2PE.js} +1 -1
  39. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D3IGXhXA.js → chunk-QZHKN3VN.DMfpW0s4.js} +1 -1
  40. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.CAPPh-E7.js → chunk-YZCP3GAM.COPT56Nr.js} +1 -1
  41. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.D5a745iS.js +1 -0
  42. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.D5a745iS.js +1 -0
  43. package/dist/docs/assets/chunks/clone.CCGVqN_B.js +1 -0
  44. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BQCFH3M5.js → cose-bilkent-S5V4N54A.BJSj7zzd.js} +1 -1
  45. package/dist/docs/assets/chunks/{dagre-KV5264BT.lHmdrh7L.js → dagre-KV5264BT.DDv7IQZT.js} +1 -1
  46. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.EtSPnHgD.js → diagram-5BDNPKRD.BUoE9HFH.js} +1 -1
  47. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DCyUnQT8.js → diagram-G4DWMVQ6.BF3JtrnJ.js} +1 -1
  48. package/dist/docs/assets/chunks/{diagram-MMDJMWI5._E0Qqblb.js → diagram-MMDJMWI5.BvuCWc4e.js} +1 -1
  49. package/dist/docs/assets/chunks/{diagram-TYMM5635.BDj4oyy_.js → diagram-TYMM5635._EqUGqFN.js} +1 -1
  50. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.CrvnO6a3.js → erDiagram-SMLLAGMA.DxNvSdzj.js} +1 -1
  51. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DIhYc-2F.js → flowDiagram-DWJPFMVM.DVtRP546.js} +1 -1
  52. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.hFqm_vio.js → ganttDiagram-T4ZO3ILL.Bn9vb7xI.js} +1 -1
  53. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.N3GDaVDD.js → gitGraphDiagram-UUTBAWPF.45r6n737.js} +1 -1
  54. package/dist/docs/assets/chunks/{graph.DK28rMBx.js → graph.BOkX3Ws_.js} +1 -1
  55. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.DHmE6W9M.js → infoDiagram-42DDH7IO.DyBCcxOm.js} +1 -1
  56. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.ByUJuOYm.js → ishikawaDiagram-UXIWVN3A.kg0ywDlx.js} +1 -1
  57. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BIUChFMh.js → journeyDiagram-VCZTEJTY.BUfrLnXA.js} +1 -1
  58. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CNgFXwo-.js → kanban-definition-6JOO6SKY.Bn7X35b2.js} +1 -1
  59. package/dist/docs/assets/chunks/{layout.BDnwE4ET.js → layout.B0QW6d8M.js} +1 -1
  60. package/dist/docs/assets/chunks/{linear.DmrYLXFs.js → linear.C59eCF0D.js} +1 -1
  61. package/dist/docs/assets/chunks/{min.BbYcWakN.js → min.BnDl0p08.js} +1 -1
  62. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.C9x-klkv.js → mindmap-definition-QFDTVHPH.u2HYLooo.js} +1 -1
  63. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.iufpEbi0.js → pieDiagram-DEJITSTG.CbnIrr9l.js} +1 -1
  64. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DdoXbWL9.js → quadrantDiagram-34T5L4WZ.D2zWIixq.js} +1 -1
  65. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.XL1-_pNk.js → requirementDiagram-MS252O5E.DvOFa3oO.js} +1 -1
  66. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DySXofNs.js → sankeyDiagram-XADWPNL6.BfKCkH3x.js} +1 -1
  67. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.Cp0GZoOU.js → sequenceDiagram-FGHM5R23.CUPKdYN0.js} +1 -1
  68. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DvK-sXUX.js → stateDiagram-FHFEXIEX.CimDCRiK.js} +1 -1
  69. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.ClNUVSTQ.js +1 -0
  70. package/dist/docs/assets/chunks/{theme.Clup4iIo.js → theme.CKht7z82.js} +2 -2
  71. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.gHI9ZLm6.js → timeline-definition-GMOUNBTQ.BFTd5qKs.js} +1 -1
  72. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.G2N2zXYe.js → vennDiagram-DHZGUBPP.N6t5MmCb.js} +1 -1
  73. package/dist/docs/assets/chunks/wardley-RL74JXVD.D2G6Zyds.js +162 -0
  74. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.BgUKEagd.js → wardleyDiagram-NUSXRM2D.BqScALbL.js} +1 -1
  75. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CwH7oege.js → xychartDiagram-5P7HB3ND.Br0WiDkT.js} +1 -1
  76. package/dist/docs/assets/deployment.md.hKKN9I4c.js +31 -0
  77. package/dist/docs/assets/{deployment.md.BYuEcDBv.lean.js → deployment.md.hKKN9I4c.lean.js} +1 -1
  78. package/dist/docs/assets/{evals.md.C851kViu.js → evals.md.CHR34K1Y.js} +3 -7
  79. package/dist/docs/assets/{evals.md.C851kViu.lean.js → evals.md.CHR34K1Y.lean.js} +1 -1
  80. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.js +9 -0
  81. package/dist/docs/assets/guides_cloud-agents.md.CBK7W0-O.lean.js +1 -0
  82. package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.js +15 -0
  83. package/dist/docs/assets/{guides_grokbot-agents.md.tD1smFhU.lean.js → guides_grokbot-agents.md.BwAykJ7U.lean.js} +1 -1
  84. package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.js → guides_hooks.md.B_bKG1oA.js} +1 -1
  85. package/dist/docs/assets/{guides_improve.md.CRrYq22s.js → guides_improve.md.CZKVt1cT.js} +2 -3
  86. package/dist/docs/assets/{guides_improve.md.CRrYq22s.lean.js → guides_improve.md.CZKVt1cT.lean.js} +1 -1
  87. package/dist/docs/assets/{guides_mcp-oauth.md.DR3zhC9r.js → guides_mcp-oauth.md.BM_eFC0L.js} +3 -15
  88. package/dist/docs/assets/guides_mcp-oauth.md.BM_eFC0L.lean.js +1 -0
  89. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.js → guides_webhooks.md.Cpdc3BDX.js} +13 -12
  90. package/dist/docs/assets/{guides_webhooks.md.BBvAm_VF.lean.js → guides_webhooks.md.Cpdc3BDX.lean.js} +1 -1
  91. package/dist/docs/assets/{index.md.Dxxr7pFa.js → index.md.BIBHIQtU.js} +1 -1
  92. package/dist/docs/assets/{quickstart.md.BK5gjHM2.js → quickstart.md.CduLGBAB.js} +1 -1
  93. package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.js → reference_agent-config.md.DYA6ge6t.js} +7 -4
  94. package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.lean.js → reference_agent-config.md.DYA6ge6t.lean.js} +1 -1
  95. package/dist/docs/assets/reference_channels.md.DYg0CLud.js +22 -0
  96. package/dist/docs/assets/{reference_channels.md.LbNIJBwd.lean.js → reference_channels.md.DYg0CLud.lean.js} +1 -1
  97. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.js → reference_cli.md.2d2Y0O-d.js} +16 -13
  98. package/dist/docs/assets/{reference_cli.md.dYCAL2lB.lean.js → reference_cli.md.2d2Y0O-d.lean.js} +1 -1
  99. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.js → reference_connections.md.CxbLpaaP.js} +4 -5
  100. package/dist/docs/assets/{reference_connections.md.DLrgAd5f.lean.js → reference_connections.md.CxbLpaaP.lean.js} +1 -1
  101. package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.js → reference_evals.md.Ccwp4x3o.js} +4 -4
  102. package/dist/docs/assets/{reference_evals.md.D5i8PuXJ.lean.js → reference_evals.md.Ccwp4x3o.lean.js} +1 -1
  103. package/dist/docs/assets/{reference_hooks.md.B-eGa2km.js → reference_hooks.md.DbJC8mcZ.js} +1 -1
  104. package/dist/docs/assets/reference_http-api.md.CrqhTv6S.js +11 -0
  105. package/dist/docs/assets/{reference_http-api.md.DbFNOubV.lean.js → reference_http-api.md.CrqhTv6S.lean.js} +1 -1
  106. package/dist/docs/assets/reference_playground.md.q4MI-0td.js +1 -0
  107. package/dist/docs/assets/reference_playground.md.q4MI-0td.lean.js +1 -0
  108. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.js → reference_schedules.md.03Ryy9ca.js} +5 -5
  109. package/dist/docs/assets/{reference_schedules.md.BuJ8fgMa.lean.js → reference_schedules.md.03Ryy9ca.lean.js} +1 -1
  110. package/dist/docs/assets/reference_sessions.md.C_uzIWuy.js +1 -0
  111. package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C2GWh7g8.js} +4 -4
  112. package/dist/docs/assets/{reference_tools.md.DzIY9JzY.js → reference_tools.md.08XR7lIl.js} +3 -14
  113. package/dist/docs/assets/reference_tools.md.08XR7lIl.lean.js +1 -0
  114. package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.js → templates_grokbot-agents.md.DgpPEs7B.js} +1 -1
  115. package/dist/docs/assets/troubleshooting.md.PCafNCb5.js +1 -0
  116. package/dist/docs/assets/{troubleshooting.md.x-GBa7wN.lean.js → troubleshooting.md.PCafNCb5.lean.js} +1 -1
  117. package/dist/docs/building-with-agents.html +37 -37
  118. package/dist/docs/building-with-agents.md +5 -5
  119. package/dist/docs/deployment.html +43 -41
  120. package/dist/docs/deployment.md +70 -33
  121. package/dist/docs/evals.html +38 -42
  122. package/dist/docs/evals.md +1 -16
  123. package/dist/docs/guides/agent-to-agent.html +35 -35
  124. package/dist/docs/guides/bitbucket.html +35 -35
  125. package/dist/docs/guides/cloud-agents.html +38 -39
  126. package/dist/docs/guides/cloud-agents.md +2 -8
  127. package/dist/docs/guides/convert-automation.html +35 -35
  128. package/dist/docs/guides/github.html +35 -35
  129. package/dist/docs/guides/gitlab.html +35 -35
  130. package/dist/docs/guides/grokbot-agents.html +37 -38
  131. package/dist/docs/guides/grokbot-agents.md +9 -13
  132. package/dist/docs/guides/hooks.html +37 -37
  133. package/dist/docs/guides/hooks.md +0 -1
  134. package/dist/docs/guides/improve.html +37 -38
  135. package/dist/docs/guides/improve.md +4 -6
  136. package/dist/docs/guides/jev.html +35 -35
  137. package/dist/docs/guides/mcp-oauth.html +39 -51
  138. package/dist/docs/guides/mcp-oauth.md +17 -40
  139. package/dist/docs/guides/migrate.html +35 -35
  140. package/dist/docs/guides/opentelemetry.html +35 -35
  141. package/dist/docs/guides/slack.html +35 -35
  142. package/dist/docs/guides/webhooks.html +47 -46
  143. package/dist/docs/guides/webhooks.md +35 -18
  144. package/dist/docs/hashmap.json +1 -1
  145. package/dist/docs/hillclimbing.html +35 -35
  146. package/dist/docs/index.html +36 -36
  147. package/dist/docs/index.md +1 -1
  148. package/dist/docs/llms-full.txt +388 -272
  149. package/dist/docs/llms.txt +4 -4
  150. package/dist/docs/quickstart.html +37 -37
  151. package/dist/docs/quickstart.md +2 -2
  152. package/dist/docs/reference/agent-config.html +41 -38
  153. package/dist/docs/reference/agent-config.md +26 -1
  154. package/dist/docs/reference/artifacts.html +35 -35
  155. package/dist/docs/reference/channels.html +42 -43
  156. package/dist/docs/reference/channels.md +29 -13
  157. package/dist/docs/reference/cli.html +50 -47
  158. package/dist/docs/reference/cli.md +115 -42
  159. package/dist/docs/reference/connections.html +39 -40
  160. package/dist/docs/reference/connections.md +6 -5
  161. package/dist/docs/reference/evals.html +38 -38
  162. package/dist/docs/reference/evals.md +15 -4
  163. package/dist/docs/reference/extensions.html +35 -35
  164. package/dist/docs/reference/hooks.html +37 -37
  165. package/dist/docs/reference/hooks.md +0 -1
  166. package/dist/docs/reference/http-api.html +38 -38
  167. package/dist/docs/reference/http-api.md +7 -17
  168. package/dist/docs/reference/instructions.html +35 -35
  169. package/dist/docs/reference/playground.html +37 -37
  170. package/dist/docs/reference/playground.md +1 -4
  171. package/dist/docs/reference/project-layout.html +35 -35
  172. package/dist/docs/reference/prompt.html +35 -35
  173. package/dist/docs/reference/schedules.html +39 -39
  174. package/dist/docs/reference/schedules.md +26 -3
  175. package/dist/docs/reference/sessions.html +36 -36
  176. package/dist/docs/reference/sessions.md +1 -2
  177. package/dist/docs/reference/skills.html +39 -39
  178. package/dist/docs/reference/skills.md +1 -1
  179. package/dist/docs/reference/subagents.html +35 -35
  180. package/dist/docs/reference/tools.html +39 -50
  181. package/dist/docs/reference/tools.md +2 -28
  182. package/dist/docs/templates/agentic-owners.html +35 -35
  183. package/dist/docs/templates/grokbot-agents.html +37 -37
  184. package/dist/docs/templates/grokbot-agents.md +1 -1
  185. package/dist/docs/templates/security-reviewer.html +35 -35
  186. package/dist/docs/templates/thermo-quality-review.html +35 -35
  187. package/dist/docs/templates/thermo-review.html +35 -35
  188. package/dist/docs/templates/triage.html +35 -35
  189. package/dist/docs/troubleshooting.html +36 -36
  190. package/dist/docs/troubleshooting.md +12 -7
  191. package/dist/extensions/cursor-cloud-agents/extension.d.ts +5 -1
  192. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  193. package/dist/extensions/cursor-cloud-agents/extension.js +4 -0
  194. package/dist/extensions/cursor-cloud-agents/lib/channels.d.ts.map +1 -1
  195. package/dist/extensions/cursor-cloud-agents/lib/channels.js +5 -1
  196. package/dist/filesystem.d.ts.map +1 -1
  197. package/dist/filesystem.js +4 -8
  198. package/dist/internal/cli-convert-automation.js +9 -19
  199. package/dist/internal/cli-deploy.d.ts +1 -1
  200. package/dist/internal/cli-deploy.d.ts.map +1 -1
  201. package/dist/internal/cli-deploy.js +18 -3
  202. package/dist/internal/cli-init-grokbot.d.ts +29 -0
  203. package/dist/internal/cli-init-grokbot.d.ts.map +1 -0
  204. package/dist/internal/cli-init-grokbot.js +181 -0
  205. package/dist/internal/cli-slack.js +1 -1
  206. package/dist/internal/comment-safe.d.ts +8 -0
  207. package/dist/internal/comment-safe.d.ts.map +1 -0
  208. package/dist/internal/comment-safe.js +12 -0
  209. package/dist/internal/continuation-identity.js +1 -1
  210. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
  211. package/dist/internal/convert-automation/convert-workflow.js +2 -14
  212. package/dist/internal/convert-grokbot/answers.d.ts +127 -0
  213. package/dist/internal/convert-grokbot/answers.d.ts.map +1 -0
  214. package/dist/internal/convert-grokbot/answers.js +443 -0
  215. package/dist/internal/convert-grokbot/bot.d.ts +50 -0
  216. package/dist/internal/convert-grokbot/bot.d.ts.map +1 -0
  217. package/dist/internal/convert-grokbot/bot.js +72 -0
  218. package/dist/internal/convert-grokbot/checks.d.ts +26 -0
  219. package/dist/internal/convert-grokbot/checks.d.ts.map +1 -0
  220. package/dist/internal/convert-grokbot/checks.js +170 -0
  221. package/dist/internal/convert-grokbot/convert.d.ts +60 -0
  222. package/dist/internal/convert-grokbot/convert.d.ts.map +1 -0
  223. package/dist/internal/convert-grokbot/convert.js +470 -0
  224. package/dist/internal/convert-grokbot/handoff.d.ts +44 -0
  225. package/dist/internal/convert-grokbot/handoff.d.ts.map +1 -0
  226. package/dist/internal/convert-grokbot/handoff.js +160 -0
  227. package/dist/internal/convert-grokbot/recipe.d.ts +61 -0
  228. package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -0
  229. package/dist/internal/convert-grokbot/recipe.js +94 -0
  230. package/dist/internal/convert-grokbot/routine.d.ts +51 -0
  231. package/dist/internal/convert-grokbot/routine.d.ts.map +1 -0
  232. package/dist/internal/convert-grokbot/routine.js +128 -0
  233. package/dist/internal/convert-grokbot/slack.d.ts +28 -0
  234. package/dist/internal/convert-grokbot/slack.d.ts.map +1 -0
  235. package/dist/internal/convert-grokbot/slack.js +50 -0
  236. package/dist/internal/deploy-client.d.ts +0 -2
  237. package/dist/internal/deploy-client.d.ts.map +1 -1
  238. package/dist/internal/deploy-client.js +2 -11
  239. package/dist/internal/discovery/agent-config.d.ts +6 -0
  240. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  241. package/dist/internal/discovery/agent-config.js +19 -0
  242. package/dist/internal/discovery/agent.d.ts.map +1 -1
  243. package/dist/internal/discovery/agent.js +2 -1
  244. package/dist/internal/discovery/names.d.ts +2 -0
  245. package/dist/internal/discovery/names.d.ts.map +1 -1
  246. package/dist/internal/discovery/names.js +2 -0
  247. package/dist/internal/discovery/project.d.ts.map +1 -1
  248. package/dist/internal/discovery/project.js +1 -3
  249. package/dist/internal/eval-judge-model.d.ts +10 -5
  250. package/dist/internal/eval-judge-model.d.ts.map +1 -1
  251. package/dist/internal/eval-judge-model.js +36 -25
  252. package/dist/internal/filesystem/subagent-inherit.d.ts +39 -0
  253. package/dist/internal/filesystem/subagent-inherit.d.ts.map +1 -0
  254. package/dist/internal/filesystem/subagent-inherit.js +96 -0
  255. package/dist/internal/filesystem/tools.d.ts +6 -0
  256. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  257. package/dist/internal/filesystem/tools.js +38 -1
  258. package/dist/internal/hosted-catch-protocol.d.ts +2 -0
  259. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  260. package/dist/internal/hosted-catch-protocol.js +2 -0
  261. package/dist/internal/hosted-catch.d.ts +2 -3
  262. package/dist/internal/hosted-catch.d.ts.map +1 -1
  263. package/dist/internal/hosted-catch.js +2 -3
  264. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  265. package/dist/internal/hosted-delivery.js +46 -13
  266. package/dist/internal/hosted-execution-flush.d.ts +6 -3
  267. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  268. package/dist/internal/hosted-execution-flush.js +28 -31
  269. package/dist/internal/hosting.d.ts +1 -1
  270. package/dist/internal/hosting.d.ts.map +1 -1
  271. package/dist/internal/hosting.js +7 -3
  272. package/dist/internal/init-interview.d.ts +3 -5
  273. package/dist/internal/init-interview.d.ts.map +1 -1
  274. package/dist/internal/init-interview.js +15 -88
  275. package/dist/internal/init-project.d.ts +13 -0
  276. package/dist/internal/init-project.d.ts.map +1 -1
  277. package/dist/internal/init-project.js +30 -37
  278. package/dist/internal/init-scaffold.d.ts +11 -0
  279. package/dist/internal/init-scaffold.d.ts.map +1 -1
  280. package/dist/internal/init-scaffold.js +47 -13
  281. package/dist/internal/interview/agent-questions.d.ts +19 -0
  282. package/dist/internal/interview/agent-questions.d.ts.map +1 -0
  283. package/dist/internal/interview/agent-questions.js +120 -0
  284. package/dist/internal/interview/question.d.ts +82 -0
  285. package/dist/internal/interview/question.d.ts.map +1 -0
  286. package/dist/internal/interview/question.js +198 -0
  287. package/dist/internal/local-control-plane.d.ts.map +1 -1
  288. package/dist/internal/local-control-plane.js +5 -1
  289. package/dist/internal/otel/collector.d.ts +2 -0
  290. package/dist/internal/otel/collector.d.ts.map +1 -1
  291. package/dist/internal/otel/collector.js +4 -0
  292. package/dist/internal/peer-connections.d.ts +6 -2
  293. package/dist/internal/peer-connections.d.ts.map +1 -1
  294. package/dist/internal/peer-connections.js +23 -19
  295. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  296. package/dist/internal/resolve-prod-target.js +2 -1
  297. package/dist/internal/sdk-runner.d.ts.map +1 -1
  298. package/dist/internal/sdk-runner.js +43 -16
  299. package/dist/internal/sdk-subagent-inherit-support.d.ts +9 -0
  300. package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -0
  301. package/dist/internal/sdk-subagent-inherit-support.js +89 -0
  302. package/dist/internal/server.d.ts.map +1 -1
  303. package/dist/internal/server.js +6 -5
  304. package/dist/internal/session-engine.d.ts +13 -0
  305. package/dist/internal/session-engine.d.ts.map +1 -1
  306. package/dist/internal/session-engine.js +62 -11
  307. package/dist/internal/session-run-log.d.ts.map +1 -1
  308. package/dist/internal/session-run-log.js +26 -11
  309. package/dist/internal/{convert-automation/slug.d.ts → slug.d.ts} +4 -1
  310. package/dist/internal/slug.d.ts.map +1 -0
  311. package/dist/internal/{convert-automation/slug.js → slug.js} +11 -1
  312. package/dist/playground/assets/index-7fVUOA5l.css +1 -0
  313. package/dist/playground/assets/{index-ClxRl2Cw.js → index-U3TRnwAP.js} +43 -43
  314. package/dist/playground/index.html +2 -2
  315. package/dist/types.d.ts +26 -1
  316. package/dist/types.d.ts.map +1 -1
  317. package/docs/README.md +1 -1
  318. package/docs/building-with-agents.md +5 -5
  319. package/docs/deployment.md +70 -33
  320. package/docs/evals.md +1 -16
  321. package/docs/guides/cloud-agents.md +3 -9
  322. package/docs/guides/grokbot-agents.md +10 -14
  323. package/docs/guides/hooks.md +0 -1
  324. package/docs/guides/improve.md +4 -6
  325. package/docs/guides/mcp-oauth.md +18 -41
  326. package/docs/guides/webhooks.md +35 -18
  327. package/docs/quickstart.md +2 -2
  328. package/docs/reference/agent-config.md +26 -1
  329. package/docs/reference/channels.md +29 -13
  330. package/docs/reference/cli.md +115 -42
  331. package/docs/reference/connections.md +6 -5
  332. package/docs/reference/evals.md +15 -4
  333. package/docs/reference/hooks.md +0 -1
  334. package/docs/reference/http-api.md +7 -17
  335. package/docs/reference/playground.md +2 -5
  336. package/docs/reference/schedules.md +26 -3
  337. package/docs/reference/sessions.md +1 -2
  338. package/docs/reference/skills.md +1 -1
  339. package/docs/reference/tools.md +3 -29
  340. package/docs/templates/grokbot-agents.md +1 -1
  341. package/docs/troubleshooting.md +12 -7
  342. package/package.json +36 -35
  343. package/schemas/grokbot-answers.schema.json +343 -0
  344. package/skills/create-agent/SKILL.md +16 -11
  345. package/skills/debug/SKILL.md +3 -4
  346. package/skills/evals/SKILL.md +2 -2
  347. package/skills/framework-map/SKILL.md +10 -10
  348. package/skills/mcp-auth/SKILL.md +10 -34
  349. package/skills/migrate-v2/SKILL.md +13 -9
  350. package/skills/setup-slack/SKILL.md +0 -13
  351. package/templates/agentic-owners/bot/lib/owners/handles.ts +1 -1
  352. package/templates/agentic-owners/bot/lib/owners/matching.ts +20 -9
  353. package/templates/agents-md/README.md +3 -3
  354. package/templates/agents-md/bot/channels/queue.ts +3 -8
  355. package/templates/agents-md/bot/instructions.md +1 -2
  356. package/templates/agents-md/bot/tools/apply_agents.ts +0 -1
  357. package/templates/agents-md/evals/agents.eval.ts +2 -2
  358. package/templates/demo/bot/channels/queue.ts +5 -15
  359. package/templates/grokbot-agents/.gitignore +4 -0
  360. package/templates/pr-autofixer/bot/channels/drive.ts +3 -16
  361. package/templates/security-help/.gitignore +4 -0
  362. package/templates/triage/bot/channels/queue.ts +11 -22
  363. package/templates/triage/bot/channels/webhook.ts +3 -6
  364. package/templates/triage/bot/lib/parse-queue-event.ts +0 -6
  365. package/dist/docs/assets/chunks/@localSearchIndexroot.CzrtdJ8s.js +0 -1
  366. package/dist/docs/assets/chunks/channel.6ebHhoF9.js +0 -1
  367. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BJ-CwKwu.js +0 -1
  368. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BJ-CwKwu.js +0 -1
  369. package/dist/docs/assets/chunks/clone.DfV2fkWH.js +0 -1
  370. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DNdUCJyd.js +0 -1
  371. package/dist/docs/assets/chunks/wardley-RL74JXVD.C46G0P5a.js +0 -162
  372. package/dist/docs/assets/deployment.md.BYuEcDBv.js +0 -29
  373. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.js +0 -10
  374. package/dist/docs/assets/guides_cloud-agents.md.CWJjS9No.lean.js +0 -1
  375. package/dist/docs/assets/guides_grokbot-agents.md.tD1smFhU.js +0 -16
  376. package/dist/docs/assets/guides_mcp-oauth.md.DR3zhC9r.lean.js +0 -1
  377. package/dist/docs/assets/reference_channels.md.LbNIJBwd.js +0 -23
  378. package/dist/docs/assets/reference_http-api.md.DbFNOubV.js +0 -11
  379. package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +0 -1
  380. package/dist/docs/assets/reference_playground.md.1hx0gcIu.lean.js +0 -1
  381. package/dist/docs/assets/reference_sessions.md.CyM7ARz1.js +0 -1
  382. package/dist/docs/assets/reference_tools.md.DzIY9JzY.lean.js +0 -1
  383. package/dist/docs/assets/troubleshooting.md.x-GBa7wN.js +0 -1
  384. package/dist/internal/convert-automation/slug.d.ts.map +0 -1
  385. package/dist/playground/assets/index-BKSsuEMw.css +0 -1
  386. /package/dist/docs/assets/{guides_hooks.md.5Ce3NXxZ.lean.js → guides_hooks.md.B_bKG1oA.lean.js} +0 -0
  387. /package/dist/docs/assets/{index.md.Dxxr7pFa.lean.js → index.md.BIBHIQtU.lean.js} +0 -0
  388. /package/dist/docs/assets/{quickstart.md.BK5gjHM2.lean.js → quickstart.md.CduLGBAB.lean.js} +0 -0
  389. /package/dist/docs/assets/{reference_hooks.md.B-eGa2km.lean.js → reference_hooks.md.DbJC8mcZ.lean.js} +0 -0
  390. /package/dist/docs/assets/{reference_sessions.md.CyM7ARz1.lean.js → reference_sessions.md.C_uzIWuy.lean.js} +0 -0
  391. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C2GWh7g8.lean.js} +0 -0
  392. /package/dist/docs/assets/{templates_grokbot-agents.md.2sydjFiO.lean.js → templates_grokbot-agents.md.DgpPEs7B.lean.js} +0 -0
@@ -11,7 +11,7 @@ import { loadChannels } from "./channels.js";
11
11
  import { defaultImportModule, displayPath, } from "./context.js";
12
12
  import { hasFlatLayoutMarkers, isDirectory, readPackageName, sortedEntries } from "./fs.js";
13
13
  import { loadHooks } from "./hooks.js";
14
- import { NAME_PATTERN } from "./names.js";
14
+ import { NAME_PATTERN, RESERVED_SLUGS } from "./names.js";
15
15
  import { loadReminders } from "./reminders.js";
16
16
  import { loadSchedules } from "./schedules.js";
17
17
  import { appendArtifactTool, loadArtifacts, loadOtel, loadStorage, mergeArtifacts, rejectLegacyResult, } from "./services.js";
@@ -133,8 +133,6 @@ function assertSlug(name, parentDir) {
133
133
  }
134
134
  return name;
135
135
  }
136
- /** URL path segments reserved by the server; agents cannot use them as slugs. */
137
- const RESERVED_SLUGS = new Set(["v1", "playground", "docs"]);
138
136
  export async function loadAgentProject(dir, options = {}) {
139
137
  // Public API: embedders can call discovery directly (without `serve()` or
140
138
  // the CLI), and it dynamically imports authored TypeScript.
@@ -7,17 +7,22 @@
7
7
  * prompt injection needs. A reply that talks the judge into running a tool would
8
8
  * do so on the machine running the eval CLI, under the runner's credentials.
9
9
  *
10
- * The session is therefore confined on every axis the SDK exposes:
10
+ * The session is therefore given nothing to act with:
11
11
  *
12
- * - `sandboxOptions.enabled` so any tool call the judge is talked into is
13
- * confined rather than run directly against the host.
12
+ * - `tools: []` so the model is offered no built-in tools and can only reply
13
+ * with text. An injected reply has no shell, file, or MCP call to invoke.
14
+ * Omitting `tools` leaves the default toolset in place.
14
15
  * - `mcpServers: {}` so no MCP surface is reachable.
15
16
  * - `settingSources: []` plus an empty temp `cwd`, so there is no repo to act on
16
17
  * and no ambient `AGENTS.md` / `.cursor` rule can steer a verdict.
18
+ * - `sandboxOptions: { enabled: false }` so grading never requests a local
19
+ * sandbox. Omitting the field is not the same: a `~/.cursor/sandbox.json`
20
+ * policy still counts as a sandbox request and throws on hosts that cannot
21
+ * sandbox. With no tools left, there is nothing for a sandbox to confine.
17
22
  *
18
23
  * The prompt side is hardened separately: `evals/judge.ts` fences untrusted
19
- * content behind a per-call boundary. Both halves matter — this one limits blast
20
- * radius, that one removes the instruction channel.
24
+ * content behind a per-call boundary. Both halves matter — this one removes
25
+ * the tool channel, that one removes the instruction channel.
21
26
  *
22
27
  * Grading also declines outright when the credential's backend and the SDK's
23
28
  * backend disagree, rather than sending a key somewhere it was not minted for
@@ -1 +1 @@
1
- {"version":3,"file":"eval-judge-model.d.ts","sourceRoot":"","sources":["../../src/internal/eval-judge-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAoBhE;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,oBAAoB,EAAE,MAAM,EAC5B,UAAU,GAAE,MAAwB,GACnC,IAAI,CASN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,GAAG,YAAY,GAAG,SAAS,CAQ3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAoC5B,CAAC"}
1
+ {"version":3,"file":"eval-judge-model.d.ts","sourceRoot":"","sources":["../../src/internal/eval-judge-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAoBhE;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,oBAAoB,EAAE,MAAM,EAC5B,UAAU,GAAE,MAAwB,GACnC,IAAI,CASN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,GAAG,YAAY,GAAG,SAAS,CAQ3B;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,eAyC5B,CAAC"}
@@ -7,17 +7,22 @@
7
7
  * prompt injection needs. A reply that talks the judge into running a tool would
8
8
  * do so on the machine running the eval CLI, under the runner's credentials.
9
9
  *
10
- * The session is therefore confined on every axis the SDK exposes:
10
+ * The session is therefore given nothing to act with:
11
11
  *
12
- * - `sandboxOptions.enabled` so any tool call the judge is talked into is
13
- * confined rather than run directly against the host.
12
+ * - `tools: []` so the model is offered no built-in tools and can only reply
13
+ * with text. An injected reply has no shell, file, or MCP call to invoke.
14
+ * Omitting `tools` leaves the default toolset in place.
14
15
  * - `mcpServers: {}` so no MCP surface is reachable.
15
16
  * - `settingSources: []` plus an empty temp `cwd`, so there is no repo to act on
16
17
  * and no ambient `AGENTS.md` / `.cursor` rule can steer a verdict.
18
+ * - `sandboxOptions: { enabled: false }` so grading never requests a local
19
+ * sandbox. Omitting the field is not the same: a `~/.cursor/sandbox.json`
20
+ * policy still counts as a sandbox request and throws on hosts that cannot
21
+ * sandbox. With no tools left, there is nothing for a sandbox to confine.
17
22
  *
18
23
  * The prompt side is hardened separately: `evals/judge.ts` fences untrusted
19
- * content behind a per-call boundary. Both halves matter — this one limits blast
20
- * radius, that one removes the instruction channel.
24
+ * content behind a per-call boundary. Both halves matter — this one removes
25
+ * the tool channel, that one removes the instruction channel.
21
26
  *
22
27
  * Grading also declines outright when the credential's backend and the SDK's
23
28
  * backend disagree, rather than sending a key somewhere it was not minted for
@@ -89,30 +94,36 @@ export const callJudgeModel = async ({ prompt, model }) => {
89
94
  // Imported lazily so a tree of fully deterministic evals never loads the SDK.
90
95
  const { Agent } = await import("@cursor/sdk");
91
96
  const cwd = await mkdtemp(join(tmpdir(), "agentkit-eval-judge-"));
92
- const agent = await Agent.create({
93
- apiKey: resolved.apiKey,
94
- model: typeof model === "string" ? { id: model } : model,
95
- // See the module comment: grading embeds untrusted agent output, so the
96
- // session gets no MCP surface, no ambient settings, an empty working
97
- // directory, and a sandbox around anything it does attempt.
98
- mcpServers: {},
99
- local: {
100
- cwd,
101
- settingSources: [],
102
- sandboxOptions: { enabled: true },
103
- },
104
- });
105
97
  try {
106
- const run = await agent.send(prompt);
107
- const result = await run.wait();
108
- if (result.status === "error" || result.status === "cancelled") {
109
- const detail = result.error?.message ?? result.result ?? result.status;
110
- throw new Error(`eval judge run failed: ${detail}`);
98
+ const agent = await Agent.create({
99
+ apiKey: resolved.apiKey,
100
+ model: typeof model === "string" ? { id: model } : model,
101
+ // See the module comment: grading embeds untrusted agent output, so the
102
+ // session gets no tools, no MCP surface, no ambient settings, and an
103
+ // empty working directory. Sandbox is explicitly off so a per-user
104
+ // sandbox config cannot re-request one.
105
+ tools: [],
106
+ mcpServers: {},
107
+ local: {
108
+ cwd,
109
+ settingSources: [],
110
+ sandboxOptions: { enabled: false },
111
+ },
112
+ });
113
+ try {
114
+ const run = await agent.send(prompt);
115
+ const result = await run.wait();
116
+ if (result.status === "error" || result.status === "cancelled") {
117
+ const detail = result.error?.message ?? result.result ?? result.status;
118
+ throw new Error(`eval judge run failed: ${detail}`);
119
+ }
120
+ return result.result ?? "";
121
+ }
122
+ finally {
123
+ agent.close();
111
124
  }
112
- return result.result ?? "";
113
125
  }
114
126
  finally {
115
- agent.close();
116
127
  await rm(cwd, { recursive: true, force: true }).catch(() => undefined);
117
128
  }
118
129
  };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Task-child inherit for an authored virtual root.
3
+ *
4
+ * The SDK calls `resourceProviderOptions` once per child session id,
5
+ * including nested `Task` grandchildren, and reuses that result for the
6
+ * child runtime. Each id gets its own {@link childOverlayFs} over the
7
+ * session union (authored tree plus `/tmp` scratch), so a child write
8
+ * cannot clobber the parent or a sibling. The FileSystem handle is not
9
+ * placed on the SDK request.
10
+ *
11
+ * Native executor overrides load on the first child. A static import
12
+ * would pull workspace-only packages into every CLI start. The published
13
+ * package omits that module; children then keep shell suppressed and
14
+ * reach the same overlay through synthesized file tools.
15
+ */
16
+ import type { LocalSubagentInherit, LocalSubagentResourceProviderFields } from "@cursor/sdk";
17
+ import { type FileSystem } from "../../filesystem.js";
18
+ /**
19
+ * Structural view of the checkout-only executor module. Naming that module
20
+ * in a type query would pull it into `tsc -p tsconfig.build.json` even
21
+ * though the build config excludes it, and the published program cannot
22
+ * see its workspace-only imports.
23
+ */
24
+ type ChildToolExecutor = NonNullable<LocalSubagentResourceProviderFields["overrideReadExecutor"]>;
25
+ interface FileSystemExecutorModule {
26
+ createFileSystemReadExecutor(root: FileSystem): ChildToolExecutor;
27
+ createFileSystemWriteExecutor(root: FileSystem): ChildToolExecutor;
28
+ createFileSystemGrepExecutor(root: FileSystem): ChildToolExecutor;
29
+ createFileSystemLsExecutor(root: FileSystem): ChildToolExecutor;
30
+ }
31
+ export interface RootSubagentBinding {
32
+ readonly inherit: LocalSubagentInherit;
33
+ /** Overlay for a Task child. Do not pass the parent session id. */
34
+ fileSystemForSession(sessionId: string): FileSystem;
35
+ }
36
+ export declare function createRootSubagentInherit(parent: FileSystem): RootSubagentBinding;
37
+ export declare function resourceFieldsForChild(overlay: FileSystem, executors: FileSystemExecutorModule | undefined): LocalSubagentResourceProviderFields;
38
+ export {};
39
+ //# sourceMappingURL=subagent-inherit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subagent-inherit.d.ts","sourceRoot":"","sources":["../../../src/internal/filesystem/subagent-inherit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,mCAAmC,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;GAKG;AACH,KAAK,iBAAiB,GAAG,WAAW,CAAC,mCAAmC,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAElG,UAAU,wBAAwB;IAChC,4BAA4B,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC;IAClE,6BAA6B,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC;IACnE,4BAA4B,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC;IAClE,0BAA0B,CAAC,IAAI,EAAE,UAAU,GAAG,iBAAiB,CAAC;CACjE;AAUD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,oBAAoB,CAAC;IACvC,mEAAmE;IACnE,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;CACrD;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAcjF;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,wBAAwB,GAAG,SAAS,GAC9C,mCAAmC,CAWrC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Task-child inherit for an authored virtual root.
3
+ *
4
+ * The SDK calls `resourceProviderOptions` once per child session id,
5
+ * including nested `Task` grandchildren, and reuses that result for the
6
+ * child runtime. Each id gets its own {@link childOverlayFs} over the
7
+ * session union (authored tree plus `/tmp` scratch), so a child write
8
+ * cannot clobber the parent or a sibling. The FileSystem handle is not
9
+ * placed on the SDK request.
10
+ *
11
+ * Native executor overrides load on the first child. A static import
12
+ * would pull workspace-only packages into every CLI start. The published
13
+ * package omits that module; children then keep shell suppressed and
14
+ * reach the same overlay through synthesized file tools.
15
+ */
16
+ import { childOverlayFs } from "../../filesystem.js";
17
+ /**
18
+ * Widened to `string` on purpose. A string-literal dynamic import is still
19
+ * a static dependency, so the published declaration build would compile the
20
+ * excluded executor module. Node and the test runner resolve this relative
21
+ * to this file.
22
+ */
23
+ const FILE_SYSTEM_EXECUTORS_SPECIFIER = "../../filesystem-executors.js";
24
+ export function createRootSubagentInherit(parent) {
25
+ const overlays = new Map();
26
+ return {
27
+ inherit: {
28
+ reportedWorkspacePath: "/",
29
+ resourceProviderOptions: async (context) => {
30
+ const overlay = childOverlayFor(overlays, parent, context.sessionId);
31
+ return resourceFieldsForChild(overlay, await loadFileSystemExecutors());
32
+ },
33
+ },
34
+ fileSystemForSession(sessionId) {
35
+ return childOverlayFor(overlays, parent, sessionId);
36
+ },
37
+ };
38
+ }
39
+ export function resourceFieldsForChild(overlay, executors) {
40
+ if (executors === undefined) {
41
+ return { suppressDefaultShellExecutor: true };
42
+ }
43
+ return {
44
+ overrideReadExecutor: executors.createFileSystemReadExecutor(overlay),
45
+ overrideWriteExecutor: executors.createFileSystemWriteExecutor(overlay),
46
+ overrideGrepExecutor: executors.createFileSystemGrepExecutor(overlay),
47
+ overrideLsExecutor: executors.createFileSystemLsExecutor(overlay),
48
+ suppressDefaultShellExecutor: true,
49
+ };
50
+ }
51
+ async function loadFileSystemExecutors() {
52
+ try {
53
+ const loaded = await import(FILE_SYSTEM_EXECUTORS_SPECIFIER);
54
+ if (!isFileSystemExecutorModule(loaded)) {
55
+ throw new Error("filesystem executors module is missing its factories");
56
+ }
57
+ return loaded;
58
+ }
59
+ catch (error) {
60
+ if (isMissingModule(error)) {
61
+ return undefined;
62
+ }
63
+ throw error;
64
+ }
65
+ }
66
+ function isFileSystemExecutorModule(value) {
67
+ if (typeof value !== "object" || value === null) {
68
+ return false;
69
+ }
70
+ const candidate = value;
71
+ return (typeof candidate.createFileSystemReadExecutor === "function" &&
72
+ typeof candidate.createFileSystemWriteExecutor === "function" &&
73
+ typeof candidate.createFileSystemGrepExecutor === "function" &&
74
+ typeof candidate.createFileSystemLsExecutor === "function");
75
+ }
76
+ function isMissingModule(error) {
77
+ if (typeof error !== "object" || error === null) {
78
+ return false;
79
+ }
80
+ if ("code" in error && error.code === "ERR_MODULE_NOT_FOUND") {
81
+ return true;
82
+ }
83
+ return "cause" in error && isMissingModule(error.cause);
84
+ }
85
+ function childOverlayFor(overlays, parent, sessionId) {
86
+ if (sessionId === undefined || sessionId === "") {
87
+ return childOverlayFs(parent);
88
+ }
89
+ const existing = overlays.get(sessionId);
90
+ if (existing !== undefined) {
91
+ return existing;
92
+ }
93
+ const created = childOverlayFs(parent);
94
+ overlays.set(sessionId, created);
95
+ return created;
96
+ }
@@ -38,5 +38,11 @@ export declare function synthesizedFileSystemToolNames(options: {
38
38
  export declare function fileSystemTool(root: FileSystem, name: string, input?: Record<string, unknown>): DiscoveredTool | undefined;
39
39
  /** Validate and run the same tool a turn or `callTool` would. */
40
40
  export declare function runFileSystemTool(root: FileSystem, name: string, input?: Record<string, unknown>): Promise<unknown>;
41
+ /**
42
+ * Run `fn` with synthesized file tools bound to `root`. Task children use
43
+ * this so Read/Write/Delete hit their overlay instead of the parent tree
44
+ * the tools were built against.
45
+ */
46
+ export declare function runWithFileSystem<T>(root: FileSystem, fn: () => Promise<T>): Promise<T>;
41
47
  export declare function synthesizeFileSystemTools(root: FileSystem, filter?: readonly FileSystemToolName[]): DiscoveredTool[];
42
48
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/internal/filesystem/tools.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,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,CACvC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,GACnC,kBAAkB,EAAE,GAAG,SAAS,CAKlC;AAKD;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B,GAAG,SAAS,6BAA6B,EAAE,CAW3C;AA2lBD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,cAAc,GAAG,SAAS,CAS5B;AAED,i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IG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,cAAc,GAAG,SAAS,CAS5B;AAED,iEAAiE;AACjE,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAClC,OAAO,CAAC,OAAO,CAAC,CAclB;AAID;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEvF;AA8BD,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,SAAS,kBAAkB,EAAE,GACrC,cAAc,EAAE,CAQlB"}
@@ -5,6 +5,7 @@
5
5
  * Each tool is a `defineTool` whose runtime `inputSchema` accepts those
6
6
  * fields plus the native aliases the harness still sends.
7
7
  */
8
+ import { AsyncLocalStorage } from "node:async_hooks";
8
9
  import { Buffer } from "node:buffer";
9
10
  import { minimatch } from "minimatch";
10
11
  import { z } from "zod";
@@ -600,11 +601,47 @@ export async function runFileSystemTool(root, name, input = {}) {
600
601
  }
601
602
  return execute(validation.value, {});
602
603
  }
604
+ const fileSystemStorage = new AsyncLocalStorage();
605
+ /**
606
+ * Run `fn` with synthesized file tools bound to `root`. Task children use
607
+ * this so Read/Write/Delete hit their overlay instead of the parent tree
608
+ * the tools were built against.
609
+ */
610
+ export function runWithFileSystem(root, fn) {
611
+ return fileSystemStorage.run(root, fn);
612
+ }
613
+ function bindActiveFileSystem(root, tool) {
614
+ const execute = tool.definition.execute;
615
+ if (execute === undefined) {
616
+ return tool;
617
+ }
618
+ return {
619
+ ...tool,
620
+ definition: {
621
+ ...tool.definition,
622
+ execute: (input, ctx) => {
623
+ const active = fileSystemStorage.getStore();
624
+ if (active === undefined || active === root) {
625
+ return execute(input, ctx);
626
+ }
627
+ const canonical = canonicalizeFileSystemToolName(tool.name);
628
+ if (canonical === undefined) {
629
+ return execute(input, ctx);
630
+ }
631
+ const reboundExecute = FILE_SYSTEM_TOOL_FACTORIES[canonical](active).definition.execute;
632
+ if (reboundExecute === undefined) {
633
+ return execute(input, ctx);
634
+ }
635
+ return reboundExecute(input, ctx);
636
+ },
637
+ },
638
+ };
639
+ }
603
640
  export function synthesizeFileSystemTools(root, filter) {
604
641
  const tools = [];
605
642
  for (const name of SYNTHESIZED_FILE_SYSTEM_TOOL_NAMES) {
606
643
  if (wantsTool(filter, name)) {
607
- tools.push(FILE_SYSTEM_TOOL_FACTORIES[name](root));
644
+ tools.push(bindActiveFileSystem(root, FILE_SYSTEM_TOOL_FACTORIES[name](root)));
608
645
  }
609
646
  }
610
647
  return tools;
@@ -21,6 +21,8 @@ export declare const AGENT_SDK_HTTP_CHANNEL_ID = "http";
21
21
  export declare const AGENT_SDK_HTTP_CHANNEL_KIND = "http";
22
22
  export declare const AGENT_SDK_SESSION_RESUME_KEY_PREFIX = "cont:session:";
23
23
  export declare const AGENT_SDK_CATCH_MAX_BODY_BYTES: number;
24
+ /** Header a replayed request carries so handlers can dedupe on delivery. */
25
+ export declare const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
24
26
  export declare const AGENT_SDK_CATCH_ROUTE_METHODS: readonly ["GET", "POST", "PUT", "PATCH", "DELETE"];
25
27
  export type CatchRouteMethod = (typeof AGENT_SDK_CATCH_ROUTE_METHODS)[number];
26
28
  export type CatchRequestEnvelope = {
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-catch-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-catch-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,0BA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O,GAAG,oBAAoB,GAAG,SAAS,CA2C1F;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG,MAAM,CAK1E"}
@@ -22,6 +22,8 @@ export const AGENT_SDK_HTTP_CHANNEL_ID = "http";
22
22
  export const AGENT_SDK_HTTP_CHANNEL_KIND = "http";
23
23
  export const AGENT_SDK_SESSION_RESUME_KEY_PREFIX = "cont:session:";
24
24
  export const AGENT_SDK_CATCH_MAX_BODY_BYTES = 256 * 1024;
25
+ /** Header a replayed request carries so handlers can dedupe on delivery. */
26
+ export const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
25
27
  export const AGENT_SDK_CATCH_ROUTE_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE"];
26
28
  /**
27
29
  * Mailbox key the control plane stamps on an explicit `ses_…` resume. The
@@ -10,9 +10,8 @@
10
10
  * a handler that answers without sending is a `skip`.
11
11
  */
12
12
  import type { AuthContext, ChannelDefinition, ChannelHandlerArgs, ChannelRoute } from "../types.js";
13
- import { type CatchRequestEnvelope } from "./hosted-catch-protocol.js";
14
- /** Header a replayed request carries so handlers can dedupe on delivery. */
15
- export declare const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
13
+ import { CATCH_DELIVERY_ID_HEADER, type CatchRequestEnvelope } from "./hosted-catch-protocol.js";
14
+ export { CATCH_DELIVERY_ID_HEADER };
16
15
  /**
17
16
  * Principal for a replayed request. The deployment secret was checked by
18
17
  * the control plane before compute existed; the channel's own auth chain
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-catch.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-catch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAMpG,OAAO,EAGL,KAAK,oBAAoB,EAG1B,MAA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AED,wBAAsB,kBAAkB,CAAC,KAAK,EAAE;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAiFpB;AAgBD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,iBAAiB,CAAC,OAAO,CAAC,EACtC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,IAAI,CAgBN"}
@@ -14,11 +14,10 @@ import { classifyHostedAdmissionRejection } from "./hosted-delivery-protocol.js"
14
14
  import { invokeChannelRoute } from "./channel-route-dispatch.js";
15
15
  import { DeferredChannelSessionError } from "./deferred-channel-session.js";
16
16
  import { attachHostedAdmissionAdapter } from "./hosted-admission-adapter.js";
17
- import { AGENT_SDK_CATCH_EVENT_TYPE, AGENT_SDK_CUSTOM_CHANNEL_KIND, decodeCatchBody, parseCatchRequestEnvelope, } from "./hosted-catch-protocol.js";
17
+ import { AGENT_SDK_CATCH_EVENT_TYPE, AGENT_SDK_CUSTOM_CHANNEL_KIND, CATCH_DELIVERY_ID_HEADER, decodeCatchBody, parseCatchRequestEnvelope, } from "./hosted-catch-protocol.js";
18
18
  import { errorResponse } from "./http-channel.js";
19
19
  import { Router } from "./router.js";
20
- /** Header a replayed request carries so handlers can dedupe on delivery. */
21
- export const CATCH_DELIVERY_ID_HEADER = "x-agent-sdk-delivery-id";
20
+ export { CATCH_DELIVERY_ID_HEADER };
22
21
  /** Placeholder origin for replayed requests; handlers see a well-formed URL. */
23
22
  const CATCH_REQUEST_ORIGIN = "http://agent-sdk.hosted";
24
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-delivery.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAE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AAC,CAAC;IACH;;;;OAIG;IACH,YAAY,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACpD;;;;;OAKG;IACH,sBAAsB,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;OAGG;IACH,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,iBAAiB,CAAC,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,8DAA8D;IAC9D,aAAa,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,wDAAwD;IACxD,YAAY,CAAC,IAAI,YAAY,EAAE,CAAC;IAChC;;;;;OAKG;IACH,eAAe,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1C;;;OAGG;IACH,mBAAmB,CAAC,IAAI,OAAO,CAAC,sBAAsB,GAAG,OAAO,CAAC,CAAC;IAClE;;;;OAIG;IACH,mBAAmB,CAAC,IAAI,wBAAwB,CAAC;IACjD;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B,GAAG,IAAI,CAurBP"}
@@ -1,5 +1,5 @@
1
1
  import { randomBytes } from "node:crypto";
2
- import { metrics } from "@opentelemetry/api";
2
+ import { metrics, trace } from "@opentelemetry/api";
3
3
  import { packageVersion } from "./distribution.js";
4
4
  import { dispatchOutcome } from "./channel-dispatch.js";
5
5
  import { consumeHostedBoundSecrets, } from "./cursor/hosted-bound-secrets.js";
@@ -11,7 +11,7 @@ import { getHostedAdmissionAdapter, } from "./hosted-admission-adapter.js";
11
11
  import { HostedAdmissionLocalSendError, runDuringHostedAdmission, } from "./hosted-admission-context.js";
12
12
  import { HOSTED_ADMISSION_PATH, HOSTED_DELIVERY_HEADER, HOSTED_DELIVERY_PROTOCOL_VERSION, HOSTED_EXECUTION_PATH, HOSTED_GUEST_RETRY_TERMINAL, HOSTED_GUEST_RETRY_TRANSIENT, HOSTED_MAX_CONSUMED_DELIVERY_IDS, hostedFailureClassification, hostedGuestErrorResponse, isHostedReminderAdmission, isHostedScheduleAdmission, parseHostedAdmissionHandlerRejection, parseHostedAdmission, parseHostedExecution, parseHostedReminderFireDescriptorPayload, parseHostedReminderFirePayload, parseHostedScheduleFirePayload, } from "./hosted-delivery-protocol.js";
13
13
  import { abortReasonFromTurnStatus, HOSTED_EXECUTION_DIAG_RUNNING_STATUS, hostedExecutionDiagId, } from "./hosted-execution-diag.js";
14
- import { flushHostedExecutionRecord, refreshStartLogWhile, } from "./hosted-execution-flush.js";
14
+ import { flushDurableHostedExecutionRecord, refreshStartLogWhile, writeLocalHostedExecutionRecord, } from "./hosted-execution-flush.js";
15
15
  import { finalizeHostedExecutionLatency, formatHostedExecutionLatencyServerTiming, hostedExecutionNow, runWithHostedExecutionLatency, } from "./hosted-execution-latency.js";
16
16
  import { recordHostedManagedAutomation } from "./hosted-managed-automation.js";
17
17
  import { readJsonObject } from "./http-channel.js";
@@ -482,11 +482,16 @@ export function registerHostedDeliveryRoute(input) {
482
482
  if (definition === undefined) {
483
483
  return await responseToReply(finish(terminalHostedError(404, "channel_not_found", `No channel named "${delivery.channelId}" is mounted.`)));
484
484
  }
485
+ const endHandler = startHostedSpan("admission.handler", {
486
+ "agent_sdk.channel_kind": delivery.channelKind,
487
+ "agent_sdk.delivery_id": delivery.deliveryId,
488
+ });
485
489
  const admitted = await dispatchHostedAdmission({
486
490
  delivery,
487
491
  definition,
488
492
  args: input.buildHandlerArgs(delivery.channelId),
489
493
  });
494
+ endHandler();
490
495
  if (admitted.pendingSend === undefined) {
491
496
  return await responseToReply(finish(admitted.response));
492
497
  }
@@ -682,7 +687,13 @@ export function registerHostedDeliveryRoute(input) {
682
687
  admitted.expiresAt = Date.now() + ownerTurnPendingTtlMs;
683
688
  }
684
689
  admitted.execution ??= afterHostedWork(input.flushOtel, async () => {
690
+ const spanAttributes = {
691
+ "agent_sdk.channel_kind": admitted.channelKind,
692
+ "agent_sdk.session_public_id": execution.sessionPublicId,
693
+ };
694
+ const endNetworkWait = startHostedSpan("execute.network_wait", spanAttributes);
685
695
  const network = await finishNetworkWait("execution");
696
+ endNetworkWait();
686
697
  guestNetwork = network.timing;
687
698
  if (network.response !== undefined) {
688
699
  return await responseToReply(finish(network.response));
@@ -697,11 +708,14 @@ export function registerHostedDeliveryRoute(input) {
697
708
  ...(input.flushStartLog === undefined ? {} : { flushStartLog: input.flushStartLog }),
698
709
  ...(input.snapshotLogs === undefined ? {} : { snapshotLogs: input.snapshotLogs }),
699
710
  };
700
- const writeDiag = async (fields) => {
711
+ // Store writes are chained so a slow `running` write cannot land
712
+ // after the terminal one.
713
+ let durableWrites = Promise.resolve();
714
+ const writeDiag = async (fields, options) => {
701
715
  const classification = fields.failureCode === undefined
702
716
  ? undefined
703
717
  : hostedFailureClassification(fields.failureCode);
704
- await flushHostedExecutionRecord(sinks, {
718
+ const record = {
705
719
  executionId,
706
720
  sessionPublicId: execution.sessionPublicId,
707
721
  sessionId: fields.sessionId,
@@ -713,16 +727,25 @@ export function registerHostedDeliveryRoute(input) {
713
727
  ...(fields.errorCode === undefined ? {} : { errorCode: fields.errorCode }),
714
728
  classification,
715
729
  ...(fields.error === undefined ? {} : { error: fields.error }),
716
- });
730
+ };
731
+ const writtenAt = new Date().toISOString();
732
+ await writeLocalHostedExecutionRecord(sinks, record, writtenAt);
733
+ durableWrites = durableWrites.then(() => flushDurableHostedExecutionRecord(sinks, record, writtenAt));
734
+ if (options.awaitDurable) {
735
+ await durableWrites;
736
+ }
717
737
  };
718
- // Claim the file before the turn runs. If a later status request
719
- // fails, the host reads this record while the turn may still be
720
- // running; the marker prevents it from surfacing the previous
721
- // delivery's terminal record.
738
+ // Claim the local file before the turn runs. If a later status
739
+ // request fails, the host reads this record while the turn may
740
+ // still be running; the marker prevents it from surfacing the
741
+ // previous delivery's terminal record. The store copies are
742
+ // dashboard history, so the turn does not wait on them.
743
+ const endClaim = startHostedSpan("execute.claim", spanAttributes);
722
744
  await writeDiag({
723
745
  sessionId: "",
724
746
  turnStatus: HOSTED_EXECUTION_DIAG_RUNNING_STATUS,
725
- });
747
+ }, { awaitDurable: false });
748
+ endClaim();
726
749
  let sessionId = "";
727
750
  const owner = {
728
751
  primaryDeliveryId: admitted.deliveryId,
@@ -743,6 +766,7 @@ export function registerHostedDeliveryRoute(input) {
743
766
  key: admitted.send.mailboxContinuationKey,
744
767
  },
745
768
  };
769
+ const endSend = startHostedSpan("execute.send", spanAttributes);
746
770
  const session = input.startSend === undefined
747
771
  ? await args.send(admitted.send.message, options)
748
772
  : await input.startSend({
@@ -751,6 +775,7 @@ export function registerHostedDeliveryRoute(input) {
751
775
  options,
752
776
  sessionPublicId: execution.sessionPublicId,
753
777
  });
778
+ endSend();
754
779
  sessionId = session.id;
755
780
  // The pre-turn claim used an empty sessionId. Stamp the
756
781
  // engine id now so a dashboard / session-view poll that
@@ -758,7 +783,7 @@ export function registerHostedDeliveryRoute(input) {
758
783
  await writeDiag({
759
784
  sessionId,
760
785
  turnStatus: HOSTED_EXECUTION_DIAG_RUNNING_STATUS,
761
- });
786
+ }, { awaitDurable: false });
762
787
  const outcome = await refreshStartLogWhile(sinks, execution.sessionPublicId, () => session.waitForCompletion());
763
788
  completionAt = hostedExecutionNow();
764
789
  // Status is the owner turn. waitForCompletion still waited
@@ -796,7 +821,7 @@ export function registerHostedDeliveryRoute(input) {
796
821
  abortReason: abortReasonFromTurnStatus(outcome.status, outcome.cancellationReason),
797
822
  failureCode: hostedFailure?.error,
798
823
  ...(outcome.errorCode === undefined ? {} : { errorCode: outcome.errorCode }),
799
- });
824
+ }, { awaitDurable: true });
800
825
  const reply = hostedFailure !== undefined
801
826
  ? {
802
827
  status: 503,
@@ -845,7 +870,7 @@ export function registerHostedDeliveryRoute(input) {
845
870
  failureCode: "internal_error",
846
871
  error,
847
872
  ...(thrownErrorCode === undefined ? {} : { errorCode: thrownErrorCode }),
848
- });
873
+ }, { awaitDurable: true });
849
874
  const endedAt = hostedExecutionNow();
850
875
  // Preserve completion/drain marks when the failure happened
851
876
  // during post-drain work; otherwise collapse to endedAt.
@@ -1023,6 +1048,14 @@ function hostedFailureForUnfinishedTurn(outcome) {
1023
1048
  }
1024
1049
  return { error: "turn_failed", retry: HOSTED_GUEST_RETRY_TERMINAL };
1025
1050
  }
1051
+ /**
1052
+ * `agent_sdk.hosted.<step>` span; call the result to end it. The delivery
1053
+ * replies before this work finishes, so the inbound HTTP span never covers it.
1054
+ */
1055
+ function startHostedSpan(step, attributes) {
1056
+ const span = trace.getTracer("agent_sdk").startSpan(`agent_sdk.hosted.${step}`, { attributes });
1057
+ return () => span.end();
1058
+ }
1026
1059
  async function afterHostedWork(flushOtel, work) {
1027
1060
  try {
1028
1061
  const result = await work();
@@ -32,11 +32,14 @@ export type HostedExecutionFlushFields = {
32
32
  classification?: HostedFailureClassification;
33
33
  error?: unknown;
34
34
  };
35
+ /** The guest-disk diagnostic the host reads after a failed execute. */
36
+ export declare function writeLocalHostedExecutionRecord(sinks: HostedExecutionFlushSinks, fields: HostedExecutionFlushFields, writtenAt: string): Promise<void>;
35
37
  /**
36
- * Write local diagnostics and durable output together. Soft-fail per sink so
37
- * a storage outage does not change the hosted response.
38
+ * Store-backed execution history and process output. Never rejects. Both
39
+ * sinks start synchronously, so their crash-flush state is stamped before
40
+ * either store round trip.
38
41
  */
39
- export declare function flushHostedExecutionRecord(sinks: HostedExecutionFlushSinks, fields: HostedExecutionFlushFields): Promise<void>;
42
+ export declare function flushDurableHostedExecutionRecord(sinks: HostedExecutionFlushSinks, fields: HostedExecutionFlushFields, writtenAt: string): Promise<void>;
40
43
  /**
41
44
  * Each refresh is a store write on the deployment's shared write budget, so
42
45
  * keep it coarse. An unchanged tee costs nothing (the store skips the put).
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-execution-flush.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAG9B,MAAM,sBAAsB,CAAC;AAU9B,MAAM,MAAM,yBAAyB,GAAG;IACtC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,aAAa,CAAC,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,YAAY,CAAC,IAAI,YAAY,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,8BAA8B,CAAC;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,2BAA2B,CAAC;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,yBAAyB,EAChC,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,IAAI,CAAC,CAgDf;AAED;;;GAGG;AACH,eAAO,MAAM,oCAAoC,QAAS,CAAC;AAE3D;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,KAAK,EAAE,yBAAyB,EAChC,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAqBZ;AAED;;GAEG;AACH,wBAAsB,gCAAgC,CAAC,IAAI,EAAE;IAC3D,iBAAiB,EAAE,CACjB,MAAM,EAAE,OAAO,CACb,qBAAqB,EACrB,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAC9D,EACD,KAAK,CAAC,EAAE,OAAO,KACZ,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CACb,qBAAqB,EACrB,cAAc,GAAG,oBAAoB,GAAG,qBAAqB,CAC9D,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKhB"}
1
+ {"version":3,"file":"hosted-execution-flush.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-execution-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAG9B,MAAM,sBAAsB,CAAC;AAU9B,MAAM,MAAM,yBAAyB,GAAG;IACtC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,CAAC,KAAK,EAAE,wBAAwB,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