@cursor/july 0.1.96 → 0.1.99

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 (381) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +3 -2
  3. package/dist/bin/agent-serve.js +13 -3
  4. package/dist/channels/github/github-channel.d.ts.map +1 -1
  5. package/dist/channels/github/github-channel.js +16 -0
  6. package/dist/channels/origin/api.d.ts +15 -4
  7. package/dist/channels/origin/api.d.ts.map +1 -1
  8. package/dist/channels/origin/api.js +19 -3
  9. package/dist/channels/origin/binding.d.ts +11 -0
  10. package/dist/channels/origin/binding.d.ts.map +1 -1
  11. package/dist/channels/origin/binding.js +41 -25
  12. package/dist/channels/origin/index.d.ts +1 -0
  13. package/dist/channels/origin/index.d.ts.map +1 -1
  14. package/dist/channels/origin/index.js +1 -0
  15. package/dist/channels/origin/origin-channel.d.ts +2 -0
  16. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  17. package/dist/channels/origin/origin-channel.js +40 -4
  18. package/dist/channels/origin/reactions.d.ts +56 -0
  19. package/dist/channels/origin/reactions.d.ts.map +1 -0
  20. package/dist/channels/origin/reactions.js +67 -0
  21. package/dist/channels/origin/types.d.ts +11 -0
  22. package/dist/channels/origin/types.d.ts.map +1 -1
  23. package/dist/channels/slack/approvals.d.ts +16 -0
  24. package/dist/channels/slack/approvals.d.ts.map +1 -1
  25. package/dist/channels/slack/approvals.js +86 -0
  26. package/dist/channels/slack/cli-project.d.ts +19 -0
  27. package/dist/channels/slack/cli-project.d.ts.map +1 -0
  28. package/dist/channels/slack/cli-project.js +234 -0
  29. package/dist/channels/slack/defaults.d.ts.map +1 -1
  30. package/dist/channels/slack/defaults.js +142 -63
  31. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  32. package/dist/channels/slack/dispatch.js +1 -1
  33. package/dist/channels/slack/init.d.ts +3 -2
  34. package/dist/channels/slack/init.d.ts.map +1 -1
  35. package/dist/channels/slack/init.js +5 -5
  36. package/dist/channels/slack/interactive.d.ts +2 -1
  37. package/dist/channels/slack/interactive.d.ts.map +1 -1
  38. package/dist/channels/slack/interactive.js +15 -4
  39. package/dist/channels/slack/live-delivery.d.ts +1 -1
  40. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  41. package/dist/channels/slack/live-delivery.js +4 -2
  42. package/dist/channels/slack/manifest.d.ts +1 -1
  43. package/dist/channels/slack/manifest.js +1 -1
  44. package/dist/channels/slack/progress-delivery.d.ts +28 -0
  45. package/dist/channels/slack/progress-delivery.d.ts.map +1 -0
  46. package/dist/channels/slack/progress-delivery.js +115 -0
  47. package/dist/channels/slack/setup.d.ts +1 -1
  48. package/dist/channels/slack/setup.d.ts.map +1 -1
  49. package/dist/channels/slack/setup.js +10 -6
  50. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  51. package/dist/channels/slack/slack-channel.js +1 -0
  52. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  53. package/dist/channels/slack/tool-approval-events.js +91 -1
  54. package/dist/channels/slack/types.d.ts +9 -1
  55. package/dist/channels/slack/types.d.ts.map +1 -1
  56. package/dist/docs/404.html +2 -2
  57. package/dist/docs/ab.html +4 -4
  58. package/dist/docs/assets/{app.jXleCmOc.js → app.BplEAZ3S.js} +1 -1
  59. package/dist/docs/assets/chunks/@localSearchIndexroot.DpuI4i7Z.js +1 -0
  60. package/dist/docs/assets/chunks/{VPLocalSearchBox.8LhyglIT.js → VPLocalSearchBox.CHXyv4wP.js} +1 -1
  61. package/dist/docs/assets/chunks/{theme.9ged-pr2.js → theme.BTcsZmjQ.js} +2 -2
  62. package/dist/docs/assets/{deployment.md.D9msOFOW.js → deployment.md.MFPKqsqI.js} +2 -2
  63. package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.js → guides_mcp-oauth.md.CN-6YmTJ.js} +4 -4
  64. package/dist/docs/assets/{guides_mcp-oauth.md.DPYmBCbV.lean.js → guides_mcp-oauth.md.CN-6YmTJ.lean.js} +1 -1
  65. package/dist/docs/assets/guides_slack.md.VDXQV3ja.js +22 -0
  66. package/dist/docs/assets/guides_slack.md.VDXQV3ja.lean.js +1 -0
  67. package/dist/docs/assets/index.md.CVeRUOeZ.js +5 -0
  68. package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.js → reference_agent-config.md.BHeYMgme.js} +1 -1
  69. package/dist/docs/assets/{reference_cli.md.CCnG-nJx.js → reference_cli.md.DfoeyvL0.js} +9 -6
  70. package/dist/docs/assets/{reference_cli.md.CCnG-nJx.lean.js → reference_cli.md.DfoeyvL0.lean.js} +1 -1
  71. package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.js → reference_connections.md.DxldvyIB.js} +4 -3
  72. package/dist/docs/assets/{reference_http-api.md.D89k1mdm.js → reference_http-api.md.BEJx9XVj.js} +2 -2
  73. package/dist/docs/assets/reference_sessions.md.NxFP_CAC.js +1 -0
  74. package/dist/docs/assets/{reference_tools.md.BHeXn2id.js → reference_tools.md.CvAHsdSp.js} +10 -2
  75. package/dist/docs/assets/{reference_tools.md.BHeXn2id.lean.js → reference_tools.md.CvAHsdSp.lean.js} +1 -1
  76. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +2 -0
  77. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +1 -0
  78. package/dist/docs/assets/troubleshooting.md.DCiPBhYs.js +1 -0
  79. package/dist/docs/building-with-agents.html +4 -4
  80. package/dist/docs/concepts.html +4 -4
  81. package/dist/docs/deployment.html +7 -7
  82. package/dist/docs/deployment.md +5 -4
  83. package/dist/docs/design/runtime-abstraction.md +1757 -0
  84. package/dist/docs/evals.html +4 -4
  85. package/dist/docs/guides/agent-to-agent.html +4 -4
  86. package/dist/docs/guides/cloud-runtime.html +4 -4
  87. package/dist/docs/guides/convert-automation.html +4 -4
  88. package/dist/docs/guides/github.html +4 -4
  89. package/dist/docs/guides/human-in-the-loop.html +4 -4
  90. package/dist/docs/guides/mcp-oauth.html +8 -8
  91. package/dist/docs/guides/mcp-oauth.md +26 -8
  92. package/dist/docs/guides/opentelemetry.html +4 -4
  93. package/dist/docs/guides/slack.html +17 -33
  94. package/dist/docs/guides/slack.md +92 -201
  95. package/dist/docs/guides/webhooks.html +4 -4
  96. package/dist/docs/hashmap.json +1 -1
  97. package/dist/docs/hillclimbing.html +4 -4
  98. package/dist/docs/index.html +6 -6
  99. package/dist/docs/index.md +5 -3
  100. package/dist/docs/llms-full.txt +2065 -637
  101. package/dist/docs/llms.txt +3 -2
  102. package/dist/docs/quickstart.html +4 -4
  103. package/dist/docs/reference/agent-config.html +6 -6
  104. package/dist/docs/reference/agent-config.md +2 -2
  105. package/dist/docs/reference/artifacts.html +4 -4
  106. package/dist/docs/reference/channels.html +4 -4
  107. package/dist/docs/reference/cli.html +13 -10
  108. package/dist/docs/reference/cli.md +32 -16
  109. package/dist/docs/reference/connections.html +9 -8
  110. package/dist/docs/reference/connections.md +6 -3
  111. package/dist/docs/reference/hooks.html +4 -4
  112. package/dist/docs/reference/http-api.html +7 -7
  113. package/dist/docs/reference/http-api.md +3 -1
  114. package/dist/docs/reference/instructions.html +4 -4
  115. package/dist/docs/reference/playground.html +4 -4
  116. package/dist/docs/reference/project-layout.html +4 -4
  117. package/dist/docs/reference/prompt.html +4 -4
  118. package/dist/docs/reference/schedules.html +4 -4
  119. package/dist/docs/reference/sessions.html +5 -5
  120. package/dist/docs/reference/sessions.md +4 -2
  121. package/dist/docs/reference/skills.html +4 -4
  122. package/dist/docs/reference/subagents.html +4 -4
  123. package/dist/docs/reference/tools.html +15 -7
  124. package/dist/docs/reference/tools.md +34 -2
  125. package/dist/docs/scaffolding-agents.html +4 -4
  126. package/dist/docs/storage.html +4 -4
  127. package/dist/docs/templates/agentic-owners.html +4 -4
  128. package/dist/docs/templates/agents-md.html +28 -0
  129. package/dist/docs/templates/agents-md.md +105 -0
  130. package/dist/docs/templates/code-wiki.html +5 -5
  131. package/dist/docs/templates/demo.html +4 -4
  132. package/dist/docs/templates/pr-autofixer.html +4 -4
  133. package/dist/docs/templates/security-help.html +4 -4
  134. package/dist/docs/templates/security-reviewer.html +5 -5
  135. package/dist/docs/templates/triage.html +4 -4
  136. package/dist/docs/troubleshooting.html +5 -5
  137. package/dist/docs/troubleshooting.md +2 -2
  138. package/dist/evals/run-facts.d.ts.map +1 -1
  139. package/dist/evals/run-facts.js +27 -0
  140. package/dist/files-backends/cursor-hosted.d.ts +3 -2
  141. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  142. package/dist/files-backends/cursor-hosted.js +3 -2
  143. package/dist/index.d.ts +1 -0
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +1 -0
  146. package/dist/internal/advertise-tools.d.ts.map +1 -1
  147. package/dist/internal/advertise-tools.js +15 -9
  148. package/dist/internal/approval-gate.d.ts +12 -13
  149. package/dist/internal/approval-gate.d.ts.map +1 -1
  150. package/dist/internal/approval-gate.js +16 -21
  151. package/dist/internal/as-of.d.ts +19 -0
  152. package/dist/internal/as-of.d.ts.map +1 -0
  153. package/dist/internal/as-of.js +82 -0
  154. package/dist/internal/chat-client.js +10 -0
  155. package/dist/internal/cli-deploy.d.ts +6 -0
  156. package/dist/internal/cli-deploy.d.ts.map +1 -1
  157. package/dist/internal/cli-deploy.js +149 -21
  158. package/dist/internal/cli-mcp-oauth.js +8 -18
  159. package/dist/internal/cli-slack-manual.d.ts +24 -2
  160. package/dist/internal/cli-slack-manual.d.ts.map +1 -1
  161. package/dist/internal/cli-slack-manual.js +251 -20
  162. package/dist/internal/cli-slack.d.ts +9 -2
  163. package/dist/internal/cli-slack.d.ts.map +1 -1
  164. package/dist/internal/cli-slack.js +29 -82
  165. package/dist/internal/cursor/account-mcp.d.ts +1 -0
  166. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  167. package/dist/internal/cursor/account-mcp.js +17 -0
  168. package/dist/internal/cursor-agent-template.d.ts +1 -1
  169. package/dist/internal/cursor-agent-template.d.ts.map +1 -1
  170. package/dist/internal/cursor-agent-template.js +1 -0
  171. package/dist/internal/cursor-event-relay.d.ts.map +1 -1
  172. package/dist/internal/cursor-event-relay.js +5 -6
  173. package/dist/internal/deploy-client.d.ts +17 -0
  174. package/dist/internal/deploy-client.d.ts.map +1 -1
  175. package/dist/internal/deploy-client.js +31 -10
  176. package/dist/internal/env-file.d.ts +19 -0
  177. package/dist/internal/env-file.d.ts.map +1 -0
  178. package/dist/internal/env-file.js +90 -0
  179. package/dist/internal/framework-file-storage.d.ts +11 -17
  180. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  181. package/dist/internal/framework-file-storage.js +17 -40
  182. package/dist/internal/framework-storage-selection.d.ts +13 -11
  183. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  184. package/dist/internal/framework-storage-selection.js +37 -26
  185. package/dist/internal/hosted-admission-adapter.d.ts +28 -0
  186. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -0
  187. package/dist/internal/hosted-admission-adapter.js +7 -0
  188. package/dist/internal/hosted-delivery-protocol.d.ts +13 -1
  189. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  190. package/dist/internal/hosted-delivery-protocol.js +8 -1
  191. package/dist/internal/hosted-delivery.d.ts +21 -1
  192. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  193. package/dist/internal/hosted-delivery.js +101 -34
  194. package/dist/internal/hosted-execution-diag.d.ts +59 -0
  195. package/dist/internal/hosted-execution-diag.d.ts.map +1 -0
  196. package/dist/internal/hosted-execution-diag.js +187 -0
  197. package/dist/internal/http-channel.d.ts.map +1 -1
  198. package/dist/internal/http-channel.js +85 -2
  199. package/dist/internal/init-project.d.ts.map +1 -1
  200. package/dist/internal/init-project.js +2 -0
  201. package/dist/internal/logs-client.d.ts +5 -0
  202. package/dist/internal/logs-client.d.ts.map +1 -1
  203. package/dist/internal/logs-client.js +5 -0
  204. package/dist/internal/mcp-endpoint.js +2 -3
  205. package/dist/internal/mcp-host.d.ts +10 -0
  206. package/dist/internal/mcp-host.d.ts.map +1 -1
  207. package/dist/internal/mcp-host.js +57 -8
  208. package/dist/internal/mcp-oauth-on-demand.d.ts +68 -0
  209. package/dist/internal/mcp-oauth-on-demand.d.ts.map +1 -0
  210. package/dist/internal/mcp-oauth-on-demand.js +287 -0
  211. package/dist/internal/mcp-oauth-persist.d.ts +42 -0
  212. package/dist/internal/mcp-oauth-persist.d.ts.map +1 -0
  213. package/dist/internal/mcp-oauth-persist.js +92 -0
  214. package/dist/internal/mcp-oauth.d.ts +1 -0
  215. package/dist/internal/mcp-oauth.d.ts.map +1 -1
  216. package/dist/internal/mcp-oauth.js +10 -2
  217. package/dist/internal/null-kv-storage.d.ts +48 -0
  218. package/dist/internal/null-kv-storage.d.ts.map +1 -0
  219. package/dist/internal/null-kv-storage.js +58 -0
  220. package/dist/internal/otel/collector.d.ts.map +1 -1
  221. package/dist/internal/otel/collector.js +22 -9
  222. package/dist/internal/server.d.ts +6 -0
  223. package/dist/internal/server.d.ts.map +1 -1
  224. package/dist/internal/server.js +123 -33
  225. package/dist/internal/session-engine.d.ts +88 -3
  226. package/dist/internal/session-engine.d.ts.map +1 -1
  227. package/dist/internal/session-engine.js +538 -46
  228. package/dist/internal/session-run-log.d.ts +120 -0
  229. package/dist/internal/session-run-log.d.ts.map +1 -0
  230. package/dist/internal/session-run-log.js +359 -0
  231. package/dist/internal/sessions-client.d.ts +9 -7
  232. package/dist/internal/sessions-client.d.ts.map +1 -1
  233. package/dist/internal/sessions-client.js +3 -1
  234. package/dist/internal/storage-coordinator.d.ts +13 -0
  235. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  236. package/dist/internal/storage-coordinator.js +37 -6
  237. package/dist/internal/storage-roles.d.ts +5 -0
  238. package/dist/internal/storage-roles.d.ts.map +1 -1
  239. package/dist/internal/stream-progress.d.ts.map +1 -1
  240. package/dist/internal/stream-progress.js +10 -0
  241. package/dist/internal/tool-policy.d.ts +29 -9
  242. package/dist/internal/tool-policy.d.ts.map +1 -1
  243. package/dist/internal/tool-policy.js +24 -0
  244. package/dist/internal/trajectory.d.ts.map +1 -1
  245. package/dist/internal/trajectory.js +10 -0
  246. package/dist/internal/turn-outbox.d.ts +24 -0
  247. package/dist/internal/turn-outbox.d.ts.map +1 -0
  248. package/dist/internal/turn-outbox.js +80 -0
  249. package/dist/playground/assets/index-D7rGZNjy.css +1 -0
  250. package/dist/playground/assets/index-jzNbJENa.js +69 -0
  251. package/dist/playground/index.html +2 -2
  252. package/dist/storage-backends/cursor-hosted.d.ts +1 -1
  253. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  254. package/dist/storage-backends/cursor-hosted.js +12 -0
  255. package/dist/storage-protocol.d.ts +8 -0
  256. package/dist/storage-protocol.d.ts.map +1 -1
  257. package/dist/storage-protocol.js +8 -0
  258. package/dist/storage.d.ts +8 -0
  259. package/dist/storage.d.ts.map +1 -1
  260. package/dist/tools.d.ts +12 -2
  261. package/dist/tools.d.ts.map +1 -1
  262. package/dist/types.d.ts +88 -7
  263. package/dist/types.d.ts.map +1 -1
  264. package/docs/README.md +5 -3
  265. package/docs/deployment.md +5 -4
  266. package/docs/design/runtime-abstraction.md +1757 -0
  267. package/docs/guides/mcp-oauth.md +26 -8
  268. package/docs/guides/slack.md +93 -202
  269. package/docs/reference/agent-config.md +2 -2
  270. package/docs/reference/cli.md +32 -16
  271. package/docs/reference/connections.md +6 -3
  272. package/docs/reference/http-api.md +3 -1
  273. package/docs/reference/sessions.md +4 -2
  274. package/docs/reference/tools.md +34 -2
  275. package/docs/templates/agents-md.md +110 -0
  276. package/docs/troubleshooting.md +2 -2
  277. package/package.json +1 -1
  278. package/skills/create-agent/SKILL.md +2 -1
  279. package/skills/mcp-auth/SKILL.md +6 -3
  280. package/skills/setup-slack/SKILL.md +23 -13
  281. package/src/bin/agent-serve.ts +12 -1
  282. package/src/channels/github/github-channel.ts +17 -0
  283. package/src/channels/origin/api.ts +24 -5
  284. package/src/channels/origin/binding.ts +55 -26
  285. package/src/channels/origin/index.ts +1 -0
  286. package/src/channels/origin/origin-channel.ts +78 -10
  287. package/src/channels/origin/reactions.ts +82 -0
  288. package/src/channels/origin/types.ts +11 -0
  289. package/src/channels/slack/approvals.ts +105 -0
  290. package/src/channels/slack/cli-project.ts +267 -0
  291. package/src/channels/slack/defaults.ts +165 -74
  292. package/src/channels/slack/dispatch.ts +2 -0
  293. package/src/channels/slack/init.ts +10 -5
  294. package/src/channels/slack/interactive.ts +35 -9
  295. package/src/channels/slack/live-delivery.ts +5 -3
  296. package/src/channels/slack/manifest.ts +1 -1
  297. package/src/channels/slack/progress-delivery.ts +133 -0
  298. package/src/channels/slack/setup.ts +10 -6
  299. package/src/channels/slack/slack-channel.ts +1 -0
  300. package/src/channels/slack/tool-approval-events.ts +93 -0
  301. package/src/channels/slack/types.ts +9 -1
  302. package/src/evals/run-facts.ts +32 -0
  303. package/src/files-backends/cursor-hosted.ts +3 -2
  304. package/src/index.ts +4 -0
  305. package/src/internal/advertise-tools.ts +31 -10
  306. package/src/internal/approval-gate.ts +20 -29
  307. package/src/internal/as-of.ts +107 -0
  308. package/src/internal/chat-client.ts +19 -0
  309. package/src/internal/cli-deploy.ts +203 -13
  310. package/src/internal/cli-mcp-oauth.ts +7 -21
  311. package/src/internal/cli-slack-manual.ts +350 -18
  312. package/src/internal/cli-slack.ts +40 -84
  313. package/src/internal/cursor/account-mcp.ts +21 -0
  314. package/src/internal/cursor-agent-template.ts +1 -0
  315. package/src/internal/cursor-event-relay.ts +5 -6
  316. package/src/internal/deploy-client.ts +43 -0
  317. package/src/internal/env-file.ts +84 -0
  318. package/src/internal/framework-file-storage.ts +18 -46
  319. package/src/internal/framework-storage-selection.ts +41 -25
  320. package/src/internal/hosted-admission-adapter.ts +42 -0
  321. package/src/internal/hosted-delivery-protocol.ts +14 -2
  322. package/src/internal/hosted-delivery.ts +169 -44
  323. package/src/internal/hosted-execution-diag.ts +252 -0
  324. package/src/internal/http-channel.ts +107 -0
  325. package/src/internal/init-project.ts +2 -0
  326. package/src/internal/logs-client.ts +5 -0
  327. package/src/internal/mcp-endpoint.ts +13 -4
  328. package/src/internal/mcp-host.ts +77 -11
  329. package/src/internal/mcp-oauth-on-demand.ts +352 -0
  330. package/src/internal/mcp-oauth-persist.ts +127 -0
  331. package/src/internal/mcp-oauth.ts +17 -1
  332. package/src/internal/null-kv-storage.ts +74 -0
  333. package/src/internal/otel/collector.ts +30 -0
  334. package/src/internal/server.ts +159 -11
  335. package/src/internal/session-engine.ts +691 -57
  336. package/src/internal/session-run-log.ts +584 -0
  337. package/src/internal/sessions-client.ts +17 -8
  338. package/src/internal/storage-coordinator.ts +49 -9
  339. package/src/internal/storage-roles.ts +7 -0
  340. package/src/internal/stream-progress.ts +19 -0
  341. package/src/internal/tool-policy.ts +49 -9
  342. package/src/internal/trajectory.ts +10 -0
  343. package/src/internal/turn-outbox.ts +85 -0
  344. package/src/storage-backends/cursor-hosted.ts +13 -1
  345. package/src/storage-protocol.ts +10 -0
  346. package/src/storage.ts +12 -0
  347. package/src/tools.ts +12 -2
  348. package/src/types.ts +93 -8
  349. package/templates/agents-md/README.md +39 -0
  350. package/templates/agents-md/agent/agent.ts +8 -0
  351. package/templates/agents-md/agent/channels/github.ts +10 -0
  352. package/templates/agents-md/agent/channels/queue.ts +28 -0
  353. package/templates/agents-md/agent/channels/slack.ts +9 -0
  354. package/templates/agents-md/agent/instructions.md +39 -0
  355. package/templates/agents-md/agent/lib/collect.ts +439 -0
  356. package/templates/agents-md/agent/lib/config.ts +8 -0
  357. package/templates/agents-md/agent/lib/paths.ts +51 -0
  358. package/templates/agents-md/agent/schedules/weekly.ts +17 -0
  359. package/templates/agents-md/agent/tools/apply_agents.ts +226 -0
  360. package/templates/agents-md/evals/agents.eval.ts +135 -0
  361. package/templates/agents-md/evals/evals.config.ts +5 -0
  362. package/templates/agents-md/init.json +38 -0
  363. package/templates/agents-md/package.json +18 -0
  364. package/templates/agents-md/tsconfig.json +12 -0
  365. package/dist/docs/assets/chunks/@localSearchIndexroot.DFoGuETX.js +0 -1
  366. package/dist/docs/assets/guides_slack.md.C32HsdKk.js +0 -38
  367. package/dist/docs/assets/guides_slack.md.C32HsdKk.lean.js +0 -1
  368. package/dist/docs/assets/index.md.CI93Ltlb.js +0 -5
  369. package/dist/docs/assets/reference_sessions.md.D0mIh4KK.js +0 -1
  370. package/dist/docs/assets/troubleshooting.md.Ctv3T8C2.js +0 -1
  371. package/dist/docs/design/agsh.md +0 -406
  372. package/dist/playground/assets/index-B1DDvBeC.css +0 -1
  373. package/dist/playground/assets/index-Cx9CclK_.js +0 -88
  374. package/docs/design/agsh.md +0 -406
  375. /package/dist/docs/assets/{deployment.md.D9msOFOW.lean.js → deployment.md.MFPKqsqI.lean.js} +0 -0
  376. /package/dist/docs/assets/{index.md.CI93Ltlb.lean.js → index.md.CVeRUOeZ.lean.js} +0 -0
  377. /package/dist/docs/assets/{reference_agent-config.md.Cp_x38Nl.lean.js → reference_agent-config.md.BHeYMgme.lean.js} +0 -0
  378. /package/dist/docs/assets/{reference_connections.md.BH8Oc0D0.lean.js → reference_connections.md.DxldvyIB.lean.js} +0 -0
  379. /package/dist/docs/assets/{reference_http-api.md.D89k1mdm.lean.js → reference_http-api.md.BEJx9XVj.lean.js} +0 -0
  380. /package/dist/docs/assets/{reference_sessions.md.D0mIh4KK.lean.js → reference_sessions.md.NxFP_CAC.lean.js} +0 -0
  381. /package/dist/docs/assets/{troubleshooting.md.Ctv3T8C2.lean.js → troubleshooting.md.DCiPBhYs.lean.js} +0 -0
@@ -41,6 +41,7 @@ import { findGitHubChannelTargets } from "../channels/github/forward.js";
41
41
  import { getOriginCursorAccountRuntime, parseCursorOriginRepoScope, } from "../channels/origin/cursor-account.js";
42
42
  import { findOriginChannelTargets } from "../channels/origin/origin-channel.js";
43
43
  import { allowAll, bearerAuth, localDevStrict } from "../channels.js";
44
+ import { InvalidAsOfError, VacuousTimeArgsError } from "./as-of.js";
44
45
  import { V2EngineError } from "./continuation-identity.js";
45
46
  import { selectConversationMirror } from "./conversation-mirror.js";
46
47
  import { CursorAccountMcpBridge, collectCursorAccountConnections, cursorAccountMcpPath, } from "./cursor/account-mcp.js";
@@ -58,12 +59,14 @@ import { EvalRunConflictError, EvalRunEmptyError, EvalRunNotRunningError, EvalRu
58
59
  import { collectGitHubTriggerTargets, collectOriginTriggerTargets, handleAgentServeTrigger, } from "./handleAgentServeTrigger.js";
59
60
  import { createHostPlatforms, warmupHostGitHubAuth } from "./host-platforms.js";
60
61
  import { registerHostedDeliveryRoute } from "./hosted-delivery.js";
62
+ import { hostedErrorStackSnippet } from "./hosted-execution-diag.js";
61
63
  import { buildHttpChannelRoutes, errorResponse, jsonResponse, readJsonObject, requireSessionOwner, } from "./http-channel.js";
62
64
  import { validateToolInput } from "./json-schema.js";
63
65
  import { DEFAULT_SERVE_PORT, listenHttpServer } from "./listen-port.js";
64
66
  import { createLocalControlPlane, } from "./local-control-plane.js";
65
67
  import { createLogRing } from "./log-ring.js";
66
68
  import { createAgentMcpEndpoint, createToolMcpEndpoint, MCP_ENDPOINT_PATH, TOOL_MCP_ENDPOINT_PATH, } from "./mcp-endpoint.js";
69
+ import { mcpOauthServeCallbackPath, mcpOauthServeCallbackUrl, } from "./mcp-oauth-on-demand.js";
67
70
  import { isLoopbackAddress } from "./net.js";
68
71
  import { createOtelCollector } from "./otel/collector.js";
69
72
  import { pickAuthoredOtel, resolveOtelConfig } from "./otel/config.js";
@@ -82,6 +85,7 @@ import { RuntimeDispatchingRunner } from "./runtime-dispatch-runner.js";
82
85
  import { ScheduleRunner, UnknownScheduleError } from "./schedule-runner.js";
83
86
  import { CursorSdkRunner } from "./sdk-runner.js";
84
87
  import { InvalidContinuationTokenError, SessionAuthError, SessionBusyError, SessionEngine, ToolInputError, ToolNotDirectlyCallableError, UnknownToolError, WorkspaceUnavailableError, } from "./session-engine.js";
88
+ import { registerSessionRunFatalFlush, selectSessionRunLogStore, unregisterSessionRunFatalFlush, } from "./session-run-log.js";
85
89
  import { sessionUrlsForRequest } from "./session-urls.js";
86
90
  import { catalogDetailEntry, catalogListEntry } from "./tool-catalog.js";
87
91
  function memoryHealthFields(engines) {
@@ -116,8 +120,8 @@ function isV2Project(project) {
116
120
  export function startServer(mounts_1) {
117
121
  return __awaiter(this, arguments, void 0, function* (mounts, options = {}) {
118
122
  var _a, _b, _c, _d, _e, _f;
119
- var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
120
- var _3;
123
+ var _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
124
+ var _5;
121
125
  if (mounts.length === 0) {
122
126
  throw new Error("startServer requires at least one agent mount");
123
127
  }
@@ -139,7 +143,7 @@ export function startServer(mounts_1) {
139
143
  // CURSOR_AGENTKIT_VERSION is still the env the SDK reads when building
140
144
  // its client-version header (wire prefix remains `agentkit-`). Setting it
141
145
  // here makes the internal-only agentkit_enabled gate apply to every turn.
142
- (_m = (_3 = process.env).CURSOR_AGENTKIT_VERSION) !== null && _m !== void 0 ? _m : (_3.CURSOR_AGENTKIT_VERSION = packageVersion());
146
+ (_m = (_5 = process.env).CURSOR_AGENTKIT_VERSION) !== null && _m !== void 0 ? _m : (_5.CURSOR_AGENTKIT_VERSION = packageVersion());
143
147
  const authoredOtel = pickAuthoredOtel(mounts.map((m) => ({
144
148
  slug: m.slug,
145
149
  name: m.project.name,
@@ -328,7 +332,17 @@ export function startServer(mounts_1) {
328
332
  const conversationMirror = mounts.length === 1 && mounts[0] !== undefined
329
333
  ? selectConversationMirror({ project: mounts[0].project, logger })
330
334
  : undefined;
331
- const sdkRunner = (_t = options.runner) !== null && _t !== void 0 ? _t : new CursorSdkRunner(Object.assign(Object.assign(Object.assign({}, (options.apiKey === undefined || options.apiKey.trim() === ""
335
+ const sessionRunLog = (_t = options.sessionRunLog) !== null && _t !== void 0 ? _t : (mounts.length === 1 && mounts[0] !== undefined
336
+ ? selectSessionRunLogStore({
337
+ project: mounts[0].project,
338
+ logger,
339
+ snapshotLogs: () => logRing.since(),
340
+ })
341
+ : undefined);
342
+ if (sessionRunLog !== undefined) {
343
+ registerSessionRunFatalFlush((error) => sessionRunLog.flushProcessDeath("uncaught_exception", error));
344
+ }
345
+ const sdkRunner = (_u = options.runner) !== null && _u !== void 0 ? _u : new CursorSdkRunner(Object.assign(Object.assign(Object.assign({}, (options.apiKey === undefined || options.apiKey.trim() === ""
332
346
  ? {}
333
347
  : { apiKey: options.apiKey })), (conversationMirror === undefined ? {} : { conversationMirror })), { logger }));
334
348
  // Grok Bot turns run on Cursor's hosted Grok Bot (Sand) harness through
@@ -393,8 +407,8 @@ export function startServer(mounts_1) {
393
407
  }
394
408
  accountBridge = new CursorAccountMcpBridge({
395
409
  client: new CursorBackendClient({
396
- backendUrl: (_u = accountKey === null || accountKey === void 0 ? void 0 : accountKey.backendUrl) !== null && _u !== void 0 ? _u : cursorBackendUrl(),
397
- apiKey: (_v = accountKey === null || accountKey === void 0 ? void 0 : accountKey.apiKey) !== null && _v !== void 0 ? _v : "",
410
+ backendUrl: (_v = accountKey === null || accountKey === void 0 ? void 0 : accountKey.backendUrl) !== null && _v !== void 0 ? _v : cursorBackendUrl(),
411
+ apiKey: (_w = accountKey === null || accountKey === void 0 ? void 0 : accountKey.apiKey) !== null && _w !== void 0 ? _w : "",
398
412
  getApiKey: () => { var _a; return (_a = liveCursorApiKey()) !== null && _a !== void 0 ? _a : ""; },
399
413
  logger,
400
414
  }),
@@ -406,7 +420,7 @@ export function startServer(mounts_1) {
406
420
  }
407
421
  for (const { slug, project } of mounts) {
408
422
  // Each agent gets an isolated state root so their sessions never mix.
409
- const baseStateRoot = (_w = options.stateRoot) !== null && _w !== void 0 ? _w : join(project.rootDir, ".agent-serve");
423
+ const baseStateRoot = (_x = options.stateRoot) !== null && _x !== void 0 ? _x : join(project.rootDir, ".agent-serve");
410
424
  const stateRoot = slug === "" ? baseStateRoot : join(baseStateRoot, slug);
411
425
  const otelCollector = otelRuntime === undefined
412
426
  ? undefined
@@ -420,6 +434,12 @@ export function startServer(mounts_1) {
420
434
  otel: otelCollector,
421
435
  otelMeter: otelRuntime === null || otelRuntime === void 0 ? void 0 : otelRuntime.meter,
422
436
  });
437
+ engine.oauthCallbackHub.secrets = options.mcpOauthSecrets;
438
+ engine.oauthCallbackHub.secretsBind = {
439
+ slug: slug === "" ? undefined : slug,
440
+ cloudToolsUrl: options.cloudToolsUrl,
441
+ };
442
+ engine.oauthCallbackHub.logger = logger;
423
443
  // Rehydrate sessions from the authored storage sink before any
424
444
  // channel or route can address them (continuation tokens must resolve).
425
445
  yield engine.restoreStoredSessions();
@@ -488,7 +508,7 @@ export function startServer(mounts_1) {
488
508
  noControlPlane,
489
509
  multi,
490
510
  logger,
491
- logRing }, (options.authToken === undefined
511
+ logRing, diagStateRoot: baseStateRoot, sessionRunLog }, (options.authToken === undefined
492
512
  ? {}
493
513
  : { authToken: options.authToken })), (options.allowAnonymous === true ? { allowAnonymous: true } : {})), (accountRefs !== undefined && accountBridge !== undefined
494
514
  ? { accountBridge, accountRefs }
@@ -510,6 +530,7 @@ export function startServer(mounts_1) {
510
530
  engine.trackBackground(promise);
511
531
  },
512
532
  resolveApproval: (sessionId, callId, decision, auth) => engine.resolveApproval(sessionId, callId, decision, auth),
533
+ resolveAuth: (sessionId, callId, decision, auth) => engine.resolveAuth(sessionId, callId, decision, auth),
513
534
  hasContinuationSession: (continuationToken) => engine.hasContinuationSession(channel.id, continuationToken),
514
535
  isContinuationBusy: (continuationToken) => engine.isContinuationBusy(channel.id, continuationToken),
515
536
  getContinuationLastBotMessageTs: (continuationToken) => engine.getContinuationLastBotMessageTs(channel.id, continuationToken),
@@ -522,7 +543,7 @@ export function startServer(mounts_1) {
522
543
  }
523
544
  catch (error) {
524
545
  logger(`[agent-sdk] channel "${channel.id}" onStart failed: ${error instanceof Error
525
- ? ((_x = error.stack) !== null && _x !== void 0 ? _x : error.message)
546
+ ? ((_y = error.stack) !== null && _y !== void 0 ? _y : error.message)
526
547
  : String(error)}`);
527
548
  }
528
549
  }
@@ -646,8 +667,8 @@ export function startServer(mounts_1) {
646
667
  const routeContinuation = localControlPlaneRoute(runtimes);
647
668
  const cursorEventsCommon = {
648
669
  config: effectiveCursorEvents,
649
- githubRepos: (_y = (_e = cursorGithubConfig.cursorEvents) === null || _e === void 0 ? void 0 : _e.repos) !== null && _y !== void 0 ? _y : [],
650
- originRepos: (_z = cursorOriginScope === null || cursorOriginScope === void 0 ? void 0 : cursorOriginScope.repos) !== null && _z !== void 0 ? _z : [],
670
+ githubRepos: (_z = (_e = cursorGithubConfig.cursorEvents) === null || _e === void 0 ? void 0 : _e.repos) !== null && _z !== void 0 ? _z : [],
671
+ originRepos: (_0 = cursorOriginScope === null || cursorOriginScope === void 0 ? void 0 : cursorOriginScope.repos) !== null && _0 !== void 0 ? _0 : [],
651
672
  stateRoot: options.stateRoot,
652
673
  auth: cursorEventsAuth,
653
674
  logger,
@@ -676,9 +697,9 @@ export function startServer(mounts_1) {
676
697
  const server = createServer((req, res) => {
677
698
  void instrumentHttp(otelRuntime, req, res, () => handleRequest(router, req, res, logger));
678
699
  });
679
- const host = (_0 = options.host) !== null && _0 !== void 0 ? _0 : "127.0.0.1";
700
+ const host = (_1 = options.host) !== null && _1 !== void 0 ? _1 : "127.0.0.1";
680
701
  const portWasExplicit = options.port !== undefined;
681
- const requestedPort = (_1 = options.port) !== null && _1 !== void 0 ? _1 : DEFAULT_SERVE_PORT;
702
+ const requestedPort = (_2 = options.port) !== null && _2 !== void 0 ? _2 : DEFAULT_SERVE_PORT;
682
703
  let boundPort;
683
704
  try {
684
705
  boundPort = yield listenHttpServer({
@@ -700,6 +721,7 @@ export function startServer(mounts_1) {
700
721
  const address = server.address();
701
722
  const displayHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host;
702
723
  const url = `http://${displayHost}:${boundPort}`;
724
+ const oauthOrigin = ((_3 = options.publicUrl) !== null && _3 !== void 0 ? _3 : url).replace(/\/$/, "");
703
725
  // Resolve peer + Cursor account MCP connections now that the listen port is
704
726
  // known (see resolved-connections.ts for the URL/runtime rules).
705
727
  for (const runtime of runtimes) {
@@ -715,6 +737,18 @@ export function startServer(mounts_1) {
715
737
  if (resolved.length > 0) {
716
738
  runtime.engine.setResolvedConnections(resolved);
717
739
  }
740
+ const oauthBase = runtime.slug === "" ? "" : `/${runtime.slug}`;
741
+ runtime.engine.setMcpOauthCallbackUrl(mcpOauthServeCallbackUrl(oauthOrigin, oauthBase));
742
+ if (accountBridge !== undefined && accountRefs !== undefined) {
743
+ const bridge = accountBridge;
744
+ runtime.engine.setCursorAccountAuthProbe((connection) => __awaiter(this, void 0, void 0, function* () {
745
+ const ref = accountRefs.find((entry) => entry.name === connection);
746
+ if (ref === undefined) {
747
+ return undefined;
748
+ }
749
+ return yield bridge.probeAuthUrl(ref);
750
+ }));
751
+ }
718
752
  const hasServerTools = runtime.project.agent.tools.some((tool) => tool.execution === "server");
719
753
  // Host-bridged connections ride the same endpoint as server tools, so
720
754
  // the cloud tools connection is set whenever either needs it.
@@ -723,7 +757,7 @@ export function startServer(mounts_1) {
723
757
  runtime.project.agent.cloud !== undefined;
724
758
  if ((hasServerTools || bridgeableNames.length > 0) && cloudCapable) {
725
759
  const basePath = runtime.slug === "" ? "" : `/${runtime.slug}`;
726
- const publicToolsUrl = (_2 = options.cloudToolsUrl) !== null && _2 !== void 0 ? _2 : (options.publicUrl === undefined
760
+ const publicToolsUrl = (_4 = options.cloudToolsUrl) !== null && _4 !== void 0 ? _4 : (options.publicUrl === undefined
727
761
  ? undefined
728
762
  : `${options.publicUrl.replace(/\/$/, "")}${basePath}${TOOL_MCP_ENDPOINT_PATH}`);
729
763
  if (publicToolsUrl === undefined) {
@@ -843,6 +877,10 @@ export function startServer(mounts_1) {
843
877
  close: () => __awaiter(this, void 0, void 0, function* () {
844
878
  var _a;
845
879
  var _b;
880
+ if (sessionRunLog !== undefined) {
881
+ yield sessionRunLog.flushProcessDeath("process_exit");
882
+ unregisterSessionRunFatalFlush();
883
+ }
846
884
  playgroundDev === null || playgroundDev === void 0 ? void 0 : playgroundDev.stop();
847
885
  yield cursorDeploymentRelay === null || cursorDeploymentRelay === void 0 ? void 0 : cursorDeploymentRelay.stop();
848
886
  yield cursorEventRelay === null || cursorEventRelay === void 0 ? void 0 : cursorEventRelay.stop();
@@ -888,7 +926,7 @@ export function startServer(mounts_1) {
888
926
  function mountAgentRoutes(router, runtime, args) {
889
927
  var _a, _b, _c;
890
928
  const { slug, project, engine, scheduleRunner, reminderRunner } = runtime;
891
- const { dev, playground, noControlPlane, multi, logger, logRing } = args;
929
+ const { dev, playground, noControlPlane, multi, logger, logRing, sessionRunLog, } = args;
892
930
  // "" (single) -> "/v1/..."; "my-agent" (multi) -> "/my-agent/v1/...".
893
931
  const base = slug === "" ? "" : `/${slug}`;
894
932
  // The Cursor account MCP bridge for this mount's account MCP connections:
@@ -929,17 +967,16 @@ function mountAgentRoutes(router, runtime, args) {
929
967
  return null;
930
968
  };
931
969
  if (noControlPlane === true && isV2Project(project)) {
932
- registerHostedDeliveryRoute({
933
- router,
934
- base,
935
- channels: project.channels,
936
- buildHandlerArgs: (channelId, hostedSessionId) => buildChannelHandlerArgs({
970
+ registerHostedDeliveryRoute(Object.assign(Object.assign(Object.assign({ router,
971
+ base, channels: project.channels, buildHandlerArgs: (channelId, hostedSessionId) => buildChannelHandlerArgs({
937
972
  runtime,
938
973
  channelId,
939
974
  hostedSessionId,
940
- }),
941
- drainSessionDurability: (sessionId) => engine.drainSessionDurability(sessionId),
942
- });
975
+ }), drainSessionDurability: (sessionId) => engine.drainSessionDurability(sessionId) }, (args.diagStateRoot === undefined
976
+ ? {}
977
+ : { stateRoot: args.diagStateRoot })), (sessionRunLog === undefined
978
+ ? {}
979
+ : { persistSessionRun: (document) => sessionRunLog.persist(document) })), { snapshotLogs: () => logRing.since() }));
943
980
  }
944
981
  // Playground lists/opens Slack (and other channel) sessions across
945
982
  // principals when `--dev` (loopback) or `--allow-anonymous` (trusted
@@ -952,6 +989,12 @@ function mountAgentRoutes(router, runtime, args) {
952
989
  // Separate from read-relax: playground Approve/Deny on Slack-owned parked
953
990
  // tools (Slack principals never match local/anonymous HTTP auth).
954
991
  const relaxSessionApprovalAuth = relaxSessionReadAuth;
992
+ router.add({
993
+ method: "GET",
994
+ pattern: `${base}${mcpOauthServeCallbackPath()}`,
995
+ auth: "none",
996
+ handler: (request) => engine.oauthCallbackHub.handleCallback(request),
997
+ });
955
998
  router.add({
956
999
  method: "GET",
957
1000
  pattern: `${base}/v1/health`,
@@ -1019,11 +1062,48 @@ function mountAgentRoutes(router, runtime, args) {
1019
1062
  });
1020
1063
  },
1021
1064
  });
1065
+ // v2 only: one session-level hosted-execution log on the framework
1066
+ // store. Distinct from GET /v1/logs (process-wide ring). Keyed by the
1067
+ // factory session public id so an execute_throw that never minted a
1068
+ // July session is still readable after the pod parks.
1069
+ if (isV2Project(project) && sessionRunLog !== undefined) {
1070
+ router.add({
1071
+ method: "GET",
1072
+ pattern: `${base}/v1/session/:sessionId/runs`,
1073
+ auth: httpAuth,
1074
+ handler: (_request, ctx) => __awaiter(this, void 0, void 0, function* () {
1075
+ var _a, _b, _c;
1076
+ const sessionId = (_a = ctx.params.sessionId) !== null && _a !== void 0 ? _a : "";
1077
+ if (sessionId.length === 0 || sessionId.includes("/")) {
1078
+ return errorResponse(400, "invalid_request", "Expected a session id.");
1079
+ }
1080
+ const record = yield engine.getOrRestoreSession(sessionId);
1081
+ if (record === undefined) {
1082
+ return errorResponse(404, "session_not_found", `Unknown session ${sessionId}.`);
1083
+ }
1084
+ const ownership = requireSessionOwner(record, ctx.auth, {
1085
+ relax: relaxSessionReadAuth,
1086
+ beyondLoopback: relaxSessionReadAuthBeyondLoopback,
1087
+ requestIp: ctx.requestIp,
1088
+ });
1089
+ if (ownership !== undefined) {
1090
+ return ownership;
1091
+ }
1092
+ const document = yield sessionRunLog.read(sessionId);
1093
+ return jsonResponse({
1094
+ sessionId,
1095
+ updatedAt: document === null || document === void 0 ? void 0 : document.updatedAt,
1096
+ lastFailure: (_b = document === null || document === void 0 ? void 0 : document.lastFailure) !== null && _b !== void 0 ? _b : null,
1097
+ executions: (_c = document === null || document === void 0 ? void 0 : document.executions) !== null && _c !== void 0 ? _c : [],
1098
+ });
1099
+ }),
1100
+ });
1101
+ }
1022
1102
  router.add({
1023
1103
  method: "GET",
1024
1104
  pattern: `${base}/v1/sessions`,
1025
1105
  auth: httpAuth,
1026
- handler: (_request, ctx) => __awaiter(this, void 0, void 0, function* () {
1106
+ handler: (request, ctx) => __awaiter(this, void 0, void 0, function* () {
1027
1107
  // Same gate as requireSessionOwner / relaxSessionReadAuth: never with
1028
1108
  // bearer or custom channel auth (strict per-principal isolation).
1029
1109
  // `--allow-anonymous` alone is a shared-principal trust boundary (corp
@@ -1032,9 +1112,13 @@ function mountAgentRoutes(router, runtime, args) {
1032
1112
  (relaxSessionReadAuthBeyondLoopback ||
1033
1113
  (typeof ctx.requestIp === "string" &&
1034
1114
  isLoopbackAddress(ctx.requestIp)));
1035
- const listed = yield engine.listSessionsWithSource(ctx.auth, {
1036
- includeAll,
1037
- });
1115
+ // `?latest=1` only the newest visible session. Clients binding a
1116
+ // default session (agsh) do not need the whole list, and on hosted
1117
+ // storage the whole list is a database scan.
1118
+ const latest = new URL(request.url).searchParams.get("latest");
1119
+ const listed = latest === "1" || latest === "true"
1120
+ ? yield engine.latestSessionWithSource(ctx.auth, { includeAll })
1121
+ : yield engine.listSessionsWithSource(ctx.auth, { includeAll });
1038
1122
  return jsonResponse({
1039
1123
  sessions: listed.sessions,
1040
1124
  source: listed.source,
@@ -1207,17 +1291,16 @@ function mountAgentRoutes(router, runtime, args) {
1207
1291
  return binding.errorResponse;
1208
1292
  }
1209
1293
  try {
1210
- const catalog = yield engine.listCatalogTools(Object.assign({ auth: ctx.auth }, binding));
1211
- const tool = catalog.tools.find((t) => t.name === toolName);
1212
- if (tool === undefined) {
1294
+ const described = yield engine.describeCatalogTool(toolName, Object.assign({ auth: ctx.auth }, binding));
1295
+ if (described.tool === undefined) {
1213
1296
  return jsonResponse({
1214
1297
  ok: false,
1215
1298
  error: "unknown_tool",
1216
1299
  message: `Unknown tool "${toolName}".`,
1217
- availableTools: catalog.tools.map((t) => t.name),
1300
+ availableTools: described.availableTools,
1218
1301
  }, { status: 404 });
1219
1302
  }
1220
- return jsonResponse(catalogDetailEntry(tool));
1303
+ return jsonResponse(catalogDetailEntry(described.tool));
1221
1304
  }
1222
1305
  catch (error) {
1223
1306
  if (error instanceof InvalidContinuationTokenError) {
@@ -2085,11 +2168,18 @@ function handleRequest(router, req, res, logger) {
2085
2168
  else if (error instanceof SessionAuthError) {
2086
2169
  response = errorResponse(403, "forbidden", error.message);
2087
2170
  }
2171
+ else if (error instanceof InvalidAsOfError ||
2172
+ error instanceof VacuousTimeArgsError) {
2173
+ response = errorResponse(400, "invalid_request", error.message);
2174
+ }
2088
2175
  else {
2089
2176
  logger(`[agent-sdk] request failed: ${error instanceof Error
2090
2177
  ? ((_c = error.stack) !== null && _c !== void 0 ? _c : error.message)
2091
2178
  : String(error)}`);
2092
- response = errorResponse(500, "internal_error", "Internal server error.");
2179
+ const snippet = hostedErrorStackSnippet(error);
2180
+ response = errorResponse(500, "internal_error", snippet.length > 0
2181
+ ? `Internal server error: ${snippet}`
2182
+ : "Internal server error.");
2093
2183
  }
2094
2184
  }
2095
2185
  try {
@@ -9,17 +9,19 @@
9
9
  import type { SDKCustomToolResult } from "@cursor/sdk";
10
10
  import type { Meter } from "@opentelemetry/api";
11
11
  import { SlackAskDedupeStore, SlackNudgeStore } from "../channels/slack/nudge-store.js";
12
- import { type AgentProject, type ApprovalDecision, type ArtifactListFilter, type ArtifactRecord, type ArtifactsApi, type AuthContext, type CallToolOptions, type ChannelDefinition, type ChannelSession, type ConnectionTransport, type DiscoveredTool, type HostContext, type HttpChannelDefinition, type JsonValue, type PendingApproval, type ReceiveInput, type SendMessageOptions, type SessionEvent, type SessionInfo, type SessionListSource, type SessionRecord, type SessionSummary, type ToolCallOutcome, type TurnOutcome } from "../types.js";
12
+ import { type AgentProject, type ApprovalDecision, type ArtifactListFilter, type ArtifactRecord, type ArtifactsApi, type AuthContext, type CallToolOptions, type ChannelDefinition, type ChannelSession, type ConnectionTransport, type DiscoveredTool, type HostContext, type HttpChannelDefinition, type JsonValue, type PendingApproval, type PendingAuth, type ReceiveInput, type SendMessageOptions, type SessionEvent, type SessionInfo, type SessionListSource, type SessionRecord, type SessionSummary, type ToolCallOutcome, type TurnOutcome } from "../types.js";
13
13
  import { type ABSnapshot } from "./ab-snapshot.js";
14
14
  import { type CloudAgentUsage } from "./cloud-turn-cost.js";
15
15
  import { type EventLogMemoryStats } from "./event-log.js";
16
16
  import { type HostPlatforms } from "./host-platforms.js";
17
+ import { McpOauthOnDemandHub } from "./mcp-oauth-on-demand.js";
17
18
  import type { OtelCollector } from "./otel/collector.js";
18
19
  import type { AgentRunner } from "./sdk-runner.js";
19
20
  import { SessionStore } from "./session-store.js";
20
21
  import { StorageCoordinator } from "./storage-coordinator.js";
21
22
  import { type EstimateTurnCostFn } from "./turn-cost.js";
22
23
  import { TurnLeaseStore } from "./turn-lease-store.js";
24
+ import { TurnOutbox } from "./turn-outbox.js";
23
25
  export declare const HTTP_CHANNEL_ID = "http";
24
26
  export { SCHEDULE_CHANNEL_PREFIX } from "./prompt-context.js";
25
27
  export declare class SessionBusyError extends Error {
@@ -63,6 +65,12 @@ export declare class ApprovalNotFoundError extends Error {
63
65
  export declare class ApprovalInterruptedError extends Error {
64
66
  constructor(sessionId: string, callId: string);
65
67
  }
68
+ export declare class AuthNotFoundError extends Error {
69
+ constructor(sessionId: string, callId: string);
70
+ }
71
+ export declare class AuthInterruptedError extends Error {
72
+ constructor(sessionId: string, callId: string);
73
+ }
66
74
  export interface SessionEngineOptions {
67
75
  project: AgentProject;
68
76
  stateRoot: string;
@@ -117,6 +125,15 @@ export interface EngineSendOptions extends SendMessageOptions {
117
125
  */
118
126
  hostedSessionId?: string;
119
127
  }
128
+ interface AdmitTurnOptions {
129
+ admission?: "preempt" | "coalesce";
130
+ sourceTs?: string;
131
+ /**
132
+ * When true, skip `clearCoalesced` on the preempt admit path. Used by
133
+ * coalesce drain so asks that arrived during drain are not wiped.
134
+ */
135
+ retainCoalesced?: boolean;
136
+ }
120
137
  export declare class SessionEngine {
121
138
  readonly project: AgentProject;
122
139
  readonly stateRoot: string;
@@ -127,6 +144,8 @@ export declare class SessionEngine {
127
144
  readonly askDedupe: SlackAskDedupeStore;
128
145
  /** Cross-process turn ownership under `<stateRoot>/turn-leases`. */
129
146
  readonly turnLeases: TurnLeaseStore;
147
+ /** Messages for turns another server owns, under `<stateRoot>/outbox`. */
148
+ readonly outbox: TurnOutbox<AdmitTurnOptions>;
130
149
  /**
131
150
  * Runtime for `agent/storage.ts` (`defineStorage`), when
132
151
  * authored. All durable state changes funnel through it (session
@@ -147,6 +166,13 @@ export declare class SessionEngine {
147
166
  /** Sessions with a turn being admitted (before the run promise exists). */
148
167
  private readonly pendingTurns;
149
168
  private readonly activeTurns;
169
+ /**
170
+ * Sessions whose workspace a turn in this process has materialized. A
171
+ * session is busy from admit — before the governor slot and the turn's
172
+ * own materialize — so a read running alongside a turn consults this,
173
+ * not busy, to know whether the workspace is ready to be left alone.
174
+ */
175
+ private readonly materializedWorkspaces;
150
176
  /** Context used by the cloud turn's HTTP MCP callbacks. */
151
177
  private readonly activeToolContexts;
152
178
  /**
@@ -187,6 +213,9 @@ export declare class SessionEngine {
187
213
  private readonly mcpHost;
188
214
  private readonly platforms;
189
215
  private readonly approvals;
216
+ private readonly auths;
217
+ private readonly oauthHub;
218
+ private probeCursorAccount;
190
219
  private readonly abCollector;
191
220
  private readonly otel;
192
221
  private readonly otelHost;
@@ -216,6 +245,9 @@ export declare class SessionEngine {
216
245
  */
217
246
  setResolvedConnections(connections: EngineResolvedConnection[]): void;
218
247
  setCloudServerToolsConnection(connection: ConnectionTransport): void;
248
+ setMcpOauthCallbackUrl(url: string): void;
249
+ setCursorAccountAuthProbe(probe: (connection: string) => Promise<string | undefined>): void;
250
+ get oauthCallbackHub(): McpOauthOnDemandHub;
219
251
  /** Shared host services (MCP / GitHub / Slack / reminders / evals / kv / files / otel / Slack nudges). */
220
252
  get host(): HostContext;
221
253
  /**
@@ -347,6 +379,8 @@ export declare class SessionEngine {
347
379
  * when a turn was started.
348
380
  */
349
381
  private startTurn;
382
+ /** Admit what other servers handed to this turn's holder. Never awaited by the lifecycle. */
383
+ private drainOutbox;
350
384
  private enqueueCoalesced;
351
385
  private clearCoalesced;
352
386
  /**
@@ -509,6 +543,22 @@ export declare class SessionEngine {
509
543
  asSessionOwner?: boolean;
510
544
  }): Promise<PendingApproval>;
511
545
  private removePendingApproval;
546
+ private wrapMcp;
547
+ private advertiseMcp;
548
+ private withMcpListAuth;
549
+ private withMcpAuth;
550
+ private parkAndRetryMcp;
551
+ private persistHostedMcpOauth;
552
+ private authoredConnection;
553
+ private mintAuthUrl;
554
+ private parkForAuth;
555
+ private clearPendingAuths;
556
+ listPendingAuths(sessionId: string): Promise<PendingAuth[]>;
557
+ resolveAuth(sessionId: string, callId: string, decision: ApprovalDecision, auth: AuthContext | null, options?: {
558
+ asSessionOwner?: boolean;
559
+ }): Promise<PendingAuth>;
560
+ private removePendingAuth;
561
+ runWithMcpPark<T>(sessionId: string, toolName: string, fn: () => Promise<T>): Promise<T>;
512
562
  /**
513
563
  * Call an authored server tool deterministically: validate `input`
514
564
  * against the tool's schema (zod schemas validate and transform; plain
@@ -520,8 +570,10 @@ export declare class SessionEngine {
520
570
  * and materialized workspace) and the call is recorded on the session's
521
571
  * event stream as `actions.requested` / `action.result` under a
522
572
  * per-call `turnId` (the call id), so it shows up in trajectories.
523
- * Rejected with {@link SessionBusyError} while a model turn is running.
524
- * Without a session, the tool runs against an **ephemeral** scratch
573
+ * While a model turn is running, a read-effect call runs alongside it
574
+ * (the turn's workspace is read as-is) and a write-effect call is
575
+ * rejected with {@link SessionBusyError}. Without a session, the tool
576
+ * runs against an **ephemeral** scratch
525
577
  * workspace under `<stateRoot>/tool-calls/<callId>` (materialized with
526
578
  * seed files, removed after the call returns).
527
579
  *
@@ -555,6 +607,21 @@ export declare class SessionEngine {
555
607
  message: string;
556
608
  }>;
557
609
  }>;
610
+ /**
611
+ * One catalog tool by name. Authored tools are local — their schema does
612
+ * not depend on session identity or connection listings — so a detail
613
+ * fetch for `ls` must not wait on every advertised MCP server.
614
+ */
615
+ describeCatalogTool(toolName: string, options?: Pick<CallToolOptions, "auth" | "sessionId" | "continuationToken">): Promise<{
616
+ tool: DiscoveredTool;
617
+ } | {
618
+ tool: undefined;
619
+ availableTools: string[];
620
+ connectionErrors: Array<{
621
+ connection: string;
622
+ message: string;
623
+ }>;
624
+ }>;
558
625
  callTool(toolName: string, input?: unknown, options?: CallToolOptions): Promise<ToolCallOutcome>;
559
626
  /**
560
627
  * Whether a dry run answers a bridged MCP call, for the cloud host bridge —
@@ -647,6 +714,24 @@ export declare class SessionEngine {
647
714
  sessions: SessionSummary[];
648
715
  source: SessionListSource;
649
716
  }>;
717
+ /**
718
+ * The single newest session visible to `caller` (`GET /v1/sessions?latest=1`).
719
+ *
720
+ * Short-circuits the full listing: the local store already holds every
721
+ * session this host created plus the startup bulk restore, so the common
722
+ * case answers from memory without a sink round trip. Only when the local
723
+ * store has nothing for the caller (fresh host, `restore: "off"`) does it
724
+ * ask the sink — for a bounded newest-written window when the backend
725
+ * can order by write time, else the full list. A session written by
726
+ * another replica moments ago can lose to a local one; callers that need
727
+ * the exact newest row should use the full listing.
728
+ */
729
+ latestSessionWithSource(caller: AuthContext | null, options?: {
730
+ includeAll?: boolean;
731
+ }): Promise<{
732
+ sessions: SessionSummary[];
733
+ source: SessionListSource;
734
+ }>;
650
735
  /**
651
736
  * Durable sink rows plus local records (local wins on the same id when
652
737
  * newer — covers debounce windows that have not flushed yet). Newest
@@ -1 +1 @@
1
- {"version":3,"file":"session-engine.d.ts","sourceRoot":"","sources":["../../src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