@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
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: "HTTP API"
3
- description: "Every route the server mounts: sessions, approvals, deterministic tool calls, discovery, the MCP endpoint, and dev-mode dispatch."
3
+ description: "Public session, discovery, and channel routes callers use."
4
4
  ---
5
5
 
6
6
  # HTTP API reference
7
7
 
8
- Every Agent SDK host speaks the same stable HTTP API. In the default
8
+ Agent SDK hosts expose the same public HTTP surface. In the default
9
9
  multi-agent layout each agent is namespaced under its slug
10
10
  (`/<slug>/v1/session`, `/<slug>/playground`), with host-level routes at
11
11
  the root. With `--mode single`, one agent serves the same surface
@@ -30,8 +30,7 @@ both layouts and removed by `--no-docs`.
30
30
  | `GET /` | A web index of every mounted agent, linking to playgrounds (playground only) |
31
31
  | `GET /v1/agents` | The JSON index of mounted agents (playground only, no auth) |
32
32
  | `GET /docs`, `GET /docs/*` | This documentation, served as a static site (both layouts, no auth) |
33
- | `GET /v1/health` | Host-level liveness, no auth; made for ALB/ECS checks |
34
- | `POST /v1/webhooks/github` | Loopback-only trigger endpoint that fans a GitHub-shaped payload out to every mounted GitHub channel (used by local tooling) |
33
+ | `GET /v1/health` | Host-level liveness, no auth |
35
34
 
36
35
  ## Start a session
37
36
 
@@ -139,17 +138,24 @@ while a turn runs). Agent-execution tools are rejected with `400`, and
139
138
  unknown tools with `404` and the list of available names. For the
140
139
  semantics, see [Tools](./tools.md#call-a-tool-without-a-model-turn).
141
140
 
142
- ## Discovery and meta
141
+ An optional `"continuationToken"` (`<channelId>:<key>`, as
142
+ `/v1/sessions` lists it; mutually exclusive with `sessionId`) addresses
143
+ the session by continuation token instead; malformed tokens are
144
+ rejected with `400 invalid_continuation_token`. For the semantics, see
145
+ [Tools](./tools.md#call-a-tool-without-a-model-turn).
143
146
 
144
- Five read-only routes describe the running agent.
147
+ ## Discovery
148
+
149
+ These read-only routes describe the running agent.
145
150
 
146
151
  | Route | What it does |
147
152
  | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
- | `GET /v1/info` | The manifest snapshot: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics. Always the bare project-info object; `agent-sdk info --json` wraps the same data per slug in `{ agents: [...] }` |
153
+ | `GET /v1/info` | The discovered surface: model, tools, skills, MCP connections, subagents, channels and routes (with schemas), schedules, hooks, A/B experiments, diagnostics |
154
+ | `GET /v1/tools` | The live tool catalog: authored server tools plus advertised MCP passthroughs under model-facing names, as light `{ name, title?, source? }` entries. `session` / `continuationToken` query parameters bind the listing to a session identity (advertised inventories can be tenant-scoped); a connection whose listing fails is skipped and reported in `connectionErrors` |
155
+ | `GET /v1/tools/:name` | One catalog tool's full description: description, execution, `needsApproval`, `effect`, input and output schemas, source connection. Same session binding as the listing; unknown names get `404` with the available names |
149
156
  | `GET /v1/health` | Per-agent liveness, no auth |
150
- | `GET /v1/meta` | SPA bootstrap: agent name, dev flag, base path (no auth) |
151
- | `GET /v1/logs?after=N` | Recent server log lines from the ring buffer, with a polling cursor |
152
- | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals folded from durable event streams (`config` reports `maxPlaygroundSessions` / `durableSamples` / `durableSnapshots` from `agent/ab.config.ts`) |
157
+ | `GET /v1/logs?after=N` | Recent server log lines, with a polling cursor |
158
+ | `GET /v1/abs` | [Live A/B metrics](../ab.md): per-session assignments and aggregate arm totals |
153
159
 
154
160
  ## Artifacts
155
161
 
@@ -191,20 +197,14 @@ it through the URL configured by `serve --cloud-tools-url`. Unlike
191
197
  `/v1/mcp`, it runs the CLI-level auth chain (loopback, bearer, or
192
198
  anonymous), not any authored channel auth.
193
199
 
194
- `POST /v1/cursor-account/:connection/mcp` is the bridge for
195
- `defineConnection({ cursorAccount: true })` connections. The runtime
196
- calls it with a per-boot bearer secret; it never joins the public auth
197
- chain, and an unknown connection name returns `404`.
198
-
199
200
  ## Playground eval routes
200
201
 
201
- Always registered (including production / non-`--dev` serves). The playground
202
- Evals tab uses these:
202
+ The playground Evals tab and `agent-sdk eval --prod` / `--url` use these:
203
203
 
204
204
  | Route | What it does |
205
205
  | ------------------------------- | ---------------------------------------------------------------------------------------------------------- |
206
- | `GET /v1/dev/evals` | List discovered eval datapoints and project config as `{ evals, config }` (`config` includes `maxPlaygroundRuns`, `durableRuns`) |
207
- | `GET /v1/dev/evals/runs` | List recent run snapshots (newest first) as `{ runs, activeRunId? }` for playground rehydrate |
206
+ | `GET /v1/dev/evals` | List discovered eval datapoints and project config |
207
+ | `GET /v1/dev/evals/runs` | List recent run snapshots, newest first |
208
208
  | `POST /v1/dev/evals/runs` | Start an eval run (`{filterIds?, tags?}`); `202` with a snapshot (`runId` is the Eval ID), `404` when nothing matches, `409` when one is running |
209
209
  | `GET /v1/dev/evals/runs/:runId` | Poll a run's progress |
210
210
  | `POST /v1/dev/evals/runs/:runId/cancel` | Cancel a running batch; `200` with snapshot, `404` unknown, `409` when not running |
@@ -213,10 +213,9 @@ Eval runs are asynchronous. Poll the run route for case progress and
213
213
  the final `completed` or `failed` status. Batch errors appear on the
214
214
  snapshot returned by the poll. Entries within `filterIds` and `tags`
215
215
  use OR semantics. When both fields are present, a case must match one
216
- entry from each field. Listed runs persist across restarts whenever
217
- `agent/storage.ts` provides an `evals` table or a KV core with `delete`
218
- and `list` (the table is derived — see [Storage](../storage.md));
219
- otherwise they are process-memory only (capped by `maxPlaygroundRuns`).
216
+ entry from each field. Listed runs persist across restarts when storage is configured; see
217
+ [Storage](../storage.md#eval-and-a-b-tables). Otherwise they are
218
+ process-memory only.
220
219
 
221
220
  ## Dev-mode routes
222
221
 
@@ -224,29 +223,18 @@ These routes exist only under `serve --dev`.
224
223
 
225
224
  | Route | What it does |
226
225
  | ------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
227
- | `POST /v1/dev/schedules/:scheduleId` | Dispatch a schedule by hand, exactly once, through the production path. Returns `{scheduleId, sessionIds}` |
226
+ | `POST /v1/dev/schedules/:scheduleId` | Dispatch a schedule by hand, exactly once. Returns `{scheduleId, sessionIds}` |
228
227
  | `GET /v1/dev/reminders` | List reminders |
229
228
  | `POST /v1/dev/reminders/:reminderId` | Fire a reminder by hand |
230
229
 
231
230
  Schedules and reminders never fire automatically in dev mode. These
232
231
  routes are the only way they run, which keeps iteration deterministic.
233
232
 
234
- ## Platform timer routes
235
-
236
- `POST /v1/internal/schedules/:scheduleId/fire` and
237
- `POST /v1/internal/reminders/:reminderId/fire` exist only under
238
- `serve --no-control-plane`, where the host runs no schedule or reminder
239
- clocks of its own. Cursor hosting starts engines this way and fires
240
- timed work through them. They admit only requests carrying the
241
- platform's `x-agent-serve-timed-work` marker, which the alias proxy
242
- strips from external traffic, so webhook and playground callers can
243
- never reach them.
244
-
245
233
  ## Playground assets
246
234
 
247
- `GET /playground` and `GET /playground/assets/:file` serve the static
248
- SPA bundle (omitted with `--no-playground`). The playground calls the
249
- JSON API above and has no privileged surface.
235
+ `GET /playground` and `GET /playground/assets/:file` serve the
236
+ playground (omitted with `--no-playground`). It calls the JSON API
237
+ above and has no privileged surface.
250
238
 
251
239
  ## Status codes
252
240
 
@@ -40,7 +40,7 @@ may also load ambient `AGENTS.md` and `.cursor` config from ancestor
40
40
  directories. [Agent config → Local cwd](./agent-config.md#local-cwd)
41
41
  covers controlling that.
42
42
 
43
- ## Best Practices
43
+ ## What to put in instructions
44
44
 
45
45
  Keep them a few lines: identity, when to use which tool, output shape.
46
46
  The [quickstart PR approver](../quickstart.md) is the pattern:
@@ -7,40 +7,35 @@ description: "The built-in web UI: chat with streaming, Try buttons and slash co
7
7
 
8
8
  Every served agent ships with a web playground at
9
9
  `http://127.0.0.1:3000/<slug>/playground` (or `/playground` in single
10
- mode): a static SPA over the same public HTTP API, made for manual
11
- testing, demos, and reading sessions. Every call it makes runs the
12
- normal route auth chain, so anything you can do in the playground you
13
- can also do with curl.
10
+ mode). Anything you can do there you can also do with curl.
14
11
 
15
12
  ## What it does
16
13
 
17
- The playground covers the whole manual-testing loop.
14
+ Use the playground to chat, try channel routes, and inspect sessions.
18
15
 
19
- - **Chat** with the agent. Text and reasoning stream live, rendered as
20
- markdown with syntax highlighting, and tool calls appear inline with
21
- their arguments, output, and error state as the `actions.requested` /
22
- `action.result` events arrive.
16
+ - **Chat** with the agent. Text and reasoning stream live, and tool
17
+ calls appear inline with their arguments, output, and error state.
23
18
  - **Slash commands**: custom channel routes become composer commands
24
- (a `drive` route becomes `/drive <pr-url>`), derived from the schemas
25
- on `GET /v1/info`, with `/help` and autocomplete.
19
+ (a `drive` route becomes `/drive <pr-url>`), with `/help` and
20
+ autocomplete.
26
21
  - **Try** any channel route from the Agent surface. The modal remembers
27
22
  your last body per endpoint and has Copy curl, and a successful Try
28
23
  opens the created session.
29
- - **Sessions**: browse every session (chat, custom-channel, schedule
30
- tasks) and replay their durable event streams. Search by session ID
31
- to filter the list, or press Enter to open an ID directly. "Open
32
- trace" renders any `events.ndjson` file.
24
+ - **Sessions**: browse the sessions you own (chat, custom-channel,
25
+ schedule tasks) and replay their event streams. In `--dev` on
26
+ loopback, or with `--allow-anonymous`, the list includes every
27
+ principal. Search by session ID to filter the list, or press Enter
28
+ to open an ID directly. "Open trace" renders a saved event stream.
33
29
  - **Approvals**: parked `needsApproval` tool calls render Approve /
34
30
  Deny buttons.
35
31
  - **Evals**: list and run filesystem evals from the browser (backed by
36
32
  `/v1/dev/evals`). Schedule hand-dispatch still requires `--dev`.
37
33
  - **The surface**: inspect the discovered tools, skills, subagents, MCP
38
34
  connections, channels, and hooks.
39
- - **Raw NDJSON pane**: flip it on to see the exact wire events.
35
+ - **Raw events pane**: flip it on to inspect the event stream.
40
36
  - **Logs tab**: recent server log lines, polled from `GET /v1/logs`.
41
37
  - **A/Bs tab**: per-session and aggregate
42
- [live A/B metrics](../ab.md) from `GET /v1/abs` (folds durable
43
- `ab.assigned` plus turn and tool events; no separate store).
38
+ [live A/B metrics](../ab.md) from `GET /v1/abs`.
44
39
 
45
40
  In multi-agent mode each agent has its own playground at
46
41
  `/<slug>/playground`, and `/` is an index of them all.
@@ -59,7 +54,7 @@ demo-only alternative for trusted networks.
59
54
 
60
55
  Continue with these pages:
61
56
 
62
- - [HTTP API](./http-api.md): everything the playground calls
57
+ - [HTTP API](./http-api.md): the HTTP surface the playground uses
63
58
  - [Sessions and streaming](./sessions.md): the streams it renders
64
59
  - [Human-in-the-loop](../guides/human-in-the-loop.md): the approval
65
60
  buttons in context
@@ -17,7 +17,8 @@ experiments can override their file-derived name.
17
17
  | Path | Resolves to |
18
18
  | --- | --- |
19
19
  | `agent/tools/approve_pr.ts` | tool `approve_pr` |
20
- | `agent/mcp-connections/linear.ts` | MCP connection `linear` |
20
+ | `agent/mcp-connections/linear.ts` | MCP connection `linear` (model + host) |
21
+ | `agent/host-connections/anytool.ts` | Host MCP connection `anytool` (host + `mcp oauth` only) |
21
22
  | `agent/skills/pr-review.md` | skill `pr-review` |
22
23
  | `agent/subagents/reviewer/` | subagent `reviewer` |
23
24
  | `agent/channels/drive.ts` | channel `drive`, routes under `/v1/channels/drive` |
@@ -45,6 +46,8 @@ my-agent/
45
46
  │ │ └── pr-review.md # on-demand procedures (SKILL.md convention)
46
47
  │ ├── mcp-connections/
47
48
  │ │ └── linear.ts # tools from external MCP servers
49
+ │ ├── host-connections/
50
+ │ │ └── anytool.ts # privileged MCP, host tools only
48
51
  │ └── channels/
49
52
  │ └── github.ts # messages and external events
50
53
  └── evals/
@@ -66,6 +69,7 @@ Each path maps to a capability and a reference page.
66
69
  | `agent/tools/<name>.ts` | One typed tool; filename = tool name. `execution: "server"` (in-process, default) or `"agent"` (a script that runs where the agent runs) | [Tools](./tools.md) |
67
70
  | `agent/skills/*` | SKILL.md-convention procedures, loaded on demand | [Skills](./skills.md) |
68
71
  | `agent/mcp-connections/<name>.ts` | MCP servers, available to the model, to server tools (`ctx.host.mcp`), and to channel/schedule handlers (`args.host.mcp`) | [MCP connections](./connections.md) |
72
+ | `agent/host-connections/<name>.ts` | Privileged MCP servers for `ctx.host.mcp` and `mcp oauth`. The model never sees them. | [MCP connections](./connections.md) |
69
73
  | `agent/subagents/<id>/` | Child agent directory; `description` required | [Subagents](./subagents.md) |
70
74
  | `agent/channels/*.ts` | HTTP surfaces beyond the built-in session API; `slack.ts` and `github.ts` use the platform packs | [Channels](./channels.md) |
71
75
  | `agent/hooks/*.ts` | Observe-only event subscribers, never fatal | [Hooks](./hooks.md) |
@@ -76,7 +80,7 @@ Each path maps to a capability and a reference page.
76
80
  | `agent/artifacts.ts` | `defineArtifacts` kinds, the `tag_artifact` opt-in, and retention | [Artifacts](./artifacts.md) |
77
81
  | `agent/schedules/*` | Cron-driven runs (UTC, 5-field; never auto-fire under `--dev`) | [Schedules](./schedules.md) |
78
82
  | `agent/sandbox/workspace/**` | Seed files copied into each local session workspace | [Sessions](./sessions.md#what-goes-into-a-local-session-workspace) |
79
- | `agent/playground/` | Custom playground tool chips for the Vite dev playground | [Playground](./playground.md) |
83
+ | `agent/playground/` | Custom playground tool chips | [Playground](./playground.md) |
80
84
  | `agent/lib/` | Import-only shared code, never discovered | None |
81
85
  | `evals/evals.config.ts` | Shared eval settings (e.g. `maxConcurrency`); required when evals exist | [Evals](../evals.md) |
82
86
  | `evals/**/*.eval.ts` | Filesystem evals; case id = path under `evals/` | [Evals](../evals.md) |
@@ -98,7 +102,7 @@ or has the wrong extension.
98
102
  ```bash
99
103
  agent-sdk validate --dir . # diagnostics; non-zero exit on errors
100
104
  agent-sdk info --dir . # human-readable surface
101
- agent-sdk info --dir . --json # machine-readable manifest (same shape as GET /v1/info)
105
+ agent-sdk info --dir . --json # machine-readable project info (same shape as GET /v1/info)
102
106
  ```
103
107
 
104
108
  ## What's next
@@ -35,7 +35,7 @@ those lines the same indent as the `prompt` body so dedent stays consistent.
35
35
 
36
36
  ## `prompt.lines\`…\``
37
37
 
38
- Same dedent rules, but returns `string[]` one entry per line. Use this
38
+ Same dedent rules, but returns `string[]`, one entry per line. Use this
39
39
  where an API wants separate lines (for example GitHub channel `context`):
40
40
 
41
41
  ```ts
@@ -182,8 +182,7 @@ in-memory, so after a restart those reminders are disarmed
182
182
  (`handler_lost_on_restart`); re-arm them from the code path that created
183
183
  them, or prefer the prompt form.
184
184
 
185
- Dev mode matches schedules. Auto-timers follow `ServeOptions.reminders`
186
- (default `!dev`), so in `--dev` fire by hand:
185
+ `--dev` does not auto-fire reminders. Dispatch one by hand:
187
186
 
188
187
  ```bash
189
188
  curl http://127.0.0.1:3000/<slug>/v1/dev/reminders # list
@@ -79,7 +79,7 @@ within one session. The `at` field is an ISO-8601 timestamp.
79
79
  | Phase | Events | What they tell you |
80
80
  | --- | --- | --- |
81
81
  | Session | `session.started`, [`ab.assigned`](../ab.md#assign-sticky-variants), `session.waiting`, `session.completed`, `session.failed` | Session creation, A/B enrollment, readiness, and task completion |
82
- | Agent | `agent.bound` | Cursor SDK agent ID and cloud conversation URL |
82
+ | Agent | `agent.bound` | Cloud conversation URL |
83
83
  | Input | `message.received` | A user message was accepted |
84
84
  | Turn | `turn.queued`, `turn.started`, `turn.completed`, `turn.failed` | Queue position under a [`maxRunningTurns` cap](./agent-config.md#concurrency), then turn status, final result, and token usage |
85
85
  | Steps | `step.started`, `step.completed` | Model step boundaries and duration |
@@ -118,7 +118,7 @@ The Agent SDK creates a workspace before the first local turn:
118
118
  | ---------------------------------- | ----------------------------------------------------------------------- |
119
119
  | `instructions.*` | `AGENTS.md` |
120
120
  | `skills/*` | `.cursor/skills/<name>/SKILL.md` |
121
- | agent tools (`execution: "agent"`) | scripts under `.agent-serve/tools/`, with a catalog in `AGENTS.md` |
121
+ | agent tools (`execution: "agent"`) | scripts in the session workspace, with a catalog in `AGENTS.md` |
122
122
  | `sandbox/workspace/**` | copied in as seed files |
123
123
  | per-send `workspaceFiles` | written before the turn |
124
124
 
@@ -133,34 +133,23 @@ inheritance rules.
133
133
 
134
134
  ## Where does the Agent SDK store session data?
135
135
 
136
- Local state uses one directory tree:
137
-
138
- ```text
139
- <project>/.agent-serve/ # or <stateRoot>/<slug>/ under serve
140
- sessions/<id>/session.json # metadata: channel, mode, principal, tokens
141
- sessions/<id>/events.ndjson # the durable stream
142
- sessions/<id>/workspace/ # the harness cwd
143
- traces/<sessionId>.ndjson # written by `run`
144
- runner/ # Cursor SDK conversation store
145
- tool-calls/<callId>/ # ephemeral deterministic-call workspaces
146
- ```
136
+ Local state lives under `--state-root`. Slugged mounts store it under
137
+ a subdirectory named for the slug.
147
138
 
148
139
  Deleting a session directory removes the session from the server: it
149
140
  disappears from listings and can no longer be streamed or continued.
150
- The `runner/` store keeps its own conversation copy until you remove it.
151
141
  Cloud conversations remain on the Cursor backend.
152
142
 
153
- Change the root with `--state-root` or `stateRoot`. Nested git checkouts
154
- already default `local.cwd` outside the enclosing repo. See
143
+ Nested git checkouts already default `local.cwd` outside the enclosing
144
+ repo. See
155
145
  [local session workspaces](../concepts.md#what-files-can-a-local-session-access).
156
146
 
157
147
  ## How do I inspect a saved event stream?
158
148
 
159
- Use `trajectory` with a trace or session event file:
149
+ Use `trajectory` with a saved trace:
160
150
 
161
151
  ```bash
162
- agent-sdk trajectory --events .agent-serve/traces/<sessionId>.ndjson
163
- agent-sdk trajectory --events <stateRoot>/<slug>/sessions/<id>/events.ndjson
152
+ agent-sdk trajectory --events <state-root>/traces/<sessionId>.ndjson
164
153
  ```
165
154
 
166
155
  The command prints tool calls, the reply, and token usage in the same
@@ -57,9 +57,9 @@ the engine copies the same SKILL.md tree onto an Agent Store for native
57
57
  discovery:
58
58
 
59
59
  - Hosted deployments write store-root `skills/<name>/`.
60
- - `agent-serve serve` / `run` with a personal `CURSOR_API_KEY` write
61
- `agent-serve/<agent>/skills/<name>/` on the USER store, namespaced so
62
- they cannot collide with the user's own skills.
60
+ - `agent-sdk serve` / `run` with a personal `CURSOR_API_KEY` write
61
+ namespaced skills on the USER store so they cannot collide with the
62
+ user's own skills.
63
63
 
64
64
  `validate` still warns about the combination so the store path is
65
65
  visible. Cloud turns with neither a hosted store nor an API key see
@@ -41,8 +41,8 @@ different one.
41
41
  Subagents inherit the parent's execution surface. Every per-subagent
42
42
  capability directory is reported as a warning and ignored: `tools/`,
43
43
  `skills/`, `mcp-connections/` (and the legacy `connections/` alias),
44
- `channels/`, `schedules/`, `hooks/`, `sandbox/`, and nested
45
- `subagents/`.
44
+ `host-connections/`, `channels/`, `schedules/`, `hooks/`, `sandbox/`,
45
+ and nested `subagents/`.
46
46
 
47
47
  Delegation needs both halves: the description makes it possible, and the
48
48
  parent's [instructions](./instructions.md) make it happen. "When a
@@ -64,7 +64,7 @@ export default defineTool({
64
64
  });
65
65
  ```
66
66
 
67
- ### The `ctx` parameter
67
+ ### Tool context
68
68
 
69
69
  `execute` receives a `ctx` with the runtime accessors:
70
70
 
@@ -76,7 +76,7 @@ export default defineTool({
76
76
  | `ctx.stateRoot` | The agent's durable state root, shared across every session |
77
77
  | `ctx.host` | Shared host services (see below) |
78
78
  | `ctx.send(channelId, message, options?)` | Start or resume a session on any channel: the cross-channel handoff primitive, e.g. a chat tool opening a `drive` cloud session for a PR. `auth` defaults to this call's session principal |
79
- | `ctx.getSession(channelId, sessionId)` | Look up a session on a channel, e.g. refresh `sdkAgentId` after a turn |
79
+ | `ctx.getSession(channelId, sessionId)` | Look up a session on a channel |
80
80
  | `ctx.artifacts` | Session-bound [artifacts](./artifacts.md) facade: `tag` auto-fills the session |
81
81
 
82
82
  `ctx.host` carries the shared host services: `host.mcp` (authored MCP
@@ -84,9 +84,7 @@ connections: `names()`, `listTools(name)`, `callTool(name, tool, args)`),
84
84
  `host.github` and `host.slack` (shared platform clients), `host.kv` and
85
85
  `host.files` (durable [storage](../storage.md)), `host.otel` (custom
86
86
  metrics and session tags; see [OpenTelemetry](../guides/opentelemetry.md)),
87
- `host.reminders` (per-session wakes, when attached), `host.evals`
88
- (playground eval batches, when attached), and `host.slackNudges`
89
- (Slack ask-dedupe helpers).
87
+ `host.reminders` (per-session wakes, when attached).
90
88
 
91
89
  ### Return values
92
90
 
@@ -174,23 +172,24 @@ printf '%s\\n' "$message"
174
172
  });
175
173
  ```
176
174
 
177
- On the local runtime, scripts land under `.agent-serve/tools/` in the
178
- session workspace with a catalog in `AGENTS.md`. On cloud, the catalog
179
- and script bodies travel on the first prompt.
175
+ On the local runtime, scripts land in the session workspace with a
176
+ catalog in `AGENTS.md`. On cloud, the catalog and script bodies travel
177
+ on the first prompt.
180
178
 
181
179
  ## Tools from an MCP connection, advertised by name
182
180
 
183
181
  Authored `agent/tools/` files are one catalog for every session. When
184
- the tools should come from an MCP server including per-tenant toolsets
185
- resolved at runtime declare the connection with
182
+ the tools should come from an MCP server, including per-tenant toolsets
183
+ resolved at runtime, declare the connection with
186
184
  `advertiseTools: true` (plus per-session `auth` when the credential
187
185
  depends on who the session is for) and the engine synthesizes named 1:1
188
186
  passthrough server tools from the connection's live `listTools` on every
189
187
  local turn. See
190
188
  [MCP Connections](connections.md#advertise-tools).
191
189
  Advertised tools ride the same execution path as authored server tools,
192
- but cannot be invoked via
193
- [direct tool calls](#call-a-tool-without-a-model-turn).
190
+ and [direct tool calls](#call-a-tool-without-a-model-turn) address them
191
+ by the same model-facing names: the call's session identity resolves the
192
+ advertised listing when the authored lookup misses.
194
193
 
195
194
  ## Gate a tool on human approval
196
195
 
@@ -259,15 +258,27 @@ const outcome = await handle.callTool("inspect_pr", {
259
258
  // { toolName, callId, isError, result, durationMs }
260
259
  ```
261
260
 
262
- By default the call runs against an ephemeral scratch workspace under
263
- `<stateRoot>/tool-calls/<callId>`, materialized like a session workspace
264
- and removed when the call returns. Pass a `sessionId` (a body field over
261
+ By default the call runs against an ephemeral workspace and is removed
262
+ when the call returns. Pass a `sessionId` (a body field over
265
263
  HTTP, `--session` on the CLI, `options.sessionId` programmatically) to
266
264
  run inside an existing session instead: the tool sees that session's
267
- workspace, and the call is recorded on the session's event stream under
268
- a per-call `turnId`, visible in the playground and trajectories like
269
- any model-initiated call. Session-bound calls serialize with model
270
- turns and return `409 session_busy` while a turn runs.
265
+ workspace, and the call is recorded on the session's event stream.
266
+ Session-bound calls return `409 session_busy` while a turn runs. When the
267
+ session's harness cwd cannot be materialized, a read-effect call runs
268
+ in a scratch workspace instead and the outcome carries
269
+ `scratchWorkspace: true`; a write-effect call fails with
270
+ `workspace_unavailable`.
271
+
272
+ A session can also be addressed by its continuation token: an optional
273
+ `continuationToken` (`<channelId>:<key>`, as `/v1/sessions` lists it;
274
+ mutually exclusive with `sessionId`). A token that maps to a live
275
+ session behaves exactly like passing that session's id — same ownership
276
+ check, same `409 session_busy`, same event recording. A token with no
277
+ session behind it runs the call scratch-bound with the token's channel
278
+ id and continuation key as the call's session identity, so a deployment
279
+ whose tools resolve state from the continuation key can serve it with
280
+ no live session. Malformed tokens are rejected with
281
+ `400 invalid_continuation_token`.
271
282
 
272
283
  The error semantics match the model path. Unknown tools are rejected
273
284
  with the available names, agent-execution tools cannot be called on the
@@ -22,12 +22,11 @@ Where to find the file depends on how you got the package:
22
22
  injects the skill body into context instead of waiting for the
23
23
  model to pick it from the catalog. The `/` menu lists them as
24
24
  `/agentsdk-create-agent`, `/agentsdk-hillclimb`, and the rest. Re-installing overwrites those
25
- copies with the package version. Set
26
- `CURSOR_JULY_SKIP_SKILL_INSTALL=1` to skip the copy.
25
+ copies with the package version.
27
26
  - Installed `@cursor/july` as a dependency? The skill also ships inside
28
27
  the package at `node_modules/@cursor/july/skills/create-agent/SKILL.md`.
29
- - Working in the monorepo? It's at
30
- `packages/agent-serve/skills/create-agent/SKILL.md`. Run
28
+ - Working from this package's source? The skill is at
29
+ [`skills/create-agent/SKILL.md`](../skills/create-agent/SKILL.md). Run
31
30
  `agent-sdk install-skills` if you want the same copies in
32
31
  `~/.cursor/skills/agentsdk/` (the package postinstall skips the
33
32
  source checkout).
@@ -127,7 +126,7 @@ inputs again, and adds an eval for each improvement you keep.
127
126
 
128
127
  ## Related
129
128
 
130
- - [Build your first PR approver](./quickstart.md)
129
+ - [Build your first PR reviewer](./quickstart.md)
131
130
  - [Convert a Cursor Automation](./guides/convert-automation.md)
132
131
  - [Building agents with agents](./building-with-agents.md)
133
132
  - [Evals](./evals.md)