@cursor/july 0.1.91 → 0.1.93

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 (351) hide show
  1. package/AGENTS.md +4 -0
  2. package/README.md +117 -162
  3. package/dist/channels/deployments/deployments-channel.d.ts +7 -0
  4. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
  5. package/dist/channels/deployments/deployments-channel.js +26 -2
  6. package/dist/channels/deployments/types.d.ts +8 -0
  7. package/dist/channels/deployments/types.d.ts.map +1 -1
  8. package/dist/channels/github/github-channel.d.ts +3 -0
  9. package/dist/channels/github/github-channel.d.ts.map +1 -1
  10. package/dist/channels/github/github-channel.js +28 -56
  11. package/dist/continuation.d.ts +1 -1
  12. package/dist/continuation.js +1 -1
  13. package/dist/docs/404.html +4 -2
  14. package/dist/docs/ab.html +10 -8
  15. package/dist/docs/ab.md +332 -0
  16. package/dist/docs/assets/{ab.md.CVzWxLoB.js → ab.md.DJo5r4R-.js} +4 -4
  17. package/dist/docs/assets/{ab.md.CVzWxLoB.lean.js → ab.md.DJo5r4R-.lean.js} +1 -1
  18. package/dist/docs/assets/{app.Bci6CM9E.js → app.CjWU-x0z.js} +1 -1
  19. package/dist/docs/assets/building-with-agents.md.DI4mEzlt.js +13 -0
  20. package/dist/docs/assets/{building-with-agents.md.DH8A_cHA.lean.js → building-with-agents.md.DI4mEzlt.lean.js} +1 -1
  21. package/dist/docs/assets/chunks/@localSearchIndexroot.ChpIC3Zy.js +1 -0
  22. package/dist/docs/assets/chunks/{VPLocalSearchBox.BCPT6xA-.js → VPLocalSearchBox.Cxy8ySFQ.js} +1 -1
  23. package/dist/docs/assets/chunks/{theme.BEA8BF3c.js → theme.Dvq1Bktu.js} +2 -2
  24. package/dist/docs/assets/concepts.md.F6AiPorA.js +1 -0
  25. package/dist/docs/assets/{concepts.md.CRfU3bVg.lean.js → concepts.md.F6AiPorA.lean.js} +1 -1
  26. package/dist/docs/assets/{deployment.md.DX_hc3ze.js → deployment.md.DoLFAzfm.js} +6 -6
  27. package/dist/docs/assets/{evals.md.a0SMN6r9.js → evals.md.lfJoEVc8.js} +6 -6
  28. package/dist/docs/assets/{evals.md.a0SMN6r9.lean.js → evals.md.lfJoEVc8.lean.js} +1 -1
  29. package/dist/docs/assets/{example-agents_approval-buddy.md.DNL83puR.js → example-agents_approval-buddy.md.DmezILPg.js} +1 -1
  30. package/dist/docs/assets/{example-agents_benny.md.C40vHRLc.js → example-agents_benny.md.B0kwY7D_.js} +2 -4
  31. package/dist/docs/assets/{example-agents_benny.md.C40vHRLc.lean.js → example-agents_benny.md.B0kwY7D_.lean.js} +1 -1
  32. package/dist/docs/assets/{example-agents_codebase-wiki.md.Dftj_tPp.js → example-agents_codebase-wiki.md.BBNw9Ekr.js} +3 -3
  33. package/dist/docs/assets/{example-agents_codebase-wiki.md.Dftj_tPp.lean.js → example-agents_codebase-wiki.md.BBNw9Ekr.lean.js} +1 -1
  34. package/dist/docs/assets/{example-agents_concierge.md.MrKpQndp.js → example-agents_concierge.md.BzB2b20R.js} +2 -3
  35. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.js +2 -0
  36. package/dist/docs/assets/example-agents_index.md.ChBp0AX6.lean.js +1 -0
  37. package/dist/docs/assets/{example-agents_knowledge-base.md.DqKqHQ9u.js → example-agents_knowledge-base.md.CrA85ig-.js} +1 -1
  38. package/dist/docs/assets/{example-agents_security-reviewer.md.Bai6D0Ee.js → example-agents_security-reviewer.md.74pPpWYj.js} +1 -1
  39. package/dist/docs/assets/{example-agents_weather-agent.md.lVEAbWFf.js → example-agents_weather-agent.md.CaGpmw3Y.js} +2 -2
  40. package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.js → guides_agent-to-agent.md.B3JIaAqz.js} +1 -1
  41. package/dist/docs/assets/{guides_cloud-runtime.md.BSMLIBHr.js → guides_cloud-runtime.md.BnvjPiia.js} +2 -2
  42. package/dist/docs/assets/{guides_cloud-runtime.md.BSMLIBHr.lean.js → guides_cloud-runtime.md.BnvjPiia.lean.js} +1 -1
  43. package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.js → guides_convert-automation.md.Bboisykk.js} +1 -1
  44. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.js → guides_github.md.DqJhuaN1.js} +5 -5
  45. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.lean.js → guides_github.md.DqJhuaN1.lean.js} +1 -1
  46. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.js → guides_mcp-oauth.md.CJvrXtkN.js} +2 -2
  47. package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.js → guides_slack.md.mqeNKs84.js} +2 -2
  48. package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.js → guides_webhooks.md.DKdA43Qm.js} +2 -2
  49. package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.js → hillclimbing.md.DhESf3OO.js} +1 -1
  50. package/dist/docs/assets/{index.md.BAaMXLFd.js → index.md.B-lVR4wT.js} +3 -3
  51. package/dist/docs/assets/{index.md.BAaMXLFd.lean.js → index.md.B-lVR4wT.lean.js} +1 -1
  52. package/dist/docs/assets/{quickstart.md.DsrarzEg.js → quickstart.md.BrmfrrIr.js} +1 -1
  53. package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.js → reference_agent-config.md.Cp_x38Nl.js} +3 -3
  54. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.js → reference_channels.md.Cd2f2iyV.js} +2 -2
  55. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.lean.js → reference_channels.md.Cd2f2iyV.lean.js} +1 -1
  56. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.js → reference_cli.md.D9KESDsD.js} +10 -11
  57. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.lean.js → reference_cli.md.D9KESDsD.lean.js} +1 -1
  58. package/dist/docs/assets/{reference_connections.md.DYidrb-j.js → reference_connections.md.DB6SsN6U.js} +3 -3
  59. package/dist/docs/assets/reference_hooks.md.BxN87gCw.js +14 -0
  60. package/dist/docs/assets/{reference_hooks.md.B9FSgdDe.lean.js → reference_hooks.md.BxN87gCw.lean.js} +1 -1
  61. package/dist/docs/assets/reference_http-api.md.C68BERYr.js +11 -0
  62. package/dist/docs/assets/reference_http-api.md.C68BERYr.lean.js +1 -0
  63. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.js → reference_instructions.md.CR7XSsGk.js} +3 -3
  64. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.lean.js → reference_instructions.md.CR7XSsGk.lean.js} +1 -1
  65. package/dist/docs/assets/reference_playground.md.DnX5nL-B.js +1 -0
  66. package/dist/docs/assets/reference_playground.md.DnX5nL-B.lean.js +1 -0
  67. package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.js → reference_project-layout.md.WN9nwJht.js} +2 -2
  68. package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.js → reference_prompt.md.DnaD5dNK.js} +1 -1
  69. package/dist/docs/assets/{reference_schedules.md.DNipebiG.js → reference_schedules.md.DI_JrHgq.js} +1 -1
  70. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +1 -0
  71. package/dist/docs/assets/{reference_sessions.md.tUFzz98S.lean.js → reference_sessions.md.D0mIh4KK.lean.js} +1 -1
  72. package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.js → reference_skills.md.BFW9retM.js} +1 -1
  73. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.js → reference_tools.md.DuKvkYWG.js} +4 -4
  74. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.lean.js → reference_tools.md.DuKvkYWG.lean.js} +1 -1
  75. package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +1 -0
  76. package/dist/docs/assets/{scaffolding-agents.md.CRDDUtYJ.lean.js → scaffolding-agents.md.D7UUkWw0.lean.js} +1 -1
  77. package/dist/docs/assets/{storage.md.JbjlHWZ6.js → storage.md.BOHeqk2M.js} +5 -5
  78. package/dist/docs/assets/{storage.md.JbjlHWZ6.lean.js → storage.md.BOHeqk2M.lean.js} +1 -1
  79. package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.js → templates_agentic-owners.md.DqtPdm6f.js} +2 -2
  80. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.js → templates_pr-autofixer.md.R4K_qytS.js} +2 -2
  81. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.lean.js → templates_pr-autofixer.md.R4K_qytS.lean.js} +1 -1
  82. package/dist/docs/assets/troubleshooting.md.vCWwvqcJ.js +1 -0
  83. package/dist/docs/assets/{troubleshooting.md.DYECCZiJ.lean.js → troubleshooting.md.vCWwvqcJ.lean.js} +1 -1
  84. package/dist/docs/building-with-agents.html +9 -7
  85. package/dist/docs/building-with-agents.md +118 -0
  86. package/dist/docs/concepts.html +7 -8
  87. package/dist/docs/concepts.md +169 -0
  88. package/dist/docs/deployment.html +13 -11
  89. package/dist/docs/deployment.md +462 -0
  90. package/dist/docs/evals.html +12 -10
  91. package/dist/docs/evals.md +460 -0
  92. package/dist/docs/example-agents/approval-buddy.html +7 -5
  93. package/dist/docs/example-agents/approval-buddy.md +266 -0
  94. package/dist/docs/example-agents/benny.html +7 -7
  95. package/dist/docs/example-agents/benny.md +173 -0
  96. package/dist/docs/example-agents/bugbot.html +6 -4
  97. package/dist/docs/example-agents/bugbot.md +229 -0
  98. package/dist/docs/example-agents/codebase-wiki.html +8 -6
  99. package/dist/docs/example-agents/codebase-wiki.md +167 -0
  100. package/dist/docs/example-agents/codeowners-review.html +6 -4
  101. package/dist/docs/example-agents/codeowners-review.md +192 -0
  102. package/dist/docs/example-agents/concierge.html +9 -8
  103. package/dist/docs/example-agents/concierge.md +200 -0
  104. package/dist/docs/example-agents/index.html +8 -6
  105. package/dist/docs/example-agents/index.md +99 -0
  106. package/dist/docs/example-agents/knowledge-base.html +8 -6
  107. package/dist/docs/example-agents/knowledge-base.md +168 -0
  108. package/dist/docs/example-agents/oncall.html +6 -4
  109. package/dist/docs/example-agents/oncall.md +212 -0
  110. package/dist/docs/example-agents/security-reviewer.html +9 -7
  111. package/dist/docs/example-agents/security-reviewer.md +265 -0
  112. package/dist/docs/example-agents/slack-agent.html +6 -4
  113. package/dist/docs/example-agents/slack-agent.md +142 -0
  114. package/dist/docs/example-agents/weather-agent.html +9 -7
  115. package/dist/docs/example-agents/weather-agent.md +297 -0
  116. package/dist/docs/guides/agent-to-agent.html +7 -5
  117. package/dist/docs/guides/agent-to-agent.md +113 -0
  118. package/dist/docs/guides/cloud-runtime.html +8 -6
  119. package/dist/docs/guides/cloud-runtime.md +114 -0
  120. package/dist/docs/guides/convert-automation.html +8 -6
  121. package/dist/docs/guides/convert-automation.md +171 -0
  122. package/dist/docs/guides/github.html +11 -9
  123. package/dist/docs/guides/github.md +275 -0
  124. package/dist/docs/guides/human-in-the-loop.html +6 -4
  125. package/dist/docs/guides/human-in-the-loop.md +126 -0
  126. package/dist/docs/guides/mcp-oauth.html +8 -6
  127. package/dist/docs/guides/mcp-oauth.md +159 -0
  128. package/dist/docs/guides/opentelemetry.html +6 -4
  129. package/dist/docs/guides/opentelemetry.md +209 -0
  130. package/dist/docs/guides/slack.html +9 -7
  131. package/dist/docs/guides/slack.md +337 -0
  132. package/dist/docs/guides/webhooks.html +8 -6
  133. package/dist/docs/guides/webhooks.md +463 -0
  134. package/dist/docs/hashmap.json +1 -1
  135. package/dist/docs/hillclimbing.html +8 -6
  136. package/dist/docs/hillclimbing.md +88 -0
  137. package/dist/docs/index.html +8 -6
  138. package/dist/docs/index.md +171 -0
  139. package/dist/docs/llms-full.txt +10968 -0
  140. package/dist/docs/llms.txt +74 -0
  141. package/dist/docs/quickstart.html +7 -5
  142. package/dist/docs/quickstart.md +364 -0
  143. package/dist/docs/reference/agent-config.html +10 -8
  144. package/dist/docs/reference/agent-config.md +251 -0
  145. package/dist/docs/reference/artifacts.html +6 -4
  146. package/dist/docs/reference/artifacts.md +112 -0
  147. package/dist/docs/reference/channels.html +8 -6
  148. package/dist/docs/reference/channels.md +244 -0
  149. package/dist/docs/reference/cli.html +16 -15
  150. package/dist/docs/reference/cli.md +947 -0
  151. package/dist/docs/reference/connections.html +10 -8
  152. package/dist/docs/reference/connections.md +263 -0
  153. package/dist/docs/reference/hooks.html +8 -6
  154. package/dist/docs/reference/hooks.md +98 -0
  155. package/dist/docs/reference/http-api.html +9 -7
  156. package/dist/docs/reference/http-api.md +247 -0
  157. package/dist/docs/reference/instructions.html +8 -6
  158. package/dist/docs/reference/instructions.md +74 -0
  159. package/dist/docs/reference/playground.html +7 -5
  160. package/dist/docs/reference/playground.md +57 -0
  161. package/dist/docs/reference/project-layout.html +9 -7
  162. package/dist/docs/reference/project-layout.md +107 -0
  163. package/dist/docs/reference/prompt.html +8 -6
  164. package/dist/docs/reference/prompt.md +42 -0
  165. package/dist/docs/reference/schedules.html +8 -6
  166. package/dist/docs/reference/schedules.md +214 -0
  167. package/dist/docs/reference/sessions.html +7 -12
  168. package/dist/docs/reference/sessions.md +159 -0
  169. package/dist/docs/reference/skills.html +8 -6
  170. package/dist/docs/reference/skills.md +83 -0
  171. package/dist/docs/reference/subagents.html +6 -4
  172. package/dist/docs/reference/subagents.md +71 -0
  173. package/dist/docs/reference/tools.html +10 -8
  174. package/dist/docs/reference/tools.md +293 -0
  175. package/dist/docs/scaffolding-agents.html +7 -5
  176. package/dist/docs/scaffolding-agents.md +129 -0
  177. package/dist/docs/storage.html +11 -9
  178. package/dist/docs/storage.md +176 -0
  179. package/dist/docs/templates/agentic-owners.html +9 -7
  180. package/dist/docs/templates/agentic-owners.md +92 -0
  181. package/dist/docs/templates/demo.html +6 -4
  182. package/dist/docs/templates/demo.md +79 -0
  183. package/dist/docs/templates/pr-autofixer.html +8 -6
  184. package/dist/docs/templates/pr-autofixer.md +128 -0
  185. package/dist/docs/templates/security-reviewer.html +6 -4
  186. package/dist/docs/templates/security-reviewer.md +84 -0
  187. package/dist/docs/templates/triage.html +6 -4
  188. package/dist/docs/templates/triage.md +98 -0
  189. package/dist/docs/troubleshooting.html +7 -5
  190. package/dist/docs/troubleshooting.md +111 -0
  191. package/dist/internal/authored-alias-hooks.d.ts +14 -11
  192. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  193. package/dist/internal/authored-alias-hooks.js +14 -11
  194. package/dist/internal/authored-loaders.d.ts +7 -6
  195. package/dist/internal/authored-loaders.d.ts.map +1 -1
  196. package/dist/internal/authored-loaders.js +14 -10
  197. package/dist/internal/cli-deploy.d.ts +1 -1
  198. package/dist/internal/cli-deploy.js +5 -5
  199. package/dist/internal/continuation-channel.d.ts +6 -3
  200. package/dist/internal/continuation-channel.d.ts.map +1 -1
  201. package/dist/internal/continuation-channel.js +44 -40
  202. package/dist/internal/continuation-identity.d.ts +17 -16
  203. package/dist/internal/continuation-identity.d.ts.map +1 -1
  204. package/dist/internal/continuation-identity.js +109 -36
  205. package/dist/internal/deploy-manifest.d.ts +2 -2
  206. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  207. package/dist/internal/deploy-manifest.js +4 -9
  208. package/dist/internal/discovery.d.ts.map +1 -1
  209. package/dist/internal/discovery.js +3 -0
  210. package/dist/internal/distribution.d.ts +4 -3
  211. package/dist/internal/distribution.d.ts.map +1 -1
  212. package/dist/internal/distribution.js +4 -3
  213. package/dist/internal/hosted-delivery-protocol.d.ts +38 -0
  214. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
  215. package/dist/internal/hosted-delivery-protocol.js +70 -0
  216. package/dist/internal/hosted-delivery.d.ts +35 -0
  217. package/dist/internal/hosted-delivery.d.ts.map +1 -0
  218. package/dist/internal/hosted-delivery.js +226 -0
  219. package/dist/internal/http-channel.d.ts.map +1 -1
  220. package/dist/internal/http-channel.js +1 -1
  221. package/dist/internal/init-scaffold.d.ts.map +1 -1
  222. package/dist/internal/init-scaffold.js +1 -0
  223. package/dist/internal/playground/static.d.ts.map +1 -1
  224. package/dist/internal/playground/static.js +2 -0
  225. package/dist/internal/review-comments.d.ts +186 -63
  226. package/dist/internal/review-comments.d.ts.map +1 -1
  227. package/dist/internal/review-comments.js +350 -168
  228. package/dist/internal/server.d.ts.map +1 -1
  229. package/dist/internal/server.js +21 -3
  230. package/dist/internal/session-engine.d.ts +5 -0
  231. package/dist/internal/session-engine.d.ts.map +1 -1
  232. package/dist/internal/session-engine.js +16 -4
  233. package/dist/internal/shallow-clone.d.ts +8 -2
  234. package/dist/internal/shallow-clone.d.ts.map +1 -1
  235. package/dist/internal/shallow-clone.js +17 -10
  236. package/dist/playground/assets/{index-DDvyC2z6.js → index-D9MFzhNE.js} +1 -1
  237. package/dist/playground/index.html +1 -1
  238. package/dist/types.d.ts +9 -17
  239. package/dist/types.d.ts.map +1 -1
  240. package/docs/README.md +2 -10
  241. package/docs/ab.md +7 -13
  242. package/docs/building-with-agents.md +5 -11
  243. package/docs/concepts.md +12 -17
  244. package/docs/deployment.md +8 -10
  245. package/docs/evals.md +16 -37
  246. package/docs/example-agents/approval-buddy.md +1 -1
  247. package/docs/example-agents/benny.md +4 -13
  248. package/docs/example-agents/codebase-wiki.md +5 -8
  249. package/docs/example-agents/concierge.md +2 -3
  250. package/docs/example-agents/index.md +6 -9
  251. package/docs/example-agents/knowledge-base.md +2 -2
  252. package/docs/example-agents/security-reviewer.md +5 -5
  253. package/docs/example-agents/weather-agent.md +4 -3
  254. package/docs/guides/agent-to-agent.md +1 -1
  255. package/docs/guides/cloud-runtime.md +8 -25
  256. package/docs/guides/convert-automation.md +3 -3
  257. package/docs/guides/github.md +11 -23
  258. package/docs/guides/mcp-oauth.md +4 -4
  259. package/docs/guides/slack.md +4 -4
  260. package/docs/guides/webhooks.md +3 -3
  261. package/docs/hillclimbing.md +1 -1
  262. package/docs/quickstart.md +1 -1
  263. package/docs/reference/agent-config.md +10 -15
  264. package/docs/reference/channels.md +20 -31
  265. package/docs/reference/cli.md +27 -37
  266. package/docs/reference/connections.md +9 -14
  267. package/docs/reference/hooks.md +10 -14
  268. package/docs/reference/http-api.md +18 -38
  269. package/docs/reference/instructions.md +1 -1
  270. package/docs/reference/playground.md +14 -19
  271. package/docs/reference/project-layout.md +2 -2
  272. package/docs/reference/prompt.md +1 -1
  273. package/docs/reference/schedules.md +1 -2
  274. package/docs/reference/sessions.md +8 -19
  275. package/docs/reference/skills.md +3 -3
  276. package/docs/reference/tools.md +12 -17
  277. package/docs/scaffolding-agents.md +4 -5
  278. package/docs/storage.md +37 -80
  279. package/docs/templates/agentic-owners.md +2 -2
  280. package/docs/templates/pr-autofixer.md +3 -6
  281. package/docs/troubleshooting.md +6 -6
  282. package/package.json +9 -2
  283. package/skills/ab/SKILL.md +3 -0
  284. package/skills/create-agent/SKILL.md +3 -0
  285. package/skills/debug/SKILL.md +3 -0
  286. package/skills/evals/SKILL.md +3 -0
  287. package/skills/framework-map/SKILL.md +3 -0
  288. package/skills/github/SKILL.md +3 -0
  289. package/skills/hillclimb/SKILL.md +3 -0
  290. package/skills/mcp-auth/SKILL.md +3 -0
  291. package/skills/otel/SKILL.md +3 -0
  292. package/skills/setup-slack/SKILL.md +3 -0
  293. package/src/channels/deployments/deployments-channel.ts +32 -2
  294. package/src/channels/deployments/types.ts +8 -0
  295. package/src/channels/github/github-channel.ts +71 -21
  296. package/src/continuation.ts +1 -1
  297. package/src/internal/authored-alias-hooks.ts +14 -11
  298. package/src/internal/authored-loaders.ts +14 -10
  299. package/src/internal/cli-deploy.ts +5 -5
  300. package/src/internal/continuation-channel.ts +62 -45
  301. package/src/internal/continuation-identity.ts +123 -38
  302. package/src/internal/deploy-manifest.ts +5 -9
  303. package/src/internal/discovery.ts +3 -0
  304. package/src/internal/distribution.ts +4 -3
  305. package/src/internal/hosted-delivery-protocol.ts +114 -0
  306. package/src/internal/hosted-delivery.ts +327 -0
  307. package/src/internal/http-channel.ts +0 -2
  308. package/src/internal/init-scaffold.ts +1 -0
  309. package/src/internal/playground/static.ts +2 -0
  310. package/src/internal/review-comments.ts +542 -229
  311. package/src/internal/server.ts +29 -2
  312. package/src/internal/session-engine.ts +29 -7
  313. package/src/internal/shallow-clone.ts +30 -16
  314. package/src/types.ts +9 -17
  315. package/dist/docs/assets/building-with-agents.md.DH8A_cHA.js +0 -13
  316. package/dist/docs/assets/chunks/@localSearchIndexroot.Dv-Q0XtU.js +0 -1
  317. package/dist/docs/assets/concepts.md.CRfU3bVg.js +0 -4
  318. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.js +0 -15
  319. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.lean.js +0 -1
  320. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.js +0 -2
  321. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.lean.js +0 -1
  322. package/dist/docs/assets/reference_hooks.md.B9FSgdDe.js +0 -14
  323. package/dist/docs/assets/reference_http-api.md.CSHVobzG.js +0 -11
  324. package/dist/docs/assets/reference_http-api.md.CSHVobzG.lean.js +0 -1
  325. package/dist/docs/assets/reference_playground.md.Dfb92yQf.js +0 -1
  326. package/dist/docs/assets/reference_playground.md.Dfb92yQf.lean.js +0 -1
  327. package/dist/docs/assets/reference_sessions.md.tUFzz98S.js +0 -8
  328. package/dist/docs/assets/scaffolding-agents.md.CRDDUtYJ.js +0 -1
  329. package/dist/docs/assets/troubleshooting.md.DYECCZiJ.js +0 -1
  330. package/dist/docs/example-agents/fsd.html +0 -39
  331. package/docs/example-agents/fsd.md +0 -334
  332. /package/dist/docs/assets/{deployment.md.DX_hc3ze.lean.js → deployment.md.DoLFAzfm.lean.js} +0 -0
  333. /package/dist/docs/assets/{example-agents_approval-buddy.md.DNL83puR.lean.js → example-agents_approval-buddy.md.DmezILPg.lean.js} +0 -0
  334. /package/dist/docs/assets/{example-agents_concierge.md.MrKpQndp.lean.js → example-agents_concierge.md.BzB2b20R.lean.js} +0 -0
  335. /package/dist/docs/assets/{example-agents_knowledge-base.md.DqKqHQ9u.lean.js → example-agents_knowledge-base.md.CrA85ig-.lean.js} +0 -0
  336. /package/dist/docs/assets/{example-agents_security-reviewer.md.Bai6D0Ee.lean.js → example-agents_security-reviewer.md.74pPpWYj.lean.js} +0 -0
  337. /package/dist/docs/assets/{example-agents_weather-agent.md.lVEAbWFf.lean.js → example-agents_weather-agent.md.CaGpmw3Y.lean.js} +0 -0
  338. /package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.lean.js → guides_agent-to-agent.md.B3JIaAqz.lean.js} +0 -0
  339. /package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.lean.js → guides_convert-automation.md.Bboisykk.lean.js} +0 -0
  340. /package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.lean.js → guides_mcp-oauth.md.CJvrXtkN.lean.js} +0 -0
  341. /package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.lean.js → guides_slack.md.mqeNKs84.lean.js} +0 -0
  342. /package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.lean.js → guides_webhooks.md.DKdA43Qm.lean.js} +0 -0
  343. /package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.lean.js → hillclimbing.md.DhESf3OO.lean.js} +0 -0
  344. /package/dist/docs/assets/{quickstart.md.DsrarzEg.lean.js → quickstart.md.BrmfrrIr.lean.js} +0 -0
  345. /package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.lean.js → reference_agent-config.md.Cp_x38Nl.lean.js} +0 -0
  346. /package/dist/docs/assets/{reference_connections.md.DYidrb-j.lean.js → reference_connections.md.DB6SsN6U.lean.js} +0 -0
  347. /package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.lean.js → reference_project-layout.md.WN9nwJht.lean.js} +0 -0
  348. /package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.lean.js → reference_prompt.md.DnaD5dNK.lean.js} +0 -0
  349. /package/dist/docs/assets/{reference_schedules.md.DNipebiG.lean.js → reference_schedules.md.DI_JrHgq.lean.js} +0 -0
  350. /package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.lean.js → reference_skills.md.BFW9retM.lean.js} +0 -0
  351. /package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.lean.js → templates_agentic-owners.md.DqtPdm6f.lean.js} +0 -0
@@ -0,0 +1,947 @@
1
+ # CLI reference
2
+
3
+ `@cursor/july` installs `july` (so `npx @cursor/july docs` works) and
4
+ `agent-sdk`. The examples on this page use `agent-sdk`. Run the CLI with
5
+ Node 22.13 or newer. Don't run it with Bun; Bun corrupts tool-result
6
+ streams from the Cursor SDK.
7
+
8
+ `agent-sdk help` prints the built-in summary. The Slack and GitHub packs
9
+ also provide `agent-sdk slack help` and `agent-sdk github help`.
10
+
11
+ | Command | Description |
12
+ | ------------------------------------------------------- | -------------------------------------------------------------- |
13
+ | [`serve`](#serve) | Serve agents over HTTP |
14
+ | [`dev`](#dev) | Start local development with `serve --dev` |
15
+ | [`chat`](#chat) | Talk to a running agent |
16
+ | [`resume`](#resume) | Reattach chat to a previous session |
17
+ | [`logs`](#logs) | Follow local or hosted logs |
18
+ | [`sessions`](#sessions) | List sessions on a running agent |
19
+ | [`session`](#session) | Inspect one session |
20
+ | [`cost`](#cost) | Report per-session token usage and estimated cost |
21
+ | [`playground`](#playground) | Open the local or hosted playground |
22
+ | [`docs`](#docs) | Serve the shipped documentation site locally |
23
+ | [`run`](#run) | Run one or more turns locally, remotely, or on a hosted agent |
24
+ | [`call`](#call) | Call a server tool without a model turn |
25
+ | [`eval`](#eval) | Run filesystem evals |
26
+ | [`trajectory`](#trajectory) | Summarize a saved event stream |
27
+ | [`init`](#init) | Scaffold a project, or print the setup guide |
28
+ | [`convert-automation`](#convert-automation) | Export a Cursor Automation into an agent project |
29
+ | [`install-skills`](#install-skills) | Refresh coding-agent skills (`npm install` already copies them) |
30
+ | [`info`](#info) | Print the discovered agent surface |
31
+ | [`validate`](#validate) | Check a project and fail on errors |
32
+ | [`login` / `logout` / `whoami`](#login-logout-whoami) | Manage the host's Cursor credential |
33
+ | `version` | Print the installed version and exit (also `--version` / `-V`) |
34
+ | [`update`](#update) | Upgrade the installed CLI |
35
+ | [`deploy`](#deploy) | Deploy one or more agents to Cursor managed hosting |
36
+ | [`deployments`](#deployments) | List hosted deployments |
37
+ | [`deployment`](#deployment) | Inspect one hosted deployment |
38
+ | [`stop`](#stop) | Stop a hosted deployment |
39
+ | [`delete`](#delete) | Delete a hosted deployment |
40
+ | [`rotate-token`](#rotate-token) | Replace a deployment's alias token |
41
+ | [`rotate-pod-credential`](#rotate-pod-credential) | Replace a deployment's pod credential |
42
+ | [`secrets`](#secrets) | Manage deployment secrets |
43
+ | [`mcp`](#mcp) | Proxy the agent's MCP endpoint over stdio; `mcp install` writes `~/.cursor/mcp.json` |
44
+ | [`mcp oauth`](#mcp-oauth) | Authorize host MCP OAuth; optional `--store` to deployment secrets |
45
+ | [`slack ...`](#slack) | Provision, set up, and check Slack channels |
46
+ | [`github ...`](#github) | Forward, replay, and inspect GitHub webhook channels |
47
+
48
+ ## Choose a target
49
+
50
+ Request-sending commands support three target types.
51
+
52
+ | Target | How to select it | Commands |
53
+ | --- | --- | --- |
54
+ | Ephemeral local server | Omit `--url` and `--prod` | `run`, `call`, `eval` |
55
+ | Running server | Pass `--url <baseUrl>`, unless the command uses the localhost default described next | `chat`, `resume`, `logs`, `sessions`, `session`, `cost`, `playground`, `run`, `call`, `eval`, `mcp` |
56
+ | Cursor managed hosting | Pass `--prod` | `chat`, `resume`, `logs`, `sessions`, `session`, `cost`, `playground`, `run`, `call`, `eval`, `mcp` |
57
+
58
+ `chat`, `logs`, `sessions`, `session`, `cost`, and `playground` default to
59
+ `http://127.0.0.1:3000`. A `--url` must include the agent slug for a
60
+ multi-agent server, such as `http://127.0.0.1:3000/pr-approver`.
61
+ `--slug` doesn't change an explicit URL. `mcp` has no default target;
62
+ pass `--url` or `--prod`.
63
+
64
+ With `--prod`, `--slug` selects the deployment and `--team` selects the
65
+ Cursor team. The slug defaults to the `--dir` basename. The team
66
+ defaults to the signed-in account's team. `--url` and `--prod` are
67
+ mutually exclusive.
68
+
69
+ Use `--bearer-token <token>` when a running server requires bearer
70
+ authentication. Hosted commands use your Cursor credential to request
71
+ short-lived engine access. `--api-key` overrides the Cursor credential
72
+ for `login`, `serve`, hosted targets, and managed-hosting commands.
73
+ `--state-root` applies to `serve` and ephemeral `run`, `call`, and
74
+ `eval` servers. Running and hosted targets ignore it.
75
+
76
+ For ephemeral `run`, `call`, and `eval` commands, omitting `--slug`
77
+ selects an unslugged root mount when one exists. Otherwise, the Agent SDK
78
+ selects the first discovered agent.
79
+
80
+ ## serve
81
+
82
+ `serve` hosts every agent under `--dir` in multi-agent mode by default.
83
+
84
+ ```bash
85
+ agent-sdk serve [--dir <path>] [--port 3000] [--host 127.0.0.1] [--dev]
86
+ [--mode multi|single] [--api-key <key>]
87
+ [--state-root <path>] [--bearer-token <secret> | --allow-anonymous]
88
+ [--allow-anonymous-cursor-github]
89
+ [--allow-anonymous-cursor-account-mcp]
90
+ [--public-url <url>] [--cloud-tools-url <url>]
91
+ [--no-schedules] [--no-playground]
92
+ [--no-docs] [--cursor-events --repo owner/name]...
93
+ ```
94
+
95
+ If `--dir` is an agent project, it mounts under its directory name. If
96
+ it contains agent projects, each child mounts separately. The index
97
+ lives at `/`. Each agent is available at `/<slug>/v1/*` and
98
+ `/<slug>/playground`. On a TTY, press Enter to restart.
99
+ Unless `--state-root` is set, each mount uses a state directory under
100
+ the agent project. Slugged mounts get a subdirectory named for the slug.
101
+
102
+ | Flag | Meaning |
103
+ | --- | --- |
104
+ | `--port` | Listen on this port. `0` selects an available port. The default is `3000`. When the default is taken, serve tries the next free port and prints a notice; an explicit `--port` fails with a next-port hint instead. |
105
+ | `--host` | Bind this host. The default is loopback-only `127.0.0.1`. |
106
+ | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and widen playground session access on loopback. |
107
+ | `--mode` | Use `multi` for slugged routes and an index, or `single` for one agent at the unslugged `/v1/*`. The default is `multi`. |
108
+ | `--api-key` | Use this Cursor API key. The command falls back to `CURSOR_API_KEY`, then the stored login. |
109
+ | `--state-root` | Store sessions, streams, workspaces, and channel state here. Keep durable production state outside the agent repository. |
110
+ | `--bearer-token` | Require this bearer token on routes without authored auth. Mutually exclusive with `--allow-anonymous`. |
111
+ | `--allow-anonymous` | Admit every caller as one `anonymous` principal. Use only behind a trusted network boundary. |
112
+ | `--allow-anonymous-cursor-github` | Allow anonymous callers to drive sessions holding a Cursor account's repo-scoped GitHub credential. Use only behind an authenticating proxy. |
113
+ | `--allow-anonymous-cursor-account-mcp` | Allow anonymous callers to drive Cursor account MCP connectors (`defineConnection({ cursorAccount: true })`). Use only behind an authenticating proxy (hosted alias token counts). |
114
+ | `--public-url` | Set the externally reachable host URL. Cloud-runtime peer connections need it to call back into this server. |
115
+ | `--cloud-tools-url` | Authenticated HTTP MCP URL for this deployment's direct server-tool endpoint. Hosted deployments configure it automatically. |
116
+ | `--no-schedules` | Disable the cron runner outside dev mode. |
117
+ | `--no-playground` | Skip the web playground. |
118
+ | `--no-docs` | Skip the documentation site at `/docs`. |
119
+ | `--cursor-events` | Pull SCM events from Cursor in addition to authored webhook routes. Requires a signed-in host. Pass repeatable `--repo owner/name` values; repos declared by `githubChannel({ cursorAccount })` also enable it. |
120
+
121
+ Multi-agent slugs must start with a letter or digit, then contain only
122
+ letters, digits, `_`, or `-`. The reserved slugs are `v1`, `playground`,
123
+ and `docs`.
124
+
125
+ ## dev
126
+
127
+ `dev` is the local-development shortcut for `serve --dev`. Pass the
128
+ agent folder as a positional path, or run it from inside the project:
129
+
130
+ ```bash
131
+ agent-sdk dev
132
+ agent-sdk dev ./sdk-pr-reviewer
133
+ agent-sdk dev ./sdk-pr-reviewer --port 3000
134
+ ```
135
+
136
+ `dev` accepts the same flags as [`serve`](#serve). You can use `--dir`
137
+ instead of the positional path.
138
+ Dev mode is always on: schedules and reminders wait for manual dispatch,
139
+ and GitHub accepts unsigned loopback deliveries. Prefer this over
140
+ `serve --dev` while iterating. Pass at most one positional path. Don't
141
+ combine a positional path with a different `--dir`.
142
+
143
+ ## chat
144
+
145
+ `chat` talks to a running agent from the terminal. It never starts a
146
+ server.
147
+
148
+ ```bash
149
+ agent-sdk chat --url http://127.0.0.1:3000/pr-approver
150
+ agent-sdk chat --message "Is the PR ready to approve?"
151
+ agent-sdk chat --message "Inspect PR 42" --json
152
+ agent-sdk chat --prod --slug pr-approver --team 123
153
+ ```
154
+
155
+ `chat` streams text, tool calls, and a per-turn usage footer.
156
+ On a TTY, `--message` seeds the interactive REPL. With non-TTY input,
157
+ `--message` runs one turn and exits; without it, `chat` reads
158
+ newline-delimited messages until EOF. `--json` requires `--message`,
159
+ runs one turn, and prints
160
+ `{ ok, sessionId, continuationToken, trajectory }`. `--text` prints a
161
+ compact trajectory when combined with `--json`. `--no-color` forces
162
+ plain interactive output.
163
+
164
+ Use `--session <id>` to reattach a stored session. The command looks up
165
+ its continuation token when you omit `--continuation-token`. Use
166
+ `--resume` to select the most recently updated session with a
167
+ continuation token.
168
+
169
+ ## resume
170
+
171
+ `resume` is the direct way to reattach the chat REPL.
172
+
173
+ ```bash
174
+ agent-sdk resume ses_123 --url http://127.0.0.1:3000/pr-approver
175
+ agent-sdk resume --url http://127.0.0.1:3000/pr-approver
176
+ agent-sdk resume ses_123 --prod --team 123 --slug pr-approver
177
+ agent-sdk resume ses_123 --message "Continue the review" --json
178
+ ```
179
+
180
+ Pass a session ID to select it. Omit the ID to select the most recently
181
+ updated followable session from `/v1/sessions`. The command looks up a
182
+ missing continuation token, replays the transcript, and accepts
183
+ follow-ups. `resume --json` requires `--message`. The same operation is
184
+ available as `chat --session <id>` or `chat --resume`.
185
+
186
+ ## logs
187
+
188
+ `logs` follows the local or hosted log buffer.
189
+
190
+ ```bash
191
+ agent-sdk logs [--url http://127.0.0.1:3000] [--once] [--json]
192
+ agent-sdk logs --prod [--slug <slug>] [--team <id>] [--once] [--json]
193
+ ```
194
+
195
+ Local mode reads `/v1/logs` from the running server. Hosted mode reports
196
+ deploy progress until the deployment is running or degraded, then
197
+ follows reachable runtime logs.
198
+ The command follows until Ctrl-C by default. `--once` prints the current
199
+ buffer and exits. `--json` emits newline-delimited JSON events.
200
+
201
+ ## sessions
202
+
203
+ `sessions` lists sessions on a running or hosted agent.
204
+
205
+ ```bash
206
+ agent-sdk sessions [--url <baseUrl> | --prod] [--slug <slug>]
207
+ [--team <id>] [--bearer-token <token>] [--json]
208
+ ```
209
+
210
+ Text output shows session ID, channel, mode, turn count, running status,
211
+ and update time. `--json` prints full session summaries in
212
+ `{ sessions }`, including continuation tokens.
213
+
214
+ ## session
215
+
216
+ `session` inspects the event stream for one session.
217
+
218
+ ```bash
219
+ agent-sdk session <sessionId> [--url <baseUrl> | --prod]
220
+ [--slug <slug>] [--team <id>]
221
+ [--json | --text | --events] [--out <file.ndjson>]
222
+ ```
223
+
224
+ By default, `session` prints a compact trajectory. `--text` selects the
225
+ same format. `--json` prints the trajectory object. `--events` prints
226
+ `{ sessionId, events }` with the raw event list. You can't combine
227
+ `--events` and `--json`. `--out <file.ndjson>` writes the raw NDJSON
228
+ trace to a file instead of printing. The file uses the same format as
229
+ `run --events` and the playground download. Use
230
+ [`resume`](#resume) to continue the conversation.
231
+
232
+ ## cost
233
+
234
+ `cost` reports token usage and estimated cost.
235
+
236
+ ```bash
237
+ agent-sdk cost [sessionId] [--url <baseUrl> | --prod]
238
+ [--slug <slug>] [--team <id>] [--json]
239
+ ```
240
+
241
+ With a session ID, `cost` prints per-turn token usage and estimated
242
+ cost for that session. Without one, it prints one row per session on
243
+ the target plus a total. Costs are the engine's recorded estimates from
244
+ `turn.completed` events; turns persisted before cost tracking count as
245
+ unpriced. `--json` prints the underlying report, or `{ sessions }` when
246
+ aggregating. Like `session`, the command supports `--dir`,
247
+ `--bearer-token`, and the `--url`/`--prod` targets, and defaults to the
248
+ local server.
249
+
250
+ ## playground
251
+
252
+ `playground` opens an agent's web playground.
253
+
254
+ ```bash
255
+ agent-sdk playground [--url <baseUrl> | --prod] [--session <id>]
256
+ [--slug <slug>] [--team <id>]
257
+ [--bearer-token <token>] [--print]
258
+ ```
259
+
260
+ `--session` opens a deep link to one session. `--print` prints the URL
261
+ without opening a browser.
262
+
263
+ For an unauthenticated local URL, `playground` opens the browser and
264
+ exits. `--prod` and `--bearer-token` start a loopback proxy to inject
265
+ browser-inaccessible credentials. The proxy stays open until Ctrl-C,
266
+ including when you pass `--print`.
267
+
268
+ ## docs
269
+
270
+ `docs` serves the documentation shipped inside `@cursor/july` and opens
271
+ it in a browser. You don't need an agent project.
272
+
273
+ ```bash
274
+ npx @cursor/july docs
275
+ agent-sdk docs [--port <n>] [--host 127.0.0.1] [--print]
276
+ ```
277
+
278
+ The site is the same documentation mounted at `/docs` on a running
279
+ `serve` host. `docs` starts a loopback-only static server (default port
280
+ is an ephemeral port) and keeps it open until Ctrl-C. `--print` prints
281
+ the URL without opening a browser.
282
+
283
+ ## run
284
+
285
+ `run` sends one or more turns and prints a JSON result.
286
+
287
+ ```bash
288
+ agent-sdk run --dir . --message "Is https://github.com/acme/checkout/pull/42 ready?"
289
+ agent-sdk run --dir . --message "Inspect PR 42" --message "Summarize the risks"
290
+ agent-sdk run --url http://127.0.0.1:3000/pr-approver --message "Inspect PR 42"
291
+ agent-sdk run --prod --slug pr-approver --team 123 --message "Inspect PR 42"
292
+ agent-sdk run --dir . --messages-file ./prompts.json
293
+ ```
294
+
295
+ Without `--url` or `--prod`, the command starts an ephemeral server on
296
+ an available port. Its state root is a temporary directory outside the
297
+ project unless you pass `--state-root`. The command closes the server
298
+ after the turns finish.
299
+
300
+ | Flag | Meaning |
301
+ | --- | --- |
302
+ | `--message <text>` | Send a user message. Repeat the flag for a multi-turn run. |
303
+ | `--messages-file <path>` | Read a JSON array of strings. File messages run before repeated `--message` values. |
304
+ | `--session <id>` | Follow up an existing session. Unlike `chat`, `run` doesn't look up a missing continuation token. |
305
+ | `--continuation-token <token>` | Continue the existing session selected by `--session`. |
306
+ | `--events <file>` | Write the raw NDJSON event stream to this path. |
307
+ | `--no-events` | Don't write an event stream. |
308
+ | `--text` | Print a compact trajectory instead of the JSON result. |
309
+ | `--timeout-ms <n>` | Abort the turn after a positive number of milliseconds. There is no default timeout. |
310
+ | `--no-stream` | Hide live tool and reply progress on stderr. Progress is on by default when stderr is a TTY. |
311
+ | `--slug <slug>` | Pick one agent when local discovery mounts several agents. With `--prod`, select the hosted deployment. |
312
+
313
+ The default trace path is
314
+ `<state-root>/traces/<sessionId>.ndjson`. JSON output contains
315
+ `ok`, `sessionId`, `continuationToken`, `trace`, `playgroundUrl`,
316
+ `playgroundHint`, `visualize`, and `trajectory`. The command exits
317
+ non-zero when the trajectory fails.
318
+
319
+ ## call
320
+
321
+ `call` invokes a server tool directly, with no model turn.
322
+
323
+ ```bash
324
+ agent-sdk call inspect_pr --dir . \
325
+ --input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
326
+ agent-sdk call inspect_pr --url http://127.0.0.1:3000/pr-approver \
327
+ --input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
328
+ agent-sdk call refresh_cache --url http://127.0.0.1:3000/pr-approver \
329
+ --session ses_123
330
+ agent-sdk call inspect_pr --prod --slug pr-approver --team 123 --input '{}'
331
+ ```
332
+
333
+ `call` sends `POST /v1/tools/:toolName` and runs the tool in the serving
334
+ process without a model turn. `--input` accepts any valid JSON and
335
+ defaults to `{}`. Tools with a Zod input schema validate and transform
336
+ the value before execution. A local call needs no inference credential.
337
+ A hosted call still needs Cursor credentials to reach the deployment.
338
+
339
+ `--session` runs the tool inside an existing session and records it on
340
+ the event stream. If a model turn is active or pending, the server
341
+ returns `session_busy`; retry after the turn finishes. The command
342
+ prints the server's JSON response and exits non-zero unless the HTTP
343
+ response succeeds with `ok: true`. See
344
+ [Tools](/docs/reference/tools.md#call-a-tool-without-a-model-turn).
345
+
346
+ ## eval
347
+
348
+ `eval` runs the project's filesystem evals.
349
+
350
+ ```bash
351
+ agent-sdk eval --dir . --list # discovered datapoints
352
+ agent-sdk eval --dir . # run all
353
+ agent-sdk eval --dir . builds/checkout # one datapoint
354
+ agent-sdk eval --dir . builds # every datapoint in the file
355
+ agent-sdk eval --dir . --tag smoke # by tag (repeatable)
356
+ agent-sdk eval --dir . --json # machine-readable results
357
+ agent-sdk eval --dir . --verbose # stream t.log lines + reply snippets
358
+ agent-sdk eval --prod --slug pr-approver --team 123
359
+ # prints Eval ID immediately on --prod/--url; then:
360
+ agent-sdk eval status <evalId> --prod --slug pr-approver
361
+ agent-sdk eval cancel <evalId> --prod --slug pr-approver
362
+ ```
363
+
364
+ `eval` runs `evals/**/*.eval.{ts,js}` on an ephemeral server or against
365
+ `--url`. Select one or more exact case IDs, file ID prefixes, or tags.
366
+ Omit selectors to run all cases. Repeated `--tag` flags use OR matching.
367
+
368
+ An eval run requires `evals/evals.config.{ts,js}` with `maxConcurrency`
369
+ between 1 and 200. Timeout priority is the case's `timeoutMs`, the CLI's
370
+ `--timeout-ms`, the config's `timeoutMs`, then 180 seconds.
371
+
372
+ | Flag | Meaning |
373
+ | --- | --- |
374
+ | `--list` | Print discovered cases without running. `--list --json` prints them as an array. |
375
+ | `--tag <tag>` | Run cases with this tag. Repeated flags use OR matching. |
376
+ | `--json` | Print `{ ok, passed, failed, results }`. |
377
+ | `--verbose` | Stream `t.log` lines and reply snippets. |
378
+ | `--no-stream` | Hide live progress on stderr. |
379
+ | `--strict` | Exit `1` when a scored case misses a soft threshold. |
380
+ | `--max-concurrency <n>` | Override `maxConcurrency` from `evals.config.ts`. |
381
+ | `--junit <path>` | Write JUnit XML for CI annotations. |
382
+ | `--artifacts <dir>` | Write run artifacts here. The default is a timestamped directory under `<state-root>/evals/`. |
383
+ | `--no-artifacts` | Skip run artifacts. |
384
+ | `--skip-report` | Ignore reporters from `evals.config.ts` and eval files. |
385
+ | `--out <path>` | Also write the full results JSON to this path (also for `eval status <evalId>`). |
386
+ | `--no-wait` | Return with the Eval ID as soon as a `--prod` or `--url` batch is accepted. |
387
+ | `--timeout-ms <n>` | Per-case timeout override. |
388
+
389
+ Failed cases exit `1`. A scored case also exits `1` under `--strict`.
390
+ No matching cases exit `2`. `eval status` exits `3` while the remote batch
391
+ is still running.
392
+
393
+ ## trajectory
394
+
395
+ `trajectory` summarizes a saved event stream.
396
+
397
+ ```bash
398
+ agent-sdk trajectory --events /tmp/run.ndjson [--text]
399
+ ```
400
+
401
+ `trajectory` converts a saved NDJSON stream into the trajectory JSON
402
+ returned by `run`. `--text` prints the compact view. The command exits
403
+ non-zero when the reconstructed trajectory failed.
404
+
405
+ ## init
406
+
407
+ `init` scaffolds a new project.
408
+
409
+ ```bash
410
+ agent-sdk init ./my-agent # scaffold package.json, tsconfig.json, agent/ + a demo tool
411
+ agent-sdk init ./my-demo --template demo # record a PR walkthrough
412
+ agent-sdk init ./my-reviewer --template security-reviewer # review PRs for security bugs
413
+ agent-sdk init ./my-triage --template triage-linear # comment on Linear issues
414
+ agent-sdk init ./my-triage --template triage-jira # comment on Jira issues
415
+ agent-sdk init ./my-owners --template agentic-owners # review PRs via owners policies
416
+ agent-sdk init ./pr-autofixer --template pr-autofixer # fix PRs on a cloud VM
417
+ agent-sdk init ./pr-autofixer --template pr-autofixer \
418
+ --var repos=acme/widgets,acme/api --json
419
+ agent-sdk init ./my-agent --json # machine-readable summary for tooling
420
+ agent-sdk init # no directory: print the setup guide
421
+ ```
422
+
423
+ `init` leaves existing files unchanged and labels each one `create` or
424
+ `exist`. It prints the project path, then runs `npm install` so
425
+ `@cursor/july` resolves for `dev` and `run`.
426
+
427
+ Templates may ship `init.json`. On a TTY, `init` asks those questions
428
+ before writing files. `pr-autofixer` asks for GitHub repos. Repeat
429
+ `--var id=value` to answer without a prompt.
430
+ `--json` and non-TTY hosts skip the interview unless `--var` is set.
431
+
432
+ On a TTY, `init` also asks whether to refresh the coding-agent skills in
433
+ `~/.cursor/skills/agentsdk/`. Installing `@cursor/july` already copies
434
+ them via postinstall (with `alwaysApply: true` so Cursor injects the
435
+ bodies), so this prompt is a chance to overwrite with the package
436
+ version. The prompt is skipped for `--json` and non-interactive hosts.
437
+
438
+ If the host isn't signed in, `init` runs `agent-sdk login` and waits for
439
+ the browser flow. It then prints the `cd`, `agent-sdk login`, and
440
+ `agent-sdk dev` steps still needed.
441
+
442
+ With `--json`, `init` still installs dependencies but never blocks on
443
+ login or skill installation. It prints `{ ok, directory, template, created,
444
+ skipped, installed, installError, cliOnPath, cliLinkError, next }`. The
445
+ `next` list includes `login` when the host is unsigned.
446
+
447
+ ## convert-automation
448
+
449
+ `convert-automation` exports a Cursor Automation into an agent project.
450
+
451
+ ```bash
452
+ agent-sdk convert-automation <url> [--dir <path>] [--json]
453
+ ```
454
+
455
+ `<url>` is the dashboard URL (`…/automations/<uuid>` or
456
+ `…/custom-agents/<uuid>`) or a bare UUID. The command fetches the
457
+ Automation with your Cursor credentials. It writes converted files to
458
+ `--dir`, which defaults to `./<automation-name>`, adds missing `init`
459
+ scaffold files, and runs `npm install`. File generation does not
460
+ overwrite existing paths. The install may still update lockfiles or run
461
+ lifecycle scripts from an existing `package.json`.
462
+
463
+ MCP servers convert to Cursor-account connections resolved at runtime.
464
+ The project contains their names, not server URLs or credentials.
465
+ Local runs use the signed-in account. Hosted deployments use a separate
466
+ service account; authorize each generated connection with
467
+ [`mcp oauth`](#mcp-oauth) after the first deploy. Review the generated
468
+ project, then run `validate` and `dev`.
469
+
470
+ Warnings do not change the exit status. Bad arguments, authentication
471
+ failures, fetch failures, and file write failures return a nonzero exit
472
+ code.
473
+
474
+ `--json` prints
475
+ `{ ok, directory, files, warnings, setupSteps, installed, installError, mcpConnections }`.
476
+ On failure it prints `{ ok: false, error }` and still writes the prose
477
+ error to stderr.
478
+
479
+ The [Convert a Cursor Automation](/docs/guides/convert-automation.md) guide
480
+ covers generated files and behavior the converter cannot reproduce.
481
+
482
+ ## install-skills
483
+
484
+ `install-skills` copies the package's coding-agent skills into
485
+ `~/.cursor/skills/agentsdk/` with `alwaysApply: true` so Cursor loads
486
+ them as global rules. Installing `@cursor/july` already does this in
487
+ postinstall (`npm install`, `npx`, a version bump). Use this command
488
+ to refresh without reinstalling the package, or from a monorepo
489
+ source checkout (postinstall skips that tree).
490
+
491
+ ```bash
492
+ agent-sdk install-skills [--print] [--json]
493
+ ```
494
+
495
+ Running the command is the confirmation: it never prompts, and it
496
+ overwrites the installed skills with the version bundled in the
497
+ package. `init` offers the same refresh once, interactively. `--print`
498
+ previews the skills, the removals, and the install path without writing
499
+ anything. `--json` prints
500
+ `{ ok, dryRun, directory, firstInstall, skills, removed }`.
501
+
502
+ Set `CURSOR_JULY_SKIP_SKILL_INSTALL=1` to skip the postinstall copy.
503
+ `CURSOR_JULY_SKILLS_HOME` overrides the `~/.cursor/skills` directory.
504
+
505
+ ## info
506
+
507
+ `info` prints the discovered agent surface.
508
+
509
+ ```bash
510
+ agent-sdk info --dir . [--json]
511
+ ```
512
+
513
+ `info` reports the model, instruction size, tools, skills, MCP
514
+ connections, subagents, channel routes, schedules, hooks, and
515
+ diagnostics. Text output summarizes each mounted agent. `--json` prints
516
+ `{ agents: [{ slug, ...projectInfo }] }`, with one entry per mounted
517
+ slug. Use `validate`, not `info --json`, when a script needs an error
518
+ exit status.
519
+
520
+ ## validate
521
+
522
+ `validate` checks the project and sets the exit code.
523
+
524
+ ```bash
525
+ agent-sdk validate --dir .
526
+ ```
527
+
528
+ `validate` prints diagnostics for each agent and exits non-zero when any
529
+ diagnostic has error severity. `serve` also refuses to start when errors
530
+ are present. Warnings don't change the exit status.
531
+
532
+ ## login / logout / whoami
533
+
534
+ Three commands manage the host's Cursor credential.
535
+
536
+ ```bash
537
+ agent-sdk login [--api-key <key>] [--key-name <name>]
538
+ agent-sdk whoami [--json]
539
+ agent-sdk logout
540
+ ```
541
+
542
+ `login` signs the host in to Cursor: browser sign-in mints a named,
543
+ dashboard-revocable API key, and only the key is stored (the default
544
+ name is `<invoked command> (<hostname>)`). It powers inference, the cloud
545
+ runtime, and Cursor account MCP connections. `--key-name` changes the
546
+ name of a browser-minted key. `login --api-key` validates and stores a
547
+ key you already created.
548
+
549
+ `whoami` shows which credential is active and why. `CURSOR_API_KEY`
550
+ takes precedence over the stored login. `logout` removes the local
551
+ credential file but doesn't revoke the API key. Revoke it in the Cursor
552
+ dashboard when it should stop working.
553
+
554
+ Login and account RPCs honor `CURSOR_API_BASE_URL`. The SDK harness
555
+ honors `CURSOR_BACKEND_URL`. Set both to the same URL, or keys minted
556
+ on one host are rejected by the other.
557
+
558
+ ## update
559
+
560
+ `update` upgrades an installed copy to the latest published version.
561
+
562
+ ```bash
563
+ agent-sdk update
564
+ ```
565
+
566
+ The command checks npm's `latest` tag, detects how the Agent SDK was installed,
567
+ and runs the matching npm, pnpm, Yarn, or Bun upgrade command. It handles
568
+ global installs and project dependencies. It doesn't prompt before
569
+ running the package-manager command.
570
+
571
+ Source checkouts, `npx` or `pnpm dlx` caches, and unknown install layouts
572
+ aren't changed. The command prints a manual upgrade hint instead.
573
+
574
+ Published installs also check for a newer version at most once every 24
575
+ hours and print an update warning on stderr. Source checkouts, CI, and
576
+ commands with an explicit `--json` flag skip this automatic check.
577
+
578
+ ## deploy
579
+
580
+ `deploy` sends one or more agents to Cursor managed hosting.
581
+
582
+ ```bash
583
+ agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
584
+ [--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
585
+ [--cursor-events-repo owner/name]...
586
+ [--allow-domain <domain>]... [--no-wait] [--json]
587
+ ```
588
+
589
+ Managed hosting requires team-admin permission and the team's
590
+ cloud-agent entitlement. `--team` defaults to the signed-in account's
591
+ team.
592
+
593
+ For a single project, the slug defaults to a normalized version of the
594
+ directory name. Deployment slugs contain lowercase letters, digits, `_`,
595
+ or `-`, with a maximum of 64 characters. For a directory with several
596
+ agents, select one with `--slug`, deploy all with `--all`, or choose from
597
+ the TTY prompt. Non-interactive callers must pass `--slug` or `--all`.
598
+ If `--dir` contains no agent project or child agents, `deploy` requires
599
+ `--slug` (or a slug derived from the directory name) and an https git
600
+ repository URL (`--repo`, or inferred from `origin` when `--dir` is an
601
+ agent project). `--all` fails when there is no agent project.
602
+
603
+ The command infers `--repo`, `--ref`, and `--path` from the current Git
604
+ checkout when possible. Explicit flags take precedence. `--repo` must
605
+ use HTTPS. Repeat `--cursor-events-repo` to select SCM event sources.
606
+ Repeat `--allow-domain` to add engine egress domains; these values are
607
+ combined with `hosting.egressDomains` from the agent config. Egress
608
+ domains apply only to repository-backed deployments. Each domain must
609
+ be a lowercase hostname with at least two labels and an alphabetic
610
+ top-level domain. One leading `*.` wildcard is allowed. A deployment
611
+ can declare at most 20 domains.
612
+
613
+ By default, the command polls every three seconds for up to ten minutes
614
+ and succeeds only when the deployment reaches `running`. `--no-wait`
615
+ returns after the deployment request is accepted. Multi-agent deploys
616
+ run sequentially. When several agents are selected, `--path` is ignored
617
+ and each project infers its own path. A single-target `--json` run
618
+ prints one object; a multi-target run prints an array.
619
+
620
+ The first deployment can return an alias token. It appears once in text
621
+ or JSON output and can't be retrieved later. Store it as a secret. Send
622
+ it as `X-Agent-Alias-Token` when calling the stable alias URL, or use it
623
+ to sign in to the hosted playground.
624
+
625
+ See [Deployment](/docs/deployment.md) for the hosting security model and
626
+ state layout.
627
+
628
+ ## deployments
629
+
630
+ `deployments` lists the selected team's deployments.
631
+
632
+ ```bash
633
+ agent-sdk deployments [--team <id>] [--json]
634
+ ```
635
+
636
+ Text output shows each slug, status, deployment kind, and
637
+ update time. `--json` prints `{ deployments }`.
638
+
639
+ ## deployment
640
+
641
+ `deployment` prints the full status of one deployment.
642
+
643
+ ```bash
644
+ agent-sdk deployment <slug> [--team <id>] [--json]
645
+ ```
646
+
647
+ Text output includes status, kind, alias, source, egress
648
+ domains, secret names, engine state, and the last error when present.
649
+ `--json` returns the full API response. It can include short-lived
650
+ `engineAccess.headers`, so handle JSON output as a credential.
651
+
652
+ ## stop
653
+
654
+ `stop` shuts down a deployment.
655
+
656
+ ```bash
657
+ agent-sdk stop <slug> [--team <id>] [--no-wait] [--json]
658
+ ```
659
+
660
+ The command polls for up to ten minutes until the status reaches
661
+ `stopped`. `--no-wait` returns after the stop request is accepted.
662
+
663
+ ## delete
664
+
665
+ `delete` removes a deployment.
666
+
667
+ ```bash
668
+ agent-sdk delete <slug> [--team <id>] [--no-wait] [--json]
669
+ ```
670
+
671
+ The command waits until the deployment is gone. `--no-wait` returns after
672
+ the delete request is accepted.
673
+
674
+ ## rotate-token
675
+
676
+ `rotate-token` replaces the alias token used by callers and the hosted
677
+ playground.
678
+
679
+ ```bash
680
+ agent-sdk rotate-token <slug> [--team <id>] [--json]
681
+ ```
682
+
683
+ The old token stops working immediately. The replacement is shown once.
684
+ `--json` prints `{ aliasToken }`.
685
+
686
+ ## rotate-pod-credential
687
+
688
+ `rotate-pod-credential` replaces the credential used by the running
689
+ engine pod.
690
+
691
+ ```bash
692
+ agent-sdk rotate-pod-credential <slug> [--team <id>] [--json]
693
+ ```
694
+
695
+ The command prints only the masked key (`--json` prints
696
+ `{ podCredentialMaskedKey }`). The running pod keeps the old credential
697
+ until the next deploy, so nothing breaks in between. Run
698
+ `agent-sdk deploy --slug <slug>` to inject the replacement and retire
699
+ the old credential.
700
+
701
+ ## mcp
702
+
703
+ `mcp` proxies an agent's MCP endpoint over stdio for MCP clients that
704
+ spawn local servers, such as Cursor.
705
+
706
+ ```bash
707
+ agent-sdk mcp --prod [--slug <slug>] [--team <id>]
708
+ agent-sdk mcp --url <baseUrl> [--bearer-token <token>]
709
+ agent-sdk mcp install [--prod | --url <baseUrl>] [--name <serverName>]
710
+ [--print] [--json] [--remote]
711
+ ```
712
+
713
+ The bare command reads newline-delimited JSON-RPC on stdin and forwards
714
+ one POST per message to `<target>/v1/mcp`. It requires `--prod` or
715
+ `--url`. With `--prod`, it resolves the hosted deployment through the
716
+ signed-in Cursor account and re-mints short-lived engine credentials as
717
+ they expire, so no durable secret lands in a config file. stdout is
718
+ reserved for the MCP wire; logging goes to stderr.
719
+
720
+ `mcp install` writes the matching entry into `~/.cursor/mcp.json` so
721
+ the agent shows up as an MCP server in Cursor. `--name` overrides the
722
+ server name (the default is the slug, or a name derived from `--url`).
723
+ `--print` prints the entry instead of writing the file, and `--json`
724
+ prints a machine-readable result. `--remote` (with `--prod`) writes a
725
+ remote HTTP entry pointing at the stable Cursor MCP gateway instead of
726
+ the local stdio proxy, for MCP hosts that can't spawn stdio servers.
727
+ The remote entry carries your API key in plain text, so treat the file
728
+ as a credential.
729
+
730
+ ## mcp oauth
731
+
732
+ `mcp oauth` authorizes a `defineConnection({ url, oauth: true })` or
733
+ `defineConnection({ cursorAccount: true })` connection.
734
+
735
+ URL connections run a browser PKCE flow. Tokens are written to
736
+ `mcp-auth.json` under the CLI config directory (override with
737
+ `AGENT_SERVE_CONFIG_DIR`). Pass `--store` to upsert matching
738
+ `MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
739
+
740
+ Cursor-account connections authorize the hosted deployment's service
741
+ account through the Cursor backend's connector consent flow. Those
742
+ tokens live on the Cursor backend, so `--store` isn't needed; the
743
+ command prints a note when you pass it anyway.
744
+
745
+ ```bash
746
+ agent-sdk mcp oauth <connection> [--dir .] [--store] [--slug <slug>] [--team <id>]
747
+ ```
748
+
749
+ `<connection>` is the `agent/mcp-connections/<connection>.ts` basename.
750
+ `--slug` defaults to the `--dir` basename. `--team` defaults to the
751
+ signed-in account's team. You need `agent-sdk login` (or `--api-key`)
752
+ before `--store`.
753
+
754
+ Secret names are `MCP_OAUTH_<NAME>_ACCESS_TOKEN`,
755
+ `_REFRESH_TOKEN`, and `_CLIENT_ID` (`<NAME>` is the connection id in
756
+ upper snake case). Declare them in `hosting.secretNames` so deploy
757
+ validation expects them. Secrets apply on the next deploy.
758
+
759
+ Tokens are bound to the connection's resource URL. Changing the URL
760
+ invalidates the local entry; run `mcp oauth` again.
761
+
762
+ See the [Host MCP OAuth guide](/docs/guides/mcp-oauth.md).
763
+
764
+ ## secrets
765
+
766
+ `secrets` manages environment secrets for a deployment.
767
+
768
+ ```bash
769
+ agent-sdk secrets set <slug> NAME [NAME2 ...] [--team <id>] [--json]
770
+ agent-sdk secrets list <slug> [--team <id>] [--json]
771
+ agent-sdk secrets unset <slug> NAME [--team <id>] [--json]
772
+ ```
773
+
774
+ Pass names only. On a TTY, `secrets set` prompts for each value with
775
+ hidden input (nothing echoes). When stdin is piped, provide one line per
776
+ name. Values never print on stdout.
777
+
778
+ Do not put values on the command line. `NAME=VALUE` in argv shows up in
779
+ shell history and in agent-captured terminals. The CLI refuses that form
780
+ unless you pass `--from-argv` (still warns). Prefer a file redirect when
781
+ a human is not at the prompt:
782
+
783
+ ```bash
784
+ agent-sdk secrets set weather-agent WEATHER_API_KEY < ./weather-api-key.txt
785
+ ```
786
+
787
+ Secret names use `UPPER_SNAKE_CASE`, start with a letter, and contain at
788
+ most 64 characters. Names beginning with `CURSOR_` are reserved. Values
789
+ can contain at most 4096 bytes, and one deployment can hold 32 secrets.
790
+
791
+ `secrets list` returns names and creation times, never values. Secret
792
+ changes reach the engine on its next deploy. `secrets set` upserts the
793
+ named secrets without deleting others.
794
+
795
+ JSON output is `{ secretNames }` for `set`, `{ secrets }` for `list`,
796
+ and `{ removed }` for `unset`.
797
+
798
+ ## slack
799
+
800
+ The `slack` pack provisions, generates, and checks Socket Mode channel
801
+ setup.
802
+
803
+ ```bash
804
+ agent-sdk slack setup
805
+ agent-sdk slack create [--dir <path>] [--name <name>] [--prod]
806
+ [--slack-team <T…>] [--team <id>]
807
+ [--icon <https-url-or-file>]
808
+ [--prefix <prefix> | --no-prefix]
809
+ [--channel-posts] [--json]
810
+ agent-sdk slack destroy [--dir <path>] [--prod] [--slack-team <T…>]
811
+ [--team <id>] [--json]
812
+ agent-sdk slack icon <https-url-or-file> [--dir <path>] [--prod]
813
+ [--slack-team <T…>] [--team <id>] [--json]
814
+ agent-sdk slack init --manual [--dir <path>] [--name <name>]
815
+ [--prefix <prefix> | --no-prefix] [--channel-posts]
816
+ agent-sdk slack manifest [--dir <path>] [--name <name>]
817
+ [--env dev|prod|both] [--channel-posts] [--print]
818
+ agent-sdk slack doctor [--dir <path>] [--prefix <prefix> | --no-prefix] [--json]
819
+ ```
820
+
821
+ `slack setup` prints the two-product chooser plus the `--manual` setup
822
+ checklist. It doesn't change files.
823
+
824
+ `slack create` opens the signed-in Cursor dashboard wizard. Finish Slack
825
+ consent and the bot name there. The CLI writes the token pair into
826
+ `<dir>/.env.local` and runs `doctor`. It requires a signed-in host
827
+ (`agent-sdk login` or `CURSOR_API_KEY`). `--prod` provisions the
828
+ production app; the default is the development app. `--name` / `--icon`
829
+ / `--channel-posts` prefill the wizard. A second create for the same
830
+ slug and env overwrites the live Slack app. If Slack needs a workspace
831
+ admin's approval, the wizard waits; keep the CLI running, open Slack's
832
+ **Request approval** page (the CLI prints the link), and click **Retry**
833
+ after the admin approves. Token values never print.
834
+
835
+ `slack destroy` deletes the provisioned app for the selected
836
+ environment. Tokens already written to `.env.local` stay in place and
837
+ stop working.
838
+
839
+ `slack icon` sets the provisioned app's icon from an https image URL or
840
+ a local png, jpg, or gif file of at most 512KB.
841
+
842
+ `slack init` without `--manual` exits non-zero and writes no files. Use
843
+ `slack create` for the dashboard wizard. `slack init --manual` writes
844
+ the channel file, development and production manifests, `env.example`,
845
+ and setup status under the project. You paste those manifests at
846
+ api.slack.com. The command refuses to overwrite a target file. If a
847
+ collision occurs, it exits non-zero; files created earlier in the run
848
+ remain. The token prefix defaults to the directory basename normalized
849
+ to uppercase snake case. Explicit `--prefix` values use the same
850
+ normalization. For example, `pr-approver` becomes
851
+ `PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix` uses shared
852
+ `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. `--channel-posts` subscribes
853
+ the manifests to channel-post events. The command always prints a JSON
854
+ summary.
855
+
856
+ `slack manifest` regenerates selected manifest files. `--env` defaults
857
+ to `both`, and `--name` defaults to the directory name. `--print` writes
858
+ the manifest JSON to stdout instead of changing files. With the default
859
+ `--env both`, it prints development JSON, a `--- prod ---` separator,
860
+ then production JSON.
861
+
862
+ `slack doctor` checks both tokens, Socket Mode connectivity, and
863
+ Slack's `auth.test`. It exits non-zero when any check fails.
864
+
865
+ See the [Slack guide](/docs/guides/slack.md).
866
+
867
+ ## github
868
+
869
+ The `github` pack discovers `githubChannel()` definitions and sends live
870
+ or synthesized deliveries to them.
871
+
872
+ ```bash
873
+ agent-sdk github doctor [--install] [--json]
874
+ agent-sdk github events [--dir <path>] [--host <host>] [--port <n>] [--json]
875
+ agent-sdk github forward [--dir <path>] [--slug <slug>] [--channel <id>]
876
+ [--repo owner/repo | --org <org>] [--events a,b,c] [--url <url>]
877
+ [--host <host>] [--port <n>] [--secret <secret>] [--install]
878
+ agent-sdk github replay <pr-url|owner/repo#N> --dir .
879
+ [--events a,b,c|'*'] [--action <action>] [--conclusion <result>]
880
+ [--comment <body>] [--context <name>] [--slug <slug>] [--channel <id>]
881
+ [--host <host>] [--port <n>] [--url <url>] [--secret <secret>]
882
+ [--dry-run] [--out <dir>] [--json]
883
+ ```
884
+
885
+ `github events` prints each discovered channel's delivery URL and event
886
+ set. When it finds no channels, it returns an empty result and exits
887
+ successfully.
888
+
889
+ `github forward` wraps `gh webhook forward`. It infers the repository
890
+ from the Git remote when you omit `--repo` and `--org`. URLs and events
891
+ come from the discovered channels; `--events` overrides the event set.
892
+ Use `--slug` or `--channel` to narrow discovery when several channels
893
+ match. Otherwise, one local proxy fans deliveries out to every match.
894
+ `--url` targets one channel. For `forward`, pass `--events` when no
895
+ matched channel can supply the event set.
896
+
897
+ Repository forwarding needs repo-admin access. Organization forwarding
898
+ needs org-owner access. The relay authenticates with the GitHub CLI's
899
+ stored login. A `GITHUB_TOKEN` or `GH_TOKEN` environment override can
900
+ make delivery requests return `401`, even when hook creation succeeds.
901
+ Unset those variables before forwarding.
902
+
903
+ Pass `--secret` or set `GITHUB_WEBHOOK_SECRET` to sign deliveries.
904
+ `serve --dev` accepts unsigned loopback deliveries. A non-dev target
905
+ requires the same secret on both sides.
906
+
907
+ `github replay` needs read access, not admin access. It reads the pull
908
+ request through `gh api`, builds GitHub webhook payloads, and posts them
909
+ to the selected channels. Supported events are `pull_request`,
910
+ `issue_comment`, `pull_request_review_comment`, `check_run`,
911
+ `check_suite`, `workflow_run`, and `status`. The default is
912
+ `pull_request` with action `synchronize`. Comment events need
913
+ `--comment`.
914
+
915
+ Use `--events '*'` to replay every supported event declared by the
916
+ channel. `--dry-run` prints payloads without posting them. `--out`
917
+ writes fixture files but still posts unless you also pass `--dry-run`.
918
+
919
+ `github doctor` checks `gh`, its login, and the pinned
920
+ `cli/gh-webhook` extension. `--install` installs or repairs the
921
+ extension. An environment-token override is a warning and doesn't make
922
+ `github doctor` fail.
923
+
924
+ See the [GitHub guide](/docs/guides/github.md).
925
+
926
+ ## Environment variables
927
+
928
+ These environment variables affect the CLI and its channel packs.
929
+
930
+ | Variable | Meaning |
931
+ | --- | --- |
932
+ | `CURSOR_API_KEY` | Cursor credential. It takes precedence over the stored login. |
933
+ | `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs. |
934
+ | `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness. |
935
+ | `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. Defaults to the CLI config directory under `~/.config`. |
936
+ | `AGENT_SERVE_NO_UPDATE_CHECK` / `NO_UPDATE_NOTIFIER` | Disable the automatic published-version check when set to a non-empty value other than `0`. |
937
+ | `CI` | Disable the automatic published-version check when set. |
938
+ | `GITHUB_WEBHOOK_SECRET` | Default signing secret for GitHub forwarding and replay. |
939
+ | `GITHUB_APP_ID` / `GITHUB_APP_PRIVATE_KEY` / `GITHUB_APP_INSTALLATION_ID` | GitHub App authentication for outbound API calls. |
940
+ | `GITHUB_TOKEN` / `GH_TOKEN` | Token authentication for outbound API calls. Unset both for `github forward`. |
941
+ | `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` | Slack tokens for one agent. Use `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` for each agent on a multi-agent host. |
942
+
943
+ ## What's next
944
+
945
+ - [Project layout](/docs/reference/project-layout.md): files the CLI discovers
946
+ - [HTTP API](/docs/reference/http-api.md): routes used by `chat`, `call`, and other clients
947
+ - [Deployment](/docs/deployment.md): production auth, state, and operations