@cursor/july 0.1.109 → 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 (1076) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +0 -15
  3. package/dist/bin/agent-serve.js +81 -66
  4. package/dist/channels/bitbucket/api.js +8 -8
  5. package/dist/channels/bitbucket/binding.js +4 -4
  6. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  7. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  8. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/checks.js +1 -1
  10. package/dist/channels/bitbucket/cursor-account.js +1 -1
  11. package/dist/channels/bitbucket/events.js +1 -1
  12. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  13. package/dist/channels/checks.d.ts.map +1 -1
  14. package/dist/channels/checks.js +2 -2
  15. package/dist/channels/deployments/deployments-channel.js +1 -1
  16. package/dist/channels/github/cursor-account.js +3 -3
  17. package/dist/channels/github/defaults.d.ts.map +1 -1
  18. package/dist/channels/github/defaults.js +5 -3
  19. package/dist/channels/github/events.js +1 -1
  20. package/dist/channels/github/forward.js +8 -8
  21. package/dist/channels/github/github-channel.d.ts.map +1 -1
  22. package/dist/channels/github/github-channel.js +17 -13
  23. package/dist/channels/github/progress.d.ts.map +1 -1
  24. package/dist/channels/github/progress.js +7 -2
  25. package/dist/channels/github/state.d.ts +6 -0
  26. package/dist/channels/github/state.d.ts.map +1 -1
  27. package/dist/channels/github/types.d.ts +6 -0
  28. package/dist/channels/github/types.d.ts.map +1 -1
  29. package/dist/channels/gitlab/binding.js +4 -4
  30. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  31. package/dist/channels/gitlab/checks.js +1 -1
  32. package/dist/channels/gitlab/cursor-account.js +1 -1
  33. package/dist/channels/gitlab/events.js +1 -1
  34. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  35. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  36. package/dist/channels/gitlab/replay.js +2 -2
  37. package/dist/channels/origin/binding.d.ts +2 -0
  38. package/dist/channels/origin/binding.d.ts.map +1 -1
  39. package/dist/channels/origin/binding.js +3 -3
  40. package/dist/channels/origin/checks.d.ts +19 -7
  41. package/dist/channels/origin/checks.d.ts.map +1 -1
  42. package/dist/channels/origin/checks.js +13 -9
  43. package/dist/channels/origin/cursor-account.js +1 -1
  44. package/dist/channels/origin/defaults.d.ts.map +1 -1
  45. package/dist/channels/origin/defaults.js +3 -1
  46. package/dist/channels/origin/events.js +1 -1
  47. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  48. package/dist/channels/origin/origin-channel.js +2 -1
  49. package/dist/channels/origin/origin-webhook.js +2 -2
  50. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  51. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  52. package/dist/channels/slack/agentic-delivery.js +558 -0
  53. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  54. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  55. package/dist/channels/slack/agentic-posted.js +102 -0
  56. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  57. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  58. package/dist/channels/slack/agentic-signals.js +204 -0
  59. package/dist/channels/slack/api.d.ts +20 -1
  60. package/dist/channels/slack/api.d.ts.map +1 -1
  61. package/dist/channels/slack/api.js +43 -11
  62. package/dist/channels/slack/approvals.js +1 -1
  63. package/dist/channels/slack/auth.d.ts.map +1 -1
  64. package/dist/channels/slack/auth.js +3 -1
  65. package/dist/channels/slack/blocks.js +3 -3
  66. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  67. package/dist/channels/slack/bot-mentions.js +5 -5
  68. package/dist/channels/slack/channel-watch.js +1 -1
  69. package/dist/channels/slack/cli-project.js +3 -3
  70. package/dist/channels/slack/defaults.d.ts +3 -0
  71. package/dist/channels/slack/defaults.d.ts.map +1 -1
  72. package/dist/channels/slack/defaults.js +90 -29
  73. package/dist/channels/slack/dispatch.d.ts +34 -1
  74. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  75. package/dist/channels/slack/dispatch.js +219 -106
  76. package/dist/channels/slack/doctor.js +1 -1
  77. package/dist/channels/slack/eval-directive.js +1 -1
  78. package/dist/channels/slack/external-policy.d.ts +2 -1
  79. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  80. package/dist/channels/slack/external-policy.js +13 -2
  81. package/dist/channels/slack/footer.d.ts +30 -0
  82. package/dist/channels/slack/footer.d.ts.map +1 -0
  83. package/dist/channels/slack/footer.js +88 -0
  84. package/dist/channels/slack/index.d.ts +2 -0
  85. package/dist/channels/slack/index.d.ts.map +1 -1
  86. package/dist/channels/slack/index.js +2 -0
  87. package/dist/channels/slack/interactive.d.ts.map +1 -1
  88. package/dist/channels/slack/interactive.js +5 -3
  89. package/dist/channels/slack/live-delivery.d.ts +1 -1
  90. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  91. package/dist/channels/slack/live-delivery.js +20 -6
  92. package/dist/channels/slack/log.d.ts.map +1 -1
  93. package/dist/channels/slack/log.js +1 -1
  94. package/dist/channels/slack/manifest.js +1 -1
  95. package/dist/channels/slack/nudge-carrier.js +1 -1
  96. package/dist/channels/slack/nudge-store.js +2 -2
  97. package/dist/channels/slack/paint-start.d.ts +22 -0
  98. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  99. package/dist/channels/slack/paint-start.js +91 -0
  100. package/dist/channels/slack/placeholder.d.ts +36 -0
  101. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  102. package/dist/channels/slack/placeholder.js +240 -0
  103. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  104. package/dist/channels/slack/progress-delivery.js +13 -4
  105. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  106. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  107. package/dist/channels/slack/reasoning-chip.js +30 -0
  108. package/dist/channels/slack/recording-sink.d.ts +29 -0
  109. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  110. package/dist/channels/slack/recording-sink.js +142 -0
  111. package/dist/channels/slack/reply-options.d.ts +8 -1
  112. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  113. package/dist/channels/slack/reply-options.js +59 -14
  114. package/dist/channels/slack/setup.js +1 -1
  115. package/dist/channels/slack/slack-channel.d.ts +2 -2
  116. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  117. package/dist/channels/slack/slack-channel.js +55 -20
  118. package/dist/channels/slack/socket-mode.js +2 -2
  119. package/dist/channels/slack/thread-context.js +5 -5
  120. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  121. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  122. package/dist/channels/slack/tool-approval-events.js +50 -38
  123. package/dist/channels/slack/tool-cards.js +1 -1
  124. package/dist/channels/slack/tool-chip.d.ts +9 -0
  125. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  126. package/dist/channels/slack/tool-chip.js +25 -0
  127. package/dist/channels/slack/types.d.ts +49 -7
  128. package/dist/channels/slack/types.d.ts.map +1 -1
  129. package/dist/channels/slack/upload.d.ts +13 -0
  130. package/dist/channels/slack/upload.d.ts.map +1 -0
  131. package/dist/channels/slack/upload.js +135 -0
  132. package/dist/channels.d.ts +10 -14
  133. package/dist/channels.d.ts.map +1 -1
  134. package/dist/channels.js +9 -21
  135. package/dist/dashboard-session-url.d.ts +15 -0
  136. package/dist/dashboard-session-url.d.ts.map +1 -0
  137. package/dist/dashboard-session-url.js +25 -0
  138. package/dist/docs/404.html +3 -3
  139. package/dist/docs/architecture.svg +59 -0
  140. package/dist/docs/assets/app.Drol6mi6.js +309 -0
  141. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.js → building-with-agents.md.CEGVXkmO.js} +2 -2
  142. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.lean.js → building-with-agents.md.CEGVXkmO.lean.js} +1 -1
  143. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +1 -0
  144. package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CdqoBZJX.js} +2 -2
  145. package/dist/docs/assets/chunks/arc.BVX3ycTn.js +1 -0
  146. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CcChnMxX.js +36 -0
  147. package/dist/docs/assets/chunks/baseUniq.xwtXO-yt.js +1 -0
  148. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.CijZ_taK.js +132 -0
  149. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.0FBvwBvK.js +10 -0
  150. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +1 -0
  151. package/dist/docs/assets/chunks/chunk-4BX2VUAB.CELMmMDA.js +1 -0
  152. package/dist/docs/assets/chunks/chunk-4TB4RGXK.C4bhFtSm.js +206 -0
  153. package/dist/docs/assets/chunks/chunk-55IACEB6.ZnQ9gRRQ.js +1 -0
  154. package/dist/docs/assets/chunks/chunk-EDXVE4YY.DPlmglG-.js +1 -0
  155. package/dist/docs/assets/chunks/chunk-FMBD7UC4.BrUk8pff.js +15 -0
  156. package/dist/docs/assets/chunks/chunk-OYMX7WX6.CcmWIncu.js +231 -0
  157. package/dist/docs/assets/chunks/chunk-QZHKN3VN.D65-cs8I.js +1 -0
  158. package/dist/docs/assets/chunks/chunk-YZCP3GAM.qoXZpG9F.js +1 -0
  159. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +1 -0
  160. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +1 -0
  161. package/dist/docs/assets/chunks/clone.YSt_40_s.js +1 -0
  162. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.8rYtqudO.js +1 -0
  163. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  164. package/dist/docs/assets/chunks/dagre-KV5264BT.DrRP1fOh.js +4 -0
  165. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  166. package/dist/docs/assets/chunks/diagram-5BDNPKRD.DHj_xA2_.js +10 -0
  167. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.Bz_6nAKj.js +24 -0
  168. package/dist/docs/assets/chunks/diagram-MMDJMWI5.BWA0xSW9.js +43 -0
  169. package/dist/docs/assets/chunks/diagram-TYMM5635.CpTJLNJI.js +24 -0
  170. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.-7AWWSrP.js +85 -0
  171. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BTnQ742_.js +162 -0
  172. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +19 -0
  173. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.B5_HiiQ5.js +292 -0
  174. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CZcNTFZd.js +106 -0
  175. package/dist/docs/assets/chunks/graph.V2GLaab4.js +1 -0
  176. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.7pZOkCCU.js +2 -0
  177. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  178. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js +70 -0
  179. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.BNEgWN1S.js +139 -0
  180. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.B-4d4tC7.js +89 -0
  181. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  182. package/dist/docs/assets/chunks/layout.Dvbn9nSb.js +1 -0
  183. package/dist/docs/assets/chunks/linear.D2GM4p4b.js +1 -0
  184. package/dist/docs/assets/chunks/min.DVBtLK-B.js +1 -0
  185. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.CnJRI55x.js +96 -0
  186. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  187. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CtoaTFlA.js +30 -0
  188. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.DtT24_vN.js +7 -0
  189. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.CjSO4o8f.js +84 -0
  190. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.-wWiIVWa.js +10 -0
  191. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.DSk8s4gX.js +157 -0
  192. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.BFKAsdkN.js +1 -0
  193. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +1 -0
  194. package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.C0MctGaz.js} +2 -2
  195. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.TUNJbAFe.js +120 -0
  196. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.C-RGNnk4.js +34 -0
  197. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  198. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +162 -0
  199. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DH4zt73Y.js +20 -0
  200. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.B-3k6bF6.js +7 -0
  201. package/dist/docs/assets/{deployment.md.JenwuCCB.js → deployment.md.Dm4Qo3hp.js} +5 -5
  202. package/dist/docs/assets/{deployment.md.JenwuCCB.lean.js → deployment.md.Dm4Qo3hp.lean.js} +1 -1
  203. package/dist/docs/assets/{evals.md.C7JLjoEP.js → evals.md.BLDRt5LH.js} +4 -4
  204. package/dist/docs/assets/{evals.md.C7JLjoEP.lean.js → evals.md.BLDRt5LH.lean.js} +1 -1
  205. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +14 -0
  206. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +1 -0
  207. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.js → guides_bitbucket.md.CTpCl__f.js} +1 -1
  208. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.lean.js → guides_bitbucket.md.CTpCl__f.lean.js} +1 -1
  209. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.js → guides_cloud-agents.md.lSE_l7lH.js} +2 -2
  210. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.lean.js → guides_cloud-agents.md.lSE_l7lH.lean.js} +1 -1
  211. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.js → guides_convert-automation.md.Ck6Cr68A.js} +1 -1
  212. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.lean.js → guides_convert-automation.md.Ck6Cr68A.lean.js} +1 -1
  213. package/dist/docs/assets/{guides_github.md.TZaTZlfz.js → guides_github.md.D6ER29dG.js} +1 -1
  214. package/dist/docs/assets/{guides_github.md.TZaTZlfz.lean.js → guides_github.md.D6ER29dG.lean.js} +1 -1
  215. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.js → guides_gitlab.md.P-TjBnS5.js} +1 -1
  216. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.lean.js → guides_gitlab.md.P-TjBnS5.lean.js} +1 -1
  217. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +9 -0
  218. package/dist/docs/assets/{guides_grokbot-agents.md.DyV-WArv.lean.js → guides_grokbot-agents.md.WBZIOvkz.lean.js} +1 -1
  219. package/dist/docs/assets/{guides_improve.md.BGVk32bK.js → guides_improve.md.BKaDuKKK.js} +1 -1
  220. package/dist/docs/assets/{guides_improve.md.BGVk32bK.lean.js → guides_improve.md.BKaDuKKK.lean.js} +1 -1
  221. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.js → guides_mcp-oauth.md.DMNMpXtO.js} +1 -1
  222. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.lean.js → guides_mcp-oauth.md.DMNMpXtO.lean.js} +1 -1
  223. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.js → guides_opentelemetry.md._CRfDyzH.js} +14 -14
  224. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.lean.js → guides_opentelemetry.md._CRfDyzH.lean.js} +1 -1
  225. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.js → guides_slack.md.DdT8rmsj.js} +12 -4
  226. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.lean.js → guides_slack.md.DdT8rmsj.lean.js} +1 -1
  227. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.js → guides_webhooks.md.aQW10HRe.js} +2 -2
  228. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.lean.js → guides_webhooks.md.aQW10HRe.lean.js} +1 -1
  229. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +1 -0
  230. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +1 -0
  231. package/dist/docs/assets/index.md.BFVyY2KT.js +17 -0
  232. package/dist/docs/assets/index.md.BFVyY2KT.lean.js +1 -0
  233. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.D3MjSZN-.js} +30 -38
  234. package/dist/docs/assets/quickstart.md.D3MjSZN-.lean.js +1 -0
  235. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.CfVA-LZJ.js} +1 -1
  236. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.CfVA-LZJ.lean.js} +1 -1
  237. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Vf7qyIZ-.js} +1 -1
  238. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Vf7qyIZ-.lean.js} +1 -1
  239. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.icqLKcTc.js} +2 -12
  240. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.icqLKcTc.lean.js} +1 -1
  241. package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.B2dBL6L8.js} +3 -3
  242. package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.B2dBL6L8.lean.js} +1 -1
  243. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.Cb3U_c8n.js} +4 -4
  244. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.Cb3U_c8n.lean.js} +1 -1
  245. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.js → reference_extensions.md.wlFD3cUR.js} +2 -2
  246. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.lean.js → reference_extensions.md.wlFD3cUR.lean.js} +1 -1
  247. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.CZuynAxj.js} +3 -3
  248. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.CZuynAxj.lean.js} +1 -1
  249. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.DTKcYE6L.js} +3 -3
  250. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.DTKcYE6L.lean.js} +1 -1
  251. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.D7gkckK-.js} +1 -1
  252. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.D7gkckK-.lean.js} +1 -1
  253. package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.D2YExv5K.js} +1 -1
  254. package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.D2YExv5K.lean.js} +1 -1
  255. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.DPxbUJyt.js} +3 -3
  256. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.DPxbUJyt.lean.js} +1 -1
  257. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.BQ5uAv1F.js} +1 -1
  258. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.BQ5uAv1F.lean.js} +1 -1
  259. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.BasfZWO-.js} +1 -1
  260. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.BasfZWO-.lean.js} +1 -1
  261. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.YKvIsWAx.js} +1 -1
  262. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.YKvIsWAx.lean.js} +1 -1
  263. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.rNgpsGd0.js} +1 -1
  264. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.rNgpsGd0.lean.js} +1 -1
  265. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.e5qitjJt.js} +2 -2
  266. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.e5qitjJt.lean.js} +1 -1
  267. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BdCO2aHZ.js} +4 -4
  268. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BdCO2aHZ.lean.js} +1 -1
  269. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  270. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.Da_AGDlH.js} +1 -1
  271. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.Da_AGDlH.lean.js} +1 -1
  272. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.DqxocIGh.js} +1 -1
  273. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.DqxocIGh.lean.js} +1 -1
  274. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.Bhnvd8VE.js} +1 -1
  275. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.Bhnvd8VE.lean.js} +1 -1
  276. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.BdBWO9Ic.js} +1 -1
  277. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.BdBWO9Ic.lean.js} +1 -1
  278. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.js → troubleshooting.md.BcgNoYtJ.js} +1 -1
  279. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.lean.js → troubleshooting.md.BcgNoYtJ.lean.js} +1 -1
  280. package/dist/docs/building-with-agents.html +41 -8
  281. package/dist/docs/building-with-agents.md +13 -15
  282. package/dist/docs/deployment.html +44 -11
  283. package/dist/docs/deployment.md +6 -7
  284. package/dist/docs/evals.html +44 -11
  285. package/dist/docs/evals.md +5 -5
  286. package/dist/docs/guides/agent-to-agent.html +48 -11
  287. package/dist/docs/guides/agent-to-agent.md +40 -83
  288. package/dist/docs/guides/bitbucket.html +41 -8
  289. package/dist/docs/guides/cloud-agents.html +41 -8
  290. package/dist/docs/guides/cloud-agents.md +24 -20
  291. package/dist/docs/guides/convert-automation.html +41 -8
  292. package/dist/docs/guides/github.html +41 -8
  293. package/dist/docs/guides/github.md +1 -1
  294. package/dist/docs/guides/gitlab.html +41 -8
  295. package/dist/docs/guides/grokbot-agents.html +41 -8
  296. package/dist/docs/guides/grokbot-agents.md +26 -19
  297. package/dist/docs/guides/improve.html +41 -8
  298. package/dist/docs/guides/mcp-oauth.html +41 -8
  299. package/dist/docs/guides/mcp-oauth.md +1 -1
  300. package/dist/docs/guides/opentelemetry.html +53 -20
  301. package/dist/docs/guides/opentelemetry.md +28 -41
  302. package/dist/docs/guides/slack.html +51 -10
  303. package/dist/docs/guides/slack.md +53 -4
  304. package/dist/docs/guides/webhooks.html +42 -9
  305. package/dist/docs/guides/webhooks.md +3 -4
  306. package/dist/docs/hashmap.json +1 -1
  307. package/dist/docs/hillclimbing.html +40 -10
  308. package/dist/docs/hillclimbing.md +5 -5
  309. package/dist/docs/index.html +57 -12
  310. package/dist/docs/index.md +81 -150
  311. package/dist/docs/llms-full.txt +5779 -10297
  312. package/dist/docs/llms.txt +3 -29
  313. package/dist/docs/quickstart.html +70 -45
  314. package/dist/docs/quickstart.md +44 -105
  315. package/dist/docs/reference/agent-config.html +41 -8
  316. package/dist/docs/reference/artifacts.html +41 -8
  317. package/dist/docs/reference/channels.html +41 -18
  318. package/dist/docs/reference/channels.md +0 -16
  319. package/dist/docs/reference/cli.html +42 -9
  320. package/dist/docs/reference/cli.md +0 -16
  321. package/dist/docs/reference/connections.html +43 -10
  322. package/dist/docs/reference/connections.md +3 -5
  323. package/dist/docs/reference/extensions.html +42 -9
  324. package/dist/docs/reference/extensions.md +2 -2
  325. package/dist/docs/reference/hooks.html +42 -9
  326. package/dist/docs/reference/hooks.md +2 -4
  327. package/dist/docs/reference/http-api.html +42 -9
  328. package/dist/docs/reference/http-api.md +5 -5
  329. package/dist/docs/reference/instructions.html +41 -8
  330. package/dist/docs/reference/playground.html +40 -7
  331. package/dist/docs/reference/playground.md +2 -2
  332. package/dist/docs/reference/project-layout.html +42 -9
  333. package/dist/docs/reference/project-layout.md +3 -4
  334. package/dist/docs/reference/prompt.html +41 -8
  335. package/dist/docs/reference/schedules.html +41 -8
  336. package/dist/docs/reference/sessions.html +40 -7
  337. package/dist/docs/reference/sessions.md +5 -4
  338. package/dist/docs/reference/skills.html +41 -8
  339. package/dist/docs/reference/subagents.html +41 -8
  340. package/dist/docs/reference/subagents.md +2 -4
  341. package/dist/docs/reference/tools.html +43 -10
  342. package/dist/docs/reference/tools.md +2 -5
  343. package/dist/docs/templates/agentic-owners.html +41 -8
  344. package/dist/docs/templates/pr-autofixer.html +41 -8
  345. package/dist/docs/templates/security-reviewer.html +41 -8
  346. package/dist/docs/templates/triage.html +41 -8
  347. package/dist/docs/troubleshooting.html +40 -7
  348. package/dist/docs/troubleshooting.md +1 -2
  349. package/dist/evals/assertions.js +19 -19
  350. package/dist/evals/expect.js +1 -1
  351. package/dist/evals/judge.js +1 -1
  352. package/dist/evals/reporters.d.ts.map +1 -1
  353. package/dist/evals/reporters.js +8 -8
  354. package/dist/evals/run-facts.js +2 -2
  355. package/dist/evals.d.ts +1 -1
  356. package/dist/evals.d.ts.map +1 -1
  357. package/dist/evals.js +7 -7
  358. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  359. package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
  360. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  361. package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
  362. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  363. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  364. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  365. package/dist/extensions/improve/skills/yourself.js +1 -1
  366. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  367. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  368. package/dist/extensions/slack-communication/extension.js +32 -0
  369. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  370. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  371. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  372. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  373. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  374. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  375. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  376. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  377. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  378. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  379. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  380. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  381. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  382. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  383. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  384. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  385. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  386. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  387. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  388. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  389. package/dist/extensions/slack-communication/tools/react.js +27 -0
  390. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  391. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  392. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  393. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  394. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  395. package/dist/files-backends/cursor-hosted.js +357 -74
  396. package/dist/files-backends/local-fs.js +1 -1
  397. package/dist/files.d.ts +15 -0
  398. package/dist/files.d.ts.map +1 -1
  399. package/dist/filesystem.d.ts.map +1 -1
  400. package/dist/filesystem.js +15 -15
  401. package/dist/index.d.ts +5 -8
  402. package/dist/index.d.ts.map +1 -1
  403. package/dist/index.js +4 -6
  404. package/dist/internal/advertise-tools.js +6 -6
  405. package/dist/internal/approval-gate.js +1 -1
  406. package/dist/internal/artifacts-store.js +3 -3
  407. package/dist/internal/as-of.js +2 -2
  408. package/dist/internal/authored-alias-hooks.js +1 -1
  409. package/dist/internal/builtin-tools/reminders.js +2 -2
  410. package/dist/internal/chat-client.js +5 -5
  411. package/dist/internal/cli-ax.d.ts +1 -0
  412. package/dist/internal/cli-ax.d.ts.map +1 -1
  413. package/dist/internal/cli-ax.js +68 -13
  414. package/dist/internal/cli-bitbucket.js +10 -10
  415. package/dist/internal/cli-convert-automation.js +2 -2
  416. package/dist/internal/cli-cursor.d.ts +3 -11
  417. package/dist/internal/cli-cursor.d.ts.map +1 -1
  418. package/dist/internal/cli-cursor.js +5 -10
  419. package/dist/internal/cli-deploy.d.ts +12 -2
  420. package/dist/internal/cli-deploy.d.ts.map +1 -1
  421. package/dist/internal/cli-deploy.js +328 -96
  422. package/dist/internal/cli-docs.js +5 -5
  423. package/dist/internal/cli-github.js +15 -16
  424. package/dist/internal/cli-gitlab.js +10 -10
  425. package/dist/internal/cli-manifest.js +1 -1
  426. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  427. package/dist/internal/cli-mcp-oauth.js +5 -5
  428. package/dist/internal/cli-mcp.js +3 -3
  429. package/dist/internal/cli-skills.js +2 -2
  430. package/dist/internal/cli-slack.js +5 -5
  431. package/dist/internal/cloud-turn-cost.js +1 -1
  432. package/dist/internal/continuation-identity.d.ts.map +1 -1
  433. package/dist/internal/continuation-identity.js +14 -9
  434. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  435. package/dist/internal/conversation-mirror.js +33 -2
  436. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  437. package/dist/internal/convert-automation/types.d.ts +8 -0
  438. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  439. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  440. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  441. package/dist/internal/cursor/account-mcp.js +32 -27
  442. package/dist/internal/cursor/backend-client.d.ts +15 -10
  443. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  444. package/dist/internal/cursor/backend-client.js +17 -11
  445. package/dist/internal/cursor/credentials.js +1 -1
  446. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  447. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  448. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  449. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  450. package/dist/internal/cursor-deployment-relay.js +9 -9
  451. package/dist/internal/cursor-event-relay.js +10 -10
  452. package/dist/internal/cursor-relay-core.js +2 -2
  453. package/dist/internal/deploy-client.d.ts +106 -9
  454. package/dist/internal/deploy-client.d.ts.map +1 -1
  455. package/dist/internal/deploy-client.js +171 -23
  456. package/dist/internal/deploy-manifest.d.ts +13 -0
  457. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  458. package/dist/internal/deploy-manifest.js +32 -16
  459. package/dist/internal/discovery/agent-config.d.ts +5 -0
  460. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  461. package/dist/internal/discovery/agent-config.js +27 -0
  462. package/dist/internal/discovery/agent.d.ts.map +1 -1
  463. package/dist/internal/discovery/agent.js +10 -8
  464. package/dist/internal/discovery/channels.js +4 -4
  465. package/dist/internal/discovery/connections.js +4 -4
  466. package/dist/internal/discovery/cursor-plugin.js +12 -12
  467. package/dist/internal/discovery/extension-overlay.js +3 -3
  468. package/dist/internal/discovery/extensions.js +6 -6
  469. package/dist/internal/discovery/info.js +9 -9
  470. package/dist/internal/discovery/instructions.js +1 -1
  471. package/dist/internal/discovery/project.d.ts.map +1 -1
  472. package/dist/internal/discovery/project.js +4 -4
  473. package/dist/internal/discovery/services.js +1 -1
  474. package/dist/internal/discovery/tools.js +1 -1
  475. package/dist/internal/docs-site.js +2 -2
  476. package/dist/internal/env-file.js +1 -1
  477. package/dist/internal/eval-run-store.d.ts.map +1 -1
  478. package/dist/internal/eval-run-store.js +7 -7
  479. package/dist/internal/eval-runner.js +14 -14
  480. package/dist/internal/evals-client.js +4 -4
  481. package/dist/internal/event-log.js +8 -8
  482. package/dist/internal/event-mapper.d.ts +18 -0
  483. package/dist/internal/event-mapper.d.ts.map +1 -1
  484. package/dist/internal/event-mapper.js +34 -2
  485. package/dist/internal/filesystem/format.d.ts.map +1 -1
  486. package/dist/internal/filesystem/format.js +6 -3
  487. package/dist/internal/filesystem/scratch.js +3 -3
  488. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  489. package/dist/internal/filesystem/tools.js +6 -6
  490. package/dist/internal/filesystem/walk.js +1 -1
  491. package/dist/internal/framework-file-storage.d.ts +6 -2
  492. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  493. package/dist/internal/framework-file-storage.js +91 -2
  494. package/dist/internal/framework-storage-selection.d.ts +0 -6
  495. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  496. package/dist/internal/framework-storage-selection.js +2 -11
  497. package/dist/internal/github-fanout.js +3 -3
  498. package/dist/internal/guest-network.js +4 -4
  499. package/dist/internal/host-files.js +1 -1
  500. package/dist/internal/host-kv.js +2 -2
  501. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  502. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  503. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  504. package/dist/internal/hosted-catch-protocol.js +2 -4
  505. package/dist/internal/hosted-catch.js +1 -1
  506. package/dist/internal/hosted-delivery-protocol.d.ts +29 -0
  507. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  508. package/dist/internal/hosted-delivery-protocol.js +76 -8
  509. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  510. package/dist/internal/hosted-delivery.js +201 -64
  511. package/dist/internal/hosted-execution-diag.js +3 -3
  512. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  513. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  514. package/dist/internal/hosted-execution-latency.js +220 -0
  515. package/dist/internal/hosting.d.ts +5 -5
  516. package/dist/internal/hosting.d.ts.map +1 -1
  517. package/dist/internal/hosting.js +5 -6
  518. package/dist/internal/http-channel-define.d.ts +11 -0
  519. package/dist/internal/http-channel-define.d.ts.map +1 -0
  520. package/dist/internal/http-channel-define.js +18 -0
  521. package/dist/internal/http-channel.d.ts +2 -3
  522. package/dist/internal/http-channel.d.ts.map +1 -1
  523. package/dist/internal/http-channel.js +3 -4
  524. package/dist/internal/http-control-plane-session.d.ts +7 -3
  525. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  526. package/dist/internal/http-control-plane-session.js +22 -10
  527. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  528. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  529. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  530. package/dist/internal/init-interview.js +7 -7
  531. package/dist/internal/init-project.d.ts.map +1 -1
  532. package/dist/internal/init-project.js +14 -14
  533. package/dist/internal/init-scaffold.js +1 -1
  534. package/dist/internal/inline-stdio-mcp.js +2 -2
  535. package/dist/internal/install-cursor-skills.js +10 -10
  536. package/dist/internal/json-schema.js +1 -1
  537. package/dist/internal/local-control-plane.d.ts.map +1 -1
  538. package/dist/internal/local-control-plane.js +3 -3
  539. package/dist/internal/local-env.js +3 -3
  540. package/dist/internal/log-ring.js +1 -1
  541. package/dist/internal/logs-client.js +1 -1
  542. package/dist/internal/mcp-endpoint.js +8 -8
  543. package/dist/internal/mcp-host.js +4 -4
  544. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  545. package/dist/internal/mcp-oauth.js +5 -5
  546. package/dist/internal/net.js +2 -2
  547. package/dist/internal/otel/config.js +3 -3
  548. package/dist/internal/otel/runtime.js +13 -13
  549. package/dist/internal/peer-connections.js +2 -2
  550. package/dist/internal/platform-schedule-sync.js +1 -1
  551. package/dist/internal/platform-timers.js +1 -1
  552. package/dist/internal/playground/static.js +2 -2
  553. package/dist/internal/playground/toolchain.js +2 -2
  554. package/dist/internal/playground-proxy.js +3 -3
  555. package/dist/internal/process-memory-telemetry.js +1 -1
  556. package/dist/internal/reminder-runner.d.ts.map +1 -1
  557. package/dist/internal/reminder-runner.js +7 -7
  558. package/dist/internal/reminder-store.js +1 -1
  559. package/dist/internal/request-error-status.d.ts.map +1 -1
  560. package/dist/internal/request-error-status.js +9 -0
  561. package/dist/internal/resolved-connections.js +8 -8
  562. package/dist/internal/result-output.d.ts +14 -2
  563. package/dist/internal/result-output.d.ts.map +1 -1
  564. package/dist/internal/result-output.js +45 -2
  565. package/dist/internal/router.js +4 -4
  566. package/dist/internal/run-client.js +2 -2
  567. package/dist/internal/schedule-runner.js +6 -6
  568. package/dist/internal/scm/pr-url.d.ts +3 -1
  569. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  570. package/dist/internal/scm/pr-url.js +10 -2
  571. package/dist/internal/sdk-runner.d.ts.map +1 -1
  572. package/dist/internal/sdk-runner.js +14 -15
  573. package/dist/internal/serve-restart.js +1 -1
  574. package/dist/internal/server.d.ts.map +1 -1
  575. package/dist/internal/server.js +81 -87
  576. package/dist/internal/session-cost.js +3 -3
  577. package/dist/internal/session-engine.d.ts +34 -0
  578. package/dist/internal/session-engine.d.ts.map +1 -1
  579. package/dist/internal/session-engine.js +380 -184
  580. package/dist/internal/session-run-log.d.ts.map +1 -1
  581. package/dist/internal/session-run-log.js +4 -4
  582. package/dist/internal/session-store.d.ts +47 -3
  583. package/dist/internal/session-store.d.ts.map +1 -1
  584. package/dist/internal/session-store.js +198 -33
  585. package/dist/internal/sessions-client.js +3 -3
  586. package/dist/internal/slack-thread-key.d.ts +7 -0
  587. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  588. package/dist/internal/slack-thread-key.js +10 -0
  589. package/dist/internal/sleep.js +1 -1
  590. package/dist/internal/storage-coordinator.d.ts +17 -0
  591. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  592. package/dist/internal/storage-coordinator.js +111 -11
  593. package/dist/internal/storage.d.ts +2 -0
  594. package/dist/internal/storage.d.ts.map +1 -0
  595. package/dist/internal/storage.js +1 -0
  596. package/dist/internal/store-mirror.js +4 -4
  597. package/dist/internal/terminal-style.js +2 -2
  598. package/dist/internal/tool-result.js +3 -3
  599. package/dist/internal/trajectory.js +7 -7
  600. package/dist/internal/turn-governor.js +2 -2
  601. package/dist/internal/turn-outbox.js +1 -1
  602. package/dist/internal/update-check.js +2 -2
  603. package/dist/internal/v2-hosting.d.ts +9 -0
  604. package/dist/internal/v2-hosting.d.ts.map +1 -1
  605. package/dist/internal/v2-hosting.js +10 -0
  606. package/dist/internal/workspace.d.ts +13 -10
  607. package/dist/internal/workspace.d.ts.map +1 -1
  608. package/dist/internal/workspace.js +17 -16
  609. package/dist/kv/memory-kv.d.ts +6 -4
  610. package/dist/kv/memory-kv.d.ts.map +1 -1
  611. package/dist/kv/memory-kv.js +9 -7
  612. package/dist/kv.d.ts +4 -7
  613. package/dist/kv.d.ts.map +1 -1
  614. package/dist/kv.js +4 -7
  615. package/dist/otel-public.d.ts +7 -0
  616. package/dist/otel-public.d.ts.map +1 -0
  617. package/dist/otel-public.js +5 -0
  618. package/dist/otel.d.ts +7 -2
  619. package/dist/otel.d.ts.map +1 -1
  620. package/dist/otel.js +7 -2
  621. package/dist/playground/assets/index-BLlKgZtI.css +1 -0
  622. package/dist/playground/assets/index-CDS5p9sR.js +67 -0
  623. package/dist/playground/index.html +2 -2
  624. package/dist/prompt.js +1 -1
  625. package/dist/result.d.ts +10 -4
  626. package/dist/result.d.ts.map +1 -1
  627. package/dist/result.js +9 -3
  628. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  629. package/dist/storage-backends/cursor-hosted.d.ts +5 -17
  630. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  631. package/dist/storage-backends/cursor-hosted.js +6 -20
  632. package/dist/storage-backends/file-kv.js +7 -7
  633. package/dist/storage.d.ts +20 -2
  634. package/dist/storage.d.ts.map +1 -1
  635. package/dist/storage.js +7 -6
  636. package/dist/types.d.ts +67 -11
  637. package/dist/types.d.ts.map +1 -1
  638. package/dist/types.js +12 -4
  639. package/docs/README.md +83 -152
  640. package/docs/building-with-agents.md +13 -15
  641. package/docs/deployment.md +6 -7
  642. package/docs/evals.md +5 -5
  643. package/docs/guides/agent-to-agent.md +41 -84
  644. package/docs/guides/cloud-agents.md +25 -20
  645. package/docs/guides/github.md +1 -1
  646. package/docs/guides/grokbot-agents.md +27 -19
  647. package/docs/guides/mcp-oauth.md +1 -1
  648. package/docs/guides/opentelemetry.md +28 -41
  649. package/docs/guides/slack.md +53 -4
  650. package/docs/guides/webhooks.md +3 -4
  651. package/docs/hillclimbing.md +5 -5
  652. package/docs/quickstart.md +45 -106
  653. package/docs/reference/channels.md +0 -16
  654. package/docs/reference/cli.md +0 -16
  655. package/docs/reference/connections.md +3 -5
  656. package/docs/reference/extensions.md +2 -2
  657. package/docs/reference/hooks.md +2 -4
  658. package/docs/reference/http-api.md +5 -5
  659. package/docs/reference/playground.md +2 -2
  660. package/docs/reference/project-layout.md +3 -4
  661. package/docs/reference/sessions.md +5 -4
  662. package/docs/reference/subagents.md +2 -4
  663. package/docs/reference/tools.md +2 -5
  664. package/docs/troubleshooting.md +1 -2
  665. package/package.json +55 -37
  666. package/skills/framework-map/SKILL.md +2 -2
  667. package/skills/otel/SKILL.md +8 -18
  668. package/src/bin/agent-serve.ts +93 -72
  669. package/src/channels/bitbucket/api.ts +8 -8
  670. package/src/channels/bitbucket/binding.ts +4 -4
  671. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  672. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  673. package/src/channels/bitbucket/checks.ts +3 -4
  674. package/src/channels/bitbucket/cursor-account.ts +1 -1
  675. package/src/channels/bitbucket/events.ts +1 -1
  676. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  677. package/src/channels/checks.ts +5 -4
  678. package/src/channels/deployments/deployments-channel.ts +1 -1
  679. package/src/channels/github/api.ts +1 -1
  680. package/src/channels/github/checks.ts +1 -1
  681. package/src/channels/github/cursor-account.ts +3 -3
  682. package/src/channels/github/defaults.ts +8 -4
  683. package/src/channels/github/events.ts +1 -1
  684. package/src/channels/github/forward.ts +8 -8
  685. package/src/channels/github/github-channel.ts +19 -2
  686. package/src/channels/github/progress.ts +7 -2
  687. package/src/channels/github/state.ts +6 -0
  688. package/src/channels/github/types.ts +6 -0
  689. package/src/channels/gitlab/binding.ts +4 -4
  690. package/src/channels/gitlab/checks.ts +3 -4
  691. package/src/channels/gitlab/cursor-account.ts +1 -1
  692. package/src/channels/gitlab/events.ts +1 -1
  693. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  694. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  695. package/src/channels/gitlab/replay.ts +2 -2
  696. package/src/channels/origin/binding.ts +6 -3
  697. package/src/channels/origin/checks.ts +27 -17
  698. package/src/channels/origin/cursor-account.ts +1 -1
  699. package/src/channels/origin/defaults.ts +5 -1
  700. package/src/channels/origin/events.ts +1 -1
  701. package/src/channels/origin/origin-channel.ts +2 -1
  702. package/src/channels/origin/origin-webhook.ts +2 -2
  703. package/src/channels/slack/agentic-delivery.ts +659 -0
  704. package/src/channels/slack/agentic-posted.ts +148 -0
  705. package/src/channels/slack/agentic-signals.ts +248 -0
  706. package/src/channels/slack/api.ts +51 -11
  707. package/src/channels/slack/approvals.ts +1 -1
  708. package/src/channels/slack/attachments.ts +1 -1
  709. package/src/channels/slack/auth.ts +3 -1
  710. package/src/channels/slack/blocks.ts +3 -3
  711. package/src/channels/slack/bot-mentions.ts +5 -7
  712. package/src/channels/slack/channel-watch.ts +1 -1
  713. package/src/channels/slack/cli-project.ts +3 -3
  714. package/src/channels/slack/defaults.ts +109 -37
  715. package/src/channels/slack/dispatch.ts +299 -170
  716. package/src/channels/slack/doctor.ts +1 -1
  717. package/src/channels/slack/eval-directive.ts +1 -1
  718. package/src/channels/slack/external-policy.ts +15 -2
  719. package/src/channels/slack/footer.ts +108 -0
  720. package/src/channels/slack/index.ts +2 -0
  721. package/src/channels/slack/interactive.ts +4 -2
  722. package/src/channels/slack/live-delivery.ts +23 -7
  723. package/src/channels/slack/log.ts +1 -1
  724. package/src/channels/slack/manifest.ts +1 -1
  725. package/src/channels/slack/nudge-carrier.ts +1 -1
  726. package/src/channels/slack/nudge-store.ts +2 -2
  727. package/src/channels/slack/paint-start.ts +93 -0
  728. package/src/channels/slack/placeholder.ts +315 -0
  729. package/src/channels/slack/progress-delivery.ts +14 -1
  730. package/src/channels/slack/reasoning-chip.ts +48 -0
  731. package/src/channels/slack/recording-sink.ts +176 -0
  732. package/src/channels/slack/reply-options.ts +71 -15
  733. package/src/channels/slack/setup.ts +1 -1
  734. package/src/channels/slack/slack-channel.ts +73 -13
  735. package/src/channels/slack/socket-mode.ts +2 -2
  736. package/src/channels/slack/thread-context.ts +5 -5
  737. package/src/channels/slack/tool-approval-events.ts +54 -38
  738. package/src/channels/slack/tool-cards.ts +1 -1
  739. package/src/channels/slack/tool-chip.ts +36 -0
  740. package/src/channels/slack/types.ts +47 -7
  741. package/src/channels/slack/upload.ts +142 -0
  742. package/src/channels.ts +12 -30
  743. package/src/dashboard-session-url.ts +32 -0
  744. package/src/evals/assertions.ts +19 -19
  745. package/src/evals/expect.ts +1 -1
  746. package/src/evals/judge.ts +1 -1
  747. package/src/evals/reporters.ts +8 -9
  748. package/src/evals/run-facts.ts +2 -2
  749. package/src/evals.ts +7 -10
  750. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  751. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  752. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  753. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  754. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  755. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  756. package/src/extensions/improve/skills/yourself.ts +1 -1
  757. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  758. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  759. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  760. package/src/extensions/slack-communication/extension.ts +45 -0
  761. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  762. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  763. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  764. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  765. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  766. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  767. package/src/extensions/slack-communication/tools/react.ts +33 -0
  768. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  769. package/src/files-backends/cursor-hosted.ts +502 -98
  770. package/src/files-backends/local-fs.ts +1 -1
  771. package/src/files.ts +15 -0
  772. package/src/filesystem.ts +16 -18
  773. package/src/index.ts +4 -36
  774. package/src/internal/advertise-tools.ts +6 -6
  775. package/src/internal/approval-gate.ts +1 -1
  776. package/src/internal/artifacts-store.ts +3 -3
  777. package/src/internal/as-of.ts +2 -2
  778. package/src/internal/authored-alias-hooks.ts +1 -1
  779. package/src/internal/authored-loaders.ts +2 -3
  780. package/src/internal/builtin-tools/reminders.ts +2 -2
  781. package/src/internal/chat-client.ts +5 -5
  782. package/src/internal/cli-ax.ts +84 -14
  783. package/src/internal/cli-bitbucket.ts +11 -11
  784. package/src/internal/cli-convert-automation.ts +2 -2
  785. package/src/internal/cli-cursor.ts +5 -16
  786. package/src/internal/cli-deploy.ts +389 -104
  787. package/src/internal/cli-docs.ts +5 -5
  788. package/src/internal/cli-github.ts +16 -19
  789. package/src/internal/cli-gitlab.ts +11 -11
  790. package/src/internal/cli-manifest.ts +1 -1
  791. package/src/internal/cli-mcp-oauth.ts +5 -7
  792. package/src/internal/cli-mcp.ts +3 -3
  793. package/src/internal/cli-skills.ts +2 -2
  794. package/src/internal/cli-slack.ts +5 -5
  795. package/src/internal/cloud-turn-cost.ts +1 -1
  796. package/src/internal/continuation-identity.ts +13 -9
  797. package/src/internal/conversation-mirror.ts +36 -3
  798. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  799. package/src/internal/convert-automation/types.ts +9 -0
  800. package/src/internal/cursor/account-mcp.ts +48 -31
  801. package/src/internal/cursor/backend-client.ts +28 -17
  802. package/src/internal/cursor/credentials.ts +1 -1
  803. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  804. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  805. package/src/internal/cursor-deployment-relay.ts +10 -10
  806. package/src/internal/cursor-event-relay.ts +10 -10
  807. package/src/internal/cursor-relay-core.ts +2 -2
  808. package/src/internal/deploy-client.ts +266 -24
  809. package/src/internal/deploy-manifest.ts +46 -8
  810. package/src/internal/discovery/agent-config.ts +34 -0
  811. package/src/internal/discovery/agent.ts +14 -6
  812. package/src/internal/discovery/channels.ts +4 -4
  813. package/src/internal/discovery/connections.ts +4 -4
  814. package/src/internal/discovery/cursor-plugin.ts +12 -12
  815. package/src/internal/discovery/extension-overlay.ts +3 -3
  816. package/src/internal/discovery/extensions.ts +6 -6
  817. package/src/internal/discovery/info.ts +9 -9
  818. package/src/internal/discovery/instructions.ts +1 -1
  819. package/src/internal/discovery/project.ts +4 -4
  820. package/src/internal/discovery/services.ts +1 -1
  821. package/src/internal/discovery/tools.ts +1 -1
  822. package/src/internal/docs-site.ts +2 -2
  823. package/src/internal/env-file.ts +2 -2
  824. package/src/internal/eval-run-store.ts +7 -9
  825. package/src/internal/eval-runner.ts +20 -20
  826. package/src/internal/evals-client.ts +6 -6
  827. package/src/internal/event-log.ts +10 -10
  828. package/src/internal/event-mapper.ts +37 -2
  829. package/src/internal/filesystem/format.ts +11 -12
  830. package/src/internal/filesystem/scratch.ts +3 -3
  831. package/src/internal/filesystem/tools.ts +6 -8
  832. package/src/internal/filesystem/walk.ts +1 -1
  833. package/src/internal/framework-file-storage.ts +104 -4
  834. package/src/internal/framework-storage-selection.ts +2 -12
  835. package/src/internal/github-fanout.ts +4 -4
  836. package/src/internal/guest-network.ts +4 -4
  837. package/src/internal/host-files.ts +1 -1
  838. package/src/internal/host-kv.ts +2 -2
  839. package/src/internal/hosted-admission-adapter.ts +2 -0
  840. package/src/internal/hosted-catch-protocol.ts +3 -5
  841. package/src/internal/hosted-catch.ts +1 -1
  842. package/src/internal/hosted-delivery-protocol.ts +111 -13
  843. package/src/internal/hosted-delivery.ts +286 -81
  844. package/src/internal/hosted-execution-diag.ts +3 -3
  845. package/src/internal/hosted-execution-latency.ts +334 -0
  846. package/src/internal/hosting.ts +5 -6
  847. package/src/internal/http-channel-define.ts +27 -0
  848. package/src/internal/http-channel.ts +3 -4
  849. package/src/internal/http-control-plane-session.ts +24 -11
  850. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  851. package/src/internal/init-interview.ts +7 -7
  852. package/src/internal/init-project.ts +14 -16
  853. package/src/internal/init-scaffold.ts +1 -1
  854. package/src/internal/inline-stdio-mcp.ts +2 -2
  855. package/src/internal/install-cursor-skills.ts +11 -11
  856. package/src/internal/json-schema.ts +1 -1
  857. package/src/internal/local-control-plane.ts +4 -5
  858. package/src/internal/local-env.ts +3 -3
  859. package/src/internal/log-ring.ts +1 -1
  860. package/src/internal/logs-client.ts +1 -1
  861. package/src/internal/mcp-endpoint.ts +10 -10
  862. package/src/internal/mcp-host.ts +9 -9
  863. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  864. package/src/internal/mcp-oauth.ts +5 -5
  865. package/src/internal/net.ts +2 -2
  866. package/src/internal/otel/config.ts +3 -3
  867. package/src/internal/otel/runtime.ts +14 -14
  868. package/src/internal/peer-connections.ts +2 -2
  869. package/src/internal/platform-schedule-sync.ts +1 -1
  870. package/src/internal/platform-timers.ts +1 -1
  871. package/src/internal/playground/static.ts +2 -2
  872. package/src/internal/playground/toolchain.ts +2 -2
  873. package/src/internal/playground-proxy.ts +3 -3
  874. package/src/internal/process-memory-telemetry.ts +1 -1
  875. package/src/internal/reminder-runner.ts +8 -10
  876. package/src/internal/reminder-store.ts +1 -1
  877. package/src/internal/request-error-status.ts +9 -0
  878. package/src/internal/resolved-connections.ts +8 -8
  879. package/src/internal/result-output.ts +62 -5
  880. package/src/internal/router.ts +4 -4
  881. package/src/internal/run-client.ts +2 -2
  882. package/src/internal/schedule-runner.ts +6 -6
  883. package/src/internal/scm/pr-url.ts +11 -2
  884. package/src/internal/sdk-runner.ts +14 -28
  885. package/src/internal/serve-restart.ts +1 -1
  886. package/src/internal/server.ts +97 -99
  887. package/src/internal/session-cost.ts +3 -3
  888. package/src/internal/session-engine.ts +504 -244
  889. package/src/internal/session-run-log.ts +4 -6
  890. package/src/internal/session-store.ts +213 -39
  891. package/src/internal/sessions-client.ts +3 -3
  892. package/src/internal/slack-thread-key.ts +11 -0
  893. package/src/internal/sleep.ts +1 -1
  894. package/src/internal/storage-coordinator.ts +118 -21
  895. package/src/internal/storage.ts +1 -0
  896. package/src/internal/store-mirror.ts +4 -4
  897. package/src/internal/terminal-style.ts +2 -2
  898. package/src/internal/tool-result.ts +3 -3
  899. package/src/internal/trajectory.ts +7 -7
  900. package/src/internal/turn-governor.ts +2 -2
  901. package/src/internal/turn-outbox.ts +1 -1
  902. package/src/internal/update-check.ts +2 -2
  903. package/src/internal/v2-hosting.ts +14 -0
  904. package/src/internal/workspace.ts +17 -17
  905. package/src/kv/memory-kv.ts +9 -7
  906. package/src/kv.ts +4 -7
  907. package/src/otel-public.ts +24 -0
  908. package/src/otel.ts +7 -2
  909. package/src/prompt.ts +1 -1
  910. package/src/result.ts +10 -8
  911. package/src/storage-backends/cursor-hosted-v2.ts +2 -2
  912. package/src/storage-backends/cursor-hosted.ts +6 -23
  913. package/src/storage-backends/file-kv.ts +7 -7
  914. package/src/storage.ts +22 -7
  915. package/src/types.ts +82 -17
  916. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  917. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  918. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  919. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  920. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  921. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  922. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  923. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  924. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  925. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  926. package/templates/agentic-owners/package.json +1 -1
  927. package/templates/agents-md/agent/lib/collect.ts +16 -10
  928. package/templates/agents-md/agent/lib/config.ts +1 -1
  929. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  930. package/templates/agents-md/package.json +1 -1
  931. package/templates/code-wiki/agent/channels/github.ts +4 -7
  932. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  933. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  934. package/templates/code-wiki/package.json +1 -1
  935. package/templates/demo/agent/lib/collect.ts +6 -2
  936. package/templates/demo/agent/lib/repos.ts +1 -1
  937. package/templates/demo/agent/tools/record_demo.ts +1 -1
  938. package/templates/demo/evals/demo.eval.ts +1 -5
  939. package/templates/demo/package.json +1 -1
  940. package/templates/grokbot-agents/package.json +1 -1
  941. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  942. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  943. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  944. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  945. package/templates/pr-autofixer/package.json +1 -1
  946. package/templates/security-help/agent/lib/repos.ts +1 -1
  947. package/templates/security-help/package.json +1 -1
  948. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  949. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  950. package/templates/security-reviewer/package.json +1 -1
  951. package/templates/triage/agent/lib/actuate.ts +26 -41
  952. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  953. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  954. package/templates/triage/agent/tools/record_triage.ts +1 -4
  955. package/templates/triage/package.json +1 -1
  956. package/dist/client.d.ts +0 -14
  957. package/dist/client.d.ts.map +0 -1
  958. package/dist/client.js +0 -12
  959. package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
  960. package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
  961. package/dist/docs/assets/chunks/framework.BCISBCiQ.js +0 -19
  962. package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
  963. package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
  964. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  965. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  966. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  967. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  968. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  969. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
  970. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
  971. package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
  972. package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
  973. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  974. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  975. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  976. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  977. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  978. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  979. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  980. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  981. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  982. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
  983. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
  984. package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
  985. package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
  986. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
  987. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
  988. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  989. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  990. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  991. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  992. package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
  993. package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
  994. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  995. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  996. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  997. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  998. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  999. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1000. package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
  1001. package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
  1002. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1003. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1004. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1005. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1006. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1007. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1008. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1009. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1010. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1011. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1012. package/dist/docs/concepts.html +0 -27
  1013. package/dist/docs/concepts.md +0 -166
  1014. package/dist/docs/design/filesystem.md +0 -376
  1015. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1016. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1017. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1018. package/dist/docs/reference/result.html +0 -45
  1019. package/dist/docs/reference/result.md +0 -89
  1020. package/dist/docs/scaffolding-agents.html +0 -27
  1021. package/dist/docs/scaffolding-agents.md +0 -130
  1022. package/dist/docs/skills/create-agent.html +0 -34
  1023. package/dist/docs/skills/create-agent.md +0 -160
  1024. package/dist/docs/skills/debug.html +0 -27
  1025. package/dist/docs/skills/debug.md +0 -36
  1026. package/dist/docs/skills/deploy.html +0 -61
  1027. package/dist/docs/skills/deploy.md +0 -161
  1028. package/dist/docs/skills/evals.html +0 -51
  1029. package/dist/docs/skills/evals.md +0 -137
  1030. package/dist/docs/skills/framework-map.html +0 -27
  1031. package/dist/docs/skills/framework-map.md +0 -99
  1032. package/dist/docs/skills/github.html +0 -42
  1033. package/dist/docs/skills/github.md +0 -93
  1034. package/dist/docs/skills/hillclimb.html +0 -33
  1035. package/dist/docs/skills/hillclimb.md +0 -55
  1036. package/dist/docs/skills/index.html +0 -27
  1037. package/dist/docs/skills/index.md +0 -21
  1038. package/dist/docs/skills/mcp-auth.html +0 -44
  1039. package/dist/docs/skills/mcp-auth.md +0 -76
  1040. package/dist/docs/skills/otel.html +0 -34
  1041. package/dist/docs/skills/otel.md +0 -53
  1042. package/dist/docs/skills/setup-slack.html +0 -46
  1043. package/dist/docs/skills/setup-slack.md +0 -141
  1044. package/dist/docs/storage.html +0 -56
  1045. package/dist/docs/storage.md +0 -167
  1046. package/dist/docs/templates/agents-md.html +0 -28
  1047. package/dist/docs/templates/agents-md.md +0 -105
  1048. package/dist/docs/templates/code-wiki.html +0 -28
  1049. package/dist/docs/templates/code-wiki.md +0 -91
  1050. package/dist/docs/templates/demo.html +0 -30
  1051. package/dist/docs/templates/demo.md +0 -80
  1052. package/dist/docs/templates/grokbot-agents.html +0 -29
  1053. package/dist/docs/templates/grokbot-agents.md +0 -48
  1054. package/dist/docs/templates/security-help.html +0 -30
  1055. package/dist/docs/templates/security-help.md +0 -65
  1056. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1057. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1058. package/dist/internal/tenant-slack/relay.js +0 -148
  1059. package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
  1060. package/dist/playground/assets/index-CqLX5uF3.js +0 -67
  1061. package/docs/concepts.md +0 -171
  1062. package/docs/design/filesystem.md +0 -376
  1063. package/docs/design/runtime-abstraction.md +0 -1756
  1064. package/docs/guides/human-in-the-loop.md +0 -131
  1065. package/docs/reference/result.md +0 -94
  1066. package/docs/scaffolding-agents.md +0 -135
  1067. package/docs/skills/index.md +0 -26
  1068. package/docs/storage.md +0 -172
  1069. package/docs/templates/agents-md.md +0 -110
  1070. package/docs/templates/code-wiki.md +0 -96
  1071. package/docs/templates/demo.md +0 -85
  1072. package/docs/templates/grokbot-agents.md +0 -53
  1073. package/docs/templates/security-help.md +0 -70
  1074. package/src/client.ts +0 -23
  1075. package/src/internal/tenant-slack/relay.ts +0 -203
  1076. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -1,14 +1,4 @@
1
- import{_ as e,c as a,o as i,ag as t}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies.","frontmatter":{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),n={name:"reference/channels.md"};function o(h,s,l,r,d,c){return i(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="channels" tabindex="-1">Channels <a class="header-anchor" href="#channels" aria-label="Permalink to &quot;Channels&quot;">​</a></h1><p>A channel is the surface an agent lives on. The built-in HTTP session channel is always mounted. Custom channels declare their own routes under <code>/v1/channels/&lt;id&gt;</code>. The Slack and GitHub packs are prebuilt channels with platform transports. GitLab and Bitbucket packs cover their hosted and self-managed products. This page is the authoring reference; for the walkthrough, see the <a href="./../guides/webhooks.html">Webhooks guide</a>.</p><h2 id="built-in-http-channel" tabindex="-1">Built-in HTTP channel <a class="header-anchor" href="#built-in-http-channel" aria-label="Permalink to &quot;Built-in HTTP channel&quot;">​</a></h2><p>It&#39;s always mounted, under <code>/&lt;slug&gt;</code> in the default multi-agent layout: session create, follow-up, stream, stop, the sessions list, approvals, deterministic tool calls, health, and info. For the route-by-route contract, see the <a href="./http-api.html">HTTP API reference</a>.</p><p>Author <code>agent/channels/http.ts</code> only to override its defaults:</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;"> {</span></span>
2
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> bearerAuth,</span></span>
3
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> httpChannel,</span></span>
4
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> localDevStrict,</span></span>
5
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">} </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
6
- <span class="line"></span>
7
- <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;"> httpChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
8
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> auth: [</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">localDevStrict</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(), </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bearerAuth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(process.env.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">AGENT_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ??</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)],</span></span>
9
- <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMessage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">message</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, { </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">auth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span></span>
10
- <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> \`[caller \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">auth</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">?.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">principalId</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ??</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;anonymous&quot;}] \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">message</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><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><h2 id="define-a-custom-channel" tabindex="-1">Define a custom channel <a class="header-anchor" href="#define-a-custom-channel" aria-label="Permalink to &quot;Define a custom channel&quot;">​</a></h2><p>Author <code>agent/channels/&lt;id&gt;.ts</code>. The filename is the channel id and the route prefix:</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;"> { defineChannel, POST } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
1
+ import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies.","frontmatter":{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),n={name:"reference/channels.md"};function o(h,e,l,r,d,c){return a(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="channels" tabindex="-1">Channels <a class="header-anchor" href="#channels" aria-label="Permalink to &quot;Channels&quot;">​</a></h1><p>A channel is the surface an agent lives on. The built-in HTTP session channel is always mounted. Custom channels declare their own routes under <code>/v1/channels/&lt;id&gt;</code>. The Slack and GitHub packs are prebuilt channels with platform transports. GitLab and Bitbucket packs cover their hosted and self-managed products. This page is the authoring reference; for the walkthrough, see the <a href="./../guides/webhooks.html">Webhooks guide</a>.</p><h2 id="built-in-http-channel" tabindex="-1">Built-in HTTP channel <a class="header-anchor" href="#built-in-http-channel" aria-label="Permalink to &quot;Built-in HTTP channel&quot;">​</a></h2><p>It&#39;s always mounted, under <code>/&lt;slug&gt;</code> in the default multi-agent layout: session create, follow-up, stream, stop, the sessions list, approvals, deterministic tool calls, health, and info. For the route-by-route contract, see the <a href="./http-api.html">HTTP API reference</a>.</p><h2 id="define-a-custom-channel" tabindex="-1">Define a custom channel <a class="header-anchor" href="#define-a-custom-channel" aria-label="Permalink to &quot;Define a custom channel&quot;">​</a></h2><p>Author <code>agent/channels/&lt;id&gt;.ts</code>. The filename is the channel id and the route prefix:</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;"> { defineChannel, POST } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@cursor/july/channels&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
12
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>
13
3
  <span class="line"></span>
14
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;"> defineChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
@@ -50,4 +40,4 @@ import{_ as e,c as a,o as i,ag as t}from"./chunks/framework.BCISBCiQ.js";const k
50
40
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
51
41
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
52
42
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // auth: [...], state: {...}, onStart(...), onStop(...)</span></span>
53
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>This example assumes <code>agent/tools/inspect_pr.ts</code> exists. The handler calls it before the model turn, so every review starts with validated PR data. It also derives a stable conversation key from the PR URL and writes the tool result to <code>pr.json</code>. Instructions can ask the model to inspect a PR, but host code guarantees it.</p><h2 id="route-verbs-and-schemas" tabindex="-1">Route verbs and schemas <a class="header-anchor" href="#route-verbs-and-schemas" aria-label="Permalink to &quot;Route verbs and schemas&quot;">​</a></h2><p><code>GET</code>, <code>POST</code>, <code>PUT</code>, <code>PATCH</code>, and <code>DELETE</code> helpers build routes. Their schemas are Zod, enforced at compile time:</p><table tabindex="0"><thead><tr><th>Verb</th><th>Required schema</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>querySchema</code></td></tr><tr><td><code>POST</code> / <code>PUT</code> / <code>PATCH</code></td><td><code>bodySchema</code> (optional <code>querySchema</code>)</td></tr><tr><td><code>DELETE</code></td><td>both optional</td></tr></tbody></table><p>Plain JSON Schema objects won&#39;t type-check; use <code>z.object({})</code> or <code>z.unknown()</code> for intentionally open surfaces. The host validates before the handler runs. Handlers receive typed <code>args.body</code> and <code>args.query</code>, and empty POST bodies are coerced to <code>{}</code> first. Declared schemas are projected on <code>GET /v1/info</code>, which powers the playground&#39;s <strong>Try</strong> buttons and composer <strong>slash commands</strong>.</p><h2 id="handler-arguments" tabindex="-1">Handler arguments <a class="header-anchor" href="#handler-arguments" aria-label="Permalink to &quot;Handler arguments&quot;">​</a></h2><p>Handlers receive the Fetch <code>Request</code> and an args object:</p><table tabindex="0"><thead><tr><th>Member</th><th>What it is</th></tr></thead><tbody><tr><td><code>send(message, options?)</code></td><td>Run a model turn on this channel; returns the session handle (options below)</td></tr><tr><td><code>getSession(sessionId)</code></td><td>Look up an existing session on this channel</td></tr><tr><td><code>receive(channelDefinition, input)</code></td><td>Hand off to another channel (schedules use this)</td></tr><tr><td><code>callTool(name, input, options?)</code></td><td>Deterministic server-tool call (<a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a>)</td></tr><tr><td><code>body</code>, <code>query</code>, <code>params</code></td><td>Validated payloads and <code>:param</code> path segments</td></tr><tr><td><code>auth</code></td><td>The <code>AuthContext</code> resolved by this route&#39;s auth chain</td></tr><tr><td><code>requestIp</code></td><td>The TCP peer address</td></tr><tr><td><code>host</code></td><td>Shared services: <code>host.mcp</code>, <code>host.github</code>, <code>host.slack</code>, <code>host.kv</code>, <code>host.files</code>, <code>host.reminders</code></td></tr><tr><td><code>waitUntil(promise)</code></td><td>Background work that outlives the response</td></tr><tr><td><code>sessionUrls(request, sessionId)</code></td><td>Absolute playground + trace URLs for a session on this mount</td></tr><tr><td><code>artifacts</code></td><td>Unbound <a href="./artifacts.html">artifacts</a> facade; pass <code>sessionId</code> in <code>tag</code> input to attribute one</td></tr></tbody></table><p><code>send</code> options: <code>continuationToken</code> (the conversation key), <code>admission</code> (<code>&quot;preempt&quot;</code> interrupts a busy session, the default; <code>&quot;coalesce&quot;</code> enqueues behind the running turn, the <a href="./sessions.html#what-happens-when-i-send-a-follow-up">Slack policy</a>), <code>workspaceFiles</code>, <code>workspaceDir</code>, <code>cloud</code> (attach cloud repos for this session), <code>auth</code> (defaults to the request principal), <code>state</code> (starting channel state for new sessions), <code>title</code> (session display title), and <code>purpose</code> (<code>&quot;eval&quot;</code> marks the session as regression traffic).</p><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to &quot;Events&quot;">​</a></h2><p>The <code>events</code> map subscribes the channel to stream events for the sessions it owns. Keys are event types from the <a href="./sessions.html#which-events-can-i-stream">event vocabulary</a>, or <code>&quot;*&quot;</code>. Handlers receive <code>(event, channel, ctx)</code>, where <code>channel.state</code> is the per-session adapter state, <code>ctx.session</code> is the session info, and <code>ctx.host</code> is the shared host services, bound to that session as in a <a href="./hooks.html#handler-context">hook</a>. This is where a channel delivers replies back to its surface.</p><h2 id="state-and-lifecycle" tabindex="-1">State and lifecycle <a class="header-anchor" href="#state-and-lifecycle" aria-label="Permalink to &quot;State and lifecycle&quot;">​</a></h2><p><code>state</code> declares the starting per-session adapter state (JSON), persisted on the session record. Routes and event handlers read and mutate it through <code>channel.state</code>. <code>onStart(args)</code> runs when the channel mounts. <code>onStop()</code> runs when the server stops.</p><p><code>onStart</code> receives the route helpers (<code>send</code>, <code>getSession</code>, <code>receive</code>, <code>callTool</code>, <code>host</code>, <code>waitUntil</code>, <code>artifacts</code>, <code>logger</code>) plus helpers for long-lived transports:</p><ul><li><code>emitAssistantMessage(sessionId, text)</code> appends an assistant message without a model turn, for host tasks that already produced the final text.</li><li><code>hasContinuationSession(token)</code> and <code>isContinuationBusy(token)</code> report whether a continuation token has a live session and whether a turn is in flight on it.</li><li><code>interruptContinuation(token)</code> stops the in-flight turn and clears coalesced follow-ups queued behind it.</li><li><code>resolveApproval(sessionId, callId, decision, auth, options?)</code> approves or denies a parked tool call, how Slack Block Kit buttons unblock a turn without the HTTP approvals route.</li></ul><h2 id="auth-policies" tabindex="-1">Auth policies <a class="header-anchor" href="#auth-policies" aria-label="Permalink to &quot;Auth policies&quot;">​</a></h2><p>Every route runs an auth-policy chain: the channel&#39;s <code>auth</code> array, or <code>[localDevStrict()]</code> when unset. A policy is a function <code>(request, info) =&gt; AuthContext | null</code> (async allowed); the first non-null wins, and a request no policy admits gets <code>401</code>.</p><table tabindex="0"><thead><tr><th>Policy</th><th>Admits</th></tr></thead><tbody><tr><td><code>localDevStrict()</code></td><td>Direct loopback callers with no proxy-forwarding headers (<code>X-Forwarded-For</code>, <code>X-Real-IP</code>, <code>Forwarded</code>, and <code>X-Forwarded-Host</code> are all rejected, so tunnels and same-host reverse proxies don&#39;t silently re-expose the route), plus a loopback <code>Host</code> header, which rejects DNS-rebinding callers that reach 127.0.0.1 with a remote hostname.</td></tr><tr><td><code>localDev()</code></td><td>Like <code>localDevStrict()</code> but without the <code>Host</code> check. An explicit, weaker opt-in.</td></tr><tr><td><code>loopbackOnly()</code></td><td>A loopback TCP peer, ignoring forwarding headers; for dev relays that legitimately carry them, like <code>gh webhook forward</code>.</td></tr><tr><td><code>bearerAuth(token)</code></td><td><code>Authorization: Bearer &lt;token&gt;</code>, compared in constant time. Also accepts a verifier function mapping a presented token to an <code>AuthContext</code>.</td></tr><tr><td><code>allowAll()</code></td><td>Everyone, as an <code>anonymous</code> principal. Only for surfaces protected upstream (an HMAC-verified webhook) or intentionally public.</td></tr><tr><td><code>publicEndpoint()</code></td><td>Everyone on this custom channel. Managed hosting also serves the channel without an alias token. Use it only when the handler verifies the provider signature.</td></tr></tbody></table><p><code>publicEndpoint()</code> applies only to custom channel routes. It does not open the built-in session or tool API.</p><p>The resolved <code>AuthContext</code> (<code>{ authenticator, principalId, principalType, attributes? }</code>) becomes the request principal. Sessions bind to the principal that created them, and follow-up, stream, and list routes enforce ownership (<code>403</code> otherwise).</p><p>Server flags interact with authored auth: <code>--bearer-token</code> swaps the default <code>localDevStrict()</code> for <code>bearerAuth(...)</code> on channels that don&#39;t author their own chain, and <code>--allow-anonymous</code> swaps it for <code>allowAll()</code>. Authored <code>auth</code> arrays always win over both. A channel that declares <code>[localDevStrict()]</code> stays loopback-only even on an <code>--allow-anonymous</code> host.</p><h2 id="first-class-channels" tabindex="-1">First class channels <a class="header-anchor" href="#first-class-channels" aria-label="Permalink to &quot;First class channels&quot;">​</a></h2><p><strong>Slack</strong> (<code>@cursor/july/channels/slack</code>): Socket Mode transport, streaming replies, engagement rules, approval cards, and a default block on Slack Connect / guest / other-workspace senders. Author <code>agent/channels/slack.ts</code> with <code>slackChannel()</code>. Guide: <a href="./../guides/slack.html">Slack</a>.</p><p><strong>GitHub</strong> (<code>@cursor/july/channels/github</code>): webhook dispatch with signature verification, per-event hooks returning <code>{ auth }</code> (a model turn), <code>{ task }</code> (host work), or <code>null</code>, and CLI tooling for replay and live forwarding. Author <code>agent/channels/github.ts</code> with <code>githubChannel()</code>. Opt-in <code>progress.commitStatus</code> and <code>progress.banner</code> converge a merge-box check and sticky PR comment from default stream events. Supports GitHub.com and GitHub Enterprise Server. Guide: <a href="./../guides/github.html">GitHub</a>.</p><p><strong>GitLab</strong> (<code>@cursor/july/channels/gitlab</code>): verified project hooks for merge requests, notes, pipelines, pushes, and custom event types. Supports GitLab.com and self-managed GitLab. Author <code>agent/channels/gitlab.ts</code> with <code>gitlabChannel()</code>. Guide: <a href="./../guides/gitlab.html">GitLab</a>.</p><p><strong>Bitbucket</strong> (<code>@cursor/july/channels/bitbucket</code>): verified repository hooks for pull requests, comments, pushes, and custom event types. Supports Bitbucket Cloud and Bitbucket Data Center through one normalized hook API. Author <code>agent/channels/bitbucket.ts</code> with <code>bitbucketChannel()</code>. Guide: <a href="./../guides/bitbucket.html">Bitbucket</a>.</p><p><strong>Deployments</strong> (<code>@cursor/july/channels/deployments</code>): pull deploy events. Declare <code>events</code> and handle each one in <code>onEvent</code>. Each event carries <code>deploySourceUri</code> and <code>deployVersion</code>. Author <code>agent/channels/deployments.ts</code> with <code>deploymentsChannel()</code>.</p><p>On Cursor-managed hosting, omit <code>deploySourceUris</code>. The deployment&#39;s watched repositories bind the event scope automatically. Name sources to narrow the scope or to drive the self-hosted pull relay. Subscribe per deploy source with <code>deploySourceUris</code> and narrow with <code>environments</code> or <code>events</code>. Each entry must match <code>Deployment.deploy_source_uri</code> as your deployment writer records it. Matching is case-insensitive but otherwise literal. It uses the host credential. A restart resumes rather than dropping events. An empty <code>deploySourceUris</code> list mounts the channel but starts no pull, so an env-configured agent stays inert until its deploy sources are set.</p><p><strong>Change Monitors</strong> (<code>@cursor/july/channels/change-monitors</code>): Change Monitor Checkpoint events. The channel publishes Factory <code>checkpoint.created</code> for every Checkpoint create. The agent filters the result (for example to the <code>issues</code> arm). The payload contains the full Checkpoint resource. This channel is scoped to Change Monitors, not generic Factory Checkpoints. There is no repository filter or resource filter. Author <code>agent/channels/change-monitors.ts</code> with <code>changeMonitorsChannel()</code>. It uses the host credential.</p><p><strong>Issues</strong> (<code>@cursor/july/channels/issues</code>): Factory issue events. The channel publishes <code>issue.created</code> for every Issue create. The agent filters if it needs a subset. The payload contains the full Issue resource. There is no repository filter or resource filter. Author <code>agent/channels/issues.ts</code> with <code>issuesChannel()</code>. It uses the host credential.</p><p>For other platforms like Discord or Teams, use the authored <code>defineChannel</code> webhook form.</p><h2 id="continuation-semantics" tabindex="-1">Continuation semantics <a class="header-anchor" href="#continuation-semantics" aria-label="Permalink to &quot;Continuation semantics&quot;">​</a></h2><p>Channels own their continuation-token format. The built-in HTTP channel mints opaque rotating tokens, Slack uses <code>channelId:threadTs</code>, and PR automations use keys like <code>pr:owner/repo#N</code>. Same token, same durable session; one active continuation per session; the HTTP channel returns <code>409</code> for stale tokens. For the full session model, see <a href="./sessions.html">Sessions</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="./../guides/webhooks.html">Webhooks guide</a>: the same API, walked through</li><li><a href="./http-api.html">HTTP API</a>: session, discovery, and channel routes</li><li><a href="./sessions.html">Sessions and streaming</a>: the events channels subscribe to</li></ul>`,45)])])}const u=e(n,[["render",o]]);export{k as __pageData,u as default};
43
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>This example assumes <code>agent/tools/inspect_pr.ts</code> exists. The handler calls it before the model turn, so every review starts with validated PR data. It also derives a stable conversation key from the PR URL and writes the tool result to <code>pr.json</code>. Instructions can ask the model to inspect a PR, but host code guarantees it.</p><h2 id="route-verbs-and-schemas" tabindex="-1">Route verbs and schemas <a class="header-anchor" href="#route-verbs-and-schemas" aria-label="Permalink to &quot;Route verbs and schemas&quot;">​</a></h2><p><code>GET</code>, <code>POST</code>, <code>PUT</code>, <code>PATCH</code>, and <code>DELETE</code> helpers build routes. Their schemas are Zod, enforced at compile time:</p><table tabindex="0"><thead><tr><th>Verb</th><th>Required schema</th></tr></thead><tbody><tr><td><code>GET</code></td><td><code>querySchema</code></td></tr><tr><td><code>POST</code> / <code>PUT</code> / <code>PATCH</code></td><td><code>bodySchema</code> (optional <code>querySchema</code>)</td></tr><tr><td><code>DELETE</code></td><td>both optional</td></tr></tbody></table><p>Plain JSON Schema objects won&#39;t type-check; use <code>z.object({})</code> or <code>z.unknown()</code> for intentionally open surfaces. The host validates before the handler runs. Handlers receive typed <code>args.body</code> and <code>args.query</code>, and empty POST bodies are coerced to <code>{}</code> first. Declared schemas are projected on <code>GET /v1/info</code>, which powers the playground&#39;s <strong>Try</strong> buttons and composer <strong>slash commands</strong>.</p><h2 id="handler-arguments" tabindex="-1">Handler arguments <a class="header-anchor" href="#handler-arguments" aria-label="Permalink to &quot;Handler arguments&quot;">​</a></h2><p>Handlers receive the Fetch <code>Request</code> and an args object:</p><table tabindex="0"><thead><tr><th>Member</th><th>What it is</th></tr></thead><tbody><tr><td><code>send(message, options?)</code></td><td>Run a model turn on this channel; returns the session handle (options below)</td></tr><tr><td><code>getSession(sessionId)</code></td><td>Look up an existing session on this channel</td></tr><tr><td><code>receive(channelDefinition, input)</code></td><td>Hand off to another channel (schedules use this)</td></tr><tr><td><code>callTool(name, input, options?)</code></td><td>Deterministic server-tool call (<a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a>)</td></tr><tr><td><code>body</code>, <code>query</code>, <code>params</code></td><td>Validated payloads and <code>:param</code> path segments</td></tr><tr><td><code>auth</code></td><td>The <code>AuthContext</code> resolved by this route&#39;s auth chain</td></tr><tr><td><code>requestIp</code></td><td>The TCP peer address</td></tr><tr><td><code>host</code></td><td>Shared services: <code>host.mcp</code>, <code>host.github</code>, <code>host.slack</code>, <code>host.kv</code>, <code>host.files</code>, <code>host.reminders</code></td></tr><tr><td><code>waitUntil(promise)</code></td><td>Background work that outlives the response</td></tr><tr><td><code>sessionUrls(request, sessionId)</code></td><td>Absolute playground + trace URLs for a session on this mount</td></tr><tr><td><code>artifacts</code></td><td>Unbound <a href="./artifacts.html">artifacts</a> facade; pass <code>sessionId</code> in <code>tag</code> input to attribute one</td></tr></tbody></table><p><code>send</code> options: <code>continuationToken</code> (the conversation key), <code>admission</code> (<code>&quot;preempt&quot;</code> interrupts a busy session, the default; <code>&quot;coalesce&quot;</code> enqueues behind the running turn, the <a href="./sessions.html#what-happens-when-i-send-a-follow-up">Slack policy</a>), <code>workspaceFiles</code>, <code>workspaceDir</code>, <code>cloud</code> (attach cloud repos for this session), <code>auth</code> (defaults to the request principal), <code>state</code> (starting channel state for new sessions), <code>title</code> (session display title), and <code>purpose</code> (<code>&quot;eval&quot;</code> marks the session as regression traffic).</p><h2 id="events" tabindex="-1">Events <a class="header-anchor" href="#events" aria-label="Permalink to &quot;Events&quot;">​</a></h2><p>The <code>events</code> map subscribes the channel to stream events for the sessions it owns. Keys are event types from the <a href="./sessions.html#which-events-can-i-stream">event vocabulary</a>, or <code>&quot;*&quot;</code>. Handlers receive <code>(event, channel, ctx)</code>, where <code>channel.state</code> is the per-session adapter state, <code>ctx.session</code> is the session info, and <code>ctx.host</code> is the shared host services, bound to that session as in a <a href="./hooks.html#handler-context">hook</a>. This is where a channel delivers replies back to its surface.</p><h2 id="state-and-lifecycle" tabindex="-1">State and lifecycle <a class="header-anchor" href="#state-and-lifecycle" aria-label="Permalink to &quot;State and lifecycle&quot;">​</a></h2><p><code>state</code> declares the starting per-session adapter state (JSON), persisted on the session record. Routes and event handlers read and mutate it through <code>channel.state</code>. <code>onStart(args)</code> runs when the channel mounts. <code>onStop()</code> runs when the server stops.</p><p><code>onStart</code> receives the route helpers (<code>send</code>, <code>getSession</code>, <code>receive</code>, <code>callTool</code>, <code>host</code>, <code>waitUntil</code>, <code>artifacts</code>, <code>logger</code>) plus helpers for long-lived transports:</p><ul><li><code>emitAssistantMessage(sessionId, text)</code> appends an assistant message without a model turn, for host tasks that already produced the final text.</li><li><code>hasContinuationSession(token)</code> and <code>isContinuationBusy(token)</code> report whether a continuation token has a live session and whether a turn is in flight on it.</li><li><code>interruptContinuation(token)</code> stops the in-flight turn and clears coalesced follow-ups queued behind it.</li><li><code>resolveApproval(sessionId, callId, decision, auth, options?)</code> approves or denies a parked tool call, how Slack Block Kit buttons unblock a turn without the HTTP approvals route.</li></ul><h2 id="auth-policies" tabindex="-1">Auth policies <a class="header-anchor" href="#auth-policies" aria-label="Permalink to &quot;Auth policies&quot;">​</a></h2><p>Every route runs an auth-policy chain: the channel&#39;s <code>auth</code> array, or <code>[localDevStrict()]</code> when unset. A policy is a function <code>(request, info) =&gt; AuthContext | null</code> (async allowed); the first non-null wins, and a request no policy admits gets <code>401</code>.</p><table tabindex="0"><thead><tr><th>Policy</th><th>Admits</th></tr></thead><tbody><tr><td><code>localDevStrict()</code></td><td>Direct loopback callers with no proxy-forwarding headers (<code>X-Forwarded-For</code>, <code>X-Real-IP</code>, <code>Forwarded</code>, and <code>X-Forwarded-Host</code> are all rejected, so tunnels and same-host reverse proxies don&#39;t silently re-expose the route), plus a loopback <code>Host</code> header, which rejects DNS-rebinding callers that reach 127.0.0.1 with a remote hostname.</td></tr><tr><td><code>localDev()</code></td><td>Like <code>localDevStrict()</code> but without the <code>Host</code> check. An explicit, weaker opt-in.</td></tr><tr><td><code>loopbackOnly()</code></td><td>A loopback TCP peer, ignoring forwarding headers; for dev relays that legitimately carry them, like <code>gh webhook forward</code>.</td></tr><tr><td><code>bearerAuth(token)</code></td><td><code>Authorization: Bearer &lt;token&gt;</code>, compared in constant time. Also accepts a verifier function mapping a presented token to an <code>AuthContext</code>.</td></tr><tr><td><code>allowAll()</code></td><td>Everyone, as an <code>anonymous</code> principal. Only for surfaces protected upstream (an HMAC-verified webhook) or intentionally public.</td></tr><tr><td><code>publicEndpoint()</code></td><td>Everyone on this custom channel. Managed hosting also serves the channel without an alias token. Use it only when the handler verifies the provider signature.</td></tr></tbody></table><p><code>publicEndpoint()</code> applies only to custom channel routes. It does not open the built-in session or tool API.</p><p>The resolved <code>AuthContext</code> (<code>{ authenticator, principalId, principalType, attributes? }</code>) becomes the request principal. Sessions bind to the principal that created them, and follow-up, stream, and list routes enforce ownership (<code>403</code> otherwise).</p><p>Server flags interact with authored auth: <code>--bearer-token</code> swaps the default <code>localDevStrict()</code> for <code>bearerAuth(...)</code> on channels that don&#39;t author their own chain, and <code>--allow-anonymous</code> swaps it for <code>allowAll()</code>. Authored <code>auth</code> arrays always win over both. A channel that declares <code>[localDevStrict()]</code> stays loopback-only even on an <code>--allow-anonymous</code> host.</p><h2 id="first-class-channels" tabindex="-1">First class channels <a class="header-anchor" href="#first-class-channels" aria-label="Permalink to &quot;First class channels&quot;">​</a></h2><p><strong>Slack</strong> (<code>@cursor/july/channels/slack</code>): Socket Mode transport, streaming replies, engagement rules, approval cards, and a default block on Slack Connect / guest / other-workspace senders. Author <code>agent/channels/slack.ts</code> with <code>slackChannel()</code>. Guide: <a href="./../guides/slack.html">Slack</a>.</p><p><strong>GitHub</strong> (<code>@cursor/july/channels/github</code>): webhook dispatch with signature verification, per-event hooks returning <code>{ auth }</code> (a model turn), <code>{ task }</code> (host work), or <code>null</code>, and CLI tooling for replay and live forwarding. Author <code>agent/channels/github.ts</code> with <code>githubChannel()</code>. Opt-in <code>progress.commitStatus</code> and <code>progress.banner</code> converge a merge-box check and sticky PR comment from default stream events. Supports GitHub.com and GitHub Enterprise Server. Guide: <a href="./../guides/github.html">GitHub</a>.</p><p><strong>GitLab</strong> (<code>@cursor/july/channels/gitlab</code>): verified project hooks for merge requests, notes, pipelines, pushes, and custom event types. Supports GitLab.com and self-managed GitLab. Author <code>agent/channels/gitlab.ts</code> with <code>gitlabChannel()</code>. Guide: <a href="./../guides/gitlab.html">GitLab</a>.</p><p><strong>Bitbucket</strong> (<code>@cursor/july/channels/bitbucket</code>): verified repository hooks for pull requests, comments, pushes, and custom event types. Supports Bitbucket Cloud and Bitbucket Data Center through one normalized hook API. Author <code>agent/channels/bitbucket.ts</code> with <code>bitbucketChannel()</code>. Guide: <a href="./../guides/bitbucket.html">Bitbucket</a>.</p><p><strong>Deployments</strong> (<code>@cursor/july/channels/deployments</code>): pull deploy events. Declare <code>events</code> and handle each one in <code>onEvent</code>. Each event carries <code>deploySourceUri</code> and <code>deployVersion</code>. Author <code>agent/channels/deployments.ts</code> with <code>deploymentsChannel()</code>.</p><p>On Cursor-managed hosting, omit <code>deploySourceUris</code>. The deployment&#39;s watched repositories bind the event scope automatically. Name sources to narrow the scope or to drive the self-hosted pull relay. Subscribe per deploy source with <code>deploySourceUris</code> and narrow with <code>environments</code> or <code>events</code>. Each entry must match <code>Deployment.deploy_source_uri</code> as your deployment writer records it. Matching is case-insensitive but otherwise literal. It uses the host credential. A restart resumes rather than dropping events. An empty <code>deploySourceUris</code> list mounts the channel but starts no pull, so an env-configured agent stays inert until its deploy sources are set.</p><p><strong>Change Monitors</strong> (<code>@cursor/july/channels/change-monitors</code>): Change Monitor Checkpoint events. The channel publishes Factory <code>checkpoint.created</code> for every Checkpoint create. The agent filters the result (for example to the <code>issues</code> arm). The payload contains the full Checkpoint resource. This channel is scoped to Change Monitors, not generic Factory Checkpoints. There is no repository filter or resource filter. Author <code>agent/channels/change-monitors.ts</code> with <code>changeMonitorsChannel()</code>. It uses the host credential.</p><p><strong>Issues</strong> (<code>@cursor/july/channels/issues</code>): Factory issue events. The channel publishes <code>issue.created</code> for every Issue create. The agent filters if it needs a subset. The payload contains the full Issue resource. There is no repository filter or resource filter. Author <code>agent/channels/issues.ts</code> with <code>issuesChannel()</code>. It uses the host credential.</p><p>For other platforms like Discord or Teams, use the authored <code>defineChannel</code> webhook form.</p><h2 id="continuation-semantics" tabindex="-1">Continuation semantics <a class="header-anchor" href="#continuation-semantics" aria-label="Permalink to &quot;Continuation semantics&quot;">​</a></h2><p>Channels own their continuation-token format. The built-in HTTP channel mints opaque rotating tokens, Slack uses <code>channelId:threadTs</code>, and PR automations use keys like <code>pr:owner/repo#N</code>. Same token, same durable session; one active continuation per session; the HTTP channel returns <code>409</code> for stale tokens. For the full session model, see <a href="./sessions.html">Sessions</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="./../guides/webhooks.html">Webhooks guide</a>: the same API, walked through</li><li><a href="./http-api.html">HTTP API</a>: session, discovery, and channel routes</li><li><a href="./sessions.html">Sessions and streaming</a>: the events channels subscribe to</li></ul>`,43)])])}const u=s(n,[["render",o]]);export{k as __pageData,u as default};
@@ -1 +1 @@
1
- import{_ as e,c as a,o as i,ag as t}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies.","frontmatter":{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),n={name:"reference/channels.md"};function o(h,s,l,r,d,c){return i(),a("div",null,[...s[0]||(s[0]=[t("",45)])])}const u=e(n,[["render",o]]);export{k as __pageData,u as default};
1
+ import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies.","frontmatter":{"title":"Channels","description":"The authoring reference for defineChannel, the built-in HTTP channel, route schemas, handler args, and the auth policies."},"headers":[],"relativePath":"reference/channels.md","filePath":"reference/channels.md"}'),n={name:"reference/channels.md"};function o(h,e,l,r,d,c){return a(),t("div",null,[...e[0]||(e[0]=[i("",43)])])}const u=s(n,[["render",o]]);export{k as __pageData,u as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting.","frontmatter":{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function h(d,s,l,o,p,r){return a(),e("div",null,[...s[0]||(s[0]=[t(`<h1 id="cli-reference" tabindex="-1">CLI reference <a class="header-anchor" href="#cli-reference" aria-label="Permalink to &quot;CLI reference&quot;">​</a></h1><p><code>@cursor/july</code> installs one command, <code>agent-sdk</code>; <code>npx @cursor/july &lt;cmd&gt;</code> runs it. Run the CLI with Node 22.13 or newer. Don&#39;t run it with Bun; Bun corrupts tool-result streams from the Cursor SDK.</p><p><code>agent-sdk help</code> prints the built-in summary. The Slack and GitHub packs also provide <code>agent-sdk slack help</code> and <code>agent-sdk github help</code>.</p><table tabindex="0"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Start local development with <code>serve --dev</code></td></tr><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow local or hosted logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions on a running agent</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect one session</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report per-session token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open the local or hosted playground</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the shipped documentation site locally</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Run one or more turns locally, remotely, or on a hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>Run filesystem evals</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a project, or print the setup guide</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into an agent project</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh coding-agent skills (<code>npm install</code> already copies them)</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered agent surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check a project and fail on errors</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code> / <code>logout</code> / <code>whoami</code></a></td><td>Manage the host&#39;s Cursor credential</td></tr><tr><td><code>version</code></td><td>Print the installed version and exit (also <code>--version</code> / <code>-V</code>)</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents to Cursor managed hosting</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List hosted deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one hosted deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a hosted deployment</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a hosted deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#rotate-pod-credential"><code>rotate-pod-credential</code></a></td><td>Replace a deployment&#39;s pod credential</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Manage deployment secrets</td></tr><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy the agent&#39;s MCP endpoint over stdio; <code>mcp install</code> writes <code>~/.cursor/mcp.json</code></td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize host MCP OAuth; optional <code>--store</code> to deployment secrets</td></tr><tr><td><a href="#slack"><code>slack ...</code></a></td><td>Provision, set up, and check Slack channels</td></tr><tr><td><a href="#github"><code>github ...</code></a></td><td>Forward, replay, and inspect GitHub webhook channels</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Choose a target <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Choose a target&quot;">​</a></h2><p>Request-sending commands support three target types.</p><table tabindex="0"><thead><tr><th>Target</th><th>How to select it</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code>, unless the command uses the localhost default described next</td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>run</code>, <code>call</code>, <code>eval</code>, <code>mcp</code></td></tr><tr><td>Cursor managed hosting</td><td>Pass <code>--prod</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>run</code>, <code>call</code>, <code>eval</code>, <code>mcp</code></td></tr></tbody></table><p><code>chat</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, and <code>playground</code> default to <code>http://127.0.0.1:3000</code>. A <code>--url</code> must include the agent slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> doesn&#39;t change an explicit URL. <code>mcp</code> has no default target; pass <code>--url</code> or <code>--prod</code>.</p><p>With <code>--prod</code>, <code>--slug</code> selects the deployment and <code>--team</code> selects the Cursor team. The slug defaults to the <code>--dir</code> basename. The team defaults to the signed-in account&#39;s team. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><p>Use <code>--bearer-token &lt;token&gt;</code> when a running server requires bearer authentication. Hosted commands use your Cursor credential to request short-lived engine access. <code>--api-key</code> overrides the Cursor credential for <code>login</code>, <code>serve</code>, hosted targets, and managed-hosting commands. <code>--state-root</code> applies to <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, and <code>eval</code> servers. Running and hosted targets ignore it.</p><p>For ephemeral <code>run</code>, <code>call</code>, and <code>eval</code> commands, omitting <code>--slug</code> selects an unslugged root mount when one exists. Otherwise, the Agent SDK selects the first discovered agent.</p><h2 id="serve" tabindex="-1">serve <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;serve&quot;">​</a></h2><p><code>serve</code> hosts every agent under <code>--dir</code> in multi-agent mode by default.</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:#24292E;--shiki-dark:#E1E4E8;"> [--dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pat</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">h</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--port </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">3000]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--host </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">127.0.0.1]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--dev]</span></span>
1
+ import{_ as i,c as e,o as a,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting.","frontmatter":{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function h(d,s,l,o,p,r){return a(),e("div",null,[...s[0]||(s[0]=[t(`<h1 id="cli-reference" tabindex="-1">CLI reference <a class="header-anchor" href="#cli-reference" aria-label="Permalink to &quot;CLI reference&quot;">​</a></h1><p><code>@cursor/july</code> installs one command, <code>agent-sdk</code>; <code>npx @cursor/july &lt;cmd&gt;</code> runs it. Run the CLI with Node 22.13 or newer. Don&#39;t run it with Bun; Bun corrupts tool-result streams from the Cursor SDK.</p><p><code>agent-sdk help</code> prints the built-in summary. The Slack and GitHub packs also provide <code>agent-sdk slack help</code> and <code>agent-sdk github help</code>.</p><table tabindex="0"><thead><tr><th>Command</th><th>Description</th></tr></thead><tbody><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Start local development with <code>serve --dev</code></td></tr><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow local or hosted logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions on a running agent</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect one session</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report per-session token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open the local or hosted playground</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the shipped documentation site locally</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Run one or more turns locally, remotely, or on a hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>Run filesystem evals</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a project, or print the setup guide</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into an agent project</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh coding-agent skills (<code>npm install</code> already copies them)</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered agent surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check a project and fail on errors</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code> / <code>logout</code> / <code>whoami</code></a></td><td>Manage the host&#39;s Cursor credential</td></tr><tr><td><code>version</code></td><td>Print the installed version and exit (also <code>--version</code> / <code>-V</code>)</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents to Cursor managed hosting</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List hosted deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one hosted deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a hosted deployment</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a hosted deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment&#39;s alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Manage deployment secrets</td></tr><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy the agent&#39;s MCP endpoint over stdio; <code>mcp install</code> writes <code>~/.cursor/mcp.json</code></td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize host MCP OAuth; optional <code>--store</code> to deployment secrets</td></tr><tr><td><a href="#slack"><code>slack ...</code></a></td><td>Provision, set up, and check Slack channels</td></tr><tr><td><a href="#github"><code>github ...</code></a></td><td>Forward, replay, and inspect GitHub webhook channels</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Choose a target <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to &quot;Choose a target&quot;">​</a></h2><p>Request-sending commands support three target types.</p><table tabindex="0"><thead><tr><th>Target</th><th>How to select it</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url &lt;baseUrl&gt;</code>, unless the command uses the localhost default described next</td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>run</code>, <code>call</code>, <code>eval</code>, <code>mcp</code></td></tr><tr><td>Cursor managed hosting</td><td>Pass <code>--prod</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>run</code>, <code>call</code>, <code>eval</code>, <code>mcp</code></td></tr></tbody></table><p><code>chat</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, and <code>playground</code> default to <code>http://127.0.0.1:3000</code>. A <code>--url</code> must include the agent slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> doesn&#39;t change an explicit URL. <code>mcp</code> has no default target; pass <code>--url</code> or <code>--prod</code>.</p><p>With <code>--prod</code>, <code>--slug</code> selects the deployment and <code>--team</code> selects the Cursor team. The slug defaults to the <code>--dir</code> basename. The team defaults to the signed-in account&#39;s team. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><p>Use <code>--bearer-token &lt;token&gt;</code> when a running server requires bearer authentication. Hosted commands use your Cursor credential to request short-lived engine access. <code>--api-key</code> overrides the Cursor credential for <code>login</code>, <code>serve</code>, hosted targets, and managed-hosting commands. <code>--state-root</code> applies to <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, and <code>eval</code> servers. Running and hosted targets ignore it.</p><p>For ephemeral <code>run</code>, <code>call</code>, and <code>eval</code> commands, omitting <code>--slug</code> selects an unslugged root mount when one exists. Otherwise, the Agent SDK selects the first discovered agent.</p><h2 id="serve" tabindex="-1">serve <a class="header-anchor" href="#serve" aria-label="Permalink to &quot;serve&quot;">​</a></h2><p><code>serve</code> hosts every agent under <code>--dir</code> in multi-agent mode by default.</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:#24292E;--shiki-dark:#E1E4E8;"> [--dir </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">pat</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">h</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--port </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">3000]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--host </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">127.0.0.1]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--dev]</span></span>
2
2
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--mode multi</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">single] [--api-key </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">key</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
3
3
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--state-root </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">path</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--bearer-token </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">secret</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> |</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> --allow-anonymous]</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--allow-anonymous-cursor-github]</span></span>
@@ -61,7 +61,7 @@ import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.BCISBCiQ.js";const c
61
61
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--repo </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">https-url</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--ref </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">git-ref</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--path </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">agent-path</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
62
62
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--cursor-events-repo owner/name]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span></span>
63
63
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--allow-domain </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">domain</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">...</span></span>
64
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires team membership and the team&#39;s cloud-agent entitlement. A team service-account API key with agent access can deploy. <code>--team</code> defaults to the signed-in account&#39;s team.</p><p>For a single project, the slug defaults to a normalized version of the directory name. Deployment slugs contain lowercase letters, digits, <code>_</code>, or <code>-</code>, with a maximum of 64 characters. For a directory with several agents, select one with <code>--slug</code>, deploy all with <code>--all</code>, or choose from the TTY prompt. Non-interactive callers must pass <code>--slug</code> or <code>--all</code>. If <code>--dir</code> contains no agent project or child agents, <code>deploy</code> requires <code>--slug</code> (or a slug derived from the directory name) and an https git repository URL (<code>--repo</code>, or inferred from <code>origin</code> when <code>--dir</code> is an agent project). <code>--all</code> fails when there is no agent project.</p><p>The command infers <code>--repo</code>, <code>--ref</code>, and <code>--path</code> from the current Git checkout when possible. Explicit flags take precedence. <code>--repo</code> must use HTTPS. Repeat <code>--cursor-events-repo</code> to select SCM event sources. Repeat <code>--allow-domain</code> to add engine egress domains; these values are combined with <code>hosting.egressDomains</code> from the agent config. Egress domains apply only to repository-backed deployments. Each domain must be a lowercase hostname with at least two labels and an alphabetic top-level domain. One leading <code>*.</code> wildcard is allowed. A deployment can declare at most 20 domains.</p><p>By default, the command polls every three seconds for up to ten minutes and succeeds only when the deployment reaches <code>running</code>. <code>--no-wait</code> returns after the deployment request is accepted. Multi-agent deploys run sequentially. When several agents are selected, <code>--path</code> is ignored and each project infers its own path. A single-target <code>--json</code> run prints one object; a multi-target run prints an array.</p><p>The first deployment can return an alias token. It appears once in text or JSON output and can&#39;t be retrieved later. Store it as a secret. Send it as <code>X-Agent-Alias-Token</code> when calling the stable alias URL, or use it to sign in to the hosted playground.</p><p>See <a href="./../deployment.html">Deployment</a> for the hosting security model and state layout.</p><h2 id="deployments" tabindex="-1">deployments <a class="header-anchor" href="#deployments" aria-label="Permalink to &quot;deployments&quot;">​</a></h2><p><code>deployments</code> lists the selected team&#39;s deployments.</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;"> deployments</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>Text output shows each slug, status, deployment kind, and update time. <code>--json</code> prints <code>{ deployments }</code>.</p><h2 id="deployment" tabindex="-1">deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to &quot;deployment&quot;">​</a></h2><p><code>deployment</code> prints the full status of one deployment.</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;"> deployment</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>Text output includes status, kind, alias, source, egress domains, secret names, engine state, and the last error when present. <code>--json</code> returns the full API response. It can include short-lived <code>engineAccess.headers</code>, so handle JSON output as a credential.</p><h2 id="stop" tabindex="-1">stop <a class="header-anchor" href="#stop" aria-label="Permalink to &quot;stop&quot;">​</a></h2><p><code>stop</code> shuts down a deployment.</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;"> stop</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>The command polls for up to ten minutes until the status reaches <code>stopped</code>. <code>--no-wait</code> returns after the stop request is accepted.</p><h2 id="delete" tabindex="-1">delete <a class="header-anchor" href="#delete" aria-label="Permalink to &quot;delete&quot;">​</a></h2><p><code>delete</code> removes a hosted deployment. You can delete a deployment that still runs. The command frees the slug. A later deploy can use the same name. Spend stays on the archived service account.</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;"> delete</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>The command waits until the deployment is gone. <code>--no-wait</code> returns after the delete request is accepted. Architecture v2 slugs use the Agent SDK control plane. Architecture v1 slugs use the Agent Serve control plane.</p><h2 id="rotate-token" tabindex="-1">rotate-token <a class="header-anchor" href="#rotate-token" aria-label="Permalink to &quot;rotate-token&quot;">​</a></h2><p><code>rotate-token</code> replaces the alias token used by callers and the hosted playground.</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;"> rotate-token</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>The old token stops working immediately. The replacement is shown once. <code>--json</code> prints <code>{ aliasToken }</code>.</p><h2 id="rotate-pod-credential" tabindex="-1">rotate-pod-credential <a class="header-anchor" href="#rotate-pod-credential" aria-label="Permalink to &quot;rotate-pod-credential&quot;">​</a></h2><p><code>rotate-pod-credential</code> replaces the credential used by the running engine pod.</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;"> rotate-pod-credential</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>The command prints only the masked key (<code>--json</code> prints <code>{ podCredentialMaskedKey }</code>). The running pod keeps the old credential until the next deploy, so nothing breaks in between. Run <code>agent-sdk deploy --slug &lt;slug&gt;</code> to inject the replacement and retire the old credential.</p><h2 id="mcp" tabindex="-1">mcp <a class="header-anchor" href="#mcp" aria-label="Permalink to &quot;mcp&quot;">​</a></h2><p><code>mcp</code> proxies an agent&#39;s MCP endpoint over stdio for MCP clients that spawn local servers, such as Cursor.</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;"> mcp</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--slug </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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span></span>
64
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires team membership and the team&#39;s cloud-agent entitlement. A team service-account API key with agent access can deploy. <code>--team</code> defaults to the signed-in account&#39;s team.</p><p>For a single project, the slug defaults to a normalized version of the directory name. Deployment slugs contain lowercase letters, digits, <code>_</code>, or <code>-</code>, with a maximum of 64 characters. For a directory with several agents, select one with <code>--slug</code>, deploy all with <code>--all</code>, or choose from the TTY prompt. Non-interactive callers must pass <code>--slug</code> or <code>--all</code>. If <code>--dir</code> contains no agent project or child agents, <code>deploy</code> requires <code>--slug</code> (or a slug derived from the directory name) and an https git repository URL (<code>--repo</code>, or inferred from <code>origin</code> when <code>--dir</code> is an agent project). <code>--all</code> fails when there is no agent project.</p><p>The command infers <code>--repo</code>, <code>--ref</code>, and <code>--path</code> from the current Git checkout when possible. Explicit flags take precedence. <code>--repo</code> must use HTTPS. Repeat <code>--cursor-events-repo</code> to select SCM event sources. Repeat <code>--allow-domain</code> to add engine egress domains; these values are combined with <code>hosting.egressDomains</code> from the agent config. Egress domains apply only to repository-backed deployments. Each domain must be a lowercase hostname with at least two labels and an alphabetic top-level domain. One leading <code>*.</code> wildcard is allowed. A deployment can declare at most 20 domains.</p><p>By default, the command polls every three seconds for up to ten minutes and succeeds only when the deployment reaches <code>running</code>. <code>--no-wait</code> returns after the deployment request is accepted. Multi-agent deploys run sequentially. When several agents are selected, <code>--path</code> is ignored and each project infers its own path. A single-target <code>--json</code> run prints one object; a multi-target run prints an array.</p><p>The first deployment can return an alias token. It appears once in text or JSON output and can&#39;t be retrieved later. Store it as a secret. Send it as <code>X-Agent-Alias-Token</code> when calling the stable alias URL, or use it to sign in to the hosted playground.</p><p>See <a href="./../deployment.html">Deployment</a> for the hosting security model and state layout.</p><h2 id="deployments" tabindex="-1">deployments <a class="header-anchor" href="#deployments" aria-label="Permalink to &quot;deployments&quot;">​</a></h2><p><code>deployments</code> lists the selected team&#39;s deployments.</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;"> deployments</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>Text output shows each slug, status, deployment kind, and update time. <code>--json</code> prints <code>{ deployments }</code>.</p><h2 id="deployment" tabindex="-1">deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to &quot;deployment&quot;">​</a></h2><p><code>deployment</code> prints the full status of one deployment.</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;"> deployment</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>Text output includes status, kind, alias, source, egress domains, secret names, engine state, and the last error when present. <code>--json</code> returns the full API response. It can include short-lived <code>engineAccess.headers</code>, so handle JSON output as a credential.</p><h2 id="stop" tabindex="-1">stop <a class="header-anchor" href="#stop" aria-label="Permalink to &quot;stop&quot;">​</a></h2><p><code>stop</code> shuts down a deployment.</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;"> stop</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>The command polls for up to ten minutes until the status reaches <code>stopped</code>. <code>--no-wait</code> returns after the stop request is accepted.</p><h2 id="delete" tabindex="-1">delete <a class="header-anchor" href="#delete" aria-label="Permalink to &quot;delete&quot;">​</a></h2><p><code>delete</code> removes a hosted deployment. You can delete a deployment that still runs. The command frees the slug. A later deploy can use the same name. Spend stays on the archived service account.</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;"> delete</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--no-wait] [--json]</span></span></code></pre></div><p>The command waits until the deployment is gone. <code>--no-wait</code> returns after the delete request is accepted. Architecture v2 slugs use the Agent SDK control plane. Architecture v1 slugs use the Agent Serve control plane.</p><h2 id="rotate-token" tabindex="-1">rotate-token <a class="header-anchor" href="#rotate-token" aria-label="Permalink to &quot;rotate-token&quot;">​</a></h2><p><code>rotate-token</code> replaces the alias token used by callers and the hosted playground.</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;"> rotate-token</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:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span></code></pre></div><p>The old token stops working immediately. The replacement is shown once. <code>--json</code> prints <code>{ aliasToken }</code>.</p><h2 id="mcp" tabindex="-1">mcp <a class="header-anchor" href="#mcp" aria-label="Permalink to &quot;mcp&quot;">​</a></h2><p><code>mcp</code> proxies an agent&#39;s MCP endpoint over stdio for MCP clients that spawn local servers, such as Cursor.</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;"> mcp</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --prod</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--slug </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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span></span>
65
65
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --url</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">baseUr</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">l</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--bearer-token </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">toke</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">n</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">]</span></span>
66
66
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--prod </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> --url</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">baseUr</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">l</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--name </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">serverNam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">]</span></span>
67
67
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--print] [--json] [--remote]</span></span></code></pre></div><p>The bare command reads newline-delimited JSON-RPC on stdin and forwards one POST per message to <code>&lt;target&gt;/v1/mcp</code>. It requires <code>--prod</code> or <code>--url</code>. With <code>--prod</code>, it resolves the hosted deployment through the signed-in Cursor account and re-mints short-lived engine credentials as they expire, so no durable secret lands in a config file. stdout is reserved for the MCP wire; logging goes to stderr.</p><p><code>mcp install</code> writes the matching entry into <code>~/.cursor/mcp.json</code> so the agent shows up as an MCP server in Cursor. <code>--name</code> overrides the server name (the default is the slug, or a name derived from <code>--url</code>). <code>--print</code> prints the entry instead of writing the file, and <code>--json</code> prints a machine-readable result. <code>--remote</code> (with <code>--prod</code>) writes a remote HTTP entry pointing at the stable Cursor MCP gateway instead of the local stdio proxy, for MCP hosts that can&#39;t spawn stdio servers. The remote entry carries your API key in plain text, so treat the file as a credential.</p><h2 id="mcp-oauth" tabindex="-1">mcp oauth <a class="header-anchor" href="#mcp-oauth" aria-label="Permalink to &quot;mcp oauth&quot;">​</a></h2><p><code>mcp oauth</code> authorizes a <code>defineConnection({ url, oauth: true })</code> or <code>defineConnection({ cursorAccount: true })</code> connection.</p><p>URL connections run a browser PKCE flow. Tokens are written to <code>mcp-auth.json</code> under the CLI config directory (override with <code>AGENT_SERVE_CONFIG_DIR</code>). Pass <code>--store</code> to upsert matching <code>MCP_OAUTH_&lt;CONNECTION&gt;_*</code> secrets on the hosted deployment. <code>--store</code> is the path for the next deploy. Hosted Connect lets the current process retry.</p><p>Cursor-account connections authorize the hosted deployment&#39;s service account through the Cursor backend&#39;s connector consent flow. Those tokens live on the Cursor backend, so <code>--store</code> isn&#39;t needed; the command prints a note when you pass it anyway.</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;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> oauth</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">connectio</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">n</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--dir </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--store] [--slug </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">slug</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span></code></pre></div><p><code>&lt;connection&gt;</code> is the basename under <code>agent/mcp-connections/</code> or <code>agent/host-connections/</code>. <code>--slug</code> defaults to the <code>--dir</code> basename. <code>--team</code> defaults to the signed-in account&#39;s team. You need <code>agent-sdk login</code> (or <code>--api-key</code>) before <code>--store</code>.</p><p>Secret names are <code>MCP_OAUTH_&lt;NAME&gt;_ACCESS_TOKEN</code>, <code>_REFRESH_TOKEN</code>, and <code>_CLIENT_ID</code> (<code>&lt;NAME&gt;</code> is the connection id in upper snake case). Declare them in <code>hosting.secretNames</code> so deploy validation expects them. Secrets apply on the next deploy.</p><p>Tokens are bound to the connection&#39;s resource URL. Changing the URL invalidates the local entry; run <code>mcp oauth</code> again.</p><p>See the <a href="./../guides/mcp-oauth.html">Host MCP OAuth guide</a>.</p><h2 id="secrets" tabindex="-1">secrets <a class="header-anchor" href="#secrets" aria-label="Permalink to &quot;secrets&quot;">​</a></h2><p><code>secrets</code> manages environment secrets for a deployment.</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;"> secrets</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> set</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;"> NAME</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [NAME2 </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--team </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</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;">]</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--json]</span></span>
@@ -90,4 +90,4 @@ import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.BCISBCiQ.js";const c
90
90
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--events a,b,c</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;*&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--action </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">action</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--conclusion </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">result</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
91
91
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--comment </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">body</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--context </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">name</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--slug </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">slug</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--channel </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
92
92
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--host </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">host</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--port </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">n</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--url </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">url</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--secret </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">secret</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
93
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--dry-run] [--out </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">dir</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--json]</span></span></code></pre></div><p><code>github events</code> prints each discovered channel&#39;s delivery URL and event set. When it finds no channels, it returns an empty result and exits successfully.</p><p><code>github forward</code> wraps <code>gh webhook forward</code>. It infers the repository from the Git remote when you omit <code>--repo</code> and <code>--org</code>. URLs and events come from the discovered channels; <code>--events</code> overrides the event set. Use <code>--slug</code> or <code>--channel</code> to narrow discovery when several channels match. Otherwise, one local proxy fans deliveries out to every match. <code>--url</code> targets one channel. For <code>forward</code>, pass <code>--events</code> when no matched channel can supply the event set.</p><p>Repository forwarding needs repo-admin access. Organization forwarding needs org-owner access. The relay authenticates with the GitHub CLI&#39;s stored login. A <code>GITHUB_TOKEN</code> or <code>GH_TOKEN</code> environment override can make delivery requests return <code>401</code>, even when hook creation succeeds. Unset those variables before forwarding.</p><p>Pass <code>--secret</code> or set <code>GITHUB_WEBHOOK_SECRET</code> to sign deliveries. <code>serve --dev</code> accepts unsigned loopback deliveries. A non-dev target requires the same secret on both sides.</p><p><code>github replay</code> needs read access, not admin access. It reads the pull request through <code>gh api</code>, builds GitHub webhook payloads, and posts them to the selected channels. Supported events are <code>pull_request</code>, <code>issue_comment</code>, <code>pull_request_review_comment</code>, <code>check_run</code>, <code>check_suite</code>, <code>workflow_run</code>, and <code>status</code>. The default is <code>pull_request</code> with action <code>synchronize</code>. Comment events need <code>--comment</code>.</p><p>Use <code>--events &#39;*&#39;</code> to replay every supported event declared by the channel. <code>--dry-run</code> prints payloads without posting them. <code>--out</code> writes fixture files but still posts unless you also pass <code>--dry-run</code>.</p><p><code>github doctor</code> checks <code>gh</code>, its login, and the pinned <code>cli/gh-webhook</code> extension. <code>--install</code> installs or repairs the extension. An environment-token override is a warning and doesn&#39;t make <code>github doctor</code> fail.</p><p>See the <a href="./../guides/github.html">GitHub guide</a>.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>These environment variables affect the CLI and its channel packs.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Meaning</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential. It takes precedence over <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, and the stored login.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file. Used when <code>CURSOR_API_KEY</code> is unset. When this variable is unset, the hosted default <code>/run/cursor/secrets/CURSOR_API_KEY</code> is tried. A present file takes precedence over <code>CURSOR_SERVICE_ACCOUNT_KEY</code> and the stored login.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential. Used when <code>CURSOR_API_KEY</code> and <code>CURSOR_API_KEY_FILE</code> (including the hosted default path) are unset. It takes precedence over the stored login.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend used by login, account, deployment, and event-relay RPCs.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend used by the Cursor SDK harness.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Directory for stored credentials and update-check state. Defaults to the CLI config directory under <code>~/.config</code>.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code> / <code>NO_UPDATE_NOTIFIER</code></td><td>Disable the automatic published-version check when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>CI</code></td><td>Disable the automatic published-version check when set.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signing secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code> / <code>GITHUB_APP_PRIVATE_KEY</code> / <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App authentication for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code> / <code>GH_TOKEN</code></td><td>Token authentication for outbound API calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code> / <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code> for each agent on a multi-agent host.</td></tr></tbody></table><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><ul><li><a href="./project-layout.html">Project layout</a>: files the CLI discovers</li><li><a href="./http-api.html">HTTP API</a>: routes used by <code>chat</code>, <code>call</code>, and other clients</li><li><a href="./../deployment.html">Deployment</a>: production auth, state, and operations</li></ul>`,201)])])}const g=i(n,[["render",h]]);export{c as __pageData,g as default};
93
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> [--dry-run] [--out </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">dir</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] [--json]</span></span></code></pre></div><p><code>github events</code> prints each discovered channel&#39;s delivery URL and event set. When it finds no channels, it returns an empty result and exits successfully.</p><p><code>github forward</code> wraps <code>gh webhook forward</code>. It infers the repository from the Git remote when you omit <code>--repo</code> and <code>--org</code>. URLs and events come from the discovered channels; <code>--events</code> overrides the event set. Use <code>--slug</code> or <code>--channel</code> to narrow discovery when several channels match. Otherwise, one local proxy fans deliveries out to every match. <code>--url</code> targets one channel. For <code>forward</code>, pass <code>--events</code> when no matched channel can supply the event set.</p><p>Repository forwarding needs repo-admin access. Organization forwarding needs org-owner access. The relay authenticates with the GitHub CLI&#39;s stored login. A <code>GITHUB_TOKEN</code> or <code>GH_TOKEN</code> environment override can make delivery requests return <code>401</code>, even when hook creation succeeds. Unset those variables before forwarding.</p><p>Pass <code>--secret</code> or set <code>GITHUB_WEBHOOK_SECRET</code> to sign deliveries. <code>serve --dev</code> accepts unsigned loopback deliveries. A non-dev target requires the same secret on both sides.</p><p><code>github replay</code> needs read access, not admin access. It reads the pull request through <code>gh api</code>, builds GitHub webhook payloads, and posts them to the selected channels. Supported events are <code>pull_request</code>, <code>issue_comment</code>, <code>pull_request_review_comment</code>, <code>check_run</code>, <code>check_suite</code>, <code>workflow_run</code>, and <code>status</code>. The default is <code>pull_request</code> with action <code>synchronize</code>. Comment events need <code>--comment</code>.</p><p>Use <code>--events &#39;*&#39;</code> to replay every supported event declared by the channel. <code>--dry-run</code> prints payloads without posting them. <code>--out</code> writes fixture files but still posts unless you also pass <code>--dry-run</code>.</p><p><code>github doctor</code> checks <code>gh</code>, its login, and the pinned <code>cli/gh-webhook</code> extension. <code>--install</code> installs or repairs the extension. An environment-token override is a warning and doesn&#39;t make <code>github doctor</code> fail.</p><p>See the <a href="./../guides/github.html">GitHub guide</a>.</p><h2 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;">​</a></h2><p>These environment variables affect the CLI and its channel packs.</p><table tabindex="0"><thead><tr><th>Variable</th><th>Meaning</th></tr></thead><tbody><tr><td><code>CURSOR_API_KEY</code></td><td>Cursor credential. It takes precedence over <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, and the stored login.</td></tr><tr><td><code>CURSOR_API_KEY_FILE</code></td><td>Path to a Cursor credential file. Used when <code>CURSOR_API_KEY</code> is unset. When this variable is unset, the hosted default <code>/run/cursor/secrets/CURSOR_API_KEY</code> is tried. A present file takes precedence over <code>CURSOR_SERVICE_ACCOUNT_KEY</code> and the stored login.</td></tr><tr><td><code>CURSOR_SERVICE_ACCOUNT_KEY</code></td><td>Team service-account credential. Used when <code>CURSOR_API_KEY</code> and <code>CURSOR_API_KEY_FILE</code> (including the hosted default path) are unset. It takes precedence over the stored login.</td></tr><tr><td><code>CURSOR_API_BASE_URL</code></td><td>Backend used by login, account, deployment, and event-relay RPCs.</td></tr><tr><td><code>CURSOR_BACKEND_URL</code></td><td>Backend used by the Cursor SDK harness.</td></tr><tr><td><code>AGENT_SERVE_CONFIG_DIR</code></td><td>Directory for stored credentials and update-check state. Defaults to the CLI config directory under <code>~/.config</code>.</td></tr><tr><td><code>AGENT_SERVE_NO_UPDATE_CHECK</code> / <code>NO_UPDATE_NOTIFIER</code></td><td>Disable the automatic published-version check when set to a non-empty value other than <code>0</code>.</td></tr><tr><td><code>CI</code></td><td>Disable the automatic published-version check when set.</td></tr><tr><td><code>GITHUB_WEBHOOK_SECRET</code></td><td>Default signing secret for GitHub forwarding and replay.</td></tr><tr><td><code>GITHUB_APP_ID</code> / <code>GITHUB_APP_PRIVATE_KEY</code> / <code>GITHUB_APP_INSTALLATION_ID</code></td><td>GitHub App authentication for outbound API calls.</td></tr><tr><td><code>GITHUB_TOKEN</code> / <code>GH_TOKEN</code></td><td>Token authentication for outbound API calls. Unset both for <code>github forward</code>.</td></tr><tr><td><code>SLACK_BOT_TOKEN</code> / <code>SLACK_APP_TOKEN</code></td><td>Slack tokens for one agent. Use <code>&lt;PREFIX&gt;_SLACK_BOT_TOKEN</code> and <code>&lt;PREFIX&gt;_SLACK_APP_TOKEN</code> for each agent on a multi-agent host.</td></tr></tbody></table><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><ul><li><a href="./project-layout.html">Project layout</a>: files the CLI discovers</li><li><a href="./http-api.html">HTTP API</a>: routes used by <code>chat</code>, <code>call</code>, and other clients</li><li><a href="./../deployment.html">Deployment</a>: production auth, state, and operations</li></ul>`,197)])])}const g=i(n,[["render",h]]);export{c as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as i,c as e,o as a,ag as t}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse('{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting.","frontmatter":{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function h(d,s,l,o,p,r){return a(),e("div",null,[...s[0]||(s[0]=[t("",201)])])}const g=i(n,[["render",h]]);export{c as __pageData,g as default};
1
+ import{_ as i,c as e,o as a,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting.","frontmatter":{"title":"CLI","description":"Commands and common flags for local development, running servers, and Cursor-managed hosting."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),n={name:"reference/cli.md"};function h(d,s,l,o,p,r){return a(),e("div",null,[...s[0]||(s[0]=[t("",197)])])}const g=i(n,[["render",h]]);export{c as __pageData,g as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse(`{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="mcp-connections" tabindex="-1">MCP Connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP Connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. One file per server under <code>agent/mcp-connections/</code>, and the filename becomes the server name the model sees. An MCP connection default-exports <code>defineConnection</code> from <code>@cursor/july/connections</code>, and the transport comes in four shapes: remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, and peer agents on the same host.</p><p>Put a server in <code>agent/host-connections/</code> when host tools should call it and the model should not. Same <code>defineConnection</code> shape. <code>agent-sdk mcp oauth</code> still works. The playground and the turn&#39;s MCP servers never see those files.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</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;"> { 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>
1
+ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse(`{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="mcp-connections" tabindex="-1">MCP Connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP Connections&quot;">​</a></h1><p>An MCP connection gives the agent tools from an MCP server. One file per server under <code>agent/mcp-connections/</code>, and the filename becomes the server name the model sees. An MCP connection default-exports <code>defineConnection</code> from <code>@cursor/july/connections</code>, and the transport comes in four shapes: remote HTTP, local stdio, the signed-in Cursor account&#39;s connectors, and peer agents on the same host.</p><p>Put a server in <code>agent/host-connections/</code> when host tools should call it and the model should not. Same <code>defineConnection</code> shape. <code>agent-sdk mcp oauth</code> still works. The playground and the turn&#39;s MCP servers never see those files.</p><h2 id="remote-mcp-server" tabindex="-1">Remote MCP server <a class="header-anchor" href="#remote-mcp-server" aria-label="Permalink to &quot;Remote MCP server&quot;">​</a></h2><p>Point an MCP connection at a remote server with a URL.</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;"> { 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>
2
2
  <span class="line"></span>
3
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;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
4
4
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://mcp.linear.app/mcp&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
@@ -8,7 +8,7 @@ import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.BCISBCiQ.js";const c
8
8
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> oauth: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
9
9
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><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;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> oauth</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> inventory</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # browser PKCE → local mcp-auth.json</span></span>
10
10
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> oauth</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> inventory</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --store</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # also upsert deployment secrets</span></span>
11
- <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Hosted Connect retries this process. Self-hosted stays file-only.</span></span></code></pre></div><p>Full walkthrough: <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>. Companion skill: <a href="./../skills/mcp-auth.html"><code>skills/mcp-auth/SKILL.md</code></a>.</p><p>Account MCP (<code>cursorAccount: true</code>) is the right choice for connectors already linked in the Cursor dashboard. Omit <code>servers</code> (or pass <code>&quot;*&quot;</code>) to forward every connected connector. If the model should call those tools by name on local turns, set <code>advertiseTools: true</code>.</p><h2 id="per-session-auth-auth" tabindex="-1">Per-session auth (<code>auth</code>) <a class="header-anchor" href="#per-session-auth-auth" aria-label="Permalink to &quot;Per-session auth (\`auth\`)&quot;">​</a></h2><p>For http/sse connections whose credential depends on <strong>who the session is for</strong> (a multi-tenant agent asserting the tenant it is acting for), declare an <code>auth</code> callback instead of static headers. It runs host-side at turn-build time with the session&#39;s <code>SessionInfo</code> and returns headers merged over the static ones:</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;">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>
11
+ <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Hosted Connect retries this process. Self-hosted stays file-only.</span></span></code></pre></div><p>Full walkthrough: <a href="./../guides/mcp-oauth.html">Host MCP OAuth</a>. Companion skill: <a href="./../../skills/mcp-auth/SKILL.html"><code>skills/mcp-auth/SKILL.md</code></a>.</p><p>Account MCP (<code>cursorAccount: true</code>) is the right choice for connectors already linked in the Cursor dashboard. Omit <code>servers</code> (or pass <code>&quot;*&quot;</code>) to forward every connected connector. If the model should call those tools by name on local turns, set <code>advertiseTools: true</code>.</p><h2 id="per-session-auth-auth" tabindex="-1">Per-session auth (<code>auth</code>) <a class="header-anchor" href="#per-session-auth-auth" aria-label="Permalink to &quot;Per-session auth (\`auth\`)&quot;">​</a></h2><p>For http/sse connections whose credential depends on <strong>who the session is for</strong> (a multi-tenant agent asserting the tenant it is acting for), declare an <code>auth</code> callback instead of static headers. It runs host-side at turn-build time with the session&#39;s <code>SessionInfo</code> and returns headers merged over the static ones:</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;">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>
12
12
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;https://api.cursor.com/v1/mcp/plugins&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
13
13
  <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> auth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">async</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">session</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;"> ({</span></span>
14
14
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> headers: { Authorization: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`Bearer \${</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">await</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> grantFor</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">(</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">session</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">)</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
@@ -60,7 +60,7 @@ import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.BCISBCiQ.js";const c
60
60
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Name the file <code>account.ts</code>. <code>cursor.ts</code> collides with the IDE <code>cursor</code> MCP namespace. <code>advertiseTools: true</code> puts connector tools on local turns by name. Without it they sit behind harness meta-tools.</p><p>The host must be signed in (<code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>). <code>serve</code> fails fast at startup otherwise, and logs each connector&#39;s live status (<code>connected</code>, <code>needsAuth</code>, <code>error</code>) as it starts.</p><p>Filtered account connections work on managed cloud deployments. A self-hosted cloud agent with a concrete <code>servers</code> list needs <code>--public-url</code>. Serve fails instead of ignoring the filter. Use a <code>{ command }</code> connection for stdio servers.</p><div class="caution custom-block github-alert"><p class="custom-block-title">CAUTION</p><p>Whoever can talk to the agent can drive these connectors, because they are ordinary agent tools. <code>serve</code> refuses to start when <code>--allow-anonymous</code> is combined with account MCP connections unless you also pass <code>--allow-anonymous-cursor-account-mcp</code> (trusted boundary only; for example an SSO proxy or the hosted alias token). Prefer <code>--bearer-token</code> on shared hosts.</p></div><h2 id="peer-mcp-connection" tabindex="-1">Peer MCP connection <a class="header-anchor" href="#peer-mcp-connection" aria-label="Permalink to &quot;Peer MCP connection&quot;">​</a></h2><p><code>{ agent: &quot;&lt;slug&gt;&quot; }</code> addresses another agent mounted on the same serve host. The model gets the peer&#39;s <code>ask</code> and <code>check</code> (and <code>call_tool</code>) tools and can delegate work to it:</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;">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>
61
61
  <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>
62
62
  <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>
63
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Unknown slugs and self-references fail <code>serve</code> at startup. Resolution (loopback versus <code>--public-url</code>), loop caveats, and the delegation model are in the <a href="./../guides/agent-to-agent.html">Agent-to-agent guide</a>.</p><h2 id="every-model-visible-mcp-connection-is-available-in-three-places" tabindex="-1">Every model-visible MCP connection is available in three places <a class="header-anchor" href="#every-model-visible-mcp-connection-is-available-in-three-places" aria-label="Permalink to &quot;Every model-visible MCP connection is available in three places&quot;">​</a></h2><p>A file under <code>agent/mcp-connections/</code> serves three consumers. Host connections skip the first one.</p><ol><li><p><strong>Cursor agent:</strong> Attached connections ride SDK <code>mcpServers</code> behind harness MCP meta-tools. Set <code>advertiseTools: true</code> so local turns see named tools.</p></li><li><p><strong>Server tools:</strong> Deterministic host code composes MCP calls through <code>ctx.host.mcp</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;">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>
63
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Unknown slugs and self-references fail <code>serve</code> at startup. Walkthrough: <a href="./../guides/agent-to-agent.html#how-do-i-wire-two-agents">Agent-to-agent</a>.</p><h2 id="every-model-visible-mcp-connection-is-available-in-three-places" tabindex="-1">Every model-visible MCP connection is available in three places <a class="header-anchor" href="#every-model-visible-mcp-connection-is-available-in-three-places" aria-label="Permalink to &quot;Every model-visible MCP connection is available in three places&quot;">​</a></h2><p>A file under <code>agent/mcp-connections/</code> serves three consumers. Host connections skip the first one.</p><ol><li><p><strong>Cursor agent:</strong> Attached connections ride SDK <code>mcpServers</code> behind harness MCP meta-tools. Set <code>advertiseTools: true</code> so local turns see named tools.</p></li><li><p><strong>Server tools:</strong> Deterministic host code composes MCP calls through <code>ctx.host.mcp</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;">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>
64
64
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Search Linear issues.&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
65
65
  <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;">({ query: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() }),</span></span>
66
66
  <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;">query</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>
@@ -72,4 +72,4 @@ import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.BCISBCiQ.js";const c
72
72
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> result</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;linear&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;list_issues&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, {});</span></span>
73
73
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Response.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">json</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(result);</span></span>
74
74
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
75
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div></li></ol><p>The host registry is small: <code>host.mcp.names()</code> lists MCP connection names, and <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> open the client lazily on first use.</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="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, <code>--store</code></li><li><a href="./../guides/agent-to-agent.html">Agent-to-agent</a>: peers in depth</li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li></ul>`,54)])])}const E=i(t,[["render",h]]);export{c as __pageData,E as default};
75
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div></li></ol><p>The host registry is small: <code>host.mcp.names()</code> lists MCP connection names, and <code>listTools(name)</code> / <code>callTool(name, tool, args)</code> open the client lazily on first use.</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="./../guides/mcp-oauth.html">Host MCP OAuth</a>: <code>mcp oauth</code>, Connect, <code>--store</code></li><li><a href="./tools.html">Tools</a>: authored tools that wrap MCP connections</li><li><a href="./../guides/webhooks.html">Webhooks</a>: calling MCP connections from handlers</li></ul>`,54)])])}const E=i(t,[["render",h]]);export{c as __pageData,E as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as e,ag as n}from"./chunks/framework.BCISBCiQ.js";const c=JSON.parse(`{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n("",54)])])}const E=i(t,[["render",h]]);export{c as __pageData,E as default};
1
+ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse(`{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents.","frontmatter":{"title":"MCP Connections","description":"Pull in tools from MCP servers: remote, stdio, the signed-in Cursor account's connectors, and peer agents."},"headers":[],"relativePath":"reference/connections.md","filePath":"reference/connections.md"}`),t={name:"reference/connections.md"};function h(l,s,o,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[n("",54)])])}const E=i(t,[["render",h]]);export{c as __pageData,E as default};
@@ -1,7 +1,7 @@
1
- import{_ as t,c as e,o as a,ag as i}from"./chunks/framework.BCISBCiQ.js";const k=JSON.parse('{"title":"Extensions","description":"Mount a package of agent contributions or a Cursor plugin under a namespace with one file, adjust what it contributes, and author your own as a directory laid out like agent/.","frontmatter":{"title":"Extensions","description":"Mount a package of agent contributions or a Cursor plugin under a namespace with one file, adjust what it contributes, and author your own as a directory laid out like agent/."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),n={name:"reference/extensions.md"};function o(l,s,d,h,p,r){return a(),e("div",null,[...s[0]||(s[0]=[i(`<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to &quot;Extensions&quot;">​</a></h1><p>An extension packages the same contributions an agent authors under <code>agent/</code> and installs them as one unit. You mount it with a single file under <code>agent/extensions/</code>, and its contributions join the agent under a namespace. The package updates like any other dependency; nothing is copied into your project. A Cursor plugin mounts the same way; see <a href="#mount-a-cursor-plugin">Mount a Cursor plugin</a>.</p><p>Extensions are native to the Agent SDK. Slot files use the <code>@cursor/july</code> helpers, so a package built on another agent framework fails <code>agent-sdk validate</code> until you rewrite it onto <code>@cursor/july</code>.</p><h2 id="mount-an-extension" tabindex="-1">Mount an extension <a class="header-anchor" href="#mount-an-extension" aria-label="Permalink to &quot;Mount an extension&quot;">​</a></h2><p>Install the package, then add one file. The filename is the namespace.</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/ci.ts</span></span>
1
+ import{_ as t,c as e,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Extensions","description":"Mount a package of agent contributions or a Cursor plugin under a namespace with one file, adjust what it contributes, and author your own as a directory laid out like agent/.","frontmatter":{"title":"Extensions","description":"Mount a package of agent contributions or a Cursor plugin under a namespace with one file, adjust what it contributes, and author your own as a directory laid out like agent/."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),n={name:"reference/extensions.md"};function o(l,s,d,h,p,r){return a(),e("div",null,[...s[0]||(s[0]=[i(`<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to &quot;Extensions&quot;">​</a></h1><p>An extension packages the same contributions an agent authors under <code>agent/</code> and installs them as one unit. You mount it with a single file under <code>agent/extensions/</code>, and its contributions join the agent under a namespace. The package updates like any other dependency; nothing is copied into your project. A Cursor plugin mounts the same way; see <a href="#mount-a-cursor-plugin">Mount a Cursor plugin</a>.</p><p>Extensions are native to the Agent SDK. Slot files use the <code>@cursor/july</code> helpers, so a package built on another agent framework fails <code>agent-sdk validate</code> until you rewrite it onto <code>@cursor/july</code>.</p><h2 id="mount-an-extension" tabindex="-1">Mount an extension <a class="header-anchor" href="#mount-an-extension" aria-label="Permalink to &quot;Mount an extension&quot;">​</a></h2><p>Install the package, then add one file. The filename is the namespace.</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/ci.ts</span></span>
2
2
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ci </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &quot;@acme/ci-triage&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
3
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;"> ci</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ org: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;acme&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, token: process.env.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">BUILDKITE_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span></code></pre></div><p>Every contribution is exposed as <code>&lt;namespace&gt;__&lt;name&gt;</code>. A <code>failed_jobs</code> tool from this mount runs in the agent as <code>ci__failed_jobs</code>, and a <code>triage</code> skill loads as <code>ci__triage</code>. <code>agent-sdk info</code> lists each mount with what it contributed, and <code>GET /v1/info</code> returns the same under <code>extensions</code>.</p><p>Pass the configuration the extension asks for. The extension validates it when the agent loads, so a missing or mistyped field fails <code>agent-sdk validate</code> instead of a tool call later.</p><p>Namespaces follow the tool-name rule, and <code>__</code> is reserved: an authored <code>agent/tools/ci__failed_jobs.ts</code> fails discovery, so nothing outside a mount can pose as one of its tools.</p><h2 id="what-an-extension-can-contribute" tabindex="-1">What an extension can contribute <a class="header-anchor" href="#what-an-extension-can-contribute" aria-label="Permalink to &quot;What an extension can contribute&quot;">​</a></h2><p>An extension tree uses the same slots as <a href="./project-layout.html"><code>agent/</code></a>. Each shareable contribution lands on the agent under the mount&#39;s namespace:</p><table tabindex="0"><thead><tr><th>Path</th><th>Becomes</th></tr></thead><tbody><tr><td><code>tools/&lt;name&gt;.ts</code></td><td>tool <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>skills/&lt;name&gt;</code></td><td>skill <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>mcp-connections/&lt;name&gt;.ts</code></td><td>connection <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>host-connections/&lt;name&gt;.ts</code></td><td>host connection <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>hooks/&lt;name&gt;.ts</code></td><td>hook <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>channels/&lt;name&gt;.ts</code></td><td>channel <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>schedules/&lt;name&gt;</code></td><td>schedule <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>subagents/&lt;id&gt;/</code></td><td>subagent <code>&lt;ns&gt;__&lt;id&gt;</code></td></tr><tr><td><code>instructions.md</code> / <code>.ts</code> / dir</td><td>appended to the agent&#39;s system prompt</td></tr><tr><td><code>sandbox/workspace/**</code></td><td>seeded into each local session workspace</td></tr><tr><td><code>artifacts.ts</code></td><td>artifact kinds <code>&lt;ns&gt;__&lt;kind&gt;</code></td></tr></tbody></table><p>The root agent still needs its own <code>instructions.md</code>. Extension instructions are extra fragments, not a substitute.</p><p><code>httpChannel()</code> stays on the agent. An extension authors <code>defineChannel</code> only; a file named <code>http.ts</code> becomes <code>&lt;ns&gt;__http</code>.</p><p>These stay on the agent that mounts the extension. Each is a singleton or is outside discovery:</p><table tabindex="0"><thead><tr><th>Path</th><th>Why it stays on the agent</th></tr></thead><tbody><tr><td><code>agent.ts</code></td><td>One <code>defineAgent</code> runtime per agent</td></tr><tr><td><code>storage.ts</code></td><td>One <code>host.kv</code> / <code>host.files</code> backend</td></tr><tr><td><code>otel.ts</code></td><td>One OTLP exporter</td></tr><tr><td><code>playground/</code></td><td>Custom chips are a Vite glob of the agent tree, not a discovery walk</td></tr><tr><td><code>extensions/</code></td><td>Nested mounts are not loaded</td></tr><tr><td><code>sandbox.ts</code></td><td>Custom sandbox backends stay on the agent</td></tr></tbody></table><p><code>agent-sdk validate</code> warns when a tree carries those paths.</p><h2 id="adjust-a-mounted-extension" tabindex="-1">Adjust a mounted extension <a class="header-anchor" href="#adjust-a-mounted-extension" aria-label="Permalink to &quot;Adjust a mounted extension&quot;">​</a></h2><p>To replace or remove a contribution, mount the extension as a directory and overlay the slot you want to change.</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>agent/extensions/ci/</span></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;"> ci</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ org: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;acme&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, token: process.env.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">BUILDKITE_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">!</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span></code></pre></div><p>Every contribution is exposed as <code>&lt;namespace&gt;__&lt;name&gt;</code>. A <code>failed_jobs</code> tool from this mount runs in the agent as <code>ci__failed_jobs</code>, and a <code>triage</code> skill loads as <code>ci__triage</code>. <code>agent-sdk info</code> lists each mount with what it contributed, and <code>GET /v1/info</code> returns the same under <code>extensions</code>.</p><p>Pass the configuration the extension asks for. The extension validates it when the agent loads, so a missing or mistyped field fails <code>agent-sdk validate</code> instead of a tool call later.</p><p>Namespaces follow the tool-name rule, and <code>__</code> is reserved: an authored <code>agent/tools/ci__failed_jobs.ts</code> fails discovery, so nothing outside a mount can pose as one of its tools.</p><h2 id="what-an-extension-can-contribute" tabindex="-1">What an extension can contribute <a class="header-anchor" href="#what-an-extension-can-contribute" aria-label="Permalink to &quot;What an extension can contribute&quot;">​</a></h2><p>An extension tree uses the same slots as <a href="./project-layout.html"><code>agent/</code></a>. Each shareable contribution lands on the agent under the mount&#39;s namespace:</p><table tabindex="0"><thead><tr><th>Path</th><th>Becomes</th></tr></thead><tbody><tr><td><code>tools/&lt;name&gt;.ts</code></td><td>tool <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>skills/&lt;name&gt;</code></td><td>skill <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>mcp-connections/&lt;name&gt;.ts</code></td><td>connection <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>host-connections/&lt;name&gt;.ts</code></td><td>host connection <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>hooks/&lt;name&gt;.ts</code></td><td>hook <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>channels/&lt;name&gt;.ts</code></td><td>channel <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>schedules/&lt;name&gt;</code></td><td>schedule <code>&lt;ns&gt;__&lt;name&gt;</code></td></tr><tr><td><code>subagents/&lt;id&gt;/</code></td><td>subagent <code>&lt;ns&gt;__&lt;id&gt;</code></td></tr><tr><td><code>instructions.md</code> / <code>.ts</code> / dir</td><td>appended to the agent&#39;s system prompt</td></tr><tr><td><code>sandbox/workspace/**</code></td><td>seeded into each local session workspace</td></tr><tr><td><code>artifacts.ts</code></td><td>artifact kinds <code>&lt;ns&gt;__&lt;kind&gt;</code></td></tr></tbody></table><p>The root agent still needs its own <code>instructions.md</code>. Extension instructions are extra fragments, not a substitute.</p><p>The built-in HTTP session channel stays on the agent. An extension authors <code>defineChannel</code> only; a file named <code>http.ts</code> becomes <code>&lt;ns&gt;__http</code>.</p><p>These stay on the agent that mounts the extension. Each is a singleton or is outside discovery:</p><table tabindex="0"><thead><tr><th>Path</th><th>Why it stays on the agent</th></tr></thead><tbody><tr><td><code>agent.ts</code></td><td>One <code>defineAgent</code> runtime per agent</td></tr><tr><td><code>storage.ts</code></td><td>One <code>host.kv</code> / <code>host.files</code> backend</td></tr><tr><td><code>otel.ts</code></td><td>One OTLP exporter</td></tr><tr><td><code>playground/</code></td><td>Custom chips are a Vite glob of the agent tree, not a discovery walk</td></tr><tr><td><code>extensions/</code></td><td>Nested mounts are not loaded</td></tr><tr><td><code>sandbox.ts</code></td><td>Custom sandbox backends stay on the agent</td></tr></tbody></table><p><code>agent-sdk validate</code> warns when a tree carries those paths.</p><h2 id="adjust-a-mounted-extension" tabindex="-1">Adjust a mounted extension <a class="header-anchor" href="#adjust-a-mounted-extension" aria-label="Permalink to &quot;Adjust a mounted extension&quot;">​</a></h2><p>To replace or remove a contribution, mount the extension as a directory and overlay the slot you want to change.</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>agent/extensions/ci/</span></span>
5
5
  <span class="line"><span>├── extension.ts # the mount: export default ci({ ... })</span></span>
6
6
  <span class="line"><span>├── tools/</span></span>
7
7
  <span class="line"><span>│ ├── job_log.ts # replaces ci__job_log with your own defineTool</span></span>