@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
package/AGENTS.md CHANGED
@@ -9,6 +9,10 @@ User-facing documentation lives in [`docs/`](./docs/README.md)
9
9
  troubleshooting, reference). This file is the terse loop reference;
10
10
  point humans at the docs.
11
11
 
12
+ Start machine-readable docs at `dist/docs/llms.txt` when it exists, or at
13
+ `/docs/llms.txt` on a running host. Use `llms-full.txt` only when the whole
14
+ documentation set is needed.
15
+
12
16
  Before committing or reviewing any Agent SDK documentation change, read
13
17
  `docs/.cursor/skills/writing/SKILL.md` and
14
18
  `docs/.cursor/skills/docs-lint/SKILL.md`. Run `/docs-lint` on every change.
package/README.md CHANGED
@@ -7,14 +7,14 @@
7
7
  > release, and 0.x versions may ship breaking changes without notice.
8
8
 
9
9
  A filesystem-first framework for building and serving Cursor agents.
10
- Customers define an agent as ordinary files markdown for prose,
11
- TypeScript for typed behavior under an `agent/` directory. The framework
10
+ Customers define an agent as ordinary files: markdown for prose,
11
+ TypeScript for typed behavior, under an `agent/` directory. The framework
12
12
  discovers those files, compiles them into a manifest, and serves the agent
13
13
  over channels, using the Cursor SDK (`@cursor/sdk`) and the Cursor harness
14
14
  as the execution engine.
15
15
 
16
- **User-facing documentation lives in [`docs/`](./docs/README.md)** —
17
- open it with `npx @cursor/july docs`, or at `/docs` on every running
16
+ **User-facing documentation lives in [`docs/`](./docs/README.md)**.
17
+ Open it with `npx @cursor/july docs`, or at `/docs` on every running
18
18
  `agent-sdk serve` host. It covers getting started, concepts, guides (Slack,
19
19
  GitHub webhooks, approvals, agent-to-agent, cloud runtime), evals, live
20
20
  A/B metrics, hillclimbing, deployment, troubleshooting, and reference
@@ -68,15 +68,13 @@ Serve one project with `agent-sdk serve --dir ./my-agent --dev`, or point
68
68
  `serve` at a folder of agent projects to mount every child under its
69
69
  directory name.
70
70
 
71
- ## Node only do not run under Bun
71
+ ## Node only: do not run under Bun
72
72
 
73
- Run the Agent SDK with **Node 22.13+** (from source: `pnpm exec tsx
74
- src/bin/agent-serve.ts …`, or the built `dist/bin/agent-serve.js`). Do not
75
- run it under Bun: Bun's HTTP/2 client corrupts the Cursor SDK's local
76
- harness tool-result streams (`NGHTTP2_FRAME_SIZE_ERROR`), so every built-in
77
- read/grep the model makes fails and turns degrade into failed-read retry
78
- loops (we measured an 8-minute review that takes ~1 minute under Node).
79
- The `mise` tasks in this package already use tsx.
73
+ Run the Agent SDK with **Node 22.13+**. Use `agent-sdk` or
74
+ `npx @cursor/july`. Do not run it under Bun: Bun's HTTP/2 client
75
+ corrupts the Cursor SDK's local harness tool-result streams
76
+ (`NGHTTP2_FRAME_SIZE_ERROR`), so every built-in read/grep the model
77
+ makes fails and turns degrade into failed-read retry loops.
80
78
 
81
79
  ## Serving many agents at once
82
80
 
@@ -86,7 +84,7 @@ one port, each under its own slug (its directory name):
86
84
  ```bash
87
85
  agent-sdk serve --dir ./agents --dev
88
86
  # 2 agents listening
89
- # playground http://127.0.0.1:5273
87
+ # playground <printed URL>
90
88
  ```
91
89
 
92
90
  `serve` always uses multi-agent layout by default: agents are mounted under
@@ -116,7 +114,7 @@ segments.
116
114
 
117
115
  Every mounted agent also serves the **Model Context Protocol** over
118
116
  streamable HTTP at `/<slug>/v1/mcp` (or `/v1/mcp` in single mode), so other
119
- agents and any MCP client can delegate work to it. The surface is
117
+ agents, and any MCP client, can delegate work to it. The surface is
120
118
  stateless (session identity travels in tool arguments) and runs the same
121
119
  route auth chain as the session API. Tools:
122
120
 
@@ -146,15 +144,15 @@ export default defineConnection({
146
144
  ```
147
145
 
148
146
  The parent model then sees the peer's `ask` / `check` (/ `call_tool`) tools
149
- under the `weather` server name subagent-style delegation where the peer
147
+ under the `weather` server name: subagent-style delegation where the peer
150
148
  keeps its **own** instructions, tools, MCP connections, and sessions. Peer URLs
151
149
  resolve when the server starts (so `run` / `eval` ephemeral ports work):
152
150
 
153
151
  - **Local-runtime turns** (and host-side `ctx.host.mcp` / channel handlers)
154
- call the peer over loopback works out of the box under the default
152
+ call the peer over loopback. That works under the default
155
153
  `localDevStrict()` auth.
156
154
  - **Cloud-runtime turns** execute on a cloud VM that cannot reach this
157
- host's loopback address. Pass `--public-url https://agent-serve.example.com`
155
+ host's loopback address. Pass `--public-url https://agents.example.com`
158
156
  (or `serve(dir, { publicUrl })`) so peers resolve to a reachable URL;
159
157
  without it, peers are omitted from cloud turns (the server warns at
160
158
  startup). With `--bearer-token`, the token is attached to peer calls
@@ -163,7 +161,7 @@ resolve when the server starts (so `run` / `eval` ephemeral ports work):
163
161
  Unknown peer slugs and self-references fail at serve startup. Peers require
164
162
  the multi-agent layout (each agent mounted under its slug). There is no
165
163
  cross-host loop protection yet: if agent A's instructions delegate to B and
166
- B's delegate back to A, they can recurse scope each agent's delegation
164
+ B's delegate back to A, they can recurse. Scope each agent's delegation
167
165
  instructions narrowly (the concierge above delegates *weather questions* to
168
166
  `weather-agent`, not everything).
169
167
 
@@ -190,8 +188,8 @@ You are a concise assistant. Use tools when they are available.
190
188
  import { defineAgent } from "@cursor/july";
191
189
 
192
190
  export default defineAgent({
193
- // optional defaults to grok-4.5 with effort=high and fast=true
194
- // runtime: "local", // default Cursor SDK local harness
191
+ // optional: defaults to grok-4.5 with effort=high and fast=true
192
+ // runtime: "local", // default: Cursor SDK local harness
195
193
  // runtime: "cloud",
196
194
  // cloud: {
197
195
  // repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
@@ -200,7 +198,7 @@ export default defineAgent({
200
198
  ```
201
199
 
202
200
  Serve it (turns run on the Cursor harness, so the host needs a Cursor
203
- credential sign in once, or export an API key):
201
+ credential: sign in once, or export an API key):
204
202
 
205
203
  ```bash
206
204
  agent-sdk login # browser sign-in; mints + stores a revocable API key
@@ -245,7 +243,7 @@ agent-sdk validate --dir . # exit non-zero on error diagnostics
245
243
  ## Terminal client
246
244
 
247
245
  `agent-sdk chat` talks to a running server over the same public API and
248
- renders the reply live streamed text, tool calls, and a per-turn usage
246
+ renders the reply live: streamed text, tool calls, and a per-turn usage
249
247
  footer. Pass `--json` for a compact trajectory (same shape as `run`).
250
248
 
251
249
  ```bash
@@ -326,7 +324,7 @@ import { defineEvalConfig } from "@cursor/july/evals";
326
324
 
327
325
  export default defineEvalConfig({
328
326
  maxConcurrency: 20,
329
- // Optional playground /v1/dev/evals history window (default 20):
327
+ // Optional: playground /v1/dev/evals history window (default 20):
330
328
  // maxPlaygroundRuns: 50,
331
329
  });
332
330
  ```
@@ -349,61 +347,32 @@ evals, hillclimb, GitHub webhooks, Slack setup, debugging).
349
347
 
350
348
  Every served agent ships with a built-in playground. The default multi-agent
351
349
  mode serves it at `http://127.0.0.1:3000/<slug>/playground`.
352
- `--mode single` uses `http://127.0.0.1:3000/playground`. The Vite and React
353
- app uses the same public HTTP API for manual testing and demo recordings:
350
+ `--mode single` uses `http://127.0.0.1:3000/playground`. The playground
351
+ uses the same public HTTP API for manual testing and demo recordings:
354
352
 
355
353
  - chat with the agent and watch text/reasoning stream live, rendered as
356
354
  markdown (headings, lists, tables, blockquotes, links) with syntax
357
355
  highlighting for fenced code blocks (C-like languages, Python, shell,
358
356
  and diffs),
359
357
  - invoke custom channels as **slash commands** in the composer (e.g. a
360
- `/drive https://github.com/org/repo/pull/1` channel route) routes from `GET /v1/info`,
358
+ `/drive https://github.com/org/repo/pull/1` channel route). Routes from `GET /v1/info`,
361
359
  with `/help` and autocomplete; same HTTP as the Agent surface **Try**
362
360
  buttons,
363
361
  - see tool calls inline (args, output, error state) as `actions.requested`
364
362
  / `action.result` events arrive,
365
- - browse every session (chat, custom-channel, and schedule task sessions)
366
- and replay their durable event streams,
363
+ - browse the sessions you own (chat, custom-channel, and schedule
364
+ task sessions) and replay their event streams. In `--dev` on loopback,
365
+ or with `--allow-anonymous`, the list includes every principal,
367
366
  - dispatch schedules by hand in dev mode,
368
367
  - inspect the discovered agent surface (tools, skills, subagents, MCP
369
368
  connections, channels, hooks),
370
369
  - flip on the raw NDJSON pane to see the exact wire events.
371
370
 
372
- The SPA is a static bundle. `agent-sdk serve` auto-builds `dist/playground/`
373
- when it is missing and the local vite toolchain is present (`pnpm run build`
374
- also emits it for publish). The server serves the bundle and every call it
375
- makes runs the normal route auth chain (there's a bearer-token field for
376
- non-loopback setups). Disable it with `--no-playground` (CLI) or
377
- `serve(dir, { playground: false })`. When serving many agents, each has its
378
- own playground at `/<slug>/playground` and `/` is an index of them all (see
379
- "Serving many agents at once").
380
-
381
- ### Developing the playground
382
-
383
- `serve --dev` / `dev` also starts Vite HMR (default `:5273`) and prints that
384
- URL as `playground`. Single-agent proxies `/v1` to the serve URL; multi-agent
385
- serves the agents index at `/` and each SPA at `/<slug>/playground`:
386
-
387
- ```bash
388
- # single agent — auto-build + HMR in one process
389
- pnpm exec tsx src/bin/agent-serve.ts serve --dir ./my-agent --dev
390
-
391
- # monorepo dev: multi-agent HMR
392
- mise //packages/agent-serve:start
393
- # → backend :3000, playground HMR :5273 (open /, then /<slug>/playground)
394
-
395
- # pin one slug at the HMR root, or UI-only against an already-running serve
396
- AGENT_SERVE_BASE=/my-agent mise //packages/agent-serve:start
397
- AGENT_SERVE_MULTI=1 mise //packages/agent-serve:dev-playground
398
- ```
399
-
400
- The Vite dev server proxies API calls to the backend (`AGENT_SERVE_TARGET`,
401
- default `http://127.0.0.1:3000`). Multi-agent HMR proxies `/<slug>/v1/*` as-is
402
- and serves each SPA at `/<slug>/playground`; a single-slug pin uses
403
- `AGENT_SERVE_BASE=/<slug>` at the HMR root. Editing anything under
404
- `playground/src` hot-reloads in the browser. The playground source lives in
405
- `playground/` (entry `playground/src/main.tsx`); markdown rendering and the
406
- trace model are plain modules under `playground/src/lib` with unit tests.
371
+ `agent-sdk serve` serves the playground bundle. Disable it with
372
+ `--no-playground` (CLI) or `serve(dir, { playground: false })`. When
373
+ serving many agents, each has its own playground at `/<slug>/playground`
374
+ and `/` is an index of them all (see "Serving many agents at once").
375
+ `serve --dev` prints a playground URL; open that URL if the UI looks stale.
407
376
 
408
377
  To share the server beyond localhost (a tunnel, a LAN address, a phone),
409
378
  pass `--bearer-token <secret>` (or `serve(dir, { authToken })`). That
@@ -418,32 +387,19 @@ token into the top-right field.
418
387
 
419
388
  Session follow-up, stream, and list routes also bind to the principal that
420
389
  created the session (`403` when a different admitted principal addresses
421
- someone else's handle). Session ids are restricted to a single safe path
422
- segment before they touch `<stateRoot>/sessions`.
390
+ someone else's handle).
423
391
 
424
392
  ## How it runs on the Cursor harness
425
393
 
426
- Every session is one Cursor SDK agent (`Agent.create` / `Agent.resume`).
427
- Local agents use the session id as the SDK agent id; cloud agents persist
428
- a separate `sdkAgentId` (typically `bc-…`). Each session gets its own
429
- workspace directory, materialized from the authored files and handed to
430
- the local harness as its working directory:
431
-
432
- | Folder or file | Runtime mapping |
433
- | ------------------------ | ------------------------------------------------------------------------------- |
434
- | `instructions.*` | Local: `AGENTS.md` in the session workspace. Cloud: prepended to the first prompt. |
435
- | `tools/*.ts` (`execution: "server"`, default) | Local: in-process SDK custom tools. Cloud: authenticated HTTP MCP callbacks to the AgentSDK host. |
436
- | `tools/*.ts` (`execution: "agent"`) | Local: scripts under `.agent-serve/tools/` + catalog in `AGENTS.md`. Cloud: catalog + script bodies on the first prompt. |
437
- | `skills/*` | Local: `.cursor/skills/<name>/SKILL.md` in the workspace. Cloud: native discovery from the Agent Store (`skills/` when hosted; `agent-serve/<agent>/skills/` on the USER store for local serve/run). |
438
- | `mcp-connections/*.ts` | Always three places: Cursor agent via SDK `mcpServers` (local + cloud), host-side `ctx.host.mcp` for in-process tools, and `args.host.mcp` on channel/schedule handlers. |
439
- | `subagents/<id>/` | SDK custom subagents (the model delegates via the harness `task` tool) |
440
- | `sandbox/workspace/**` | Local session workspace seed on first turn; ignored for cloud runtime. |
441
- | `channels/`, `schedules/`, `hooks/` | Served by this framework around the harness |
442
-
443
- Conversation state for local agents persists through the SDK's local store
444
- under `.agent-serve/runner/`, and every session's event stream is recorded
445
- to `.agent-serve/sessions/<id>/events.ndjson` — sessions survive server
446
- restarts, and streams replay from any `startIndex`.
394
+ Each session is one Cursor SDK agent. Local turns run on this host.
395
+ Cloud turns run on a Cursor cloud agent. The session stream records
396
+ `agent.bound` with the cloud conversation URL.
397
+
398
+ Authored files reach the model as instructions, tools, skills, and
399
+ workspace seed files. The mapping differs by runtime; see
400
+ [Cloud runtime](./docs/guides/cloud-runtime.md). Sessions and their
401
+ event streams survive server restarts. Reconnect with `?startIndex=` to
402
+ replay.
447
403
 
448
404
  ## Folder structure
449
405
 
@@ -460,7 +416,7 @@ export default defineAgent({
460
416
  { id: "fast", value: "true" },
461
417
  ],
462
418
  }, // optional; this is the default
463
- runtime: "local", // default or "cloud"
419
+ runtime: "local", // default: or "cloud"
464
420
  // cloud: {
465
421
  // repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
466
422
  // env: { type: "cloud" },
@@ -476,7 +432,7 @@ and `fast=true`.
476
432
 
477
433
  | Value | Behavior |
478
434
  | --------- | ------- |
479
- | `"local"` | Cursor SDK local harness on this machine. Session id doubles as the SDK agent id. Authored tools, skills, and sandbox seeds apply. |
435
+ | `"local"` | Cursor SDK local harness on this machine. Authored tools, skills, and sandbox seeds apply. |
480
436
  | `"cloud"` | Cursor cloud agents. Pass a `cloud` block with the repositories and environment the agent needs. Server tools work on managed hosting. Self-hosted cloud turns need `--public-url`. |
481
437
 
482
438
  Discovery warns when cloud turns ignore a local-only capability. Authored
@@ -527,7 +483,7 @@ stream emits `action.approval_requested` / `action.approval_resolved`.
527
483
  - Playground Approve / Deny buttons
528
484
  - HTTP: `POST /v1/session/:sessionId/approvals/:callId` with
529
485
  `{"decision":"approve"|"deny"}`
530
- - **Slack** (opt-in channel surface) set `toolApprovals: true` on
486
+ - **Slack** (opt-in channel surface): set `toolApprovals: true` on
531
487
  `slackChannel`, and enable `interactivity` in the Slack app
532
488
  manifest:
533
489
 
@@ -567,7 +523,7 @@ does **not** open cross-owner approval for HTTP sessions. Production and
567
523
  bearer-auth hosts stay strict: Slack resolve must come from Slack interactivity
568
524
  (or a matching principal).
569
525
 
570
- `--allow-anonymous` is for trusted-network demos only every HTTP caller shares
526
+ `--allow-anonymous` is for trusted-network demos only. Every HTTP caller shares
571
527
  the same `anonymous` principal. Prefer `--bearer-token` when the host is shared.
572
528
 
573
529
  Slack cards show **redacted / truncated** args for Block Kit limits; execution
@@ -592,9 +548,9 @@ export default defineTool({
592
548
 
593
549
  Approvals are only supported for `execution: "server"` tools on the
594
550
  `local` runtime. Exact resume of a parked SDK tool call does **not**
595
- survive host process restart pending approvals left after a crash are
551
+ survive host process restart. Pending approvals left after a crash are
596
552
  treated as interrupted.
597
- Agent tool (runs where the Cursor agent runs local harness or cloud VM):
553
+ Agent tool (runs where the Cursor agent runs: local harness or cloud VM):
598
554
 
599
555
  ```ts
600
556
  import { defineTool } from "@cursor/july/tools";
@@ -621,7 +577,7 @@ it explicitly next to `content` and `isError`. For server tools, `ctx` carries
621
577
 
622
578
  #### Deterministic tool calls
623
579
 
624
- Server tools can also be called **deterministically** you pick the tool
580
+ Server tools can also be called **deterministically**. You pick the tool
625
581
  and the input, no model turn decides anything. The input is validated
626
582
  against the tool's schema and `execute` runs in-process; the result comes
627
583
  back exactly as the model would receive it. No Cursor API key is needed.
@@ -646,7 +602,7 @@ agent-sdk call get_weather --url http://127.0.0.1:3000/<slug> --input '{"city":"
646
602
 
647
603
  Programmatically, `callTool(toolName, input, options?)` is available on the
648
604
  serve handle, on channel route handlers and `onStart` args, and on schedule
649
- `run` handlers so a channel can mix deterministic tool calls with model
605
+ `run` handlers, so a channel can mix deterministic tool calls with model
650
606
  turns (e.g. fetch PR metadata deterministically, then `send()` the review
651
607
  prompt):
652
608
 
@@ -655,17 +611,17 @@ const outcome = await handle.callTool("get_weather", { city: "NYC" });
655
611
  // { toolName, callId, isError, result, durationMs }
656
612
  ```
657
613
 
658
- By default the tool runs against an **ephemeral** scratch workspace under
659
- `<stateRoot>/tool-calls/<callId>` with a synthetic `direct` session context
660
- materialized like a session workspace (AGENTS.md, skills, seed files) and
661
- removed once the call returns. Pass `sessionId` (body field over HTTP,
662
- `--session` on the CLI, `options.sessionId` programmatically) to run it
663
- **inside an existing session** instead: the tool sees that session's info
664
- and materialized workspace, and the call is recorded on the session's event
665
- stream as `actions.requested` / `action.result` under a per-call `turnId`
666
- visible in the playground, NDJSON trace, and trajectories like any
667
- model-initiated call. Session-bound calls are serialized with model turns:
668
- while a turn is running the call is rejected with `409 session_busy`.
614
+ By default the tool runs against an ephemeral scratch workspace,
615
+ materialized like a session workspace (AGENTS.md, skills, seed files)
616
+ and removed once the call returns. Pass `sessionId` (body field over
617
+ HTTP, `--session` on the CLI, `options.sessionId` programmatically) to
618
+ run it inside an existing session instead: the tool sees that session's
619
+ info and materialized workspace, and the call is recorded on the
620
+ session's event stream as `actions.requested` / `action.result` under a
621
+ per-call `turnId`. That call is visible in the playground, NDJSON
622
+ trace, and trajectories like any model-initiated call. Session-bound
623
+ calls are serialized with model turns: while a turn is running the call
624
+ is rejected with `409 session_busy`.
669
625
 
670
626
  Unknown tools are rejected with the available tool names, `execution:
671
627
  "agent"` tools cannot be called on the host (400), schema-invalid input is a
@@ -678,7 +634,7 @@ that throws is reported as `isError: true` with the same
678
634
 
679
635
  Skills follow the `SKILL.md` convention: model-loadable procedures the
680
636
  harness advertises by description and loads on demand. Author them as flat
681
- markdown (`skills/forecast.md`, optional `description` frontmatter — the
637
+ markdown (`skills/forecast.md`, optional `description` frontmatter. The
682
638
  first body line is the fallback), packaged directories
683
639
  (`skills/research/SKILL.md` plus `references/…`, which require `description`
684
640
  frontmatter), or TypeScript (`defineSkill` from
@@ -755,7 +711,7 @@ Every MCP connection is always available in three places:
755
711
 
756
712
  1. the Cursor agent (local or cloud), via SDK `mcpServers`
757
713
  2. the serve host, for in-process tools via `ctx.host.mcp`
758
- 3. channel / schedule handlers, via `args.host.mcp` (deterministic no agent loop)
714
+ 3. channel / schedule handlers, via `args.host.mcp` (deterministic; no agent loop)
759
715
 
760
716
  ```ts
761
717
  export default defineTool({
@@ -768,7 +724,7 @@ export default defineTool({
768
724
  ```
769
725
 
770
726
  ```ts
771
- // agent/channels/webhook.ts call MCP directly from a webhook
727
+ // agent/channels/webhook.ts: call MCP directly from a webhook
772
728
  POST("/sync", {
773
729
  bodySchema: z.object({}),
774
730
  handler: async (_req, { host }) => {
@@ -784,8 +740,8 @@ POST("/sync", {
784
740
  ### Subagents (`agent/subagents/<id>/`)
785
741
 
786
742
  A subagent is its own directory with the same `agent.ts` +
787
- `instructions.md` shape. `description` is required the parent model reads
788
- it to decide when to delegate and `model` is optional (`inherit` by
743
+ `instructions.md` shape. `description` is required. The parent model reads
744
+ it to decide when to delegate, and `model` is optional (`inherit` by
789
745
  default). On the Cursor harness, subagents run as SDK custom subagents:
790
746
  they inherit the parent's execution surface, so per-subagent `tools/`,
791
747
  `skills/`, and `mcp-connections/` are reported as warnings and ignored for now.
@@ -795,22 +751,22 @@ they inherit the parent's execution surface, so per-subagent `tools/`,
795
751
  The **built-in HTTP channel** is always mounted (under `/<slug>` in the
796
752
  default multi-agent layout; at the server root with `mode: "single"`):
797
753
 
798
- - `POST /v1/session` start a session (`{"message": "..."}`; returns
754
+ - `POST /v1/session`: start a session (`{"message": "..."}`; returns
799
755
  `sessionId` + `continuationToken`)
800
- - `POST /v1/session/:sessionId` follow-up (`{"message", "continuationToken"}`;
756
+ - `POST /v1/session/:sessionId`: follow-up (`{"message", "continuationToken"}`;
801
757
  rotates the token; works for any chat session including custom channels like
802
758
  `drive`; `409` on stale tokens or task sessions;
803
759
  `403` if the caller is not the session owner)
804
- - `GET /v1/session/:sessionId/stream?startIndex=N` replay + live NDJSON
760
+ - `GET /v1/session/:sessionId/stream?startIndex=N`: replay + live NDJSON
805
761
  (same owner check)
806
- - `GET /v1/session/:sessionId/approvals` pending human-in-the-loop
762
+ - `GET /v1/session/:sessionId/approvals`: pending human-in-the-loop
807
763
  tool approvals for the session
808
- - `POST /v1/session/:sessionId/approvals/:callId` approve or deny
764
+ - `POST /v1/session/:sessionId/approvals/:callId`: approve or deny
809
765
  (`{"decision":"approve"|"deny"}`)
810
- - `GET /v1/sessions` sessions owned by the calling principal
811
- - `POST /v1/tools/:toolName` call a server tool deterministically
766
+ - `GET /v1/sessions`: sessions owned by the calling principal
767
+ - `POST /v1/tools/:toolName`: call a server tool deterministically
812
768
  (`{"input": {...}, "sessionId"?}`; see "Deterministic tool calls")
813
- - `GET /v1/health`, `GET /v1/info` liveness and the manifest snapshot
769
+ - `GET /v1/health`, `GET /v1/info`: liveness and the manifest snapshot
814
770
  Author `agent/channels/http.ts` only to override its defaults:
815
771
 
816
772
  ```ts
@@ -862,7 +818,7 @@ export default defineChannel({
862
818
  ```
863
819
 
864
820
  `GET` requires a Zod `querySchema` and `POST` / `PUT` / `PATCH` require a
865
- Zod `bodySchema` at compile time plain JSON Schema objects will not
821
+ Zod `bodySchema` at compile time. Plain JSON Schema objects will not
866
822
  type-check. Use `z.object({})` or `z.unknown()` when the surface is
867
823
  intentionally open. Schemas are validated by the host before the handler
868
824
  runs (handlers get typed `args.body` / `args.query`) and projected on
@@ -871,15 +827,16 @@ so the composer can offer matching **slash commands** (e.g. `/drive`).
871
827
 
872
828
  Route handlers receive a Fetch `Request` and helpers: `send`, `getSession`,
873
829
  `receive` (cross-channel hand-off), `params`, `requestIp`, `auth`, `host`
874
- (shared host services MCP / GitHub / Slack; same as tool `ctx.host`), and
830
+ (shared host services: MCP / GitHub / Slack; same as tool `ctx.host`), and
875
831
  `waitUntil`. Channel `state` declares initial per-session adapter state,
876
832
  persisted across events; handlers receive it on `channel.state`.
877
833
 
878
- **Auth**: every route runs an auth-policy chain (`auth` on the channel).
879
- The default is `[localDevStrict()]` direct loopback callers only, with
880
- proxy-forwarding headers and non-loopback `Host` rejected — so nothing
881
- is exposed publicly until you add real auth (`bearerAuth(...)`, a custom
882
- policy, or the explicit `allowAll()`).
834
+ **Auth**: channel routes and the session API run an auth-policy chain
835
+ (`auth` on the channel). The host index, docs, and health routes run no
836
+ auth. The default policy is `[localDevStrict()]`: direct loopback
837
+ callers only, with proxy-forwarding headers and non-loopback `Host`
838
+ rejected, so nothing is exposed publicly until you add real auth
839
+ (`bearerAuth(...)`, a custom policy, or the explicit `allowAll()`).
883
840
 
884
841
  **Slack** (`@cursor/july/channels/slack`): a platform channel pack
885
842
  that defaults to **Socket Mode**. Author `agent/channels/slack.ts` with
@@ -888,14 +845,14 @@ that defaults to **Socket Mode**. Author `agent/channels/slack.ts` with
888
845
  ```ts
889
846
  import { slackChannel } from "@cursor/july/channels/slack";
890
847
 
891
- // Single agent SLACK_BOT_TOKEN + SLACK_APP_TOKEN
848
+ // Single agent: SLACK_BOT_TOKEN + SLACK_APP_TOKEN
892
849
  export default slackChannel();
893
850
 
894
- // Multi-agent serve one Slack app (and token pair) per agent
851
+ // Multi-agent serve: one Slack app (and token pair) per agent
895
852
  export default slackChannel({ envPrefix: "WEATHER_AGENT" });
896
853
  // → WEATHER_AGENT_SLACK_BOT_TOKEN + WEATHER_AGENT_SLACK_APP_TOKEN
897
854
 
898
- // Cursor account connection no dedicated Slack app. `@Cursor Weatherbot …`
855
+ // Cursor account connection: no dedicated Slack app. `@Cursor Weatherbot …`
899
856
  // routes here; replies post as "Weatherbot" through the Cursor Slack app.
900
857
  export default slackChannel({ cursorAccount: true, agentName: "Weatherbot" });
901
858
  ```
@@ -912,7 +869,7 @@ return a prepared `message` / `workspaceFiles` / `cloud` to host-prepare PR
912
869
  reviews or attach
913
870
  cloud repos from an `@mention`.
914
871
 
915
- **Engagement:** by default the agent is summoned, never proactive — it
872
+ **Engagement:** by default the agent is summoned, never proactive. It
916
873
  dispatches only on `app_mention` and DMs. Channel watch is an explicit opt-in:
917
874
 
918
875
  ```ts
@@ -954,7 +911,7 @@ Approve/Deny cards and routes Socket Mode `interactive` clicks to
954
911
  (App-Level Token with `connections:write`).
955
912
 
956
913
  Most demos under `examples/` use the Cursor Slack connection
957
- (`cursorAccount: true`) with a unique single-token `agentName` —
914
+ (`cursorAccount: true`) with a unique single-token `agentName`.
958
915
  `@Cursor Benny …`, `@Cursor Bugbot …`, `@Cursor ApprovalBuddy …`, etc.
959
916
  Sign the host in, then mention the agent; no per-agent Slack app required
960
917
  for chat. Agents that need channel watch or tool approvals keep a Socket
@@ -965,11 +922,11 @@ from the directory name by `slack create`).
965
922
  | Agent | `@Cursor` name | Optional Socket Mode app |
966
923
  | --- | --- | --- |
967
924
  | `weather-agent` | Weather | `slack-app.ts` (`WEATHER_AGENT_SLACK_*`, tool approvals) |
968
- | `slack-agent` | SlackAgent | |
969
- | `bugbot` | Bugbot | |
970
- | `fsd` | FSD | |
925
+ | `slack-agent` | SlackAgent | - |
926
+ | `bugbot` | Bugbot | - |
927
+ | `fsd` | FSD | - |
971
928
  | `benny` | Benny | `slack-app.ts` (`BENNY_SLACK_*`, channel watch) |
972
- | `approval-buddy` | ApprovalBuddy | |
929
+ | `approval-buddy` | ApprovalBuddy | - |
973
930
 
974
931
  PR-oriented demos (`bugbot`, `fsd`) extract a GitHub PR URL / `owner/repo#N`
975
932
  from the mention and run the same host path as their HTTP channels.
@@ -1014,7 +971,7 @@ export default githubChannel({
1014
971
 
1015
972
  Mounts at `POST /<slug>/v1/channels/github`. When a webhook secret is set the
1016
973
  channel verifies `X-Hub-Signature-256` before parsing (the HMAC becomes the
1017
- request auth); without one it stays loopback-only (`localDevStrict()`) except
974
+ request auth); without one it stays loopback-only (`localDevStrict()`), except
1018
975
  under `serve --dev`, which admits unsigned loopback deliveries so
1019
976
  `gh webhook forward` and fixtures work with zero config. Hooks return
1020
977
  `{ auth }` to start a model turn as the actor, `{ task }` for host-side work
@@ -1032,7 +989,7 @@ auth prefers GitHub App installation tokens when `GITHUB_APP_ID` /
1032
989
  `GITHUB_TOKEN` / `GH_TOKEN` or `gh auth login`. The channel publishes the
1033
990
  webhook events it dispatches on (derived from the declared hooks, or pinned
1034
991
  via `webhookEvents`), so `agent-sdk github …` can forward live
1035
- deliveries with zero hand-listing it wraps [`gh webhook
992
+ deliveries with zero hand-listing. It wraps [`gh webhook
1036
993
  forward`](https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/using-the-github-cli-to-forward-webhooks-for-testing):
1037
994
 
1038
995
  ```bash
@@ -1057,12 +1014,12 @@ agent-sdk github forward --dir ./agents
1057
1014
  When several channels match (e.g. a folder of agent projects with more than
1058
1015
  one github channel), one forwarder fans out to all of them: `gh webhook
1059
1016
  forward` runs against a local proxy that re-posts each raw (still-signed)
1060
- delivery to the channels whose event set matches. This is required GitHub
1017
+ delivery to the channels whose event set matches. This is required. GitHub
1061
1018
  allows only one forwarder per repo, and `gh webhook forward` targets a single
1062
1019
  URL, so N processes would collide with `Hook already exists`.
1063
1020
 
1064
- `gh webhook forward` needs **admin** on the repo (or org owner for `--org`)
1065
- it registers a real webhook and authenticates its relay with the GitHub CLI's
1021
+ `gh webhook forward` needs **admin** on the repo (or org owner for `--org`).
1022
+ It registers a real webhook, and authenticates its relay with the GitHub CLI's
1066
1023
  own login. If `GITHUB_TOKEN` / `GH_TOKEN` is set in your env, deliveries fail
1067
1024
  with **HTTP 401** (the relay rejects env tokens); blank it for the command
1068
1025
  (`GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward …`) or `unset` it.
@@ -1074,12 +1031,12 @@ tunnel), and `--slug` / `--channel` to forward to just one of several agents.
1074
1031
  Against a `--dev` server no secret is needed; set `GITHUB_WEBHOOK_SECRET` (or
1075
1032
  `--secret`) to exercise signature verification (required for a non-dev target).
1076
1033
  Only one forwarder per repo/org at a time (a GitHub limitation). Fixture replay
1077
- still works too `POST` a saved payload with an `x-github-event` header (no
1034
+ still works too: `POST` a saved payload with an `x-github-event` header (no
1078
1035
  signature needed in `--dev`).
1079
1036
 
1080
1037
  **No admin? Hillclimbing? Use `github replay`.** `gh webhook forward` needs repo
1081
1038
  admin and a live event. `agent-sdk github replay <pr_url>` instead **reads**
1082
- the PR (pull access is enough no admin, no relay, and `GITHUB_TOKEN` is fine)
1039
+ the PR (pull access is enough: no admin, no relay, and `GITHUB_TOKEN` is fine)
1083
1040
  and synthesizes GitHub-shaped payloads it POSTs straight at the channel:
1084
1041
 
1085
1042
  ```bash
@@ -1097,7 +1054,7 @@ agent-sdk github replay owner/repo#123 --dir ./my-agent --events '*' --dry-run -
1097
1054
  `--action` / `--conclusion` / `--comment` / `--context` tune each synthesized
1098
1055
  event; `--secret` (or `GITHUB_WEBHOOK_SECRET`) signs them so a secret-configured
1099
1056
  channel verifies. Because replay sends a clean, signed loopback request, it
1100
- passes both the `localDevStrict()` and `allowAll()`+signature auth modes and
1057
+ passes both the `localDevStrict()` and `allowAll()`+signature auth modes, and
1101
1058
  it's fully deterministic, which is what hillclimbing wants.
1102
1059
 
1103
1060
  **Production alternative: pull from Cursor (`--cursor-events`).** If the
@@ -1110,7 +1067,7 @@ Serve fails fast rather than starting with a relay that can never receive
1110
1067
  events.
1111
1068
 
1112
1069
  ### Hooks (`agent/hooks/*.ts`)
1113
- Observe-only subscribers that run after each event is recorded audit
1070
+ Observe-only subscribers that run after each event is recorded: audit
1114
1071
  logs, metrics, mirroring transcripts into your own store. Keys are event
1115
1072
  types (or `*`); handler errors are logged, never fatal.
1116
1073
 
@@ -1148,7 +1105,7 @@ export default defineSchedule({
1148
1105
 
1149
1106
  Cron expressions are standard 5-field, evaluated in UTC with minute
1150
1107
  granularity. In production mode (`agent-sdk serve`) schedules fire on
1151
- cadence; in dev mode (`--dev`) they never fire automatically dispatch one
1108
+ cadence; in dev mode (`--dev`) they never fire automatically. Dispatch one
1152
1109
  by hand, exactly once, through the same path production uses:
1153
1110
 
1154
1111
  ```bash
@@ -1179,19 +1136,18 @@ await handle.createReminder({
1179
1136
  ```
1180
1137
 
1181
1138
  Host/policy packs may pass `run` (return `stop` / `skip` / `delivered`)
1182
- instead of prompts. In `--dev`, use `POST /v1/dev/reminders/:id` (or
1183
- `handle.dispatchReminder`) to fire; auto-timers follow
1184
- `ServeOptions.reminders` (default `!dev`). Run handlers are in-memory —
1185
- after restart those reminders are disarmed (`handler_lost_on_restart`);
1186
- re-arm from enroll/policy.
1139
+ instead of prompts. `--dev` does not auto-fire reminders. Dispatch one
1140
+ with `POST /v1/dev/reminders/:id` or `handle.dispatchReminder`. Run
1141
+ handlers are in-memory. After a restart those reminders are disarmed
1142
+ (`handler_lost_on_restart`); re-arm from enroll/policy.
1187
1143
 
1188
- The NDJSON stream vocabulary one JSON object per line, each carrying
1144
+ The NDJSON stream vocabulary: one JSON object per line, each carrying
1189
1145
  `{ type, index, sessionId, turnId?, at, data }`:
1190
1146
 
1191
1147
  | Event | Meaning |
1192
1148
  | --------------------- | -------------------------------------------------------------- |
1193
1149
  | `session.started` | A durable session was created. |
1194
- | `agent.bound` | Cursor agent id is known (`sdkAgentId`; cloud: `bc-…` + URL). |
1150
+ | `agent.bound` | Cloud conversation URL. |
1195
1151
  | `ab.assigned` | Sticky A/B enrollment (`experiment`, `variant` or `null` skip). |
1196
1152
  | `message.received` | An inbound user message was accepted. |
1197
1153
  | `turn.started` | A turn began. |
@@ -1219,7 +1175,7 @@ import { serve } from "@cursor/july";
1219
1175
 
1220
1176
  const handle = await serve("./my-agent", {
1221
1177
  port: 3000,
1222
- apiKey: process.env.CURSOR_API_KEY, // optional see credential order below
1178
+ apiKey: process.env.CURSOR_API_KEY, // optional: see credential order below
1223
1179
  });
1224
1180
  console.log(`listening on ${handle.url}`);
1225
1181
  // handle.dispatchSchedule("heartbeat"), handle.project, await handle.close()
@@ -1233,22 +1189,21 @@ Cursor dashboard to kill it outright).
1233
1189
 
1234
1190
  Local-dev note: login/account RPCs honor `CURSOR_API_BASE_URL` while the
1235
1191
  Cursor SDK harness honors `CURSOR_BACKEND_URL`. When pointing at a
1236
- non-production backend, set **both** to the same URL a key minted on one
1192
+ non-production backend, set **both** to the same URL. A key minted on one
1237
1193
  backend is rejected by the other.
1238
1194
 
1239
1195
  `serve` refuses to start when discovery produced error diagnostics; run
1240
1196
  `agent-sdk validate` (or read `project.diagnostics`) to see why.
1241
1197
 
1242
- State lives under `<project>/.agent-serve/` (override with `stateRoot` /
1243
- `--state-root`): `sessions/<id>/{session.json,events.ndjson,workspace/}`
1244
- plus the SDK conversation store under `runner/`. Delete a session directory
1245
- to forget that conversation.
1198
+ State lives under the project state directory (override with
1199
+ `--state-root`). Forget a conversation by removing that session from
1200
+ state.
1246
1201
 
1247
- Session workspaces are real Cursor project directories, so the harness also
1248
- loads ambient project config from ancestor directories (nested
1249
- `AGENTS.md` / `.cursor` rules and skills). Nested git checkouts default
1250
- `local.cwd` to `~/.cache/agent-serve/<dir>`. Point `cwd` at a checkout only
1251
- when the agent should inherit that tree.
1202
+ Session workspaces are real Cursor project directories, so the harness
1203
+ also loads ambient project config from ancestor directories. Nested git
1204
+ checkouts default `local.cwd` to a per-project cache directory under
1205
+ `~/.cache`. Point `cwd` at a checkout only when the agent should inherit
1206
+ that tree.
1252
1207
 
1253
1208
  ## Not supported (yet)
1254
1209