@cursor/july 0.1.109 → 0.1.112

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 (1166) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +0 -15
  3. package/dist/bin/agent-serve.js +99 -67
  4. package/dist/channels/bitbucket/api.js +8 -8
  5. package/dist/channels/bitbucket/binding.js +4 -4
  6. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  7. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  8. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/checks.js +1 -1
  10. package/dist/channels/bitbucket/cursor-account.js +1 -1
  11. package/dist/channels/bitbucket/events.js +1 -1
  12. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  13. package/dist/channels/checks.d.ts.map +1 -1
  14. package/dist/channels/checks.js +2 -2
  15. package/dist/channels/deployments/deployments-channel.js +1 -1
  16. package/dist/channels/github/cursor-account.js +3 -3
  17. package/dist/channels/github/defaults.d.ts.map +1 -1
  18. package/dist/channels/github/defaults.js +5 -3
  19. package/dist/channels/github/events.js +1 -1
  20. package/dist/channels/github/forward.js +8 -8
  21. package/dist/channels/github/github-channel.d.ts +29 -19
  22. package/dist/channels/github/github-channel.d.ts.map +1 -1
  23. package/dist/channels/github/github-channel.js +46 -32
  24. package/dist/channels/github/progress.d.ts.map +1 -1
  25. package/dist/channels/github/progress.js +7 -2
  26. package/dist/channels/github/state.d.ts +6 -0
  27. package/dist/channels/github/state.d.ts.map +1 -1
  28. package/dist/channels/github/types.d.ts +6 -0
  29. package/dist/channels/github/types.d.ts.map +1 -1
  30. package/dist/channels/gitlab/binding.js +4 -4
  31. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  32. package/dist/channels/gitlab/checks.js +1 -1
  33. package/dist/channels/gitlab/cursor-account.js +1 -1
  34. package/dist/channels/gitlab/events.js +1 -1
  35. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  36. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  37. package/dist/channels/gitlab/replay.js +2 -2
  38. package/dist/channels/origin/binding.d.ts +2 -0
  39. package/dist/channels/origin/binding.d.ts.map +1 -1
  40. package/dist/channels/origin/binding.js +3 -3
  41. package/dist/channels/origin/checks.d.ts +19 -7
  42. package/dist/channels/origin/checks.d.ts.map +1 -1
  43. package/dist/channels/origin/checks.js +13 -9
  44. package/dist/channels/origin/cursor-account.js +1 -1
  45. package/dist/channels/origin/defaults.d.ts.map +1 -1
  46. package/dist/channels/origin/defaults.js +3 -1
  47. package/dist/channels/origin/events.js +1 -1
  48. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  49. package/dist/channels/origin/origin-channel.js +2 -1
  50. package/dist/channels/origin/origin-webhook.js +2 -2
  51. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  52. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  53. package/dist/channels/slack/agentic-delivery.js +560 -0
  54. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  55. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  56. package/dist/channels/slack/agentic-posted.js +102 -0
  57. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  58. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  59. package/dist/channels/slack/agentic-signals.js +204 -0
  60. package/dist/channels/slack/api.d.ts +20 -1
  61. package/dist/channels/slack/api.d.ts.map +1 -1
  62. package/dist/channels/slack/api.js +43 -11
  63. package/dist/channels/slack/approvals.js +1 -1
  64. package/dist/channels/slack/auth.d.ts.map +1 -1
  65. package/dist/channels/slack/auth.js +3 -1
  66. package/dist/channels/slack/blocks.js +3 -3
  67. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  68. package/dist/channels/slack/bot-mentions.js +5 -5
  69. package/dist/channels/slack/channel-watch.js +1 -1
  70. package/dist/channels/slack/cli-project.js +3 -3
  71. package/dist/channels/slack/defaults.d.ts +3 -0
  72. package/dist/channels/slack/defaults.d.ts.map +1 -1
  73. package/dist/channels/slack/defaults.js +90 -29
  74. package/dist/channels/slack/dispatch.d.ts +44 -1
  75. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  76. package/dist/channels/slack/dispatch.js +323 -107
  77. package/dist/channels/slack/doctor.js +1 -1
  78. package/dist/channels/slack/eval-directive.js +1 -1
  79. package/dist/channels/slack/external-policy.d.ts +2 -1
  80. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  81. package/dist/channels/slack/external-policy.js +13 -2
  82. package/dist/channels/slack/footer.d.ts +30 -0
  83. package/dist/channels/slack/footer.d.ts.map +1 -0
  84. package/dist/channels/slack/footer.js +88 -0
  85. package/dist/channels/slack/index.d.ts +2 -0
  86. package/dist/channels/slack/index.d.ts.map +1 -1
  87. package/dist/channels/slack/index.js +2 -0
  88. package/dist/channels/slack/interactive.d.ts.map +1 -1
  89. package/dist/channels/slack/interactive.js +5 -3
  90. package/dist/channels/slack/live-delivery.d.ts +1 -1
  91. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  92. package/dist/channels/slack/live-delivery.js +20 -6
  93. package/dist/channels/slack/log.d.ts.map +1 -1
  94. package/dist/channels/slack/log.js +1 -1
  95. package/dist/channels/slack/manifest.js +1 -1
  96. package/dist/channels/slack/nudge-carrier.js +1 -1
  97. package/dist/channels/slack/nudge-store.js +2 -2
  98. package/dist/channels/slack/paint-start.d.ts +22 -0
  99. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  100. package/dist/channels/slack/paint-start.js +91 -0
  101. package/dist/channels/slack/placeholder.d.ts +62 -0
  102. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  103. package/dist/channels/slack/placeholder.js +268 -0
  104. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  105. package/dist/channels/slack/progress-delivery.js +13 -4
  106. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  107. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  108. package/dist/channels/slack/reasoning-chip.js +30 -0
  109. package/dist/channels/slack/recording-sink.d.ts +29 -0
  110. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  111. package/dist/channels/slack/recording-sink.js +142 -0
  112. package/dist/channels/slack/reply-options.d.ts +8 -1
  113. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  114. package/dist/channels/slack/reply-options.js +59 -14
  115. package/dist/channels/slack/setup.js +1 -1
  116. package/dist/channels/slack/slack-channel.d.ts +2 -2
  117. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  118. package/dist/channels/slack/slack-channel.js +58 -30
  119. package/dist/channels/slack/socket-mode.js +2 -2
  120. package/dist/channels/slack/thread-context.js +5 -5
  121. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  122. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  123. package/dist/channels/slack/tool-approval-events.js +50 -38
  124. package/dist/channels/slack/tool-cards.js +1 -1
  125. package/dist/channels/slack/tool-chip.d.ts +9 -0
  126. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  127. package/dist/channels/slack/tool-chip.js +25 -0
  128. package/dist/channels/slack/types.d.ts +49 -7
  129. package/dist/channels/slack/types.d.ts.map +1 -1
  130. package/dist/channels/slack/upload.d.ts +13 -0
  131. package/dist/channels/slack/upload.d.ts.map +1 -0
  132. package/dist/channels/slack/upload.js +135 -0
  133. package/dist/channels.d.ts +10 -14
  134. package/dist/channels.d.ts.map +1 -1
  135. package/dist/channels.js +9 -21
  136. package/dist/dashboard-session-url.d.ts +15 -0
  137. package/dist/dashboard-session-url.d.ts.map +1 -0
  138. package/dist/dashboard-session-url.js +25 -0
  139. package/dist/docs/404.html +3 -3
  140. package/dist/docs/architecture.svg +59 -0
  141. package/dist/docs/assets/app.DxTdhphC.js +309 -0
  142. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
  143. package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
  144. package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +1 -0
  145. package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CR3KTF0X.js} +2 -2
  146. package/dist/docs/assets/chunks/arc.CVVqBOdS.js +1 -0
  147. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CJHGP4ki.js +36 -0
  148. package/dist/docs/assets/chunks/baseUniq.r7UVVRBP.js +1 -0
  149. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.DKmMaTre.js +132 -0
  150. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.DDJsntUO.js +10 -0
  151. package/dist/docs/assets/chunks/channel.BjpoSbz_.js +1 -0
  152. package/dist/docs/assets/chunks/chunk-4BX2VUAB.BK2rKt6W.js +1 -0
  153. package/dist/docs/assets/chunks/chunk-4TB4RGXK.DRLV8RnF.js +206 -0
  154. package/dist/docs/assets/chunks/chunk-55IACEB6.DaKjxtb7.js +1 -0
  155. package/dist/docs/assets/chunks/chunk-EDXVE4YY.C5sPCIT1.js +1 -0
  156. package/dist/docs/assets/chunks/chunk-FMBD7UC4.CSGWyNTB.js +15 -0
  157. package/dist/docs/assets/chunks/chunk-OYMX7WX6.D5tK9XEr.js +231 -0
  158. package/dist/docs/assets/chunks/chunk-QZHKN3VN.BeZGd1UZ.js +1 -0
  159. package/dist/docs/assets/chunks/chunk-YZCP3GAM.U_tfWwQR.js +1 -0
  160. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +1 -0
  161. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +1 -0
  162. package/dist/docs/assets/chunks/clone.DRuGBKZC.js +1 -0
  163. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.DVeRXIb6.js +1 -0
  164. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  165. package/dist/docs/assets/chunks/dagre-KV5264BT.BpKJAeRZ.js +4 -0
  166. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  167. package/dist/docs/assets/chunks/diagram-5BDNPKRD.BQOtrd1Z.js +10 -0
  168. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.CSDAhjPI.js +24 -0
  169. package/dist/docs/assets/chunks/diagram-MMDJMWI5.Dpztst2S.js +43 -0
  170. package/dist/docs/assets/chunks/diagram-TYMM5635.qJHRizHR.js +24 -0
  171. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.vbDotH3l.js +85 -0
  172. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.CqS_ZQr4.js +162 -0
  173. package/dist/docs/assets/chunks/{framework.BCISBCiQ.js → framework.BNw1pucY.js} +6 -6
  174. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.DTLdR4pN.js +292 -0
  175. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.D04lnbnr.js +106 -0
  176. package/dist/docs/assets/chunks/graph.BlfqLJsM.js +1 -0
  177. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.tAooImWA.js +2 -0
  178. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  179. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js +70 -0
  180. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.C3tUgyCg.js +139 -0
  181. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.CtD9-QCe.js +89 -0
  182. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  183. package/dist/docs/assets/chunks/layout.D38U-LnT.js +1 -0
  184. package/dist/docs/assets/chunks/linear.BJmssyhN.js +1 -0
  185. package/dist/docs/assets/chunks/min.DNgXoouU.js +1 -0
  186. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.Dcp6cxeu.js +96 -0
  187. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  188. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CLDw6zIs.js +30 -0
  189. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.CYaeeY4c.js +7 -0
  190. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.gMYuRpq2.js +84 -0
  191. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.CZqyHFbc.js +10 -0
  192. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.BTsCjUDN.js +157 -0
  193. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.CftT9mLJ.js +1 -0
  194. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +1 -0
  195. package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.B_7J9ZsV.js} +2 -2
  196. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.DbU3WUNw.js +120 -0
  197. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.ixsq-q2u.js +34 -0
  198. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  199. package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +162 -0
  200. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.C0ewvgbp.js +20 -0
  201. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.nAEhF4bO.js +7 -0
  202. package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
  203. package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
  204. package/dist/docs/assets/evals.md.BYvfZ-PO.js +72 -0
  205. package/dist/docs/assets/evals.md.BYvfZ-PO.lean.js +1 -0
  206. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +30 -0
  207. package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +1 -0
  208. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
  209. package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
  210. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
  211. package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
  212. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
  213. package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
  214. package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
  215. package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
  216. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
  217. package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
  218. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
  219. package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
  220. package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
  221. package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
  222. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
  223. package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
  224. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
  225. package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
  226. package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
  227. package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
  228. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
  229. package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
  230. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
  231. package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
  232. package/dist/docs/assets/index.md.C-t81M5J.js +17 -0
  233. package/dist/docs/assets/index.md.C-t81M5J.lean.js +1 -0
  234. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.DAvVhuuU.js} +30 -38
  235. package/dist/docs/assets/quickstart.md.DAvVhuuU.lean.js +1 -0
  236. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
  237. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
  238. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
  239. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
  240. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.nFWbzAic.js} +2 -12
  241. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
  242. package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.DLWDz9ij.js} +5 -3
  243. package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
  244. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.CmyrlXfY.js} +4 -4
  245. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.CmyrlXfY.lean.js} +1 -1
  246. package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
  247. package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
  248. package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.js +58 -0
  249. package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.lean.js +1 -0
  250. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.B7uzNENk.js} +3 -3
  251. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
  252. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.CduHavZ2.js} +3 -3
  253. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
  254. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.CU1My5My.js} +1 -1
  255. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
  256. package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
  257. package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
  258. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.BGhgpy9V.js} +3 -3
  259. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
  260. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.Ccp0R53H.js} +1 -1
  261. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
  262. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
  263. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
  264. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
  265. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
  266. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.DjQkRefx.js} +1 -1
  267. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
  268. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.BHsSMMyO.js} +2 -2
  269. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.BHsSMMyO.lean.js} +1 -1
  270. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BYzUTeVA.js} +4 -4
  271. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BYzUTeVA.lean.js} +1 -1
  272. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  273. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
  274. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
  275. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
  276. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
  277. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
  278. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
  279. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
  280. package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
  281. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
  282. package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
  283. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.CVGe_FG6.js} +1 -1
  284. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
  285. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
  286. package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
  287. package/dist/docs/building-with-agents.html +47 -18
  288. package/dist/docs/building-with-agents.md +94 -84
  289. package/dist/docs/deployment.html +62 -48
  290. package/dist/docs/deployment.md +117 -364
  291. package/dist/docs/evals.html +88 -194
  292. package/dist/docs/evals.md +146 -673
  293. package/dist/docs/guides/agent-to-agent.html +65 -12
  294. package/dist/docs/guides/agent-to-agent.md +125 -91
  295. package/dist/docs/guides/bitbucket.html +182 -14
  296. package/dist/docs/guides/bitbucket.md +249 -48
  297. package/dist/docs/guides/cloud-agents.html +49 -10
  298. package/dist/docs/guides/cloud-agents.md +123 -66
  299. package/dist/docs/guides/convert-automation.html +83 -19
  300. package/dist/docs/guides/convert-automation.md +156 -147
  301. package/dist/docs/guides/github.html +187 -62
  302. package/dist/docs/guides/github.md +260 -245
  303. package/dist/docs/guides/gitlab.html +187 -15
  304. package/dist/docs/guides/gitlab.md +249 -50
  305. package/dist/docs/guides/grokbot-agents.html +51 -11
  306. package/dist/docs/guides/grokbot-agents.md +116 -63
  307. package/dist/docs/guides/improve.html +51 -10
  308. package/dist/docs/guides/improve.md +111 -58
  309. package/dist/docs/guides/mcp-oauth.html +77 -22
  310. package/dist/docs/guides/mcp-oauth.md +111 -121
  311. package/dist/docs/guides/opentelemetry.html +72 -30
  312. package/dist/docs/guides/opentelemetry.md +105 -187
  313. package/dist/docs/guides/slack.html +89 -24
  314. package/dist/docs/guides/slack.md +170 -191
  315. package/dist/docs/guides/webhooks.html +100 -200
  316. package/dist/docs/guides/webhooks.md +154 -386
  317. package/dist/docs/hashmap.json +1 -1
  318. package/dist/docs/hillclimbing.html +47 -11
  319. package/dist/docs/hillclimbing.md +101 -55
  320. package/dist/docs/index.html +57 -12
  321. package/dist/docs/index.md +83 -150
  322. package/dist/docs/llms-full.txt +6244 -10784
  323. package/dist/docs/llms.txt +23 -46
  324. package/dist/docs/quickstart.html +70 -45
  325. package/dist/docs/quickstart.md +44 -105
  326. package/dist/docs/reference/agent-config.html +41 -8
  327. package/dist/docs/reference/artifacts.html +41 -8
  328. package/dist/docs/reference/channels.html +41 -18
  329. package/dist/docs/reference/channels.md +0 -16
  330. package/dist/docs/reference/cli.html +44 -9
  331. package/dist/docs/reference/cli.md +2 -16
  332. package/dist/docs/reference/connections.html +43 -10
  333. package/dist/docs/reference/connections.md +3 -5
  334. package/dist/docs/reference/evals.html +116 -0
  335. package/dist/docs/reference/evals.md +293 -0
  336. package/dist/docs/reference/extensions.html +83 -54
  337. package/dist/docs/reference/extensions.md +127 -199
  338. package/dist/docs/reference/hooks.html +42 -9
  339. package/dist/docs/reference/hooks.md +34 -36
  340. package/dist/docs/reference/http-api.html +42 -9
  341. package/dist/docs/reference/http-api.md +5 -5
  342. package/dist/docs/reference/instructions.html +41 -8
  343. package/dist/docs/reference/playground.html +40 -7
  344. package/dist/docs/reference/playground.md +2 -2
  345. package/dist/docs/reference/project-layout.html +42 -9
  346. package/dist/docs/reference/project-layout.md +3 -4
  347. package/dist/docs/reference/prompt.html +41 -8
  348. package/dist/docs/reference/schedules.html +41 -8
  349. package/dist/docs/reference/sessions.html +40 -7
  350. package/dist/docs/reference/sessions.md +5 -4
  351. package/dist/docs/reference/skills.html +41 -8
  352. package/dist/docs/reference/subagents.html +41 -8
  353. package/dist/docs/reference/subagents.md +2 -4
  354. package/dist/docs/reference/tools.html +43 -10
  355. package/dist/docs/reference/tools.md +2 -5
  356. package/dist/docs/templates/agentic-owners.html +41 -8
  357. package/dist/docs/templates/pr-autofixer.html +41 -8
  358. package/dist/docs/templates/security-reviewer.html +41 -8
  359. package/dist/docs/templates/thermo-quality-review.html +62 -0
  360. package/dist/docs/templates/thermo-quality-review.md +75 -0
  361. package/dist/docs/templates/thermo-review.html +62 -0
  362. package/dist/docs/templates/thermo-review.md +74 -0
  363. package/dist/docs/templates/triage.html +41 -8
  364. package/dist/docs/troubleshooting.html +41 -8
  365. package/dist/docs/troubleshooting.md +97 -67
  366. package/dist/evals/assertions.js +19 -19
  367. package/dist/evals/expect.js +1 -1
  368. package/dist/evals/judge.js +1 -1
  369. package/dist/evals/reporters.d.ts.map +1 -1
  370. package/dist/evals/reporters.js +8 -8
  371. package/dist/evals/run-facts.js +2 -2
  372. package/dist/evals.d.ts +1 -1
  373. package/dist/evals.d.ts.map +1 -1
  374. package/dist/evals.js +7 -7
  375. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  376. package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
  377. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  378. package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
  379. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  380. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  381. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  382. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  383. package/dist/extensions/improve/extension.d.ts +3 -1
  384. package/dist/extensions/improve/extension.d.ts.map +1 -1
  385. package/dist/extensions/improve/extension.js +4 -2
  386. package/dist/extensions/improve/skills/yourself.js +2 -2
  387. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  388. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  389. package/dist/extensions/slack-communication/extension.js +32 -0
  390. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  391. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  392. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  393. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  394. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  395. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  396. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  397. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  398. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  399. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  400. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  401. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  402. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  403. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  404. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  405. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  406. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  407. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  408. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  409. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  410. package/dist/extensions/slack-communication/tools/react.js +27 -0
  411. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  412. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  413. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  414. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  415. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  416. package/dist/files-backends/cursor-hosted.js +357 -74
  417. package/dist/files-backends/local-fs.js +1 -1
  418. package/dist/files.d.ts +15 -0
  419. package/dist/files.d.ts.map +1 -1
  420. package/dist/filesystem.d.ts +46 -2
  421. package/dist/filesystem.d.ts.map +1 -1
  422. package/dist/filesystem.js +160 -113
  423. package/dist/index.d.ts +7 -10
  424. package/dist/index.d.ts.map +1 -1
  425. package/dist/index.js +5 -7
  426. package/dist/internal/advertise-tools.js +6 -6
  427. package/dist/internal/approval-gate.js +1 -1
  428. package/dist/internal/artifacts-store.js +3 -3
  429. package/dist/internal/as-of.js +2 -2
  430. package/dist/internal/authored-alias-hooks.js +1 -1
  431. package/dist/internal/builtin-tools/reminders.js +2 -2
  432. package/dist/internal/chat-client.js +5 -5
  433. package/dist/internal/cli-ax.d.ts +7 -0
  434. package/dist/internal/cli-ax.d.ts.map +1 -1
  435. package/dist/internal/cli-ax.js +140 -27
  436. package/dist/internal/cli-bitbucket.js +10 -10
  437. package/dist/internal/cli-convert-automation.js +2 -2
  438. package/dist/internal/cli-cursor.d.ts +3 -11
  439. package/dist/internal/cli-cursor.d.ts.map +1 -1
  440. package/dist/internal/cli-cursor.js +5 -10
  441. package/dist/internal/cli-deploy.d.ts +12 -2
  442. package/dist/internal/cli-deploy.d.ts.map +1 -1
  443. package/dist/internal/cli-deploy.js +328 -96
  444. package/dist/internal/cli-docs.js +5 -5
  445. package/dist/internal/cli-github.js +15 -16
  446. package/dist/internal/cli-gitlab.js +10 -10
  447. package/dist/internal/cli-manifest.js +1 -1
  448. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  449. package/dist/internal/cli-mcp-oauth.js +5 -5
  450. package/dist/internal/cli-mcp.js +3 -3
  451. package/dist/internal/cli-skills.js +2 -2
  452. package/dist/internal/cli-slack.js +5 -5
  453. package/dist/internal/cloud-turn-cost.js +1 -1
  454. package/dist/internal/continuation-identity.d.ts.map +1 -1
  455. package/dist/internal/continuation-identity.js +15 -9
  456. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  457. package/dist/internal/conversation-mirror.js +33 -2
  458. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  459. package/dist/internal/convert-automation/types.d.ts +8 -0
  460. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  461. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  462. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  463. package/dist/internal/cursor/account-mcp.js +32 -27
  464. package/dist/internal/cursor/backend-client.d.ts +15 -10
  465. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  466. package/dist/internal/cursor/backend-client.js +17 -11
  467. package/dist/internal/cursor/credentials.js +1 -1
  468. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  469. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  470. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  471. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  472. package/dist/internal/cursor-agent-template.d.ts +1 -1
  473. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  474. package/dist/internal/cursor-agent-template.js +2 -0
  475. package/dist/internal/cursor-deployment-relay.js +9 -9
  476. package/dist/internal/cursor-event-relay.js +10 -10
  477. package/dist/internal/cursor-relay-core.js +2 -2
  478. package/dist/internal/deploy-client.d.ts +106 -9
  479. package/dist/internal/deploy-client.d.ts.map +1 -1
  480. package/dist/internal/deploy-client.js +171 -23
  481. package/dist/internal/deploy-manifest.d.ts +13 -0
  482. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  483. package/dist/internal/deploy-manifest.js +32 -16
  484. package/dist/internal/discovery/agent-config.d.ts +5 -0
  485. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  486. package/dist/internal/discovery/agent-config.js +27 -0
  487. package/dist/internal/discovery/agent.d.ts.map +1 -1
  488. package/dist/internal/discovery/agent.js +10 -8
  489. package/dist/internal/discovery/channels.js +4 -4
  490. package/dist/internal/discovery/connections.js +4 -4
  491. package/dist/internal/discovery/cursor-plugin.js +12 -12
  492. package/dist/internal/discovery/extension-overlay.js +3 -3
  493. package/dist/internal/discovery/extensions.js +6 -6
  494. package/dist/internal/discovery/info.js +9 -9
  495. package/dist/internal/discovery/instructions.js +1 -1
  496. package/dist/internal/discovery/project.d.ts.map +1 -1
  497. package/dist/internal/discovery/project.js +4 -4
  498. package/dist/internal/discovery/services.js +1 -1
  499. package/dist/internal/discovery/tools.js +1 -1
  500. package/dist/internal/docs-site.js +2 -2
  501. package/dist/internal/env-file.js +1 -1
  502. package/dist/internal/eval-run-store.d.ts.map +1 -1
  503. package/dist/internal/eval-run-store.js +7 -7
  504. package/dist/internal/eval-runner.js +14 -14
  505. package/dist/internal/evals-client.js +4 -4
  506. package/dist/internal/event-log.js +8 -8
  507. package/dist/internal/event-mapper.d.ts +18 -0
  508. package/dist/internal/event-mapper.d.ts.map +1 -1
  509. package/dist/internal/event-mapper.js +34 -2
  510. package/dist/internal/filesystem/format.d.ts.map +1 -1
  511. package/dist/internal/filesystem/format.js +6 -3
  512. package/dist/internal/filesystem/scratch.js +3 -3
  513. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  514. package/dist/internal/filesystem/tools.js +7 -7
  515. package/dist/internal/filesystem/walk.d.ts +7 -4
  516. package/dist/internal/filesystem/walk.d.ts.map +1 -1
  517. package/dist/internal/filesystem/walk.js +35 -12
  518. package/dist/internal/framework-file-storage.d.ts +6 -2
  519. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  520. package/dist/internal/framework-file-storage.js +91 -2
  521. package/dist/internal/framework-storage-selection.d.ts +0 -6
  522. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  523. package/dist/internal/framework-storage-selection.js +2 -11
  524. package/dist/internal/github-fanout.js +3 -3
  525. package/dist/internal/guest-network.js +4 -4
  526. package/dist/internal/host-files.js +1 -1
  527. package/dist/internal/host-kv.js +2 -2
  528. package/dist/internal/hosted-admission-adapter.d.ts +5 -0
  529. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  530. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  531. package/dist/internal/hosted-catch-protocol.js +2 -4
  532. package/dist/internal/hosted-catch.js +1 -1
  533. package/dist/internal/hosted-delivery-protocol.d.ts +46 -0
  534. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  535. package/dist/internal/hosted-delivery-protocol.js +126 -9
  536. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  537. package/dist/internal/hosted-delivery.js +209 -64
  538. package/dist/internal/hosted-execution-diag.js +3 -3
  539. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  540. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  541. package/dist/internal/hosted-execution-latency.js +220 -0
  542. package/dist/internal/hosting.d.ts +5 -5
  543. package/dist/internal/hosting.d.ts.map +1 -1
  544. package/dist/internal/hosting.js +5 -6
  545. package/dist/internal/http-channel-define.d.ts +11 -0
  546. package/dist/internal/http-channel-define.d.ts.map +1 -0
  547. package/dist/internal/http-channel-define.js +18 -0
  548. package/dist/internal/http-channel.d.ts +2 -3
  549. package/dist/internal/http-channel.d.ts.map +1 -1
  550. package/dist/internal/http-channel.js +3 -4
  551. package/dist/internal/http-control-plane-session.d.ts +7 -3
  552. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  553. package/dist/internal/http-control-plane-session.js +22 -10
  554. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  555. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  556. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  557. package/dist/internal/init-interview.js +7 -7
  558. package/dist/internal/init-project.d.ts.map +1 -1
  559. package/dist/internal/init-project.js +18 -14
  560. package/dist/internal/init-scaffold.js +1 -1
  561. package/dist/internal/inline-stdio-mcp.js +2 -2
  562. package/dist/internal/install-cursor-skills.js +10 -10
  563. package/dist/internal/json-schema.js +1 -1
  564. package/dist/internal/local-control-plane.d.ts.map +1 -1
  565. package/dist/internal/local-control-plane.js +3 -3
  566. package/dist/internal/local-env.js +3 -3
  567. package/dist/internal/log-ring.js +1 -1
  568. package/dist/internal/logs-client.js +1 -1
  569. package/dist/internal/mcp-endpoint.js +8 -8
  570. package/dist/internal/mcp-host.js +4 -4
  571. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  572. package/dist/internal/mcp-oauth.js +5 -5
  573. package/dist/internal/net.js +2 -2
  574. package/dist/internal/otel/config.js +3 -3
  575. package/dist/internal/otel/runtime.js +13 -13
  576. package/dist/internal/peer-connections.js +2 -2
  577. package/dist/internal/platform-schedule-sync.js +1 -1
  578. package/dist/internal/platform-timers.js +1 -1
  579. package/dist/internal/playground/static.js +2 -2
  580. package/dist/internal/playground/toolchain.js +2 -2
  581. package/dist/internal/playground-proxy.js +3 -3
  582. package/dist/internal/process-memory-telemetry.js +1 -1
  583. package/dist/internal/reminder-runner.d.ts.map +1 -1
  584. package/dist/internal/reminder-runner.js +7 -7
  585. package/dist/internal/reminder-store.js +1 -1
  586. package/dist/internal/request-error-status.d.ts.map +1 -1
  587. package/dist/internal/request-error-status.js +9 -0
  588. package/dist/internal/resolved-connections.js +8 -8
  589. package/dist/internal/result-output.d.ts +14 -2
  590. package/dist/internal/result-output.d.ts.map +1 -1
  591. package/dist/internal/result-output.js +45 -2
  592. package/dist/internal/router.js +4 -4
  593. package/dist/internal/run-client.js +2 -2
  594. package/dist/internal/schedule-runner.js +6 -6
  595. package/dist/internal/scm/pr-url.d.ts +3 -1
  596. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  597. package/dist/internal/scm/pr-url.js +10 -2
  598. package/dist/internal/sdk-runner.d.ts.map +1 -1
  599. package/dist/internal/sdk-runner.js +14 -15
  600. package/dist/internal/serve-restart.js +1 -1
  601. package/dist/internal/server.d.ts.map +1 -1
  602. package/dist/internal/server.js +175 -126
  603. package/dist/internal/session-cost.js +3 -3
  604. package/dist/internal/session-engine.d.ts +34 -0
  605. package/dist/internal/session-engine.d.ts.map +1 -1
  606. package/dist/internal/session-engine.js +386 -184
  607. package/dist/internal/session-run-log.d.ts.map +1 -1
  608. package/dist/internal/session-run-log.js +4 -4
  609. package/dist/internal/session-store.d.ts +47 -3
  610. package/dist/internal/session-store.d.ts.map +1 -1
  611. package/dist/internal/session-store.js +198 -33
  612. package/dist/internal/sessions-client.js +3 -3
  613. package/dist/internal/skill-catalog.d.ts +28 -0
  614. package/dist/internal/skill-catalog.d.ts.map +1 -0
  615. package/dist/internal/skill-catalog.js +44 -0
  616. package/dist/internal/slack-thread-key.d.ts +7 -0
  617. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  618. package/dist/internal/slack-thread-key.js +10 -0
  619. package/dist/internal/sleep.js +1 -1
  620. package/dist/internal/storage-coordinator.d.ts +17 -0
  621. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  622. package/dist/internal/storage-coordinator.js +111 -11
  623. package/dist/internal/storage.d.ts +2 -0
  624. package/dist/internal/storage.d.ts.map +1 -0
  625. package/dist/internal/storage.js +1 -0
  626. package/dist/internal/store-mirror.js +4 -4
  627. package/dist/internal/terminal-style.js +2 -2
  628. package/dist/internal/tool-result.js +3 -3
  629. package/dist/internal/trajectory.js +7 -7
  630. package/dist/internal/turn-governor.js +2 -2
  631. package/dist/internal/turn-outbox.js +1 -1
  632. package/dist/internal/update-check.js +2 -2
  633. package/dist/internal/v2-hosting.d.ts +9 -0
  634. package/dist/internal/v2-hosting.d.ts.map +1 -1
  635. package/dist/internal/v2-hosting.js +10 -0
  636. package/dist/internal/workspace.d.ts +13 -10
  637. package/dist/internal/workspace.d.ts.map +1 -1
  638. package/dist/internal/workspace.js +17 -16
  639. package/dist/kv/memory-kv.d.ts +6 -4
  640. package/dist/kv/memory-kv.d.ts.map +1 -1
  641. package/dist/kv/memory-kv.js +9 -7
  642. package/dist/kv.d.ts +4 -7
  643. package/dist/kv.d.ts.map +1 -1
  644. package/dist/kv.js +4 -7
  645. package/dist/otel-public.d.ts +7 -0
  646. package/dist/otel-public.d.ts.map +1 -0
  647. package/dist/otel-public.js +5 -0
  648. package/dist/otel.d.ts +7 -2
  649. package/dist/otel.d.ts.map +1 -1
  650. package/dist/otel.js +7 -2
  651. package/dist/playground/assets/index-B1c1LeIf.js +67 -0
  652. package/dist/playground/assets/index-CK2LX3iD.css +1 -0
  653. package/dist/playground/index.html +2 -2
  654. package/dist/prompt.js +1 -1
  655. package/dist/result.d.ts +10 -4
  656. package/dist/result.d.ts.map +1 -1
  657. package/dist/result.js +9 -3
  658. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  659. package/dist/storage-backends/cursor-hosted.d.ts +5 -17
  660. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  661. package/dist/storage-backends/cursor-hosted.js +6 -20
  662. package/dist/storage-backends/file-kv.js +7 -7
  663. package/dist/storage.d.ts +20 -2
  664. package/dist/storage.d.ts.map +1 -1
  665. package/dist/storage.js +7 -6
  666. package/dist/types.d.ts +76 -11
  667. package/dist/types.d.ts.map +1 -1
  668. package/dist/types.js +12 -4
  669. package/docs/README.md +85 -152
  670. package/docs/building-with-agents.md +96 -86
  671. package/docs/deployment.md +118 -365
  672. package/docs/evals.md +147 -674
  673. package/docs/guides/agent-to-agent.md +126 -92
  674. package/docs/guides/bitbucket.md +250 -49
  675. package/docs/guides/cloud-agents.md +124 -67
  676. package/docs/guides/convert-automation.md +157 -148
  677. package/docs/guides/github.md +261 -246
  678. package/docs/guides/gitlab.md +250 -51
  679. package/docs/guides/grokbot-agents.md +117 -64
  680. package/docs/guides/improve.md +112 -59
  681. package/docs/guides/mcp-oauth.md +112 -122
  682. package/docs/guides/opentelemetry.md +106 -188
  683. package/docs/guides/slack.md +171 -192
  684. package/docs/guides/webhooks.md +155 -387
  685. package/docs/hillclimbing.md +102 -56
  686. package/docs/quickstart.md +45 -106
  687. package/docs/reference/channels.md +0 -16
  688. package/docs/reference/cli.md +2 -16
  689. package/docs/reference/connections.md +3 -5
  690. package/docs/reference/evals.md +298 -0
  691. package/docs/reference/extensions.md +128 -200
  692. package/docs/reference/hooks.md +34 -36
  693. package/docs/reference/http-api.md +5 -5
  694. package/docs/reference/playground.md +2 -2
  695. package/docs/reference/project-layout.md +3 -4
  696. package/docs/reference/sessions.md +5 -4
  697. package/docs/reference/subagents.md +2 -4
  698. package/docs/reference/tools.md +2 -5
  699. package/docs/templates/thermo-quality-review.md +80 -0
  700. package/docs/templates/thermo-review.md +79 -0
  701. package/docs/troubleshooting.md +98 -68
  702. package/package.json +55 -37
  703. package/skills/framework-map/SKILL.md +2 -2
  704. package/skills/github/SKILL.md +21 -13
  705. package/skills/otel/SKILL.md +8 -18
  706. package/src/bin/agent-serve.ts +115 -72
  707. package/src/channels/bitbucket/api.ts +8 -8
  708. package/src/channels/bitbucket/binding.ts +4 -4
  709. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  710. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  711. package/src/channels/bitbucket/checks.ts +3 -4
  712. package/src/channels/bitbucket/cursor-account.ts +1 -1
  713. package/src/channels/bitbucket/events.ts +1 -1
  714. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  715. package/src/channels/checks.ts +5 -4
  716. package/src/channels/deployments/deployments-channel.ts +1 -1
  717. package/src/channels/github/api.ts +1 -1
  718. package/src/channels/github/checks.ts +1 -1
  719. package/src/channels/github/cursor-account.ts +3 -3
  720. package/src/channels/github/defaults.ts +8 -4
  721. package/src/channels/github/events.ts +1 -1
  722. package/src/channels/github/forward.ts +8 -8
  723. package/src/channels/github/github-channel.ts +48 -21
  724. package/src/channels/github/progress.ts +7 -2
  725. package/src/channels/github/state.ts +6 -0
  726. package/src/channels/github/types.ts +6 -0
  727. package/src/channels/gitlab/binding.ts +4 -4
  728. package/src/channels/gitlab/checks.ts +3 -4
  729. package/src/channels/gitlab/cursor-account.ts +1 -1
  730. package/src/channels/gitlab/events.ts +1 -1
  731. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  732. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  733. package/src/channels/gitlab/replay.ts +2 -2
  734. package/src/channels/origin/binding.ts +6 -3
  735. package/src/channels/origin/checks.ts +27 -17
  736. package/src/channels/origin/cursor-account.ts +1 -1
  737. package/src/channels/origin/defaults.ts +5 -1
  738. package/src/channels/origin/events.ts +1 -1
  739. package/src/channels/origin/origin-channel.ts +2 -1
  740. package/src/channels/origin/origin-webhook.ts +2 -2
  741. package/src/channels/slack/agentic-delivery.ts +661 -0
  742. package/src/channels/slack/agentic-posted.ts +148 -0
  743. package/src/channels/slack/agentic-signals.ts +248 -0
  744. package/src/channels/slack/api.ts +51 -11
  745. package/src/channels/slack/approvals.ts +1 -1
  746. package/src/channels/slack/attachments.ts +1 -1
  747. package/src/channels/slack/auth.ts +3 -1
  748. package/src/channels/slack/blocks.ts +3 -3
  749. package/src/channels/slack/bot-mentions.ts +5 -7
  750. package/src/channels/slack/channel-watch.ts +1 -1
  751. package/src/channels/slack/cli-project.ts +3 -3
  752. package/src/channels/slack/defaults.ts +109 -37
  753. package/src/channels/slack/dispatch.ts +419 -168
  754. package/src/channels/slack/doctor.ts +1 -1
  755. package/src/channels/slack/eval-directive.ts +1 -1
  756. package/src/channels/slack/external-policy.ts +15 -2
  757. package/src/channels/slack/footer.ts +108 -0
  758. package/src/channels/slack/index.ts +2 -0
  759. package/src/channels/slack/interactive.ts +4 -2
  760. package/src/channels/slack/live-delivery.ts +23 -7
  761. package/src/channels/slack/log.ts +1 -1
  762. package/src/channels/slack/manifest.ts +1 -1
  763. package/src/channels/slack/nudge-carrier.ts +1 -1
  764. package/src/channels/slack/nudge-store.ts +2 -2
  765. package/src/channels/slack/paint-start.ts +93 -0
  766. package/src/channels/slack/placeholder.ts +366 -0
  767. package/src/channels/slack/progress-delivery.ts +14 -1
  768. package/src/channels/slack/reasoning-chip.ts +48 -0
  769. package/src/channels/slack/recording-sink.ts +176 -0
  770. package/src/channels/slack/reply-options.ts +71 -15
  771. package/src/channels/slack/setup.ts +1 -1
  772. package/src/channels/slack/slack-channel.ts +81 -14
  773. package/src/channels/slack/socket-mode.ts +2 -2
  774. package/src/channels/slack/thread-context.ts +5 -5
  775. package/src/channels/slack/tool-approval-events.ts +54 -38
  776. package/src/channels/slack/tool-cards.ts +1 -1
  777. package/src/channels/slack/tool-chip.ts +36 -0
  778. package/src/channels/slack/types.ts +47 -7
  779. package/src/channels/slack/upload.ts +142 -0
  780. package/src/channels.ts +12 -30
  781. package/src/dashboard-session-url.ts +32 -0
  782. package/src/evals/assertions.ts +19 -19
  783. package/src/evals/expect.ts +1 -1
  784. package/src/evals/judge.ts +1 -1
  785. package/src/evals/reporters.ts +8 -9
  786. package/src/evals/run-facts.ts +2 -2
  787. package/src/evals.ts +7 -10
  788. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  789. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  790. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  791. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  792. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  793. package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
  794. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  795. package/src/extensions/improve/extension.ts +4 -2
  796. package/src/extensions/improve/skills/yourself.ts +2 -2
  797. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  798. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  799. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  800. package/src/extensions/slack-communication/extension.ts +45 -0
  801. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  802. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  803. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  804. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  805. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  806. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  807. package/src/extensions/slack-communication/tools/react.ts +33 -0
  808. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  809. package/src/files-backends/cursor-hosted.ts +502 -98
  810. package/src/files-backends/local-fs.ts +1 -1
  811. package/src/files.ts +15 -0
  812. package/src/filesystem.ts +182 -81
  813. package/src/index.ts +7 -36
  814. package/src/internal/advertise-tools.ts +6 -6
  815. package/src/internal/approval-gate.ts +1 -1
  816. package/src/internal/artifacts-store.ts +3 -3
  817. package/src/internal/as-of.ts +2 -2
  818. package/src/internal/authored-alias-hooks.ts +1 -1
  819. package/src/internal/authored-loaders.ts +2 -3
  820. package/src/internal/builtin-tools/reminders.ts +2 -2
  821. package/src/internal/chat-client.ts +5 -5
  822. package/src/internal/cli-ax.ts +172 -29
  823. package/src/internal/cli-bitbucket.ts +11 -11
  824. package/src/internal/cli-convert-automation.ts +2 -2
  825. package/src/internal/cli-cursor.ts +5 -16
  826. package/src/internal/cli-deploy.ts +389 -104
  827. package/src/internal/cli-docs.ts +5 -5
  828. package/src/internal/cli-github.ts +16 -19
  829. package/src/internal/cli-gitlab.ts +11 -11
  830. package/src/internal/cli-manifest.ts +1 -1
  831. package/src/internal/cli-mcp-oauth.ts +5 -7
  832. package/src/internal/cli-mcp.ts +3 -3
  833. package/src/internal/cli-skills.ts +2 -2
  834. package/src/internal/cli-slack.ts +5 -5
  835. package/src/internal/cloud-turn-cost.ts +1 -1
  836. package/src/internal/continuation-identity.ts +14 -9
  837. package/src/internal/conversation-mirror.ts +36 -3
  838. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  839. package/src/internal/convert-automation/types.ts +9 -0
  840. package/src/internal/cursor/account-mcp.ts +48 -31
  841. package/src/internal/cursor/backend-client.ts +28 -17
  842. package/src/internal/cursor/credentials.ts +1 -1
  843. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  844. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  845. package/src/internal/cursor-agent-template.ts +2 -0
  846. package/src/internal/cursor-deployment-relay.ts +10 -10
  847. package/src/internal/cursor-event-relay.ts +10 -10
  848. package/src/internal/cursor-relay-core.ts +2 -2
  849. package/src/internal/deploy-client.ts +266 -24
  850. package/src/internal/deploy-manifest.ts +46 -8
  851. package/src/internal/discovery/agent-config.ts +34 -0
  852. package/src/internal/discovery/agent.ts +14 -6
  853. package/src/internal/discovery/channels.ts +4 -4
  854. package/src/internal/discovery/connections.ts +4 -4
  855. package/src/internal/discovery/cursor-plugin.ts +12 -12
  856. package/src/internal/discovery/extension-overlay.ts +3 -3
  857. package/src/internal/discovery/extensions.ts +6 -6
  858. package/src/internal/discovery/info.ts +9 -9
  859. package/src/internal/discovery/instructions.ts +1 -1
  860. package/src/internal/discovery/project.ts +4 -4
  861. package/src/internal/discovery/services.ts +1 -1
  862. package/src/internal/discovery/tools.ts +1 -1
  863. package/src/internal/docs-site.ts +2 -2
  864. package/src/internal/env-file.ts +2 -2
  865. package/src/internal/eval-run-store.ts +7 -9
  866. package/src/internal/eval-runner.ts +20 -20
  867. package/src/internal/evals-client.ts +6 -6
  868. package/src/internal/event-log.ts +10 -10
  869. package/src/internal/event-mapper.ts +37 -2
  870. package/src/internal/filesystem/format.ts +11 -12
  871. package/src/internal/filesystem/scratch.ts +3 -3
  872. package/src/internal/filesystem/tools.ts +8 -8
  873. package/src/internal/filesystem/walk.ts +61 -16
  874. package/src/internal/framework-file-storage.ts +104 -4
  875. package/src/internal/framework-storage-selection.ts +2 -12
  876. package/src/internal/github-fanout.ts +4 -4
  877. package/src/internal/guest-network.ts +4 -4
  878. package/src/internal/host-files.ts +1 -1
  879. package/src/internal/host-kv.ts +2 -2
  880. package/src/internal/hosted-admission-adapter.ts +5 -0
  881. package/src/internal/hosted-catch-protocol.ts +3 -5
  882. package/src/internal/hosted-catch.ts +1 -1
  883. package/src/internal/hosted-delivery-protocol.ts +189 -14
  884. package/src/internal/hosted-delivery.ts +294 -81
  885. package/src/internal/hosted-execution-diag.ts +3 -3
  886. package/src/internal/hosted-execution-latency.ts +334 -0
  887. package/src/internal/hosting.ts +5 -6
  888. package/src/internal/http-channel-define.ts +27 -0
  889. package/src/internal/http-channel.ts +3 -4
  890. package/src/internal/http-control-plane-session.ts +24 -11
  891. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  892. package/src/internal/init-interview.ts +7 -7
  893. package/src/internal/init-project.ts +18 -16
  894. package/src/internal/init-scaffold.ts +1 -1
  895. package/src/internal/inline-stdio-mcp.ts +2 -2
  896. package/src/internal/install-cursor-skills.ts +11 -11
  897. package/src/internal/json-schema.ts +1 -1
  898. package/src/internal/local-control-plane.ts +4 -5
  899. package/src/internal/local-env.ts +3 -3
  900. package/src/internal/log-ring.ts +1 -1
  901. package/src/internal/logs-client.ts +1 -1
  902. package/src/internal/mcp-endpoint.ts +10 -10
  903. package/src/internal/mcp-host.ts +9 -9
  904. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  905. package/src/internal/mcp-oauth.ts +5 -5
  906. package/src/internal/net.ts +2 -2
  907. package/src/internal/otel/config.ts +3 -3
  908. package/src/internal/otel/runtime.ts +14 -14
  909. package/src/internal/peer-connections.ts +2 -2
  910. package/src/internal/platform-schedule-sync.ts +1 -1
  911. package/src/internal/platform-timers.ts +1 -1
  912. package/src/internal/playground/static.ts +2 -2
  913. package/src/internal/playground/toolchain.ts +2 -2
  914. package/src/internal/playground-proxy.ts +3 -3
  915. package/src/internal/process-memory-telemetry.ts +1 -1
  916. package/src/internal/reminder-runner.ts +8 -10
  917. package/src/internal/reminder-store.ts +1 -1
  918. package/src/internal/request-error-status.ts +9 -0
  919. package/src/internal/resolved-connections.ts +8 -8
  920. package/src/internal/result-output.ts +62 -5
  921. package/src/internal/router.ts +4 -4
  922. package/src/internal/run-client.ts +2 -2
  923. package/src/internal/schedule-runner.ts +6 -6
  924. package/src/internal/scm/pr-url.ts +11 -2
  925. package/src/internal/sdk-runner.ts +14 -28
  926. package/src/internal/serve-restart.ts +1 -1
  927. package/src/internal/server.ts +201 -140
  928. package/src/internal/session-cost.ts +3 -3
  929. package/src/internal/session-engine.ts +516 -244
  930. package/src/internal/session-run-log.ts +4 -6
  931. package/src/internal/session-store.ts +213 -39
  932. package/src/internal/sessions-client.ts +3 -3
  933. package/src/internal/skill-catalog.ts +69 -0
  934. package/src/internal/slack-thread-key.ts +11 -0
  935. package/src/internal/sleep.ts +1 -1
  936. package/src/internal/storage-coordinator.ts +118 -21
  937. package/src/internal/storage.ts +1 -0
  938. package/src/internal/store-mirror.ts +4 -4
  939. package/src/internal/terminal-style.ts +2 -2
  940. package/src/internal/tool-result.ts +3 -3
  941. package/src/internal/trajectory.ts +7 -7
  942. package/src/internal/turn-governor.ts +2 -2
  943. package/src/internal/turn-outbox.ts +1 -1
  944. package/src/internal/update-check.ts +2 -2
  945. package/src/internal/v2-hosting.ts +14 -0
  946. package/src/internal/workspace.ts +17 -17
  947. package/src/kv/memory-kv.ts +9 -7
  948. package/src/kv.ts +4 -7
  949. package/src/otel-public.ts +24 -0
  950. package/src/otel.ts +7 -2
  951. package/src/prompt.ts +1 -1
  952. package/src/result.ts +10 -8
  953. package/src/storage-backends/cursor-hosted-v2.ts +2 -2
  954. package/src/storage-backends/cursor-hosted.ts +6 -23
  955. package/src/storage-backends/file-kv.ts +7 -7
  956. package/src/storage.ts +22 -7
  957. package/src/types.ts +91 -17
  958. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  959. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  960. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  961. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  962. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  963. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  964. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  965. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  966. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  967. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  968. package/templates/agentic-owners/package.json +1 -1
  969. package/templates/agents-md/agent/lib/collect.ts +16 -10
  970. package/templates/agents-md/agent/lib/config.ts +1 -1
  971. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  972. package/templates/agents-md/package.json +1 -1
  973. package/templates/code-wiki/agent/channels/github.ts +4 -7
  974. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  975. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  976. package/templates/code-wiki/package.json +1 -1
  977. package/templates/demo/agent/lib/collect.ts +6 -2
  978. package/templates/demo/agent/lib/repos.ts +1 -1
  979. package/templates/demo/agent/tools/record_demo.ts +1 -1
  980. package/templates/demo/evals/demo.eval.ts +1 -5
  981. package/templates/demo/package.json +1 -1
  982. package/templates/grokbot-agents/package.json +1 -1
  983. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  984. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  985. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  986. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  987. package/templates/pr-autofixer/package.json +1 -1
  988. package/templates/security-help/agent/lib/repos.ts +1 -1
  989. package/templates/security-help/package.json +1 -1
  990. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  991. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  992. package/templates/security-reviewer/package.json +1 -1
  993. package/templates/thermo-quality-review/README.md +35 -0
  994. package/templates/thermo-quality-review/agent/agent.ts +8 -0
  995. package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
  996. package/templates/thermo-quality-review/agent/instructions.md +43 -0
  997. package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
  998. package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
  999. package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
  1000. package/templates/thermo-quality-review/package.json +18 -0
  1001. package/templates/thermo-quality-review/tsconfig.json +12 -0
  1002. package/templates/thermo-review/README.md +35 -0
  1003. package/templates/thermo-review/agent/agent.ts +8 -0
  1004. package/templates/thermo-review/agent/channels/github.ts +42 -0
  1005. package/templates/thermo-review/agent/instructions.md +40 -0
  1006. package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
  1007. package/templates/thermo-review/evals/evals.config.ts +5 -0
  1008. package/templates/thermo-review/evals/review.eval.ts +53 -0
  1009. package/templates/thermo-review/package.json +18 -0
  1010. package/templates/thermo-review/tsconfig.json +12 -0
  1011. package/templates/triage/agent/lib/actuate.ts +26 -41
  1012. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  1013. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  1014. package/templates/triage/agent/tools/record_triage.ts +1 -4
  1015. package/templates/triage/package.json +1 -1
  1016. package/dist/client.d.ts +0 -14
  1017. package/dist/client.d.ts.map +0 -1
  1018. package/dist/client.js +0 -12
  1019. package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
  1020. package/dist/docs/assets/building-with-agents.md.D0KbSkJn.js +0 -13
  1021. package/dist/docs/assets/building-with-agents.md.D0KbSkJn.lean.js +0 -1
  1022. package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
  1023. package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
  1024. package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
  1025. package/dist/docs/assets/deployment.md.JenwuCCB.js +0 -51
  1026. package/dist/docs/assets/deployment.md.JenwuCCB.lean.js +0 -1
  1027. package/dist/docs/assets/evals.md.C7JLjoEP.js +0 -211
  1028. package/dist/docs/assets/evals.md.C7JLjoEP.lean.js +0 -1
  1029. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  1030. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  1031. package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.js +0 -10
  1032. package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.lean.js +0 -1
  1033. package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +0 -9
  1034. package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.lean.js +0 -1
  1035. package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.js +0 -12
  1036. package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.lean.js +0 -1
  1037. package/dist/docs/assets/guides_github.md.TZaTZlfz.js +0 -64
  1038. package/dist/docs/assets/guides_github.md.TZaTZlfz.lean.js +0 -1
  1039. package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.js +0 -14
  1040. package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.lean.js +0 -1
  1041. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  1042. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.lean.js +0 -1
  1043. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  1044. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  1045. package/dist/docs/assets/guides_improve.md.BGVk32bK.js +0 -14
  1046. package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +0 -1
  1047. package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.js +0 -28
  1048. package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.lean.js +0 -1
  1049. package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.js +0 -26
  1050. package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.lean.js +0 -1
  1051. package/dist/docs/assets/guides_slack.md.D4RVMM4G.js +0 -38
  1052. package/dist/docs/assets/guides_slack.md.D4RVMM4G.lean.js +0 -1
  1053. package/dist/docs/assets/guides_webhooks.md.CJK484ex.js +0 -225
  1054. package/dist/docs/assets/guides_webhooks.md.CJK484ex.lean.js +0 -1
  1055. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
  1056. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
  1057. package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
  1058. package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
  1059. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  1060. package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.js +0 -62
  1061. package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.lean.js +0 -1
  1062. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  1063. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  1064. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  1065. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  1066. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  1067. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  1068. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  1069. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  1070. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
  1071. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
  1072. package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
  1073. package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
  1074. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
  1075. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
  1076. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  1077. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  1078. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  1079. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  1080. package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
  1081. package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
  1082. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  1083. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  1084. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  1085. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  1086. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  1087. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1088. package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
  1089. package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
  1090. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1091. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1092. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1093. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1094. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1095. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1096. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1097. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1098. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1099. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1100. package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +0 -1
  1101. package/dist/docs/assets/troubleshooting.md.CYEAO9bM.lean.js +0 -1
  1102. package/dist/docs/concepts.html +0 -27
  1103. package/dist/docs/concepts.md +0 -166
  1104. package/dist/docs/design/filesystem.md +0 -376
  1105. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1106. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1107. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1108. package/dist/docs/reference/result.html +0 -45
  1109. package/dist/docs/reference/result.md +0 -89
  1110. package/dist/docs/scaffolding-agents.html +0 -27
  1111. package/dist/docs/scaffolding-agents.md +0 -130
  1112. package/dist/docs/skills/create-agent.html +0 -34
  1113. package/dist/docs/skills/create-agent.md +0 -160
  1114. package/dist/docs/skills/debug.html +0 -27
  1115. package/dist/docs/skills/debug.md +0 -36
  1116. package/dist/docs/skills/deploy.html +0 -61
  1117. package/dist/docs/skills/deploy.md +0 -161
  1118. package/dist/docs/skills/evals.html +0 -51
  1119. package/dist/docs/skills/evals.md +0 -137
  1120. package/dist/docs/skills/framework-map.html +0 -27
  1121. package/dist/docs/skills/framework-map.md +0 -99
  1122. package/dist/docs/skills/github.html +0 -42
  1123. package/dist/docs/skills/github.md +0 -93
  1124. package/dist/docs/skills/hillclimb.html +0 -33
  1125. package/dist/docs/skills/hillclimb.md +0 -55
  1126. package/dist/docs/skills/index.html +0 -27
  1127. package/dist/docs/skills/index.md +0 -21
  1128. package/dist/docs/skills/mcp-auth.html +0 -44
  1129. package/dist/docs/skills/mcp-auth.md +0 -76
  1130. package/dist/docs/skills/otel.html +0 -34
  1131. package/dist/docs/skills/otel.md +0 -53
  1132. package/dist/docs/skills/setup-slack.html +0 -46
  1133. package/dist/docs/skills/setup-slack.md +0 -141
  1134. package/dist/docs/storage.html +0 -56
  1135. package/dist/docs/storage.md +0 -167
  1136. package/dist/docs/templates/agents-md.html +0 -28
  1137. package/dist/docs/templates/agents-md.md +0 -105
  1138. package/dist/docs/templates/code-wiki.html +0 -28
  1139. package/dist/docs/templates/code-wiki.md +0 -91
  1140. package/dist/docs/templates/demo.html +0 -30
  1141. package/dist/docs/templates/demo.md +0 -80
  1142. package/dist/docs/templates/grokbot-agents.html +0 -29
  1143. package/dist/docs/templates/grokbot-agents.md +0 -48
  1144. package/dist/docs/templates/security-help.html +0 -30
  1145. package/dist/docs/templates/security-help.md +0 -65
  1146. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1147. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1148. package/dist/internal/tenant-slack/relay.js +0 -148
  1149. package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
  1150. package/dist/playground/assets/index-CqLX5uF3.js +0 -67
  1151. package/docs/concepts.md +0 -171
  1152. package/docs/design/filesystem.md +0 -376
  1153. package/docs/design/runtime-abstraction.md +0 -1756
  1154. package/docs/guides/human-in-the-loop.md +0 -131
  1155. package/docs/reference/result.md +0 -94
  1156. package/docs/scaffolding-agents.md +0 -135
  1157. package/docs/skills/index.md +0 -26
  1158. package/docs/storage.md +0 -172
  1159. package/docs/templates/agents-md.md +0 -110
  1160. package/docs/templates/code-wiki.md +0 -96
  1161. package/docs/templates/demo.md +0 -85
  1162. package/docs/templates/grokbot-agents.md +0 -53
  1163. package/docs/templates/security-help.md +0 -70
  1164. package/src/client.ts +0 -23
  1165. package/src/internal/tenant-slack/relay.ts +0 -203
  1166. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -7,12 +7,17 @@
7
7
  * URLs. File contents never transit the control plane, so a large artifact
8
8
  * costs S3 bandwidth rather than backend memory.
9
9
  *
10
- * Everything goes through the public API under `/v0/agent-serve-files`, the same
11
- * surface any API-key holder gets. This process is an ordinary client of it —
12
- * there is no private endpoint, no second base URL, and nothing here that only
13
- * works because the caller happens to be an Agent Serve engine. That matters
14
- * beyond tidiness: a self-hosted deployment, a CI job, or a customer script can
15
- * drive the same store with the same requests.
10
+ * By default everything goes through the public API under
11
+ * `/v0/agent-serve-files`, the same surface any API-key holder gets a
12
+ * self-hosted deployment, a CI job, or a customer script can drive the same
13
+ * store with the same requests. Cursor-managed v2 pods can instead be pinned
14
+ * (per deployment, at task-time bind) onto the engine-facing factory store API
15
+ * under `/internal/agentsdk/store`: same host, same credential, same stores
16
+ * and S3 objects, but flush-shaped — one control-plane request settles a whole
17
+ * `putMany` batch or a conditional delete, where `/v0` costs a presign POST
18
+ * plus stat GETs and a delete POST. The pin fails safe: an absent or
19
+ * unrecognized protocol value, or a source id that maps to neither deployment
20
+ * store role, keeps `/v0`.
16
21
  *
17
22
  * Two things follow. There is no Agent Store token: a token narrows an identity
18
23
  * to one store and one capability, which is what a caller that cannot hold a
@@ -51,7 +56,12 @@ import {
51
56
  type FileSinkEntry,
52
57
  type FileSinkPutResult,
53
58
  } from "../files.js";
54
- import { resolveDeploymentStoreSourceIdSync } from "../internal/cursor/hosted-store-secrets.js";
59
+ import {
60
+ AGENT_SERVE_FACTORY_FLUSH_PROTOCOL,
61
+ resolveDeploymentStoreSourceIdSync,
62
+ resolveFrameworkStoreSourceIdSync,
63
+ resolveStoreProtocolSync,
64
+ } from "../internal/cursor/hosted-store-secrets.js";
55
65
  import { createAgentStorePresignedUrlValidatorForBackend } from "./agent-store-presigned-url.js";
56
66
 
57
67
  /**
@@ -62,6 +72,16 @@ const DEFAULT_CURSOR_EXTERNAL_API_URL = "https://api.cursor.com";
62
72
 
63
73
  const AGENT_SERVE_FILES_PATH = "/v0/agent-serve-files";
64
74
 
75
+ /**
76
+ * Engine-facing store API on the factory service — same host, different path
77
+ * family. Selected per pod by the task-bound protocol pin
78
+ * ({@link resolveStoreProtocolSync}); the server resolves the deployment and
79
+ * its stores from the pod credential, so requests carry a store *role*
80
+ * (`deployment` | `framework`), never a store id. One flush request replaces
81
+ * the presign POST plus the stat GETs and delete POST a turn costs on `/v0`.
82
+ */
83
+ const AGENTSDK_STORE_PATH = "/internal/agentsdk/store";
84
+
65
85
  /**
66
86
  * Pinned by the deploy pipeline for every Cursor-managed deployment — which
67
87
  * provisions the file store it names in the same step — and reserved from
@@ -156,14 +176,25 @@ export interface CursorHostedFilesOptions {
156
176
  * after serve start without restarting July.
157
177
  */
158
178
  resolveStoreSourceId?: () => string | undefined;
179
+ /**
180
+ * Lazy store protocol pin (default: env, then the task-bound file). When it
181
+ * answers {@link AGENT_SERVE_FACTORY_FLUSH_PROTOCOL} and the source id maps
182
+ * to a deployment store role, requests ride the factory store API instead
183
+ * of `/v0/agent-serve-files`. Any other value keeps `/v0`.
184
+ */
185
+ resolveStoreProtocol?: () => string | undefined;
159
186
  /** Test seam; defaults to global fetch. */
160
187
  fetch?: typeof fetch;
161
188
  }
162
189
 
163
- /** What a file operation needs: where this deployment's files live. */
164
- interface FilesTarget {
165
- path(suffix?: string): string;
166
- }
190
+ /**
191
+ * What a file operation needs: where this deployment's files live, and which
192
+ * wire reaches them. `v0` addresses the public API by store source id; `flush`
193
+ * addresses the factory store API by role and lets the server resolve.
194
+ */
195
+ type FilesTarget =
196
+ | { wire: "v0"; path(suffix?: string): string }
197
+ | { wire: "flush"; store: "deployment" | "framework" };
167
198
 
168
199
  /**
169
200
  * Wire shapes from `/v0/agent-serve-files`. Declared loosely on purpose: this is a
@@ -197,6 +228,25 @@ interface ApiDeleteResponse {
197
228
  files?: Array<{ path?: string; status?: string; etag?: string }>;
198
229
  }
199
230
 
231
+ /**
232
+ * Per-op outcome from the factory store API's `flush` route, index-aligned
233
+ * with the request ops. A put answers `url`/`headers`; a delete answers
234
+ * `status`; declared loosely for the same additive-change reason as the
235
+ * `/v0` shapes above.
236
+ */
237
+ interface FlushWireOpOutcome {
238
+ path?: string;
239
+ url?: string;
240
+ headers?: Record<string, string>;
241
+ error?: string;
242
+ status?: string;
243
+ etag?: string;
244
+ }
245
+
246
+ interface FlushWireResponse {
247
+ ops?: FlushWireOpOutcome[];
248
+ }
249
+
200
250
  type HostedFilesMethods = Omit<FileSink, "get"> & {
201
251
  /** Narrower than {@link FileSink.get}: this backend always reports the etag. */
202
252
  get(key: string): Promise<FileSinkBody | undefined>;
@@ -232,16 +282,33 @@ export function cursorHostedFiles(
232
282
  /**
233
283
  * Run `call` against this deployment's files.
234
284
  *
235
- * No network call and nothing cached: the store source id comes from the
236
- * environment and the server maps it to a store on every request. Resolved
237
- * per call rather than once at construction so a misconfigured environment
238
- * fails where the operation is, not where the sink was created.
285
+ * No network call and nothing cached: the store source id and protocol pin
286
+ * come from the environment (or task-bound files) and the server maps them
287
+ * on every request. Resolved per call rather than once at construction so a
288
+ * misconfigured environment fails where the operation is, not where the
289
+ * sink was created — and so a protocol pin bound after serve start takes
290
+ * effect without a restart.
239
291
  */
240
292
  async function withFiles<T>(
241
293
  call: (files: FilesTarget) => Promise<T>
242
294
  ): Promise<T> {
243
295
  const sourceId = resolveStoreSourceId(options);
296
+ const protocol =
297
+ options.resolveStoreProtocol?.() ?? resolveStoreProtocolSync();
298
+ if (protocol === AGENT_SERVE_FACTORY_FLUSH_PROTOCOL) {
299
+ // The factory API addresses stores by role, so map the pinned source id
300
+ // back to the role it was pinned from. A source id matching neither (a
301
+ // local-dev override) has no role there and stays on `/v0`, as does any
302
+ // protocol value this runtime does not recognize.
303
+ if (sourceId === resolveFrameworkStoreSourceIdSync()) {
304
+ return await call({ wire: "flush", store: "framework" });
305
+ }
306
+ if (sourceId === resolveDeploymentStoreSourceIdSync()) {
307
+ return await call({ wire: "flush", store: "deployment" });
308
+ }
309
+ }
244
310
  return await call({
311
+ wire: "v0",
245
312
  path: (suffix = "") => `/${encodeURIComponent(sourceId)}${suffix}`,
246
313
  });
247
314
  }
@@ -252,6 +319,14 @@ export function cursorHostedFiles(
252
319
  directory: string,
253
320
  pageToken: string | undefined
254
321
  ): Promise<ApiFileListing> {
322
+ if (files.wire === "flush") {
323
+ return await flushPost<ApiFileListing>(options, "/list", {
324
+ store: files.store,
325
+ path: directory,
326
+ limit: DIRECTORY_PAGE_SIZE,
327
+ ...(pageToken === undefined ? {} : { pageToken }),
328
+ });
329
+ }
255
330
  const query = new URLSearchParams({
256
331
  path: directory,
257
332
  limit: String(DIRECTORY_PAGE_SIZE),
@@ -265,9 +340,19 @@ export function cursorHostedFiles(
265
340
  );
266
341
  }
267
342
 
343
+ /** The unscoped whole-store listing, on whichever wire the target rides. */
344
+ async function unscopedListing(files: FilesTarget): Promise<ApiFileListing> {
345
+ if (files.wire === "flush") {
346
+ return await flushPost<ApiFileListing>(options, "/list", {
347
+ store: files.store,
348
+ });
349
+ }
350
+ return await storeGet<ApiFileListing>(options, files.path());
351
+ }
352
+
268
353
  async function listEntries(prefix: string): Promise<FileSinkEntry[]> {
269
- return await withFiles(async (files) => {
270
- const raw = await storeGet<ApiFileListing>(options, files.path());
354
+ return await withFiles(async files => {
355
+ const raw = await unscopedListing(files);
271
356
  if (raw.complete === true) {
272
357
  const out: FileSinkEntry[] = [];
273
358
  for (const file of raw.files ?? []) {
@@ -378,7 +463,7 @@ export function cursorHostedFiles(
378
463
  async function statKey(key: string): Promise<FileSinkEntry | undefined> {
379
464
  const slash = key.lastIndexOf("/");
380
465
  const directory = slash === -1 ? "" : key.slice(0, slash);
381
- return await withFiles(async (files) => {
466
+ return await withFiles(async files => {
382
467
  let pageToken: string | undefined;
383
468
  for (let page = 0; page < MAX_DIRECTORY_PAGES; page += 1) {
384
469
  const raw = await directoryPage(files, directory, pageToken);
@@ -397,22 +482,224 @@ export function cursorHostedFiles(
397
482
  });
398
483
  }
399
484
 
485
+ /** One key's share of a (possibly multi-file) upload attempt. */
486
+ type UploadSpec = {
487
+ key: string;
488
+ body: Uint8Array;
489
+ precondition: { etag: string } | { new: true };
490
+ };
491
+ type UploadOutcome =
492
+ | { status: "ok"; result: FileSinkPutResult }
493
+ | { status: "conflict" }
494
+ | { status: "error"; error: unknown };
495
+
496
+ /**
497
+ * The shared presign for one upload attempt: a `/v0` upload POST, or one
498
+ * flush request whose put outcomes are reshaped into the same instruction
499
+ * list (an outcome without a `url` — an oversize refusal — surfaces exactly
500
+ * like a `/v0` multipart answer: no single-part instruction for that key).
501
+ */
502
+ async function presignUploads(
503
+ files: FilesTarget,
504
+ specs: UploadSpec[]
505
+ ): Promise<ApiPresignResponse> {
506
+ if (files.wire === "flush") {
507
+ const response = await flushPost<FlushWireResponse>(options, "/flush", {
508
+ store: files.store,
509
+ ops: specs.map(spec => ({
510
+ op: "put",
511
+ path: spec.key,
512
+ sha: createHash("sha256").update(spec.body).digest("hex"),
513
+ size: spec.body.byteLength,
514
+ ...spec.precondition,
515
+ })),
516
+ });
517
+ // Index-aligned with the request ops, entries without a `url` included:
518
+ // a refused op (oversize) must keep its slot so the by-path/positional
519
+ // instruction matching below cannot hand its sibling's presign to it,
520
+ // and the missing url surfaces as that key's own error.
521
+ return {
522
+ files: (response.ops ?? []).map(op => ({
523
+ path: op.path,
524
+ ...(typeof op.url === "string" && op.url !== ""
525
+ ? { url: op.url }
526
+ : {}),
527
+ headers: op.headers,
528
+ })),
529
+ };
530
+ }
531
+ return await storePost<ApiPresignResponse>(options, files.path("/upload"), {
532
+ files: specs.map(spec => ({
533
+ path: spec.key,
534
+ sha: createHash("sha256").update(spec.body).digest("hex"),
535
+ size: spec.body.byteLength,
536
+ ...spec.precondition,
537
+ })),
538
+ });
539
+ }
540
+
541
+ /**
542
+ * One presign call covering every spec, then parallel presigned PUTs.
543
+ * Outcomes are per spec: a 412 ("conflict") or a failed PUT for one key
544
+ * never disturbs its batch siblings. Only the presign itself is shared —
545
+ * a presign error throws and fails the whole attempt.
546
+ */
547
+ async function attemptUploads(
548
+ files: FilesTarget,
549
+ specs: UploadSpec[]
550
+ ): Promise<UploadOutcome[]> {
551
+ const presigned = await presignUploads(files, specs);
552
+ return await Promise.all(
553
+ specs.map(async (spec, index): Promise<UploadOutcome> => {
554
+ // Match by path, falling back to position for servers that answer
555
+ // in request order without echoing the path.
556
+ const instruction =
557
+ presigned.files?.find(file => file.path === spec.key) ??
558
+ presigned.files?.[index];
559
+ if (instruction?.url === undefined) {
560
+ // Files past the single-part threshold come back with a multipart
561
+ // plan instead of a url; this backend does not implement multipart.
562
+ return {
563
+ status: "error",
564
+ error: new Error(
565
+ `cursorHostedFiles: no single-part upload url for "${spec.key}" (too large?)`
566
+ ),
567
+ };
568
+ }
569
+ try {
570
+ const response = await fetchImpl(options)(
571
+ assertPresignedUrlSafe(options, instruction.url),
572
+ {
573
+ method: "PUT",
574
+ headers: instruction.headers ?? {},
575
+ // A view over bytes is a valid fetch body; the DOM lib types
576
+ // are narrower than the runtime, and copying into a Blob would
577
+ // double the memory for every upload.
578
+ body: spec.body as unknown as BodyInit,
579
+ // A redirect would re-send the body somewhere the presign did
580
+ // not authorize.
581
+ redirect: "manual",
582
+ }
583
+ );
584
+ if (response.status === 412) {
585
+ observedEtags.delete(spec.key);
586
+ return { status: "conflict" };
587
+ }
588
+ if (!response.ok) {
589
+ return {
590
+ status: "error",
591
+ error: new Error(
592
+ `cursorHostedFiles: upload of "${spec.key}" failed (HTTP ${response.status})`
593
+ ),
594
+ };
595
+ }
596
+ const etag = normalizeEtag(response.headers.get("etag"));
597
+ if (etag !== undefined) {
598
+ rememberEtag(spec.key, etag);
599
+ }
600
+ return { status: "ok", result: etag === undefined ? {} : { etag } };
601
+ } catch (error) {
602
+ return { status: "error", error };
603
+ }
604
+ })
605
+ );
606
+ }
607
+
608
+ /**
609
+ * The full single-key write flow: precondition resolution, one shared
610
+ * (already-performed) first attempt outcome, and the conflict handling
611
+ * `put` promises — including the one statKey-and-retry when an optimistic
612
+ * create loses to an existing object.
613
+ */
614
+ async function settlePut(
615
+ files: FilesTarget,
616
+ entry: {
617
+ key: string;
618
+ body: Uint8Array;
619
+ options?: { ifMatch?: string | null };
620
+ cachedEtagUsed?: boolean;
621
+ staleEtag?: string;
622
+ },
623
+ first: UploadOutcome
624
+ ): Promise<FileSinkPutResult> {
625
+ if (first.status === "error") {
626
+ throw first.error;
627
+ }
628
+ if (first.status === "ok") {
629
+ return first.result;
630
+ }
631
+ // Conflict. Explicit `ifMatch` (etag or create-only) and cached-etag
632
+ // writes are single-attempt: the lost precondition is the caller's.
633
+ const requested = entry.options?.ifMatch;
634
+ if (requested !== undefined) {
635
+ throw new FileConflictError(entry.key, {
636
+ storedEtag: requested ?? undefined,
637
+ });
638
+ }
639
+ if (entry.cachedEtagUsed === true) {
640
+ // Someone else wrote between our etag observation and this PUT.
641
+ throw new FileConflictError(entry.key, { storedEtag: entry.staleEtag });
642
+ }
643
+ // The optimistic create lost: learn the current etag once and replace.
644
+ const found = await statKey(entry.key);
645
+ if (found?.etag === undefined) {
646
+ // Existed a moment ago (the create lost) but stat sees nothing: a
647
+ // delete raced this write. Surface the conflict; a retry from the
648
+ // caller lands on the fresh create-only path.
649
+ throw new FileConflictError(entry.key, {});
650
+ }
651
+ const [replaced] = await attemptUploads(files, [
652
+ { key: entry.key, body: entry.body, precondition: { etag: found.etag } },
653
+ ]);
654
+ if (replaced === undefined || replaced.status === "conflict") {
655
+ throw new FileConflictError(entry.key, { storedEtag: found?.etag });
656
+ }
657
+ if (replaced.status === "error") {
658
+ throw replaced.error;
659
+ }
660
+ return replaced.result;
661
+ }
662
+
400
663
  /**
401
- * Precondition for an unconditional write: replace what is there now, or
402
- * create when nothing is.
664
+ * Precondition for a write, and whether it came from the etag cache (a
665
+ * cached-etag conflict is terminal; an optimistic-create conflict earns
666
+ * one stat-and-retry).
403
667
  */
404
- async function currentPrecondition(
405
- key: string
406
- ): Promise<{ etag: string } | { new: true }> {
407
- const cached = observedEtags.get(key);
668
+ function preconditionFor(entry: {
669
+ key: string;
670
+ options?: { ifMatch?: string | null };
671
+ }): {
672
+ precondition: { etag: string } | { new: true };
673
+ cachedEtagUsed: boolean;
674
+ staleEtag?: string;
675
+ } {
676
+ const requested = entry.options?.ifMatch;
677
+ // The store rejects unconditional writes, so every put carries a
678
+ // precondition. `null` is create-only and an explicit etag is a caller
679
+ // assertion.
680
+ if (requested !== undefined) {
681
+ return {
682
+ precondition: requested === null ? { new: true } : { etag: requested },
683
+ cachedEtagUsed: false,
684
+ };
685
+ }
686
+ // Unconditional write with a known etag: replace what we saw last.
687
+ const cached = observedEtags.get(entry.key);
408
688
  if (cached !== undefined) {
409
- return { etag: cached };
689
+ return {
690
+ precondition: { etag: cached },
691
+ cachedEtagUsed: true,
692
+ staleEtag: cached,
693
+ };
410
694
  }
411
- const found = await statKey(key);
412
- // Unknown falls through to create-only. If the object does in fact exist,
413
- // the store answers 412 and the caller gets a FileConflictError it can
414
- // retry with an explicit `ifMatch` degraded, but never wrong.
415
- return found?.etag === undefined ? { new: true } : { etag: found.etag };
695
+ // Unconditional write to a key this process has never observed:
696
+ // create-only first, learning the current etag only on conflict. Most
697
+ // such writes are brand-new keys (session-event chunks mint a fresh key
698
+ // per flush), and the old stat-before-every-put shape made the
699
+ // precondition lookup the single largest source of `agent-serve-files`
700
+ // list traffic — every fresh pod re-listed a directory per key before
701
+ // its first write.
702
+ return { precondition: { new: true }, cachedEtagUsed: false };
416
703
  }
417
704
 
418
705
  return {
@@ -421,84 +708,106 @@ export function cursorHostedFiles(
421
708
  capabilities: { etags: true },
422
709
 
423
710
  async put(key, body, putOptions): Promise<FileSinkPutResult> {
424
- const sha = createHash("sha256").update(body).digest("hex");
425
- const requested = putOptions?.ifMatch;
426
- // The store rejects unconditional writes, so every put carries a
427
- // precondition. `null` is create-only and an explicit etag is a caller
428
- // assertion; an unconditional write has to learn the current state,
429
- // because assuming "absent" would make replace fail on any process that
430
- // has not already read the path — which is every fresh pod.
431
- const precondition: { etag: string } | { new: true } =
432
- requested === null
433
- ? { new: true }
434
- : requested !== undefined
435
- ? { etag: requested }
436
- : await currentPrecondition(key);
437
-
438
- return await withFiles(async (files) => {
439
- const presigned = await storePost<ApiPresignResponse>(
440
- options,
441
- files.path("/upload"),
442
- {
443
- files: [{ path: key, sha, size: body.byteLength, ...precondition }],
444
- }
445
- );
446
- const instruction = presigned.files?.[0];
447
- if (instruction?.url === undefined) {
448
- // Files past the single-part threshold come back with a multipart
449
- // plan instead of a url; this backend does not implement multipart.
450
- throw new Error(
451
- `cursorHostedFiles: no single-part upload url for "${key}" (too large?)`
452
- );
711
+ return await withFiles(async files => {
712
+ const entry = { key, body, options: putOptions };
713
+ const resolved = preconditionFor(entry);
714
+ const [first] = await attemptUploads(files, [
715
+ { key, body, precondition: resolved.precondition },
716
+ ]);
717
+ if (first === undefined) {
718
+ throw new Error(`cursorHostedFiles: upload of "${key}" vanished`);
453
719
  }
454
- const response = await fetchImpl(options)(
455
- assertPresignedUrlSafe(options, instruction.url),
720
+ return await settlePut(
721
+ files,
456
722
  {
457
- method: "PUT",
458
- headers: instruction.headers ?? {},
459
- // A view over bytes is a valid fetch body; the DOM lib types are
460
- // narrower than the runtime, and copying into a Blob would double
461
- // the memory for every upload.
462
- body: body as unknown as BodyInit,
463
- // A redirect would re-send the body somewhere the presign did not
464
- // authorize.
465
- redirect: "manual",
466
- }
723
+ ...entry,
724
+ cachedEtagUsed: resolved.cachedEtagUsed,
725
+ staleEtag: resolved.staleEtag,
726
+ },
727
+ first
467
728
  );
468
- if (response.status === 412) {
469
- // Someone else wrote between our etag observation and this PUT.
470
- observedEtags.delete(key);
471
- throw new FileConflictError(key, {
472
- ...("etag" in precondition
473
- ? { storedEtag: precondition.etag }
474
- : {}),
475
- });
476
- }
477
- if (!response.ok) {
478
- throw new Error(
479
- `cursorHostedFiles: upload of "${key}" failed (HTTP ${response.status})`
729
+ });
730
+ },
731
+
732
+ async putMany(entries) {
733
+ if (entries.length === 0) {
734
+ return [];
735
+ }
736
+ return await withFiles(async files => {
737
+ const resolved = entries.map(entry => ({
738
+ entry,
739
+ ...preconditionFor(entry),
740
+ }));
741
+ let firsts: UploadOutcome[];
742
+ try {
743
+ // One presign call for the whole batch — the point of putMany.
744
+ firsts = await attemptUploads(
745
+ files,
746
+ resolved.map(({ entry, precondition }) => ({
747
+ key: entry.key,
748
+ body: entry.body,
749
+ precondition,
750
+ }))
480
751
  );
752
+ } catch (error) {
753
+ // The shared presign failed: every entry failed the same way.
754
+ return entries.map(() => ({
755
+ status: "rejected" as const,
756
+ reason: error,
757
+ }));
481
758
  }
482
- const etag = normalizeEtag(response.headers.get("etag"));
483
- if (etag !== undefined) {
484
- rememberEtag(key, etag);
485
- }
486
- return etag === undefined ? {} : { etag };
759
+ return await Promise.all(
760
+ resolved.map(
761
+ async (
762
+ { entry, cachedEtagUsed, staleEtag },
763
+ index
764
+ ): Promise<PromiseSettledResult<FileSinkPutResult>> => {
765
+ const first = firsts[index];
766
+ if (first === undefined) {
767
+ return {
768
+ status: "rejected",
769
+ reason: new Error(
770
+ `cursorHostedFiles: upload of "${entry.key}" vanished`
771
+ ),
772
+ };
773
+ }
774
+ try {
775
+ return {
776
+ status: "fulfilled",
777
+ value: await settlePut(
778
+ files,
779
+ { ...entry, cachedEtagUsed, staleEtag },
780
+ first
781
+ ),
782
+ };
783
+ } catch (error) {
784
+ return { status: "rejected", reason: error };
785
+ }
786
+ }
787
+ )
788
+ );
487
789
  });
488
790
  },
489
791
 
490
792
  async get(key): Promise<FileSinkBody | undefined> {
491
- return await withFiles(async (files) => {
793
+ return await withFiles(async files => {
492
794
  // Presigning a read of a path the store has no live object for — never
493
- // written, or deleted and now holding a tombstone — is a 404. That is
494
- // absence, which `read()` reports as undefined, not a failure.
795
+ // written, or deleted and now holding a tombstone — is a 404 on `/v0`
796
+ // and an absent entry on the flush wire. Either is absence, which
797
+ // `read()` reports as undefined, not a failure.
495
798
  let presigned: ApiPresignResponse;
496
799
  try {
497
- presigned = await storePost<ApiPresignResponse>(
498
- options,
499
- files.path("/download"),
500
- { paths: [key] }
501
- );
800
+ presigned =
801
+ files.wire === "flush"
802
+ ? await flushPost<ApiPresignResponse>(options, "/read", {
803
+ store: files.store,
804
+ paths: [key],
805
+ })
806
+ : await storePost<ApiPresignResponse>(
807
+ options,
808
+ files.path("/download"),
809
+ { paths: [key] }
810
+ );
502
811
  } catch (error) {
503
812
  if (error instanceof StoreApiError && error.status === 404) {
504
813
  return undefined;
@@ -548,6 +857,40 @@ export function cursorHostedFiles(
548
857
  },
549
858
 
550
859
  async delete(key): Promise<void> {
860
+ const handled = await withFiles(async files => {
861
+ if (files.wire !== "flush") {
862
+ return false;
863
+ }
864
+ // The flush wire's deletes are conditional server-side: when this
865
+ // process has no observed etag, the server resolves the current one —
866
+ // the lookup that costs a stat round trip on `/v0` — and a key that
867
+ // is already absent settles as `already_deleted`.
868
+ const cached = observedEtags.get(key);
869
+ const response = await flushPost<FlushWireResponse>(options, "/flush", {
870
+ store: files.store,
871
+ ops: [
872
+ {
873
+ op: "delete",
874
+ path: key,
875
+ ...(cached === undefined ? {} : { etag: cached }),
876
+ },
877
+ ],
878
+ });
879
+ const outcome = response.ops?.[0];
880
+ if (outcome?.status === "conflict") {
881
+ observedEtags.delete(key);
882
+ throw new FileConflictError(key, {
883
+ ...(outcome.etag === undefined
884
+ ? {}
885
+ : { storedEtag: normalizeEtag(outcome.etag) ?? outcome.etag }),
886
+ });
887
+ }
888
+ observedEtags.delete(key);
889
+ return true;
890
+ });
891
+ if (handled) {
892
+ return;
893
+ }
551
894
  if (observedEtags.get(key) === undefined) {
552
895
  // Deletes are conditional too, so learn the current etag first. A key
553
896
  // we have never seen is already absent as far as the caller cares.
@@ -560,7 +903,29 @@ export function cursorHostedFiles(
560
903
  if (etag === undefined) {
561
904
  return;
562
905
  }
563
- await withFiles(async (files) => {
906
+ await withFiles(async files => {
907
+ if (files.wire === "flush") {
908
+ // The protocol pin appeared between the two withFiles calls; the
909
+ // cached etag is enough for the conditional flush delete.
910
+ const response = await flushPost<FlushWireResponse>(
911
+ options,
912
+ "/flush",
913
+ {
914
+ store: files.store,
915
+ ops: [{ op: "delete", path: key, etag }],
916
+ }
917
+ );
918
+ const outcome = response.ops?.[0];
919
+ if (outcome?.status === "conflict") {
920
+ observedEtags.delete(key);
921
+ throw new FileConflictError(key, {
922
+ ...(outcome.etag === undefined
923
+ ? {}
924
+ : { storedEtag: normalizeEtag(outcome.etag) ?? outcome.etag }),
925
+ });
926
+ }
927
+ return;
928
+ }
564
929
  const raw = await storePost<ApiDeleteResponse>(
565
930
  options,
566
931
  files.path("/delete"),
@@ -568,7 +933,7 @@ export function cursorHostedFiles(
568
933
  );
569
934
  // The API answers 200 with a per-file status, so a lost race would look
570
935
  // like success unless the outcome is read.
571
- const outcome = (raw.files ?? []).find((entry) => entry.path === key);
936
+ const outcome = (raw.files ?? []).find(entry => entry.path === key);
572
937
  if (outcome?.status === "conflict") {
573
938
  observedEtags.delete(key);
574
939
  throw new FileConflictError(key, {
@@ -600,6 +965,13 @@ export function cursorHostedFiles(
600
965
  * Same pin as the sibling sync client: production backends allow only the
601
966
  * agent-stores bucket hosts, playground its bucket, and a local dev backend
602
967
  * additionally admits loopback http for LocalStack.
968
+ *
969
+ * `CURSOR_HOSTED_FILES_DEV_PRESIGN_HOSTS` (comma-separated hostnames) admits
970
+ * extra https hosts. A laptop backend hosting agents on a shared cluster
971
+ * fronts its LocalStack with a public tunnel and exports this in the pod's
972
+ * start script; production start scripts never set it. Read once at module
973
+ * load, so authored agent code sharing this process cannot widen the list
974
+ * by mutating `process.env` later.
603
975
  */
604
976
  function assertPresignedUrlSafe(
605
977
  options: CursorHostedFilesOptions,
@@ -611,6 +983,14 @@ function assertPresignedUrlSafe(
611
983
  } catch {
612
984
  throw new Error("cursorHostedFiles: presigned URL is not a valid URL");
613
985
  }
986
+ if (
987
+ url.protocol === "https:" &&
988
+ url.username === "" &&
989
+ url.password === "" &&
990
+ DEV_PRESIGN_HOSTS.has(url.hostname.toLowerCase())
991
+ ) {
992
+ return url.toString();
993
+ }
614
994
  try {
615
995
  createAgentStorePresignedUrlValidatorForBackend(resolveBaseUrl(options))(
616
996
  url
@@ -665,6 +1045,13 @@ function resolveApiKey(options: CursorHostedFilesOptions): string {
665
1045
  return key;
666
1046
  }
667
1047
 
1048
+ const DEV_PRESIGN_HOSTS: ReadonlySet<string> = new Set(
1049
+ (process.env.CURSOR_HOSTED_FILES_DEV_PRESIGN_HOSTS ?? "")
1050
+ .split(",")
1051
+ .map(host => host.trim().toLowerCase())
1052
+ .filter(host => host.length > 0)
1053
+ );
1054
+
668
1055
  function resolveBaseUrl(options: CursorHostedFilesOptions): string {
669
1056
  return trimTrailingSlash(
670
1057
  options.baseUrl ??
@@ -706,6 +1093,23 @@ async function storeGet<T>(
706
1093
  );
707
1094
  }
708
1095
 
1096
+ /**
1097
+ * Factory store API call — same base URL and pod credential as
1098
+ * {@link storePost}, different path family. The server resolves the
1099
+ * deployment (and the addressed store role) from the credential.
1100
+ */
1101
+ async function flushPost<T>(
1102
+ options: CursorHostedFilesOptions,
1103
+ path: string,
1104
+ body: Record<string, unknown>
1105
+ ): Promise<T> {
1106
+ return await postJson<T>(
1107
+ options,
1108
+ `${resolveBaseUrl(options)}${AGENTSDK_STORE_PATH}${path}`,
1109
+ body
1110
+ );
1111
+ }
1112
+
709
1113
  async function postJson<T>(
710
1114
  options: CursorHostedFilesOptions,
711
1115
  url: string,