@cursor/july 0.1.102 → 0.1.104

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 (789) hide show
  1. package/AGENTS.md +34 -32
  2. package/README.md +10 -12
  3. package/dist/ab.d.ts +1 -1
  4. package/dist/ab.js +1 -1
  5. package/dist/bin/agent-serve.d.ts +12 -12
  6. package/dist/bin/agent-serve.js +114 -36
  7. package/dist/channels/bitbucket/api.d.ts +176 -0
  8. package/dist/channels/bitbucket/api.d.ts.map +1 -0
  9. package/dist/channels/bitbucket/api.js +419 -0
  10. package/dist/channels/bitbucket/binding.d.ts +71 -0
  11. package/dist/channels/bitbucket/binding.d.ts.map +1 -0
  12. package/dist/channels/bitbucket/binding.js +269 -0
  13. package/dist/channels/bitbucket/bitbucket-channel.d.ts +33 -0
  14. package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -0
  15. package/dist/channels/bitbucket/bitbucket-channel.js +120 -0
  16. package/dist/channels/bitbucket/bitbucket-webhook.d.ts +61 -0
  17. package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -0
  18. package/dist/channels/bitbucket/bitbucket-webhook.js +394 -0
  19. package/dist/channels/bitbucket/checks.d.ts +67 -0
  20. package/dist/channels/bitbucket/checks.d.ts.map +1 -0
  21. package/dist/channels/bitbucket/checks.js +102 -0
  22. package/dist/channels/bitbucket/cursor-account.d.ts +37 -0
  23. package/dist/channels/bitbucket/cursor-account.d.ts.map +1 -0
  24. package/dist/channels/bitbucket/cursor-account.js +65 -0
  25. package/dist/channels/bitbucket/defaults.d.ts +26 -0
  26. package/dist/channels/bitbucket/defaults.d.ts.map +1 -0
  27. package/dist/channels/bitbucket/defaults.js +73 -0
  28. package/dist/channels/bitbucket/events.d.ts +22 -0
  29. package/dist/channels/bitbucket/events.d.ts.map +1 -0
  30. package/dist/channels/bitbucket/events.js +64 -0
  31. package/dist/channels/bitbucket/index.d.ts +34 -0
  32. package/dist/channels/bitbucket/index.d.ts.map +1 -0
  33. package/dist/channels/bitbucket/index.js +33 -0
  34. package/dist/channels/bitbucket/replay.d.ts +63 -0
  35. package/dist/channels/bitbucket/replay.d.ts.map +1 -0
  36. package/dist/channels/bitbucket/replay.js +304 -0
  37. package/dist/channels/bitbucket/state.d.ts +35 -0
  38. package/dist/channels/bitbucket/state.d.ts.map +1 -0
  39. package/dist/channels/bitbucket/state.js +21 -0
  40. package/dist/channels/bitbucket/types.d.ts +229 -0
  41. package/dist/channels/bitbucket/types.d.ts.map +1 -0
  42. package/dist/channels/bitbucket/types.js +1 -0
  43. package/dist/channels/change-monitors/change-monitors-channel.d.ts +5 -0
  44. package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -0
  45. package/dist/channels/change-monitors/change-monitors-channel.js +41 -0
  46. package/dist/channels/change-monitors/index.d.ts +4 -0
  47. package/dist/channels/change-monitors/index.d.ts.map +1 -0
  48. package/dist/channels/change-monitors/index.js +2 -0
  49. package/dist/channels/change-monitors/types.d.ts +39 -0
  50. package/dist/channels/change-monitors/types.d.ts.map +1 -0
  51. package/dist/channels/change-monitors/types.js +1 -0
  52. package/dist/channels/deployments/deployments-channel.d.ts +22 -14
  53. package/dist/channels/deployments/deployments-channel.d.ts.map +1 -1
  54. package/dist/channels/deployments/deployments-channel.js +25 -27
  55. package/dist/channels/deployments/types.d.ts +12 -6
  56. package/dist/channels/deployments/types.d.ts.map +1 -1
  57. package/dist/channels/github/binding.d.ts +6 -0
  58. package/dist/channels/github/binding.d.ts.map +1 -1
  59. package/dist/channels/github/binding.js +3 -3
  60. package/dist/channels/github/cursor-account.d.ts +7 -3
  61. package/dist/channels/github/cursor-account.d.ts.map +1 -1
  62. package/dist/channels/github/cursor-account.js +10 -6
  63. package/dist/channels/github/defaults.d.ts.map +1 -1
  64. package/dist/channels/github/defaults.js +4 -0
  65. package/dist/channels/github/events.d.ts +1 -1
  66. package/dist/channels/github/events.js +1 -1
  67. package/dist/channels/github/forward.d.ts +1 -1
  68. package/dist/channels/github/forward.d.ts.map +1 -1
  69. package/dist/channels/github/forward.js +3 -2
  70. package/dist/channels/github/github-channel.d.ts +29 -39
  71. package/dist/channels/github/github-channel.d.ts.map +1 -1
  72. package/dist/channels/github/github-channel.js +68 -101
  73. package/dist/channels/github/progress.d.ts +22 -0
  74. package/dist/channels/github/progress.d.ts.map +1 -1
  75. package/dist/channels/github/progress.js +32 -5
  76. package/dist/channels/github/replay.d.ts +1 -1
  77. package/dist/channels/github/replay.js +1 -1
  78. package/dist/channels/github/state.d.ts +2 -0
  79. package/dist/channels/github/state.d.ts.map +1 -1
  80. package/dist/channels/github/state.js +14 -11
  81. package/dist/channels/github/types.d.ts +2 -4
  82. package/dist/channels/github/types.d.ts.map +1 -1
  83. package/dist/channels/gitlab/api.d.ts +91 -0
  84. package/dist/channels/gitlab/api.d.ts.map +1 -0
  85. package/dist/channels/gitlab/api.js +150 -0
  86. package/dist/channels/gitlab/binding.d.ts +58 -0
  87. package/dist/channels/gitlab/binding.d.ts.map +1 -0
  88. package/dist/channels/gitlab/binding.js +139 -0
  89. package/dist/channels/gitlab/checks.d.ts +110 -0
  90. package/dist/channels/gitlab/checks.d.ts.map +1 -0
  91. package/dist/channels/gitlab/checks.js +126 -0
  92. package/dist/channels/gitlab/cursor-account.d.ts +36 -0
  93. package/dist/channels/gitlab/cursor-account.d.ts.map +1 -0
  94. package/dist/channels/gitlab/cursor-account.js +65 -0
  95. package/dist/channels/gitlab/defaults.d.ts +25 -0
  96. package/dist/channels/gitlab/defaults.d.ts.map +1 -0
  97. package/dist/channels/gitlab/defaults.js +60 -0
  98. package/dist/channels/gitlab/events.d.ts +12 -0
  99. package/dist/channels/gitlab/events.d.ts.map +1 -0
  100. package/dist/channels/gitlab/events.js +28 -0
  101. package/dist/channels/gitlab/gitlab-channel.d.ts +33 -0
  102. package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -0
  103. package/dist/channels/gitlab/gitlab-channel.js +120 -0
  104. package/dist/channels/gitlab/gitlab-webhook.d.ts +45 -0
  105. package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -0
  106. package/dist/channels/gitlab/gitlab-webhook.js +397 -0
  107. package/dist/channels/gitlab/index.d.ts +31 -0
  108. package/dist/channels/gitlab/index.d.ts.map +1 -0
  109. package/dist/channels/gitlab/index.js +30 -0
  110. package/dist/channels/gitlab/replay.d.ts +105 -0
  111. package/dist/channels/gitlab/replay.d.ts.map +1 -0
  112. package/dist/channels/gitlab/replay.js +206 -0
  113. package/dist/channels/gitlab/state.d.ts +33 -0
  114. package/dist/channels/gitlab/state.d.ts.map +1 -0
  115. package/dist/channels/gitlab/state.js +23 -0
  116. package/dist/channels/gitlab/types.d.ts +214 -0
  117. package/dist/channels/gitlab/types.d.ts.map +1 -0
  118. package/dist/channels/gitlab/types.js +1 -0
  119. package/dist/channels/issues/index.d.ts +4 -0
  120. package/dist/channels/issues/index.d.ts.map +1 -0
  121. package/dist/channels/issues/index.js +2 -0
  122. package/dist/channels/issues/issues-channel.d.ts +5 -0
  123. package/dist/channels/issues/issues-channel.d.ts.map +1 -0
  124. package/dist/channels/issues/issues-channel.js +37 -0
  125. package/dist/channels/issues/types.d.ts +33 -0
  126. package/dist/channels/issues/types.d.ts.map +1 -0
  127. package/dist/channels/issues/types.js +1 -0
  128. package/dist/channels/origin/api.d.ts.map +1 -1
  129. package/dist/channels/origin/api.js +4 -2
  130. package/dist/channels/origin/origin-channel.d.ts +4 -9
  131. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  132. package/dist/channels/origin/origin-channel.js +8 -48
  133. package/dist/channels/origin/types.d.ts +20 -2
  134. package/dist/channels/origin/types.d.ts.map +1 -1
  135. package/dist/channels/slack/eval-directive.d.ts.map +1 -1
  136. package/dist/channels/slack/eval-directive.js +1 -7
  137. package/dist/channels/slack/init.d.ts.map +1 -1
  138. package/dist/channels/slack/init.js +3 -3
  139. package/dist/channels/slack/setup.d.ts +1 -1
  140. package/dist/channels/slack/setup.d.ts.map +1 -1
  141. package/dist/channels/slack/setup.js +6 -13
  142. package/dist/channels/slack/types.d.ts +1 -1
  143. package/dist/channels/slack/types.d.ts.map +1 -1
  144. package/dist/channels.d.ts +1 -1
  145. package/dist/channels.d.ts.map +1 -1
  146. package/dist/client.d.ts +1 -1
  147. package/dist/client.js +1 -1
  148. package/dist/connections.d.ts +1 -1
  149. package/dist/connections.js +1 -1
  150. package/dist/docs/404.html +2 -2
  151. package/dist/docs/ab.html +4 -4
  152. package/dist/docs/assets/{app.CLA03RCz.js → app.DbMWUyGb.js} +1 -1
  153. package/dist/docs/assets/chunks/@localSearchIndexroot.Bqsulb9K.js +1 -0
  154. package/dist/docs/assets/chunks/{VPLocalSearchBox.ifxv-cJV.js → VPLocalSearchBox.DcNeTh9o.js} +1 -1
  155. package/dist/docs/assets/chunks/{theme.DWCwM6p-.js → theme.DMjhY3gl.js} +2 -2
  156. package/dist/docs/assets/concepts.md.DgEcZOfT.js +1 -0
  157. package/dist/docs/assets/{concepts.md.rPzW2HZN.lean.js → concepts.md.DgEcZOfT.lean.js} +1 -1
  158. package/dist/docs/assets/{evals.md.CPzDAwoH.js → evals.md.CbMoebP1.js} +1 -1
  159. package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +9 -0
  160. package/dist/docs/assets/{guides_github.md.BtPr9GaP.js → guides_github.md.c0gdGJ-D.js} +1 -1
  161. package/dist/docs/assets/{guides_github.md.BtPr9GaP.lean.js → guides_github.md.c0gdGJ-D.lean.js} +1 -1
  162. package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.js → guides_opentelemetry.md.COh9jFVg.js} +7 -8
  163. package/dist/docs/assets/{guides_opentelemetry.md.BVTXDCRg.lean.js → guides_opentelemetry.md.COh9jFVg.lean.js} +1 -1
  164. package/dist/docs/assets/{index.md.Kiht7ell.js → index.md.D75GWhPl.js} +1 -1
  165. package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.js → reference_agent-config.md.CHNpiyp4.js} +3 -3
  166. package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.js → reference_channels.md.DBGcaB7m.js} +2 -2
  167. package/dist/docs/assets/{reference_channels.md.Cd2f2iyV.lean.js → reference_channels.md.DBGcaB7m.lean.js} +1 -1
  168. package/dist/docs/assets/{reference_cli.md.DfoeyvL0.js → reference_cli.md.CJNc_xYK.js} +1 -1
  169. package/dist/docs/assets/{reference_extensions.md.9WQMZe1l.js → reference_extensions.md.DykHW3qL.js} +11 -5
  170. package/dist/docs/assets/reference_extensions.md.DykHW3qL.lean.js +1 -0
  171. package/dist/docs/assets/reference_hooks.md.Ddt5DdgJ.js +73 -0
  172. package/dist/docs/assets/{reference_hooks.md.a8BJxMR5.lean.js → reference_hooks.md.Ddt5DdgJ.lean.js} +1 -1
  173. package/dist/docs/assets/{reference_playground.md.DnX5nL-B.js → reference_playground.md.4myJPxrf.js} +1 -1
  174. package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.js → reference_project-layout.md.DuBu9a96.js} +2 -2
  175. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +19 -0
  176. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +1 -0
  177. package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.js → reference_sessions.md.CueyOHSL.js} +1 -1
  178. package/dist/docs/assets/{reference_sessions.md.NxFP_CAC.lean.js → reference_sessions.md.CueyOHSL.lean.js} +1 -1
  179. package/dist/docs/assets/{reference_tools.md.B1up2r9W.js → reference_tools.md.aGrn99hP.js} +1 -1
  180. package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +1 -0
  181. package/dist/docs/assets/{skills_otel.md.CgiZryR3.js → skills_otel.md.CqhobH3B.js} +3 -3
  182. package/dist/docs/assets/{skills_otel.md.CgiZryR3.lean.js → skills_otel.md.CqhobH3B.lean.js} +1 -1
  183. package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.js → templates_pr-autofixer.md.Bds_XWcV.js} +2 -2
  184. package/dist/docs/assets/{templates_pr-autofixer.md.x5zl6-GT.lean.js → templates_pr-autofixer.md.Bds_XWcV.lean.js} +1 -1
  185. package/dist/docs/building-with-agents.html +4 -4
  186. package/dist/docs/concepts.html +5 -5
  187. package/dist/docs/concepts.md +2 -4
  188. package/dist/docs/deployment.html +4 -4
  189. package/dist/docs/design/filesystem.md +376 -0
  190. package/dist/docs/design/runtime-abstraction.md +2 -3
  191. package/dist/docs/evals.html +6 -6
  192. package/dist/docs/evals.md +9 -7
  193. package/dist/docs/guides/agent-to-agent.html +4 -4
  194. package/dist/docs/guides/cloud-agents.html +6 -6
  195. package/dist/docs/guides/cloud-agents.md +4 -6
  196. package/dist/docs/guides/convert-automation.html +4 -4
  197. package/dist/docs/guides/github.html +6 -6
  198. package/dist/docs/guides/github.md +5 -1
  199. package/dist/docs/guides/human-in-the-loop.html +4 -4
  200. package/dist/docs/guides/mcp-oauth.html +5 -5
  201. package/dist/docs/guides/opentelemetry.html +10 -11
  202. package/dist/docs/guides/opentelemetry.md +41 -17
  203. package/dist/docs/guides/slack.html +4 -4
  204. package/dist/docs/guides/webhooks.html +4 -4
  205. package/dist/docs/hashmap.json +1 -1
  206. package/dist/docs/hillclimbing.html +4 -4
  207. package/dist/docs/index.html +6 -6
  208. package/dist/docs/index.md +2 -2
  209. package/dist/docs/llms-full.txt +907 -262
  210. package/dist/docs/llms.txt +3 -2
  211. package/dist/docs/quickstart.html +4 -4
  212. package/dist/docs/reference/agent-config.html +8 -8
  213. package/dist/docs/reference/agent-config.md +6 -10
  214. package/dist/docs/reference/artifacts.html +5 -5
  215. package/dist/docs/reference/channels.html +6 -6
  216. package/dist/docs/reference/channels.md +38 -8
  217. package/dist/docs/reference/cli.html +5 -5
  218. package/dist/docs/reference/cli.md +3 -4
  219. package/dist/docs/reference/connections.html +4 -4
  220. package/dist/docs/reference/extensions.html +16 -10
  221. package/dist/docs/reference/extensions.md +86 -22
  222. package/dist/docs/reference/hooks.html +69 -10
  223. package/dist/docs/reference/hooks.md +215 -46
  224. package/dist/docs/reference/http-api.html +4 -4
  225. package/dist/docs/reference/instructions.html +4 -4
  226. package/dist/docs/reference/playground.html +5 -5
  227. package/dist/docs/reference/playground.md +3 -0
  228. package/dist/docs/reference/project-layout.html +6 -6
  229. package/dist/docs/reference/project-layout.md +2 -1
  230. package/dist/docs/reference/prompt.html +4 -4
  231. package/dist/docs/reference/result.html +45 -0
  232. package/dist/docs/reference/result.md +89 -0
  233. package/dist/docs/reference/schedules.html +4 -4
  234. package/dist/docs/reference/sessions.html +5 -5
  235. package/dist/docs/reference/sessions.md +3 -1
  236. package/dist/docs/reference/skills.html +4 -4
  237. package/dist/docs/reference/subagents.html +4 -4
  238. package/dist/docs/reference/tools.html +5 -5
  239. package/dist/docs/reference/tools.md +1 -2
  240. package/dist/docs/scaffolding-agents.html +4 -4
  241. package/dist/docs/skills/ab.html +4 -4
  242. package/dist/docs/skills/create-agent.html +4 -4
  243. package/dist/docs/skills/debug.html +4 -4
  244. package/dist/docs/skills/evals.html +4 -4
  245. package/dist/docs/skills/framework-map.html +5 -5
  246. package/dist/docs/skills/framework-map.md +3 -1
  247. package/dist/docs/skills/github.html +4 -4
  248. package/dist/docs/skills/hillclimb.html +4 -4
  249. package/dist/docs/skills/index.html +4 -4
  250. package/dist/docs/skills/mcp-auth.html +4 -4
  251. package/dist/docs/skills/otel.html +7 -7
  252. package/dist/docs/skills/otel.md +8 -3
  253. package/dist/docs/skills/setup-slack.html +4 -4
  254. package/dist/docs/storage.html +4 -4
  255. package/dist/docs/templates/agentic-owners.html +4 -4
  256. package/dist/docs/templates/agents-md.html +4 -4
  257. package/dist/docs/templates/code-wiki.html +4 -4
  258. package/dist/docs/templates/demo.html +4 -4
  259. package/dist/docs/templates/pr-autofixer.html +6 -6
  260. package/dist/docs/templates/pr-autofixer.md +0 -3
  261. package/dist/docs/templates/security-help.html +4 -4
  262. package/dist/docs/templates/security-reviewer.html +4 -4
  263. package/dist/docs/templates/triage.html +4 -4
  264. package/dist/docs/troubleshooting.html +4 -4
  265. package/dist/evals.d.ts +1 -1
  266. package/dist/evals.d.ts.map +1 -1
  267. package/dist/extensions.d.ts +20 -7
  268. package/dist/extensions.d.ts.map +1 -1
  269. package/dist/extensions.js +36 -5
  270. package/dist/files.d.ts +16 -3
  271. package/dist/files.d.ts.map +1 -1
  272. package/dist/files.js +16 -3
  273. package/dist/filesystem.d.ts +440 -0
  274. package/dist/filesystem.d.ts.map +1 -0
  275. package/dist/filesystem.js +1694 -0
  276. package/dist/index.d.ts +6 -4
  277. package/dist/index.d.ts.map +1 -1
  278. package/dist/index.js +4 -3
  279. package/dist/internal/ab-snapshot.d.ts.map +1 -1
  280. package/dist/internal/ab-snapshot.js +0 -1
  281. package/dist/internal/advertise-tools.d.ts.map +1 -1
  282. package/dist/internal/advertise-tools.js +1 -3
  283. package/dist/internal/authored-alias-hooks.d.ts +4 -13
  284. package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
  285. package/dist/internal/authored-alias-hooks.js +4 -20
  286. package/dist/internal/authored-loaders.d.ts +2 -3
  287. package/dist/internal/authored-loaders.d.ts.map +1 -1
  288. package/dist/internal/authored-loaders.js +6 -20
  289. package/dist/internal/channel-dispatch.d.ts +43 -0
  290. package/dist/internal/channel-dispatch.d.ts.map +1 -0
  291. package/dist/internal/channel-dispatch.js +77 -0
  292. package/dist/internal/chat-client.d.ts +1 -1
  293. package/dist/internal/chat-client.js +1 -1
  294. package/dist/internal/cli-ax.d.ts +5 -5
  295. package/dist/internal/cli-ax.d.ts.map +1 -1
  296. package/dist/internal/cli-ax.js +5 -5
  297. package/dist/internal/cli-bitbucket.d.ts +33 -0
  298. package/dist/internal/cli-bitbucket.d.ts.map +1 -0
  299. package/dist/internal/cli-bitbucket.js +359 -0
  300. package/dist/internal/cli-convert-automation.d.ts +1 -1
  301. package/dist/internal/cli-convert-automation.js +2 -2
  302. package/dist/internal/cli-cursor.d.ts +1 -1
  303. package/dist/internal/cli-cursor.d.ts.map +1 -1
  304. package/dist/internal/cli-cursor.js +2 -4
  305. package/dist/internal/cli-deploy.d.ts.map +1 -1
  306. package/dist/internal/cli-deploy.js +2 -6
  307. package/dist/internal/cli-github.d.ts +1 -1
  308. package/dist/internal/cli-github.js +3 -3
  309. package/dist/internal/cli-gitlab.d.ts +37 -0
  310. package/dist/internal/cli-gitlab.d.ts.map +1 -0
  311. package/dist/internal/cli-gitlab.js +380 -0
  312. package/dist/internal/cli-mcp.d.ts.map +1 -1
  313. package/dist/internal/cli-mcp.js +2 -6
  314. package/dist/internal/cli-slack.d.ts +1 -1
  315. package/dist/internal/cli-slack.d.ts.map +1 -1
  316. package/dist/internal/cli-slack.js +2 -4
  317. package/dist/internal/continuation-channel.d.ts +18 -2
  318. package/dist/internal/continuation-channel.d.ts.map +1 -1
  319. package/dist/internal/continuation-channel.js +67 -5
  320. package/dist/internal/continuation-identity.d.ts +24 -17
  321. package/dist/internal/continuation-identity.d.ts.map +1 -1
  322. package/dist/internal/continuation-identity.js +246 -32
  323. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  324. package/dist/internal/conversation-mirror.js +4 -3
  325. package/dist/internal/convert-automation/types.d.ts +1 -1
  326. package/dist/internal/convert-automation/types.js +1 -1
  327. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  328. package/dist/internal/cursor/account-mcp.js +1 -3
  329. package/dist/internal/cursor/backend-client.d.ts +5 -4
  330. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  331. package/dist/internal/cursor/backend-client.js +5 -6
  332. package/dist/internal/cursor/bound-secret-file.d.ts +56 -0
  333. package/dist/internal/cursor/bound-secret-file.d.ts.map +1 -0
  334. package/dist/internal/cursor/bound-secret-file.js +88 -0
  335. package/dist/internal/cursor/credentials.d.ts +39 -5
  336. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  337. package/dist/internal/cursor/credentials.js +58 -8
  338. package/dist/internal/cursor/hosted-bound-secrets.d.ts +41 -0
  339. package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -0
  340. package/dist/internal/cursor/hosted-bound-secrets.js +54 -0
  341. package/dist/internal/cursor/hosted-deployment-secrets.d.ts +19 -5
  342. package/dist/internal/cursor/hosted-deployment-secrets.d.ts.map +1 -1
  343. package/dist/internal/cursor/hosted-deployment-secrets.js +29 -9
  344. package/dist/internal/cursor/hosted-store-secrets.d.ts +1 -1
  345. package/dist/internal/cursor/hosted-store-secrets.js +1 -1
  346. package/dist/internal/cursor-account-mcp-auth.d.ts.map +1 -1
  347. package/dist/internal/cursor-account-mcp-auth.js +2 -4
  348. package/dist/internal/cursor-deployment-relay.d.ts +6 -2
  349. package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
  350. package/dist/internal/cursor-deployment-relay.js +13 -9
  351. package/dist/internal/deploy-manifest.d.ts +1 -1
  352. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  353. package/dist/internal/deploy-manifest.js +1 -1
  354. package/dist/internal/discovery/ab.d.ts +1 -1
  355. package/dist/internal/discovery/ab.d.ts.map +1 -1
  356. package/dist/internal/discovery/ab.js +21 -9
  357. package/dist/internal/discovery/agent.d.ts +6 -1
  358. package/dist/internal/discovery/agent.d.ts.map +1 -1
  359. package/dist/internal/discovery/agent.js +141 -120
  360. package/dist/internal/discovery/channels.d.ts +1 -1
  361. package/dist/internal/discovery/channels.d.ts.map +1 -1
  362. package/dist/internal/discovery/channels.js +14 -14
  363. package/dist/internal/discovery/connections.d.ts +1 -5
  364. package/dist/internal/discovery/connections.d.ts.map +1 -1
  365. package/dist/internal/discovery/connections.js +30 -44
  366. package/dist/internal/discovery/cursor-plugin.d.ts.map +1 -1
  367. package/dist/internal/discovery/cursor-plugin.js +1 -3
  368. package/dist/internal/discovery/extension-overlay.d.ts +32 -0
  369. package/dist/internal/discovery/extension-overlay.d.ts.map +1 -0
  370. package/dist/internal/discovery/extension-overlay.js +191 -0
  371. package/dist/internal/discovery/extensions.d.ts +11 -2
  372. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  373. package/dist/internal/discovery/extensions.js +211 -74
  374. package/dist/internal/discovery/hooks.d.ts +1 -1
  375. package/dist/internal/discovery/hooks.d.ts.map +1 -1
  376. package/dist/internal/discovery/hooks.js +15 -2
  377. package/dist/internal/discovery/info.d.ts.map +1 -1
  378. package/dist/internal/discovery/info.js +10 -1
  379. package/dist/internal/discovery/modules.d.ts.map +1 -1
  380. package/dist/internal/discovery/modules.js +8 -2
  381. package/dist/internal/discovery/names.d.ts +1 -1
  382. package/dist/internal/discovery/names.d.ts.map +1 -1
  383. package/dist/internal/discovery/names.js +1 -0
  384. package/dist/internal/discovery/project.d.ts +0 -2
  385. package/dist/internal/discovery/project.d.ts.map +1 -1
  386. package/dist/internal/discovery/project.js +64 -10
  387. package/dist/internal/discovery/runtime.d.ts.map +1 -1
  388. package/dist/internal/discovery/runtime.js +1 -2
  389. package/dist/internal/discovery/schedules.d.ts +1 -1
  390. package/dist/internal/discovery/schedules.d.ts.map +1 -1
  391. package/dist/internal/discovery/schedules.js +23 -2
  392. package/dist/internal/discovery/services.d.ts +6 -2
  393. package/dist/internal/discovery/services.d.ts.map +1 -1
  394. package/dist/internal/discovery/services.js +31 -1
  395. package/dist/internal/discovery/skills.d.ts +1 -6
  396. package/dist/internal/discovery/skills.d.ts.map +1 -1
  397. package/dist/internal/discovery/skills.js +8 -3
  398. package/dist/internal/discovery/subagent.d.ts +3 -0
  399. package/dist/internal/discovery/subagent.d.ts.map +1 -1
  400. package/dist/internal/discovery/subagent.js +109 -0
  401. package/dist/internal/discovery.d.ts +1 -2
  402. package/dist/internal/discovery.d.ts.map +1 -1
  403. package/dist/internal/discovery.js +1 -2
  404. package/dist/internal/distribution.d.ts +10 -27
  405. package/dist/internal/distribution.d.ts.map +1 -1
  406. package/dist/internal/distribution.js +25 -73
  407. package/dist/internal/docs-site.js +1 -1
  408. package/dist/internal/eval-run-store.d.ts +0 -1
  409. package/dist/internal/eval-run-store.d.ts.map +1 -1
  410. package/dist/internal/eval-runner.d.ts.map +1 -1
  411. package/dist/internal/factory-resource-channel.d.ts +33 -0
  412. package/dist/internal/factory-resource-channel.d.ts.map +1 -0
  413. package/dist/internal/factory-resource-channel.js +77 -0
  414. package/dist/internal/filesystem/errors.d.ts +64 -0
  415. package/dist/internal/filesystem/errors.d.ts.map +1 -0
  416. package/dist/internal/filesystem/errors.js +175 -0
  417. package/dist/internal/filesystem/format.d.ts +28 -0
  418. package/dist/internal/filesystem/format.d.ts.map +1 -0
  419. package/dist/internal/filesystem/format.js +213 -0
  420. package/dist/internal/filesystem/merge.d.ts +34 -0
  421. package/dist/internal/filesystem/merge.d.ts.map +1 -0
  422. package/dist/internal/filesystem/merge.js +196 -0
  423. package/dist/internal/filesystem/scratch.d.ts +59 -0
  424. package/dist/internal/filesystem/scratch.d.ts.map +1 -0
  425. package/dist/internal/filesystem/scratch.js +212 -0
  426. package/dist/internal/filesystem/sdk-schemas.d.ts +29 -0
  427. package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -0
  428. package/dist/internal/filesystem/sdk-schemas.js +153 -0
  429. package/dist/internal/filesystem/tools.d.ts +42 -0
  430. package/dist/internal/filesystem/tools.d.ts.map +1 -0
  431. package/dist/internal/filesystem/tools.js +618 -0
  432. package/dist/internal/filesystem/walk.d.ts +74 -0
  433. package/dist/internal/filesystem/walk.d.ts.map +1 -0
  434. package/dist/internal/filesystem/walk.js +339 -0
  435. package/dist/internal/framework-file-storage.d.ts +8 -0
  436. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  437. package/dist/internal/framework-file-storage.js +8 -8
  438. package/dist/internal/github-fanout.d.ts +1 -1
  439. package/dist/internal/github-fanout.js +1 -1
  440. package/dist/internal/guest-network.d.ts +104 -0
  441. package/dist/internal/guest-network.d.ts.map +1 -0
  442. package/dist/internal/guest-network.js +309 -0
  443. package/dist/internal/host-otel.d.ts +3 -3
  444. package/dist/internal/host-otel.d.ts.map +1 -1
  445. package/dist/internal/host-otel.js +8 -4
  446. package/dist/internal/hosted-admission-adapter.d.ts +8 -7
  447. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  448. package/dist/internal/hosted-delivery-protocol.d.ts +6 -0
  449. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  450. package/dist/internal/hosted-delivery-protocol.js +18 -5
  451. package/dist/internal/hosted-delivery.d.ts +18 -0
  452. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  453. package/dist/internal/hosted-delivery.js +258 -118
  454. package/dist/internal/http-channel.d.ts.map +1 -1
  455. package/dist/internal/http-channel.js +1 -3
  456. package/dist/internal/init-interview.d.ts.map +1 -1
  457. package/dist/internal/init-interview.js +1 -3
  458. package/dist/internal/init-project.d.ts +2 -2
  459. package/dist/internal/init-project.js +2 -2
  460. package/dist/internal/inline-stdio-define-stub.d.ts +1 -1
  461. package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -1
  462. package/dist/internal/inline-stdio-define-stub.js +1 -1
  463. package/dist/internal/is-record.d.ts +2 -0
  464. package/dist/internal/is-record.d.ts.map +1 -0
  465. package/dist/internal/is-record.js +3 -0
  466. package/dist/internal/json-schema.d.ts.map +1 -1
  467. package/dist/internal/json-schema.js +18 -10
  468. package/dist/internal/local-control-plane.d.ts +1 -2
  469. package/dist/internal/local-control-plane.d.ts.map +1 -1
  470. package/dist/internal/local-control-plane.js +3 -20
  471. package/dist/internal/mcp-endpoint.d.ts.map +1 -1
  472. package/dist/internal/mcp-endpoint.js +1 -3
  473. package/dist/internal/otel/collector.d.ts +12 -3
  474. package/dist/internal/otel/collector.d.ts.map +1 -1
  475. package/dist/internal/otel/collector.js +77 -125
  476. package/dist/internal/otel/config.d.ts +0 -2
  477. package/dist/internal/otel/config.d.ts.map +1 -1
  478. package/dist/internal/otel/config.js +17 -20
  479. package/dist/internal/otel/http.d.ts +2 -0
  480. package/dist/internal/otel/http.d.ts.map +1 -1
  481. package/dist/internal/otel/http.js +7 -1
  482. package/dist/internal/otel/mcp.d.ts.map +1 -1
  483. package/dist/internal/otel/mcp.js +3 -16
  484. package/dist/internal/otel/runtime.d.ts +26 -1
  485. package/dist/internal/otel/runtime.d.ts.map +1 -1
  486. package/dist/internal/otel/runtime.js +164 -15
  487. package/dist/internal/package-inline-stdio.d.ts.map +1 -1
  488. package/dist/internal/package-inline-stdio.js +3 -11
  489. package/dist/internal/playground/toolchain.d.ts +1 -1
  490. package/dist/internal/playground/toolchain.d.ts.map +1 -1
  491. package/dist/internal/playground/toolchain.js +1 -1
  492. package/dist/internal/request-error-status.d.ts +12 -0
  493. package/dist/internal/request-error-status.d.ts.map +1 -0
  494. package/dist/internal/request-error-status.js +52 -0
  495. package/dist/internal/resolve-prod-target.d.ts +1 -1
  496. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  497. package/dist/internal/resolve-prod-target.js +3 -7
  498. package/dist/internal/result-output.d.ts +18 -0
  499. package/dist/internal/result-output.d.ts.map +1 -0
  500. package/dist/internal/result-output.js +33 -0
  501. package/dist/internal/run-client.d.ts +2 -2
  502. package/dist/internal/run-client.js +2 -2
  503. package/dist/internal/runtime-dispatch-runner.d.ts +1 -11
  504. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  505. package/dist/internal/runtime-dispatch-runner.js +2 -15
  506. package/dist/internal/sdk-runner.d.ts +1 -1
  507. package/dist/internal/sdk-runner.d.ts.map +1 -1
  508. package/dist/internal/sdk-runner.js +6 -7
  509. package/dist/internal/server.d.ts.map +1 -1
  510. package/dist/internal/server.js +110 -35
  511. package/dist/internal/session-cost.d.ts +3 -3
  512. package/dist/internal/session-cost.d.ts.map +1 -1
  513. package/dist/internal/session-cost.js +3 -3
  514. package/dist/internal/session-engine.d.ts +48 -11
  515. package/dist/internal/session-engine.d.ts.map +1 -1
  516. package/dist/internal/session-engine.js +507 -115
  517. package/dist/internal/session-run-log.d.ts.map +1 -1
  518. package/dist/internal/session-run-log.js +1 -3
  519. package/dist/internal/skills-sync.d.ts +1 -4
  520. package/dist/internal/skills-sync.d.ts.map +1 -1
  521. package/dist/internal/skills-sync.js +10 -50
  522. package/dist/internal/sleep.d.ts +2 -0
  523. package/dist/internal/sleep.d.ts.map +1 -0
  524. package/dist/internal/sleep.js +3 -0
  525. package/dist/internal/store-mirror.d.ts +29 -0
  526. package/dist/internal/store-mirror.d.ts.map +1 -0
  527. package/dist/internal/store-mirror.js +70 -0
  528. package/dist/internal/tenant-slack/relay.d.ts +73 -0
  529. package/dist/internal/tenant-slack/relay.d.ts.map +1 -0
  530. package/dist/internal/tenant-slack/relay.js +138 -0
  531. package/dist/internal/testing/factory-resource-fixtures.d.ts +48 -0
  532. package/dist/internal/testing/factory-resource-fixtures.d.ts.map +1 -0
  533. package/dist/internal/testing/factory-resource-fixtures.js +41 -0
  534. package/dist/internal/testing/scm-continuation-fixtures.d.ts +33 -0
  535. package/dist/internal/testing/scm-continuation-fixtures.d.ts.map +1 -0
  536. package/dist/internal/testing/scm-continuation-fixtures.js +253 -0
  537. package/dist/internal/workspace-sync.d.ts +22 -0
  538. package/dist/internal/workspace-sync.d.ts.map +1 -0
  539. package/dist/internal/workspace-sync.js +49 -0
  540. package/dist/internal/workspace.d.ts +7 -0
  541. package/dist/internal/workspace.d.ts.map +1 -1
  542. package/dist/internal/workspace.js +13 -0
  543. package/dist/otel.d.ts +23 -1
  544. package/dist/otel.d.ts.map +1 -1
  545. package/dist/otel.js +93 -2
  546. package/dist/playground/assets/index-8YiozU89.js +67 -0
  547. package/dist/playground/assets/index-MbMxXg-y.css +1 -0
  548. package/dist/playground/index.html +2 -2
  549. package/dist/result.d.ts +24 -0
  550. package/dist/result.d.ts.map +1 -0
  551. package/dist/result.js +27 -0
  552. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  553. package/dist/storage-backends/cursor-hosted.js +7 -4
  554. package/dist/storage-protocol.d.ts.map +1 -1
  555. package/dist/storage-protocol.js +1 -3
  556. package/dist/types.d.ts +141 -26
  557. package/dist/types.d.ts.map +1 -1
  558. package/docs/README.md +2 -2
  559. package/docs/concepts.md +2 -4
  560. package/docs/design/filesystem.md +376 -0
  561. package/docs/design/runtime-abstraction.md +2 -3
  562. package/docs/evals.md +9 -7
  563. package/docs/guides/cloud-agents.md +4 -6
  564. package/docs/guides/github.md +5 -1
  565. package/docs/guides/opentelemetry.md +41 -17
  566. package/docs/reference/agent-config.md +6 -10
  567. package/docs/reference/channels.md +38 -8
  568. package/docs/reference/cli.md +3 -4
  569. package/docs/reference/extensions.md +87 -23
  570. package/docs/reference/hooks.md +215 -46
  571. package/docs/reference/playground.md +3 -0
  572. package/docs/reference/project-layout.md +2 -1
  573. package/docs/reference/result.md +94 -0
  574. package/docs/reference/sessions.md +3 -1
  575. package/docs/reference/tools.md +1 -2
  576. package/docs/templates/pr-autofixer.md +0 -3
  577. package/package.json +42 -9
  578. package/skills/framework-map/SKILL.md +3 -1
  579. package/skills/otel/SKILL.md +8 -3
  580. package/src/ab.ts +1 -1
  581. package/src/bin/agent-serve.ts +121 -21
  582. package/src/channels/bitbucket/api.ts +623 -0
  583. package/src/channels/bitbucket/binding.ts +414 -0
  584. package/src/channels/bitbucket/bitbucket-channel.ts +182 -0
  585. package/src/channels/bitbucket/bitbucket-webhook.ts +576 -0
  586. package/src/channels/bitbucket/checks.ts +154 -0
  587. package/src/channels/bitbucket/cursor-account.ts +117 -0
  588. package/src/channels/bitbucket/defaults.ts +110 -0
  589. package/src/channels/bitbucket/events.ts +84 -0
  590. package/src/channels/bitbucket/index.ts +49 -0
  591. package/src/channels/bitbucket/replay.ts +439 -0
  592. package/src/channels/bitbucket/state.ts +59 -0
  593. package/src/channels/bitbucket/types.ts +266 -0
  594. package/src/channels/change-monitors/change-monitors-channel.ts +62 -0
  595. package/src/channels/change-monitors/index.ts +8 -0
  596. package/src/channels/change-monitors/types.ts +44 -0
  597. package/src/channels/deployments/deployments-channel.ts +25 -43
  598. package/src/channels/deployments/types.ts +12 -6
  599. package/src/channels/github/binding.ts +8 -1
  600. package/src/channels/github/cursor-account.ts +17 -6
  601. package/src/channels/github/defaults.ts +4 -0
  602. package/src/channels/github/events.ts +1 -1
  603. package/src/channels/github/forward.ts +3 -2
  604. package/src/channels/github/github-channel.ts +74 -221
  605. package/src/channels/github/progress.ts +76 -10
  606. package/src/channels/github/replay.ts +1 -1
  607. package/src/channels/github/state.ts +6 -0
  608. package/src/channels/github/types.ts +2 -5
  609. package/src/channels/gitlab/api.ts +228 -0
  610. package/src/channels/gitlab/binding.ts +233 -0
  611. package/src/channels/gitlab/checks.ts +243 -0
  612. package/src/channels/gitlab/cursor-account.ts +114 -0
  613. package/src/channels/gitlab/defaults.ts +93 -0
  614. package/src/channels/gitlab/events.ts +44 -0
  615. package/src/channels/gitlab/gitlab-channel.ts +176 -0
  616. package/src/channels/gitlab/gitlab-webhook.ts +555 -0
  617. package/src/channels/gitlab/index.ts +43 -0
  618. package/src/channels/gitlab/replay.ts +347 -0
  619. package/src/channels/gitlab/state.ts +55 -0
  620. package/src/channels/gitlab/types.ts +263 -0
  621. package/src/channels/issues/index.ts +9 -0
  622. package/src/channels/issues/issues-channel.ts +51 -0
  623. package/src/channels/issues/types.ts +41 -0
  624. package/src/channels/origin/api.ts +4 -2
  625. package/src/channels/origin/origin-channel.ts +19 -94
  626. package/src/channels/origin/types.ts +23 -2
  627. package/src/channels/slack/eval-directive.ts +1 -6
  628. package/src/channels/slack/init.ts +6 -3
  629. package/src/channels/slack/setup.ts +7 -6
  630. package/src/channels/slack/types.ts +1 -1
  631. package/src/channels.ts +0 -1
  632. package/src/client.ts +1 -1
  633. package/src/connections.ts +1 -1
  634. package/src/evals.ts +1 -1
  635. package/src/extensions.ts +47 -5
  636. package/src/files.ts +21 -3
  637. package/src/filesystem.ts +2074 -0
  638. package/src/index.ts +48 -28
  639. package/src/internal/ab-snapshot.ts +0 -3
  640. package/src/internal/advertise-tools.ts +1 -4
  641. package/src/internal/authored-alias-hooks.ts +4 -21
  642. package/src/internal/authored-loaders.ts +6 -23
  643. package/src/internal/channel-dispatch.ts +160 -0
  644. package/src/internal/chat-client.ts +1 -1
  645. package/src/internal/cli-ax.ts +5 -5
  646. package/src/internal/cli-bitbucket.ts +477 -0
  647. package/src/internal/cli-convert-automation.ts +7 -7
  648. package/src/internal/cli-cursor.ts +2 -5
  649. package/src/internal/cli-deploy.ts +2 -8
  650. package/src/internal/cli-github.ts +3 -3
  651. package/src/internal/cli-gitlab.ts +485 -0
  652. package/src/internal/cli-mcp.ts +2 -7
  653. package/src/internal/cli-slack.ts +2 -5
  654. package/src/internal/continuation-channel.ts +102 -4
  655. package/src/internal/continuation-identity.ts +338 -35
  656. package/src/internal/conversation-mirror.ts +4 -3
  657. package/src/internal/convert-automation/types.ts +1 -1
  658. package/src/internal/cursor/account-mcp.ts +1 -4
  659. package/src/internal/cursor/backend-client.ts +9 -10
  660. package/src/internal/cursor/bound-secret-file.ts +108 -0
  661. package/src/internal/cursor/credentials.ts +75 -10
  662. package/src/internal/cursor/hosted-bound-secrets.ts +75 -0
  663. package/src/internal/cursor/hosted-deployment-secrets.ts +42 -11
  664. package/src/internal/cursor/hosted-store-secrets.ts +1 -1
  665. package/src/internal/cursor-account-mcp-auth.ts +2 -5
  666. package/src/internal/cursor-deployment-relay.ts +11 -7
  667. package/src/internal/deploy-manifest.ts +4 -2
  668. package/src/internal/discovery/ab.ts +29 -9
  669. package/src/internal/discovery/agent.ts +181 -136
  670. package/src/internal/discovery/channels.ts +15 -13
  671. package/src/internal/discovery/connections.ts +55 -50
  672. package/src/internal/discovery/cursor-plugin.ts +1 -4
  673. package/src/internal/discovery/extension-overlay.ts +274 -0
  674. package/src/internal/discovery/extensions.ts +330 -105
  675. package/src/internal/discovery/hooks.ts +20 -2
  676. package/src/internal/discovery/info.ts +10 -0
  677. package/src/internal/discovery/modules.ts +8 -2
  678. package/src/internal/discovery/names.ts +2 -1
  679. package/src/internal/discovery/project.ts +80 -9
  680. package/src/internal/discovery/runtime.ts +1 -2
  681. package/src/internal/discovery/schedules.ts +28 -2
  682. package/src/internal/discovery/services.ts +37 -1
  683. package/src/internal/discovery/skills.ts +13 -3
  684. package/src/internal/discovery/subagent.ts +107 -0
  685. package/src/internal/discovery.ts +0 -2
  686. package/src/internal/distribution.ts +35 -83
  687. package/src/internal/docs-site.ts +1 -1
  688. package/src/internal/eval-run-store.ts +0 -7
  689. package/src/internal/eval-runner.ts +0 -1
  690. package/src/internal/factory-resource-channel.ts +122 -0
  691. package/src/internal/filesystem/errors.ts +220 -0
  692. package/src/internal/filesystem/format.ts +276 -0
  693. package/src/internal/filesystem/merge.ts +195 -0
  694. package/src/internal/filesystem/scratch.ts +255 -0
  695. package/src/internal/filesystem/sdk-schemas.ts +204 -0
  696. package/src/internal/filesystem/tools.ts +821 -0
  697. package/src/internal/filesystem/walk.ts +369 -0
  698. package/src/internal/framework-file-storage.ts +8 -8
  699. package/src/internal/github-fanout.ts +1 -1
  700. package/src/internal/guest-network.ts +389 -0
  701. package/src/internal/host-otel.ts +8 -4
  702. package/src/internal/hosted-admission-adapter.ts +8 -8
  703. package/src/internal/hosted-delivery-protocol.ts +26 -1
  704. package/src/internal/hosted-delivery.ts +393 -192
  705. package/src/internal/http-channel.ts +1 -4
  706. package/src/internal/init-interview.ts +1 -4
  707. package/src/internal/init-project.ts +2 -2
  708. package/src/internal/inline-stdio-define-stub.ts +1 -1
  709. package/src/internal/is-record.ts +3 -0
  710. package/src/internal/json-schema.ts +19 -10
  711. package/src/internal/local-control-plane.ts +5 -24
  712. package/src/internal/mcp-endpoint.ts +1 -4
  713. package/src/internal/otel/collector.ts +94 -159
  714. package/src/internal/otel/config.ts +10 -14
  715. package/src/internal/otel/http.ts +14 -1
  716. package/src/internal/otel/mcp.ts +3 -16
  717. package/src/internal/otel/runtime.ts +240 -25
  718. package/src/internal/package-inline-stdio.ts +3 -12
  719. package/src/internal/playground/toolchain.ts +1 -1
  720. package/src/internal/request-error-status.ts +72 -0
  721. package/src/internal/resolve-prod-target.ts +3 -8
  722. package/src/internal/result-output.ts +34 -0
  723. package/src/internal/run-client.ts +2 -2
  724. package/src/internal/runtime-dispatch-runner.ts +3 -21
  725. package/src/internal/sdk-runner.ts +7 -7
  726. package/src/internal/server.ts +153 -44
  727. package/src/internal/session-cost.ts +3 -3
  728. package/src/internal/session-engine.ts +621 -103
  729. package/src/internal/session-run-log.ts +1 -4
  730. package/src/internal/skills-sync.ts +13 -63
  731. package/src/internal/sleep.ts +3 -0
  732. package/src/internal/store-mirror.ts +86 -0
  733. package/src/internal/tenant-slack/relay.ts +179 -0
  734. package/src/internal/testing/factory-resource-fixtures.ts +85 -0
  735. package/src/internal/testing/scm-continuation-fixtures.ts +286 -0
  736. package/src/internal/workspace-sync.ts +55 -0
  737. package/src/internal/workspace.ts +14 -0
  738. package/src/otel.ts +143 -3
  739. package/src/result.ts +36 -0
  740. package/src/storage-backends/cursor-hosted.ts +7 -4
  741. package/src/storage-protocol.ts +1 -4
  742. package/src/types.ts +154 -37
  743. package/templates/triage/agent/lib/types.ts +0 -2
  744. package/dist/continuation.d.ts +0 -20
  745. package/dist/continuation.d.ts.map +0 -1
  746. package/dist/continuation.js +0 -18
  747. package/dist/docs/assets/chunks/@localSearchIndexroot.FAqdWIXo.js +0 -1
  748. package/dist/docs/assets/concepts.md.rPzW2HZN.js +0 -1
  749. package/dist/docs/assets/guides_cloud-agents.md.DumwWXba.js +0 -9
  750. package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.js +0 -9
  751. package/dist/docs/assets/guides_cloud-runtime.md.BRirbRAN.lean.js +0 -1
  752. package/dist/docs/assets/reference_extensions.md.9WQMZe1l.lean.js +0 -1
  753. package/dist/docs/assets/reference_hooks.md.a8BJxMR5.js +0 -14
  754. package/dist/docs/assets/skills_framework-map.md.DDa4MeEW.js +0 -1
  755. package/dist/docs/guides/cloud-runtime.html +0 -35
  756. package/dist/docs/guides/cloud-runtime.md +0 -117
  757. package/dist/internal/convert-automation/index.d.ts +0 -3
  758. package/dist/internal/convert-automation/index.d.ts.map +0 -1
  759. package/dist/internal/convert-automation/index.js +0 -1
  760. package/dist/internal/grokbot/runner.d.ts +0 -64
  761. package/dist/internal/grokbot/runner.d.ts.map +0 -1
  762. package/dist/internal/grokbot/runner.js +0 -282
  763. package/dist/internal/managed-delivery.d.ts +0 -80
  764. package/dist/internal/managed-delivery.d.ts.map +0 -1
  765. package/dist/internal/managed-delivery.js +0 -86
  766. package/dist/internal/review-comments.d.ts +0 -370
  767. package/dist/internal/review-comments.d.ts.map +0 -1
  768. package/dist/internal/review-comments.js +0 -921
  769. package/dist/internal/shallow-clone.d.ts +0 -176
  770. package/dist/internal/shallow-clone.d.ts.map +0 -1
  771. package/dist/internal/shallow-clone.js +0 -419
  772. package/dist/playground/assets/index-B6C9S9nG.css +0 -1
  773. package/dist/playground/assets/index-ZqNoT8Ie.js +0 -69
  774. package/docs/guides/cloud-runtime.md +0 -122
  775. package/src/continuation.ts +0 -49
  776. package/src/internal/convert-automation/index.ts +0 -10
  777. package/src/internal/grokbot/runner.ts +0 -370
  778. package/src/internal/managed-delivery.ts +0 -125
  779. package/src/internal/review-comments.ts +0 -1363
  780. package/src/internal/shallow-clone.ts +0 -609
  781. /package/dist/docs/assets/{evals.md.CPzDAwoH.lean.js → evals.md.CbMoebP1.lean.js} +0 -0
  782. /package/dist/docs/assets/{guides_cloud-agents.md.DumwWXba.lean.js → guides_cloud-agents.md.DS8RIjwx.lean.js} +0 -0
  783. /package/dist/docs/assets/{index.md.Kiht7ell.lean.js → index.md.D75GWhPl.lean.js} +0 -0
  784. /package/dist/docs/assets/{reference_agent-config.md.BHeYMgme.lean.js → reference_agent-config.md.CHNpiyp4.lean.js} +0 -0
  785. /package/dist/docs/assets/{reference_cli.md.DfoeyvL0.lean.js → reference_cli.md.CJNc_xYK.lean.js} +0 -0
  786. /package/dist/docs/assets/{reference_playground.md.DnX5nL-B.lean.js → reference_playground.md.4myJPxrf.lean.js} +0 -0
  787. /package/dist/docs/assets/{reference_project-layout.md.CA6QP6Lw.lean.js → reference_project-layout.md.DuBu9a96.lean.js} +0 -0
  788. /package/dist/docs/assets/{reference_tools.md.B1up2r9W.lean.js → reference_tools.md.aGrn99hP.lean.js} +0 -0
  789. /package/dist/docs/assets/{skills_framework-map.md.DDa4MeEW.lean.js → skills_framework-map.md.haibFyoB.lean.js} +0 -0
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { createHmac, timingSafeEqual } from "node:crypto";
11
11
  import { z } from "zod";
12
12
  import { allowAll, defineChannel, localDevStrict, loopbackGitHubDev, POST, } from "../../channels.js";
13
+ import { acknowledgeTask, acknowledgeTurn, isTaskDispatch, scheduleAfterAck, skipped, turnStarted, withPropagatingBackgroundErrors, } from "../../internal/channel-dispatch.js";
13
14
  import { continuationSource, normalizeIdentity, } from "../../internal/continuation-identity.js";
14
- import { isDeferredChannelSession } from "../../internal/deferred-channel-session.js";
15
15
  import { isDevMode } from "../../internal/dev-mode.js";
16
16
  import { attachHostedAdmissionAdapter } from "../../internal/hosted-admission-adapter.js";
17
17
  import { bindLocalIngressSend } from "../../internal/local-ingress.js";
@@ -142,17 +142,9 @@ export function parseGitHubPrContinuationKey(key) {
142
142
  number: Number(match[3]),
143
143
  };
144
144
  }
145
- /** @deprecated Prefer {@link githubContinuationKey}. */
146
- export function githubPullRequestContinuationKey(ctx) {
147
- return githubContinuationKey(ctx);
148
- }
149
145
  export function defaultGitHubTitle(ctx) {
150
146
  return `GitHub ${ctx.repository.fullName}#${ctx.conversation.number}`;
151
147
  }
152
- /** @deprecated Prefer {@link defaultGitHubTitle}. */
153
- export function defaultGitHubPullRequestTitle(ctx) {
154
- return defaultGitHubTitle(ctx);
155
- }
156
148
  export function defaultGitHubPullRequestMessage(ctx, pullRequest) {
157
149
  return [
158
150
  `GitHub pull request trigger: ${ctx.repository.fullName}#${pullRequest.number}`,
@@ -196,9 +188,6 @@ export function defaultOnComment(ctx, comment, options) {
196
188
  }
197
189
  return { auth: defaultGitHubAuth(ctx) };
198
190
  }
199
- function isTaskDispatch(dispatch) {
200
- return "task" in dispatch;
201
- }
202
191
  export function shouldDispatchGitHubComment(args) {
203
192
  var _a;
204
193
  const botName = (_a = args.botName) === null || _a === void 0 ? void 0 : _a.trim();
@@ -285,24 +274,13 @@ function verifyWebhookSha256Signature(args) {
285
274
  const received = Buffer.from(receivedHex, "hex");
286
275
  return (received.length === expected.length && timingSafeEqual(received, expected));
287
276
  }
288
- const dispatchOutcomeByResponse = new WeakMap();
289
- function withDispatchOutcome(response, outcome) {
290
- dispatchOutcomeByResponse.set(response, outcome);
291
- return response;
292
- }
293
- export function getGitHubDispatchOutcome(response) {
294
- return dispatchOutcomeByResponse.get(response);
295
- }
296
- const PROPAGATE_BACKGROUND_ERRORS = Symbol("propagateBackgroundErrors");
297
- export function withPropagatingGitHubBackgroundErrors(args) {
298
- return Object.assign(args, { [PROPAGATE_BACKGROUND_ERRORS]: true });
299
- }
277
+ /**
278
+ * Run the authored hooks for one GitHub delivery and `send()` the turn.
279
+ * Callers own delivery auth: the HTTP route verifies the HMAC; trigger
280
+ * fan-out and hosted admission arrive verified. The v2 mailbox is stamped
281
+ * upstream (local CP or hosted ingress), never here.
282
+ */
300
283
  export function dispatchGitHubWebhook(input) {
301
- return __awaiter(this, void 0, void 0, function* () {
302
- return dispatchGitHubWebhookInner(input);
303
- });
304
- }
305
- function dispatchGitHubWebhookInner(input) {
306
284
  return __awaiter(this, void 0, void 0, function* () {
307
285
  var _a;
308
286
  const { options, eventName, payload, deliveryId, args } = input;
@@ -392,12 +370,7 @@ function dispatchGitHubWebhookInner(input) {
392
370
  args,
393
371
  });
394
372
  }
395
- return Response.json({
396
- ok: true,
397
- skipped: true,
398
- reason: "unsupported_event",
399
- event: eventName,
400
- });
373
+ return skipped("unsupported_event", { event: eventName });
401
374
  }
402
375
  });
403
376
  }
@@ -455,6 +428,41 @@ const githubChannelOptionsByDefinition = new WeakMap();
455
428
  export function getGitHubChannelOptions(definition) {
456
429
  return githubChannelOptionsByDefinition.get(definition);
457
430
  }
431
+ /**
432
+ * GitHub webhook channel (Eve-compatible dispatch surface). Point a GitHub App
433
+ * or repository webhook at `/<agent>/v1/channels/github` and declare inbound
434
+ * hooks:
435
+ *
436
+ * ```ts
437
+ * import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
438
+ *
439
+ * export default githubChannel({
440
+ * botName: "my-agent",
441
+ * credentials: { webhookSecret: () => process.env.GITHUB_WEBHOOK_SECRET },
442
+ * // Replaces the @mention gate. Prefer typed Octokit via getOctokit().
443
+ * onComment: (ctx, comment) => ({ auth: defaultGitHubAuth(ctx) }),
444
+ * onPullRequest: (ctx, pr) =>
445
+ * pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
446
+ * onStatus: (ctx, status) =>
447
+ * status.state === "failure"
448
+ * ? {
449
+ * task: async () => {
450
+ * const octokit = await ctx.github.getOctokit();
451
+ * await octokit.rest.repos.createCommitStatus({
452
+ * owner: ctx.repository.owner,
453
+ * repo: ctx.repository.name,
454
+ * sha: status.sha,
455
+ * state: "pending",
456
+ * context: "agent/triage",
457
+ * });
458
+ * },
459
+ * }
460
+ * : null,
461
+ * onEvent: (ctx, event) =>
462
+ * event.eventName === "label" ? { auth: defaultGitHubAuth(ctx) } : null,
463
+ * });
464
+ * ```
465
+ */
458
466
  export function githubChannel(options = {}) {
459
467
  var _a, _b, _c;
460
468
  const usesCursorAccount = options.cursorAccount === true || typeof options.cursorAccount === "object";
@@ -526,7 +534,7 @@ export function githubChannel(options = {}) {
526
534
  githubChannelOptionsByDefinition.set(definition, channelOptions);
527
535
  attachHostedAdmissionAdapter(definition, {
528
536
  kind: GITHUB_CHANNEL_KIND,
529
- prepareArgs: withPropagatingGitHubBackgroundErrors,
537
+ prepareArgs: withPropagatingBackgroundErrors,
530
538
  dispatch: ({ eventType, payload, deliveryId, args }) => dispatchGitHubWebhook({
531
539
  options: channelOptions,
532
540
  eventName: eventType,
@@ -534,10 +542,6 @@ export function githubChannel(options = {}) {
534
542
  deliveryId,
535
543
  args,
536
544
  }),
537
- getOutcome: (response) => {
538
- const outcome = getGitHubDispatchOutcome(response);
539
- return outcome === "skip" || outcome === "task" ? outcome : undefined;
540
- },
541
545
  });
542
546
  if (cursorCredentials !== undefined) {
543
547
  registerGithubCursorAccountRuntime(definition, {
@@ -573,6 +577,7 @@ function handlePullRequest(input) {
573
577
  repo: parsed.ctx.repository.name,
574
578
  number: parsed.ctx.conversation.number,
575
579
  repositoryId: parsed.ctx.repository.id,
580
+ repositoryUrl: parsed.ctx.repository.url,
576
581
  installationId,
577
582
  });
578
583
  const ctx = enrichEventContext({
@@ -591,7 +596,7 @@ function handlePullRequest(input) {
591
596
  return skipped("not_dispatched", { action: pullRequest.action });
592
597
  }
593
598
  if (isTaskDispatch(dispatch)) {
594
- return acknowledgeTask(input.args, dispatch, {
599
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
595
600
  action: pullRequest.action,
596
601
  prUrl: pullRequest.url,
597
602
  headSha: pullRequest.headSha,
@@ -643,6 +648,7 @@ function handleIssueComment(input) {
643
648
  repo: parsed.ctx.repository.name,
644
649
  number: parsed.ctx.conversation.number,
645
650
  repositoryId: parsed.ctx.repository.id,
651
+ repositoryUrl: parsed.ctx.repository.url,
646
652
  installationId,
647
653
  triggeringCommentId: parsed.comment.id,
648
654
  });
@@ -664,7 +670,7 @@ function handleIssueComment(input) {
664
670
  return skipped("not_dispatched");
665
671
  }
666
672
  if (isTaskDispatch(dispatch)) {
667
- return acknowledgeTask(input.args, dispatch, {
673
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
668
674
  event: "issue_comment",
669
675
  action: parsed.action,
670
676
  });
@@ -714,6 +720,7 @@ function handleReviewComment(input) {
714
720
  repo: parsed.ctx.repository.name,
715
721
  number: parsed.ctx.conversation.number,
716
722
  repositoryId: parsed.ctx.repository.id,
723
+ repositoryUrl: parsed.ctx.repository.url,
717
724
  installationId,
718
725
  triggeringCommentId: parsed.comment.id,
719
726
  reviewCommentId: parsed.comment.id,
@@ -737,7 +744,7 @@ function handleReviewComment(input) {
737
744
  return skipped("not_dispatched");
738
745
  }
739
746
  if (isTaskDispatch(dispatch)) {
740
- return acknowledgeTask(input.args, dispatch, {
747
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
741
748
  event: "pull_request_review_comment",
742
749
  action: parsed.action,
743
750
  });
@@ -787,6 +794,7 @@ function handleIssue(input) {
787
794
  repo: parsed.ctx.repository.name,
788
795
  number: parsed.ctx.conversation.number,
789
796
  repositoryId: parsed.ctx.repository.id,
797
+ repositoryUrl: parsed.ctx.repository.url,
790
798
  installationId,
791
799
  });
792
800
  const ctx = enrichEventContext({
@@ -803,7 +811,7 @@ function handleIssue(input) {
803
811
  return skipped("not_dispatched", { action: parsed.issue.action });
804
812
  }
805
813
  if (isTaskDispatch(dispatch)) {
806
- return acknowledgeTask(input.args, dispatch, {
814
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
807
815
  event: "issues",
808
816
  action: parsed.issue.action,
809
817
  issueNumber: parsed.issue.number,
@@ -851,7 +859,7 @@ function handleCheckSuite(input) {
851
859
  artifacts: input.args.artifacts,
852
860
  }), parsed.checkSuite);
853
861
  if (dispatch !== null && isTaskDispatch(dispatch)) {
854
- return acknowledgeTask(input.args, dispatch, {
862
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
855
863
  event: "check_suite",
856
864
  action: parsed.checkSuite.action,
857
865
  checkSuiteId: parsed.checkSuite.checkSuiteId,
@@ -865,6 +873,7 @@ function handleCheckSuite(input) {
865
873
  repo: parsed.ctx.repository.name,
866
874
  number: parsed.ctx.conversation.number,
867
875
  repositoryId: parsed.ctx.repository.id,
876
+ repositoryUrl: parsed.ctx.repository.url,
868
877
  installationId,
869
878
  });
870
879
  const ctx = enrichEventContext({
@@ -881,7 +890,7 @@ function handleCheckSuite(input) {
881
890
  return skipped("not_dispatched", { action: parsed.checkSuite.action });
882
891
  }
883
892
  if (isTaskDispatch(dispatch)) {
884
- return acknowledgeTask(input.args, dispatch, {
893
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
885
894
  event: "check_suite",
886
895
  action: parsed.checkSuite.action,
887
896
  checkSuiteId: parsed.checkSuite.checkSuiteId,
@@ -930,7 +939,7 @@ function handleCheckRun(input) {
930
939
  artifacts: input.args.artifacts,
931
940
  }), parsed.checkRun);
932
941
  if (dispatch !== null && isTaskDispatch(dispatch)) {
933
- return acknowledgeTask(input.args, dispatch, {
942
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
934
943
  event: "check_run",
935
944
  action: parsed.checkRun.action,
936
945
  checkRunId: parsed.checkRun.checkRunId,
@@ -944,6 +953,7 @@ function handleCheckRun(input) {
944
953
  repo: parsed.ctx.repository.name,
945
954
  number: parsed.ctx.conversation.number,
946
955
  repositoryId: parsed.ctx.repository.id,
956
+ repositoryUrl: parsed.ctx.repository.url,
947
957
  installationId,
948
958
  });
949
959
  const ctx = enrichEventContext({
@@ -960,7 +970,7 @@ function handleCheckRun(input) {
960
970
  return skipped("not_dispatched", { action: parsed.checkRun.action });
961
971
  }
962
972
  if (isTaskDispatch(dispatch)) {
963
- return acknowledgeTask(input.args, dispatch, {
973
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
964
974
  event: "check_run",
965
975
  action: parsed.checkRun.action,
966
976
  checkRunId: parsed.checkRun.checkRunId,
@@ -1009,7 +1019,7 @@ function handleWorkflowRun(input) {
1009
1019
  artifacts: input.args.artifacts,
1010
1020
  }), parsed.workflowRun);
1011
1021
  if (dispatch !== null && isTaskDispatch(dispatch)) {
1012
- return acknowledgeTask(input.args, dispatch, {
1022
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
1013
1023
  event: "workflow_run",
1014
1024
  action: parsed.workflowRun.action,
1015
1025
  workflowRunId: parsed.workflowRun.workflowRunId,
@@ -1023,6 +1033,7 @@ function handleWorkflowRun(input) {
1023
1033
  repo: parsed.ctx.repository.name,
1024
1034
  number: parsed.ctx.conversation.number,
1025
1035
  repositoryId: parsed.ctx.repository.id,
1036
+ repositoryUrl: parsed.ctx.repository.url,
1026
1037
  installationId,
1027
1038
  });
1028
1039
  const ctx = enrichEventContext({
@@ -1039,7 +1050,7 @@ function handleWorkflowRun(input) {
1039
1050
  return skipped("not_dispatched", { action: parsed.workflowRun.action });
1040
1051
  }
1041
1052
  if (isTaskDispatch(dispatch)) {
1042
- return acknowledgeTask(input.args, dispatch, {
1053
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
1043
1054
  event: "workflow_run",
1044
1055
  action: parsed.workflowRun.action,
1045
1056
  workflowRunId: parsed.workflowRun.workflowRunId,
@@ -1084,6 +1095,7 @@ function handleStatus(input) {
1084
1095
  repo: parsed.ctx.repository.name,
1085
1096
  number: parsed.ctx.conversation.number,
1086
1097
  repositoryId: parsed.ctx.repository.id,
1098
+ repositoryUrl: parsed.ctx.repository.url,
1087
1099
  installationId,
1088
1100
  });
1089
1101
  const ctx = enrichEventContext({
@@ -1103,7 +1115,7 @@ function handleStatus(input) {
1103
1115
  });
1104
1116
  }
1105
1117
  if (isTaskDispatch(dispatch)) {
1106
- return acknowledgeTask(input.args, dispatch, {
1118
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, {
1107
1119
  event: "status",
1108
1120
  state: parsed.status.state,
1109
1121
  sha: parsed.status.sha,
@@ -1153,6 +1165,7 @@ function handleGenericEvent(input) {
1153
1165
  repo: parsed.ctx.repository.name,
1154
1166
  number: parsed.ctx.conversation.number,
1155
1167
  repositoryId: parsed.ctx.repository.id,
1168
+ repositoryUrl: parsed.ctx.repository.url,
1156
1169
  installationId,
1157
1170
  });
1158
1171
  const ctx = enrichEventContext({
@@ -1169,7 +1182,7 @@ function handleGenericEvent(input) {
1169
1182
  return skipped("not_dispatched", { event: input.eventName });
1170
1183
  }
1171
1184
  if (isTaskDispatch(dispatch)) {
1172
- return acknowledgeTask(input.args, dispatch, Object.assign({ event: input.eventName }, (parsed.event.action === undefined
1185
+ return acknowledgeTask(input.args, GITHUB_CHANNEL_KIND, dispatch, Object.assign({ event: input.eventName }, (parsed.event.action === undefined
1173
1186
  ? {}
1174
1187
  : { action: parsed.event.action })));
1175
1188
  }
@@ -1209,61 +1222,14 @@ function startTurn(input) {
1209
1222
  refreshState: input.state }));
1210
1223
  });
1211
1224
  if (lazy) {
1212
- scheduleAfterAck(input.args, () => __awaiter(this, void 0, void 0, function* () {
1225
+ scheduleAfterAck(input.args, GITHUB_CHANNEL_KIND, () => __awaiter(this, void 0, void 0, function* () {
1213
1226
  yield sendTurn();
1214
1227
  }));
1215
1228
  return acknowledgeTurn();
1216
1229
  }
1217
- const session = yield sendTurn();
1218
- if (isDeferredChannelSession(session)) {
1219
- // Hosted admission captured the send; the control plane allocates the
1220
- // session after acknowledgement, so there is nothing to report yet.
1221
- return acknowledgeTurn();
1222
- }
1223
- return withDispatchOutcome(Response.json({
1224
- ok: true,
1225
- sessionId: session.id,
1226
- isNew: session.isNew,
1227
- continuationToken: session.continuationToken,
1228
- }), "send");
1230
+ return turnStarted(yield sendTurn());
1229
1231
  });
1230
1232
  }
1231
- function scheduleAfterAck(args, work) {
1232
- // Defer past the current turn so the 202 can flush before work starts
1233
- // (and so tests can assert scheduling without racing microtasks).
1234
- args.waitUntil(new Promise((resolve, reject) => {
1235
- setImmediate(() => {
1236
- Promise.resolve()
1237
- .then(work)
1238
- .then(() => resolve(), (error) => {
1239
- var _a;
1240
- if (args[PROPAGATE_BACKGROUND_ERRORS] ===
1241
- true) {
1242
- reject(error);
1243
- return;
1244
- }
1245
- const detail = error instanceof Error
1246
- ? ((_a = error.stack) !== null && _a !== void 0 ? _a : error.message)
1247
- : String(error);
1248
- console.error(`[github] background dispatch failed: ${detail}`);
1249
- resolve();
1250
- });
1251
- });
1252
- }));
1253
- }
1254
- /** 202 ack for a turn whose send completes after the response flushes. */
1255
- function acknowledgeTurn() {
1256
- return withDispatchOutcome(Response.json({ ok: true, dispatched: true, mode: "turn" }, { status: 202 }), "send");
1257
- }
1258
- function acknowledgeTask(args, dispatch, extra) {
1259
- // Hand the task the per-delivery send/waitUntil so hosted admission can
1260
- // capture task-initiated sends; startup-captured sends bypass capture.
1261
- scheduleAfterAck(args, () => dispatch.task({ send: args.send, waitUntil: args.waitUntil }));
1262
- return withDispatchOutcome(Response.json(Object.assign({ ok: true, dispatched: true, mode: "task" }, extra), { status: 202 }), "task");
1263
- }
1264
- function skipped(reason, extra = {}) {
1265
- return withDispatchOutcome(Response.json(Object.assign({ ok: true, skipped: true, reason }, extra)), "skip");
1266
- }
1267
1233
  function formatCiMessage(label, id, event) {
1268
1234
  var _a;
1269
1235
  const outcome = (_a = event.conclusion) !== null && _a !== void 0 ? _a : event.status;
@@ -1814,6 +1780,7 @@ function enrichCiContext(input) {
1814
1780
  repo: input.ctx.repository.name,
1815
1781
  number: input.ctx.conversation.number,
1816
1782
  repositoryId: input.ctx.repository.id,
1783
+ repositoryUrl: input.ctx.repository.url,
1817
1784
  installationId: input.installationId,
1818
1785
  });
1819
1786
  return enrichEventContext({
@@ -12,6 +12,27 @@ export interface GitHubProgressPhaseCopy {
12
12
  export interface GitHubCommitStatusProgress extends GitHubProgressPhaseCopy {
13
13
  /** Check run name (unique per check in the merge box). */
14
14
  context: string;
15
+ /**
16
+ * Check Details URL for this session. When it resolves, it is written as
17
+ * `details_url` and (with {@link summaryLinkText}) appended to the summary.
18
+ */
19
+ detailsUrl?: (sessionId: string) => string | undefined;
20
+ /**
21
+ * `output.title` source. `"phase"` (default) uses the pending/success/
22
+ * failure copy. `"context"` uses the check name — the dashboard automation
23
+ * shape (`Cursor Security Agent: …`).
24
+ */
25
+ outputTitle?: "phase" | "context";
26
+ /**
27
+ * Markdown link label appended to the summary when {@link detailsUrl}
28
+ * resolves, e.g. `"View agent"`.
29
+ */
30
+ summaryLinkText?: string;
31
+ /**
32
+ * Conclusion for the failure phase. Default `"failure"`. Use `"neutral"`
33
+ * when a red merge-box check must not gate merge (findings live on the PR).
34
+ */
35
+ failureConclusion?: "failure" | "neutral";
15
36
  }
16
37
  export type GitHubBannerProgress = GitHubProgressPhaseCopy;
17
38
  export interface GitHubProgressConfig {
@@ -54,6 +75,7 @@ export declare function progressPhaseCopy(input: {
54
75
  */
55
76
  export declare function applyGitHubProgress(input: {
56
77
  phase: GitHubProgressPhase;
78
+ sessionId?: string;
57
79
  channel: {
58
80
  state: GitHubChannelState;
59
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/channels/github/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAKrD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE3D,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,0BAA0B,CAAC;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,oBAAoB,GAAG,SAAS,GACzC,0BAA0B,GAAG,IAAI,CAKnC;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,oBAAoB,GAAG,SAAS,GACzC,oBAAoB,GAAG,IAAI,CAK7B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAaT;AAuBD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,EAAE;QAAE,KAAK,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CA8BhB"}
1
+ {"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/channels/github/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAKrD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACvD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE3D,MAAM,WAAW,oBAAoB;IACnC,4EAA4E;IAC5E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,0BAA0B,CAAC;IAClD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,oBAAoB,CAAC;CACvC;AAED,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,oBAAoB,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,oBAAoB,GAAG,SAAS,GACzC,0BAA0B,GAAG,IAAI,CAKnC;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,oBAAoB,GAAG,SAAS,GACzC,oBAAoB,GAAG,IAAI,CAK7B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,IAAI,EAAE,uBAAuB,GAAG,SAAS,CAAC;IAC1C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAaT;AAuBD;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QAAE,KAAK,EAAE,kBAAkB,CAAA;KAAE,CAAC;IACvC,OAAO,EAAE,qBAAqB,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BhB"}
@@ -73,6 +73,7 @@ export function applyGitHubProgress(input) {
73
73
  if (commitStatus !== null) {
74
74
  tasks.push(postProgressCheckRun({
75
75
  phase: input.phase,
76
+ sessionId: input.sessionId,
76
77
  channel: input.channel,
77
78
  options: input.options,
78
79
  commitStatus,
@@ -90,6 +91,22 @@ export function applyGitHubProgress(input) {
90
91
  yield Promise.all(tasks);
91
92
  });
92
93
  }
94
+ function resolveProgressDetailsUrl(input) {
95
+ var _a;
96
+ if (input.sessionId === undefined ||
97
+ input.commitStatus.detailsUrl === undefined) {
98
+ return undefined;
99
+ }
100
+ const url = (_a = input.commitStatus.detailsUrl(input.sessionId)) === null || _a === void 0 ? void 0 : _a.trim();
101
+ return url === "" ? undefined : url;
102
+ }
103
+ function appendSummaryLink(summary, detailsUrl, linkText) {
104
+ const label = linkText === null || linkText === void 0 ? void 0 : linkText.trim();
105
+ if (detailsUrl === undefined || label === undefined || label === "") {
106
+ return summary;
107
+ }
108
+ return `${summary}\n\n[${label}](${detailsUrl})`;
109
+ }
93
110
  function postProgressCheckRun(input) {
94
111
  return __awaiter(this, void 0, void 0, function* () {
95
112
  var _a;
@@ -101,12 +118,22 @@ function postProgressCheckRun(input) {
101
118
  return;
102
119
  }
103
120
  const sha = state.headSha;
104
- const description = clipStatusDescription(progressPhaseCopy({
121
+ const phaseCopy = progressPhaseCopy({
105
122
  copy: input.commitStatus,
106
123
  phase: input.phase,
107
124
  label: progressLabel(input.options, input.commitStatus.context),
108
- }));
109
- const write = Object.assign(Object.assign({ name: input.commitStatus.context }, checkRunPhaseFields(input.phase)), { output: { title: description, summary: description } });
125
+ });
126
+ const title = clipStatusDescription(input.commitStatus.outputTitle === "context"
127
+ ? input.commitStatus.context
128
+ : phaseCopy);
129
+ const detailsUrl = resolveProgressDetailsUrl({
130
+ sessionId: input.sessionId,
131
+ commitStatus: input.commitStatus,
132
+ });
133
+ const write = Object.assign(Object.assign(Object.assign({ name: input.commitStatus.context }, checkRunPhaseFields(input.phase, input.commitStatus.failureConclusion)), (detailsUrl === undefined ? {} : { detailsUrl })), { output: {
134
+ title,
135
+ summary: appendSummaryLink(phaseCopy, detailsUrl, input.commitStatus.summaryLinkText),
136
+ } });
110
137
  const resource = {
111
138
  api: input.options.api,
112
139
  credentials: input.options.credentials,
@@ -156,13 +183,13 @@ function shouldRecreateCheckRun(error, status) {
156
183
  }
157
184
  return error.status === 422 && status === "in_progress";
158
185
  }
159
- function checkRunPhaseFields(phase) {
186
+ function checkRunPhaseFields(phase, failureConclusion = "failure") {
160
187
  if (phase === "pending") {
161
188
  return { status: "in_progress" };
162
189
  }
163
190
  return {
164
191
  status: "completed",
165
- conclusion: phase === "success" ? "success" : "failure",
192
+ conclusion: phase === "success" ? "success" : failureConclusion,
166
193
  };
167
194
  }
168
195
  function upsertBanner(input) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Synthesize GitHub webhook payloads from data you can *read* about a PR, so
3
- * `agent-serve github replay` can exercise a `githubChannel()` without repo
3
+ * `agent-sdk github replay` can exercise a `githubChannel()` without repo
4
4
  * admin, without the `gh webhook forward` relay, and deterministically (great
5
5
  * for hillclimbing).
6
6
  *
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Synthesize GitHub webhook payloads from data you can *read* about a PR, so
3
- * `agent-serve github replay` can exercise a `githubChannel()` without repo
3
+ * `agent-sdk github replay` can exercise a `githubChannel()` without repo
4
4
  * admin, without the `gh webhook forward` relay, and deterministically (great
5
5
  * for hillclimbing).
6
6
  *
@@ -31,6 +31,8 @@ export declare function githubBindingStateForEvent(input: {
31
31
  repo: string;
32
32
  number: number;
33
33
  repositoryId?: number;
34
+ /** `repository.html_url` (GHES host lives here). */
35
+ repositoryUrl?: string;
34
36
  installationId?: number;
35
37
  triggeringCommentId?: number;
36
38
  reviewCommentId?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/channels/github/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6DAA6D;IAC7D,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,4DAA4D;IAC5D,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,yDAAyD;IACzD,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;OAKG;IACH,yBAAyB,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3C;AAED,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,kBAAkB,CAuBpB;AAED,wDAAwD;AACxD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,GAAG,kBAAkB,CA6CrB"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/channels/github/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC5D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,6DAA6D;IAC7D,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,4DAA4D;IAC5D,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,yDAAyD;IACzD,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC;;;;;OAKG;IACH,yBAAyB,EAAE,OAAO,GAAG,IAAI,CAAC;CAC3C;AAED,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAC1C,kBAAkB,CAwBpB;AAED,wDAAwD;AACxD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,GAAG,kBAAkB,CAgDrB"}
@@ -2,11 +2,11 @@
2
2
  * Durable per-session GitHub channel state.
3
3
  */
4
4
  export function emptyGitHubChannelState(overrides = {}) {
5
- return Object.assign({ conversationKind: "pull_request", installationId: null, issueNumber: null, owner: "", pullRequestNumber: null, repo: "", repositoryId: null, reviewCommentId: null, reviewThreadRootCommentId: null, triggeringCommentId: null, deliveryId: null, eventName: null, headSha: null, baseRef: null, headRef: null, progressBannerCommentId: null, progressCheckRunId: null, progressCheckRunSha: null, progressCheckRunCompleted: null }, overrides);
5
+ return Object.assign({ conversationKind: "pull_request", installationId: null, issueNumber: null, owner: "", pullRequestNumber: null, repo: "", repositoryId: null, repositoryUrl: null, reviewCommentId: null, reviewThreadRootCommentId: null, triggeringCommentId: null, deliveryId: null, eventName: null, headSha: null, baseRef: null, headRef: null, progressBannerCommentId: null, progressCheckRunId: null, progressCheckRunSha: null, progressCheckRunCompleted: null }, overrides);
6
6
  }
7
7
  /** Build binding fields for an inbound conversation. */
8
8
  export function githubBindingStateForEvent(input) {
9
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
10
10
  if (input.kind === "issue") {
11
11
  return {
12
12
  conversationKind: "issue",
@@ -16,35 +16,38 @@ export function githubBindingStateForEvent(input) {
16
16
  pullRequestNumber: null,
17
17
  repo: input.repo,
18
18
  repositoryId: (_b = input.repositoryId) !== null && _b !== void 0 ? _b : null,
19
+ repositoryUrl: (_c = input.repositoryUrl) !== null && _c !== void 0 ? _c : null,
19
20
  reviewCommentId: null,
20
21
  reviewThreadRootCommentId: null,
21
- triggeringCommentId: (_c = input.triggeringCommentId) !== null && _c !== void 0 ? _c : null,
22
+ triggeringCommentId: (_d = input.triggeringCommentId) !== null && _d !== void 0 ? _d : null,
22
23
  };
23
24
  }
24
25
  if (input.kind === "review_thread") {
25
26
  return {
26
27
  conversationKind: "review_thread",
27
- installationId: (_d = input.installationId) !== null && _d !== void 0 ? _d : null,
28
+ installationId: (_e = input.installationId) !== null && _e !== void 0 ? _e : null,
28
29
  issueNumber: null,
29
30
  owner: input.owner,
30
31
  pullRequestNumber: input.number,
31
32
  repo: input.repo,
32
- repositoryId: (_e = input.repositoryId) !== null && _e !== void 0 ? _e : null,
33
- reviewCommentId: (_f = input.reviewCommentId) !== null && _f !== void 0 ? _f : null,
34
- reviewThreadRootCommentId: (_j = (_h = (_g = input.reviewThreadRootCommentId) !== null && _g !== void 0 ? _g : input.reviewCommentId) !== null && _h !== void 0 ? _h : input.triggeringCommentId) !== null && _j !== void 0 ? _j : null,
35
- triggeringCommentId: (_k = input.triggeringCommentId) !== null && _k !== void 0 ? _k : null,
33
+ repositoryId: (_f = input.repositoryId) !== null && _f !== void 0 ? _f : null,
34
+ repositoryUrl: (_g = input.repositoryUrl) !== null && _g !== void 0 ? _g : null,
35
+ reviewCommentId: (_h = input.reviewCommentId) !== null && _h !== void 0 ? _h : null,
36
+ reviewThreadRootCommentId: (_l = (_k = (_j = input.reviewThreadRootCommentId) !== null && _j !== void 0 ? _j : input.reviewCommentId) !== null && _k !== void 0 ? _k : input.triggeringCommentId) !== null && _l !== void 0 ? _l : null,
37
+ triggeringCommentId: (_m = input.triggeringCommentId) !== null && _m !== void 0 ? _m : null,
36
38
  };
37
39
  }
38
40
  return {
39
41
  conversationKind: "pull_request",
40
- installationId: (_l = input.installationId) !== null && _l !== void 0 ? _l : null,
42
+ installationId: (_o = input.installationId) !== null && _o !== void 0 ? _o : null,
41
43
  issueNumber: null,
42
44
  owner: input.owner,
43
45
  pullRequestNumber: input.number,
44
46
  repo: input.repo,
45
- repositoryId: (_m = input.repositoryId) !== null && _m !== void 0 ? _m : null,
47
+ repositoryId: (_p = input.repositoryId) !== null && _p !== void 0 ? _p : null,
48
+ repositoryUrl: (_q = input.repositoryUrl) !== null && _q !== void 0 ? _q : null,
46
49
  reviewCommentId: null,
47
50
  reviewThreadRootCommentId: null,
48
- triggeringCommentId: (_o = input.triggeringCommentId) !== null && _o !== void 0 ? _o : null,
51
+ triggeringCommentId: (_r = input.triggeringCommentId) !== null && _r !== void 0 ? _r : null,
49
52
  };
50
53
  }
@@ -1,4 +1,4 @@
1
- import type { ContinuationIdentity } from "../../continuation.js";
1
+ import type { ContinuationIdentity } from "../../internal/continuation-identity.js";
2
2
  import type { AgentCloudOptions, ArtifactsApi, AuthContext, AuthPolicy, ChannelEventHandlers, ChannelStartArgs, HostContext, SendMessageFn, SendMessageOptions } from "../../types.js";
3
3
  import type { GitHubApiOptions } from "./api.js";
4
4
  import type { GitHubHandle, GitHubThread } from "./binding.js";
@@ -46,8 +46,6 @@ export interface GitHubChannelCredentials {
46
46
  /** GitHub App private key (PEM). Falls back to `GITHUB_APP_PRIVATE_KEY`. */
47
47
  privateKey?: GitHubCredentialValue;
48
48
  }
49
- /** @deprecated Prefer {@link GitHubChannelCredentials}. */
50
- export type GitHubCredentials = GitHubChannelCredentials;
51
49
  export type GitHubPullRequestAction = "opened" | "reopened" | "synchronize" | "ready_for_review" | "edited" | "closed" | "labeled" | "unlabeled" | "assigned" | "unassigned" | "review_requested" | "review_request_removed" | "converted_to_draft";
52
50
  export type GitHubIssueAction = "opened" | "edited" | "closed" | "reopened" | "labeled" | "unlabeled" | "assigned" | "unassigned";
53
51
  export type GitHubConversationKind = "issue" | "pull_request" | "review_thread";
@@ -413,7 +411,7 @@ export interface GitHubChannelOptions {
413
411
  /** Route path under `/v1/channels/<name>`. Defaults to `/`. */
414
412
  path?: string;
415
413
  /**
416
- * Webhook events advertised to `agent-serve github forward` (published as
414
+ * Webhook events advertised to `agent-sdk github forward` (published as
417
415
  * `meta.githubWebhookEvents`). Defaults to the set derived from the declared
418
416
  * hooks. Set this to pin an exact list — e.g. to include events only handled
419
417
  * through {@link onEvent} such as `pull_request_review`.