@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
package/docs/evals.md CHANGED
@@ -16,12 +16,6 @@ targets) a real agent server, drives sessions over the public API, and
16
16
  grades what comes back. A passing eval means the agent started,
17
17
  accepted a message, and did what you asserted.
18
18
 
19
- > [!NOTE]
20
- > Import paths here use `@cursor/july/evals`. On projects still
21
- > using `@anysphere/agent-serve`, swap the import and run
22
- > `agent-serve eval`. See
23
- > [Run the CLI](/#run-the-cli) for the full rename table.
24
-
25
19
  ## Define evals with `defineEval`
26
20
 
27
21
  The Agent SDK discovers evals under the project-root `evals/` directory,
@@ -125,7 +119,7 @@ export default defineEvalConfig({
125
119
  // timeoutMs: 180_000, // optional project-wide default
126
120
  // judge: { model: "..." }, // default judge model for t.judge.*
127
121
  // reporters: [], // destinations that observe every case
128
- // maxPlaygroundRuns: 50, // playground /v1/dev/evals history only (default 20)
122
+ // maxPlaygroundRuns: 50, // playground history only (default 20)
129
123
  });
130
124
  ```
131
125
 
@@ -139,7 +133,7 @@ The optional fields:
139
133
  | `timeoutMs` | `180_000` | Project-wide per-case timeout |
140
134
  | `judge` | unset | Default judge model for `t.judge.*`; see [Judge free-form output](#judge-free-form-output) |
141
135
  | `reporters` | unset | Destinations that observe every case; `--skip-report` suppresses them |
142
- | `maxPlaygroundRuns` | `20` | Max batches in the playground / `/v1/dev/evals*` history (not CLI `eval`) |
136
+ | `maxPlaygroundRuns` | `20` | Max batches in the playground / `/v1/dev/evals*` history (not CLI `eval`). Hard-capped at 500. |
143
137
 
144
138
  Reporters come from `@cursor/july/evals/reporters`: `JUnit` writes a
145
139
  JUnit XML file for CI, `Artifacts` writes per-case files, and
@@ -151,7 +145,7 @@ Playground batches survive restarts whenever `agent/storage.ts` exists
151
145
  with an `evals` table or a KV core providing `delete` and `list` (the
152
146
  table is derived over the core); see
153
147
  [Storage](./storage.md#eval-and-a-b-tables). Without storage they live
154
- in process memory and disappear when `serve` exits navigating away
148
+ in process memory and disappear when `serve` exits. Navigating away
155
149
  and back still works while the process is up.
156
150
 
157
151
  ## Drive and assert with `t`
@@ -171,9 +165,9 @@ intermediate turn before the next send overwrites `t.reply`.
171
165
  depend on it.
172
166
 
173
167
  Read the full case state with `t.reply` (the last assistant text),
174
- `t.events` (every captured session event across turns), `t.turns`
175
- (settled turns, oldest first), and `t.sessionId`. `t.signal` aborts
176
- when the case hits its timeout; pass it to your own async work.
168
+ `t.events` (session events captured so far), `t.turns` (settled
169
+ turns, oldest first), and `t.sessionId`. `t.signal` aborts when the
170
+ case hits its timeout; pass it to your own async work.
177
171
 
178
172
  Assert with the gates:
179
173
 
@@ -229,10 +223,10 @@ the CLI and playground result.
229
223
 
230
224
  Three `t.send` options apply on session create (first `t.send` only):
231
225
 
232
- - `workspaceFiles` `{ path: contents }`, seeded into the local session
226
+ - `workspaceFiles`: `{ path: contents }`, seeded into the local session
233
227
  workspace. Prefer this over machine-local paths.
234
- - `workspaceDir` absolute harness cwd (local runtime).
235
- - `cloud` per-session cloud options merged over the agent's static
228
+ - `workspaceDir`: absolute harness cwd (local runtime).
229
+ - `cloud`: per-session cloud options merged over the agent's static
236
230
  `cloud` config (repos / env / …). Use a pinned `repos` override to
237
231
  attach a fixture repo for cloud evals without putting it on the
238
232
  agent's default `cloud.repos`. Cloud ignores `workspaceFiles` seeds.
@@ -294,7 +288,7 @@ match both groups.
294
288
 
295
289
  `eval` boots an ephemeral server on port 0 with a temp state root
296
290
  outside the project, so cases don't inherit ambient monorepo rules and
297
- don't pollute `.agent-serve/`. Point `--url` at a running server to eval
291
+ don't write into the project state directory. Point `--url` at a running server to eval
298
292
  a live agent instead:
299
293
 
300
294
  ```bash
@@ -348,29 +342,18 @@ failed assertion without parsing terminal text.
348
342
 
349
343
  ## Run evals in the playground
350
344
 
351
- Start the server with `--dev`, open the playground, and choose
352
- **Evals**. You can run every case or one case, watch progress, and open
353
- the resulting session trace.
345
+ Start the server, open the playground, and choose **Evals**. You can run
346
+ every case or one case, watch progress, and open the resulting session
347
+ trace. The Evals tab works on a normal `serve`.
354
348
 
355
349
  ```bash
356
- agent-sdk serve --dir . --dev
350
+ agent-sdk serve --dir .
357
351
  ```
358
352
 
359
353
  Playground runs target the live server instead of an ephemeral one.
360
354
  Their sessions appear in the session list. One eval batch can run at a
361
- time. Batches persist across restarts whenever `agent/storage.ts`
362
- provides an `evals` table or a KV core with `delete` and `list` (the
363
- table is derived over the core); without storage they are **in-memory
364
- only** (capped by `maxPlaygroundRuns`) — see
365
- [Storage](./storage.md#eval-and-a-b-tables).
366
-
367
- The UI uses the playground eval routes (available without `--dev`):
368
- `GET /v1/dev/evals` lists datapoints and config (includes `maxPlaygroundRuns` /
369
- `durableRuns`),
370
- `GET /v1/dev/evals/runs` rehydrates recent batches after navigation,
371
- `POST /v1/dev/evals/runs` starts a batch (returns an **Eval ID** / `runId`),
372
- `GET /v1/dev/evals/runs/:runId` polls it, and
373
- `POST /v1/dev/evals/runs/:runId/cancel` cancels a running batch. See
355
+ time. Persistence follows the rule under
356
+ [Configure eval runs](#configure-eval-runs). See
374
357
  [Playground eval routes](./reference/http-api.md#playground-eval-routes).
375
358
  The start request returns `202` while cases run in the background.
376
359
  Poll until the snapshot status becomes `completed`, `failed`, or `cancelled`.
@@ -389,10 +372,6 @@ agent-sdk eval cancel evalrun_… --prod --slug vulnerability-scanner
389
372
  agent-sdk eval status evalrun_… --prod --slug vulnerability-scanner
390
373
  ```
391
374
 
392
- The Evals tab prefers the server’s in-flight batch (`activeRunId`) over a
393
- stale tab-local remembered id, so CLI / Slack kicks show up without an
394
- incognito window.
395
-
396
375
  ## What good cases assert
397
376
 
398
377
  Gate decisions and shape, not prose. Model wording varies run to run.
@@ -14,7 +14,7 @@ same. A peer MCP connection makes the wiring one line.
14
14
  This guide wires a `concierge` agent that delegates weather questions
15
15
  to a `weather-agent` peer mounted on the same host.
16
16
 
17
- ## The MCP endpoint
17
+ ## MCP endpoint
18
18
 
19
19
  Each agent serves the Model Context Protocol over streamable HTTP at
20
20
  `/<slug>/v1/mcp` (or `/v1/mcp` in single mode). The surface is stateless
@@ -104,8 +104,8 @@ Peer MCP connections are ordinary MCP connections, so deterministic host code
104
104
  can use them too. A channel handler or server tool can call
105
105
  `host.mcp.callTool("weather", "ask", { message: "…" })` without any
106
106
  model turn deciding to. See
107
- [MCP connections](../reference/connections.md#every-mcp-connection-is-available-in-three-places)
108
- for the three places every MCP connection is available.
107
+ [MCP connections](../reference/connections.md#every-model-visible-mcp-connection-is-available-in-three-places)
108
+ for the three places every model-visible MCP connection is available.
109
109
 
110
110
  ## What's next
111
111
 
@@ -64,34 +64,22 @@ mapping shifts:
64
64
  | `instructions.*` | `AGENTS.md` in the session workspace | prepended to the first prompt |
65
65
  | Server tools (`execution: "server"`) | in-process SDK custom tools | authenticated HTTP MCP back to the AgentSDK host, when `--public-url` or `--cloud-tools-url` is set |
66
66
  | Agent tools (`execution: "agent"`) | scripts in the session workspace | catalog + script bodies on the first prompt |
67
- | `skills/*` | `.cursor/skills/` in the workspace | native discovery from the Agent Store (`skills/` on hosted deployments; `agent-serve/<agent>/skills/` on the USER store for local serve/run) |
67
+ | `skills/*` | `.cursor/skills/` in the workspace | native discovery after the first turn, from the hosted store or the signed-in account |
68
68
  | `mcp-connections/*.ts` | SDK `mcpServers` | SDK `mcpServers` (peers need `--public-url`) |
69
+ | `host-connections/*.ts` | `ctx.host.mcp` only | `ctx.host.mcp` only |
69
70
  | `sandbox/workspace/**` | seeded into the session workspace | ignored |
70
71
  | Tool approvals (`needsApproval`) | supported | not supported; keep approval-gated tools on local turns |
71
72
 
72
- Authored skills copy onto an Agent Store on the first cloud turn so the
73
- VM discovers them natively. Hosted deployments write the deployment
74
- store's `skills/` directory; local `serve`/`run` with a personal API
75
- key writes `agent-serve/<agent>/skills/` on the USER store.
76
-
77
- Hosted deployments configure the server-tool MCP URL automatically
78
- (`cloudToolsUrl`, authenticated with the resolved Cursor API key). A
79
- self-hosted public server needs `--public-url` (and `--bearer-token` when the
80
- host is not behind another trusted authentication boundary) so cloud turns
81
- can reach those tools. Without either, the server warns at startup and
82
- cloud turns omit the server tools.
73
+ Authored skills are discovered natively after the first cloud turn,
74
+ using the hosted store or the signed-in account.
83
75
 
84
76
  Approvals are a local-runtime contract. On cloud, a `needsApproval` tool
85
77
  call rides one HTTP MCP request from the VM, and a parked call would
86
78
  hold that request open until it times out; there is no durable approval
87
79
  flow for cloud turns.
88
80
 
89
- Two more behaviors are cloud-specific. Sessions persist a separate SDK
90
- agent id (`bc-…`), emitted on the stream as `agent.bound` with a URL to
91
- the cloud conversation. Cloud ids are minted during the first send. And
92
- peer MCP connections resolve to `--public-url` for cloud turns, because a VM
93
- cannot reach the host's loopback; without one, peers are omitted from
94
- cloud turns and the server warns at startup.
81
+ Peer MCP connections need `--public-url` for cloud turns. Without one,
82
+ peers are omitted and the server warns at startup.
95
83
 
96
84
  ## Hybrid: local agent, cloud sessions
97
85
 
@@ -106,12 +94,8 @@ base that per-session options merge over.
106
94
 
107
95
  These come from running a PR driver against real PR traffic:
108
96
 
109
- - One cloud agent per unit of work (per PR, say). Store the `bc-…` id
110
- keyed by the work unit (an affinity store written from an
111
- `agent.bound` hook) so webhook wakes resume the same conversation
112
- instead of booting a fresh VM per event.
113
- - Stable continuation keys (`pr:owner/repo#N`) so every wake lands on
114
- the same session within a channel.
97
+ - One cloud session per unit of work, keyed with a stable continuation
98
+ token (`pr:owner/repo#N`) so every wake lands on the same conversation.
115
99
  - Keep the host deterministic: fetch briefs and metadata on the host,
116
100
  send the VM a compact prompt, and let the VM re-read source of truth
117
101
  with its own `gh` and `git` instead of trusting payload snapshots.
@@ -131,6 +115,6 @@ driving channels directly.
131
115
  Continue with these pages:
132
116
 
133
117
  - [Agent config](../reference/agent-config.md): the `runtime` and
134
- `cloud` fields precisely
118
+ `cloud` fields
135
119
  - [GitHub guide](./github.md): the webhook patterns that pair with
136
120
  cloud triage
@@ -42,9 +42,9 @@ cd nightly-triage
42
42
  ```
43
43
 
44
44
  The command fetches the Automation before writing files. A 404 means it
45
- was not found, you do not have access, or the `agent_serve_mvp` feature
46
- gate is off for your team. A 422 means it is Cursor-managed. The command
47
- writes nothing after either error.
45
+ was not found, you do not have access, or convert is not enabled for
46
+ your team. A 422 means it is Cursor-managed. The command writes nothing
47
+ after either error.
48
48
 
49
49
  The command runs `npm install` after writing the project. If the install
50
50
  fails, the files remain. Run `npm install` in the output directory
@@ -78,7 +78,7 @@ or run lifecycle scripts from an existing `package.json`.
78
78
  | Prompt model | Pins the model on `defineAgent` in `agent/agent.ts`. `git_config` and `agent_options` remain comments. |
79
79
  | Cron trigger | Creates `agent/schedules/<slug>.ts` with `defineSchedule` in UTC. |
80
80
  | GitHub trigger | Creates `agent/channels/github.ts`. It converts pull-request action, push branch, issue action, and user allowlist filters. |
81
- | Slack trigger | Creates `agent/channels/slack.ts`. Mention-only uses `cursorAccount`; watches, reactions, and channel-created triggers use Socket Mode. Watches add `engagement.channelPosts`. |
81
+ | Slack trigger | Creates `agent/channels/slack.ts` as Socket Mode with `envPrefix` from the automation name (same names `slack create` writes). Watches add `engagement.channelPosts`. Run `agent-sdk slack create` for the bot. |
82
82
  | Linear, PagerDuty, Sentry, Teams, or generic webhook | Creates a boilerplate `agent/channels/<slug>.ts`. |
83
83
  | HTTP or SSE MCP server | Creates a name-based Cursor-account connection under `agent/mcp-connections/`. The project contains no server URL or credentials. |
84
84
  | Stdio MCP server | Writes `agent/mcp-connections/<slug>.todo.md`. |
@@ -49,8 +49,9 @@ Choose `permissions` by what the agent needs:
49
49
  `contents-write` is an explicit opt-up. `progress.commitStatus` posts a
50
50
  GitHub check run (`checks:write`). Hosted `cursorAccount` mints that
51
51
  permission on `"contents-write"` tokens. Enabling `commitStatus` opts a
52
- `"pr-write"` channel up to that tier so github-proxy can post the check.
53
- `"pr-write"` without `commitStatus` is enough for comments and banners.
52
+ `"pr-write"` channel up to that tier because it needs check-write
53
+ permission. `"pr-write"` without `commitStatus` is enough for comments
54
+ and banners.
54
55
  Prefer `"pr-write"` unless the agent must push or post a merge-box check.
55
56
 
56
57
  Set `checks: true` when channel code posts its own Checks API runs through
@@ -70,10 +71,9 @@ Repeat `--repo` for each repository. The stream and credential are
70
71
  resolved as the signed-in Cursor principal. `serve` refuses to start
71
72
  signed out.
72
73
 
73
- Offset and consumer id live under `<state-root>/cursor-events/`.
74
- `CURSOR_API_BASE_URL` overrides the backend. The stream carries event
75
- metadata, not full webhook bodies, so your agent should re-read the PR
76
- or checks from GitHub instead of trusting a snapshot in the wake.
74
+ The stream carries event metadata, not full webhook bodies, so your
75
+ agent should re-read the PR or checks from GitHub instead of trusting a
76
+ snapshot in the wake.
77
77
 
78
78
  This is the preferred production path: no public URL, no repo admin
79
79
  webhook, and no inbound network for GitHub deliveries.
@@ -111,7 +111,7 @@ things:
111
111
  | `{ task }` | Host-side work. The delivery is 202-ACKed immediately and the task runs past GitHub's ~10-second timeout. No chat session. |
112
112
  | `null` | Skip this delivery. |
113
113
 
114
- `{ auth }` may also carry `workspaceFiles` the same session seed Slack
114
+ `{ auth }` may also carry `workspaceFiles`, the same session seed Slack
115
115
  and `send()` use. Pass a function to fetch after a 202 so I/O can miss
116
116
  GitHub's ~10s window.
117
117
 
@@ -198,9 +198,7 @@ These patterns come from running a PR agent against real traffic:
198
198
  - Persist the buffer in `host.kv` before you acknowledge a wake, and
199
199
  restore it on channel start. A restart must not drop buffered wakes.
200
200
  - Key sessions with a stable continuation token (`pr:owner/repo#N`) so
201
- every wake resumes the PR's conversation. Cross-channel resume needs
202
- an affinity store mapping PR → SDK agent id; write it from an
203
- `agent.bound` hook with `ctx.host.kv`.
201
+ every wake resumes the PR's conversation.
204
202
  - Keep payload details out of wake prompts. Send a generic "re-check
205
203
  the PR" and let the agent re-read source of truth instead of trusting a
206
204
  stale snapshot.
@@ -262,24 +260,14 @@ behavior. Reactions still default on; set `reactions: false` when the
262
260
  eyes emoji is noise. Descriptions are optional; defaults derive from
263
261
  `botName` or the check `context`.
264
262
 
265
- The check run posts to `channel.state.headSha`. PR and CI wakes seed and
266
- refresh it (`refreshState` on continuation). A first wake that is only an
267
- `issue_comment` has no head SHA in the payload, so the check is skipped until
268
- a PR/CI wake stores one; the banner still posts. Review-comment wakes
269
- carry `pull_request.head.sha` when GitHub includes it.
270
-
271
- The sticky comment id and latest check-run id live on durable
272
- `GitHubChannelState` (session record). Each wake also passes `refreshState`
273
- so `headSha` / refs update on continuation without wiping those ids. A later
274
- turn on the same SHA creates a new check run — GitHub cannot reopen a
275
- completed run. Persist other derived state
276
- with `ctx.host.kv` or `ctx.host.files`. `stateRoot` resets on hosted
277
- replace.
278
-
279
- Override `events` when the mapping is custom. [Approval Buddy](../example-agents/approval-buddy.md)
280
- posts commit status from `turn.started` / `action.result` / `turn.failed`
281
- and stays never-red; that pattern still wins when you replace a default
282
- handler key. Handlers you author replace the matching defaults (same as
263
+ A comment-only first wake has no head SHA, so the check waits for a
264
+ PR or CI event. The banner still posts. A later turn on the same SHA
265
+ creates a new check run; GitHub cannot reopen a completed run.
266
+
267
+ Override `events` when the mapping is custom. A handler can post commit
268
+ status from `turn.started` / `action.result` / `turn.failed` and stay
269
+ never-red; that pattern still wins when you replace a default handler
270
+ key. Handlers you author replace the matching defaults (same as
283
271
  `progress.reactions` composition today).
284
272
 
285
273
  ## Related
@@ -18,14 +18,12 @@ The companion skill is
18
18
 
19
19
  - Authorize `defineConnection({ url, oauth: true })` with a browser PKCE
20
20
  flow (`agent-sdk mcp oauth <connection>`)
21
- - Keep tokens in `~/.config/agent-serve/mcp-auth.json`, bound to that
22
- connection's resource URL
21
+ - Keep tokens in `mcp-auth.json` under the CLI config directory, bound
22
+ to that connection's resource URL
23
23
  - Upsert deployment secrets with `--store` so hosted engines seed the
24
24
  same tokens from env
25
- - Keep privileged servers off the model with `hostOnly: true` while
26
- tools still call them through `ctx.host.mcp`. Do not set `hostOnly` on
27
- connectors the playground or local chat should call. Use
28
- `advertiseTools: true` for those.
25
+ - Use `advertiseTools: true` when local turns should call the server by
26
+ name. Host tools can still call it through `ctx.host.mcp`.
29
27
 
30
28
  Prefer a Cursor account MCP connection when the connector already lives
31
29
  in the signed-in account dashboard:
@@ -40,7 +38,8 @@ and the host must hold tokens.
40
38
 
41
39
  ## How do I declare a host-OAuth connection?
42
40
 
43
- Add one file under `agent/mcp-connections/`. The filename is the
41
+ Add one file under `agent/mcp-connections/` (model + host) or
42
+ `agent/host-connections/` (host + `mcp oauth` only). The filename is the
44
43
  connection name you pass to the CLI and to `host.mcp`.
45
44
 
46
45
  ```ts
@@ -50,17 +49,14 @@ import { defineConnection } from "@cursor/july/connections";
50
49
  export default defineConnection({
51
50
  url: "https://mcp.example.com/inventory",
52
51
  oauth: true,
53
- hostOnly: true,
54
- description:
55
- "Inventory MCP (privileged). Call only from host tools, not the model.",
52
+ description: "Inventory MCP.",
56
53
  });
57
54
  ```
58
55
 
59
56
  Rules of the road:
60
57
 
61
58
  - `oauth: true` is required for `agent-sdk mcp oauth`
62
- - `hostOnly: true` hides the server from the model; `ctx.host.mcp` and
63
- channel handlers still see it
59
+ - A file under `mcp-connections/` is visible to the model and to `ctx.host.mcp`. A file under `host-connections/` stays on the host.
64
60
  - Declare expected secret names on the agent when you plan to `--store`:
65
61
 
66
62
  ```ts
@@ -93,12 +89,11 @@ agent-sdk mcp oauth inventory
93
89
 
94
90
  What happens:
95
91
 
96
- 1. The Agent SDK loads `agent/mcp-connections/inventory.ts` and checks
97
- `oauth: true`
92
+ 1. The Agent SDK loads the connection file and checks `oauth: true`
98
93
  2. It opens the authorization URL in your browser
99
94
  3. The callback lands on `http://localhost:8787/callback`
100
- 4. Tokens land in `~/.config/agent-serve/mcp-auth.json` (override the
101
- config dir with `AGENT_SERVE_CONFIG_DIR`)
95
+ 4. Tokens land in `mcp-auth.json` under the CLI config directory
96
+ (override with `AGENT_SERVE_CONFIG_DIR`)
102
97
 
103
98
  If you're already authorized, the command prints that and exits. Re-run
104
99
  it after rotating tokens on the MCP server, or after you change the
@@ -133,8 +128,6 @@ on the pod.
133
128
 
134
129
  ## How do host tools call the server?
135
130
 
136
- Keep privileged calls on the host:
137
-
138
131
  ```ts
139
132
  const result = await ctx.host.mcp.callTool(
140
133
  "inventory",
@@ -143,9 +136,8 @@ const result = await ctx.host.mcp.callTool(
143
136
  );
144
137
  ```
145
138
 
146
- The model never sees `hostOnly` tools in its MCP namespace list. If the
147
- agent asks to "check IDE MCP" or run `mcp_auth`, point it at your host
148
- tool instead.
139
+ The model can call the same server. Use a host tool when the write needs
140
+ an allowlist or other deterministic gate.
149
141
 
150
142
  ## What if authorization fails?
151
143
 
@@ -158,7 +150,7 @@ tool instead.
158
150
 
159
151
  ## What's next
160
152
 
161
- - [MCP connections](../reference/connections.md): transports, `hostOnly`, account MCP
153
+ - [MCP connections](../reference/connections.md): transports, account MCP
162
154
  - [CLI](../reference/cli.md#mcp-oauth): full flag list for `mcp oauth`
163
155
  - [Deployment](../deployment.md): secrets, egress, and hosted engines
164
156
  - [Fix common agent problems](../troubleshooting.md): more symptom → fix tables
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  title: "Slack"
3
- description: "Put the agent in Slack: Cursor-hosted connection, a dedicated Socket Mode app via the dashboard wizard, or a manual manifest import."
3
+ description: "Put the agent in Slack: a dedicated Socket Mode app via the dashboard wizard, or a manual manifest import."
4
4
  ---
5
5
 
6
6
  # Slack agents
7
7
 
8
- The Slack channel puts your agent in Slack. Two products: the Cursor-hosted
9
- connection (`cursorAccount: true`), or a dedicated Socket Mode app created
10
- in the dashboard wizard (`agent-sdk slack create`). To own the Slack app
11
- yourself, run `agent-sdk slack init --manual` and paste the manifests at
8
+ The Slack channel puts your agent in Slack as its own Socket Mode bot.
9
+ `agent-sdk slack create` opens the dashboard wizard and writes tokens
10
+ to `.env.local`. To own the Slack app yourself, run
11
+ `agent-sdk slack init --manual` and paste the manifests at
12
12
  [api.slack.com](https://api.slack.com/apps). Socket Mode has no
13
13
  public Request URL. Replies stream in threads, with tool "thinking" steps,
14
14
  suggested prompts, and opt-in approval buttons.
@@ -47,41 +47,12 @@ Missing tokens leave the channel idle (`channel idle … missing
47
47
  credentials`) rather than failing `serve`. That's useful when you mount
48
48
  many agents and only some have Slack apps.
49
49
 
50
- ## Use the Cursor Slack connection
51
-
52
- If the Cursor Slack app is already installed in your workspace and linked
53
- to your Cursor account, skip the dedicated Slack app:
54
-
55
- ```ts
56
- import { slackChannel } from "@cursor/july/channels/slack";
57
-
58
- export default slackChannel({
59
- cursorAccount: true,
60
- agentName: "Weatherbot", // single token — no spaces; defaults from mount slug (PascalCase)
61
- agentIcon: { emoji: ":robot_face:" },
62
- });
63
- ```
64
-
65
- Sign the host in (`agent-sdk login` or `CURSOR_API_KEY`), then mention the
66
- agent in Slack as `@Cursor Weatherbot …`. Thread replies and DMs keep going to
67
- the same agent. Messages appear as the Cursor app under that agent's name
68
- and icon. Slack shows its working status, then posts one final reply.
69
-
70
- Use a dedicated Socket Mode Slack app when you need your own bot user,
71
- channel watching (`engagement.channelPosts`), or approval buttons. On
72
- `cursorAccount`, agents must be explicitly addressed (@mention, DM, or
73
- claimed-thread reply). Channel watching and `toolApprovals` /
74
- `interactivity` are Socket Mode only; the Cursor connection does not relay
75
- Block Kit clicks. Agent names must be unique on the host; an unmatched
76
- `@Cursor <name>` stays on Cursor's normal Slack agent.
77
-
78
50
  ## Control who can message the agent
79
51
 
80
52
  External senders are blocked by default. Slack Connect users, guests, and
81
53
  people whose home workspace is not the install team never reach the
82
- handler. That applies to Socket Mode and `cursorAccount: true`. Set
83
- `blockExternals: false` only when the agent should serve people outside
84
- your org:
54
+ handler. Set `blockExternals: false` only when the agent should serve
55
+ people outside your org:
85
56
 
86
57
  ```ts
87
58
  export default slackChannel({
@@ -127,7 +98,7 @@ writes `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` into
127
98
  [below](#wire-the-env-and-verify).
128
99
 
129
100
  If Slack needs a workspace admin to approve the app, keep the CLI
130
- running. Managed install does not file the request open Slack's
101
+ running. Managed install does not file the request. Open Slack's
131
102
  **Request approval** page (the CLI prints the link; the same URL is
132
103
  **Send a reminder** after you submit). After an admin approves, click
133
104
  **Retry** in the wizard.
@@ -190,9 +161,9 @@ option.
190
161
  agent-sdk slack init --manual --dir . --name "My Agent"
191
162
  ```
192
163
 
193
- That writes `agent/channels/slack.ts`, importable manifests at
194
- `.agent-serve/slack/manifest.{dev,prod}.json`, `env.example`, and
195
- `setup-status.json`. `--no-prefix` uses shared `SLACK_*` variables on
164
+ That writes `agent/channels/slack.ts`, Slack manifests under the
165
+ project state directory, `env.example`, and `setup-status.json`.
166
+ `--no-prefix` uses shared `SLACK_*` variables on
196
167
  a single-agent host. `--prefix CUSTOM` overrides the directory-derived
197
168
  prefix. `--channel-posts` subscribes the manifests to channel-post
198
169
  events.
@@ -244,8 +215,7 @@ export default slackChannel({
244
215
  ```
245
216
 
246
217
  Channel watching needs the `message.channels` / `message.groups` events
247
- on the Slack app (Socket Mode only; not available with
248
- `cursorAccount: true`). Pass `--channel-posts` on `slack create` or
218
+ on the Slack app. Pass `--channel-posts` on `slack create` or
249
219
  `slack init --manual`. The bot must also be a member of each watched
250
220
  channel.
251
221
 
@@ -255,9 +225,7 @@ Set `includeBotPosts: true` when the posts worth watching come from bots:
255
225
  alert feeds, webhook integrations, or other agents posting notes. The
256
226
  watching app's own posts stay dropped either way, matched by the `bot_id`
257
227
  and bot user id from `auth.test`, so an agent can never dispatch on its
258
- own replies. The
259
- [alert investigator example](../example-agents/oncall.md) watches a
260
- bot-fed alerts channel this way.
228
+ own replies. Use this for a bot-fed alerts channel.
261
229
 
262
230
  ## Prepare work on the host
263
231
 
@@ -286,11 +254,6 @@ Approval cards need interactivity on the Slack app. Recreate with
286
254
  `buildToolApprovalEvents({ credentials })` into `events` and set
287
255
  `interactivity: true` on the channel so Socket Mode routes the clicks.
288
256
 
289
- Approval buttons need Socket Mode. `slackChannel({ cursorAccount: true })`
290
- rejects `toolApprovals` and `interactivity` at construction, since the
291
- Cursor Slack connection does not relay Block Kit clicks. Use a dedicated
292
- Slack app to run approvals for a cursor-account agent.
293
-
294
257
  Cards show redacted, truncated arguments (Block Kit size limits);
295
258
  execution still uses the full validated input, so review sensitive tools
296
259
  in the playground when the arguments may exceed the card. Approvals
@@ -322,7 +285,7 @@ Two habits matter most.
322
285
  The `slack` subcommands cover setup end to end.
323
286
 
324
287
  ```bash
325
- agent-sdk slack setup # two-product chooser plus manual phases
288
+ agent-sdk slack setup # printed setup guide
326
289
  agent-sdk slack create --dir . # dashboard wizard (dev app)
327
290
  agent-sdk slack create --dir . --prod # prod app
328
291
  agent-sdk slack destroy --dir . # delete the provisioned app
@@ -16,8 +16,8 @@ mechanism. This page is the mechanism itself.
16
16
  The built-in HTTP channel is always mounted (under `/<slug>` in the
17
17
  default multi-agent layout). `POST /v1/session` starts a conversation,
18
18
  `POST /v1/session/:id` follows up, and `GET /v1/session/:id/stream`
19
- streams NDJSON events, plus sessions, approvals, and tool routes. The
20
- full list is in the [HTTP API reference](../reference/http-api.md).
19
+ streams NDJSON events, plus sessions, approvals, and tool routes. See
20
+ the [HTTP API reference](../reference/http-api.md).
21
21
 
22
22
  Write a custom channel when that shape doesn't fit: a webhook with its
23
23
  own payload contract, a surface that keys sessions by a domain id, or a
@@ -451,7 +451,7 @@ Start with curl and saved payloads under `fixtures/`. The playground's
451
451
  endpoint, has Copy curl, and opens the created session on a successful
452
452
  Try. For regression coverage, drive the same behavior through an eval,
453
453
  or keep channel logic deterministic in `agent/lib/` and unit-test it
454
- there. When something looks wrong, read the session's `events.ndjson`.
454
+ there. When something looks wrong, inspect the session event stream.
455
455
  The stream is the record of what happened.
456
456
 
457
457
  For GitHub specifically, don't hand-roll fixtures.
@@ -56,7 +56,7 @@ Pin the input first. A moving fixture is noise. For GitHub agents, use `agent-sd
56
56
 
57
57
  ## How do I run one hillclimb round?
58
58
 
59
- **Measure.** Hit the agent the way a user would: playground, channel HTTP, or Slack in `--dev`. Or ask the hillclimb skill to do it. `agent-sdk run` returns a JSON trajectory and writes a trace under `.agent-serve/traces/`.
59
+ **Measure.** Hit the agent the way a user would: playground, channel HTTP, or Slack in `--dev`. Or ask the hillclimb skill to do it. `agent-sdk run` returns a JSON trajectory and writes a trace under the project state directory.
60
60
 
61
61
  **Reflect.** Score the trajectory, not impressions. Was the answer right? Did the model thrash (too many tools, fat evidence, grep loops)? Did it invent work the host should have prepared? Name the single dominant problem for this round in one sentence. Example: "Full-file dumps trigger grep loops."
62
62
 
@@ -21,7 +21,7 @@ review. Add GitHub event handling so pull requests can trigger reviews.
21
21
  - Node 22.13 or newer. Bun isn't supported.
22
22
  - Run commands as `agent-sdk <command>`, or use
23
23
  `npx @cursor/july <command>` when the CLI isn't on `PATH`. See
24
- [Run the CLI](/#run-the-cli) for monorepo checkouts and other setups.
24
+ [Run the CLI](/#run-the-cli) if `agent-sdk` is not on `PATH`.
25
25
  - A Cursor credential for model turns. Sign in once:
26
26
 
27
27
  ```bash
@@ -356,9 +356,8 @@ See [GitHub](./guides/github.md) for local event delivery and
356
356
 
357
357
  ## Where to go next
358
358
 
359
- - [`examples/approval-buddy`](../examples/approval-buddy/): an example
360
- with commit statuses, review subagents, and a deterministic stamp
361
- policy
359
+ - [PR autofixer template](./templates/pr-autofixer.md): drive a PR on a
360
+ Cursor cloud VM
362
361
  - [Evals](./evals.md): freeze these two PRs as regression checks so
363
362
  prompt changes can't flip a verdict
364
363
  - [Tools](./reference/tools.md): more on typed tools, approvals, and