@cursor/july 0.1.109 → 0.1.111

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 (1076) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +0 -15
  3. package/dist/bin/agent-serve.js +81 -66
  4. package/dist/channels/bitbucket/api.js +8 -8
  5. package/dist/channels/bitbucket/binding.js +4 -4
  6. package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
  7. package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
  8. package/dist/channels/bitbucket/checks.d.ts.map +1 -1
  9. package/dist/channels/bitbucket/checks.js +1 -1
  10. package/dist/channels/bitbucket/cursor-account.js +1 -1
  11. package/dist/channels/bitbucket/events.js +1 -1
  12. package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
  13. package/dist/channels/checks.d.ts.map +1 -1
  14. package/dist/channels/checks.js +2 -2
  15. package/dist/channels/deployments/deployments-channel.js +1 -1
  16. package/dist/channels/github/cursor-account.js +3 -3
  17. package/dist/channels/github/defaults.d.ts.map +1 -1
  18. package/dist/channels/github/defaults.js +5 -3
  19. package/dist/channels/github/events.js +1 -1
  20. package/dist/channels/github/forward.js +8 -8
  21. package/dist/channels/github/github-channel.d.ts.map +1 -1
  22. package/dist/channels/github/github-channel.js +17 -13
  23. package/dist/channels/github/progress.d.ts.map +1 -1
  24. package/dist/channels/github/progress.js +7 -2
  25. package/dist/channels/github/state.d.ts +6 -0
  26. package/dist/channels/github/state.d.ts.map +1 -1
  27. package/dist/channels/github/types.d.ts +6 -0
  28. package/dist/channels/github/types.d.ts.map +1 -1
  29. package/dist/channels/gitlab/binding.js +4 -4
  30. package/dist/channels/gitlab/checks.d.ts.map +1 -1
  31. package/dist/channels/gitlab/checks.js +1 -1
  32. package/dist/channels/gitlab/cursor-account.js +1 -1
  33. package/dist/channels/gitlab/events.js +1 -1
  34. package/dist/channels/gitlab/gitlab-channel.js +1 -1
  35. package/dist/channels/gitlab/gitlab-webhook.js +1 -1
  36. package/dist/channels/gitlab/replay.js +2 -2
  37. package/dist/channels/origin/binding.d.ts +2 -0
  38. package/dist/channels/origin/binding.d.ts.map +1 -1
  39. package/dist/channels/origin/binding.js +3 -3
  40. package/dist/channels/origin/checks.d.ts +19 -7
  41. package/dist/channels/origin/checks.d.ts.map +1 -1
  42. package/dist/channels/origin/checks.js +13 -9
  43. package/dist/channels/origin/cursor-account.js +1 -1
  44. package/dist/channels/origin/defaults.d.ts.map +1 -1
  45. package/dist/channels/origin/defaults.js +3 -1
  46. package/dist/channels/origin/events.js +1 -1
  47. package/dist/channels/origin/origin-channel.d.ts.map +1 -1
  48. package/dist/channels/origin/origin-channel.js +2 -1
  49. package/dist/channels/origin/origin-webhook.js +2 -2
  50. package/dist/channels/slack/agentic-delivery.d.ts +23 -0
  51. package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
  52. package/dist/channels/slack/agentic-delivery.js +558 -0
  53. package/dist/channels/slack/agentic-posted.d.ts +30 -0
  54. package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
  55. package/dist/channels/slack/agentic-posted.js +102 -0
  56. package/dist/channels/slack/agentic-signals.d.ts +48 -0
  57. package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
  58. package/dist/channels/slack/agentic-signals.js +204 -0
  59. package/dist/channels/slack/api.d.ts +20 -1
  60. package/dist/channels/slack/api.d.ts.map +1 -1
  61. package/dist/channels/slack/api.js +43 -11
  62. package/dist/channels/slack/approvals.js +1 -1
  63. package/dist/channels/slack/auth.d.ts.map +1 -1
  64. package/dist/channels/slack/auth.js +3 -1
  65. package/dist/channels/slack/blocks.js +3 -3
  66. package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
  67. package/dist/channels/slack/bot-mentions.js +5 -5
  68. package/dist/channels/slack/channel-watch.js +1 -1
  69. package/dist/channels/slack/cli-project.js +3 -3
  70. package/dist/channels/slack/defaults.d.ts +3 -0
  71. package/dist/channels/slack/defaults.d.ts.map +1 -1
  72. package/dist/channels/slack/defaults.js +90 -29
  73. package/dist/channels/slack/dispatch.d.ts +34 -1
  74. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  75. package/dist/channels/slack/dispatch.js +219 -106
  76. package/dist/channels/slack/doctor.js +1 -1
  77. package/dist/channels/slack/eval-directive.js +1 -1
  78. package/dist/channels/slack/external-policy.d.ts +2 -1
  79. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  80. package/dist/channels/slack/external-policy.js +13 -2
  81. package/dist/channels/slack/footer.d.ts +30 -0
  82. package/dist/channels/slack/footer.d.ts.map +1 -0
  83. package/dist/channels/slack/footer.js +88 -0
  84. package/dist/channels/slack/index.d.ts +2 -0
  85. package/dist/channels/slack/index.d.ts.map +1 -1
  86. package/dist/channels/slack/index.js +2 -0
  87. package/dist/channels/slack/interactive.d.ts.map +1 -1
  88. package/dist/channels/slack/interactive.js +5 -3
  89. package/dist/channels/slack/live-delivery.d.ts +1 -1
  90. package/dist/channels/slack/live-delivery.d.ts.map +1 -1
  91. package/dist/channels/slack/live-delivery.js +20 -6
  92. package/dist/channels/slack/log.d.ts.map +1 -1
  93. package/dist/channels/slack/log.js +1 -1
  94. package/dist/channels/slack/manifest.js +1 -1
  95. package/dist/channels/slack/nudge-carrier.js +1 -1
  96. package/dist/channels/slack/nudge-store.js +2 -2
  97. package/dist/channels/slack/paint-start.d.ts +22 -0
  98. package/dist/channels/slack/paint-start.d.ts.map +1 -0
  99. package/dist/channels/slack/paint-start.js +91 -0
  100. package/dist/channels/slack/placeholder.d.ts +36 -0
  101. package/dist/channels/slack/placeholder.d.ts.map +1 -0
  102. package/dist/channels/slack/placeholder.js +240 -0
  103. package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
  104. package/dist/channels/slack/progress-delivery.js +13 -4
  105. package/dist/channels/slack/reasoning-chip.d.ts +8 -0
  106. package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
  107. package/dist/channels/slack/reasoning-chip.js +30 -0
  108. package/dist/channels/slack/recording-sink.d.ts +29 -0
  109. package/dist/channels/slack/recording-sink.d.ts.map +1 -0
  110. package/dist/channels/slack/recording-sink.js +142 -0
  111. package/dist/channels/slack/reply-options.d.ts +8 -1
  112. package/dist/channels/slack/reply-options.d.ts.map +1 -1
  113. package/dist/channels/slack/reply-options.js +59 -14
  114. package/dist/channels/slack/setup.js +1 -1
  115. package/dist/channels/slack/slack-channel.d.ts +2 -2
  116. package/dist/channels/slack/slack-channel.d.ts.map +1 -1
  117. package/dist/channels/slack/slack-channel.js +55 -20
  118. package/dist/channels/slack/socket-mode.js +2 -2
  119. package/dist/channels/slack/thread-context.js +5 -5
  120. package/dist/channels/slack/tool-approval-events.d.ts +5 -0
  121. package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
  122. package/dist/channels/slack/tool-approval-events.js +50 -38
  123. package/dist/channels/slack/tool-cards.js +1 -1
  124. package/dist/channels/slack/tool-chip.d.ts +9 -0
  125. package/dist/channels/slack/tool-chip.d.ts.map +1 -0
  126. package/dist/channels/slack/tool-chip.js +25 -0
  127. package/dist/channels/slack/types.d.ts +49 -7
  128. package/dist/channels/slack/types.d.ts.map +1 -1
  129. package/dist/channels/slack/upload.d.ts +13 -0
  130. package/dist/channels/slack/upload.d.ts.map +1 -0
  131. package/dist/channels/slack/upload.js +135 -0
  132. package/dist/channels.d.ts +10 -14
  133. package/dist/channels.d.ts.map +1 -1
  134. package/dist/channels.js +9 -21
  135. package/dist/dashboard-session-url.d.ts +15 -0
  136. package/dist/dashboard-session-url.d.ts.map +1 -0
  137. package/dist/dashboard-session-url.js +25 -0
  138. package/dist/docs/404.html +3 -3
  139. package/dist/docs/architecture.svg +59 -0
  140. package/dist/docs/assets/app.Drol6mi6.js +309 -0
  141. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.js → building-with-agents.md.CEGVXkmO.js} +2 -2
  142. package/dist/docs/assets/{building-with-agents.md.D0KbSkJn.lean.js → building-with-agents.md.CEGVXkmO.lean.js} +1 -1
  143. package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +1 -0
  144. package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CdqoBZJX.js} +2 -2
  145. package/dist/docs/assets/chunks/arc.BVX3ycTn.js +1 -0
  146. package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CcChnMxX.js +36 -0
  147. package/dist/docs/assets/chunks/baseUniq.xwtXO-yt.js +1 -0
  148. package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.CijZ_taK.js +132 -0
  149. package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.0FBvwBvK.js +10 -0
  150. package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +1 -0
  151. package/dist/docs/assets/chunks/chunk-4BX2VUAB.CELMmMDA.js +1 -0
  152. package/dist/docs/assets/chunks/chunk-4TB4RGXK.C4bhFtSm.js +206 -0
  153. package/dist/docs/assets/chunks/chunk-55IACEB6.ZnQ9gRRQ.js +1 -0
  154. package/dist/docs/assets/chunks/chunk-EDXVE4YY.DPlmglG-.js +1 -0
  155. package/dist/docs/assets/chunks/chunk-FMBD7UC4.BrUk8pff.js +15 -0
  156. package/dist/docs/assets/chunks/chunk-OYMX7WX6.CcmWIncu.js +231 -0
  157. package/dist/docs/assets/chunks/chunk-QZHKN3VN.D65-cs8I.js +1 -0
  158. package/dist/docs/assets/chunks/chunk-YZCP3GAM.qoXZpG9F.js +1 -0
  159. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +1 -0
  160. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +1 -0
  161. package/dist/docs/assets/chunks/clone.YSt_40_s.js +1 -0
  162. package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.8rYtqudO.js +1 -0
  163. package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
  164. package/dist/docs/assets/chunks/dagre-KV5264BT.DrRP1fOh.js +4 -0
  165. package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
  166. package/dist/docs/assets/chunks/diagram-5BDNPKRD.DHj_xA2_.js +10 -0
  167. package/dist/docs/assets/chunks/diagram-G4DWMVQ6.Bz_6nAKj.js +24 -0
  168. package/dist/docs/assets/chunks/diagram-MMDJMWI5.BWA0xSW9.js +43 -0
  169. package/dist/docs/assets/chunks/diagram-TYMM5635.CpTJLNJI.js +24 -0
  170. package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.-7AWWSrP.js +85 -0
  171. package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.BTnQ742_.js +162 -0
  172. package/dist/docs/assets/chunks/framework.dypDpWZ3.js +19 -0
  173. package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.B5_HiiQ5.js +292 -0
  174. package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.CZcNTFZd.js +106 -0
  175. package/dist/docs/assets/chunks/graph.V2GLaab4.js +1 -0
  176. package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.7pZOkCCU.js +2 -0
  177. package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
  178. package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js +70 -0
  179. package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.BNEgWN1S.js +139 -0
  180. package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.B-4d4tC7.js +89 -0
  181. package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
  182. package/dist/docs/assets/chunks/layout.Dvbn9nSb.js +1 -0
  183. package/dist/docs/assets/chunks/linear.D2GM4p4b.js +1 -0
  184. package/dist/docs/assets/chunks/min.DVBtLK-B.js +1 -0
  185. package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.CnJRI55x.js +96 -0
  186. package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
  187. package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CtoaTFlA.js +30 -0
  188. package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.DtT24_vN.js +7 -0
  189. package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.CjSO4o8f.js +84 -0
  190. package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.-wWiIVWa.js +10 -0
  191. package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.DSk8s4gX.js +157 -0
  192. package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.BFKAsdkN.js +1 -0
  193. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +1 -0
  194. package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.C0MctGaz.js} +2 -2
  195. package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.TUNJbAFe.js +120 -0
  196. package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.C-RGNnk4.js +34 -0
  197. package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
  198. package/dist/docs/assets/chunks/wardley-RL74JXVD.g5efOWmT.js +162 -0
  199. package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.DH4zt73Y.js +20 -0
  200. package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.B-3k6bF6.js +7 -0
  201. package/dist/docs/assets/{deployment.md.JenwuCCB.js → deployment.md.Dm4Qo3hp.js} +5 -5
  202. package/dist/docs/assets/{deployment.md.JenwuCCB.lean.js → deployment.md.Dm4Qo3hp.lean.js} +1 -1
  203. package/dist/docs/assets/{evals.md.C7JLjoEP.js → evals.md.BLDRt5LH.js} +4 -4
  204. package/dist/docs/assets/{evals.md.C7JLjoEP.lean.js → evals.md.BLDRt5LH.lean.js} +1 -1
  205. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +14 -0
  206. package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +1 -0
  207. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.js → guides_bitbucket.md.CTpCl__f.js} +1 -1
  208. package/dist/docs/assets/{guides_bitbucket.md.DZPzmUjU.lean.js → guides_bitbucket.md.CTpCl__f.lean.js} +1 -1
  209. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.js → guides_cloud-agents.md.lSE_l7lH.js} +2 -2
  210. package/dist/docs/assets/{guides_cloud-agents.md.BsloyHdY.lean.js → guides_cloud-agents.md.lSE_l7lH.lean.js} +1 -1
  211. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.js → guides_convert-automation.md.Ck6Cr68A.js} +1 -1
  212. package/dist/docs/assets/{guides_convert-automation.md.B4sjlodG.lean.js → guides_convert-automation.md.Ck6Cr68A.lean.js} +1 -1
  213. package/dist/docs/assets/{guides_github.md.TZaTZlfz.js → guides_github.md.D6ER29dG.js} +1 -1
  214. package/dist/docs/assets/{guides_github.md.TZaTZlfz.lean.js → guides_github.md.D6ER29dG.lean.js} +1 -1
  215. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.js → guides_gitlab.md.P-TjBnS5.js} +1 -1
  216. package/dist/docs/assets/{guides_gitlab.md.BmqwQfdG.lean.js → guides_gitlab.md.P-TjBnS5.lean.js} +1 -1
  217. package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +9 -0
  218. package/dist/docs/assets/{guides_grokbot-agents.md.DyV-WArv.lean.js → guides_grokbot-agents.md.WBZIOvkz.lean.js} +1 -1
  219. package/dist/docs/assets/{guides_improve.md.BGVk32bK.js → guides_improve.md.BKaDuKKK.js} +1 -1
  220. package/dist/docs/assets/{guides_improve.md.BGVk32bK.lean.js → guides_improve.md.BKaDuKKK.lean.js} +1 -1
  221. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.js → guides_mcp-oauth.md.DMNMpXtO.js} +1 -1
  222. package/dist/docs/assets/{guides_mcp-oauth.md.Dp6cDP7f.lean.js → guides_mcp-oauth.md.DMNMpXtO.lean.js} +1 -1
  223. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.js → guides_opentelemetry.md._CRfDyzH.js} +14 -14
  224. package/dist/docs/assets/{guides_opentelemetry.md.SCRMskno.lean.js → guides_opentelemetry.md._CRfDyzH.lean.js} +1 -1
  225. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.js → guides_slack.md.DdT8rmsj.js} +12 -4
  226. package/dist/docs/assets/{guides_slack.md.D4RVMM4G.lean.js → guides_slack.md.DdT8rmsj.lean.js} +1 -1
  227. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.js → guides_webhooks.md.aQW10HRe.js} +2 -2
  228. package/dist/docs/assets/{guides_webhooks.md.CJK484ex.lean.js → guides_webhooks.md.aQW10HRe.lean.js} +1 -1
  229. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +1 -0
  230. package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +1 -0
  231. package/dist/docs/assets/index.md.BFVyY2KT.js +17 -0
  232. package/dist/docs/assets/index.md.BFVyY2KT.lean.js +1 -0
  233. package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.D3MjSZN-.js} +30 -38
  234. package/dist/docs/assets/quickstart.md.D3MjSZN-.lean.js +1 -0
  235. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.CfVA-LZJ.js} +1 -1
  236. package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.CfVA-LZJ.lean.js} +1 -1
  237. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Vf7qyIZ-.js} +1 -1
  238. package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Vf7qyIZ-.lean.js} +1 -1
  239. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.icqLKcTc.js} +2 -12
  240. package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.icqLKcTc.lean.js} +1 -1
  241. package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.B2dBL6L8.js} +3 -3
  242. package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.B2dBL6L8.lean.js} +1 -1
  243. package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.Cb3U_c8n.js} +4 -4
  244. package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.Cb3U_c8n.lean.js} +1 -1
  245. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.js → reference_extensions.md.wlFD3cUR.js} +2 -2
  246. package/dist/docs/assets/{reference_extensions.md.ZAVUyuEX.lean.js → reference_extensions.md.wlFD3cUR.lean.js} +1 -1
  247. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.CZuynAxj.js} +3 -3
  248. package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.CZuynAxj.lean.js} +1 -1
  249. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.DTKcYE6L.js} +3 -3
  250. package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.DTKcYE6L.lean.js} +1 -1
  251. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.D7gkckK-.js} +1 -1
  252. package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.D7gkckK-.lean.js} +1 -1
  253. package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.D2YExv5K.js} +1 -1
  254. package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.D2YExv5K.lean.js} +1 -1
  255. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.DPxbUJyt.js} +3 -3
  256. package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.DPxbUJyt.lean.js} +1 -1
  257. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.BQ5uAv1F.js} +1 -1
  258. package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.BQ5uAv1F.lean.js} +1 -1
  259. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.BasfZWO-.js} +1 -1
  260. package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.BasfZWO-.lean.js} +1 -1
  261. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.YKvIsWAx.js} +1 -1
  262. package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.YKvIsWAx.lean.js} +1 -1
  263. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.rNgpsGd0.js} +1 -1
  264. package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.rNgpsGd0.lean.js} +1 -1
  265. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.e5qitjJt.js} +2 -2
  266. package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.e5qitjJt.lean.js} +1 -1
  267. package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BdCO2aHZ.js} +4 -4
  268. package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BdCO2aHZ.lean.js} +1 -1
  269. package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
  270. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.Da_AGDlH.js} +1 -1
  271. package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.Da_AGDlH.lean.js} +1 -1
  272. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.DqxocIGh.js} +1 -1
  273. package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.DqxocIGh.lean.js} +1 -1
  274. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.Bhnvd8VE.js} +1 -1
  275. package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.Bhnvd8VE.lean.js} +1 -1
  276. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.BdBWO9Ic.js} +1 -1
  277. package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.BdBWO9Ic.lean.js} +1 -1
  278. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.js → troubleshooting.md.BcgNoYtJ.js} +1 -1
  279. package/dist/docs/assets/{troubleshooting.md.CYEAO9bM.lean.js → troubleshooting.md.BcgNoYtJ.lean.js} +1 -1
  280. package/dist/docs/building-with-agents.html +41 -8
  281. package/dist/docs/building-with-agents.md +13 -15
  282. package/dist/docs/deployment.html +44 -11
  283. package/dist/docs/deployment.md +6 -7
  284. package/dist/docs/evals.html +44 -11
  285. package/dist/docs/evals.md +5 -5
  286. package/dist/docs/guides/agent-to-agent.html +48 -11
  287. package/dist/docs/guides/agent-to-agent.md +40 -83
  288. package/dist/docs/guides/bitbucket.html +41 -8
  289. package/dist/docs/guides/cloud-agents.html +41 -8
  290. package/dist/docs/guides/cloud-agents.md +24 -20
  291. package/dist/docs/guides/convert-automation.html +41 -8
  292. package/dist/docs/guides/github.html +41 -8
  293. package/dist/docs/guides/github.md +1 -1
  294. package/dist/docs/guides/gitlab.html +41 -8
  295. package/dist/docs/guides/grokbot-agents.html +41 -8
  296. package/dist/docs/guides/grokbot-agents.md +26 -19
  297. package/dist/docs/guides/improve.html +41 -8
  298. package/dist/docs/guides/mcp-oauth.html +41 -8
  299. package/dist/docs/guides/mcp-oauth.md +1 -1
  300. package/dist/docs/guides/opentelemetry.html +53 -20
  301. package/dist/docs/guides/opentelemetry.md +28 -41
  302. package/dist/docs/guides/slack.html +51 -10
  303. package/dist/docs/guides/slack.md +53 -4
  304. package/dist/docs/guides/webhooks.html +42 -9
  305. package/dist/docs/guides/webhooks.md +3 -4
  306. package/dist/docs/hashmap.json +1 -1
  307. package/dist/docs/hillclimbing.html +40 -10
  308. package/dist/docs/hillclimbing.md +5 -5
  309. package/dist/docs/index.html +57 -12
  310. package/dist/docs/index.md +81 -150
  311. package/dist/docs/llms-full.txt +5779 -10297
  312. package/dist/docs/llms.txt +3 -29
  313. package/dist/docs/quickstart.html +70 -45
  314. package/dist/docs/quickstart.md +44 -105
  315. package/dist/docs/reference/agent-config.html +41 -8
  316. package/dist/docs/reference/artifacts.html +41 -8
  317. package/dist/docs/reference/channels.html +41 -18
  318. package/dist/docs/reference/channels.md +0 -16
  319. package/dist/docs/reference/cli.html +42 -9
  320. package/dist/docs/reference/cli.md +0 -16
  321. package/dist/docs/reference/connections.html +43 -10
  322. package/dist/docs/reference/connections.md +3 -5
  323. package/dist/docs/reference/extensions.html +42 -9
  324. package/dist/docs/reference/extensions.md +2 -2
  325. package/dist/docs/reference/hooks.html +42 -9
  326. package/dist/docs/reference/hooks.md +2 -4
  327. package/dist/docs/reference/http-api.html +42 -9
  328. package/dist/docs/reference/http-api.md +5 -5
  329. package/dist/docs/reference/instructions.html +41 -8
  330. package/dist/docs/reference/playground.html +40 -7
  331. package/dist/docs/reference/playground.md +2 -2
  332. package/dist/docs/reference/project-layout.html +42 -9
  333. package/dist/docs/reference/project-layout.md +3 -4
  334. package/dist/docs/reference/prompt.html +41 -8
  335. package/dist/docs/reference/schedules.html +41 -8
  336. package/dist/docs/reference/sessions.html +40 -7
  337. package/dist/docs/reference/sessions.md +5 -4
  338. package/dist/docs/reference/skills.html +41 -8
  339. package/dist/docs/reference/subagents.html +41 -8
  340. package/dist/docs/reference/subagents.md +2 -4
  341. package/dist/docs/reference/tools.html +43 -10
  342. package/dist/docs/reference/tools.md +2 -5
  343. package/dist/docs/templates/agentic-owners.html +41 -8
  344. package/dist/docs/templates/pr-autofixer.html +41 -8
  345. package/dist/docs/templates/security-reviewer.html +41 -8
  346. package/dist/docs/templates/triage.html +41 -8
  347. package/dist/docs/troubleshooting.html +40 -7
  348. package/dist/docs/troubleshooting.md +1 -2
  349. package/dist/evals/assertions.js +19 -19
  350. package/dist/evals/expect.js +1 -1
  351. package/dist/evals/judge.js +1 -1
  352. package/dist/evals/reporters.d.ts.map +1 -1
  353. package/dist/evals/reporters.js +8 -8
  354. package/dist/evals/run-facts.js +2 -2
  355. package/dist/evals.d.ts +1 -1
  356. package/dist/evals.d.ts.map +1 -1
  357. package/dist/evals.js +7 -7
  358. package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
  359. package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
  360. package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
  361. package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
  362. package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
  363. package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
  364. package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
  365. package/dist/extensions/improve/skills/yourself.js +1 -1
  366. package/dist/extensions/slack-communication/extension.d.ts +28 -0
  367. package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
  368. package/dist/extensions/slack-communication/extension.js +32 -0
  369. package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
  370. package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
  371. package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
  372. package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
  373. package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
  374. package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
  375. package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
  376. package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
  377. package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
  378. package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
  379. package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
  380. package/dist/extensions/slack-communication/tools/post-card.js +25 -0
  381. package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
  382. package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
  383. package/dist/extensions/slack-communication/tools/post-file.js +76 -0
  384. package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
  385. package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
  386. package/dist/extensions/slack-communication/tools/post-update.js +36 -0
  387. package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
  388. package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
  389. package/dist/extensions/slack-communication/tools/react.js +27 -0
  390. package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
  391. package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
  392. package/dist/extensions/slack-communication/tools/set-status.js +18 -0
  393. package/dist/files-backends/cursor-hosted.d.ts +18 -6
  394. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  395. package/dist/files-backends/cursor-hosted.js +357 -74
  396. package/dist/files-backends/local-fs.js +1 -1
  397. package/dist/files.d.ts +15 -0
  398. package/dist/files.d.ts.map +1 -1
  399. package/dist/filesystem.d.ts.map +1 -1
  400. package/dist/filesystem.js +15 -15
  401. package/dist/index.d.ts +5 -8
  402. package/dist/index.d.ts.map +1 -1
  403. package/dist/index.js +4 -6
  404. package/dist/internal/advertise-tools.js +6 -6
  405. package/dist/internal/approval-gate.js +1 -1
  406. package/dist/internal/artifacts-store.js +3 -3
  407. package/dist/internal/as-of.js +2 -2
  408. package/dist/internal/authored-alias-hooks.js +1 -1
  409. package/dist/internal/builtin-tools/reminders.js +2 -2
  410. package/dist/internal/chat-client.js +5 -5
  411. package/dist/internal/cli-ax.d.ts +1 -0
  412. package/dist/internal/cli-ax.d.ts.map +1 -1
  413. package/dist/internal/cli-ax.js +68 -13
  414. package/dist/internal/cli-bitbucket.js +10 -10
  415. package/dist/internal/cli-convert-automation.js +2 -2
  416. package/dist/internal/cli-cursor.d.ts +3 -11
  417. package/dist/internal/cli-cursor.d.ts.map +1 -1
  418. package/dist/internal/cli-cursor.js +5 -10
  419. package/dist/internal/cli-deploy.d.ts +12 -2
  420. package/dist/internal/cli-deploy.d.ts.map +1 -1
  421. package/dist/internal/cli-deploy.js +328 -96
  422. package/dist/internal/cli-docs.js +5 -5
  423. package/dist/internal/cli-github.js +15 -16
  424. package/dist/internal/cli-gitlab.js +10 -10
  425. package/dist/internal/cli-manifest.js +1 -1
  426. package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
  427. package/dist/internal/cli-mcp-oauth.js +5 -5
  428. package/dist/internal/cli-mcp.js +3 -3
  429. package/dist/internal/cli-skills.js +2 -2
  430. package/dist/internal/cli-slack.js +5 -5
  431. package/dist/internal/cloud-turn-cost.js +1 -1
  432. package/dist/internal/continuation-identity.d.ts.map +1 -1
  433. package/dist/internal/continuation-identity.js +14 -9
  434. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  435. package/dist/internal/conversation-mirror.js +33 -2
  436. package/dist/internal/convert-automation/convert-workflow.js +25 -24
  437. package/dist/internal/convert-automation/types.d.ts +8 -0
  438. package/dist/internal/convert-automation/types.d.ts.map +1 -1
  439. package/dist/internal/cursor/account-mcp.d.ts +2 -2
  440. package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
  441. package/dist/internal/cursor/account-mcp.js +32 -27
  442. package/dist/internal/cursor/backend-client.d.ts +15 -10
  443. package/dist/internal/cursor/backend-client.d.ts.map +1 -1
  444. package/dist/internal/cursor/backend-client.js +17 -11
  445. package/dist/internal/cursor/credentials.js +1 -1
  446. package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
  447. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  448. package/dist/internal/cursor/hosted-store-secrets.js +25 -0
  449. package/dist/internal/cursor-account-mcp-auth.js +9 -9
  450. package/dist/internal/cursor-deployment-relay.js +9 -9
  451. package/dist/internal/cursor-event-relay.js +10 -10
  452. package/dist/internal/cursor-relay-core.js +2 -2
  453. package/dist/internal/deploy-client.d.ts +106 -9
  454. package/dist/internal/deploy-client.d.ts.map +1 -1
  455. package/dist/internal/deploy-client.js +171 -23
  456. package/dist/internal/deploy-manifest.d.ts +13 -0
  457. package/dist/internal/deploy-manifest.d.ts.map +1 -1
  458. package/dist/internal/deploy-manifest.js +32 -16
  459. package/dist/internal/discovery/agent-config.d.ts +5 -0
  460. package/dist/internal/discovery/agent-config.d.ts.map +1 -1
  461. package/dist/internal/discovery/agent-config.js +27 -0
  462. package/dist/internal/discovery/agent.d.ts.map +1 -1
  463. package/dist/internal/discovery/agent.js +10 -8
  464. package/dist/internal/discovery/channels.js +4 -4
  465. package/dist/internal/discovery/connections.js +4 -4
  466. package/dist/internal/discovery/cursor-plugin.js +12 -12
  467. package/dist/internal/discovery/extension-overlay.js +3 -3
  468. package/dist/internal/discovery/extensions.js +6 -6
  469. package/dist/internal/discovery/info.js +9 -9
  470. package/dist/internal/discovery/instructions.js +1 -1
  471. package/dist/internal/discovery/project.d.ts.map +1 -1
  472. package/dist/internal/discovery/project.js +4 -4
  473. package/dist/internal/discovery/services.js +1 -1
  474. package/dist/internal/discovery/tools.js +1 -1
  475. package/dist/internal/docs-site.js +2 -2
  476. package/dist/internal/env-file.js +1 -1
  477. package/dist/internal/eval-run-store.d.ts.map +1 -1
  478. package/dist/internal/eval-run-store.js +7 -7
  479. package/dist/internal/eval-runner.js +14 -14
  480. package/dist/internal/evals-client.js +4 -4
  481. package/dist/internal/event-log.js +8 -8
  482. package/dist/internal/event-mapper.d.ts +18 -0
  483. package/dist/internal/event-mapper.d.ts.map +1 -1
  484. package/dist/internal/event-mapper.js +34 -2
  485. package/dist/internal/filesystem/format.d.ts.map +1 -1
  486. package/dist/internal/filesystem/format.js +6 -3
  487. package/dist/internal/filesystem/scratch.js +3 -3
  488. package/dist/internal/filesystem/tools.d.ts.map +1 -1
  489. package/dist/internal/filesystem/tools.js +6 -6
  490. package/dist/internal/filesystem/walk.js +1 -1
  491. package/dist/internal/framework-file-storage.d.ts +6 -2
  492. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  493. package/dist/internal/framework-file-storage.js +91 -2
  494. package/dist/internal/framework-storage-selection.d.ts +0 -6
  495. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  496. package/dist/internal/framework-storage-selection.js +2 -11
  497. package/dist/internal/github-fanout.js +3 -3
  498. package/dist/internal/guest-network.js +4 -4
  499. package/dist/internal/host-files.js +1 -1
  500. package/dist/internal/host-kv.js +2 -2
  501. package/dist/internal/hosted-admission-adapter.d.ts +2 -0
  502. package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
  503. package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
  504. package/dist/internal/hosted-catch-protocol.js +2 -4
  505. package/dist/internal/hosted-catch.js +1 -1
  506. package/dist/internal/hosted-delivery-protocol.d.ts +29 -0
  507. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  508. package/dist/internal/hosted-delivery-protocol.js +76 -8
  509. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  510. package/dist/internal/hosted-delivery.js +201 -64
  511. package/dist/internal/hosted-execution-diag.js +3 -3
  512. package/dist/internal/hosted-execution-latency.d.ts +80 -0
  513. package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
  514. package/dist/internal/hosted-execution-latency.js +220 -0
  515. package/dist/internal/hosting.d.ts +5 -5
  516. package/dist/internal/hosting.d.ts.map +1 -1
  517. package/dist/internal/hosting.js +5 -6
  518. package/dist/internal/http-channel-define.d.ts +11 -0
  519. package/dist/internal/http-channel-define.d.ts.map +1 -0
  520. package/dist/internal/http-channel-define.js +18 -0
  521. package/dist/internal/http-channel.d.ts +2 -3
  522. package/dist/internal/http-channel.d.ts.map +1 -1
  523. package/dist/internal/http-channel.js +3 -4
  524. package/dist/internal/http-control-plane-session.d.ts +7 -3
  525. package/dist/internal/http-control-plane-session.d.ts.map +1 -1
  526. package/dist/internal/http-control-plane-session.js +22 -10
  527. package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
  528. package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
  529. package/dist/internal/incoming-headers-to-fetch.js +41 -0
  530. package/dist/internal/init-interview.js +7 -7
  531. package/dist/internal/init-project.d.ts.map +1 -1
  532. package/dist/internal/init-project.js +14 -14
  533. package/dist/internal/init-scaffold.js +1 -1
  534. package/dist/internal/inline-stdio-mcp.js +2 -2
  535. package/dist/internal/install-cursor-skills.js +10 -10
  536. package/dist/internal/json-schema.js +1 -1
  537. package/dist/internal/local-control-plane.d.ts.map +1 -1
  538. package/dist/internal/local-control-plane.js +3 -3
  539. package/dist/internal/local-env.js +3 -3
  540. package/dist/internal/log-ring.js +1 -1
  541. package/dist/internal/logs-client.js +1 -1
  542. package/dist/internal/mcp-endpoint.js +8 -8
  543. package/dist/internal/mcp-host.js +4 -4
  544. package/dist/internal/mcp-oauth-on-demand.js +3 -3
  545. package/dist/internal/mcp-oauth.js +5 -5
  546. package/dist/internal/net.js +2 -2
  547. package/dist/internal/otel/config.js +3 -3
  548. package/dist/internal/otel/runtime.js +13 -13
  549. package/dist/internal/peer-connections.js +2 -2
  550. package/dist/internal/platform-schedule-sync.js +1 -1
  551. package/dist/internal/platform-timers.js +1 -1
  552. package/dist/internal/playground/static.js +2 -2
  553. package/dist/internal/playground/toolchain.js +2 -2
  554. package/dist/internal/playground-proxy.js +3 -3
  555. package/dist/internal/process-memory-telemetry.js +1 -1
  556. package/dist/internal/reminder-runner.d.ts.map +1 -1
  557. package/dist/internal/reminder-runner.js +7 -7
  558. package/dist/internal/reminder-store.js +1 -1
  559. package/dist/internal/request-error-status.d.ts.map +1 -1
  560. package/dist/internal/request-error-status.js +9 -0
  561. package/dist/internal/resolved-connections.js +8 -8
  562. package/dist/internal/result-output.d.ts +14 -2
  563. package/dist/internal/result-output.d.ts.map +1 -1
  564. package/dist/internal/result-output.js +45 -2
  565. package/dist/internal/router.js +4 -4
  566. package/dist/internal/run-client.js +2 -2
  567. package/dist/internal/schedule-runner.js +6 -6
  568. package/dist/internal/scm/pr-url.d.ts +3 -1
  569. package/dist/internal/scm/pr-url.d.ts.map +1 -1
  570. package/dist/internal/scm/pr-url.js +10 -2
  571. package/dist/internal/sdk-runner.d.ts.map +1 -1
  572. package/dist/internal/sdk-runner.js +14 -15
  573. package/dist/internal/serve-restart.js +1 -1
  574. package/dist/internal/server.d.ts.map +1 -1
  575. package/dist/internal/server.js +81 -87
  576. package/dist/internal/session-cost.js +3 -3
  577. package/dist/internal/session-engine.d.ts +34 -0
  578. package/dist/internal/session-engine.d.ts.map +1 -1
  579. package/dist/internal/session-engine.js +380 -184
  580. package/dist/internal/session-run-log.d.ts.map +1 -1
  581. package/dist/internal/session-run-log.js +4 -4
  582. package/dist/internal/session-store.d.ts +47 -3
  583. package/dist/internal/session-store.d.ts.map +1 -1
  584. package/dist/internal/session-store.js +198 -33
  585. package/dist/internal/sessions-client.js +3 -3
  586. package/dist/internal/slack-thread-key.d.ts +7 -0
  587. package/dist/internal/slack-thread-key.d.ts.map +1 -0
  588. package/dist/internal/slack-thread-key.js +10 -0
  589. package/dist/internal/sleep.js +1 -1
  590. package/dist/internal/storage-coordinator.d.ts +17 -0
  591. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  592. package/dist/internal/storage-coordinator.js +111 -11
  593. package/dist/internal/storage.d.ts +2 -0
  594. package/dist/internal/storage.d.ts.map +1 -0
  595. package/dist/internal/storage.js +1 -0
  596. package/dist/internal/store-mirror.js +4 -4
  597. package/dist/internal/terminal-style.js +2 -2
  598. package/dist/internal/tool-result.js +3 -3
  599. package/dist/internal/trajectory.js +7 -7
  600. package/dist/internal/turn-governor.js +2 -2
  601. package/dist/internal/turn-outbox.js +1 -1
  602. package/dist/internal/update-check.js +2 -2
  603. package/dist/internal/v2-hosting.d.ts +9 -0
  604. package/dist/internal/v2-hosting.d.ts.map +1 -1
  605. package/dist/internal/v2-hosting.js +10 -0
  606. package/dist/internal/workspace.d.ts +13 -10
  607. package/dist/internal/workspace.d.ts.map +1 -1
  608. package/dist/internal/workspace.js +17 -16
  609. package/dist/kv/memory-kv.d.ts +6 -4
  610. package/dist/kv/memory-kv.d.ts.map +1 -1
  611. package/dist/kv/memory-kv.js +9 -7
  612. package/dist/kv.d.ts +4 -7
  613. package/dist/kv.d.ts.map +1 -1
  614. package/dist/kv.js +4 -7
  615. package/dist/otel-public.d.ts +7 -0
  616. package/dist/otel-public.d.ts.map +1 -0
  617. package/dist/otel-public.js +5 -0
  618. package/dist/otel.d.ts +7 -2
  619. package/dist/otel.d.ts.map +1 -1
  620. package/dist/otel.js +7 -2
  621. package/dist/playground/assets/index-BLlKgZtI.css +1 -0
  622. package/dist/playground/assets/index-CDS5p9sR.js +67 -0
  623. package/dist/playground/index.html +2 -2
  624. package/dist/prompt.js +1 -1
  625. package/dist/result.d.ts +10 -4
  626. package/dist/result.d.ts.map +1 -1
  627. package/dist/result.js +9 -3
  628. package/dist/storage-backends/cursor-hosted-v2.js +2 -2
  629. package/dist/storage-backends/cursor-hosted.d.ts +5 -17
  630. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  631. package/dist/storage-backends/cursor-hosted.js +6 -20
  632. package/dist/storage-backends/file-kv.js +7 -7
  633. package/dist/storage.d.ts +20 -2
  634. package/dist/storage.d.ts.map +1 -1
  635. package/dist/storage.js +7 -6
  636. package/dist/types.d.ts +67 -11
  637. package/dist/types.d.ts.map +1 -1
  638. package/dist/types.js +12 -4
  639. package/docs/README.md +83 -152
  640. package/docs/building-with-agents.md +13 -15
  641. package/docs/deployment.md +6 -7
  642. package/docs/evals.md +5 -5
  643. package/docs/guides/agent-to-agent.md +41 -84
  644. package/docs/guides/cloud-agents.md +25 -20
  645. package/docs/guides/github.md +1 -1
  646. package/docs/guides/grokbot-agents.md +27 -19
  647. package/docs/guides/mcp-oauth.md +1 -1
  648. package/docs/guides/opentelemetry.md +28 -41
  649. package/docs/guides/slack.md +53 -4
  650. package/docs/guides/webhooks.md +3 -4
  651. package/docs/hillclimbing.md +5 -5
  652. package/docs/quickstart.md +45 -106
  653. package/docs/reference/channels.md +0 -16
  654. package/docs/reference/cli.md +0 -16
  655. package/docs/reference/connections.md +3 -5
  656. package/docs/reference/extensions.md +2 -2
  657. package/docs/reference/hooks.md +2 -4
  658. package/docs/reference/http-api.md +5 -5
  659. package/docs/reference/playground.md +2 -2
  660. package/docs/reference/project-layout.md +3 -4
  661. package/docs/reference/sessions.md +5 -4
  662. package/docs/reference/subagents.md +2 -4
  663. package/docs/reference/tools.md +2 -5
  664. package/docs/troubleshooting.md +1 -2
  665. package/package.json +55 -37
  666. package/skills/framework-map/SKILL.md +2 -2
  667. package/skills/otel/SKILL.md +8 -18
  668. package/src/bin/agent-serve.ts +93 -72
  669. package/src/channels/bitbucket/api.ts +8 -8
  670. package/src/channels/bitbucket/binding.ts +4 -4
  671. package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
  672. package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
  673. package/src/channels/bitbucket/checks.ts +3 -4
  674. package/src/channels/bitbucket/cursor-account.ts +1 -1
  675. package/src/channels/bitbucket/events.ts +1 -1
  676. package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
  677. package/src/channels/checks.ts +5 -4
  678. package/src/channels/deployments/deployments-channel.ts +1 -1
  679. package/src/channels/github/api.ts +1 -1
  680. package/src/channels/github/checks.ts +1 -1
  681. package/src/channels/github/cursor-account.ts +3 -3
  682. package/src/channels/github/defaults.ts +8 -4
  683. package/src/channels/github/events.ts +1 -1
  684. package/src/channels/github/forward.ts +8 -8
  685. package/src/channels/github/github-channel.ts +19 -2
  686. package/src/channels/github/progress.ts +7 -2
  687. package/src/channels/github/state.ts +6 -0
  688. package/src/channels/github/types.ts +6 -0
  689. package/src/channels/gitlab/binding.ts +4 -4
  690. package/src/channels/gitlab/checks.ts +3 -4
  691. package/src/channels/gitlab/cursor-account.ts +1 -1
  692. package/src/channels/gitlab/events.ts +1 -1
  693. package/src/channels/gitlab/gitlab-channel.ts +1 -1
  694. package/src/channels/gitlab/gitlab-webhook.ts +1 -1
  695. package/src/channels/gitlab/replay.ts +2 -2
  696. package/src/channels/origin/binding.ts +6 -3
  697. package/src/channels/origin/checks.ts +27 -17
  698. package/src/channels/origin/cursor-account.ts +1 -1
  699. package/src/channels/origin/defaults.ts +5 -1
  700. package/src/channels/origin/events.ts +1 -1
  701. package/src/channels/origin/origin-channel.ts +2 -1
  702. package/src/channels/origin/origin-webhook.ts +2 -2
  703. package/src/channels/slack/agentic-delivery.ts +659 -0
  704. package/src/channels/slack/agentic-posted.ts +148 -0
  705. package/src/channels/slack/agentic-signals.ts +248 -0
  706. package/src/channels/slack/api.ts +51 -11
  707. package/src/channels/slack/approvals.ts +1 -1
  708. package/src/channels/slack/attachments.ts +1 -1
  709. package/src/channels/slack/auth.ts +3 -1
  710. package/src/channels/slack/blocks.ts +3 -3
  711. package/src/channels/slack/bot-mentions.ts +5 -7
  712. package/src/channels/slack/channel-watch.ts +1 -1
  713. package/src/channels/slack/cli-project.ts +3 -3
  714. package/src/channels/slack/defaults.ts +109 -37
  715. package/src/channels/slack/dispatch.ts +299 -170
  716. package/src/channels/slack/doctor.ts +1 -1
  717. package/src/channels/slack/eval-directive.ts +1 -1
  718. package/src/channels/slack/external-policy.ts +15 -2
  719. package/src/channels/slack/footer.ts +108 -0
  720. package/src/channels/slack/index.ts +2 -0
  721. package/src/channels/slack/interactive.ts +4 -2
  722. package/src/channels/slack/live-delivery.ts +23 -7
  723. package/src/channels/slack/log.ts +1 -1
  724. package/src/channels/slack/manifest.ts +1 -1
  725. package/src/channels/slack/nudge-carrier.ts +1 -1
  726. package/src/channels/slack/nudge-store.ts +2 -2
  727. package/src/channels/slack/paint-start.ts +93 -0
  728. package/src/channels/slack/placeholder.ts +315 -0
  729. package/src/channels/slack/progress-delivery.ts +14 -1
  730. package/src/channels/slack/reasoning-chip.ts +48 -0
  731. package/src/channels/slack/recording-sink.ts +176 -0
  732. package/src/channels/slack/reply-options.ts +71 -15
  733. package/src/channels/slack/setup.ts +1 -1
  734. package/src/channels/slack/slack-channel.ts +73 -13
  735. package/src/channels/slack/socket-mode.ts +2 -2
  736. package/src/channels/slack/thread-context.ts +5 -5
  737. package/src/channels/slack/tool-approval-events.ts +54 -38
  738. package/src/channels/slack/tool-cards.ts +1 -1
  739. package/src/channels/slack/tool-chip.ts +36 -0
  740. package/src/channels/slack/types.ts +47 -7
  741. package/src/channels/slack/upload.ts +142 -0
  742. package/src/channels.ts +12 -30
  743. package/src/dashboard-session-url.ts +32 -0
  744. package/src/evals/assertions.ts +19 -19
  745. package/src/evals/expect.ts +1 -1
  746. package/src/evals/judge.ts +1 -1
  747. package/src/evals/reporters.ts +8 -9
  748. package/src/evals/run-facts.ts +2 -2
  749. package/src/evals.ts +7 -10
  750. package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
  751. package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
  752. package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
  753. package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
  754. package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
  755. package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
  756. package/src/extensions/improve/skills/yourself.ts +1 -1
  757. package/src/extensions/slack-communication/evals/harness.ts +728 -0
  758. package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
  759. package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
  760. package/src/extensions/slack-communication/extension.ts +45 -0
  761. package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
  762. package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
  763. package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
  764. package/src/extensions/slack-communication/tools/post-card.ts +28 -0
  765. package/src/extensions/slack-communication/tools/post-file.ts +85 -0
  766. package/src/extensions/slack-communication/tools/post-update.ts +41 -0
  767. package/src/extensions/slack-communication/tools/react.ts +33 -0
  768. package/src/extensions/slack-communication/tools/set-status.ts +21 -0
  769. package/src/files-backends/cursor-hosted.ts +502 -98
  770. package/src/files-backends/local-fs.ts +1 -1
  771. package/src/files.ts +15 -0
  772. package/src/filesystem.ts +16 -18
  773. package/src/index.ts +4 -36
  774. package/src/internal/advertise-tools.ts +6 -6
  775. package/src/internal/approval-gate.ts +1 -1
  776. package/src/internal/artifacts-store.ts +3 -3
  777. package/src/internal/as-of.ts +2 -2
  778. package/src/internal/authored-alias-hooks.ts +1 -1
  779. package/src/internal/authored-loaders.ts +2 -3
  780. package/src/internal/builtin-tools/reminders.ts +2 -2
  781. package/src/internal/chat-client.ts +5 -5
  782. package/src/internal/cli-ax.ts +84 -14
  783. package/src/internal/cli-bitbucket.ts +11 -11
  784. package/src/internal/cli-convert-automation.ts +2 -2
  785. package/src/internal/cli-cursor.ts +5 -16
  786. package/src/internal/cli-deploy.ts +389 -104
  787. package/src/internal/cli-docs.ts +5 -5
  788. package/src/internal/cli-github.ts +16 -19
  789. package/src/internal/cli-gitlab.ts +11 -11
  790. package/src/internal/cli-manifest.ts +1 -1
  791. package/src/internal/cli-mcp-oauth.ts +5 -7
  792. package/src/internal/cli-mcp.ts +3 -3
  793. package/src/internal/cli-skills.ts +2 -2
  794. package/src/internal/cli-slack.ts +5 -5
  795. package/src/internal/cloud-turn-cost.ts +1 -1
  796. package/src/internal/continuation-identity.ts +13 -9
  797. package/src/internal/conversation-mirror.ts +36 -3
  798. package/src/internal/convert-automation/convert-workflow.ts +27 -27
  799. package/src/internal/convert-automation/types.ts +9 -0
  800. package/src/internal/cursor/account-mcp.ts +48 -31
  801. package/src/internal/cursor/backend-client.ts +28 -17
  802. package/src/internal/cursor/credentials.ts +1 -1
  803. package/src/internal/cursor/hosted-store-secrets.ts +34 -0
  804. package/src/internal/cursor-account-mcp-auth.ts +9 -9
  805. package/src/internal/cursor-deployment-relay.ts +10 -10
  806. package/src/internal/cursor-event-relay.ts +10 -10
  807. package/src/internal/cursor-relay-core.ts +2 -2
  808. package/src/internal/deploy-client.ts +266 -24
  809. package/src/internal/deploy-manifest.ts +46 -8
  810. package/src/internal/discovery/agent-config.ts +34 -0
  811. package/src/internal/discovery/agent.ts +14 -6
  812. package/src/internal/discovery/channels.ts +4 -4
  813. package/src/internal/discovery/connections.ts +4 -4
  814. package/src/internal/discovery/cursor-plugin.ts +12 -12
  815. package/src/internal/discovery/extension-overlay.ts +3 -3
  816. package/src/internal/discovery/extensions.ts +6 -6
  817. package/src/internal/discovery/info.ts +9 -9
  818. package/src/internal/discovery/instructions.ts +1 -1
  819. package/src/internal/discovery/project.ts +4 -4
  820. package/src/internal/discovery/services.ts +1 -1
  821. package/src/internal/discovery/tools.ts +1 -1
  822. package/src/internal/docs-site.ts +2 -2
  823. package/src/internal/env-file.ts +2 -2
  824. package/src/internal/eval-run-store.ts +7 -9
  825. package/src/internal/eval-runner.ts +20 -20
  826. package/src/internal/evals-client.ts +6 -6
  827. package/src/internal/event-log.ts +10 -10
  828. package/src/internal/event-mapper.ts +37 -2
  829. package/src/internal/filesystem/format.ts +11 -12
  830. package/src/internal/filesystem/scratch.ts +3 -3
  831. package/src/internal/filesystem/tools.ts +6 -8
  832. package/src/internal/filesystem/walk.ts +1 -1
  833. package/src/internal/framework-file-storage.ts +104 -4
  834. package/src/internal/framework-storage-selection.ts +2 -12
  835. package/src/internal/github-fanout.ts +4 -4
  836. package/src/internal/guest-network.ts +4 -4
  837. package/src/internal/host-files.ts +1 -1
  838. package/src/internal/host-kv.ts +2 -2
  839. package/src/internal/hosted-admission-adapter.ts +2 -0
  840. package/src/internal/hosted-catch-protocol.ts +3 -5
  841. package/src/internal/hosted-catch.ts +1 -1
  842. package/src/internal/hosted-delivery-protocol.ts +111 -13
  843. package/src/internal/hosted-delivery.ts +286 -81
  844. package/src/internal/hosted-execution-diag.ts +3 -3
  845. package/src/internal/hosted-execution-latency.ts +334 -0
  846. package/src/internal/hosting.ts +5 -6
  847. package/src/internal/http-channel-define.ts +27 -0
  848. package/src/internal/http-channel.ts +3 -4
  849. package/src/internal/http-control-plane-session.ts +24 -11
  850. package/src/internal/incoming-headers-to-fetch.ts +54 -0
  851. package/src/internal/init-interview.ts +7 -7
  852. package/src/internal/init-project.ts +14 -16
  853. package/src/internal/init-scaffold.ts +1 -1
  854. package/src/internal/inline-stdio-mcp.ts +2 -2
  855. package/src/internal/install-cursor-skills.ts +11 -11
  856. package/src/internal/json-schema.ts +1 -1
  857. package/src/internal/local-control-plane.ts +4 -5
  858. package/src/internal/local-env.ts +3 -3
  859. package/src/internal/log-ring.ts +1 -1
  860. package/src/internal/logs-client.ts +1 -1
  861. package/src/internal/mcp-endpoint.ts +10 -10
  862. package/src/internal/mcp-host.ts +9 -9
  863. package/src/internal/mcp-oauth-on-demand.ts +3 -3
  864. package/src/internal/mcp-oauth.ts +5 -5
  865. package/src/internal/net.ts +2 -2
  866. package/src/internal/otel/config.ts +3 -3
  867. package/src/internal/otel/runtime.ts +14 -14
  868. package/src/internal/peer-connections.ts +2 -2
  869. package/src/internal/platform-schedule-sync.ts +1 -1
  870. package/src/internal/platform-timers.ts +1 -1
  871. package/src/internal/playground/static.ts +2 -2
  872. package/src/internal/playground/toolchain.ts +2 -2
  873. package/src/internal/playground-proxy.ts +3 -3
  874. package/src/internal/process-memory-telemetry.ts +1 -1
  875. package/src/internal/reminder-runner.ts +8 -10
  876. package/src/internal/reminder-store.ts +1 -1
  877. package/src/internal/request-error-status.ts +9 -0
  878. package/src/internal/resolved-connections.ts +8 -8
  879. package/src/internal/result-output.ts +62 -5
  880. package/src/internal/router.ts +4 -4
  881. package/src/internal/run-client.ts +2 -2
  882. package/src/internal/schedule-runner.ts +6 -6
  883. package/src/internal/scm/pr-url.ts +11 -2
  884. package/src/internal/sdk-runner.ts +14 -28
  885. package/src/internal/serve-restart.ts +1 -1
  886. package/src/internal/server.ts +97 -99
  887. package/src/internal/session-cost.ts +3 -3
  888. package/src/internal/session-engine.ts +504 -244
  889. package/src/internal/session-run-log.ts +4 -6
  890. package/src/internal/session-store.ts +213 -39
  891. package/src/internal/sessions-client.ts +3 -3
  892. package/src/internal/slack-thread-key.ts +11 -0
  893. package/src/internal/sleep.ts +1 -1
  894. package/src/internal/storage-coordinator.ts +118 -21
  895. package/src/internal/storage.ts +1 -0
  896. package/src/internal/store-mirror.ts +4 -4
  897. package/src/internal/terminal-style.ts +2 -2
  898. package/src/internal/tool-result.ts +3 -3
  899. package/src/internal/trajectory.ts +7 -7
  900. package/src/internal/turn-governor.ts +2 -2
  901. package/src/internal/turn-outbox.ts +1 -1
  902. package/src/internal/update-check.ts +2 -2
  903. package/src/internal/v2-hosting.ts +14 -0
  904. package/src/internal/workspace.ts +17 -17
  905. package/src/kv/memory-kv.ts +9 -7
  906. package/src/kv.ts +4 -7
  907. package/src/otel-public.ts +24 -0
  908. package/src/otel.ts +7 -2
  909. package/src/prompt.ts +1 -1
  910. package/src/result.ts +10 -8
  911. package/src/storage-backends/cursor-hosted-v2.ts +2 -2
  912. package/src/storage-backends/cursor-hosted.ts +6 -23
  913. package/src/storage-backends/file-kv.ts +7 -7
  914. package/src/storage.ts +22 -7
  915. package/src/types.ts +82 -17
  916. package/templates/agentic-owners/agent/channels/github.ts +3 -6
  917. package/templates/agentic-owners/agent/lib/github.ts +5 -5
  918. package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
  919. package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
  920. package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
  921. package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
  922. package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
  923. package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
  924. package/templates/agentic-owners/agent/lib/review.ts +37 -30
  925. package/templates/agentic-owners/evals/owners.eval.ts +2 -2
  926. package/templates/agentic-owners/package.json +1 -1
  927. package/templates/agents-md/agent/lib/collect.ts +16 -10
  928. package/templates/agents-md/agent/lib/config.ts +1 -1
  929. package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
  930. package/templates/agents-md/package.json +1 -1
  931. package/templates/code-wiki/agent/channels/github.ts +4 -7
  932. package/templates/code-wiki/agent/lib/repos.ts +1 -1
  933. package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
  934. package/templates/code-wiki/package.json +1 -1
  935. package/templates/demo/agent/lib/collect.ts +6 -2
  936. package/templates/demo/agent/lib/repos.ts +1 -1
  937. package/templates/demo/agent/tools/record_demo.ts +1 -1
  938. package/templates/demo/evals/demo.eval.ts +1 -5
  939. package/templates/demo/package.json +1 -1
  940. package/templates/grokbot-agents/package.json +1 -1
  941. package/templates/pr-autofixer/agent/channels/github.ts +16 -13
  942. package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
  943. package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
  944. package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
  945. package/templates/pr-autofixer/package.json +1 -1
  946. package/templates/security-help/agent/lib/repos.ts +1 -1
  947. package/templates/security-help/package.json +1 -1
  948. package/templates/security-reviewer/agent/lib/repos.ts +1 -1
  949. package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
  950. package/templates/security-reviewer/package.json +1 -1
  951. package/templates/triage/agent/lib/actuate.ts +26 -41
  952. package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
  953. package/templates/triage/agent/lib/verify-webhook.ts +10 -5
  954. package/templates/triage/agent/tools/record_triage.ts +1 -4
  955. package/templates/triage/package.json +1 -1
  956. package/dist/client.d.ts +0 -14
  957. package/dist/client.d.ts.map +0 -1
  958. package/dist/client.js +0 -12
  959. package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
  960. package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
  961. package/dist/docs/assets/chunks/framework.BCISBCiQ.js +0 -19
  962. package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
  963. package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
  964. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
  965. package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
  966. package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
  967. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
  968. package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
  969. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
  970. package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
  971. package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
  972. package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
  973. package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
  974. package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
  975. package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
  976. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
  977. package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
  978. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
  979. package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
  980. package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
  981. package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
  982. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
  983. package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
  984. package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
  985. package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
  986. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
  987. package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
  988. package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
  989. package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
  990. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
  991. package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
  992. package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
  993. package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
  994. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
  995. package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
  996. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
  997. package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
  998. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
  999. package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
  1000. package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
  1001. package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
  1002. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
  1003. package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
  1004. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
  1005. package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
  1006. package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
  1007. package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
  1008. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
  1009. package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
  1010. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
  1011. package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
  1012. package/dist/docs/concepts.html +0 -27
  1013. package/dist/docs/concepts.md +0 -166
  1014. package/dist/docs/design/filesystem.md +0 -376
  1015. package/dist/docs/design/runtime-abstraction.md +0 -1756
  1016. package/dist/docs/guides/human-in-the-loop.html +0 -54
  1017. package/dist/docs/guides/human-in-the-loop.md +0 -126
  1018. package/dist/docs/reference/result.html +0 -45
  1019. package/dist/docs/reference/result.md +0 -89
  1020. package/dist/docs/scaffolding-agents.html +0 -27
  1021. package/dist/docs/scaffolding-agents.md +0 -130
  1022. package/dist/docs/skills/create-agent.html +0 -34
  1023. package/dist/docs/skills/create-agent.md +0 -160
  1024. package/dist/docs/skills/debug.html +0 -27
  1025. package/dist/docs/skills/debug.md +0 -36
  1026. package/dist/docs/skills/deploy.html +0 -61
  1027. package/dist/docs/skills/deploy.md +0 -161
  1028. package/dist/docs/skills/evals.html +0 -51
  1029. package/dist/docs/skills/evals.md +0 -137
  1030. package/dist/docs/skills/framework-map.html +0 -27
  1031. package/dist/docs/skills/framework-map.md +0 -99
  1032. package/dist/docs/skills/github.html +0 -42
  1033. package/dist/docs/skills/github.md +0 -93
  1034. package/dist/docs/skills/hillclimb.html +0 -33
  1035. package/dist/docs/skills/hillclimb.md +0 -55
  1036. package/dist/docs/skills/index.html +0 -27
  1037. package/dist/docs/skills/index.md +0 -21
  1038. package/dist/docs/skills/mcp-auth.html +0 -44
  1039. package/dist/docs/skills/mcp-auth.md +0 -76
  1040. package/dist/docs/skills/otel.html +0 -34
  1041. package/dist/docs/skills/otel.md +0 -53
  1042. package/dist/docs/skills/setup-slack.html +0 -46
  1043. package/dist/docs/skills/setup-slack.md +0 -141
  1044. package/dist/docs/storage.html +0 -56
  1045. package/dist/docs/storage.md +0 -167
  1046. package/dist/docs/templates/agents-md.html +0 -28
  1047. package/dist/docs/templates/agents-md.md +0 -105
  1048. package/dist/docs/templates/code-wiki.html +0 -28
  1049. package/dist/docs/templates/code-wiki.md +0 -91
  1050. package/dist/docs/templates/demo.html +0 -30
  1051. package/dist/docs/templates/demo.md +0 -80
  1052. package/dist/docs/templates/grokbot-agents.html +0 -29
  1053. package/dist/docs/templates/grokbot-agents.md +0 -48
  1054. package/dist/docs/templates/security-help.html +0 -30
  1055. package/dist/docs/templates/security-help.md +0 -65
  1056. package/dist/internal/tenant-slack/relay.d.ts +0 -75
  1057. package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
  1058. package/dist/internal/tenant-slack/relay.js +0 -148
  1059. package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
  1060. package/dist/playground/assets/index-CqLX5uF3.js +0 -67
  1061. package/docs/concepts.md +0 -171
  1062. package/docs/design/filesystem.md +0 -376
  1063. package/docs/design/runtime-abstraction.md +0 -1756
  1064. package/docs/guides/human-in-the-loop.md +0 -131
  1065. package/docs/reference/result.md +0 -94
  1066. package/docs/scaffolding-agents.md +0 -135
  1067. package/docs/skills/index.md +0 -26
  1068. package/docs/storage.md +0 -172
  1069. package/docs/templates/agents-md.md +0 -110
  1070. package/docs/templates/code-wiki.md +0 -96
  1071. package/docs/templates/demo.md +0 -85
  1072. package/docs/templates/grokbot-agents.md +0 -53
  1073. package/docs/templates/security-help.md +0 -70
  1074. package/src/client.ts +0 -23
  1075. package/src/internal/tenant-slack/relay.ts +0 -203
  1076. package/templates/pr-autofixer/agent/storage.ts +0 -7
@@ -1,1756 +0,0 @@
1
- # Replacing `runtime: "local" | "cloud"` with a code interface
2
-
3
- > **Status:** design proposal for review. No product code in this PR.
4
- > Implementation is split across later PRs (see §8). Do not start those
5
- > until this document has been reviewed.
6
- > **Audience:** Agent SDK and cursor-sdk maintainers; change-monitor as the
7
- > first consumer that is already faking a third runtime.
8
- > **Companions:** [agent-config.md](/docs/reference/agent-config.md#choose-a-runtime)
9
- > (today's user-facing contract),
10
- > [factory/change-monitor/docs/tools.md](https://github.com/cursor/cursor/blob/main/factory/change-monitor/docs/tools.md)
11
- > (why change-monitor is pinned to local),
12
- > [factory/change-monitor/docs/computer-use.md](https://github.com/cursor/cursor/blob/main/factory/change-monitor/docs/computer-use.md)
13
- > (why a cloud VM as the *workspace* is not `runtime: "cloud"`).
14
- > **Checked against:** `@cursor/july` (`packages/agent-serve`) and
15
- > `@cursor/sdk` (`packages/cursor-sdk`) on `origin/main` as of 2026-08-31.
16
-
17
- ## Goals
18
-
19
- 1. **Stay compatible with agents that already ship.**
20
- The current `defineAgent` / `AgentOptions` shape keeps
21
- working: string `runtime`, sibling `local`, sibling
22
- `cloud`. Existing files do not need a rewrite.
23
- Constructors are additive (`localRuntime(opts)` takes
24
- today's `AgentLocalOptions`). The old fields are
25
- **deprecated and still supported** — JSDoc `@deprecated`
26
- plus published-docs notes — not removed in Phases 1–4.
27
-
28
- 2. **Default to `localRuntime()`.**
29
- That is today's default and the one developers mean when
30
- they omit `runtime`: local loop, host workspace, full
31
- harness toolset. `defineAgent({})` and
32
- `defineAgent({ runtime: "local" })` both become
33
- `localRuntime()`.
34
-
35
- 3. **Refuse incoherent pairs at discovery.**
36
- The string let authors write `runtime: "cloud"` next to
37
- `local: { sandbox, cwd, … }`, or `tools` on a cloud
38
- agent, and only some of those failed. `Runtime` is a
39
- closed union. `workspace` exists only on the local arm,
40
- so `cloudRuntime` cannot take one. `virtualRuntime`
41
- refuses `send({ runtime: cloudRuntime(...) })`.
42
- Combinations an arm cannot honor are errors, not
43
- ignored fields.
44
-
45
- 4. **Replace the enum with an extensible interface.**
46
- External users of `@cursor/july` / `@cursor/sdk` should
47
- be able to bring their own workspace (a `FileSystem`, a test
48
- map, a remote machine mount) without waiting for a new
49
- string value. `Workspace` is that interface.
50
- Do not grow `"local" | "cloud" | "virtual" | …`.
51
-
52
- The Agent SDK exposes execution as a string on `defineAgent`:
53
-
54
- ```ts
55
- runtime?: "local" | "cloud" | "grokbot";
56
- ```
57
-
58
- `"local"` and `"cloud"` look like two places the same agent can run.
59
- They are not. The string selects a **loop backend**, a **workspace**, and
60
- an **artifact-delivery path** at once, and it already has a third value
61
- (`"grokbot"`) that fits neither name. Change-monitor then takes
62
- `"local"` and hollows it out: native shell off, native `read`/`grep`/
63
- `glob`/`ls` replaced by server tools over a virtual filesystem. That is
64
- a virtual workspace on the local loop, forced to claim it is local
65
- because there is no other legal value.
66
-
67
- This document replaces the string with a closed `Runtime` union.
68
- The local arm carries a **workspace**. Cloud and grokbot do not.
69
- The workspace is one object whose optional methods (`read`,
70
- `ls`, `shell`, …) are the capabilities. Presence enables the
71
- matching tool. All methods share one path namespace.
72
- `workspace` exists only on the local arm, so `cloudRuntime`
73
- cannot take one.
74
-
75
- The first implementation cut is native redirection in Cursor SDK
76
- (`AgentOptions.local.workspace` rebound through local-exec). Agent
77
- SDK then authors that workspace as `virtualRuntime(fs)`.
78
-
79
- Lookalike server tools are not good enough. Change-monitor's
80
- `read` is an Agent SDK server tool, which the local harness
81
- exposes as MCP (`custom-user-tools`). The model gets
82
- `GetMcpTools` / `CallMcpTool`, not a builtin `read`. That is
83
- the bug. Copying native schemas does not fix the tool the
84
- model is offered. The SDK change exists so the model calls
85
- harness `read` against the injected workspace.
86
-
87
- ---
88
-
89
- ## 1. Chosen abstraction
90
-
91
- ```ts
92
- /**
93
- * Native tool args, open for fields the harness adds later.
94
- * Known keys match the model-facing input schema. Extra keys
95
- * are forwarded, not stripped.
96
- */
97
- type NativeArgs<T> = T & { [key: string]: unknown };
98
-
99
- /**
100
- * Path-namespace verbs. Method names match `@cursor/sdk`
101
- * `ToolName`s (`read`, `semSearch`, `readLints`). The model
102
- * sees the harness names (`Read`, `SemanticSearch`,
103
- * `ReadLints`). `write` is the exception: the model tool is
104
- * `Write`, but proto folded it into `edit_tool_call` — there
105
- * is no public `tools: ["write"]`. Args and results are those
106
- * tools' input/output schemas. `@cursor/sdk` owns this type.
107
- */
108
- interface FileSystem {
109
- ls?(args: NativeArgs<LsArgs>): Promise<LsResult>;
110
- glob?(args: NativeArgs<GlobArgs>): Promise<GlobResult>;
111
- read?(args: NativeArgs<ReadArgs>): Promise<ReadResult>;
112
- grep?(args: NativeArgs<GrepArgs>): Promise<GrepResult>;
113
- /** Native Write tool: create or overwrite a whole file. */
114
- write?(args: NativeArgs<WriteArgs>): Promise<WriteResult>;
115
- /** Native Edit tool: str-replace / multi-replace / apply-patch. */
116
- edit?(args: NativeArgs<EditArgs>): Promise<EditResult>;
117
- delete?(args: NativeArgs<DeleteArgs>): Promise<DeleteResult>;
118
- semSearch?(args: NativeArgs<SemSearchArgs>): Promise<SemSearchResult>;
119
- readLints?(args: NativeArgs<ReadLintsArgs>): Promise<ReadLintsResult>;
120
- }
121
-
122
- /**
123
- * One namespace. File verbs and shell are optional methods —
124
- * presence is the capability. They must share `root()`.
125
- * Do not implement `read` against Origin and `shell` against
126
- * host bash.
127
- */
128
- interface Workspace extends FileSystem {
129
- shell?(args: NativeArgs<ShellArgs>): Promise<ShellResult>;
130
- root(): string;
131
- brief?(ctx: WorkspaceBriefContext): string;
132
- }
133
-
134
- /**
135
- * Closed union. `kind` is internal dispatch. Authors call
136
- * constructors. Each constructor returns its arm, not
137
- * `Runtime`, so `send({ runtime })` can require
138
- * `CloudRuntime | LocalRuntime` and exclude grokbot.
139
- * `workspace` exists only on the local arm.
140
- */
141
- type LocalRuntime = { kind: "local"; workspace: Workspace };
142
- type CloudRuntime = { kind: "cloud"; cloud: AgentCloudOptions };
143
- type GrokbotRuntime = { kind: "grokbot" };
144
- type Runtime = LocalRuntime | CloudRuntime | GrokbotRuntime;
145
-
146
- function localRuntime(opts?: AgentLocalOptions): LocalRuntime {
147
- return { kind: "local", workspace: localWorkspace(opts) };
148
- }
149
-
150
- /**
151
- * Host-local with Cursor's local sandbox on. Same
152
- * `kind: "local"` family as `localRuntime` / `virtualRuntime`.
153
- * `cwd` / `workspaceDir` still configure the host tree.
154
- * The workspace omits `shell`: this object cannot honor
155
- * `sandboxOptions`. Host+sandbox turns keep the SDK's
156
- * `LocalShellExecutor` and do not inject the workspace.
157
- */
158
- function sandboxRuntime(
159
- opts?: Omit<AgentLocalOptions, "sandbox">
160
- ): LocalRuntime {
161
- return localRuntime({ ...opts, sandbox: true });
162
- }
163
-
164
- /**
165
- * Local arm + a virtual workspace. Default is empty: `root()`
166
- * is `/`, no file/shell methods, no materialization, no
167
- * skills mount. Pass a `FileSystem` (or an async per-session
168
- * factory) to compose mounts. Authors pass a `FileSystem`,
169
- * not a `Workspace` — the lift is not a knob.
170
- */
171
- function virtualRuntime(
172
- fs?: FileSystem | ((ctx: SessionWorkspaceContext) => Promise<FileSystem>)
173
- ): LocalRuntime {
174
- return { kind: "local", workspace: virtualWorkspace(fs) };
175
- }
176
-
177
- function cloudRuntime(cloud: AgentCloudOptions): CloudRuntime {
178
- return { kind: "cloud", cloud };
179
- }
180
-
181
- function grokbotRuntime(): GrokbotRuntime {
182
- return { kind: "grokbot" };
183
- }
184
- ```
185
-
186
- `cwd` / `workspaceDir` are arguments to `localRuntime` and
187
- `sandboxRuntime`, same as `repos` on `cloudRuntime`. They
188
- configure the host tree `localWorkspace(opts)` wraps. They
189
- are not a `Workspace` and they are not on `virtualRuntime`.
190
- Prefer `sandboxRuntime()` when the harness should run
191
- sandboxed. `localRuntime({ sandbox: true })` and sibling
192
- `local.sandbox` stay as equivalent deprecated sugar.
193
- The injected object on the Cursor SDK is
194
- `AgentOptions.local.workspace`. Cursor SDK's existing
195
- `WorkspaceRuntime` is the session factory, not `Workspace`.
196
- Host+sandbox turns do not inject: a Workspace that claimed
197
- `shell` would replace `LocalShellExecutor`.
198
-
199
- Authoring:
200
-
201
- ```ts
202
- export default defineAgent({
203
- runtime: localRuntime(),
204
- });
205
-
206
- export default defineAgent({
207
- runtime: sandboxRuntime({ workspaceDir: "/repo" }),
208
- });
209
-
210
- export default defineAgent({
211
- runtime: virtualRuntime(async (ctx) =>
212
- unionFs({
213
- "/repo": originRepoFs(bindingFor(ctx)),
214
- "/host": hostFilesFs(),
215
- "/agent/skills": skillsFs(),
216
- })
217
- ),
218
- });
219
-
220
- export default defineAgent({
221
- runtime: cloudRuntime({
222
- repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
223
- }),
224
- });
225
- ```
226
-
227
- `localRuntime` / `sandboxRuntime` / `virtualRuntime` /
228
- `cloudRuntime` / `grokbotRuntime` are constructors over that
229
- union. They are not five implementations of one `fs()` +
230
- `shell()` pair. `sandboxRuntime` stays on the local arm.
231
-
232
- ### Backward compatibility
233
-
234
- Today's fields stay on `defineAgent` and on Cursor
235
- `AgentOptions`. Constructors sit beside them. Nothing that
236
- compiles today is broken by Phase 2.
237
-
238
- ```ts
239
- // Still valid. Deprecated. Same agent as localRuntime(opts).
240
- defineAgent({
241
- runtime: "local",
242
- local: { workspaceDir: "/repo", sandbox: true },
243
- });
244
-
245
- // Preferred.
246
- defineAgent({
247
- runtime: sandboxRuntime({ workspaceDir: "/repo" }),
248
- });
249
-
250
- // Still valid. Deprecated. Same agent as cloudRuntime(opts).
251
- defineAgent({
252
- runtime: "cloud",
253
- cloud: { repos: [{ url: "https://github.com/org/repo", startingRef: "main" }] },
254
- });
255
-
256
- // Preferred.
257
- defineAgent({
258
- runtime: cloudRuntime({
259
- repos: [{ url: "https://github.com/org/repo", startingRef: "main" }],
260
- }),
261
- });
262
- ```
263
-
264
- | Today's field | Still does | Preferred |
265
- |---|---|---|
266
- | omit `runtime` / `runtime: "local"` | `localRuntime(agent.local)` | `runtime: localRuntime(opts)` |
267
- | `runtime: "cloud"` | `cloudRuntime(agent.cloud)` | `runtime: cloudRuntime(opts)` |
268
- | `runtime: "grokbot"` | `grokbotRuntime()` | `runtime: grokbotRuntime()` |
269
- | `local: { cwd, workspaceDir, sandbox }` | Host options when the string / omitted runtime is local | `localRuntime(opts)` or `sandboxRuntime(opts)`. Same `AgentLocalOptions`. |
270
- | `cloud: { repos, … }` | Payload for `runtime: "cloud"` | `cloudRuntime(opts)` |
271
- | `send({ cloud })` | This session becomes cloud; options merge over agent `cloud` | `send({ runtime: cloudRuntime(opts) })`. No merge. |
272
- | `send({ workspaceDir })` | Harness cwd for this local session | `send({ runtime: localRuntime({ workspaceDir }) })` |
273
-
274
- Runtime payloads live on constructors: `AgentLocalOptions`
275
- on `localRuntime`, `AgentCloudOptions` on `cloudRuntime`.
276
- These stay on `defineAgent` / `send` / `Agent.create`, not
277
- on `Runtime`: `model`, `tools`, `builtinTools`, `hosting`,
278
- `architecture`, `workspaceFiles`.
279
-
280
- `virtualRuntime` does not take `AgentLocalOptions`. There is
281
- no host cwd to point. `local.workspaceDir` / `sandbox` +
282
- `virtualRuntime` is still a discovery error.
283
-
284
- Cursor SDK stays on `AgentOptions.local` / `.cloud` for
285
- Phases 1–4. Presence of `cloud` still dispatches. Phase 1
286
- **adds** `local.workspace`. july `localRuntime(opts)` writes
287
- cwd / sandbox / workspaceDir into that bag. Constructors on
288
- `Agent.create` are a later SDK deprecation, after july has
289
- shipped the same types. Do not leave “`cloud` means cloud”
290
- as the forever SDK contract — just do not do that cut in
291
- Phase 1.
292
-
293
- Deprecation is documentation and JSDoc (`@deprecated` with
294
- the constructor equivalent). Do not delete the string or
295
- the sibling fields in Phases 1–4. Removal is a later
296
- window after Phase 4 has taught constructors. Subagents
297
- keep today's behavior, stored internally as `Runtime`
298
- (`G12`).
299
-
300
- If a constructor and a sibling disagree (`localRuntime(a)`
301
- plus `local: b`; `cloudRuntime(a)` plus `cloud: b`;
302
- `virtualRuntime` plus `local.workspaceDir`), fail closed.
303
- If only the deprecated form is present, accept it.
304
-
305
- `kind` is internal dispatch. Authors never write it; they
306
- call a constructor. `AgentRunner` stays on
307
- `StartServerInternalOptions` for replay and eval fakes. It
308
- is not a `Runtime` arm and not a `defineAgent` field.
309
-
310
- `virtualRuntime` is an empty local+virtual workspace until the
311
- author unions mounts in. `root()` is always `/`. Nothing is
312
- materialized onto a host scratch dir; every path is served
313
- lazily from the `FileSystem`. The framework does not inject
314
- skills, `/repo`, or a fake cwd. `skillsFs()` is a july
315
- helper that returns a `FileSystem` the application mounts if
316
- it wants skills on the workspace.
317
-
318
- Change-monitor's `search` (regex = `grep`, tags on
319
- `/issues`, reserved keyword / semantic) stays a consumer
320
- authored tool if they still want it. The framework does not
321
- grow a `search` method. `grep` and optional `semSearch`
322
- cover retrieval.
323
-
324
- `virtualWorkspace` is an internal lift: take the `FileSystem`,
325
- set `root()` to `/`, derive `brief()` from the mount table
326
- when there is one, omit `shell` unless a mount is
327
- shell-backed. Authors do not compose that lift, and they
328
- cannot pass `localWorkspace()` in.
329
-
330
- **Session factory.** `defineAgent` has no PR/SHA. A function
331
- argument runs **once per session**, not at discovery and not
332
- per turn. It is always async (`Promise<FileSystem>`). The
333
- returned `FileSystem` is reused for every turn and disposed
334
- with the session. Per-wake data (tenant plugin skills) is a
335
- lazy layer *inside* that filesystem, not a new Workspace. A
336
- stable tree (`memoryFs({ "/a.txt": "hi" })`) is passed
337
- directly and needs no factory.
338
-
339
- ```ts
340
- interface SessionWorkspaceContext {
341
- sessionId: string;
342
- agentName?: string;
343
- /** Channel continuation key when the session is addressable. */
344
- continuationKey?: string;
345
- /** Host services already on tool context. */
346
- host?: { files: HostFilesApi; reminders?: ReminderHostApi };
347
- }
348
- ```
349
-
350
- `sessionId` is the session when one exists. Unscoped
351
- `callTool` / `agent-sdk call` has no session row; the
352
- framework must not invent a shared default id that would
353
- collapse distinct callers onto one factory-backed store.
354
-
355
- ### One workspace, one namespace
356
-
357
- File verbs and `shell` live on **`Workspace`**, not on `Runtime`.
358
- The local arm holds that object. Cloud and grokbot have no
359
- `workspace` field. Putting `read()` on `Runtime` re-bundles
360
- the string this document takes apart.
361
-
362
- `FileSystem` is the shared file-verb type (`@cursor/sdk`).
363
- `Workspace` adds `shell` / `root` / `brief`. July authors pass
364
- a `FileSystem`; helpers (`memoryFs`, `unionFs`, `skillsFs`)
365
- return one. That is not an attachable `Shell`: `shell` stays
366
- on `Workspace` so it cannot be pointed at a different tree
367
- than `read`. Change-monitor avoids the split today by having
368
- no shell. computer-use.md avoids it by deriving every
369
- `/workspace` verb from one `RemoteMachine.exec`.
370
-
371
- `unionFs(mounts)` composes FileSystems under absolute
372
- prefixes. Paths resolve by **longest prefix**. Method
373
- presence is the **union**: `write` is offered if any mount
374
- implements it. `shell` is not a FileSystem method and is
375
- not synthesized.
376
-
377
- Unifying the type does **not** enforce the coupling. Two methods
378
- on one object can still have two backends. The rule is semantic:
379
-
380
- **All Workspace methods share one path namespace, rooted at
381
- `root()`.** For `virtualRuntime`, that root is `/`.
382
- `ls({ path: "/repo" })` and `shell({ command: "ls /repo" })`
383
- see the same entries. Same tree, not the same formatter: the
384
- `ls` tool's ignore/dotfile rules and `shell({ command: "ls -la" })`
385
- may still render differently, as they do on a real machine.
386
-
387
- The framework cannot typecheck that. The public constructors keep
388
- the invariant by not taking a raw `Workspace`:
389
-
390
- ```ts
391
- // Host. File verbs and shell wrap the same cwd.
392
- localRuntime(opts) → localWorkspace(opts)
393
-
394
- // Host + Cursor sandbox. Workspace omits shell.
395
- sandboxRuntime(opts) → localWorkspace({ ...opts, sandbox: true })
396
-
397
- // Empty virtual. `/`, no methods, no mounts, no skills.
398
- virtualRuntime()
399
-
400
- // Composed virtual. Application unions what it needs.
401
- virtualRuntime(unionFs({
402
- "/repo": originRepoFs(binding),
403
- "/host": hostFilesFs(),
404
- "/agent/skills": skillsFs(),
405
- "/workspace": cloudFs(remoteMachine),
406
- }))
407
-
408
- // Tests.
409
- virtualRuntime(memoryFs({ "/a.txt": "hi" }))
410
- ```
411
-
412
- A shell-primary mount (`cloudFs`) is a `FileSystem`
413
- implementation, not a second runtime argument. You union it
414
- in. `shell` appears on the lifted Workspace only when that
415
- mount (or the union) is shell-backed — same tree as `ls` /
416
- `read` under `/workspace`. A TypeScript isolate (tools.md §8)
417
- is an authored `script` tool, not a `{ script: true }` flag
418
- on `virtualRuntime`.
419
-
420
- Do not put `shell` on a separate type the caller attaches later.
421
- Do not take `Workspace` as a public argument to `virtualRuntime`:
422
- that is how `virtualRuntime(localWorkspace())` happens.
423
-
424
- ### Capability is method presence
425
-
426
- Every Workspace method above except `root` is optional.
427
- The framework exposes the matching tool iff the method is
428
- implemented. A missing method is a missing tool. This is
429
- change-monitor's optional-write rule ("optionality is earned")
430
- applied to the whole workspace.
431
-
432
- | Method present | Model-facing tool | Method absent |
433
- |---|---|---|
434
- | `read` | `Read` | not offered |
435
- | `ls` | `LS` | not offered |
436
- | `glob` | `Glob` | not offered |
437
- | `grep` | `Grep` | not offered |
438
- | `write` | `Write` | not offered |
439
- | `edit` | `StrReplace` | not offered |
440
- | `delete` | `Delete` | not offered |
441
- | `semSearch` | `SemanticSearch` | not offered |
442
- | `readLints` | `ReadLints` | not offered |
443
- | `shell` | `Shell` | not offered |
444
-
445
- Those are the latest/default harness names. Some prompt
446
- versions rename them (`read_file`, `search_replace`,
447
- `list_dir`, `codebase_search`, `run_terminal_cmd`). The
448
- binding does not invent a fourth name.
449
-
450
- `@cursor/sdk` `AgentOptions.tools` and stream `tool_call`
451
- events stay camelCase (`read`, `edit`, `semSearch`,
452
- `readLints`, `shell`, …). There is no public
453
- `tools: ["write"]`. `Write` and `StrReplace` both travel as
454
- proto `edit_tool_call`.
455
-
456
- `tools: ["edit"]` means the **envelope**, not
457
- `workspace.edit`. It is satisfied if `write` **or** `edit`
458
- is present. A write-only workspace with `tools: ["edit"]`
459
- is valid and offers `Write` only. `tools: ["edit"]` on a
460
- workspace with neither method is a discovery error. Method
461
- presence still decides which of `Write` / `StrReplace` are
462
- registered. A harness that already offers `MultiStrReplace`
463
- or `ApplyPatch` for that model keeps doing so when `edit`
464
- is present, and omits them when it is not.
465
-
466
- Cursor SDK binding: derive `AgentOptions.tools` from the
467
- presence set (`write` or `edit` contributes `edit` on the
468
- allowlist), then re-point those natives at the workspace.
469
- The model calls harness `Read`, not MCP `read` on
470
- `custom-user-tools`.
471
-
472
- **Presence means a function, not a stub.**
473
- `read() { throw new Error("unsupported") }` still enables `read`.
474
- Omit the method.
475
-
476
- **This gates the file/shell family only.**
477
- Do not grow Workspace to enumerate every harness builtin.
478
- `updateTodos` and `webSearch` do not share `root()`. Putting
479
- them on Workspace breaks the namespace rule and still does not
480
- make them work on `cloudRuntime` (that arm has no workspace
481
- field). Availability is not injectability.
482
-
483
- **`tools` may only narrow, fail-closed.**
484
-
485
- ```
486
- workspaceCaps = methodsPresent(workspace) // { read, ls, grep, … }
487
- fileRequested = agent.tools?.filter(isFileOrShell)
488
- harnessRequested = agent.tools?.filter(isHarnessBuiltin)
489
-
490
- fileExposed =
491
- fileRequested === undefined ? workspaceCaps : fileRequested
492
-
493
- harnessExposed =
494
- agent.tools === undefined
495
- ? (virtualRuntime ? ∅ : runtime.defaultHarnessTools)
496
- : harnessRequested ∩ runtime.harnessTools
497
- ```
498
-
499
- If `agent.tools` names `grep` and `workspace.grep` is missing,
500
- refuse at discovery — same posture as today's "restriction that
501
- silently does not apply." `tools: ["edit"]` is the exception:
502
- it names the envelope, so refuse only when both `write` and
503
- `edit` are missing. If it names `webSearch` and the loop
504
- does not have that builtin (grokbot), refuse the same way.
505
- If `agent.tools` is unset, the workspace *is* the file/shell
506
- allowlist. `"mcp"` is still granted when server tools or
507
- connections exist; it is transport, not a file verb and not a
508
- harness builtin.
509
-
510
- Host `localRuntime()` implements every file/shell method and
511
- keeps today's default harness set, so the toolset does not
512
- shrink. `virtualRuntime` with `read` + `ls` + `grep` + `glob`
513
- and no `shell` is change-monitor without a redundant
514
- `tools: ["read", …]` line. Harness builtins stay off that
515
- default; opt in:
516
-
517
- ```ts
518
- defineAgent({
519
- runtime: virtualRuntime(fs),
520
- tools: ["read", "ls", "grep", "glob", "webSearch", "updateTodos"],
521
- });
522
- ```
523
-
524
- `tools` is one allowlist. Listing only `["webSearch"]` turns
525
- file/shell natives off, even if the workspace implements them.
526
-
527
- `tools: []` is an empty allowlist, not "legacy suppress
528
- natives." `[] ∩ workspaceCaps = ∅`. Phase 2 must omit
529
- `tools` on `virtualRuntime` agents so workspace methods
530
- become the file/shell allowlist. List harness builtins
531
- only to opt those in. Change-monitor drops today's
532
- `tools: []` when it cuts over (Phase 3).
533
-
534
- ### Three tool families
535
-
536
- | Family | Examples | Owner | How the model gets the native tool |
537
- |---|---|---|---|
538
- | **Workspace** | `read`, `ls`, `grep`, `glob`, `write`, `edit`, `delete`, `semSearch`, `readLints`, `shell` | Injected `Workspace` (`FileSystem` + `shell`) | Method presence → native tool. Args are that tool's schema. Omit the method if this workspace cannot honor it. |
539
- | **Harness** | `webSearch`, `webFetch`, `updateTodos`, `readTodos`, `askQuestion`, `await`, `generateImage` | The **Runtime arm's** Cursor harness | `defineAgent({ tools })`. Same builtin name. Do not put these on Workspace. |
540
- | **Transport / spawn** | `mcp`, `task` | Runtime arm | `mcp` when server tools or connections exist. `task` is subagents (`G12`). |
541
-
542
- **Framework server tools.** Agent SDK `builtinTools`
543
- (`reminders`, …) are `execution: "server"`. Local
544
- in-process; cloud via HTTP MCP; grokbot blocked. They are
545
- not Cursor `ToolName`s and not Workspace methods.
546
-
547
- No `Harness` interface on `Runtime`. `webSearch` is the
548
- backend; there is nothing to inject. `updateTodos` is
549
- conversation state the local harness already keeps. A third
550
- object would re-bundle the string (Runtime arm + workspace +
551
- "the rest") and still could not be honored on cloud.
552
-
553
- If a later consumer needs a custom todo store or a stub
554
- `webSearch` in evals, add executor overrides on
555
- `AgentOptions.local` the same way Workspace landed — a rebind
556
- seam, not a constructor argument.
557
-
558
- ### What each constructor actually offers
559
-
560
- `virtual` and `local` share the **local loop**. Harness
561
- builtins are the same implementations: backend `webSearch`,
562
- in-process todos. The workspace is what changes. Cloud is a
563
- different harness that already includes those builtins and
564
- cannot select them.
565
-
566
- | | `localRuntime()` | `virtualRuntime(fs)` | `cloudRuntime(opts)` | `grokbotRuntime()` |
567
- |---|---|---|---|---|
568
- | File/shell natives | Host workspace; `tools` narrows | Workspace methods only | VM workspace; cannot restrict | Box workspace; cannot restrict |
569
- | `webSearch` / `webFetch` | Default on; `tools` narrows | Off until listed in `tools` | On (VM default); `tools` refused | Fail closed if listed |
570
- | `updateTodos` / `readTodos` | Same | Off until listed | On (VM default); `tools` refused | Fail closed if listed |
571
- | `task` | Default on | Off until listed; children inherit parent workspace (`G12`) | On; cannot restrict | Blocked |
572
- | `mcp` | Granted for server tools / connections | Same (local loop) | Bridged HTTP MCP when configured | Blocked |
573
- | `edit` / `delete` / `semSearch` / `readLints` | Default on (`localWorkspace`) | Off unless the `FileSystem` implements the method | On (VM tree) | Box default |
574
-
575
- `sandboxRuntime()` is the same local loop as `localRuntime()`,
576
- with Cursor sandbox on. The workspace omits `shell`. Host+sandbox
577
- turns keep `LocalShellExecutor` and do not inject the workspace.
578
-
579
- One agent file cannot express the same *selected* toolset on
580
- all three constructors until the cloud API honors `tools`
581
- (non-goal, §10). `tools: ["webSearch", "updateTodos"]` on
582
- `cloudRuntime` is still a discovery error: we cannot prove the
583
- VM will offer only those, and we must not run unrestricted
584
- and pretend we selected.
585
-
586
- What *is* true without that API:
587
-
588
- - Local (including today's `tools: []` agents): list the
589
- harness names. That already works. `virtualRuntime` does
590
- not unlock `updateTodos` / `webSearch`; the allowlist does.
591
- - Cloud: those names are already on the VM. Authors who need
592
- them on a cloud agent omit `tools` and accept the rest of
593
- the VM workspace.
594
- - Do not special-case "harness-only `tools` + cloud" as
595
- silently honored. That is the hybrid footgun with extra
596
- steps.
597
-
598
- **Do not synthesize omitted verbs.**
599
- Change-monitor's current mounts require `grep` on every *mount* because
600
- it is derivable from `glob` + `read`. That is a mount-quality
601
- rule, not a Workspace-to-tool rule. If the workspace omits `grep`,
602
- the model does not get a generated grep that secretly scans via
603
- `read`. An implementation that has `glob` and `read` should
604
- usually implement `grep` (delegate to `scanGrep`); the framework
605
- does not invent it.
606
-
607
- **`write` and `edit` are two native tools, not one.**
608
-
609
- Str-replace `edit` cannot create a file (`oldText: ""`
610
- errors). The harness still offers a **Write** tool
611
- (`{ path, fileText }`) for create-or-overwrite. Apply-patch
612
- `edit` can create via `*** Add File:`. Proto `WriteToolCall`
613
- was folded into the `EditToolCall` envelope; the model-facing
614
- Write tool remains.
615
-
616
- Workspace keeps both methods, matching those two tools:
617
-
618
- - `write` — native Write schema (`path`, `fileText`, open for
619
- later fields). Create or replace a whole file.
620
- - `edit` — native Edit schema (`path`, plus `oldText` /
621
- `newText`, `edits[]`, or `patchContent`). Change an
622
- existing file; apply-patch may add.
623
- - `grep` — native result kinds are `"content"` | `"files"` |
624
- `"count"` (not `"files_with_matches"`).
625
-
626
- Presence of one does not synthesize the other. A
627
- `FileSystem` that implements `write` and omits `edit` offers
628
- Write only. That workspace may still list `tools: ["edit"]`
629
- (envelope). It must not register `StrReplace`.
630
- Change-monitor's CAS `write` / authored str-replace stay
631
- authored tools until the mount implements these native
632
- schemas. Do not keep a third write contract.
633
-
634
- **`edit`, `delete`, `semSearch`, `readLints` are Workspace
635
- methods.** They see `root()`. Optional: `localWorkspace()`
636
- implements what the host harness already has;
637
- `virtualWorkspace(fs)` omits a method until that
638
- `FileSystem` can honor it. The type includes them now. A
639
- tree that cannot index or lint simply leaves the method off.
640
-
641
- - `delete` — path verb. `DeleteExecutor` exists; Phase 1 adds
642
- the override and fail-closed omission.
643
- - `edit` — same tree as `write`. Native schema stays native.
644
- Phase 1 fail-closed-omits host `edit` when the method is
645
- missing so a virtual tree cannot be patched on disk.
646
- Implementing the virtual body can wait for a writable
647
- mount (change-monitor Phase 3).
648
- - `semSearch` — native schema. Host walks a **codebase index**,
649
- then `read`s snippets. A virtual `FileSystem` omits it
650
- until that tree has an index. Do not leave host
651
- `semSearch` registered against a virtual workspace. Do not
652
- alias change-monitor's authored `search` (tags / regex)
653
- onto this method.
654
- - `readLints` — `diagnosticsExecutor` (LSP against the tree).
655
- Same presence rule. A virtual tree has no language service
656
- unless a mount provides one.
657
-
658
- ### Effect and approvals stay outside Workspace
659
-
660
- Defaults do not change. `localRuntime()` / no `workspace` is
661
- today's `LocalWriteExecutor` + `permissionsService` +
662
- pending-decision cards.
663
-
664
- Two planes already exist. Workspace implements neither.
665
-
666
- | Plane | What it is | Who configures it | Virtual |
667
- |---|---|---|---|
668
- | **Effect** (`read` / `write`) | Dry-run and trace: reads run, writes stub. Native file/shell verbs keep today's effects (`read`/`ls`/`grep`/`glob`/`semSearch`/`readLints` = read; `write`/`edit`/`delete`/`shell` = write). | Existing tool `effect` for authored tools. Natives keep harness defaults. | Same defaults. A Workspace method cannot relabel `edit` as read. |
669
- | **Approval policy** | Human-in-the-loop before an effectful call runs. | Today's Agent SDK / harness approval config. | Same policy. The adapter runs **after** the approval gate, not instead of `LocalWriteExecutor`. |
670
-
671
- ```
672
- tool call → effect / dry-run → approval policy → Workspace method
673
- ```
674
-
675
- Host path allowlists, `.cursorignore`, and worktree guards
676
- live on **`localWorkspace` only**. They key on host paths.
677
- Virtual paths (`/repo/…`) are a different namespace; wrapping
678
- them in `permissionsService.shouldBlockWrite` would block or
679
- prompt every virtual call. Mount policy (CAS, publish ladder)
680
- stays inside the `FileSystem`.
681
-
682
- Eval `memoryFs` uses the same gates. If the agent's approval
683
- policy is off (today's default for many local agents), no new
684
- cards appear.
685
-
686
- `@cursor/sdk` exports `FileSystem` and `Workspace`. July
687
- authors pass a `FileSystem` into `virtualRuntime`. Helpers
688
- return `FileSystem`. Do not add a `search` method: the regex
689
- arm is `grep`, `semSearch` is already on `FileSystem`,
690
- keyword has no implementation, and tags is an unproven
691
- change-monitor issues-mount feature. If they still want tag
692
- lookup, it stays an authored tool on their mounts.
693
-
694
- Phase 1 does not need virtual implementations of these four.
695
- It does need the omit path: when a workspace is set and the
696
- method is absent, the host executor is not registered.
697
-
698
- ### Environment brief is not `Runtime.instructions()`
699
-
700
- The workspace owns facts the model must know — `root()`,
701
- mount table, "there is no checkout," grep dialect. Change-monitor
702
- currently writes those into `agent/instructions.md` because there
703
- is nowhere else to put them. Cloud already injects loop-owned
704
- prose the same way (`buildAgentsMdContent` prepends a server-tool
705
- MCP catalog and a memory-mount path).
706
-
707
- That is a real injection point. It is not
708
- `Runtime.instructions() -> string`.
709
-
710
- `defineAgent({ instructions })` / `instructions.md` is the
711
- agent's job: role, steering, what to publish. A method with the
712
- same name implies it replaces that file. Today's prompt is
713
- already layered, and the layers have different owners:
714
-
715
- | Layer | Owner | When / where |
716
- |---|---|---|
717
- | `instructions.md` | Agent author | Always; identity of the agent |
718
- | `## About you` | Framework | Folded into AGENTS.md / preamble |
719
- | Server-tool MCP catalog, "write the script if missing" | **Runtime arm / delivery** | Cloud first prompt; grokbot `createSession({ instructions })` |
720
- | `<agentkit_context>` (session, channel, time) | Framework | First user prompt only |
721
- | Harness `<user_info>` `Workspace Path` | **Workspace** (today: cwd) | Local harness, every turn |
722
- | Mount table, dialects, "no shell" | **Workspace** | Missing as an API; stuffed into instructions.md |
723
-
724
- A string on `Runtime` re-bundles those layers and cannot say
725
- which channel to use. Returning prose does not update harness
726
- `Workspace Path`. `virtualRuntime` sets `root()` to `/` and
727
- does not materialize a scratch cwd. `local.workspaceDir` +
728
- virtual is a discovery error. `root()` is the contract; if it
729
- disagrees with `brief()`, the model gets two maps.
730
-
731
- Ownership rules:
732
-
733
- 1. **Agent instructions stay authored.** The framework never asks
734
- a runtime to supply the agent's job description.
735
- 2. **Workspace brief is an addendum.** Mount-table paragraphs move
736
- here; "You write a monitoring plan for one PR" does not.
737
- 3. **Arm-owned catalogs stay on the arm.** Cloud's
738
- `agentsdk-tools` preamble and grokbot's composed blob are
739
- delivery, not `Workspace.brief()`.
740
- 4. **Brief is session-scoped.** Planner mounts depend on the
741
- dispatcher's binding (repo, SHA, which mounts exist).
742
- `brief(ctx)` runs when the session workspace is built.
743
- 5. **Prefer structure over a blob.** `root()` is what
744
- the harness honors. Do not grow `brief()` into a second
745
- instructions.md.
746
-
747
- ### What `shell` is allowed to be
748
-
749
- `shell` is "run a program, return stdout/stderr/exit." Language
750
- and isolation are implementation details. The namespace is not:
751
- `shell` must see the same tree as `ls` / `read`.
752
-
753
- | Implementation | Language | Isolation | How the tree stays one |
754
- |---|---|---|---|
755
- | Host | bash / zsh / cmd | Serve-host process, optional sandbox | Same cwd as file verbs |
756
- | Script isolate (tools.md §8) | TypeScript | Host-side isolate; only bound Workspace methods | `shell` *is* those methods |
757
- | Remote machine (computer-use.md) | bash on the pod | anyrun microVM, no host secrets | File verbs are commands over the same `shell` |
758
-
759
- A virtual workspace may omit `shell` (change-monitor today). The
760
- loop does not change.
761
-
762
- A TypeScript isolate and host bash are different trust classes.
763
- Do not overload one `shell` method for both. Omit `shell` and
764
- keep `script` as an authored tool (tools.md §8). A shell-backed
765
- mount (`cloudFs`) is the other `shell`. If those two ever
766
- need one method, add a `kind` then — not as a staged "v2."
767
-
768
- ### What stays off `Runtime`
769
-
770
- - **Inference.** Local Connect client stays framework-owned.
771
- - **`AgentRunner`.** Internal `startServer` test/host seam.
772
- Not a `Runtime` arm.
773
- - **MCP / OAuth / peer URLs.** Host capabilities, already on
774
- `ctx.host` and connection files.
775
- - **Server tools / `builtinTools`.** Host-side,
776
- `execution: "server"`. They are not workspace verbs.
777
- - **`ctx.host.files`.** Durable store. A workspace *may* mount it
778
- (change-monitor `/host`); the store API itself is not FS.
779
-
780
- ### Composition rules
781
-
782
- 1. **`localRuntime(opts?)`** → `{ kind: "local", workspace: localWorkspace(opts) }`
783
- (today). Sibling `local` is deprecated sugar for `opts`.
784
- **`sandboxRuntime(opts?)`** is the named constructor for
785
- host-local + Cursor sandbox: `localRuntime({ ...opts, sandbox: true })`.
786
- The workspace omits `shell`. Host+sandbox turns do not
787
- inject that workspace into the SDK.
788
- 2. **`virtualRuntime(fs?)`** → local arm + that workspace.
789
- Each implemented method exposes that tool. Authored
790
- `execution: "server"` tools stay on the host. Effect and
791
- approval policy wrap the tool call, then the Workspace
792
- runs. `tools` may only narrow, fail-closed.
793
- `local.workspaceDir` / `sandbox` + virtual is a discovery
794
- error.
795
- 3. **`cloudRuntime` / `grokbotRuntime` have no `workspace`
796
- field.** Those arms own their tree. A machine API would
797
- add a field on that arm later, not a sibling we then
798
- refuse.
799
- 4. **`tools` allowlist + cloud/grokbot** → same fail-closed
800
- errors as today.
801
- 5. **Per-send `runtime?: CloudRuntime | LocalRuntime`.**
802
- Host-local + `cloudRuntime` → attach. Host-local +
803
- `localRuntime(opts)` / `sandboxRuntime(opts)` → overlay
804
- cwd / sandbox / workspaceDir. Cloud + `cloudRuntime` → replace the
805
- session cloud payload (no merge). Virtual + either →
806
- refuse. Cloud / grokbot + `localRuntime` → refuse.
807
- Grokbot + `cloudRuntime` → refuse (today's throw).
808
- `grokbotRuntime` is not in the field type. Deprecated
809
- `send({ cloud })` / `send({ workspaceDir })` stay as
810
- shims. `send({ runtime, cloud })` and
811
- `send({ runtime, workspaceDir })` fail closed.
812
- 6. **Delivery** is derived from the arm and, on local, which
813
- workspace: host → materialize; virtual → no host
814
- workspace, `Workspace Path` is `/`, skills only if the
815
- author mounted `skillsFs()`; cloud → preamble + store;
816
- grokbot → session instructions.
817
-
818
- ---
819
-
820
- ## 2. What the string actually selects
821
-
822
- `AgentRuntime` lives on the Agent SDK config
823
- (`packages/agent-serve/src/types.ts`). The Cursor SDK has **no**
824
- `runtime` field on `AgentOptions`. It routes on `options.cloud`
825
- (or a `bc-` agent id) in `createDefaultAgent` /
826
- `resumeDefaultAgent` (`packages/cursor-sdk/src/agent/platform.ts`).
827
- The Agent SDK string is a product-level selector that then builds
828
- different SDK option bags.
829
-
830
- There are already three values, plus a hybrid, plus a consumer
831
- that forges a fourth:
832
-
833
- | | Local loop | Cloud loop | Grok Bot loop | Change-monitor today |
834
- |---|---|---|---|---|
835
- | **Turn runner** | Cursor SDK local harness on the serve host (`sdk-runner.ts`) | Cursor cloud API (`POST /v1/agents`, SSE) | Hosted `/v0/grokbot` client (`grokbot/runner.ts`) | Local harness |
836
- | **Inference** | Backend `AgentService` via Connect; model from `defineAgent` | Coupled inside the cloud agent service; model optional | Hosted harness picks the model; `defineAgent.model` ignored | Same as local |
837
- | **Workspace (builtins)** | Host OS via `LocalResourceProvider` | Cloud VM; SDK is an event client only | The account's Sand box | Authored server tools over a consumer filesystem |
838
- | **`tools` allowlist** | Enforced (`x-cursor-agent-allowed-tools`) | `ConfigurationError` if set; discovery / hybrid turn fail closed | Fail closed at discovery | `tools: []` so natives never fire |
839
- | **Server tools** | SDK `customTools` in-process | HTTP MCP `agentsdk-tools` back to the host | Blocked at discovery | In-process (this is why they stay local) |
840
- | **Approvals** | Supported | Not supported | N/A | Supported |
841
- | **Instructions** | Host `AGENTS.md` (or inline if cwd is borrowed) | First-prompt preamble | `createSession({ instructions })` | Instructions + skills index; cwd is a fake `/repo` |
842
- | **Skills** | Materialized into `.cursor/skills/` | Synced to Agent Store | Warned: not on the box | Advertised in instructions, not harness files |
843
- | **Sandbox seeds** | Written into the session workspace | Ignored | Ignored | Unused (`tools: []`) |
844
- | **MCP** | Loopback / per-send auth | Bridged or forwarded; needs `--public-url` | Blocked | Used (sandbox stays off so MCP does not fail closed) |
845
- | **Subagents** | SDK `agents` | SDK `agents` | Blocked | Off (`tools: []` strands `task`) |
846
- | **`send({ runtime })`** | Host-local → attach or overlay; cloud → replace payload | Replace payload | Refused | Not used |
847
-
848
- The string is checked in roughly fifteen Agent SDK sites. The
849
- concentrated ones:
850
-
851
- - `discovery.ts` — compile-time capability errors/warnings per value.
852
- - `cloud-merge.ts` `resolveSessionRuntime` — per-session cloud attach
853
- forces `"cloud"`; grokbot throws.
854
- - `session-engine.ts` `buildTurnRequest` — one function assembles
855
- tools, customTools, MCP, instructions, skills sync, and the
856
- fail-closed hybrid guards.
857
- - `sdk-runner.ts` `openAgent` — `cloud:` block vs local `cwd` /
858
- `sandbox` / `tools`.
859
- - `runtime-dispatch-runner.ts` — grokbot vs everything else.
860
-
861
- There is no plugin registry. `StartServerInternalOptions.runner`
862
- can replace the whole `AgentRunner`, which is too coarse to inject
863
- a filesystem.
864
-
865
- ---
866
-
867
- ## 3. Change-monitor is already a virtual workspace
868
-
869
- Planner, executor, and curator all do the same thing
870
- (`factory/change-monitor/{planner,executor,curator}/agent/agent.ts`):
871
-
872
- ```ts
873
- export default defineAgent({
874
- runtime: "local",
875
- tools: [],
876
- local: {
877
- workspaceDir: "/repo", // does not need to exist
878
- sandbox: false, // sandbox makes MCP fail closed
879
- },
880
- });
881
- ```
882
-
883
- Then `src/vfs/tools.ts` reimplements `ls` / `glob` / `read` /
884
- `grep` as server tools whose descriptions and parameter schemas
885
- are copied **verbatim** from the native harness
886
- (`tools.contract.test.ts` pins the equality). Bodies call
887
- `mountVfsForSession` and today's consumer filesystem type
888
- (they named it `VFS`; Phase 3 replaces it with `FileSystem`):
889
-
890
- ```ts
891
- interface VFS {
892
- list(dir: string): Promise<VFSEntry[]>;
893
- glob(pattern: string, dir?: string): Promise<string[]>;
894
- read(path: string): Promise<string>;
895
- grep(query: GrepQuery): Promise<GrepResult>;
896
- search(query: SearchQuery): Promise<GrepResult>;
897
- write?(path: string, contents: string): Promise<void>;
898
- }
899
- ```
900
-
901
- That type is **not** a july type. `search` (regex = `grep`,
902
- tags on issues, reserved keyword / semantic) stays theirs if
903
- they still want the authored tool. The framework cutover is
904
- `FileSystem` + native tools.
905
-
906
- Mounts (`src/vfs/session.ts`) compose into one namespace: `/repo`
907
- (Origin at a pinned SHA), `/host` (`ctx.host.files`), plus plans /
908
- issues / checkpoints / skills. The model thinks it has a
909
- filesystem. The serve host has no checkout and no shell.
910
-
911
- Two follow-on designs stay on this local-loop + virtual-workspace
912
- posture rather than flipping the string:
913
-
914
- - **Tool scripting** (tools.md §8, not implemented): a `script`
915
- server tool that runs TypeScript against a capability-bounded
916
- tool bridge. Authored tool, still under
917
- `virtualRuntime(fs)`. Not a new loop.
918
- - **Computer use** (computer-use.md, not implemented): a
919
- writable `/workspace` mount (`cloudFs`) whose file verbs are
920
- commands on a lazily-provisioned anyrun microVM. Union it into
921
- the same `FileSystem`. Explicitly **not** `runtime: "cloud"`: cloud
922
- turns cannot restrict tools, cannot run server tools
923
- in-process, and cannot park approvals.
924
-
925
- So "virtual" is one constructor with many filesystems. A third
926
- string value would repeat the original mistake.
927
-
928
- ---
929
-
930
- ## 4. Constraints the string hid
931
-
932
- ### 4.1 Cloud is not a different workspace on the same loop
933
-
934
- A local turn: the serve host runs the agent loop, the backend
935
- runs inference, tools run against a workspace (host or injected).
936
-
937
- A cloud turn: the SDK is a REST + SSE client (`CloudApiClient`).
938
- `createAgent` / `createRun` take a prompt. Tool execution happens
939
- on the VM; the SDK surfaces `tool_call` events. There is no
940
- in-process `read` or `shell` to swap. The public cloud surface has
941
- no `Exec` RPC (computer-use.md Gap 1). Driving the VM by
942
- prompting it is "execution by persuasion" — rejected as an exec
943
- backend.
944
-
945
- `cloudRuntime` growing a `workspace` field would be either:
946
-
947
- 1. **Lies** — methods that do not run, because that arm owns
948
- the tree and the SDK cannot reach it, or
949
- 2. **A new product** — a machine primitive (create / exec / read /
950
- hibernate, no model attached) that does not exist on the
951
- public API.
952
-
953
- Until (2) exists, `cloudRuntime` is a **Runtime arm that
954
- owns its tree**. It has no `workspace` field.
955
-
956
- ### 4.2 Inference does not belong on `Runtime`
957
-
958
- Local already separates inference from tools:
959
- `AgentConnectClient` streams the model, `resources`
960
- (`ResourceAccessor`) execute side effects
961
- (`packages/cursor-sdk/src/agent/local-executor.ts`). Cloud and
962
- Grok Bot couple them inside a remote service.
963
-
964
- Putting `infer()` on `Runtime` would be true for local, false
965
- for cloud/grokbot, and unused by change-monitor. Keep inference
966
- off the workspace. Replay / eval fakes keep using
967
- `StartServerInternalOptions.runner`.
968
-
969
- ### 4.3 Delivery is a third axis
970
-
971
- | Artifact | Local | Cloud | Grok Bot | Virtual |
972
- |---|---|---|---|---|
973
- | Instructions | `AGENTS.md` in cwd | First-prompt preamble | Session `instructions` | Authored instructions + optional `brief()` |
974
- | Skills | `.cursor/skills/` | Agent Store sync | Not on the box | Nothing unless the author mounts `skillsFs()` |
975
- | `execution: "agent"` scripts | Files in workspace | Prompt bodies | Prompt bodies | Banned without `shell` |
976
- | Sandbox seeds | Copied into cwd | Dropped | Dropped | Skip; put data in the `FileSystem` if the model should see it |
977
- | Workspace Path | Host cwd | VM | Box | `/` |
978
-
979
- `virtualRuntime` does not materialize a scratch dir and does
980
- not fake `/repo`. Everything is lazy from the `FileSystem`.
981
- Empty `virtualRuntime()` is a workspace at `/` with no methods.
982
-
983
- Skills are the sharp case. Authoring is one tree
984
- (`agent/skills/`). Discovery loads it the same way on every
985
- constructor. After that the pipes diverge. The model does
986
- not get the same catalog, the same load path, or the same
987
- ambient extras.
988
-
989
- | | How the catalog is advertised | Where `SKILL.md` bytes live | How the model loads the body | Ambient extras the author did not write |
990
- |---|---|---|---|---|
991
- | **`localRuntime()`** | Harness native catalog from `.cursor/skills/<name>/SKILL.md` in the session cwd (`materializeWorkspace`, rewritten every turn) | Those files on the host workspace | Harness skill loader; "Using {name}" | Project / user (`~/.cursor/skills`) / team / plugin / Cursor-managed layers if the cwd is a real checkout |
992
- | **`cloudRuntime()`** | Native store discovery (`--agent-store-skills-dir`) after `syncSkillsToStore` | Hosted: deployment store `skills/<name>/`. Local serve + personal key: USER store `agent-serve/<agent>/skills/`. Re-copied on every first cloud turn (the mount is writable; a once-per-process copy would let one session edit the definition) | Harness skill loader on the VM | Skills already in the cloud repo. If the store is unreachable or sync fails, **only** those — the turn still runs |
993
- | **`grokbotRuntime()`** | Discovery **warning** only: the box does not see authored skills | Nowhere on the box | It cannot | Whatever the hosted Grok Bot box already has. `GET /v1/info` still lists the agent's skills |
994
- | **`virtualRuntime`** | None by default. If the author mounts `skillsFs()`, they advertise (instructions index, `brief`, or a later catalog-path override) | Only on that mount, e.g. `/agent/skills/…` | Workspace `read` of the mount path | None. No host `.cursor/skills/` materialization |
995
-
996
- This is why delivery is derived from the **Runtime arm** and,
997
- on local, which workspace — not from `Workspace` alone:
998
-
999
- - local + host workspace → materialize `.cursor/skills/` (today).
1000
- - local + virtual workspace → no host workspace. Skills exist
1001
- only if the author unions `skillsFs()` (or their own
1002
- mount) and advertises it. `read` hits `/`.
1003
- - cloud → store sync. No cwd to write.
1004
- - grokbot → warn. Do not pretend the box has them.
1005
-
1006
- Do not put `skills()` on `Workspace`. `skillsFs()` is a
1007
- `FileSystem` the application may mount. The harness catalog
1008
- is not pointed at a fake `/repo`.
1009
-
1010
- ### 4.4 Capability gates stay fail-closed
1011
-
1012
- `tools` + cloud throws in the Cursor SDK
1013
- (`assertNoCloudToolsRestriction`). The Agent SDK repeats the
1014
- guard at discovery and again on hybrid turns
1015
- (`session-engine.ts` ~2020). `advertiseTools` / per-session MCP
1016
- auth are local-only for the same reason.
1017
-
1018
- If a workspace cannot honor an allowlist, the turn is refused.
1019
- Do not invent a "virtual cloud" that claims `tools: ["read"]`
1020
- and then runs a VM with a full shell.
1021
-
1022
- ### 4.5 `send({ runtime })` overlays or attaches
1023
-
1024
- Two jobs, one field:
1025
-
1026
- ```ts
1027
- SendMessageOptions.runtime?: CloudRuntime | LocalRuntime;
1028
- ```
1029
-
1030
- **Attach (hybrid).** Host-local agent, this session on a
1031
- VM. Same continuation token, different turn backend.
1032
-
1033
- ```ts
1034
- await send("fix the CI failure", {
1035
- runtime: cloudRuntime({
1036
- repos: [{ url, startingRef }],
1037
- }),
1038
- });
1039
- ```
1040
-
1041
- **Overlay.** Host-local agent, this session's host options
1042
- (PR worktree, etc.). Today's `send({ workspaceDir })`.
1043
-
1044
- ```ts
1045
- await send("review this PR", {
1046
- runtime: localRuntime({ workspaceDir: worktree }),
1047
- });
1048
- ```
1049
-
1050
- `virtualRuntime` is not a send argument (`virtualRuntime`
1051
- returns `LocalRuntime`, but a new tree mid-session is
1052
- refused). Types cannot tell host `localRuntime` from
1053
- `virtualRuntime`. Virtual + `cloudRuntime` or
1054
- `localRuntime({ workspaceDir })` fails at session start.
1055
-
1056
- | Agent default | `send({ runtime })` | |
1057
- |---|---|---|
1058
- | host `localRuntime` | `cloudRuntime(opts)` | Attach. Today's hybrid. |
1059
- | host `localRuntime` | `localRuntime(opts)` | Overlay cwd / sandbox / workspaceDir. |
1060
- | `virtualRuntime` | `cloudRuntime` / `localRuntime({ workspaceDir })` | Type-ok, refuse at start. |
1061
- | `cloudRuntime` | `cloudRuntime(opts)` | Replace session cloud payload. No merge. |
1062
- | `cloudRuntime` | `localRuntime` | Refuse. |
1063
- | grokbot | `cloudRuntime` / `localRuntime` | Refuse. Today's throw. |
1064
- | anything | `grokbotRuntime` | Type error. |
1065
-
1066
- Overlay uses today's cwd resolution: send overlay →
1067
- agent `localRuntime` opts → `cwd/<sessionId>` → durable
1068
- session dir. Cloud ignores a `workspaceDir` overlay.
1069
-
1070
- Preferred `cloudRuntime(opts)` on send is the full session
1071
- payload. It does not merge over `agent.cloud`. A cloud-default
1072
- agent that wants today's per-session merge keeps the
1073
- deprecated shim.
1074
-
1075
- Deprecated shims: `send({ cloud: opts })` →
1076
- `cloudRuntime(merge(agent.cloud, opts))`, then the table
1077
- (so a cloud-default agent still merges; grokbot still
1078
- refuses). `send({ workspaceDir })` →
1079
- `localRuntime({ workspaceDir })` when the agent is
1080
- host-local; ignored on cloud; refused on virtual / grokbot.
1081
- `send({ runtime, cloud })` and
1082
- `send({ runtime, workspaceDir })` fail closed.
1083
-
1084
- This is a session override, not a subagent (`task` /
1085
- `G12`). A process-wide singleton cannot express this.
1086
-
1087
- ### 4.6 Workspace is a product surface, not `ResourceAccessor`
1088
-
1089
- The harness workspace is `ResourceAccessor`
1090
- (`packages/agent-exec`): read, write/edit, grep, ls, glob (via
1091
- grep), shell, shell-stdin, MCP, computer-use, and more.
1092
- `LocalResourceProviderOptions` exposes overrides for **three**
1093
- of ~fifteen tools. Grep, ls, and glob have no public override.
1094
-
1095
- `FileSystem` is the public file-verb type: native tool names,
1096
- native arg schemas (`NativeArgs<T>`). `Workspace` adds `shell`
1097
- / `root` / `brief`. It is not a drop-in for
1098
- `ResourceAccessor`. Streaming stdin, MCP, and computer-use
1099
- stay off the type.
1100
-
1101
- ### 4.7 The model must call native `read`
1102
-
1103
- Models are trained on first-class `read` / `ls` / `grep` /
1104
- `glob`. Change-monitor copies those texts into server tools
1105
- because there is no supported way to keep the native tool
1106
- *name* and swap the *implementation* (computer-use.md Gap 2).
1107
-
1108
- That copy is not the real miss. Agent SDK server tools become
1109
- Cursor `customTools`. Those are a synthetic MCP server
1110
- (`custom-user-tools`). Local SDK defaults
1111
- `mcpMetaToolEnabled` to true, so the model's tool list is
1112
- `GetMcpTools` and `CallMcpTool`. After discovery the tool on
1113
- that server is `read`. The call is MCP, not `ReadToolCall`.
1114
- The stream event is `name: "mcp"`, not `name: "read"`.
1115
- `custom-user-tools-read` is the internal wire id, not a
1116
- top-level tool.
1117
-
1118
- Cursor SDK executor overrides keep the native tool, the
1119
- native schema, and the native `tool_call`. Only the
1120
- implementation is swapped. Callers of
1121
- `virtualRuntime(unionFs(…))` never see the binding. If
1122
- Workspace only registered the same per-agent server tools
1123
- change-monitor already ships, the model would still be on
1124
- MCP. That is not a fix.
1125
-
1126
- ---
1127
-
1128
- ## 5. Existing seams (use them; do not invent a fourth)
1129
-
1130
- ```
1131
- Agent SDK defineAgent({ runtime }) product selector
1132
-
1133
- Cursor SDK AgentOptions { local?, cloud? } dispatch
1134
-
1135
- local-runtime WorkspaceRuntime / SessionRuntime session factory
1136
-
1137
- local-exec LocalResourceProvider workspace
1138
-
1139
- agent-exec ResourceAccessor / ExecResource verb registry
1140
- ```
1141
-
1142
- Change-monitor sits *above* all of this, as
1143
- `execution: "server"` tools, because the bottom two layers are
1144
- not plumbed to `AgentOptions`.
1145
-
1146
- | Seam | What it is | Why it is not enough today |
1147
- |---|---|---|
1148
- | `AgentRunner` | Internal `startServer` turn replacement (`runTurn` / `prewarm`) | Replaces the whole turn; no workspace. Not a `Runtime` arm. |
1149
- | `RuntimeDispatchingRunner` | grokbot vs SDK | Hard-coded third case |
1150
- | `AgentOptions.local` / `.cloud` | Parallel config blocks | Presence of `cloud` *is* the runtime until later `Agent.create({ runtime })` |
1151
- | `LocalResourceProvider` overrides | Swap read/write/shell | Private; 3 of ~15 tools; not on `AgentOptions` |
1152
- | `ResourceAccessor` | The agent loop's workspace | Correct internal interface; not a public SDK type |
1153
- | Change-monitor filesystem | Product FS | Consumer-side; duplicated native schemas |
1154
- | `ctx.host.files` | Durable KV, file-shaped | Explicitly not a filesystem; natives cannot see the hosted sink |
1155
-
1156
- The first code PR promotes a public `Workspace` on
1157
- `AgentOptions.local`, bound as executor overrides. Agent SDK
1158
- then passes that workspace through `virtualRuntime`. Do not add
1159
- `runtime: "virtual"`. Do not monkey-patch
1160
- `sessionRuntime.resources` from `@cursor/july`.
1161
-
1162
- ---
1163
-
1164
- ## 6. Gaps and risks
1165
-
1166
- **G1. Cloud cannot honor an injected workspace.**
1167
- Public `CloudApiClient` is prompt-only. Exec-daemon
1168
- `ControlService.Exec` exists but needs per-pod credentials a
1169
- public caller cannot mint (computer-use.md Gap 1). Treat cloud
1170
- as an opaque loop. Do not ship Workspace methods on
1171
- `cloudRuntime`.
1172
-
1173
- **G2. Builtin redirection is not a public SDK feature.**
1174
- Overrides exist on `LocalResourceProviderOptions` and are not
1175
- passed through `createDefaultLocalWorkspaceRuntime` or
1176
- `AgentOptions` (computer-use.md Gap 2). Grep/ls/glob have no
1177
- override. This is the first code PR: add the missing
1178
- overrides, put `Workspace` on `AgentOptions.local`, and derive
1179
- the tools allowlist from method presence. The authoring API
1180
- in `@cursor/july` waits on that seam. Do not ship
1181
- `virtualRuntime` on lookalike server tools first.
1182
-
1183
- **G3. Native tool schemas vs consumer extras.**
1184
- A redirected `read` must keep the native schema. Verbs that
1185
- are not Cursor tools (`diff`, change-monitor `search`, CAS
1186
- `write`) stay authored tools. Do not widen native schemas to
1187
- carry mount-table prose; that belongs in `brief()` /
1188
- instructions.md (tools.md §6). Do not add `search` to
1189
- `FileSystem` for tags or keyword.
1190
-
1191
- **G4. Hybrid + virtual is easy to get wrong.**
1192
- A planner with a virtual workspace that also
1193
- `send({ runtime: cloudRuntime(...) })` would run
1194
- unrestricted on the VM. Refuse the attach, or require an
1195
- explicit second agent as the delegation target
1196
- (tools.md §3). `send({ runtime })` is not an open override.
1197
-
1198
- **G5. Grokbot is a third Runtime arm, not a workspace.**
1199
- It has no MCP, no server tools, no model override, no v2
1200
- architecture. Keep `grokbotRuntime()` as an arm with no
1201
- `workspace` field.
1202
-
1203
- **G6. Delivery / `Workspace Path`.**
1204
- `virtualRuntime` prints `/`. No scratch dir, no
1205
- `workspaceDir: "/repo"`. A `brief()` that names mounts the
1206
- `FileSystem` does not have is two maps; `root()` wins.
1207
-
1208
- **G7. Security: workspace isolation ≠ host isolation.**
1209
- Injecting a `FileSystem` does not sandbox the serve host. Server tools
1210
- still run in-process with host credentials. Host `shell` is
1211
- still host bash. Document the blast radius on each
1212
- implementation. Prompt-injected writes hit `/host` (or a
1213
- disposable VM), never the serve host's disk or secrets.
1214
-
1215
- **G8. `script` is not host `shell`.**
1216
- A TypeScript isolate that can only call bound Workspace methods
1217
- is a different trust class from `/bin/bash`. Do not overload
1218
- one `shell` method for both until two in-tree implementations
1219
- need a shared `shell` with a `kind`.
1220
-
1221
- **G9. Two public surfaces.**
1222
- `@cursor/sdk` owns `FileSystem` / `Workspace` (native schemas).
1223
- `@cursor/july` owns `virtualRuntime` and helpers that return
1224
- `FileSystem`. Phase 1 does not put constructors on
1225
- `Agent.create`. A later SDK deprecation uses the same
1226
- `Runtime` types. A july-only filesystem cannot re-point
1227
- natives without the SDK seam. Do not ship the authoring API
1228
- against lookalikes and flip the binding later.
1229
-
1230
- **G10. Test and eval story.**
1231
- A virtual workspace must work in `run` / `eval` without Origin.
1232
- Change-monitor already has in-memory filesystem fakes; those become
1233
- `virtualRuntime(memoryFs(…))` in tests.
1234
-
1235
- **G11. Versioning and published docs.**
1236
- String `runtime`, sibling `local` / `cloud`, and
1237
- `send({ cloud })` / `send({ workspaceDir })` are a shipped
1238
- user contract. Replacement is additive:
1239
- `localRuntime(opts)` / `cloudRuntime(opts)` plus `@deprecated`
1240
- on the old selector, sibling bags, and send shims. Do not
1241
- break existing `defineAgent({ runtime: "cloud", cloud })` or
1242
- `defineAgent({ local: { workspaceDir } })`. Do not document
1243
- constructors until they ship (Phase 4 / §9).
1244
-
1245
- **G12. Subagents keep today's behavior, stored as `Runtime`.**
1246
- Discovery still loads a child as a Cursor SDK custom
1247
- subagent (`task`: prompt + description + model). Authored
1248
- `runtime`, `tools/`, skills, MCP under `agent/subagents/`
1249
- are warned and ignored. The child gets the harness default
1250
- toolset on the parent's workspace. Empty july `tools: []`
1251
- does not mean the child is empty-tooled — those slots are
1252
- inert.
1253
-
1254
- Do not change that product. Internally, stop storing
1255
- `runtime: "local"` + `tools: []` as the child's july
1256
- config. Express the same forced host-local inherit as
1257
- `localRuntime()` whose workspace is the parent's (host
1258
- `localWorkspace` or the virtual tree). Authors do not get
1259
- a `Runtime` field on subagents in this design.
1260
-
1261
- A child with its own cwd, own cloud VM, or real july tools
1262
- is a later product. If that product ever honors a child
1263
- `Runtime`, default to inheriting the parent workspace so a
1264
- virtual parent does not spawn host `read`.
1265
-
1266
- **G13. Independently implemented `read` + `shell`.**
1267
- Flattening onto Workspace removes the attach-a-different-shell
1268
- footgun; it does not prove the backends share a namespace.
1269
- Prefer `virtualRuntime(unionFs(…))` / `localRuntime()`.
1270
- `virtualWorkspace` stays private.
1271
-
1272
- ---
1273
-
1274
- ## 7. Why Cursor SDK first
1275
-
1276
- A july-only cut can generate server tools from Workspace
1277
- methods and pin one schema pack. That is change-monitor
1278
- today, moved into the framework. The model would still call
1279
- `CallMcpTool` on `custom-user-tools` / `read`.
1280
- `tools: ["read"]` would still enable host `read`, not virtual
1281
- `read`. Stream consumers that key on `name === "read"`
1282
- would still miss the calls.
1283
-
1284
- That is the problem this work exists to fix. Do not ship
1285
- `virtualRuntime` on lookalikes and flip the binding later.
1286
- The first code PR opens `AgentOptions.local.workspace` and
1287
- rebounds the native executors.
1288
-
1289
- ---
1290
-
1291
- ## 8. Plan
1292
-
1293
- Each phase is its own PR. Today's `runtime` string keeps
1294
- working until a later deprecation window. Do not start Phase
1295
- 1 until this document (Phase 0) has been reviewed.
1296
-
1297
- ### Phase 0 — this document (this PR)
1298
-
1299
- Publish the design. No product code.
1300
-
1301
- Reviewers: Agent SDK and cursor-sdk maintainers; change-monitor
1302
- owners as the first consumer.
1303
-
1304
- Agree before any code PR:
1305
-
1306
- - The four goals at the top (compat — old fields deprecated
1307
- but kept, `localRuntime` default, fail-closed pairs,
1308
- `Workspace` instead of a longer enum)
1309
- - `Runtime` is a closed union; `workspace` only on the local
1310
- arm
1311
- - **Runtime arm** vs **workspace** vs **delivery**
1312
- - Workspace is one object, optional methods, one namespace
1313
- - Cloud/grokbot do not grow a `workspace` field until a
1314
- machine API exists
1315
- - Native redirection in Cursor SDK is the first code cut
1316
- - Change-monitor is the first workspace, in a later PR
1317
-
1318
- **Review asks** (comment on these):
1319
-
1320
- 1. Phase 1 adds `Workspace` on **Cursor SDK**
1321
- `Agent.create({ local: { workspace } })`
1322
- (`LocalAgentOptions`, next to `cwd` / `dirs`). That is
1323
- not `defineAgent({ local })`. july constructors stay in
1324
- Phase 2. Same-shape `Agent.create({ runtime })` is a
1325
- later SDK deprecation, not Phase 1. Agree?
1326
- 2. Method presence as the file/shell allowlist: fail-closed
1327
- when `tools` names a missing method?
1328
- 3. `virtualRuntime(fs?)` only; no public
1329
- `virtualRuntime(workspace)`? Empty default, `root()` is `/`.
1330
- No public `search` method. `FileSystem` is the file-verb
1331
- type. Agree?
1332
- 4. Session factory runs once per session, always async
1333
- (`Promise<FileSystem>`), with `SessionWorkspaceContext`
1334
- (`sessionId`, `agentName?`, `continuationKey?`, `host?`).
1335
- Per-wake data stays inside the `FileSystem`. Agree?
1336
- 5. Rejecting host executors for omitted methods when a
1337
- workspace is set (defense in depth), or tools-header only?
1338
- 6. Harness builtins (`webSearch`, `updateTodos`, …) stay off
1339
- Workspace and off `virtualRuntime`'s default. Opt in via
1340
- `tools`. Cloud still refuses `tools`. Agree?
1341
- 7. `edit` / `delete` / `semSearch` / `readLints` on Workspace
1342
- now (optional). Phase 1 only fail-closed-omits host
1343
- executors. Virtual bodies wait for a consumer. Agree?
1344
- 8. `Runtime` is a closed union. `workspace` only on
1345
- `{ kind: "local" }`. Agree?
1346
- 9. String `runtime` + sibling `local` / `cloud` stay
1347
- supported and are marked deprecated. Host options move
1348
- to `localRuntime(opts)` (`AgentLocalOptions`). Published
1349
- docs wait for Phase 4 (§9). Agree?
1350
- 10. `send({ runtime?: CloudRuntime | LocalRuntime })`.
1351
- Host-local + `cloudRuntime` = attach. Host-local +
1352
- `localRuntime(opts)` = overlay. Cloud + `cloudRuntime`
1353
- = replace payload (no merge). Grokbot + cloud refused.
1354
- `send({ cloud })` / `send({ workspaceDir })` deprecated
1355
- shims (`send({ cloud })` still merges).
1356
- `send({ runtime, cloud })` fail-closed. Agree?
1357
-
1358
- **Out of this PR:** types, executors, discovery, change-monitor
1359
- code, published user docs.
1360
-
1361
- ### Phase 1 — Cursor SDK: inject a workspace
1362
-
1363
- Packages: `cursor-sdk`, `cursor-sdk-local-runtime`,
1364
- `local-exec`. No `@cursor/july` authoring change.
1365
-
1366
- `AgentOptions` in this phase is `@cursor/sdk`'s
1367
- `Agent.create` bag (`packages/cursor-sdk/src/agent/options.ts`).
1368
- It is not `defineAgent`'s `AgentLocalOptions`. Agent SDK
1369
- does not grow a `local.workspace` field here. Phase 2's
1370
- `virtualRuntime` writes the `FileSystem` into this SDK
1371
- field when july builds `Agent.create({ local })`.
1372
-
1373
- - Add `FileSystem` / `Workspace` on Cursor SDK
1374
- `LocalAgentOptions.workspace` (next to `cwd` / `dirs`).
1375
- Method args are `NativeArgs<T>` matching each tool schema.
1376
- - Derive `tools` from method presence when the caller omitted
1377
- `tools`. Intersect fail-closed when they passed one.
1378
- - Add `overrideGrepExecutor` / `overrideLsExecutor` /
1379
- `overrideDeleteExecutor` on `LocalResourceProvider`. Glob
1380
- rides the grep executor. `edit` rides the write executor.
1381
- `readLints` rides `diagnosticsExecutor`. `semSearch` has
1382
- no local-exec override today; when a workspace is set and
1383
- `semSearch` is omitted, do not register the host index
1384
- tool.
1385
- - Plumb overrides through
1386
- `createDefaultLocalWorkspaceRuntime` → the resource
1387
- provider factory → `createLocalExecutor`.
1388
- - When a workspace is set, bind present methods and reject
1389
- omitted path-namespace natives (do not leave host `read` /
1390
- `edit` / `delete` / `semSearch` / `readLints` / `shell`
1391
- registered behind a virtual tree). Virtual implementations
1392
- of `edit` / `delete` / `semSearch` / `readLints` are not
1393
- required in this PR.
1394
- - Cloud + `local.workspace` throws, same posture as
1395
- `tools` + cloud.
1396
- - Unit tests: a map-backed workspace serves native `read` /
1397
- `ls` / `grep` / `glob` through the executor adapters. No
1398
- model turn.
1399
-
1400
- **Not in this PR:** `defineAgent({ runtime })` object form,
1401
- constructors on `Agent.create`, `virtualRuntime`,
1402
- `memoryFs`, change-monitor, published docs. Presence of
1403
- `cloud` still dispatches.
1404
-
1405
- Acceptance:
1406
-
1407
- - `Agent.create({ local: { workspace }, tools })` rebinds
1408
- natives; a missing method is absent from the toolset and
1409
- errors if invoked.
1410
- - Existing local agents (no `workspace`) are unchanged.
1411
- - `workspace` + `cloud` is a `ConfigurationError`.
1412
-
1413
- ### Phase 2 — Agent SDK: `runtime` accepts a `Runtime` object
1414
-
1415
- Packages: `@cursor/july` (`packages/agent-serve`). Depends on
1416
- Phase 1.
1417
-
1418
- ```ts
1419
- runtime?: AgentRuntime | Runtime;
1420
- local?: AgentLocalOptions; // still supported
1421
- cloud?: AgentCloudOptions; // still supported
1422
- ```
1423
-
1424
- `"local"` / omitted → `localRuntime(agent.local)` (`{ kind:
1425
- "local", workspace: localWorkspace(opts) }`; today's
1426
- default). `"cloud"` → `cloudRuntime(agent.cloud)`.
1427
- `"grokbot"` → `grokbotRuntime()`. Those constructors return
1428
- the `Runtime` union in §1. JSDoc marks the string and
1429
- sibling `local` / `cloud` `@deprecated` in favor of
1430
- `localRuntime(opts)` / `cloudRuntime(opts)`. The fields
1431
- stay.
1432
-
1433
- `virtualRuntime(fs?)` lifts a `FileSystem` (or an async
1434
- per-session factory) to `AgentOptions.local.workspace`. Empty
1435
- `virtualRuntime()` is `/` and no file methods. Omit `tools`
1436
- so workspace methods are the file/shell allowlist; do not
1437
- keep `tools: []`. Discovery validates the composition rules
1438
- in §1. `brief(ctx)` folds into the prompt. `<user_info>`
1439
- Workspace Path is `/`. No `materializeWorkspace`.
1440
- `local.workspaceDir` + virtual fails closed.
1441
- `SendMessageOptions.runtime?: CloudRuntime | LocalRuntime`.
1442
- Host-local + `cloudRuntime` attaches. Host-local +
1443
- `localRuntime(opts)` overlays cwd / sandbox / workspaceDir.
1444
- Virtual + either fails closed. Deprecated `send({ cloud })`
1445
- still merges over `agent.cloud`. Deprecated
1446
- `send({ workspaceDir })` still overlays a host-local agent.
1447
-
1448
- `memoryFs` and `skillsFs` ship here as `FileSystem`
1449
- helpers. The latter is opt-in.
1450
-
1451
- **Not in this PR:** change-monitor cutover, `unionFs` unless
1452
- a test needs it, published user-guide rewrite.
1453
-
1454
- Acceptance:
1455
-
1456
- - Existing string agents unchanged.
1457
- - A fixture agent with
1458
- `virtualRuntime(memoryFs({ "/a.txt": "hi" }))` can
1459
- `agent-sdk call read` and get `hi` from the native `read`
1460
- tool.
1461
- - `virtualRuntime(...)` + `send({ runtime: cloudRuntime(...) })`
1462
- still fails closed.
1463
- - `send({ cloud })` still attaches a local agent to cloud
1464
- (merge). On a cloud-default agent it still merges.
1465
- `send({ runtime: cloudRuntime(opts) })` replaces, no merge.
1466
- - Grokbot + `send({ cloud })` / `send({ runtime: cloudRuntime })`
1467
- still refuses.
1468
- - `send({ runtime: localRuntime({ workspaceDir }) })` overlays
1469
- a host-local agent. `send({ workspaceDir })` still works.
1470
- - `send({ runtime, cloud })` fails closed.
1471
- - Discovery matrix: object-form runtimes produce the same
1472
- fail-closed errors as today's string (tools + cloud,
1473
- advertiseTools + cloud, grokbot + server tools).
1474
-
1475
- ### Phase 3 — change-monitor adopts `virtualRuntime`
1476
-
1477
- Depends on Phase 2. Session binding is the hard part:
1478
- planner/executor filesystem is per-session (PR, SHA, which mounts
1479
- exist), and `defineAgent` runs before that is known.
1480
-
1481
- Replace `tools: []` + copied `src/vfs/tools.ts` schemas for
1482
- `ls` / `glob` / `read` / `grep` with
1483
- `virtualRuntime(async (ctx) => unionFs({ … }))`. Mount
1484
- `skillsFs()` if they still want `/agent/skills`. Writable
1485
- mounts implement native `write` / `edit` and omit
1486
- `delete` / `semSearch` / `readLints` unless a mount earns
1487
- them. Keep authored tools that have no FileSystem method
1488
- (`diff`, CAS extras, plugin telemetry, tag `search` if they
1489
- still want it). Drop `workspaceDir: "/repo"`. `root()` is
1490
- `/`.
1491
-
1492
- Acceptance:
1493
-
1494
- - Change-monitor does not ship a second copy of native
1495
- schemas.
1496
- - Planner/executor still have no host shell and no checkout.
1497
- - Native `read` / `ls` / `grep` / `glob` hit the mounted `FileSystem`.
1498
-
1499
- ### Phase 4 — docs and templates
1500
-
1501
- Ship the published-docs plan in §9. Constructors become the
1502
- authoring vocabulary. The string and sibling `local` /
1503
- `cloud` stay in the pages as deprecated-but-supported.
1504
- Do this after Phase 2 is real. Do not document constructors
1505
- that have not shipped.
1506
-
1507
- ### After Phase 4 — not a "v2" of this type
1508
-
1509
- This design is the end state of the authoring type.
1510
- `Workspace` already lists every path-namespace verb. Phases
1511
- 1–4 ship that type and the first workspaces. There is no
1512
- second abstraction waiting behind "v1."
1513
-
1514
- What remains is implementation of methods a given workspace
1515
- omits, or **other products** that plug into the same
1516
- constructors.
1517
-
1518
- **Already in this type; a workspace implements when it can**
1519
-
1520
- | Gap | Who fills it | Not |
1521
- |---|---|---|
1522
- | Virtual `edit` / `write` | Change-monitor writable mounts (Phase 3) | A new Workspace field |
1523
- | Virtual `delete` | A mount that can delete | Host `delete` behind a virtual tree |
1524
- | Virtual `semSearch` | A `FileSystem` that owns an index of `root()` | Host index of the serve disk |
1525
- | Virtual `readLints` | A mount that owns diagnostics | Host LSP against a fake cwd |
1526
- | `unionFs` as a public helper | Phase 3 if the factory needs it; otherwise when a second consumer unions mounts | A new runtime |
1527
-
1528
- **Other designs, same constructors**
1529
-
1530
- | Work | Home | How it uses this type |
1531
- |---|---|---|
1532
- | anyrun `/workspace` (`cloudFs`) | factory/change-monitor `computer-use.md` | A shell-backed mount inside `virtualRuntime(unionFs(…))`. Not `cloudRuntime`. |
1533
- | TypeScript `script` isolate | factory/change-monitor `tools.md` §8 | Authored server tool. Not `Workspace.shell`. |
1534
- | Cloud `tools` allowlist | Cursor cloud agent API | Then `defineAgent({ tools })` means the same on `cloudRuntime`. Fail closed until that API exists. |
1535
- | Machine without a model (create / exec / read / hibernate) | New backend surface | The only way `cloudRuntime` can accept a `workspace` for inspection. Do not prompt the VM. |
1536
- | Child with its own `Runtime` | Later product | Today's inherit stays (`G12`). Internally already `localRuntime()` on the parent workspace. No authoring `runtime` on `agent/subagents/` in this design. |
1537
- | `Agent.create({ runtime })` | `@cursor/sdk` after Phase 4 | Same constructors as july. Sibling `local` / `cloud` deprecated as the dispatcher. Not Phase 1. |
1538
- | Deprecate `runtime: "local" \| "cloud"` | After Phase 4 has shipped | Additive constructors first. |
1539
-
1540
- **Not a follow-on. Do not build.**
1541
-
1542
- - `{ kind: "custom"; runner: AgentRunner }` on `Runtime`
1543
- - A `Harness` type / `Runtime.webSearch()`
1544
- - `infer()` on `Runtime`
1545
- - `virtualRuntime(workspace: Workspace)`
1546
- - `cloudRuntime` Workspace methods that prompt the VM
1547
- - Lookalike server tools as a stepping stone
1548
-
1549
- ---
1550
-
1551
- ## 9. Documentation
1552
-
1553
- Phase 4 work. Published Agent SDK docs live under
1554
- `packages/agent-serve/docs/` (VitePress). They never say
1555
- `agent-serve`. Product name is Agent SDK; package is
1556
- `@cursor/july`; CLI is `agent-sdk`. This design file stays
1557
- internal (`srcExclude: ["design/**"]`).
1558
-
1559
- Do not rewrite user docs in Phases 0–3. Constructors that
1560
- have not shipped must not appear on cursor.com / the
1561
- VitePress site.
1562
-
1563
- ### How we talk about runtime
1564
-
1565
- Lead with what the reader is choosing: where the turn runs,
1566
- and (for local) which files the model sees. Constructors
1567
- are the vocabulary.
1568
-
1569
- | Say | Do not say |
1570
- |---|---|
1571
- | `localRuntime()` runs turns on this machine | "the local loop" / `kind: "local"` |
1572
- | `sandboxRuntime()` runs those turns inside Cursor's local sandbox | `localRuntime({ sandbox: true })` as the preferred form |
1573
- | `cloudRuntime({ repos })` runs turns on a Cursor cloud agent | "cloud is the other filesystem" / `runtime: "cloud"` as the only form |
1574
- | `virtualRuntime(fs)` runs locally against a filesystem you pass | `runtime: "virtual"` / `Workspace` / `Computer` |
1575
- | String `runtime` and sibling `local` / `cloud` still work | That they are gone, or that they are the preferred form |
1576
-
1577
- Omit internals: `Runtime` union arms, `kind`, `FileSystem` vs
1578
- `Workspace` lift, `AgentRunner`, `virtualWorkspace`,
1579
- `AgentOptions.local.workspace`, MCP lookalikes, executor
1580
- overrides. Those belong in this design file and in JSDoc for
1581
- SDK maintainers, not in the user guide.
1582
-
1583
- `virtualRuntime` is a real user feature (tests, hosted
1584
- trees, change-monitor-style agents). Document it as "pass
1585
- the files the agent may see." Show `memoryFs` for tests.
1586
- Show a mount table only when `unionFs` has shipped. Do not
1587
- teach readers to implement `FileSystem` from scratch on the
1588
- first page.
1589
-
1590
- Deprecated fields get one short note and a link to the
1591
- constructor, not a second tutorial:
1592
-
1593
- > `runtime: "cloud"` is still accepted. Prefer
1594
- > `cloudRuntime({ repos })`.
1595
-
1596
- Document host options on `localRuntime({ cwd, workspaceDir,
1597
- sandbox })`, next to `cloudRuntime({ repos })`. Sibling
1598
- `local` / `cloud` get a deprecated note and a link.
1599
-
1600
- ### Pages to update (Phase 4)
1601
-
1602
- **Own the contract (rewrite the runtime sections)**
1603
-
1604
- | Page | Change |
1605
- |---|---|
1606
- | [reference/agent-config.md](/docs/reference/agent-config.md) | `runtime` type becomes constructors **or** the deprecated string. Table + "Choose a runtime" show `localRuntime(opts)` / `cloudRuntime(opts)` / `virtualRuntime(fs)` first. Move cwd / sandbox / workspaceDir onto the `localRuntime` section. Mark sibling `local` / `cloud` and string `runtime` deprecated. |
1607
- | [concepts.md](/docs/concepts.md) | Local vs cloud table: same facts, constructor names. Add one line that `virtualRuntime` is local-with-your-files, not a third host. |
1608
-
1609
- **New page**
1610
-
1611
- | Page | Change |
1612
- |---|---|
1613
- | `guides/virtual-runtime.md` (new) | When to use `virtualRuntime`: no host checkout, tests (`memoryFs`), composed mounts. Empty default (`/`, no methods). Skills only if you mount them. No `workspaceDir`. Fail-closed hybrid cloud attach. Link from agent-config and concepts. |
1614
-
1615
- **Fix examples and cross-links only**
1616
-
1617
- | Page | Change |
1618
- |---|---|
1619
- | [quickstart.md](/docs/quickstart.md) | Default scaffold stays `localRuntime()` or omit `runtime` (same default). Do not mention virtual. |
1620
- | [scaffolding-agents.md](/docs/scaffolding-agents.md) | Same. |
1621
- | [reference/instructions.md](/docs/reference/instructions.md) / [reference/skills.md](/docs/reference/skills.md) | "On the cloud runtime" → "On `cloudRuntime`" where it is a code choice; keep the delivery facts. |
1622
- | [reference/tools.md](/docs/reference/tools.md) | `tools` + cloud still fail closed. Mention it works the same on `cloudRuntime`. |
1623
- | [reference/cli.md](/docs/reference/cli.md) | `agent-sdk call read` against a virtual fixture if we add one in Phase 2. |
1624
- | [troubleshooting.md](/docs/troubleshooting.md) | Discovery errors: string+incoherent pair, `virtualRuntime` + `workspaceDir`, hybrid attach or local overlay on virtual. |
1625
- | `templates/*.md` (e.g. [code-wiki.md](/docs/templates/code-wiki.md)) | Examples that set `runtime: "cloud"` get a constructor form; leave a one-line deprecated equivalent if the template is copy-paste for existing agents. |
1626
- | [building-with-agents.md](/docs/building-with-agents.md) / [deployment.md](/docs/deployment.md) | Wording only if they name the string as the way to choose a host. |
1627
-
1628
- **Do not document here**
1629
-
1630
- - Cursor SDK `AgentOptions.local.workspace` (SDK maintainer JSDoc).
1631
- - Change-monitor mount tables (their repo docs).
1632
- - Grok Bot unless a public template already ships `grokbot`.
1633
- - `kind`, `Workspace`, `FileSystem` method lists (JSDoc on
1634
- `@cursor/sdk` is enough for authors who implement a mount).
1635
-
1636
- ### JSDoc (Phase 2, with the types)
1637
-
1638
- On `@cursor/july`:
1639
-
1640
- - `runtime?: AgentRuntime | Runtime` — constructors first.
1641
- String values `@deprecated Use localRuntime(opts) / cloudRuntime(opts) / grokbotRuntime()`.
1642
- - `local?` — `@deprecated Use localRuntime(opts)`. Still
1643
- read when `runtime` is omitted or `"local"`. Error with
1644
- `virtualRuntime` or `cloudRuntime`.
1645
- - `cloud?` — `@deprecated Use cloudRuntime(opts)`.
1646
- - `SendMessageOptions.cloud` — `@deprecated Use
1647
- send({ runtime: cloudRuntime(opts) })`. Compat shim still
1648
- merges over `agent.cloud`.
1649
- - `SendMessageOptions.workspaceDir` — `@deprecated Use
1650
- send({ runtime: localRuntime({ workspaceDir }) })`.
1651
- - `SendMessageOptions.runtime?: CloudRuntime | LocalRuntime`
1652
- — attach, overlay, or replace cloud payload. Virtual +
1653
- either, and grokbot + cloud, fail at start. Together with
1654
- sibling `cloud` / `workspaceDir` fails closed.
1655
-
1656
- On `@cursor/sdk` (Phase 1):
1657
-
1658
- - New `local.workspace` documented as the injection seam.
1659
- - Existing `local` / `cloud` blocks stay unmarked. Same-shape
1660
- `Agent.create({ runtime })` is after Phase 4.
1661
-
1662
- ### Deprecation window
1663
-
1664
- Phase 4 publishes constructors and marks the string
1665
- deprecated. A later PR, after that has shipped, may set a
1666
- removal date. This design does not pick one.
1667
-
1668
- ---
1669
-
1670
- ## 10. Non-goals
1671
-
1672
- - Rewriting the cloud agent API or making `tools` work on `bc-`
1673
- agents. Fail closed stays until the API can honor it.
1674
- - Unifying Grok Bot into Workspace methods.
1675
- - Promoting `AgentRunner` onto `defineAgent` / `Runtime`.
1676
- Replay and eval fakes keep `StartServerInternalOptions.runner`.
1677
- - A user-authored `infer()` on `Runtime`.
1678
- - `Runtime.instructions()` or `Runtime.read()` — those belong
1679
- on Workspace, or they re-bundle the string.
1680
- - A `Shell` type the caller attaches next to `FileSystem`.
1681
- `shell` stays on `Workspace`.
1682
- - `virtualRuntime(workspace: Workspace)`. The lift is
1683
- internal; authors pass a `FileSystem`. Change-monitor
1684
- `search` / tags stay authored if needed.
1685
- - Moving server tools, MCP, or `ctx.host.files` behind
1686
- Workspace.
1687
- - A `runtime: "virtual"` string.
1688
- - `SendMessageOptions.runtime?: Runtime` (the full union,
1689
- including grokbot). The field is `CloudRuntime |
1690
- LocalRuntime`. Honoring every pair is still a non-goal.
1691
- - Removing string `runtime` or sibling `local` / `cloud` in
1692
- Phases 1–4. Deprecate in docs and JSDoc; delete later.
1693
- - Letting `cloudRuntime` pretend to implement Workspace methods
1694
- by prompting the VM.
1695
- - Shipping lookalike server tools as the first binding.
1696
- - One PR that lands SDK plumbing, july constructors, and
1697
- change-monitor together.
1698
- - A `Harness` / `Runtime.webSearch()` surface so todos and
1699
- search look like Workspace methods. Availability is
1700
- `defineAgent({ tools })`. Rebind later via local executor
1701
- overrides if a consumer needs a stub.
1702
-
1703
- ---
1704
-
1705
- ## 11. Proof each code PR owes
1706
-
1707
- Phase 0 has no experiment. Later PRs prove the seam they
1708
- open, not the whole stack.
1709
-
1710
- 1. **Phase 1.** Cursor SDK unit test: `overrideReadExecutor`
1711
- (and ls/grep) serve a map. `Agent.create` with an injected
1712
- workspace advertises only the present methods.
1713
- 2. **Phase 2.** Fixture agent with
1714
- `virtualRuntime(memoryFs({ "/a.txt": "hi" }))`.
1715
- `agent-sdk call read` returns `hi` from native `read`.
1716
- Discovery matrix matches today's fail-closed errors.
1717
- 3. **Phase 3.** Change-monitor planner/executor typecheck
1718
- against `virtualRuntime(unionFs(…))`. No second schema copy.
1719
- No host checkout.
1720
-
1721
- ---
1722
-
1723
- ## 12. Decision summary
1724
-
1725
- | Question | Answer |
1726
- |---|---|
1727
- | Design goals? | Compat with today's `defineAgent` / `AgentOptions` shape. Default `localRuntime()`. Fail-closed incoherent pairs. Extensibility via `Workspace`, not a longer enum. |
1728
- | What replaces the string? | Closed `Runtime` union. `workspace` only on `{ kind: "local" }`. `localRuntime(opts)` / `cloudRuntime(opts)` take today's option bags. String + sibling `local` / `cloud` stay, deprecated. |
1729
- | Where do file/shell verbs live? | `FileSystem` in `@cursor/sdk` (native tool names + `NativeArgs<T>`). `Workspace` adds `shell` / `root` / `brief`. No public `search` method. |
1730
- | How do new files get created? | Native **Write** tool (`write` on FileSystem). Str-replace `edit` cannot create. Apply-patch `edit` can via `Add File`. |
1731
- | Empty `virtualRuntime()`? | `/`, no methods, no mounts, no skills, no materialization. Application unions what it needs (`skillsFs()` is opt-in). |
1732
- | Session filesystem? | `virtualRuntime(async (ctx) => fs)` once per session. Always `Promise<FileSystem>`. `SessionWorkspaceContext`: `sessionId`, `agentName?`, `continuationKey?`, `host?`. Per-wake data is a lazy layer. |
1733
- | Effect / approvals? | Unchanged defaults. Gate wraps the tool call, then Workspace runs. Host path allowlists stay on `localWorkspace` only. |
1734
- | Does method presence enable tools? | Yes, for Workspace methods. `tools` may only narrow, fail-closed. |
1735
- | Where do `webSearch` / `updateTodos` live? | Off Workspace. Loop-owned harness builtins. `tools` opts them in on local/virtual. Cloud already has them and cannot select. No `Harness` type. |
1736
- | Should those methods live on `Runtime`? | No. That re-bundles the arm and the workspace. |
1737
- | Should `Runtime.instructions()` exist? | No. Workspace gets `root()` + optional session-scoped `brief()`. |
1738
- | Should inference live on `Runtime`? | No. |
1739
- | What about Grok Bot? | `grokbotRuntime()` — a Runtime arm, no `workspace` field. |
1740
- | How does change-monitor fit? | `virtualRuntime(async (ctx) => unionFs({ /repo, /host, /agent/skills: skillsFs(), … }))`. |
1741
- | How does computer-use.md's VM fit? | A `cloudFs` mount in that same union. |
1742
- | How does `runtime: "cloud"` fit? | `cloudRuntime(opts)` — opaque Runtime arm that owns its tree. |
1743
- | `send({ runtime })`? | `CloudRuntime \| LocalRuntime`. Host-local + cloud = attach. Host-local + `localRuntime` = overlay. Cloud + `cloudRuntime` = replace (no merge). Grokbot + cloud refused. Virtual + either refused. `send({ cloud })` still merges (deprecated). |
1744
- | What stays off `Runtime`? | `model`, `tools`, `builtinTools`, `hosting`, `architecture`, `workspaceFiles`. |
1745
- | Subagents? | Behavior unchanged (`G12`). Internally `localRuntime()` on the parent workspace. No authoring `Runtime` on children. |
1746
- | Can this ship without Cursor SDK changes? | No. Lookalikes put the model on MCP `CallMcpTool`, not native `read`. |
1747
- | First PR? | This design document. |
1748
- | First code PR? | Cursor SDK `local.workspace` + executor overrides (Phase 1). |
1749
- | Then? | Agent SDK object form (Phase 2), change-monitor (Phase 3), published docs (Phase 4 / §9). After that: `Agent.create({ runtime })` on the SDK; other products plug into this type; see §8. |
1750
-
1751
- The string was a convenient name for a bundle that no longer
1752
- bundles cleanly. The replacement is a local Runtime arm you
1753
- can point at any workspace, and two remote arms that have no
1754
- `workspace` field until those products grow a machine API.
1755
- Native tools bind to the injected workspace. That seam opens
1756
- in Cursor SDK before `defineAgent` grows constructors.