@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
|
@@ -7,12 +7,17 @@
|
|
|
7
7
|
* URLs. File contents never transit the control plane, so a large artifact
|
|
8
8
|
* costs S3 bandwidth rather than backend memory.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* surface any API-key holder gets
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
10
|
+
* By default everything goes through the public API under
|
|
11
|
+
* `/v0/agent-serve-files`, the same surface any API-key holder gets — a
|
|
12
|
+
* self-hosted deployment, a CI job, or a customer script can drive the same
|
|
13
|
+
* store with the same requests. Cursor-managed v2 pods can instead be pinned
|
|
14
|
+
* (per deployment, at task-time bind) onto the engine-facing factory store API
|
|
15
|
+
* under `/internal/agentsdk/store`: same host, same credential, same stores
|
|
16
|
+
* and S3 objects, but flush-shaped — one control-plane request settles a whole
|
|
17
|
+
* `putMany` batch or a conditional delete, where `/v0` costs a presign POST
|
|
18
|
+
* plus stat GETs and a delete POST. The pin fails safe: an absent or
|
|
19
|
+
* unrecognized protocol value, or a source id that maps to neither deployment
|
|
20
|
+
* store role, keeps `/v0`.
|
|
16
21
|
*
|
|
17
22
|
* Two things follow. There is no Agent Store token: a token narrows an identity
|
|
18
23
|
* to one store and one capability, which is what a caller that cannot hold a
|
|
@@ -51,7 +56,12 @@ import {
|
|
|
51
56
|
type FileSinkEntry,
|
|
52
57
|
type FileSinkPutResult,
|
|
53
58
|
} from "../files.js";
|
|
54
|
-
import {
|
|
59
|
+
import {
|
|
60
|
+
AGENT_SERVE_FACTORY_FLUSH_PROTOCOL,
|
|
61
|
+
resolveDeploymentStoreSourceIdSync,
|
|
62
|
+
resolveFrameworkStoreSourceIdSync,
|
|
63
|
+
resolveStoreProtocolSync,
|
|
64
|
+
} from "../internal/cursor/hosted-store-secrets.js";
|
|
55
65
|
import { createAgentStorePresignedUrlValidatorForBackend } from "./agent-store-presigned-url.js";
|
|
56
66
|
|
|
57
67
|
/**
|
|
@@ -62,6 +72,16 @@ const DEFAULT_CURSOR_EXTERNAL_API_URL = "https://api.cursor.com";
|
|
|
62
72
|
|
|
63
73
|
const AGENT_SERVE_FILES_PATH = "/v0/agent-serve-files";
|
|
64
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Engine-facing store API on the factory service — same host, different path
|
|
77
|
+
* family. Selected per pod by the task-bound protocol pin
|
|
78
|
+
* ({@link resolveStoreProtocolSync}); the server resolves the deployment and
|
|
79
|
+
* its stores from the pod credential, so requests carry a store *role*
|
|
80
|
+
* (`deployment` | `framework`), never a store id. One flush request replaces
|
|
81
|
+
* the presign POST plus the stat GETs and delete POST a turn costs on `/v0`.
|
|
82
|
+
*/
|
|
83
|
+
const AGENTSDK_STORE_PATH = "/internal/agentsdk/store";
|
|
84
|
+
|
|
65
85
|
/**
|
|
66
86
|
* Pinned by the deploy pipeline for every Cursor-managed deployment — which
|
|
67
87
|
* provisions the file store it names in the same step — and reserved from
|
|
@@ -156,14 +176,25 @@ export interface CursorHostedFilesOptions {
|
|
|
156
176
|
* after serve start without restarting July.
|
|
157
177
|
*/
|
|
158
178
|
resolveStoreSourceId?: () => string | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Lazy store protocol pin (default: env, then the task-bound file). When it
|
|
181
|
+
* answers {@link AGENT_SERVE_FACTORY_FLUSH_PROTOCOL} and the source id maps
|
|
182
|
+
* to a deployment store role, requests ride the factory store API instead
|
|
183
|
+
* of `/v0/agent-serve-files`. Any other value keeps `/v0`.
|
|
184
|
+
*/
|
|
185
|
+
resolveStoreProtocol?: () => string | undefined;
|
|
159
186
|
/** Test seam; defaults to global fetch. */
|
|
160
187
|
fetch?: typeof fetch;
|
|
161
188
|
}
|
|
162
189
|
|
|
163
|
-
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
190
|
+
/**
|
|
191
|
+
* What a file operation needs: where this deployment's files live, and which
|
|
192
|
+
* wire reaches them. `v0` addresses the public API by store source id; `flush`
|
|
193
|
+
* addresses the factory store API by role and lets the server resolve.
|
|
194
|
+
*/
|
|
195
|
+
type FilesTarget =
|
|
196
|
+
| { wire: "v0"; path(suffix?: string): string }
|
|
197
|
+
| { wire: "flush"; store: "deployment" | "framework" };
|
|
167
198
|
|
|
168
199
|
/**
|
|
169
200
|
* Wire shapes from `/v0/agent-serve-files`. Declared loosely on purpose: this is a
|
|
@@ -197,6 +228,25 @@ interface ApiDeleteResponse {
|
|
|
197
228
|
files?: Array<{ path?: string; status?: string; etag?: string }>;
|
|
198
229
|
}
|
|
199
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Per-op outcome from the factory store API's `flush` route, index-aligned
|
|
233
|
+
* with the request ops. A put answers `url`/`headers`; a delete answers
|
|
234
|
+
* `status`; declared loosely for the same additive-change reason as the
|
|
235
|
+
* `/v0` shapes above.
|
|
236
|
+
*/
|
|
237
|
+
interface FlushWireOpOutcome {
|
|
238
|
+
path?: string;
|
|
239
|
+
url?: string;
|
|
240
|
+
headers?: Record<string, string>;
|
|
241
|
+
error?: string;
|
|
242
|
+
status?: string;
|
|
243
|
+
etag?: string;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
interface FlushWireResponse {
|
|
247
|
+
ops?: FlushWireOpOutcome[];
|
|
248
|
+
}
|
|
249
|
+
|
|
200
250
|
type HostedFilesMethods = Omit<FileSink, "get"> & {
|
|
201
251
|
/** Narrower than {@link FileSink.get}: this backend always reports the etag. */
|
|
202
252
|
get(key: string): Promise<FileSinkBody | undefined>;
|
|
@@ -232,16 +282,33 @@ export function cursorHostedFiles(
|
|
|
232
282
|
/**
|
|
233
283
|
* Run `call` against this deployment's files.
|
|
234
284
|
*
|
|
235
|
-
* No network call and nothing cached: the store source id
|
|
236
|
-
*
|
|
237
|
-
* per call rather than once at construction so a
|
|
238
|
-
* fails where the operation is, not where the
|
|
285
|
+
* No network call and nothing cached: the store source id and protocol pin
|
|
286
|
+
* come from the environment (or task-bound files) and the server maps them
|
|
287
|
+
* on every request. Resolved per call rather than once at construction so a
|
|
288
|
+
* misconfigured environment fails where the operation is, not where the
|
|
289
|
+
* sink was created — and so a protocol pin bound after serve start takes
|
|
290
|
+
* effect without a restart.
|
|
239
291
|
*/
|
|
240
292
|
async function withFiles<T>(
|
|
241
293
|
call: (files: FilesTarget) => Promise<T>
|
|
242
294
|
): Promise<T> {
|
|
243
295
|
const sourceId = resolveStoreSourceId(options);
|
|
296
|
+
const protocol =
|
|
297
|
+
options.resolveStoreProtocol?.() ?? resolveStoreProtocolSync();
|
|
298
|
+
if (protocol === AGENT_SERVE_FACTORY_FLUSH_PROTOCOL) {
|
|
299
|
+
// The factory API addresses stores by role, so map the pinned source id
|
|
300
|
+
// back to the role it was pinned from. A source id matching neither (a
|
|
301
|
+
// local-dev override) has no role there and stays on `/v0`, as does any
|
|
302
|
+
// protocol value this runtime does not recognize.
|
|
303
|
+
if (sourceId === resolveFrameworkStoreSourceIdSync()) {
|
|
304
|
+
return await call({ wire: "flush", store: "framework" });
|
|
305
|
+
}
|
|
306
|
+
if (sourceId === resolveDeploymentStoreSourceIdSync()) {
|
|
307
|
+
return await call({ wire: "flush", store: "deployment" });
|
|
308
|
+
}
|
|
309
|
+
}
|
|
244
310
|
return await call({
|
|
311
|
+
wire: "v0",
|
|
245
312
|
path: (suffix = "") => `/${encodeURIComponent(sourceId)}${suffix}`,
|
|
246
313
|
});
|
|
247
314
|
}
|
|
@@ -252,6 +319,14 @@ export function cursorHostedFiles(
|
|
|
252
319
|
directory: string,
|
|
253
320
|
pageToken: string | undefined
|
|
254
321
|
): Promise<ApiFileListing> {
|
|
322
|
+
if (files.wire === "flush") {
|
|
323
|
+
return await flushPost<ApiFileListing>(options, "/list", {
|
|
324
|
+
store: files.store,
|
|
325
|
+
path: directory,
|
|
326
|
+
limit: DIRECTORY_PAGE_SIZE,
|
|
327
|
+
...(pageToken === undefined ? {} : { pageToken }),
|
|
328
|
+
});
|
|
329
|
+
}
|
|
255
330
|
const query = new URLSearchParams({
|
|
256
331
|
path: directory,
|
|
257
332
|
limit: String(DIRECTORY_PAGE_SIZE),
|
|
@@ -265,9 +340,19 @@ export function cursorHostedFiles(
|
|
|
265
340
|
);
|
|
266
341
|
}
|
|
267
342
|
|
|
343
|
+
/** The unscoped whole-store listing, on whichever wire the target rides. */
|
|
344
|
+
async function unscopedListing(files: FilesTarget): Promise<ApiFileListing> {
|
|
345
|
+
if (files.wire === "flush") {
|
|
346
|
+
return await flushPost<ApiFileListing>(options, "/list", {
|
|
347
|
+
store: files.store,
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
return await storeGet<ApiFileListing>(options, files.path());
|
|
351
|
+
}
|
|
352
|
+
|
|
268
353
|
async function listEntries(prefix: string): Promise<FileSinkEntry[]> {
|
|
269
|
-
return await withFiles(async
|
|
270
|
-
const raw = await
|
|
354
|
+
return await withFiles(async files => {
|
|
355
|
+
const raw = await unscopedListing(files);
|
|
271
356
|
if (raw.complete === true) {
|
|
272
357
|
const out: FileSinkEntry[] = [];
|
|
273
358
|
for (const file of raw.files ?? []) {
|
|
@@ -378,7 +463,7 @@ export function cursorHostedFiles(
|
|
|
378
463
|
async function statKey(key: string): Promise<FileSinkEntry | undefined> {
|
|
379
464
|
const slash = key.lastIndexOf("/");
|
|
380
465
|
const directory = slash === -1 ? "" : key.slice(0, slash);
|
|
381
|
-
return await withFiles(async
|
|
466
|
+
return await withFiles(async files => {
|
|
382
467
|
let pageToken: string | undefined;
|
|
383
468
|
for (let page = 0; page < MAX_DIRECTORY_PAGES; page += 1) {
|
|
384
469
|
const raw = await directoryPage(files, directory, pageToken);
|
|
@@ -397,22 +482,224 @@ export function cursorHostedFiles(
|
|
|
397
482
|
});
|
|
398
483
|
}
|
|
399
484
|
|
|
485
|
+
/** One key's share of a (possibly multi-file) upload attempt. */
|
|
486
|
+
type UploadSpec = {
|
|
487
|
+
key: string;
|
|
488
|
+
body: Uint8Array;
|
|
489
|
+
precondition: { etag: string } | { new: true };
|
|
490
|
+
};
|
|
491
|
+
type UploadOutcome =
|
|
492
|
+
| { status: "ok"; result: FileSinkPutResult }
|
|
493
|
+
| { status: "conflict" }
|
|
494
|
+
| { status: "error"; error: unknown };
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* The shared presign for one upload attempt: a `/v0` upload POST, or one
|
|
498
|
+
* flush request whose put outcomes are reshaped into the same instruction
|
|
499
|
+
* list (an outcome without a `url` — an oversize refusal — surfaces exactly
|
|
500
|
+
* like a `/v0` multipart answer: no single-part instruction for that key).
|
|
501
|
+
*/
|
|
502
|
+
async function presignUploads(
|
|
503
|
+
files: FilesTarget,
|
|
504
|
+
specs: UploadSpec[]
|
|
505
|
+
): Promise<ApiPresignResponse> {
|
|
506
|
+
if (files.wire === "flush") {
|
|
507
|
+
const response = await flushPost<FlushWireResponse>(options, "/flush", {
|
|
508
|
+
store: files.store,
|
|
509
|
+
ops: specs.map(spec => ({
|
|
510
|
+
op: "put",
|
|
511
|
+
path: spec.key,
|
|
512
|
+
sha: createHash("sha256").update(spec.body).digest("hex"),
|
|
513
|
+
size: spec.body.byteLength,
|
|
514
|
+
...spec.precondition,
|
|
515
|
+
})),
|
|
516
|
+
});
|
|
517
|
+
// Index-aligned with the request ops, entries without a `url` included:
|
|
518
|
+
// a refused op (oversize) must keep its slot so the by-path/positional
|
|
519
|
+
// instruction matching below cannot hand its sibling's presign to it,
|
|
520
|
+
// and the missing url surfaces as that key's own error.
|
|
521
|
+
return {
|
|
522
|
+
files: (response.ops ?? []).map(op => ({
|
|
523
|
+
path: op.path,
|
|
524
|
+
...(typeof op.url === "string" && op.url !== ""
|
|
525
|
+
? { url: op.url }
|
|
526
|
+
: {}),
|
|
527
|
+
headers: op.headers,
|
|
528
|
+
})),
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
return await storePost<ApiPresignResponse>(options, files.path("/upload"), {
|
|
532
|
+
files: specs.map(spec => ({
|
|
533
|
+
path: spec.key,
|
|
534
|
+
sha: createHash("sha256").update(spec.body).digest("hex"),
|
|
535
|
+
size: spec.body.byteLength,
|
|
536
|
+
...spec.precondition,
|
|
537
|
+
})),
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* One presign call covering every spec, then parallel presigned PUTs.
|
|
543
|
+
* Outcomes are per spec: a 412 ("conflict") or a failed PUT for one key
|
|
544
|
+
* never disturbs its batch siblings. Only the presign itself is shared —
|
|
545
|
+
* a presign error throws and fails the whole attempt.
|
|
546
|
+
*/
|
|
547
|
+
async function attemptUploads(
|
|
548
|
+
files: FilesTarget,
|
|
549
|
+
specs: UploadSpec[]
|
|
550
|
+
): Promise<UploadOutcome[]> {
|
|
551
|
+
const presigned = await presignUploads(files, specs);
|
|
552
|
+
return await Promise.all(
|
|
553
|
+
specs.map(async (spec, index): Promise<UploadOutcome> => {
|
|
554
|
+
// Match by path, falling back to position for servers that answer
|
|
555
|
+
// in request order without echoing the path.
|
|
556
|
+
const instruction =
|
|
557
|
+
presigned.files?.find(file => file.path === spec.key) ??
|
|
558
|
+
presigned.files?.[index];
|
|
559
|
+
if (instruction?.url === undefined) {
|
|
560
|
+
// Files past the single-part threshold come back with a multipart
|
|
561
|
+
// plan instead of a url; this backend does not implement multipart.
|
|
562
|
+
return {
|
|
563
|
+
status: "error",
|
|
564
|
+
error: new Error(
|
|
565
|
+
`cursorHostedFiles: no single-part upload url for "${spec.key}" (too large?)`
|
|
566
|
+
),
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
try {
|
|
570
|
+
const response = await fetchImpl(options)(
|
|
571
|
+
assertPresignedUrlSafe(options, instruction.url),
|
|
572
|
+
{
|
|
573
|
+
method: "PUT",
|
|
574
|
+
headers: instruction.headers ?? {},
|
|
575
|
+
// A view over bytes is a valid fetch body; the DOM lib types
|
|
576
|
+
// are narrower than the runtime, and copying into a Blob would
|
|
577
|
+
// double the memory for every upload.
|
|
578
|
+
body: spec.body as unknown as BodyInit,
|
|
579
|
+
// A redirect would re-send the body somewhere the presign did
|
|
580
|
+
// not authorize.
|
|
581
|
+
redirect: "manual",
|
|
582
|
+
}
|
|
583
|
+
);
|
|
584
|
+
if (response.status === 412) {
|
|
585
|
+
observedEtags.delete(spec.key);
|
|
586
|
+
return { status: "conflict" };
|
|
587
|
+
}
|
|
588
|
+
if (!response.ok) {
|
|
589
|
+
return {
|
|
590
|
+
status: "error",
|
|
591
|
+
error: new Error(
|
|
592
|
+
`cursorHostedFiles: upload of "${spec.key}" failed (HTTP ${response.status})`
|
|
593
|
+
),
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
const etag = normalizeEtag(response.headers.get("etag"));
|
|
597
|
+
if (etag !== undefined) {
|
|
598
|
+
rememberEtag(spec.key, etag);
|
|
599
|
+
}
|
|
600
|
+
return { status: "ok", result: etag === undefined ? {} : { etag } };
|
|
601
|
+
} catch (error) {
|
|
602
|
+
return { status: "error", error };
|
|
603
|
+
}
|
|
604
|
+
})
|
|
605
|
+
);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* The full single-key write flow: precondition resolution, one shared
|
|
610
|
+
* (already-performed) first attempt outcome, and the conflict handling
|
|
611
|
+
* `put` promises — including the one statKey-and-retry when an optimistic
|
|
612
|
+
* create loses to an existing object.
|
|
613
|
+
*/
|
|
614
|
+
async function settlePut(
|
|
615
|
+
files: FilesTarget,
|
|
616
|
+
entry: {
|
|
617
|
+
key: string;
|
|
618
|
+
body: Uint8Array;
|
|
619
|
+
options?: { ifMatch?: string | null };
|
|
620
|
+
cachedEtagUsed?: boolean;
|
|
621
|
+
staleEtag?: string;
|
|
622
|
+
},
|
|
623
|
+
first: UploadOutcome
|
|
624
|
+
): Promise<FileSinkPutResult> {
|
|
625
|
+
if (first.status === "error") {
|
|
626
|
+
throw first.error;
|
|
627
|
+
}
|
|
628
|
+
if (first.status === "ok") {
|
|
629
|
+
return first.result;
|
|
630
|
+
}
|
|
631
|
+
// Conflict. Explicit `ifMatch` (etag or create-only) and cached-etag
|
|
632
|
+
// writes are single-attempt: the lost precondition is the caller's.
|
|
633
|
+
const requested = entry.options?.ifMatch;
|
|
634
|
+
if (requested !== undefined) {
|
|
635
|
+
throw new FileConflictError(entry.key, {
|
|
636
|
+
storedEtag: requested ?? undefined,
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
if (entry.cachedEtagUsed === true) {
|
|
640
|
+
// Someone else wrote between our etag observation and this PUT.
|
|
641
|
+
throw new FileConflictError(entry.key, { storedEtag: entry.staleEtag });
|
|
642
|
+
}
|
|
643
|
+
// The optimistic create lost: learn the current etag once and replace.
|
|
644
|
+
const found = await statKey(entry.key);
|
|
645
|
+
if (found?.etag === undefined) {
|
|
646
|
+
// Existed a moment ago (the create lost) but stat sees nothing: a
|
|
647
|
+
// delete raced this write. Surface the conflict; a retry from the
|
|
648
|
+
// caller lands on the fresh create-only path.
|
|
649
|
+
throw new FileConflictError(entry.key, {});
|
|
650
|
+
}
|
|
651
|
+
const [replaced] = await attemptUploads(files, [
|
|
652
|
+
{ key: entry.key, body: entry.body, precondition: { etag: found.etag } },
|
|
653
|
+
]);
|
|
654
|
+
if (replaced === undefined || replaced.status === "conflict") {
|
|
655
|
+
throw new FileConflictError(entry.key, { storedEtag: found?.etag });
|
|
656
|
+
}
|
|
657
|
+
if (replaced.status === "error") {
|
|
658
|
+
throw replaced.error;
|
|
659
|
+
}
|
|
660
|
+
return replaced.result;
|
|
661
|
+
}
|
|
662
|
+
|
|
400
663
|
/**
|
|
401
|
-
* Precondition for
|
|
402
|
-
* create
|
|
664
|
+
* Precondition for a write, and whether it came from the etag cache (a
|
|
665
|
+
* cached-etag conflict is terminal; an optimistic-create conflict earns
|
|
666
|
+
* one stat-and-retry).
|
|
403
667
|
*/
|
|
404
|
-
|
|
405
|
-
key: string
|
|
406
|
-
|
|
407
|
-
|
|
668
|
+
function preconditionFor(entry: {
|
|
669
|
+
key: string;
|
|
670
|
+
options?: { ifMatch?: string | null };
|
|
671
|
+
}): {
|
|
672
|
+
precondition: { etag: string } | { new: true };
|
|
673
|
+
cachedEtagUsed: boolean;
|
|
674
|
+
staleEtag?: string;
|
|
675
|
+
} {
|
|
676
|
+
const requested = entry.options?.ifMatch;
|
|
677
|
+
// The store rejects unconditional writes, so every put carries a
|
|
678
|
+
// precondition. `null` is create-only and an explicit etag is a caller
|
|
679
|
+
// assertion.
|
|
680
|
+
if (requested !== undefined) {
|
|
681
|
+
return {
|
|
682
|
+
precondition: requested === null ? { new: true } : { etag: requested },
|
|
683
|
+
cachedEtagUsed: false,
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
// Unconditional write with a known etag: replace what we saw last.
|
|
687
|
+
const cached = observedEtags.get(entry.key);
|
|
408
688
|
if (cached !== undefined) {
|
|
409
|
-
return {
|
|
689
|
+
return {
|
|
690
|
+
precondition: { etag: cached },
|
|
691
|
+
cachedEtagUsed: true,
|
|
692
|
+
staleEtag: cached,
|
|
693
|
+
};
|
|
410
694
|
}
|
|
411
|
-
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
|
|
695
|
+
// Unconditional write to a key this process has never observed:
|
|
696
|
+
// create-only first, learning the current etag only on conflict. Most
|
|
697
|
+
// such writes are brand-new keys (session-event chunks mint a fresh key
|
|
698
|
+
// per flush), and the old stat-before-every-put shape made the
|
|
699
|
+
// precondition lookup the single largest source of `agent-serve-files`
|
|
700
|
+
// list traffic — every fresh pod re-listed a directory per key before
|
|
701
|
+
// its first write.
|
|
702
|
+
return { precondition: { new: true }, cachedEtagUsed: false };
|
|
416
703
|
}
|
|
417
704
|
|
|
418
705
|
return {
|
|
@@ -421,84 +708,106 @@ export function cursorHostedFiles(
|
|
|
421
708
|
capabilities: { etags: true },
|
|
422
709
|
|
|
423
710
|
async put(key, body, putOptions): Promise<FileSinkPutResult> {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
requested === null
|
|
433
|
-
? { new: true }
|
|
434
|
-
: requested !== undefined
|
|
435
|
-
? { etag: requested }
|
|
436
|
-
: await currentPrecondition(key);
|
|
437
|
-
|
|
438
|
-
return await withFiles(async (files) => {
|
|
439
|
-
const presigned = await storePost<ApiPresignResponse>(
|
|
440
|
-
options,
|
|
441
|
-
files.path("/upload"),
|
|
442
|
-
{
|
|
443
|
-
files: [{ path: key, sha, size: body.byteLength, ...precondition }],
|
|
444
|
-
}
|
|
445
|
-
);
|
|
446
|
-
const instruction = presigned.files?.[0];
|
|
447
|
-
if (instruction?.url === undefined) {
|
|
448
|
-
// Files past the single-part threshold come back with a multipart
|
|
449
|
-
// plan instead of a url; this backend does not implement multipart.
|
|
450
|
-
throw new Error(
|
|
451
|
-
`cursorHostedFiles: no single-part upload url for "${key}" (too large?)`
|
|
452
|
-
);
|
|
711
|
+
return await withFiles(async files => {
|
|
712
|
+
const entry = { key, body, options: putOptions };
|
|
713
|
+
const resolved = preconditionFor(entry);
|
|
714
|
+
const [first] = await attemptUploads(files, [
|
|
715
|
+
{ key, body, precondition: resolved.precondition },
|
|
716
|
+
]);
|
|
717
|
+
if (first === undefined) {
|
|
718
|
+
throw new Error(`cursorHostedFiles: upload of "${key}" vanished`);
|
|
453
719
|
}
|
|
454
|
-
|
|
455
|
-
|
|
720
|
+
return await settlePut(
|
|
721
|
+
files,
|
|
456
722
|
{
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
body: body as unknown as BodyInit,
|
|
463
|
-
// A redirect would re-send the body somewhere the presign did not
|
|
464
|
-
// authorize.
|
|
465
|
-
redirect: "manual",
|
|
466
|
-
}
|
|
723
|
+
...entry,
|
|
724
|
+
cachedEtagUsed: resolved.cachedEtagUsed,
|
|
725
|
+
staleEtag: resolved.staleEtag,
|
|
726
|
+
},
|
|
727
|
+
first
|
|
467
728
|
);
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
729
|
+
});
|
|
730
|
+
},
|
|
731
|
+
|
|
732
|
+
async putMany(entries) {
|
|
733
|
+
if (entries.length === 0) {
|
|
734
|
+
return [];
|
|
735
|
+
}
|
|
736
|
+
return await withFiles(async files => {
|
|
737
|
+
const resolved = entries.map(entry => ({
|
|
738
|
+
entry,
|
|
739
|
+
...preconditionFor(entry),
|
|
740
|
+
}));
|
|
741
|
+
let firsts: UploadOutcome[];
|
|
742
|
+
try {
|
|
743
|
+
// One presign call for the whole batch — the point of putMany.
|
|
744
|
+
firsts = await attemptUploads(
|
|
745
|
+
files,
|
|
746
|
+
resolved.map(({ entry, precondition }) => ({
|
|
747
|
+
key: entry.key,
|
|
748
|
+
body: entry.body,
|
|
749
|
+
precondition,
|
|
750
|
+
}))
|
|
480
751
|
);
|
|
752
|
+
} catch (error) {
|
|
753
|
+
// The shared presign failed: every entry failed the same way.
|
|
754
|
+
return entries.map(() => ({
|
|
755
|
+
status: "rejected" as const,
|
|
756
|
+
reason: error,
|
|
757
|
+
}));
|
|
481
758
|
}
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
759
|
+
return await Promise.all(
|
|
760
|
+
resolved.map(
|
|
761
|
+
async (
|
|
762
|
+
{ entry, cachedEtagUsed, staleEtag },
|
|
763
|
+
index
|
|
764
|
+
): Promise<PromiseSettledResult<FileSinkPutResult>> => {
|
|
765
|
+
const first = firsts[index];
|
|
766
|
+
if (first === undefined) {
|
|
767
|
+
return {
|
|
768
|
+
status: "rejected",
|
|
769
|
+
reason: new Error(
|
|
770
|
+
`cursorHostedFiles: upload of "${entry.key}" vanished`
|
|
771
|
+
),
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
try {
|
|
775
|
+
return {
|
|
776
|
+
status: "fulfilled",
|
|
777
|
+
value: await settlePut(
|
|
778
|
+
files,
|
|
779
|
+
{ ...entry, cachedEtagUsed, staleEtag },
|
|
780
|
+
first
|
|
781
|
+
),
|
|
782
|
+
};
|
|
783
|
+
} catch (error) {
|
|
784
|
+
return { status: "rejected", reason: error };
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
)
|
|
788
|
+
);
|
|
487
789
|
});
|
|
488
790
|
},
|
|
489
791
|
|
|
490
792
|
async get(key): Promise<FileSinkBody | undefined> {
|
|
491
|
-
return await withFiles(async
|
|
793
|
+
return await withFiles(async files => {
|
|
492
794
|
// Presigning a read of a path the store has no live object for — never
|
|
493
|
-
// written, or deleted and now holding a tombstone — is a 404
|
|
494
|
-
//
|
|
795
|
+
// written, or deleted and now holding a tombstone — is a 404 on `/v0`
|
|
796
|
+
// and an absent entry on the flush wire. Either is absence, which
|
|
797
|
+
// `read()` reports as undefined, not a failure.
|
|
495
798
|
let presigned: ApiPresignResponse;
|
|
496
799
|
try {
|
|
497
|
-
presigned =
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
800
|
+
presigned =
|
|
801
|
+
files.wire === "flush"
|
|
802
|
+
? await flushPost<ApiPresignResponse>(options, "/read", {
|
|
803
|
+
store: files.store,
|
|
804
|
+
paths: [key],
|
|
805
|
+
})
|
|
806
|
+
: await storePost<ApiPresignResponse>(
|
|
807
|
+
options,
|
|
808
|
+
files.path("/download"),
|
|
809
|
+
{ paths: [key] }
|
|
810
|
+
);
|
|
502
811
|
} catch (error) {
|
|
503
812
|
if (error instanceof StoreApiError && error.status === 404) {
|
|
504
813
|
return undefined;
|
|
@@ -548,6 +857,40 @@ export function cursorHostedFiles(
|
|
|
548
857
|
},
|
|
549
858
|
|
|
550
859
|
async delete(key): Promise<void> {
|
|
860
|
+
const handled = await withFiles(async files => {
|
|
861
|
+
if (files.wire !== "flush") {
|
|
862
|
+
return false;
|
|
863
|
+
}
|
|
864
|
+
// The flush wire's deletes are conditional server-side: when this
|
|
865
|
+
// process has no observed etag, the server resolves the current one —
|
|
866
|
+
// the lookup that costs a stat round trip on `/v0` — and a key that
|
|
867
|
+
// is already absent settles as `already_deleted`.
|
|
868
|
+
const cached = observedEtags.get(key);
|
|
869
|
+
const response = await flushPost<FlushWireResponse>(options, "/flush", {
|
|
870
|
+
store: files.store,
|
|
871
|
+
ops: [
|
|
872
|
+
{
|
|
873
|
+
op: "delete",
|
|
874
|
+
path: key,
|
|
875
|
+
...(cached === undefined ? {} : { etag: cached }),
|
|
876
|
+
},
|
|
877
|
+
],
|
|
878
|
+
});
|
|
879
|
+
const outcome = response.ops?.[0];
|
|
880
|
+
if (outcome?.status === "conflict") {
|
|
881
|
+
observedEtags.delete(key);
|
|
882
|
+
throw new FileConflictError(key, {
|
|
883
|
+
...(outcome.etag === undefined
|
|
884
|
+
? {}
|
|
885
|
+
: { storedEtag: normalizeEtag(outcome.etag) ?? outcome.etag }),
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
observedEtags.delete(key);
|
|
889
|
+
return true;
|
|
890
|
+
});
|
|
891
|
+
if (handled) {
|
|
892
|
+
return;
|
|
893
|
+
}
|
|
551
894
|
if (observedEtags.get(key) === undefined) {
|
|
552
895
|
// Deletes are conditional too, so learn the current etag first. A key
|
|
553
896
|
// we have never seen is already absent as far as the caller cares.
|
|
@@ -560,7 +903,29 @@ export function cursorHostedFiles(
|
|
|
560
903
|
if (etag === undefined) {
|
|
561
904
|
return;
|
|
562
905
|
}
|
|
563
|
-
await withFiles(async
|
|
906
|
+
await withFiles(async files => {
|
|
907
|
+
if (files.wire === "flush") {
|
|
908
|
+
// The protocol pin appeared between the two withFiles calls; the
|
|
909
|
+
// cached etag is enough for the conditional flush delete.
|
|
910
|
+
const response = await flushPost<FlushWireResponse>(
|
|
911
|
+
options,
|
|
912
|
+
"/flush",
|
|
913
|
+
{
|
|
914
|
+
store: files.store,
|
|
915
|
+
ops: [{ op: "delete", path: key, etag }],
|
|
916
|
+
}
|
|
917
|
+
);
|
|
918
|
+
const outcome = response.ops?.[0];
|
|
919
|
+
if (outcome?.status === "conflict") {
|
|
920
|
+
observedEtags.delete(key);
|
|
921
|
+
throw new FileConflictError(key, {
|
|
922
|
+
...(outcome.etag === undefined
|
|
923
|
+
? {}
|
|
924
|
+
: { storedEtag: normalizeEtag(outcome.etag) ?? outcome.etag }),
|
|
925
|
+
});
|
|
926
|
+
}
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
564
929
|
const raw = await storePost<ApiDeleteResponse>(
|
|
565
930
|
options,
|
|
566
931
|
files.path("/delete"),
|
|
@@ -568,7 +933,7 @@ export function cursorHostedFiles(
|
|
|
568
933
|
);
|
|
569
934
|
// The API answers 200 with a per-file status, so a lost race would look
|
|
570
935
|
// like success unless the outcome is read.
|
|
571
|
-
const outcome = (raw.files ?? []).find(
|
|
936
|
+
const outcome = (raw.files ?? []).find(entry => entry.path === key);
|
|
572
937
|
if (outcome?.status === "conflict") {
|
|
573
938
|
observedEtags.delete(key);
|
|
574
939
|
throw new FileConflictError(key, {
|
|
@@ -600,6 +965,13 @@ export function cursorHostedFiles(
|
|
|
600
965
|
* Same pin as the sibling sync client: production backends allow only the
|
|
601
966
|
* agent-stores bucket hosts, playground its bucket, and a local dev backend
|
|
602
967
|
* additionally admits loopback http for LocalStack.
|
|
968
|
+
*
|
|
969
|
+
* `CURSOR_HOSTED_FILES_DEV_PRESIGN_HOSTS` (comma-separated hostnames) admits
|
|
970
|
+
* extra https hosts. A laptop backend hosting agents on a shared cluster
|
|
971
|
+
* fronts its LocalStack with a public tunnel and exports this in the pod's
|
|
972
|
+
* start script; production start scripts never set it. Read once at module
|
|
973
|
+
* load, so authored agent code sharing this process cannot widen the list
|
|
974
|
+
* by mutating `process.env` later.
|
|
603
975
|
*/
|
|
604
976
|
function assertPresignedUrlSafe(
|
|
605
977
|
options: CursorHostedFilesOptions,
|
|
@@ -611,6 +983,14 @@ function assertPresignedUrlSafe(
|
|
|
611
983
|
} catch {
|
|
612
984
|
throw new Error("cursorHostedFiles: presigned URL is not a valid URL");
|
|
613
985
|
}
|
|
986
|
+
if (
|
|
987
|
+
url.protocol === "https:" &&
|
|
988
|
+
url.username === "" &&
|
|
989
|
+
url.password === "" &&
|
|
990
|
+
DEV_PRESIGN_HOSTS.has(url.hostname.toLowerCase())
|
|
991
|
+
) {
|
|
992
|
+
return url.toString();
|
|
993
|
+
}
|
|
614
994
|
try {
|
|
615
995
|
createAgentStorePresignedUrlValidatorForBackend(resolveBaseUrl(options))(
|
|
616
996
|
url
|
|
@@ -665,6 +1045,13 @@ function resolveApiKey(options: CursorHostedFilesOptions): string {
|
|
|
665
1045
|
return key;
|
|
666
1046
|
}
|
|
667
1047
|
|
|
1048
|
+
const DEV_PRESIGN_HOSTS: ReadonlySet<string> = new Set(
|
|
1049
|
+
(process.env.CURSOR_HOSTED_FILES_DEV_PRESIGN_HOSTS ?? "")
|
|
1050
|
+
.split(",")
|
|
1051
|
+
.map(host => host.trim().toLowerCase())
|
|
1052
|
+
.filter(host => host.length > 0)
|
|
1053
|
+
);
|
|
1054
|
+
|
|
668
1055
|
function resolveBaseUrl(options: CursorHostedFilesOptions): string {
|
|
669
1056
|
return trimTrailingSlash(
|
|
670
1057
|
options.baseUrl ??
|
|
@@ -706,6 +1093,23 @@ async function storeGet<T>(
|
|
|
706
1093
|
);
|
|
707
1094
|
}
|
|
708
1095
|
|
|
1096
|
+
/**
|
|
1097
|
+
* Factory store API call — same base URL and pod credential as
|
|
1098
|
+
* {@link storePost}, different path family. The server resolves the
|
|
1099
|
+
* deployment (and the addressed store role) from the credential.
|
|
1100
|
+
*/
|
|
1101
|
+
async function flushPost<T>(
|
|
1102
|
+
options: CursorHostedFilesOptions,
|
|
1103
|
+
path: string,
|
|
1104
|
+
body: Record<string, unknown>
|
|
1105
|
+
): Promise<T> {
|
|
1106
|
+
return await postJson<T>(
|
|
1107
|
+
options,
|
|
1108
|
+
`${resolveBaseUrl(options)}${AGENTSDK_STORE_PATH}${path}`,
|
|
1109
|
+
body
|
|
1110
|
+
);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
709
1113
|
async function postJson<T>(
|
|
710
1114
|
options: CursorHostedFilesOptions,
|
|
711
1115
|
url: string,
|