@cursor/july 0.1.111 → 0.1.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agent-serve.js +18 -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/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 +142 -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.DxTdhphC.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.QmjDU6Jh.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CdqoBZJX.js → VPLocalSearchBox.CR3KTF0X.js} +1 -1
- package/dist/docs/assets/chunks/{arc.BVX3ycTn.js → arc.CVVqBOdS.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CcChnMxX.js → architectureDiagram-Q4EWVU46.CJHGP4ki.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.xwtXO-yt.js → baseUniq.r7UVVRBP.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CijZ_taK.js → blockDiagram-DXYQGD6D.DKmMaTre.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.0FBvwBvK.js → c4Diagram-AHTNJAMY.DDJsntUO.js} +1 -1
- package/dist/docs/assets/chunks/channel.BjpoSbz_.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CELMmMDA.js → chunk-4BX2VUAB.BK2rKt6W.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C4bhFtSm.js → chunk-4TB4RGXK.DRLV8RnF.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.ZnQ9gRRQ.js → chunk-55IACEB6.DaKjxtb7.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DPlmglG-.js → chunk-EDXVE4YY.C5sPCIT1.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BrUk8pff.js → chunk-FMBD7UC4.CSGWyNTB.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CcmWIncu.js → chunk-OYMX7WX6.D5tK9XEr.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D65-cs8I.js → chunk-QZHKN3VN.BeZGd1UZ.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qoXZpG9F.js → chunk-YZCP3GAM.U_tfWwQR.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BgxOlMHw.js +1 -0
- package/dist/docs/assets/chunks/clone.DRuGBKZC.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.8rYtqudO.js → cose-bilkent-S5V4N54A.DVeRXIb6.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DrRP1fOh.js → dagre-KV5264BT.BpKJAeRZ.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DHj_xA2_.js → diagram-5BDNPKRD.BQOtrd1Z.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Bz_6nAKj.js → diagram-G4DWMVQ6.CSDAhjPI.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BWA0xSW9.js → diagram-MMDJMWI5.Dpztst2S.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.CpTJLNJI.js → diagram-TYMM5635.qJHRizHR.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.-7AWWSrP.js → erDiagram-SMLLAGMA.vbDotH3l.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BTnQ742_.js → flowDiagram-DWJPFMVM.CqS_ZQr4.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.DTLdR4pN.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CZcNTFZd.js → gitGraphDiagram-UUTBAWPF.D04lnbnr.js} +1 -1
- package/dist/docs/assets/chunks/{graph.V2GLaab4.js → graph.BlfqLJsM.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.7pZOkCCU.js → infoDiagram-42DDH7IO.tAooImWA.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js → ishikawaDiagram-UXIWVN3A.ClUsVqnJ.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BNEgWN1S.js → journeyDiagram-VCZTEJTY.C3tUgyCg.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.B-4d4tC7.js → kanban-definition-6JOO6SKY.CtD9-QCe.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Dvbn9nSb.js → layout.D38U-LnT.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D2GM4p4b.js → linear.BJmssyhN.js} +1 -1
- package/dist/docs/assets/chunks/{min.DVBtLK-B.js → min.DNgXoouU.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CnJRI55x.js → mindmap-definition-QFDTVHPH.Dcp6cxeu.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CtoaTFlA.js → pieDiagram-DEJITSTG.CLDw6zIs.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DtT24_vN.js → quadrantDiagram-34T5L4WZ.CYaeeY4c.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CjSO4o8f.js → requirementDiagram-MS252O5E.gMYuRpq2.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.-wWiIVWa.js → sankeyDiagram-XADWPNL6.CZqyHFbc.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DSk8s4gX.js → sequenceDiagram-FGHM5R23.BTsCjUDN.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BFKAsdkN.js → stateDiagram-FHFEXIEX.CftT9mLJ.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.-43J68xB.js +1 -0
- package/dist/docs/assets/chunks/{theme.C0MctGaz.js → theme.B_7J9ZsV.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.TUNJbAFe.js → timeline-definition-GMOUNBTQ.DbU3WUNw.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.C-RGNnk4.js → vennDiagram-DHZGUBPP.ixsq-q2u.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.WRXz-Dux.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DH4zt73Y.js → wardleyDiagram-NUSXRM2D.C0ewvgbp.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B-3k6bF6.js → xychartDiagram-5P7HB3ND.nAEhF4bO.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.BYvfZ-PO.js +72 -0
- package/dist/docs/assets/evals.md.BYvfZ-PO.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.js +30 -0
- package/dist/docs/assets/guides_agent-to-agent.md.8oDTfu-E.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
- package/dist/docs/assets/{index.md.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.CmyrlXfY.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.lean.js → reference_connections.md.CmyrlXfY.lean.js} +1 -1
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.js +58 -0
- package/dist/docs/assets/reference_extensions.md.Ceq-qT8d.lean.js +1 -0
- package/dist/docs/assets/{reference_hooks.md.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.BHsSMMyO.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.e5qitjJt.lean.js → reference_subagents.md.BHsSMMyO.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.js → reference_tools.md.BYzUTeVA.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.lean.js → reference_tools.md.BYzUTeVA.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 +146 -673
- package/dist/docs/guides/agent-to-agent.html +58 -42
- package/dist/docs/guides/agent-to-agent.md +112 -35
- 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/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 +3082 -3104
- package/dist/docs/llms.txt +21 -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 +37 -37
- 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 +127 -199
- 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 +37 -37
- package/dist/docs/reference/tools.html +37 -37
- 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/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/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/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 +17 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +50 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +8 -0
- 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 +94 -39
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +11 -5
- 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-B1c1LeIf.js +67 -0
- package/dist/playground/assets/index-CK2LX3iD.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +9 -0
- 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 +147 -674
- package/docs/guides/agent-to-agent.md +113 -36
- 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/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/evals.md +298 -0
- package/docs/reference/extensions.md +128 -200
- package/docs/reference/hooks.md +34 -34
- 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 +1 -1
- package/skills/github/SKILL.md +21 -13
- package/src/bin/agent-serve.ts +22 -0
- package/src/channels/github/github-channel.ts +29 -19
- package/src/channels/slack/agentic-delivery.ts +2 -0
- package/src/channels/slack/dispatch.ts +126 -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/filesystem.ts +168 -65
- package/src/index.ts +3 -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/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 +78 -1
- package/src/internal/hosted-delivery.ts +8 -0
- package/src/internal/init-project.ts +4 -0
- package/src/internal/server.ts +104 -41
- package/src/internal/session-engine.ts +16 -4
- package/src/internal/skill-catalog.ts +69 -0
- package/src/types.ts +9 -0
- 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/chunks/wardley-RL74JXVD.g5efOWmT.js +0 -162
- 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,311 +1,326 @@
|
|
|
1
1
|
# GitHub agents
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
GitHub agents work both directions. They wake from repo events, read the
|
|
4
|
+
latest PR and CI state, then write back reviews, comments, checks, or
|
|
5
|
+
pushes. Pull events from Cursor, so you don't expose a public webhook
|
|
6
|
+
URL.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
[
|
|
8
|
+
Connect GitHub in Cursor for the repos you care about (Settings or
|
|
9
|
+
[cursor.com/dashboard](https://cursor.com/dashboard)). Sign the host in
|
|
10
|
+
with `agent-sdk login`. `cursorAccount` reuses that connection for
|
|
11
|
+
events and API calls. You don't set up a GitHub App or a PAT.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Start from a template when one fits:
|
|
14
|
+
[security reviewer](/docs/templates/security-reviewer.md),
|
|
15
|
+
[PR autofixer](/docs/templates/pr-autofixer.md), or
|
|
16
|
+
[issue triager](/docs/templates/triage.md).
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
`CURSOR_SERVICE_ACCOUNT_KEY`), then opt the channel into the
|
|
18
|
-
Cursor account connection:
|
|
18
|
+
## Review a pull request
|
|
19
|
+
|
|
20
|
+
Wake when a PR is ready for review. Fetch the latest diff in a tool,
|
|
21
|
+
then post a verdict.
|
|
19
22
|
|
|
20
23
|
```ts
|
|
24
|
+
// agent/channels/github.ts
|
|
25
|
+
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
26
|
+
|
|
21
27
|
export default githubChannel({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
// Skip the agent's own comments so replies don't re-trigger it.
|
|
29
|
+
botName: "my-agent",
|
|
30
|
+
cursorAccount: { repos: ["acme/checkout"] },
|
|
31
|
+
onPullRequest: (ctx, pr) => {
|
|
32
|
+
if (pr.draft) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (pr.action !== "opened" && pr.action !== "ready_for_review") {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
// `auth` starts a model turn running as the sender.
|
|
39
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
26
40
|
},
|
|
27
|
-
// hooks...
|
|
28
41
|
});
|
|
29
42
|
```
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
```ts
|
|
45
|
+
// agent/tools/submit_review.ts
|
|
46
|
+
import { parseGitHubPrContinuationKey } from "@cursor/july/channels/github";
|
|
47
|
+
import { defineTool } from "@cursor/july/tools";
|
|
48
|
+
import { z } from "zod";
|
|
49
|
+
|
|
50
|
+
export default defineTool({
|
|
51
|
+
description:
|
|
52
|
+
"Post the review decision on this session's pull request. Call once.",
|
|
53
|
+
inputSchema: z.object({
|
|
54
|
+
verdict: z.enum(["approve", "request_changes"]),
|
|
55
|
+
summary: z
|
|
56
|
+
.string()
|
|
57
|
+
.describe("One or two sentences explaining the verdict."),
|
|
58
|
+
}),
|
|
59
|
+
async execute({ verdict, summary }, ctx) {
|
|
60
|
+
if (ctx.session.purpose === "eval") {
|
|
61
|
+
return { posted: false, reason: "eval" };
|
|
62
|
+
}
|
|
63
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
64
|
+
if (ref === undefined) {
|
|
65
|
+
throw new Error("submit_review requires a GitHub pull request session");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let event: "APPROVE" | "REQUEST_CHANGES" = "REQUEST_CHANGES";
|
|
69
|
+
if (verdict === "approve") {
|
|
70
|
+
event = "APPROVE";
|
|
71
|
+
}
|
|
72
|
+
const octokit = await ctx.host.github.getOctokit();
|
|
73
|
+
await octokit.rest.pulls.createReview({
|
|
74
|
+
owner: ref.owner,
|
|
75
|
+
repo: ref.repo,
|
|
76
|
+
pull_number: ref.number,
|
|
77
|
+
event,
|
|
78
|
+
body: summary,
|
|
79
|
+
});
|
|
80
|
+
return { posted: true, pr: `${ref.owner}/${ref.repo}#${ref.number}` };
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
```
|
|
44
84
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
permission on `"contents-write"` tokens. Enabling `commitStatus` opts a
|
|
48
|
-
`"pr-write"` channel up to that tier because it needs check-write
|
|
49
|
-
permission. `"pr-write"` without `commitStatus` is enough for comments
|
|
50
|
-
and banners.
|
|
51
|
-
Prefer `"pr-write"` unless the agent must push or post a merge-box check.
|
|
85
|
+
The wake tells you the PR changed. Fetch title, files, and checks inside
|
|
86
|
+
the turn or a tool.
|
|
52
87
|
|
|
53
|
-
|
|
54
|
-
`ctx.github.createCheck`. The flag grants access. It does not post a check.
|
|
88
|
+
## Answer a mention
|
|
55
89
|
|
|
56
|
-
|
|
57
|
-
|
|
90
|
+
`onComment` replaces the default `@botName` gate. Return a turn when the
|
|
91
|
+
comment is for this agent, then post the reply from a tool.
|
|
58
92
|
|
|
59
|
-
|
|
60
|
-
|
|
93
|
+
```ts
|
|
94
|
+
onComment: (ctx, comment) => {
|
|
95
|
+
if (!comment.body.includes("@my-agent")) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
99
|
+
},
|
|
100
|
+
```
|
|
61
101
|
|
|
62
|
-
```
|
|
63
|
-
agent
|
|
102
|
+
```ts
|
|
103
|
+
// agent/tools/reply.ts
|
|
104
|
+
import { parseGitHubPrContinuationKey } from "@cursor/july/channels/github";
|
|
105
|
+
import { defineTool } from "@cursor/july/tools";
|
|
106
|
+
import { z } from "zod";
|
|
107
|
+
|
|
108
|
+
export default defineTool({
|
|
109
|
+
description: "Post a comment on this session's pull request.",
|
|
110
|
+
inputSchema: z.object({
|
|
111
|
+
body: z.string().describe("Markdown to post on the PR timeline."),
|
|
112
|
+
}),
|
|
113
|
+
async execute({ body }, ctx) {
|
|
114
|
+
if (ctx.session.purpose === "eval") {
|
|
115
|
+
return { posted: false, reason: "eval" };
|
|
116
|
+
}
|
|
117
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
118
|
+
if (ref === undefined) {
|
|
119
|
+
throw new Error("reply requires a GitHub pull request session");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const octokit = await ctx.host.github.getOctokit();
|
|
123
|
+
await octokit.rest.issues.createComment({
|
|
124
|
+
owner: ref.owner,
|
|
125
|
+
repo: ref.repo,
|
|
126
|
+
issue_number: ref.number,
|
|
127
|
+
body,
|
|
128
|
+
});
|
|
129
|
+
return { posted: true };
|
|
130
|
+
},
|
|
131
|
+
});
|
|
64
132
|
```
|
|
65
133
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
134
|
+
Resolve owner, repo, and number from the session. Do not take a PR URL
|
|
135
|
+
from the model. A later mention on the same PR resumes this
|
|
136
|
+
conversation.
|
|
69
137
|
|
|
70
|
-
|
|
71
|
-
agent should re-read the PR or checks from GitHub instead of trusting a
|
|
72
|
-
snapshot in the wake.
|
|
138
|
+
## Triage a failing check
|
|
73
139
|
|
|
74
|
-
|
|
75
|
-
|
|
140
|
+
Start a model turn when CI fails. Run host code when the next step is
|
|
141
|
+
already decided.
|
|
76
142
|
|
|
77
|
-
|
|
143
|
+
```ts
|
|
144
|
+
onCheckSuite: (ctx, suite) => {
|
|
145
|
+
if (suite.conclusion !== "failure") {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
// `auth` starts a model turn to read logs and comment.
|
|
149
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
150
|
+
},
|
|
151
|
+
```
|
|
78
152
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
153
|
+
```ts
|
|
154
|
+
onCheckSuite: (ctx, suite) => {
|
|
155
|
+
if (suite.conclusion !== "failure") {
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
// `task` runs host code instead of a model turn. No chat session.
|
|
159
|
+
return { task: () => labelFailure(ctx, suite) };
|
|
160
|
+
},
|
|
161
|
+
```
|
|
82
162
|
|
|
83
163
|
```ts
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
pr.
|
|
94
|
-
|
|
164
|
+
async function labelFailure(ctx, suite) {
|
|
165
|
+
const pr = suite.pullRequests[0];
|
|
166
|
+
if (pr === undefined) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const octokit = await ctx.github.getOctokit();
|
|
170
|
+
await octokit.rest.issues.addLabels({
|
|
171
|
+
owner: ctx.repository.owner,
|
|
172
|
+
repo: ctx.repository.name,
|
|
173
|
+
issue_number: pr.number,
|
|
174
|
+
labels: ["ci-failed"],
|
|
175
|
+
});
|
|
176
|
+
}
|
|
95
177
|
```
|
|
96
178
|
|
|
97
|
-
|
|
98
|
-
`https://<your-host>/<slug>/v1/channels/github`. Use the same webhook secret
|
|
99
|
-
on the server and in `GITHUB_WEBHOOK_SECRET`. The channel verifies
|
|
100
|
-
`X-Hub-Signature-256` before it parses the payload.
|
|
179
|
+
## Events
|
|
101
180
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
this local test so the channel admits unsigned loopback deliveries. Use a real
|
|
106
|
-
delivery from your server so the fixture matches its version.
|
|
181
|
+
Declare a hook for each event that should wake the agent:
|
|
182
|
+
`onPullRequest`, `onComment`, `onIssue`, `onCheckSuite`, `onCheckRun`,
|
|
183
|
+
`onWorkflowRun`, `onStatus`, and the catch-all `onEvent`.
|
|
107
184
|
|
|
108
|
-
|
|
185
|
+
Each hook returns one of three outcomes:
|
|
109
186
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
`
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
it.
|
|
187
|
+
| Return | Use when |
|
|
188
|
+
| ---------- | ----------------------------------------------------------------------------- |
|
|
189
|
+
| `{ auth }` | The model should reason about the event. The turn shows up in the playground. |
|
|
190
|
+
| `{ task }` | Host code can handle the wake. No chat session. |
|
|
191
|
+
| `null` | Skip the event. |
|
|
116
192
|
|
|
117
|
-
|
|
118
|
-
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
193
|
+
[Channels](/docs/reference/channels.md) covers the shared session behavior.
|
|
119
194
|
|
|
120
|
-
|
|
121
|
-
botName: "my-agent", // or GITHUB_APP_SLUG; used to ignore self-comments
|
|
122
|
-
cursorAccount: { repos: ["owner/repo"] },
|
|
123
|
-
onPullRequest: (ctx, pr) =>
|
|
124
|
-
pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
125
|
-
onCheckSuite: (ctx, suite) =>
|
|
126
|
-
suite.conclusion === "failure" ? { task: () => triage(ctx) } : null,
|
|
127
|
-
});
|
|
128
|
-
```
|
|
195
|
+
## PR and agent affinity
|
|
129
196
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
things:
|
|
197
|
+
Every wake for the same repo and PR number resumes the same session. The
|
|
198
|
+
channel keys turns as `github-pr:acme/checkout#42`. Opens, comments, and
|
|
199
|
+
CI results share that conversation.
|
|
134
200
|
|
|
135
|
-
|
|
136
|
-
| --- | --- |
|
|
137
|
-
| `{ auth }` | Start or continue a model turn as that actor. A chat session exists and shows up in the playground. |
|
|
138
|
-
| `{ task }` | Host-side work. The delivery is 202-ACKed immediately and the task runs past GitHub's ~10-second timeout. No chat session. |
|
|
139
|
-
| `null` | Skip this delivery. |
|
|
201
|
+
## Call GitHub from determistic code via `ctx`
|
|
140
202
|
|
|
141
|
-
`
|
|
142
|
-
and `send()` use. Pass a function to fetch after a 202 so I/O can miss
|
|
143
|
-
GitHub's ~10s window.
|
|
203
|
+
`cursorAccount` puts one credential on both surfaces:
|
|
144
204
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
through PR comments. Return `{ auth }` when the model needs to reason
|
|
148
|
-
about the event.
|
|
205
|
+
- Channel hooks: `ctx.github.getOctokit()`, `ctx.thread.post()`,
|
|
206
|
+
`ctx.repository`, and `ctx.conversation`
|
|
149
207
|
|
|
150
|
-
|
|
151
|
-
`GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` are set (with an
|
|
152
|
-
installation id from the event or `GITHUB_APP_INSTALLATION_ID`). On
|
|
153
|
-
serve warmup, App-backed hosts also export a short-lived installation
|
|
154
|
-
token as `GH_TOKEN` so tools that shell out to `gh` (a host-side
|
|
155
|
-
`prepare_review` tool, say) authenticate without a PAT. For
|
|
156
|
-
local testing, skip the App credentials and use `GITHUB_TOKEN`,
|
|
157
|
-
`GH_TOKEN`, or `gh auth login`.
|
|
208
|
+
- Tools: `ctx.host.github.getOctokit()`
|
|
158
209
|
|
|
159
|
-
|
|
210
|
+
```ts
|
|
211
|
+
onPullRequest: async (ctx, pr) => {
|
|
212
|
+
if (pr.action !== "opened") {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
const octokit = await ctx.github.getOctokit();
|
|
216
|
+
const { data } = await octokit.rest.pulls.get({
|
|
217
|
+
owner: ctx.repository.owner,
|
|
218
|
+
repo: ctx.repository.name,
|
|
219
|
+
pull_number: pr.number,
|
|
220
|
+
});
|
|
221
|
+
if (data.draft) {
|
|
222
|
+
return null;
|
|
223
|
+
}
|
|
224
|
+
await ctx.thread.post(`Reviewing ${pr.url}`);
|
|
225
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
226
|
+
},
|
|
227
|
+
```
|
|
160
228
|
|
|
161
|
-
|
|
162
|
-
|
|
229
|
+
Re-read the PR here when the hook must decide. Tools use the host
|
|
230
|
+
client for the same API during the turn.
|
|
163
231
|
|
|
164
|
-
|
|
232
|
+
## Batch events
|
|
165
233
|
|
|
166
|
-
|
|
167
|
-
|
|
234
|
+
A change to a single request typically fans out multiple events, sometimes hundreds. A push can fire `synchronize`, several check runs,
|
|
235
|
+
and comments in a few seconds. By default, individual channel hooks or webhooks do not debounce for you.
|
|
168
236
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
237
|
+
Coalesce per PR. Flush the latest wake. Skip a flush when a turn for
|
|
238
|
+
that PR is already running.
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
const pending = new Map();
|
|
242
|
+
|
|
243
|
+
function enqueue(pr, flush) {
|
|
244
|
+
const key = `${pr.owner}/${pr.repo}#${pr.number}`;
|
|
245
|
+
const existing = pending.get(key);
|
|
246
|
+
if (existing !== undefined) {
|
|
247
|
+
clearTimeout(existing);
|
|
248
|
+
}
|
|
249
|
+
pending.set(
|
|
250
|
+
key,
|
|
251
|
+
setTimeout(() => {
|
|
252
|
+
pending.delete(key);
|
|
253
|
+
flush();
|
|
254
|
+
}, 3_000)
|
|
255
|
+
);
|
|
256
|
+
}
|
|
174
257
|
```
|
|
175
258
|
|
|
176
|
-
|
|
177
|
-
|
|
259
|
+
The [PR autofixer](/docs/templates/pr-autofixer.md) ships a buffer that
|
|
260
|
+
persists across restarts and drops the queue when the PR closes.
|
|
178
261
|
|
|
179
|
-
|
|
262
|
+
## Test with replay
|
|
180
263
|
|
|
181
|
-
|
|
182
|
-
[hillclimbing](/docs/hillclimbing.md). It reads a real PR with `gh api`,
|
|
183
|
-
synthesizes GitHub-shaped payloads, signs them when a secret is
|
|
184
|
-
configured, and POSTs them at the channel. Pull access is enough: no
|
|
185
|
-
admin, and an env `GITHUB_TOKEN` is fine here. The same input produces
|
|
186
|
-
the same delivery.
|
|
264
|
+
The AgentSDK makes it convenient for you to replay a PR you can read.
|
|
187
265
|
|
|
188
266
|
```bash
|
|
189
|
-
|
|
190
|
-
agent-sdk github replay https://github.com/owner/repo/pull/123 --dir .
|
|
267
|
+
agent-sdk github replay https://github.com/acme/checkout/pull/42 --dir . --action opened
|
|
191
268
|
|
|
192
269
|
# Replay everything the channel listens for, with CI failing
|
|
193
|
-
agent-sdk github replay
|
|
270
|
+
agent-sdk github replay acme/checkout#42 --dir . --events '*' --conclusion failure
|
|
194
271
|
|
|
195
|
-
#
|
|
196
|
-
agent-sdk github replay
|
|
272
|
+
# Snapshot payloads as fixtures instead of POSTing
|
|
273
|
+
agent-sdk github replay acme/checkout#42 --dir . --events '*' --dry-run --out fixtures/github
|
|
197
274
|
```
|
|
198
275
|
|
|
199
|
-
|
|
200
|
-
declares and the CLI can synthesize. `--action`, `--conclusion`, `--comment`,
|
|
201
|
-
and `--context` shape each event. `--secret` or `GITHUB_WEBHOOK_SECRET` signs
|
|
202
|
-
them.
|
|
203
|
-
|
|
204
|
-
## Receive webhooks directly
|
|
205
|
-
|
|
206
|
-
Most hosts should pull events from Cursor instead. Use the HTTP channel
|
|
207
|
-
route when you already terminate GitHub webhooks yourself, or when you
|
|
208
|
-
are POSTing fixtures and replay locally.
|
|
209
|
-
|
|
210
|
-
With a webhook secret configured, the route admits everyone
|
|
211
|
-
(`allowAll()`) and the channel verifies `X-Hub-Signature-256` before
|
|
212
|
-
parsing. The HMAC becomes the request principal. Without a secret, the
|
|
213
|
-
route is loopback-only. The exception is `serve --dev`, which admits
|
|
214
|
-
unsigned loopback deliveries so fixtures and replay work with zero
|
|
215
|
-
config. Non-dev targets that accept real GitHub POSTs always need the
|
|
216
|
-
secret, and the same value must live on the server and on whatever signs
|
|
217
|
-
deliveries.
|
|
218
|
-
|
|
219
|
-
## Handle high event volume
|
|
220
|
-
|
|
221
|
-
These patterns come from running a PR agent against real traffic:
|
|
222
|
-
|
|
223
|
-
- Debounce per PR (~3 seconds, latest event wins), and re-buffer while
|
|
224
|
-
CI settles. Skip a flush when a turn for that PR is already running.
|
|
225
|
-
- Persist the buffer in `host.kv` before you acknowledge a wake, and
|
|
226
|
-
restore it on channel start. A restart must not drop buffered wakes.
|
|
227
|
-
- Key sessions with a stable continuation token (`pr:owner/repo#N`) so
|
|
228
|
-
every wake resumes the PR's conversation.
|
|
229
|
-
- Keep payload details out of wake prompts. Send a generic "re-check
|
|
230
|
-
the PR" and let the agent re-read source of truth instead of trusting a
|
|
231
|
-
stale snapshot.
|
|
232
|
-
- Cancel PR-scoped reminders on `pull_request.closed`.
|
|
233
|
-
- Decide explicitly which repos the agent may act on. Without an
|
|
234
|
-
allowlist the channel wakes for whatever deliveries reach it, and
|
|
235
|
-
every wake spends real model budget.
|
|
236
|
-
|
|
237
|
-
## Show PR progress
|
|
238
|
-
|
|
239
|
-
Autofix-style agents need a deterministic merge-box check and a sticky
|
|
240
|
-
PR comment that converges when the turn ends. Configure that on the
|
|
241
|
-
channel with `progress.commitStatus` and `progress.banner`. A hook can
|
|
242
|
-
read and write `ctx.host.kv` and `ctx.host.files` after a turn. Use
|
|
243
|
-
that for derived state. Keep GitHub check-run and banner writes on the
|
|
244
|
-
channel.
|
|
276
|
+
## Practices
|
|
245
277
|
|
|
246
|
-
|
|
247
|
-
|
|
278
|
+
- Re-read GitHub in the turn or a tool. Do not stuff the event payload
|
|
279
|
+
into the prompt.
|
|
280
|
+
|
|
281
|
+
- Set `botName` so replies do not re-wake the agent.
|
|
282
|
+
|
|
283
|
+
- Watch an explicit repo list (`cursorAccount.repos`). Repos under one
|
|
284
|
+
channel must share one GitHub owner.
|
|
285
|
+
|
|
286
|
+
- Cancel leftover work on `pull_request.closed`.
|
|
248
287
|
|
|
288
|
+
|
|
289
|
+
## Other hosts
|
|
290
|
+
|
|
291
|
+
The same hooks work on GitHub Enterprise Server. Point the channel at
|
|
292
|
+
your server and add a repo webhook:
|
|
293
|
+
|
|
294
|
+
```ts
|
|
249
295
|
export default githubChannel({
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
progress: {
|
|
253
|
-
reactions: false,
|
|
254
|
-
commitStatus: {
|
|
255
|
-
context: "autofix",
|
|
256
|
-
pending: "Autofix running",
|
|
257
|
-
success: "Autofix finished",
|
|
258
|
-
failure: "Autofix failed",
|
|
259
|
-
},
|
|
260
|
-
banner: {
|
|
261
|
-
pending: "Autofix running…",
|
|
262
|
-
success: "Autofix finished",
|
|
263
|
-
failure: "Autofix failed",
|
|
264
|
-
},
|
|
296
|
+
api: {
|
|
297
|
+
apiBaseUrl: "https://github.example.com/api/v3",
|
|
265
298
|
},
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
cursorAccount: {
|
|
270
|
-
repos: ["owner/repo"],
|
|
299
|
+
credentials: {
|
|
300
|
+
token: () => process.env.GITHUB_TOKEN,
|
|
301
|
+
webhookSecret: () => process.env.GITHUB_WEBHOOK_SECRET,
|
|
271
302
|
},
|
|
272
|
-
onPullRequest: (ctx, pr) =>
|
|
273
|
-
pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
274
303
|
});
|
|
275
304
|
```
|
|
276
305
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
| `turn.started` | `in_progress` | create (or keep) the sticky comment |
|
|
282
|
-
| `turn.completed` | `completed` / `success` | PATCH the same comment |
|
|
283
|
-
| `turn.failed` / `session.failed` | `completed` / `failure` | PATCH the same comment |
|
|
284
|
-
|
|
285
|
-
Omit `commitStatus` / `banner`, or set them to `false`, to keep today's
|
|
286
|
-
behavior. Reactions still default on; set `reactions: false` when the
|
|
287
|
-
eyes emoji is noise. Descriptions are optional; defaults derive from
|
|
288
|
-
`botName` or the check `context`.
|
|
289
|
-
|
|
290
|
-
To match dashboard automations, set `detailsUrl(sessionId)`,
|
|
291
|
-
`summaryLinkText: "View agent"`, and `outputTitle: "context"` so the
|
|
292
|
-
check title is the check name, the summary includes `[View agent](…)`,
|
|
293
|
-
and Details opens the session.
|
|
294
|
-
|
|
295
|
-
A comment-only first wake has no head SHA, so the check waits for a
|
|
296
|
-
PR or CI event. The banner still posts. A later turn on the same SHA
|
|
297
|
-
creates a new check run; GitHub cannot reopen a completed run.
|
|
306
|
+
Add a repository webhook for
|
|
307
|
+
`https://<your-host>/<slug>/v1/channels/github` with the same secret.
|
|
308
|
+
Event pull and `github replay` target GitHub.com, so test Enterprise
|
|
309
|
+
Server with saved fixtures.
|
|
298
310
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
`progress.reactions` composition today).
|
|
311
|
+
Prefer event pull on github.com. Use the channel route directly when
|
|
312
|
+
you already terminate GitHub webhooks yourself. Set a webhook secret on
|
|
313
|
+
both sides. The [Webhooks guide](/docs/guides/webhooks.md) covers the shared
|
|
314
|
+
mechanism.
|
|
304
315
|
|
|
305
316
|
## Related
|
|
306
317
|
|
|
307
|
-
- [
|
|
308
|
-
|
|
318
|
+
- [Build a PR reviewer](/docs/quickstart.md): the full read and write
|
|
319
|
+
loop, one step at a time
|
|
320
|
+
- [PR autofixer](/docs/templates/pr-autofixer.md): push fixes and show
|
|
321
|
+
progress on the PR
|
|
322
|
+
- [Webhooks and custom channels](/docs/guides/webhooks.md): the HTTP mechanism
|
|
323
|
+
under this pack
|
|
309
324
|
- [Evals](/docs/evals.md): turn replay snapshots into regression fixtures
|
|
310
|
-
- [
|
|
311
|
-
|
|
325
|
+
- [`skills/github/SKILL.md`](https://github.com/cursor/cursor/blob/main/packages/agent-serve/skills/github/SKILL.md): the companion
|
|
326
|
+
skill for coding agents
|