@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
@@ -162,6 +162,13 @@ export interface AgentkitDeployStatus {
162
162
  status: AgentkitCustomerStatus;
163
163
  progress: AgentkitDeployProgress;
164
164
  statusMessage: string | null;
165
+ /** Why the bake failed. Null/absent unless `status` is `failed`. */
166
+ lastError?: string | null;
167
+ /**
168
+ * `owner/name` scopes the deployment's GitHub/Origin channels watch.
169
+ * Absent on control planes that predate the field.
170
+ */
171
+ repositories?: string[];
165
172
  }
166
173
  export declare const TERMINAL_AGENTKIT_DEPLOY_STATUSES: ReadonlySet<AgentkitCustomerStatus>;
167
174
  /**
@@ -234,6 +241,8 @@ export declare class AgentServeDeployClient {
234
241
  agentPath?: string;
235
242
  components?: AgentkitDeployComponent[];
236
243
  repositories?: string[];
244
+ /** Redeploy an existing Cursor-managed (multi-tenant) product. */
245
+ multiTenant?: boolean;
237
246
  }): Promise<AgentkitDeployAccepted>;
238
247
  getAgentkitDeploy(args: {
239
248
  teamId: number;
@@ -320,4 +329,12 @@ export declare class AgentServeDeployClient {
320
329
  mcpGatewayUrl(teamId: number, slug: string): string;
321
330
  private request;
322
331
  }
332
+ /**
333
+ * Inverse of {@link AgentServeDeployClient.mcpGatewayUrl}. Also accepts
334
+ * the hosted `--cloud-tools-url` form (`…/tools`).
335
+ */
336
+ export declare function parseAgentServeMcpGatewayUrl(url: string): {
337
+ teamId: number;
338
+ slug: string;
339
+ } | undefined;
323
340
  //# sourceMappingURL=deploy-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy-client.d.ts","sourceRoot":"","sources":["../../src/internal/deploy-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,GACV,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,CAAC;AAEf,sEAAsE;AACtE,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,UAAU,GACV,UAAU,CAAC;AAEf,eAAO,MAAM,wBAAwB,EAAE,WAAW,CAAC,gBAAgB,CAKjE,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,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M,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlB;IAED;;;;;OAKG;IACG,gBAAgB,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAsBxE;IAED,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEpC;IAED;;;;;OAKG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;YAEa,OAAO;CAyCtB;AAKD;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,MAAM,GACV;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAoB9C"}
@@ -110,6 +110,8 @@ const agentkitDeployStatusSchema = z
110
110
  "stopped",
111
111
  ]),
112
112
  statusMessage: z.string().nullable(),
113
+ // Optional: backends that predate the v2 bake-failure column omit it.
114
+ lastError: z.string().nullable().optional(),
113
115
  })
114
116
  .passthrough();
115
117
  const agentkitStopAcceptedSchema = z
@@ -322,17 +324,9 @@ export class AgentServeDeployClient {
322
324
  const raw = yield this.request({
323
325
  method: "POST",
324
326
  path: "/internal/agentkit/deployments",
325
- body: {
326
- teamId: args.teamId,
327
- slug: args.slug,
328
- gitRepoUrl: args.gitRepoUrl,
329
- gitRef: args.gitRef,
330
- agentPath: args.agentPath,
331
- components: args.components,
332
- repositories: args.repositories !== undefined && args.repositories.length > 0
327
+ body: Object.assign({ teamId: args.teamId, slug: args.slug, gitRepoUrl: args.gitRepoUrl, gitRef: args.gitRef, agentPath: args.agentPath, components: args.components, repositories: args.repositories !== undefined && args.repositories.length > 0
333
328
  ? args.repositories
334
- : undefined,
335
- },
329
+ : undefined }, (args.multiTenant === true ? { multiTenant: true } : {})),
336
330
  context: { verb: "deploy", slug: args.slug },
337
331
  });
338
332
  return agentkitDeployAcceptedSchema.parse(raw);
@@ -545,6 +539,33 @@ export class AgentServeDeployClient {
545
539
  });
546
540
  }
547
541
  }
542
+ const MCP_GATEWAY_PATH = /^\/internal\/agent-serve\/mcp\/(\d+)\/([^/]+)(?:\/tools)?\/?$/;
543
+ /**
544
+ * Inverse of {@link AgentServeDeployClient.mcpGatewayUrl}. Also accepts
545
+ * the hosted `--cloud-tools-url` form (`…/tools`).
546
+ */
547
+ export function parseAgentServeMcpGatewayUrl(url) {
548
+ let parsed;
549
+ try {
550
+ parsed = new URL(url);
551
+ }
552
+ catch (_a) {
553
+ return undefined;
554
+ }
555
+ const match = MCP_GATEWAY_PATH.exec(parsed.pathname);
556
+ if (match === null) {
557
+ return undefined;
558
+ }
559
+ const teamId = Number.parseInt(match[1], 10);
560
+ if (!Number.isInteger(teamId) || teamId <= 0) {
561
+ return undefined;
562
+ }
563
+ const slug = decodeURIComponent(match[2]);
564
+ if (validateDeploymentSlug(slug) !== undefined) {
565
+ return undefined;
566
+ }
567
+ return { teamId, slug };
568
+ }
548
569
  // ============================================================================
549
570
  // Error mapping (HTTP → actionable human messages)
550
571
  // ============================================================================
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Shared `.env` / `.env.local` writers for CLI commands that mint tokens.
3
+ */
4
+ /**
5
+ * Append `KEY=value` lines to an env file, replacing every existing line
6
+ * for the same key instead of appending duplicates. Creates the file when
7
+ * missing.
8
+ */
9
+ export declare function upsertEnvFile(path: string, entries: Array<{
10
+ key: string;
11
+ value: string;
12
+ }>): Promise<void>;
13
+ /**
14
+ * Ensure the agent directory's .gitignore covers .env.local (create or
15
+ * append). A bare `.env` line does not count — that pattern matches only
16
+ * the file literally named .env.
17
+ */
18
+ export declare function ensureEnvLocalGitignored(dir: string): Promise<boolean>;
19
+ //# sourceMappingURL=env-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-file.d.ts","sourceRoot":"","sources":["../../src/internal/env-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoBH;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC7C,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAe5E"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Shared `.env` / `.env.local` writers for CLI commands that mint tokens.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import { chmod, readFile, writeFile } from "node:fs/promises";
14
+ import { join } from "node:path";
15
+ function isErrnoException(error) {
16
+ return error instanceof Error && "code" in error;
17
+ }
18
+ function readOptionalFile(path) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ try {
21
+ return yield readFile(path, "utf8");
22
+ }
23
+ catch (error) {
24
+ if (isErrnoException(error) && error.code === "ENOENT") {
25
+ return "";
26
+ }
27
+ throw error;
28
+ }
29
+ });
30
+ }
31
+ /**
32
+ * Append `KEY=value` lines to an env file, replacing every existing line
33
+ * for the same key instead of appending duplicates. Creates the file when
34
+ * missing.
35
+ */
36
+ export function upsertEnvFile(path, entries) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ var _a;
39
+ const existing = yield readOptionalFile(path);
40
+ const lines = existing === "" ? [] : existing.replace(/\r?\n$/, "").split(/\r?\n/);
41
+ // A stale `export KEY=…` line would shadow or duplicate the bare line
42
+ // under some loaders; treat both spellings as the same entry.
43
+ const matchesKey = (line, key) => line.startsWith(`${key}=`) || line.startsWith(`export ${key}=`);
44
+ for (const { key, value } of entries) {
45
+ const next = `${key}=${value}`;
46
+ let replaced = false;
47
+ for (let i = 0; i < lines.length;) {
48
+ if (!matchesKey((_a = lines[i]) !== null && _a !== void 0 ? _a : "", key)) {
49
+ i += 1;
50
+ continue;
51
+ }
52
+ if (replaced) {
53
+ lines.splice(i, 1);
54
+ continue;
55
+ }
56
+ lines[i] = next;
57
+ replaced = true;
58
+ i += 1;
59
+ }
60
+ if (!replaced) {
61
+ lines.push(next);
62
+ }
63
+ }
64
+ // writeFile's mode only applies on create; clamp pre-existing files too.
65
+ yield writeFile(path, `${lines.join("\n")}\n`, { mode: 0o600 });
66
+ yield chmod(path, 0o600);
67
+ });
68
+ }
69
+ /**
70
+ * Ensure the agent directory's .gitignore covers .env.local (create or
71
+ * append). A bare `.env` line does not count — that pattern matches only
72
+ * the file literally named .env.
73
+ */
74
+ export function ensureEnvLocalGitignored(dir) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ const path = join(dir, ".gitignore");
77
+ const existing = yield readOptionalFile(path);
78
+ const covered = existing
79
+ .split(/\r?\n/)
80
+ .some((line) => /^\.env(\.local\*?|\.\*|\*)$/.test(line.trim()));
81
+ if (covered) {
82
+ return false;
83
+ }
84
+ const next = existing === "" || existing.endsWith("\n")
85
+ ? `${existing}.env.local\n`
86
+ : `${existing}\n.env.local\n`;
87
+ yield writeFile(path, next);
88
+ return true;
89
+ });
90
+ }
@@ -8,15 +8,16 @@
8
8
  * is browsable from the dashboard and mountable on cloud-runtime VMs;
9
9
  * - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
10
10
  * holds engine-owned session state — session records, event transcripts,
11
- * the continuation index, and the SDK conversation mirror — and is never
12
- * exposed to authors or models.
11
+ * hosted-execution run logs, the continuation index, and the SDK
12
+ * conversation mirror — and is never exposed to authors or models.
13
13
  *
14
14
  * This module puts framework session state on the framework store. The
15
15
  * {@link storageKeys} scheme was designed for exactly this: keys are a
16
16
  * stable versioned contract that sinks may route on, so
17
17
  * {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
18
- * kind — `session` / `session-events` / `continuation` go to the framework
19
- * file store (file-shaped; the store accepts values up to 64 MiB per
18
+ * kind — `session` / `session-events` / `session-runs` / `continuation`
19
+ * go to the framework file store (file-shaped; the store accepts values
20
+ * up to 64 MiB per
20
21
  * object without chunking, versus the KV proxy's 1 MiB row cap), while
21
22
  * author `kv`, eval runs, A/B samples, and conditional writes stay on the
22
23
  * control-plane KV proxy (the dashboard reads them there, and CAS needs a
@@ -41,21 +42,14 @@ export declare function fileSinkStorageCore(sink: FileSink): FileSinkStorageCore
41
42
  * Split one storage core by key kind: framework session state to `files`,
42
43
  * everything else to `kv`. Spread over the KV backend when building the
43
44
  * full definition so its `evals` / `abs` groups (and the cursor-hosted
44
- * marker) ride along untouched; wrap the KV `cas` group with
45
- * {@link frameworkGuardedCas} rather than spreading it as-is.
45
+ * marker) ride along untouched. A KV `cas` group must not be spread as-is:
46
+ * conditional writes run on a KV database row, so one over a `session/` or
47
+ * `continuation/` key would read and write a different store than the
48
+ * routed plain core — silent split-brain. Nothing in the package CASes
49
+ * those kinds today.
46
50
  */
47
51
  export declare function composeFrameworkStorage(input: {
48
52
  kv: FileSinkStorageCore;
49
53
  files: FileSinkStorageCore;
50
- }): FileSinkStorageCore;
51
- /**
52
- * The KV backend's conditional writes, refusing framework-file keys.
53
- *
54
- * CAS runs on the KV proxy (a database row version); the plain core routes
55
- * framework session state to the file store. A future coordination path
56
- * that CASes a `session/` or `continuation/` key would otherwise read and
57
- * write a different store than the plain path — silent split-brain. Fail
58
- * loudly instead; nothing in the package CASes those kinds today.
59
- */
60
- export declare function frameworkGuardedCas(cas: NonNullable<StorageConfig["cas"]>): NonNullable<StorageConfig["cas"]>;
54
+ }): FileSinkStorageCore & Pick<StorageConfig, "listNewest">;
61
55
  //# sourceMappingURL=framework-file-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,eAAe,CAAC;AAejE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAavD;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CACvD,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CAuDvE;AAcD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,EAAE,EAAE,mBAAmB,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,mBAAmB,CAStB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,GACrC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CA0BnC"}
1
+ {"version":3,"file":"framework-file-storage.d.ts","sourceRoot":"","sources":["../../src/internal/framework-file-storage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,eAAe,CAAC;AAgBjE;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAavD;AAED,sEAAsE;AACtE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CACxC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CACvD,CAAC;AA0BF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,mBAAmB,CAuDvE;AAcD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE;IAC7C,EAAE,EAAE,mBAAmB,CAAC;IACxB,KAAK,EAAE,mBAAmB,CAAC;CAC5B,GAAG,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAe1D"}
@@ -8,15 +8,16 @@
8
8
  * is browsable from the dashboard and mountable on cloud-runtime VMs;
9
9
  * - the **framework-level** store (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`)
10
10
  * holds engine-owned session state — session records, event transcripts,
11
- * the continuation index, and the SDK conversation mirror — and is never
12
- * exposed to authors or models.
11
+ * hosted-execution run logs, the continuation index, and the SDK
12
+ * conversation mirror — and is never exposed to authors or models.
13
13
  *
14
14
  * This module puts framework session state on the framework store. The
15
15
  * {@link storageKeys} scheme was designed for exactly this: keys are a
16
16
  * stable versioned contract that sinks may route on, so
17
17
  * {@link composeFrameworkStorage} splits one {@link StorageConfig} by key
18
- * kind — `session` / `session-events` / `continuation` go to the framework
19
- * file store (file-shaped; the store accepts values up to 64 MiB per
18
+ * kind — `session` / `session-events` / `session-runs` / `continuation`
19
+ * go to the framework file store (file-shaped; the store accepts values
20
+ * up to 64 MiB per
20
21
  * object without chunking, versus the KV proxy's 1 MiB row cap), while
21
22
  * author `kv`, eval runs, A/B samples, and conditional writes stay on the
22
23
  * control-plane KV proxy (the dashboard reads them there, and CAS needs a
@@ -44,6 +45,7 @@ import { mapBounded } from "./bounded.js";
44
45
  const FRAMEWORK_FILE_KINDS = new Set([
45
46
  "session",
46
47
  "session-events",
48
+ "session-runs",
47
49
  "continuation",
48
50
  ]);
49
51
  /**
@@ -156,8 +158,11 @@ function decodeDocument(key, bytes) {
156
158
  * Split one storage core by key kind: framework session state to `files`,
157
159
  * everything else to `kv`. Spread over the KV backend when building the
158
160
  * full definition so its `evals` / `abs` groups (and the cursor-hosted
159
- * marker) ride along untouched; wrap the KV `cas` group with
160
- * {@link frameworkGuardedCas} rather than spreading it as-is.
161
+ * marker) ride along untouched. A KV `cas` group must not be spread as-is:
162
+ * conditional writes run on a KV database row, so one over a `session/` or
163
+ * `continuation/` key would read and write a different store than the
164
+ * routed plain core — silent split-brain. Nothing in the package CASes
165
+ * those kinds today.
161
166
  */
162
167
  export function composeFrameworkStorage(input) {
163
168
  const route = (key) => isFrameworkFileKey(key) ? input.files : input.kv;
@@ -166,39 +171,11 @@ export function composeFrameworkStorage(input) {
166
171
  get: (key, ctx) => route(key).get(key, ctx),
167
172
  delete: (key, ctx) => route(key).delete(key, ctx),
168
173
  list: (prefix, ctx) => route(prefix).list(prefix, ctx),
169
- };
170
- }
171
- /**
172
- * The KV backend's conditional writes, refusing framework-file keys.
173
- *
174
- * CAS runs on the KV proxy (a database row version); the plain core routes
175
- * framework session state to the file store. A future coordination path
176
- * that CASes a `session/` or `continuation/` key would otherwise read and
177
- * write a different store than the plain path — silent split-brain. Fail
178
- * loudly instead; nothing in the package CASes those kinds today.
179
- */
180
- export function frameworkGuardedCas(cas) {
181
- const refuse = (key) => {
182
- if (isFrameworkFileKey(key)) {
183
- throw new Error(`framework file storage: conditional writes are KV-only, but "${key}" routes to the framework file store`);
184
- }
185
- };
186
- return {
187
- getWithVersion: (key, ctx) => {
188
- refuse(key);
189
- return cas.getWithVersion(key, ctx);
190
- },
191
- putIfAbsent: (key, value, ctx) => {
192
- refuse(key);
193
- return cas.putIfAbsent(key, value, ctx);
194
- },
195
- putIfVersion: (key, value, expectedVersion, ctx) => {
196
- refuse(key);
197
- return cas.putIfVersion(key, value, expectedVersion, ctx);
198
- },
199
- listKeys: (prefix, ctx) => {
200
- refuse(prefix);
201
- return cas.listKeys(prefix, ctx);
202
- },
174
+ // Session records — the only `listNewest` consumer — are framework file
175
+ // keys, and the file store has no write-time ordering. Spreading the KV
176
+ // backend's `listNewest` through would query rows that live elsewhere
177
+ // (stale KV leftovers, or nothing), so the composed core explicitly has
178
+ // none and the engine falls back to the routed `list`.
179
+ listNewest: undefined,
203
180
  };
204
181
  }
@@ -17,17 +17,19 @@
17
17
  *
18
18
  * - **Cursor-managed hosting** (the deployment-generation environment
19
19
  * variable is set, same signal that registers `GET /v1/manifest`):
20
- * the Cursor-hosted backend. When the deployment carries a
21
- * **framework-level file store**
22
- * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`), session records, event
23
- * transcripts, and the continuation index live there — file-shaped state
24
- * on file storage, apart from the author-facing user store while
25
- * `host.kv`, eval runs, A/B samples, and conditional writes stay on the
26
- * control-plane KV proxy (see framework-file-storage.ts). Without one
27
- * (a deploy predating framework-store provisioning), everything goes to
28
- * the KV proxy as before. The API key resolves through the full
29
- * credential chain on every call because hosted freeze snapshots listen
30
- * unsigned and the binder drops the key file after restore.
20
+ * the deployment's **framework-level file store**
21
+ * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`) holds session records, event
22
+ * transcripts, and the continuation index — file-shaped state on file
23
+ * storage, apart from the author-facing user store. The control-plane KV
24
+ * proxy is *not* used: it authorizes by mapping a pod service account to
25
+ * a v1 deployment row, which no v2 deployment has, so every call 403s and
26
+ * fails the delivery that read it. The KV half is inert until the proxy
27
+ * resolves v2 deployments (see null-kv-storage.ts). Without a framework
28
+ * store (a deploy predating framework-store provisioning) there is
29
+ * nothing left to mirror to, so the state root is again the only copy.
30
+ * The API key resolves through the full credential chain on every call
31
+ * because hosted freeze snapshots listen unsigned and the binder drops
32
+ * the key file after restore.
31
33
  * - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
32
34
  * is correct when the operator owns the disk.
33
35
  *
@@ -1 +1 @@
1
- {"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAMH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,8BAA8B,GACpC,iBAAiB,GAAG,SAAS,CAoD/B"}
1
+ {"version":3,"file":"framework-storage-selection.d.ts","sourceRoot":"","sources":["../../src/internal/framework-storage-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAMH,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAWrD,MAAM,WAAW,8BAA8B;IAC7C,2FAA2F;IAC3F,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACjD,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CACnD;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,8BAA8B,GACpC,iBAAiB,GAAG,SAAS,CAgE/B"}
@@ -17,17 +17,19 @@
17
17
  *
18
18
  * - **Cursor-managed hosting** (the deployment-generation environment
19
19
  * variable is set, same signal that registers `GET /v1/manifest`):
20
- * the Cursor-hosted backend. When the deployment carries a
21
- * **framework-level file store**
22
- * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`), session records, event
23
- * transcripts, and the continuation index live there — file-shaped state
24
- * on file storage, apart from the author-facing user store while
25
- * `host.kv`, eval runs, A/B samples, and conditional writes stay on the
26
- * control-plane KV proxy (see framework-file-storage.ts). Without one
27
- * (a deploy predating framework-store provisioning), everything goes to
28
- * the KV proxy as before. The API key resolves through the full
29
- * credential chain on every call because hosted freeze snapshots listen
30
- * unsigned and the binder drops the key file after restore.
20
+ * the deployment's **framework-level file store**
21
+ * (`AGENT_SERVE_FRAMEWORK_STORE_SOURCE_ID`) holds session records, event
22
+ * transcripts, and the continuation index — file-shaped state on file
23
+ * storage, apart from the author-facing user store. The control-plane KV
24
+ * proxy is *not* used: it authorizes by mapping a pod service account to
25
+ * a v1 deployment row, which no v2 deployment has, so every call 403s and
26
+ * fails the delivery that read it. The KV half is inert until the proxy
27
+ * resolves v2 deployments (see null-kv-storage.ts). Without a framework
28
+ * store (a deploy predating framework-store provisioning) there is
29
+ * nothing left to mirror to, so the state root is again the only copy.
30
+ * The API key resolves through the full credential chain on every call
31
+ * because hosted freeze snapshots listen unsigned and the binder drops
32
+ * the key file after restore.
31
33
  * - **Self-hosted**: no mirror. `--state-root` is the durable copy, which
32
34
  * is correct when the operator owns the disk.
33
35
  *
@@ -41,10 +43,12 @@
41
43
  */
42
44
  import { cursorFrameworkStoreSourceId, cursorHostedFiles, } from "../files-backends/cursor-hosted.js";
43
45
  import { defineStorage } from "../storage.js";
44
- import { cursorHostedStorage } from "../storage-backends/cursor-hosted.js";
46
+ import { CURSOR_HOSTED_STORAGE } from "../storage-backends/cursor-hosted.js";
45
47
  import { resolveApiKeySync } from "./cursor/credentials.js";
46
48
  import { AGENT_SERVE_GENERATION_ENV_VAR } from "./cursor-relay-core.js";
47
- import { composeFrameworkStorage, fileSinkStorageCore, frameworkGuardedCas, } from "./framework-file-storage.js";
49
+ import { composeFrameworkStorage, fileSinkStorageCore, } from "./framework-file-storage.js";
50
+ import { nullKvStorage } from "./null-kv-storage.js";
51
+ const cursorHostedMarker = { [CURSOR_HOSTED_STORAGE]: true };
48
52
  /**
49
53
  * Pick the backend for framework session state.
50
54
  *
@@ -74,23 +78,30 @@ export function selectFrameworkStorageDefinition(input) {
74
78
  // comes up). Follow-ups restore lazily by continuation or session id;
75
79
  // GET /v1/sessions lists from the sink either way.
76
80
  const policy = { restore: "off" };
81
+ const frameworkStoreId = cursorFrameworkStoreSourceId(env);
82
+ if (frameworkStoreId === undefined) {
83
+ // Nothing to mirror to: the KV proxy rejects v2 service accounts, so a
84
+ // definition over it would fail every delivery that reads it. The state
85
+ // root is the durable copy, as when self-hosted.
86
+ return undefined;
87
+ }
77
88
  // Full chain (env → key file → stored login): frozen engines listen
78
89
  // unsigned and bind CURSOR_API_KEY_FILE at task time, after this
79
90
  // definition is constructed.
80
91
  const resolveApiKey = () => { var _a; return (_a = resolveApiKeySync()) === null || _a === void 0 ? void 0 : _a.apiKey; };
81
- const kv = cursorHostedStorage({ resolveApiKey });
82
- const frameworkStoreId = cursorFrameworkStoreSourceId(env);
83
- if (frameworkStoreId === undefined) {
84
- return defineStorage(Object.assign({ name: "cursor-hosted", policy }, kv));
85
- }
86
- // Framework session state on the framework-level file store; author kv,
87
- // evals, and A/B tables stay on the KV proxy (spread from `kv`, which
88
- // also carries the cursor-hosted marker for GET /v1/sessions).
89
- return defineStorage(Object.assign(Object.assign(Object.assign({ name: "cursor-hosted (framework files)", policy }, kv), composeFrameworkStorage({
92
+ // Framework session state on the framework-level file store, which
93
+ // authorizes by store source id and so works for v2. Everything the KV
94
+ // proxy used to serve — author kv, eval runs, A/B samples, conditional
95
+ // writes — is inert; `defineStorage` derives the eval/A/B tables over the
96
+ // core, which means that bookkeeping reads back empty rather than 403ing.
97
+ //
98
+ // Restoring `cursorHostedStorage()` here once the proxy resolves v2
99
+ // deployments also means restoring the guard its `cas` group needs: a
100
+ // conditional write over a `session/` or `continuation/` key would run on
101
+ // the KV database while the plain core routes that key to the file store.
102
+ const kv = nullKvStorage();
103
+ return defineStorage(Object.assign(Object.assign(Object.assign({ name: "cursor-hosted (framework files)", policy }, cursorHostedMarker), kv), composeFrameworkStorage({
90
104
  kv,
91
105
  files: fileSinkStorageCore(cursorHostedFiles({ storeSourceId: frameworkStoreId, resolveApiKey })),
92
- })), {
93
- // CAS stays on the KV proxy but must refuse framework-file keys, or a
94
- // future coordination path would split-brain against the plain core.
95
- cas: frameworkGuardedCas(kv.cas) }));
106
+ })));
96
107
  }
@@ -0,0 +1,28 @@
1
+ import type { ChannelHandlerArgs } from "../types.js";
2
+ /**
3
+ * Hosted-admission hook a channel pack attaches to its definition.
4
+ *
5
+ * Hosted delivery looks this up from the mounted definition — it does not
6
+ * switch on `channelKind`. A new forge implements `dispatch` / `getOutcome`
7
+ * next to its webhook handler and calls {@link attachHostedAdmissionAdapter}
8
+ * from the channel constructor.
9
+ */
10
+ export type HostedAdmissionDispatchOutcome = "skip" | "task";
11
+ export type HostedAdmissionAdapter = {
12
+ kind: string;
13
+ /**
14
+ * Optional wrap of the capturing `send` / `waitUntil` args (GitHub uses
15
+ * this to propagate background-task errors). Identity when omitted.
16
+ */
17
+ prepareArgs?(args: ChannelHandlerArgs): ChannelHandlerArgs;
18
+ dispatch(input: {
19
+ eventType: string;
20
+ payload: unknown;
21
+ deliveryId: string;
22
+ args: ChannelHandlerArgs;
23
+ }): Promise<Response>;
24
+ getOutcome(response: Response): HostedAdmissionDispatchOutcome | undefined;
25
+ };
26
+ export declare function attachHostedAdmissionAdapter(definition: object, adapter: HostedAdmissionAdapter): void;
27
+ export declare function getHostedAdmissionAdapter(definition: object): HostedAdmissionAdapter | undefined;
28
+ //# sourceMappingURL=hosted-admission-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hosted-admission-adapter.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-admission-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,WAAW,CAAC,CAAC,IAAI,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;IAC3D,QAAQ,CAAC,KAAK,EAAE;QACd,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,kBAAkB,CAAC;KAC1B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IACtB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,8BAA8B,GAAG,SAAS,CAAC;CAC5E,CAAC;AAIF,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,sBAAsB,GAC9B,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,sBAAsB,GAAG,SAAS,CAEpC"}
@@ -0,0 +1,7 @@
1
+ const adapters = new WeakMap();
2
+ export function attachHostedAdmissionAdapter(definition, adapter) {
3
+ adapters.set(definition, adapter);
4
+ }
5
+ export function getHostedAdmissionAdapter(definition) {
6
+ return adapters.get(definition);
7
+ }
@@ -2,6 +2,13 @@ export declare const HOSTED_DELIVERY_PROTOCOL_VERSION = 2;
2
2
  export declare const HOSTED_DELIVERY_HEADER = "x-agent-sdk-hosted-delivery";
3
3
  export declare const HOSTED_ADMISSION_PATH = "/v1/internal/hosted-admission";
4
4
  export declare const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
5
+ /**
6
+ * Filename under the serve `--state-root` (not the per-slug SessionEngine
7
+ * dir). Hosted freeze uses `/workspace/.agent-serve`; the Temporal host
8
+ * reads this path after hosted-execution and logs it on the activity span.
9
+ * Must match `AGENT_SERVE_ENGINE_HOSTED_EXECUTION_DIAG_PATH` basename.
10
+ */
11
+ export declare const HOSTED_EXECUTION_DIAG_FILENAME = "hosted-execution.json";
5
12
  export type HostedAdmissionManagedAutomation = {
6
13
  automationUuid: string;
7
14
  mcpServerNames: string[];
@@ -9,7 +16,12 @@ export type HostedAdmissionManagedAutomation = {
9
16
  export type HostedAdmission = {
10
17
  v: 2;
11
18
  channelId: string;
12
- channelKind: "github";
19
+ /**
20
+ * Mailbox / subscription channel kind (`github`, `origin`, …). The guest
21
+ * resolves dispatch from the mounted definition's hosted-admission
22
+ * adapter; this field is not an allowlist.
23
+ */
24
+ channelKind: string;
13
25
  eventType: string;
14
26
  deliveryId: string;
15
27
  sessionMode: "event" | "continuation";
@@ -1 +1 @@
1
- {"version":3,"file":"hosted-delivery-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/hosted-delivery-protocol.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,sBAAsB,gCAAgC,CAAC;AACpE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AACrE,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAErE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,CAAC,CAAC;IACL,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,QAAQ,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,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,CACzC,KAAK,EAAE,OAAO,GACb,sBAAsB,GAAG,SAAS,CAkBpC"}
@@ -2,6 +2,13 @@ export const HOSTED_DELIVERY_PROTOCOL_VERSION = 2;
2
2
  export const HOSTED_DELIVERY_HEADER = "x-agent-sdk-hosted-delivery";
3
3
  export const HOSTED_ADMISSION_PATH = "/v1/internal/hosted-admission";
4
4
  export const HOSTED_EXECUTION_PATH = "/v1/internal/hosted-execution";
5
+ /**
6
+ * Filename under the serve `--state-root` (not the per-slug SessionEngine
7
+ * dir). Hosted freeze uses `/workspace/.agent-serve`; the Temporal host
8
+ * reads this path after hosted-execution and logs it on the activity span.
9
+ * Must match `AGENT_SERVE_ENGINE_HOSTED_EXECUTION_DIAG_PATH` basename.
10
+ */
11
+ export const HOSTED_EXECUTION_DIAG_FILENAME = "hosted-execution.json";
5
12
  const DELIVERY_KEYS = new Set([
6
13
  "v",
7
14
  "channelId",
@@ -56,7 +63,7 @@ export function parseHostedAdmission(value) {
56
63
  !Object.hasOwn(body, "payload") ||
57
64
  body.v !== HOSTED_DELIVERY_PROTOCOL_VERSION ||
58
65
  !boundedString(body.channelId, 128) ||
59
- body.channelKind !== "github" ||
66
+ !boundedString(body.channelKind, 128) ||
60
67
  !boundedString(body.eventType, 128) ||
61
68
  !boundedString(body.deliveryId, 256) ||
62
69
  (body.sessionMode !== "event" && body.sessionMode !== "continuation") ||