@cursor/july 0.1.92 → 0.1.94

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 (448) hide show
  1. package/AGENTS.md +8 -20
  2. package/README.md +115 -182
  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/channels/slack/attachments.js +2 -2
  12. package/dist/channels/slack/dispatch.d.ts +0 -7
  13. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  14. package/dist/channels/slack/dispatch.js +4 -7
  15. package/dist/channels/slack/eval-directive.d.ts +5 -12
  16. package/dist/channels/slack/eval-directive.d.ts.map +1 -1
  17. package/dist/channels/slack/eval-directive.js +8 -19
  18. package/dist/channels/slack/index.d.ts +0 -6
  19. package/dist/channels/slack/index.d.ts.map +1 -1
  20. package/dist/channels/slack/index.js +0 -6
  21. package/dist/channels/slack/setup.d.ts +4 -4
  22. package/dist/channels/slack/setup.d.ts.map +1 -1
  23. package/dist/channels/slack/setup.js +8 -15
  24. package/dist/channels/slack/slack-channel.d.ts +6 -13
  25. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  26. package/dist/channels/slack/slack-channel.js +15 -101
  27. package/dist/channels/slack/types.d.ts +12 -79
  28. package/dist/channels/slack/types.d.ts.map +1 -1
  29. package/dist/channels/slack/types.js +1 -15
  30. package/dist/client.d.ts +14 -0
  31. package/dist/client.d.ts.map +1 -0
  32. package/dist/client.js +12 -0
  33. package/dist/connections.d.ts +18 -9
  34. package/dist/connections.d.ts.map +1 -1
  35. package/dist/connections.js +17 -8
  36. package/dist/continuation.d.ts +1 -1
  37. package/dist/continuation.js +1 -1
  38. package/dist/docs/404.html +2 -2
  39. package/dist/docs/ab.html +8 -8
  40. package/dist/docs/ab.md +7 -13
  41. package/dist/docs/assets/{ab.md.CVzWxLoB.js → ab.md.DJo5r4R-.js} +4 -4
  42. package/dist/docs/assets/{ab.md.CVzWxLoB.lean.js → ab.md.DJo5r4R-.lean.js} +1 -1
  43. package/dist/docs/assets/{app.Bci6CM9E.js → app.CFDEas4I.js} +1 -1
  44. package/dist/docs/assets/building-with-agents.md.DI4mEzlt.js +13 -0
  45. package/dist/docs/assets/{building-with-agents.md.DH8A_cHA.lean.js → building-with-agents.md.DI4mEzlt.lean.js} +1 -1
  46. package/dist/docs/assets/chunks/@localSearchIndexroot.DU3U2Ij2.js +1 -0
  47. package/dist/docs/assets/chunks/{VPLocalSearchBox.BCPT6xA-.js → VPLocalSearchBox.B1IIYpYS.js} +1 -1
  48. package/dist/docs/assets/chunks/{theme.BEA8BF3c.js → theme.Ct4NSiLm.js} +2 -2
  49. package/dist/docs/assets/concepts.md.lwAgBIMI.js +1 -0
  50. package/dist/docs/assets/{concepts.md.CRfU3bVg.lean.js → concepts.md.lwAgBIMI.lean.js} +1 -1
  51. package/dist/docs/assets/{deployment.md.DX_hc3ze.js → deployment.md.D9msOFOW.js} +9 -14
  52. package/dist/docs/assets/{deployment.md.DX_hc3ze.lean.js → deployment.md.D9msOFOW.lean.js} +1 -1
  53. package/dist/docs/assets/{evals.md.a0SMN6r9.js → evals.md.lfJoEVc8.js} +6 -6
  54. package/dist/docs/assets/{evals.md.a0SMN6r9.lean.js → evals.md.lfJoEVc8.lean.js} +1 -1
  55. package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.js → guides_agent-to-agent.md.BDb0t1QV.js} +2 -2
  56. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.js +9 -0
  57. package/dist/docs/assets/guides_cloud-runtime.md.CkYbjnAX.lean.js +1 -0
  58. package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.js → guides_convert-automation.md.B4sjlodG.js} +2 -2
  59. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.js → guides_github.md.Cnh2mL4a.js} +5 -5
  60. package/dist/docs/assets/{guides_github.md.Cdt1s2QC.lean.js → guides_github.md.Cnh2mL4a.lean.js} +1 -1
  61. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.js → guides_mcp-oauth.md.DPYmBCbV.js} +7 -9
  62. package/dist/docs/assets/{guides_mcp-oauth.md.Du0f7pGU.lean.js → guides_mcp-oauth.md.DPYmBCbV.lean.js} +1 -1
  63. package/dist/docs/assets/{guides_slack.md.DiUmk_Oi.js → guides_slack.md.C32HsdKk.js} +7 -13
  64. package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +1 -0
  65. package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.js → guides_webhooks.md.DKdA43Qm.js} +2 -2
  66. package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.js → hillclimbing.md.DhESf3OO.js} +1 -1
  67. package/dist/docs/assets/index.md.DRakGHFe.js +5 -0
  68. package/dist/docs/assets/{index.md.BAaMXLFd.lean.js → index.md.DRakGHFe.lean.js} +1 -1
  69. package/dist/docs/assets/{quickstart.md.DsrarzEg.js → quickstart.md.Nj_LjW_a.js} +2 -2
  70. package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.js → reference_agent-config.md.Cp_x38Nl.js} +3 -3
  71. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.js → reference_channels.md.Cd2f2iyV.js} +2 -2
  72. package/dist/docs/assets/{reference_channels.md.DQZjCnyh.lean.js → reference_channels.md.Cd2f2iyV.lean.js} +1 -1
  73. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.js → reference_cli.md.Cw6_ICYG.js} +10 -11
  74. package/dist/docs/assets/{reference_cli.md.B7GkAJRC.lean.js → reference_cli.md.Cw6_ICYG.lean.js} +1 -1
  75. package/dist/docs/assets/{reference_connections.md.DYidrb-j.js → reference_connections.md.BH8Oc0D0.js} +7 -7
  76. package/dist/docs/assets/{reference_connections.md.DYidrb-j.lean.js → reference_connections.md.BH8Oc0D0.lean.js} +1 -1
  77. package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +14 -0
  78. package/dist/docs/assets/{reference_hooks.md.B9FSgdDe.lean.js → reference_hooks.md.a8BJxMR5.lean.js} +1 -1
  79. package/dist/docs/assets/reference_http-api.md.D89k1mdm.js +11 -0
  80. package/dist/docs/assets/reference_http-api.md.D89k1mdm.lean.js +1 -0
  81. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.js → reference_instructions.md.CR7XSsGk.js} +3 -3
  82. package/dist/docs/assets/{reference_instructions.md.DhNCOl7r.lean.js → reference_instructions.md.CR7XSsGk.lean.js} +1 -1
  83. package/dist/docs/assets/reference_playground.md.DnX5nL-B.js +1 -0
  84. package/dist/docs/assets/reference_playground.md.DnX5nL-B.lean.js +1 -0
  85. package/dist/docs/assets/reference_project-layout.md.Bv4KOtlB.js +19 -0
  86. package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.js → reference_prompt.md.DnaD5dNK.js} +1 -1
  87. package/dist/docs/assets/{reference_schedules.md.DNipebiG.js → reference_schedules.md.DI_JrHgq.js} +1 -1
  88. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +1 -0
  89. package/dist/docs/assets/{reference_sessions.md.tUFzz98S.lean.js → reference_sessions.md.D0mIh4KK.lean.js} +1 -1
  90. package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.js → reference_skills.md.8son6Hjm.js} +4 -4
  91. package/dist/docs/assets/{reference_subagents.md.Xoav0AII.js → reference_subagents.md.CfsIloPm.js} +1 -1
  92. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.js → reference_tools.md.BHeXn2id.js} +3 -3
  93. package/dist/docs/assets/{reference_tools.md.wpaJtHn6.lean.js → reference_tools.md.BHeXn2id.lean.js} +1 -1
  94. package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +1 -0
  95. package/dist/docs/assets/{scaffolding-agents.md.CRDDUtYJ.lean.js → scaffolding-agents.md.D7UUkWw0.lean.js} +1 -1
  96. package/dist/docs/assets/{storage.md.JbjlHWZ6.js → storage.md.BOHeqk2M.js} +5 -5
  97. package/dist/docs/assets/{storage.md.JbjlHWZ6.lean.js → storage.md.BOHeqk2M.lean.js} +1 -1
  98. package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.js → templates_agentic-owners.md.DqtPdm6f.js} +2 -2
  99. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.js → templates_pr-autofixer.md.DU7dQpor.js} +2 -2
  100. package/dist/docs/assets/{templates_pr-autofixer.md.1HAR3RXE.lean.js → templates_pr-autofixer.md.DU7dQpor.lean.js} +1 -1
  101. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.js → templates_security-reviewer.md.CTa7u_l1.js} +2 -2
  102. package/dist/docs/assets/{templates_security-reviewer.md.ByFyRta2.lean.js → templates_security-reviewer.md.CTa7u_l1.lean.js} +1 -1
  103. package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +1 -0
  104. package/dist/docs/assets/{troubleshooting.md.DYECCZiJ.lean.js → troubleshooting.md.Ctv3T8C2.lean.js} +1 -1
  105. package/dist/docs/building-with-agents.html +7 -7
  106. package/dist/docs/building-with-agents.md +5 -11
  107. package/dist/docs/concepts.html +5 -8
  108. package/dist/docs/concepts.md +13 -17
  109. package/dist/docs/deployment.html +13 -18
  110. package/dist/docs/deployment.md +9 -30
  111. package/dist/docs/design/agsh.md +406 -0
  112. package/dist/docs/evals.html +10 -10
  113. package/dist/docs/evals.md +16 -37
  114. package/dist/docs/guides/agent-to-agent.html +6 -6
  115. package/dist/docs/guides/agent-to-agent.md +3 -3
  116. package/dist/docs/guides/cloud-runtime.html +6 -6
  117. package/dist/docs/guides/cloud-runtime.md +9 -25
  118. package/dist/docs/guides/convert-automation.html +7 -7
  119. package/dist/docs/guides/convert-automation.md +4 -4
  120. package/dist/docs/guides/github.html +9 -9
  121. package/dist/docs/guides/github.md +16 -28
  122. package/dist/docs/guides/human-in-the-loop.html +4 -4
  123. package/dist/docs/guides/mcp-oauth.html +11 -13
  124. package/dist/docs/guides/mcp-oauth.md +14 -22
  125. package/dist/docs/guides/opentelemetry.html +5 -5
  126. package/dist/docs/guides/slack.html +11 -17
  127. package/dist/docs/guides/slack.md +13 -50
  128. package/dist/docs/guides/webhooks.html +6 -6
  129. package/dist/docs/guides/webhooks.md +3 -3
  130. package/dist/docs/hashmap.json +1 -1
  131. package/dist/docs/hillclimbing.html +6 -6
  132. package/dist/docs/hillclimbing.md +1 -1
  133. package/dist/docs/index.html +6 -6
  134. package/dist/docs/index.md +0 -36
  135. package/dist/docs/llms-full.txt +965 -3633
  136. package/dist/docs/llms.txt +3 -18
  137. package/dist/docs/quickstart.html +6 -6
  138. package/dist/docs/quickstart.md +3 -4
  139. package/dist/docs/reference/agent-config.html +8 -8
  140. package/dist/docs/reference/agent-config.md +10 -15
  141. package/dist/docs/reference/artifacts.html +4 -4
  142. package/dist/docs/reference/channels.html +6 -6
  143. package/dist/docs/reference/channels.md +20 -31
  144. package/dist/docs/reference/cli.html +14 -15
  145. package/dist/docs/reference/cli.md +29 -38
  146. package/dist/docs/reference/connections.html +11 -11
  147. package/dist/docs/reference/connections.md +24 -25
  148. package/dist/docs/reference/hooks.html +6 -6
  149. package/dist/docs/reference/hooks.md +12 -17
  150. package/dist/docs/reference/http-api.html +7 -7
  151. package/dist/docs/reference/http-api.md +25 -37
  152. package/dist/docs/reference/instructions.html +6 -6
  153. package/dist/docs/reference/instructions.md +1 -1
  154. package/dist/docs/reference/playground.html +5 -5
  155. package/dist/docs/reference/playground.md +14 -19
  156. package/dist/docs/reference/project-layout.html +9 -7
  157. package/dist/docs/reference/project-layout.md +7 -3
  158. package/dist/docs/reference/prompt.html +6 -6
  159. package/dist/docs/reference/prompt.md +1 -1
  160. package/dist/docs/reference/schedules.html +6 -6
  161. package/dist/docs/reference/schedules.md +1 -2
  162. package/dist/docs/reference/sessions.html +5 -12
  163. package/dist/docs/reference/sessions.md +8 -19
  164. package/dist/docs/reference/skills.html +8 -8
  165. package/dist/docs/reference/skills.md +3 -3
  166. package/dist/docs/reference/subagents.html +6 -6
  167. package/dist/docs/reference/subagents.md +2 -2
  168. package/dist/docs/reference/tools.html +8 -8
  169. package/dist/docs/reference/tools.md +30 -19
  170. package/dist/docs/scaffolding-agents.html +5 -5
  171. package/dist/docs/scaffolding-agents.md +4 -5
  172. package/dist/docs/storage.html +9 -9
  173. package/dist/docs/storage.md +37 -80
  174. package/dist/docs/templates/agentic-owners.html +7 -7
  175. package/dist/docs/templates/agentic-owners.md +2 -2
  176. package/dist/docs/templates/demo.html +4 -4
  177. package/dist/docs/templates/pr-autofixer.html +6 -6
  178. package/dist/docs/templates/pr-autofixer.md +7 -9
  179. package/dist/docs/templates/security-reviewer.html +5 -5
  180. package/dist/docs/templates/security-reviewer.md +2 -3
  181. package/dist/docs/templates/triage.html +4 -4
  182. package/dist/docs/troubleshooting.html +5 -5
  183. package/dist/docs/troubleshooting.md +8 -8
  184. package/dist/index.d.ts +1 -1
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +1 -1
  187. package/dist/internal/advertise-tools.d.ts +11 -0
  188. package/dist/internal/advertise-tools.d.ts.map +1 -1
  189. package/dist/internal/advertise-tools.js +47 -9
  190. package/dist/internal/authored-alias-hooks.d.ts +14 -11
  191. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  192. package/dist/internal/authored-alias-hooks.js +14 -11
  193. package/dist/internal/authored-loaders.d.ts +7 -6
  194. package/dist/internal/authored-loaders.d.ts.map +1 -1
  195. package/dist/internal/authored-loaders.js +14 -10
  196. package/dist/internal/cli-deploy.d.ts +1 -1
  197. package/dist/internal/cli-deploy.js +5 -5
  198. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  199. package/dist/internal/cli-mcp-oauth.js +7 -4
  200. package/dist/internal/continuation-channel.d.ts +6 -3
  201. package/dist/internal/continuation-channel.d.ts.map +1 -1
  202. package/dist/internal/continuation-channel.js +44 -40
  203. package/dist/internal/continuation-identity.d.ts +17 -16
  204. package/dist/internal/continuation-identity.d.ts.map +1 -1
  205. package/dist/internal/continuation-identity.js +109 -36
  206. package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
  207. package/dist/internal/convert-automation/convert-workflow.js +26 -15
  208. package/dist/internal/convert-automation/slug.d.ts +0 -2
  209. package/dist/internal/convert-automation/slug.d.ts.map +1 -1
  210. package/dist/internal/convert-automation/slug.js +0 -8
  211. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  212. package/dist/internal/cursor/account-mcp.js +5 -1
  213. package/dist/internal/deploy-manifest.d.ts +2 -2
  214. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  215. package/dist/internal/deploy-manifest.js +4 -9
  216. package/dist/internal/discovery.d.ts.map +1 -1
  217. package/dist/internal/discovery.js +91 -13
  218. package/dist/internal/distribution.d.ts +4 -3
  219. package/dist/internal/distribution.d.ts.map +1 -1
  220. package/dist/internal/distribution.js +4 -3
  221. package/dist/internal/hosted-delivery-protocol.d.ts +38 -0
  222. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -0
  223. package/dist/internal/hosted-delivery-protocol.js +70 -0
  224. package/dist/internal/hosted-delivery.d.ts +35 -0
  225. package/dist/internal/hosted-delivery.d.ts.map +1 -0
  226. package/dist/internal/hosted-delivery.js +239 -0
  227. package/dist/internal/http-channel.d.ts.map +1 -1
  228. package/dist/internal/http-channel.js +1 -1
  229. package/dist/internal/mcp-endpoint.js +3 -3
  230. package/dist/internal/mcp-host.d.ts +8 -7
  231. package/dist/internal/mcp-host.d.ts.map +1 -1
  232. package/dist/internal/mcp-host.js +8 -7
  233. package/dist/internal/peer-connections.d.ts.map +1 -1
  234. package/dist/internal/peer-connections.js +5 -1
  235. package/dist/internal/playground/static.d.ts +0 -3
  236. package/dist/internal/playground/static.d.ts.map +1 -1
  237. package/dist/internal/resolved-connections.d.ts.map +1 -1
  238. package/dist/internal/resolved-connections.js +5 -7
  239. package/dist/internal/review-comments.d.ts +186 -63
  240. package/dist/internal/review-comments.d.ts.map +1 -1
  241. package/dist/internal/review-comments.js +350 -168
  242. package/dist/internal/server.d.ts.map +1 -1
  243. package/dist/internal/server.js +134 -175
  244. package/dist/internal/session-engine.d.ts +50 -10
  245. package/dist/internal/session-engine.d.ts.map +1 -1
  246. package/dist/internal/session-engine.js +221 -68
  247. package/dist/internal/shallow-clone.d.ts +8 -2
  248. package/dist/internal/shallow-clone.d.ts.map +1 -1
  249. package/dist/internal/shallow-clone.js +17 -10
  250. package/dist/internal/tool-catalog.d.ts +31 -0
  251. package/dist/internal/tool-catalog.d.ts.map +1 -0
  252. package/dist/internal/tool-catalog.js +67 -0
  253. package/dist/playground/assets/{index-DDvyC2z6.js → index-B3JCyigB.js} +2 -2
  254. package/dist/playground/index.html +1 -1
  255. package/dist/types.d.ts +81 -40
  256. package/dist/types.d.ts.map +1 -1
  257. package/dist/types.js +19 -0
  258. package/docs/README.md +0 -36
  259. package/docs/ab.md +7 -13
  260. package/docs/building-with-agents.md +5 -11
  261. package/docs/concepts.md +13 -17
  262. package/docs/deployment.md +9 -30
  263. package/docs/design/agsh.md +406 -0
  264. package/docs/evals.md +16 -37
  265. package/docs/guides/agent-to-agent.md +3 -3
  266. package/docs/guides/cloud-runtime.md +9 -25
  267. package/docs/guides/convert-automation.md +4 -4
  268. package/docs/guides/github.md +16 -28
  269. package/docs/guides/mcp-oauth.md +14 -22
  270. package/docs/guides/slack.md +14 -51
  271. package/docs/guides/webhooks.md +3 -3
  272. package/docs/hillclimbing.md +1 -1
  273. package/docs/quickstart.md +3 -4
  274. package/docs/reference/agent-config.md +10 -15
  275. package/docs/reference/channels.md +20 -31
  276. package/docs/reference/cli.md +29 -38
  277. package/docs/reference/connections.md +24 -25
  278. package/docs/reference/hooks.md +12 -17
  279. package/docs/reference/http-api.md +26 -38
  280. package/docs/reference/instructions.md +1 -1
  281. package/docs/reference/playground.md +14 -19
  282. package/docs/reference/project-layout.md +7 -3
  283. package/docs/reference/prompt.md +1 -1
  284. package/docs/reference/schedules.md +1 -2
  285. package/docs/reference/sessions.md +8 -19
  286. package/docs/reference/skills.md +3 -3
  287. package/docs/reference/subagents.md +2 -2
  288. package/docs/reference/tools.md +30 -19
  289. package/docs/scaffolding-agents.md +4 -5
  290. package/docs/storage.md +37 -80
  291. package/docs/templates/agentic-owners.md +2 -2
  292. package/docs/templates/pr-autofixer.md +7 -9
  293. package/docs/templates/security-reviewer.md +2 -3
  294. package/docs/troubleshooting.md +8 -8
  295. package/package.json +16 -2
  296. package/skills/create-agent/SKILL.md +6 -13
  297. package/skills/debug/SKILL.md +2 -4
  298. package/skills/evals/SKILL.md +1 -1
  299. package/skills/framework-map/SKILL.md +3 -2
  300. package/skills/mcp-auth/SKILL.md +10 -13
  301. package/skills/setup-slack/SKILL.md +21 -137
  302. package/src/channels/deployments/deployments-channel.ts +32 -2
  303. package/src/channels/deployments/types.ts +8 -0
  304. package/src/channels/github/github-channel.ts +71 -21
  305. package/src/channels/slack/attachments.ts +2 -2
  306. package/src/channels/slack/dispatch.ts +2 -16
  307. package/src/channels/slack/eval-directive.ts +8 -27
  308. package/src/channels/slack/index.ts +0 -6
  309. package/src/channels/slack/setup.ts +8 -15
  310. package/src/channels/slack/slack-channel.ts +14 -125
  311. package/src/channels/slack/types.ts +12 -96
  312. package/src/client.ts +23 -0
  313. package/src/connections.ts +20 -7
  314. package/src/continuation.ts +1 -1
  315. package/src/index.ts +2 -0
  316. package/src/internal/advertise-tools.ts +45 -7
  317. package/src/internal/authored-alias-hooks.ts +14 -11
  318. package/src/internal/authored-loaders.ts +14 -10
  319. package/src/internal/cli-deploy.ts +5 -5
  320. package/src/internal/cli-mcp-oauth.ts +6 -4
  321. package/src/internal/continuation-channel.ts +62 -45
  322. package/src/internal/continuation-identity.ts +123 -38
  323. package/src/internal/convert-automation/convert-workflow.ts +29 -17
  324. package/src/internal/convert-automation/slug.ts +0 -9
  325. package/src/internal/cursor/account-mcp.ts +4 -1
  326. package/src/internal/deploy-manifest.ts +5 -9
  327. package/src/internal/discovery.ts +107 -13
  328. package/src/internal/distribution.ts +4 -3
  329. package/src/internal/fixtures/units-server.ts +52 -0
  330. package/src/internal/hosted-delivery-protocol.ts +114 -0
  331. package/src/internal/hosted-delivery.ts +359 -0
  332. package/src/internal/http-channel.ts +0 -2
  333. package/src/internal/mcp-endpoint.ts +3 -3
  334. package/src/internal/mcp-host.ts +8 -7
  335. package/src/internal/peer-connections.ts +4 -1
  336. package/src/internal/playground/static.ts +1 -3
  337. package/src/internal/resolved-connections.ts +8 -10
  338. package/src/internal/review-comments.ts +542 -229
  339. package/src/internal/server.ts +180 -253
  340. package/src/internal/session-engine.ts +279 -70
  341. package/src/internal/shallow-clone.ts +30 -16
  342. package/src/internal/tool-catalog.ts +106 -0
  343. package/src/types.ts +99 -40
  344. package/templates/pr-autofixer/agent/channels/slack.ts +8 -2
  345. package/templates/triage/README.md +2 -1
  346. package/templates/triage/overlays/jira/agent/mcp-connections/tracker.ts +0 -1
  347. package/templates/triage/overlays/linear/agent/mcp-connections/tracker.ts +0 -1
  348. package/dist/channels/slack/cursor-account.d.ts +0 -87
  349. package/dist/channels/slack/cursor-account.d.ts.map +0 -1
  350. package/dist/channels/slack/cursor-account.js +0 -100
  351. package/dist/docs/assets/building-with-agents.md.DH8A_cHA.js +0 -13
  352. package/dist/docs/assets/chunks/@localSearchIndexroot.Dv-Q0XtU.js +0 -1
  353. package/dist/docs/assets/concepts.md.CRfU3bVg.js +0 -4
  354. package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.js +0 -10
  355. package/dist/docs/assets/example-agents_approval-buddy.md.DNL83puR.lean.js +0 -1
  356. package/dist/docs/assets/example-agents_benny.md.C40vHRLc.js +0 -7
  357. package/dist/docs/assets/example-agents_benny.md.C40vHRLc.lean.js +0 -1
  358. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.js +0 -11
  359. package/dist/docs/assets/example-agents_bugbot.md.BRGMi9O2.lean.js +0 -1
  360. package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.js +0 -8
  361. package/dist/docs/assets/example-agents_codebase-wiki.md.Dftj_tPp.lean.js +0 -1
  362. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.js +0 -8
  363. package/dist/docs/assets/example-agents_codeowners-review.md.Bfta-lBU.lean.js +0 -1
  364. package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.js +0 -23
  365. package/dist/docs/assets/example-agents_concierge.md.MrKpQndp.lean.js +0 -1
  366. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.js +0 -15
  367. package/dist/docs/assets/example-agents_fsd.md.ZWHWWZPE.lean.js +0 -1
  368. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.js +0 -2
  369. package/dist/docs/assets/example-agents_index.md.QZ8mhr6n.lean.js +0 -1
  370. package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.js +0 -11
  371. package/dist/docs/assets/example-agents_knowledge-base.md.DqKqHQ9u.lean.js +0 -1
  372. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.js +0 -10
  373. package/dist/docs/assets/example-agents_oncall.md.DK4XkYTd.lean.js +0 -1
  374. package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.js +0 -19
  375. package/dist/docs/assets/example-agents_security-reviewer.md.Bai6D0Ee.lean.js +0 -1
  376. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.js +0 -5
  377. package/dist/docs/assets/example-agents_slack-agent.md.D7Kdj5BV.lean.js +0 -1
  378. package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.js +0 -25
  379. package/dist/docs/assets/example-agents_weather-agent.md.lVEAbWFf.lean.js +0 -1
  380. package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.js +0 -9
  381. package/dist/docs/assets/guides_cloud-runtime.md.BSMLIBHr.lean.js +0 -1
  382. package/dist/docs/assets/guides_slack.md.DiUmk_Oi.lean.js +0 -1
  383. package/dist/docs/assets/index.md.BAaMXLFd.js +0 -5
  384. package/dist/docs/assets/reference_hooks.md.B9FSgdDe.js +0 -14
  385. package/dist/docs/assets/reference_http-api.md.CSHVobzG.js +0 -11
  386. package/dist/docs/assets/reference_http-api.md.CSHVobzG.lean.js +0 -1
  387. package/dist/docs/assets/reference_playground.md.Dfb92yQf.js +0 -1
  388. package/dist/docs/assets/reference_playground.md.Dfb92yQf.lean.js +0 -1
  389. package/dist/docs/assets/reference_project-layout.md.CwkSbEWT.js +0 -17
  390. package/dist/docs/assets/reference_sessions.md.tUFzz98S.js +0 -8
  391. package/dist/docs/assets/scaffolding-agents.md.CRDDUtYJ.js +0 -1
  392. package/dist/docs/assets/troubleshooting.md.DYECCZiJ.js +0 -1
  393. package/dist/docs/example-agents/approval-buddy.html +0 -36
  394. package/dist/docs/example-agents/approval-buddy.md +0 -266
  395. package/dist/docs/example-agents/benny.html +0 -33
  396. package/dist/docs/example-agents/benny.md +0 -182
  397. package/dist/docs/example-agents/bugbot.html +0 -37
  398. package/dist/docs/example-agents/bugbot.md +0 -229
  399. package/dist/docs/example-agents/codebase-wiki.html +0 -34
  400. package/dist/docs/example-agents/codebase-wiki.md +0 -170
  401. package/dist/docs/example-agents/codeowners-review.html +0 -34
  402. package/dist/docs/example-agents/codeowners-review.md +0 -192
  403. package/dist/docs/example-agents/concierge.html +0 -49
  404. package/dist/docs/example-agents/concierge.md +0 -201
  405. package/dist/docs/example-agents/fsd.html +0 -41
  406. package/dist/docs/example-agents/fsd.md +0 -329
  407. package/dist/docs/example-agents/index.html +0 -28
  408. package/dist/docs/example-agents/index.md +0 -102
  409. package/dist/docs/example-agents/knowledge-base.html +0 -37
  410. package/dist/docs/example-agents/knowledge-base.md +0 -168
  411. package/dist/docs/example-agents/oncall.html +0 -36
  412. package/dist/docs/example-agents/oncall.md +0 -212
  413. package/dist/docs/example-agents/security-reviewer.html +0 -45
  414. package/dist/docs/example-agents/security-reviewer.md +0 -265
  415. package/dist/docs/example-agents/slack-agent.html +0 -31
  416. package/dist/docs/example-agents/slack-agent.md +0 -142
  417. package/dist/docs/example-agents/weather-agent.html +0 -51
  418. package/dist/docs/example-agents/weather-agent.md +0 -296
  419. package/dist/internal/cursor-slack-relay.d.ts +0 -96
  420. package/dist/internal/cursor-slack-relay.d.ts.map +0 -1
  421. package/dist/internal/cursor-slack-relay.js +0 -176
  422. package/docs/example-agents/approval-buddy.md +0 -271
  423. package/docs/example-agents/benny.md +0 -187
  424. package/docs/example-agents/bugbot.md +0 -234
  425. package/docs/example-agents/codebase-wiki.md +0 -175
  426. package/docs/example-agents/codeowners-review.md +0 -197
  427. package/docs/example-agents/concierge.md +0 -206
  428. package/docs/example-agents/fsd.md +0 -334
  429. package/docs/example-agents/index.md +0 -107
  430. package/docs/example-agents/knowledge-base.md +0 -173
  431. package/docs/example-agents/oncall.md +0 -217
  432. package/docs/example-agents/security-reviewer.md +0 -270
  433. package/docs/example-agents/slack-agent.md +0 -147
  434. package/docs/example-agents/weather-agent.md +0 -301
  435. package/src/channels/slack/cursor-account.ts +0 -202
  436. package/src/internal/cursor-slack-relay.ts +0 -249
  437. /package/dist/docs/assets/{guides_agent-to-agent.md.BCeVdJRJ.lean.js → guides_agent-to-agent.md.BDb0t1QV.lean.js} +0 -0
  438. /package/dist/docs/assets/{guides_convert-automation.md.D06eIzea.lean.js → guides_convert-automation.md.B4sjlodG.lean.js} +0 -0
  439. /package/dist/docs/assets/{guides_webhooks.md.BpnIdO0i.lean.js → guides_webhooks.md.DKdA43Qm.lean.js} +0 -0
  440. /package/dist/docs/assets/{hillclimbing.md.ywF3yDAd.lean.js → hillclimbing.md.DhESf3OO.lean.js} +0 -0
  441. /package/dist/docs/assets/{quickstart.md.DsrarzEg.lean.js → quickstart.md.Nj_LjW_a.lean.js} +0 -0
  442. /package/dist/docs/assets/{reference_agent-config.md.Bqylgw50.lean.js → reference_agent-config.md.Cp_x38Nl.lean.js} +0 -0
  443. /package/dist/docs/assets/{reference_project-layout.md.CwkSbEWT.lean.js → reference_project-layout.md.Bv4KOtlB.lean.js} +0 -0
  444. /package/dist/docs/assets/{reference_prompt.md.DZUMtLPD.lean.js → reference_prompt.md.DnaD5dNK.lean.js} +0 -0
  445. /package/dist/docs/assets/{reference_schedules.md.DNipebiG.lean.js → reference_schedules.md.DI_JrHgq.lean.js} +0 -0
  446. /package/dist/docs/assets/{reference_skills.md.B5ZEuHfG.lean.js → reference_skills.md.8son6Hjm.lean.js} +0 -0
  447. /package/dist/docs/assets/{reference_subagents.md.Xoav0AII.lean.js → reference_subagents.md.CfsIloPm.lean.js} +0 -0
  448. /package/dist/docs/assets/{templates_agentic-owners.md.DSJSIpWU.lean.js → templates_agentic-owners.md.DqtPdm6f.lean.js} +0 -0
@@ -70,8 +70,8 @@ model: "composer-2.5",
70
70
  ## Choose a runtime
71
71
 
72
72
  `runtime: "local"` (the default) runs turns on the Cursor SDK harness on
73
- this machine. The session id doubles as the SDK agent id, and server
74
- tools, skills, sandbox seeds, and tool approvals all apply.
73
+ this machine. Server tools, skills, sandbox seeds, and tool approvals
74
+ all apply.
75
75
 
76
76
  `runtime: "cloud"` runs turns on Cursor cloud agents (`bc-…` ids). Pass
77
77
  a `cloud` block with the repos the VM carries. Server tools stay
@@ -115,8 +115,8 @@ it.
115
115
 
116
116
  Session workspaces are real Cursor project directories. The harness loads
117
117
  `AGENTS.md` and `.cursor` config from ancestor directories. An agent nested
118
- in another git repo (a monorepo package) defaults to
119
- `~/.cache/agent-serve/<dir>` when you omit `cwd`, so the enclosing checkout
118
+ in another git repo (a monorepo package) defaults to a per-project
119
+ cache directory under `~/.cache` when you omit `cwd`, so the enclosing checkout
120
120
  does not leak rules, skills, or MCP servers into the turn. A standalone git
121
121
  root keeps the in-project session workspace. Point `cwd` at a checkout only
122
122
  when the agent should inherit that tree.
@@ -138,7 +138,7 @@ export default defineAgent({
138
138
  });
139
139
  ```
140
140
 
141
- Agent Serve always adds `"mcp"` to a configured allowlist. Authored
141
+ The Agent SDK always adds `"mcp"` to a configured allowlist. Authored
142
142
  server tools in `agent/tools/` use MCP to reach the model. MCP can also
143
143
  expose declared connections and servers from the harness directory's
144
144
  ambient `.cursor` config. To exclude a checkout's MCP servers, point
@@ -159,7 +159,7 @@ Two names have broader effects:
159
159
 
160
160
  Tool allowlists work only with the local runtime. A
161
161
  `runtime: "cloud"` agent that sets `tools` fails at serve startup.
162
- Agent Serve also refuses per-send cloud sessions from a hybrid agent
162
+ The Agent SDK also refuses per-send cloud sessions from a hybrid agent
163
163
  with an allowlist. It won't run those sessions with unrestricted tool
164
164
  access.
165
165
 
@@ -167,7 +167,7 @@ The allowlist controls which tools the model can call. It does not
167
167
  isolate the serve host. For agents that process untrusted input, also
168
168
  set `local: { sandbox: true }`.
169
169
 
170
- ## The `cloud` block
170
+ ## Cloud options
171
171
 
172
172
  Cloud agent defaults forwarded to the Cursor SDK: `repos` (each
173
173
  `{ url, startingRef? }`), environment selection, `envVars`, and the
@@ -239,13 +239,8 @@ console.log(`listening on ${handle.url}`);
239
239
  // handle.createReminder(...), handle.project, await handle.close()
240
240
  ```
241
241
 
242
- `ServeOptions` mirrors the CLI flags: `port`, `host`, `dev`,
243
- `stateRoot`, `apiKey`, `schedules`, `reminders`, `noControlPlane`,
244
- `playground`, `docs`, `authToken` (the `--bearer-token` equivalent),
245
- `allowAnonymous`, `allowAnonymousCursorGithub`,
246
- `allowAnonymousCursorAccountMcp`, `cursorGithubProxy`, `publicUrl`,
247
- `cloudToolsUrl`, `cursorEvents`, and `logger`. `serve()` additionally
248
- accepts `discovery` (project-loading options) and
242
+ Host settings match the documented [CLI](./cli.md) `serve` flags.
243
+ `serve()` also accepts `discovery` (project-loading options) and
249
244
  `mode: "single" | "multi"`. The Cursor credential resolves in one order
250
245
  everywhere: explicit `apiKey`, then `CURSOR_API_KEY`, then the key
251
246
  stored by `agent-sdk login`.
@@ -258,4 +253,4 @@ Continue with these pages:
258
253
  agent
259
254
  - [Cloud runtime](../guides/cloud-runtime.md): when and how to leave
260
255
  the host
261
- - [CLI](./cli.md): the flags `ServeOptions` mirrors
256
+ - [CLI](./cli.md): the `serve` flags `serve()` accepts
@@ -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
@@ -761,7 +751,8 @@ command prints a note when you pass it anyway.
761
751
  agent-sdk mcp oauth <connection> [--dir .] [--store] [--slug <slug>] [--team <id>]
762
752
  ```
763
753
 
764
- `<connection>` is the `agent/mcp-connections/<connection>.ts` basename.
754
+ `<connection>` is the basename under `agent/mcp-connections/` or
755
+ `agent/host-connections/`.
765
756
  `--slug` defaults to the `--dir` basename. `--team` defaults to the
766
757
  signed-in account's team. You need `agent-sdk login` (or `--api-key`)
767
758
  before `--store`.
@@ -945,9 +936,9 @@ These environment variables affect the CLI and its channel packs.
945
936
  | Variable | Meaning |
946
937
  | --- | --- |
947
938
  | `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`. |
939
+ | `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs. |
940
+ | `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness. |
941
+ | `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. Defaults to the CLI config directory under `~/.config`. |
951
942
  | `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
943
  | `CI` | Disable the automatic published-version check when set. |
953
944
  | `GITHUB_WEBHOOK_SECRET` | Default signing secret for GitHub forwarding and replay. |
@@ -12,6 +12,11 @@ from `@cursor/july/connections`, and the transport comes in
12
12
  four shapes: remote HTTP, local stdio, the signed-in Cursor account's
13
13
  connectors, and peer agents on the same host.
14
14
 
15
+ Put a server in `agent/host-connections/` when host tools should call it
16
+ and the model should not. Same `defineConnection` shape. `agent-sdk mcp
17
+ oauth` still works. The playground and the turn's MCP servers never see
18
+ those files.
19
+
15
20
  ## Remote MCP server
16
21
 
17
22
  Point an MCP connection at a remote server with a URL.
@@ -30,7 +35,7 @@ Tokens come from env vars. Never hardcode them in the file.
30
35
  ## Host MCP OAuth
31
36
 
32
37
  For servers that speak OAuth, set `oauth: true` and authorize with the
33
- CLI. Tokens live in `~/.config/agent-serve/mcp-auth.json`. `--store`
38
+ CLI. Tokens live in `mcp-auth.json` under the CLI config directory. `--store`
34
39
  copies them onto the hosted deployment as `MCP_OAUTH_<NAME>_*` secrets.
35
40
 
36
41
  ```ts
@@ -48,17 +53,15 @@ agent-sdk mcp oauth inventory --store # also upsert deployment secrets
48
53
  Full walkthrough: [Host MCP OAuth](../guides/mcp-oauth.md). Companion
49
54
  skill: [`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
50
55
 
51
- Set `hostOnly: true` only when host tools should call the server and the
52
- model should not. Playground chat will not see those tools. Account MCP
53
- (`cursorAccount: true`) is the right choice for connectors already linked
54
- in the Cursor dashboard. Omit `servers` (or pass `"*"`) to forward every
55
- connected connector. If the model should call those tools by name on
56
- local turns, set `advertiseTools: true`.
56
+ Account MCP (`cursorAccount: true`) is the right choice for connectors
57
+ already linked in the Cursor dashboard. Omit `servers` (or pass `"*"`)
58
+ to forward every connected connector. If the model should call those
59
+ tools by name on local turns, set `advertiseTools: true`.
57
60
 
58
61
  ## Per-session auth (`auth`)
59
62
 
60
63
  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
64
+ for** (a multi-tenant agent asserting the tenant it is acting for),
62
65
  declare an `auth` callback instead of static headers. It runs host-side
63
66
  at turn-build time with the session's `SessionInfo` and returns headers
64
67
  merged over the static ones:
@@ -73,16 +76,16 @@ export default defineConnection({
73
76
  });
74
77
  ```
75
78
 
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
79
+ The callback is evaluated on **every local turn**, including reminder
80
+ fires and post-restart follow-ups, so the identity always comes from the
78
81
  session itself, never from state parked in memory. The model never sees a
79
82
  tenant parameter and can never choose the tenant. A callback that throws
80
83
  fails the turn: a turn never silently runs without the connection's
81
84
  identity. Local runtime only; cloud turns are refused. `host.mcp` calls
82
85
  from server tools keep the static headers only. Not combinable with
83
- `oauth: true` the host OAuth provider owns the Authorization header.
86
+ `oauth: true`; the host OAuth provider owns the Authorization header.
84
87
 
85
- Derive the identity from durable session facts `session.auth`,
88
+ Derive the identity from durable session facts: `session.auth`,
86
89
  `session.id`, or your channel's own session state. Do **not** key it off
87
90
  `session.continuationKey`: the HTTP channel rotates the continuation key
88
91
  after every accepted follow-up, so a tenant mapping keyed on it silently
@@ -93,14 +96,9 @@ design are the exception.)
93
96
  per-operation clients with the evaluated headers. Attached connections
94
97
  ride the turn's SDK `mcpServers`, passed on **every send** rather than
95
98
  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.
99
+ live on the very next turn. A stateful stdio server cannot share a
100
+ process with an attached `auth` connection. Advertise the auth
101
+ connection instead.
104
102
 
105
103
  ## Advertise a connection's tools by name (`advertiseTools`) {#advertise-tools}
106
104
 
@@ -118,7 +116,7 @@ export default defineConnection({
118
116
 
119
117
  A listing failure, invalid tool name, or name collision fails the turn.
120
118
  Advertised tools follow the same runtime support as server tools. They cannot
121
- be combined with `hostOnly` or called through the direct tool API.
119
+ be called through the direct tool API.
122
120
 
123
121
  In a dry-run session, MCP tools marked read-only run normally. Tools marked
124
122
  as writes are stubbed. Tools without effect annotations are unavailable.
@@ -226,13 +224,14 @@ Unknown slugs and self-references fail `serve` at startup. Resolution
226
224
  (loopback versus `--public-url`), loop caveats, and the delegation model
227
225
  are in the [Agent-to-agent guide](../guides/agent-to-agent.md).
228
226
 
229
- ## Every MCP connection is available in three places
227
+ ## Every model-visible MCP connection is available in three places
230
228
 
231
- One authored MCP connection serves three consumers.
229
+ A file under `agent/mcp-connections/` serves three consumers. Host
230
+ connections skip the first one.
232
231
 
233
232
  1. **Cursor agent:** Attached connections ride SDK `mcpServers` behind
234
233
  harness MCP meta-tools. Set `advertiseTools: true` so local turns see
235
- named tools. `hostOnly` keeps the connection off the model.
234
+ named tools.
236
235
  2. **Server tools:** Deterministic host code composes MCP calls
237
236
  through `ctx.host.mcp`:
238
237
 
@@ -267,7 +266,7 @@ lazily on first use.
267
266
 
268
267
  Continue with these pages:
269
268
 
270
- - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`, `hostOnly`
269
+ - [Host MCP OAuth](../guides/mcp-oauth.md): `mcp oauth`, `--store`
271
270
  - [Agent-to-agent](../guides/agent-to-agent.md): peers in depth
272
271
  - [Tools](./tools.md): authored tools that wrap MCP connections
273
272
  - [Webhooks](../guides/webhooks.md): calling MCP connections from handlers
@@ -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`:
@@ -71,9 +71,8 @@ For GitHub merge-box checks and sticky PR banners, use
71
71
  `githubChannel({ progress: { commitStatus, banner } })` from
72
72
  `@cursor/july/channels/github`. That is the supported Autofix-style
73
73
  path. See [GitHub: Show PR progress](../guides/github.md#show-pr-progress).
74
- Override channel `events` only when the lifecycle is custom (for
75
- example [Approval Buddy](../example-agents/approval-buddy.md)'s
76
- never-red status from tool output). Do not use `defineHook` for those
74
+ Override channel `events` only when the lifecycle is custom, such as
75
+ never-red status from tool output. Do not use `defineHook` for those
77
76
  writes.
78
77
 
79
78
  ## Patterns
@@ -84,20 +83,16 @@ Usage metering: subscribe to `turn.completed` and forward
84
83
  Failure alerting: `turn.failed` carries the message, and
85
84
  `ctx.session.id` points at the trace.
86
85
 
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.
86
+ Derived state: persist ids that must survive hosted replace with
87
+ `ctx.host.kv` or `ctx.host.files`. `stateRoot` resets on replace.
92
88
 
93
- Transcript export: subscribe to `"*"` and append to your own store. The
94
- NDJSON envelope is already ordered and replayable.
89
+ Transcript export: subscribe to `"*"` and append to your own store.
95
90
 
96
91
  ## What's next
97
92
 
98
93
  Continue with these pages:
99
94
 
100
- - [Sessions and streaming](./sessions.md): every event a hook can see
95
+ - [Sessions and streaming](./sessions.md): the event vocabulary hooks observe
101
96
  - [OpenTelemetry](../guides/opentelemetry.md): OTLP traces and metrics
102
97
  from the same event stream
103
98
  - [Deployment](../deployment.md#observability): runtime logs and export