@cursor/july 0.1.109 → 0.1.112
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.
- package/AGENTS.md +1 -1
- package/README.md +0 -15
- package/dist/bin/agent-serve.js +99 -67
- package/dist/channels/bitbucket/api.js +8 -8
- package/dist/channels/bitbucket/binding.js +4 -4
- package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
- package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
- package/dist/channels/bitbucket/checks.d.ts.map +1 -1
- package/dist/channels/bitbucket/checks.js +1 -1
- package/dist/channels/bitbucket/cursor-account.js +1 -1
- package/dist/channels/bitbucket/events.js +1 -1
- package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
- package/dist/channels/checks.d.ts.map +1 -1
- package/dist/channels/checks.js +2 -2
- package/dist/channels/deployments/deployments-channel.js +1 -1
- package/dist/channels/github/cursor-account.js +3 -3
- package/dist/channels/github/defaults.d.ts.map +1 -1
- package/dist/channels/github/defaults.js +5 -3
- package/dist/channels/github/events.js +1 -1
- package/dist/channels/github/forward.js +8 -8
- package/dist/channels/github/github-channel.d.ts +29 -19
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +46 -32
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +7 -2
- package/dist/channels/github/state.d.ts +6 -0
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/types.d.ts +6 -0
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/binding.js +4 -4
- package/dist/channels/gitlab/checks.d.ts.map +1 -1
- package/dist/channels/gitlab/checks.js +1 -1
- package/dist/channels/gitlab/cursor-account.js +1 -1
- package/dist/channels/gitlab/events.js +1 -1
- package/dist/channels/gitlab/gitlab-channel.js +1 -1
- package/dist/channels/gitlab/gitlab-webhook.js +1 -1
- package/dist/channels/gitlab/replay.js +2 -2
- package/dist/channels/origin/binding.d.ts +2 -0
- package/dist/channels/origin/binding.d.ts.map +1 -1
- package/dist/channels/origin/binding.js +3 -3
- package/dist/channels/origin/checks.d.ts +19 -7
- package/dist/channels/origin/checks.d.ts.map +1 -1
- package/dist/channels/origin/checks.js +13 -9
- package/dist/channels/origin/cursor-account.js +1 -1
- package/dist/channels/origin/defaults.d.ts.map +1 -1
- package/dist/channels/origin/defaults.js +3 -1
- package/dist/channels/origin/events.js +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +2 -1
- package/dist/channels/origin/origin-webhook.js +2 -2
- package/dist/channels/slack/agentic-delivery.d.ts +23 -0
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -0
- package/dist/channels/slack/agentic-delivery.js +560 -0
- package/dist/channels/slack/agentic-posted.d.ts +30 -0
- package/dist/channels/slack/agentic-posted.d.ts.map +1 -0
- package/dist/channels/slack/agentic-posted.js +102 -0
- package/dist/channels/slack/agentic-signals.d.ts +48 -0
- package/dist/channels/slack/agentic-signals.d.ts.map +1 -0
- package/dist/channels/slack/agentic-signals.js +204 -0
- package/dist/channels/slack/api.d.ts +20 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +43 -11
- package/dist/channels/slack/approvals.js +1 -1
- package/dist/channels/slack/auth.d.ts.map +1 -1
- package/dist/channels/slack/auth.js +3 -1
- package/dist/channels/slack/blocks.js +3 -3
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
- package/dist/channels/slack/bot-mentions.js +5 -5
- package/dist/channels/slack/channel-watch.js +1 -1
- package/dist/channels/slack/cli-project.js +3 -3
- package/dist/channels/slack/defaults.d.ts +3 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +90 -29
- package/dist/channels/slack/dispatch.d.ts +44 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +323 -107
- package/dist/channels/slack/doctor.js +1 -1
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/channels/slack/external-policy.d.ts +2 -1
- package/dist/channels/slack/external-policy.d.ts.map +1 -1
- package/dist/channels/slack/external-policy.js +13 -2
- package/dist/channels/slack/footer.d.ts +30 -0
- package/dist/channels/slack/footer.d.ts.map +1 -0
- package/dist/channels/slack/footer.js +88 -0
- package/dist/channels/slack/index.d.ts +2 -0
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +2 -0
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +5 -3
- package/dist/channels/slack/live-delivery.d.ts +1 -1
- package/dist/channels/slack/live-delivery.d.ts.map +1 -1
- package/dist/channels/slack/live-delivery.js +20 -6
- package/dist/channels/slack/log.d.ts.map +1 -1
- package/dist/channels/slack/log.js +1 -1
- package/dist/channels/slack/manifest.js +1 -1
- package/dist/channels/slack/nudge-carrier.js +1 -1
- package/dist/channels/slack/nudge-store.js +2 -2
- package/dist/channels/slack/paint-start.d.ts +22 -0
- package/dist/channels/slack/paint-start.d.ts.map +1 -0
- package/dist/channels/slack/paint-start.js +91 -0
- package/dist/channels/slack/placeholder.d.ts +62 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -0
- package/dist/channels/slack/placeholder.js +268 -0
- package/dist/channels/slack/progress-delivery.d.ts.map +1 -1
- package/dist/channels/slack/progress-delivery.js +13 -4
- package/dist/channels/slack/reasoning-chip.d.ts +8 -0
- package/dist/channels/slack/reasoning-chip.d.ts.map +1 -0
- package/dist/channels/slack/reasoning-chip.js +30 -0
- package/dist/channels/slack/recording-sink.d.ts +29 -0
- package/dist/channels/slack/recording-sink.d.ts.map +1 -0
- package/dist/channels/slack/recording-sink.js +142 -0
- package/dist/channels/slack/reply-options.d.ts +8 -1
- package/dist/channels/slack/reply-options.d.ts.map +1 -1
- package/dist/channels/slack/reply-options.js +59 -14
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/slack-channel.d.ts +2 -2
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +58 -30
- package/dist/channels/slack/socket-mode.js +2 -2
- package/dist/channels/slack/thread-context.js +5 -5
- package/dist/channels/slack/tool-approval-events.d.ts +5 -0
- package/dist/channels/slack/tool-approval-events.d.ts.map +1 -1
- package/dist/channels/slack/tool-approval-events.js +50 -38
- package/dist/channels/slack/tool-cards.js +1 -1
- package/dist/channels/slack/tool-chip.d.ts +9 -0
- package/dist/channels/slack/tool-chip.d.ts.map +1 -0
- package/dist/channels/slack/tool-chip.js +25 -0
- package/dist/channels/slack/types.d.ts +49 -7
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/slack/upload.d.ts +13 -0
- package/dist/channels/slack/upload.d.ts.map +1 -0
- package/dist/channels/slack/upload.js +135 -0
- package/dist/channels.d.ts +10 -14
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +9 -21
- package/dist/dashboard-session-url.d.ts +15 -0
- package/dist/dashboard-session-url.d.ts.map +1 -0
- package/dist/dashboard-session-url.js +25 -0
- package/dist/docs/404.html +3 -3
- package/dist/docs/architecture.svg +59 -0
- package/dist/docs/assets/app.DxTdhphC.js +309 -0
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.QmjDU6Jh.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CVQERt56.js → VPLocalSearchBox.CR3KTF0X.js} +2 -2
- package/dist/docs/assets/chunks/arc.CVVqBOdS.js +1 -0
- package/dist/docs/assets/chunks/architectureDiagram-Q4EWVU46.CJHGP4ki.js +36 -0
- package/dist/docs/assets/chunks/baseUniq.r7UVVRBP.js +1 -0
- package/dist/docs/assets/chunks/blockDiagram-DXYQGD6D.DKmMaTre.js +132 -0
- package/dist/docs/assets/chunks/c4Diagram-AHTNJAMY.DDJsntUO.js +10 -0
- package/dist/docs/assets/chunks/channel.BjpoSbz_.js +1 -0
- package/dist/docs/assets/chunks/chunk-4BX2VUAB.BK2rKt6W.js +1 -0
- package/dist/docs/assets/chunks/chunk-4TB4RGXK.DRLV8RnF.js +206 -0
- package/dist/docs/assets/chunks/chunk-55IACEB6.DaKjxtb7.js +1 -0
- package/dist/docs/assets/chunks/chunk-EDXVE4YY.C5sPCIT1.js +1 -0
- package/dist/docs/assets/chunks/chunk-FMBD7UC4.CSGWyNTB.js +15 -0
- package/dist/docs/assets/chunks/chunk-OYMX7WX6.D5tK9XEr.js +231 -0
- package/dist/docs/assets/chunks/chunk-QZHKN3VN.BeZGd1UZ.js +1 -0
- package/dist/docs/assets/chunks/chunk-YZCP3GAM.U_tfWwQR.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/clone.DRuGBKZC.js +1 -0
- package/dist/docs/assets/chunks/cose-bilkent-S5V4N54A.DVeRXIb6.js +1 -0
- package/dist/docs/assets/chunks/cytoscape.esm.BQk4lpUV.js +331 -0
- package/dist/docs/assets/chunks/dagre-KV5264BT.BpKJAeRZ.js +4 -0
- package/dist/docs/assets/chunks/defaultLocale.C4B-KCzX.js +1 -0
- package/dist/docs/assets/chunks/diagram-5BDNPKRD.BQOtrd1Z.js +10 -0
- package/dist/docs/assets/chunks/diagram-G4DWMVQ6.CSDAhjPI.js +24 -0
- package/dist/docs/assets/chunks/diagram-MMDJMWI5.Dpztst2S.js +43 -0
- package/dist/docs/assets/chunks/diagram-TYMM5635.qJHRizHR.js +24 -0
- package/dist/docs/assets/chunks/erDiagram-SMLLAGMA.vbDotH3l.js +85 -0
- package/dist/docs/assets/chunks/flowDiagram-DWJPFMVM.CqS_ZQr4.js +162 -0
- package/dist/docs/assets/chunks/{framework.BCISBCiQ.js → framework.BNw1pucY.js} +6 -6
- package/dist/docs/assets/chunks/ganttDiagram-T4ZO3ILL.DTLdR4pN.js +292 -0
- package/dist/docs/assets/chunks/gitGraphDiagram-UUTBAWPF.D04lnbnr.js +106 -0
- package/dist/docs/assets/chunks/graph.BlfqLJsM.js +1 -0
- package/dist/docs/assets/chunks/infoDiagram-42DDH7IO.tAooImWA.js +2 -0
- package/dist/docs/assets/chunks/init.Gi6I4Gst.js +1 -0
- package/dist/docs/assets/chunks/ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js +70 -0
- package/dist/docs/assets/chunks/journeyDiagram-VCZTEJTY.C3tUgyCg.js +139 -0
- package/dist/docs/assets/chunks/kanban-definition-6JOO6SKY.CtD9-QCe.js +89 -0
- package/dist/docs/assets/chunks/katex.DkKDou_j.js +257 -0
- package/dist/docs/assets/chunks/layout.D38U-LnT.js +1 -0
- package/dist/docs/assets/chunks/linear.BJmssyhN.js +1 -0
- package/dist/docs/assets/chunks/min.DNgXoouU.js +1 -0
- package/dist/docs/assets/chunks/mindmap-definition-QFDTVHPH.Dcp6cxeu.js +96 -0
- package/dist/docs/assets/chunks/ordinal.DBvzRdQf.js +1 -0
- package/dist/docs/assets/chunks/pieDiagram-DEJITSTG.CLDw6zIs.js +30 -0
- package/dist/docs/assets/chunks/quadrantDiagram-34T5L4WZ.CYaeeY4c.js +7 -0
- package/dist/docs/assets/chunks/requirementDiagram-MS252O5E.gMYuRpq2.js +84 -0
- package/dist/docs/assets/chunks/sankeyDiagram-XADWPNL6.CZqyHFbc.js +10 -0
- package/dist/docs/assets/chunks/sequenceDiagram-FGHM5R23.BTsCjUDN.js +157 -0
- package/dist/docs/assets/chunks/stateDiagram-FHFEXIEX.CftT9mLJ.js +1 -0
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +1 -0
- package/dist/docs/assets/chunks/{theme.Dnsd3XOn.js → theme.B_7J9ZsV.js} +2 -2
- package/dist/docs/assets/chunks/timeline-definition-GMOUNBTQ.DbU3WUNw.js +120 -0
- package/dist/docs/assets/chunks/vennDiagram-DHZGUBPP.ixsq-q2u.js +34 -0
- package/dist/docs/assets/chunks/virtual_mermaid-config.DDnGl6nM.js +1 -0
- package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +162 -0
- package/dist/docs/assets/chunks/wardleyDiagram-NUSXRM2D.C0ewvgbp.js +20 -0
- package/dist/docs/assets/chunks/xychartDiagram-5P7HB3ND.nAEhF4bO.js +7 -0
- package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
- package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
- package/dist/docs/assets/evals.md.BYvfZ-PO.js +72 -0
- package/dist/docs/assets/evals.md.BYvfZ-PO.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +30 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
- package/dist/docs/assets/index.md.C-t81M5J.js +17 -0
- package/dist/docs/assets/index.md.C-t81M5J.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.DdQOF7Y8.js → quickstart.md.DAvVhuuU.js} +30 -38
- package/dist/docs/assets/quickstart.md.DAvVhuuU.lean.js +1 -0
- package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CvoL6pof.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Dior32Qw.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.CAo-iK4j.js → reference_channels.md.nFWbzAic.js} +2 -12
- package/dist/docs/assets/{reference_channels.md.CAo-iK4j.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.Deg7849l.js → reference_cli.md.DLWDz9ij.js} +5 -3
- package/dist/docs/assets/{reference_cli.md.Deg7849l.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.BojkC6c5.js → reference_connections.md.CmyrlXfY.js} +4 -4
- package/dist/docs/assets/{reference_connections.md.BojkC6c5.lean.js → reference_connections.md.CmyrlXfY.lean.js} +1 -1
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.js +58 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.lean.js +1 -0
- package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.js → reference_hooks.md.B7uzNENk.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.BlM_bOg6.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.js → reference_http-api.md.CduHavZ2.js} +3 -3
- package/dist/docs/assets/{reference_http-api.md.BwaCo-VO.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.js → reference_instructions.md.CU1My5My.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.CR7XSsGk.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DLnoaczX.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.DLnoaczX.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.js → reference_project-layout.md.BGhgpy9V.js} +3 -3
- package/dist/docs/assets/{reference_project-layout.md.BEU8MtQV.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.js → reference_prompt.md.Ccp0R53H.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.DnaD5dNK.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.DI_JrHgq.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.CyXV1MUw.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.l2ezAcaN.js → reference_skills.md.DjQkRefx.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.l2ezAcaN.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.CfsIloPm.js → reference_subagents.md.BHsSMMyO.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.CfsIloPm.lean.js → reference_subagents.md.BHsSMMyO.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.aGrn99hP.js → reference_tools.md.BYzUTeVA.js} +4 -4
- package/dist/docs/assets/{reference_tools.md.aGrn99hP.lean.js → reference_tools.md.BYzUTeVA.lean.js} +1 -1
- package/dist/docs/assets/{style.DCD_zyg3.css → style.Cfo2vbik.css} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.BZSH4N9z.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.Bds_XWcV.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.lshxbCLK.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
- package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.js → templates_triage.md.CVGe_FG6.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.Co4UNzkZ.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
- package/dist/docs/building-with-agents.html +47 -18
- package/dist/docs/building-with-agents.md +94 -84
- package/dist/docs/deployment.html +62 -48
- package/dist/docs/deployment.md +117 -364
- package/dist/docs/evals.html +88 -194
- package/dist/docs/evals.md +146 -673
- package/dist/docs/guides/agent-to-agent.html +65 -12
- package/dist/docs/guides/agent-to-agent.md +125 -91
- package/dist/docs/guides/bitbucket.html +182 -14
- package/dist/docs/guides/bitbucket.md +249 -48
- package/dist/docs/guides/cloud-agents.html +49 -10
- package/dist/docs/guides/cloud-agents.md +123 -66
- package/dist/docs/guides/convert-automation.html +83 -19
- package/dist/docs/guides/convert-automation.md +156 -147
- package/dist/docs/guides/github.html +187 -62
- package/dist/docs/guides/github.md +260 -245
- package/dist/docs/guides/gitlab.html +187 -15
- package/dist/docs/guides/gitlab.md +249 -50
- package/dist/docs/guides/grokbot-agents.html +51 -11
- package/dist/docs/guides/grokbot-agents.md +116 -63
- package/dist/docs/guides/improve.html +51 -10
- package/dist/docs/guides/improve.md +111 -58
- package/dist/docs/guides/mcp-oauth.html +77 -22
- package/dist/docs/guides/mcp-oauth.md +111 -121
- package/dist/docs/guides/opentelemetry.html +72 -30
- package/dist/docs/guides/opentelemetry.md +105 -187
- package/dist/docs/guides/slack.html +89 -24
- package/dist/docs/guides/slack.md +170 -191
- package/dist/docs/guides/webhooks.html +100 -200
- package/dist/docs/guides/webhooks.md +154 -386
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +47 -11
- package/dist/docs/hillclimbing.md +101 -55
- package/dist/docs/index.html +57 -12
- package/dist/docs/index.md +83 -150
- package/dist/docs/llms-full.txt +6244 -10784
- package/dist/docs/llms.txt +23 -46
- package/dist/docs/quickstart.html +70 -45
- package/dist/docs/quickstart.md +44 -105
- package/dist/docs/reference/agent-config.html +41 -8
- package/dist/docs/reference/artifacts.html +41 -8
- package/dist/docs/reference/channels.html +41 -18
- package/dist/docs/reference/channels.md +0 -16
- package/dist/docs/reference/cli.html +44 -9
- package/dist/docs/reference/cli.md +2 -16
- package/dist/docs/reference/connections.html +43 -10
- package/dist/docs/reference/connections.md +3 -5
- package/dist/docs/reference/evals.html +116 -0
- package/dist/docs/reference/evals.md +293 -0
- package/dist/docs/reference/extensions.html +83 -54
- package/dist/docs/reference/extensions.md +127 -199
- package/dist/docs/reference/hooks.html +42 -9
- package/dist/docs/reference/hooks.md +34 -36
- package/dist/docs/reference/http-api.html +42 -9
- package/dist/docs/reference/http-api.md +5 -5
- package/dist/docs/reference/instructions.html +41 -8
- package/dist/docs/reference/playground.html +40 -7
- package/dist/docs/reference/playground.md +2 -2
- package/dist/docs/reference/project-layout.html +42 -9
- package/dist/docs/reference/project-layout.md +3 -4
- package/dist/docs/reference/prompt.html +41 -8
- package/dist/docs/reference/schedules.html +41 -8
- package/dist/docs/reference/sessions.html +40 -7
- package/dist/docs/reference/sessions.md +5 -4
- package/dist/docs/reference/skills.html +41 -8
- package/dist/docs/reference/subagents.html +41 -8
- package/dist/docs/reference/subagents.md +2 -4
- package/dist/docs/reference/tools.html +43 -10
- package/dist/docs/reference/tools.md +2 -5
- package/dist/docs/templates/agentic-owners.html +41 -8
- package/dist/docs/templates/pr-autofixer.html +41 -8
- package/dist/docs/templates/security-reviewer.html +41 -8
- package/dist/docs/templates/thermo-quality-review.html +62 -0
- package/dist/docs/templates/thermo-quality-review.md +75 -0
- package/dist/docs/templates/thermo-review.html +62 -0
- package/dist/docs/templates/thermo-review.md +74 -0
- package/dist/docs/templates/triage.html +41 -8
- package/dist/docs/troubleshooting.html +41 -8
- package/dist/docs/troubleshooting.md +97 -67
- package/dist/evals/assertions.js +19 -19
- package/dist/evals/expect.js +1 -1
- package/dist/evals/judge.js +1 -1
- package/dist/evals/reporters.d.ts.map +1 -1
- package/dist/evals/reporters.js +8 -8
- package/dist/evals/run-facts.js +2 -2
- package/dist/evals.d.ts +1 -1
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +7 -7
- package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +3 -3
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +6 -6
- package/dist/extensions/cursor-cloud-agents/lib/transcript.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
- package/dist/extensions/improve/extension.d.ts +3 -1
- package/dist/extensions/improve/extension.d.ts.map +1 -1
- package/dist/extensions/improve/extension.js +4 -2
- package/dist/extensions/improve/skills/yourself.js +2 -2
- package/dist/extensions/slack-communication/extension.d.ts +28 -0
- package/dist/extensions/slack-communication/extension.d.ts.map +1 -0
- package/dist/extensions/slack-communication/extension.js +32 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts +5 -0
- package/dist/extensions/slack-communication/skills/slack-voice.d.ts.map +1 -0
- package/dist/extensions/slack-communication/skills/slack-voice.js +54 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/delete-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/delete-message.js +29 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/edit-message.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/edit-message.js +37 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-card.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-card.js +25 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-file.js +76 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/post-update.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/post-update.js +36 -0
- package/dist/extensions/slack-communication/tools/react.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/react.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/react.js +27 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts +4 -0
- package/dist/extensions/slack-communication/tools/set-status.d.ts.map +1 -0
- package/dist/extensions/slack-communication/tools/set-status.js +18 -0
- package/dist/files-backends/cursor-hosted.d.ts +18 -6
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +357 -74
- package/dist/files-backends/local-fs.js +1 -1
- package/dist/files.d.ts +15 -0
- package/dist/files.d.ts.map +1 -1
- package/dist/filesystem.d.ts +46 -2
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +160 -113
- package/dist/index.d.ts +7 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -7
- package/dist/internal/advertise-tools.js +6 -6
- package/dist/internal/approval-gate.js +1 -1
- package/dist/internal/artifacts-store.js +3 -3
- package/dist/internal/as-of.js +2 -2
- package/dist/internal/authored-alias-hooks.js +1 -1
- package/dist/internal/builtin-tools/reminders.js +2 -2
- package/dist/internal/chat-client.js +5 -5
- package/dist/internal/cli-ax.d.ts +7 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +140 -27
- package/dist/internal/cli-bitbucket.js +10 -10
- package/dist/internal/cli-convert-automation.js +2 -2
- package/dist/internal/cli-cursor.d.ts +3 -11
- package/dist/internal/cli-cursor.d.ts.map +1 -1
- package/dist/internal/cli-cursor.js +5 -10
- package/dist/internal/cli-deploy.d.ts +12 -2
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +328 -96
- package/dist/internal/cli-docs.js +5 -5
- package/dist/internal/cli-github.js +15 -16
- package/dist/internal/cli-gitlab.js +10 -10
- package/dist/internal/cli-manifest.js +1 -1
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +5 -5
- package/dist/internal/cli-mcp.js +3 -3
- package/dist/internal/cli-skills.js +2 -2
- package/dist/internal/cli-slack.js +5 -5
- package/dist/internal/cloud-turn-cost.js +1 -1
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +15 -9
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +33 -2
- package/dist/internal/convert-automation/convert-workflow.js +25 -24
- package/dist/internal/convert-automation/types.d.ts +8 -0
- package/dist/internal/convert-automation/types.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.d.ts +2 -2
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +32 -27
- package/dist/internal/cursor/backend-client.d.ts +15 -10
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +17 -11
- package/dist/internal/cursor/credentials.js +1 -1
- package/dist/internal/cursor/hosted-store-secrets.d.ts +16 -0
- package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
- package/dist/internal/cursor/hosted-store-secrets.js +25 -0
- package/dist/internal/cursor-account-mcp-auth.js +9 -9
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -0
- package/dist/internal/cursor-deployment-relay.js +9 -9
- package/dist/internal/cursor-event-relay.js +10 -10
- package/dist/internal/cursor-relay-core.js +2 -2
- package/dist/internal/deploy-client.d.ts +106 -9
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +171 -23
- package/dist/internal/deploy-manifest.d.ts +13 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +32 -16
- package/dist/internal/discovery/agent-config.d.ts +5 -0
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +27 -0
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +10 -8
- package/dist/internal/discovery/channels.js +4 -4
- package/dist/internal/discovery/connections.js +4 -4
- package/dist/internal/discovery/cursor-plugin.js +12 -12
- package/dist/internal/discovery/extension-overlay.js +3 -3
- package/dist/internal/discovery/extensions.js +6 -6
- package/dist/internal/discovery/info.js +9 -9
- package/dist/internal/discovery/instructions.js +1 -1
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +4 -4
- package/dist/internal/discovery/services.js +1 -1
- package/dist/internal/discovery/tools.js +1 -1
- package/dist/internal/docs-site.js +2 -2
- package/dist/internal/env-file.js +1 -1
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +7 -7
- package/dist/internal/eval-runner.js +14 -14
- package/dist/internal/evals-client.js +4 -4
- package/dist/internal/event-log.js +8 -8
- package/dist/internal/event-mapper.d.ts +18 -0
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +34 -2
- package/dist/internal/filesystem/format.d.ts.map +1 -1
- package/dist/internal/filesystem/format.js +6 -3
- package/dist/internal/filesystem/scratch.js +3 -3
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +7 -7
- package/dist/internal/filesystem/walk.d.ts +7 -4
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +35 -12
- package/dist/internal/framework-file-storage.d.ts +6 -2
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +91 -2
- package/dist/internal/framework-storage-selection.d.ts +0 -6
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +2 -11
- package/dist/internal/github-fanout.js +3 -3
- package/dist/internal/guest-network.js +4 -4
- package/dist/internal/host-files.js +1 -1
- package/dist/internal/host-kv.js +2 -2
- package/dist/internal/hosted-admission-adapter.d.ts +5 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.js +2 -4
- package/dist/internal/hosted-catch.js +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +46 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +126 -9
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +209 -64
- package/dist/internal/hosted-execution-diag.js +3 -3
- package/dist/internal/hosted-execution-latency.d.ts +80 -0
- package/dist/internal/hosted-execution-latency.d.ts.map +1 -0
- package/dist/internal/hosted-execution-latency.js +220 -0
- package/dist/internal/hosting.d.ts +5 -5
- package/dist/internal/hosting.d.ts.map +1 -1
- package/dist/internal/hosting.js +5 -6
- package/dist/internal/http-channel-define.d.ts +11 -0
- package/dist/internal/http-channel-define.d.ts.map +1 -0
- package/dist/internal/http-channel-define.js +18 -0
- package/dist/internal/http-channel.d.ts +2 -3
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +3 -4
- package/dist/internal/http-control-plane-session.d.ts +7 -3
- package/dist/internal/http-control-plane-session.d.ts.map +1 -1
- package/dist/internal/http-control-plane-session.js +22 -10
- package/dist/internal/incoming-headers-to-fetch.d.ts +10 -0
- package/dist/internal/incoming-headers-to-fetch.d.ts.map +1 -0
- package/dist/internal/incoming-headers-to-fetch.js +41 -0
- package/dist/internal/init-interview.js +7 -7
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +18 -14
- package/dist/internal/init-scaffold.js +1 -1
- package/dist/internal/inline-stdio-mcp.js +2 -2
- package/dist/internal/install-cursor-skills.js +10 -10
- package/dist/internal/json-schema.js +1 -1
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +3 -3
- package/dist/internal/local-env.js +3 -3
- package/dist/internal/log-ring.js +1 -1
- package/dist/internal/logs-client.js +1 -1
- package/dist/internal/mcp-endpoint.js +8 -8
- package/dist/internal/mcp-host.js +4 -4
- package/dist/internal/mcp-oauth-on-demand.js +3 -3
- package/dist/internal/mcp-oauth.js +5 -5
- package/dist/internal/net.js +2 -2
- package/dist/internal/otel/config.js +3 -3
- package/dist/internal/otel/runtime.js +13 -13
- package/dist/internal/peer-connections.js +2 -2
- package/dist/internal/platform-schedule-sync.js +1 -1
- package/dist/internal/platform-timers.js +1 -1
- package/dist/internal/playground/static.js +2 -2
- package/dist/internal/playground/toolchain.js +2 -2
- package/dist/internal/playground-proxy.js +3 -3
- package/dist/internal/process-memory-telemetry.js +1 -1
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +7 -7
- package/dist/internal/reminder-store.js +1 -1
- package/dist/internal/request-error-status.d.ts.map +1 -1
- package/dist/internal/request-error-status.js +9 -0
- package/dist/internal/resolved-connections.js +8 -8
- package/dist/internal/result-output.d.ts +14 -2
- package/dist/internal/result-output.d.ts.map +1 -1
- package/dist/internal/result-output.js +45 -2
- package/dist/internal/router.js +4 -4
- package/dist/internal/run-client.js +2 -2
- package/dist/internal/schedule-runner.js +6 -6
- package/dist/internal/scm/pr-url.d.ts +3 -1
- package/dist/internal/scm/pr-url.d.ts.map +1 -1
- package/dist/internal/scm/pr-url.js +10 -2
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +14 -15
- package/dist/internal/serve-restart.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +175 -126
- package/dist/internal/session-cost.js +3 -3
- package/dist/internal/session-engine.d.ts +34 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +386 -184
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +4 -4
- package/dist/internal/session-store.d.ts +47 -3
- package/dist/internal/session-store.d.ts.map +1 -1
- package/dist/internal/session-store.js +198 -33
- package/dist/internal/sessions-client.js +3 -3
- package/dist/internal/skill-catalog.d.ts +28 -0
- package/dist/internal/skill-catalog.d.ts.map +1 -0
- package/dist/internal/skill-catalog.js +44 -0
- package/dist/internal/slack-thread-key.d.ts +7 -0
- package/dist/internal/slack-thread-key.d.ts.map +1 -0
- package/dist/internal/slack-thread-key.js +10 -0
- package/dist/internal/sleep.js +1 -1
- package/dist/internal/storage-coordinator.d.ts +17 -0
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +111 -11
- package/dist/internal/storage.d.ts +2 -0
- package/dist/internal/storage.d.ts.map +1 -0
- package/dist/internal/storage.js +1 -0
- package/dist/internal/store-mirror.js +4 -4
- package/dist/internal/terminal-style.js +2 -2
- package/dist/internal/tool-result.js +3 -3
- package/dist/internal/trajectory.js +7 -7
- package/dist/internal/turn-governor.js +2 -2
- package/dist/internal/turn-outbox.js +1 -1
- package/dist/internal/update-check.js +2 -2
- package/dist/internal/v2-hosting.d.ts +9 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -1
- package/dist/internal/v2-hosting.js +10 -0
- package/dist/internal/workspace.d.ts +13 -10
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +17 -16
- package/dist/kv/memory-kv.d.ts +6 -4
- package/dist/kv/memory-kv.d.ts.map +1 -1
- package/dist/kv/memory-kv.js +9 -7
- package/dist/kv.d.ts +4 -7
- package/dist/kv.d.ts.map +1 -1
- package/dist/kv.js +4 -7
- package/dist/otel-public.d.ts +7 -0
- package/dist/otel-public.d.ts.map +1 -0
- package/dist/otel-public.js +5 -0
- package/dist/otel.d.ts +7 -2
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +7 -2
- package/dist/playground/assets/index-B1c1LeIf.js +67 -0
- package/dist/playground/assets/index-CK2LX3iD.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/prompt.js +1 -1
- package/dist/result.d.ts +10 -4
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +9 -3
- package/dist/storage-backends/cursor-hosted-v2.js +2 -2
- package/dist/storage-backends/cursor-hosted.d.ts +5 -17
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +6 -20
- package/dist/storage-backends/file-kv.js +7 -7
- package/dist/storage.d.ts +20 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +7 -6
- package/dist/types.d.ts +76 -11
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +12 -4
- package/docs/README.md +85 -152
- package/docs/building-with-agents.md +96 -86
- package/docs/deployment.md +118 -365
- package/docs/evals.md +147 -674
- package/docs/guides/agent-to-agent.md +126 -92
- package/docs/guides/bitbucket.md +250 -49
- package/docs/guides/cloud-agents.md +124 -67
- package/docs/guides/convert-automation.md +157 -148
- package/docs/guides/github.md +261 -246
- package/docs/guides/gitlab.md +250 -51
- package/docs/guides/grokbot-agents.md +117 -64
- package/docs/guides/improve.md +112 -59
- package/docs/guides/mcp-oauth.md +112 -122
- package/docs/guides/opentelemetry.md +106 -188
- package/docs/guides/slack.md +171 -192
- package/docs/guides/webhooks.md +155 -387
- package/docs/hillclimbing.md +102 -56
- package/docs/quickstart.md +45 -106
- package/docs/reference/channels.md +0 -16
- package/docs/reference/cli.md +2 -16
- package/docs/reference/connections.md +3 -5
- package/docs/reference/evals.md +298 -0
- package/docs/reference/extensions.md +128 -200
- package/docs/reference/hooks.md +34 -36
- package/docs/reference/http-api.md +5 -5
- package/docs/reference/playground.md +2 -2
- package/docs/reference/project-layout.md +3 -4
- package/docs/reference/sessions.md +5 -4
- package/docs/reference/subagents.md +2 -4
- package/docs/reference/tools.md +2 -5
- package/docs/templates/thermo-quality-review.md +80 -0
- package/docs/templates/thermo-review.md +79 -0
- package/docs/troubleshooting.md +98 -68
- package/package.json +55 -37
- package/skills/framework-map/SKILL.md +2 -2
- package/skills/github/SKILL.md +21 -13
- package/skills/otel/SKILL.md +8 -18
- package/src/bin/agent-serve.ts +115 -72
- package/src/channels/bitbucket/api.ts +8 -8
- package/src/channels/bitbucket/binding.ts +4 -4
- package/src/channels/bitbucket/bitbucket-channel.ts +1 -1
- package/src/channels/bitbucket/bitbucket-webhook.ts +1 -1
- package/src/channels/bitbucket/checks.ts +3 -4
- package/src/channels/bitbucket/cursor-account.ts +1 -1
- package/src/channels/bitbucket/events.ts +1 -1
- package/src/channels/change-monitors/change-monitors-channel.ts +2 -2
- package/src/channels/checks.ts +5 -4
- package/src/channels/deployments/deployments-channel.ts +1 -1
- package/src/channels/github/api.ts +1 -1
- package/src/channels/github/checks.ts +1 -1
- package/src/channels/github/cursor-account.ts +3 -3
- package/src/channels/github/defaults.ts +8 -4
- package/src/channels/github/events.ts +1 -1
- package/src/channels/github/forward.ts +8 -8
- package/src/channels/github/github-channel.ts +48 -21
- package/src/channels/github/progress.ts +7 -2
- package/src/channels/github/state.ts +6 -0
- package/src/channels/github/types.ts +6 -0
- package/src/channels/gitlab/binding.ts +4 -4
- package/src/channels/gitlab/checks.ts +3 -4
- package/src/channels/gitlab/cursor-account.ts +1 -1
- package/src/channels/gitlab/events.ts +1 -1
- package/src/channels/gitlab/gitlab-channel.ts +1 -1
- package/src/channels/gitlab/gitlab-webhook.ts +1 -1
- package/src/channels/gitlab/replay.ts +2 -2
- package/src/channels/origin/binding.ts +6 -3
- package/src/channels/origin/checks.ts +27 -17
- package/src/channels/origin/cursor-account.ts +1 -1
- package/src/channels/origin/defaults.ts +5 -1
- package/src/channels/origin/events.ts +1 -1
- package/src/channels/origin/origin-channel.ts +2 -1
- package/src/channels/origin/origin-webhook.ts +2 -2
- package/src/channels/slack/agentic-delivery.ts +661 -0
- package/src/channels/slack/agentic-posted.ts +148 -0
- package/src/channels/slack/agentic-signals.ts +248 -0
- package/src/channels/slack/api.ts +51 -11
- package/src/channels/slack/approvals.ts +1 -1
- package/src/channels/slack/attachments.ts +1 -1
- package/src/channels/slack/auth.ts +3 -1
- package/src/channels/slack/blocks.ts +3 -3
- package/src/channels/slack/bot-mentions.ts +5 -7
- package/src/channels/slack/channel-watch.ts +1 -1
- package/src/channels/slack/cli-project.ts +3 -3
- package/src/channels/slack/defaults.ts +109 -37
- package/src/channels/slack/dispatch.ts +419 -168
- package/src/channels/slack/doctor.ts +1 -1
- package/src/channels/slack/eval-directive.ts +1 -1
- package/src/channels/slack/external-policy.ts +15 -2
- package/src/channels/slack/footer.ts +108 -0
- package/src/channels/slack/index.ts +2 -0
- package/src/channels/slack/interactive.ts +4 -2
- package/src/channels/slack/live-delivery.ts +23 -7
- package/src/channels/slack/log.ts +1 -1
- package/src/channels/slack/manifest.ts +1 -1
- package/src/channels/slack/nudge-carrier.ts +1 -1
- package/src/channels/slack/nudge-store.ts +2 -2
- package/src/channels/slack/paint-start.ts +93 -0
- package/src/channels/slack/placeholder.ts +366 -0
- package/src/channels/slack/progress-delivery.ts +14 -1
- package/src/channels/slack/reasoning-chip.ts +48 -0
- package/src/channels/slack/recording-sink.ts +176 -0
- package/src/channels/slack/reply-options.ts +71 -15
- package/src/channels/slack/setup.ts +1 -1
- package/src/channels/slack/slack-channel.ts +81 -14
- package/src/channels/slack/socket-mode.ts +2 -2
- package/src/channels/slack/thread-context.ts +5 -5
- package/src/channels/slack/tool-approval-events.ts +54 -38
- package/src/channels/slack/tool-cards.ts +1 -1
- package/src/channels/slack/tool-chip.ts +36 -0
- package/src/channels/slack/types.ts +47 -7
- package/src/channels/slack/upload.ts +142 -0
- package/src/channels.ts +12 -30
- package/src/dashboard-session-url.ts +32 -0
- package/src/evals/assertions.ts +19 -19
- package/src/evals/expect.ts +1 -1
- package/src/evals/judge.ts +1 -1
- package/src/evals/reporters.ts +8 -9
- package/src/evals/run-facts.ts +2 -2
- package/src/evals.ts +7 -10
- package/src/extensions/cursor-cloud-agents/extension.ts +1 -1
- package/src/extensions/cursor-cloud-agents/lib/backend.ts +3 -3
- package/src/extensions/cursor-cloud-agents/lib/fleet.ts +1 -1
- package/src/extensions/cursor-cloud-agents/lib/repos.ts +3 -3
- package/src/extensions/cursor-cloud-agents/lib/transcript.ts +3 -4
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/src/extensions/cursor-cloud-agents/tools/list.ts +1 -1
- package/src/extensions/improve/extension.ts +4 -2
- package/src/extensions/improve/skills/yourself.ts +2 -2
- package/src/extensions/slack-communication/evals/harness.ts +728 -0
- package/src/extensions/slack-communication/evals/slack-communication.eval.ts +953 -0
- package/src/extensions/slack-communication/evals/slack-placeholder.eval.ts +194 -0
- package/src/extensions/slack-communication/extension.ts +45 -0
- package/src/extensions/slack-communication/skills/slack-voice.ts +59 -0
- package/src/extensions/slack-communication/tools/delete-message.ts +34 -0
- package/src/extensions/slack-communication/tools/edit-message.ts +42 -0
- package/src/extensions/slack-communication/tools/post-card.ts +28 -0
- package/src/extensions/slack-communication/tools/post-file.ts +85 -0
- package/src/extensions/slack-communication/tools/post-update.ts +41 -0
- package/src/extensions/slack-communication/tools/react.ts +33 -0
- package/src/extensions/slack-communication/tools/set-status.ts +21 -0
- package/src/files-backends/cursor-hosted.ts +502 -98
- package/src/files-backends/local-fs.ts +1 -1
- package/src/files.ts +15 -0
- package/src/filesystem.ts +182 -81
- package/src/index.ts +7 -36
- package/src/internal/advertise-tools.ts +6 -6
- package/src/internal/approval-gate.ts +1 -1
- package/src/internal/artifacts-store.ts +3 -3
- package/src/internal/as-of.ts +2 -2
- package/src/internal/authored-alias-hooks.ts +1 -1
- package/src/internal/authored-loaders.ts +2 -3
- package/src/internal/builtin-tools/reminders.ts +2 -2
- package/src/internal/chat-client.ts +5 -5
- package/src/internal/cli-ax.ts +172 -29
- package/src/internal/cli-bitbucket.ts +11 -11
- package/src/internal/cli-convert-automation.ts +2 -2
- package/src/internal/cli-cursor.ts +5 -16
- package/src/internal/cli-deploy.ts +389 -104
- package/src/internal/cli-docs.ts +5 -5
- package/src/internal/cli-github.ts +16 -19
- package/src/internal/cli-gitlab.ts +11 -11
- package/src/internal/cli-manifest.ts +1 -1
- package/src/internal/cli-mcp-oauth.ts +5 -7
- package/src/internal/cli-mcp.ts +3 -3
- package/src/internal/cli-skills.ts +2 -2
- package/src/internal/cli-slack.ts +5 -5
- package/src/internal/cloud-turn-cost.ts +1 -1
- package/src/internal/continuation-identity.ts +14 -9
- package/src/internal/conversation-mirror.ts +36 -3
- package/src/internal/convert-automation/convert-workflow.ts +27 -27
- package/src/internal/convert-automation/types.ts +9 -0
- package/src/internal/cursor/account-mcp.ts +48 -31
- package/src/internal/cursor/backend-client.ts +28 -17
- package/src/internal/cursor/credentials.ts +1 -1
- package/src/internal/cursor/hosted-store-secrets.ts +34 -0
- package/src/internal/cursor-account-mcp-auth.ts +9 -9
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/cursor-deployment-relay.ts +10 -10
- package/src/internal/cursor-event-relay.ts +10 -10
- package/src/internal/cursor-relay-core.ts +2 -2
- package/src/internal/deploy-client.ts +266 -24
- package/src/internal/deploy-manifest.ts +46 -8
- package/src/internal/discovery/agent-config.ts +34 -0
- package/src/internal/discovery/agent.ts +14 -6
- package/src/internal/discovery/channels.ts +4 -4
- package/src/internal/discovery/connections.ts +4 -4
- package/src/internal/discovery/cursor-plugin.ts +12 -12
- package/src/internal/discovery/extension-overlay.ts +3 -3
- package/src/internal/discovery/extensions.ts +6 -6
- package/src/internal/discovery/info.ts +9 -9
- package/src/internal/discovery/instructions.ts +1 -1
- package/src/internal/discovery/project.ts +4 -4
- package/src/internal/discovery/services.ts +1 -1
- package/src/internal/discovery/tools.ts +1 -1
- package/src/internal/docs-site.ts +2 -2
- package/src/internal/env-file.ts +2 -2
- package/src/internal/eval-run-store.ts +7 -9
- package/src/internal/eval-runner.ts +20 -20
- package/src/internal/evals-client.ts +6 -6
- package/src/internal/event-log.ts +10 -10
- package/src/internal/event-mapper.ts +37 -2
- package/src/internal/filesystem/format.ts +11 -12
- package/src/internal/filesystem/scratch.ts +3 -3
- package/src/internal/filesystem/tools.ts +8 -8
- package/src/internal/filesystem/walk.ts +61 -16
- package/src/internal/framework-file-storage.ts +104 -4
- package/src/internal/framework-storage-selection.ts +2 -12
- package/src/internal/github-fanout.ts +4 -4
- package/src/internal/guest-network.ts +4 -4
- package/src/internal/host-files.ts +1 -1
- package/src/internal/host-kv.ts +2 -2
- package/src/internal/hosted-admission-adapter.ts +5 -0
- package/src/internal/hosted-catch-protocol.ts +3 -5
- package/src/internal/hosted-catch.ts +1 -1
- package/src/internal/hosted-delivery-protocol.ts +189 -14
- package/src/internal/hosted-delivery.ts +294 -81
- package/src/internal/hosted-execution-diag.ts +3 -3
- package/src/internal/hosted-execution-latency.ts +334 -0
- package/src/internal/hosting.ts +5 -6
- package/src/internal/http-channel-define.ts +27 -0
- package/src/internal/http-channel.ts +3 -4
- package/src/internal/http-control-plane-session.ts +24 -11
- package/src/internal/incoming-headers-to-fetch.ts +54 -0
- package/src/internal/init-interview.ts +7 -7
- package/src/internal/init-project.ts +18 -16
- package/src/internal/init-scaffold.ts +1 -1
- package/src/internal/inline-stdio-mcp.ts +2 -2
- package/src/internal/install-cursor-skills.ts +11 -11
- package/src/internal/json-schema.ts +1 -1
- package/src/internal/local-control-plane.ts +4 -5
- package/src/internal/local-env.ts +3 -3
- package/src/internal/log-ring.ts +1 -1
- package/src/internal/logs-client.ts +1 -1
- package/src/internal/mcp-endpoint.ts +10 -10
- package/src/internal/mcp-host.ts +9 -9
- package/src/internal/mcp-oauth-on-demand.ts +3 -3
- package/src/internal/mcp-oauth.ts +5 -5
- package/src/internal/net.ts +2 -2
- package/src/internal/otel/config.ts +3 -3
- package/src/internal/otel/runtime.ts +14 -14
- package/src/internal/peer-connections.ts +2 -2
- package/src/internal/platform-schedule-sync.ts +1 -1
- package/src/internal/platform-timers.ts +1 -1
- package/src/internal/playground/static.ts +2 -2
- package/src/internal/playground/toolchain.ts +2 -2
- package/src/internal/playground-proxy.ts +3 -3
- package/src/internal/process-memory-telemetry.ts +1 -1
- package/src/internal/reminder-runner.ts +8 -10
- package/src/internal/reminder-store.ts +1 -1
- package/src/internal/request-error-status.ts +9 -0
- package/src/internal/resolved-connections.ts +8 -8
- package/src/internal/result-output.ts +62 -5
- package/src/internal/router.ts +4 -4
- package/src/internal/run-client.ts +2 -2
- package/src/internal/schedule-runner.ts +6 -6
- package/src/internal/scm/pr-url.ts +11 -2
- package/src/internal/sdk-runner.ts +14 -28
- package/src/internal/serve-restart.ts +1 -1
- package/src/internal/server.ts +201 -140
- package/src/internal/session-cost.ts +3 -3
- package/src/internal/session-engine.ts +516 -244
- package/src/internal/session-run-log.ts +4 -6
- package/src/internal/session-store.ts +213 -39
- package/src/internal/sessions-client.ts +3 -3
- package/src/internal/skill-catalog.ts +69 -0
- package/src/internal/slack-thread-key.ts +11 -0
- package/src/internal/sleep.ts +1 -1
- package/src/internal/storage-coordinator.ts +118 -21
- package/src/internal/storage.ts +1 -0
- package/src/internal/store-mirror.ts +4 -4
- package/src/internal/terminal-style.ts +2 -2
- package/src/internal/tool-result.ts +3 -3
- package/src/internal/trajectory.ts +7 -7
- package/src/internal/turn-governor.ts +2 -2
- package/src/internal/turn-outbox.ts +1 -1
- package/src/internal/update-check.ts +2 -2
- package/src/internal/v2-hosting.ts +14 -0
- package/src/internal/workspace.ts +17 -17
- package/src/kv/memory-kv.ts +9 -7
- package/src/kv.ts +4 -7
- package/src/otel-public.ts +24 -0
- package/src/otel.ts +7 -2
- package/src/prompt.ts +1 -1
- package/src/result.ts +10 -8
- package/src/storage-backends/cursor-hosted-v2.ts +2 -2
- package/src/storage-backends/cursor-hosted.ts +6 -23
- package/src/storage-backends/file-kv.ts +7 -7
- package/src/storage.ts +22 -7
- package/src/types.ts +91 -17
- package/templates/agentic-owners/agent/channels/github.ts +3 -6
- package/templates/agentic-owners/agent/lib/github.ts +5 -5
- package/templates/agentic-owners/agent/lib/owners/decision.ts +13 -10
- package/templates/agentic-owners/agent/lib/owners/handles.ts +2 -2
- package/templates/agentic-owners/agent/lib/owners/match.ts +3 -3
- package/templates/agentic-owners/agent/lib/owners/matching.ts +1 -1
- package/templates/agentic-owners/agent/lib/owners/parse.ts +4 -9
- package/templates/agentic-owners/agent/lib/owners/prompt.ts +1 -1
- package/templates/agentic-owners/agent/lib/review.ts +37 -30
- package/templates/agentic-owners/evals/owners.eval.ts +2 -2
- package/templates/agentic-owners/package.json +1 -1
- package/templates/agents-md/agent/lib/collect.ts +16 -10
- package/templates/agents-md/agent/lib/config.ts +1 -1
- package/templates/agents-md/agent/tools/apply_agents.ts +10 -8
- package/templates/agents-md/package.json +1 -1
- package/templates/code-wiki/agent/channels/github.ts +4 -7
- package/templates/code-wiki/agent/lib/repos.ts +1 -1
- package/templates/code-wiki/agent/tools/apply_wiki.ts +3 -4
- package/templates/code-wiki/package.json +1 -1
- package/templates/demo/agent/lib/collect.ts +6 -2
- package/templates/demo/agent/lib/repos.ts +1 -1
- package/templates/demo/agent/tools/record_demo.ts +1 -1
- package/templates/demo/evals/demo.eval.ts +1 -5
- package/templates/demo/package.json +1 -1
- package/templates/grokbot-agents/package.json +1 -1
- package/templates/pr-autofixer/agent/channels/github.ts +16 -13
- package/templates/pr-autofixer/agent/lib/merge-watch.ts +2 -4
- package/templates/pr-autofixer/agent/lib/repos.ts +2 -2
- package/templates/pr-autofixer/agent/lib/webhook-routing.ts +1 -1
- package/templates/pr-autofixer/package.json +1 -1
- package/templates/security-help/agent/lib/repos.ts +1 -1
- package/templates/security-help/package.json +1 -1
- package/templates/security-reviewer/agent/lib/repos.ts +1 -1
- package/templates/security-reviewer/agent/tools/post_findings.ts +1 -3
- package/templates/security-reviewer/package.json +1 -1
- package/templates/thermo-quality-review/README.md +35 -0
- package/templates/thermo-quality-review/agent/agent.ts +8 -0
- package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
- package/templates/thermo-quality-review/agent/instructions.md +43 -0
- package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
- package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
- package/templates/thermo-quality-review/package.json +18 -0
- package/templates/thermo-quality-review/tsconfig.json +12 -0
- package/templates/thermo-review/README.md +35 -0
- package/templates/thermo-review/agent/agent.ts +8 -0
- package/templates/thermo-review/agent/channels/github.ts +42 -0
- package/templates/thermo-review/agent/instructions.md +40 -0
- package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-review/evals/evals.config.ts +5 -0
- package/templates/thermo-review/evals/review.eval.ts +53 -0
- package/templates/thermo-review/package.json +18 -0
- package/templates/thermo-review/tsconfig.json +12 -0
- package/templates/triage/agent/lib/actuate.ts +26 -41
- package/templates/triage/agent/lib/parse-queue-event.ts +2 -1
- package/templates/triage/agent/lib/verify-webhook.ts +10 -5
- package/templates/triage/agent/tools/record_triage.ts +1 -4
- package/templates/triage/package.json +1 -1
- package/dist/client.d.ts +0 -14
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -12
- package/dist/docs/assets/app.Cr-wVbnB.js +0 -1
- package/dist/docs/assets/building-with-agents.md.D0KbSkJn.js +0 -13
- package/dist/docs/assets/building-with-agents.md.D0KbSkJn.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.CFVQ4S17.js +0 -1
- package/dist/docs/assets/concepts.md.B4o63Gul.js +0 -1
- package/dist/docs/assets/concepts.md.B4o63Gul.lean.js +0 -1
- package/dist/docs/assets/deployment.md.JenwuCCB.js +0 -51
- package/dist/docs/assets/deployment.md.JenwuCCB.lean.js +0 -1
- package/dist/docs/assets/evals.md.C7JLjoEP.js +0 -211
- package/dist/docs/assets/evals.md.C7JLjoEP.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.js +0 -10
- package/dist/docs/assets/guides_agent-to-agent.md.BDb0t1QV.lean.js +0 -1
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.js +0 -10
- package/dist/docs/assets/guides_bitbucket.md.DZPzmUjU.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.js +0 -9
- package/dist/docs/assets/guides_cloud-agents.md.BsloyHdY.lean.js +0 -1
- package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.js +0 -12
- package/dist/docs/assets/guides_convert-automation.md.B4sjlodG.lean.js +0 -1
- package/dist/docs/assets/guides_github.md.TZaTZlfz.js +0 -64
- package/dist/docs/assets/guides_github.md.TZaTZlfz.lean.js +0 -1
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.js +0 -14
- package/dist/docs/assets/guides_gitlab.md.BmqwQfdG.lean.js +0 -1
- package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.js +0 -9
- package/dist/docs/assets/guides_grokbot-agents.md.DyV-WArv.lean.js +0 -1
- package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.js +0 -28
- package/dist/docs/assets/guides_human-in-the-loop.md.By1G2T3_.lean.js +0 -1
- package/dist/docs/assets/guides_improve.md.BGVk32bK.js +0 -14
- package/dist/docs/assets/guides_improve.md.BGVk32bK.lean.js +0 -1
- package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.js +0 -28
- package/dist/docs/assets/guides_mcp-oauth.md.Dp6cDP7f.lean.js +0 -1
- package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.js +0 -26
- package/dist/docs/assets/guides_opentelemetry.md.SCRMskno.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.D4RVMM4G.js +0 -38
- package/dist/docs/assets/guides_slack.md.D4RVMM4G.lean.js +0 -1
- package/dist/docs/assets/guides_webhooks.md.CJK484ex.js +0 -225
- package/dist/docs/assets/guides_webhooks.md.CJK484ex.lean.js +0 -1
- package/dist/docs/assets/hillclimbing.md.BOiVo1tf.js +0 -4
- package/dist/docs/assets/hillclimbing.md.BOiVo1tf.lean.js +0 -1
- package/dist/docs/assets/index.md.DD9Q2XuJ.js +0 -5
- package/dist/docs/assets/index.md.DD9Q2XuJ.lean.js +0 -1
- package/dist/docs/assets/quickstart.md.DdQOF7Y8.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.js +0 -62
- package/dist/docs/assets/reference_extensions.md.ZAVUyuEX.lean.js +0 -1
- package/dist/docs/assets/reference_result.md.BK5SxDrf.js +0 -19
- package/dist/docs/assets/reference_result.md.BK5SxDrf.lean.js +0 -1
- package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.js +0 -1
- package/dist/docs/assets/scaffolding-agents.md.Kctn3OVb.lean.js +0 -1
- package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.js +0 -8
- package/dist/docs/assets/skills_create-agent.md.Q3h6Je-e.lean.js +0 -1
- package/dist/docs/assets/skills_debug.md.CVjCXMFF.js +0 -1
- package/dist/docs/assets/skills_debug.md.CVjCXMFF.lean.js +0 -1
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.js +0 -35
- package/dist/docs/assets/skills_deploy.md.CWqi_ZxW.lean.js +0 -1
- package/dist/docs/assets/skills_evals.md.DFxYPErF.js +0 -25
- package/dist/docs/assets/skills_evals.md.DFxYPErF.lean.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.js +0 -1
- package/dist/docs/assets/skills_framework-map.md.BxLSOhSY.lean.js +0 -1
- package/dist/docs/assets/skills_github.md.hgFX_oKY.js +0 -16
- package/dist/docs/assets/skills_github.md.hgFX_oKY.lean.js +0 -1
- package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.js +0 -7
- package/dist/docs/assets/skills_hillclimb.md.B_zJerxA.lean.js +0 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.js +0 -1
- package/dist/docs/assets/skills_index.md.DL7EHaQ-.lean.js +0 -1
- package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.js +0 -18
- package/dist/docs/assets/skills_mcp-auth.md.DGvFP3HE.lean.js +0 -1
- package/dist/docs/assets/skills_otel.md.B5Ddv1xH.js +0 -8
- package/dist/docs/assets/skills_otel.md.B5Ddv1xH.lean.js +0 -1
- package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.js +0 -20
- package/dist/docs/assets/skills_setup-slack.md.BBgx8lUz.lean.js +0 -1
- package/dist/docs/assets/storage.md.BUrhJ-Zz.js +0 -30
- package/dist/docs/assets/storage.md.BUrhJ-Zz.lean.js +0 -1
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.js +0 -2
- package/dist/docs/assets/templates_agents-md.md.CXSMZljE.lean.js +0 -1
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.js +0 -2
- package/dist/docs/assets/templates_code-wiki.md.CDYZIBFN.lean.js +0 -1
- package/dist/docs/assets/templates_demo.md.BeQX9V3H.js +0 -4
- package/dist/docs/assets/templates_demo.md.BeQX9V3H.lean.js +0 -1
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.js +0 -3
- package/dist/docs/assets/templates_grokbot-agents.md.c1s6Flp9.lean.js +0 -1
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.js +0 -4
- package/dist/docs/assets/templates_security-help.md.C3Ny_Qr2.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CYEAO9bM.lean.js +0 -1
- package/dist/docs/concepts.html +0 -27
- package/dist/docs/concepts.md +0 -166
- package/dist/docs/design/filesystem.md +0 -376
- package/dist/docs/design/runtime-abstraction.md +0 -1756
- package/dist/docs/guides/human-in-the-loop.html +0 -54
- package/dist/docs/guides/human-in-the-loop.md +0 -126
- package/dist/docs/reference/result.html +0 -45
- package/dist/docs/reference/result.md +0 -89
- package/dist/docs/scaffolding-agents.html +0 -27
- package/dist/docs/scaffolding-agents.md +0 -130
- package/dist/docs/skills/create-agent.html +0 -34
- package/dist/docs/skills/create-agent.md +0 -160
- package/dist/docs/skills/debug.html +0 -27
- package/dist/docs/skills/debug.md +0 -36
- package/dist/docs/skills/deploy.html +0 -61
- package/dist/docs/skills/deploy.md +0 -161
- package/dist/docs/skills/evals.html +0 -51
- package/dist/docs/skills/evals.md +0 -137
- package/dist/docs/skills/framework-map.html +0 -27
- package/dist/docs/skills/framework-map.md +0 -99
- package/dist/docs/skills/github.html +0 -42
- package/dist/docs/skills/github.md +0 -93
- package/dist/docs/skills/hillclimb.html +0 -33
- package/dist/docs/skills/hillclimb.md +0 -55
- package/dist/docs/skills/index.html +0 -27
- package/dist/docs/skills/index.md +0 -21
- package/dist/docs/skills/mcp-auth.html +0 -44
- package/dist/docs/skills/mcp-auth.md +0 -76
- package/dist/docs/skills/otel.html +0 -34
- package/dist/docs/skills/otel.md +0 -53
- package/dist/docs/skills/setup-slack.html +0 -46
- package/dist/docs/skills/setup-slack.md +0 -141
- package/dist/docs/storage.html +0 -56
- package/dist/docs/storage.md +0 -167
- package/dist/docs/templates/agents-md.html +0 -28
- package/dist/docs/templates/agents-md.md +0 -105
- package/dist/docs/templates/code-wiki.html +0 -28
- package/dist/docs/templates/code-wiki.md +0 -91
- package/dist/docs/templates/demo.html +0 -30
- package/dist/docs/templates/demo.md +0 -80
- package/dist/docs/templates/grokbot-agents.html +0 -29
- package/dist/docs/templates/grokbot-agents.md +0 -48
- package/dist/docs/templates/security-help.html +0 -30
- package/dist/docs/templates/security-help.md +0 -65
- package/dist/internal/tenant-slack/relay.d.ts +0 -75
- package/dist/internal/tenant-slack/relay.d.ts.map +0 -1
- package/dist/internal/tenant-slack/relay.js +0 -148
- package/dist/playground/assets/index-Bhxzrcf6.css +0 -1
- package/dist/playground/assets/index-CqLX5uF3.js +0 -67
- package/docs/concepts.md +0 -171
- package/docs/design/filesystem.md +0 -376
- package/docs/design/runtime-abstraction.md +0 -1756
- package/docs/guides/human-in-the-loop.md +0 -131
- package/docs/reference/result.md +0 -94
- package/docs/scaffolding-agents.md +0 -135
- package/docs/skills/index.md +0 -26
- package/docs/storage.md +0 -172
- package/docs/templates/agents-md.md +0 -110
- package/docs/templates/code-wiki.md +0 -96
- package/docs/templates/demo.md +0 -85
- package/docs/templates/grokbot-agents.md +0 -53
- package/docs/templates/security-help.md +0 -70
- package/src/client.ts +0 -23
- package/src/internal/tenant-slack/relay.ts +0 -203
- 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](../reference/agent-config.md#choose-a-runtime)
|
|
9
|
-
> (today's user-facing contract),
|
|
10
|
-
> [factory/change-monitor/docs/tools.md](../../../../factory/change-monitor/docs/tools.md)
|
|
11
|
-
> (why change-monitor is pinned to local),
|
|
12
|
-
> [factory/change-monitor/docs/computer-use.md](../../../../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](../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](../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](../quickstart.md) | Default scaffold stays `localRuntime()` or omit `runtime` (same default). Do not mention virtual. |
|
|
1620
|
-
| [scaffolding-agents.md](../scaffolding-agents.md) | Same. |
|
|
1621
|
-
| [reference/instructions.md](../reference/instructions.md) / [reference/skills.md](../reference/skills.md) | "On the cloud runtime" → "On `cloudRuntime`" where it is a code choice; keep the delivery facts. |
|
|
1622
|
-
| [reference/tools.md](../reference/tools.md) | `tools` + cloud still fail closed. Mention it works the same on `cloudRuntime`. |
|
|
1623
|
-
| [reference/cli.md](../reference/cli.md) | `agent-sdk call read` against a virtual fixture if we add one in Phase 2. |
|
|
1624
|
-
| [troubleshooting.md](../troubleshooting.md) | Discovery errors: string+incoherent pair, `virtualRuntime` + `workspaceDir`, hybrid attach or local overlay on virtual. |
|
|
1625
|
-
| `templates/*.md` (e.g. [code-wiki.md](../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](../building-with-agents.md) / [deployment.md](../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.
|