@cursor/july 0.1.108 → 0.1.111

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 (1170) hide show
  1. package/AGENTS.md +3 -7
  2. package/README.md +3 -21
  3. package/dist/bin/agent-serve.js +81 -66
  4. package/dist/channels/bitbucket/api.d.ts +41 -0
  5. package/dist/channels/bitbucket/api.d.ts.map +1 -1
  6. package/dist/channels/bitbucket/api.js +266 -6
  7. package/dist/channels/bitbucket/binding.d.ts +4 -0
  8. package/dist/channels/bitbucket/binding.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/binding.js +20 -4
  10. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  11. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  12. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  13. package/dist/channels/bitbucket/checks.js +1 -1
  14. package/dist/channels/bitbucket/cursor-account.js +1 -1
  15. package/dist/channels/bitbucket/events.js +1 -1
  16. package/dist/channels/bitbucket/index.d.ts +1 -1
  17. package/dist/channels/bitbucket/index.d.ts.map +1 -1
  18. package/dist/channels/bitbucket/index.js +1 -1
  19. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  20. package/dist/channels/checks.d.ts.map +1 -1
  21. package/dist/channels/checks.js +2 -2
  22. package/dist/channels/deployments/deployments-channel.js +1 -1
  23. package/dist/channels/github/cursor-account.js +3 -3
  24. package/dist/channels/github/defaults.d.ts.map +1 -1
  25. package/dist/channels/github/defaults.js +5 -3
  26. package/dist/channels/github/events.js +1 -1
  27. package/dist/channels/github/forward.js +8 -8
  28. package/dist/channels/github/github-channel.d.ts.map +1 -1
  29. package/dist/channels/github/github-channel.js +17 -13
  30. package/dist/channels/github/progress.d.ts.map +1 -1
  31. package/dist/channels/github/progress.js +7 -2
  32. package/dist/channels/github/state.d.ts +6 -0
  33. package/dist/channels/github/state.d.ts.map +1 -1
  34. package/dist/channels/github/types.d.ts +6 -0
  35. package/dist/channels/github/types.d.ts.map +1 -1
  36. package/dist/channels/gitlab/api.d.ts +27 -0
  37. package/dist/channels/gitlab/api.d.ts.map +1 -1
  38. package/dist/channels/gitlab/api.js +88 -0
  39. package/dist/channels/gitlab/binding.d.ts +5 -0
  40. package/dist/channels/gitlab/binding.d.ts.map +1 -1
  41. package/dist/channels/gitlab/binding.js +14 -4
  42. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  43. package/dist/channels/gitlab/checks.js +1 -1
  44. package/dist/channels/gitlab/cursor-account.js +1 -1
  45. package/dist/channels/gitlab/events.js +1 -1
  46. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  47. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  48. package/dist/channels/gitlab/index.d.ts +1 -1
  49. package/dist/channels/gitlab/index.d.ts.map +1 -1
  50. package/dist/channels/gitlab/index.js +1 -1
  51. package/dist/channels/gitlab/replay.js +2 -2
  52. package/dist/channels/origin/binding.d.ts +2 -0
  53. package/dist/channels/origin/binding.d.ts.map +1 -1
  54. package/dist/channels/origin/binding.js +3 -3
  55. package/dist/channels/origin/checks.d.ts +19 -7
  56. package/dist/channels/origin/checks.d.ts.map +1 -1
  57. package/dist/channels/origin/checks.js +13 -9
  58. package/dist/channels/origin/cursor-account.js +1 -1
  59. package/dist/channels/origin/defaults.d.ts.map +1 -1
  60. package/dist/channels/origin/defaults.js +3 -1
  61. package/dist/channels/origin/events.js +1 -1
  62. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  63. package/dist/channels/origin/origin-channel.js +2 -1
  64. package/dist/channels/origin/origin-webhook.js +2 -2
  65. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  66. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  67. package/dist/channels/slack/agentic-delivery.js +558 -0
  68. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  69. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  70. package/dist/channels/slack/agentic-posted.js +102 -0
  71. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  72. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  73. package/dist/channels/slack/agentic-signals.js +204 -0
  74. package/dist/channels/slack/api.d.ts +20 -1
  75. package/dist/channels/slack/api.d.ts.map +1 -1
  76. package/dist/channels/slack/api.js +43 -11
  77. package/dist/channels/slack/approvals.js +1 -1
  78. package/dist/channels/slack/auth.d.ts.map +1 -1
  79. package/dist/channels/slack/auth.js +3 -1
  80. package/dist/channels/slack/blocks.js +3 -3
  81. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  82. package/dist/channels/slack/bot-mentions.js +5 -5
  83. package/dist/channels/slack/channel-watch.js +1 -1
  84. package/dist/channels/slack/cli-project.js +3 -3
  85. package/dist/channels/slack/defaults.d.ts +3 -0
  86. package/dist/channels/slack/defaults.d.ts.map +1 -1
  87. package/dist/channels/slack/defaults.js +90 -29
  88. package/dist/channels/slack/dispatch.d.ts +44 -1
  89. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  90. package/dist/channels/slack/dispatch.js +233 -103
  91. package/dist/channels/slack/doctor.js +1 -1
  92. package/dist/channels/slack/eval-directive.js +1 -1
  93. package/dist/channels/slack/external-policy.d.ts +2 -1
  94. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  95. package/dist/channels/slack/external-policy.js +13 -2
  96. package/dist/channels/slack/footer.d.ts +30 -0
  97. package/dist/channels/slack/footer.d.ts.map +1 -0
  98. package/dist/channels/slack/footer.js +88 -0
  99. package/dist/channels/slack/index.d.ts +2 -0
  100. package/dist/channels/slack/index.d.ts.map +1 -1
  101. package/dist/channels/slack/index.js +2 -0
  102. package/dist/channels/slack/interactive.d.ts.map +1 -1
  103. package/dist/channels/slack/interactive.js +5 -3
  104. package/dist/channels/slack/live-delivery.d.ts +1 -1
  105. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  106. package/dist/channels/slack/live-delivery.js +20 -6
  107. package/dist/channels/slack/log.d.ts.map +1 -1
  108. package/dist/channels/slack/log.js +1 -1
  109. package/dist/channels/slack/manifest.js +1 -1
  110. package/dist/channels/slack/nudge-carrier.js +1 -1
  111. package/dist/channels/slack/nudge-store.js +2 -2
  112. package/dist/channels/slack/paint-start.d.ts +22 -0
  113. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  114. package/dist/channels/slack/paint-start.js +91 -0
  115. package/dist/channels/slack/placeholder.d.ts +36 -0
  116. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  117. package/dist/channels/slack/placeholder.js +240 -0
  118. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  119. package/dist/channels/slack/progress-delivery.js +13 -4
  120. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  121. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  122. package/dist/channels/slack/reasoning-chip.js +30 -0
  123. package/dist/channels/slack/recording-sink.d.ts +29 -0
  124. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  125. package/dist/channels/slack/recording-sink.js +142 -0
  126. package/dist/channels/slack/reply-options.d.ts +8 -1
  127. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  128. package/dist/channels/slack/reply-options.js +59 -14
  129. package/dist/channels/slack/setup.js +1 -1
  130. package/dist/channels/slack/slack-channel.d.ts +12 -5
  131. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  132. package/dist/channels/slack/slack-channel.js +110 -24
  133. package/dist/channels/slack/socket-mode.js +2 -2
  134. package/dist/channels/slack/thread-context.js +5 -5
  135. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  136. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  137. package/dist/channels/slack/tool-approval-events.js +50 -38
  138. package/dist/channels/slack/tool-cards.js +1 -1
  139. package/dist/channels/slack/tool-chip.d.ts +9 -0
  140. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  141. package/dist/channels/slack/tool-chip.js +25 -0
  142. package/dist/channels/slack/types.d.ts +49 -7
  143. package/dist/channels/slack/types.d.ts.map +1 -1
  144. package/dist/channels/slack/upload.d.ts +13 -0
  145. package/dist/channels/slack/upload.d.ts.map +1 -0
  146. package/dist/channels/slack/upload.js +135 -0
  147. package/dist/channels.d.ts +10 -14
  148. package/dist/channels.d.ts.map +1 -1
  149. package/dist/channels.js +9 -21
  150. package/dist/dashboard-session-url.d.ts +15 -0
  151. package/dist/dashboard-session-url.d.ts.map +1 -0
  152. package/dist/dashboard-session-url.js +25 -0
  153. package/dist/docs/404.html +3 -3
  154. package/dist/docs/architecture.svg +59 -0
  155. package/dist/docs/assets/app.Drol6mi6.js +309 -0
  156. package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.js → building-with-agents.md.CEGVXkmO.js} +2 -2
  157. package/dist/docs/assets/{building-with-agents.md.CUSWxlP_.lean.js → building-with-agents.md.CEGVXkmO.lean.js} +1 -1
  158. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +1 -0
  159. package/dist/docs/assets/chunks/{VPLocalSearchBox.BOKxlYGP.js → VPLocalSearchBox.CdqoBZJX.js} +2 -2
  160. package/dist/docs/assets/chunks/arc.BVX3ycTn.js +1 -0
  161. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CcChnMxX.js +36 -0
  162. package/dist/docs/assets/chunks/baseUniq.xwtXO-yt.js +1 -0
  163. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.CijZ_taK.js +132 -0
  164. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.0FBvwBvK.js +10 -0
  165. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +1 -0
  166. package/dist/docs/assets/chunks/chunk-4BX2VUAB.CELMmMDA.js +1 -0
  167. package/dist/docs/assets/chunks/chunk-4TB4RGXK.C4bhFtSm.js +206 -0
  168. package/dist/docs/assets/chunks/chunk-55IACEB6.ZnQ9gRRQ.js +1 -0
  169. package/dist/docs/assets/chunks/chunk-EDXVE4YY.DPlmglG-.js +1 -0
  170. package/dist/docs/assets/chunks/chunk-FMBD7UC4.BrUk8pff.js +15 -0
  171. package/dist/docs/assets/chunks/chunk-OYMX7WX6.CcmWIncu.js +231 -0
  172. package/dist/docs/assets/chunks/chunk-QZHKN3VN.D65-cs8I.js +1 -0
  173. package/dist/docs/assets/chunks/chunk-YZCP3GAM.qoXZpG9F.js +1 -0
  174. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +1 -0
  175. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +1 -0
  176. package/dist/docs/assets/chunks/clone.YSt_40_s.js +1 -0
  177. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.8rYtqudO.js +1 -0
  178. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  179. package/dist/docs/assets/chunks/dagre-KV5264BT.DrRP1fOh.js +4 -0
  180. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  181. package/dist/docs/assets/chunks/diagram-5BDNPKRD.DHj_xA2_.js +10 -0
  182. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.Bz_6nAKj.js +24 -0
  183. package/dist/docs/assets/chunks/diagram-MMDJMWI5.BWA0xSW9.js +43 -0
  184. package/dist/docs/assets/chunks/diagram-TYMM5635.CpTJLNJI.js +24 -0
  185. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.-7AWWSrP.js +85 -0
  186. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BTnQ742_.js +162 -0
  187. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +19 -0
  188. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.B5_HiiQ5.js +292 -0
  189. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CZcNTFZd.js +106 -0
  190. package/dist/docs/assets/chunks/graph.V2GLaab4.js +1 -0
  191. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.7pZOkCCU.js +2 -0
  192. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  193. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js +70 -0
  194. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.BNEgWN1S.js +139 -0
  195. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.B-4d4tC7.js +89 -0
  196. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  197. package/dist/docs/assets/chunks/layout.Dvbn9nSb.js +1 -0
  198. package/dist/docs/assets/chunks/linear.D2GM4p4b.js +1 -0
  199. package/dist/docs/assets/chunks/min.DVBtLK-B.js +1 -0
  200. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.CnJRI55x.js +96 -0
  201. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  202. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CtoaTFlA.js +30 -0
  203. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.DtT24_vN.js +7 -0
  204. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.CjSO4o8f.js +84 -0
  205. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.-wWiIVWa.js +10 -0
  206. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.DSk8s4gX.js +157 -0
  207. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.BFKAsdkN.js +1 -0
  208. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +1 -0
  209. package/dist/docs/assets/chunks/{theme.DbDZW-zb.js → theme.C0MctGaz.js} +2 -2
  210. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.TUNJbAFe.js +120 -0
  211. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.C-RGNnk4.js +34 -0
  212. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  213. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +162 -0
  214. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DH4zt73Y.js +20 -0
  215. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.B-3k6bF6.js +7 -0
  216. package/dist/docs/assets/{deployment.md.JenwuCCB.js → deployment.md.Dm4Qo3hp.js} +5 -5
  217. package/dist/docs/assets/{deployment.md.JenwuCCB.lean.js → deployment.md.Dm4Qo3hp.lean.js} +1 -1
  218. package/dist/docs/assets/evals.md.BLDRt5LH.js +211 -0
  219. package/dist/docs/assets/evals.md.BLDRt5LH.lean.js +1 -0
  220. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +14 -0
  221. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +1 -0
  222. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.js +10 -0
  223. package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.lean.js +1 -0
  224. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.js → guides_cloud-agents.md.lSE_l7lH.js} +2 -2
  225. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.lean.js → guides_cloud-agents.md.lSE_l7lH.lean.js} +1 -1
  226. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.js → guides_convert-automation.md.Ck6Cr68A.js} +1 -1
  227. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.lean.js → guides_convert-automation.md.Ck6Cr68A.lean.js} +1 -1
  228. package/dist/docs/assets/{guides_github.md.BH33UEBJ.js → guides_github.md.D6ER29dG.js} +13 -3
  229. package/dist/docs/assets/{guides_github.md.BH33UEBJ.lean.js → guides_github.md.D6ER29dG.lean.js} +1 -1
  230. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.js +14 -0
  231. package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.lean.js +1 -0
  232. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +9 -0
  233. package/dist/docs/assets/{guides_grokbot-agents.md.DyV-WArv.lean.js → guides_grokbot-agents.md.WBZIOvkz.lean.js} +1 -1
  234. package/dist/docs/assets/{guides_improve.md.BGVk32bK.js → guides_improve.md.BKaDuKKK.js} +1 -1
  235. package/dist/docs/assets/{guides_improve.md.BGVk32bK.lean.js → guides_improve.md.BKaDuKKK.lean.js} +1 -1
  236. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.js → guides_mcp-oauth.md.DMNMpXtO.js} +1 -1
  237. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.lean.js → guides_mcp-oauth.md.DMNMpXtO.lean.js} +1 -1
  238. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.js → guides_opentelemetry.md._CRfDyzH.js} +14 -14
  239. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.lean.js → guides_opentelemetry.md._CRfDyzH.lean.js} +1 -1
  240. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.js → guides_slack.md.DdT8rmsj.js} +12 -4
  241. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.lean.js → guides_slack.md.DdT8rmsj.lean.js} +1 -1
  242. package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.js → guides_webhooks.md.aQW10HRe.js} +3 -3
  243. package/dist/docs/assets/{guides_webhooks.md.DKdA43Qm.lean.js → guides_webhooks.md.aQW10HRe.lean.js} +1 -1
  244. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +1 -0
  245. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +1 -0
  246. package/dist/docs/assets/index.md.BFVyY2KT.js +17 -0
  247. package/dist/docs/assets/index.md.BFVyY2KT.lean.js +1 -0
  248. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.D3MjSZN-.js} +30 -38
  249. package/dist/docs/assets/quickstart.md.D3MjSZN-.lean.js +1 -0
  250. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.CfVA-LZJ.js} +1 -1
  251. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.CfVA-LZJ.lean.js} +1 -1
  252. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Vf7qyIZ-.js} +1 -1
  253. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Vf7qyIZ-.lean.js} +1 -1
  254. package/dist/docs/assets/{reference_channels.md.D-qTqwcq.js → reference_channels.md.icqLKcTc.js} +2 -12
  255. package/dist/docs/assets/{reference_channels.md.D-qTqwcq.lean.js → reference_channels.md.icqLKcTc.lean.js} +1 -1
  256. package/dist/docs/assets/{reference_cli.md.Ca26u0Es.js → reference_cli.md.B2dBL6L8.js} +4 -4
  257. package/dist/docs/assets/{reference_cli.md.Ca26u0Es.lean.js → reference_cli.md.B2dBL6L8.lean.js} +1 -1
  258. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.Cb3U_c8n.js} +4 -4
  259. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.Cb3U_c8n.lean.js} +1 -1
  260. package/dist/docs/assets/{reference_extensions.md.CPWt00ds.js → reference_extensions.md.wlFD3cUR.js} +3 -3
  261. package/dist/docs/assets/{reference_extensions.md.CPWt00ds.lean.js → reference_extensions.md.wlFD3cUR.lean.js} +1 -1
  262. package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.js → reference_hooks.md.CZuynAxj.js} +3 -3
  263. package/dist/docs/assets/{reference_hooks.md.Ddt5DdgJ.lean.js → reference_hooks.md.CZuynAxj.lean.js} +1 -1
  264. package/dist/docs/assets/{reference_http-api.md.oySXBO8o.js → reference_http-api.md.DTKcYE6L.js} +3 -3
  265. package/dist/docs/assets/{reference_http-api.md.oySXBO8o.lean.js → reference_http-api.md.DTKcYE6L.lean.js} +1 -1
  266. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.D7gkckK-.js} +1 -1
  267. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.D7gkckK-.lean.js} +1 -1
  268. package/dist/docs/assets/{reference_playground.md.4myJPxrf.js → reference_playground.md.D2YExv5K.js} +1 -1
  269. package/dist/docs/assets/{reference_playground.md.4myJPxrf.lean.js → reference_playground.md.D2YExv5K.lean.js} +1 -1
  270. package/dist/docs/assets/reference_project-layout.md.DPxbUJyt.js +19 -0
  271. package/dist/docs/assets/{reference_project-layout.md.DuBu9a96.lean.js → reference_project-layout.md.DPxbUJyt.lean.js} +1 -1
  272. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.BQ5uAv1F.js} +1 -1
  273. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.BQ5uAv1F.lean.js} +1 -1
  274. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.BasfZWO-.js} +1 -1
  275. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.BasfZWO-.lean.js} +1 -1
  276. package/dist/docs/assets/reference_sessions.md.YKvIsWAx.js +1 -0
  277. package/dist/docs/assets/{reference_sessions.md.CueyOHSL.lean.js → reference_sessions.md.YKvIsWAx.lean.js} +1 -1
  278. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.rNgpsGd0.js} +1 -1
  279. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.rNgpsGd0.lean.js} +1 -1
  280. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.e5qitjJt.js} +2 -2
  281. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.e5qitjJt.lean.js} +1 -1
  282. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BdCO2aHZ.js} +4 -4
  283. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BdCO2aHZ.lean.js} +1 -1
  284. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  285. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.Da_AGDlH.js} +1 -1
  286. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.Da_AGDlH.lean.js} +1 -1
  287. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.DqxocIGh.js} +1 -1
  288. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.DqxocIGh.lean.js} +1 -1
  289. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.Bhnvd8VE.js} +1 -1
  290. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.Bhnvd8VE.lean.js} +1 -1
  291. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.BdBWO9Ic.js} +1 -1
  292. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.BdBWO9Ic.lean.js} +1 -1
  293. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.js → troubleshooting.md.BcgNoYtJ.js} +1 -1
  294. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.lean.js → troubleshooting.md.BcgNoYtJ.lean.js} +1 -1
  295. package/dist/docs/building-with-agents.html +41 -8
  296. package/dist/docs/building-with-agents.md +15 -16
  297. package/dist/docs/deployment.html +44 -11
  298. package/dist/docs/deployment.md +6 -7
  299. package/dist/docs/evals.html +196 -37
  300. package/dist/docs/evals.md +612 -297
  301. package/dist/docs/guides/agent-to-agent.html +48 -11
  302. package/dist/docs/guides/agent-to-agent.md +40 -83
  303. package/dist/docs/guides/bitbucket.html +69 -0
  304. package/dist/docs/guides/bitbucket.md +84 -0
  305. package/dist/docs/guides/cloud-agents.html +41 -8
  306. package/dist/docs/guides/cloud-agents.md +24 -20
  307. package/dist/docs/guides/convert-automation.html +41 -8
  308. package/dist/docs/guides/github.html +52 -9
  309. package/dist/docs/guides/github.md +32 -1
  310. package/dist/docs/guides/gitlab.html +73 -0
  311. package/dist/docs/guides/gitlab.md +92 -0
  312. package/dist/docs/guides/grokbot-agents.html +41 -8
  313. package/dist/docs/guides/grokbot-agents.md +26 -19
  314. package/dist/docs/guides/improve.html +41 -8
  315. package/dist/docs/guides/mcp-oauth.html +41 -8
  316. package/dist/docs/guides/mcp-oauth.md +1 -1
  317. package/dist/docs/guides/opentelemetry.html +53 -20
  318. package/dist/docs/guides/opentelemetry.md +28 -41
  319. package/dist/docs/guides/slack.html +51 -10
  320. package/dist/docs/guides/slack.md +53 -4
  321. package/dist/docs/guides/webhooks.html +42 -9
  322. package/dist/docs/guides/webhooks.md +7 -6
  323. package/dist/docs/hashmap.json +1 -1
  324. package/dist/docs/hillclimbing.html +40 -10
  325. package/dist/docs/hillclimbing.md +7 -7
  326. package/dist/docs/index.html +57 -12
  327. package/dist/docs/index.md +81 -146
  328. package/dist/docs/llms-full.txt +1368 -5551
  329. package/dist/docs/llms.txt +6 -31
  330. package/dist/docs/quickstart.html +70 -45
  331. package/dist/docs/quickstart.md +44 -105
  332. package/dist/docs/reference/agent-config.html +41 -8
  333. package/dist/docs/reference/artifacts.html +41 -8
  334. package/dist/docs/reference/channels.html +41 -18
  335. package/dist/docs/reference/channels.md +16 -19
  336. package/dist/docs/reference/cli.html +43 -10
  337. package/dist/docs/reference/cli.md +6 -20
  338. package/dist/docs/reference/connections.html +43 -10
  339. package/dist/docs/reference/connections.md +3 -5
  340. package/dist/docs/reference/extensions.html +43 -10
  341. package/dist/docs/reference/extensions.md +2 -5
  342. package/dist/docs/reference/hooks.html +42 -9
  343. package/dist/docs/reference/hooks.md +11 -16
  344. package/dist/docs/reference/http-api.html +42 -9
  345. package/dist/docs/reference/http-api.md +6 -7
  346. package/dist/docs/reference/instructions.html +41 -8
  347. package/dist/docs/reference/playground.html +40 -7
  348. package/dist/docs/reference/playground.md +2 -6
  349. package/dist/docs/reference/project-layout.html +42 -9
  350. package/dist/docs/reference/project-layout.md +4 -12
  351. package/dist/docs/reference/prompt.html +41 -8
  352. package/dist/docs/reference/schedules.html +41 -8
  353. package/dist/docs/reference/sessions.html +40 -7
  354. package/dist/docs/reference/sessions.md +6 -6
  355. package/dist/docs/reference/skills.html +41 -8
  356. package/dist/docs/reference/subagents.html +41 -8
  357. package/dist/docs/reference/subagents.md +2 -4
  358. package/dist/docs/reference/tools.html +43 -10
  359. package/dist/docs/reference/tools.md +2 -5
  360. package/dist/docs/templates/agentic-owners.html +41 -8
  361. package/dist/docs/templates/pr-autofixer.html +41 -8
  362. package/dist/docs/templates/security-reviewer.html +41 -8
  363. package/dist/docs/templates/triage.html +41 -8
  364. package/dist/docs/troubleshooting.html +40 -7
  365. package/dist/docs/troubleshooting.md +1 -2
  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/tools/list.js +1 -1
  382. package/dist/extensions/improve/skills/yourself.js +1 -1
  383. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  384. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  385. package/dist/extensions/slack-communication/extension.js +32 -0
  386. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  387. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  388. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  389. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  390. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  391. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  392. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  393. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  394. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  395. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  396. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  397. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  398. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  399. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  400. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  401. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  402. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  403. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  404. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  405. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  406. package/dist/extensions/slack-communication/tools/react.js +27 -0
  407. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  408. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  409. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  410. package/dist/extensions.d.ts +2 -3
  411. package/dist/extensions.d.ts.map +1 -1
  412. package/dist/extensions.js +2 -5
  413. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  414. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  415. package/dist/files-backends/cursor-hosted.js +357 -74
  416. package/dist/files-backends/local-fs.js +1 -1
  417. package/dist/files.d.ts +15 -0
  418. package/dist/files.d.ts.map +1 -1
  419. package/dist/filesystem.d.ts.map +1 -1
  420. package/dist/filesystem.js +15 -15
  421. package/dist/index.d.ts +6 -10
  422. package/dist/index.d.ts.map +1 -1
  423. package/dist/index.js +5 -8
  424. package/dist/internal/advertise-tools.js +6 -6
  425. package/dist/internal/approval-gate.js +1 -1
  426. package/dist/internal/artifacts-store.js +3 -3
  427. package/dist/internal/as-of.js +2 -2
  428. package/dist/internal/authored-alias-hooks.d.ts +5 -0
  429. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  430. package/dist/internal/authored-alias-hooks.js +17 -0
  431. package/dist/internal/authored-loaders.d.ts +4 -0
  432. package/dist/internal/authored-loaders.d.ts.map +1 -1
  433. package/dist/internal/authored-loaders.js +21 -2
  434. package/dist/internal/builtin-tools/reminders.js +2 -2
  435. package/dist/internal/chat-client.js +5 -5
  436. package/dist/internal/cli-ax.d.ts +2 -2
  437. package/dist/internal/cli-ax.d.ts.map +1 -1
  438. package/dist/internal/cli-ax.js +69 -15
  439. package/dist/internal/cli-bitbucket.js +10 -10
  440. package/dist/internal/cli-convert-automation.js +2 -2
  441. package/dist/internal/cli-cursor.d.ts +3 -11
  442. package/dist/internal/cli-cursor.d.ts.map +1 -1
  443. package/dist/internal/cli-cursor.js +5 -10
  444. package/dist/internal/cli-deploy.d.ts +12 -2
  445. package/dist/internal/cli-deploy.d.ts.map +1 -1
  446. package/dist/internal/cli-deploy.js +328 -96
  447. package/dist/internal/cli-docs.js +5 -5
  448. package/dist/internal/cli-github.js +15 -16
  449. package/dist/internal/cli-gitlab.js +10 -10
  450. package/dist/internal/cli-manifest.js +1 -1
  451. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  452. package/dist/internal/cli-mcp-oauth.js +5 -5
  453. package/dist/internal/cli-mcp.js +3 -3
  454. package/dist/internal/cli-skills.js +2 -2
  455. package/dist/internal/cli-slack.js +5 -5
  456. package/dist/internal/cloud-turn-cost.js +1 -1
  457. package/dist/internal/continuation-channel.d.ts.map +1 -1
  458. package/dist/internal/continuation-channel.js +2 -2
  459. package/dist/internal/continuation-identity.d.ts.map +1 -1
  460. package/dist/internal/continuation-identity.js +22 -12
  461. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  462. package/dist/internal/conversation-mirror.js +33 -2
  463. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  464. package/dist/internal/convert-automation/types.d.ts +8 -0
  465. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  466. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  467. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  468. package/dist/internal/cursor/account-mcp.js +32 -27
  469. package/dist/internal/cursor/backend-client.d.ts +15 -10
  470. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  471. package/dist/internal/cursor/backend-client.js +17 -11
  472. package/dist/internal/cursor/credentials.js +1 -1
  473. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  474. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  475. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  476. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  477. package/dist/internal/cursor-deployment-relay.js +9 -9
  478. package/dist/internal/cursor-event-relay.js +10 -10
  479. package/dist/internal/cursor-relay-core.js +2 -2
  480. package/dist/internal/deploy-client.d.ts +106 -9
  481. package/dist/internal/deploy-client.d.ts.map +1 -1
  482. package/dist/internal/deploy-client.js +171 -23
  483. package/dist/internal/deploy-manifest.d.ts +13 -0
  484. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  485. package/dist/internal/deploy-manifest.js +32 -16
  486. package/dist/internal/discovery/agent-config.d.ts +5 -0
  487. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  488. package/dist/internal/discovery/agent-config.js +27 -0
  489. package/dist/internal/discovery/agent.d.ts +1 -1
  490. package/dist/internal/discovery/agent.d.ts.map +1 -1
  491. package/dist/internal/discovery/agent.js +10 -13
  492. package/dist/internal/discovery/channels.js +4 -4
  493. package/dist/internal/discovery/connections.js +4 -4
  494. package/dist/internal/discovery/cursor-plugin.js +12 -12
  495. package/dist/internal/discovery/extension-overlay.d.ts +1 -2
  496. package/dist/internal/discovery/extension-overlay.d.ts.map +1 -1
  497. package/dist/internal/discovery/extension-overlay.js +3 -17
  498. package/dist/internal/discovery/extensions.d.ts +1 -2
  499. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  500. package/dist/internal/discovery/extensions.js +10 -28
  501. package/dist/internal/discovery/info.d.ts.map +1 -1
  502. package/dist/internal/discovery/info.js +44 -26
  503. package/dist/internal/discovery/instructions.js +1 -1
  504. package/dist/internal/discovery/modules.js +0 -1
  505. package/dist/internal/discovery/project.d.ts.map +1 -1
  506. package/dist/internal/discovery/project.js +4 -20
  507. package/dist/internal/discovery/services.js +1 -1
  508. package/dist/internal/discovery/tools.js +1 -1
  509. package/dist/internal/docs-site.js +2 -2
  510. package/dist/internal/env-file.js +1 -1
  511. package/dist/internal/eval-run-store.d.ts.map +1 -1
  512. package/dist/internal/eval-run-store.js +7 -7
  513. package/dist/internal/eval-runner.js +14 -15
  514. package/dist/internal/evals-client.js +4 -4
  515. package/dist/internal/event-log.js +8 -8
  516. package/dist/internal/event-mapper.d.ts +18 -0
  517. package/dist/internal/event-mapper.d.ts.map +1 -1
  518. package/dist/internal/event-mapper.js +34 -2
  519. package/dist/internal/filesystem/format.d.ts.map +1 -1
  520. package/dist/internal/filesystem/format.js +6 -3
  521. package/dist/internal/filesystem/scratch.js +3 -3
  522. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  523. package/dist/internal/filesystem/tools.js +6 -6
  524. package/dist/internal/filesystem/walk.js +1 -1
  525. package/dist/internal/framework-file-storage.d.ts +10 -7
  526. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  527. package/dist/internal/framework-file-storage.js +95 -7
  528. package/dist/internal/framework-storage-selection.d.ts +2 -8
  529. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  530. package/dist/internal/framework-storage-selection.js +4 -13
  531. package/dist/internal/github-fanout.js +3 -3
  532. package/dist/internal/guest-network.js +4 -4
  533. package/dist/internal/host-files.js +1 -1
  534. package/dist/internal/host-kv.js +2 -2
  535. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  536. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  537. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  538. package/dist/internal/hosted-catch-protocol.js +2 -4
  539. package/dist/internal/hosted-catch.js +1 -1
  540. package/dist/internal/hosted-delivery-protocol.d.ts +29 -0
  541. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  542. package/dist/internal/hosted-delivery-protocol.js +76 -8
  543. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  544. package/dist/internal/hosted-delivery.js +201 -64
  545. package/dist/internal/hosted-execution-diag.js +3 -3
  546. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  547. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  548. package/dist/internal/hosted-execution-latency.js +220 -0
  549. package/dist/internal/hosting.d.ts +5 -5
  550. package/dist/internal/hosting.d.ts.map +1 -1
  551. package/dist/internal/hosting.js +5 -6
  552. package/dist/internal/http-channel-define.d.ts +11 -0
  553. package/dist/internal/http-channel-define.d.ts.map +1 -0
  554. package/dist/internal/http-channel-define.js +18 -0
  555. package/dist/internal/http-channel.d.ts +2 -3
  556. package/dist/internal/http-channel.d.ts.map +1 -1
  557. package/dist/internal/http-channel.js +3 -4
  558. package/dist/internal/http-control-plane-session.d.ts +7 -3
  559. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  560. package/dist/internal/http-control-plane-session.js +22 -10
  561. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  562. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  563. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  564. package/dist/internal/init-interview.js +7 -7
  565. package/dist/internal/init-project.d.ts.map +1 -1
  566. package/dist/internal/init-project.js +14 -14
  567. package/dist/internal/init-scaffold.d.ts.map +1 -1
  568. package/dist/internal/init-scaffold.js +2 -3
  569. package/dist/internal/inline-stdio-mcp.js +2 -2
  570. package/dist/internal/install-cursor-skills.d.ts +5 -2
  571. package/dist/internal/install-cursor-skills.d.ts.map +1 -1
  572. package/dist/internal/install-cursor-skills.js +35 -15
  573. package/dist/internal/json-schema.js +1 -1
  574. package/dist/internal/local-control-plane.d.ts.map +1 -1
  575. package/dist/internal/local-control-plane.js +3 -3
  576. package/dist/internal/local-env.js +3 -3
  577. package/dist/internal/log-ring.js +1 -1
  578. package/dist/internal/logs-client.js +1 -1
  579. package/dist/internal/mcp-endpoint.js +8 -8
  580. package/dist/internal/mcp-host.js +4 -4
  581. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  582. package/dist/internal/mcp-oauth.js +5 -5
  583. package/dist/internal/net.js +2 -2
  584. package/dist/internal/otel/config.js +3 -3
  585. package/dist/internal/otel/runtime.js +13 -13
  586. package/dist/internal/peer-connections.js +2 -2
  587. package/dist/internal/platform-schedule-sync.js +1 -1
  588. package/dist/internal/platform-timers.js +1 -1
  589. package/dist/internal/playground/static.js +2 -2
  590. package/dist/internal/playground/toolchain.js +2 -2
  591. package/dist/internal/playground-proxy.js +3 -3
  592. package/dist/internal/process-memory-telemetry.js +1 -1
  593. package/dist/internal/reminder-runner.d.ts.map +1 -1
  594. package/dist/internal/reminder-runner.js +7 -7
  595. package/dist/internal/reminder-store.js +1 -1
  596. package/dist/internal/request-error-status.d.ts.map +1 -1
  597. package/dist/internal/request-error-status.js +9 -0
  598. package/dist/internal/resolved-connections.js +8 -8
  599. package/dist/internal/result-output.d.ts +14 -2
  600. package/dist/internal/result-output.d.ts.map +1 -1
  601. package/dist/internal/result-output.js +45 -2
  602. package/dist/internal/router.js +4 -4
  603. package/dist/internal/run-client.d.ts +1 -1
  604. package/dist/internal/run-client.js +2 -2
  605. package/dist/internal/schedule-runner.js +6 -6
  606. package/dist/internal/scm/pr-url.d.ts +3 -1
  607. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  608. package/dist/internal/scm/pr-url.js +10 -2
  609. package/dist/internal/sdk-runner.d.ts.map +1 -1
  610. package/dist/internal/sdk-runner.js +15 -16
  611. package/dist/internal/serve-restart.js +1 -1
  612. package/dist/internal/server.d.ts.map +1 -1
  613. package/dist/internal/server.js +81 -101
  614. package/dist/internal/session-cost.js +3 -3
  615. package/dist/internal/session-engine.d.ts +39 -35
  616. package/dist/internal/session-engine.d.ts.map +1 -1
  617. package/dist/internal/session-engine.js +394 -343
  618. package/dist/internal/session-run-log.d.ts.map +1 -1
  619. package/dist/internal/session-run-log.js +4 -4
  620. package/dist/internal/session-store.d.ts +47 -3
  621. package/dist/internal/session-store.d.ts.map +1 -1
  622. package/dist/internal/session-store.js +198 -33
  623. package/dist/internal/sessions-client.js +3 -3
  624. package/dist/internal/slack-thread-key.d.ts +7 -0
  625. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  626. package/dist/internal/slack-thread-key.js +10 -0
  627. package/dist/internal/sleep.js +1 -1
  628. package/dist/internal/storage-coordinator.d.ts +22 -19
  629. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  630. package/dist/internal/storage-coordinator.js +114 -73
  631. package/dist/internal/storage-roles.d.ts +4 -9
  632. package/dist/internal/storage-roles.d.ts.map +1 -1
  633. package/dist/internal/storage-roles.js +2 -2
  634. package/dist/internal/storage.d.ts +2 -0
  635. package/dist/internal/storage.d.ts.map +1 -0
  636. package/dist/internal/storage.js +1 -0
  637. package/dist/internal/store-mirror.js +4 -4
  638. package/dist/internal/terminal-style.js +2 -2
  639. package/dist/internal/tool-result.js +3 -3
  640. package/dist/internal/trajectory.js +7 -7
  641. package/dist/internal/turn-governor.js +2 -2
  642. package/dist/internal/turn-outbox.js +1 -1
  643. package/dist/internal/update-check.js +2 -2
  644. package/dist/internal/v2-hosting.d.ts +9 -0
  645. package/dist/internal/v2-hosting.d.ts.map +1 -1
  646. package/dist/internal/v2-hosting.js +10 -0
  647. package/dist/internal/workspace.d.ts +13 -10
  648. package/dist/internal/workspace.d.ts.map +1 -1
  649. package/dist/internal/workspace.js +17 -16
  650. package/dist/kv/memory-kv.d.ts +6 -4
  651. package/dist/kv/memory-kv.d.ts.map +1 -1
  652. package/dist/kv/memory-kv.js +9 -7
  653. package/dist/kv.d.ts +4 -7
  654. package/dist/kv.d.ts.map +1 -1
  655. package/dist/kv.js +4 -7
  656. package/dist/otel-public.d.ts +7 -0
  657. package/dist/otel-public.d.ts.map +1 -0
  658. package/dist/otel-public.js +5 -0
  659. package/dist/otel.d.ts +7 -2
  660. package/dist/otel.d.ts.map +1 -1
  661. package/dist/otel.js +7 -2
  662. package/dist/playground/assets/index-BLlKgZtI.css +1 -0
  663. package/dist/playground/assets/index-CDS5p9sR.js +67 -0
  664. package/dist/playground/index.html +2 -2
  665. package/dist/prompt.js +1 -1
  666. package/dist/result.d.ts +10 -4
  667. package/dist/result.d.ts.map +1 -1
  668. package/dist/result.js +9 -3
  669. package/dist/storage-backends/cursor-hosted-v2.d.ts +4 -5
  670. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
  671. package/dist/storage-backends/cursor-hosted-v2.js +6 -7
  672. package/dist/storage-backends/cursor-hosted.d.ts +6 -19
  673. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  674. package/dist/storage-backends/cursor-hosted.js +6 -50
  675. package/dist/storage-backends/file-kv.d.ts +9 -12
  676. package/dist/storage-backends/file-kv.d.ts.map +1 -1
  677. package/dist/storage-backends/file-kv.js +18 -54
  678. package/dist/storage-protocol.d.ts +3 -11
  679. package/dist/storage-protocol.d.ts.map +1 -1
  680. package/dist/storage-protocol.js +3 -11
  681. package/dist/storage.d.ts +28 -38
  682. package/dist/storage.d.ts.map +1 -1
  683. package/dist/storage.js +15 -50
  684. package/dist/types.d.ts +87 -68
  685. package/dist/types.d.ts.map +1 -1
  686. package/dist/types.js +12 -4
  687. package/docs/README.md +83 -148
  688. package/docs/building-with-agents.md +15 -16
  689. package/docs/deployment.md +6 -7
  690. package/docs/evals.md +613 -298
  691. package/docs/guides/agent-to-agent.md +41 -84
  692. package/docs/guides/bitbucket.md +89 -0
  693. package/docs/guides/cloud-agents.md +25 -20
  694. package/docs/guides/github.md +32 -1
  695. package/docs/guides/gitlab.md +97 -0
  696. package/docs/guides/grokbot-agents.md +27 -19
  697. package/docs/guides/mcp-oauth.md +1 -1
  698. package/docs/guides/opentelemetry.md +28 -41
  699. package/docs/guides/slack.md +53 -4
  700. package/docs/guides/webhooks.md +7 -6
  701. package/docs/hillclimbing.md +7 -7
  702. package/docs/quickstart.md +45 -106
  703. package/docs/reference/channels.md +16 -19
  704. package/docs/reference/cli.md +6 -20
  705. package/docs/reference/connections.md +3 -5
  706. package/docs/reference/extensions.md +2 -5
  707. package/docs/reference/hooks.md +11 -16
  708. package/docs/reference/http-api.md +6 -7
  709. package/docs/reference/playground.md +2 -6
  710. package/docs/reference/project-layout.md +4 -12
  711. package/docs/reference/sessions.md +6 -6
  712. package/docs/reference/subagents.md +2 -4
  713. package/docs/reference/tools.md +2 -5
  714. package/docs/troubleshooting.md +1 -2
  715. package/package.json +55 -43
  716. package/skills/deploy/SKILL.md +169 -0
  717. package/skills/evals/SKILL.md +45 -8
  718. package/skills/framework-map/SKILL.md +3 -4
  719. package/skills/otel/SKILL.md +8 -18
  720. package/src/bin/agent-serve.ts +93 -72
  721. package/src/channels/bitbucket/api.ts +347 -6
  722. package/src/channels/bitbucket/binding.ts +29 -4
  723. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  724. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  725. package/src/channels/bitbucket/checks.ts +3 -4
  726. package/src/channels/bitbucket/cursor-account.ts +1 -1
  727. package/src/channels/bitbucket/events.ts +1 -1
  728. package/src/channels/bitbucket/index.ts +2 -0
  729. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  730. package/src/channels/checks.ts +5 -4
  731. package/src/channels/deployments/deployments-channel.ts +1 -1
  732. package/src/channels/github/api.ts +1 -1
  733. package/src/channels/github/checks.ts +1 -1
  734. package/src/channels/github/cursor-account.ts +3 -3
  735. package/src/channels/github/defaults.ts +8 -4
  736. package/src/channels/github/events.ts +1 -1
  737. package/src/channels/github/forward.ts +8 -8
  738. package/src/channels/github/github-channel.ts +19 -2
  739. package/src/channels/github/progress.ts +7 -2
  740. package/src/channels/github/state.ts +6 -0
  741. package/src/channels/github/types.ts +6 -0
  742. package/src/channels/gitlab/api.ts +123 -0
  743. package/src/channels/gitlab/binding.ts +16 -4
  744. package/src/channels/gitlab/checks.ts +3 -4
  745. package/src/channels/gitlab/cursor-account.ts +1 -1
  746. package/src/channels/gitlab/events.ts +1 -1
  747. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  748. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  749. package/src/channels/gitlab/index.ts +1 -0
  750. package/src/channels/gitlab/replay.ts +2 -2
  751. package/src/channels/origin/binding.ts +6 -3
  752. package/src/channels/origin/checks.ts +27 -17
  753. package/src/channels/origin/cursor-account.ts +1 -1
  754. package/src/channels/origin/defaults.ts +5 -1
  755. package/src/channels/origin/events.ts +1 -1
  756. package/src/channels/origin/origin-channel.ts +2 -1
  757. package/src/channels/origin/origin-webhook.ts +2 -2
  758. package/src/channels/slack/agentic-delivery.ts +659 -0
  759. package/src/channels/slack/agentic-posted.ts +148 -0
  760. package/src/channels/slack/agentic-signals.ts +248 -0
  761. package/src/channels/slack/api.ts +51 -11
  762. package/src/channels/slack/approvals.ts +1 -1
  763. package/src/channels/slack/attachments.ts +1 -1
  764. package/src/channels/slack/auth.ts +3 -1
  765. package/src/channels/slack/blocks.ts +3 -3
  766. package/src/channels/slack/bot-mentions.ts +5 -7
  767. package/src/channels/slack/channel-watch.ts +1 -1
  768. package/src/channels/slack/cli-project.ts +3 -3
  769. package/src/channels/slack/defaults.ts +109 -37
  770. package/src/channels/slack/dispatch.ts +323 -164
  771. package/src/channels/slack/doctor.ts +1 -1
  772. package/src/channels/slack/eval-directive.ts +1 -1
  773. package/src/channels/slack/external-policy.ts +15 -2
  774. package/src/channels/slack/footer.ts +108 -0
  775. package/src/channels/slack/index.ts +2 -0
  776. package/src/channels/slack/interactive.ts +4 -2
  777. package/src/channels/slack/live-delivery.ts +23 -7
  778. package/src/channels/slack/log.ts +1 -1
  779. package/src/channels/slack/manifest.ts +1 -1
  780. package/src/channels/slack/nudge-carrier.ts +1 -1
  781. package/src/channels/slack/nudge-store.ts +2 -2
  782. package/src/channels/slack/paint-start.ts +93 -0
  783. package/src/channels/slack/placeholder.ts +315 -0
  784. package/src/channels/slack/progress-delivery.ts +14 -1
  785. package/src/channels/slack/reasoning-chip.ts +48 -0
  786. package/src/channels/slack/recording-sink.ts +176 -0
  787. package/src/channels/slack/reply-options.ts +71 -15
  788. package/src/channels/slack/setup.ts +1 -1
  789. package/src/channels/slack/slack-channel.ts +140 -18
  790. package/src/channels/slack/socket-mode.ts +2 -2
  791. package/src/channels/slack/thread-context.ts +5 -5
  792. package/src/channels/slack/tool-approval-events.ts +54 -38
  793. package/src/channels/slack/tool-cards.ts +1 -1
  794. package/src/channels/slack/tool-chip.ts +36 -0
  795. package/src/channels/slack/types.ts +47 -7
  796. package/src/channels/slack/upload.ts +142 -0
  797. package/src/channels.ts +12 -30
  798. package/src/dashboard-session-url.ts +32 -0
  799. package/src/evals/assertions.ts +19 -19
  800. package/src/evals/expect.ts +1 -1
  801. package/src/evals/judge.ts +1 -1
  802. package/src/evals/reporters.ts +8 -9
  803. package/src/evals/run-facts.ts +2 -2
  804. package/src/evals.ts +7 -10
  805. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  806. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  807. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  808. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  809. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  810. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  811. package/src/extensions/improve/skills/yourself.ts +1 -1
  812. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  813. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  814. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  815. package/src/extensions/slack-communication/extension.ts +45 -0
  816. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  817. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  818. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  819. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  820. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  821. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  822. package/src/extensions/slack-communication/tools/react.ts +33 -0
  823. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  824. package/src/extensions.ts +2 -6
  825. package/src/files-backends/cursor-hosted.ts +502 -98
  826. package/src/files-backends/local-fs.ts +1 -1
  827. package/src/files.ts +15 -0
  828. package/src/filesystem.ts +16 -18
  829. package/src/index.ts +4 -39
  830. package/src/internal/advertise-tools.ts +6 -6
  831. package/src/internal/approval-gate.ts +1 -1
  832. package/src/internal/artifacts-store.ts +3 -3
  833. package/src/internal/as-of.ts +2 -2
  834. package/src/internal/authored-alias-hooks.ts +32 -0
  835. package/src/internal/authored-loaders.ts +25 -2
  836. package/src/internal/builtin-tools/reminders.ts +2 -2
  837. package/src/internal/chat-client.ts +5 -5
  838. package/src/internal/cli-ax.ts +85 -16
  839. package/src/internal/cli-bitbucket.ts +11 -11
  840. package/src/internal/cli-convert-automation.ts +2 -2
  841. package/src/internal/cli-cursor.ts +5 -16
  842. package/src/internal/cli-deploy.ts +389 -104
  843. package/src/internal/cli-docs.ts +5 -5
  844. package/src/internal/cli-github.ts +16 -19
  845. package/src/internal/cli-gitlab.ts +11 -11
  846. package/src/internal/cli-manifest.ts +1 -1
  847. package/src/internal/cli-mcp-oauth.ts +5 -7
  848. package/src/internal/cli-mcp.ts +3 -3
  849. package/src/internal/cli-skills.ts +2 -2
  850. package/src/internal/cli-slack.ts +5 -5
  851. package/src/internal/cloud-turn-cost.ts +1 -1
  852. package/src/internal/continuation-channel.ts +2 -1
  853. package/src/internal/continuation-identity.ts +23 -11
  854. package/src/internal/conversation-mirror.ts +36 -3
  855. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  856. package/src/internal/convert-automation/types.ts +9 -0
  857. package/src/internal/cursor/account-mcp.ts +48 -31
  858. package/src/internal/cursor/backend-client.ts +28 -17
  859. package/src/internal/cursor/credentials.ts +1 -1
  860. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  861. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  862. package/src/internal/cursor-deployment-relay.ts +10 -10
  863. package/src/internal/cursor-event-relay.ts +10 -10
  864. package/src/internal/cursor-relay-core.ts +2 -2
  865. package/src/internal/deploy-client.ts +266 -24
  866. package/src/internal/deploy-manifest.ts +46 -8
  867. package/src/internal/discovery/agent-config.ts +34 -0
  868. package/src/internal/discovery/agent.ts +15 -13
  869. package/src/internal/discovery/channels.ts +4 -4
  870. package/src/internal/discovery/connections.ts +4 -4
  871. package/src/internal/discovery/cursor-plugin.ts +12 -12
  872. package/src/internal/discovery/extension-overlay.ts +3 -21
  873. package/src/internal/discovery/extensions.ts +8 -32
  874. package/src/internal/discovery/info.ts +12 -22
  875. package/src/internal/discovery/instructions.ts +1 -1
  876. package/src/internal/discovery/modules.ts +0 -1
  877. package/src/internal/discovery/project.ts +4 -20
  878. package/src/internal/discovery/services.ts +1 -1
  879. package/src/internal/discovery/tools.ts +1 -1
  880. package/src/internal/docs-site.ts +2 -2
  881. package/src/internal/env-file.ts +2 -2
  882. package/src/internal/eval-run-store.ts +7 -9
  883. package/src/internal/eval-runner.ts +20 -21
  884. package/src/internal/evals-client.ts +6 -6
  885. package/src/internal/event-log.ts +10 -10
  886. package/src/internal/event-mapper.ts +37 -2
  887. package/src/internal/filesystem/format.ts +11 -12
  888. package/src/internal/filesystem/scratch.ts +3 -3
  889. package/src/internal/filesystem/tools.ts +6 -8
  890. package/src/internal/filesystem/walk.ts +1 -1
  891. package/src/internal/framework-file-storage.ts +108 -9
  892. package/src/internal/framework-storage-selection.ts +4 -14
  893. package/src/internal/github-fanout.ts +4 -4
  894. package/src/internal/guest-network.ts +4 -4
  895. package/src/internal/host-files.ts +1 -1
  896. package/src/internal/host-kv.ts +2 -2
  897. package/src/internal/hosted-admission-adapter.ts +2 -0
  898. package/src/internal/hosted-catch-protocol.ts +3 -5
  899. package/src/internal/hosted-catch.ts +1 -1
  900. package/src/internal/hosted-delivery-protocol.ts +111 -13
  901. package/src/internal/hosted-delivery.ts +286 -81
  902. package/src/internal/hosted-execution-diag.ts +3 -3
  903. package/src/internal/hosted-execution-latency.ts +334 -0
  904. package/src/internal/hosting.ts +5 -6
  905. package/src/internal/http-channel-define.ts +27 -0
  906. package/src/internal/http-channel.ts +3 -4
  907. package/src/internal/http-control-plane-session.ts +24 -11
  908. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  909. package/src/internal/init-interview.ts +7 -7
  910. package/src/internal/init-project.ts +14 -16
  911. package/src/internal/init-scaffold.ts +2 -3
  912. package/src/internal/inline-stdio-mcp.ts +2 -2
  913. package/src/internal/install-cursor-skills.ts +49 -16
  914. package/src/internal/json-schema.ts +1 -1
  915. package/src/internal/local-control-plane.ts +4 -5
  916. package/src/internal/local-env.ts +3 -3
  917. package/src/internal/log-ring.ts +1 -1
  918. package/src/internal/logs-client.ts +1 -1
  919. package/src/internal/mcp-endpoint.ts +10 -10
  920. package/src/internal/mcp-host.ts +9 -9
  921. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  922. package/src/internal/mcp-oauth.ts +5 -5
  923. package/src/internal/net.ts +2 -2
  924. package/src/internal/otel/config.ts +3 -3
  925. package/src/internal/otel/runtime.ts +14 -14
  926. package/src/internal/peer-connections.ts +2 -2
  927. package/src/internal/platform-schedule-sync.ts +1 -1
  928. package/src/internal/platform-timers.ts +1 -1
  929. package/src/internal/playground/static.ts +2 -2
  930. package/src/internal/playground/toolchain.ts +2 -2
  931. package/src/internal/playground-proxy.ts +3 -3
  932. package/src/internal/process-memory-telemetry.ts +1 -1
  933. package/src/internal/reminder-runner.ts +8 -10
  934. package/src/internal/reminder-store.ts +1 -1
  935. package/src/internal/request-error-status.ts +9 -0
  936. package/src/internal/resolved-connections.ts +8 -8
  937. package/src/internal/result-output.ts +62 -5
  938. package/src/internal/router.ts +4 -4
  939. package/src/internal/run-client.ts +3 -3
  940. package/src/internal/schedule-runner.ts +6 -6
  941. package/src/internal/scm/pr-url.ts +11 -2
  942. package/src/internal/sdk-runner.ts +15 -29
  943. package/src/internal/serve-restart.ts +1 -1
  944. package/src/internal/server.ts +97 -115
  945. package/src/internal/session-cost.ts +3 -3
  946. package/src/internal/session-engine.ts +517 -445
  947. package/src/internal/session-run-log.ts +4 -6
  948. package/src/internal/session-store.ts +213 -39
  949. package/src/internal/sessions-client.ts +3 -3
  950. package/src/internal/slack-thread-key.ts +11 -0
  951. package/src/internal/sleep.ts +1 -1
  952. package/src/internal/storage-coordinator.ts +122 -96
  953. package/src/internal/storage-roles.ts +4 -9
  954. package/src/internal/storage.ts +1 -0
  955. package/src/internal/store-mirror.ts +4 -4
  956. package/src/internal/terminal-style.ts +2 -2
  957. package/src/internal/tool-result.ts +3 -3
  958. package/src/internal/trajectory.ts +7 -7
  959. package/src/internal/turn-governor.ts +2 -2
  960. package/src/internal/turn-outbox.ts +1 -1
  961. package/src/internal/update-check.ts +2 -2
  962. package/src/internal/v2-hosting.ts +14 -0
  963. package/src/internal/workspace.ts +17 -17
  964. package/src/kv/memory-kv.ts +9 -7
  965. package/src/kv.ts +4 -7
  966. package/src/otel-public.ts +24 -0
  967. package/src/otel.ts +7 -2
  968. package/src/prompt.ts +1 -1
  969. package/src/result.ts +10 -8
  970. package/src/storage-backends/cursor-hosted-v2.ts +6 -9
  971. package/src/storage-backends/cursor-hosted.ts +6 -60
  972. package/src/storage-backends/file-kv.ts +17 -58
  973. package/src/storage-protocol.ts +3 -17
  974. package/src/storage.ts +32 -108
  975. package/src/types.ts +101 -73
  976. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  977. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  978. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  979. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  980. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  981. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  982. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  983. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  984. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  985. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  986. package/templates/agentic-owners/package.json +1 -1
  987. package/templates/agents-md/agent/lib/collect.ts +16 -10
  988. package/templates/agents-md/agent/lib/config.ts +1 -1
  989. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  990. package/templates/agents-md/package.json +1 -1
  991. package/templates/code-wiki/agent/channels/github.ts +4 -7
  992. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  993. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  994. package/templates/code-wiki/package.json +1 -1
  995. package/templates/demo/README.md +10 -6
  996. package/templates/demo/agent/channels/github.ts +2 -0
  997. package/templates/demo/agent/channels/queue.ts +6 -2
  998. package/templates/demo/agent/lib/collect.ts +6 -2
  999. package/templates/demo/agent/lib/repos.ts +5 -0
  1000. package/templates/demo/agent/tools/record_demo.ts +1 -1
  1001. package/templates/demo/evals/demo.eval.ts +1 -5
  1002. package/templates/demo/init.json +25 -0
  1003. package/templates/demo/package.json +1 -1
  1004. package/templates/grokbot-agents/package.json +1 -1
  1005. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  1006. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  1007. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  1008. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  1009. package/templates/pr-autofixer/package.json +1 -1
  1010. package/templates/security-help/agent/lib/repos.ts +1 -1
  1011. package/templates/security-help/package.json +1 -1
  1012. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  1013. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  1014. package/templates/security-reviewer/package.json +1 -1
  1015. package/templates/triage/agent/lib/actuate.ts +26 -41
  1016. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  1017. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  1018. package/templates/triage/agent/tools/record_triage.ts +1 -4
  1019. package/templates/triage/package.json +1 -1
  1020. package/dist/ab.d.ts +0 -209
  1021. package/dist/ab.d.ts.map +0 -1
  1022. package/dist/ab.js +0 -246
  1023. package/dist/client.d.ts +0 -14
  1024. package/dist/client.d.ts.map +0 -1
  1025. package/dist/client.js +0 -12
  1026. package/dist/docs/ab.html +0 -80
  1027. package/dist/docs/ab.md +0 -332
  1028. package/dist/docs/assets/ab.md.mlVgqvSk.js +0 -54
  1029. package/dist/docs/assets/ab.md.mlVgqvSk.lean.js +0 -1
  1030. package/dist/docs/assets/app.BASKM3M4.js +0 -1
  1031. package/dist/docs/assets/chunks/@localSearchIndexroot.BHZYsNVi.js +0 -1
  1032. package/dist/docs/assets/chunks/framework.BCISBCiQ.js +0 -19
  1033. package/dist/docs/assets/concepts.md.DgEcZOfT.js +0 -1
  1034. package/dist/docs/assets/concepts.md.DgEcZOfT.lean.js +0 -1
  1035. package/dist/docs/assets/evals.md.C1ekS3k2.js +0 -85
  1036. package/dist/docs/assets/evals.md.C1ekS3k2.lean.js +0 -1
  1037. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  1038. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  1039. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  1040. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  1041. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  1042. package/dist/docs/assets/hillclimbing.md.CpTGTCle.js +0 -4
  1043. package/dist/docs/assets/hillclimbing.md.CpTGTCle.lean.js +0 -1
  1044. package/dist/docs/assets/index.md.BjH1w2ZW.js +0 -5
  1045. package/dist/docs/assets/index.md.BjH1w2ZW.lean.js +0 -1
  1046. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  1047. package/dist/docs/assets/reference_project-layout.md.DuBu9a96.js +0 -19
  1048. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  1049. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  1050. package/dist/docs/assets/reference_sessions.md.CueyOHSL.js +0 -1
  1051. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  1052. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  1053. package/dist/docs/assets/skills_ab.md.CsFNatVx.js +0 -26
  1054. package/dist/docs/assets/skills_ab.md.CsFNatVx.lean.js +0 -1
  1055. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  1056. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  1057. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  1058. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  1059. package/dist/docs/assets/skills_evals.md.BhovOvrl.js +0 -25
  1060. package/dist/docs/assets/skills_evals.md.BhovOvrl.lean.js +0 -1
  1061. package/dist/docs/assets/skills_framework-map.md.D-tFZhFS.js +0 -1
  1062. package/dist/docs/assets/skills_framework-map.md.D-tFZhFS.lean.js +0 -1
  1063. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  1064. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  1065. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  1066. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  1067. package/dist/docs/assets/skills_index.md.DKwIxzGg.js +0 -1
  1068. package/dist/docs/assets/skills_index.md.DKwIxzGg.lean.js +0 -1
  1069. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  1070. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  1071. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  1072. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  1073. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  1074. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1075. package/dist/docs/assets/storage.md.BOHeqk2M.js +0 -30
  1076. package/dist/docs/assets/storage.md.BOHeqk2M.lean.js +0 -1
  1077. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1078. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1079. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1080. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1081. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1082. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1083. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1084. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1085. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1086. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1087. package/dist/docs/concepts.html +0 -27
  1088. package/dist/docs/concepts.md +0 -168
  1089. package/dist/docs/design/filesystem.md +0 -376
  1090. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1091. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1092. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1093. package/dist/docs/reference/result.html +0 -45
  1094. package/dist/docs/reference/result.md +0 -89
  1095. package/dist/docs/scaffolding-agents.html +0 -27
  1096. package/dist/docs/scaffolding-agents.md +0 -130
  1097. package/dist/docs/skills/ab.html +0 -52
  1098. package/dist/docs/skills/ab.md +0 -50
  1099. package/dist/docs/skills/create-agent.html +0 -34
  1100. package/dist/docs/skills/create-agent.md +0 -160
  1101. package/dist/docs/skills/debug.html +0 -27
  1102. package/dist/docs/skills/debug.md +0 -36
  1103. package/dist/docs/skills/evals.html +0 -51
  1104. package/dist/docs/skills/evals.md +0 -99
  1105. package/dist/docs/skills/framework-map.html +0 -27
  1106. package/dist/docs/skills/framework-map.md +0 -100
  1107. package/dist/docs/skills/github.html +0 -42
  1108. package/dist/docs/skills/github.md +0 -93
  1109. package/dist/docs/skills/hillclimb.html +0 -33
  1110. package/dist/docs/skills/hillclimb.md +0 -55
  1111. package/dist/docs/skills/index.html +0 -27
  1112. package/dist/docs/skills/index.md +0 -21
  1113. package/dist/docs/skills/mcp-auth.html +0 -44
  1114. package/dist/docs/skills/mcp-auth.md +0 -76
  1115. package/dist/docs/skills/otel.html +0 -34
  1116. package/dist/docs/skills/otel.md +0 -53
  1117. package/dist/docs/skills/setup-slack.html +0 -46
  1118. package/dist/docs/skills/setup-slack.md +0 -141
  1119. package/dist/docs/storage.html +0 -56
  1120. package/dist/docs/storage.md +0 -176
  1121. package/dist/docs/templates/agents-md.html +0 -28
  1122. package/dist/docs/templates/agents-md.md +0 -105
  1123. package/dist/docs/templates/code-wiki.html +0 -28
  1124. package/dist/docs/templates/code-wiki.md +0 -91
  1125. package/dist/docs/templates/demo.html +0 -30
  1126. package/dist/docs/templates/demo.md +0 -80
  1127. package/dist/docs/templates/grokbot-agents.html +0 -29
  1128. package/dist/docs/templates/grokbot-agents.md +0 -48
  1129. package/dist/docs/templates/security-help.html +0 -30
  1130. package/dist/docs/templates/security-help.md +0 -65
  1131. package/dist/internal/ab-collector.d.ts +0 -44
  1132. package/dist/internal/ab-collector.d.ts.map +0 -1
  1133. package/dist/internal/ab-collector.js +0 -142
  1134. package/dist/internal/ab-fold.d.ts +0 -36
  1135. package/dist/internal/ab-fold.d.ts.map +0 -1
  1136. package/dist/internal/ab-fold.js +0 -175
  1137. package/dist/internal/ab-snapshot.d.ts +0 -68
  1138. package/dist/internal/ab-snapshot.d.ts.map +0 -1
  1139. package/dist/internal/ab-snapshot.js +0 -208
  1140. package/dist/internal/discovery/ab.d.ts +0 -9
  1141. package/dist/internal/discovery/ab.d.ts.map +0 -1
  1142. package/dist/internal/discovery/ab.js +0 -113
  1143. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1144. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1145. package/dist/internal/tenant-slack/relay.js +0 -148
  1146. package/dist/playground/assets/index-BMDqAeXu.js +0 -67
  1147. package/dist/playground/assets/index-LUgJoWdL.css +0 -1
  1148. package/docs/ab.md +0 -337
  1149. package/docs/concepts.md +0 -173
  1150. package/docs/design/filesystem.md +0 -376
  1151. package/docs/design/runtime-abstraction.md +0 -1756
  1152. package/docs/guides/human-in-the-loop.md +0 -131
  1153. package/docs/reference/result.md +0 -94
  1154. package/docs/scaffolding-agents.md +0 -135
  1155. package/docs/skills/index.md +0 -26
  1156. package/docs/storage.md +0 -181
  1157. package/docs/templates/agents-md.md +0 -110
  1158. package/docs/templates/code-wiki.md +0 -96
  1159. package/docs/templates/demo.md +0 -85
  1160. package/docs/templates/grokbot-agents.md +0 -53
  1161. package/docs/templates/security-help.md +0 -70
  1162. package/skills/ab/SKILL.md +0 -58
  1163. package/src/ab.ts +0 -430
  1164. package/src/client.ts +0 -23
  1165. package/src/internal/ab-collector.ts +0 -200
  1166. package/src/internal/ab-fold.ts +0 -232
  1167. package/src/internal/ab-snapshot.ts +0 -331
  1168. package/src/internal/discovery/ab.ts +0 -131
  1169. package/src/internal/tenant-slack/relay.ts +0 -203
  1170. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -1 +0,0 @@
1
- import{_ as e,c as i,o as a,ag as t}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agent-sdk eval, and use them as regression checks.","frontmatter":{"title":"Evals","description":"Define repeatable checks with defineEval, run them with agent-sdk eval, and use them as regression checks."},"headers":[],"relativePath":"evals.md","filePath":"evals.md"}'),n={name:"evals.md"};function l(d,s,h,o,r,p){return a(),i("div",null,[...s[0]||(s[0]=[t("",82)])])}const g=e(n,[["render",l]]);export{k as __pageData,g as default};
@@ -1,10 +0,0 @@
1
- import{_ as t,c as s,o as a,ag as n}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context.","frontmatter":{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),o={name:"guides/agent-to-agent.md"};function i(r,e,h,l,d,c){return a(),s("div",null,[...e[0]||(e[0]=[n(`<h1 id="agent-to-agent" tabindex="-1">Agent-to-agent <a class="header-anchor" href="#agent-to-agent" aria-label="Permalink to &quot;Agent-to-agent&quot;">​</a></h1><p>Every mounted agent is also an MCP server. So agents can delegate to each other without extra infrastructure. One agent hands a question to another, and the peer answers in its own session with its own instructions, tools, and context. Any external MCP client can do the same. A peer MCP connection makes the wiring one line.</p><p>This guide wires a <code>concierge</code> agent that delegates weather questions to a <code>weather-agent</code> peer mounted on the same host.</p><h2 id="mcp-endpoint" tabindex="-1">MCP endpoint <a class="header-anchor" href="#mcp-endpoint" aria-label="Permalink to &quot;MCP endpoint&quot;">​</a></h2><p>Each agent serves the Model Context Protocol over streamable HTTP at <code>/&lt;slug&gt;/v1/mcp</code> (or <code>/v1/mcp</code> in single mode). The surface is stateless (session identity travels in tool arguments) and runs the same route auth chain as the session API. It exposes three tools:</p><table tabindex="0"><thead><tr><th>Tool</th><th>Behavior</th></tr></thead><tbody><tr><td><code>ask</code></td><td>Send a message. Runs a model turn in this agent&#39;s own session and returns <code>{ status, sessionId, reply }</code>. Omit <code>sessionId</code> for a fresh session; pass it back to follow up.</td></tr><tr><td><code>check</code></td><td>Wait for or poll a running session (<code>waitSeconds: 0</code> polls without blocking).</td></tr><tr><td><code>call_tool</code></td><td>Call one of the agent&#39;s server tools directly, no model turn. Registered only when the agent has server tools.</td></tr></tbody></table><p>Waits are bounded at roughly 50 seconds, below typical MCP client request timeouts: a long turn returns <code>status: &quot;running&quot;</code> and the caller keeps waiting with <code>check</code>. Sessions created this way live on the <code>mcp</code> channel, bind to the calling principal, and show up in the playground and <code>GET /v1/sessions</code> like any other session.</p><p>Any MCP client can attach to this endpoint. It isn&#39;t only for other Agent SDK agents.</p><h2 id="wire-a-peer-mcp-connection" tabindex="-1">Wire a peer MCP connection <a class="header-anchor" href="#wire-a-peer-mcp-connection" aria-label="Permalink to &quot;Wire a peer MCP connection&quot;">​</a></h2><p>A peer MCP connection points one agent at another mounted on the same serve host. Author an MCP connection whose transport is the peer&#39;s slug:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agents/concierge/agent/mcp-connections/weather.ts</span></span>
2
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/connections&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
- <span class="line"></span>
4
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agent: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;weather-agent&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
6
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Delegate weather questions to the weather agent.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
7
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The parent model now sees the peer&#39;s <code>ask</code> and <code>check</code> (and <code>call_tool</code>) tools under the <code>weather</code> server name. It reads like subagent delegation, except the peer is a full agent that keeps its own instructions, tools, MCP connections, and sessions.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./agents</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dev</span></span>
8
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> chat</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/concierge</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
9
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;What&#39;s the weather in Paris right now?&quot;</span></span>
10
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># concierge → weather.ask → weather-agent&#39;s own session/tools → reply</span></span></code></pre></div><h2 id="peer-or-subagent" tabindex="-1">Peer or subagent? <a class="header-anchor" href="#peer-or-subagent" aria-label="Permalink to &quot;Peer or subagent?&quot;">​</a></h2><p>The two delegation mechanisms solve different problems.</p><table tabindex="0"><thead><tr><th></th><th>Subagent (<code>agent/subagents/&lt;id&gt;/</code>)</th><th>Peer (<code>defineConnection({ agent })</code>)</th></tr></thead><tbody><tr><td>Runs as</td><td>an SDK custom subagent inside the parent&#39;s harness</td><td>an independent agent on the same host</td></tr><tr><td>Own tools, MCP connections, sessions</td><td>no, inherits the parent&#39;s surface</td><td>yes, everything is its own</td></tr><tr><td>Visible to others</td><td>only its parent</td><td>any MCP client, other agents, its own playground</td></tr><tr><td>Reach for it when</td><td>splitting one job into specialist roles</td><td>composing independently useful agents</td></tr></tbody></table><h2 id="how-peer-urls-resolve" tabindex="-1">How peer URLs resolve <a class="header-anchor" href="#how-peer-urls-resolve" aria-label="Permalink to &quot;How peer URLs resolve&quot;">​</a></h2><p>Peer URLs resolve when the server starts, so the ephemeral ports <code>run</code> and <code>eval</code> use work too. Local-runtime turns (and host-side <code>ctx.host.mcp</code> or channel-handler calls) reach the peer over loopback, which works under the default auth. Cloud-runtime turns execute on a VM that cannot reach this host&#39;s loopback address: pass <code>--public-url https://agent-sdk.example.com</code> (or <code>serve(dir, { publicUrl })</code>) so peers resolve to a reachable URL. Without one, peers are omitted from cloud turns and the server warns at startup. With <code>--bearer-token</code>, the token is attached to peer calls automatically so they pass the target agent&#39;s auth chain.</p><h2 id="guardrails" tabindex="-1">Guardrails <a class="header-anchor" href="#guardrails" aria-label="Permalink to &quot;Guardrails&quot;">​</a></h2><p>Unknown peer slugs and self-references fail <code>serve</code> at startup, so you find out immediately rather than at delegation time. Peers require the multi-agent layout (each agent mounted under its slug, the default).</p><p>The framework does not provide cross-host loop protection. If agent A&#39;s instructions delegate to B and B&#39;s delegate back to A, they can recurse. Scope each agent&#39;s delegation instructions narrowly. The concierge delegates <em>weather questions</em> to <code>weather-agent</code>, not everything.</p><h2 id="call-a-peer-from-host-code" tabindex="-1">Call a peer from host code <a class="header-anchor" href="#call-a-peer-from-host-code" aria-label="Permalink to &quot;Call a peer from host code&quot;">​</a></h2><p>Peer MCP connections are ordinary MCP connections, so deterministic host code can use them too. A channel handler or server tool can call <code>host.mcp.callTool(&quot;weather&quot;, &quot;ask&quot;, { message: &quot;…&quot; })</code> without any model turn deciding to. See <a href="./../reference/connections.html#every-model-visible-mcp-connection-is-available-in-three-places">MCP connections</a> for the three places every model-visible MCP connection is available.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/connections.html">MCP connections</a>: all four MCP connection transports</li><li><a href="./../reference/subagents.html">Subagents</a>: the in-harness alternative</li><li><a href="./../reference/http-api.html#mcp-endpoint">HTTP API</a>: the endpoint contract</li></ul>`,26)])])}const u=t(o,[["render",i]]);export{g as __pageData,u as default};
@@ -1 +0,0 @@
1
- import{_ as t,c as s,o as a,ag as n}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context.","frontmatter":{"title":"Agent-to-agent","description":"Every agent is an MCP server. Peer MCP connections let one agent delegate to another that keeps its own tools, sessions, and context."},"headers":[],"relativePath":"guides/agent-to-agent.md","filePath":"guides/agent-to-agent.md"}'),o={name:"guides/agent-to-agent.md"};function i(r,e,h,l,d,c){return a(),s("div",null,[...e[0]||(e[0]=[n("",26)])])}const u=t(o,[["render",i]]);export{g as __pageData,u as default};
@@ -1,9 +0,0 @@
1
- import{_ as e,c as a,o as s,ag as o}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval.","frontmatter":{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval."},"headers":[],"relativePath":"guides/grokbot-agents.md","filePath":"guides/grokbot-agents.md"}'),n={name:"guides/grokbot-agents.md"};function i(r,t,h,l,d,p){return s(),a("div",null,[...t[0]||(t[0]=[o(`<h1 id="cursor-grok-bot-agents" tabindex="-1">Cursor Grok Bot agents <a class="header-anchor" href="#cursor-grok-bot-agents" aria-label="Permalink to &quot;Cursor Grok Bot agents&quot;">​</a></h1><p>The <code>cursor-grokbot-agents</code> extension lets an agent send a message to one of your Grok Bot agents and read the reply. The Grok Bot keeps its own conversation, memory, and tools. Your agent stays where it is and consults that bot the way you would in the Grok Bot app.</p><p>This is different from moving this agent&#39;s turns onto a hosted Grok Bot. The extension keeps the agent where it is and lets it talk to <em>other</em> Grok Bot agents.</p><h2 id="mount-it" tabindex="-1">Mount it <a class="header-anchor" href="#mount-it" aria-label="Permalink to &quot;Mount it&quot;">​</a></h2><p>The extension ships with <code>@cursor/july</code>. Mount it with one file.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/extensions/grokbot.ts</span></span>
2
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorGrokBotAgents </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/extensions/cursor-grokbot-agents&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
- <span class="line"></span>
4
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cursorGrokBotAgents</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agents: [</span></span>
6
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Plan Keeper&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Keeps or moves outdoor plans.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
7
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Chief of Staff&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Routes work and tracks priorities.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
8
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
9
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>agents</code> is the allowlist. List every Grok Bot the model may talk to; a name outside the list is refused. Calls run under the host&#39;s signed-in account (<code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>). Keep approval on when you can&#39;t.</p><p>Start from the <a href="./../templates/grokbot-agents.html">Grok Bot agents template</a> when you want a project that already mounts this.</p><h2 id="what-the-agent-can-do" tabindex="-1">What the agent can do <a class="header-anchor" href="#what-the-agent-can-do" aria-label="Permalink to &quot;What the agent can do&quot;">​</a></h2><p>With the extension mounted, the agent can consult a Grok Bot and stay in its own conversation:</p><ul><li><strong>Ask.</strong> Send a self-contained message to a Grok Bot by the name shown in the Grok Bot app. The message lands in your conversation with that bot. The tool waits for the bot&#39;s reply.</li><li><strong>Keep waiting.</strong> A long turn returns <code>status: &quot;running&quot;</code>. Call check with the same name to read what arrived since the last look.</li><li><strong>Stop a turn.</strong> Interrupt the bot&#39;s current work. The conversation stays; a later ask continues it.</li><li><strong>See who you can talk to.</strong> List the configured bots and the ones this caller has already asked. Add a name to <code>agents</code> when you want the model to reach another bot.</li></ul><p>A skill teaches the model when to bring a Grok Bot in, how to write a message the bot can act on alone, and how to wait or interrupt. The reply is what the Grok Bot sent to the person. If a turn finishes with no reply, the bot sent nothing; ask again with a clearer request, or open the bot in the Grok Bot app.</p><p>The tools reach Grok Bot agents on the signed-in account. A bot another user owns is out of reach. That separation is only as fine as your host&#39;s auth; a shared bearer token or <code>--allow-anonymous</code> makes every caller one principal, so use <a href="./../reference/channels.html#auth-policies">authored auth</a> when callers need their own.</p><h2 id="configure-it" tabindex="-1">Configure it <a class="header-anchor" href="#configure-it" aria-label="Permalink to &quot;Configure it&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Option</th><th>What it controls</th></tr></thead><tbody><tr><td><code>agents</code></td><td>The Grok Bot agents the model may talk to, by the name shown in the app. A lone entry is the default when a call names none. Omit <code>agents</code> to allow any name; an unknown name creates an empty Grok Bot on the account.</td></tr><tr><td><code>needsApproval</code></td><td>Park asks for a <a href="./human-in-the-loop.html">human decision</a>. Defaults to <code>true</code> when no <code>agents</code> are configured, <code>false</code> otherwise.</td></tr><tr><td><code>apiKey</code></td><td>A Cursor API key to call with instead of the host&#39;s own.</td></tr></tbody></table><h2 id="adjust-it" tabindex="-1">Adjust it <a class="header-anchor" href="#adjust-it" aria-label="Permalink to &quot;Adjust it&quot;">​</a></h2><p>To take a capability away, such as interrupting a turn, mount as a directory and disable that tool; see <a href="./../reference/extensions.html#adjust-a-mounted-extension">overlays</a>.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../templates/grokbot-agents.html">Grok Bot agents template</a>: scaffold an agent that already mounts this</li><li><a href="./../reference/extensions.html">Extensions</a>: how mounts, namespaces, and overrides work</li><li><a href="./human-in-the-loop.html">Human-in-the-loop approvals</a>: where parked asks get approved</li></ul>`,20)])])}const u=e(n,[["render",i]]);export{c as __pageData,u as default};
@@ -1,28 +0,0 @@
1
- import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"Human-in-the-loop","description":"Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout.","frontmatter":{"title":"Human-in-the-loop","description":"Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout."},"headers":[],"relativePath":"guides/human-in-the-loop.md","filePath":"guides/human-in-the-loop.md"}'),n={name:"guides/human-in-the-loop.md"};function l(p,s,h,o,r,k){return e(),i("div",null,[...s[0]||(s[0]=[t(`<h1 id="human-in-the-loop-approvals" tabindex="-1">Human-in-the-loop approvals <a class="header-anchor" href="#human-in-the-loop-approvals" aria-label="Permalink to &quot;Human-in-the-loop approvals&quot;">​</a></h1><p>Some tools must wait for human review: promoting a build, approving a PR, spending money. Mark those tools <code>needsApproval</code> and the host parks the in-flight call until a person approves or denies it, from the playground, over HTTP, or with Slack buttons. The turn stays running; nothing executes until someone decides.</p><h2 id="gate-a-tool" tabindex="-1">Gate a tool <a class="header-anchor" href="#gate-a-tool" aria-label="Permalink to &quot;Gate a tool&quot;">​</a></h2><p>Mark the tool with <code>needsApproval</code> and export it like any other tool.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineTool } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/tools&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { z } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;zod&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
- <span class="line"></span>
4
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Promote a verified build to production.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
6
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> needsApproval: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
7
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> inputSchema: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">object</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
8
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> service: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
9
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> buildId: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(),</span></span>
10
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
11
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">service</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">buildId</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }) {</span></span>
12
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
13
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> promoted: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
14
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> service,</span></span>
15
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> buildId,</span></span>
16
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> environment: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;production&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
17
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> };</span></span>
18
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
19
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>needsApproval</code> also takes a predicate over the validated input, so you can gate only the dangerous shapes:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">needsApproval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">input</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> input.amountUsd </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 100</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span></code></pre></div><h2 id="what-happens-to-a-gated-call" tabindex="-1">What happens to a gated call <a class="header-anchor" href="#what-happens-to-a-gated-call" aria-label="Permalink to &quot;What happens to a gated call&quot;">​</a></h2><p>When the model calls a <code>needsApproval</code> tool, the call parks and the session&#39;s stream emits <code>action.approval_requested</code> with the <code>callId</code>, tool name, and arguments. The turn stays running and waits. When a person resolves it, the stream emits <code>action.approval_resolved</code> with the decision and, where known, who decided. On approval, <code>execute</code> runs and <code>action.result</code> follows exactly as if the tool had run immediately. On denial, the model receives the denial as the tool result and continues the turn. It can explain, adjust, or try something else.</p><p>Approvals exist for <code>execution: &quot;server&quot;</code> tools on the local runtime only. Parked calls do not survive a host restart: pending approvals left after a crash resolve as interrupted, and you re-run the turn.</p><h2 id="resolve-from-the-playground" tabindex="-1">Resolve from the playground <a class="header-anchor" href="#resolve-from-the-playground" aria-label="Permalink to &quot;Resolve from the playground&quot;">​</a></h2><p>Parked calls render Approve / Deny buttons inline in the conversation. Nothing to configure.</p><h2 id="resolve-over-http" tabindex="-1">Resolve over HTTP <a class="header-anchor" href="#resolve-over-http" aria-label="Permalink to &quot;Resolve over HTTP&quot;">​</a></h2><p>List and resolve programmatically. The routes run the same auth chain as the rest of the session API, and the caller must be the session owner:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">slu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">g</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/v1/session/ses_.../approvals</span></span>
20
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># {&quot;approvals&quot;:[{&quot;callId&quot;:&quot;...&quot;,&quot;toolName&quot;:&quot;approve_pr&quot;,&quot;args&quot;:{...}}]}</span></span>
21
- <span class="line"></span>
22
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -X</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> POST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">slu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">g</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/v1/session/ses_.../approvals/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">callI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
23
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;content-type: application/json&#39;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
24
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;{&quot;decision&quot;:&quot;approve&quot;}&#39;</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # or &quot;deny&quot;</span></span></code></pre></div><h2 id="resolve-from-slack" tabindex="-1">Resolve from Slack <a class="header-anchor" href="#resolve-from-slack" aria-label="Permalink to &quot;Resolve from Slack&quot;">​</a></h2><p>Set <code>toolApprovals: true</code> on the Slack channel and the pack posts Block Kit Approve/Deny cards and routes the button clicks back to the parked call:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { slackChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels/slack&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
25
- <span class="line"></span>
26
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> slackChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
27
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> toolApprovals: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
28
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Approval cards need interactivity on the Slack app. Cards show redacted, truncated arguments because of Block Kit size limits. Execution still uses the full validated input, so review sensitive tools in the playground when the arguments may exceed the card. Details in the <a href="./slack.html#add-approval-buttons">Slack guide</a>.</p><p>In <code>serve --dev</code>, the playground can also list Slack sessions and resolve their parked tools (the audit trail records the HTTP caller). That bridge does not open cross-owner approval for HTTP sessions, and production and bearer-auth hosts stay strict: Slack approvals must come from Slack interactivity or a matching principal.</p><h2 id="design-principles-for-approvals" tabindex="-1">Design principles for approvals <a class="header-anchor" href="#design-principles-for-approvals" aria-label="Permalink to &quot;Design principles for approvals&quot;">​</a></h2><p>Park/resume is independent of delivery: <code>needsApproval</code> works with no Slack channel at all, because the playground and HTTP surfaces are always there.</p><p>Prefer approval gates over trust in instructions. &quot;Only call this tool when…&quot; is a suggestion; <code>needsApproval</code> is a guarantee. And pair approvals with dry-run defaults for destructive integrations: post real PR reviews only behind an explicit env flag like <code>MY_AGENT_LIVE=1</code>, no matter who approved.</p><p>Deterministic tool calls (<code>agent-sdk call</code>, <code>POST /v1/tools/:name</code>) execute directly without parking. There the human is the caller. Approval parking applies to model-initiated calls.</p><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/tools.html">Tools</a>: the full tool API <code>needsApproval</code> lives on</li><li><a href="./slack.html">Slack</a>: the approval cards in context</li><li><a href="./../reference/sessions.html">Sessions and streaming</a>: the <code>action.approval_*</code> events on the wire</li></ul>`,27)])])}const u=a(n,[["render",l]]);export{c as __pageData,u as default};
@@ -1 +0,0 @@
1
- import{_ as a,c as i,o as e,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"Human-in-the-loop","description":"Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout.","frontmatter":{"title":"Human-in-the-loop","description":"Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout."},"headers":[],"relativePath":"guides/human-in-the-loop.md","filePath":"guides/human-in-the-loop.md"}'),n={name:"guides/human-in-the-loop.md"};function l(p,s,h,o,r,k){return e(),i("div",null,[...s[0]||(s[0]=[t("",27)])])}const u=a(n,[["render",l]]);export{c as __pageData,u as default};
@@ -1,4 +0,0 @@
1
- import{_ as t,c as i,o as a,ag as l}from"./chunks/framework.BCISBCiQ.js";const m=JSON.parse('{"title":"Hillclimbing","description":"Improve an agent one measured round at a time, with the hillclimb skill running the loop with you.","frontmatter":{"title":"Hillclimbing","description":"Improve an agent one measured round at a time, with the hillclimb skill running the loop with you."},"headers":[],"relativePath":"hillclimbing.md","filePath":"hillclimbing.md"}'),o={name:"hillclimbing.md"};function n(r,e,s,h,d,c){return a(),i("div",null,[...e[0]||(e[0]=[l(`<h1 id="hillclimbing" tabindex="-1">Hillclimbing <a class="header-anchor" href="#hillclimbing" aria-label="Permalink to &quot;Hillclimbing&quot;">​</a></h1><p>Make an agent better on fixed inputs: measure, change one lever, remeasure, and lock every kept win with an eval.</p><h2 id="what-is-hillclimbing" tabindex="-1">What is hillclimbing? <a class="header-anchor" href="#what-is-hillclimbing" aria-label="Permalink to &quot;What is hillclimbing?&quot;">​</a></h2><p>Hillclimbing is a measured improvement loop. You pin a few fixtures, name the one dominant problem in the run, change one lever, and check the same fixtures again. Keep only what helps. Every kept change lands an <a href="./evals.html">eval</a> so the win stays put.</p><p>You don&#39;t have to run the loop alone. The package ships a coding-agent skill that drives it with you.</p><div class="language-mermaid vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">mermaid</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">flowchart LR</span></span>
2
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> measure[Measure] --&gt; change[Change one lever]</span></span>
3
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> change --&gt; remeasure[Remeasure]</span></span>
4
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> remeasure --&gt; measure</span></span></code></pre></div><h2 id="how-do-i-hillclimb-an-agent-with-a-coding-agent" tabindex="-1">How do I hillclimb an agent with a coding agent? <a class="header-anchor" href="#how-do-i-hillclimb-an-agent-with-a-coding-agent" aria-label="Permalink to &quot;How do I hillclimb an agent with a coding agent?&quot;">​</a></h2><p>Have Cursor read <a href="./skills/hillclimb.html"><code>skills/hillclimb/SKILL.md</code></a>.</p><p>Tell it:</p><ol><li><strong>Which agent</strong> you&#39;re improving (path or slug)</li><li><strong>One to three fixtures</strong> you&#39;ll reuse every round: a PR URL, a saved webhook body, or a canonical chat prompt</li><li><strong>What &quot;better&quot; means</strong> this round: correct tool choice, fewer tools, lower latency, or output quality. Name the freeze line too: API shape, public output, and existing evals that must stay green</li></ol><p>The skill serves the agent, hits your fixtures, reads the session trajectory, proposes one change, remeasures, and checks with you before the next round.</p><p>Other skills cover the edges:</p><table tabindex="0"><thead><tr><th>When you need…</th><th>Skill</th></tr></thead><tbody><tr><td>The measured improvement loop</td><td><a href="./skills/hillclimb.html"><code>skills/hillclimb/SKILL.md</code></a></td></tr><tr><td>An eval that locks a kept win</td><td><a href="./skills/evals.html"><code>skills/evals/SKILL.md</code></a></td></tr><tr><td>Repeatable GitHub webhook inputs</td><td><a href="./skills/github.html"><code>skills/github/SKILL.md</code></a></td></tr><tr><td>A run that misbehaves</td><td><a href="./skills/debug.html"><code>skills/debug/SKILL.md</code></a></td></tr></tbody></table><p>See <a href="./building-with-agents.html">Building agents with agents</a> for every framework skill and a good first prompt.</p><h2 id="what-do-i-need-before-a-hillclimb-round" tabindex="-1">What do I need before a hillclimb round? <a class="header-anchor" href="#what-do-i-need-before-a-hillclimb-round" aria-label="Permalink to &quot;What do I need before a hillclimb round?&quot;">​</a></h2><p>Agree on four things before you edit:</p><ol><li><strong>The target agent</strong>: the project you&#39;re improving</li><li><strong>Fixtures</strong>: one to three fixed inputs you can compare across runs</li><li><strong>Success criteria</strong>: what better means this round</li><li><strong>The freeze line</strong>: what must not change</li></ol><p>Pin the input first. A moving fixture is noise. For GitHub agents, use <code>agent-sdk github replay</code> (see the <a href="./guides/github.html">GitHub guide</a>). For a single tool without a model turn, use <code>agent-sdk call</code>. For a chat turn, use <code>agent-sdk run --dir . --message &quot;…&quot;</code>.</p><h2 id="how-do-i-run-one-hillclimb-round" tabindex="-1">How do I run one hillclimb round? <a class="header-anchor" href="#how-do-i-run-one-hillclimb-round" aria-label="Permalink to &quot;How do I run one hillclimb round?&quot;">​</a></h2><p><strong>Measure.</strong> Hit the agent the way a user would: playground, channel HTTP, or Slack in <code>--dev</code>. Or ask the hillclimb skill to do it. <code>agent-sdk run</code> returns a JSON trajectory and writes a trace under the project state directory.</p><p><strong>Reflect.</strong> Score the trajectory, not impressions. Was the answer right? Did the model thrash (too many tools, fat evidence, grep loops)? Did it invent work the host should have prepared? Name the single dominant problem for this round in one sentence. Example: &quot;Full-file dumps trigger grep loops.&quot;</p><p><strong>Change one lever.</strong> Prefer the smallest change that addresses that problem:</p><ol><li>Host prep: seed what the model needs so it doesn&#39;t hunt</li><li>Evidence shape: trim or reorder artifacts</li><li>Instructions and skills: tighten the procedure</li><li>Tool surface: remove or gate tools that invite wandering</li><li>Framework changes: only when the agent can&#39;t express the fix</li></ol><p><strong>Remeasure.</strong> Same fixtures. Diff tools, wall time, and quality side by side. Keep the change only if the target metric improves and the freeze line holds.</p><h2 id="how-do-i-lock-a-hillclimb-improvement-with-an-eval" tabindex="-1">How do I lock a hillclimb improvement with an eval? <a class="header-anchor" href="#how-do-i-lock-a-hillclimb-improvement-with-an-eval" aria-label="Permalink to &quot;How do I lock a hillclimb improvement with an eval?&quot;">​</a></h2><p>Every kept change needs an eval that would have failed before the change: a tool-choice gate, an <code>action.result</code> count bound, or an output-shape check. Run <code>agent-sdk eval --dir . --json</code> between rounds. Never weaken an existing gate to pass the round.</p><p>Details live in <a href="./evals.html">Evals</a>. The evals skill will author the case with you.</p><h2 id="what-habits-help-hillclimbing-stay-reliable" tabindex="-1">What habits help hillclimbing stay reliable? <a class="header-anchor" href="#what-habits-help-hillclimbing-stay-reliable" aria-label="Permalink to &quot;What habits help hillclimbing stay reliable?&quot;">​</a></h2><ul><li>One problem per round. Don&#39;t bundle &quot;trim evidence and rewrite instructions&quot; unless you chose that on purpose.</li><li>Keep fixtures fixed until you deliberately need a harder case.</li><li>Separate host work from model tools when you blame latency. Moving deterministic prep onto the host is often the biggest win. In one PR reviewer, host-prepared evidence cut turns from about 8 minutes to about 1 minute.</li><li>Spot-check quality on at least one fixture against a known-good answer. Efficiency-only climbs quietly drop findings.</li><li>Treat <code>turn.failed</code> with <code>&quot;turn interrupted&quot;</code> as expected when a follow-up or stop preempted the turn.</li><li>Don&#39;t deploy, post to real surfaces, or weaken evals as part of a climb.</li></ul><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./evals.html">Evals</a></li><li><a href="./building-with-agents.html">Building agents with agents</a></li><li><a href="./guides/github.html">GitHub guide</a></li><li><a href="./troubleshooting.html">Fix common agent problems</a></li></ul>`,31)])])}const p=t(o,[["render",n]]);export{m as __pageData,p as default};
@@ -1 +0,0 @@
1
- import{_ as t,c as i,o as a,ag as l}from"./chunks/framework.BCISBCiQ.js";const m=JSON.parse('{"title":"Hillclimbing","description":"Improve an agent one measured round at a time, with the hillclimb skill running the loop with you.","frontmatter":{"title":"Hillclimbing","description":"Improve an agent one measured round at a time, with the hillclimb skill running the loop with you."},"headers":[],"relativePath":"hillclimbing.md","filePath":"hillclimbing.md"}'),o={name:"hillclimbing.md"};function n(r,e,s,h,d,c){return a(),i("div",null,[...e[0]||(e[0]=[l("",31)])])}const p=t(o,[["render",n]]);export{m as __pageData,p as default};
@@ -1,5 +0,0 @@
1
- import{_ as t,c as a,o as s,ag as r}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Agent SDK documentation","description":"Build and run Cursor agents with tools, approvals, channels, and evals.","frontmatter":{"title":"Agent SDK documentation","description":"Build and run Cursor agents with tools, approvals, channels, and evals."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),i={name:"index.md"};function n(o,e,l,h,d,c){return s(),a("div",null,[...e[0]||(e[0]=[r(`<h1 id="agent-sdk-documentation" tabindex="-1">Agent SDK documentation <a class="header-anchor" href="#agent-sdk-documentation" aria-label="Permalink to &quot;Agent SDK documentation&quot;">​</a></h1><p>Use the Agent SDK to define Cursor agents in TypeScript and Markdown. See <a href="./reference/project-layout.html">Project layout</a> for the directory structure.</p><p>Use Node 22.13 or newer. Bun isn&#39;t supported.</p><p>Create a project:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @cursor/july</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> init</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./my-agent</span></span>
2
- <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> my-agent</span></span>
3
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span></code></pre></div><p>If <code>agent-sdk</code> isn&#39;t on <code>PATH</code>, use <code>npx @cursor/july &lt;command&gt;</code>.</p><p>Open the docs locally:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @cursor/july</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> docs</span></span></code></pre></div><h2 id="where-to-start" tabindex="-1">Where to start <a class="header-anchor" href="#where-to-start" aria-label="Permalink to &quot;Where to start&quot;">​</a></h2><table tabindex="0"><thead><tr><th>You are...</th><th>Start with</th></tr></thead><tbody><tr><td>New to the Agent SDK</td><td><a href="./quickstart.html">Quickstart</a> (PR reviewer), then <a href="./concepts.html">Concepts</a></td></tr><tr><td>Building a new agent with Cursor</td><td><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a></td></tr><tr><td>Turning a Cursor Automation into a project</td><td><a href="./guides/convert-automation.html">Convert a Cursor Automation</a></td></tr><tr><td>Wiring an agent to Slack</td><td><a href="./guides/slack.html">Slack guide</a></td></tr><tr><td>Starting from a packaged template</td><td><a href="./templates/demo.html">Demo</a>, <a href="./templates/grokbot-agents.html">Grok Bot agents</a>, <a href="./templates/code-wiki.html">Code wiki</a>, <a href="./templates/agents-md.html">Living AGENTS.md</a>, <a href="./templates/security-reviewer.html">Security reviewer</a>, <a href="./templates/security-help.html">Security help</a>, <a href="./templates/triage.html">Triage</a>, or <a href="./templates/agentic-owners.html">Agentic Owners</a></td></tr><tr><td>Wiring an agent to GitHub webhooks</td><td><a href="./guides/github.html">GitHub guide</a></td></tr><tr><td>Driving PRs from a cloud VM</td><td><a href="./templates/pr-autofixer.html">PR autofixer template</a></td></tr><tr><td>Handing coding work to Cursor cloud agents</td><td><a href="./guides/cloud-agents.html">Cursor cloud agents</a></td></tr><tr><td>Talking to your Grok Bot agents</td><td><a href="./guides/grokbot-agents.html">Cursor Grok Bot agents</a></td></tr><tr><td>Letting an agent change its own source</td><td><a href="./guides/improve.html">Self-improvement</a></td></tr><tr><td>Driving an agent from Linear (or another tracker)</td><td><a href="./guides/webhooks.html#example-linear-as-the-control-plane">Webhooks guide: Linear example</a></td></tr><tr><td>Making an existing agent measurably better</td><td><a href="./evals.html">Evals</a>, then <a href="./hillclimbing.html">Hillclimbing</a></td></tr><tr><td>Comparing variants on live traffic</td><td><a href="./ab.html">Live A/B metrics</a></td></tr><tr><td>Deploying with Cursor or on your own infrastructure</td><td><a href="./deployment.html">Deployment</a></td></tr><tr><td>Debugging something that misbehaves</td><td><a href="./troubleshooting.html">Fix common agent problems</a></td></tr></tbody></table><h2 id="documentation" tabindex="-1">Documentation <a class="header-anchor" href="#documentation" aria-label="Permalink to &quot;Documentation&quot;">​</a></h2><p><strong>Core</strong></p><ul><li><a href="./quickstart.html">Quickstart</a>: build a PR reviewer that classifies changes by complexity and handles GitHub webhook events.</li><li><a href="./scaffolding-agents.html">Scaffold an agent with Cursor</a>: use the bundled skill for a guided build.</li><li><a href="./guides/convert-automation.html">Convert a Cursor Automation</a>: export a dashboard Automation into an Agent SDK project.</li><li><a href="./concepts.html">Concepts</a>: agent discovery, sessions, channels, runtimes, and observability.</li></ul><p><strong>Templates</strong></p><ul><li><a href="./templates/demo.html">Record a walkthrough from a collected PR</a>: host collects the PR, the model records, then comments.</li><li><a href="./templates/grokbot-agents.html">Talk to your Grok Bot agents</a>: name the bots, then consult them from this agent&#39;s own conversation.</li><li><a href="./templates/code-wiki.html">Keep a code wiki current after merge</a>: update in-repo <code>wiki/</code> pages when a pull request merges.</li><li><a href="./templates/agents-md.html">Keep AGENTS.md current from last week&#39;s work</a>: pull rules out of merged PRs and Slack, then open a follow-up PR.</li><li><a href="./templates/security-reviewer.html">Security reviewer</a>: review pull requests for exploitable bugs and post one comment.</li><li><a href="./templates/security-help.html">Answer security questions in Slack</a>: answer from your skills, or take a first look at a pasted PR.</li><li><a href="./templates/triage.html">Triage Linear or Jira issues in place</a>: classify existing tickets and comment on them.</li><li><a href="./templates/agentic-owners.html">Review pull requests with owners policies</a>: request owners and approve changes allowed by repository policy.</li><li><a href="./templates/pr-autofixer.html">Fix pull requests on a Cursor cloud VM</a></li></ul><p><strong>Self-improving Agents</strong></p><ul><li><a href="./building-with-agents.html">Building agents with agents</a>: use a coding agent to scaffold, run, and iterate on your agent.</li><li><a href="./evals.html">Evals</a>: author <code>defineEval</code> cases, pick fixtures, and use evals as regression checks.</li><li><a href="./ab.html">Live A/B metrics</a>: assign sticky variants and compare cumulative metrics on live sessions.</li><li><a href="./storage.html">Storage</a>: point durable storage at a backend you own with <code>defineStorage</code>.</li><li><a href="./hillclimbing.html">Hillclimbing</a>: measure and improve an agent iteratively.</li></ul><p><strong>Guides</strong></p><ul><li><a href="./guides/webhooks.html">Webhooks and custom channels</a>: give the agent its own HTTP surface.</li><li><a href="./guides/github.html">GitHub</a>: trigger the agent from pull requests, CI, and comments.</li><li><a href="./guides/slack.html">Slack</a>: put the agent in Slack over Socket Mode.</li><li><a href="./guides/human-in-the-loop.html">Human-in-the-loop approvals</a>: park a tool call until a person signs off.</li><li><a href="./guides/mcp-oauth.html">Host MCP OAuth</a>: authorize <code>oauth: true</code> connections, store tokens locally, and persist them on hosted deployments (<code>--store</code>).</li><li><a href="./guides/agent-to-agent.html">Agent-to-agent</a>: every agent is an MCP server; agents can delegate to each other.</li><li><a href="./guides/cloud-agents.html">Cursor cloud agents</a>: let the agent launch and steer cloud agents through the <code>cursor-cloud-agents</code> extension.</li><li><a href="./guides/grokbot-agents.html">Cursor Grok Bot agents</a>: let the agent talk to Grok Bot agents through the <code>cursor-grokbot-agents</code> extension.</li><li><a href="./guides/improve.html">Self-improvement</a>: let the agent change its own source through a one-off cloud agent and a pull request with the <code>improve</code> extension.</li><li><a href="./guides/opentelemetry.html">OpenTelemetry</a>: push session, turn, and tool traces to an OTLP collector you run.</li></ul><p><strong>Operating</strong></p><ul><li><a href="./deployment.html">Deployment</a>: Cursor-managed hosting, self-hosting, auth, state, and operations.</li><li><a href="./troubleshooting.html">Fix common agent problems</a>: diagnose common failures by symptom.</li></ul><p><strong>Reference</strong></p><ul><li><a href="./reference/project-layout.html">Project layout</a>: the full folder structure.</li><li><a href="./reference/agent-config.html">Agent config</a> · <a href="./reference/instructions.html">Instructions</a> · <a href="./reference/tools.html">Tools</a> · <a href="./reference/prompt.html"><code>prompt</code></a> · <a href="./reference/skills.html">Skills</a> · <a href="./reference/connections.html">MCP connections</a> · <a href="./reference/subagents.html">Subagents</a> · <a href="./reference/extensions.html">Extensions</a></li><li><a href="./reference/channels.html">Channels</a> · <a href="./reference/schedules.html">Schedules and reminders</a> · <a href="./reference/hooks.html">Hooks</a> · <a href="./reference/artifacts.html">Artifacts</a> · <a href="./reference/result.html">Turn result</a> · <a href="./reference/sessions.html">Sessions and streaming</a> · <a href="./reference/playground.html">Playground</a></li><li><a href="./reference/cli.html">CLI</a> · <a href="./reference/http-api.html">HTTP API</a></li></ul><h2 id="run-the-cli" tabindex="-1">Run the CLI <a class="header-anchor" href="#run-the-cli" aria-label="Permalink to &quot;Run the CLI&quot;">​</a></h2><p>Docs use <code>agent-sdk &lt;command&gt;</code>. If it isn&#39;t on <code>PATH</code>, use <code>npx @cursor/july &lt;command&gt;</code>.</p><h2 id="credentials" tabindex="-1">Credentials <a class="header-anchor" href="#credentials" aria-label="Permalink to &quot;Credentials&quot;">​</a></h2><p>Sign in to Cursor or set <code>CURSOR_API_KEY</code>:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span></span>
4
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or: export CURSOR_API_KEY=key_...</span></span>
5
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> whoami</span></span></code></pre></div><p>Confirm <code>agent-sdk whoami</code> shows the expected account.</p><h2 id="related-documentation" tabindex="-1">Related documentation <a class="header-anchor" href="#related-documentation" aria-label="Permalink to &quot;Related documentation&quot;">​</a></h2><ul><li>Package reference: <a href="./../README.html"><code>README.md</code></a></li><li>Coding-agent workflows: <a href="./skills/"><code>skills/</code></a></li></ul>`,31)])])}const p=t(i,[["render",n]]);export{g as __pageData,p as default};
@@ -1 +0,0 @@
1
- import{_ as t,c as a,o as s,ag as r}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Agent SDK documentation","description":"Build and run Cursor agents with tools, approvals, channels, and evals.","frontmatter":{"title":"Agent SDK documentation","description":"Build and run Cursor agents with tools, approvals, channels, and evals."},"headers":[],"relativePath":"index.md","filePath":"README.md"}'),i={name:"index.md"};function n(o,e,l,h,d,c){return s(),a("div",null,[...e[0]||(e[0]=[r("",31)])])}const p=t(i,[["render",n]]);export{g as __pageData,p as default};
@@ -1 +0,0 @@
1
- import{_ as i,c as a,o as n,ag as h}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Build your first PR reviewer","description":"Create an agent that reviews pull requests by complexity, approves safe changes, and handles GitHub webhook events.","frontmatter":{"title":"Build your first PR reviewer","description":"Create an agent that reviews pull requests by complexity, approves safe changes, and handles GitHub webhook events."},"headers":[],"relativePath":"quickstart.md","filePath":"quickstart.md"}'),t={name:"quickstart.md"};function l(p,s,e,k,r,E){return n(),a("div",null,[...s[0]||(s[0]=[h("",52)])])}const o=i(t,[["render",l]]);export{g as __pageData,o as default};
@@ -1,19 +0,0 @@
1
- import{_ as t,c as s,o as a,ag as d}from"./chunks/framework.BCISBCiQ.js";const g=JSON.parse('{"title":"Project layout","description":"The folder structure under agent/ and the path-derived naming rule.","frontmatter":{"title":"Project layout","description":"The folder structure under agent/ and the path-derived naming rule."},"headers":[],"relativePath":"reference/project-layout.md","filePath":"reference/project-layout.md"}'),o={name:"reference/project-layout.md"};function n(r,e,i,c,l,h){return a(),s("div",null,[...e[0]||(e[0]=[d(`<h1 id="project-layout" tabindex="-1">Project layout <a class="header-anchor" href="#project-layout" aria-label="Permalink to &quot;Project layout&quot;">​</a></h1><p>The Agent SDK builds an agent by walking the filesystem under <code>agent/</code>. Each folder has a defined purpose. The path a file lands in determines how the Agent SDK loads it.</p><h2 id="folder-structure" tabindex="-1">Folder structure <a class="header-anchor" href="#folder-structure" aria-label="Permalink to &quot;Folder structure&quot;">​</a></h2><p>For the capabilities below, identity usually comes from the path. A/B experiments can override their file-derived name.</p><table tabindex="0"><thead><tr><th>Path</th><th>Resolves to</th></tr></thead><tbody><tr><td><code>agent/tools/approve_pr.ts</code></td><td>tool <code>approve_pr</code></td></tr><tr><td><code>agent/mcp-connections/linear.ts</code></td><td>MCP connection <code>linear</code> (model + host)</td></tr><tr><td><code>agent/host-connections/anytool.ts</code></td><td>Host MCP connection <code>anytool</code> (host + <code>mcp oauth</code> only)</td></tr><tr><td><code>agent/skills/pr-review.md</code></td><td>skill <code>pr-review</code></td></tr><tr><td><code>agent/subagents/reviewer/</code></td><td>subagent <code>reviewer</code></td></tr><tr><td><code>agent/extensions/ci.ts</code></td><td>extension mount <code>ci</code>; its contributions become <code>ci__&lt;name&gt;</code></td></tr><tr><td><code>agent/extensions/notion.ts</code></td><td>Cursor plugin mount <code>notion</code> (<code>cursorPlugin</code>); its skills, agents, and MCP servers become <code>notion__&lt;name&gt;</code></td></tr><tr><td><code>agent/channels/drive.ts</code></td><td>channel <code>drive</code>, routes under <code>/v1/channels/drive</code></td></tr><tr><td><code>agent/ab.ts</code></td><td>A/B experiment <code>ab</code> unless <code>name</code> overrides it</td></tr><tr><td><code>agent/ab/concise.ts</code></td><td>A/B experiment <code>concise</code> unless <code>name</code> overrides it</td></tr></tbody></table><p>The root agent takes its name from <code>package.json</code> <code>name</code>, falling back to the directory name. When serving multiple agents, the slug is the directory name and must match <code>[A-Za-z0-9][A-Za-z0-9_-]*</code> (and not the reserved <code>v1</code>, <code>playground</code>, or <code>docs</code> segments).</p><h2 id="project-overview" tabindex="-1">Project overview <a class="header-anchor" href="#project-overview" aria-label="Permalink to &quot;Project overview&quot;">​</a></h2><p>Most projects start with this shape.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>my-agent/</span></span>
2
- <span class="line"><span>├── package.json</span></span>
3
- <span class="line"><span>├── agent/</span></span>
4
- <span class="line"><span>│ ├── agent.ts # runtime config (model, runtime, cloud/local)</span></span>
5
- <span class="line"><span>│ ├── instructions.md # always-on system prompt (required)</span></span>
6
- <span class="line"><span>│ ├── tools/</span></span>
7
- <span class="line"><span>│ │ └── approve_pr.ts # one typed tool per file</span></span>
8
- <span class="line"><span>│ ├── skills/</span></span>
9
- <span class="line"><span>│ │ └── pr-review.md # on-demand procedures (SKILL.md convention)</span></span>
10
- <span class="line"><span>│ ├── mcp-connections/</span></span>
11
- <span class="line"><span>│ │ └── linear.ts # tools from external MCP servers</span></span>
12
- <span class="line"><span>│ ├── host-connections/</span></span>
13
- <span class="line"><span>│ │ └── anytool.ts # privileged MCP, host tools only</span></span>
14
- <span class="line"><span>│ └── channels/</span></span>
15
- <span class="line"><span>│ └── github.ts # messages and external events</span></span>
16
- <span class="line"><span>└── evals/</span></span>
17
- <span class="line"><span> └── readiness.eval.ts # regression cases</span></span></code></pre></div><p>Evals live in <code>evals/</code> at the project root, a sibling of <code>agent/</code>, never inside it. <code>agent/evals/</code> is silently ignored. See <a href="./../evals.html">Evals</a>.</p><h2 id="folder-reference" tabindex="-1">Folder reference <a class="header-anchor" href="#folder-reference" aria-label="Permalink to &quot;Folder reference&quot;">​</a></h2><p>Each path maps to a capability and a reference page.</p><table tabindex="0"><thead><tr><th>Path</th><th>What it is</th><th>Reference</th></tr></thead><tbody><tr><td><code>agent/agent.ts</code></td><td><code>defineAgent({ model?, runtime?, cloud?, local? })</code>; the model defaults to <code>grok-4.5</code> with <code>effort=high</code>, <code>fast=true</code></td><td><a href="./agent-config.html">Agent config</a></td></tr><tr><td><code>agent/instructions.md</code></td><td>Always-on system prompt, required on the root agent (<code>.ts</code> and directory forms exist)</td><td><a href="./instructions.html">Instructions</a></td></tr><tr><td><code>agent/tools/&lt;name&gt;.ts</code></td><td>One typed tool; filename = tool name. <code>execution: &quot;server&quot;</code> (in-process, default) or <code>&quot;agent&quot;</code> (a script that runs where the agent runs)</td><td><a href="./tools.html">Tools</a></td></tr><tr><td><code>agent/skills/*</code></td><td>SKILL.md-convention procedures, loaded on demand</td><td><a href="./skills.html">Skills</a></td></tr><tr><td><code>agent/mcp-connections/&lt;name&gt;.ts</code></td><td>MCP servers, available to the model, to server tools (<code>ctx.host.mcp</code>), and to channel/schedule handlers (<code>args.host.mcp</code>)</td><td><a href="./connections.html">MCP connections</a></td></tr><tr><td><code>agent/host-connections/&lt;name&gt;.ts</code></td><td>Privileged MCP servers for <code>ctx.host.mcp</code> and <code>mcp oauth</code>. The model never sees them.</td><td><a href="./connections.html">MCP connections</a></td></tr><tr><td><code>agent/subagents/&lt;id&gt;/</code></td><td>Child agent directory; <code>description</code> required</td><td><a href="./subagents.html">Subagents</a></td></tr><tr><td><code>agent/extensions/&lt;ns&gt;.ts</code> or <code>agent/extensions/&lt;ns&gt;/</code></td><td>A mounted extension or Cursor plugin; its contributions become <code>&lt;ns&gt;__&lt;name&gt;</code></td><td><a href="./extensions.html">Extensions</a></td></tr><tr><td><code>agent/channels/*.ts</code></td><td>HTTP surfaces beyond the built-in session API; <code>slack.ts</code> and <code>github.ts</code> use the platform packs</td><td><a href="./channels.html">Channels</a></td></tr><tr><td><code>agent/hooks/*.ts</code></td><td>Observe-only event subscribers, never fatal</td><td><a href="./hooks.html">Hooks</a></td></tr><tr><td><code>agent/otel.ts</code></td><td><code>defineOtel</code> OTLP export (traces, metrics, optional logs)</td><td><a href="./../guides/opentelemetry.html">OpenTelemetry</a></td></tr><tr><td><code>agent/ab.ts</code>, <code>agent/ab/*.ts</code></td><td><code>defineAB</code> experiments with sticky variants and live metrics</td><td><a href="./../ab.html">Live A/B metrics</a></td></tr><tr><td><code>agent/ab.config.ts</code></td><td><code>defineABConfig</code> shared A/B settings</td><td><a href="./../ab.html">Live A/B metrics</a></td></tr><tr><td><code>agent/storage.ts</code></td><td><code>defineStorage</code> backend for the durable <code>host.kv</code> / <code>host.files</code> APIs</td><td><a href="./../storage.html">Storage</a></td></tr><tr><td><code>agent/artifacts.ts</code></td><td><code>defineArtifacts</code> kinds, the <code>tag_artifact</code> opt-in, and retention</td><td><a href="./artifacts.html">Artifacts</a></td></tr><tr><td><code>agent/result.ts</code></td><td><code>defineResult</code> host <code>commit</code> on the final assistant text</td><td><a href="./result.html">Turn result</a></td></tr><tr><td><code>agent/schedules/*</code></td><td>Cron-driven runs (UTC, 5-field; never auto-fire under <code>--dev</code>)</td><td><a href="./schedules.html">Schedules</a></td></tr><tr><td><code>agent/sandbox/workspace/**</code></td><td>Seed files copied into each local session workspace</td><td><a href="./sessions.html#what-goes-into-a-local-session-workspace">Sessions</a></td></tr><tr><td><code>agent/playground/</code></td><td>Custom playground tool chips</td><td><a href="./playground.html">Playground</a></td></tr><tr><td><code>agent/lib/</code></td><td>Import-only shared code, never discovered</td><td>None</td></tr><tr><td><code>evals/evals.config.ts</code></td><td>Shared eval settings (e.g. <code>maxConcurrency</code>); required when evals exist</td><td><a href="./../evals.html">Evals</a></td></tr><tr><td><code>evals/**/*.eval.ts</code></td><td>Filesystem evals; case id = path under <code>evals/</code></td><td><a href="./../evals.html">Evals</a></td></tr></tbody></table><p><code>agent/lib/</code> is the only place for shared code. Everything else under <code>agent/</code> is discovery surface. A stray <code>.ts</code> file in one of these folders is treated as a definition.</p><h2 id="why-didn-t-the-agent-sdk-discover-my-file" tabindex="-1">Why didn&#39;t the Agent SDK discover my file? <a class="header-anchor" href="#why-didn-t-the-agent-sdk-discover-my-file" aria-label="Permalink to &quot;Why didn&#39;t the Agent SDK discover my file?&quot;">​</a></h2><p>Run <code>agent-sdk validate --dir .</code> and <code>agent-sdk info --dir .</code>. <code>validate</code> prints diagnostics, and <code>serve</code> refuses to start on error-severity ones. Warnings, such as cloud runtime combined with local-only capabilities, print but don&#39;t block. <code>info</code> lists the discovered surface, so a missing tool or channel shows up immediately. From there, check the folder reference: the file is usually in the wrong directory or has the wrong extension.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> validate</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # diagnostics; non-zero exit on errors</span></span>
18
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> info</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # human-readable surface</span></span>
19
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> info</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --json</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # machine-readable project info (same shape as GET /v1/info)</span></span></code></pre></div><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./agent-config.html">Agent config</a>: the runtime config at the root</li><li><a href="./tools.html">Tools</a>: add typed actions under <code>agent/tools/</code></li><li><a href="./../ab.html">Live A/B metrics</a>: compare variants from <code>agent/ab.ts</code> or <code>agent/ab/</code></li><li><a href="./../concepts.html">Concepts</a>: why the filesystem is the interface</li></ul>`,20)])])}const u=t(o,[["render",n]]);export{g as __pageData,u as default};
@@ -1,19 +0,0 @@
1
- import{_ as t,c as i,o as e,ag as a}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Turn result","description":"Run host code on the final assistant text when a turn finishes. Throw to fail the turn.","frontmatter":{"title":"Turn result","description":"Run host code on the final assistant text when a turn finishes. Throw to fail the turn."},"headers":[],"relativePath":"reference/result.md","filePath":"reference/result.md"}'),n={name:"reference/result.md"};function h(l,s,r,o,d,p){return e(),i("div",null,[...s[0]||(s[0]=[a(`<h1 id="turn-result" tabindex="-1">Turn result <a class="header-anchor" href="#turn-result" aria-label="Permalink to &quot;Turn result&quot;">​</a></h1><p>Judgment agents need a place to act on the model&#39;s last message: parse it, then page, comment, or close a ticket. Author <code>agent/result.ts</code> with <code>defineResult</code> from <code>@cursor/july/result</code>. When that file exists, every finished turn runs <code>commit</code> on the serving host with the full assistant text.</p><p>A thrown <code>commit</code> fails the turn. Empty assistant text fails it too. Hooks still observe only; they cannot fail a valid turn.</p><p>Use this for an end-of-turn actuation. Mid-turn actions belong in <a href="./tools.html">tools</a>. Durable records that outlive a session belong in <a href="./artifacts.html">artifacts</a>.</p><h2 id="author-agent-result-ts" tabindex="-1">Author <code>agent/result.ts</code> <a class="header-anchor" href="#author-agent-result-ts" aria-label="Permalink to &quot;Author \`agent/result.ts\`&quot;">​</a></h2><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineResult } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/result&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { applyDecision, parseDecision } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;./lib/actuate.js&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
- <span class="line"></span>
4
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineResult</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
5
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> commit</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
6
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (ctx.session.purpose </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;eval&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
7
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
8
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
9
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> applyDecision</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">parseDecision</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx.text), ctx.host);</span></span>
10
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
11
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>commit</code> is required. Parse <code>ctx.text</code> however the agent needs. Tell the model the document shape in <code>instructions.md</code>. The Agent SDK does not inject a schema.</p><p>Put <code>result.ts</code> on the root agent only. A copy under a subagent is ignored with a warning.</p><h2 id="commit-on-the-host" tabindex="-1">Commit on the host <a class="header-anchor" href="#commit-on-the-host" aria-label="Permalink to &quot;Commit on the host&quot;">​</a></h2><p><code>commit</code> runs in the serving process after the model finishes, before the turn completes. <code>ctx</code> is the same host surface a server tool gets, plus the turn text:</p><table tabindex="0"><thead><tr><th>Member</th><th>What it is</th></tr></thead><tbody><tr><td><code>ctx.session</code></td><td>The session that produced this turn, including <code>purpose</code></td></tr><tr><td><code>ctx.host</code></td><td>Shared host services (<code>kv</code>, <code>files</code>, <code>mcp</code>)</td></tr><tr><td><code>ctx.artifacts</code></td><td>Session-bound <a href="./artifacts.html">artifacts</a> facade</td></tr><tr><td><code>ctx.stateRoot</code></td><td>The agent&#39;s durable state root</td></tr><tr><td><code>ctx.workspaceDir</code></td><td>The session workspace</td></tr><tr><td><code>ctx.text</code></td><td>The full assistant string</td></tr></tbody></table><p>A dry-run session skips <code>commit</code> and still completes. Eval sessions do run <code>commit</code>; return early when <code>ctx.session.purpose === &quot;eval&quot;</code> if the handler must not actuate.</p><p>On cloud runtime, the model still runs on the VM. <code>commit</code> runs on the serving host after the turn returns.</p><p><code>GET /v1/info</code> reports <code>result: true</code> when the file is authored.</p><h2 id="assert-in-evals" tabindex="-1">Assert in evals <a class="header-anchor" href="#assert-in-evals" aria-label="Permalink to &quot;Assert in evals&quot;">​</a></h2><p><code>t.succeeded()</code> fails when <code>commit</code> throws or the turn produced no text, because those are turn failures. Read the document on <code>t.reply</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/evals&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
12
- <span class="line"></span>
13
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
14
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> async</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> test</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">t</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
15
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">send</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Triage LIN-1842. It duplicates LIN-1801.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
16
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">succeeded</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span>
17
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> t.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(t.reply, </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">includes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;duplicate&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">));</span></span>
18
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
19
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="what-s-next" tabindex="-1">What&#39;s next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to &quot;What&#39;s next&quot;">​</a></h2><p>Continue with these pages:</p><ul><li><a href="./../evals.html">Evals</a>: <code>t.succeeded</code> and <code>t.reply</code></li><li><a href="./sessions.html">Sessions and streaming</a>: <code>turn.completed</code> and <code>turn.failed</code></li><li><a href="./hooks.html">Hooks</a>: observe the stream after the turn has already settled</li><li><a href="./project-layout.html">Project layout</a>: where <code>agent/result.ts</code> lives</li></ul>`,20)])])}const u=t(n,[["render",h]]);export{k as __pageData,u as default};
@@ -1 +0,0 @@
1
- import{_ as t,c as i,o as e,ag as a}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Turn result","description":"Run host code on the final assistant text when a turn finishes. Throw to fail the turn.","frontmatter":{"title":"Turn result","description":"Run host code on the final assistant text when a turn finishes. Throw to fail the turn."},"headers":[],"relativePath":"reference/result.md","filePath":"reference/result.md"}'),n={name:"reference/result.md"};function h(l,s,r,o,d,p){return e(),i("div",null,[...s[0]||(s[0]=[a("",20)])])}const u=t(n,[["render",h]]);export{k as __pageData,u as default};
@@ -1 +0,0 @@
1
- import{_ as t,c as s,o as a,ag as o}from"./chunks/framework.BCISBCiQ.js";const u=JSON.parse('{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives.","frontmatter":{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives."},"headers":[],"relativePath":"reference/sessions.md","filePath":"reference/sessions.md"}'),n={name:"reference/sessions.md"};function d(i,e,r,c,l,h){return a(),s("div",null,[...e[0]||(e[0]=[o('<h1 id="sessions-events-and-streaming" tabindex="-1">Sessions, events, and streaming <a class="header-anchor" href="#sessions-events-and-streaming" aria-label="Permalink to &quot;Sessions, events, and streaming&quot;">​</a></h1><p>A session keeps one conversation, its workspace, and an append-only record of every message and tool call.</p><h2 id="what-does-a-session-contain" tabindex="-1">What does a session contain? <a class="header-anchor" href="#what-does-a-session-contain" aria-label="Permalink to &quot;What does a session contain?&quot;">​</a></h2><p>Each session combines:</p><ul><li>A channel and authenticated caller</li><li>A conversation the caller can continue</li><li>A workspace for local turns</li><li>An NDJSON event stream</li><li>Runtime state needed to resume after a server restart</li></ul><p>Sessions belong to the principal that created them. Follow-up, stream, and list routes return <code>403</code> when another caller tries to access one.</p><h2 id="which-session-identifier-should-i-use" tabindex="-1">Which session identifier should I use? <a class="header-anchor" href="#which-session-identifier-should-i-use" aria-label="Permalink to &quot;Which session identifier should I use?&quot;">​</a></h2><p>Sessions have two identifiers because conversation routing and inspection are different jobs.</p><table tabindex="0"><thead><tr><th>Identifier</th><th>Use it for</th></tr></thead><tbody><tr><td><code>continuationToken</code></td><td>Continue a conversation through its channel</td></tr><tr><td><code>sessionId</code></td><td>Stream events, inspect state, resolve approvals, or run a session-bound tool call</td></tr></tbody></table><p>Channels decide what a continuation token looks like. Slack uses its thread identity. A PR channel can use a key such as <code>pr:owner/repo#1</code>. The built-in HTTP API returns an opaque token and rotates it after each accepted follow-up. Reusing a stale HTTP token returns <code>409</code>.</p><p>Use the continuation token to keep talking. Use the session ID to observe or manage the stored session.</p><h2 id="which-session-modes-are-available" tabindex="-1">Which session modes are available? <a class="header-anchor" href="#which-session-modes-are-available" aria-label="Permalink to &quot;Which session modes are available?&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Mode</th><th>Created by</th><th>What happens after a turn</th></tr></thead><tbody><tr><td><code>chat</code></td><td>HTTP sessions, channel <code>send</code>, Slack, or MCP <code>ask</code></td><td>Waits in <code>session.waiting</code> and accepts follow-ups</td></tr><tr><td><code>task</code></td><td>Markdown schedules and fire-and-forget dispatch</td><td>Ends in <code>session.completed</code> or <code>session.failed</code></td></tr></tbody></table><p>Task sessions don&#39;t accept follow-ups. Trying one returns <code>409</code>.</p><h2 id="what-happens-when-i-send-a-follow-up" tabindex="-1">What happens when I send a follow-up? <a class="header-anchor" href="#what-happens-when-i-send-a-follow-up" aria-label="Permalink to &quot;What happens when I send a follow-up?&quot;">​</a></h2><p>A follow-up to an idle chat session starts another turn. Admission when the session is already busy depends on the channel:</p><table tabindex="0"><thead><tr><th>Path</th><th>Busy-session policy</th></tr></thead><tbody><tr><td>HTTP playground / <code>POST /v1/session/:id</code> / MCP <code>ask</code></td><td><strong>Preempt</strong> (default): interrupt the in-flight turn, wait for it to settle, then run the new message</td></tr><tr><td>Slack mentions / DMs / alert-watch</td><td><strong>Coalesce</strong>: leave the active turn running, enqueue the follow-up, and drain queued asks into one follow-up turn when the active turn finishes (no mid-turn tool/hook inject)</td></tr></tbody></table><p>Pass <code>admission: &quot;coalesce&quot;</code> on <code>send()</code> to opt into the Slack policy from other callers. Omit it (or pass <code>&quot;preempt&quot;</code>) to keep interrupt semantics.</p><p><code>POST /v1/session/:id/stop</code> interrupts a turn without sending a new message. Interrupted turns record <code>turn.failed</code> with <code>&quot;turn interrupted&quot;</code>. This means the turn was preempted. A whole-message Slack <code>stop</code> / <code>@agent stop</code> does the same for that thread and clears pending coalesced nudges.</p><p>Session-bound deterministic tool calls share the lock only for writes: a write-effect call returns <code>409 session_busy</code> while a model turn is running, a read-effect call runs alongside the turn (see <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a>).</p><h2 id="which-events-can-i-stream" tabindex="-1">Which events can I stream? <a class="header-anchor" href="#which-events-can-i-stream" aria-label="Permalink to &quot;Which events can I stream?&quot;">​</a></h2><p>Each NDJSON line uses this envelope: <code>{ type, index, sessionId, turnId?, at, data }</code>. The <code>index</code> increases within one session. The <code>at</code> field is an ISO-8601 timestamp.</p><table tabindex="0"><thead><tr><th>Phase</th><th>Events</th><th>What they tell you</th></tr></thead><tbody><tr><td>Session</td><td><code>session.started</code>, <a href="./../ab.html#assign-sticky-variants"><code>ab.assigned</code></a>, <code>session.waiting</code>, <code>session.completed</code>, <code>session.failed</code></td><td>Session creation, A/B enrollment, readiness, and task completion</td></tr><tr><td>Agent</td><td><code>agent.bound</code></td><td>Cloud conversation URL</td></tr><tr><td>Input</td><td><code>message.received</code></td><td>A user message was accepted</td></tr><tr><td>Turn</td><td><code>turn.queued</code>, <code>turn.started</code>, <code>turn.completed</code>, <code>turn.failed</code></td><td>Queue position under a <a href="./agent-config.html#concurrency"><code>maxRunningTurns</code> cap</a>, then turn status, final result, and token usage</td></tr><tr><td>Steps</td><td><code>step.started</code>, <code>step.completed</code></td><td>Model step boundaries and duration</td></tr><tr><td>Reasoning</td><td><code>reasoning.appended</code>, <code>reasoning.completed</code></td><td>Streamed reasoning blocks</td></tr><tr><td>Reply</td><td><code>message.appended</code>, <code>message.completed</code></td><td>Text deltas and finalized assistant messages</td></tr><tr><td>Tools</td><td><code>actions.requested</code>, <code>action.result</code></td><td>Tool names, validated arguments, outputs, and errors</td></tr><tr><td>Approvals</td><td><code>action.approval_requested</code>, <code>action.approval_resolved</code></td><td>A parked tool call and the human decision</td></tr><tr><td>Subagents</td><td><code>subagent.called</code>, <code>subagent.completed</code></td><td>Delegated work</td></tr><tr><td>Artifacts</td><td><code>artifact.tagged</code></td><td>A durable <a href="./artifacts.html">artifact</a> was tagged for this session, by host code or <code>tag_artifact</code></td></tr></tbody></table><p>Pair <code>actions.requested</code> with <code>action.result</code> to reconstruct the tool trajectory. Read <code>turn.completed.data.usage</code> for input, output, and cache token counts. When <code>agent/result.ts</code> is authored, a thrown <code>commit</code> or empty assistant text emits <code>turn.failed</code> instead of <code>turn.completed</code>. See <a href="./result.html">Turn result</a>.</p><h2 id="how-do-i-stream-or-replay-session-events" tabindex="-1">How do I stream or replay session events? <a class="header-anchor" href="#how-do-i-stream-or-replay-session-events" aria-label="Permalink to &quot;How do I stream or replay session events?&quot;">​</a></h2><p>One endpoint handles both live streaming and replay:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -N</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;http://127.0.0.1:3000/&lt;slug&gt;/v1/session/ses_…/stream?startIndex=0&#39;</span></span></code></pre></div><p>Pass <code>startIndex</code> to continue after the last event you received. Omit it or pass <code>0</code> to replay the full session before following new events. <code>GET /v1/session/:id/events</code> returns a one-time dump without staying connected.</p><p>Event streams replay from disk after a server restart. Conversation state resumes from the Cursor SDK store.</p><h2 id="what-goes-into-a-local-session-workspace" tabindex="-1">What goes into a local session workspace? <a class="header-anchor" href="#what-goes-into-a-local-session-workspace" aria-label="Permalink to &quot;What goes into a local session workspace?&quot;">​</a></h2><p>The Agent SDK creates a workspace before the first local turn:</p><table tabindex="0"><thead><tr><th>Source path</th><th>Lands as</th></tr></thead><tbody><tr><td><code>instructions.*</code></td><td><code>AGENTS.md</code></td></tr><tr><td><code>skills/*</code></td><td><code>.cursor/skills/&lt;name&gt;/SKILL.md</code></td></tr><tr><td>agent tools (<code>execution: &quot;agent&quot;</code>)</td><td>scripts in the session workspace, with a catalog in <code>AGENTS.md</code></td></tr><tr><td><code>sandbox/workspace/**</code></td><td>copied in as seed files</td></tr><tr><td>per-send <code>workspaceFiles</code></td><td>written before the turn</td></tr></tbody></table><p>The local harness uses this workspace as its working directory. Parent directories can contribute <code>AGENTS.md</code> and <code>.cursor</code> settings. Set <code>local.cwd</code> when you need a clean parent directory. A channel can also provide a different working directory for one session, such as a PR worktree.</p><p>See <a href="./agent-config.html#local-cwd">Agent config: local cwd</a> for the inheritance rules.</p><h2 id="where-does-the-agent-sdk-store-session-data" tabindex="-1">Where does the Agent SDK store session data? <a class="header-anchor" href="#where-does-the-agent-sdk-store-session-data" aria-label="Permalink to &quot;Where does the Agent SDK store session data?&quot;">​</a></h2><p>Local state lives under <code>--state-root</code>. Slugged mounts store it under a subdirectory named for the slug.</p><p>Deleting a session directory removes the session from the server: it disappears from listings and can no longer be streamed or continued. Cloud conversations remain on the Cursor backend.</p><p>Nested git checkouts already default <code>local.cwd</code> outside the enclosing repo. See <a href="./../concepts.html#what-files-can-a-local-session-access">local session workspaces</a>.</p><h2 id="how-do-i-inspect-a-saved-event-stream" tabindex="-1">How do I inspect a saved event stream? <a class="header-anchor" href="#how-do-i-inspect-a-saved-event-stream" aria-label="Permalink to &quot;How do I inspect a saved event stream?&quot;">​</a></h2><p>Use <code>trajectory</code> with a saved trace:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> trajectory</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --events</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">state-roo</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/traces/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">sessionI</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.ndjson</span></span></code></pre></div><p>The command prints tool calls, the reply, and token usage in the same JSON shape as <code>run</code>. Use <strong>Open trace</strong> in the playground for a visual view.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./http-api.html">HTTP API</a></li><li><a href="./hooks.html">Hooks</a></li><li><a href="./../ab.html">Live A/B metrics</a></li><li><a href="./../concepts.html">How the Agent SDK works</a></li></ul>',44)])])}const m=t(n,[["render",d]]);export{u as __pageData,m as default};
@@ -1 +0,0 @@
1
- import{_ as o,c as a,o as t,ag as l}from"./chunks/framework.BCISBCiQ.js";const f=JSON.parse('{"title":"Scaffold an agent with Cursor","description":"Use the bundled create-agent skill to plan, build, and verify a new agent.","frontmatter":{"title":"Scaffold an agent with Cursor","description":"Use the bundled create-agent skill to plan, build, and verify a new agent."},"headers":[],"relativePath":"scaffolding-agents.md","filePath":"scaffolding-agents.md"}'),s={name:"scaffolding-agents.md"};function i(r,e,n,d,c,h){return t(),a("div",null,[...e[0]||(e[0]=[l('<h1 id="scaffold-an-agent-with-cursor" tabindex="-1">Scaffold an agent with Cursor <a class="header-anchor" href="#scaffold-an-agent-with-cursor" aria-label="Permalink to &quot;Scaffold an agent with Cursor&quot;">​</a></h1><p>Turn an idea into a verified agent while Cursor guides you through each decision.</p><h2 id="what-does-the-create-agent-skill-do" tabindex="-1">What does the create-agent skill do? <a class="header-anchor" href="#what-does-the-create-agent-skill-do" aria-label="Permalink to &quot;What does the create-agent skill do?&quot;">​</a></h2><p>The bundled <a href="./skills/create-agent.html"><code>create-agent</code> skill</a> turns your goal into a small working project. Have Cursor read that file and follow it.</p><p>Where to find the file depends on how you got the package:</p><ul><li>Installing <code>@cursor/july</code> (<code>npm install</code>, <code>npx @cursor/july</code>, a version bump) copies every package skill into <code>~/.cursor/skills/agentsdk/</code> with <code>alwaysApply: true</code>, so Cursor injects the skill body into context instead of waiting for the model to pick it from the catalog. The <code>/</code> menu lists them as <code>/agentsdk-create-agent</code>, <code>/agentsdk-hillclimb</code>, and the rest. Re-installing overwrites those copies with the package version.</li><li>Installed <code>@cursor/july</code> as a dependency? The skill also ships inside the package at <code>node_modules/@cursor/july/skills/create-agent/SKILL.md</code>.</li><li>Working from this package&#39;s source? The skill is at <a href="./skills/create-agent.html"><code>skills/create-agent/SKILL.md</code></a>. Run <code>agent-sdk install-skills</code> if you want the same copies in <code>~/.cursor/skills/agentsdk/</code> (the package postinstall skips the source checkout).</li></ul><p>Cursor will:</p><ul><li>Ask only for choices missing from your prompt</li><li>Recommend defaults based on what you want to build</li><li>Show you the plan and file tree before writing files</li><li>Create the agent after you confirm the plan</li><li>Run structural checks, a real turn, and a smoke eval</li></ul><p>Use this skill for a new agent. Use <a href="./guides/convert-automation.html">convert-automation</a> when the starting point is a Cursor Automation in the dashboard. Use <a href="./hillclimbing.html"><code>hillclimb</code></a> (<code>skills/hillclimb/SKILL.md</code>) when an existing agent works but needs better results.</p><h2 id="how-do-i-start-a-guided-scaffold" tabindex="-1">How do I start a guided scaffold? <a class="header-anchor" href="#how-do-i-start-a-guided-scaffold" aria-label="Permalink to &quot;How do I start a guided scaffold?&quot;">​</a></h2><p>Describe the outcome and any constraints you already know:</p><blockquote><p>Build a local weather agent for the playground. Give it one tool for current conditions and add a smoke eval. Guide me through the remaining decisions.</p></blockquote><p>More detail means fewer questions. Include a channel, runtime, model, or required integration when those choices are fixed.</p><h2 id="which-choices-will-cursor-ask-me-to-make" tabindex="-1">Which choices will Cursor ask me to make? <a class="header-anchor" href="#which-choices-will-cursor-ask-me-to-make" aria-label="Permalink to &quot;Which choices will Cursor ask me to make?&quot;">​</a></h2><p>Cursor fills gaps in two short rounds:</p><ul><li><strong>Identity:</strong> purpose, project name, and location</li><li><strong>Runtime:</strong> local or cloud</li><li><strong>Model:</strong> the default model or another Cursor model</li><li><strong>Channels:</strong> playground and HTTP, Slack, GitHub, a webhook, or a schedule</li><li><strong>MCP connections:</strong> remote or local MCP servers</li><li><strong>Capabilities:</strong> tools, skills, subagents, hooks, seed files, approvals, and evals</li></ul><p>Questions adapt to your goal. A playground chat agent won&#39;t get cloud-repository questions. A local agent won&#39;t get cloud setup questions.</p><h2 id="what-happens-before-cursor-writes-files" tabindex="-1">What happens before Cursor writes files? <a class="header-anchor" href="#what-happens-before-cursor-writes-files" aria-label="Permalink to &quot;What happens before Cursor writes files?&quot;">​</a></h2><p>Cursor shows one plan with the choices it made and the folders it will create. Choose <strong>Scaffold it</strong> to continue or <strong>Adjust something</strong> to change the plan.</p><p>No files change before you approve this step.</p><h2 id="what-will-cursor-create" tabindex="-1">What will Cursor create? <a class="header-anchor" href="#what-will-cursor-create" aria-label="Permalink to &quot;What will Cursor create?&quot;">​</a></h2><p>A first version usually includes:</p><ul><li><code>AGENTS.md</code>, <code>.gitignore</code>, <code>package.json</code>, and <code>tsconfig.json</code></li><li><code>agent/agent.ts</code> for the model and runtime</li><li><code>agent/instructions.md</code> for the always-on prompt</li><li><code>agent/hooks/memory.ts</code> for memory guidance</li><li>One or two tools under <code>agent/tools/</code></li><li>Any channels or MCP connections you selected</li><li><code>evals/evals.config.ts</code> and one smoke eval</li></ul><p>Cursor keeps the first version small. Side-effecting server tools use <code>needsApproval</code>. Deterministic setup, such as fetching a pull request, stays in host code instead of model instructions.</p><p>See <a href="./reference/project-layout.html">Project layout</a> for every supported folder.</p><h2 id="how-does-cursor-verify-the-scaffold" tabindex="-1">How does Cursor verify the scaffold? <a class="header-anchor" href="#how-does-cursor-verify-the-scaffold" aria-label="Permalink to &quot;How does Cursor verify the scaffold?&quot;">​</a></h2><p>Cursor checks the project in this order:</p><ol><li>Run <code>agent-sdk validate</code> and fix every error</li><li>Inspect the discovered surface with <code>info --json</code></li><li>Call each server tool directly with validated sample input</li><li>Run one end-to-end model turn</li><li>Run the smoke eval</li><li>Run the project&#39;s TypeScript check</li></ol><p>Validation, discovery, direct server-tool calls, and server startup work without a Cursor credential. Model turns and evals need <code>CURSOR_API_KEY</code>, then <code>CURSOR_API_KEY_FILE</code> (hosted default <code>/run/cursor/secrets/CURSOR_API_KEY</code>), then <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, then a saved <code>agent-sdk login</code>.</p><h2 id="what-happens-after-the-first-agent-works" tabindex="-1">What happens after the first agent works? <a class="header-anchor" href="#what-happens-after-the-first-agent-works" aria-label="Permalink to &quot;What happens after the first agent works?&quot;">​</a></h2><p>Choose one to three fixed inputs, define what should improve, and name what must stay unchanged. Then have Cursor follow <a href="./skills/hillclimb.html"><code>skills/hillclimb/SKILL.md</code></a>.</p><p>The hillclimb skill measures a baseline, changes one lever, runs the same inputs again, and adds an eval for each improvement you keep.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to &quot;Related&quot;">​</a></h2><ul><li><a href="./quickstart.html">Build your first PR reviewer</a></li><li><a href="./guides/convert-automation.html">Convert a Cursor Automation</a></li><li><a href="./building-with-agents.html">Building agents with agents</a></li><li><a href="./evals.html">Evals</a></li><li><a href="./hillclimbing.html">Hillclimbing</a></li><li><a href="./reference/project-layout.html">Project layout</a></li></ul>',34)])])}const p=o(s,[["render",i]]);export{f as __pageData,p as default};
@@ -1 +0,0 @@
1
- import{_ as o,c as a,o as t,ag as l}from"./chunks/framework.BCISBCiQ.js";const f=JSON.parse('{"title":"Scaffold an agent with Cursor","description":"Use the bundled create-agent skill to plan, build, and verify a new agent.","frontmatter":{"title":"Scaffold an agent with Cursor","description":"Use the bundled create-agent skill to plan, build, and verify a new agent."},"headers":[],"relativePath":"scaffolding-agents.md","filePath":"scaffolding-agents.md"}'),s={name:"scaffolding-agents.md"};function i(r,e,n,d,c,h){return t(),a("div",null,[...e[0]||(e[0]=[l("",34)])])}const p=o(s,[["render",i]]);export{f as __pageData,p as default};
@@ -1,26 +0,0 @@
1
- import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.BCISBCiQ.js";const o=JSON.parse('{"title":"Agent SDK A/B metrics (defineAB)","description":"Author defineAB live A/B metrics under agent/ab. Sticky variants and onSample on live runs. Not a test runner. Use when comparing variants on traffic; use defineEval for regression gates.","frontmatter":{"name":"agentsdk-ab","description":"Author defineAB live A/B metrics under agent/ab. Sticky variants and onSample on live runs. Not a test runner. Use when comparing variants on traffic; use defineEval for regression gates."},"headers":[],"relativePath":"../skills/ab/SKILL.md","filePath":"../skills/ab/SKILL.md"}'),e={name:"../skills/ab/SKILL.md"};function l(p,s,h,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="agent-sdk-a-b-metrics-defineab" tabindex="-1">Agent SDK A/B metrics (<code>defineAB</code>) <a class="header-anchor" href="#agent-sdk-a-b-metrics-defineab" aria-label="Permalink to &quot;Agent SDK A/B metrics (\`defineAB\`)&quot;">​</a></h1><p>Live metrics plug-in. No <code>agent-sdk ab</code> CLI. No assertion API. Reference: <code>docs/ab.md</code>.</p><table tabindex="0"><thead><tr><th></th><th><code>defineEval</code></th><th><code>defineAB</code></th></tr></thead><tbody><tr><td>Job</td><td>Gates on frozen fixtures</td><td>Metrics on live runs</td></tr><tr><td>Location</td><td><code>evals/**/*.eval.ts</code></td><td><code>agent/ab.ts</code> or <code>agent/ab/&lt;name&gt;.ts</code></td></tr><tr><td>How it runs</td><td><code>agent-sdk eval</code></td><td>Under <code>serve</code> / <code>run</code></td></tr></tbody></table><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineAB, splitBySessionHash } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/ab&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
2
- <span class="line"></span>
3
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAB</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;concise-instructions&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
5
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> variants: {</span></span>
6
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> control: { label: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Baseline&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
7
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> treatment: {</span></span>
8
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> label: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Shorter&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
9
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> instructions: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Keep replies to one short paragraph.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
10
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
11
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
12
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> split: </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">splitBySessionHash</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ holdout: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
13
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> derive: {</span></span>
14
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> weatherCalls</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">event</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span></span>
15
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.type </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;action.result&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &amp;&amp;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> event.data.toolName </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;get_weather&quot;</span></span>
16
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span></span>
17
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> :</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
18
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
19
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onSample</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">sample</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
20
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(sample.variant, sample.metrics.toolCalls, sample.metrics.wallTimeMs);</span></span>
21
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
22
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">async </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">execute</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(input, ctx) {</span></span>
23
- <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (ctx.session.abs?.[</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;concise-instructions&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;treatment&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
24
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // treatment-specific behavior</span></span>
25
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
26
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>Enrollment is at session creation. Eval sessions skip it. Do not use <code>splitIf</code> to filter evals. Split helpers and <code>onSample</code> fields: <code>docs/ab.md</code>.</p><p>Pick a name, arm labels, a split, and a real <code>onSample</code> sink. Do not invent credentials.</p>`,7)])])}const c=i(e,[["render",l]]);export{o as __pageData,c as default};
@@ -1 +0,0 @@
1
- import{_ as i,c as a,o as n,ag as t}from"./chunks/framework.BCISBCiQ.js";const o=JSON.parse('{"title":"Agent SDK A/B metrics (defineAB)","description":"Author defineAB live A/B metrics under agent/ab. Sticky variants and onSample on live runs. Not a test runner. Use when comparing variants on traffic; use defineEval for regression gates.","frontmatter":{"name":"agentsdk-ab","description":"Author defineAB live A/B metrics under agent/ab. Sticky variants and onSample on live runs. Not a test runner. Use when comparing variants on traffic; use defineEval for regression gates."},"headers":[],"relativePath":"../skills/ab/SKILL.md","filePath":"../skills/ab/SKILL.md"}'),e={name:"../skills/ab/SKILL.md"};function l(p,s,h,k,d,r){return n(),a("div",null,[...s[0]||(s[0]=[t("",7)])])}const c=i(e,[["render",l]]);export{o as __pageData,c as default};