@cursor/july 0.1.111 → 0.1.113
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/README.md +4 -0
- package/dist/bin/agent-serve.js +20 -4
- package/dist/channels/checks.d.ts +10 -0
- package/dist/channels/checks.d.ts.map +1 -1
- 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 +29 -19
- package/dist/channels/origin/checks.d.ts +1 -1
- package/dist/channels/origin/checks.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.js +2 -0
- package/dist/channels/slack/dispatch.d.ts +11 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +146 -39
- package/dist/channels/slack/placeholder.d.ts +26 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -1
- package/dist/channels/slack/placeholder.js +28 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +9 -16
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.Drol6mi6.js → app.CAeK13eM.js} +4 -4
- 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.Ck9E52Ls.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CdqoBZJX.js → VPLocalSearchBox.C9LbPHod.js} +1 -1
- package/dist/docs/assets/chunks/{arc.BVX3ycTn.js → arc.CmMq2zmS.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CcChnMxX.js → architectureDiagram-Q4EWVU46.CCXB8Uj5.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.xwtXO-yt.js → baseUniq.CyQo6eLe.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CijZ_taK.js → blockDiagram-DXYQGD6D.JYq6w91N.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.0FBvwBvK.js → c4Diagram-AHTNJAMY.BRV8GPJJ.js} +1 -1
- package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CELMmMDA.js → chunk-4BX2VUAB.Bv4ooYQR.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C4bhFtSm.js → chunk-4TB4RGXK.t4JtKPcj.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.ZnQ9gRRQ.js → chunk-55IACEB6.34lCHj9Y.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DPlmglG-.js → chunk-EDXVE4YY.BSwrPNrt.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BrUk8pff.js → chunk-FMBD7UC4.Beeun-R-.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CcmWIncu.js → chunk-OYMX7WX6.BUUFUcJc.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D65-cs8I.js → chunk-QZHKN3VN.B2XjHzN_.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qoXZpG9F.js → chunk-YZCP3GAM.CLYG8znk.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +1 -0
- package/dist/docs/assets/chunks/clone.BIywbczV.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.8rYtqudO.js → cose-bilkent-S5V4N54A.DVEa6fZp.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DrRP1fOh.js → dagre-KV5264BT.C9PZQK-S.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DHj_xA2_.js → diagram-5BDNPKRD.DoN0uv3Y.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Bz_6nAKj.js → diagram-G4DWMVQ6.Czv3duqx.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BWA0xSW9.js → diagram-MMDJMWI5.BinJ5kWb.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.CpTJLNJI.js → diagram-TYMM5635.DW326M4K.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.-7AWWSrP.js → erDiagram-SMLLAGMA.U2pR_OA7.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BTnQ742_.js → flowDiagram-DWJPFMVM.ByWJXeYK.js} +1 -1
- package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.B5_HiiQ5.js → ganttDiagram-T4ZO3ILL.OquF0Rtg.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CZcNTFZd.js → gitGraphDiagram-UUTBAWPF.Bpn01P7X.js} +1 -1
- package/dist/docs/assets/chunks/{graph.V2GLaab4.js → graph.CNRB6ETL.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.7pZOkCCU.js → infoDiagram-42DDH7IO.CqhknMWi.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js → ishikawaDiagram-UXIWVN3A.C6xpR2af.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BNEgWN1S.js → journeyDiagram-VCZTEJTY.Cg5f7oB3.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.B-4d4tC7.js → kanban-definition-6JOO6SKY.Cx9YTwlU.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Dvbn9nSb.js → layout.ljS-wFtK.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D2GM4p4b.js → linear.jSxNrsFC.js} +1 -1
- package/dist/docs/assets/chunks/{min.DVBtLK-B.js → min.Cum8AlQw.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CnJRI55x.js → mindmap-definition-QFDTVHPH.BLiysLpe.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CtoaTFlA.js → pieDiagram-DEJITSTG.BoIDyuKF.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DtT24_vN.js → quadrantDiagram-34T5L4WZ.DLkpDytR.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CjSO4o8f.js → requirementDiagram-MS252O5E.DqTVqSu2.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.-wWiIVWa.js → sankeyDiagram-XADWPNL6.CG_6FF7j.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DSk8s4gX.js → sequenceDiagram-FGHM5R23.BIp9602K.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BFKAsdkN.js → stateDiagram-FHFEXIEX.COSXsD9I.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +1 -0
- package/dist/docs/assets/chunks/{theme.C0MctGaz.js → theme.CXJ7PNwy.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.TUNJbAFe.js → timeline-definition-GMOUNBTQ.CXdVqkLq.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.C-RGNnk4.js → vennDiagram-DHZGUBPP.CZxGuc4r.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.g5efOWmT.js → wardley-RL74JXVD.3oVgfqQk.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DH4zt73Y.js → wardleyDiagram-NUSXRM2D.6_irCgGJ.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B-3k6bF6.js → xychartDiagram-5P7HB3ND.TRPe92m3.js} +1 -1
- 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.D3Y3Aixt.js +72 -0
- package/dist/docs/assets/evals.md.D3Y3Aixt.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.js +41 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.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_jev.md.F5fAkkfN.js +189 -0
- package/dist/docs/assets/guides_jev.md.F5fAkkfN.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.BFVyY2KT.js → index.md.C-t81M5J.js} +2 -2
- package/dist/docs/assets/{index.md.BFVyY2KT.lean.js → index.md.C-t81M5J.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.D3MjSZN-.js → quickstart.md.DAvVhuuU.js} +1 -1
- package/dist/docs/assets/{quickstart.md.D3MjSZN-.lean.js → quickstart.md.DAvVhuuU.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.icqLKcTc.js → reference_channels.md.nFWbzAic.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.icqLKcTc.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.B2dBL6L8.js → reference_cli.md.DLWDz9ij.js} +3 -1
- package/dist/docs/assets/{reference_cli.md.B2dBL6L8.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.js → reference_connections.md.Je9dMsdd.js} +2 -2
- package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.lean.js → reference_connections.md.Je9dMsdd.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.Cv5aLCz_.js +58 -0
- package/dist/docs/assets/reference_extensions.md.Cv5aLCz_.lean.js +1 -0
- package/dist/docs/assets/{reference_hooks.md.CZuynAxj.js → reference_hooks.md.B7uzNENk.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.CZuynAxj.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.js → reference_http-api.md.CduHavZ2.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.D7gkckK-.js → reference_instructions.md.CU1My5My.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.D7gkckK-.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.D2YExv5K.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.D2YExv5K.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.js → reference_project-layout.md.BGhgpy9V.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.js → reference_prompt.md.Ccp0R53H.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.BasfZWO-.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.BasfZWO-.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.rNgpsGd0.js → reference_skills.md.DjQkRefx.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.rNgpsGd0.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.e5qitjJt.js → reference_subagents.md.Dl16gcBj.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.e5qitjJt.lean.js → reference_subagents.md.Dl16gcBj.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.js → reference_tools.md.B1dH1lpa.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.lean.js → reference_tools.md.B1dH1lpa.lean.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.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.BdBWO9Ic.js → templates_triage.md.CVGe_FG6.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.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 +44 -48
- package/dist/docs/building-with-agents.md +94 -82
- package/dist/docs/deployment.html +59 -78
- package/dist/docs/deployment.md +117 -363
- package/dist/docs/evals.html +85 -224
- package/dist/docs/evals.md +149 -673
- package/dist/docs/guides/agent-to-agent.html +74 -47
- package/dist/docs/guides/agent-to-agent.md +128 -46
- package/dist/docs/guides/bitbucket.html +179 -44
- package/dist/docs/guides/bitbucket.md +249 -48
- package/dist/docs/guides/cloud-agents.html +46 -40
- package/dist/docs/guides/cloud-agents.md +119 -66
- package/dist/docs/guides/convert-automation.html +80 -49
- package/dist/docs/guides/convert-automation.md +156 -147
- package/dist/docs/guides/github.html +184 -92
- package/dist/docs/guides/github.md +260 -245
- package/dist/docs/guides/gitlab.html +184 -45
- package/dist/docs/guides/gitlab.md +249 -50
- package/dist/docs/guides/grokbot-agents.html +48 -41
- package/dist/docs/guides/grokbot-agents.md +99 -53
- package/dist/docs/guides/improve.html +48 -40
- package/dist/docs/guides/improve.md +111 -58
- package/dist/docs/guides/jev.html +248 -0
- package/dist/docs/guides/jev.md +348 -0
- package/dist/docs/guides/mcp-oauth.html +74 -52
- package/dist/docs/guides/mcp-oauth.md +111 -121
- package/dist/docs/guides/opentelemetry.html +63 -54
- package/dist/docs/guides/opentelemetry.md +96 -165
- package/dist/docs/guides/slack.html +83 -59
- package/dist/docs/guides/slack.md +157 -227
- package/dist/docs/guides/webhooks.html +97 -230
- package/dist/docs/guides/webhooks.md +154 -385
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +44 -38
- package/dist/docs/hillclimbing.md +101 -55
- package/dist/docs/index.html +38 -38
- package/dist/docs/index.md +2 -0
- package/dist/docs/llms-full.txt +3490 -3146
- package/dist/docs/llms.txt +22 -18
- package/dist/docs/quickstart.html +37 -37
- package/dist/docs/reference/agent-config.html +37 -37
- package/dist/docs/reference/artifacts.html +38 -38
- package/dist/docs/reference/channels.html +37 -37
- package/dist/docs/reference/cli.html +39 -37
- package/dist/docs/reference/cli.md +2 -0
- package/dist/docs/reference/connections.html +38 -38
- package/dist/docs/reference/connections.md +1 -1
- package/dist/docs/reference/evals.html +116 -0
- package/dist/docs/reference/evals.md +293 -0
- package/dist/docs/reference/extensions.html +80 -84
- package/dist/docs/reference/extensions.md +131 -202
- package/dist/docs/reference/hooks.html +39 -39
- package/dist/docs/reference/hooks.md +34 -34
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/instructions.html +37 -37
- package/dist/docs/reference/playground.html +37 -37
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/prompt.html +37 -37
- package/dist/docs/reference/schedules.html +37 -37
- package/dist/docs/reference/sessions.html +37 -37
- package/dist/docs/reference/skills.html +37 -37
- package/dist/docs/reference/subagents.html +38 -38
- package/dist/docs/reference/subagents.md +1 -1
- package/dist/docs/reference/tools.html +38 -38
- package/dist/docs/reference/tools.md +4 -0
- package/dist/docs/templates/agentic-owners.html +38 -38
- package/dist/docs/templates/pr-autofixer.html +37 -37
- package/dist/docs/templates/security-reviewer.html +38 -38
- 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 +37 -37
- package/dist/docs/troubleshooting.html +38 -38
- package/dist/docs/troubleshooting.md +97 -66
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- 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 +1 -1
- package/dist/extensions/jev/extension.d.ts +43 -0
- package/dist/extensions/jev/extension.d.ts.map +1 -0
- package/dist/extensions/jev/extension.js +47 -0
- package/dist/extensions/jev/lib/evaluate.d.ts +101 -0
- package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/lib/evaluate.js +167 -0
- package/dist/extensions/jev/skills/gated-write.md +25 -0
- package/dist/extensions/jev/skills/questions.md +33 -0
- package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
- package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/tools/evaluate.js +88 -0
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +2 -0
- package/dist/filesystem.d.ts +46 -2
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +149 -102
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +6 -0
- package/dist/internal/cli-ax.d.ts +6 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +72 -14
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +1 -0
- 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/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +18 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +8 -4
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +1 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +2 -2
- 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 +34 -11
- package/dist/internal/hosted-admission-adapter.d.ts +3 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +20 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +51 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +23 -25
- package/dist/internal/hosted-execution-diag.d.ts +12 -4
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +26 -4
- package/dist/internal/hosted-execution-flush.d.ts +1 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +4 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +111 -48
- package/dist/internal/session-engine.d.ts +4 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +39 -9
- 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/playground/assets/index-DSMAewbx.css +1 -0
- package/dist/playground/assets/index-De_lpFxE.js +67 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +32 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +2 -0
- package/docs/building-with-agents.md +96 -84
- package/docs/deployment.md +118 -364
- package/docs/evals.md +149 -673
- package/docs/guides/agent-to-agent.md +130 -48
- package/docs/guides/bitbucket.md +250 -49
- package/docs/guides/cloud-agents.md +119 -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 +100 -55
- package/docs/guides/improve.md +112 -59
- package/docs/guides/jev.md +353 -0
- package/docs/guides/mcp-oauth.md +112 -122
- package/docs/guides/opentelemetry.md +97 -166
- package/docs/guides/slack.md +158 -228
- package/docs/guides/webhooks.md +155 -386
- package/docs/hillclimbing.md +102 -56
- package/docs/reference/cli.md +2 -0
- package/docs/reference/connections.md +1 -1
- package/docs/reference/evals.md +298 -0
- package/docs/reference/extensions.md +132 -203
- package/docs/reference/hooks.md +34 -34
- package/docs/reference/subagents.md +1 -1
- package/docs/reference/tools.md +4 -0
- package/docs/templates/thermo-quality-review.md +80 -0
- package/docs/templates/thermo-review.md +79 -0
- package/docs/troubleshooting.md +98 -67
- package/package.json +8 -1
- package/skills/github/SKILL.md +21 -13
- package/src/bin/agent-serve.ts +24 -3
- package/src/channels/checks.ts +8 -0
- package/src/channels/github/github-channel.ts +29 -19
- package/src/channels/origin/checks.ts +3 -1
- package/src/channels/slack/agentic-delivery.ts +2 -0
- package/src/channels/slack/dispatch.ts +131 -4
- package/src/channels/slack/placeholder.ts +51 -0
- package/src/channels/slack/slack-channel.ts +9 -2
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/src/extensions/improve/extension.ts +4 -2
- package/src/extensions/improve/skills/yourself.ts +1 -1
- package/src/extensions/jev/extension.ts +95 -0
- package/src/extensions/jev/lib/evaluate.ts +289 -0
- package/src/extensions/jev/skills/gated-write.md +25 -0
- package/src/extensions/jev/skills/questions.md +33 -0
- package/src/extensions/jev/tools/evaluate.ts +90 -0
- package/src/extensions.ts +2 -0
- package/src/filesystem.ts +168 -65
- package/src/index.ts +3 -0
- package/src/internal/advertise-tools.ts +6 -0
- package/src/internal/cli-ax.ts +88 -15
- package/src/internal/continuation-identity.ts +1 -0
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/discovery/connections.ts +21 -0
- package/src/internal/discovery/extensions.ts +12 -4
- package/src/internal/discovery/info.ts +1 -0
- package/src/internal/filesystem/tools.ts +2 -0
- package/src/internal/filesystem/walk.ts +60 -15
- package/src/internal/hosted-admission-adapter.ts +3 -0
- package/src/internal/hosted-delivery-protocol.ts +82 -1
- package/src/internal/hosted-delivery.ts +23 -0
- package/src/internal/hosted-execution-diag.ts +33 -4
- package/src/internal/hosted-execution-flush.ts +4 -0
- package/src/internal/init-project.ts +4 -0
- package/src/internal/server.ts +130 -53
- package/src/internal/session-engine.ts +46 -8
- package/src/internal/skill-catalog.ts +69 -0
- package/src/types.ts +33 -3
- 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/dist/docs/assets/building-with-agents.md.CEGVXkmO.js +0 -13
- package/dist/docs/assets/building-with-agents.md.CEGVXkmO.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +0 -1
- package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +0 -1
- package/dist/docs/assets/chunks/clone.YSt_40_s.js +0 -1
- package/dist/docs/assets/chunks/framework.dypDpWZ3.js +0 -19
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +0 -1
- package/dist/docs/assets/deployment.md.Dm4Qo3hp.js +0 -51
- package/dist/docs/assets/deployment.md.Dm4Qo3hp.lean.js +0 -1
- package/dist/docs/assets/evals.md.BLDRt5LH.js +0 -211
- package/dist/docs/assets/evals.md.BLDRt5LH.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +0 -14
- package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +0 -1
- package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.js +0 -10
- package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.js +0 -9
- package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.lean.js +0 -1
- package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.js +0 -12
- package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.lean.js +0 -1
- package/dist/docs/assets/guides_github.md.D6ER29dG.js +0 -64
- package/dist/docs/assets/guides_github.md.D6ER29dG.lean.js +0 -1
- package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.js +0 -14
- package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.lean.js +0 -1
- package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +0 -9
- package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.lean.js +0 -1
- package/dist/docs/assets/guides_improve.md.BKaDuKKK.js +0 -14
- package/dist/docs/assets/guides_improve.md.BKaDuKKK.lean.js +0 -1
- package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.js +0 -28
- package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.lean.js +0 -1
- package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.js +0 -26
- package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.DdT8rmsj.js +0 -46
- package/dist/docs/assets/guides_slack.md.DdT8rmsj.lean.js +0 -1
- package/dist/docs/assets/guides_webhooks.md.aQW10HRe.js +0 -225
- package/dist/docs/assets/guides_webhooks.md.aQW10HRe.lean.js +0 -1
- package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +0 -1
- package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.wlFD3cUR.js +0 -62
- package/dist/docs/assets/reference_extensions.md.wlFD3cUR.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.js +0 -1
- package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.lean.js +0 -1
- package/dist/playground/assets/index-BLlKgZtI.css +0 -1
- package/dist/playground/assets/index-CDS5p9sR.js +0 -67
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center.","frontmatter":{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center."},"headers":[],"relativePath":"guides/bitbucket.md","filePath":"guides/bitbucket.md"}'),n={name:"guides/bitbucket.md"};function l(h,e,p,o,r,d){return a(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="bitbucket-agents" tabindex="-1">Bitbucket agents <a class="header-anchor" href="#bitbucket-agents" aria-label="Permalink to "Bitbucket agents""></a></h1><p>Use <code>bitbucketChannel()</code> for Bitbucket Cloud and Bitbucket Data Center. The channel detects the source from each signed payload and normalizes Data Center events to the Bitbucket Cloud event vocabulary.</p><h2 id="define-the-channel" tabindex="-1">Define the channel <a class="header-anchor" href="#define-the-channel" aria-label="Permalink to "Define the channel""></a></h2><p>Author <code>agent/channels/bitbucket.ts</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { bitbucketChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/channels/bitbucket"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
2
|
-
<span class="line"></span>
|
|
3
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bitbucketChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({});</span></span></code></pre></div><p>Without <code>onPullRequest</code>, new pull requests start turns. Data Center updates also start turns when the source branch has new commits. Comments and pushes are opt-in through <code>onPullRequestComment</code> and <code>onPush</code>. Use <code>onEvent</code> for other event types. Set <code>webhookEvents</code> when managed event delivery must subscribe to an event that only <code>onEvent</code> handles.</p><p>Filter comment hooks by author before starting a turn. This prevents comments posted by the agent from triggering another turn.</p><p><code>ctx.bitbucket.api</code> can read pull requests, post comments, and create build statuses. See the <a href="./../reference/channels.html">Channels reference</a> for hook return values and session behavior.</p><h2 id="connect-bitbucket" tabindex="-1">Connect Bitbucket <a class="header-anchor" href="#connect-bitbucket" aria-label="Permalink to "Connect Bitbucket""></a></h2><p>Set a repository hook secret and API token:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BITBUCKET_WEBHOOK_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">BITBUCKET_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span></code></pre></div><p>Add a repository webhook for <code>https://<your-host>/<slug>/v1/channels/bitbucket</code>. Use the same secret on both sides. The channel verifies the <code>X-Hub-Signature</code> HMAC before it parses the payload.</p><p>Bitbucket Cloud uses its 2.0 API by default. Data Center also needs its REST API base:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bitbucketChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> apiBaseUrl: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://bitbucket.example.com/rest/api/1.0"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"PLATFORM/api"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>You can set <code>BITBUCKET_API_BASE_URL</code> instead.</p><h2 id="test-locally" tabindex="-1">Test locally <a class="header-anchor" href="#test-locally" aria-label="Permalink to "Test locally""></a></h2><p>Start the agent, then replay a pull request you can read:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bitbucket</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://bitbucket.example.com/projects/PLATFORM/repos/api/pull-requests/42</span></span></code></pre></div><p>Replay supports Bitbucket Cloud and Data Center URLs. <code>BITBUCKET_TOKEN</code> needs pull request read access. The command reads the pull request, creates a payload in the matching dialect, and sends it through the same channel route. Use <code>--events '*'</code> to replay the supported events declared by the channel. Use <code>--dry-run --out fixtures/bitbucket</code> to save fixtures.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bitbucket</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> events</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span>
|
|
10
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bitbucket</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p><code>forward</code> prints the repository-hook and HTTPS tunnel setup for live deliveries.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../reference/channels.html">Channels reference</a></li><li><a href="./webhooks.html">Webhooks and custom channels</a></li><li><a href="./../evals.html">Evals</a></li></ul>`,23)])])}const u=s(n,[["render",l]]);export{k as __pageData,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center.","frontmatter":{"title":"Bitbucket","description":"Wake your agent from pull requests, comments, and pushes on Bitbucket Cloud or Bitbucket Data Center."},"headers":[],"relativePath":"guides/bitbucket.md","filePath":"guides/bitbucket.md"}'),n={name:"guides/bitbucket.md"};function l(h,e,p,o,r,d){return a(),t("div",null,[...e[0]||(e[0]=[i("",23)])])}const u=s(n,[["render",l]]);export{k as __pageData,u as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as a,o as s,a3 as n}from"./chunks/framework.dypDpWZ3.js";const p=JSON.parse('{"title":"Cursor cloud agents","description":"Let an agent-sdk agent hand coding work to Cursor cloud agents and steer them: mount the extension, pick the repositories it may touch, and decide what needs approval.","frontmatter":{"title":"Cursor cloud agents","description":"Let an agent-sdk agent hand coding work to Cursor cloud agents and steer them: mount the extension, pick the repositories it may touch, and decide what needs approval."},"headers":[],"relativePath":"guides/cloud-agents.md","filePath":"guides/cloud-agents.md"}'),o={name:"guides/cloud-agents.md"};function i(r,e,h,l,d,c){return s(),a("div",null,[...e[0]||(e[0]=[n(`<h1 id="cloud-agents" tabindex="-1">Cloud agents <a class="header-anchor" href="#cloud-agents" aria-label="Permalink to "Cloud agents""></a></h1><p>The <code>cursor-cloud-agents</code> extension lets an agent delegate coding work to Cursor cloud agents and stay in the conversation while they do it. The cloud agents work on real repository checkouts and push branches and pull requests; your agent hands off the task, reports back, and answers questions in the meantime. A Slack triage agent turns a bug report into a PR, a planner fans a refactor out across repositories, a reviewer asks a cloud agent to address its own comments.</p><p>This is different from <code>[runtime: "cloud"](../reference/agent-config.md#choose-a-runtime)</code>. The runtime moves <em>this</em> agent's turns onto a cloud VM. The extension keeps the agent where it is and lets it start <em>other</em> cloud agents.</p><h2 id="mount-it" tabindex="-1">Mount it <a class="header-anchor" href="#mount-it" aria-label="Permalink to "Mount it""></a></h2><p>The extension ships with <code>@cursor/july</code>. Mount it with one file.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/extensions/cloud.ts</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorCloudAgents </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/extensions/cursor-cloud-agents"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
|
-
<span class="line"></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cursorCloudAgents</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cloud: {</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [{ url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://github.com/acme/api"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, startingRef: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"main"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }],</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> autoCreatePR: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Launches run under the host's signed-in account (<code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>) and spend its cloud-agent budget. Name the repositories the agent may target, and keep approval on when you can't.</p><p>Mount it on an agent that runs on the local runtime; that is where launches park for approval. On the cloud runtime approvals don't resolve.</p><h2 id="what-the-agent-can-do" tabindex="-1">What the agent can do <a class="header-anchor" href="#what-the-agent-can-do" aria-label="Permalink to "What the agent can do""></a></h2><p>With the extension mounted, the agent can hand off coding work and stay in the conversation while it happens:</p><ul><li><strong>Hand off a task.</strong> Launch a cloud agent on one of your repositories, or on a pull request, with a self-contained brief. It gets back an agent id and a URL to share.</li><li><strong>Check on it.</strong> See whether the agent is still running, what it produced, and which branches or pull requests it pushed.</li><li><strong>Read what was done.</strong> Pull the agent's full conversation into the workspace, quote its final report, or trace the exact edits before summarizing for a person.</li><li><strong>Steer or stop.</strong> Send a follow-up to an agent it launched; it queues behind the current run, or interrupts it on request. Cancel a run that went sideways.</li><li><strong>Keep track.</strong> List the agents launched in this conversation, or everything it has launched before.</li></ul><p>A skill teaches the model when to delegate, how to write a brief a cloud agent can act on alone, and how to follow up. Everything the extension launches stays bound to whoever launched it: an agent started by another user, or outside the extension, is out of reach. That separation is only as fine as your host's auth; a shared bearer token or <code>--allow-anonymous</code> makes every caller one principal, so use <a href="./../reference/channels.html#auth-policies">authored auth</a> when callers need their own.</p><h2 id="configure-it" tabindex="-1">Configure it <a class="header-anchor" href="#configure-it" aria-label="Permalink to "Configure it""></a></h2><table tabindex="0"><thead><tr><th>Option</th><th>What it controls</th></tr></thead><tbody><tr><td><code>cloud</code></td><td>Launch defaults, in the same shape as the agent's own <a href="./../reference/agent-config.html#cloud-options">cloud options</a>.</td></tr><tr><td><code>cloud.repos</code></td><td>The repositories the agent may hand work to, with a default branch or pull request for each. Without it, launches run with no repository and the model can't name one, so secrets in <code>cloud.envVars</code> never reach a repository you didn't list.</td></tr><tr><td><code>model</code></td><td>The model launched agents run. Omit it to use the account default.</td></tr><tr><td><code>needsApproval</code></td><td>Park launches and follow-ups for a <a href="./../reference/tools.html#gate-a-tool-on-human-approval">human decision</a>. Defaults to <code>true</code> when no <code>cloud.repos</code> are configured, <code>false</code> otherwise.</td></tr><tr><td><code>apiKey</code></td><td>A Cursor API key to launch with instead of the host's own.</td></tr></tbody></table><h2 id="adjust-it" tabindex="-1">Adjust it <a class="header-anchor" href="#adjust-it" aria-label="Permalink to "Adjust it""></a></h2><p>To take a capability away, such as sending follow-ups, mount as a directory and disable that tool; see <a href="./../reference/extensions.html#adjust-a-mounted-extension">overlays</a>.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/extensions.html">Extensions</a>: how mounts, namespaces, and overrides work</li><li><a href="./../reference/tools.html#gate-a-tool-on-human-approval">Gate a tool on human approval</a>: where parked launches get approved</li></ul>`,19)])])}const g=t(o,[["render",i]]);export{p as __pageData,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as a,o as s,a3 as n}from"./chunks/framework.dypDpWZ3.js";const p=JSON.parse('{"title":"Cursor cloud agents","description":"Let an agent-sdk agent hand coding work to Cursor cloud agents and steer them: mount the extension, pick the repositories it may touch, and decide what needs approval.","frontmatter":{"title":"Cursor cloud agents","description":"Let an agent-sdk agent hand coding work to Cursor cloud agents and steer them: mount the extension, pick the repositories it may touch, and decide what needs approval."},"headers":[],"relativePath":"guides/cloud-agents.md","filePath":"guides/cloud-agents.md"}'),o={name:"guides/cloud-agents.md"};function i(r,e,h,l,d,c){return s(),a("div",null,[...e[0]||(e[0]=[n("",19)])])}const g=t(o,[["render",i]]);export{p as __pageData,g as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as a,o,a3 as n}from"./chunks/framework.dypDpWZ3.js";const u=JSON.parse('{"title":"Convert a Cursor Automation","description":"Export a dashboard Automation into a local Agent SDK project, then review, validate, and run it.","frontmatter":{"title":"Convert a Cursor Automation","description":"Export a dashboard Automation into a local Agent SDK project, then review, validate, and run it."},"headers":[],"relativePath":"guides/convert-automation.md","filePath":"guides/convert-automation.md"}'),s={name:"guides/convert-automation.md"};function i(r,e,d,c,l,h){return o(),a("div",null,[...e[0]||(e[0]=[n(`<h1 id="convert-a-cursor-automation" tabindex="-1">Convert a Cursor Automation <a class="header-anchor" href="#convert-a-cursor-automation" aria-label="Permalink to "Convert a Cursor Automation""></a></h1><p><code>convert-automation</code> exports a dashboard Automation into a local Agent SDK project. Use it when you need to edit, test, or deploy the Automation as code. Keep using the dashboard if you only need to change its prompt or trigger.</p><p>The converter refuses Cursor-managed Automations because their behavior lives in managed configuration. The <a href="./../reference/cli.html#convert-automation">CLI reference</a> lists flags and exit codes.</p><h2 id="run-the-conversion" tabindex="-1">Run the conversion <a class="header-anchor" href="#run-the-conversion" aria-label="Permalink to "Run the conversion""></a></h2><p>Sign in before converting. Unlike <code>init</code>, this command does not start a login flow.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> login</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or: export CURSOR_API_KEY=key_...</span></span>
|
|
3
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> whoami</span></span></code></pre></div><p>Pass the Automation's dashboard URL or UUID. The URL must end with <code>/automations/<uuid></code> or <code>/custom-agents/<uuid></code>. Do not add path segments after the UUID.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> convert-automation</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://cursor.com/automations/0a1b2c3d-0000-1111-2222-333344445555</span></span></code></pre></div><p>The summary prints the output directory. Change into it before running any setup command. For an Automation named "Nightly triage":</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">cd</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> nightly-triage</span></span></code></pre></div><p>The command fetches the Automation before writing files. A 404 means it was not found, you do not have access, or convert is not enabled for your team. A 422 means it is Cursor-managed. The command writes nothing after either error.</p><p>The command runs <code>npm install</code> after writing the project. If the install fails, the files remain. Run <code>npm install</code> in the output directory before <code>dev</code>.</p><h2 id="what-the-project-contains" tabindex="-1">What the project contains <a class="header-anchor" href="#what-the-project-contains" aria-label="Permalink to "What the project contains""></a></h2><p>A cron Automation with a Linear MCP server might produce:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>nightly-triage/</span></span>
|
|
4
|
-
<span class="line"><span> package.json</span></span>
|
|
5
|
-
<span class="line"><span> tsconfig.json</span></span>
|
|
6
|
-
<span class="line"><span> agent/</span></span>
|
|
7
|
-
<span class="line"><span> agent.ts</span></span>
|
|
8
|
-
<span class="line"><span> instructions.md</span></span>
|
|
9
|
-
<span class="line"><span> schedules/nightly-triage.ts</span></span>
|
|
10
|
-
<span class="line"><span> mcp-connections/linear.ts</span></span>
|
|
11
|
-
<span class="line"><span> evals/</span></span></code></pre></div><p>The command adds missing <code>init</code> scaffold files but omits the demo <code>echo</code> tool. It writes the memory hook only when memory was enabled. File generation leaves existing paths unchanged and marks them as <code>exist</code>. This does not cover <code>npm install</code>, which may update lockfiles or run lifecycle scripts from an existing <code>package.json</code>.</p><table tabindex="0"><thead><tr><th>Automation input</th><th>Project output</th></tr></thead><tbody><tr><td>First prompt</td><td>Copies text to <code>agent/instructions.md</code>. Action markup such as <code>@[label](action:...)</code> becomes the label text.</td></tr><tr><td>Prompt model</td><td>Pins the model on <code>defineAgent</code> in <code>agent/agent.ts</code>. <code>git_config</code> and <code>agent_options</code> remain comments.</td></tr><tr><td>Cron trigger</td><td>Creates <code>agent/schedules/<slug>.ts</code> with <code>defineSchedule</code> in UTC.</td></tr><tr><td>GitHub trigger</td><td>Creates <code>agent/channels/github.ts</code>. It converts pull-request action, push branch, issue action, and user allowlist filters.</td></tr><tr><td>Slack trigger</td><td>Creates <code>agent/channels/slack.ts</code> as Socket Mode with <code>envPrefix</code> from the automation name (same names <code>slack create</code> writes). Watches add <code>engagement.channelPosts</code>. Run <code>agent-sdk slack create</code> for the bot.</td></tr><tr><td>Linear, PagerDuty, Sentry, Teams, or generic webhook</td><td>Creates a boilerplate <code>agent/channels/<slug>.ts</code>.</td></tr><tr><td>HTTP or SSE MCP server</td><td>Creates a name-based Cursor-account connection under <code>agent/mcp-connections/</code>. The project contains no server URL or credentials.</td></tr><tr><td>Stdio MCP server</td><td>Writes <code>agent/mcp-connections/<slug>.todo.md</code>.</td></tr><tr><td>Slack post or read action</td><td>Adds <code>agent/mcp-connections/slack.ts</code>. The summary includes a <code>Verify:</code> step for the original action.</td></tr><tr><td>Other built-in dashboard action</td><td>Adds a <code>Verify:</code> setup step instead of an Agent SDK tool.</td></tr></tbody></table><h2 id="finish-unsupported-behavior" tabindex="-1">Finish unsupported behavior <a class="header-anchor" href="#finish-unsupported-behavior" aria-label="Permalink to "Finish unsupported behavior""></a></h2><p>Warnings and setup steps identify behavior the converter could not reproduce.</p><h3 id="prompt-snippets" tabindex="-1">Prompt snippets <a class="header-anchor" href="#prompt-snippets" aria-label="Permalink to "Prompt snippets""></a></h3><p>The export omits the source text for unresolved <code>%%INLINECODE<n>%%</code> placeholders. Restore those snippets in <code>instructions.md</code>.</p><h3 id="github-filters" tabindex="-1">GitHub filters <a class="header-anchor" href="#github-filters" aria-label="Permalink to "GitHub filters""></a></h3><p>Comment text, CI conclusion, label name, and review-state filters stay fail-closed. The generated hooks return <code>null</code> until you add them. The generated Cursor-account event relay includes only pull-request and comment data. Push, issue, and CI triggers need a GitHub App webhook or <code>github forward</code>. Add repositories for org-wide watches. The converter drops non-GitHub remotes.</p><h3 id="slack-triggers" tabindex="-1">Slack triggers <a class="header-anchor" href="#slack-triggers" aria-label="Permalink to "Slack triggers""></a></h3><p>Reaction and channel-created triggers have no Agent SDK equivalent. The converter keeps their configuration in comments but adds no handler. Re-add any <code>messageContains</code> filter or completion reaction you need. These triggers and channel watches require a dedicated Socket Mode app. Run <code>agent-sdk slack create --channel-posts</code>, then finish the dashboard wizard.</p><h3 id="provider-webhooks" tabindex="-1">Provider webhooks <a class="header-anchor" href="#provider-webhooks" aria-label="Permalink to "Provider webhooks""></a></h3><p>Linear, PagerDuty, Sentry, Teams, and generic webhook channels mount <code>POST /</code> under their channel route. Every accepted body starts a run. In default multi-agent mode, the route is <code>/<agent-slug>/v1/channels/<channel-id></code>. Single mode uses <code>/v1/channels/<channel-id></code>.</p><p>Restore the filters and auth before registering the provider. A hosted alias requires <code>X-Agent-Alias-Token</code>. If the provider cannot send that header, use <code>publicEndpoint()</code> with signature verification in the handler, put an alias-token relay in front, or self-host.</p><h3 id="stdio-mcp-servers" tabindex="-1">Stdio MCP servers <a class="header-anchor" href="#stdio-mcp-servers" aria-label="Permalink to "Stdio MCP servers""></a></h3><p>The converter does not export the command, arguments, or environment. Run the server, then replace the <code>.todo.md</code> stub with a reachable connection.</p><h3 id="disabled-default-tools" tabindex="-1">Disabled default tools <a class="header-anchor" href="#disabled-default-tools" aria-label="Permalink to "Disabled default tools""></a></h3><p>The converter cannot preserve this restriction. Do not rely on <code>instructions.md</code> as enforcement. Use the <a href="./../reference/agent-config.html#allowlist-built-in-harness-tools"><code>tools</code> allowlist</a>, remove unwanted authored or MCP tools, and limit channel permissions.</p><h2 id="review-and-run-the-project" tabindex="-1">Review and run the project <a class="header-anchor" href="#review-and-run-the-project" aria-label="Permalink to "Review and run the project""></a></h2><ol><li><p>Read every warning and setup step.</p></li><li><p>Open the generated channel files. Fail-closed GitHub hooks dispatch nothing until you add their filters. Add auth to boilerplate webhook routes.</p></li><li><p>Confirm the account MCP servers are connected under MCP in the Cursor dashboard. The serving host must be signed in with <code>agent-sdk login</code> or <code>CURSOR_API_KEY</code>.</p></li><li><p>Run the printed next steps:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> validate</span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span></code></pre></div></li><li><p>Before you <a href="./../deployment.html">deploy</a>, disable the source Automation so both versions do not respond to the same events. The final setup step includes its dashboard URL.</p></li><li><p>A hosted deployment uses a separate service account. After the first deploy, run <code>agent-sdk mcp oauth <connection></code> for each generated Cursor-account connection.</p></li></ol><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><ul><li><a href="./../reference/cli.html#convert-automation">CLI</a>: flags, <code>--json</code>, exit codes</li><li><a href="./../reference/connections.html">MCP connections</a>: Cursor-account connectors</li><li><a href="./github.html">GitHub</a>: hook filters and replay; use <a href="./../reference/cli.html#github"><code>github forward</code></a> for live delivery</li><li><a href="./slack.html">Slack</a>: Cursor connection vs Socket Mode</li><li><a href="./webhooks.html">Webhooks</a>: auth on a custom channel route</li><li><a href="./../deployment.html">Deployment</a>: hosted engines after you have reviewed the project</li></ul>`,36)])])}const g=t(s,[["render",i]]);export{u as __pageData,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as a,o,a3 as n}from"./chunks/framework.dypDpWZ3.js";const u=JSON.parse('{"title":"Convert a Cursor Automation","description":"Export a dashboard Automation into a local Agent SDK project, then review, validate, and run it.","frontmatter":{"title":"Convert a Cursor Automation","description":"Export a dashboard Automation into a local Agent SDK project, then review, validate, and run it."},"headers":[],"relativePath":"guides/convert-automation.md","filePath":"guides/convert-automation.md"}'),s={name:"guides/convert-automation.md"};function i(r,e,d,c,l,h){return o(),a("div",null,[...e[0]||(e[0]=[n("",36)])])}const g=t(s,[["render",i]]);export{u as __pageData,g as default};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import{_ as e,c as i,o as a,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"GitHub","description":"Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests.","frontmatter":{"title":"GitHub","description":"Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests."},"headers":[],"relativePath":"guides/github.md","filePath":"guides/github.md"}'),n={name:"guides/github.md"};function h(l,s,o,p,r,d){return a(),i("div",null,[...s[0]||(s[0]=[t(`<h1 id="github-agents" tabindex="-1">GitHub agents <a class="header-anchor" href="#github-agents" aria-label="Permalink to "GitHub agents""></a></h1><p>Wake your agent from repository events without exposing a public webhook URL. Prefer <code>serve --cursor-events</code>: the host long-polls Cursor's SCM event stream for repos you've connected to Cursor. You still declare a <code>githubChannel</code> so hooks decide what each event does.</p><p>The companion skill for coding agents is <a href="./../../skills/github/SKILL.html"><code>skills/github/SKILL.md</code></a>.</p><h2 id="pull-events-from-cursor" tabindex="-1">Pull events from Cursor <a class="header-anchor" href="#pull-events-from-cursor" aria-label="Permalink to "Pull events from Cursor""></a></h2><p>Connect GitHub in Cursor for the repositories you care about (Settings or <a href="https://cursor.com/dashboard" target="_blank" rel="noreferrer">cursor.com/dashboard</a>). That gives your account access and lets Cursor receive the repo's webhooks. Sign the host in (<code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>), then opt the channel into the Cursor account connection:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> githubChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: {</span></span>
|
|
3
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"owner/repo"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // permissions?: "read" | "pr-write" | "contents-write"</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // default "pr-write" (comments / PR writes, no contents:write)</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // hooks...</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>cursorAccount</code> starts the event relay and mints one short-lived GitHub credential scoped to those repositories. <code>ctx.github</code>, <code>ctx.host.github</code>, and child <code>gh</code> commands share it. The Agent SDK refreshes the credential before expiry. No GitHub App key, PAT, or separate <code>gh auth login</code> is needed on the host.</p><p>Choose <code>permissions</code> by what the agent needs:</p><table tabindex="0"><thead><tr><th><code>permissions</code></th><th>Use when</th></tr></thead><tbody><tr><td><code>"read"</code></td><td>Inspect PRs / issues / statuses only</td></tr><tr><td><code>"pr-write"</code> (default)</td><td>Comment, review, update PR/issue metadata</td></tr><tr><td><code>"contents-write"</code></td><td>Push code, or post merge-box checks</td></tr></tbody></table><p><code>contents-write</code> is an explicit opt-up. <code>progress.commitStatus</code> posts a GitHub check run (<code>checks:write</code>). Hosted <code>cursorAccount</code> mints that permission on <code>"contents-write"</code> tokens. Enabling <code>commitStatus</code> opts a <code>"pr-write"</code> channel up to that tier because it needs check-write permission. <code>"pr-write"</code> without <code>commitStatus</code> is enough for comments and banners. Prefer <code>"pr-write"</code> unless the agent must push or post a merge-box check.</p><p>Set <code>checks: true</code> when channel code posts its own Checks API runs through <code>ctx.github.createCheck</code>. The flag grants access. It does not post a check.</p><p>Selected repositories must share one GitHub owner (one App installation). Configuration that spans owners fails at startup / mint time.</p><p>To keep repository scope in deployment config instead, use <code>cursorAccount: true</code> and pass it at serve time:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> serve</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --cursor-events</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --repo</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> owner/repo</span></span></code></pre></div><p>Repeat <code>--repo</code> for each repository. The stream and credential are resolved as the signed-in Cursor principal. <code>serve</code> refuses to start signed out.</p><p>The stream carries event metadata, not full webhook bodies, so your agent should re-read the PR or checks from GitHub instead of trusting a snapshot in the wake.</p><p>This is the preferred production path: no public URL, no repo admin webhook, and no inbound network for GitHub deliveries.</p><h2 id="connect-github-enterprise-server" tabindex="-1">Connect GitHub Enterprise Server <a class="header-anchor" href="#connect-github-enterprise-server" aria-label="Permalink to "Connect GitHub Enterprise Server""></a></h2><p>GitHub Enterprise Server uses the same <code>githubChannel()</code> hooks and normalized events. Connect it through the direct webhook route. Set the REST API base and credentials for your server:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> githubChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> api: {</span></span>
|
|
10
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> apiBaseUrl: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://github.example.com/api/v3"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> credentials: {</span></span>
|
|
13
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> token</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> process.env.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GITHUB_TOKEN</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
14
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> webhookSecret</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> process.env.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">GITHUB_WEBHOOK_SECRET</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
15
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
16
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPullRequest</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pr</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span></span>
|
|
17
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pr.action </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "opened"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { auth: </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">defaultGitHubAuth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx) } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
18
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Add a repository webhook for <code>https://<your-host>/<slug>/v1/channels/github</code>. Use the same webhook secret on the server and in <code>GITHUB_WEBHOOK_SECRET</code>. The channel verifies <code>X-Hub-Signature-256</code> before it parses the payload.</p><p>Cursor account event pull, <code>github replay</code>, and <code>github forward</code> target GitHub.com. Test Enterprise Server integrations by posting saved webhook fixtures to a local <code>--dev</code> server. Leave <code>GITHUB_WEBHOOK_SECRET</code> unset for this local test so the channel admits unsigned loopback deliveries. Use a real delivery from your server so the fixture matches its version.</p><h2 id="define-the-channel" tabindex="-1">Define the channel <a class="header-anchor" href="#define-the-channel" aria-label="Permalink to "Define the channel""></a></h2><p>Author <code>agent/channels/github.ts</code> with <code>githubChannel()</code> from <code>@cursor/july/channels/github</code>. It mounts <code>POST /<slug>/v1/channels/github</code> and publishes the events it dispatches on. That event set comes from the hooks you declare, or you pin it with <code>webhookEvents</code>. Cursor event pull and local replay both use it.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defaultGitHubAuth, githubChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/channels/github"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
19
|
-
<span class="line"></span>
|
|
20
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> githubChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
21
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> botName: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"my-agent"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// or GITHUB_APP_SLUG; used to ignore self-comments</span></span>
|
|
22
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: { repos: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"owner/repo"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] },</span></span>
|
|
23
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPullRequest</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pr</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span></span>
|
|
24
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pr.action </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "opened"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { auth: </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">defaultGitHubAuth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx) } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
25
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onCheckSuite</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">suite</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span></span>
|
|
26
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> suite.conclusion </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "failure"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">task</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> triage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx) } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
27
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>The hooks are <code>onPullRequest</code>, <code>onComment</code>, <code>onIssue</code>, <code>onCheckSuite</code>, <code>onCheckRun</code>, <code>onWorkflowRun</code>, <code>onStatus</code>, the catch-all <code>onEvent</code>, and the lifecycle pair <code>onStart</code> / <code>onStop</code>. Each hook returns one of three things:</p><table tabindex="0"><thead><tr><th>Return</th><th>Meaning</th></tr></thead><tbody><tr><td><code>{ auth }</code></td><td>Start or continue a model turn as that actor. A chat session exists and shows up in the playground.</td></tr><tr><td><code>{ task }</code></td><td>Host-side work. The delivery is 202-ACKed immediately and the task runs past GitHub's ~10-second timeout. No chat session.</td></tr><tr><td><code>null</code></td><td>Skip this delivery.</td></tr></tbody></table><p><code>{ auth }</code> may also carry <code>workspaceFiles</code>, the same session seed Slack and <code>send()</code> use. Pass a function to fetch after a 202 so I/O can miss GitHub's ~10s window.</p><p>Return <code>{ task }</code> when the wake drives deterministic code. A security reviewer can run its whole review loop this way and report through PR comments. Return <code>{ auth }</code> when the model needs to reason about the event.</p><p>Without <code>cursorAccount</code>, outbound GitHub API calls prefer App installation tokens when <code>GITHUB_APP_ID</code> and <code>GITHUB_APP_PRIVATE_KEY</code> are set (with an installation id from the event or <code>GITHUB_APP_INSTALLATION_ID</code>). On serve warmup, App-backed hosts also export a short-lived installation token as <code>GH_TOKEN</code> so tools that shell out to <code>gh</code> (a host-side <code>prepare_review</code> tool, say) authenticate without a PAT. For local testing, skip the App credentials and use <code>GITHUB_TOKEN</code>, <code>GH_TOKEN</code>, or <code>gh auth login</code>.</p><h2 id="test-wakes-locally" tabindex="-1">Test wakes locally <a class="header-anchor" href="#test-wakes-locally" aria-label="Permalink to "Test wakes locally""></a></h2><p>Use fixtures and <code>github replay</code> so you can develop without waiting on live pushes. Both target the same channel route the Cursor relay uses.</p><h3 id="post-a-saved-fixture" tabindex="-1">Post a saved fixture <a class="header-anchor" href="#post-a-saved-fixture" aria-label="Permalink to "Post a saved fixture""></a></h3><p>For offline tests, POST a saved payload with an <code>x-github-event</code> header. A <code>--dev</code> server does not require a signature:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -s</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -X</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> POST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">slu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">g</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/v1/channels/github</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
28
|
-
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'content-type: application/json'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
29
|
-
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'x-github-event: pull_request'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
30
|
-
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @fixtures/github/pull_request.synchronize.json</span></span></code></pre></div><p>Don't hand-write payloads. Snapshot real ones with replay's <code>--dry-run --out</code>, below.</p><h3 id="test-with-github-replay" tabindex="-1">Test with <code>github replay</code> <a class="header-anchor" href="#test-with-github-replay" aria-label="Permalink to "Test with \`github replay\`""></a></h3><p>Use <code>replay</code> for deterministic tests and <a href="./../hillclimbing.html">hillclimbing</a>. It reads a real PR with <code>gh api</code>, synthesizes GitHub-shaped payloads, signs them when a secret is configured, and POSTs them at the channel. Pull access is enough: no admin, and an env <code>GITHUB_TOKEN</code> is fine here. The same input produces the same delivery.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Replay a pull_request delivery for a PR</span></span>
|
|
31
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://github.com/owner/repo/pull/123</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span>
|
|
32
|
-
<span class="line"></span>
|
|
33
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Replay everything the channel listens for, with CI failing</span></span>
|
|
34
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> owner/repo#123</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --events</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '*'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --conclusion</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> failure</span></span>
|
|
35
|
-
<span class="line"></span>
|
|
36
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Inspect payloads without POSTing, and snapshot them as fixtures</span></span>
|
|
37
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> github</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> owner/repo#123</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --events</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '*'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dry-run</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --out</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> fixtures/github</span></span></code></pre></div><p><code>--events</code> defaults to <code>pull_request</code>. <code>'*'</code> replays the events the channel declares and the CLI can synthesize. <code>--action</code>, <code>--conclusion</code>, <code>--comment</code>, and <code>--context</code> shape each event. <code>--secret</code> or <code>GITHUB_WEBHOOK_SECRET</code> signs them.</p><h2 id="receive-webhooks-directly" tabindex="-1">Receive webhooks directly <a class="header-anchor" href="#receive-webhooks-directly" aria-label="Permalink to "Receive webhooks directly""></a></h2><p>Most hosts should pull events from Cursor instead. Use the HTTP channel route when you already terminate GitHub webhooks yourself, or when you are POSTing fixtures and replay locally.</p><p>With a webhook secret configured, the route admits everyone (<code>allowAll()</code>) and the channel verifies <code>X-Hub-Signature-256</code> before parsing. The HMAC becomes the request principal. Without a secret, the route is loopback-only. The exception is <code>serve --dev</code>, which admits unsigned loopback deliveries so fixtures and replay work with zero config. Non-dev targets that accept real GitHub POSTs always need the secret, and the same value must live on the server and on whatever signs deliveries.</p><h2 id="handle-high-event-volume" tabindex="-1">Handle high event volume <a class="header-anchor" href="#handle-high-event-volume" aria-label="Permalink to "Handle high event volume""></a></h2><p>These patterns come from running a PR agent against real traffic:</p><ul><li>Debounce per PR (~3 seconds, latest event wins), and re-buffer while CI settles. Skip a flush when a turn for that PR is already running.</li><li>Persist the buffer in <code>host.kv</code> before you acknowledge a wake, and restore it on channel start. A restart must not drop buffered wakes.</li><li>Key sessions with a stable continuation token (<code>pr:owner/repo#N</code>) so every wake resumes the PR's conversation.</li><li>Keep payload details out of wake prompts. Send a generic "re-check the PR" and let the agent re-read source of truth instead of trusting a stale snapshot.</li><li>Cancel PR-scoped reminders on <code>pull_request.closed</code>.</li><li>Decide explicitly which repos the agent may act on. Without an allowlist the channel wakes for whatever deliveries reach it, and every wake spends real model budget.</li></ul><h2 id="show-pr-progress" tabindex="-1">Show PR progress <a class="header-anchor" href="#show-pr-progress" aria-label="Permalink to "Show PR progress""></a></h2><p>Autofix-style agents need a deterministic merge-box check and a sticky PR comment that converges when the turn ends. Configure that on the channel with <code>progress.commitStatus</code> and <code>progress.banner</code>. A hook can read and write <code>ctx.host.kv</code> and <code>ctx.host.files</code> after a turn. Use that for derived state. Keep GitHub check-run and banner writes on the channel.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defaultGitHubAuth, githubChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/channels/github"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
38
|
-
<span class="line"></span>
|
|
39
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> githubChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
40
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> botName: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"autofix"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
41
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> deliverReplies: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
42
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> progress: {</span></span>
|
|
43
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> reactions: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
44
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> commitStatus: {</span></span>
|
|
45
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> context: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"autofix"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
46
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pending: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix running"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
47
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> success: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix finished"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
48
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> failure: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix failed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
49
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
50
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> banner: {</span></span>
|
|
51
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pending: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix running…"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
52
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> success: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix finished"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
53
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> failure: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Autofix failed"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
54
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
55
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
56
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // commitStatus posts a Checks API run. Hosted cursorAccount opts the</span></span>
|
|
57
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // minted token up to contents-write (checks:write). Banner also works</span></span>
|
|
58
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // on pr-write without commitStatus.</span></span>
|
|
59
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: {</span></span>
|
|
60
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"owner/repo"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
61
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
62
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPullRequest</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">ctx</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pr</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span></span>
|
|
63
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> pr.action </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">===</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "opened"</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ?</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { auth: </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">defaultGitHubAuth</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(ctx) } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
64
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Default stream events drive the lifecycle:</p><table tabindex="0"><thead><tr><th>Event</th><th>Check run</th><th>Banner</th></tr></thead><tbody><tr><td><code>turn.started</code></td><td><code>in_progress</code></td><td>create (or keep) the sticky comment</td></tr><tr><td><code>turn.completed</code></td><td><code>completed</code> / <code>success</code></td><td>PATCH the same comment</td></tr><tr><td><code>turn.failed</code> / <code>session.failed</code></td><td><code>completed</code> / <code>failure</code></td><td>PATCH the same comment</td></tr></tbody></table><p>Omit <code>commitStatus</code> / <code>banner</code>, or set them to <code>false</code>, to keep today's behavior. Reactions still default on; set <code>reactions: false</code> when the eyes emoji is noise. Descriptions are optional; defaults derive from <code>botName</code> or the check <code>context</code>.</p><p>To match dashboard automations, set <code>detailsUrl(sessionId)</code>, <code>summaryLinkText: "View agent"</code>, and <code>outputTitle: "context"</code> so the check title is the check name, the summary includes <code>[View agent](…)</code>, and Details opens the session.</p><p>A comment-only first wake has no head SHA, so the check waits for a PR or CI event. The banner still posts. A later turn on the same SHA creates a new check run; GitHub cannot reopen a completed run.</p><p>Override <code>events</code> when the mapping is custom. A handler can post commit status from <code>turn.started</code> / <code>action.result</code> / <code>turn.failed</code> and stay never-red; that pattern still wins when you replace a default handler key. Handlers you author replace the matching defaults (same as <code>progress.reactions</code> composition today).</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./webhooks.html">Webhooks and custom channels</a>: the HTTP mechanism under this pack</li><li><a href="./../evals.html">Evals</a>: turn replay snapshots into regression fixtures</li><li><a href="./../reference/hooks.html">Hooks</a>: observe-only; use channel <code>progress</code> for GitHub surfaces</li></ul>`,57)])])}const u=e(n,[["render",h]]);export{c as __pageData,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,c as i,o as a,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"GitHub","description":"Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests.","frontmatter":{"title":"GitHub","description":"Wake your agent from pull requests, CI, and comments by pulling Cursor SCM events, with fixtures and replay for local tests."},"headers":[],"relativePath":"guides/github.md","filePath":"guides/github.md"}'),n={name:"guides/github.md"};function h(l,s,o,p,r,d){return a(),i("div",null,[...s[0]||(s[0]=[t("",57)])])}const u=e(n,[["render",h]]);export{c as __pageData,u as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"GitLab","description":"Wake your agent from GitLab merge requests, notes, pipelines, and pushes on GitLab.com or self-managed GitLab.","frontmatter":{"title":"GitLab","description":"Wake your agent from GitLab merge requests, notes, pipelines, and pushes on GitLab.com or self-managed GitLab."},"headers":[],"relativePath":"guides/gitlab.md","filePath":"guides/gitlab.md"}'),n={name:"guides/gitlab.md"};function l(h,s,p,o,r,d){return i(),e("div",null,[...s[0]||(s[0]=[t(`<h1 id="gitlab-agents" tabindex="-1">GitLab agents <a class="header-anchor" href="#gitlab-agents" aria-label="Permalink to "GitLab agents""></a></h1><p>Use <code>gitlabChannel()</code> for GitLab.com and self-managed GitLab. The channel verifies project hooks, normalizes their payloads, and gives each hook a project-bound <code>ctx.gitlab</code> API client.</p><h2 id="define-the-channel" tabindex="-1">Define the channel <a class="header-anchor" href="#define-the-channel" aria-label="Permalink to "Define the channel""></a></h2><p>Author <code>agent/channels/gitlab.ts</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { gitlabChannel } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/channels/gitlab"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
2
|
-
<span class="line"></span>
|
|
3
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> gitlabChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({});</span></span></code></pre></div><p>Without <code>onMergeRequest</code>, new and reopened merge requests start turns. Updates start turns only when they include new commits. Notes, pushes, and pipelines are opt-in through <code>onNote</code>, <code>onPush</code>, and <code>onPipeline</code>. Use <code>onEvent</code> for other GitLab event types. Set <code>webhookEvents</code> when managed event delivery must subscribe to an event that only <code>onEvent</code> handles.</p><p>Filter note hooks by author before starting a turn. This prevents comments posted by the agent from triggering another turn.</p><p><code>ctx.gitlab</code> can call the project REST API and create commit statuses. See the <a href="./../reference/channels.html">Channels reference</a> for hook return values and session behavior.</p><h2 id="connect-gitlab" tabindex="-1">Connect GitLab <a class="header-anchor" href="#connect-gitlab" aria-label="Permalink to "Connect GitLab""></a></h2><p>On Cursor-managed hosting, use the signed-in Cursor account:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> gitlabChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorAccount: {</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> projects: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"acme/platform"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>For direct webhooks, set a project hook secret and API token:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GITLAB_WEBHOOK_SECRET</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">GITLAB_TOKEN</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">...</span></span></code></pre></div><p>Add a project webhook for <code>https://<your-host>/<slug>/v1/channels/gitlab</code>. Use the same value for the GitLab secret token and <code>GITLAB_WEBHOOK_SECRET</code>. The channel checks <code>X-Gitlab-Token</code> before it parses the payload.</p><p>Self-managed GitLab also needs its REST API base:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> gitlabChannel</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> apiBaseUrl: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://gitlab.example.com/api/v4"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
10
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> projects: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"acme/platform"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>You can set <code>GITLAB_API_BASE_URL</code> instead.</p><h2 id="test-locally" tabindex="-1">Test locally <a class="header-anchor" href="#test-locally" aria-label="Permalink to "Test locally""></a></h2><p>Start the agent, then replay a merge request you can read:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> dev</span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gitlab</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> replay</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
13
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> https://gitlab.example.com/acme/platform/-/merge_requests/42</span></span></code></pre></div><p><code>GITLAB_TOKEN</code> needs API read access. Replay reads the merge request, creates GitLab-shaped payloads, and sends them through the same channel route. Use <code>--events '*'</code> to replay the supported events declared by the channel. Use <code>--dry-run --out fixtures/gitlab</code> to save fixtures.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gitlab</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> events</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span>
|
|
14
|
-
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> gitlab</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> forward</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --dir</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> .</span></span></code></pre></div><p>GitLab has no local webhook relay. <code>forward</code> prints the project-hook and HTTPS tunnel setup for live deliveries.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../reference/channels.html">Channels reference</a></li><li><a href="./webhooks.html">Webhooks and custom channels</a></li><li><a href="./../evals.html">Evals</a></li></ul>`,25)])])}const g=a(n,[["render",l]]);export{c as __pageData,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as a,c as e,o as i,a3 as t}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"GitLab","description":"Wake your agent from GitLab merge requests, notes, pipelines, and pushes on GitLab.com or self-managed GitLab.","frontmatter":{"title":"GitLab","description":"Wake your agent from GitLab merge requests, notes, pipelines, and pushes on GitLab.com or self-managed GitLab."},"headers":[],"relativePath":"guides/gitlab.md","filePath":"guides/gitlab.md"}'),n={name:"guides/gitlab.md"};function l(h,s,p,o,r,d){return i(),e("div",null,[...s[0]||(s[0]=[t("",25)])])}const g=a(n,[["render",l]]);export{c as __pageData,g as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{_ as e,c as a,o as s,a3 as n}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval.","frontmatter":{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval."},"headers":[],"relativePath":"guides/grokbot-agents.md","filePath":"guides/grokbot-agents.md"}'),o={name:"guides/grokbot-agents.md"};function i(r,t,h,l,d,p){return s(),a("div",null,[...t[0]||(t[0]=[n(`<h1 id="grok-bot-agents" tabindex="-1">Grok Bot agents <a class="header-anchor" href="#grok-bot-agents" aria-label="Permalink to "Grok Bot agents""></a></h1><p>The <code>cursor-grokbot-agents</code> extension lets an agent send a message to one of your Grok Bot agents and read the reply. The Grok Bot keeps its own conversation, memory, and tools. Your agent stays where it is and consults that bot the way you would in the Grok Bot app.</p><p>This is different from moving this agent's turns onto a hosted Grok Bot. The extension keeps the agent where it is and lets it talk to <em>other</em> Grok Bot agents.</p><h2 id="mount-it" tabindex="-1">Mount it <a class="header-anchor" href="#mount-it" aria-label="Permalink to "Mount it""></a></h2><p>The extension ships with <code>@cursor/july</code>. Mount it with one file.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/extensions/grokbot.ts</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorGrokBotAgents </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/extensions/cursor-grokbot-agents"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
|
-
<span class="line"></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cursorGrokBotAgents</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> agents: [</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Plan Keeper"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Keeps or moves outdoor plans."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { name: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Chief of Staff"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Routes work and tracks priorities."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>agents</code> is the allowlist. List every Grok Bot the model may talk to; a name outside the list is refused. Calls run under the host's signed-in account (<code>agent-sdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>). Keep approval on when you can't.</p><p>To scaffold a project that already mounts this:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npx</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @cursor/july</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> init</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ./grokbot</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --template</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> grokbot-agents</span></span></code></pre></div><h2 id="what-the-agent-can-do" tabindex="-1">What the agent can do <a class="header-anchor" href="#what-the-agent-can-do" aria-label="Permalink to "What the agent can do""></a></h2><p>With the extension mounted, the agent can consult a Grok Bot and stay in its own conversation:</p><ul><li><strong>Ask.</strong> Send a self-contained message to a Grok Bot by the name shown in the Grok Bot app. The message lands in your conversation with that bot. The tool waits for the bot's reply.</li><li><strong>Keep waiting.</strong> A long turn returns <code>status: "running"</code>. Call check with the same name to read what arrived since the last look.</li><li><strong>Stop a turn.</strong> Interrupt the bot's current work. The conversation stays; a later ask continues it.</li><li><strong>See who you can talk to.</strong> List the configured bots and the ones this caller has already asked. Add a name to <code>agents</code> when you want the model to reach another bot.</li></ul><p>A skill teaches the model when to bring a Grok Bot in, how to write a message the bot can act on alone, and how to wait or interrupt. The reply is what the Grok Bot sent to the person. If a turn finishes with no reply, the bot sent nothing; ask again with a clearer request, or open the bot in the Grok Bot app.</p><p>The tools reach Grok Bot agents on the signed-in account. A bot another user owns is out of reach. That separation is only as fine as your host's auth; a shared bearer token or <code>--allow-anonymous</code> makes every caller one principal, so use <a href="./../reference/channels.html#auth-policies">authored auth</a> when callers need their own.</p><h2 id="configure-it" tabindex="-1">Configure it <a class="header-anchor" href="#configure-it" aria-label="Permalink to "Configure it""></a></h2><table tabindex="0"><thead><tr><th>Option</th><th>What it controls</th></tr></thead><tbody><tr><td><code>agents</code></td><td>The Grok Bot agents the model may talk to, by the name shown in the app. A lone entry is the default when a call names none. Omit <code>agents</code> to allow any name; an unknown name creates an empty Grok Bot on the account.</td></tr><tr><td><code>needsApproval</code></td><td>Park asks for a <a href="./../reference/tools.html#gate-a-tool-on-human-approval">human decision</a>. Defaults to <code>true</code> when no <code>agents</code> are configured, <code>false</code> otherwise.</td></tr><tr><td><code>apiKey</code></td><td>A Cursor API key to call with instead of the host's own.</td></tr></tbody></table><h2 id="adjust-it" tabindex="-1">Adjust it <a class="header-anchor" href="#adjust-it" aria-label="Permalink to "Adjust it""></a></h2><p>To take a capability away, such as interrupting a turn, mount as a directory and disable that tool; see <a href="./../reference/extensions.html#adjust-a-mounted-extension">overlays</a>.</p><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./../reference/extensions.html">Extensions</a>: how mounts, namespaces, and overrides work</li><li><a href="./../reference/tools.html#gate-a-tool-on-human-approval">Gate a tool on human approval</a>: where parked asks get approved</li></ul>`,21)])])}const u=e(o,[["render",i]]);export{c as __pageData,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,c as a,o as s,a3 as n}from"./chunks/framework.dypDpWZ3.js";const c=JSON.parse('{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval.","frontmatter":{"title":"Cursor Grok Bot agents","description":"Let an agent-sdk agent talk to your Grok Bot agents: mount the extension, name the bots it may reach, and decide what needs approval."},"headers":[],"relativePath":"guides/grokbot-agents.md","filePath":"guides/grokbot-agents.md"}'),o={name:"guides/grokbot-agents.md"};function i(r,t,h,l,d,p){return s(),a("div",null,[...t[0]||(t[0]=[n("",21)])])}const u=e(o,[["render",i]]);export{c as __pageData,u as default};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as s,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const u=JSON.parse('{"title":"Self-improvement","description":"Mount improve so an agent can change its own instructions, skills, and tools through a pull request a one-off cloud agent opens.","frontmatter":{"title":"Self-improvement","description":"Mount improve so an agent can change its own instructions, skills, and tools through a pull request a one-off cloud agent opens."},"headers":[],"relativePath":"guides/improve.md","filePath":"guides/improve.md"}'),n={name:"guides/improve.md"};function o(h,e,r,l,p,d){return a(),s("div",null,[...e[0]||(e[0]=[i(`<h1 id="self-improvement" tabindex="-1">Self-improvement <a class="header-anchor" href="#self-improvement" aria-label="Permalink to "Self-improvement""></a></h1><p>The <code>improve</code> extension lets an agent change how it behaves by changing its own source. Someone asks it to answer more briefly, to stop reaching for a tool, or to learn a procedure. The agent writes a brief, a one-off Cursor cloud agent makes the change on a branch and opens a pull request, and the agent reports that pull request. Nothing changes until a person reviews it and deploys.</p><p>The tree the agent runs from is never edited; nothing changed there survives a deploy. The pull request is the only path.</p><h2 id="mount-it" tabindex="-1">Mount it <a class="header-anchor" href="#mount-it" aria-label="Permalink to "Mount it""></a></h2><p>The extension ships with <code>@cursor/july</code>. It relies on a <a href="./cloud-agents.html"><code>cursor-cloud-agents</code></a> mount beside it, with the agent's own repository among its <code>cloud.repos</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/extensions/cloud.ts</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cursorCloudAgents </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/extensions/cursor-cloud-agents"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
|
-
<span class="line"></span>
|
|
4
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> cursorCloudAgents</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cloud: {</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repos: [{ url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://github.com/acme/agents"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, startingRef: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"main"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }],</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/extensions/improve.ts</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> improve </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/extensions/improve"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
10
|
-
<span class="line"></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> improve</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> repo: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://github.com/acme/agents"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
13
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> path: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"agents/concierge"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
14
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>repo</code> is the repository that holds the agent's source and <code>path</code> is the agent's directory in it, the same values <code>agent-sdk deploy --repo</code> and <code>--path</code> take. Mount it as <code>improve</code>: the skill then reads <code>improve__yourself</code>, which is what a person asks for.</p><p>An agent on the <a href="./../reference/agent-config.html#choose-a-runtime">cloud runtime</a> already runs each turn on a VM with the repository checked out. It mounts <code>improve</code> alone, and the skill has it branch in that checkout instead of launching a second agent.</p><h2 id="what-the-agent-does" tabindex="-1">What the agent does <a class="header-anchor" href="#what-the-agent-does" aria-label="Permalink to "What the agent does""></a></h2><p>With the extension mounted, "change how you work" becomes a procedure:</p><ul><li><strong>Locate the change.</strong> The skill maps the ask onto the Agent SDK tree: instructions for the always-on prompt, a skill for a procedure, a tool for behavior that must be right every time, <code>agent.ts</code> for the model.</li><li><strong>Brief a cloud agent.</strong> The agent writes a self-contained brief: who is asking and why, the repository, ref, and path, the files it expects to change, your notes about the tree, and the rules. Follow the repository's conventions, keep the diff to the change, run the repository's checks, open a pull request against the deployed ref, never merge.</li><li><strong>Follow up and report.</strong> It gives the person the cloud agent's URL, checks on the run, reads the pull request before repeating its claims, and reports the pull request, not the delegation. It says the change takes effect at the next deploy, never that it has changed already.</li></ul><p>Ask it directly. "Improve yourself: stop opening with a summary" is enough.</p><h2 id="configure-it" tabindex="-1">Configure it <a class="header-anchor" href="#configure-it" aria-label="Permalink to "Configure it""></a></h2><table tabindex="0"><thead><tr><th>Option</th><th>What it controls</th></tr></thead><tbody><tr><td><code>repo</code></td><td>The repository holding the agent's source. One of the cloud mount's <code>cloud.repos</code>.</td></tr><tr><td><code>path</code></td><td>The agent's directory in the repository, as <code>agent-sdk deploy --path</code> names it.</td></tr><tr><td><code>ref</code></td><td>The ref the deployment tracks. Branches start there and pull requests target it. Defaults to <code>main</code>.</td></tr><tr><td><code>notes</code></td><td>What a coding agent must know about this tree beyond the standard layout: a house skill format, a manifest that forces a reinstall, a pull request convention. Copied into every brief.</td></tr><tr><td><code>deploy</code></td><td>Who deploys a merged change and when it is live. Defaults to "It takes effect at the next deploy."</td></tr></tbody></table><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><p>Continue with these pages:</p><ul><li><a href="./cloud-agents.html">Cursor cloud agents</a>: the mount that does the coding, and how to gate its launches</li><li><a href="./../reference/extensions.html">Extensions</a>: how mounts, namespaces, and overrides work</li><li><a href="./../deployment.html">Deployment</a>: how a merged change reaches the running agent</li></ul>`,18)])])}const g=t(n,[["render",o]]);export{u as __pageData,g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,c as s,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const u=JSON.parse('{"title":"Self-improvement","description":"Mount improve so an agent can change its own instructions, skills, and tools through a pull request a one-off cloud agent opens.","frontmatter":{"title":"Self-improvement","description":"Mount improve so an agent can change its own instructions, skills, and tools through a pull request a one-off cloud agent opens."},"headers":[],"relativePath":"guides/improve.md","filePath":"guides/improve.md"}'),n={name:"guides/improve.md"};function o(h,e,r,l,p,d){return a(),s("div",null,[...e[0]||(e[0]=[i("",18)])])}const g=t(n,[["render",o]]);export{u as __pageData,g as default};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Host MCP OAuth","description":"Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments.","frontmatter":{"title":"Host MCP OAuth","description":"Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments."},"headers":[],"relativePath":"guides/mcp-oauth.md","filePath":"guides/mcp-oauth.md"}'),n={name:"guides/mcp-oauth.md"};function o(h,e,l,d,r,c){return a(),t("div",null,[...e[0]||(e[0]=[i(`<h1 id="host-mcp-oauth" tabindex="-1">Host MCP OAuth <a class="header-anchor" href="#host-mcp-oauth" aria-label="Permalink to "Host MCP OAuth""></a></h1><p>Use host MCP OAuth when your agent talks to a remote MCP server that speaks OAuth, and you want credentials on the serve host (or the hosted engine) instead of a Cursor account connector. Local login writes tokens next to your Cursor credentials. <code>--store</code> copies those tokens onto the deployment as secrets so prod can reconnect after a redeploy. Hosted Connect lets the current process retry.</p><p>The companion skill is <a href="./../../skills/mcp-auth/SKILL.html"><code>skills/mcp-auth/SKILL.md</code></a>.</p><h2 id="what-can-host-mcp-oauth-do" tabindex="-1">What can host MCP OAuth do? <a class="header-anchor" href="#what-can-host-mcp-oauth-do" aria-label="Permalink to "What can host MCP OAuth do?""></a></h2><ul><li>Authorize <code>defineConnection({ url, oauth: true })</code> with a browser PKCE flow (<code>agent-sdk mcp oauth <connection></code>)</li><li>Keep tokens in <code>mcp-auth.json</code> under the CLI config directory, bound to that connection's resource URL</li><li>Upsert deployment secrets with <code>--store</code> so the next deploy seeds the same tokens from env. Hosted Connect lets the current process retry.</li><li>Use <code>advertiseTools: true</code> when local turns should call the server by name. Host tools can still call it through <code>ctx.host.mcp</code>.</li></ul><p>Prefer a Cursor account MCP connection when the connector already lives in the signed-in account dashboard:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({ cursorAccount: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }) </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// every connected connector</span></span>
|
|
2
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// or servers: "*" / servers: ["Linear"]</span></span></code></pre></div><p>Use host OAuth when the server is yours (or private to your network) and the host must hold tokens.</p><h2 id="how-do-i-declare-a-host-oauth-connection" tabindex="-1">How do I declare a host-OAuth connection? <a class="header-anchor" href="#how-do-i-declare-a-host-oauth-connection" aria-label="Permalink to "How do I declare a host-OAuth connection?""></a></h2><p>Add one file under <code>agent/mcp-connections/</code> (model + host) or <code>agent/host-connections/</code> (host + <code>mcp oauth</code> only). The filename is the connection name you pass to the CLI and to <code>host.mcp</code>.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/mcp-connections/inventory.ts</span></span>
|
|
3
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineConnection } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/july/connections"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
4
|
-
<span class="line"></span>
|
|
5
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineConnection</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
6
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> url: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://mcp.example.com/inventory"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
7
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> oauth: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
8
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Inventory MCP."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Rules of the road:</p><ul><li><code>oauth: true</code> is required for <code>agent-sdk mcp oauth</code></li><li>A file under <code>mcp-connections/</code> is visible to the model and to <code>ctx.host.mcp</code>. A file under <code>host-connections/</code> stays on the host.</li><li>Declare expected secret names on the agent when you plan to <code>--store</code>:</li></ul><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// agent/agent.ts</span></span>
|
|
10
|
-
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // …</span></span>
|
|
12
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> hosting: {</span></span>
|
|
13
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> secretNames: [</span></span>
|
|
14
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "MCP_OAUTH_INVENTORY_ACCESS_TOKEN"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
15
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "MCP_OAUTH_INVENTORY_REFRESH_TOKEN"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
16
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "MCP_OAUTH_INVENTORY_CLIENT_ID"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
17
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
|
18
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Hosted engines need an explicit allowlist for non-bootstrap hosts.</span></span>
|
|
19
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> egressDomains: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"mcp.example.com"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
20
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
21
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Secret names follow <code>MCP_OAUTH_<CONNECTION>_*</code> where <code><CONNECTION></code> is the connection filename uppercased with non-alphanumerics turned into underscores (<code>inventory</code> → <code>MCP_OAUTH_INVENTORY_…</code>).</p><h2 id="how-do-i-authorize-locally" tabindex="-1">How do I authorize locally? <a class="header-anchor" href="#how-do-i-authorize-locally" aria-label="Permalink to "How do I authorize locally?""></a></h2><p>From the agent project (Node 22.13+, not Bun):</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> oauth</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> inventory</span></span></code></pre></div><p>What happens:</p><ol><li>The Agent SDK loads the connection file and checks <code>oauth: true</code></li><li>It opens the authorization URL in your browser</li><li>The callback lands on <code>http://localhost:8787/callback</code></li><li>Tokens land in <code>mcp-auth.json</code> under the CLI config directory (override with <code>AGENT_SERVE_CONFIG_DIR</code>)</li></ol><p>If you're already authorized, the command prints that and exits. Re-run it after rotating tokens on the MCP server, or after you change the connection URL (tokens are bound to the resource URL).</p><h2 id="how-do-i-store-credentials-on-a-hosted-deployment" tabindex="-1">How do I store credentials on a hosted deployment? <a class="header-anchor" href="#how-do-i-store-credentials-on-a-hosted-deployment" aria-label="Permalink to "How do I store credentials on a hosted deployment?""></a></h2><p>Authorize once. Then get the tokens onto the deployment.</p><p>On a hosted engine, finishing Connect lets the current process retry. Self-hosted serve writes tokens locally only.</p><p><code>--store</code> from a signed-in laptop is the reliable way to put <code>MCP_OAUTH_*</code> on the next deploy. If <code>agent-sdk secrets list</code> is empty, run <code>--store</code> and redeploy.</p><p>From a laptop, push secrets with the CLI:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">agent-sdk</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mcp</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> oauth</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> inventory</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --store</span></span>
|
|
22
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># optional:</span></span>
|
|
23
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># --slug my-agent</span></span>
|
|
24
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># --team <cursor-team-id></span></span></code></pre></div><p><code>--store</code> upserts:</p><table tabindex="0"><thead><tr><th>Secret</th><th>Source</th></tr></thead><tbody><tr><td><code>MCP_OAUTH_<NAME>_ACCESS_TOKEN</code></td><td>access token (required)</td></tr><tr><td><code>MCP_OAUTH_<NAME>_REFRESH_TOKEN</code></td><td>refresh token when the server returns one</td></tr><tr><td><code>MCP_OAUTH_<NAME>_CLIENT_ID</code></td><td>dynamic client id when registration returned one</td></tr></tbody></table><p>You must be signed in (<code>agent-sdk login</code>) with permission to set secrets on that slug. Secrets apply on the <strong>next</strong> deploy. Run <code>agent-sdk deploy</code> after <code>--store</code>. A fresh pod sees <code>MCP_OAUTH_*</code> only after that deploy.</p><p>On the engine, when <code>mcp-auth.json</code> is empty, serve seeds the OAuth provider from those env vars so host MCP calls work without a browser on the pod.</p><p>These secrets are deployment-wide. Anyone who can list or set secrets on that slug, and the hosted engine's runtime env, can use them. That is the same blast radius as <code>--store</code>. They are not scoped to the caller who clicked Connect. <code>cursorAccount: true</code> tokens stay on the Cursor backend for the deployment service account and do not use <code>MCP_OAUTH_*</code>.</p><h2 id="how-do-host-tools-call-the-server" tabindex="-1">How do host tools call the server? <a class="header-anchor" href="#how-do-host-tools-call-the-server" aria-label="Permalink to "How do host tools call the server?""></a></h2><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> result</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ctx.host.mcp.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">callTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
|
|
25
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "inventory"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
26
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "list_warehouses"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
27
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { region: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"us-east"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
28
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>The model can call the same server. Use a host tool when the write needs an allowlist or other deterministic gate.</p><h2 id="what-if-authorization-fails" tabindex="-1">What if authorization fails? <a class="header-anchor" href="#what-if-authorization-fails" aria-label="Permalink to "What if authorization fails?""></a></h2><table tabindex="0"><thead><tr><th>What you see</th><th>What to do</th></tr></thead><tbody><tr><td><code>must be defineConnection({ url, oauth: true })</code></td><td>Add <code>oauth: true</code> on that connection, or pick the right connection name</td></tr><tr><td>Callback never completes</td><td>Keep port <code>8787</code> free; finish the browser login on this machine</td></tr><tr><td>Hosted calls unauthorized after Connect or <code>--store</code></td><td>Confirm secrets with <code>agent-sdk secrets list <slug></code>, then redeploy</td></tr><tr><td>Tokens ignored after URL change</td><td>Expected: resource URL binding drops stale entries. Re-run <code>mcp oauth</code></td></tr></tbody></table><h2 id="what-s-next" tabindex="-1">What's next <a class="header-anchor" href="#what-s-next" aria-label="Permalink to "What's next""></a></h2><ul><li><a href="./../reference/connections.html">MCP connections</a>: transports, account MCP</li><li><a href="./../reference/cli.html#mcp-oauth">CLI</a>: full flag list for <code>mcp oauth</code></li><li><a href="./../deployment.html">Deployment</a>: secrets, egress, and hosted engines</li><li><a href="./../troubleshooting.html">Fix common agent problems</a>: more symptom → fix tables</li></ul>`,39)])])}const u=s(n,[["render",o]]);export{k as __pageData,u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s,c as t,o as a,a3 as i}from"./chunks/framework.dypDpWZ3.js";const k=JSON.parse('{"title":"Host MCP OAuth","description":"Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments.","frontmatter":{"title":"Host MCP OAuth","description":"Authorize defineConnection({ url, oauth: true }) with agent-sdk mcp oauth, store tokens locally, and push MCP_OAUTH_* secrets to hosted deployments."},"headers":[],"relativePath":"guides/mcp-oauth.md","filePath":"guides/mcp-oauth.md"}'),n={name:"guides/mcp-oauth.md"};function o(h,e,l,d,r,c){return a(),t("div",null,[...e[0]||(e[0]=[i("",39)])])}const u=s(n,[["render",o]]);export{k as __pageData,u as default};
|