@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
@@ -1 +1 @@
1
- {"version":3,"file":"cli-deploy.d.ts","sourceRoot":"","sources":["../../src/internal/cli-deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiBH,OAAO,EAKL,sBAAsB,EAevB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EACL,KAAK,aAAa,EAMnB,MAAM,gBAAgB,CAAC;AAaxB,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,MAAM,EAAE,SAAS,YAAY,EAAE,KAC5B,OAAO,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC,CAAC;AAEpC,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,M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./terminal-style.js";
35
35
  const DEFAULT_POLL_INTERVAL_MS = 3000;
36
36
  const DEFAULT_DEPLOY_TIMEOUT_MS = 10 * 60 * 1000;
37
+ /** `--multi-tenant` HTTP deploy is Anysphere-only (team id 1). */
38
+ const MULTI_TENANT_HTTP_DEPLOY_TEAM_ID = 1;
37
39
  /**
38
40
  * Credentials → deploy client → team id. Shared by deploy commands and
39
41
  * `--prod` AX routing. Returns an exit code (error already rendered) on
@@ -135,6 +137,11 @@ export function cmdDeploy(options) {
135
137
  if (typeof ctx === "number") {
136
138
  return ctx;
137
139
  }
140
+ if (options.multiTenant === true &&
141
+ ctx.teamId !== MULTI_TENANT_HTTP_DEPLOY_TEAM_ID) {
142
+ ctx.err("--multi-tenant is not available for this team.\n");
143
+ return 1;
144
+ }
138
145
  const targets = yield resolveDeployTargets(options, ctx);
139
146
  if (typeof targets === "number") {
140
147
  return targets;
@@ -651,7 +658,7 @@ function deployAgentsdkApplication(ctx, options, targets, declarations) {
651
658
  });
652
659
  }
653
660
  /**
654
- * `architecture: "v2"` deploy: POST `/internal/agentkit/deployments` and
661
+ * `architecture: "v2"` deploy: POST `/internal/agentsdk/deployments` and
655
662
  * poll the matching GET. The v2 accept path starts freeze bake; it does
656
663
  * not mint an engine alias or alias token.
657
664
  */
@@ -672,7 +679,10 @@ function deployOneAgentsdk(ctx, extras, args) {
672
679
  accepted = yield ctx.client.deployAgentkit(Object.assign({ teamId: ctx.teamId, slug, gitRepoUrl: args.gitRepoUrl, gitRef: args.gitRef, agentPath: args.agentPath, components: args.components, repositories: args.repositories }, (args.multiTenant ? { multiTenant: true } : {})));
673
680
  }
674
681
  catch (error) {
675
- return renderApiError(error, ctx.err);
682
+ return renderApiError(error, ctx.err, {
683
+ multiTenant: args.multiTenant,
684
+ teamId: ctx.teamId,
685
+ });
676
686
  }
677
687
  if (ctx.noWait) {
678
688
  if ((extras === null || extras === void 0 ? void 0 : extras.jsonCollect) !== undefined) {
@@ -892,6 +902,22 @@ export function cmdDeploymentStatus(slug, options) {
892
902
  if (typeof ctx === "number") {
893
903
  return ctx;
894
904
  }
905
+ // Same dispatch as `stop`: v1 409s architecture-v2 slugs, so the v2
906
+ // GET goes first. A v2 404 (missing slug, or an older backend) falls
907
+ // through to the v1 agent-serve detail.
908
+ try {
909
+ const detail = yield ctx.client.getAgentkitDeploy({
910
+ teamId: ctx.teamId,
911
+ slug,
912
+ });
913
+ renderAgentkitDeploymentStatus(ctx, detail);
914
+ return 0;
915
+ }
916
+ catch (error) {
917
+ if (!(error instanceof DeployApiError) || error.status !== 404) {
918
+ return renderApiError(error, ctx.err);
919
+ }
920
+ }
895
921
  let detail;
896
922
  try {
897
923
  detail = yield ctx.client.getDeployment({ teamId: ctx.teamId, slug });
@@ -966,6 +992,32 @@ export function cmdDeploymentStatus(slug, options) {
966
992
  return 0;
967
993
  });
968
994
  }
995
+ function renderAgentkitDeploymentStatus(ctx, detail) {
996
+ if (ctx.json) {
997
+ ctx.out(`${JSON.stringify(detail, null, 2)}\n`);
998
+ return;
999
+ }
1000
+ const lines = [
1001
+ `${detail.slug} (team ${detail.teamId})`,
1002
+ ` status: ${detail.status}`,
1003
+ ` architecture: v2`,
1004
+ ` application: ${detail.applicationId}`,
1005
+ ` release: ${detail.releaseId}`,
1006
+ ` progress: ${detail.progress}`,
1007
+ ];
1008
+ if (detail.statusMessage !== null && detail.statusMessage.trim() !== "") {
1009
+ lines.push(` step: ${detail.statusMessage}`);
1010
+ }
1011
+ if (detail.repositories !== undefined) {
1012
+ lines.push(` watching: ${detail.repositories.length === 0
1013
+ ? "(nothing)"
1014
+ : detail.repositories.join(", ")}`);
1015
+ }
1016
+ if (detail.lastError !== null && detail.lastError !== undefined) {
1017
+ lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
1018
+ }
1019
+ ctx.out(`${lines.join("\n")}\n`);
1020
+ }
969
1021
  // ============================================================================
970
1022
  // stop <slug>
971
1023
  // ============================================================================
@@ -984,7 +1036,7 @@ export function cmdStop(slug, options) {
984
1036
  // deploy). The v2 agentsdk control plane goes first: v1 endpoints refuse
985
1037
  // `architecture: "v2"` slugs with a 409 rather than a 404, so v1-first
986
1038
  // could not fall through. A v2 404 (including an older backend without
987
- // the `/internal/agentkit` mount) falls back to the v1 stop.
1039
+ // the `/internal/agentsdk` mount) falls back to the v1 stop.
988
1040
  let architecture = "v2";
989
1041
  let accepted;
990
1042
  try {
@@ -1406,10 +1458,35 @@ function pollUntil(ctx, slug, terminal, fetchDetail) {
1406
1458
  }
1407
1459
  };
1408
1460
  for (;;) {
1409
- const detail = yield fetchDetail().catch((error) => {
1461
+ let detail;
1462
+ try {
1463
+ detail = yield fetchDetail();
1464
+ }
1465
+ catch (error) {
1466
+ // Capacity / rate-limit on GET is not a bake failure. The v2 accept
1467
+ // already started freeze; keep polling until the wait budget expires.
1468
+ if (isTransientDeployStatusError(error) &&
1469
+ Date.now() - startedAt < ctx.timeoutMs) {
1470
+ if (!ctx.json) {
1471
+ const elapsed = Math.round((Date.now() - startedAt) / 1000);
1472
+ const label = "Waiting for status (server busy)";
1473
+ if (tty) {
1474
+ ctx.err(`\r\x1b[2K${slug}: ${label} (${elapsed}s)`);
1475
+ sawProgress = true;
1476
+ }
1477
+ else if (label !== lastLabel) {
1478
+ ctx.err(`${slug}: ${label}\n`);
1479
+ }
1480
+ lastLabel = label;
1481
+ }
1482
+ const waitMs = transientDeployStatusWaitMs(error, ctx.pollIntervalMs);
1483
+ const remaining = ctx.timeoutMs - (Date.now() - startedAt);
1484
+ yield sleep(Math.max(0, Math.min(waitMs, remaining)));
1485
+ continue;
1486
+ }
1410
1487
  finishProgressLine();
1411
1488
  throw error;
1412
- });
1489
+ }
1413
1490
  report(detail);
1414
1491
  if (terminal.has(detail.status)) {
1415
1492
  finishProgressLine();
@@ -1424,6 +1501,19 @@ function pollUntil(ctx, slug, terminal, fetchDetail) {
1424
1501
  }
1425
1502
  });
1426
1503
  }
1504
+ /** Load-shed / rate-limit on status GET — the deploy itself may still be baking. */
1505
+ function isTransientDeployStatusError(error) {
1506
+ return (error instanceof DeployApiError &&
1507
+ (error.status === 503 || error.status === 429));
1508
+ }
1509
+ function transientDeployStatusWaitMs(error, pollIntervalMs) {
1510
+ if (error.status === 429 &&
1511
+ error.retryAfterSeconds !== undefined &&
1512
+ error.retryAfterSeconds > 0) {
1513
+ return Math.max(pollIntervalMs, error.retryAfterSeconds * 1000);
1514
+ }
1515
+ return pollIntervalMs;
1516
+ }
1427
1517
  /**
1428
1518
  * Wait until GET 404s (the delete reconciler purged the record). Treats
1429
1519
  * other errors as failures. Throws DeployApiError on timeout.
@@ -1491,12 +1581,17 @@ function deployFailureDetail(lastError) {
1491
1581
  }
1492
1582
  return `: ${sanitizeCustomerError(lastError.trim())}`;
1493
1583
  }
1494
- function renderApiError(error, err) {
1584
+ function renderApiError(error, err, context) {
1495
1585
  if (error instanceof DeployApiError) {
1496
1586
  err(`${error.message}\n`);
1497
1587
  if (error.status === 409 &&
1498
1588
  error.message.includes("application multiTenant does not match")) {
1499
- err("This slug is a Cursor-managed (multi-tenant) product. Redeploy it with --multi-tenant.\n");
1589
+ if ((context === null || context === void 0 ? void 0 : context.multiTenant) === true) {
1590
+ err("This slug is a single-tenant application. Redeploy it without --multi-tenant.\n");
1591
+ }
1592
+ else if ((context === null || context === void 0 ? void 0 : context.teamId) === MULTI_TENANT_HTTP_DEPLOY_TEAM_ID) {
1593
+ err("This slug is a Cursor-managed (multi-tenant) product. Redeploy it with --multi-tenant.\n");
1594
+ }
1500
1595
  }
1501
1596
  return 1;
1502
1597
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-mirror.d.ts","sourceRoot":"","sources":["../../src/internal/conversation-mirror.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAsB,eAAe,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK5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;IACH,OAAO,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtE;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpE;AAYD,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,QAAQ,CAAC;IACf,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,kEAAkE;AAClE,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,+BAA+B,GACvC,kBAAkB,CAqMpB;AA6ED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE;IAC9C,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C,GAAG,kBAAkB,GAAG,SAAS,CAoBjC"}
@@ -293,14 +293,13 @@ export function selectConversationMirror(input) {
293
293
  return undefined;
294
294
  }
295
295
  const env = (_a = input.env) !== null && _a !== void 0 ? _a : process.env;
296
- const frameworkStoreId = cursorFrameworkStoreSourceId(env);
297
- if (env[AGENT_SERVE_GENERATION_ENV_VAR] === undefined ||
298
- frameworkStoreId === undefined) {
296
+ if (env[AGENT_SERVE_GENERATION_ENV_VAR] === undefined) {
299
297
  return undefined;
300
298
  }
299
+ const envSnapshot = env;
301
300
  return createConversationMirror({
302
301
  sink: cursorHostedFiles({
303
- storeSourceId: frameworkStoreId,
302
+ resolveStoreSourceId: () => cursorFrameworkStoreSourceId(envSnapshot),
304
303
  // Full chain (env → key file → stored login): frozen engines listen
305
304
  // unsigned and bind CURSOR_API_KEY_FILE at task time, after this sink
306
305
  // is constructed.
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Task-time bind paths for hosted deployment file-store source ids.
3
+ *
4
+ * Freeze v2 snapshots start `agent-serve serve` at bake time without a service
5
+ * account, so neither store id is in process env. Execute-from-freeze binds
6
+ * the deployment credential and store ids into `/run/cursor/secrets/` without
7
+ * restarting July — the same pattern as {@link DEFAULT_CURSOR_API_KEY_FILE}.
8
+ */
9
+ export declare const DEFAULT_AGENT_SERVE_STORE_SOURCE_ID_FILE = "/run/cursor/secrets/AGENT_SERVE_STORE_SOURCE_ID";
10
+ export declare const DEFAULT_AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID_FILE = "/run/cursor/secrets/AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID";
11
+ /** Deployment user-land store: env, then task-bind file. */
12
+ export declare function resolveDeploymentStoreSourceIdSync(env?: NodeJS.ProcessEnv): string | undefined;
13
+ /** Engine framework store: env, then task-bind file. */
14
+ export declare function resolveFrameworkStoreSourceIdSync(env?: NodeJS.ProcessEnv): string | undefined;
15
+ //# sourceMappingURL=hosted-store-secrets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-store-secrets.d.ts","sourceRoot":"","sources":["../../../src/internal/cursor/hosted-store-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,wCAAwC,oDACF,CAAC;AAEpD,eAAO,MAAM,kDAAkD,8DACF,CAAC;AA4B9D,4DAA4D;AAC5D,wBAAgB,kCAAkC,CAChD,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,SAAS,CAUpB;AAED,wDAAwD;AACxD,wBAAgB,iCAAiC,CAC/C,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,SAAS,CAUpB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Task-time bind paths for hosted deployment file-store source ids.
3
+ *
4
+ * Freeze v2 snapshots start `agent-serve serve` at bake time without a service
5
+ * account, so neither store id is in process env. Execute-from-freeze binds
6
+ * the deployment credential and store ids into `/run/cursor/secrets/` without
7
+ * restarting July — the same pattern as {@link DEFAULT_CURSOR_API_KEY_FILE}.
8
+ */
9
+ import { readFileSync } from "node:fs";
10
+ export const DEFAULT_AGENT_SERVE_STORE_SOURCE_ID_FILE = "/run/cursor/secrets/AGENT_SERVE_STORE_SOURCE_ID";
11
+ export const DEFAULT_AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID_FILE = "/run/cursor/secrets/AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID";
12
+ const STORE_SOURCE_ID_ENV = "AGENT_SERVE_STORE_SOURCE_ID";
13
+ const FRAMEWORK_STORE_SOURCE_ID_ENV = "AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID";
14
+ const STORE_SOURCE_ID_FILE_ENV = "AGENT_SERVE_STORE_SOURCE_ID_FILE";
15
+ const FRAMEWORK_STORE_SOURCE_ID_FILE_ENV = "AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID_FILE";
16
+ function readTrimmedFile(path) {
17
+ try {
18
+ const raw = readFileSync(path, "utf8").trim();
19
+ return raw === "" ? undefined : raw;
20
+ }
21
+ catch (_a) {
22
+ return undefined;
23
+ }
24
+ }
25
+ function readBoundSecretFile(fileEnvVar, defaultPath, env) {
26
+ var _a;
27
+ const configured = (_a = env[fileEnvVar]) === null || _a === void 0 ? void 0 : _a.trim();
28
+ const path = configured !== undefined && configured !== "" ? configured : defaultPath;
29
+ return readTrimmedFile(path);
30
+ }
31
+ /** Deployment user-land store: env, then task-bind file. */
32
+ export function resolveDeploymentStoreSourceIdSync(env = process.env) {
33
+ var _a;
34
+ const fromEnv = (_a = env[STORE_SOURCE_ID_ENV]) === null || _a === void 0 ? void 0 : _a.trim();
35
+ if (fromEnv !== undefined && fromEnv !== "") {
36
+ return fromEnv;
37
+ }
38
+ return readBoundSecretFile(STORE_SOURCE_ID_FILE_ENV, DEFAULT_AGENT_SERVE_STORE_SOURCE_ID_FILE, env);
39
+ }
40
+ /** Engine framework store: env, then task-bind file. */
41
+ export function resolveFrameworkStoreSourceIdSync(env = process.env) {
42
+ var _a;
43
+ const fromEnv = (_a = env[FRAMEWORK_STORE_SOURCE_ID_ENV]) === null || _a === void 0 ? void 0 : _a.trim();
44
+ if (fromEnv !== undefined && fromEnv !== "") {
45
+ return fromEnv;
46
+ }
47
+ return readBoundSecretFile(FRAMEWORK_STORE_SOURCE_ID_FILE_ENV, DEFAULT_AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID_FILE, env);
48
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-event-relay.d.ts","sourceRoot":"","sources":["../../src/internal/cursor-event-relay.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6EAA6E;IAC7E,MAAM,CA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8ED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAoE1B;AAUD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC,GAC3E,qBAAqB,EAAE,CAczB;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAWf,OAAO,CAAC,QAAQ,CAAC,OAAO;IAVpC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAkC;IACvD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA0B;IACxD;;;;OAIG;IACH,OAAO,CAAC,gBAAgB,CAA0C;IAClE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqB;IAEvD,YAA6B,OAAO,EAAE,uBAAuB,EAqE5D;IAED;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAetB,KAAK,IAAI,IAAI,CAEZ;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1B;CACF"}
@@ -364,12 +364,11 @@ export class CursorEventRelay {
364
364
  events: [...subscription.events],
365
365
  })),
366
366
  }),
367
- // Empty subscriptions drop this consumer's registration on clean stop
368
- // instead of leaving it to lapse by TTL.
369
- buildDeregistrationBody: (consumerId) => ({
370
- consumerId,
371
- subscriptions: [],
372
- }),
367
+ // No deregistration on stop: the backend only records events for a
368
+ // repo that some consumer is subscribed to, so dropping the
369
+ // registration leaves a hole in the log until the next process
370
+ // registers, and the durable offset cannot replay what was never
371
+ // written. A consumer that does not come back lapses by TTL.
373
372
  applyRegistrationResponse: (json) => {
374
373
  var _a, _b, _c;
375
374
  const result = json;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Thin client for the Agent Serve deployment management API
3
3
  * (`/internal/agent-serve/deployments` on the Cursor backend) and the v2
4
- * AgentSDK accept path (`/internal/agentkit/deployments`). Pure
4
+ * AgentSDK accept path (`/internal/agentsdk/deployments`). Pure
5
5
  * request/response + error mapping — no console I/O, no polling loops;
6
6
  * rendering lives in `cli-deploy.ts`.
7
7
  *
@@ -133,7 +133,7 @@ export interface StopAccepted {
133
133
  }
134
134
  export type DeleteAccepted = StopAccepted;
135
135
  /**
136
- * `POST /internal/agentkit/deployments` 202 body. Distinct from v1
136
+ * `POST /internal/agentsdk/deployments` 202 body. Distinct from v1
137
137
  * {@link DeployAccepted}: the v2 control plane returns catalog ids, not
138
138
  * an engine alias or one-shot alias token.
139
139
  */
@@ -151,7 +151,7 @@ export interface AgentkitDeployComponent {
151
151
  componentKey: string;
152
152
  agentPath?: string;
153
153
  }
154
- /** Customer-visible v2 deploy status (`GET /internal/agentkit/deployments/:slug`). */
154
+ /** Customer-visible v2 deploy status (`GET /internal/agentsdk/deployments/:slug`). */
155
155
  export type AgentkitCustomerStatus = "pending" | "deploying" | "running" | "failed" | "stopped";
156
156
  export type AgentkitDeployProgress = "queued" | "creating" | "building" | "starting" | "finalizing" | "running" | "failed" | "stopped";
157
157
  export interface AgentkitDeployStatus {
@@ -172,7 +172,7 @@ export interface AgentkitDeployStatus {
172
172
  }
173
173
  export declare const TERMINAL_AGENTKIT_DEPLOY_STATUSES: ReadonlySet<AgentkitCustomerStatus>;
174
174
  /**
175
- * `POST /internal/agentkit/deployments/:slug/stop` 202 body. Like v1
175
+ * `POST /internal/agentsdk/deployments/:slug/stop` 202 body. Like v1
176
176
  * {@link StopAccepted} but keyed by catalog ids instead of the numeric
177
177
  * deployment row id.
178
178
  */
@@ -228,7 +228,7 @@ export declare class AgentServeDeployClient {
228
228
  }): Promise<DeployAccepted>;
229
229
  /**
230
230
  * Create or redeploy onto the v2 control plane
231
- * (`POST /internal/agentkit/deployments`). 202 means accepted; poll
231
+ * (`POST /internal/agentsdk/deployments`). 202 means accepted; poll
232
232
  * {@link getAgentkitDeploy} until a terminal status. `components` deploys
233
233
  * one application with several release components (one per agent
234
234
  * directory); it is mutually exclusive with `agentPath`.
@@ -249,7 +249,7 @@ export declare class AgentServeDeployClient {
249
249
  slug: string;
250
250
  }): Promise<AgentkitDeployStatus>;
251
251
  /**
252
- * Stop a v2 deployment (`POST /internal/agentkit/deployments/:slug/stop`).
252
+ * Stop a v2 deployment (`POST /internal/agentsdk/deployments/:slug/stop`).
253
253
  * 202 means accepted; poll {@link getAgentkitDeploy} until `stopped`.
254
254
  */
255
255
  stopAgentkit(args: {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Thin client for the Agent Serve deployment management API
3
3
  * (`/internal/agent-serve/deployments` on the Cursor backend) and the v2
4
- * AgentSDK accept path (`/internal/agentkit/deployments`). Pure
4
+ * AgentSDK accept path (`/internal/agentsdk/deployments`). Pure
5
5
  * request/response + error mapping — no console I/O, no polling loops;
6
6
  * rendering lives in `cli-deploy.ts`.
7
7
  *
@@ -303,7 +303,7 @@ export class AgentServeDeployClient {
303
303
  }
304
304
  /**
305
305
  * Create or redeploy onto the v2 control plane
306
- * (`POST /internal/agentkit/deployments`). 202 means accepted; poll
306
+ * (`POST /internal/agentsdk/deployments`). 202 means accepted; poll
307
307
  * {@link getAgentkitDeploy} until a terminal status. `components` deploys
308
308
  * one application with several release components (one per agent
309
309
  * directory); it is mutually exclusive with `agentPath`.
@@ -323,7 +323,7 @@ export class AgentServeDeployClient {
323
323
  }
324
324
  const raw = yield this.request({
325
325
  method: "POST",
326
- path: "/internal/agentkit/deployments",
326
+ path: "/internal/agentsdk/deployments",
327
327
  body: Object.assign({ teamId: args.teamId, slug: args.slug, gitRepoUrl: args.gitRepoUrl, gitRef: args.gitRef, agentPath: args.agentPath, components: args.components, repositories: args.repositories !== undefined && args.repositories.length > 0
328
328
  ? args.repositories
329
329
  : undefined }, (args.multiTenant === true ? { multiTenant: true } : {})),
@@ -336,21 +336,21 @@ export class AgentServeDeployClient {
336
336
  return __awaiter(this, void 0, void 0, function* () {
337
337
  const raw = yield this.request({
338
338
  method: "GET",
339
- path: `/internal/agentkit/deployments/${encodeURIComponent(args.slug)}?teamId=${args.teamId}`,
339
+ path: `/internal/agentsdk/deployments/${encodeURIComponent(args.slug)}?teamId=${args.teamId}`,
340
340
  context: { verb: "get deployment", slug: args.slug },
341
341
  });
342
342
  return agentkitDeployStatusSchema.parse(raw);
343
343
  });
344
344
  }
345
345
  /**
346
- * Stop a v2 deployment (`POST /internal/agentkit/deployments/:slug/stop`).
346
+ * Stop a v2 deployment (`POST /internal/agentsdk/deployments/:slug/stop`).
347
347
  * 202 means accepted; poll {@link getAgentkitDeploy} until `stopped`.
348
348
  */
349
349
  stopAgentkit(args) {
350
350
  return __awaiter(this, void 0, void 0, function* () {
351
351
  const raw = yield this.request({
352
352
  method: "POST",
353
- path: `/internal/agentkit/deployments/${encodeURIComponent(args.slug)}/stop?teamId=${args.teamId}`,
353
+ path: `/internal/agentsdk/deployments/${encodeURIComponent(args.slug)}/stop?teamId=${args.teamId}`,
354
354
  context: { verb: "stop", slug: args.slug },
355
355
  });
356
356
  return agentkitStopAcceptedSchema.parse(raw);
@@ -596,7 +596,7 @@ function mapErrorResponse(response, bodyText, context) {
596
596
  // Fastify's route-not-found envelope means we hit the wrong host
597
597
  // (api2 vs api.cursor.com), not a missing deployment / closed gate.
598
598
  if (/Route \S+ not found/i.test(bodyText)) {
599
- return new DeployApiError(`Agent Serve deploy API not found on this host — use the default api.cursor.com (unset CURSOR_API_BASE_URL), or point CURSOR_API_BASE_URL at a backend that mounts /internal/agent-serve/* and /internal/agentkit/*.`, 404);
599
+ return new DeployApiError(`Agent Serve deploy API not found on this host — use the default api.cursor.com (unset CURSOR_API_BASE_URL), or point CURSOR_API_BASE_URL at a backend that mounts /internal/agent-serve/* and /internal/agentsdk/*.`, 404);
600
600
  }
601
601
  return new DeployApiError(context.slug === undefined
602
602
  ? `Not found — the agent_serve_mvp feature gate may not be enabled for your team.`
@@ -1 +1 @@
1
- {"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/internal/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkBH,OAAO,EACL,KAAK,iBAAiB,EAItB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAQjB,KAAK,UAAU,EA0BhB,MAAM,aAAa,CAAC;AAgCrB,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,YAAY,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC3E;AAmBD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASrE;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,aAAa,EAAE,CAAC,CA2B1B;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC,CAAC,CA6BzD;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,MAAM,EACf,OAAO,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GAAG,MAAM,GAAG,SAAS,CAIrB;AA6nBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAiB3E;AA6iCD,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAgKnE"}
@@ -1464,6 +1464,8 @@ function warnCloudRuntimeLimitations(ctx, agentDir, counts) {
1464
1464
  // ============================================================================
1465
1465
  function loadChannels(ctx, channelsDir) {
1466
1466
  return __awaiter(this, void 0, void 0, function* () {
1467
+ var _a;
1468
+ var _b;
1467
1469
  const channels = [];
1468
1470
  let httpChannelDefinition;
1469
1471
  if (!(yield isDirectory(channelsDir))) {
@@ -1526,7 +1528,15 @@ function loadChannels(ctx, channelsDir) {
1526
1528
  });
1527
1529
  continue;
1528
1530
  }
1529
- channels.push({ id, definition: mod.default });
1531
+ const definition = mod.default;
1532
+ for (const notice of (_b = (_a = definition.meta) === null || _a === void 0 ? void 0 : _a.deprecations) !== null && _b !== void 0 ? _b : []) {
1533
+ ctx.diagnostics.push({
1534
+ severity: "warning",
1535
+ path: displayPath(ctx, entryPath),
1536
+ message: notice,
1537
+ });
1538
+ }
1539
+ channels.push({ id, definition });
1530
1540
  }
1531
1541
  return { channels, httpChannelDefinition };
1532
1542
  });
@@ -8,15 +8,16 @@
8
8
  * is browsable from the dashboard and mountable on cloud-runtime VMs;
9
9
  * - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
10
10
  * holds engine-owned session state — session records, event transcripts,
11
- * the continuation index, and the SDK conversation mirror — and is never
12
- * exposed to authors or models.
11
+ * hosted-execution run logs, the continuation index, and the SDK
12
+ * conversation mirror — and is never exposed to authors or models.
13
13
  *
14
14
  * This module puts framework session state on the framework store. The
15
15
  * {@link storageKeys} scheme was designed for exactly this: keys are a
16
16
  * stable versioned contract that sinks may route on, so
17
17
  * {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
18
- * kind — `session` / `session-events` / `continuation` go to the framework
19
- * file store (file-shaped; the store accepts values up to 64 MiB per
18
+ * kind — `session` / `session-events` / `session-runs` / `continuation`
19
+ * go to the framework file store (file-shaped; the store accepts values
20
+ * up to 64 MiB per
20
21
  * object without chunking, versus the KV proxy's 1 MiB row cap), while
21
22
  * author `kv`, eval runs, A/B samples, and conditional writes stay on the
22
23
  * control-plane KV proxy (the dashboard reads them there, and CAS needs a
@@ -1 +1 @@
1
- {"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,eAAe,CAAC;AAejE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAavD;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CACvD,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CAuDvE;AAcD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,EAAE,EAAE,mBAAmB,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAe1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GACrC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CA0BnC"}
1
+ {"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,eAAe,CAAC;AAgBjE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAavD;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CACvD,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CAuDvE;AAcD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,EAAE,EAAE,mBAAmB,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAe1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GACrC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CA0BnC"}
@@ -8,15 +8,16 @@
8
8
  * is browsable from the dashboard and mountable on cloud-runtime VMs;
9
9
  * - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
10
10
  * holds engine-owned session state — session records, event transcripts,
11
- * the continuation index, and the SDK conversation mirror — and is never
12
- * exposed to authors or models.
11
+ * hosted-execution run logs, the continuation index, and the SDK
12
+ * conversation mirror — and is never exposed to authors or models.
13
13
  *
14
14
  * This module puts framework session state on the framework store. The
15
15
  * {@link storageKeys} scheme was designed for exactly this: keys are a
16
16
  * stable versioned contract that sinks may route on, so
17
17
  * {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
18
- * kind — `session` / `session-events` / `continuation` go to the framework
19
- * file store (file-shaped; the store accepts values up to 64 MiB per
18
+ * kind — `session` / `session-events` / `session-runs` / `continuation`
19
+ * go to the framework file store (file-shaped; the store accepts values
20
+ * up to 64 MiB per
20
21
  * object without chunking, versus the KV proxy's 1 MiB row cap), while
21
22
  * author `kv`, eval runs, A/B samples, and conditional writes stay on the
22
23
  * control-plane KV proxy (the dashboard reads them there, and CAS needs a
@@ -44,6 +45,7 @@ import { mapBounded } from "./bounded.js";
44
45
  const FRAMEWORK_FILE_KINDS = new Set([
45
46
  "session",
46
47
  "session-events",
48
+ "session-runs",
47
49
  "continuation",
48
50
  ]);
49
51
  /**
@@ -17,17 +17,19 @@
17
17
  *
18
18
  * - **Cursor-managed hosting** (the deployment-generation environment
19
19
  * variable is set, same signal that registers `GET /v1/manifest`):
20
- * the Cursor-hosted backend. When the deployment carries a
21
- * **framework-level file store**
22
- * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`), session records, event
23
- * transcripts, and the continuation index live there file-shaped state
24
- * on file storage, apart from the author-facing user store — while
25
- * `host.kv`, eval runs, A/B samples, and conditional writes stay on the
26
- * control-plane KV proxy (see framework-file-storage.ts). Without one
27
- * (a deploy predating framework-store provisioning), everything goes to
28
- * the KV proxy as before. The API key resolves through the full
29
- * credential chain on every call because hosted freeze snapshots listen
30
- * unsigned and the binder drops the key file after restore.
20
+ * the deployment's **framework-level file store**
21
+ * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`, bound at task time) holds
22
+ * session records, event transcripts, and the continuation index —
23
+ * file-shaped state on file storage, apart from the author-facing user
24
+ * store. Author `host.kv`, eval runs, A/B samples, and conditional writes
25
+ * ride the AgentSDK v2 KV proxy (cursor-hosted-v2.ts), which resolves the
26
+ * pod service account to the factorydb deployment row (the v1 Bugbot
27
+ * proxy cannot resolve v2 pods at all). Framework session state never
28
+ * routes to the KV proxy the composite splits by key kind so
29
+ * transcripts stay off the author-reachable KV namespace. The API key
30
+ * resolves through the full credential chain on every call because hosted
31
+ * freeze snapshots listen unsigned and the binder drops the key file
32
+ * after restore.
31
33
  * - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
32
34
  * is correct when the operator owns the disk.
33
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAMH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,8BAA8B,GACpC,iBAAiB,GAAG,SAAS,CAoD/B"}
1
+ {"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAMH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,Y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