@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/storage.md CHANGED
@@ -7,15 +7,10 @@ description: "Point the Agent SDK's durable storage at a backend you own with de
7
7
 
8
8
  The Agent SDK owns durable storage for sessions, continuation tokens,
9
9
  reminders, playground eval history, and live A/B samples. It chooses the
10
- keys (under `agentkit/v1/`), when to read and write, and how to restore
11
- after restart.
10
+ keys, when to read and write, and how to restore after restart.
12
11
 
13
- Keys have bounded length: caller-controlled segments (channel ids,
14
- continuation tokens) are URI-encoded, and any segment past 256 encoded
15
- bytes is replaced by its `sha256:…` digest — deterministically, so writes
16
- and lookups always agree. Backends can rely on this instead of imposing
17
- their own key-length caps (which would silently drop writes, since a
18
- throwing `put` is at-most-once).
12
+ The Agent SDK owns key encoding. Backends must accept the keys they are
13
+ given. Do not fail `put` to enforce a shorter cap.
19
14
 
20
15
  By default that storage lives under `--state-root` on local disk. Fine
21
16
  for one machine; it does not survive replacing the host.
@@ -23,8 +18,7 @@ for one machine; it does not survive replacing the host.
23
18
  To keep the same framework storage across hosts, plug in a key-value
24
19
  backend with `agent/storage.ts`. You provide `put` / `get` / `delete` /
25
20
  `list`. The optional `cas` group adds conditional writes (see
26
- [Conditional writes](#conditional-writes-the-cas-group)). The Agent SDK
27
- does the rest.
21
+ [Conditional writes](#conditional-writes-the-cas-group)).
28
22
 
29
23
  ```ts
30
24
  // agent/storage.ts
@@ -44,15 +38,10 @@ export default defineStorage({
44
38
  });
45
39
  ```
46
40
 
47
- > [!NOTE]
48
- > Import paths here use `@cursor/july/storage`. On projects still
49
- > using `@anysphere/agent-serve`, swap the import. See
50
- > [Run the CLI](/#run-the-cli) for the full rename table.
51
-
52
41
  ## Which fields to provide
53
42
 
54
- Implement the small KV core `put`/`get`/`delete`/`list` plus the `cas`
55
- group and you get **full functionality**: eval-run and A/B history are
43
+ Implement the small KV core (`put`/`get`/`delete`/`list` plus the `cas`
44
+ group) and you get **full functionality**: eval-run and A/B history are
56
45
  derived over the core automatically. The dedicated `evals` / `abs` groups
57
46
  are backend-native optimizations, not required-or-lose-history hooks.
58
47
 
@@ -60,13 +49,13 @@ are backend-native optimizations, not required-or-lose-history hooks.
60
49
  | --- | --- | --- |
61
50
  | `put` | Yes | Write or update a value |
62
51
  | `cas` | Optional | Conditional writes; see [Conditional writes](#conditional-writes-the-cas-group) |
63
- | `get` | For restore | Look up one key (also: derived A/B snapshot backfill) |
64
- | `list` | For restore | Return entries under a prefix, in key order (also: derived eval-runs hydrate) |
65
- | `delete` | For cleanup | Remove a key (also: derived eval-runs pruning) |
52
+ | `get` | For restore | Look up one key |
53
+ | `list` | For restore | Return entries under a prefix, in key order |
54
+ | `delete` | For cleanup | Remove a key |
66
55
  | `name` | No | Label surfaced on `GET /v1/info` diagnostics |
67
56
  | `policy` | No | Timing knobs; see [Policy](#policy) |
68
- | `evals` | No | Backend-native eval-runs table; derived over the core when omitted see [Eval and A/B tables](#eval-and-a-b-tables) |
69
- | `abs` | No | Backend-native A/B metrics table; derived over the core when omitted see [Eval and A/B tables](#eval-and-a-b-tables) |
57
+ | `evals` | No | Backend-native eval-runs table; derived over the core when omitted. See [Eval and A/B tables](#eval-and-a-b-tables) |
58
+ | `abs` | No | Backend-native A/B metrics table; derived over the core when omitted. See [Eval and A/B tables](#eval-and-a-b-tables) |
70
59
 
71
60
  A throwing `put` is logged and dropped. It never fails a turn. When
72
61
  resolving a missing continuation token, a throwing `get` fails the
@@ -80,30 +69,20 @@ values. Both are **optional optimizations**: when a group is not
80
69
  authored, `defineStorage` derives it over the KV core, so a backend that
81
70
  implements only the core loses nothing. Author a group only when the
82
71
  backend has a better native shape (a real database table, an analytics
83
- pipeline) the built-in `fileKv` and `cursorHostedStorage` both do.
72
+ pipeline). The built-in `fileKv` and `cursorHostedStorage` both do.
84
73
 
85
74
  `evals` keeps playground eval batches across restarts (`put`, `delete`,
86
- `list` over run snapshots keyed by `runId`). The Agent SDK upserts a
87
- snapshot as a batch starts, progresses, and finishes, prunes runs past
88
- the playground history window, and lists everything back at serve start.
89
- **Derived form**: one key per run under
90
- `agentkit/v1/{agent}/eval-runs/{runId}` — needs core `put` + `delete` +
91
- `list`. Only a core missing `delete` or `list` leaves eval history in
92
- process memory (cleared on restart). See
93
- [Evals](./evals.md#configure-eval-runs).
75
+ `list` over run snapshots keyed by `runId`). A core missing `delete` or
76
+ `list` leaves eval history in memory until restart.
77
+ See [Evals](./evals.md#configure-eval-runs).
94
78
 
95
79
  `abs` exports live A/B metrics: `putSample` appends one cumulative
96
80
  metric sample per enrolled experiment on each completed or failed turn;
97
81
  optional `putSnapshot` / `getSnapshot` store and serve back the latest
98
- aggregate so a replacement host with no local sessions can still serve
99
- the A/Bs surface. **Derived form**: each sample lands as its own key
100
- (`agentkit/v1/{agent}/ab-samples/{experiment}/{sessionId}/{at}` a
101
- blind append-only put, never a read-modify-write of one growing array)
102
- and the snapshot lives at the fixed `agentkit/v1/{agent}/ab-snapshot`
103
- key (last-write-wins is correct for "latest aggregate"). `putSample` and
104
- `putSnapshot` need only core `put`; `getSnapshot` needs core `get`.
105
- Session event logs remain the assignment source of truth either way. See
106
- [Live A/B metrics](./ab.md).
82
+ aggregate so a replacement host can still serve the A/Bs surface.
83
+ `putSample` and `putSnapshot` need only core `put`; `getSnapshot` needs
84
+ core `get`. Session event logs remain the assignment source of truth
85
+ either way. See [Live A/B metrics](./ab.md).
107
86
 
108
87
  ## Policy
109
88
 
@@ -137,8 +116,6 @@ follow-up arrives instead of at startup.
137
116
  With `get` and `list`, serve can rebuild local state from your store:
138
117
 
139
118
  - At startup, the Agent SDK loads recent sessions up to the restore caps.
140
- Local disk wins when both sides have the same session. Reminders
141
- hydrate the same way into `--state-root/reminders`.
142
119
  - On demand, a missing continuation token resolves through the store
143
120
  and resumes that session.
144
121
  - Playground eval history and A/B aggregates can load from the same
@@ -157,19 +134,16 @@ await ctx.host.kv.put("alert-memory/abc", { updated: "…" });
157
134
  const prior = await ctx.host.kv.get("alert-memory/abc");
158
135
  ```
159
136
 
160
- The Agent SDK prefixes author keys as `agentkit/v1/{agent}/kv/{key}` (same
161
- bounded encoding as continuation tokens). Writes **await** the sink and
162
- propagate errors — unlike session mirrors, which are at-most-once.
137
+ Writes **await** the sink and propagate errors, unlike session mirrors,
138
+ which are at-most-once.
163
139
 
164
- Without `agent/storage.ts`, `host.kv` falls back to files under
165
- `--state-root/kv`. That is fine for local dogfood; it does **not**
166
- survive replacing the host. For Cursor-managed hosting, prefer
167
- `@cursor/july/storage/cursor-hosted` so sessions and author KV share the
168
- platform Bugbot tables through a control-plane HTTP proxy (authenticated
169
- as the deployment pod credential — engines never receive a database URL).
140
+ Without `agent/storage.ts`, `host.kv` is local-only and does not
141
+ survive replacing the host. Hosted agents should author
142
+ `cursorHostedStorage()` so session and `host.kv` records survive
143
+ replace.
170
144
 
171
145
  ```ts
172
- // agent/storage.ts Cursor-managed hosting
146
+ // agent/storage.ts: Cursor-managed hosting
173
147
  import { defineStorage } from "@cursor/july/storage";
174
148
  import { cursorHostedStorage } from "@cursor/july/storage/cursor-hosted";
175
149
 
@@ -182,32 +156,18 @@ Built-in helpers:
182
156
 
183
157
  | Import | Backend |
184
158
  | --- | --- |
185
- | `@cursor/july/storage/file-kv` | File-per-key under `.agent-serve/kv` |
186
- | `@cursor/july/storage/cursor-hosted` | Platform Bugbot `agent_serve_*` via control-plane proxy |
159
+ | `@cursor/july/storage/file-kv` | File-per-key under the project state directory |
160
+ | `@cursor/july/storage/cursor-hosted` | Cursor-managed hosting; records survive replace |
187
161
 
188
162
  ## Bring your own backend
189
163
 
190
- There is no built-in Postgres backend on purpose. Cursor's internal
191
- `agent_serve_*` tables are owned by the backend and reachable only
192
- through the hosted proxy, and this doc does not prescribe a schema —
193
- what you back the KV with is your call. Any durable store works:
194
-
195
- - **Local disk** the built-in `fileKv` (single process only).
196
- - **Object storage (S3-class)** one object per key; conditional
197
- writes map directly onto the contract (`putIfAbsent` = put with
198
- `If-None-Match: *`, `putIfVersion` = put with `If-Match: <etag>`,
199
- the ETag is the version token, `listKeys` is a prefix listing).
200
- - **Redis, DynamoDB, a SQL table, …** — anything that can do an
201
- atomic compare-and-set and a prefix listing.
202
-
203
- Implement the `StorageConfig` methods (and the optional `cas` group)
204
- against that store. The
205
- contract, defined at `@cursor/july/kv`: version tokens are opaque
206
- strings that change on every successful write — including plain
207
- `put`, so a stale token fences instead of clobbering; conditional
208
- writes are atomic; `listKeys` returns every key under the prefix.
209
- `@cursor/july/kv/memory` is a complete reference implementation to
210
- compare behavior against.
164
+ Any durable store works if it can put, get, delete, list by prefix,
165
+ and optionally compare-and-set. Implement the `StorageConfig` methods
166
+ (and the optional `cas` group) against that store. The contract,
167
+ defined at `@cursor/july/kv`: version tokens are opaque strings that
168
+ change on every successful write, including plain `put`, so a stale
169
+ token fences instead of clobbering; conditional writes are atomic;
170
+ `listKeys` returns every key under the prefix.
211
171
 
212
172
  ## Conditional writes (the `cas` group)
213
173
 
@@ -215,10 +175,7 @@ The `cas` group is compare-and-swap over the same keyspace:
215
175
  `getWithVersion` / `putIfAbsent` / `putIfVersion` / `listKeys`, defined
216
176
  backend-agnostically at `@cursor/july/kv`. Plain storage works without
217
177
  it, so an existing backend keeps working across a platform upgrade.
218
- `defineStorage` rejects a partial group implement all four methods or
178
+ `defineStorage` rejects a partial group. Implement all four methods or
219
179
  none. Version tokens are opaque strings that must change on every write
220
180
  (a counter column, a row version, a content hash). The built-in backends
221
- both include it: `fileKv` uses content-hash tokens (single-process
222
- correctness) and `cursorHostedStorage` the control-plane proxy (a
223
- `version` counter on the server). `memoryCasTable()` is for test fixtures
224
- and inert sinks only.
181
+ both include the group.
@@ -32,7 +32,7 @@ agent-sdk login
32
32
  agent-sdk dev
33
33
  ```
34
34
 
35
- PR events stream through your Cursor account no webhook or GitHub App
35
+ PR events stream through your Cursor account. No webhook or GitHub App
36
36
  setup. Open a PR, or replay a real one deterministically (this also works
37
37
  with `repos` empty):
38
38
 
@@ -75,7 +75,7 @@ applies the deterministic decision:
75
75
 
76
76
  - **Approve** when the tier is low and no matched rule demands a human,
77
77
  bound to the head SHA.
78
- - **Request reviewers** otherwise the policy owners (max 2, never the
78
+ - **Request reviewers** otherwise: the policy owners (max 2, never the
79
79
  author), plus one status comment the agent keeps updated in place.
80
80
 
81
81
  The model never writes to GitHub. A broken policy file fails closed with
@@ -91,12 +91,9 @@ opted-in PR wakes the agent. A comment on a plain GitHub issue does
91
91
  not. The channel buffers about 3 seconds per PR. Payload details are
92
92
  dropped on purpose. The follow-up says something changed.
93
93
 
94
- Pending wakes snapshot to `host.kv` (`webhook-buffer`) before the
95
- webhook is ACKed, and restore on restart. Affinity is
96
- `affinity/{owner/repo#N}` `bc-…` in the same store, written from
97
- `agent.bound`. `agent/storage.ts` uses `cursorHostedStorage`, so both
98
- survive host replace. Local serve without that plug-in falls back to
99
- `--state-root/kv`.
94
+ Pending wakes and the PR-to-cloud-agent map persist in `host.kv` so
95
+ they survive restart. `cursorHostedStorage` keeps both across replace.
96
+ Without that plug-in, `host.kv` is local-only.
100
97
 
101
98
  Closing a PR cancels its merge-conflict reminder and drops buffered
102
99
  wakes.
@@ -106,9 +103,10 @@ fixture replay.
106
103
 
107
104
  ## Slack
108
105
 
109
- `agent/channels/slack.ts` uses your signed-in Cursor account. Mention
110
- the agent or DM it with a PR URL. Same `drive_pr` path as the
111
- playground. See [Slack](../guides/slack.md).
106
+ `agent/channels/slack.ts` is a dedicated Socket Mode bot
107
+ (`PR_AUTOFIXER_SLACK_*`). Mint it with `agent-sdk slack create`, then
108
+ mention the bot or DM it with a PR URL.
109
+ Same `drive_pr` path as the playground. See [Slack](../guides/slack.md).
112
110
 
113
111
  ## Evals
114
112
 
@@ -9,9 +9,8 @@ This agent reads a pull request diff and posts one review comment. It
9
9
  reports exploitable bugs: injection, authz bypass, secret leaks, SSRF,
10
10
  RCE. Style nits stay out.
11
11
 
12
- The factory [Security Reviewer](../example-agents/security-reviewer.md)
13
- runs a staged pipeline with parallel workers. This template is one
14
- model turn.
12
+ The in-repo factory Security Reviewer runs a staged pipeline with
13
+ parallel workers. This template is one model turn.
15
14
 
16
15
  ## Scaffold
17
16
 
@@ -12,8 +12,8 @@ Start with four checks, in order:
12
12
  3. What the playground or HTTP API shows
13
13
  4. The session event stream (trace)
14
14
 
15
- Match your symptom below. Keep the commands as `agent-sdk`; see
16
- [Run the CLI](/#run-the-cli) if you still need an alias.
15
+ Match your symptom below. Keep the commands as `agent-sdk`. If it is
16
+ not on `PATH`, use `npx @cursor/july`.
17
17
 
18
18
  ## What if serve or the playground looks wrong?
19
19
 
@@ -21,9 +21,9 @@ Match your symptom below. Keep the commands as `agent-sdk`; see
21
21
  | --- | --- |
22
22
  | `serve` won't start | Run `agent-sdk validate --dir .` and fix the reported errors. |
23
23
  | Playground is blank or says there are no agents | The UI needs a running `serve` process. Building the playground assets alone is not enough. |
24
- | Edits to the playground don't show up | Use `serve --dev` and open the printed playground HMR URL (often port `5273`), not only the static `:3000` URL. |
25
- | Sessions exist on disk but the playground list is empty | The list shows sessions for the authenticated caller. In `--dev` on loopback the list is wider. Otherwise open `/<slug>/playground?sessionId=ses_…` or inspect `sessions/` under your state root. |
26
- | Port 3000 or 5273 is already in use | For the default serve port, the CLI tries the next free port and prints a notice. Pass `--port` to pick one, or `--port 0` for any free port. Stop leftover Vite or webhook-forwarder processes if you need the original port. |
24
+ | The playground UI looks stale | `serve --dev` prints a playground URL. Open that URL. Agent-file edits still need a restart (press Enter on the TTY). |
25
+ | Sessions exist but the playground list is empty | The list shows sessions for the authenticated caller. In `--dev` on loopback the list is wider. Otherwise open `/<slug>/playground?sessionId=ses_…`. |
26
+ | Port 3000 is already in use | For the default serve port, the CLI tries the next free port and prints a notice. Pass `--port` to pick one, or `--port 0` for any free port. Stop leftover playground or webhook-forwarder processes if you need the original port. |
27
27
 
28
28
  ## What if a model turn goes wrong?
29
29
 
@@ -31,8 +31,8 @@ Match your symptom below. Keep the commands as `agent-sdk`; see
31
31
  | --- | --- |
32
32
  | Built-in file reads and greps fail; the turn retries for a long time | Run under Node 22.13+ (or `tsx`), never Bun. Look for `NGHTTP2_FRAME_SIZE_ERROR` in logs. |
33
33
  | The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
34
- | Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to `~/.cache/agent-serve/<dir>`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
35
- | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or `hostOnly` hid the connection, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
34
+ | Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to a per-project cache directory under `~/.cache`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
35
+ | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
36
36
  | Server tools, skills, or workspace seed files never appear | Server tools and sandbox seeds apply on the local runtime (cloud server tools need `--public-url` / `--cloud-tools-url`). Skills reach cloud through the Agent Store when hosting or a personal `CURSOR_API_KEY` is available; otherwise only skills already in the cloud repo. `validate` warns when this combination is present. |
37
37
  | `validate` and `run` succeed, but typecheck fails in CI | The CLI runs TypeScript with type-stripping only. Keep tool `execute` return types as object literals or `type` aliases, not `interface` types. |
38
38
  | Login works, but turns are rejected when using custom API hosts | Point login and model traffic at the same host (`CURSOR_API_BASE_URL` and `CURSOR_BACKEND_URL`). A key from one host is rejected by the other. |
@@ -71,7 +71,7 @@ Match your symptom below. Keep the commands as `agent-sdk`; see
71
71
  | --- | --- |
72
72
  | `must be defineConnection({ url, oauth: true })` | The connection file needs `oauth: true`, or you passed the wrong connection name to `agent-sdk mcp oauth`. |
73
73
  | Local auth works; hosted calls unauthorized | Run `agent-sdk mcp oauth <name> --store`, confirm names with `agent-sdk secrets list <slug>`, then redeploy. |
74
- | Model asks for `mcp_auth` or IDE MCP for a privileged server | That connection is `hostOnly`. Call it from a host tool via `ctx.host.mcp`, and update instructions. |
74
+ | Model asks for `mcp_auth` or IDE MCP for a connector it already has | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns, or call it from a host tool via `ctx.host.mcp`. |
75
75
 
76
76
  See [Host MCP OAuth](./guides/mcp-oauth.md) and
77
77
  [`skills/mcp-auth/SKILL.md`](../skills/mcp-auth/SKILL.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.92",
3
+ "version": "0.1.94",
4
4
  "description": "(early alpha) Filesystem-first framework for defining Cursor agents as markdown and TypeScript and serving them over channels with the Cursor SDK.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -47,6 +47,13 @@
47
47
  "import": "./dist/index.js",
48
48
  "default": "./dist/index.js"
49
49
  },
50
+ "./internal/hosted-delivery-protocol": {
51
+ "anysphere-source": "./src/internal/hosted-delivery-protocol.ts",
52
+ "bun": "./dist/internal/hosted-delivery-protocol.js",
53
+ "types": "./dist/internal/hosted-delivery-protocol.d.ts",
54
+ "import": "./dist/internal/hosted-delivery-protocol.js",
55
+ "default": "./dist/internal/hosted-delivery-protocol.js"
56
+ },
50
57
  "./tools": {
51
58
  "anysphere-source": "./src/tools.ts",
52
59
  "types": "./dist/tools.d.ts",
@@ -113,6 +120,13 @@
113
120
  "import": "./dist/hooks.js",
114
121
  "default": "./dist/hooks.js"
115
122
  },
123
+ "./client": {
124
+ "anysphere-source": "./src/client.ts",
125
+ "bun": "./dist/client.js",
126
+ "types": "./dist/client.d.ts",
127
+ "import": "./dist/client.js",
128
+ "default": "./dist/client.js"
129
+ },
116
130
  "./memory": {
117
131
  "anysphere-source": "./src/memory.ts",
118
132
  "types": "./dist/memory.d.ts",
@@ -248,13 +262,13 @@
248
262
  "@slack/socket-mode": "^2.0.7",
249
263
  "@slack/web-api": "^7.18.0",
250
264
  "croner": "^8.0.1",
265
+ "esbuild": "^0.25.0",
251
266
  "javascript-time-ago": "^2.6.4",
252
267
  "js-yaml": "4.1.0",
253
268
  "ms": "^2.1.3",
254
269
  "proper-lockfile": "^4.1.2",
255
270
  "slackify-markdown": "^5.0.0",
256
271
  "tsx": "^4.0.0",
257
- "esbuild": "^0.25.0",
258
272
  "zod": "^3.25.0",
259
273
  "zod-to-json-schema": "^3.24.5"
260
274
  },
@@ -64,8 +64,8 @@ questions, concrete options, the recommended option listed first and labeled
64
64
  | --- | --- | --- |
65
65
  | **Runtime** | `local` (default) · `cloud` | Local runs on this machine. Cloud runs on a Cursor cloud agent and needs `cloud.repos`. Server tools and skills work on both. Tool approvals and sandbox seeds are local only. Recommend local unless the purpose needs a cloud checkout. |
66
66
  | **Model** | `grok-4.5` with `effort=high`, `fast=true` (default) · Other model id | Effort and fast are params, not id suffixes: `{ id: "grok-4.5", params: [{ id: "effort", value: "high" }, { id: "fast", value: "true" }] }` — the SDK rejects suffix-style ids. |
67
- | **Channels** (multi) | playground + HTTP API only (always mounted) · Slack · GitHub webhooks · custom webhook · schedule (cron) | Slack has two connections: the Cursor-hosted connection (`cursorAccount: true` — zero Slack admin, recommended default) and a dedicated Socket Mode app (own bot user + one app/token pair per agent; needed for channel watching or approval buttons). When Slack is picked, resolve the connection with the Step 0 gate in `setup-slack/SKILL.md` — either fold its AskQuestion into this round or ask it before channel setup; default to Cursor-hosted when you cannot ask. GitHub verifies `X-Hub-Signature-256` when a secret is set. Discord/Teams packs do not exist yet — offer custom webhook instead. |
68
- | **MCP connections** (multi) | none · remote server (URL + header auth) · local stdio server · Cursor account connectors · Other | One file per server under `agent/mcp-connections/`; filename = server name. Do not name an account connection `cursor.ts` (collides with the IDE `cursor` namespace); use `account.ts`. Tokens via env vars, never hardcoded. Connections serve the model and host code (`ctx.host.mcp`). If the model should call them by name on local turns, set `advertiseTools: true`. Set `hostOnly: true` only when host tools call the server and the playground must not. |
67
+ | **Channels** (multi) | playground + HTTP API only (always mounted) · Slack · GitHub webhooks · custom webhook · schedule (cron) | Slack is a dedicated Socket Mode app (`agent-sdk slack create` — own bot user + one app/token pair per agent). When Slack is picked, follow `setup-slack/SKILL.md`. GitHub verifies `X-Hub-Signature-256` when a secret is set. Discord/Teams packs do not exist yet — offer custom webhook instead. |
68
+ | **MCP connections** (multi) | none · remote server (URL + header auth) · local stdio server · Cursor account connectors · Other | One file per server under `agent/mcp-connections/`; filename = server name. Do not name an account connection `cursor.ts` (collides with the IDE `cursor` namespace); use `account.ts`. Tokens via env vars, never hardcoded. Connections serve the model and host code (`ctx.host.mcp`). If the model should call them by name on local turns, set `advertiseTools: true`. Privileged servers the model must not see go in `agent/host-connections/` instead. |
69
69
  | **Capabilities** (multi) | server tools · agent tools (scripts) · skills · subagents · hooks · sandbox seed files · tool approvals (HITL) · evals (recommend) | Always recommend at least one smoke eval. |
70
70
 
71
71
  Close the round with a one-screen plan — chosen options plus the file tree you
@@ -80,7 +80,7 @@ inventing:
80
80
 
81
81
  | Purpose looks like | Proven shape |
82
82
  | --- | --- |
83
- | Slack chat assistant | minimal `slackChannel({ cursorAccount: true, agentName: "…" })` with suggested prompts; dedicated Socket Mode app only when the Step 0 gate picked it |
83
+ | Slack chat assistant | `slackChannel()` with suggested prompts; run `agent-sdk slack create` for the bot and tokens |
84
84
  | PR review with host-prepared evidence | channel `callTool` prep into a trimmed workspace `pr/` tree |
85
85
  | GitHub-webhook automation | `githubChannel()` hooks, per-PR debounce, replay fixtures |
86
86
  | Domain assistant over live APIs / MCP | server + agent tools, a stdio MCP connection, a skill, a schedule |
@@ -105,7 +105,6 @@ Defaults that make first cuts good:
105
105
  multi-line strings).
106
106
  - **Env prefix** for Slack tokens = upper-snake slug (`my-agent` →
107
107
  `MY_AGENT_SLACK_*`); `agent-sdk slack create` derives it for you.
108
- Dedicated-app path only — the Cursor-hosted connection has no tokens.
109
108
  - **Host prep beats model wandering — for evidence, not judgment.** When the
110
109
  purpose has a deterministic setup step (fetch a PR, seed files), do it in
111
110
  the channel handler via `callTool` / `workspaceFiles` rather than
@@ -160,11 +159,7 @@ plan:
160
159
  with the real tools.
161
160
  4. Add the chosen `channels/`, `mcp-connections/`, `skills/`, `subagents/<id>/`
162
161
  (needs `description`), `schedules/`, `hooks/`, `sandbox/workspace/`. For
163
- Slack, follow the connection decided in the interview: Cursor-hosted is a
164
- short hand-written `agent/channels/slack.ts`
165
- (`slackChannel({ cursorAccount: true, agentName: "<Name>" })` — no
166
- tokens, no manifests); for a dedicated Socket Mode app do not hand-write
167
- the channel — `agent-sdk slack create --dir ./<slug> --name "<Name>"`
162
+ Slack, do not hand-write the channel `agent-sdk slack create --dir ./<slug> --name "<Name>"`
168
163
  opens the dashboard wizard (env prefix from the directory name);
169
164
  for a Slack app they own at api.slack.com, `agent-sdk slack init --manual --dir ./<slug> --name "<Name>"`;
170
165
  customize `agent/channels/slack.ts` afterwards (e.g. `suggestedPrompts`).
@@ -225,10 +220,8 @@ Each surface beyond the playground has a human gate — drive the user through
225
220
  it, verify with doctor commands, and smoke-test before declaring victory.
226
221
 
227
222
  - **Slack** — follow `packages/agent-serve/skills/setup-slack/SKILL.md` end
228
- to end, starting from its Step 0 connection gate. Cursor-hosted: sign in
229
- (`agent-sdk login` / `CURSOR_API_KEY`) serve `@Cursor <AgentName>`
230
- smoke. Dedicated app: init → human creates apps → doctor → `@mention`
231
- smoke.
223
+ to end: `slack create` doctor `@mention` smoke. Manual path only
224
+ when they own the Slack app at api.slack.com.
232
225
  - **GitHub** — follow `packages/agent-serve/skills/github/SKILL.md`
233
226
  (fixtures / replay / forward / `--cursor-events`).
234
227
  - **Custom webhook** — `POST /<slug>/v1/channels/<id>/<route>`. Default
@@ -51,7 +51,7 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
51
51
  | `gh webhook forward` / `agent-sdk github forward` deliveries all 401 — but hook creation succeeded | `GITHUB_TOKEN`/`GH_TOKEN` in the env. The relay authenticates with the gh CLI login and rejects env tokens. `GITHUB_TOKEN= GH_TOKEN= agent-sdk github forward ...` |
52
52
  | `Hook already exists` starting a forwarder | GitHub allows one forwarder per repo. Use one `github forward --dir <parent>` (it fans out to every matching channel) instead of N processes; kill stale forwarders. |
53
53
  | Agent's answers reference monorepo rules / AGENTS.md it shouldn't know | Session workspace sits inside another git checkout, so the harness loaded ancestor config. Nested projects default `local.cwd` to `~/.cache/agent-serve/<dir>`. Point cwd at a checkout only when the agent should inherit that tree. |
54
- | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or `hostOnly` hid it, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
54
+ | Yellow box lists Datadog/Linear tools; model recites `GetDynamicTools` / IDE `cursor` tools and never calls MCP | Attached MCP is behind meta-tools, or cwd still leaked IDE MCP. Set `advertiseTools: true` for named tools on local turns. Confirm `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
55
55
  | Port 3000/5273 in use; stray processes after crashes | `lsof -iTCP:3000 -sTCP:LISTEN`, kill the pids; also check companion processes (e.g. vite). |
56
56
  | Pending tool approval vanished after server restart | By design: parked SDK calls don't survive host restart; they resolve as interrupted. Re-run the turn. |
57
57
  | Schedule / reminder never fires under `--dev` | Dev never auto-fires. `POST /<slug>/v1/dev/schedules/<id>` or `POST /<slug>/v1/dev/reminders/<id>` (list at `GET /v1/dev/reminders`). |
@@ -61,9 +61,7 @@ curl -sN 'localhost:3000/<slug>/v1/session/<id>/stream?startIndex=0' | head -50
61
61
  | `403` on stream/follow-up | Caller principal ≠ session owner. In dev, create and inspect with the same auth; beyond loopback pass `--bearer-token` and send it. |
62
62
  | Works on localhost, 401/blocked through a tunnel or LAN | Default `localDevStrict()` auth only admits direct loopback, **rejects proxy-forwarding headers** (`X-Forwarded-For`, ...), and requires a loopback `Host`. Use `--bearer-token <secret>` (or authored `bearerAuth`) — `--allow-anonymous` only for trusted-network demos (and never with Cursor account MCP connections). |
63
63
  | Channel route won't compile: body/query schema type error | `GET` requires a Zod `querySchema`, `POST`/`PUT`/`PATCH` a Zod `bodySchema` — plain JSON Schema objects don't type-check. Use `z.object({})` / `z.unknown()` for open surfaces. Empty POST bodies are coerced to `{}` before validation. |
64
- | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent (dedicated-app path). Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
65
- | `serve` fails: `Slack channels using the Cursor account connection ... not signed in to Cursor` | Cursor-hosted Slack (`cursorAccount: true`) needs a signed-in host: `agent-sdk login` or `CURSOR_API_KEY`. No Slack tokens exist on this path — `slack doctor` doesn't apply. |
66
- | `@Cursor <name>` in Slack gets Cursor's normal agent, not yours | Agent name mismatch or host not relaying. Names are single-token and matched case-insensitively; confirm the serve log `cursor-slack: relaying Slack for <AgentName>` and that the workspace's Cursor Slack integration is linked to the signed-in account. |
64
+ | Slack channel prints `channel idle ... missing credentials` | Expected: tokens absent. Multi-agent needs `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent. `agent-sdk slack doctor --prefix <PREFIX>`. |
67
65
  | Turn fails immediately with an API-key error | Model turns need `CURSOR_API_KEY`; everything structural (validate/info/call/serve bring-up) doesn't. |
68
66
  | Server tools / skills / sandbox silently absent | Runtime is `cloud` — those are local-only. `validate` prints exactly this warning; read it. |
69
67
  | `validate` clean, `run` works, CI typecheck fails | tsx never typechecked it. See invariant 3 in `framework-map/SKILL.md` (JSON-shaped tool returns; `type` not `interface`). |
@@ -181,7 +181,7 @@ export default defineEvalConfig({
181
181
  Drop `agent/playground/evals.tsx` exporting `agentName` (must match
182
182
  `defineAgent({ name })`) and
183
183
  `default: { RunSummary?, CaseMetrics?, CaseExtras? }`. The playground
184
- loads these via Vite glob (`examples/*` and `factory/*`). Without a
184
+ loads these via Vite glob (`factory/*`). Without a
185
185
  module, cases still show default `t.metric` badges.
186
186
 
187
187
  ## What good cases assert
@@ -45,7 +45,7 @@ pnpm exec tsx src/bin/agent-serve.ts <cmd> ...
45
45
  `~/.cache/agent-serve/<dir>` so ancestor `AGENTS.md` / `.cursor` / IDE
46
46
  MCP do not leak into playground turns. Set cwd at a checkout only when
47
47
  the agent must inherit that tree. Attached MCP is invisible by name
48
- until `advertiseTools: true`. `hostOnly` hides it from the model.
48
+ until `advertiseTools: true`.
49
49
  5. **A model turn needs `CURSOR_API_KEY`.** Everything structural
50
50
  (`validate`, `info`, `call`, `serve` bring-up) works without one.
51
51
 
@@ -60,7 +60,8 @@ path live under README "Folder structure".
60
60
  | `agent/instructions.md` | Always-on system prompt (required; `.ts`/dir forms exist) |
61
61
  | `agent/tools/<name>.ts` | One typed tool; filename = tool name. `execution: "server"` (in-process, default) or `"agent"` (script that runs where the agent runs) |
62
62
  | `agent/skills/*` | SKILL.md-convention procedures, loaded on demand |
63
- | `agent/mcp-connections/<name>.ts` | MCP servers. Do not name an account connection `cursor.ts`. `advertiseTools: true` for named tools on local turns; `hostOnly` keeps them off the model. `{ tools }` authors TypeScript the Agent SDK packages as stdio MCP. |
63
+ | `agent/mcp-connections/<name>.ts` | MCP servers. Do not name an account connection `cursor.ts`. `advertiseTools: true` for named tools on local turns. `{ tools }` authors TypeScript the Agent SDK packages as stdio MCP. |
64
+ | `agent/host-connections/<name>.ts` | Privileged MCP for `ctx.host.mcp` and `mcp oauth`. The model never sees them. |
64
65
  | `agent/subagents/<id>/` | Child agent dir (`description` required; per-subagent tools/skills/MCP connections ignored for now) |
65
66
  | `agent/channels/*.ts` | HTTP surfaces beyond the built-in session API; `slack.ts` / `github.ts` use the platform packs |
66
67
  | `agent/hooks/*.ts` | Observe-only event subscribers (never fatal) |
@@ -3,7 +3,7 @@ name: agentsdk-mcp-auth
3
3
  description: >-
4
4
  Authorize host MCP OAuth for defineConnection({ url, oauth: true }):
5
5
  agent-sdk mcp oauth, local mcp-auth.json, --store deployment secrets,
6
- hostOnly, advertiseTools, and egress. Read when wiring or debugging MCP auth.
6
+ advertiseTools, and egress. Read when wiring or debugging MCP auth.
7
7
  ---
8
8
 
9
9
  # Host MCP OAuth (mcp auth)
@@ -29,15 +29,13 @@ Docs: `docs/guides/mcp-oauth.md`, `docs/reference/connections.md`,
29
29
  | Remote URL that speaks OAuth; host must hold tokens | `defineConnection({ url, oauth: true })` + this skill |
30
30
  | Static bearer / API key | `headers` / env on a plain `{ url }` connection |
31
31
 
32
- Set `hostOnly: true` only when host tools / channel handlers should call
33
- the server and the model should not (admin APIs, privileged writes).
34
- Playground chat will not see those tools. For connectors the model should
35
- call on local turns (Linear, Datadog, account MCP), omit `hostOnly` and
36
- set `advertiseTools: true`.
32
+ For connectors the model should call by name on local turns (Linear,
33
+ Datadog, account MCP), set `advertiseTools: true`. Host tools can still
34
+ call the same connection through `ctx.host.mcp`.
37
35
 
38
36
  ## Goal checklist
39
37
 
40
- - [ ] `agent/mcp-connections/<name>.ts` with `url` + `oauth: true` (`hostOnly` if privileged; `advertiseTools` if the model should call it)
38
+ - [ ] `agent/mcp-connections/<name>.ts` with `url` + `oauth: true` (`advertiseTools` if the model should call it by name). Use `agent/host-connections/<name>.ts` when host tools should call it and the model should not.
41
39
  - [ ] `hosting.secretNames` lists `MCP_OAUTH_<NAME>_{ACCESS_TOKEN,REFRESH_TOKEN,CLIENT_ID}` when you will `--store`
42
40
  - [ ] Hosted engines that reach non-bootstrap hosts declare `hosting.egressDomains`
43
41
  - [ ] Local: `agent-sdk mcp oauth <name>` succeeds
@@ -52,8 +50,7 @@ import { defineConnection } from "@cursor/july/connections";
52
50
  export default defineConnection({
53
51
  url: "https://mcp.example.com/inventory",
54
52
  oauth: true,
55
- hostOnly: true,
56
- description: "Privileged inventory MCP; call via ctx.host.mcp only.",
53
+ description: "Inventory MCP.",
57
54
  });
58
55
  ```
59
56
 
@@ -81,8 +78,8 @@ await ctx.host.mcp.callTool("inventory", "list_warehouses", {
81
78
  });
82
79
  ```
83
80
 
84
- Update instructions so the model does not hunt IDE MCP namespaces or
85
- `mcp_auth` for `hostOnly` servers.
81
+ Set `advertiseTools: true` when the model should call the server by name
82
+ instead of through MCP meta-tools.
86
83
 
87
84
  ## Phase 1 — Local authorize (agent + human)
88
85
 
@@ -129,10 +126,10 @@ redeploy completed, then exercise the same host tool once.
129
126
  | Symptom | Fix |
130
127
  | --- | --- |
131
128
  | `must be defineConnection({ url, oauth: true })` | Wrong connection name, or missing `oauth: true` |
132
- | `Unknown MCP connection` | Filename under `agent/mcp-connections/` must match CLI arg |
129
+ | `Unknown MCP connection` | Filename under `agent/mcp-connections/` or `agent/host-connections/` must match CLI arg |
133
130
  | Callback hang | Free port 8787; finish browser flow on this machine |
134
131
  | Hosted 401 / unauthorized | `secrets list`; re-run `--store`; redeploy |
135
- | Model invents `mcp_auth` / IDE MCP | `hostOnly` hid it, or attached MCP is behind meta-tools. Use host tools for privileged servers. Set `advertiseTools: true` for named tools on local turns. |
132
+ | Model invents `mcp_auth` / IDE MCP | Attached MCP is behind meta-tools. Set `advertiseTools: true` for named tools on local turns. |
136
133
  | Tokens ignored after URL edit | Expected; run `mcp oauth` again for the new resource URL |
137
134
 
138
135
  ## Don't