@cursor/bdk 0.2.5 → 0.2.7

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 (376) hide show
  1. package/dist/bin/agent-serve.js +55 -54
  2. package/dist/channels/github/github-channel.d.ts +4 -4
  3. package/dist/channels/github/github-channel.d.ts.map +1 -1
  4. package/dist/channels/github/github-channel.js +39 -13
  5. package/dist/channels/github/types.d.ts +6 -0
  6. package/dist/channels/github/types.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  8. package/dist/channels/slack/dispatch.js +37 -29
  9. package/dist/channels/slack/eval-directive.js +1 -1
  10. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  11. package/dist/channels/slack/external-policy.js +6 -6
  12. package/dist/channels/slack/inbound.d.ts +5 -0
  13. package/dist/channels/slack/inbound.d.ts.map +1 -1
  14. package/dist/channels/slack/inbound.js +13 -0
  15. package/dist/channels/slack/index.d.ts +3 -0
  16. package/dist/channels/slack/index.d.ts.map +1 -1
  17. package/dist/channels/slack/index.js +3 -0
  18. package/dist/channels/slack/log.d.ts +1 -1
  19. package/dist/channels/slack/log.js +1 -1
  20. package/dist/channels/slack/self-identity.d.ts +15 -0
  21. package/dist/channels/slack/self-identity.d.ts.map +1 -0
  22. package/dist/channels/slack/self-identity.js +48 -0
  23. package/dist/channels/slack/sender-name.d.ts +17 -0
  24. package/dist/channels/slack/sender-name.d.ts.map +1 -0
  25. package/dist/channels/slack/sender-name.js +87 -0
  26. package/dist/channels/slack/setup.js +1 -1
  27. package/dist/channels/slack/user-info.d.ts +15 -0
  28. package/dist/channels/slack/user-info.d.ts.map +1 -0
  29. package/dist/channels/slack/user-info.js +57 -0
  30. package/dist/docs/404.html +2 -2
  31. package/dist/docs/assets/{app.94Iu5dyD.js → app.oyjtOr3W.js} +4 -4
  32. package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +1 -0
  33. package/dist/docs/assets/chunks/{VPLocalSearchBox.DTKFDlBr.js → VPLocalSearchBox.D0P6J_UJ.js} +1 -1
  34. package/dist/docs/assets/chunks/{arc.DuzwHEeg.js → arc.B0LY1J1h.js} +1 -1
  35. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C6lyhLs0.js → architectureDiagram-Q4EWVU46.dPduLUxY.js} +1 -1
  36. package/dist/docs/assets/chunks/{baseUniq.DUNEWlY8.js → baseUniq.B_Ohm21h.js} +1 -1
  37. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CXOQGI0O.js → blockDiagram-DXYQGD6D.B4zcanaJ.js} +1 -1
  38. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.BYdPE-Oe.js → c4Diagram-AHTNJAMY.D9Iw21nx.js} +1 -1
  39. package/dist/docs/assets/chunks/channel.CRUyWDV-.js +1 -0
  40. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.YIV9HeX0.js → chunk-4BX2VUAB.DDVwRShI.js} +1 -1
  41. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BG80DEOc.js → chunk-4TB4RGXK.DsYcdn1i.js} +1 -1
  42. package/dist/docs/assets/chunks/{chunk-55IACEB6.BDKJSZQc.js → chunk-55IACEB6.BzzQvcYp.js} +1 -1
  43. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CtYnQqts.js → chunk-EDXVE4YY.BMiXZ7FX.js} +1 -1
  44. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CityOth-.js → chunk-FMBD7UC4.D_mBcLoc.js} +1 -1
  45. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CMD22CQX.js → chunk-OYMX7WX6.CMVjWVMx.js} +1 -1
  46. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.WWpc3ND0.js → chunk-QZHKN3VN.BG-FrPv9.js} +1 -1
  47. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BMg-yhj3.js → chunk-YZCP3GAM.CkFE1ap3.js} +1 -1
  48. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CG_UObcQ.js +1 -0
  49. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CG_UObcQ.js +1 -0
  50. package/dist/docs/assets/chunks/clone.NYSZ9qZN.js +1 -0
  51. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.Buu_LC5q.js → cose-bilkent-S5V4N54A.BVNnCTvY.js} +1 -1
  52. package/dist/docs/assets/chunks/{dagre-KV5264BT.DW7onj6E.js → dagre-KV5264BT.CDN5PR9l.js} +1 -1
  53. package/dist/docs/assets/chunks/{diagram-5BDNPKRD.B3NxIbEV.js → diagram-5BDNPKRD.DQRUlT-i.js} +1 -1
  54. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BJvN6Vkv.js → diagram-G4DWMVQ6.CoeblYQT.js} +1 -1
  55. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.wfRWrexs.js → diagram-MMDJMWI5.DW3ymjl0.js} +1 -1
  56. package/dist/docs/assets/chunks/{diagram-TYMM5635.7QtjSYio.js → diagram-TYMM5635.BP0uN4Jw.js} +1 -1
  57. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.jxPgDH1t.js → erDiagram-SMLLAGMA.DVFUWEn4.js} +1 -1
  58. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BhDWA-TO.js → flowDiagram-DWJPFMVM.HU-eHspv.js} +1 -1
  59. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.Ijq8iYKv.js → ganttDiagram-T4ZO3ILL.DHNhXijY.js} +1 -1
  60. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.DXpfW4YG.js → gitGraphDiagram-UUTBAWPF.DkISXcO3.js} +1 -1
  61. package/dist/docs/assets/chunks/{graph.CoPlssRl.js → graph.CCV0fuRR.js} +1 -1
  62. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.eJuv_EOz.js → infoDiagram-42DDH7IO.bgILzOoc.js} +1 -1
  63. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A._OEzenCR.js → ishikawaDiagram-UXIWVN3A.CuryXC0F.js} +1 -1
  64. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CwlTjirB.js → journeyDiagram-VCZTEJTY.BL1Pr-wu.js} +1 -1
  65. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DSp_C8cZ.js → kanban-definition-6JOO6SKY.BbGjvk4l.js} +1 -1
  66. package/dist/docs/assets/chunks/{layout.Bms9s7uB.js → layout.C4PfdldS.js} +1 -1
  67. package/dist/docs/assets/chunks/{linear.BjnmB4je.js → linear.C3xD1T6X.js} +1 -1
  68. package/dist/docs/assets/chunks/{min.CKkYlMsn.js → min.CzgRAQ9c.js} +1 -1
  69. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.T2d0vJ7X.js → mindmap-definition-QFDTVHPH.CA9rSWum.js} +1 -1
  70. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.DU0RoCvx.js → pieDiagram-DEJITSTG.B8MprgJu.js} +1 -1
  71. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.9QZjM-x0.js → quadrantDiagram-34T5L4WZ.DndDwbKT.js} +1 -1
  72. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CZpylJMd.js → requirementDiagram-MS252O5E.Zhfgwlnn.js} +1 -1
  73. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.CnFdfW95.js → sankeyDiagram-XADWPNL6.B6RRm6N5.js} +1 -1
  74. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.-jC0PP1t.js → sequenceDiagram-FGHM5R23.Bfmz-1PN.js} +1 -1
  75. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DG7yBRUU.js → stateDiagram-FHFEXIEX.gbrdNqgj.js} +1 -1
  76. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DOOmulfQ.js +1 -0
  77. package/dist/docs/assets/chunks/{theme.B3O9koXV.js → theme.gpWjytMh.js} +2 -2
  78. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bf9u4Ebb.js → timeline-definition-GMOUNBTQ.Bl1l7M1f.js} +1 -1
  79. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BjhbbYE6.js → vennDiagram-DHZGUBPP.Dfle4U0d.js} +1 -1
  80. package/dist/docs/assets/chunks/wardley-RL74JXVD.BJrCW6xc.js +162 -0
  81. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.8fRb4Nb5.js → wardleyDiagram-NUSXRM2D.CM_4lmvZ.js} +1 -1
  82. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DoOP3zZM.js → xychartDiagram-5P7HB3ND.CHT5X28R.js} +1 -1
  83. package/dist/docs/assets/{evals.md.LRCSn6Ik.js → evals.md.C851kViu.js} +1 -1
  84. package/dist/docs/assets/{reference_cli.md.BsgDqYPh.js → reference_cli.md.GwugN3n-.js} +5 -5
  85. package/dist/docs/assets/reference_cli.md.GwugN3n-.lean.js +1 -0
  86. package/dist/docs/assets/{templates_agentic-owners.md.vtjfwxbf.js → templates_agentic-owners.md.CvmABtia.js} +1 -1
  87. package/dist/docs/assets/{templates_agentic-owners.md.vtjfwxbf.lean.js → templates_agentic-owners.md.CvmABtia.lean.js} +1 -1
  88. package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.js → templates_security-reviewer.md.Gh6EF9Us.js} +3 -2
  89. package/dist/docs/assets/{templates_security-reviewer.md.CX9l9bcg.lean.js → templates_security-reviewer.md.Gh6EF9Us.lean.js} +1 -1
  90. package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.js → templates_thermo-quality-review.md.B77UyTrX.js} +1 -1
  91. package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.js → templates_thermo-review.md.DRJ7mC5U.js} +1 -1
  92. package/dist/docs/assets/{templates_triage.md.BFlQhWXf.js → templates_triage.md.CNN6b0JZ.js} +3 -3
  93. package/dist/docs/assets/{templates_triage.md.BFlQhWXf.lean.js → templates_triage.md.CNN6b0JZ.lean.js} +1 -1
  94. package/dist/docs/building-with-agents.html +35 -35
  95. package/dist/docs/deployment.html +35 -35
  96. package/dist/docs/evals.html +37 -37
  97. package/dist/docs/evals.md +2 -2
  98. package/dist/docs/guides/agent-to-agent.html +35 -35
  99. package/dist/docs/guides/bitbucket.html +35 -35
  100. package/dist/docs/guides/cloud-agents.html +35 -35
  101. package/dist/docs/guides/convert-automation.html +35 -35
  102. package/dist/docs/guides/github.html +35 -35
  103. package/dist/docs/guides/gitlab.html +35 -35
  104. package/dist/docs/guides/grokbot-agents.html +35 -35
  105. package/dist/docs/guides/hooks.html +35 -35
  106. package/dist/docs/guides/improve.html +35 -35
  107. package/dist/docs/guides/jev.html +35 -35
  108. package/dist/docs/guides/mcp-oauth.html +35 -35
  109. package/dist/docs/guides/opentelemetry.html +35 -35
  110. package/dist/docs/guides/slack.html +35 -35
  111. package/dist/docs/guides/webhooks.html +35 -35
  112. package/dist/docs/hashmap.json +1 -1
  113. package/dist/docs/hillclimbing.html +35 -35
  114. package/dist/docs/index.html +35 -35
  115. package/dist/docs/llms-full.txt +41 -24
  116. package/dist/docs/quickstart.html +35 -35
  117. package/dist/docs/reference/agent-config.html +35 -35
  118. package/dist/docs/reference/artifacts.html +35 -35
  119. package/dist/docs/reference/channels.html +35 -35
  120. package/dist/docs/reference/cli.html +39 -39
  121. package/dist/docs/reference/cli.md +20 -9
  122. package/dist/docs/reference/connections.html +35 -35
  123. package/dist/docs/reference/evals.html +35 -35
  124. package/dist/docs/reference/extensions.html +35 -35
  125. package/dist/docs/reference/hooks.html +35 -35
  126. package/dist/docs/reference/http-api.html +35 -35
  127. package/dist/docs/reference/instructions.html +35 -35
  128. package/dist/docs/reference/playground.html +35 -35
  129. package/dist/docs/reference/project-layout.html +35 -35
  130. package/dist/docs/reference/prompt.html +35 -35
  131. package/dist/docs/reference/schedules.html +35 -35
  132. package/dist/docs/reference/sessions.html +35 -35
  133. package/dist/docs/reference/skills.html +35 -35
  134. package/dist/docs/reference/subagents.html +35 -35
  135. package/dist/docs/reference/tools.html +35 -35
  136. package/dist/docs/templates/agentic-owners.html +37 -37
  137. package/dist/docs/templates/agentic-owners.md +2 -0
  138. package/dist/docs/templates/grokbot-agents.html +35 -35
  139. package/dist/docs/templates/security-reviewer.html +38 -37
  140. package/dist/docs/templates/security-reviewer.md +7 -8
  141. package/dist/docs/templates/thermo-quality-review.html +37 -37
  142. package/dist/docs/templates/thermo-quality-review.md +2 -2
  143. package/dist/docs/templates/thermo-review.html +37 -37
  144. package/dist/docs/templates/thermo-review.md +2 -2
  145. package/dist/docs/templates/triage.html +38 -38
  146. package/dist/docs/templates/triage.md +6 -1
  147. package/dist/docs/troubleshooting.html +35 -35
  148. package/dist/evals.d.ts +2 -2
  149. package/dist/extensions/cursor-cloud-agents/extension.d.ts +14 -0
  150. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  151. package/dist/extensions/cursor-cloud-agents/extension.js +5 -0
  152. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
  153. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
  154. package/dist/extensions/cursor-cloud-agents/lib/watch.js +99 -0
  155. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
  156. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
  157. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +71 -0
  158. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +9 -5
  159. package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -1
  160. package/dist/extensions/cursor-cloud-agents/tools/cancel.js +3 -1
  161. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  162. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -2
  163. package/dist/extensions.d.ts +1 -1
  164. package/dist/extensions.js +1 -1
  165. package/dist/files-backends/cursor-hosted.d.ts +22 -83
  166. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  167. package/dist/files-backends/cursor-hosted.js +46 -160
  168. package/dist/files.d.ts +9 -32
  169. package/dist/files.d.ts.map +1 -1
  170. package/dist/files.js +7 -32
  171. package/dist/internal/artifacts-store.d.ts +13 -25
  172. package/dist/internal/artifacts-store.d.ts.map +1 -1
  173. package/dist/internal/artifacts-store.js +25 -46
  174. package/dist/internal/cli-ax.d.ts +10 -17
  175. package/dist/internal/cli-ax.d.ts.map +1 -1
  176. package/dist/internal/cli-ax.js +92 -153
  177. package/dist/internal/cli-bitbucket.js +5 -5
  178. package/dist/internal/cli-deploy.d.ts +4 -1
  179. package/dist/internal/cli-deploy.d.ts.map +1 -1
  180. package/dist/internal/cli-deploy.js +117 -20
  181. package/dist/internal/cli-github.js +13 -13
  182. package/dist/internal/cli-gitlab.js +5 -5
  183. package/dist/internal/continuation-identity.d.ts +2 -0
  184. package/dist/internal/continuation-identity.d.ts.map +1 -1
  185. package/dist/internal/continuation-identity.js +4 -0
  186. package/dist/internal/conversation-mirror.d.ts +9 -38
  187. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  188. package/dist/internal/conversation-mirror.js +62 -68
  189. package/dist/internal/cursor/account-mcp.d.ts +1 -1
  190. package/dist/internal/cursor/account-mcp.js +1 -1
  191. package/dist/internal/cursor/backend-client.js +1 -1
  192. package/dist/internal/cursor/github-credentials.js +3 -3
  193. package/dist/internal/cursor/hosted-bound-secrets.d.ts +6 -2
  194. package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -1
  195. package/dist/internal/cursor/hosted-bound-secrets.js +13 -2
  196. package/dist/internal/cursor/hosted-store-secrets.d.ts +13 -37
  197. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  198. package/dist/internal/cursor/hosted-store-secrets.js +13 -37
  199. package/dist/internal/cursor/store-api-client.d.ts +17 -39
  200. package/dist/internal/cursor/store-api-client.d.ts.map +1 -1
  201. package/dist/internal/cursor/store-api-client.js +15 -37
  202. package/dist/internal/cursor-deployment-relay.js +3 -3
  203. package/dist/internal/cursor-event-relay.js +1 -1
  204. package/dist/internal/cursor-relay-core.d.ts +1 -1
  205. package/dist/internal/cursor-relay-core.d.ts.map +1 -1
  206. package/dist/internal/deploy-client.d.ts +55 -63
  207. package/dist/internal/deploy-client.d.ts.map +1 -1
  208. package/dist/internal/deploy-client.js +48 -28
  209. package/dist/internal/discovery/agent.d.ts +1 -1
  210. package/dist/internal/discovery/agent.d.ts.map +1 -1
  211. package/dist/internal/discovery/agent.js +4 -0
  212. package/dist/internal/discovery/extensions.d.ts +2 -1
  213. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  214. package/dist/internal/discovery/extensions.js +11 -1
  215. package/dist/internal/discovery/project.d.ts.map +1 -1
  216. package/dist/internal/discovery/project.js +1 -0
  217. package/dist/internal/distribution.d.ts +2 -2
  218. package/dist/internal/distribution.d.ts.map +1 -1
  219. package/dist/internal/distribution.js +2 -2
  220. package/dist/internal/docs-site.js +3 -3
  221. package/dist/internal/eval-run-store.js +8 -8
  222. package/dist/internal/eval-runner.js +7 -4
  223. package/dist/internal/framework-file-storage.d.ts +10 -34
  224. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  225. package/dist/internal/framework-file-storage.js +12 -39
  226. package/dist/internal/framework-storage-selection.d.ts +10 -46
  227. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  228. package/dist/internal/framework-storage-selection.js +15 -64
  229. package/dist/internal/github-fanout.js +2 -2
  230. package/dist/internal/handleAgentServeTrigger.d.ts +5 -8
  231. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
  232. package/dist/internal/handleAgentServeTrigger.js +5 -8
  233. package/dist/internal/host-files.js +6 -9
  234. package/dist/internal/host-platforms.js +5 -5
  235. package/dist/internal/hosted-catch.d.ts +3 -2
  236. package/dist/internal/hosted-catch.d.ts.map +1 -1
  237. package/dist/internal/hosted-catch.js +27 -9
  238. package/dist/internal/hosted-delivery-protocol.d.ts +31 -8
  239. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  240. package/dist/internal/hosted-delivery-protocol.js +102 -1
  241. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  242. package/dist/internal/hosted-delivery.js +32 -12
  243. package/dist/internal/hosted-execution-diag.d.ts +13 -24
  244. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  245. package/dist/internal/hosted-execution-diag.js +11 -20
  246. package/dist/internal/hosted-execution-flush.d.ts +22 -10
  247. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  248. package/dist/internal/hosted-execution-flush.js +45 -9
  249. package/dist/internal/hosted-managed-automation.js +5 -5
  250. package/dist/internal/hosting.d.ts +5 -10
  251. package/dist/internal/hosting.d.ts.map +1 -1
  252. package/dist/internal/hosting.js +5 -10
  253. package/dist/internal/init-interview.d.ts +0 -1
  254. package/dist/internal/init-interview.d.ts.map +1 -1
  255. package/dist/internal/init-interview.js +15 -24
  256. package/dist/internal/listen-port.js +1 -1
  257. package/dist/internal/local-control-plane.js +6 -6
  258. package/dist/internal/logs-client.d.ts +20 -1
  259. package/dist/internal/logs-client.d.ts.map +1 -1
  260. package/dist/internal/logs-client.js +89 -1
  261. package/dist/internal/mcp-endpoint.js +1 -1
  262. package/dist/internal/otel/collector.js +1 -1
  263. package/dist/internal/otel/runtime.js +13 -13
  264. package/dist/internal/platform-schedule-sync.js +2 -2
  265. package/dist/internal/platform-timers.d.ts +8 -1
  266. package/dist/internal/platform-timers.d.ts.map +1 -1
  267. package/dist/internal/platform-timers.js +10 -2
  268. package/dist/internal/playground/toolchain.js +6 -6
  269. package/dist/internal/process-memory-telemetry.js +2 -2
  270. package/dist/internal/reminder-control-plane-protocol.d.ts +8 -1
  271. package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
  272. package/dist/internal/reminder-runner.d.ts +13 -3
  273. package/dist/internal/reminder-runner.d.ts.map +1 -1
  274. package/dist/internal/reminder-runner.js +78 -53
  275. package/dist/internal/resolve-prod-target.d.ts +1 -9
  276. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  277. package/dist/internal/resolve-prod-target.js +1 -30
  278. package/dist/internal/resolved-connections.js +8 -8
  279. package/dist/internal/run-client.d.ts +11 -1
  280. package/dist/internal/run-client.d.ts.map +1 -1
  281. package/dist/internal/run-client.js +197 -59
  282. package/dist/internal/runtime-dispatch-runner.d.ts +1 -0
  283. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  284. package/dist/internal/runtime-dispatch-runner.js +7 -1
  285. package/dist/internal/schedule-runner.js +1 -1
  286. package/dist/internal/sdk-runner.d.ts +4 -0
  287. package/dist/internal/sdk-runner.d.ts.map +1 -1
  288. package/dist/internal/sdk-runner.js +37 -22
  289. package/dist/internal/server.d.ts +8 -0
  290. package/dist/internal/server.d.ts.map +1 -1
  291. package/dist/internal/server.js +58 -45
  292. package/dist/internal/session-engine.d.ts +31 -44
  293. package/dist/internal/session-engine.d.ts.map +1 -1
  294. package/dist/internal/session-engine.js +67 -83
  295. package/dist/internal/session-links.d.ts.map +1 -1
  296. package/dist/internal/session-links.js +8 -7
  297. package/dist/internal/session-run-log.d.ts +10 -24
  298. package/dist/internal/session-run-log.d.ts.map +1 -1
  299. package/dist/internal/session-run-log.js +13 -27
  300. package/dist/internal/sessions-client.d.ts +1 -0
  301. package/dist/internal/sessions-client.d.ts.map +1 -1
  302. package/dist/internal/sessions-client.js +8 -3
  303. package/dist/internal/skills-sync.d.ts +3 -5
  304. package/dist/internal/skills-sync.d.ts.map +1 -1
  305. package/dist/internal/skills-sync.js +3 -5
  306. package/dist/internal/start-log-store.d.ts +7 -18
  307. package/dist/internal/start-log-store.d.ts.map +1 -1
  308. package/dist/internal/start-log-store.js +47 -24
  309. package/dist/internal/storage-coordinator.d.ts +7 -10
  310. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  311. package/dist/internal/storage-coordinator.js +18 -20
  312. package/dist/internal/storage-roles.d.ts +5 -0
  313. package/dist/internal/storage-roles.d.ts.map +1 -1
  314. package/dist/internal/store-api-protocol.d.ts +12 -33
  315. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  316. package/dist/internal/store-api-protocol.js +6 -22
  317. package/dist/internal/store-mirror.d.ts +4 -5
  318. package/dist/internal/store-mirror.d.ts.map +1 -1
  319. package/dist/internal/store-mirror.js +6 -8
  320. package/dist/internal/turn-lease-store.d.ts +12 -5
  321. package/dist/internal/turn-lease-store.d.ts.map +1 -1
  322. package/dist/internal/turn-lease-store.js +61 -8
  323. package/dist/internal/v2-hosting.d.ts +4 -7
  324. package/dist/internal/v2-hosting.d.ts.map +1 -1
  325. package/dist/internal/v2-hosting.js +4 -7
  326. package/dist/internal/workspace-sync.d.ts +3 -6
  327. package/dist/internal/workspace-sync.d.ts.map +1 -1
  328. package/dist/internal/workspace-sync.js +3 -6
  329. package/dist/internal/workspace.d.ts +10 -16
  330. package/dist/internal/workspace.d.ts.map +1 -1
  331. package/dist/internal/workspace.js +9 -14
  332. package/dist/memory.d.ts +17 -43
  333. package/dist/memory.d.ts.map +1 -1
  334. package/dist/memory.js +34 -80
  335. package/dist/playground/assets/index-DPKLl4C_.css +1 -0
  336. package/dist/playground/assets/index-MijLHTbB.js +71 -0
  337. package/dist/playground/index.html +2 -2
  338. package/dist/storage-backends/cursor-hosted-v2.d.ts +8 -36
  339. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
  340. package/dist/storage-backends/cursor-hosted-v2.js +9 -37
  341. package/dist/storage-backends/cursor-hosted.d.ts +17 -30
  342. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  343. package/dist/storage-backends/cursor-hosted.js +14 -27
  344. package/dist/storage-protocol.d.ts +13 -38
  345. package/dist/storage-protocol.d.ts.map +1 -1
  346. package/dist/storage-protocol.js +14 -39
  347. package/dist/types.d.ts +29 -30
  348. package/dist/types.d.ts.map +1 -1
  349. package/docs/evals.md +2 -2
  350. package/docs/reference/cli.md +20 -9
  351. package/docs/templates/agentic-owners.md +2 -0
  352. package/docs/templates/security-reviewer.md +7 -8
  353. package/docs/templates/thermo-quality-review.md +2 -2
  354. package/docs/templates/thermo-review.md +2 -2
  355. package/docs/templates/triage.md +6 -1
  356. package/package.json +1 -1
  357. package/templates/agents-md/evals/agents.eval.ts +1 -0
  358. package/templates/code-wiki/bot/instructions.md +4 -4
  359. package/templates/pr-autofixer/bot/instructions.md +3 -3
  360. package/templates/security-reviewer/README.md +5 -3
  361. package/templates/security-reviewer/bot/tools/post_findings.ts +8 -8
  362. package/templates/thermo-quality-review/bot/tools/post_findings.ts +8 -8
  363. package/templates/thermo-review/bot/tools/post_findings.ts +8 -8
  364. package/dist/docs/assets/chunks/@localSearchIndexroot.BITLoOQa.js +0 -1
  365. package/dist/docs/assets/chunks/channel.B46uXH41.js +0 -1
  366. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.0cmCFsSf.js +0 -1
  367. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.0cmCFsSf.js +0 -1
  368. package/dist/docs/assets/chunks/clone.1vTOFZT1.js +0 -1
  369. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CbsZcOOu.js +0 -1
  370. package/dist/docs/assets/chunks/wardley-RL74JXVD.DEA21akR.js +0 -162
  371. package/dist/docs/assets/reference_cli.md.BsgDqYPh.lean.js +0 -1
  372. package/dist/playground/assets/index-6BbTPnaT.css +0 -1
  373. package/dist/playground/assets/index-CI7FAmOP.js +0 -71
  374. /package/dist/docs/assets/{evals.md.LRCSn6Ik.lean.js → evals.md.C851kViu.lean.js} +0 -0
  375. /package/dist/docs/assets/{templates_thermo-quality-review.md.95qmTmr1.lean.js → templates_thermo-quality-review.md.B77UyTrX.lean.js} +0 -0
  376. /package/dist/docs/assets/{templates_thermo-review.md.DQh6Q0C-.lean.js → templates_thermo-review.md.DRJ7mC5U.lean.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Mirror an authored file tree onto an Agent Store prefix. Shared by the
2
+ * Mirror an authored file tree onto a durable storage prefix. Shared by the
3
3
  * skills, workspace seed, and session workspaceFile syncs so they keep the
4
4
  * same write-then-sweep discipline and the same path refusals.
5
5
  */
@@ -19,11 +19,10 @@ export declare function mirrorToStore(args: {
19
19
  }): Promise<void>;
20
20
  /**
21
21
  * Same refusals as local materialization's `resolveInside`: a rel that
22
- * escapes its directory or would not round-trip through the FUSE mount
22
+ * escapes its directory or cannot round-trip through managed storage
23
23
  * (`..`, `.`, `//`, absolute) fails the sync, exactly as it fails a local
24
- * turn's workspace write. Backslashes are refused too — the store
25
- * normalizes `\` to `/` on write, so the stored key would differ from the
26
- * desired one and the stale pass would delete the file it just wrote.
24
+ * workspace write. Backslashes are refused because storage normalizes path
25
+ * separators, which would change the desired key.
27
26
  */
28
27
  export declare function storeRelPath(relPath: string, what: "skill file" | "workspace file"): string;
29
28
  //# sourceMappingURL=store-mirror.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store-mirror.d.ts","sourceRoot":"","sources":["../../src/internal/store-mirror.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,gHAAgH;IAChH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,MAAM,CAY3F"}
1
+ {"version":3,"file":"store-mirror.d.ts","sourceRoot":"","sources":["../../src/internal/store-mirror.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/D;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACzC,gHAAgH;IAChH,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC,GAAG,OAAO,CAAC,IAAI,CAAC,CAahB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,MAAM,CAY3F"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Mirror an authored file tree onto an Agent Store prefix. Shared by the
2
+ * Mirror an authored file tree onto a durable storage prefix. Shared by the
3
3
  * skills, workspace seed, and session workspaceFile syncs so they keep the
4
4
  * same write-then-sweep discipline and the same path refusals.
5
5
  */
@@ -33,11 +33,10 @@ export function mirrorToStore(args) {
33
33
  }
34
34
  /**
35
35
  * Same refusals as local materialization's `resolveInside`: a rel that
36
- * escapes its directory or would not round-trip through the FUSE mount
36
+ * escapes its directory or cannot round-trip through managed storage
37
37
  * (`..`, `.`, `//`, absolute) fails the sync, exactly as it fails a local
38
- * turn's workspace write. Backslashes are refused too — the store
39
- * normalizes `\` to `/` on write, so the stored key would differ from the
40
- * desired one and the stale pass would delete the file it just wrote.
38
+ * workspace write. Backslashes are refused because storage normalizes path
39
+ * separators, which would change the desired key.
41
40
  */
42
41
  export function storeRelPath(relPath, what) {
43
42
  if (relPath.includes("\0") ||
@@ -51,9 +50,8 @@ export function storeRelPath(relPath, what) {
51
50
  return relPath;
52
51
  }
53
52
  /**
54
- * Last writer wins. A raced conditional put (dual engine pods during a
55
- * deploy rollover) clears the sink's cached etag, so one retry re-learns
56
- * the current version and lands.
53
+ * Last writer wins. A raced conditional put clears the sink's cached etag,
54
+ * so one retry re-learns the current version and lands.
57
55
  */
58
56
  function putLastWriterWins(sink, key, body) {
59
57
  return __awaiter(this, void 0, void 0, function* () {
@@ -2,11 +2,11 @@
2
2
  * Durable per-session turn ownership: `activeTurns` is in-memory, so servers
3
3
  * sharing a state root would otherwise both run the same session.
4
4
  *
5
- * Exclusion, staleness and liveness refresh come from `proper-lockfile`, which
6
- * the monorepo already uses for the git cache. Hand-rolling them means
7
- * inferring that a process died — timeouts, heartbeats, and a takeover path
8
- * that has to stay atomic while removing another owner's claim. That is where
9
- * the subtle races live, and none of it is specific to turns.
5
+ * Exclusion and liveness refresh come from `proper-lockfile`, which the
6
+ * monorepo already uses for the git cache. Taking an abandoned lock over is
7
+ * handled here, because the library does it by removing the stale lock and
8
+ * then creating its own, and contenders that interleave those two steps each
9
+ * come away holding the session.
10
10
  *
11
11
  * Liveness is lock age, not pid: containers have separate PID namespaces.
12
12
  */
@@ -32,6 +32,13 @@ export declare class TurnLeaseStore {
32
32
  * of answering alongside its successor.
33
33
  */
34
34
  acquire(sessionId: string, onCompromised?: () => void): Promise<TurnLease | undefined>;
35
+ /**
36
+ * Clear an abandoned lock, leaving a claim itself a single atomic `mkdir`.
37
+ * Only the contender holding the takeover removes anything, and no claim can
38
+ * land on an occupied path meanwhile, so the rest just race that `mkdir`.
39
+ */
40
+ private evictStaleLock;
41
+ private isStale;
35
42
  private handle;
36
43
  /** Graceful shutdown: drop every claim so a successor need not wait it out. */
37
44
  releaseAll(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"turn-lease-store.d.ts","sourceRoot":"","sources":["../../src/internal/turn-lease-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,kDAAkD;AAClD,MAAM,WAAW,SAAS;IACxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAmBD,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC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AAO;IAKrB,OAAO,CAAC,MAAM;IAwBd,+EAA+E;IACzE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAKhC;IAED;;;OAGG;IACG,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAY1D;CACF"}
@@ -2,11 +2,11 @@
2
2
  * Durable per-session turn ownership: `activeTurns` is in-memory, so servers
3
3
  * sharing a state root would otherwise both run the same session.
4
4
  *
5
- * Exclusion, staleness and liveness refresh come from `proper-lockfile`, which
6
- * the monorepo already uses for the git cache. Hand-rolling them means
7
- * inferring that a process died — timeouts, heartbeats, and a takeover path
8
- * that has to stay atomic while removing another owner's claim. That is where
9
- * the subtle races live, and none of it is specific to turns.
5
+ * Exclusion and liveness refresh come from `proper-lockfile`, which the
6
+ * monorepo already uses for the git cache. Taking an abandoned lock over is
7
+ * handled here, because the library does it by removing the stale lock and
8
+ * then creating its own, and contenders that interleave those two steps each
9
+ * come away holding the session.
10
10
  *
11
11
  * Liveness is lock age, not pid: containers have separate PID namespaces.
12
12
  */
@@ -19,9 +19,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
19
  step((generator = generator.apply(thisArg, _arguments || [])).next());
20
20
  });
21
21
  };
22
- import { mkdir } from "node:fs/promises";
22
+ import { randomUUID } from "node:crypto";
23
+ import { mkdir, rename, rm, stat } from "node:fs/promises";
23
24
  import { join } from "node:path";
24
25
  import * as lockfile from "proper-lockfile";
26
+ /** Long enough that the library never runs its own takeover. */
27
+ const NEVER_STALE_MS = 365 * 24 * 60 * 60000;
25
28
  /** Reject path traversal; session ids are opaque strings from the caller. */
26
29
  function safeKey(sessionId) {
27
30
  const sanitized = sessionId
@@ -60,12 +63,14 @@ export class TurnLeaseStore {
60
63
  return this.handle(sessionId);
61
64
  }
62
65
  yield mkdir(this.dir, { recursive: true });
66
+ const path = this.path(sessionId);
67
+ yield this.evictStaleLock(path);
63
68
  let release;
64
69
  try {
65
- release = yield lockfile.lock(this.path(sessionId), {
70
+ release = yield lockfile.lock(path, {
66
71
  realpath: false,
67
72
  retries: 0,
68
- stale: this.staleMs,
73
+ stale: NEVER_STALE_MS,
69
74
  // How often the library refreshes the lock's mtime while we hold it.
70
75
  update: 5000,
71
76
  onCompromised: () => {
@@ -84,6 +89,54 @@ export class TurnLeaseStore {
84
89
  return this.handle(sessionId);
85
90
  });
86
91
  }
92
+ /**
93
+ * Clear an abandoned lock, leaving a claim itself a single atomic `mkdir`.
94
+ * Only the contender holding the takeover removes anything, and no claim can
95
+ * land on an occupied path meanwhile, so the rest just race that `mkdir`.
96
+ */
97
+ evictStaleLock(path) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ // proper-lockfile's own naming for the lock it creates.
100
+ const lockPath = `${path}.lock`;
101
+ if (!(yield this.isStale(lockPath))) {
102
+ return;
103
+ }
104
+ const takeoverPath = `${path}.takeover`;
105
+ if (yield this.isStale(takeoverPath)) {
106
+ // Left by a process that died mid-takeover. Grabbing it by rename admits
107
+ // one clearer, where checking and then removing would admit several.
108
+ const abandoned = `${takeoverPath}.${randomUUID()}`;
109
+ try {
110
+ yield rename(takeoverPath, abandoned);
111
+ }
112
+ catch (_a) {
113
+ return;
114
+ }
115
+ yield rm(abandoned, { recursive: true, force: true });
116
+ }
117
+ try {
118
+ yield mkdir(takeoverPath);
119
+ }
120
+ catch (_b) {
121
+ return;
122
+ }
123
+ try {
124
+ // A successor may have claimed the session while this contender queued.
125
+ if (yield this.isStale(lockPath)) {
126
+ yield rm(lockPath, { recursive: true, force: true });
127
+ }
128
+ }
129
+ finally {
130
+ yield rm(takeoverPath, { recursive: true, force: true });
131
+ }
132
+ });
133
+ }
134
+ isStale(lockPath) {
135
+ return __awaiter(this, void 0, void 0, function* () {
136
+ const entry = yield stat(lockPath).catch(() => undefined);
137
+ return entry !== undefined && entry.mtimeMs < Date.now() - this.staleMs;
138
+ });
139
+ }
87
140
  handle(sessionId) {
88
141
  let released = false;
89
142
  return {
@@ -1,10 +1,8 @@
1
1
  import type { AgentArchitecture } from "../types.js";
2
2
  import { type CursorManagedV2StoreIds } from "./cursor/hosted-store-secrets.js";
3
3
  /**
4
- * Exported (as `1`) by the control plane's start script for a version
5
- * container of a persistent deployment. Its presence, not the agent's
6
- * `persistent` flag, is what tells the runtime it owns a durable state
7
- * directory.
4
+ * Platform-managed marker for persistent hosting. Its presence tells the
5
+ * runtime the host provides a durable state directory.
8
6
  */
9
7
  export declare const AGENT_SERVE_PERSISTENT_ENV_VAR = "AGENT_SERVE_PERSISTENT";
10
8
  export type AgentV2Hosting = {
@@ -20,9 +18,8 @@ export type AgentV2Hosting = {
20
18
  /**
21
19
  * Close the architecture/hosting inputs into a compiler-owned union.
22
20
  *
23
- * Managed freeze processes exist before task bind, so store resolution stays
24
- * lazy. Consumers can branch once on `kind`; managed storage operations then
25
- * receive a resolver whose successful result always contains both ids.
21
+ * Managed storage resolution stays lazy. Consumers branch once on `kind`,
22
+ * and a successful managed resolver always returns both storage identities.
26
23
  */
27
24
  export declare function resolveAgentV2Hosting(input: {
28
25
  architecture: AgentArchitecture | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"v2-hosting.d.ts","sourceRoot":"","sources":["../../src/internal/v2-hosting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,kCAAkC,CAAC;AAG1C;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AAEvE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,uBAAuB,CAAC;CAChD,GACD;IACE,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEN;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,GAAG,cAAc,CAejB"}
1
+ {"version":3,"file":"v2-hosting.d.ts","sourceRoot":"","sources":["../../src/internal/v2-hosting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,kCAAkC,CAAC;AAG1C;;;GAGG;AACH,eAAO,MAAM,8BAA8B,2BAA2B,CAAC;AAEvE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,eAAe,EAAE,MAAM,uBAAuB,CAAC;CAChD,GACD;IACE,IAAI,EAAE,2BAA2B,CAAC;CACnC,CAAC;AAEN;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB,GAAG,cAAc,CAejB"}
@@ -1,18 +1,15 @@
1
1
  import { requireCursorManagedV2StoreIdsSync, } from "./cursor/hosted-store-secrets.js";
2
2
  import { AGENT_SERVE_GENERATION_ENV_VAR } from "./cursor-relay-core.js";
3
3
  /**
4
- * Exported (as `1`) by the control plane's start script for a version
5
- * container of a persistent deployment. Its presence, not the agent's
6
- * `persistent` flag, is what tells the runtime it owns a durable state
7
- * directory.
4
+ * Platform-managed marker for persistent hosting. Its presence tells the
5
+ * runtime the host provides a durable state directory.
8
6
  */
9
7
  export const AGENT_SERVE_PERSISTENT_ENV_VAR = "AGENT_SERVE_PERSISTENT";
10
8
  /**
11
9
  * Close the architecture/hosting inputs into a compiler-owned union.
12
10
  *
13
- * Managed freeze processes exist before task bind, so store resolution stays
14
- * lazy. Consumers can branch once on `kind`; managed storage operations then
15
- * receive a resolver whose successful result always contains both ids.
11
+ * Managed storage resolution stays lazy. Consumers branch once on `kind`,
12
+ * and a successful managed resolver always returns both storage identities.
16
13
  */
17
14
  export function resolveAgentV2Hosting(input) {
18
15
  var _a;
@@ -1,10 +1,7 @@
1
1
  /**
2
- * Sync workspace trees onto an Agent Store so cloud-runtime turns read
3
- * them from the store mount. Authored `agent/sandbox/workspace/**` seeds
4
- * land at store-root `workspace/<path>` (see `buildCloudWorkspaceSection`).
5
- * Per-turn `workspaceFiles` land at `sessions/<sessionId>/workspace/<path>`
6
- * (see `buildCloudSessionWorkspaceSection`). Personal-key local+cloud
7
- * nests both under `agent-serve/<agent>/`.
2
+ * Sync authored workspace trees to cloud-turn storage. Project seeds and
3
+ * per-turn `workspaceFiles` use separate deployment and session scopes.
4
+ * User-scoped storage also namespaces both by agent.
8
5
  */
9
6
  import { type FileSink } from "../files.js";
10
7
  import type { SeedFile } from "../types.js";
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-sync.d.ts","sourceRoot":"","sources":["../../src/internal/workspace-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG,0EAA0E;AAC1E,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAkB,IAAI,0BAA0B;CACjD;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS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BAAyB,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBpB;AAED,2DAA2D;AAC3D,wBAAsB,oBAAoB,CAAC,IAAI,EAAE;IAC/C,IAAI,EAAE,QAAQ,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhB"}
@@ -1,10 +1,7 @@
1
1
  /**
2
- * Sync workspace trees onto an Agent Store so cloud-runtime turns read
3
- * them from the store mount. Authored `agent/sandbox/workspace/**` seeds
4
- * land at store-root `workspace/<path>` (see `buildCloudWorkspaceSection`).
5
- * Per-turn `workspaceFiles` land at `sessions/<sessionId>/workspace/<path>`
6
- * (see `buildCloudSessionWorkspaceSection`). Personal-key local+cloud
7
- * nests both under `agent-serve/<agent>/`.
2
+ * Sync authored workspace trees to cloud-turn storage. Project seeds and
3
+ * per-turn `workspaceFiles` use separate deployment and session scopes.
4
+ * User-scoped storage also namespaces both by agent.
8
5
  */
9
6
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
10
7
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -2,7 +2,7 @@
2
2
  * Session workspace materialization. Each session gets its own working
3
3
  * directory that the Cursor harness treats as the project: skills land in
4
4
  * `.cursor/skills/<name>/SKILL.md`, agent-side tools land in
5
- * `.agent-serve/tools/<name>.sh`, and `agent/sandbox/workspace/**` seed files
5
+ * `.agent-serve/tools/<name>.sh`, and `bot/sandbox/workspace/**` seed files
6
6
  * are mirrored in. The harness picks all of this up natively through its
7
7
  * project setting source. Instructions are not written here: local turns
8
8
  * deliver them as the harness system prompt ({@link buildAgentsMdContent}),
@@ -19,33 +19,27 @@ export interface MaterializeWorkspaceOptions {
19
19
  seed: boolean;
20
20
  /**
21
21
  * Agent state root. `<stateRoot>/memory/` (the durable cross-session
22
- * directory the memory hook journals into — on hosting a local mirror of
23
- * the Agent Store journal) is created and symlinked into the workspace as
24
- * `memory` so the agent reads it with plain file tools. Cloud VMs have no
25
- * materialized workspace; they read the store mount directly (see
22
+ * directory the memory hook journals into) is created and symlinked into
23
+ * the workspace as `memory` so the agent reads it with plain file tools.
24
+ * Cloud turns read the managed storage path directly (see
26
25
  * {@link buildCloudMemorySection}).
27
26
  */
28
27
  stateRoot: string;
29
28
  }
30
29
  /**
31
- * First-turn preamble section for cloud-runtime sessions on hosted
32
- * deployments: cloud VMs read the memory journal from the store mount.
30
+ * First-turn preamble for cloud sessions that read managed memory.
33
31
  */
34
32
  export declare function buildCloudMemorySection(agentName: string): string;
35
33
  /**
36
34
  * First-turn preamble section for cloud-runtime sessions with authored
37
- * `agent/sandbox/workspace/**` seeds. Cloud VMs get no materialized
38
- * workspace; the seeds are synced onto the store mount instead (see
39
- * `syncWorkspaceToStore`), so the model has to be told where they are.
35
+ * `bot/sandbox/workspace/**` seeds. The prompt names their managed storage
36
+ * path because cloud turns have no local materialized workspace.
40
37
  */
41
38
  export declare function buildCloudWorkspaceSection(dir: string): string;
42
39
  /**
43
- * Per-turn preamble for cloud `workspaceFiles` after they land on the
44
- * session store prefix (see `syncSessionWorkspaceFiles`). Omitted when
45
- * the sync did not land.
46
- *
47
- * Same shared Agent Store mount as authored seeds — the session path is
48
- * replace-per-send / task-end wipe lifetime, not a separate mount ACL.
40
+ * Per-turn preamble for cloud `workspaceFiles` after they reach
41
+ * session-scoped storage. Omitted when the sync did not land. The session
42
+ * path is replaced on each send and removed when a task session ends.
49
43
  */
50
44
  export declare function buildCloudSessionWorkspaceSection(dir: string, relPaths: readonly string[]): string;
51
45
  /** Relative path of an agent-side tool script inside the session workspace. */
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/internal/workspace.ts"],"names":[],"mappings":"AA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,MAAM,GAAG,MAAM,CAE9D;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAUpE;AAED,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B9F;AAyFD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAO3D;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GACtF,OAAO,CAAC,IAAI,CAAC,CAYf"}
@@ -2,7 +2,7 @@
2
2
  * Session workspace materialization. Each session gets its own working
3
3
  * directory that the Cursor harness treats as the project: skills land in
4
4
  * `.cursor/skills/<name>/SKILL.md`, agent-side tools land in
5
- * `.agent-serve/tools/<name>.sh`, and `agent/sandbox/workspace/**` seed files
5
+ * `.agent-serve/tools/<name>.sh`, and `bot/sandbox/workspace/**` seed files
6
6
  * are mirrored in. The harness picks all of this up natively through its
7
7
  * project setting source. Instructions are not written here: local turns
8
8
  * deliver them as the harness system prompt ({@link buildAgentsMdContent}),
@@ -28,22 +28,20 @@ import { parseFrontmatter, serializeFrontmatter } from "./frontmatter.js";
28
28
  import { buildIdentitySection } from "./prompt-context.js";
29
29
  const execFileAsync = promisify(execFile);
30
30
  /**
31
- * First-turn preamble section for cloud-runtime sessions on hosted
32
- * deployments: cloud VMs read the memory journal from the store mount.
31
+ * First-turn preamble for cloud sessions that read managed memory.
33
32
  */
34
33
  export function buildCloudMemorySection(agentName) {
35
34
  const dir = `${DEPLOYMENT_STORE_MOUNT_PATH}/${agentStoreKeys.memoryDir(agentName)}`;
36
35
  return [
37
36
  "## Shared session memory",
38
37
  "",
39
- `The cross-session memory journal (the \`memory/\` directory your instructions may reference) lives at \`${dir}\` on this machine — read \`${dir}/journal.jsonl\` with your normal file tools.`,
38
+ `The cross-session memory journal (the \`memory/\` directory your instructions may reference) is available at \`${dir}\` on this machine. Read \`${dir}/journal.jsonl\` with your normal file tools.`,
40
39
  ].join("\n");
41
40
  }
42
41
  /**
43
42
  * First-turn preamble section for cloud-runtime sessions with authored
44
- * `agent/sandbox/workspace/**` seeds. Cloud VMs get no materialized
45
- * workspace; the seeds are synced onto the store mount instead (see
46
- * `syncWorkspaceToStore`), so the model has to be told where they are.
43
+ * `bot/sandbox/workspace/**` seeds. The prompt names their managed storage
44
+ * path because cloud turns have no local materialized workspace.
47
45
  */
48
46
  export function buildCloudWorkspaceSection(dir) {
49
47
  return [
@@ -53,19 +51,16 @@ export function buildCloudWorkspaceSection(dir) {
53
51
  ].join("\n");
54
52
  }
55
53
  /**
56
- * Per-turn preamble for cloud `workspaceFiles` after they land on the
57
- * session store prefix (see `syncSessionWorkspaceFiles`). Omitted when
58
- * the sync did not land.
59
- *
60
- * Same shared Agent Store mount as authored seeds — the session path is
61
- * replace-per-send / task-end wipe lifetime, not a separate mount ACL.
54
+ * Per-turn preamble for cloud `workspaceFiles` after they reach
55
+ * session-scoped storage. Omitted when the sync did not land. The session
56
+ * path is replaced on each send and removed when a task session ends.
62
57
  */
63
58
  export function buildCloudSessionWorkspaceSection(dir, relPaths) {
64
59
  const listed = relPaths.map(path => `\`${path}\``).join(", ");
65
60
  return [
66
61
  "## Session workspace files",
67
62
  "",
68
- `This turn's workspace files live at \`${dir}\` on this machine (${listed}). Read them with your normal file tools. They sit on the same shared Agent Store mount as authored workspace seeds; the session directory is replaced on the next send for this session, and task sessions remove it when they finish.`,
63
+ `This turn's workspace files are available at \`${dir}\` on this machine (${listed}). Read them with your normal file tools. The session directory is replaced on the next send for this session, and task sessions remove it when they finish.`,
69
64
  ].join("\n");
70
65
  }
71
66
  /** Relative path of an agent-side tool script inside the session workspace. */
package/dist/memory.d.ts CHANGED
@@ -1,30 +1,22 @@
1
1
  /**
2
- * Session memory — a journal of what every session of this agent did, so
2
+ * Session memory is a journal of what every session of this agent did, so
3
3
  * later sessions can recall and build on past work.
4
4
  *
5
5
  * The write side is {@link memoryHook}, authored as a thin re-export at
6
- * `agent/hooks/memory.ts` (scaffolded by `agent-sdk init`): after each turn
7
- * it appends one record (timestamp, session, user message, final result,
8
- * usage) to `<stateRoot>/memory/journal.jsonl`.
6
+ * `bot/hooks/memory.ts`. After each turn it appends one record to
7
+ * `<stateRoot>/memory/journal.jsonl`.
9
8
  *
10
9
  * There is no read-side API. The framework symlinks `<stateRoot>/memory`
11
10
  * into every session workspace as `memory/`, so agents read the journal
12
11
  * with their normal file tools (`instructions.md` points them at it). That
13
12
  * filesystem visibility is why memory does not route through
14
13
  * `defineStorage` sinks, which are opaque to the model. A custom
15
- * {@link MemoryBackend} (database, vector store, …) supplies its own read
16
- * path — typically a server tool under `agent/tools/`, which can resolve
17
- * state via `ctx.stateRoot`.
14
+ * {@link MemoryBackend} supplies its own read path.
18
15
  *
19
16
  * On Cursor-managed hosting the default is {@link agentStoreMemoryBackend}:
20
- * the journal lives on the deployment's Agent Store (survives deploys,
21
- * visible on cloud VMs under the store mount), written exclusively through
22
- * the `memory.append` domain call — the server owns the journal pattern —
23
- * and mirrored to `<stateRoot>/memory/journal.jsonl` (hydrated per session
24
- * via `memory.read`, appended locally per turn) so the workspace symlink
25
- * read path keeps working for local-runtime turns. The
26
- * `factory-api-v1` pin file exists only on hosted pods — plain local dev
27
- * runs {@link fileMemoryBackend} and never sees the hosted lane.
17
+ * the journal survives deployment replacement and is mirrored locally so
18
+ * file tools keep the same read path. Local development uses
19
+ * {@link fileMemoryBackend}.
28
20
  */
29
21
  import { type CursorHostedFilesOptions } from "./files-backends/cursor-hosted.js";
30
22
  import { type StoreApiClient } from "./internal/cursor/store-api-client.js";
@@ -57,7 +49,7 @@ export interface MemoryBackend {
57
49
  /**
58
50
  * Optional session-start hook: bring the backend's local read path up to
59
51
  * date before the session's first turn reads it. A freshness upgrade, not
60
- * a correctness gate — implementations soft-fail and keep whatever read
52
+ * a correctness gate; implementations soft-fail and keep whatever read
61
53
  * state already exists.
62
54
  */
63
55
  prepareSession?(ctx: {
@@ -74,45 +66,27 @@ export interface FileMemoryBackendOptions {
74
66
  }
75
67
  /**
76
68
  * Local default backend: append-only JSONL at `<stateRoot>/memory/journal.jsonl`
77
- * — the directory the framework symlinks into session workspaces. Rotated
69
+ * in the directory the framework symlinks into session workspaces. Rotated
78
70
  * segments stay alongside as `journal-<epoch-ms>.jsonl`.
79
71
  */
80
72
  export declare function fileMemoryBackend(options?: FileMemoryBackendOptions): MemoryBackend;
81
73
  export interface AgentStoreMemoryBackendOptions {
82
74
  /**
83
75
  * Local mirror rotation threshold, same meaning as
84
- * {@link FileMemoryBackendOptions}. The durable journal's rotation is the
85
- * server's (`memory.append` controller), not this.
76
+ * {@link FileMemoryBackendOptions}. Managed storage controls the durable
77
+ * journal's retention independently.
86
78
  */
87
79
  maxJournalBytes?: number;
88
- /**
89
- * Cursor-hosted transport overrides (tests): base URL, credential, store
90
- * source id, protocol pin, fetch. Feeds the default
91
- * {@link storeApiClient} and the lane-availability check.
92
- */
80
+ /** Cursor-managed storage overrides. */
93
81
  hosted?: CursorHostedFilesOptions;
94
- /**
95
- * Domain-lane client override (tests). Defaults to
96
- * {@link createStoreApiClient} over {@link hosted} — the module that owns
97
- * the `memory.append` / `memory.read` transport, typed errors, and
98
- * bounded backoff.
99
- */
82
+ /** Managed storage client override. */
100
83
  storeApiClient?: StoreApiClient;
101
84
  }
102
85
  /**
103
- * Journal on the deployment's Agent Store — durable across deploys, visible
104
- * on cloud VMs under the store mount, written exclusively through the
105
- * `memory.append` domain call: the server owns the journal's storage
106
- * pattern (Redis-buffered flush, rotation), so a pathological pattern is
107
- * fixable in a backend deploy instead of a July release plus a rebake.
108
- *
109
- * There is no client-composed fallback. The read-modify-write CAS lane that
110
- * predated the domain call (and caused the 2026-09-18 Agent Store read
111
- * storm) was removed in 0.2.1 together with v2 hosting binding the
112
- * `factory-api-v1` pin unconditionally and refusing artifacts frozen on an
113
- * older July. A hosted pod without the pin is therefore a misconfiguration
114
- * (a server predating the pin change, or a local env naming a hosted store
115
- * without one): records are dropped loudly, never written client-side.
86
+ * Cursor-managed journal that survives deployment replacement. Managed
87
+ * storage owns append, read, and rotation. If managed storage is unavailable,
88
+ * records are dropped with an error instead of falling back to a second
89
+ * persistence path.
116
90
  */
117
91
  export declare function agentStoreMemoryBackend(options?: AgentStoreMemoryBackendOptions): MemoryBackend;
118
92
  export interface MemoryHookOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../src/memory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAMH,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAe,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEzE,sEAAsE;AACtE,eAAO,MAAM,eAAe,WAAW,CAAC;AAExC,gDAAgD;AAChD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC/B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,CAAC;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