@cursor/bdk 0.2.6 → 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 (335) hide show
  1. package/dist/bin/agent-serve.js +52 -57
  2. package/dist/channels/github/github-channel.d.ts.map +1 -1
  3. package/dist/channels/github/github-channel.js +34 -8
  4. package/dist/channels/github/types.d.ts +6 -0
  5. package/dist/channels/github/types.d.ts.map +1 -1
  6. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.js +37 -29
  8. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  9. package/dist/channels/slack/external-policy.js +6 -6
  10. package/dist/channels/slack/inbound.d.ts +5 -0
  11. package/dist/channels/slack/inbound.d.ts.map +1 -1
  12. package/dist/channels/slack/inbound.js +13 -0
  13. package/dist/channels/slack/index.d.ts +3 -0
  14. package/dist/channels/slack/index.d.ts.map +1 -1
  15. package/dist/channels/slack/index.js +3 -0
  16. package/dist/channels/slack/log.d.ts +1 -1
  17. package/dist/channels/slack/log.js +1 -1
  18. package/dist/channels/slack/self-identity.d.ts +15 -0
  19. package/dist/channels/slack/self-identity.d.ts.map +1 -0
  20. package/dist/channels/slack/self-identity.js +48 -0
  21. package/dist/channels/slack/sender-name.d.ts +17 -0
  22. package/dist/channels/slack/sender-name.d.ts.map +1 -0
  23. package/dist/channels/slack/sender-name.js +87 -0
  24. package/dist/channels/slack/setup.js +1 -1
  25. package/dist/channels/slack/user-info.d.ts +15 -0
  26. package/dist/channels/slack/user-info.d.ts.map +1 -0
  27. package/dist/channels/slack/user-info.js +57 -0
  28. package/dist/docs/404.html +2 -2
  29. package/dist/docs/assets/{app.CJLKDVza.js → app.oyjtOr3W.js} +4 -4
  30. package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +1 -0
  31. package/dist/docs/assets/chunks/{VPLocalSearchBox.BW9mrQmq.js → VPLocalSearchBox.D0P6J_UJ.js} +1 -1
  32. package/dist/docs/assets/chunks/{arc.D8ZOvM1m.js → arc.B0LY1J1h.js} +1 -1
  33. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CXEKhLW-.js → architectureDiagram-Q4EWVU46.dPduLUxY.js} +1 -1
  34. package/dist/docs/assets/chunks/{baseUniq.BJkVKblr.js → baseUniq.B_Ohm21h.js} +1 -1
  35. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DQDbHxor.js → blockDiagram-DXYQGD6D.B4zcanaJ.js} +1 -1
  36. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.ByMD6LYM.js → c4Diagram-AHTNJAMY.D9Iw21nx.js} +1 -1
  37. package/dist/docs/assets/chunks/channel.CRUyWDV-.js +1 -0
  38. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Dtq1aVI9.js → chunk-4BX2VUAB.DDVwRShI.js} +1 -1
  39. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BL_XrkoQ.js → chunk-4TB4RGXK.DsYcdn1i.js} +1 -1
  40. package/dist/docs/assets/chunks/{chunk-55IACEB6.BDPXu94_.js → chunk-55IACEB6.BzzQvcYp.js} +1 -1
  41. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DhGOQj4k.js → chunk-EDXVE4YY.BMiXZ7FX.js} +1 -1
  42. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DSF5nr8v.js → chunk-FMBD7UC4.D_mBcLoc.js} +1 -1
  43. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Day7wayw.js → chunk-OYMX7WX6.CMVjWVMx.js} +1 -1
  44. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CpBEC0zA.js → chunk-QZHKN3VN.BG-FrPv9.js} +1 -1
  45. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.X_7rY1rx.js → chunk-YZCP3GAM.CkFE1ap3.js} +1 -1
  46. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CG_UObcQ.js +1 -0
  47. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CG_UObcQ.js +1 -0
  48. package/dist/docs/assets/chunks/clone.NYSZ9qZN.js +1 -0
  49. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BVRmi2ko.js → cose-bilkent-S5V4N54A.BVNnCTvY.js} +1 -1
  50. package/dist/docs/assets/chunks/{dagre-KV5264BT.Dei9oslB.js → dagre-KV5264BT.CDN5PR9l.js} +1 -1
  51. package/dist/docs/assets/chunks/{diagram-5BDNPKRD._M-efGt7.js → diagram-5BDNPKRD.DQRUlT-i.js} +1 -1
  52. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.D1Vmhfsj.js → diagram-G4DWMVQ6.CoeblYQT.js} +1 -1
  53. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.cE1bmvAC.js → diagram-MMDJMWI5.DW3ymjl0.js} +1 -1
  54. package/dist/docs/assets/chunks/{diagram-TYMM5635.DkXAfznP.js → diagram-TYMM5635.BP0uN4Jw.js} +1 -1
  55. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DH_pSwPg.js → erDiagram-SMLLAGMA.DVFUWEn4.js} +1 -1
  56. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.kAWVN9j1.js → flowDiagram-DWJPFMVM.HU-eHspv.js} +1 -1
  57. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.8r0w49-p.js → ganttDiagram-T4ZO3ILL.DHNhXijY.js} +1 -1
  58. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js → gitGraphDiagram-UUTBAWPF.DkISXcO3.js} +1 -1
  59. package/dist/docs/assets/chunks/{graph.BMPXHz_B.js → graph.CCV0fuRR.js} +1 -1
  60. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BmlcqewS.js → infoDiagram-42DDH7IO.bgILzOoc.js} +1 -1
  61. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.CVSEQSul.js → ishikawaDiagram-UXIWVN3A.CuryXC0F.js} +1 -1
  62. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BpeWJ5n-.js → journeyDiagram-VCZTEJTY.BL1Pr-wu.js} +1 -1
  63. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DHbDXuxB.js → kanban-definition-6JOO6SKY.BbGjvk4l.js} +1 -1
  64. package/dist/docs/assets/chunks/{layout.CzrCDgkP.js → layout.C4PfdldS.js} +1 -1
  65. package/dist/docs/assets/chunks/{linear.HwBsflwN.js → linear.C3xD1T6X.js} +1 -1
  66. package/dist/docs/assets/chunks/{min.DqGHolT3.js → min.CzgRAQ9c.js} +1 -1
  67. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.ZYGlOawh.js → mindmap-definition-QFDTVHPH.CA9rSWum.js} +1 -1
  68. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.C2KRXlNR.js → pieDiagram-DEJITSTG.B8MprgJu.js} +1 -1
  69. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CHj3Qefp.js → quadrantDiagram-34T5L4WZ.DndDwbKT.js} +1 -1
  70. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.B1L4Tf7k.js → requirementDiagram-MS252O5E.Zhfgwlnn.js} +1 -1
  71. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.dNR2yi1B.js → sankeyDiagram-XADWPNL6.B6RRm6N5.js} +1 -1
  72. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BrvQ3C6m.js → sequenceDiagram-FGHM5R23.Bfmz-1PN.js} +1 -1
  73. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BtehEykA.js → stateDiagram-FHFEXIEX.gbrdNqgj.js} +1 -1
  74. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DOOmulfQ.js +1 -0
  75. package/dist/docs/assets/chunks/{theme.BDHBZUkP.js → theme.gpWjytMh.js} +2 -2
  76. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bn7nhqEN.js → timeline-definition-GMOUNBTQ.Bl1l7M1f.js} +1 -1
  77. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DKhc38sz.js → vennDiagram-DHZGUBPP.Dfle4U0d.js} +1 -1
  78. package/dist/docs/assets/chunks/{wardley-RL74JXVD.DOXQ0w8J.js → wardley-RL74JXVD.BJrCW6xc.js} +1 -1
  79. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js → wardleyDiagram-NUSXRM2D.CM_4lmvZ.js} +1 -1
  80. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B77HE1K8.js → xychartDiagram-5P7HB3ND.CHT5X28R.js} +1 -1
  81. package/dist/docs/assets/{reference_cli.md.BsgDqYPh.js → reference_cli.md.GwugN3n-.js} +5 -5
  82. package/dist/docs/assets/reference_cli.md.GwugN3n-.lean.js +1 -0
  83. package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C0guGcH0.js} +3 -3
  84. package/dist/docs/building-with-agents.html +35 -35
  85. package/dist/docs/deployment.html +35 -35
  86. package/dist/docs/evals.html +35 -35
  87. package/dist/docs/guides/agent-to-agent.html +35 -35
  88. package/dist/docs/guides/bitbucket.html +35 -35
  89. package/dist/docs/guides/cloud-agents.html +35 -35
  90. package/dist/docs/guides/convert-automation.html +35 -35
  91. package/dist/docs/guides/github.html +35 -35
  92. package/dist/docs/guides/gitlab.html +35 -35
  93. package/dist/docs/guides/grokbot-agents.html +35 -35
  94. package/dist/docs/guides/hooks.html +35 -35
  95. package/dist/docs/guides/improve.html +35 -35
  96. package/dist/docs/guides/jev.html +35 -35
  97. package/dist/docs/guides/mcp-oauth.html +35 -35
  98. package/dist/docs/guides/opentelemetry.html +35 -35
  99. package/dist/docs/guides/slack.html +35 -35
  100. package/dist/docs/guides/webhooks.html +35 -35
  101. package/dist/docs/hashmap.json +1 -1
  102. package/dist/docs/hillclimbing.html +35 -35
  103. package/dist/docs/index.html +35 -35
  104. package/dist/docs/llms-full.txt +20 -9
  105. package/dist/docs/quickstart.html +35 -35
  106. package/dist/docs/reference/agent-config.html +35 -35
  107. package/dist/docs/reference/artifacts.html +35 -35
  108. package/dist/docs/reference/channels.html +35 -35
  109. package/dist/docs/reference/cli.html +39 -39
  110. package/dist/docs/reference/cli.md +20 -9
  111. package/dist/docs/reference/connections.html +35 -35
  112. package/dist/docs/reference/evals.html +35 -35
  113. package/dist/docs/reference/extensions.html +35 -35
  114. package/dist/docs/reference/hooks.html +35 -35
  115. package/dist/docs/reference/http-api.html +35 -35
  116. package/dist/docs/reference/instructions.html +35 -35
  117. package/dist/docs/reference/playground.html +35 -35
  118. package/dist/docs/reference/project-layout.html +35 -35
  119. package/dist/docs/reference/prompt.html +35 -35
  120. package/dist/docs/reference/schedules.html +35 -35
  121. package/dist/docs/reference/sessions.html +35 -35
  122. package/dist/docs/reference/skills.html +38 -38
  123. package/dist/docs/reference/subagents.html +35 -35
  124. package/dist/docs/reference/tools.html +35 -35
  125. package/dist/docs/templates/agentic-owners.html +35 -35
  126. package/dist/docs/templates/grokbot-agents.html +35 -35
  127. package/dist/docs/templates/security-reviewer.html +35 -35
  128. package/dist/docs/templates/thermo-quality-review.html +35 -35
  129. package/dist/docs/templates/thermo-review.html +35 -35
  130. package/dist/docs/templates/triage.html +35 -35
  131. package/dist/docs/troubleshooting.html +35 -35
  132. package/dist/extensions/cursor-cloud-agents/extension.d.ts +14 -0
  133. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  134. package/dist/extensions/cursor-cloud-agents/extension.js +5 -0
  135. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
  136. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
  137. package/dist/extensions/cursor-cloud-agents/lib/watch.js +99 -0
  138. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
  139. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
  140. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +71 -0
  141. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +9 -5
  142. package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -1
  143. package/dist/extensions/cursor-cloud-agents/tools/cancel.js +3 -1
  144. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  145. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -2
  146. package/dist/extensions.d.ts +1 -1
  147. package/dist/extensions.js +1 -1
  148. package/dist/files-backends/cursor-hosted.d.ts +22 -83
  149. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  150. package/dist/files-backends/cursor-hosted.js +46 -160
  151. package/dist/files.d.ts +9 -32
  152. package/dist/files.d.ts.map +1 -1
  153. package/dist/files.js +7 -32
  154. package/dist/internal/artifacts-store.d.ts +13 -25
  155. package/dist/internal/artifacts-store.d.ts.map +1 -1
  156. package/dist/internal/artifacts-store.js +25 -46
  157. package/dist/internal/cli-ax.d.ts +10 -17
  158. package/dist/internal/cli-ax.d.ts.map +1 -1
  159. package/dist/internal/cli-ax.js +87 -155
  160. package/dist/internal/cli-bitbucket.js +5 -5
  161. package/dist/internal/cli-deploy.d.ts +4 -1
  162. package/dist/internal/cli-deploy.d.ts.map +1 -1
  163. package/dist/internal/cli-deploy.js +117 -20
  164. package/dist/internal/cli-github.js +13 -13
  165. package/dist/internal/cli-gitlab.js +5 -5
  166. package/dist/internal/continuation-identity.d.ts +2 -0
  167. package/dist/internal/continuation-identity.d.ts.map +1 -1
  168. package/dist/internal/continuation-identity.js +4 -0
  169. package/dist/internal/conversation-mirror.d.ts +9 -38
  170. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  171. package/dist/internal/conversation-mirror.js +62 -68
  172. package/dist/internal/cursor/account-mcp.d.ts +1 -1
  173. package/dist/internal/cursor/account-mcp.js +1 -1
  174. package/dist/internal/cursor/backend-client.js +1 -1
  175. package/dist/internal/cursor/github-credentials.js +3 -3
  176. package/dist/internal/cursor/hosted-bound-secrets.d.ts +6 -2
  177. package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -1
  178. package/dist/internal/cursor/hosted-bound-secrets.js +13 -2
  179. package/dist/internal/cursor/hosted-store-secrets.d.ts +13 -37
  180. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  181. package/dist/internal/cursor/hosted-store-secrets.js +13 -37
  182. package/dist/internal/cursor/store-api-client.d.ts +17 -39
  183. package/dist/internal/cursor/store-api-client.d.ts.map +1 -1
  184. package/dist/internal/cursor/store-api-client.js +15 -37
  185. package/dist/internal/cursor-deployment-relay.js +3 -3
  186. package/dist/internal/cursor-event-relay.js +1 -1
  187. package/dist/internal/cursor-relay-core.d.ts +1 -1
  188. package/dist/internal/cursor-relay-core.d.ts.map +1 -1
  189. package/dist/internal/deploy-client.d.ts +55 -63
  190. package/dist/internal/deploy-client.d.ts.map +1 -1
  191. package/dist/internal/deploy-client.js +48 -28
  192. package/dist/internal/discovery/agent.d.ts +1 -1
  193. package/dist/internal/discovery/agent.d.ts.map +1 -1
  194. package/dist/internal/discovery/agent.js +4 -0
  195. package/dist/internal/discovery/extensions.d.ts +2 -1
  196. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  197. package/dist/internal/discovery/extensions.js +11 -1
  198. package/dist/internal/discovery/project.d.ts.map +1 -1
  199. package/dist/internal/discovery/project.js +1 -0
  200. package/dist/internal/distribution.d.ts +2 -2
  201. package/dist/internal/distribution.d.ts.map +1 -1
  202. package/dist/internal/distribution.js +2 -2
  203. package/dist/internal/docs-site.js +3 -3
  204. package/dist/internal/eval-run-store.js +8 -8
  205. package/dist/internal/framework-file-storage.d.ts +10 -34
  206. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  207. package/dist/internal/framework-file-storage.js +12 -39
  208. package/dist/internal/framework-storage-selection.d.ts +10 -46
  209. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  210. package/dist/internal/framework-storage-selection.js +15 -64
  211. package/dist/internal/github-fanout.js +2 -2
  212. package/dist/internal/handleAgentServeTrigger.d.ts +5 -8
  213. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
  214. package/dist/internal/handleAgentServeTrigger.js +5 -8
  215. package/dist/internal/host-files.js +6 -9
  216. package/dist/internal/host-platforms.js +5 -5
  217. package/dist/internal/hosted-catch.d.ts +3 -2
  218. package/dist/internal/hosted-catch.d.ts.map +1 -1
  219. package/dist/internal/hosted-catch.js +27 -9
  220. package/dist/internal/hosted-delivery-protocol.d.ts +31 -8
  221. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  222. package/dist/internal/hosted-delivery-protocol.js +102 -1
  223. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  224. package/dist/internal/hosted-delivery.js +32 -12
  225. package/dist/internal/hosted-execution-diag.d.ts +13 -24
  226. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  227. package/dist/internal/hosted-execution-diag.js +11 -20
  228. package/dist/internal/hosted-execution-flush.d.ts +22 -10
  229. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  230. package/dist/internal/hosted-execution-flush.js +45 -9
  231. package/dist/internal/hosted-managed-automation.js +5 -5
  232. package/dist/internal/hosting.d.ts +5 -10
  233. package/dist/internal/hosting.d.ts.map +1 -1
  234. package/dist/internal/hosting.js +5 -10
  235. package/dist/internal/legacy-command-guard.d.ts +1 -4
  236. package/dist/internal/legacy-command-guard.d.ts.map +1 -1
  237. package/dist/internal/legacy-command-guard.js +2 -11
  238. package/dist/internal/listen-port.js +1 -1
  239. package/dist/internal/local-control-plane.js +6 -6
  240. package/dist/internal/logs-client.d.ts +20 -1
  241. package/dist/internal/logs-client.d.ts.map +1 -1
  242. package/dist/internal/logs-client.js +89 -1
  243. package/dist/internal/mcp-endpoint.js +1 -1
  244. package/dist/internal/otel/collector.js +1 -1
  245. package/dist/internal/otel/runtime.js +13 -13
  246. package/dist/internal/platform-schedule-sync.js +2 -2
  247. package/dist/internal/playground/toolchain.js +6 -6
  248. package/dist/internal/process-memory-telemetry.js +2 -2
  249. package/dist/internal/reminder-runner.d.ts +8 -3
  250. package/dist/internal/reminder-runner.d.ts.map +1 -1
  251. package/dist/internal/reminder-runner.js +51 -52
  252. package/dist/internal/resolve-prod-target.d.ts +1 -12
  253. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  254. package/dist/internal/resolve-prod-target.js +2 -32
  255. package/dist/internal/resolved-connections.js +8 -8
  256. package/dist/internal/run-client.d.ts +4 -3
  257. package/dist/internal/run-client.d.ts.map +1 -1
  258. package/dist/internal/run-client.js +98 -61
  259. package/dist/internal/runtime-dispatch-runner.d.ts +1 -0
  260. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  261. package/dist/internal/runtime-dispatch-runner.js +7 -1
  262. package/dist/internal/schedule-runner.js +1 -1
  263. package/dist/internal/sdk-runner.d.ts +4 -0
  264. package/dist/internal/sdk-runner.d.ts.map +1 -1
  265. package/dist/internal/sdk-runner.js +37 -22
  266. package/dist/internal/server.d.ts +2 -0
  267. package/dist/internal/server.d.ts.map +1 -1
  268. package/dist/internal/server.js +39 -38
  269. package/dist/internal/session-engine.d.ts +31 -44
  270. package/dist/internal/session-engine.d.ts.map +1 -1
  271. package/dist/internal/session-engine.js +67 -83
  272. package/dist/internal/session-run-log.d.ts +10 -24
  273. package/dist/internal/session-run-log.d.ts.map +1 -1
  274. package/dist/internal/session-run-log.js +13 -27
  275. package/dist/internal/sessions-client.d.ts.map +1 -1
  276. package/dist/internal/sessions-client.js +6 -3
  277. package/dist/internal/skills-sync.d.ts +3 -5
  278. package/dist/internal/skills-sync.d.ts.map +1 -1
  279. package/dist/internal/skills-sync.js +3 -5
  280. package/dist/internal/start-log-store.d.ts +7 -18
  281. package/dist/internal/start-log-store.d.ts.map +1 -1
  282. package/dist/internal/start-log-store.js +47 -24
  283. package/dist/internal/storage-coordinator.d.ts +7 -10
  284. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  285. package/dist/internal/storage-coordinator.js +18 -20
  286. package/dist/internal/storage-roles.d.ts +5 -0
  287. package/dist/internal/storage-roles.d.ts.map +1 -1
  288. package/dist/internal/store-api-protocol.d.ts +12 -33
  289. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  290. package/dist/internal/store-api-protocol.js +6 -22
  291. package/dist/internal/store-mirror.d.ts +4 -5
  292. package/dist/internal/store-mirror.d.ts.map +1 -1
  293. package/dist/internal/store-mirror.js +6 -8
  294. package/dist/internal/turn-lease-store.d.ts +12 -5
  295. package/dist/internal/turn-lease-store.d.ts.map +1 -1
  296. package/dist/internal/turn-lease-store.js +61 -8
  297. package/dist/internal/v2-hosting.d.ts +4 -7
  298. package/dist/internal/v2-hosting.d.ts.map +1 -1
  299. package/dist/internal/v2-hosting.js +4 -7
  300. package/dist/internal/workspace-sync.d.ts +3 -6
  301. package/dist/internal/workspace-sync.d.ts.map +1 -1
  302. package/dist/internal/workspace-sync.js +3 -6
  303. package/dist/internal/workspace.d.ts +10 -16
  304. package/dist/internal/workspace.d.ts.map +1 -1
  305. package/dist/internal/workspace.js +9 -14
  306. package/dist/memory.d.ts +17 -43
  307. package/dist/memory.d.ts.map +1 -1
  308. package/dist/memory.js +34 -80
  309. package/dist/playground/assets/index-DPKLl4C_.css +1 -0
  310. package/dist/playground/assets/index-MijLHTbB.js +71 -0
  311. package/dist/playground/index.html +2 -2
  312. package/dist/storage-backends/cursor-hosted-v2.d.ts +8 -36
  313. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
  314. package/dist/storage-backends/cursor-hosted-v2.js +9 -37
  315. package/dist/storage-backends/cursor-hosted.d.ts +17 -30
  316. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  317. package/dist/storage-backends/cursor-hosted.js +14 -27
  318. package/dist/storage-protocol.d.ts +13 -38
  319. package/dist/storage-protocol.d.ts.map +1 -1
  320. package/dist/storage-protocol.js +14 -39
  321. package/dist/types.d.ts +29 -30
  322. package/dist/types.d.ts.map +1 -1
  323. package/docs/reference/cli.md +20 -9
  324. package/package.json +1 -1
  325. package/templates/pr-autofixer/bot/instructions.md +3 -3
  326. package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +0 -1
  327. package/dist/docs/assets/chunks/channel.DCU8W1RP.js +0 -1
  328. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +0 -1
  329. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +0 -1
  330. package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +0 -1
  331. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +0 -1
  332. package/dist/docs/assets/reference_cli.md.BsgDqYPh.lean.js +0 -1
  333. package/dist/playground/assets/index-6BbTPnaT.css +0 -1
  334. package/dist/playground/assets/index-CI7FAmOP.js +0 -71
  335. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C0guGcH0.lean.js} +0 -0
@@ -1,19 +1,5 @@
1
1
  /**
2
- * Domain-call wire contract for the factory store API:
3
- * `POST /internal/agentsdk/store/api/<call>` carrying a versioned JSON
4
- * envelope `{ v, call, payload }`. This is the lane where the **server** owns
5
- * the storage pattern (journal sharding, rotation, compaction), so a
6
- * pathological pattern is fixable in a backend deploy instead of a July
7
- * release plus a rebake of every deployment. The verb lane (`/flush`,
8
- * `/read`, `/list`) keeps carrying bulk presigned file IO.
9
- *
10
- * Deliberately duplicated on the backend
11
- * (`backend/server/src/factory/agent-sdk/agentsdkStoreApiProtocol.ts`): this
12
- * package is published to npm, so the backend cannot depend on it and it
13
- * cannot depend on backend packages. A backend drift test compares the two
14
- * sources — same shape as the hosted-delivery protocol twins — which is why
15
- * every exported constant here stays a single `export const NAME = <literal>;`
16
- * line and every schema field stays on its own line.
2
+ * Versioned wire contract for Cursor-managed store operations.
17
3
  *
18
4
  * Evolution rules (the compat contract): additive optional fields only; no
19
5
  * renames, no retypes, no semantic reuse of an old field; unknown fields are
@@ -23,26 +9,23 @@
23
9
  */
24
10
  import { z } from "zod";
25
11
  export declare const STORE_API_PROTOCOL_VERSION = 1;
26
- /** Path family on the factory surface; one segment per call. */
12
+ /** Managed storage endpoint, with one trailing segment per call. */
27
13
  export declare const STORE_API_PATH = "/internal/agentsdk/store/api";
28
14
  export declare const STORE_API_MEMORY_APPEND_CALL = "memory.append";
29
15
  /**
30
16
  * Semantic cap on one serialized memory record. Text fields are truncated
31
17
  * client-side (`memoryHook` default 2000 chars per field), so a well-formed
32
18
  * record is a few KiB; 16 KiB is generous headroom, not a target. The cap is
33
- * part of the wire contract but rides the layers, not the schema: the
34
- * backend's store controller enforces it as a typed 4xx, and the store API
35
- * client (`cursor/store-api-client.ts`) pre-checks it before spending a
36
- * doomed request.
19
+ * part of the wire contract but not the schema. The service enforces it as a
20
+ * typed 4xx, and the client checks it before sending a request.
37
21
  */
38
22
  export declare const MEMORY_APPEND_MAX_RECORD_BYTES: number;
39
23
  /** Serialized size of a record, as counted against the byte cap. */
40
24
  export declare function serializedRecordBytes(record: unknown): number;
41
25
  /**
42
- * One turn's memory record as it crosses the wire — July's
43
- * `TurnMemoryRecord` (memory.ts). The extra-key record mirrors the schema's
44
- * `.passthrough()`: a newer client's additive optional fields are journaled
45
- * verbatim rather than stripped by an older server.
26
+ * One turn's memory record as it crosses the wire. The extra-key record
27
+ * mirrors the schema's `.passthrough()`: a newer client's additive optional
28
+ * fields are journaled verbatim rather than stripped by an older server.
46
29
  */
47
30
  export type TurnMemoryRecordWire = {
48
31
  at: string;
@@ -69,8 +52,8 @@ export type MemoryAppendPayload = {
69
52
  /**
70
53
  * `memory.append` payload shape. The agent name becomes a store key segment
71
54
  * on the server, so it must be exactly one segment. Unknown payload fields
72
- * are stripped (= ignored), per the evolution rules. The byte cap is
73
- * semantics, not shape — the backend's store controller owns it.
55
+ * are stripped (= ignored), per the evolution rules. The service owns the
56
+ * byte cap because it is a semantic limit rather than part of the shape.
74
57
  */
75
58
  export declare const memoryAppendPayloadSchema: z.ZodType<MemoryAppendPayload>;
76
59
  /** The versioned request body for the `memory.append` call. */
@@ -110,13 +93,9 @@ export type MemoryReadEnvelope = {
110
93
  /** The whole request body. Unknown envelope fields are stripped (= ignored). */
111
94
  export declare const memoryReadEnvelopeSchema: z.ZodType<MemoryReadEnvelope>;
112
95
  /**
113
- * `memory.read` success body. The call is flush-on-read: the server drains
114
- * the agent's pending append buffer before presigning. Best-effort: when
115
- * the drain succeeds the journal includes every append that preceded the
116
- * read; a busy flush lock, a buffer outage, or an oversized backlog
117
- * degrades to the already-flushed state (callers must not regress their
118
- * local view on a shorter download). `journal` is null while the agent has
119
- * no journal at all.
96
+ * `memory.read` success body. The snapshot is best-effort and may lag
97
+ * accepted appends, so callers retain a longer local view. `journal` is null
98
+ * while the agent has no journal.
120
99
  */
121
100
  export type MemoryReadResponse = {
122
101
  v: typeof STORE_API_PROTOCOL_VERSION;
@@ -1 +1 @@
1
- {"version":3,"file":"store-api-protocol.d.ts","sourceRoot":"","sources":["../../src/internal/store-api-protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,gEAAgE;AAChE,eAAO,MAAM,cAAc,iCAAiC,CAAC;AAE7D,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAkB,CAAC;AAEhE,oEAAoE;AACpE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAE7D;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,GAAG,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H,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAQ/D,CAAC;AAEH,6DAA6D;AAC7D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,IAAI,EAAE,OAAO,0BAA0B,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAIjE,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,OAAO,0BAA0B,CAAC;IACrC,EAAE,EAAE,IAAI,CAAC;IACT,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;QACZ,SAAS,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CASjE,CAAC"}
@@ -1,19 +1,5 @@
1
1
  /**
2
- * Domain-call wire contract for the factory store API:
3
- * `POST /internal/agentsdk/store/api/<call>` carrying a versioned JSON
4
- * envelope `{ v, call, payload }`. This is the lane where the **server** owns
5
- * the storage pattern (journal sharding, rotation, compaction), so a
6
- * pathological pattern is fixable in a backend deploy instead of a July
7
- * release plus a rebake of every deployment. The verb lane (`/flush`,
8
- * `/read`, `/list`) keeps carrying bulk presigned file IO.
9
- *
10
- * Deliberately duplicated on the backend
11
- * (`backend/server/src/factory/agent-sdk/agentsdkStoreApiProtocol.ts`): this
12
- * package is published to npm, so the backend cannot depend on it and it
13
- * cannot depend on backend packages. A backend drift test compares the two
14
- * sources — same shape as the hosted-delivery protocol twins — which is why
15
- * every exported constant here stays a single `export const NAME = <literal>;`
16
- * line and every schema field stays on its own line.
2
+ * Versioned wire contract for Cursor-managed store operations.
17
3
  *
18
4
  * Evolution rules (the compat contract): additive optional fields only; no
19
5
  * renames, no retypes, no semantic reuse of an old field; unknown fields are
@@ -23,17 +9,15 @@
23
9
  */
24
10
  import { z } from "zod";
25
11
  export const STORE_API_PROTOCOL_VERSION = 1;
26
- /** Path family on the factory surface; one segment per call. */
12
+ /** Managed storage endpoint, with one trailing segment per call. */
27
13
  export const STORE_API_PATH = "/internal/agentsdk/store/api";
28
14
  export const STORE_API_MEMORY_APPEND_CALL = "memory.append";
29
15
  /**
30
16
  * Semantic cap on one serialized memory record. Text fields are truncated
31
17
  * client-side (`memoryHook` default 2000 chars per field), so a well-formed
32
18
  * record is a few KiB; 16 KiB is generous headroom, not a target. The cap is
33
- * part of the wire contract but rides the layers, not the schema: the
34
- * backend's store controller enforces it as a typed 4xx, and the store API
35
- * client (`cursor/store-api-client.ts`) pre-checks it before spending a
36
- * doomed request.
19
+ * part of the wire contract but not the schema. The service enforces it as a
20
+ * typed 4xx, and the client checks it before sending a request.
37
21
  */
38
22
  export const MEMORY_APPEND_MAX_RECORD_BYTES = 16 * 1024;
39
23
  /** Serialized size of a record, as counted against the byte cap. */
@@ -61,8 +45,8 @@ export const turnMemoryRecordWireSchema = z
61
45
  /**
62
46
  * `memory.append` payload shape. The agent name becomes a store key segment
63
47
  * on the server, so it must be exactly one segment. Unknown payload fields
64
- * are stripped (= ignored), per the evolution rules. The byte cap is
65
- * semantics, not shape — the backend's store controller owns it.
48
+ * are stripped (= ignored), per the evolution rules. The service owns the
49
+ * byte cap because it is a semantic limit rather than part of the shape.
66
50
  */
67
51
  export const memoryAppendPayloadSchema = z.object({
68
52
  agent: z
@@ -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,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+B;IAEpD,YAAY,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,EAIxD;IAED,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-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,EAAE,SAAS,QAAQ,EAAE,CAAC;IAC/B,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,QAAQ,CAAC;IACf,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AAsB,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":"AAAA;;;;;;;;;GASG;AAmBH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAMlF,MAAM,WAAW,2BAA2B;IAC1C,KAAK,EAAE,aAAa,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,OAA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FD;;;;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. */