@cursor/july 0.1.105 → 0.1.108

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 (395) hide show
  1. package/README.md +10 -5
  2. package/dist/bin/agent-serve.js +31 -16
  3. package/dist/channels/bitbucket/types.d.ts +2 -4
  4. package/dist/channels/bitbucket/types.d.ts.map +1 -1
  5. package/dist/channels/deployments/types.d.ts +5 -8
  6. package/dist/channels/deployments/types.d.ts.map +1 -1
  7. package/dist/channels/github/github-channel.js +8 -5
  8. package/dist/channels/github/types.d.ts +7 -5
  9. package/dist/channels/github/types.d.ts.map +1 -1
  10. package/dist/channels/gitlab/types.d.ts +2 -5
  11. package/dist/channels/gitlab/types.d.ts.map +1 -1
  12. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  13. package/dist/channels/origin/origin-channel.js +27 -13
  14. package/dist/channels/origin/types.d.ts +7 -4
  15. package/dist/channels/origin/types.d.ts.map +1 -1
  16. package/dist/channels/slack/defaults.d.ts.map +1 -1
  17. package/dist/channels/slack/defaults.js +3 -0
  18. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  19. package/dist/channels/slack/dispatch.js +1 -1
  20. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  21. package/dist/channels/slack/live-delivery.js +48 -11
  22. package/dist/channels/slack/types.d.ts +4 -3
  23. package/dist/channels/slack/types.d.ts.map +1 -1
  24. package/dist/channels.d.ts +45 -0
  25. package/dist/channels.d.ts.map +1 -1
  26. package/dist/channels.js +106 -7
  27. package/dist/connections.d.ts +2 -1
  28. package/dist/connections.d.ts.map +1 -1
  29. package/dist/connections.js +2 -1
  30. package/dist/docs/404.html +3 -3
  31. package/dist/docs/ab.html +6 -6
  32. package/dist/docs/assets/{app.BVwaffdK.js → app.BASKM3M4.js} +1 -1
  33. package/dist/docs/assets/chunks/@localSearchIndexroot.BHZYsNVi.js +1 -0
  34. package/dist/docs/assets/chunks/{VPLocalSearchBox.WuWTZ1x8.js → VPLocalSearchBox.BOKxlYGP.js} +2 -2
  35. package/dist/docs/assets/chunks/{theme.BYdI_6sF.js → theme.DbDZW-zb.js} +2 -2
  36. package/dist/docs/assets/{deployment.md.MFPKqsqI.js → deployment.md.JenwuCCB.js} +4 -4
  37. package/dist/docs/assets/{deployment.md.MFPKqsqI.lean.js → deployment.md.JenwuCCB.lean.js} +1 -1
  38. package/dist/docs/assets/{evals.md.CbMoebP1.js → evals.md.C1ekS3k2.js} +1 -1
  39. package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +9 -0
  40. package/dist/docs/assets/{guides_cloud-agents.md.DS8RIjwx.lean.js → guides_cloud-agents.md.BsloyHdY.lean.js} +1 -1
  41. package/dist/docs/assets/{guides_github.md.c0gdGJ-D.js → guides_github.md.BH33UEBJ.js} +1 -1
  42. package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.js → guides_grokbot-agents.md.DyV-WArv.js} +1 -1
  43. package/dist/docs/assets/guides_improve.md.BGVk32bK.js +14 -0
  44. package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +1 -0
  45. package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.js → guides_opentelemetry.md.SCRMskno.js} +3 -3
  46. package/dist/docs/assets/{guides_opentelemetry.md.COh9jFVg.lean.js → guides_opentelemetry.md.SCRMskno.lean.js} +1 -1
  47. package/dist/docs/assets/{guides_slack.md.9oHPye9o.js → guides_slack.md.D4RVMM4G.js} +3 -3
  48. package/dist/docs/assets/{guides_slack.md.9oHPye9o.lean.js → guides_slack.md.D4RVMM4G.lean.js} +1 -1
  49. package/dist/docs/assets/index.md.BjH1w2ZW.js +5 -0
  50. package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.js → reference_agent-config.md.CvoL6pof.js} +1 -1
  51. package/dist/docs/assets/{reference_channels.md.DBGcaB7m.js → reference_channels.md.D-qTqwcq.js} +2 -2
  52. package/dist/docs/assets/{reference_channels.md.DBGcaB7m.lean.js → reference_channels.md.D-qTqwcq.lean.js} +1 -1
  53. package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.js → reference_cli.md.Ca26u0Es.js} +6 -6
  54. package/dist/docs/assets/{reference_cli.md.C6Lo8SEd.lean.js → reference_cli.md.Ca26u0Es.lean.js} +1 -1
  55. package/dist/docs/assets/{reference_connections.md.Di6jJAXF.js → reference_connections.md.BojkC6c5.js} +1 -1
  56. package/dist/docs/assets/{reference_extensions.md.CGmMLblt.js → reference_extensions.md.CPWt00ds.js} +1 -1
  57. package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.js → scaffolding-agents.md.Kctn3OVb.js} +1 -1
  58. package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.js → skills_create-agent.md.Q3h6Je-e.js} +1 -1
  59. package/dist/docs/assets/{skills_debug.md.CDbPhHfg.js → skills_debug.md.CVjCXMFF.js} +1 -1
  60. package/dist/docs/assets/{skills_debug.md.CDbPhHfg.lean.js → skills_debug.md.CVjCXMFF.lean.js} +1 -1
  61. package/dist/docs/assets/{skills_evals.md.723kpUmA.js → skills_evals.md.BhovOvrl.js} +1 -1
  62. package/dist/docs/assets/skills_framework-map.md.D-tFZhFS.js +1 -0
  63. package/dist/docs/assets/{skills_framework-map.md.haibFyoB.lean.js → skills_framework-map.md.D-tFZhFS.lean.js} +1 -1
  64. package/dist/docs/assets/{skills_github.md.D0JahM8c.js → skills_github.md.hgFX_oKY.js} +1 -1
  65. package/dist/docs/assets/{skills_otel.md.CqhobH3B.js → skills_otel.md.B5Ddv1xH.js} +1 -1
  66. package/dist/docs/assets/{style.BRuM8477.css → style.DCD_zyg3.css} +1 -1
  67. package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +1 -0
  68. package/dist/docs/building-with-agents.html +6 -6
  69. package/dist/docs/concepts.html +5 -5
  70. package/dist/docs/deployment.html +9 -9
  71. package/dist/docs/deployment.md +7 -2
  72. package/dist/docs/evals.html +8 -8
  73. package/dist/docs/evals.md +3 -2
  74. package/dist/docs/guides/agent-to-agent.html +6 -6
  75. package/dist/docs/guides/cloud-agents.html +7 -7
  76. package/dist/docs/guides/cloud-agents.md +4 -3
  77. package/dist/docs/guides/convert-automation.html +6 -6
  78. package/dist/docs/guides/github.html +7 -7
  79. package/dist/docs/guides/github.md +2 -1
  80. package/dist/docs/guides/grokbot-agents.html +7 -7
  81. package/dist/docs/guides/grokbot-agents.md +2 -2
  82. package/dist/docs/guides/human-in-the-loop.html +6 -6
  83. package/dist/docs/guides/improve.html +40 -0
  84. package/dist/docs/guides/improve.md +91 -0
  85. package/dist/docs/guides/mcp-oauth.html +6 -6
  86. package/dist/docs/guides/opentelemetry.html +8 -8
  87. package/dist/docs/guides/opentelemetry.md +3 -4
  88. package/dist/docs/guides/slack.html +8 -8
  89. package/dist/docs/guides/slack.md +2 -1
  90. package/dist/docs/guides/webhooks.html +6 -6
  91. package/dist/docs/hashmap.json +1 -1
  92. package/dist/docs/hillclimbing.html +6 -6
  93. package/dist/docs/index.html +8 -8
  94. package/dist/docs/index.md +4 -0
  95. package/dist/docs/llms-full.txt +180 -61
  96. package/dist/docs/llms.txt +1 -0
  97. package/dist/docs/quickstart.html +6 -6
  98. package/dist/docs/reference/agent-config.html +7 -7
  99. package/dist/docs/reference/agent-config.md +5 -2
  100. package/dist/docs/reference/artifacts.html +6 -6
  101. package/dist/docs/reference/channels.html +7 -7
  102. package/dist/docs/reference/channels.md +11 -19
  103. package/dist/docs/reference/cli.html +11 -11
  104. package/dist/docs/reference/cli.md +23 -13
  105. package/dist/docs/reference/connections.html +8 -8
  106. package/dist/docs/reference/connections.md +2 -1
  107. package/dist/docs/reference/extensions.html +7 -7
  108. package/dist/docs/reference/extensions.md +2 -0
  109. package/dist/docs/reference/hooks.html +6 -6
  110. package/dist/docs/reference/http-api.html +6 -6
  111. package/dist/docs/reference/instructions.html +6 -6
  112. package/dist/docs/reference/playground.html +5 -5
  113. package/dist/docs/reference/project-layout.html +6 -6
  114. package/dist/docs/reference/prompt.html +6 -6
  115. package/dist/docs/reference/result.html +6 -6
  116. package/dist/docs/reference/schedules.html +6 -6
  117. package/dist/docs/reference/sessions.html +5 -5
  118. package/dist/docs/reference/skills.html +6 -6
  119. package/dist/docs/reference/subagents.html +6 -6
  120. package/dist/docs/reference/tools.html +6 -6
  121. package/dist/docs/scaffolding-agents.html +6 -6
  122. package/dist/docs/scaffolding-agents.md +2 -1
  123. package/dist/docs/skills/ab.html +6 -6
  124. package/dist/docs/skills/create-agent.html +8 -8
  125. package/dist/docs/skills/create-agent.md +1 -1
  126. package/dist/docs/skills/debug.html +6 -6
  127. package/dist/docs/skills/debug.md +1 -1
  128. package/dist/docs/skills/evals.html +8 -8
  129. package/dist/docs/skills/evals.md +1 -1
  130. package/dist/docs/skills/framework-map.html +6 -6
  131. package/dist/docs/skills/framework-map.md +4 -2
  132. package/dist/docs/skills/github.html +8 -8
  133. package/dist/docs/skills/github.md +1 -1
  134. package/dist/docs/skills/hillclimb.html +6 -6
  135. package/dist/docs/skills/index.html +5 -5
  136. package/dist/docs/skills/mcp-auth.html +6 -6
  137. package/dist/docs/skills/otel.html +8 -8
  138. package/dist/docs/skills/otel.md +3 -3
  139. package/dist/docs/skills/setup-slack.html +6 -6
  140. package/dist/docs/storage.html +6 -6
  141. package/dist/docs/templates/agentic-owners.html +6 -6
  142. package/dist/docs/templates/agents-md.html +6 -6
  143. package/dist/docs/templates/code-wiki.html +6 -6
  144. package/dist/docs/templates/demo.html +6 -6
  145. package/dist/docs/templates/grokbot-agents.html +6 -6
  146. package/dist/docs/templates/pr-autofixer.html +6 -6
  147. package/dist/docs/templates/security-help.html +6 -6
  148. package/dist/docs/templates/security-reviewer.html +6 -6
  149. package/dist/docs/templates/triage.html +6 -6
  150. package/dist/docs/troubleshooting.html +6 -6
  151. package/dist/docs/troubleshooting.md +1 -1
  152. package/dist/extensions/improve/extension.d.ts +46 -0
  153. package/dist/extensions/improve/extension.d.ts.map +1 -0
  154. package/dist/extensions/improve/extension.js +41 -0
  155. package/dist/extensions/improve/skills/yourself.d.ts +4 -0
  156. package/dist/extensions/improve/skills/yourself.d.ts.map +1 -0
  157. package/dist/extensions/improve/skills/yourself.js +43 -0
  158. package/dist/index.d.ts +4 -5
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +3 -4
  161. package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
  162. package/dist/internal/builtin-tools/artifacts.js +2 -3
  163. package/dist/internal/channel-route-dispatch.d.ts +13 -0
  164. package/dist/internal/channel-route-dispatch.d.ts.map +1 -0
  165. package/dist/internal/channel-route-dispatch.js +62 -0
  166. package/dist/internal/channel-state.d.ts +17 -0
  167. package/dist/internal/channel-state.d.ts.map +1 -0
  168. package/dist/internal/channel-state.js +78 -0
  169. package/dist/internal/cli-ax.d.ts +7 -0
  170. package/dist/internal/cli-ax.d.ts.map +1 -1
  171. package/dist/internal/cli-ax.js +99 -1
  172. package/dist/internal/cli-cursor.d.ts.map +1 -1
  173. package/dist/internal/cli-cursor.js +2 -0
  174. package/dist/internal/cli-deploy.d.ts.map +1 -1
  175. package/dist/internal/cli-deploy.js +61 -25
  176. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  177. package/dist/internal/cli-mcp-oauth.js +15 -0
  178. package/dist/internal/cli-mcp.d.ts.map +1 -1
  179. package/dist/internal/cli-mcp.js +12 -0
  180. package/dist/internal/cli-slack.d.ts.map +1 -1
  181. package/dist/internal/cli-slack.js +8 -2
  182. package/dist/internal/cursor/backend-client.d.ts +25 -0
  183. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  184. package/dist/internal/cursor/backend-client.js +57 -2
  185. package/dist/internal/cursor/credentials.d.ts +8 -2
  186. package/dist/internal/cursor/credentials.d.ts.map +1 -1
  187. package/dist/internal/cursor/credentials.js +27 -5
  188. package/dist/internal/deploy-client.d.ts +35 -0
  189. package/dist/internal/deploy-client.d.ts.map +1 -1
  190. package/dist/internal/deploy-client.js +46 -0
  191. package/dist/internal/deploy-manifest.d.ts +26 -0
  192. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  193. package/dist/internal/deploy-manifest.js +99 -13
  194. package/dist/internal/describe-error.d.ts +1 -0
  195. package/dist/internal/describe-error.d.ts.map +1 -1
  196. package/dist/internal/describe-error.js +25 -0
  197. package/dist/internal/discovery/agent.d.ts.map +1 -1
  198. package/dist/internal/discovery/agent.js +1 -0
  199. package/dist/internal/discovery/info.d.ts.map +1 -1
  200. package/dist/internal/discovery/info.js +7 -3
  201. package/dist/internal/discovery/modules.d.ts +1 -1
  202. package/dist/internal/discovery/modules.d.ts.map +1 -1
  203. package/dist/internal/discovery/modules.js +1 -0
  204. package/dist/internal/discovery/project.d.ts.map +1 -1
  205. package/dist/internal/discovery/project.js +3 -0
  206. package/dist/internal/discovery/reminders.d.ts +7 -0
  207. package/dist/internal/discovery/reminders.d.ts.map +1 -0
  208. package/dist/internal/discovery/reminders.js +65 -0
  209. package/dist/internal/discovery/subagent.js +1 -0
  210. package/dist/internal/distribution.d.ts +5 -0
  211. package/dist/internal/distribution.d.ts.map +1 -1
  212. package/dist/internal/distribution.js +17 -0
  213. package/dist/internal/framework-storage-selection.d.ts +14 -3
  214. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  215. package/dist/internal/framework-storage-selection.js +36 -6
  216. package/dist/internal/guest-network.d.ts +4 -10
  217. package/dist/internal/guest-network.d.ts.map +1 -1
  218. package/dist/internal/guest-network.js +44 -26
  219. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  220. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  221. package/dist/internal/hosted-catch-protocol.d.ts +51 -0
  222. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -0
  223. package/dist/internal/hosted-catch-protocol.js +103 -0
  224. package/dist/internal/hosted-catch.d.ts +40 -0
  225. package/dist/internal/hosted-catch.d.ts.map +1 -0
  226. package/dist/internal/hosted-catch.js +149 -0
  227. package/dist/internal/hosted-delivery-protocol.d.ts +89 -0
  228. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  229. package/dist/internal/hosted-delivery-protocol.js +309 -0
  230. package/dist/internal/hosted-delivery.d.ts +20 -1
  231. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  232. package/dist/internal/hosted-delivery.js +179 -36
  233. package/dist/internal/hosted-execution-diag.d.ts +4 -1
  234. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  235. package/dist/internal/hosted-execution-diag.js +13 -4
  236. package/dist/internal/hosted-execution-flush.d.ts +3 -0
  237. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  238. package/dist/internal/hosted-execution-flush.js +2 -4
  239. package/dist/internal/http-control-plane-session.d.ts +30 -0
  240. package/dist/internal/http-control-plane-session.d.ts.map +1 -0
  241. package/dist/internal/http-control-plane-session.js +83 -0
  242. package/dist/internal/legacy-command-guard.d.ts +22 -0
  243. package/dist/internal/legacy-command-guard.d.ts.map +1 -0
  244. package/dist/internal/legacy-command-guard.js +51 -0
  245. package/dist/internal/local-control-plane.d.ts +18 -2
  246. package/dist/internal/local-control-plane.d.ts.map +1 -1
  247. package/dist/internal/local-control-plane.js +199 -17
  248. package/dist/internal/platform-timers.d.ts +7 -0
  249. package/dist/internal/platform-timers.d.ts.map +1 -1
  250. package/dist/internal/platform-timers.js +139 -0
  251. package/dist/internal/reminder-control-plane-protocol.d.ts +189 -0
  252. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -0
  253. package/dist/internal/reminder-control-plane-protocol.js +251 -0
  254. package/dist/internal/reminder-runner.d.ts +56 -6
  255. package/dist/internal/reminder-runner.d.ts.map +1 -1
  256. package/dist/internal/reminder-runner.js +372 -57
  257. package/dist/internal/reminder-schedule.d.ts +5 -2
  258. package/dist/internal/reminder-schedule.d.ts.map +1 -1
  259. package/dist/internal/reminder-schedule.js +8 -6
  260. package/dist/internal/reminder-store.d.ts +24 -7
  261. package/dist/internal/reminder-store.d.ts.map +1 -1
  262. package/dist/internal/reminder-store.js +6 -5
  263. package/dist/internal/request-error-status.d.ts +2 -0
  264. package/dist/internal/request-error-status.d.ts.map +1 -1
  265. package/dist/internal/request-error-status.js +22 -3
  266. package/dist/internal/resolve-prod-target.d.ts +2 -0
  267. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  268. package/dist/internal/resolve-prod-target.js +13 -0
  269. package/dist/internal/scm/pr-url.d.ts +40 -0
  270. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  271. package/dist/internal/scm/pr-url.js +93 -14
  272. package/dist/internal/sdk-runner.d.ts.map +1 -1
  273. package/dist/internal/sdk-runner.js +4 -3
  274. package/dist/internal/server.d.ts.map +1 -1
  275. package/dist/internal/server.js +118 -77
  276. package/dist/internal/session-engine.d.ts +6 -6
  277. package/dist/internal/session-engine.d.ts.map +1 -1
  278. package/dist/internal/session-engine.js +100 -67
  279. package/dist/playground/assets/{index-BaQzjaNK.js → index-BMDqAeXu.js} +34 -34
  280. package/dist/playground/assets/index-LUgJoWdL.css +1 -0
  281. package/dist/playground/index.html +2 -2
  282. package/dist/reminders.d.ts +24 -5
  283. package/dist/reminders.d.ts.map +1 -1
  284. package/dist/reminders.js +28 -5
  285. package/dist/storage-backends/cursor-hosted.d.ts +6 -0
  286. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  287. package/dist/storage-backends/cursor-hosted.js +29 -1
  288. package/dist/types.d.ts +122 -25
  289. package/dist/types.d.ts.map +1 -1
  290. package/docs/README.md +4 -0
  291. package/docs/deployment.md +7 -2
  292. package/docs/evals.md +3 -2
  293. package/docs/guides/cloud-agents.md +4 -3
  294. package/docs/guides/github.md +2 -1
  295. package/docs/guides/grokbot-agents.md +2 -2
  296. package/docs/guides/improve.md +96 -0
  297. package/docs/guides/opentelemetry.md +3 -4
  298. package/docs/guides/slack.md +2 -1
  299. package/docs/reference/agent-config.md +5 -2
  300. package/docs/reference/channels.md +11 -19
  301. package/docs/reference/cli.md +23 -13
  302. package/docs/reference/connections.md +2 -1
  303. package/docs/reference/extensions.md +2 -0
  304. package/docs/scaffolding-agents.md +2 -1
  305. package/docs/troubleshooting.md +1 -1
  306. package/package.json +10 -3
  307. package/skills/create-agent/SKILL.md +1 -1
  308. package/skills/debug/SKILL.md +1 -1
  309. package/skills/evals/SKILL.md +1 -1
  310. package/skills/framework-map/SKILL.md +4 -2
  311. package/skills/github/SKILL.md +1 -1
  312. package/skills/otel/SKILL.md +3 -3
  313. package/src/bin/agent-serve.ts +28 -11
  314. package/src/channels/bitbucket/types.ts +2 -4
  315. package/src/channels/deployments/types.ts +5 -8
  316. package/src/channels/github/github-channel.ts +8 -8
  317. package/src/channels/github/types.ts +7 -4
  318. package/src/channels/gitlab/types.ts +2 -5
  319. package/src/channels/origin/origin-channel.ts +29 -13
  320. package/src/channels/origin/types.ts +7 -3
  321. package/src/channels/slack/defaults.ts +3 -0
  322. package/src/channels/slack/dispatch.ts +1 -0
  323. package/src/channels/slack/live-delivery.ts +53 -12
  324. package/src/channels/slack/types.ts +4 -3
  325. package/src/channels.ts +157 -10
  326. package/src/connections.ts +2 -1
  327. package/src/extensions/improve/extension.ts +70 -0
  328. package/src/extensions/improve/skills/yourself.ts +50 -0
  329. package/src/index.ts +6 -3
  330. package/src/internal/builtin-tools/artifacts.ts +2 -3
  331. package/src/internal/channel-route-dispatch.ts +66 -0
  332. package/src/internal/channel-state.ts +96 -0
  333. package/src/internal/cli-ax.ts +110 -1
  334. package/src/internal/cli-cursor.ts +4 -1
  335. package/src/internal/cli-deploy.ts +80 -22
  336. package/src/internal/cli-mcp-oauth.ts +18 -0
  337. package/src/internal/cli-mcp.ts +11 -0
  338. package/src/internal/cli-slack.ts +15 -2
  339. package/src/internal/cursor/backend-client.ts +90 -2
  340. package/src/internal/cursor/credentials.ts +35 -7
  341. package/src/internal/deploy-client.ts +70 -0
  342. package/src/internal/deploy-manifest.ts +131 -12
  343. package/src/internal/describe-error.ts +28 -0
  344. package/src/internal/discovery/agent.ts +1 -0
  345. package/src/internal/discovery/info.ts +6 -0
  346. package/src/internal/discovery/modules.ts +2 -4
  347. package/src/internal/discovery/project.ts +3 -0
  348. package/src/internal/discovery/reminders.ts +65 -0
  349. package/src/internal/discovery/subagent.ts +1 -0
  350. package/src/internal/distribution.ts +20 -0
  351. package/src/internal/framework-storage-selection.ts +43 -6
  352. package/src/internal/guest-network.ts +46 -29
  353. package/src/internal/hosted-admission-adapter.ts +2 -0
  354. package/src/internal/hosted-catch-protocol.ts +130 -0
  355. package/src/internal/hosted-catch.ts +192 -0
  356. package/src/internal/hosted-delivery-protocol.ts +483 -0
  357. package/src/internal/hosted-delivery.ts +303 -43
  358. package/src/internal/hosted-execution-diag.ts +21 -3
  359. package/src/internal/hosted-execution-flush.ts +6 -3
  360. package/src/internal/http-control-plane-session.ts +104 -0
  361. package/src/internal/legacy-command-guard.ts +59 -0
  362. package/src/internal/local-control-plane.ts +281 -22
  363. package/src/internal/platform-timers.ts +191 -0
  364. package/src/internal/reminder-control-plane-protocol.ts +512 -0
  365. package/src/internal/reminder-runner.ts +481 -57
  366. package/src/internal/reminder-schedule.ts +11 -6
  367. package/src/internal/reminder-store.ts +27 -7
  368. package/src/internal/request-error-status.ts +27 -3
  369. package/src/internal/resolve-prod-target.ts +15 -0
  370. package/src/internal/scm/pr-url.ts +167 -20
  371. package/src/internal/sdk-runner.ts +2 -1
  372. package/src/internal/server.ts +151 -88
  373. package/src/internal/session-engine.ts +146 -83
  374. package/src/reminders.ts +35 -4
  375. package/src/storage-backends/cursor-hosted.ts +40 -1
  376. package/src/types.ts +134 -26
  377. package/dist/docs/assets/chunks/@localSearchIndexroot.CJxMklAy.js +0 -1
  378. package/dist/docs/assets/guides_cloud-agents.md.DS8RIjwx.js +0 -9
  379. package/dist/docs/assets/index.md.BW_6tOgR.js +0 -5
  380. package/dist/docs/assets/skills_framework-map.md.haibFyoB.js +0 -1
  381. package/dist/docs/assets/troubleshooting.md.Cus_YZga.js +0 -1
  382. package/dist/playground/assets/index-CceqnLTX.css +0 -1
  383. /package/dist/docs/assets/{evals.md.CbMoebP1.lean.js → evals.md.C1ekS3k2.lean.js} +0 -0
  384. /package/dist/docs/assets/{guides_github.md.c0gdGJ-D.lean.js → guides_github.md.BH33UEBJ.lean.js} +0 -0
  385. /package/dist/docs/assets/{guides_grokbot-agents.md.DVqdhBKb.lean.js → guides_grokbot-agents.md.DyV-WArv.lean.js} +0 -0
  386. /package/dist/docs/assets/{index.md.BW_6tOgR.lean.js → index.md.BjH1w2ZW.lean.js} +0 -0
  387. /package/dist/docs/assets/{reference_agent-config.md.CHNpiyp4.lean.js → reference_agent-config.md.CvoL6pof.lean.js} +0 -0
  388. /package/dist/docs/assets/{reference_connections.md.Di6jJAXF.lean.js → reference_connections.md.BojkC6c5.lean.js} +0 -0
  389. /package/dist/docs/assets/{reference_extensions.md.CGmMLblt.lean.js → reference_extensions.md.CPWt00ds.lean.js} +0 -0
  390. /package/dist/docs/assets/{scaffolding-agents.md.em43xlY1.lean.js → scaffolding-agents.md.Kctn3OVb.lean.js} +0 -0
  391. /package/dist/docs/assets/{skills_create-agent.md.BVoWPcan.lean.js → skills_create-agent.md.Q3h6Je-e.lean.js} +0 -0
  392. /package/dist/docs/assets/{skills_evals.md.723kpUmA.lean.js → skills_evals.md.BhovOvrl.lean.js} +0 -0
  393. /package/dist/docs/assets/{skills_github.md.D0JahM8c.lean.js → skills_github.md.hgFX_oKY.lean.js} +0 -0
  394. /package/dist/docs/assets/{skills_otel.md.CqhobH3B.lean.js → skills_otel.md.B5Ddv1xH.lean.js} +0 -0
  395. /package/dist/docs/assets/{troubleshooting.md.Cus_YZga.lean.js → troubleshooting.md.CYEAO9bM.lean.js} +0 -0
@@ -660,7 +660,7 @@ exposes a stable URL while Cursor manages its runtime lifecycle.
660
660
  ### Before you deploy
661
661
 
662
662
  - Confirm managed hosting is enabled for the account and team.
663
- - Sign in with an account holding team-admin deployment permission.
663
+ - Sign in as a team member, or use a team service-account API key with agent access.
664
664
  - Add `@cursor/july` to the agent project.
665
665
 
666
666
  For a GitHub source, install the Cursor GitHub App on the repository
@@ -689,6 +689,11 @@ Enter hostnames without schemes, ports, or paths. One leading `*.`
689
689
  wildcard is allowed. Declared domains allow HTTPS and TLS traffic, not
690
690
  arbitrary TCP ports.
691
691
 
692
+ The base policy already covers the hosts the platform itself uses: the
693
+ Cursor API (`api.cursor.com` and `api2.cursor.sh`), GitHub and GitLab,
694
+ the npm and Yarn registries, Slack, and Cursor's own artifact storage.
695
+ Declare a domain only for a host your own code reaches.
696
+
692
697
  `secretNames` lists the environment variables the agent expects. Names
693
698
  use `UPPER_SNAKE_CASE`. Commit names only; set their values after
694
699
  creating the deployment. Names beginning with `CURSOR_` are reserved.
@@ -941,7 +946,7 @@ A self-hosted server can read these credentials.
941
946
 
942
947
  | Credential | Used for | Provide it as |
943
948
  | --- | --- | --- |
944
- | Cursor API key | model turns, cloud runtime, Cursor account MCP connections | `agent-sdk login` (stores a revocable key), `CURSOR_API_KEY`, or `--api-key` / `serve({ apiKey })` |
949
+ | Cursor API key | model turns, cloud runtime, Cursor account MCP connections | `agent-sdk login` (stores a revocable key), `CURSOR_API_KEY`, `CURSOR_SERVICE_ACCOUNT_KEY`, or `--api-key` / `serve({ apiKey })` |
945
950
  | Slack tokens | Slack channels | `<PREFIX>_SLACK_BOT_TOKEN` + `<PREFIX>_SLACK_APP_TOKEN` per agent |
946
951
  | GitHub webhook secret | delivery signature verification | `GITHUB_WEBHOOK_SECRET`, same value on server and signer |
947
952
  | GitHub API | outbound API calls | a GitHub App (`GITHUB_APP_ID` + `GITHUB_APP_PRIVATE_KEY` + installation id) or `GITHUB_TOKEN` / `gh auth login` |
@@ -3538,8 +3543,9 @@ keep live progress off stderr. A TTY streams turn progress by default.
3538
3543
  `--verbose` still writes `t.log` lines to stderr and adds reply snippets
3539
3544
  to text results.
3540
3545
 
3541
- Model turns need a Cursor credential from `agent-sdk login` or
3542
- `CURSOR_API_KEY`.
3546
+ Model turns need a Cursor credential: `CURSOR_API_KEY`, then
3547
+ `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY`), then
3548
+ `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`.
3543
3549
 
3544
3550
  See [CLI: eval](/docs/reference/cli.md#eval) for flags and exit codes.
3545
3551
 
@@ -3849,9 +3855,10 @@ export default cursorCloudAgents({
3849
3855
  });
3850
3856
  ```
3851
3857
 
3852
- Launches run under the host's signed-in account (`agent-sdk login` or
3853
- `CURSOR_API_KEY`) and spend its cloud-agent budget. Name the
3854
- repositories the agent may target, and keep approval on when you can't.
3858
+ Launches run under the host's signed-in account (`agent-sdk login`,
3859
+ `CURSOR_API_KEY`, or `CURSOR_SERVICE_ACCOUNT_KEY`) and spend its
3860
+ cloud-agent budget. Name the repositories the agent may target, and
3861
+ keep approval on when you can't.
3855
3862
 
3856
3863
  Mount it on an agent that runs on the local runtime; that is where
3857
3864
  launches park for approval. On the cloud runtime approvals don't
@@ -4105,7 +4112,8 @@ The companion skill for coding agents is
4105
4112
  Connect GitHub in Cursor for the repositories you care about (Settings or
4106
4113
  [cursor.com/dashboard](https://cursor.com/dashboard)). That gives your
4107
4114
  account access and lets Cursor receive the repo's webhooks. Sign the host
4108
- in (`agent-sdk login` or `CURSOR_API_KEY`), then opt the channel into the
4115
+ in (`agent-sdk login`, `CURSOR_API_KEY`, or
4116
+ `CURSOR_SERVICE_ACCOUNT_KEY`), then opt the channel into the
4109
4117
  Cursor account connection:
4110
4118
 
4111
4119
  ```ts
@@ -4403,8 +4411,8 @@ export default cursorGrokBotAgents({
4403
4411
 
4404
4412
  `agents` is the allowlist. List every Grok Bot the model may talk to;
4405
4413
  a name outside the list is refused. Calls run under the host's
4406
- signed-in account (`agent-sdk login` or `CURSOR_API_KEY`). Keep
4407
- approval on when you can't.
4414
+ signed-in account (`agent-sdk login`, `CURSOR_API_KEY`, or
4415
+ `CURSOR_SERVICE_ACCOUNT_KEY`). Keep approval on when you can't.
4408
4416
 
4409
4417
  Start from the [Grok Bot agents template](/docs/templates/grokbot-agents.md)
4410
4418
  when you want a project that already mounts this.
@@ -4596,6 +4604,102 @@ Continue with these pages:
4596
4604
 
4597
4605
  ---
4598
4606
 
4607
+ Source: /docs/guides/improve.md
4608
+
4609
+ # Self-improvement
4610
+
4611
+ The `improve` extension lets an agent change how it behaves by changing
4612
+ its own source. Someone asks it to answer more briefly, to stop reaching
4613
+ for a tool, or to learn a procedure. The agent writes a brief, a one-off
4614
+ Cursor cloud agent makes the change on a branch and opens a pull
4615
+ request, and the agent reports that pull request. Nothing changes until
4616
+ a person reviews it and deploys.
4617
+
4618
+ The tree the agent runs from is never edited; nothing changed there
4619
+ survives a deploy. The pull request is the only path.
4620
+
4621
+ ## Mount it
4622
+
4623
+ The extension ships with `@cursor/july`. It relies on a
4624
+ [`cursor-cloud-agents`](/docs/guides/cloud-agents.md) mount beside it, with the
4625
+ agent's own repository among its `cloud.repos`.
4626
+
4627
+ ```ts
4628
+ // agent/extensions/cloud.ts
4629
+ import cursorCloudAgents from "@cursor/july/extensions/cursor-cloud-agents";
4630
+
4631
+ export default cursorCloudAgents({
4632
+ cloud: {
4633
+ repos: [{ url: "https://github.com/acme/agents", startingRef: "main" }],
4634
+ },
4635
+ });
4636
+ ```
4637
+
4638
+ ```ts
4639
+ // agent/extensions/improve.ts
4640
+ import improve from "@cursor/july/extensions/improve";
4641
+
4642
+ export default improve({
4643
+ repo: "https://github.com/acme/agents",
4644
+ path: "agents/concierge",
4645
+ });
4646
+ ```
4647
+
4648
+ `repo` is the repository that holds the agent's source and `path` is
4649
+ the agent's directory in it, the same values `agent-sdk deploy --repo`
4650
+ and `--path` take. Mount it as `improve`: the skill then reads
4651
+ `improve__yourself`, which is what a person asks for.
4652
+
4653
+ An agent on the
4654
+ [cloud runtime](/docs/reference/agent-config.md#choose-a-runtime) already
4655
+ runs each turn on a VM with the repository checked out. It mounts
4656
+ `improve` alone, and the skill has it branch in that checkout instead of
4657
+ launching a second agent.
4658
+
4659
+ ## What the agent does
4660
+
4661
+ With the extension mounted, "change how you work" becomes a procedure:
4662
+
4663
+ - **Locate the change.** The skill maps the ask onto the Agent SDK tree:
4664
+ instructions for the always-on prompt, a skill for a procedure, a tool
4665
+ for behavior that must be right every time, `agent.ts` for the model.
4666
+ - **Brief a cloud agent.** The agent writes a self-contained brief: who
4667
+ is asking and why, the repository, ref, and path, the files it expects
4668
+ to change, your notes about the tree, and the rules. Follow the
4669
+ repository's conventions, keep the diff to the change, run the
4670
+ repository's checks, open a pull request against the deployed ref,
4671
+ never merge.
4672
+ - **Follow up and report.** It gives the person the cloud agent's URL,
4673
+ checks on the run, reads the pull request before repeating its claims,
4674
+ and reports the pull request, not the delegation. It says the change
4675
+ takes effect at the next deploy, never that it has changed already.
4676
+
4677
+ Ask it directly. "Improve yourself: stop opening with a summary" is
4678
+ enough.
4679
+
4680
+ ## Configure it
4681
+
4682
+ | Option | What it controls |
4683
+ | --- | --- |
4684
+ | `repo` | The repository holding the agent's source. One of the cloud mount's `cloud.repos`. |
4685
+ | `path` | The agent's directory in the repository, as `agent-sdk deploy --path` names it. |
4686
+ | `ref` | The ref the deployment tracks. Branches start there and pull requests target it. Defaults to `main`. |
4687
+ | `notes` | What a coding agent must know about this tree beyond the standard layout: a house skill format, a manifest that forces a reinstall, a pull request convention. Copied into every brief. |
4688
+ | `deploy` | Who deploys a merged change and when it is live. Defaults to "It takes effect at the next deploy." |
4689
+
4690
+ ## What's next
4691
+
4692
+ Continue with these pages:
4693
+
4694
+ - [Cursor cloud agents](/docs/guides/cloud-agents.md): the mount that does the
4695
+ coding, and how to gate its launches
4696
+ - [Extensions](/docs/reference/extensions.md): how mounts, namespaces, and
4697
+ overrides work
4698
+ - [Deployment](/docs/deployment.md): how a merged change reaches the
4699
+ running agent
4700
+
4701
+ ---
4702
+
4599
4703
  Source: /docs/guides/mcp-oauth.md
4600
4704
 
4601
4705
  # Host MCP OAuth
@@ -4861,10 +4965,9 @@ is `serve({ otel })` over `agent/otel.ts` over env. An empty
4861
4965
  `defineOtel()` still records traces; export starts when
4862
4966
  `OTEL_EXPORTER_OTLP_*` or a factory-returned `exporters` list appears.
4863
4967
 
4864
- Hosted v2 binds deployment secrets after bake, onto the already-listening
4865
- process. Pass a factory so flush can re-read them. Spans record from
4866
- bake; the hosted handler flush constructs the OTLP client and sends the
4867
- queued batch.
4968
+ Hosted deployments can bind secrets after startup. Pass a factory so
4969
+ flush can re-read them. The hosted handler constructs the OTLP client
4970
+ when it flushes and sends the queued batch.
4868
4971
 
4869
4972
  ```ts
4870
4973
  export default defineOtel(() => resolveMyOtelConfig());
@@ -5155,7 +5258,8 @@ agent-sdk slack create --dir .
5155
5258
  agent-sdk slack create --dir . --prod
5156
5259
  ```
5157
5260
 
5158
- Sign in first (`agent-sdk login` or `CURSOR_API_KEY`). Finish **Add
5261
+ Sign in first (`agent-sdk login` or `CURSOR_API_KEY`). A team
5262
+ service-account key cannot create Slack apps. Finish **Add
5159
5263
  Slack to this agent** as the same Cursor account. Then run
5160
5264
  `agent-sdk slack doctor --prefix MY_AGENT` and serve:
5161
5265
 
@@ -5883,6 +5987,7 @@ npx @cursor/july docs
5883
5987
  | Driving PRs from a cloud VM | [PR autofixer template](/docs/templates/pr-autofixer.md) |
5884
5988
  | Handing coding work to Cursor cloud agents | [Cursor cloud agents](/docs/guides/cloud-agents.md) |
5885
5989
  | Talking to your Grok Bot agents | [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md) |
5990
+ | Letting an agent change its own source | [Self-improvement](/docs/guides/improve.md) |
5886
5991
  | Driving an agent from Linear (or another tracker) | [Webhooks guide: Linear example](/docs/guides/webhooks.md#example-linear-as-the-control-plane) |
5887
5992
  | Making an existing agent measurably better | [Evals](/docs/evals.md), then [Hillclimbing](/docs/hillclimbing.md) |
5888
5993
  | Comparing variants on live traffic | [Live A/B metrics](/docs/ab.md) |
@@ -5953,6 +6058,9 @@ npx @cursor/july docs
5953
6058
  and steer cloud agents through the `cursor-cloud-agents` extension.
5954
6059
  - [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): let the agent
5955
6060
  talk to Grok Bot agents through the `cursor-grokbot-agents` extension.
6061
+ - [Self-improvement](/docs/guides/improve.md): let the agent change its own
6062
+ source through a one-off cloud agent and a pull request with the
6063
+ `improve` extension.
5956
6064
  - [OpenTelemetry](/docs/guides/opentelemetry.md): push session, turn, and
5957
6065
  tool traces to an OTLP collector you run.
5958
6066
 
@@ -6614,8 +6722,11 @@ console.log(`listening on ${handle.url}`);
6614
6722
  Host settings match the documented [CLI](/docs/reference/cli.md) `serve` flags.
6615
6723
  `serve()` also accepts `discovery` (project-loading options) and
6616
6724
  `mode: "single" | "multi"`. The Cursor credential resolves in one order
6617
- everywhere: explicit `apiKey`, then `CURSOR_API_KEY`, then the key
6618
- stored by `agent-sdk login`.
6725
+ everywhere: explicit `apiKey`, then `CURSOR_API_KEY`, then
6726
+ `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY`
6727
+ when unset), then `CURSOR_SERVICE_ACCOUNT_KEY`, then the key stored by
6728
+ `agent-sdk login`. On a host that has both the service-account key and a
6729
+ bind file, the file principal wins.
6619
6730
 
6620
6731
  ## What's next
6621
6732
 
@@ -6965,20 +7076,16 @@ events. Declare `events` and handle each one in `onEvent`. Each event
6965
7076
  carries `deploySourceUri` and `deployVersion`. Author
6966
7077
  `agent/channels/deployments.ts` with `deploymentsChannel()`.
6967
7078
 
6968
- Omit `deploySourceUris` on hosted v2. The control plane binds
6969
- `deploy_source` edges from the deploy's watched `repositories` and the
6970
- channel admits what it is sent, which is what makes it multi-tenant
6971
- safe.
6972
-
6973
- Name sources to narrow below that scope, or to drive the self-hosted
6974
- pull relay, which has no deploy scope to inherit. There, subscribe per
6975
- deploy source with `deploySourceUris` and narrow with `environments` /
6976
- `events`. Each entry must match `Deployment.deploy_source_uri` as your
6977
- deployment writer records it; matching is case-insensitive but
7079
+ On Cursor-managed hosting, omit `deploySourceUris`. The deployment's
7080
+ watched repositories bind the event scope automatically. Name sources
7081
+ to narrow the scope or to drive the self-hosted pull relay. Subscribe
7082
+ per deploy source with `deploySourceUris` and narrow with `environments`
7083
+ or `events`. Each entry must match `Deployment.deploy_source_uri` as
7084
+ your deployment writer records it. Matching is case-insensitive but
6978
7085
  otherwise literal. It uses the host credential. A restart resumes
6979
- rather than dropping events. An empty `deploySourceUris` list mounts
6980
- the channel but starts no pull, so an env-configured agent stays inert
6981
- until its deploy sources are set.
7086
+ rather than dropping events. An empty `deploySourceUris` list mounts the
7087
+ channel but starts no pull, so an env-configured agent stays inert until
7088
+ its deploy sources are set.
6982
7089
 
6983
7090
  **Change Monitors** (`@cursor/july/channels/change-monitors`): Change
6984
7091
  Monitor Checkpoint events. The channel publishes Factory
@@ -6987,18 +7094,14 @@ result (for example to the `issues` arm). The payload contains the
6987
7094
  full Checkpoint resource. This channel is scoped to Change Monitors,
6988
7095
  not generic Factory Checkpoints. There is no repository filter or
6989
7096
  resource filter. Author `agent/channels/change-monitors.ts` with
6990
- `changeMonitorsChannel()`. It uses the host credential. The v1 omitted
6991
- continuation is `none/v1`. A v2 agent defaults to
6992
- `change_monitors.checkpoint/v2`, which keys the session as
6993
- `cont:change_monitors:{checkpointName}`.
7097
+ `changeMonitorsChannel()`. It uses the host credential.
6994
7098
 
6995
7099
  **Issues** (`@cursor/july/channels/issues`): Factory issue events.
6996
7100
  The channel publishes `issue.created` for every Issue create. The
6997
7101
  agent filters if it needs a subset. The payload contains the full
6998
7102
  Issue resource. There is no repository filter or resource filter.
6999
7103
  Author `agent/channels/issues.ts` with `issuesChannel()`. It uses the
7000
- host credential. The v1 omitted continuation is `none/v1`. A v2 agent
7001
- defaults to `issues.issue/v2`, which keys the session by issue name.
7104
+ host credential.
7002
7105
 
7003
7106
  For other platforms like Discord or Teams, use the authored
7004
7107
  `defineChannel` webhook form.
@@ -7131,7 +7234,7 @@ the agent project. Slugged mounts get a subdirectory named for the slug.
7131
7234
  | `--host` | Bind this host. The default is loopback-only `127.0.0.1`. |
7132
7235
  | `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, and widen playground session access on loopback. |
7133
7236
  | `--mode` | Use `multi` for slugged routes and an index, or `single` for one agent at the unslugged `/v1/*`. The default is `multi`. |
7134
- | `--api-key` | Use this Cursor API key. The command falls back to `CURSOR_API_KEY`, then the stored login. |
7237
+ | `--api-key` | Use this Cursor API key. Otherwise the command uses `CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY` when unset), then `CURSOR_SERVICE_ACCOUNT_KEY`, then the stored login. |
7135
7238
  | `--state-root` | Store sessions, streams, workspaces, and channel state here. Keep durable production state outside the agent repository. |
7136
7239
  | `--bearer-token` | Require this bearer token on routes without authored auth. Mutually exclusive with `--allow-anonymous`. |
7137
7240
  | `--allow-anonymous` | Admit every caller as one `anonymous` principal. Use only behind a trusted network boundary. |
@@ -7579,10 +7682,14 @@ runtime, and Cursor account MCP connections. `--key-name` changes the
7579
7682
  name of a browser-minted key. `login --api-key` validates and stores a
7580
7683
  key you already created.
7581
7684
 
7582
- `whoami` shows which credential is active and why. `CURSOR_API_KEY`
7583
- takes precedence over the stored login. `logout` removes the local
7584
- credential file but doesn't revoke the API key. Revoke it in the Cursor
7585
- dashboard when it should stop working.
7685
+ `whoami` shows which credential is active and why. An explicit key
7686
+ wins, then `CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE` (hosted default
7687
+ `/run/cursor/secrets/CURSOR_API_KEY` when unset), then
7688
+ `CURSOR_SERVICE_ACCOUNT_KEY`, then the stored login. A host that has
7689
+ both the service-account key and a bind file authenticates as the file
7690
+ principal. `logout` removes the local credential file but doesn't
7691
+ revoke the API key. Revoke it in the Cursor dashboard when it should
7692
+ stop working.
7586
7693
 
7587
7694
  Login and account RPCs honor `CURSOR_API_BASE_URL`. The SDK harness
7588
7695
  honors `CURSOR_BACKEND_URL`. Set both to the same URL, or keys minted
@@ -7620,9 +7727,9 @@ agent-sdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
7620
7727
  [--no-wait] [--json]
7621
7728
  ```
7622
7729
 
7623
- Managed hosting requires team-admin permission and the team's
7624
- cloud-agent entitlement. `--team` defaults to the signed-in account's
7625
- team.
7730
+ Managed hosting requires team membership and the team's cloud-agent
7731
+ entitlement. A team service-account API key with agent access can
7732
+ deploy. `--team` defaults to the signed-in account's team.
7626
7733
 
7627
7734
  For a single project, the slug defaults to a normalized version of the
7628
7735
  directory name. Deployment slugs contain lowercase letters, digits, `_`,
@@ -7696,14 +7803,17 @@ The command polls for up to ten minutes until the status reaches
7696
7803
 
7697
7804
  ## delete
7698
7805
 
7699
- `delete` removes a deployment.
7806
+ `delete` removes a hosted deployment. You can delete a deployment that
7807
+ still runs. The command frees the slug. A later deploy can use the same
7808
+ name. Spend stays on the archived service account.
7700
7809
 
7701
7810
  ```bash
7702
7811
  agent-sdk delete <slug> [--team <id>] [--no-wait] [--json]
7703
7812
  ```
7704
7813
 
7705
7814
  The command waits until the deployment is gone. `--no-wait` returns after
7706
- the delete request is accepted.
7815
+ the delete request is accepted. Architecture v2 slugs use the Agent SDK
7816
+ control plane. Architecture v1 slugs use the Agent Serve control plane.
7707
7817
 
7708
7818
  ## rotate-token
7709
7819
 
@@ -7862,8 +7972,9 @@ checklist. It doesn't change files.
7862
7972
  `slack create` opens the signed-in Cursor dashboard wizard. Finish Slack
7863
7973
  consent and the bot name there. The CLI writes the token pair into
7864
7974
  `<dir>/.env.local` and runs `doctor`. It requires a signed-in host
7865
- (`agent-sdk login` or `CURSOR_API_KEY`). `--prod` provisions the
7866
- production app; the default is the development app. `--name` / `--icon`
7975
+ (`agent-sdk login` or `CURSOR_API_KEY`). A team service-account key
7976
+ cannot create Slack apps. `--prod` provisions the production app; the
7977
+ default is the development app. `--name` / `--icon`
7867
7978
  / `--channel-posts` prefill the wizard. A second create for the same
7868
7979
  slug and env overwrites the live Slack app. If Slack needs a workspace
7869
7980
  admin's approval, the wizard waits; keep the CLI running, open Slack's
@@ -7976,7 +8087,9 @@ These environment variables affect the CLI and its channel packs.
7976
8087
 
7977
8088
  | Variable | Meaning |
7978
8089
  | --- | --- |
7979
- | `CURSOR_API_KEY` | Cursor credential. It takes precedence over the stored login. |
8090
+ | `CURSOR_API_KEY` | Cursor credential. It takes precedence over `CURSOR_API_KEY_FILE`, `CURSOR_SERVICE_ACCOUNT_KEY`, and the stored login. |
8091
+ | `CURSOR_API_KEY_FILE` | Path to a Cursor credential file. Used when `CURSOR_API_KEY` is unset. When this variable is unset, the hosted default `/run/cursor/secrets/CURSOR_API_KEY` is tried. A present file takes precedence over `CURSOR_SERVICE_ACCOUNT_KEY` and the stored login. |
8092
+ | `CURSOR_SERVICE_ACCOUNT_KEY` | Team service-account credential. Used when `CURSOR_API_KEY` and `CURSOR_API_KEY_FILE` (including the hosted default path) are unset. It takes precedence over the stored login. |
7980
8093
  | `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs. |
7981
8094
  | `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness. |
7982
8095
  | `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. Defaults to the CLI config directory under `~/.config`. |
@@ -8218,7 +8331,8 @@ Name the file `account.ts`. `cursor.ts` collides with the IDE `cursor`
8218
8331
  MCP namespace. `advertiseTools: true` puts connector tools on local
8219
8332
  turns by name. Without it they sit behind harness meta-tools.
8220
8333
 
8221
- The host must be signed in (`agent-sdk login` or `CURSOR_API_KEY`).
8334
+ The host must be signed in (`agent-sdk login`, `CURSOR_API_KEY`, or
8335
+ `CURSOR_SERVICE_ACCOUNT_KEY`).
8222
8336
  `serve` fails fast at startup otherwise, and logs each connector's live
8223
8337
  status (`connected`, `needsAuth`, `error`) as it starts.
8224
8338
 
@@ -8565,6 +8679,8 @@ Continue with these pages:
8565
8679
  lets an agent launch and steer cloud agents
8566
8680
  - [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): the extension
8567
8681
  that lets an agent talk to Grok Bot agents
8682
+ - [Self-improvement](/docs/guides/improve.md): the extension that lets an
8683
+ agent change its own source through a cloud agent and a pull request
8568
8684
  - [Tools](/docs/reference/tools.md): the tool contract extensions contribute to
8569
8685
  - [Skills](/docs/reference/skills.md): the skill forms an extension can carry
8570
8686
  - [Project layout](/docs/reference/project-layout.md): where `agent/extensions/` sits
@@ -10522,7 +10638,8 @@ Cursor checks the project in this order:
10522
10638
 
10523
10639
  Validation, discovery, direct server-tool calls, and server startup work
10524
10640
  without a Cursor credential. Model turns and evals need
10525
- `CURSOR_API_KEY` or a saved `agent-sdk login`.
10641
+ `CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE` (hosted default `/run/cursor/secrets/CURSOR_API_KEY`), then `CURSOR_SERVICE_ACCOUNT_KEY`, then a saved
10642
+ `agent-sdk login`.
10526
10643
 
10527
10644
  ## What happens after the first agent works?
10528
10645
 
@@ -10728,7 +10845,7 @@ npx tsc --noEmit -p ./<slug>
10728
10845
  tsx does not typecheck. Tool `execute` must return JSON-shaped
10729
10846
  values: object literals or `type` aliases, not `interface` types.
10730
10847
 
10731
- Model turns need `CURSOR_API_KEY`. Without one, finish the
10848
+ Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`). Without one, finish the
10732
10849
  key-free checks, confirm `run` fails with only the API-key error,
10733
10850
  and hand these over:
10734
10851
 
@@ -10794,7 +10911,7 @@ Local `agent-sdk serve`. Hosted start or health failures:
10794
10911
  | `403` on stream | Wrong principal. Same auth as create; beyond loopback send `--bearer-token`. |
10795
10912
  | Works on loopback, blocked via tunnel | `localDevStrict()` rejects forwarded headers. Use `--bearer-token`. Never `--allow-anonymous` with account MCP. |
10796
10913
  | Slack `channel idle … missing credentials` | Expected. `slack doctor --prefix <PREFIX>`. |
10797
- | Immediate API-key error | Model turns need `CURSOR_API_KEY`. |
10914
+ | Immediate API-key error | Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`). |
10798
10915
  | Approvals or sandbox seeds missing | `runtime: "cloud"`. Those are local only. `validate` warns. |
10799
10916
  | `validate` clean, CI typecheck fails | tsx skipped types. JSON-shaped returns; `type` not `interface`. |
10800
10917
 
@@ -10829,7 +10946,7 @@ agent-sdk eval --dir . --tag smoke
10829
10946
  | `evals/weather.eval.ts` + `{ id: "nyc" }` | `weather/nyc` |
10830
10947
 
10831
10948
  `eval` boots an ephemeral server and a temp state root. `--url`
10832
- points at a running agent. Model turns need `CURSOR_API_KEY`.
10949
+ points at a running agent. Model turns need a Cursor credential (`CURSOR_API_KEY`, then `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then `agent-sdk login`).
10833
10950
 
10834
10951
  ## Seeding
10835
10952
 
@@ -10933,8 +11050,10 @@ Public docs: `node_modules/@cursor/july/dist/docs/llms.txt` or
10933
11050
  per-project cache directory under `~/.cache`. Point cwd at a
10934
11051
  checkout only when the agent must inherit that tree.
10935
11052
  5. **Attached MCP is nameless** until `advertiseTools: true`.
10936
- 6. **Model turns need `CURSOR_API_KEY`.** `validate`, `info`, `call`,
10937
- and `serve` bring-up do not.
11053
+ 6. **Model turns need a Cursor credential** (`CURSOR_API_KEY`, then
11054
+ `CURSOR_API_KEY_FILE`, then `CURSOR_SERVICE_ACCOUNT_KEY`, then
11055
+ `agent-sdk login`). `validate`,
11056
+ `info`, `call`, and `serve` bring-up do not.
10938
11057
 
10939
11058
  ## Folder structure
10940
11059
 
@@ -11055,7 +11174,7 @@ at deploy. Repos must share one GitHub owner.
11055
11174
 
11056
11175
  | Source | When |
11057
11176
  | --- | --- |
11058
- | `cursorAccount` + `serve --cursor-events` | Preferred. Signed-in host (`agent-sdk login` / `CURSOR_API_KEY`). Repos from the channel and from repeatable `--repo owner/name`. Cap 20, one GitHub owner |
11177
+ | `cursorAccount` + `serve --cursor-events` | Preferred. Signed-in host (`agent-sdk login`, `CURSOR_API_KEY`, or `CURSOR_SERVICE_ACCOUNT_KEY`). Repos from the channel and from repeatable `--repo owner/name`. Cap 20, one GitHub owner |
11059
11178
  | HTTP `POST /<slug>/v1/channels/github` with a webhook secret | `allowAll()` + `X-Hub-Signature-256` |
11060
11179
  | HTTP, no secret | Loopback only. `serve --dev` also admits unsigned loopback (fixtures / forward) |
11061
11180
 
@@ -11307,9 +11426,9 @@ export default defineOtel({
11307
11426
  3. `serve(dir, { otel: { … } })`. `otel: false` disables env and
11308
11427
  authored config.
11309
11428
 
11310
- Hosted v2 secrets arrive after bake. Use `defineOtel(() => …)` so flush
11311
- re-resolves exporters. Authored `agent/otel.ts` records from process
11312
- start even when the factory returns no exporters yet.
11429
+ Hosted secrets can arrive after startup. Use `defineOtel(() => …)` so
11430
+ flush re-resolves exporters. Authored `agent/otel.ts` records from
11431
+ process start even when the factory returns no exporters yet.
11313
11432
 
11314
11433
  | Signal | Default |
11315
11434
  | --- | --- |
@@ -12513,7 +12632,7 @@ not on `PATH`, use `npx @cursor/july`.
12513
12632
  | What you see | What to do |
12514
12633
  | --- | --- |
12515
12634
  | Built-in file reads and greps fail; the turn retries for a long time | Run under Node 22.13+ (or `tsx`), never Bun. Look for `NGHTTP2_FRAME_SIZE_ERROR` in logs. |
12516
- | The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
12635
+ | The turn fails immediately with an API-key error | Sign in with `agent-sdk login`, or set `CURSOR_API_KEY` or `CURSOR_SERVICE_ACCOUNT_KEY`. Discovery, `info`, `call`, and serve bring-up work without a key; model turns need one. |
12517
12636
  | Replies quote rules or `AGENTS.md` from outside your agent project | The session workspace inherited parent-folder config. Nested git checkouts default `local.cwd` to a per-project cache directory under `~/.cache`. Point `defineAgent({ local: { cwd } })` at a checkout only when the agent should inherit that tree, or set `--state-root` to a clean directory (for example under `/tmp`). |
12518
12637
  | Yellow box shows Datadog/Linear tools, but the model lists `GetDynamicTools` / IDE `cursor` tools and never calls them | Attached MCP sits behind harness meta-tools, or the harness cwd is still inside another checkout. Set `advertiseTools: true` for named tools on local turns. Check `GET /v1/info` `local.cwd` and `connections[].advertiseTools`. |
12519
12638
  | Server tools, skills, or workspace seed files never appear | Server tools and sandbox seeds apply on the local runtime (cloud server tools need `--public-url` / `--cloud-tools-url`). Skills reach cloud through the Agent Store when hosting or a personal `CURSOR_API_KEY` is available; otherwise only skills already in the cloud repo. `validate` warns when this combination is present. |
@@ -41,6 +41,7 @@
41
41
  - [GitHub](/docs/guides/github.md): Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests.
42
42
  - [Cursor Grok Bot agents](/docs/guides/grokbot-agents.md): Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval.
43
43
  - [Human-in-the-loop](/docs/guides/human-in-the-loop.md): Gate a tool call on human approval: park it, resolve it from the playground, HTTP, or Slack, and keep the turn alive throughout.
44
+ - [Self-improvement](/docs/guides/improve.md): Mount improve so an agent can change its own instructions, skills, and tools through a pull request a one-off cloud agent opens.
44
45
  - [Host MCP OAuth](/docs/guides/mcp-oauth.md): Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments.
45
46
  - [OpenTelemetry](/docs/guides/opentelemetry.md): Push session, turn, and tool traces from the serve process to an OTLP collector you run.
46
47
  - [Slack](/docs/guides/slack.md): Run a Socket Mode Slack bot from the dashboard wizard, or import an app you own.