@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
@@ -11,7 +11,7 @@ under `/v1/channels/<id>`. The Slack and GitHub packs are prebuilt
11
11
  channels with platform transports. This page is the authoring reference;
12
12
  for the walkthrough, see the [Webhooks guide](../guides/webhooks.md).
13
13
 
14
- ## The built-in HTTP channel
14
+ ## Built-in HTTP channel
15
15
 
16
16
  It's always mounted, under `/<slug>` in the default multi-agent layout:
17
17
  session create, follow-up, stream, stop, the sessions list, approvals,
@@ -132,11 +132,9 @@ Handlers receive the Fetch `Request` and an args object:
132
132
  `"coalesce"` enqueues behind the running turn, the
133
133
  [Slack policy](./sessions.md#what-happens-when-i-send-a-follow-up)),
134
134
  `workspaceFiles`, `workspaceDir`, `cloud` (attach cloud repos for this
135
- session), `auth` (defaults to the request principal), `sdkAgentId`
136
- (resume a specific SDK agent), `state` (starting channel state for new
137
- sessions), `title` (session display title), `purpose` (`"eval"` skips
138
- sticky A/B enrollment), and `coalesceSourceTs` (dedupe key for coalesce
139
- queue items already delivered mid-turn).
135
+ session), `auth` (defaults to the request principal), `state` (starting
136
+ channel state for new sessions), `title` (session display title), and
137
+ `purpose` (`"eval"` skips sticky A/B enrollment).
140
138
 
141
139
  ## Events
142
140
 
@@ -151,14 +149,12 @@ services. This is where a channel delivers replies back to its surface.
151
149
 
152
150
  `state` declares the starting per-session adapter state (JSON), persisted
153
151
  on the session record. Routes and event handlers read and mutate it
154
- through `channel.state`. `onStart(args)` runs when the channel mounts;
155
- the Slack pack opens its Socket Mode connection here. `onStop()` runs
156
- when the server drains.
152
+ through `channel.state`. `onStart(args)` runs when the channel mounts.
153
+ `onStop()` runs when the server stops.
157
154
 
158
155
  `onStart` receives the route helpers (`send`, `getSession`, `receive`,
159
- `callTool`, `host`, `waitUntil`, `artifacts`, and a `logger` that
160
- respects the server's log sink) plus a set that exists for long-lived
161
- transports:
156
+ `callTool`, `host`, `waitUntil`, `artifacts`, `logger`) plus helpers
157
+ for long-lived transports:
162
158
 
163
159
  - `emitAssistantMessage(sessionId, text)` appends an assistant message
164
160
  without a model turn, for host tasks that already produced the final
@@ -166,8 +162,6 @@ transports:
166
162
  - `hasContinuationSession(token)` and `isContinuationBusy(token)`
167
163
  report whether a continuation token has a live session and whether a
168
164
  turn is in flight on it.
169
- - `getContinuationLastBotMessageTs(token)` reads the Slack warm-delta
170
- watermark from channel state.
171
165
  - `interruptContinuation(token)` stops the in-flight turn and clears
172
166
  coalesced follow-ups queued behind it.
173
167
  - `resolveApproval(sessionId, callId, decision, auth, options?)`
@@ -221,22 +215,17 @@ replay and live forwarding. Author `agent/channels/github.ts` with
221
215
  converge a merge-box check and sticky PR comment from default stream
222
216
  events. Guide: [GitHub](../guides/github.md).
223
217
 
224
- **Deployments** (`@cursor/july/channels/deployments`): pull transport
225
- over `/v0/deployment-events`. Subscribe per deploy source with
226
- `deploySourceUris`, narrow with `environments` / `events`, and handle
227
- each event in `onEvent`. `deploySourceUris` must match
228
- `Deployment.deploy_source_uri` as your deployment writer records it; the
229
- field has no format, and matching is case-insensitive but otherwise
230
- literal. Each event carries `deploySourceUri` and `deployVersion`.
231
- Author `agent/channels/deployments.ts` with `deploymentsChannel()`. The
232
- serve host discovers every mounted deployments channel, runs one relay
233
- for the process against the union of their deploy sources, and routes
234
- each event to the channels that asked for it; the Slack and SCM relays
235
- use the same ownership. It authenticates with the host credential and
236
- keeps a durable offset, so a restart resumes rather than dropping
237
- events. An empty `deploySourceUris` list mounts the channel but starts
238
- no relay for it, so an env-configured agent stays inert until its
239
- deploy sources are set.
218
+ **Deployments** (`@cursor/july/channels/deployments`): pull deploy
219
+ events. Subscribe per deploy source with `deploySourceUris`, narrow
220
+ with `environments` / `events`, and handle each event in `onEvent`.
221
+ `deploySourceUris` must match `Deployment.deploy_source_uri` as your
222
+ deployment writer records it; matching is case-insensitive but
223
+ otherwise literal. Each event carries `deploySourceUri` and
224
+ `deployVersion`. Author `agent/channels/deployments.ts` with
225
+ `deploymentsChannel()`. It uses the host credential. A restart resumes
226
+ rather than dropping events. An empty `deploySourceUris` list mounts
227
+ the channel but starts no pull, so an env-configured agent stays inert
228
+ until its deploy sources are set.
240
229
 
241
230
  For other platforms like Discord or Teams, use the authored
242
231
  `defineChannel` webhook form.
@@ -255,6 +244,6 @@ session; one active continuation per session; the HTTP channel returns
255
244
  Continue with these pages:
256
245
 
257
246
  - [Webhooks guide](../guides/webhooks.md): the same API, walked through
258
- - [HTTP API](./http-api.md): the built-in routes precisely
247
+ - [HTTP API](./http-api.md): session, discovery, and channel routes
259
248
  - [Sessions and streaming](./sessions.md): the events channels
260
249
  subscribe to
@@ -5,14 +5,10 @@ description: "Commands and common flags for local development, running servers,
5
5
 
6
6
  # CLI reference
7
7
 
8
- `@cursor/july` installs `july` (so `npx @cursor/july docs` works),
9
- `agent-sdk`, and the legacy `agent-serve` alias. The examples on this
10
- page use `agent-sdk`. Run the CLI with Node 22.13 or newer. Don't run it
11
- with Bun; Bun corrupts tool-result streams from the Cursor SDK.
12
-
13
- The current release still uses `.agent-serve` for on-disk state. See the
14
- [rename table](/#run-the-cli) for identifiers still moving to
15
- agent-sdk names.
8
+ `@cursor/july` installs `july` (so `npx @cursor/july docs` works) and
9
+ `agent-sdk`. The examples on this page use `agent-sdk`. Run the CLI with
10
+ Node 22.13 or newer. Don't run it with Bun; Bun corrupts tool-result
11
+ streams from the Cursor SDK.
16
12
 
17
13
  `agent-sdk help` prints the built-in summary. The Slack and GitHub packs
18
14
  also provide `agent-sdk slack help` and `agent-sdk github help`.
@@ -32,7 +28,7 @@ also provide `agent-sdk slack help` and `agent-sdk github help`.
32
28
  | [`run`](#run) | Run one or more turns locally, remotely, or on a hosted agent |
33
29
  | [`call`](#call) | Call a server tool without a model turn |
34
30
  | [`eval`](#eval) | Run filesystem evals |
35
- | [`trajectory`](#trajectory) | Summarize a saved `events.ndjson` file |
31
+ | [`trajectory`](#trajectory) | Summarize a saved event stream |
36
32
  | [`init`](#init) | Scaffold a project, or print the setup guide |
37
33
  | [`convert-automation`](#convert-automation) | Export a Cursor Automation into an agent project |
38
34
  | [`install-skills`](#install-skills) | Refresh coding-agent skills (`npm install` already copies them) |
@@ -97,7 +93,6 @@ agent-sdk serve [--dir <path>] [--port 3000] [--host 127.0.0.1] [--dev]
97
93
  [--allow-anonymous-cursor-github]
98
94
  [--allow-anonymous-cursor-account-mcp]
99
95
  [--public-url <url>] [--cloud-tools-url <url>]
100
- [--cursor-github-proxy] [--no-control-plane]
101
96
  [--no-schedules] [--no-playground]
102
97
  [--no-docs] [--cursor-events --repo owner/name]...
103
98
  ```
@@ -106,15 +101,14 @@ If `--dir` is an agent project, it mounts under its directory name. If
106
101
  it contains agent projects, each child mounts separately. The index
107
102
  lives at `/`. Each agent is available at `/<slug>/v1/*` and
108
103
  `/<slug>/playground`. On a TTY, press Enter to restart.
109
- Unless `--state-root` is set, each mount uses
110
- `<agent-project>/.agent-serve`; slugged mounts use
111
- `<agent-project>/.agent-serve/<slug>`.
104
+ Unless `--state-root` is set, each mount uses a state directory under
105
+ the agent project. Slugged mounts get a subdirectory named for the slug.
112
106
 
113
107
  | Flag | Meaning |
114
108
  | --- | --- |
115
109
  | `--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. |
116
110
  | `--host` | Bind this host. The default is loopback-only `127.0.0.1`. |
117
- | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, widen playground session access on loopback, and start Vite HMR when available. |
111
+ | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and widen playground session access on loopback. |
118
112
  | `--mode` | Use `multi` for slugged routes and an index, or `single` for one agent at the unslugged `/v1/*`. The default is `multi`. |
119
113
  | `--api-key` | Use this Cursor API key. The command falls back to `CURSOR_API_KEY`, then the stored login. |
120
114
  | `--state-root` | Store sessions, streams, workspaces, and channel state here. Keep durable production state outside the agent repository. |
@@ -124,12 +118,10 @@ Unless `--state-root` is set, each mount uses
124
118
  | `--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). |
125
119
  | `--public-url` | Set the externally reachable host URL. Cloud-runtime peer connections need it to call back into this server. |
126
120
  | `--cloud-tools-url` | Authenticated HTTP MCP URL for this deployment's direct server-tool endpoint. Hosted deployments configure it automatically. |
127
- | `--cursor-github-proxy` | Route `githubChannel({ cursorAccount })` API calls through the Cursor backend's GitHub forwarder instead of minting raw installation tokens into this process. `AGENT_SERVE_GITHUB_PROXY_URL` overrides the base URL. |
128
- | `--no-control-plane` | Skip the bundled schedule and reminder clocks. Cursor hosting passes this so the platform fires timed work through internal routes instead. |
129
121
  | `--no-schedules` | Disable the cron runner outside dev mode. |
130
- | `--no-playground` | Skip the web playground and its build or HMR process. |
131
- | `--no-docs` | Skip the documentation site at `/docs` and its build. |
132
- | `--cursor-events` | Pull SCM events from Cursor's `/v0/scm-events` in addition to authored webhook routes. Requires a signed-in host. Pass repeatable `--repo owner/name` values; repos declared by `githubChannel({ cursorAccount })` also enable the relay. State lives under `<state-root>/cursor-events/`. |
122
+ | `--no-playground` | Skip the web playground. |
123
+ | `--no-docs` | Skip the documentation site at `/docs`. |
124
+ | `--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. |
133
125
 
134
126
  Multi-agent slugs must start with a letter or digit, then contain only
135
127
  letters, digits, `_`, or `-`. The reserved slugs are `v1`, `playground`,
@@ -149,10 +141,9 @@ agent-sdk dev ./sdk-pr-reviewer --port 3000
149
141
  `dev` accepts the same flags as [`serve`](#serve). You can use `--dir`
150
142
  instead of the positional path.
151
143
  Dev mode is always on: schedules and reminders wait for manual dispatch,
152
- GitHub accepts unsigned loopback deliveries, and Vite HMR starts when
153
- the toolchain is present. Prefer this over `serve --dev` while
154
- iterating. Pass at most one positional path. Don't combine a positional
155
- path with a different `--dir`.
144
+ and GitHub accepts unsigned loopback deliveries. Prefer this over
145
+ `serve --dev` while iterating. Pass at most one positional path. Don't
146
+ combine a positional path with a different `--dir`.
156
147
 
157
148
  ## chat
158
149
 
@@ -289,7 +280,7 @@ npx @cursor/july docs
289
280
  agent-sdk docs [--port <n>] [--host 127.0.0.1] [--print]
290
281
  ```
291
282
 
292
- The site is the same VitePress build mounted at `/docs` on a running
283
+ The site is the same documentation mounted at `/docs` on a running
293
284
  `serve` host. `docs` starts a loopback-only static server (default port
294
285
  is an ephemeral port) and keeps it open until Ctrl-C. `--print` prints
295
286
  the URL without opening a browser.
@@ -325,7 +316,7 @@ after the turns finish.
325
316
  | `--slug <slug>` | Pick one agent when local discovery mounts several agents. With `--prod`, select the hosted deployment. |
326
317
 
327
318
  The default trace path is
328
- `<dir>/.agent-serve/traces/<sessionId>.ndjson`. JSON output contains
319
+ `<state-root>/traces/<sessionId>.ndjson`. JSON output contains
329
320
  `ok`, `sessionId`, `continuationToken`, `trace`, `playgroundUrl`,
330
321
  `playgroundHint`, `visualize`, and `trajectory`. The command exits
331
322
  non-zero when the trajectory fails.
@@ -393,7 +384,7 @@ between 1 and 200. Timeout priority is the case's `timeoutMs`, the CLI's
393
384
  | `--strict` | Exit `1` when a scored case misses a soft threshold. |
394
385
  | `--max-concurrency <n>` | Override `maxConcurrency` from `evals.config.ts`. |
395
386
  | `--junit <path>` | Write JUnit XML for CI annotations. |
396
- | `--artifacts <dir>` | Write run artifacts here. The default is a timestamped directory under `<dir>/.agent-serve/evals/`. |
387
+ | `--artifacts <dir>` | Write run artifacts here. The default is a timestamped directory under `<state-root>/evals/`. |
397
388
  | `--no-artifacts` | Skip run artifacts. |
398
389
  | `--skip-report` | Ignore reporters from `evals.config.ts` and eval files. |
399
390
  | `--out <path>` | Also write the full results JSON to this path (also for `eval status <evalId>`). |
@@ -565,10 +556,9 @@ takes precedence over the stored login. `logout` removes the local
565
556
  credential file but doesn't revoke the API key. Revoke it in the Cursor
566
557
  dashboard when it should stop working.
567
558
 
568
- Non-production backends: login and account RPCs honor
569
- `CURSOR_API_BASE_URL` while the SDK harness honors `CURSOR_BACKEND_URL`.
570
- Set both to the same URL, or keys minted on one backend are rejected by
571
- the other.
559
+ Login and account RPCs honor `CURSOR_API_BASE_URL`. The SDK harness
560
+ honors `CURSOR_BACKEND_URL`. Set both to the same URL, or keys minted
561
+ on one host are rejected by the other.
572
562
 
573
563
  ## update
574
564
 
@@ -648,7 +638,7 @@ state layout.
648
638
  agent-sdk deployments [--team <id>] [--json]
649
639
  ```
650
640
 
651
- Text output shows each slug, status, generation, deployment kind, and
641
+ Text output shows each slug, status, deployment kind, and
652
642
  update time. `--json` prints `{ deployments }`.
653
643
 
654
644
  ## deployment
@@ -659,7 +649,7 @@ update time. `--json` prints `{ deployments }`.
659
649
  agent-sdk deployment <slug> [--team <id>] [--json]
660
650
  ```
661
651
 
662
- Text output includes status, generation, kind, alias, source, egress
652
+ Text output includes status, kind, alias, source, egress
663
653
  domains, secret names, engine state, and the last error when present.
664
654
  `--json` returns the full API response. It can include short-lived
665
655
  `engineAccess.headers`, so handle JSON output as a credential.
@@ -748,8 +738,8 @@ as a credential.
748
738
  `defineConnection({ cursorAccount: true })` connection.
749
739
 
750
740
  URL connections run a browser PKCE flow. Tokens are written to
751
- `mcp-auth.json` under the agent-serve config dir (default
752
- `~/.config/agent-serve`). Pass `--store` to upsert matching
741
+ `mcp-auth.json` under the CLI config directory (override with
742
+ `AGENT_SERVE_CONFIG_DIR`). Pass `--store` to upsert matching
753
743
  `MCP_OAUTH_<CONNECTION>_*` secrets on the hosted deployment.
754
744
 
755
745
  Cursor-account connections authorize the hosted deployment's service
@@ -945,9 +935,9 @@ These environment variables affect the CLI and its channel packs.
945
935
  | Variable | Meaning |
946
936
  | --- | --- |
947
937
  | `CURSOR_API_KEY` | Cursor credential. It takes precedence over the stored login. |
948
- | `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs in non-production environments. |
949
- | `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness in non-production environments. |
950
- | `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. The default is `~/.config/agent-serve`. |
938
+ | `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs. |
939
+ | `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness. |
940
+ | `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. Defaults to the CLI config directory under `~/.config`. |
951
941
  | `AGENT_SERVE_NO_UPDATE_CHECK` / `NO_UPDATE_NOTIFIER` | Disable the automatic published-version check when set to a non-empty value other than `0`. |
952
942
  | `CI` | Disable the automatic published-version check when set. |
953
943
  | `GITHUB_WEBHOOK_SECRET` | Default signing secret for GitHub forwarding and replay. |
@@ -30,7 +30,7 @@ Tokens come from env vars. Never hardcode them in the file.
30
30
  ## Host MCP OAuth
31
31
 
32
32
  For servers that speak OAuth, set `oauth: true` and authorize with the
33
- CLI. Tokens live in `~/.config/agent-serve/mcp-auth.json`. `--store`
33
+ CLI. Tokens live in `mcp-auth.json` under the CLI config directory. `--store`
34
34
  copies them onto the hosted deployment as `MCP_OAUTH_<NAME>_*` secrets.
35
35
 
36
36
  ```ts
@@ -58,7 +58,7 @@ local turns, set `advertiseTools: true`.
58
58
  ## Per-session auth (`auth`)
59
59
 
60
60
  For http/sse connections whose credential depends on **who the session is
61
- for** a multi-tenant agent asserting the tenant it is acting for
61
+ for** (a multi-tenant agent asserting the tenant it is acting for),
62
62
  declare an `auth` callback instead of static headers. It runs host-side
63
63
  at turn-build time with the session's `SessionInfo` and returns headers
64
64
  merged over the static ones:
@@ -73,16 +73,16 @@ export default defineConnection({
73
73
  });
74
74
  ```
75
75
 
76
- The callback is evaluated on **every local turn** reminder fires and
77
- post-restart follow-ups included — so the identity always comes from the
76
+ The callback is evaluated on **every local turn**, including reminder
77
+ fires and post-restart follow-ups, so the identity always comes from the
78
78
  session itself, never from state parked in memory. The model never sees a
79
79
  tenant parameter and can never choose the tenant. A callback that throws
80
80
  fails the turn: a turn never silently runs without the connection's
81
81
  identity. Local runtime only; cloud turns are refused. `host.mcp` calls
82
82
  from server tools keep the static headers only. Not combinable with
83
- `oauth: true` the host OAuth provider owns the Authorization header.
83
+ `oauth: true`; the host OAuth provider owns the Authorization header.
84
84
 
85
- Derive the identity from durable session facts `session.auth`,
85
+ Derive the identity from durable session facts: `session.auth`,
86
86
  `session.id`, or your channel's own session state. Do **not** key it off
87
87
  `session.continuationKey`: the HTTP channel rotates the continuation key
88
88
  after every accepted follow-up, so a tenant mapping keyed on it silently
@@ -93,14 +93,9 @@ design are the exception.)
93
93
  per-operation clients with the evaluated headers. Attached connections
94
94
  ride the turn's SDK `mcpServers`, passed on **every send** rather than
95
95
  pinned on the cached per-session agent handle, so a rotated credential is
96
- live on the very next turn. The cost: when any attached connection has
97
- `auth`, *all* of the agent's attached connections are configured per
98
- send — the harness opens fresh MCP clients for them on each turn, so a
99
- stdio (`command`) server respawns per turn and loses any in-process
100
- state; keep stateful stdio servers out of agents that attach an auth'd
101
- connection (or advertise the auth'd connection instead). Workspace
102
- prewarm has no session, so it omits auth'd connections rather than
103
- attaching them without an identity.
96
+ live on the very next turn. A stateful stdio server cannot share a
97
+ process with an attached `auth` connection. Advertise the auth
98
+ connection instead.
104
99
 
105
100
  ## Advertise a connection's tools by name (`advertiseTools`) {#advertise-tools}
106
101
 
@@ -6,11 +6,11 @@ description: "Observe-only subscribers to the session event stream: audit logs,
6
6
  # Hooks
7
7
 
8
8
  A hook is an observe-only subscriber to the session event stream. Hooks
9
- run after each event is recorded and fanned out (file persistence flushes
10
- in the background). That makes them the home for audit logging, metrics,
11
- mirroring transcripts into your own store, and maintaining derived state.
12
- Handler errors are logged and never fatal. A hook can't modify events,
13
- inject context into the next turn, or block a turn.
9
+ run after each event is recorded. They cannot change the event or the
10
+ turn. That makes them the home for audit logging, metrics, mirroring
11
+ transcripts into your own store, and maintaining derived state. Handler
12
+ errors are logged and never fatal. A hook can't inject context into the
13
+ next turn or block a turn.
14
14
 
15
15
  For deterministic context composition before the model runs, use the
16
16
  host path that already owns the wake: channel handlers (fetch, `callTool`,
@@ -38,7 +38,7 @@ export default defineHook({
38
38
  });
39
39
  ```
40
40
 
41
- Keys are event types (the full list is in the
41
+ Keys are event types (see the
42
42
  [event vocabulary](./sessions.md#which-events-can-i-stream)), or `"*"`
43
43
  for everything. Handlers receive the event with its envelope (`index`,
44
44
  `sessionId`, `turnId?`, `at`) and a `HookContext`:
@@ -84,20 +84,16 @@ Usage metering: subscribe to `turn.completed` and forward
84
84
  Failure alerting: `turn.failed` carries the message, and
85
85
  `ctx.session.id` points at the trace.
86
86
 
87
- Derived state: `agent.bound` fires when the Cursor SDK agent id is known
88
- (`bc-…` on cloud). A PR agent can record PR → agent id from it in a
89
- hook with `ctx.host.kv`, so later webhook wakes resume the same cloud
90
- conversation. Prefer `ctx.host.kv` or `ctx.host.files` for ids that
91
- must survive hosted replace. `stateRoot` resets on replace.
87
+ Derived state: persist ids that must survive hosted replace with
88
+ `ctx.host.kv` or `ctx.host.files`. `stateRoot` resets on replace.
92
89
 
93
- Transcript export: subscribe to `"*"` and append to your own store. The
94
- NDJSON envelope is already ordered and replayable.
90
+ Transcript export: subscribe to `"*"` and append to your own store.
95
91
 
96
92
  ## What's next
97
93
 
98
94
  Continue with these pages:
99
95
 
100
- - [Sessions and streaming](./sessions.md): every event a hook can see
96
+ - [Sessions and streaming](./sessions.md): the event vocabulary hooks observe
101
97
  - [OpenTelemetry](../guides/opentelemetry.md): OTLP traces and metrics
102
98
  from the same event stream
103
99
  - [Deployment](../deployment.md#observability): runtime logs and export
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: "HTTP API"
3
- description: "Every route the server mounts: sessions, approvals, deterministic tool calls, discovery, the MCP endpoint, and dev-mode dispatch."
3
+ description: "Public session, discovery, and channel routes callers use."
4
4
  ---
5
5
 
6
6
  # HTTP API reference
7
7
 
8
- Every Agent SDK host speaks the same stable HTTP API. In the default
8
+ Agent SDK hosts expose the same public HTTP surface. In the default
9
9
  multi-agent layout each agent is namespaced under its slug
10
10
  (`/<slug>/v1/session`, `/<slug>/playground`), with host-level routes at
11
11
  the root. With `--mode single`, one agent serves the same surface
@@ -30,8 +30,7 @@ both layouts and removed by `--no-docs`.
30
30
  | `GET /` | A web index of every mounted agent, linking to playgrounds (playground only) |
31
31
  | `GET /v1/agents` | The JSON index of mounted agents (playground only, no auth) |
32
32
  | `GET /docs`, `GET /docs/*` | This documentation, served as a static site (both layouts, no auth) |
33
- | `GET /v1/health` | Host-level liveness, no auth; made for ALB/ECS checks |
34
- | `POST /v1/webhooks/github` | Loopback-only trigger endpoint that fans a GitHub-shaped payload out to every mounted GitHub channel (used by local tooling) |
33
+ | `GET /v1/health` | Host-level liveness, no auth |
35
34
 
36
35
  ## Start a session
37
36
 
@@ -139,17 +138,16 @@ while a turn runs). Agent-execution tools are rejected with `400`, and
139
138
  unknown tools with `404` and the list of available names. For the
140
139
  semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
141
140
 
142
- ## Discovery and meta
141
+ ## Discovery
143
142
 
144
- Five read-only routes describe the running agent.
143
+ These read-only routes describe the running agent.
145
144
 
146
145
  | Route | What it does |
147
146
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
- | `GET /v1/info` | The manifest snapshot: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics. Always the bare project-info object; `agent-sdk info --json` wraps the same data per slug in `{ agents: [...] }` |
147
+ | `GET /v1/info` | The discovered surface: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics |
149
148
  | `GET /v1/health` | Per-agent liveness, no auth |
150
- | `GET /v1/meta` | SPA bootstrap: agent name, dev flag, base path (no auth) |
151
- | `GET /v1/logs?after=N` | Recent server log lines from the ring buffer, with a polling cursor |
152
- | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals folded from durable event streams (`config` reports `maxPlaygroundSessions` / `durableSamples` / `durableSnapshots` from `agent/ab.config.ts`) |
149
+ | `GET /v1/logs?after=N` | Recent server log lines, with a polling cursor |
150
+ | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals |
153
151
 
154
152
  ## Artifacts
155
153
 
@@ -191,20 +189,14 @@ it through the URL configured by `serve --cloud-tools-url`. Unlike
191
189
  `/v1/mcp`, it runs the CLI-level auth chain (loopback, bearer, or
192
190
  anonymous), not any authored channel auth.
193
191
 
194
- `POST /v1/cursor-account/:connection/mcp` is the bridge for
195
- `defineConnection({ cursorAccount: true })` connections. The runtime
196
- calls it with a per-boot bearer secret; it never joins the public auth
197
- chain, and an unknown connection name returns `404`.
198
-
199
192
  ## Playground eval routes
200
193
 
201
- Always registered (including production / non-`--dev` serves). The playground
202
- Evals tab uses these:
194
+ The playground Evals tab and `agent-sdk eval --prod` / `--url` use these:
203
195
 
204
196
  | Route | What it does |
205
197
  | ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
206
- | `GET /v1/dev/evals` | List discovered eval datapoints and project config as `{ evals, config }` (`config` includes `maxPlaygroundRuns`, `durableRuns`) |
207
- | `GET /v1/dev/evals/runs` | List recent run snapshots (newest first) as `{ runs, activeRunId? }` for playground rehydrate |
198
+ | `GET /v1/dev/evals` | List discovered eval datapoints and project config |
199
+ | `GET /v1/dev/evals/runs` | List recent run snapshots, newest first |
208
200
  | `POST /v1/dev/evals/runs` | Start an eval run (`{filterIds?, tags?}`); `202` with a snapshot (`runId` is the Eval ID), `404` when nothing matches, `409` when one is running |
209
201
  | `GET /v1/dev/evals/runs/:runId` | Poll a run's progress |
210
202
  | `POST /v1/dev/evals/runs/:runId/cancel` | Cancel a running batch; `200` with snapshot, `404` unknown, `409` when not running |
@@ -213,10 +205,9 @@ Eval runs are asynchronous. Poll the run route for case progress and
213
205
  the final `completed` or `failed` status. Batch errors appear on the
214
206
  snapshot returned by the poll. Entries within `filterIds` and `tags`
215
207
  use OR semantics. When both fields are present, a case must match one
216
- entry from each field. Listed runs persist across restarts whenever
217
- `agent/storage.ts` provides an `evals` table or a KV core with `delete`
218
- and `list` (the table is derived — see [Storage](../storage.md));
219
- otherwise they are process-memory only (capped by `maxPlaygroundRuns`).
208
+ entry from each field. Listed runs persist across restarts when storage is configured; see
209
+ [Storage](../storage.md#eval-and-a-b-tables). Otherwise they are
210
+ process-memory only.
220
211
 
221
212
  ## Dev-mode routes
222
213
 
@@ -224,29 +215,18 @@ These routes exist only under `serve --dev`.
224
215
 
225
216
  | Route | What it does |
226
217
  | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
227
- | `POST /v1/dev/schedules/:scheduleId` | Dispatch a schedule by hand, exactly once, through the production path. Returns `{scheduleId, sessionIds}` |
218
+ | `POST /v1/dev/schedules/:scheduleId` | Dispatch a schedule by hand, exactly once. Returns `{scheduleId, sessionIds}` |
228
219
  | `GET /v1/dev/reminders` | List reminders |
229
220
  | `POST /v1/dev/reminders/:reminderId` | Fire a reminder by hand |
230
221
 
231
222
  Schedules and reminders never fire automatically in dev mode. These
232
223
  routes are the only way they run, which keeps iteration deterministic.
233
224
 
234
- ## Platform timer routes
235
-
236
- `POST /v1/internal/schedules/:scheduleId/fire` and
237
- `POST /v1/internal/reminders/:reminderId/fire` exist only under
238
- `serve --no-control-plane`, where the host runs no schedule or reminder
239
- clocks of its own. Cursor hosting starts engines this way and fires
240
- timed work through them. They admit only requests carrying the
241
- platform's `x-agent-serve-timed-work` marker, which the alias proxy
242
- strips from external traffic, so webhook and playground callers can
243
- never reach them.
244
-
245
225
  ## Playground assets
246
226
 
247
- `GET /playground` and `GET /playground/assets/:file` serve the static
248
- SPA bundle (omitted with `--no-playground`). The playground calls the
249
- JSON API above and has no privileged surface.
227
+ `GET /playground` and `GET /playground/assets/:file` serve the
228
+ playground (omitted with `--no-playground`). It calls the JSON API
229
+ above and has no privileged surface.
250
230
 
251
231
  ## Status codes
252
232
 
@@ -40,7 +40,7 @@ may also load ambient `AGENTS.md` and `.cursor` config from ancestor
40
40
  directories. [Agent config → Local cwd](./agent-config.md#local-cwd)
41
41
  covers controlling that.
42
42
 
43
- ## Best Practices
43
+ ## What to put in instructions
44
44
 
45
45
  Keep them a few lines: identity, when to use which tool, output shape.
46
46
  The [quickstart PR approver](../quickstart.md) is the pattern:
@@ -7,40 +7,35 @@ description: "The built-in web UI: chat with streaming, Try buttons and slash co
7
7
 
8
8
  Every served agent ships with a web playground at
9
9
  `http://127.0.0.1:3000/<slug>/playground` (or `/playground` in single
10
- mode): a static SPA over the same public HTTP API, made for manual
11
- testing, demos, and reading sessions. Every call it makes runs the
12
- normal route auth chain, so anything you can do in the playground you
13
- can also do with curl.
10
+ mode). Anything you can do there you can also do with curl.
14
11
 
15
12
  ## What it does
16
13
 
17
- The playground covers the whole manual-testing loop.
14
+ Use the playground to chat, try channel routes, and inspect sessions.
18
15
 
19
- - **Chat** with the agent. Text and reasoning stream live, rendered as
20
- markdown with syntax highlighting, and tool calls appear inline with
21
- their arguments, output, and error state as the `actions.requested` /
22
- `action.result` events arrive.
16
+ - **Chat** with the agent. Text and reasoning stream live, and tool
17
+ calls appear inline with their arguments, output, and error state.
23
18
  - **Slash commands**: custom channel routes become composer commands
24
- (a `drive` route becomes `/drive <pr-url>`), derived from the schemas
25
- on `GET /v1/info`, with `/help` and autocomplete.
19
+ (a `drive` route becomes `/drive <pr-url>`), with `/help` and
20
+ autocomplete.
26
21
  - **Try** any channel route from the Agent surface. The modal remembers
27
22
  your last body per endpoint and has Copy curl, and a successful Try
28
23
  opens the created session.
29
- - **Sessions**: browse every session (chat, custom-channel, schedule
30
- tasks) and replay their durable event streams. Search by session ID
31
- to filter the list, or press Enter to open an ID directly. "Open
32
- trace" renders any `events.ndjson` file.
24
+ - **Sessions**: browse the sessions you own (chat, custom-channel,
25
+ schedule tasks) and replay their event streams. In `--dev` on
26
+ loopback, or with `--allow-anonymous`, the list includes every
27
+ principal. Search by session ID to filter the list, or press Enter
28
+ to open an ID directly. "Open trace" renders a saved event stream.
33
29
  - **Approvals**: parked `needsApproval` tool calls render Approve /
34
30
  Deny buttons.
35
31
  - **Evals**: list and run filesystem evals from the browser (backed by
36
32
  `/v1/dev/evals`). Schedule hand-dispatch still requires `--dev`.
37
33
  - **The surface**: inspect the discovered tools, skills, subagents, MCP
38
34
  connections, channels, and hooks.
39
- - **Raw NDJSON pane**: flip it on to see the exact wire events.
35
+ - **Raw events pane**: flip it on to inspect the event stream.
40
36
  - **Logs tab**: recent server log lines, polled from `GET /v1/logs`.
41
37
  - **A/Bs tab**: per-session and aggregate
42
- [live A/B metrics](../ab.md) from `GET /v1/abs` (folds durable
43
- `ab.assigned` plus turn and tool events; no separate store).
38
+ [live A/B metrics](../ab.md) from `GET /v1/abs`.
44
39
 
45
40
  In multi-agent mode each agent has its own playground at
46
41
  `/<slug>/playground`, and `/` is an index of them all.
@@ -59,7 +54,7 @@ demo-only alternative for trusted networks.
59
54
 
60
55
  Continue with these pages:
61
56
 
62
- - [HTTP API](./http-api.md): everything the playground calls
57
+ - [HTTP API](./http-api.md): the HTTP surface the playground uses
63
58
  - [Sessions and streaming](./sessions.md): the streams it renders
64
59
  - [Human-in-the-loop](../guides/human-in-the-loop.md): the approval
65
60
  buttons in context
@@ -76,7 +76,7 @@ Each path maps to a capability and a reference page.
76
76
  | `agent/artifacts.ts` | `defineArtifacts` kinds, the `tag_artifact` opt-in, and retention | [Artifacts](./artifacts.md) |
77
77
  | `agent/schedules/*` | Cron-driven runs (UTC, 5-field; never auto-fire under `--dev`) | [Schedules](./schedules.md) |
78
78
  | `agent/sandbox/workspace/**` | Seed files copied into each local session workspace | [Sessions](./sessions.md#what-goes-into-a-local-session-workspace) |
79
- | `agent/playground/` | Custom playground tool chips for the Vite dev playground | [Playground](./playground.md) |
79
+ | `agent/playground/` | Custom playground tool chips | [Playground](./playground.md) |
80
80
  | `agent/lib/` | Import-only shared code, never discovered | None |
81
81
  | `evals/evals.config.ts` | Shared eval settings (e.g. `maxConcurrency`); required when evals exist | [Evals](../evals.md) |
82
82
  | `evals/**/*.eval.ts` | Filesystem evals; case id = path under `evals/` | [Evals](../evals.md) |
@@ -98,7 +98,7 @@ or has the wrong extension.
98
98
  ```bash
99
99
  agent-sdk validate --dir . # diagnostics; non-zero exit on errors
100
100
  agent-sdk info --dir . # human-readable surface
101
- agent-sdk info --dir . --json # machine-readable manifest (same shape as GET /v1/info)
101
+ agent-sdk info --dir . --json # machine-readable project info (same shape as GET /v1/info)
102
102
  ```
103
103
 
104
104
  ## What's next
@@ -35,7 +35,7 @@ those lines the same indent as the `prompt` body so dedent stays consistent.
35
35
 
36
36
  ## `prompt.lines\`…\``
37
37
 
38
- Same dedent rules, but returns `string[]` one entry per line. Use this
38
+ Same dedent rules, but returns `string[]`, one entry per line. Use this
39
39
  where an API wants separate lines (for example GitHub channel `context`):
40
40
 
41
41
  ```ts
@@ -182,8 +182,7 @@ in-memory, so after a restart those reminders are disarmed
182
182
  (`handler_lost_on_restart`); re-arm them from the code path that created
183
183
  them, or prefer the prompt form.
184
184
 
185
- Dev mode matches schedules. Auto-timers follow `ServeOptions.reminders`
186
- (default `!dev`), so in `--dev` fire by hand:
185
+ `--dev` does not auto-fire reminders. Dispatch one by hand:
187
186
 
188
187
  ```bash
189
188
  curl http://127.0.0.1:3000/<slug>/v1/dev/reminders # list