@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
@@ -31,7 +31,7 @@ import { pathToFileURL } from "node:url";
31
31
  import { resolveABMaxPlaygroundSessions } from "../ab.js";
32
32
  import { resolveArtifactsMax } from "../artifacts.js";
33
33
  import { httpChannel } from "../channels.js";
34
- import { cursorAccountServersHasMixedWildcard, DEFAULT_MODEL, isInlineStdioConnection, MAX_RUNNING_TURNS_LIMIT, normalizeCursorAccountServers, toPublicCloudInfo, } from "../types.js";
34
+ import { cursorAccountServersHasMixedWildcard, DEFAULT_MODEL, isInlineStdioConnection, isToolEffect, MAX_RUNNING_TURNS_LIMIT, normalizeConnectionEffects, normalizeCursorAccountServers, toPublicCloudInfo, } from "../types.js";
35
35
  import { registerAuthoredModuleLoaders } from "./authored-loaders.js";
36
36
  import { normalizePositiveInt } from "./bounded-int.js";
37
37
  import { getDefinitionKind } from "./brand.js";
@@ -306,11 +306,12 @@ function loadAgent(ctx, agentDir, options) {
306
306
  }
307
307
  return Object.assign(Object.assign(Object.assign(Object.assign({ name }, ((config === null || config === void 0 ? void 0 : config.description) === undefined
308
308
  ? {}
309
- : { description: config.description })), ((config === null || config === void 0 ? void 0 : config.model) === undefined ? {} : { model: config.model })), (instructions === undefined ? {} : { instructions })), { runtime: "local", tools: [], skills: [], connections: [], subagents: [], seedFiles: [] });
309
+ : { description: config.description })), ((config === null || config === void 0 ? void 0 : config.model) === undefined ? {} : { model: config.model })), (instructions === undefined ? {} : { instructions })), { runtime: "local", tools: [], skills: [], connections: [], hostConnections: [], subagents: [], seedFiles: [] });
310
310
  }
311
311
  const tools = yield loadTools(ctx, join(agentDir, "tools"));
312
312
  const skills = yield loadSkills(ctx, join(agentDir, "skills"));
313
313
  const connections = yield loadConnections(ctx, yield resolveMcpConnectionsDir(ctx, agentDir));
314
+ const hostConnections = yield loadHostConnections(ctx, agentDir, connections);
314
315
  const seedFiles = yield loadSeedFiles(ctx, agentDir);
315
316
  const subagents = yield loadSubagents(ctx, join(agentDir, "subagents"));
316
317
  const runtime = resolveRuntime(ctx, agentDir, config === null || config === void 0 ? void 0 : config.runtime);
@@ -415,7 +416,7 @@ function loadAgent(ctx, agentDir, options) {
415
416
  agentTools: tools.filter((tool) => tool.execution === "agent").length,
416
417
  skills: skills.length,
417
418
  seedFiles: seedFiles.length,
418
- connections: connections.length,
419
+ connections: connections.length + hostConnections.length,
419
420
  subagents: subagents.length,
420
421
  hasCloudOptions: cloud !== undefined,
421
422
  hasLocalSandbox: localSandbox,
@@ -430,6 +431,7 @@ function loadAgent(ctx, agentDir, options) {
430
431
  concurrency }), (architecture === undefined ? {} : { architecture })), { tools,
431
432
  skills,
432
433
  connections,
434
+ hostConnections,
433
435
  subagents,
434
436
  seedFiles });
435
437
  });
@@ -904,6 +906,23 @@ function hasAuthorizationHeader(headers) {
904
906
  }
905
907
  return Object.keys(headers).some((key) => key.toLowerCase() === "authorization");
906
908
  }
909
+ function parseConnectionEffects(effects) {
910
+ if (effects === undefined) {
911
+ return { ok: true, value: undefined };
912
+ }
913
+ const raw = typeof effects === "string" ? [effects] : effects;
914
+ if (!Array.isArray(raw) || raw.length === 0) {
915
+ return { ok: false };
916
+ }
917
+ const parsed = [];
918
+ for (const value of raw) {
919
+ if (!isToolEffect(value)) {
920
+ return { ok: false };
921
+ }
922
+ parsed.push(value);
923
+ }
924
+ return { ok: true, value: normalizeConnectionEffects(parsed) };
925
+ }
907
926
  function connectionHasSpawnOrRemote(connection) {
908
927
  if ("cursorAccount" in connection && connection.cursorAccount === true) {
909
928
  return true;
@@ -1002,6 +1021,42 @@ function resolveMcpConnectionsDir(ctx, agentDir) {
1002
1021
  return preferred;
1003
1022
  });
1004
1023
  }
1024
+ function loadHostConnections(ctx, agentDir, modelConnections) {
1025
+ return __awaiter(this, void 0, void 0, function* () {
1026
+ const hostDir = join(agentDir, "host-connections");
1027
+ const loaded = yield loadConnections(ctx, hostDir);
1028
+ const modelNames = new Set(modelConnections.map((connection) => connection.name));
1029
+ const hostConnections = [];
1030
+ for (const connection of loaded) {
1031
+ if (modelNames.has(connection.name)) {
1032
+ ctx.diagnostics.push({
1033
+ severity: "error",
1034
+ path: displayPath(ctx, join(hostDir, `${connection.name}.ts`)),
1035
+ message: `Host connection "${connection.name}" collides with agent/mcp-connections/${connection.name}. Rename one of them.`,
1036
+ });
1037
+ continue;
1038
+ }
1039
+ if (connection.advertiseTools === true) {
1040
+ ctx.diagnostics.push({
1041
+ severity: "error",
1042
+ path: displayPath(ctx, join(hostDir, `${connection.name}.ts`)),
1043
+ message: "Host connections are off the model. `advertiseTools` cannot apply. Drop it.",
1044
+ });
1045
+ continue;
1046
+ }
1047
+ if (connection.auth !== undefined) {
1048
+ ctx.diagnostics.push({
1049
+ severity: "error",
1050
+ path: displayPath(ctx, join(hostDir, `${connection.name}.ts`)),
1051
+ message: "Host connections are off the model. `auth` cannot apply. Use static headers or `oauth: true`.",
1052
+ });
1053
+ continue;
1054
+ }
1055
+ hostConnections.push(connection);
1056
+ }
1057
+ return hostConnections;
1058
+ });
1059
+ }
1005
1060
  function loadConnections(ctx, connectionsDir) {
1006
1061
  return __awaiter(this, void 0, void 0, function* () {
1007
1062
  if (!(yield isDirectory(connectionsDir))) {
@@ -1027,6 +1082,14 @@ function loadConnections(ctx, connectionsDir) {
1027
1082
  continue;
1028
1083
  }
1029
1084
  const connection = definition;
1085
+ if (Object.hasOwn(connection, "hostOnly")) {
1086
+ ctx.diagnostics.push({
1087
+ severity: "error",
1088
+ path: displayPath(ctx, entryPath),
1089
+ message: "MCP connection `hostOnly` was removed. Files under `agent/mcp-connections/` are always visible to the model. Put privileged servers in `agent/host-connections/` so only host tools can call them.",
1090
+ });
1091
+ continue;
1092
+ }
1030
1093
  if (isInlineStdioConnection(connection) &&
1031
1094
  connectionHasSpawnOrRemote(connection)) {
1032
1095
  ctx.diagnostics.push({
@@ -1062,20 +1125,30 @@ function loadConnections(ctx, connectionsDir) {
1062
1125
  });
1063
1126
  continue;
1064
1127
  }
1065
- if (connection.advertiseTools === true &&
1066
- isInlineStdioConnection(connection)) {
1128
+ const parsedEffects = parseConnectionEffects(connection.effects);
1129
+ if (!parsedEffects.ok) {
1067
1130
  ctx.diagnostics.push({
1068
1131
  severity: "error",
1069
1132
  path: displayPath(ctx, entryPath),
1070
- message: "MCP connection `advertiseTools` is not supported on inline `tools` connections author those as agent/tools/ server tools instead.",
1133
+ message: 'MCP connection `effects` must be "read", "write", or a non-empty array of those.',
1071
1134
  });
1072
1135
  continue;
1073
1136
  }
1074
- if (connection.advertiseTools === true && connection.hostOnly === true) {
1137
+ if (parsedEffects.value !== undefined &&
1138
+ connection.advertiseTools !== true) {
1075
1139
  ctx.diagnostics.push({
1076
1140
  severity: "error",
1077
1141
  path: displayPath(ctx, entryPath),
1078
- message: "MCP connection `advertiseTools` puts the connection's tools in the model's toolset, which contradicts `hostOnly` (off the model entirely). Drop one of them.",
1142
+ message: "MCP connection `effects` filters advertised tools; set `advertiseTools: true` or drop `effects`.",
1143
+ });
1144
+ continue;
1145
+ }
1146
+ if (connection.advertiseTools === true &&
1147
+ isInlineStdioConnection(connection)) {
1148
+ ctx.diagnostics.push({
1149
+ severity: "error",
1150
+ path: displayPath(ctx, entryPath),
1151
+ message: "MCP connection `advertiseTools` is not supported on inline `tools` connections — author those as agent/tools/ server tools instead.",
1079
1152
  });
1080
1153
  continue;
1081
1154
  }
@@ -1149,9 +1222,9 @@ function loadConnections(ctx, connectionsDir) {
1149
1222
  name,
1150
1223
  transport,
1151
1224
  description: connection.description,
1152
- hostOnly: connection.hostOnly,
1153
1225
  auth: connection.auth,
1154
1226
  advertiseTools: connection.advertiseTools,
1227
+ effects: parsedEffects.value,
1155
1228
  });
1156
1229
  }
1157
1230
  return connections;
@@ -1207,7 +1280,6 @@ function loadInlineStdioConnection(ctx, name, entryPath, connection) {
1207
1280
  name,
1208
1281
  transport,
1209
1282
  description: connection.description,
1210
- hostOnly: connection.hostOnly,
1211
1283
  };
1212
1284
  }
1213
1285
  catch (error) {
@@ -1253,6 +1325,7 @@ function warnUnsupportedSubagentSlots(ctx, subagentDir) {
1253
1325
  ["tools", "tools"],
1254
1326
  ["skills", "skills"],
1255
1327
  ["mcp-connections", "MCP connections"],
1328
+ ["host-connections", "host MCP connections"],
1256
1329
  ["connections", "MCP connections"],
1257
1330
  ["subagents", "nested subagents"],
1258
1331
  ["channels", "channels"],
@@ -1331,7 +1404,7 @@ function checkGrokBotRuntimeLimitations(ctx, agentDir, counts) {
1331
1404
  error(displayPath(ctx, join(agentDir, "tools")), 'Server tools (execution: "server", including opted-in builtinTools) are not reachable from grokbot turns yet. Remove them or run the agent on the local runtime.');
1332
1405
  }
1333
1406
  if (counts.connections > 0) {
1334
- error(displayPath(ctx, join(agentDir, "mcp-connections")), "MCP connections are not wired into grokbot turns yet. Remove them or run the agent on the local runtime.");
1407
+ error(displayPath(ctx, agentDir), "MCP connections (agent/mcp-connections/ or agent/host-connections/) are not wired into grokbot turns yet. Remove them or run the agent on the local runtime.");
1335
1408
  }
1336
1409
  if (counts.subagents > 0) {
1337
1410
  error(displayPath(ctx, join(agentDir, "subagents")), "Authored subagents are not available on grokbot turns (the Grok Bot harness runs its own subagent set). Remove them or run the agent on the local runtime.");
@@ -1814,6 +1887,7 @@ export function projectInfo(project) {
1814
1887
  description: tool.description,
1815
1888
  execution: tool.execution,
1816
1889
  needsApproval: tool.needsApproval,
1890
+ effect: tool.effect,
1817
1891
  inputSchema: tool.inputSchema,
1818
1892
  })), skills: agent.skills.map((skill) => ({
1819
1893
  name: skill.name,
@@ -1821,8 +1895,8 @@ export function projectInfo(project) {
1821
1895
  })), connections: agent.connections.map((connection) => { var _a; return ({
1822
1896
  name: connection.name,
1823
1897
  transport: connectionTransportLabel(connection.transport),
1824
- hostOnly: connection.hostOnly,
1825
1898
  advertiseTools: connection.advertiseTools,
1899
+ effects: connection.effects,
1826
1900
  cursorAccountServers: "cursorAccount" in connection.transport
1827
1901
  ? ((_a = connection.transport.servers) !== null && _a !== void 0 ? _a : "*")
1828
1902
  : undefined,
@@ -1864,6 +1938,9 @@ export function projectInfo(project) {
1864
1938
  if ((meta === null || meta === void 0 ? void 0 : meta.originWebhookEvents) !== undefined) {
1865
1939
  info.originWebhookEvents = meta.originWebhookEvents;
1866
1940
  }
1941
+ if ((meta === null || meta === void 0 ? void 0 : meta.deploymentEventTypes) !== undefined) {
1942
+ info.deploymentEventTypes = meta.deploymentEventTypes;
1943
+ }
1867
1944
  if ((meta === null || meta === void 0 ? void 0 : meta.slackChannelPosts) !== undefined) {
1868
1945
  info.slackChannelPosts = meta.slackChannelPosts;
1869
1946
  }
@@ -1951,6 +2028,7 @@ function warnUnknownSlots(ctx, agentDir) {
1951
2028
  "tools",
1952
2029
  "skills",
1953
2030
  "mcp-connections",
2031
+ "host-connections",
1954
2032
  // Legacy slot name; resolveMcpConnectionsDir warns and still loads it.
1955
2033
  "connections",
1956
2034
  "subagents",
@@ -1960,7 +2038,7 @@ function warnUnknownSlots(ctx, agentDir) {
1960
2038
  "ab",
1961
2039
  "sandbox",
1962
2040
  "lib",
1963
- // Vite playground custom tool chips (examples/*/agent/playground/tools).
2041
+ // Vite playground custom tool chips (agent/playground/tools).
1964
2042
  "playground",
1965
2043
  ]);
1966
2044
  for (const entry of yield sortedEntries(agentDir)) {
@@ -14,8 +14,9 @@ export declare const PACKAGE_NAME = "@cursor/july";
14
14
  /** Historical monorepo package name; never published, aliased at runtime. */
15
15
  export declare const LEGACY_PACKAGE_NAME = "@anysphere/agent-serve";
16
16
  /**
17
- * Future public package name; aliased with the same fallback-only semantics
18
- * as PACKAGE_NAME so the eventual rename keeps authored imports working.
17
+ * Future public package name; aliased with the same direct-to-running-dist
18
+ * semantics as PACKAGE_NAME so the eventual rename keeps authored imports
19
+ * on the CLI's module identity.
19
20
  */
20
21
  export declare const AGENTKIT_PACKAGE_NAME = "@cursor/agentkit";
21
22
  /**
@@ -67,7 +68,7 @@ export declare function formatCliVersion(options?: {
67
68
  * runtime mirror of the package `exports` map (the source of truth;
68
69
  * `authored-loaders.test.ts` asserts they stay identical). The alias hooks
69
70
  * derive `@anysphere/agent-serve[/x]`, `@cursor/july[/x]`, and
70
- * `@cursor/agentkit[/x]` targets from this list.
71
+ * `@cursor/agentkit[/x]` direct targets from this list.
71
72
  */
72
73
  export declare const AUTHORING_ENTRY_FILES: ReadonlyArray<readonly [subpath: string, file: string]>;
73
74
  //# sourceMappingURL=distribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,cAAc,IAAI,cAAc,CAM/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAMrE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CA2BzC,CAAC"}
1
+ {"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../../src/internal/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,sEAAsE;AACtE,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAE3C,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,2BAA2B,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,qBAAqB,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,eAAO,MAAM,UAAU,EAAE,MAA2B,CAAC;AACrD,eAAO,MAAM,gBAAgB,EAAE,MAAiC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAA+B,CAAC;AAc/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAGhD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,kEAAkE;AAClE,wBAAgB,cAAc,IAAI,MAAM,CAOvC;AAED,qDAAqD;AACrD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,cAAc,IAAI,cAAc,CAM/C;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAMrE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CA2BzC,CAAC"}
@@ -17,8 +17,9 @@ export const PACKAGE_NAME = "@cursor/july";
17
17
  /** Historical monorepo package name; never published, aliased at runtime. */
18
18
  export const LEGACY_PACKAGE_NAME = "@anysphere/agent-serve";
19
19
  /**
20
- * Future public package name; aliased with the same fallback-only semantics
21
- * as PACKAGE_NAME so the eventual rename keeps authored imports working.
20
+ * Future public package name; aliased with the same direct-to-running-dist
21
+ * semantics as PACKAGE_NAME so the eventual rename keeps authored imports
22
+ * on the CLI's module identity.
22
23
  */
23
24
  export const AGENTKIT_PACKAGE_NAME = "@cursor/agentkit";
24
25
  /**
@@ -91,7 +92,7 @@ export function formatCliVersion(options) {
91
92
  * runtime mirror of the package `exports` map (the source of truth;
92
93
  * `authored-loaders.test.ts` asserts they stay identical). The alias hooks
93
94
  * derive `@anysphere/agent-serve[/x]`, `@cursor/july[/x]`, and
94
- * `@cursor/agentkit[/x]` targets from this list.
95
+ * `@cursor/agentkit[/x]` direct targets from this list.
95
96
  */
96
97
  export const AUTHORING_ENTRY_FILES = [
97
98
  ["", "index.js"],
@@ -0,0 +1,38 @@
1
+ export declare const HOSTED_DELIVERY_PROTOCOL_VERSION = 2;
2
+ export declare const HOSTED_DELIVERY_HEADER = "x-agent-sdk-hosted-delivery";
3
+ export declare const HOSTED_ADMISSION_PATH = "/v1/internal/hosted-admission";
4
+ export declare const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
5
+ export type HostedAdmission = {
6
+ v: 2;
7
+ channelId: string;
8
+ channelKind: "github";
9
+ eventType: string;
10
+ deliveryId: string;
11
+ sessionMode: "event" | "continuation";
12
+ mailboxContinuationKey: string;
13
+ payload: unknown;
14
+ };
15
+ export type HostedAdmissionOutcome = {
16
+ ok: true;
17
+ v: 2;
18
+ outcome: "skip" | "task";
19
+ } | {
20
+ ok: true;
21
+ v: 2;
22
+ outcome: "send";
23
+ admissionToken: string;
24
+ };
25
+ export type HostedExecution = {
26
+ v: 2;
27
+ admissionToken: string;
28
+ sessionPublicId: string;
29
+ };
30
+ export type HostedExecutionOutcome = {
31
+ ok: true;
32
+ v: 2;
33
+ outcome: "send";
34
+ };
35
+ export declare function parseHostedAdmission(value: unknown): HostedAdmission | undefined;
36
+ export declare function parseHostedExecution(value: unknown): HostedExecution | undefined;
37
+ export declare function parseHostedAdmissionOutcome(value: unknown): HostedAdmissionOutcome | undefined;
38
+ //# sourceMappingURL=hosted-delivery-protocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-delivery-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AACpE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AACrE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAErE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,CAAC,CAAC;IACL,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,QAAQ,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,GAAG,cAAc,CAAC;IACtC,sBAAsB,EAAE,MAAM,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAC5C;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,CAAC,CAAC;IACL,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,IAAI,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;IACL,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,eAAe,GAAG,SAAS,CAsB7B;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,GACb,eAAe,GAAG,SAAS,CAe7B;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,GACb,sBAAsB,GAAG,SAAS,CAkBpC"}
@@ -0,0 +1,70 @@
1
+ export const HOSTED_DELIVERY_PROTOCOL_VERSION = 2;
2
+ export const HOSTED_DELIVERY_HEADER = "x-agent-sdk-hosted-delivery";
3
+ export const HOSTED_ADMISSION_PATH = "/v1/internal/hosted-admission";
4
+ export const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
5
+ const DELIVERY_KEYS = new Set([
6
+ "v",
7
+ "channelId",
8
+ "channelKind",
9
+ "eventType",
10
+ "deliveryId",
11
+ "sessionMode",
12
+ "mailboxContinuationKey",
13
+ "payload",
14
+ ]);
15
+ const EXECUTION_KEYS = new Set(["v", "admissionToken", "sessionPublicId"]);
16
+ function boundedString(value, max) {
17
+ return typeof value === "string" && value.length > 0 && value.length <= max;
18
+ }
19
+ export function parseHostedAdmission(value) {
20
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
21
+ return undefined;
22
+ }
23
+ const body = value;
24
+ if (Object.keys(body).some((key) => !DELIVERY_KEYS.has(key)) ||
25
+ !Object.hasOwn(body, "payload") ||
26
+ body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
27
+ !boundedString(body.channelId, 128) ||
28
+ body.channelKind !== "github" ||
29
+ !boundedString(body.eventType, 128) ||
30
+ !boundedString(body.deliveryId, 256) ||
31
+ (body.sessionMode !== "event" && body.sessionMode !== "continuation") ||
32
+ !boundedString(body.mailboxContinuationKey, 512)) {
33
+ return undefined;
34
+ }
35
+ const prefix = body.sessionMode === "event" ? "evt:" : "cont:";
36
+ return body.mailboxContinuationKey.startsWith(prefix)
37
+ ? body
38
+ : undefined;
39
+ }
40
+ export function parseHostedExecution(value) {
41
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
42
+ return undefined;
43
+ }
44
+ const body = value;
45
+ if (Object.keys(body).some((key) => !EXECUTION_KEYS.has(key)) ||
46
+ body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
47
+ !boundedString(body.admissionToken, 128) ||
48
+ typeof body.sessionPublicId !== "string" ||
49
+ !/^ses_[a-f0-9]{24}$/.test(body.sessionPublicId)) {
50
+ return undefined;
51
+ }
52
+ return body;
53
+ }
54
+ export function parseHostedAdmissionOutcome(value) {
55
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
56
+ return undefined;
57
+ }
58
+ const body = value;
59
+ if (body.ok !== true ||
60
+ body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
61
+ (body.outcome !== "skip" &&
62
+ body.outcome !== "send" &&
63
+ body.outcome !== "task")) {
64
+ return undefined;
65
+ }
66
+ if (body.outcome === "send" && !boundedString(body.admissionToken, 128)) {
67
+ return undefined;
68
+ }
69
+ return body;
70
+ }
@@ -0,0 +1,35 @@
1
+ import type { ChannelHandlerArgs, SendMessageOptions } from "../types.js";
2
+ import { type HostedAdmission } from "./hosted-delivery-protocol.js";
3
+ import type { Router } from "./router.js";
4
+ type DispatchInput = {
5
+ delivery: HostedAdmission;
6
+ definition: object;
7
+ args: ChannelHandlerArgs;
8
+ };
9
+ type PendingSend = {
10
+ channelId: string;
11
+ message: string;
12
+ options: SendMessageOptions;
13
+ mailboxContinuationKey: string;
14
+ };
15
+ type AdmissionDispatch = {
16
+ response: Response;
17
+ pendingSend?: PendingSend;
18
+ };
19
+ /**
20
+ * Run authored admission without creating a framework session. V1 GitHub
21
+ * `task` callbacks execute as sessionless work; `send` is captured and
22
+ * resumed only after the control plane allocates `ses_…`.
23
+ */
24
+ export declare function dispatchHostedAdmission(input: DispatchInput): Promise<AdmissionDispatch>;
25
+ export declare function registerHostedDeliveryRoute(input: {
26
+ router: Router;
27
+ base: string;
28
+ channels: Array<{
29
+ id: string;
30
+ definition: object;
31
+ }>;
32
+ buildHandlerArgs(channelId: string, sessionPublicId?: string): ChannelHandlerArgs;
33
+ }): void;
34
+ export {};
35
+ //# sourceMappingURL=hosted-delivery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-delivery.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAEV,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,eAAe,EAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,sBAAsB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAgBF;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,aAAa,GACnB,OAAO,CAAC,iBAAiB,CAAC,CA2G5B;AAeD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,gBAAgB,CACd,SAAS,EAAE,MAAM,EACjB,eAAe,CAAC,EAAE,MAAM,GACvB,kBAAkB,CAAC;CACvB,GAAG,IAAI,CAqKP"}