@cursor/july 0.1.97 → 0.1.100

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 (337) hide show
  1. package/AGENTS.md +5 -3
  2. package/dist/bin/agent-serve.js +6 -7
  3. package/dist/channels/github/defaults.d.ts.map +1 -1
  4. package/dist/channels/github/defaults.js +28 -3
  5. package/dist/channels/github/github-channel.d.ts.map +1 -1
  6. package/dist/channels/github/github-channel.js +16 -0
  7. package/dist/channels/github/progress.d.ts +7 -0
  8. package/dist/channels/github/progress.d.ts.map +1 -1
  9. package/dist/channels/origin/origin-channel.d.ts +2 -0
  10. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  11. package/dist/channels/origin/origin-channel.js +37 -4
  12. package/dist/channels/slack/api.d.ts +16 -7
  13. package/dist/channels/slack/api.d.ts.map +1 -1
  14. package/dist/channels/slack/api.js +29 -13
  15. package/dist/channels/slack/constants.d.ts +6 -0
  16. package/dist/channels/slack/constants.d.ts.map +1 -1
  17. package/dist/channels/slack/constants.js +6 -0
  18. package/dist/channels/slack/defaults.d.ts +9 -4
  19. package/dist/channels/slack/defaults.d.ts.map +1 -1
  20. package/dist/channels/slack/defaults.js +221 -122
  21. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  22. package/dist/channels/slack/dispatch.js +3 -3
  23. package/dist/channels/slack/inbound.d.ts +9 -0
  24. package/dist/channels/slack/inbound.d.ts.map +1 -1
  25. package/dist/channels/slack/inbound.js +14 -0
  26. package/dist/channels/slack/index.d.ts +1 -0
  27. package/dist/channels/slack/index.d.ts.map +1 -1
  28. package/dist/channels/slack/index.js +1 -0
  29. package/dist/channels/slack/live-delivery.d.ts +6 -1
  30. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  31. package/dist/channels/slack/live-delivery.js +110 -20
  32. package/dist/channels/slack/progress-delivery.d.ts +28 -0
  33. package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
  34. package/dist/channels/slack/progress-delivery.js +115 -0
  35. package/dist/channels/slack/reasoning-card.d.ts +38 -0
  36. package/dist/channels/slack/reasoning-card.d.ts.map +1 -0
  37. package/dist/channels/slack/reasoning-card.js +104 -0
  38. package/dist/channels/slack/redact.d.ts +2 -0
  39. package/dist/channels/slack/redact.d.ts.map +1 -0
  40. package/dist/channels/slack/redact.js +5 -0
  41. package/dist/channels/slack/reply-options.d.ts +40 -0
  42. package/dist/channels/slack/reply-options.d.ts.map +1 -0
  43. package/dist/channels/slack/reply-options.js +150 -0
  44. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  45. package/dist/channels/slack/slack-channel.js +8 -4
  46. package/dist/channels/slack/stream.d.ts +22 -10
  47. package/dist/channels/slack/stream.d.ts.map +1 -1
  48. package/dist/channels/slack/stream.js +9 -16
  49. package/dist/channels/slack/tool-cards.d.ts +22 -0
  50. package/dist/channels/slack/tool-cards.d.ts.map +1 -0
  51. package/dist/channels/slack/tool-cards.js +178 -0
  52. package/dist/channels/slack/types.d.ts +154 -7
  53. package/dist/channels/slack/types.d.ts.map +1 -1
  54. package/dist/docs/404.html +2 -2
  55. package/dist/docs/ab.html +6 -6
  56. package/dist/docs/ab.md +1 -1
  57. package/dist/docs/assets/{ab.md.DJo5r4R-.js → ab.md.mlVgqvSk.js} +1 -1
  58. package/dist/docs/assets/{app.B3rWNYE1.js → app.DZ1e0Ycq.js} +1 -1
  59. package/dist/docs/assets/{building-with-agents.md.DI4mEzlt.js → building-with-agents.md.CUSWxlP_.js} +2 -2
  60. package/dist/docs/assets/chunks/@localSearchIndexroot.j70vvPL4.js +1 -0
  61. package/dist/docs/assets/chunks/{VPLocalSearchBox.C1lhqJJR.js → VPLocalSearchBox.l8omwc6D.js} +1 -1
  62. package/dist/docs/assets/chunks/{theme.B40_SXuv.js → theme.JVcD6gel.js} +2 -2
  63. package/dist/docs/assets/{evals.md.lfJoEVc8.js → evals.md.CPzDAwoH.js} +1 -1
  64. package/dist/docs/assets/{guides_github.md.Cnh2mL4a.js → guides_github.md.BtPr9GaP.js} +1 -1
  65. package/dist/docs/assets/{guides_mcp-oauth.md.CN-6YmTJ.js → guides_mcp-oauth.md.Dp6cDP7f.js} +1 -1
  66. package/dist/docs/assets/{guides_opentelemetry.md.bmPmkvJu.js → guides_opentelemetry.md.BVTXDCRg.js} +2 -2
  67. package/dist/docs/assets/{guides_slack.md.VDXQV3ja.js → guides_slack.md.9oHPye9o.js} +19 -3
  68. package/dist/docs/assets/{guides_slack.md.VDXQV3ja.lean.js → guides_slack.md.9oHPye9o.lean.js} +1 -1
  69. package/dist/docs/assets/hillclimbing.md.CpTGTCle.js +4 -0
  70. package/dist/docs/assets/{index.md.CVeRUOeZ.js → index.md.Bb4k8kUm.js} +1 -1
  71. package/dist/docs/assets/{quickstart.md.Nj_LjW_a.js → quickstart.md.DdQOF7Y8.js} +1 -1
  72. package/dist/docs/assets/{reference_cli.md.RyZf5OTE.js → reference_cli.md.DfoeyvL0.js} +4 -4
  73. package/dist/docs/assets/{reference_cli.md.RyZf5OTE.lean.js → reference_cli.md.DfoeyvL0.lean.js} +1 -1
  74. package/dist/docs/assets/{reference_connections.md.DxldvyIB.js → reference_connections.md.BiGoBAk2.js} +1 -1
  75. package/dist/docs/assets/{reference_http-api.md.5zOAbV86.js → reference_http-api.md.BEJx9XVj.js} +1 -1
  76. package/dist/docs/assets/{reference_tools.md.B84gw9Ii.js → reference_tools.md.CvAHsdSp.js} +10 -2
  77. package/dist/docs/assets/{reference_tools.md.B84gw9Ii.lean.js → reference_tools.md.CvAHsdSp.lean.js} +1 -1
  78. package/dist/docs/assets/scaffolding-agents.md.em43xlY1.js +1 -0
  79. package/dist/docs/assets/skills_ab.md.CsFNatVx.js +26 -0
  80. package/dist/docs/assets/skills_ab.md.CsFNatVx.lean.js +1 -0
  81. package/dist/docs/assets/skills_create-agent.md.BVoWPcan.js +8 -0
  82. package/dist/docs/assets/skills_create-agent.md.BVoWPcan.lean.js +1 -0
  83. package/dist/docs/assets/skills_debug.md.CDbPhHfg.js +1 -0
  84. package/dist/docs/assets/skills_debug.md.CDbPhHfg.lean.js +1 -0
  85. package/dist/docs/assets/skills_evals.md.723kpUmA.js +25 -0
  86. package/dist/docs/assets/skills_evals.md.723kpUmA.lean.js +1 -0
  87. package/dist/docs/assets/skills_framework-map.md.BTi817yv.js +1 -0
  88. package/dist/docs/assets/skills_framework-map.md.BTi817yv.lean.js +1 -0
  89. package/dist/docs/assets/skills_github.md.D0JahM8c.js +16 -0
  90. package/dist/docs/assets/skills_github.md.D0JahM8c.lean.js +1 -0
  91. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +7 -0
  92. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +1 -0
  93. package/dist/docs/assets/skills_index.md.DKwIxzGg.js +1 -0
  94. package/dist/docs/assets/skills_index.md.DKwIxzGg.lean.js +1 -0
  95. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +18 -0
  96. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +1 -0
  97. package/dist/docs/assets/skills_otel.md.CgiZryR3.js +8 -0
  98. package/dist/docs/assets/skills_otel.md.CgiZryR3.lean.js +1 -0
  99. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +20 -0
  100. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +1 -0
  101. package/dist/docs/assets/{troubleshooting.md.DCiPBhYs.js → troubleshooting.md.Cus_YZga.js} +1 -1
  102. package/dist/docs/building-with-agents.html +6 -6
  103. package/dist/docs/building-with-agents.md +14 -11
  104. package/dist/docs/concepts.html +4 -4
  105. package/dist/docs/deployment.html +4 -4
  106. package/dist/docs/design/runtime-abstraction.md +1757 -0
  107. package/dist/docs/evals.html +6 -6
  108. package/dist/docs/evals.md +1 -1
  109. package/dist/docs/guides/agent-to-agent.html +4 -4
  110. package/dist/docs/guides/cloud-runtime.html +4 -4
  111. package/dist/docs/guides/convert-automation.html +4 -4
  112. package/dist/docs/guides/github.html +5 -5
  113. package/dist/docs/guides/github.md +1 -1
  114. package/dist/docs/guides/human-in-the-loop.html +4 -4
  115. package/dist/docs/guides/mcp-oauth.html +5 -5
  116. package/dist/docs/guides/mcp-oauth.md +1 -1
  117. package/dist/docs/guides/opentelemetry.html +7 -7
  118. package/dist/docs/guides/opentelemetry.md +2 -2
  119. package/dist/docs/guides/slack.html +22 -6
  120. package/dist/docs/guides/slack.md +80 -1
  121. package/dist/docs/guides/webhooks.html +5 -5
  122. package/dist/docs/hashmap.json +1 -1
  123. package/dist/docs/hillclimbing.html +6 -6
  124. package/dist/docs/hillclimbing.md +5 -5
  125. package/dist/docs/index.html +6 -6
  126. package/dist/docs/index.md +1 -1
  127. package/dist/docs/llms-full.txt +2830 -37
  128. package/dist/docs/llms.txt +15 -0
  129. package/dist/docs/quickstart.html +5 -5
  130. package/dist/docs/quickstart.md +1 -1
  131. package/dist/docs/reference/agent-config.html +4 -4
  132. package/dist/docs/reference/artifacts.html +4 -4
  133. package/dist/docs/reference/channels.html +4 -4
  134. package/dist/docs/reference/cli.html +7 -7
  135. package/dist/docs/reference/cli.md +1 -7
  136. package/dist/docs/reference/connections.html +6 -6
  137. package/dist/docs/reference/connections.md +1 -1
  138. package/dist/docs/reference/hooks.html +4 -4
  139. package/dist/docs/reference/http-api.html +6 -6
  140. package/dist/docs/reference/http-api.md +1 -0
  141. package/dist/docs/reference/instructions.html +4 -4
  142. package/dist/docs/reference/playground.html +4 -4
  143. package/dist/docs/reference/project-layout.html +4 -4
  144. package/dist/docs/reference/prompt.html +4 -4
  145. package/dist/docs/reference/schedules.html +4 -4
  146. package/dist/docs/reference/sessions.html +4 -4
  147. package/dist/docs/reference/skills.html +4 -4
  148. package/dist/docs/reference/subagents.html +4 -4
  149. package/dist/docs/reference/tools.html +14 -6
  150. package/dist/docs/reference/tools.md +25 -0
  151. package/dist/docs/scaffolding-agents.html +5 -5
  152. package/dist/docs/scaffolding-agents.md +3 -3
  153. package/dist/docs/skills/ab.html +52 -0
  154. package/dist/docs/skills/ab.md +50 -0
  155. package/dist/docs/skills/create-agent.html +34 -0
  156. package/dist/docs/skills/create-agent.md +160 -0
  157. package/dist/docs/skills/debug.html +27 -0
  158. package/dist/docs/skills/debug.md +36 -0
  159. package/dist/docs/skills/evals.html +51 -0
  160. package/dist/docs/skills/evals.md +99 -0
  161. package/dist/docs/skills/framework-map.html +27 -0
  162. package/dist/docs/skills/framework-map.md +95 -0
  163. package/dist/docs/skills/github.html +42 -0
  164. package/dist/docs/skills/github.md +93 -0
  165. package/dist/docs/skills/hillclimb.html +33 -0
  166. package/dist/docs/skills/hillclimb.md +55 -0
  167. package/dist/docs/skills/index.html +27 -0
  168. package/dist/docs/skills/index.md +21 -0
  169. package/dist/docs/skills/mcp-auth.html +44 -0
  170. package/dist/docs/skills/mcp-auth.md +76 -0
  171. package/dist/docs/skills/otel.html +34 -0
  172. package/dist/docs/skills/otel.md +48 -0
  173. package/dist/docs/skills/setup-slack.html +46 -0
  174. package/dist/docs/skills/setup-slack.md +141 -0
  175. package/dist/docs/storage.html +4 -4
  176. package/dist/docs/templates/agentic-owners.html +4 -4
  177. package/dist/docs/templates/agents-md.html +4 -4
  178. package/dist/docs/templates/code-wiki.html +4 -4
  179. package/dist/docs/templates/demo.html +4 -4
  180. package/dist/docs/templates/pr-autofixer.html +4 -4
  181. package/dist/docs/templates/security-help.html +4 -4
  182. package/dist/docs/templates/security-reviewer.html +4 -4
  183. package/dist/docs/templates/triage.html +4 -4
  184. package/dist/docs/troubleshooting.html +5 -5
  185. package/dist/docs/troubleshooting.md +1 -1
  186. package/dist/files-backends/cursor-hosted.d.ts +9 -2
  187. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  188. package/dist/files-backends/cursor-hosted.js +9 -11
  189. package/dist/index.d.ts +1 -0
  190. package/dist/index.d.ts.map +1 -1
  191. package/dist/index.js +1 -0
  192. package/dist/internal/as-of.d.ts +19 -0
  193. package/dist/internal/as-of.d.ts.map +1 -0
  194. package/dist/internal/as-of.js +82 -0
  195. package/dist/internal/cli-deploy.d.ts +2 -1
  196. package/dist/internal/cli-deploy.d.ts.map +1 -1
  197. package/dist/internal/cli-deploy.js +102 -7
  198. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  199. package/dist/internal/conversation-mirror.js +3 -4
  200. package/dist/internal/cursor/hosted-store-secrets.d.ts +15 -0
  201. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -0
  202. package/dist/internal/cursor/hosted-store-secrets.js +48 -0
  203. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  204. package/dist/internal/cursor-event-relay.js +5 -6
  205. package/dist/internal/deploy-client.d.ts +6 -6
  206. package/dist/internal/deploy-client.js +7 -7
  207. package/dist/internal/discovery.d.ts.map +1 -1
  208. package/dist/internal/discovery.js +11 -1
  209. package/dist/internal/framework-file-storage.d.ts +5 -4
  210. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  211. package/dist/internal/framework-file-storage.js +6 -4
  212. package/dist/internal/framework-storage-selection.d.ts +13 -11
  213. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  214. package/dist/internal/framework-storage-selection.js +28 -23
  215. package/dist/internal/hosted-admission-adapter.d.ts +28 -0
  216. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
  217. package/dist/internal/hosted-admission-adapter.js +7 -0
  218. package/dist/internal/hosted-delivery-protocol.d.ts +6 -1
  219. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  220. package/dist/internal/hosted-delivery-protocol.js +1 -1
  221. package/dist/internal/hosted-delivery.d.ts +15 -1
  222. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  223. package/dist/internal/hosted-delivery.js +47 -21
  224. package/dist/internal/hosted-execution-diag.d.ts +11 -0
  225. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  226. package/dist/internal/hosted-execution-diag.js +39 -2
  227. package/dist/internal/http-channel.d.ts.map +1 -1
  228. package/dist/internal/http-channel.js +4 -1
  229. package/dist/internal/server.d.ts +3 -0
  230. package/dist/internal/server.d.ts.map +1 -1
  231. package/dist/internal/server.js +82 -19
  232. package/dist/internal/session-engine.d.ts.map +1 -1
  233. package/dist/internal/session-engine.js +24 -4
  234. package/dist/internal/session-run-log.d.ts +120 -0
  235. package/dist/internal/session-run-log.d.ts.map +1 -0
  236. package/dist/internal/session-run-log.js +358 -0
  237. package/dist/internal/tool-policy.d.ts +20 -8
  238. package/dist/internal/tool-policy.d.ts.map +1 -1
  239. package/dist/internal/tool-policy.js +11 -0
  240. package/dist/playground/assets/index-BszoQDc6.css +1 -0
  241. package/dist/playground/assets/index-DVs98vPL.js +69 -0
  242. package/dist/playground/index.html +2 -2
  243. package/dist/storage-backends/cursor-hosted-v2.d.ts +83 -0
  244. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -0
  245. package/dist/storage-backends/cursor-hosted-v2.js +164 -0
  246. package/dist/storage-backends/cursor-hosted.d.ts +6 -0
  247. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  248. package/dist/storage-backends/cursor-hosted.js +6 -1
  249. package/dist/storage-protocol.d.ts +8 -0
  250. package/dist/storage-protocol.d.ts.map +1 -1
  251. package/dist/storage-protocol.js +8 -0
  252. package/dist/tools.d.ts +12 -2
  253. package/dist/tools.d.ts.map +1 -1
  254. package/dist/types.d.ts +30 -0
  255. package/dist/types.d.ts.map +1 -1
  256. package/docs/README.md +1 -1
  257. package/docs/ab.md +1 -1
  258. package/docs/building-with-agents.md +14 -11
  259. package/docs/design/runtime-abstraction.md +1757 -0
  260. package/docs/evals.md +1 -1
  261. package/docs/guides/github.md +1 -1
  262. package/docs/guides/mcp-oauth.md +1 -1
  263. package/docs/guides/opentelemetry.md +2 -2
  264. package/docs/guides/slack.md +80 -1
  265. package/docs/hillclimbing.md +5 -5
  266. package/docs/quickstart.md +1 -1
  267. package/docs/reference/cli.md +1 -7
  268. package/docs/reference/connections.md +1 -1
  269. package/docs/reference/http-api.md +1 -0
  270. package/docs/reference/tools.md +25 -0
  271. package/docs/scaffolding-agents.md +3 -3
  272. package/docs/skills/index.md +26 -0
  273. package/docs/troubleshooting.md +1 -1
  274. package/package.json +1 -1
  275. package/src/bin/agent-serve.ts +6 -7
  276. package/src/channels/github/defaults.ts +36 -3
  277. package/src/channels/github/github-channel.ts +17 -0
  278. package/src/channels/github/progress.ts +7 -0
  279. package/src/channels/origin/origin-channel.ts +74 -10
  280. package/src/channels/slack/api.ts +35 -17
  281. package/src/channels/slack/constants.ts +6 -0
  282. package/src/channels/slack/defaults.ts +253 -144
  283. package/src/channels/slack/dispatch.ts +10 -1
  284. package/src/channels/slack/inbound.ts +17 -0
  285. package/src/channels/slack/index.ts +1 -0
  286. package/src/channels/slack/live-delivery.ts +135 -22
  287. package/src/channels/slack/progress-delivery.ts +133 -0
  288. package/src/channels/slack/reasoning-card.ts +140 -0
  289. package/src/channels/slack/redact.ts +6 -0
  290. package/src/channels/slack/reply-options.ts +229 -0
  291. package/src/channels/slack/slack-channel.ts +7 -2
  292. package/src/channels/slack/stream.ts +31 -24
  293. package/src/channels/slack/tool-cards.ts +221 -0
  294. package/src/channels/slack/types.ts +168 -7
  295. package/src/files-backends/cursor-hosted.ts +18 -7
  296. package/src/index.ts +4 -0
  297. package/src/internal/as-of.ts +107 -0
  298. package/src/internal/cli-deploy.ts +130 -10
  299. package/src/internal/conversation-mirror.ts +3 -8
  300. package/src/internal/cursor/hosted-store-secrets.ts +72 -0
  301. package/src/internal/cursor-event-relay.ts +5 -6
  302. package/src/internal/deploy-client.ts +10 -10
  303. package/src/internal/discovery.ts +9 -1
  304. package/src/internal/framework-file-storage.ts +6 -4
  305. package/src/internal/framework-storage-selection.ts +28 -25
  306. package/src/internal/hosted-admission-adapter.ts +42 -0
  307. package/src/internal/hosted-delivery-protocol.ts +7 -2
  308. package/src/internal/hosted-delivery.ts +88 -36
  309. package/src/internal/hosted-execution-diag.ts +45 -0
  310. package/src/internal/http-channel.ts +8 -0
  311. package/src/internal/server.ts +100 -2
  312. package/src/internal/session-engine.ts +32 -1
  313. package/src/internal/session-run-log.ts +579 -0
  314. package/src/internal/tool-policy.ts +31 -9
  315. package/src/storage-backends/cursor-hosted-v2.ts +219 -0
  316. package/src/storage-backends/cursor-hosted.ts +6 -1
  317. package/src/storage-protocol.ts +10 -0
  318. package/src/tools.ts +12 -2
  319. package/src/types.ts +30 -0
  320. package/dist/docs/assets/chunks/@localSearchIndexroot.BU9nHdnQ.js +0 -1
  321. package/dist/docs/assets/hillclimbing.md.DhESf3OO.js +0 -4
  322. package/dist/docs/assets/scaffolding-agents.md.D7UUkWw0.js +0 -1
  323. package/dist/playground/assets/index-DrkI6y5O.js +0 -88
  324. package/dist/playground/assets/index-DzNGwm7q.css +0 -1
  325. /package/dist/docs/assets/{ab.md.DJo5r4R-.lean.js → ab.md.mlVgqvSk.lean.js} +0 -0
  326. /package/dist/docs/assets/{building-with-agents.md.DI4mEzlt.lean.js → building-with-agents.md.CUSWxlP_.lean.js} +0 -0
  327. /package/dist/docs/assets/{evals.md.lfJoEVc8.lean.js → evals.md.CPzDAwoH.lean.js} +0 -0
  328. /package/dist/docs/assets/{guides_github.md.Cnh2mL4a.lean.js → guides_github.md.BtPr9GaP.lean.js} +0 -0
  329. /package/dist/docs/assets/{guides_mcp-oauth.md.CN-6YmTJ.lean.js → guides_mcp-oauth.md.Dp6cDP7f.lean.js} +0 -0
  330. /package/dist/docs/assets/{guides_opentelemetry.md.bmPmkvJu.lean.js → guides_opentelemetry.md.BVTXDCRg.lean.js} +0 -0
  331. /package/dist/docs/assets/{hillclimbing.md.DhESf3OO.lean.js → hillclimbing.md.CpTGTCle.lean.js} +0 -0
  332. /package/dist/docs/assets/{index.md.CVeRUOeZ.lean.js → index.md.Bb4k8kUm.lean.js} +0 -0
  333. /package/dist/docs/assets/{quickstart.md.Nj_LjW_a.lean.js → quickstart.md.DdQOF7Y8.lean.js} +0 -0
  334. /package/dist/docs/assets/{reference_connections.md.DxldvyIB.lean.js → reference_connections.md.BiGoBAk2.lean.js} +0 -0
  335. /package/dist/docs/assets/{reference_http-api.md.5zOAbV86.lean.js → reference_http-api.md.BEJx9XVj.lean.js} +0 -0
  336. /package/dist/docs/assets/{scaffolding-agents.md.D7UUkWw0.lean.js → scaffolding-agents.md.em43xlY1.lean.js} +0 -0
  337. /package/dist/docs/assets/{troubleshooting.md.DCiPBhYs.lean.js → troubleshooting.md.Cus_YZga.lean.js} +0 -0
package/docs/evals.md CHANGED
@@ -428,7 +428,7 @@ resolution for other file formats).
428
428
  `maxConcurrency` limits parallel datapoints. It does not limit model or
429
429
  API fan-out inside one datapoint. Materialized fixtures prevent a large
430
430
  suite from exhausting provider and GitHub rate limits. The
431
- [evals skill](../skills/evals/SKILL.md) has the full fixture workflow.
431
+ [evals skill](./skills/evals.md) has the full fixture workflow.
432
432
 
433
433
  ## Keep improvements with regression evals
434
434
 
@@ -11,7 +11,7 @@ event stream for repos you've connected to Cursor. You still declare a
11
11
  `githubChannel` so hooks decide what each event does.
12
12
 
13
13
  The companion skill for coding agents is
14
- [`skills/github/SKILL.md`](../../skills/github/SKILL.md).
14
+ [`skills/github/SKILL.md`](../skills/github.md).
15
15
 
16
16
  ## Pull events from Cursor
17
17
 
@@ -13,7 +13,7 @@ deployment as secrets so prod can reconnect after a redeploy. Hosted
13
13
  Connect lets the current process retry.
14
14
 
15
15
  The companion skill is
16
- [`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
16
+ [`skills/mcp-auth/SKILL.md`](../skills/mcp-auth.md).
17
17
 
18
18
  ## What can host MCP OAuth do?
19
19
 
@@ -91,7 +91,7 @@ You can also pass the same object to `serve(dir, { otel })`. Precedence
91
91
  is `serve({ otel })` over `agent/otel.ts` over env. An empty
92
92
  `defineOtel()` still enables export when `OTEL_EXPORTER_OTLP_*` is set.
93
93
 
94
- The companion skill is [`skills/otel/SKILL.md`](../../skills/otel/SKILL.md).
94
+ The companion skill is [`skills/otel/SKILL.md`](../skills/otel.md).
95
95
 
96
96
  ## What spans does a session produce?
97
97
 
@@ -206,7 +206,7 @@ through `serve({ otel })` or env.
206
206
 
207
207
  ## What's next
208
208
 
209
- - [`skills/otel/SKILL.md`](../../skills/otel/SKILL.md): compact
209
+ - [`skills/otel/SKILL.md`](../skills/otel.md): compact
210
210
  `defineOtel` reference for coding agents
211
211
  - [Hooks](../reference/hooks.md): observe the same session event stream
212
212
  in-process
@@ -12,7 +12,7 @@ Replies stream there, with thinking steps and suggested prompts.
12
12
  Use `agent-sdk slack create` when Cursor should own the Slack app. Use
13
13
  `agent-sdk slack init --manual` when you own it. Commands and flags live
14
14
  in the [CLI reference](../reference/cli.md#slack). Coding agents should
15
- follow [`skills/setup-slack/SKILL.md`](../../skills/setup-slack/SKILL.md).
15
+ follow [`skills/setup-slack/SKILL.md`](../skills/setup-slack.md).
16
16
 
17
17
  ## Define the channel
18
18
 
@@ -55,6 +55,85 @@ export default slackChannel({
55
55
  });
56
56
  ```
57
57
 
58
+ ## Choose how the reply arrives
59
+
60
+ Slack gives an agent two places to show progress while a turn runs: the
61
+ status chip under the thread ("Running grep…") and the reply message
62
+ itself. It won't fill both at once. While a message is streaming, Slack
63
+ shows its own "is working…" chip and hides any status text you set. Cards
64
+ only exist inside a streamed message. `reply.mode` picks which one you get.
65
+
66
+ ### `post` (default): status chip, then one message
67
+
68
+ Tool calls and the first line of each reasoning block show in the chip as
69
+ they happen. The answer lands as a single message when the turn finishes.
70
+
71
+ ```ts
72
+ export default slackChannel({
73
+ reply: {
74
+ mode: "post",
75
+ status: {
76
+ reasoning: true,
77
+ tools: true,
78
+ idle: ["Checking the monorepo…", "Poking Datadog…"],
79
+ },
80
+ },
81
+ });
82
+ ```
83
+
84
+ `idle` is the rotation Slack cycles through when nothing more specific is
85
+ known, up to 5 lines of 50 characters. Pass a function to `tools` to write
86
+ your own line from the calls in flight.
87
+
88
+ ### `stream`: live text, with cards
89
+
90
+ The answer streams into one message as the model writes it. Slack owns the
91
+ chip for the duration, so live feedback inside the message comes from
92
+ cards. Both are off unless you turn them on.
93
+
94
+ ```ts
95
+ export default slackChannel({
96
+ reply: {
97
+ mode: "stream",
98
+ reasoningCard: true,
99
+ toolCards: { group: "per-tool" },
100
+ },
101
+ toolLabels: { grep: "Searching code", read: "Reading files" },
102
+ });
103
+ ```
104
+
105
+ The reasoning card is one task card, titled "Thinking", that receives the
106
+ model's reasoning as it streams and completes when the answer text starts.
107
+ `maxChars` (default 1500) caps how much it collects. Slack caps a streamed
108
+ message near 12k characters including cards; when an answer outgrows that,
109
+ the streamed message closes where it stands and the rest continues in a
110
+ new message.
111
+
112
+ Tool cards default to one card per tool name with a call count in the title
113
+ (`grep ×3`), updated in place as calls finish. `group: "per-call"` shows one
114
+ card per call instead.
115
+
116
+ Cards are collapsible by default: each call adds one line under the title,
117
+ the same summary the playground shows in a tool's header (the grep pattern,
118
+ the file path, the shell command), and the group expands the same way the
119
+ reasoning card does. `collapsible: false` keeps cards to their titles. On a
120
+ collapsible card, `details(call)` returns the line to add when a call starts
121
+ and `output(result)` the text to add when it finishes.
122
+
123
+ `toolLabels` renames tools everywhere they appear: the chip, card titles,
124
+ and the default `Running …` line.
125
+
126
+ ### Migrating from `streaming` and `thinkingSteps`
127
+
128
+ `streaming: false` is `reply: { mode: "post" }`. `streaming: true` is
129
+ `reply: { mode: "stream", toolCards: { group: "per-call", collapsible:
130
+ false } }`, the title-only cards it used to show. `loadingMessages` moves
131
+ to `reply.status.idle`. The old options still work and `agent-sdk validate`
132
+ prints the rewrite for each one.
133
+
134
+ A channel that set none of these used to stream. It now posts. Set
135
+ `reply: { mode: "stream" }` to keep streaming.
136
+
58
137
  ## Set it up
59
138
 
60
139
  `slack create` opens the Cursor dashboard wizard. Finish Slack consent
@@ -22,7 +22,7 @@ flowchart LR
22
22
 
23
23
  ## How do I hillclimb an agent with a coding agent?
24
24
 
25
- Have Cursor read [`skills/hillclimb/SKILL.md`](../skills/hillclimb/SKILL.md).
25
+ Have Cursor read [`skills/hillclimb/SKILL.md`](./skills/hillclimb.md).
26
26
 
27
27
  Tell it:
28
28
 
@@ -36,10 +36,10 @@ Other skills cover the edges:
36
36
 
37
37
  | When you need… | Skill |
38
38
  | --- | --- |
39
- | The measured improvement loop | [`skills/hillclimb/SKILL.md`](../skills/hillclimb/SKILL.md) |
40
- | An eval that locks a kept win | [`skills/evals/SKILL.md`](../skills/evals/SKILL.md) |
41
- | Repeatable GitHub webhook inputs | [`skills/github/SKILL.md`](../skills/github/SKILL.md) |
42
- | A run that misbehaves | [`skills/debug/SKILL.md`](../skills/debug/SKILL.md) |
39
+ | The measured improvement loop | [`skills/hillclimb/SKILL.md`](./skills/hillclimb.md) |
40
+ | An eval that locks a kept win | [`skills/evals/SKILL.md`](./skills/evals.md) |
41
+ | Repeatable GitHub webhook inputs | [`skills/github/SKILL.md`](./skills/github.md) |
42
+ | A run that misbehaves | [`skills/debug/SKILL.md`](./skills/debug.md) |
43
43
 
44
44
  See [Building agents with agents](./building-with-agents.md) for every framework skill and a good first prompt.
45
45
 
@@ -13,7 +13,7 @@ review. Add GitHub event handling so pull requests can trigger reviews.
13
13
 
14
14
  - **Get started with an agent in Cursor:** follow
15
15
  [Scaffold an agent with Cursor](./scaffolding-agents.md) and ask Cursor
16
- to read [`skills/create-agent/SKILL.md`](../skills/create-agent/SKILL.md).
16
+ to read [`skills/create-agent/SKILL.md`](./skills/create-agent.md).
17
17
  - **Get started in the CLI:** continue below.
18
18
 
19
19
  ## Prerequisites
@@ -594,7 +594,7 @@ commands with an explicit `--json` flag skip this automatic check.
594
594
  agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
595
595
  [--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
596
596
  [--cursor-events-repo owner/name]...
597
- [--allow-domain <domain>]... [--multi-tenant]
597
+ [--allow-domain <domain>]...
598
598
  [--no-wait] [--json]
599
599
  ```
600
600
 
@@ -622,12 +622,6 @@ be a lowercase hostname with at least two labels and an alphabetic
622
622
  top-level domain. One leading `*.` wildcard is allowed. A deployment
623
623
  can declare at most 20 domains.
624
624
 
625
- `--multi-tenant` adds a release to an existing Cursor-managed
626
- (multi-tenant) product such as `security-reviewer`. It is valid only
627
- for `architecture: "v2"` and cannot create a new multi-tenant
628
- application — those stay on the operator seed path. Without the flag,
629
- HTTP deploy stays single-tenant and a managed slug 409s.
630
-
631
625
  By default, the command polls every three seconds for up to ten minutes
632
626
  and succeeds only when the deployment reaches `running`. `--no-wait`
633
627
  returns after the deployment request is accepted. Multi-agent deploys
@@ -54,7 +54,7 @@ agent-sdk mcp oauth inventory --store # also upsert deployment secrets
54
54
  ```
55
55
 
56
56
  Full walkthrough: [Host MCP OAuth](../guides/mcp-oauth.md). Companion
57
- skill: [`skills/mcp-auth/SKILL.md`](../../skills/mcp-auth/SKILL.md).
57
+ skill: [`skills/mcp-auth/SKILL.md`](../skills/mcp-auth.md).
58
58
 
59
59
  Account MCP (`cursorAccount: true`) is the right choice for connectors
60
60
  already linked in the Cursor dashboard. Omit `servers` (or pass `"*"`)
@@ -53,6 +53,7 @@ and `playgroundUrl` deep-links the session in the playground.
53
53
  | `message` | Required user message |
54
54
  | `title` | Session title |
55
55
  | `dryRun` | Run read tools and stub write tools |
56
+ | `asOf` | ISO-8601 instant with a timezone, frozen at create; the prompt states it, `ctx.now()` returns it, and tools declaring `timeArgs` refuse calls not bounded at or before it. `400` when unusable |
56
57
  | `workspaceFiles` | UTF-8 files written into the session workspace |
57
58
  | `cloud` | Per-session cloud options merged over the agent defaults |
58
59
 
@@ -147,6 +147,31 @@ export default defineTool({
147
147
  `dryRunResult` keeps the result shape stable. Without it, a stubbed write
148
148
  returns `"Operation acknowledged."`. Traces mark the result as stubbed.
149
149
 
150
+ ### Bound time arguments under `asOf`
151
+
152
+ Declare `timeArgs` with the input properties that carry time bounds. In a
153
+ session created with `asOf`, every named argument must be an absolute
154
+ ISO-8601 instant with a timezone, no later than the session's frozen
155
+ instant. A call that omits one, or supplies a relative or later value, is
156
+ refused with an error telling the model to retry with absolute bounds.
157
+ Sessions without `asOf` ignore the declaration.
158
+
159
+ ```ts
160
+ export default defineTool({
161
+ description: "Query telemetry between two instants.",
162
+ inputSchema: z.object({ since: z.string(), until: z.string() }),
163
+ effect: "read",
164
+ timeArgs: ["since", "until"],
165
+ async execute({ since, until }) {
166
+ return queryTelemetry(since, until);
167
+ },
168
+ });
169
+ ```
170
+
171
+ Every name in `timeArgs` must exist in the input schema; a session with
172
+ `asOf` refuses to start otherwise, because a misspelled name would silently
173
+ check nothing.
174
+
150
175
  ## Define an agent tool
151
176
 
152
177
  Set `execution: "agent"` and the tool materializes as a shell script
@@ -11,7 +11,7 @@ decision.
11
11
  ## What does the create-agent skill do?
12
12
 
13
13
  The bundled
14
- [`create-agent` skill](../skills/create-agent/SKILL.md) turns your goal
14
+ [`create-agent` skill](./skills/create-agent.md) turns your goal
15
15
  into a small working project. Have Cursor read that file and follow it.
16
16
 
17
17
  Where to find the file depends on how you got the package:
@@ -26,7 +26,7 @@ Where to find the file depends on how you got the package:
26
26
  - Installed `@cursor/july` as a dependency? The skill also ships inside
27
27
  the package at `node_modules/@cursor/july/skills/create-agent/SKILL.md`.
28
28
  - Working from this package's source? The skill is at
29
- [`skills/create-agent/SKILL.md`](../skills/create-agent/SKILL.md). Run
29
+ [`skills/create-agent/SKILL.md`](./skills/create-agent.md). Run
30
30
  `agent-sdk install-skills` if you want the same copies in
31
31
  `~/.cursor/skills/agentsdk/` (the package postinstall skips the
32
32
  source checkout).
@@ -119,7 +119,7 @@ without a Cursor credential. Model turns and evals need
119
119
 
120
120
  Choose one to three fixed inputs, define what should improve, and name
121
121
  what must stay unchanged. Then have Cursor follow
122
- [`skills/hillclimb/SKILL.md`](../skills/hillclimb/SKILL.md).
122
+ [`skills/hillclimb/SKILL.md`](./skills/hillclimb.md).
123
123
 
124
124
  The hillclimb skill measures a baseline, changes one lever, runs the same
125
125
  inputs again, and adds an eval for each improvement you keep.
@@ -0,0 +1,26 @@
1
+ ---
2
+ title: "Coding-agent skills"
3
+ description: "Task guides that ship with the Agent SDK for scaffolding, evals, channels, and hillclimbing."
4
+ ---
5
+
6
+ # Coding-agent skills
7
+
8
+ Each skill is a procedure a coding agent can follow. Installing
9
+ `@cursor/july` copies them into `~/.cursor/skills/agentsdk/`. This site
10
+ publishes the same files.
11
+
12
+ See [Building agents with agents](../building-with-agents.md) for when
13
+ to use each one.
14
+
15
+ | Skill | Use it to |
16
+ | --- | --- |
17
+ | [framework-map](./framework-map.md) | Learn the project layout and runtimes |
18
+ | [create-agent](./create-agent.md) | Scaffold and verify a new agent |
19
+ | [evals](./evals.md) | Write fixtures and regression checks |
20
+ | [ab](./ab.md) | Compare variants on live traffic |
21
+ | [otel](./otel.md) | Export OpenTelemetry traces |
22
+ | [hillclimb](./hillclimb.md) | Improve an agent against fixed inputs |
23
+ | [github](./github.md) | Add GitHub webhooks and replay events |
24
+ | [setup-slack](./setup-slack.md) | Connect an agent to Slack |
25
+ | [mcp-auth](./mcp-auth.md) | Authorize host MCP OAuth |
26
+ | [debug](./debug.md) | Diagnose a local run |
@@ -74,7 +74,7 @@ not on `PATH`, use `npx @cursor/july`.
74
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
- [`skills/mcp-auth/SKILL.md`](../skills/mcp-auth/SKILL.md).
77
+ [`skills/mcp-auth/SKILL.md`](./skills/mcp-auth.md).
78
78
 
79
79
  ## What if a secret showed up in a terminal transcript?
80
80
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cursor/july",
3
- "version": "0.1.97",
3
+ "version": "0.1.100",
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": {
@@ -71,6 +71,7 @@ import {
71
71
  isServeRestartWorker,
72
72
  runEnterRestartSupervisor,
73
73
  } from "../internal/serve-restart.js";
74
+ import { flushSessionRunFatal } from "../internal/session-run-log.js";
74
75
  import { clearTerminal, stdoutPalette } from "../internal/terminal-style.js";
75
76
  import { cmdUpdate, warnIfOutdated } from "../internal/update-check.js";
76
77
  import type { AgentProject, AgentServeHandle } from "../types.js";
@@ -140,7 +141,7 @@ Usage:
140
141
  ${CLI} deploy [--dir <path>] [--slug <slug> | --all] [--team <id>] [--json]
141
142
  [--no-wait] [--repo <url>] [--ref <ref>]
142
143
  [--path <agentPath>] [--cursor-events-repo <owner/name>]...
143
- [--allow-domain <domain>]... [--multi-tenant]
144
+ [--allow-domain <domain>]...
144
145
  ${CLI} manifest [--dir <path>] [--json]
145
146
  ${CLI} deployments [--team <id>] [--json]
146
147
  ${CLI} deployment <slug> [--team <id>] [--json]
@@ -268,8 +269,6 @@ Commands:
268
269
  (flags always win). When --dir is a multi-agent parent,
269
270
  pick one interactively, or pass --slug / --all. First deploy
270
271
  of a slug prints the alias token exactly once — save it.
271
- --multi-tenant adds a release to an existing Cursor-managed
272
- product (v2 only); it cannot create a new multi-tenant app.
273
272
  deployments List the team's deployments (slug, status, generation, kind).
274
273
  deployment Show one deployment in full (status, lastError, engine info).
275
274
  stop Stop a deployment and wait until it reports stopped.
@@ -432,9 +431,6 @@ Options:
432
431
  --allow-domain deploy: egress domain the engine pod may reach
433
432
  (repeatable; unioned with hosting.egressDomains from the
434
433
  agent manifest). Repo-backed deploys only.
435
- --multi-tenant deploy: add a release to an existing Cursor-managed
436
- (multi-tenant) product. architecture v2 only. Cannot
437
- create a new multi-tenant application.
438
434
  --from-argv secrets set: allow NAME=VALUE on argv (leaks into shell
439
435
  history and agent-captured terminals). Default is names
440
436
  only with a hidden prompt or piped stdin.
@@ -578,6 +574,7 @@ async function main(argv: string[]): Promise<number> {
578
574
  all: { type: "boolean", default: false },
579
575
  "cursor-events-repo": { type: "string", multiple: true },
580
576
  "allow-domain": { type: "string", multiple: true },
577
+ // Hidden Anysphere-only flag; omitted from help.
581
578
  "multi-tenant": { type: "boolean", default: false },
582
579
  "from-argv": { type: "boolean", default: false },
583
580
  strict: { type: "boolean", default: false },
@@ -1729,7 +1726,9 @@ function installTransportErrorGuards(): void {
1729
1726
  process.stderr.write(
1730
1727
  `[agent-sdk] uncaughtException: ${error.stack ?? error.message}\n`
1731
1728
  );
1732
- process.exit(1);
1729
+ void flushSessionRunFatal(error).finally(() => {
1730
+ process.exit(1);
1731
+ });
1733
1732
  });
1734
1733
  }
1735
1734
 
@@ -27,9 +27,18 @@ export function buildDefaultGitHubEvents(
27
27
  options: BuildDefaultGitHubEventsOptions = {}
28
28
  ): ChannelEventHandlers<GitHubChannelState> {
29
29
  const deliverReplies = options.deliverReplies !== false;
30
+ const requiredSuccessfulTools = new Set(
31
+ options.progress?.requireSuccessfulTools
32
+ ?.map((toolName) => toolName.trim())
33
+ .filter((toolName) => toolName !== "") ?? []
34
+ );
35
+ const toolOutcomesBySession = new Map<string, Map<string, boolean>>();
30
36
 
31
37
  return {
32
- async "turn.started"(_event, channel) {
38
+ async "turn.started"(event, channel) {
39
+ if (requiredSuccessfulTools.size > 0) {
40
+ toolOutcomesBySession.set(event.sessionId, new Map());
41
+ }
33
42
  await applyGitHubProgress({
34
43
  phase: "pending",
35
44
  channel,
@@ -52,9 +61,31 @@ export function buildDefaultGitHubEvents(
52
61
  }
53
62
  },
54
63
 
55
- async "turn.completed"(_event, channel) {
64
+ async "action.result"(event) {
65
+ if (
66
+ event.data.parentCallId !== undefined ||
67
+ !requiredSuccessfulTools.has(event.data.toolName)
68
+ ) {
69
+ return;
70
+ }
71
+ const outcomes = toolOutcomesBySession.get(event.sessionId) ?? new Map();
72
+ outcomes.set(
73
+ event.data.toolName,
74
+ !event.data.isError && event.data.stubbed !== true
75
+ );
76
+ toolOutcomesBySession.set(event.sessionId, outcomes);
77
+ },
78
+
79
+ async "turn.completed"(event, channel) {
80
+ const outcomes = toolOutcomesBySession.get(event.sessionId);
81
+ const pipelineSucceeded =
82
+ requiredSuccessfulTools.size === 0 ||
83
+ [...requiredSuccessfulTools].every(
84
+ (toolName) => outcomes?.get(toolName) === true
85
+ );
86
+ toolOutcomesBySession.delete(event.sessionId);
56
87
  await applyGitHubProgress({
57
- phase: "success",
88
+ phase: pipelineSucceeded ? "success" : "failure",
58
89
  channel,
59
90
  options,
60
91
  });
@@ -82,6 +113,7 @@ export function buildDefaultGitHubEvents(
82
113
  },
83
114
 
84
115
  async "turn.failed"(event, channel) {
116
+ toolOutcomesBySession.delete(event.sessionId);
85
117
  await applyGitHubProgress({
86
118
  phase: "failure",
87
119
  channel,
@@ -91,6 +123,7 @@ export function buildDefaultGitHubEvents(
91
123
  },
92
124
 
93
125
  async "session.failed"(event, channel) {
126
+ toolOutcomesBySession.delete(event.sessionId);
94
127
  await applyGitHubProgress({
95
128
  phase: "failure",
96
129
  channel,
@@ -13,6 +13,7 @@ import {
13
13
  } from "../../internal/continuation-identity.js";
14
14
  import { isDeferredChannelSession } from "../../internal/deferred-channel-session.js";
15
15
  import { isDevMode } from "../../internal/dev-mode.js";
16
+ import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
16
17
  import { bindLocalIngressSend } from "../../internal/local-ingress.js";
17
18
  import type {
18
19
  AgentCloudOptions,
@@ -804,6 +805,22 @@ export function githubChannel(
804
805
  ],
805
806
  });
806
807
  githubChannelOptionsByDefinition.set(definition, channelOptions);
808
+ attachHostedAdmissionAdapter(definition, {
809
+ kind: GITHUB_CHANNEL_KIND,
810
+ prepareArgs: withPropagatingGitHubBackgroundErrors,
811
+ dispatch: ({ eventType, payload, deliveryId, args }) =>
812
+ dispatchGitHubWebhook({
813
+ options: channelOptions,
814
+ eventName: eventType,
815
+ payload,
816
+ deliveryId,
817
+ args,
818
+ }),
819
+ getOutcome: (response) => {
820
+ const outcome = getGitHubDispatchOutcome(response);
821
+ return outcome === "skip" || outcome === "task" ? outcome : undefined;
822
+ },
823
+ });
807
824
  if (cursorCredentials !== undefined) {
808
825
  registerGithubCursorAccountRuntime(definition, {
809
826
  options,
@@ -35,6 +35,13 @@ export type GitHubBannerProgress = GitHubProgressPhaseCopy;
35
35
  export interface GitHubProgressConfig {
36
36
  /** When false, skip the eyes reaction on turn.started. Defaults to true. */
37
37
  reactions?: boolean;
38
+ /**
39
+ * Top-level tools that must each finish successfully before a completed
40
+ * turn is reported as successful. A missing, stubbed, or ultimately failed
41
+ * tool reports failure instead. Later successful retries replace an earlier
42
+ * failure for the same tool.
43
+ */
44
+ requireSuccessfulTools?: readonly string[];
38
45
  /**
39
46
  * Opt-in Checks API run on the PR head. Omit or `false` keeps today's
40
47
  * behavior (no check from default events). With `cursorAccount`, enabling
@@ -10,7 +10,9 @@ import {
10
10
  continuationSource,
11
11
  normalizeIdentity,
12
12
  } from "../../internal/continuation-identity.js";
13
+ import { isDeferredChannelSession } from "../../internal/deferred-channel-session.js";
13
14
  import { isDevMode } from "../../internal/dev-mode.js";
15
+ import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
14
16
  import { bindLocalIngressSend } from "../../internal/local-ingress.js";
15
17
  import type {
16
18
  AgentCloudOptions,
@@ -441,11 +443,35 @@ function enrichEventContext(input: {
441
443
  };
442
444
  }
443
445
 
446
+ export type OriginDispatchOutcome = "skip" | "send" | "task";
447
+
448
+ const dispatchOutcomeByResponse = new WeakMap<
449
+ Response,
450
+ OriginDispatchOutcome
451
+ >();
452
+
453
+ function withDispatchOutcome(
454
+ response: Response,
455
+ outcome: OriginDispatchOutcome
456
+ ): Response {
457
+ dispatchOutcomeByResponse.set(response, outcome);
458
+ return response;
459
+ }
460
+
461
+ export function getOriginDispatchOutcome(
462
+ response: Response
463
+ ): OriginDispatchOutcome | undefined {
464
+ return dispatchOutcomeByResponse.get(response);
465
+ }
466
+
444
467
  function skipped(
445
468
  reason: string,
446
469
  extra: Record<string, unknown> = {}
447
470
  ): Response {
448
- return Response.json({ ok: true, skipped: true, reason, ...extra });
471
+ return withDispatchOutcome(
472
+ Response.json({ ok: true, skipped: true, reason, ...extra }),
473
+ "skip"
474
+ );
449
475
  }
450
476
 
451
477
  function acknowledgeTask(
@@ -462,9 +488,12 @@ function acknowledgeTask(
462
488
  });
463
489
  })
464
490
  );
465
- return Response.json(
466
- { ok: true, dispatched: true, mode: "task", ...extra },
467
- { status: 202 }
491
+ return withDispatchOutcome(
492
+ Response.json(
493
+ { ok: true, dispatched: true, mode: "task", ...extra },
494
+ { status: 202 }
495
+ ),
496
+ "task"
468
497
  );
469
498
  }
470
499
 
@@ -485,12 +514,26 @@ async function startTurn(input: {
485
514
  title: input.dispatch.title ?? defaultOriginTitle(input.ctx),
486
515
  ...(input.cloud === undefined ? {} : { cloud: input.cloud }),
487
516
  });
488
- return Response.json({
489
- ok: true,
490
- sessionId: session.id,
491
- isNew: session.isNew,
492
- continuationToken: session.continuationToken,
493
- });
517
+ if (isDeferredChannelSession(session)) {
518
+ // Hosted admission captured the send; the control plane allocates the
519
+ // session after acknowledgement, so there is nothing to report yet.
520
+ return withDispatchOutcome(
521
+ Response.json(
522
+ { ok: true, dispatched: true, mode: "turn" },
523
+ { status: 202 }
524
+ ),
525
+ "send"
526
+ );
527
+ }
528
+ return withDispatchOutcome(
529
+ Response.json({
530
+ ok: true,
531
+ sessionId: session.id,
532
+ isNew: session.isNew,
533
+ continuationToken: session.continuationToken,
534
+ }),
535
+ "send"
536
+ );
494
537
  }
495
538
 
496
539
  async function resolveCloudOptions(
@@ -812,6 +855,27 @@ export function originChannel(
812
855
  ],
813
856
  });
814
857
  originChannelOptionsByDefinition.set(definition, channelOptions);
858
+ attachHostedAdmissionAdapter(definition, {
859
+ kind: ORIGIN_CHANNEL_KIND,
860
+ dispatch: async ({ payload, args }) => {
861
+ const envelope = parseOriginWebhookEnvelope(payload);
862
+ if (envelope === null) {
863
+ return Response.json(
864
+ { ok: false, error: "invalid_origin_payload" },
865
+ { status: 400 }
866
+ );
867
+ }
868
+ return dispatchOriginWebhook({
869
+ options: channelOptions,
870
+ envelope,
871
+ args,
872
+ });
873
+ },
874
+ getOutcome: (response) => {
875
+ const outcome = getOriginDispatchOutcome(response);
876
+ return outcome === "skip" || outcome === "task" ? outcome : undefined;
877
+ },
878
+ });
815
879
  if (usesCursorAccount) {
816
880
  registerOriginCursorAccountRuntime(definition, {
817
881
  options: channelOptions,