@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
package/docs/guides/github.md
CHANGED
|
@@ -1,316 +1,331 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "GitHub"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Let your agent read pull requests and CI, then write back reviews, comments, and checks."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GitHub agents
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
GitHub agents work both directions. They wake from repo events, read the
|
|
9
|
+
latest PR and CI state, then write back reviews, comments, checks, or
|
|
10
|
+
pushes. Pull events from Cursor, so you don't expose a public webhook
|
|
11
|
+
URL.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
[
|
|
13
|
+
Connect GitHub in Cursor for the repos you care about (Settings or
|
|
14
|
+
[cursor.com/dashboard](https://cursor.com/dashboard)). Sign the host in
|
|
15
|
+
with `agent-sdk login`. `cursorAccount` reuses that connection for
|
|
16
|
+
events and API calls. You don't set up a GitHub App or a PAT.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
Start from a template when one fits:
|
|
19
|
+
[security reviewer](../templates/security-reviewer.md),
|
|
20
|
+
[PR autofixer](../templates/pr-autofixer.md), or
|
|
21
|
+
[issue triager](../templates/triage.md).
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`CURSOR_SERVICE_ACCOUNT_KEY`), then opt the channel into the
|
|
23
|
-
Cursor account connection:
|
|
23
|
+
## Review a pull request
|
|
24
|
+
|
|
25
|
+
Wake when a PR is ready for review. Fetch the latest diff in a tool,
|
|
26
|
+
then post a verdict.
|
|
24
27
|
|
|
25
28
|
```ts
|
|
29
|
+
// agent/channels/github.ts
|
|
30
|
+
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
31
|
+
|
|
26
32
|
export default githubChannel({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
// Skip the agent's own comments so replies don't re-trigger it.
|
|
34
|
+
botName: "my-agent",
|
|
35
|
+
cursorAccount: { repos: ["acme/checkout"] },
|
|
36
|
+
onPullRequest: (ctx, pr) => {
|
|
37
|
+
if (pr.draft) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (pr.action !== "opened" && pr.action !== "ready_for_review") {
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
// `auth` starts a model turn running as the sender.
|
|
44
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
31
45
|
},
|
|
32
|
-
// hooks...
|
|
33
46
|
});
|
|
34
47
|
```
|
|
35
48
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
```ts
|
|
50
|
+
// agent/tools/submit_review.ts
|
|
51
|
+
import { parseGitHubPrContinuationKey } from "@cursor/july/channels/github";
|
|
52
|
+
import { defineTool } from "@cursor/july/tools";
|
|
53
|
+
import { z } from "zod";
|
|
54
|
+
|
|
55
|
+
export default defineTool({
|
|
56
|
+
description:
|
|
57
|
+
"Post the review decision on this session's pull request. Call once.",
|
|
58
|
+
inputSchema: z.object({
|
|
59
|
+
verdict: z.enum(["approve", "request_changes"]),
|
|
60
|
+
summary: z
|
|
61
|
+
.string()
|
|
62
|
+
.describe("One or two sentences explaining the verdict."),
|
|
63
|
+
}),
|
|
64
|
+
async execute({ verdict, summary }, ctx) {
|
|
65
|
+
if (ctx.session.purpose === "eval") {
|
|
66
|
+
return { posted: false, reason: "eval" };
|
|
67
|
+
}
|
|
68
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
69
|
+
if (ref === undefined) {
|
|
70
|
+
throw new Error("submit_review requires a GitHub pull request session");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
let event: "APPROVE" | "REQUEST_CHANGES" = "REQUEST_CHANGES";
|
|
74
|
+
if (verdict === "approve") {
|
|
75
|
+
event = "APPROVE";
|
|
76
|
+
}
|
|
77
|
+
const octokit = await ctx.host.github.getOctokit();
|
|
78
|
+
await octokit.rest.pulls.createReview({
|
|
79
|
+
owner: ref.owner,
|
|
80
|
+
repo: ref.repo,
|
|
81
|
+
pull_number: ref.number,
|
|
82
|
+
event,
|
|
83
|
+
body: summary,
|
|
84
|
+
});
|
|
85
|
+
return { posted: true, pr: `${ref.owner}/${ref.repo}#${ref.number}` };
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
```
|
|
49
89
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
permission on `"contents-write"` tokens. Enabling `commitStatus` opts a
|
|
53
|
-
`"pr-write"` channel up to that tier because it needs check-write
|
|
54
|
-
permission. `"pr-write"` without `commitStatus` is enough for comments
|
|
55
|
-
and banners.
|
|
56
|
-
Prefer `"pr-write"` unless the agent must push or post a merge-box check.
|
|
90
|
+
The wake tells you the PR changed. Fetch title, files, and checks inside
|
|
91
|
+
the turn or a tool.
|
|
57
92
|
|
|
58
|
-
|
|
59
|
-
`ctx.github.createCheck`. The flag grants access. It does not post a check.
|
|
93
|
+
## Answer a mention
|
|
60
94
|
|
|
61
|
-
|
|
62
|
-
|
|
95
|
+
`onComment` replaces the default `@botName` gate. Return a turn when the
|
|
96
|
+
comment is for this agent, then post the reply from a tool.
|
|
63
97
|
|
|
64
|
-
|
|
65
|
-
|
|
98
|
+
```ts
|
|
99
|
+
onComment: (ctx, comment) => {
|
|
100
|
+
if (!comment.body.includes("@my-agent")) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
104
|
+
},
|
|
105
|
+
```
|
|
66
106
|
|
|
67
|
-
```
|
|
68
|
-
agent
|
|
107
|
+
```ts
|
|
108
|
+
// agent/tools/reply.ts
|
|
109
|
+
import { parseGitHubPrContinuationKey } from "@cursor/july/channels/github";
|
|
110
|
+
import { defineTool } from "@cursor/july/tools";
|
|
111
|
+
import { z } from "zod";
|
|
112
|
+
|
|
113
|
+
export default defineTool({
|
|
114
|
+
description: "Post a comment on this session's pull request.",
|
|
115
|
+
inputSchema: z.object({
|
|
116
|
+
body: z.string().describe("Markdown to post on the PR timeline."),
|
|
117
|
+
}),
|
|
118
|
+
async execute({ body }, ctx) {
|
|
119
|
+
if (ctx.session.purpose === "eval") {
|
|
120
|
+
return { posted: false, reason: "eval" };
|
|
121
|
+
}
|
|
122
|
+
const ref = parseGitHubPrContinuationKey(ctx.session.continuationKey ?? "");
|
|
123
|
+
if (ref === undefined) {
|
|
124
|
+
throw new Error("reply requires a GitHub pull request session");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const octokit = await ctx.host.github.getOctokit();
|
|
128
|
+
await octokit.rest.issues.createComment({
|
|
129
|
+
owner: ref.owner,
|
|
130
|
+
repo: ref.repo,
|
|
131
|
+
issue_number: ref.number,
|
|
132
|
+
body,
|
|
133
|
+
});
|
|
134
|
+
return { posted: true };
|
|
135
|
+
},
|
|
136
|
+
});
|
|
69
137
|
```
|
|
70
138
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
139
|
+
Resolve owner, repo, and number from the session. Do not take a PR URL
|
|
140
|
+
from the model. A later mention on the same PR resumes this
|
|
141
|
+
conversation.
|
|
74
142
|
|
|
75
|
-
|
|
76
|
-
agent should re-read the PR or checks from GitHub instead of trusting a
|
|
77
|
-
snapshot in the wake.
|
|
143
|
+
## Triage a failing check
|
|
78
144
|
|
|
79
|
-
|
|
80
|
-
|
|
145
|
+
Start a model turn when CI fails. Run host code when the next step is
|
|
146
|
+
already decided.
|
|
81
147
|
|
|
82
|
-
|
|
148
|
+
```ts
|
|
149
|
+
onCheckSuite: (ctx, suite) => {
|
|
150
|
+
if (suite.conclusion !== "failure") {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
// `auth` starts a model turn to read logs and comment.
|
|
154
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
155
|
+
},
|
|
156
|
+
```
|
|
83
157
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
158
|
+
```ts
|
|
159
|
+
onCheckSuite: (ctx, suite) => {
|
|
160
|
+
if (suite.conclusion !== "failure") {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
// `task` runs host code instead of a model turn. No chat session.
|
|
164
|
+
return { task: () => labelFailure(ctx, suite) };
|
|
165
|
+
},
|
|
166
|
+
```
|
|
87
167
|
|
|
88
168
|
```ts
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
pr.
|
|
99
|
-
|
|
169
|
+
async function labelFailure(ctx, suite) {
|
|
170
|
+
const pr = suite.pullRequests[0];
|
|
171
|
+
if (pr === undefined) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
const octokit = await ctx.github.getOctokit();
|
|
175
|
+
await octokit.rest.issues.addLabels({
|
|
176
|
+
owner: ctx.repository.owner,
|
|
177
|
+
repo: ctx.repository.name,
|
|
178
|
+
issue_number: pr.number,
|
|
179
|
+
labels: ["ci-failed"],
|
|
180
|
+
});
|
|
181
|
+
}
|
|
100
182
|
```
|
|
101
183
|
|
|
102
|
-
|
|
103
|
-
`https://<your-host>/<slug>/v1/channels/github`. Use the same webhook secret
|
|
104
|
-
on the server and in `GITHUB_WEBHOOK_SECRET`. The channel verifies
|
|
105
|
-
`X-Hub-Signature-256` before it parses the payload.
|
|
184
|
+
## Events
|
|
106
185
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this local test so the channel admits unsigned loopback deliveries. Use a real
|
|
111
|
-
delivery from your server so the fixture matches its version.
|
|
186
|
+
Declare a hook for each event that should wake the agent:
|
|
187
|
+
`onPullRequest`, `onComment`, `onIssue`, `onCheckSuite`, `onCheckRun`,
|
|
188
|
+
`onWorkflowRun`, `onStatus`, and the catch-all `onEvent`.
|
|
112
189
|
|
|
113
|
-
|
|
190
|
+
Each hook returns one of three outcomes:
|
|
114
191
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
it.
|
|
192
|
+
| Return | Use when |
|
|
193
|
+
| ---------- | ----------------------------------------------------------------------------- |
|
|
194
|
+
| `{ auth }` | The model should reason about the event. The turn shows up in the playground. |
|
|
195
|
+
| `{ task }` | Host code can handle the wake. No chat session. |
|
|
196
|
+
| `null` | Skip the event. |
|
|
121
197
|
|
|
122
|
-
|
|
123
|
-
import { defaultGitHubAuth, githubChannel } from "@cursor/july/channels/github";
|
|
198
|
+
[Channels](../reference/channels.md) covers the shared session behavior.
|
|
124
199
|
|
|
125
|
-
|
|
126
|
-
botName: "my-agent", // or GITHUB_APP_SLUG; used to ignore self-comments
|
|
127
|
-
cursorAccount: { repos: ["owner/repo"] },
|
|
128
|
-
onPullRequest: (ctx, pr) =>
|
|
129
|
-
pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
130
|
-
onCheckSuite: (ctx, suite) =>
|
|
131
|
-
suite.conclusion === "failure" ? { task: () => triage(ctx) } : null,
|
|
132
|
-
});
|
|
133
|
-
```
|
|
200
|
+
## PR and agent affinity
|
|
134
201
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
things:
|
|
202
|
+
Every wake for the same repo and PR number resumes the same session. The
|
|
203
|
+
channel keys turns as `github-pr:acme/checkout#42`. Opens, comments, and
|
|
204
|
+
CI results share that conversation.
|
|
139
205
|
|
|
140
|
-
|
|
141
|
-
| --- | --- |
|
|
142
|
-
| `{ auth }` | Start or continue a model turn as that actor. A chat session exists and shows up in the playground. |
|
|
143
|
-
| `{ task }` | Host-side work. The delivery is 202-ACKed immediately and the task runs past GitHub's ~10-second timeout. No chat session. |
|
|
144
|
-
| `null` | Skip this delivery. |
|
|
206
|
+
## Call GitHub from determistic code via `ctx`
|
|
145
207
|
|
|
146
|
-
`
|
|
147
|
-
and `send()` use. Pass a function to fetch after a 202 so I/O can miss
|
|
148
|
-
GitHub's ~10s window.
|
|
208
|
+
`cursorAccount` puts one credential on both surfaces:
|
|
149
209
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
through PR comments. Return `{ auth }` when the model needs to reason
|
|
153
|
-
about the event.
|
|
210
|
+
- Channel hooks: `ctx.github.getOctokit()`, `ctx.thread.post()`,
|
|
211
|
+
`ctx.repository`, and `ctx.conversation`
|
|
154
212
|
|
|
155
|
-
|
|
156
|
-
`GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` are set (with an
|
|
157
|
-
installation id from the event or `GITHUB_APP_INSTALLATION_ID`). On
|
|
158
|
-
serve warmup, App-backed hosts also export a short-lived installation
|
|
159
|
-
token as `GH_TOKEN` so tools that shell out to `gh` (a host-side
|
|
160
|
-
`prepare_review` tool, say) authenticate without a PAT. For
|
|
161
|
-
local testing, skip the App credentials and use `GITHUB_TOKEN`,
|
|
162
|
-
`GH_TOKEN`, or `gh auth login`.
|
|
213
|
+
- Tools: `ctx.host.github.getOctokit()`
|
|
163
214
|
|
|
164
|
-
|
|
215
|
+
```ts
|
|
216
|
+
onPullRequest: async (ctx, pr) => {
|
|
217
|
+
if (pr.action !== "opened") {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
const octokit = await ctx.github.getOctokit();
|
|
221
|
+
const { data } = await octokit.rest.pulls.get({
|
|
222
|
+
owner: ctx.repository.owner,
|
|
223
|
+
repo: ctx.repository.name,
|
|
224
|
+
pull_number: pr.number,
|
|
225
|
+
});
|
|
226
|
+
if (data.draft) {
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
await ctx.thread.post(`Reviewing ${pr.url}`);
|
|
230
|
+
return { auth: defaultGitHubAuth(ctx) };
|
|
231
|
+
},
|
|
232
|
+
```
|
|
165
233
|
|
|
166
|
-
|
|
167
|
-
|
|
234
|
+
Re-read the PR here when the hook must decide. Tools use the host
|
|
235
|
+
client for the same API during the turn.
|
|
168
236
|
|
|
169
|
-
|
|
237
|
+
## Batch events
|
|
170
238
|
|
|
171
|
-
|
|
172
|
-
|
|
239
|
+
A change to a single request typically fans out multiple events, sometimes hundreds. A push can fire `synchronize`, several check runs,
|
|
240
|
+
and comments in a few seconds. By default, individual channel hooks or webhooks do not debounce for you.
|
|
173
241
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
242
|
+
Coalesce per PR. Flush the latest wake. Skip a flush when a turn for
|
|
243
|
+
that PR is already running.
|
|
244
|
+
|
|
245
|
+
```ts
|
|
246
|
+
const pending = new Map();
|
|
247
|
+
|
|
248
|
+
function enqueue(pr, flush) {
|
|
249
|
+
const key = `${pr.owner}/${pr.repo}#${pr.number}`;
|
|
250
|
+
const existing = pending.get(key);
|
|
251
|
+
if (existing !== undefined) {
|
|
252
|
+
clearTimeout(existing);
|
|
253
|
+
}
|
|
254
|
+
pending.set(
|
|
255
|
+
key,
|
|
256
|
+
setTimeout(() => {
|
|
257
|
+
pending.delete(key);
|
|
258
|
+
flush();
|
|
259
|
+
}, 3_000)
|
|
260
|
+
);
|
|
261
|
+
}
|
|
179
262
|
```
|
|
180
263
|
|
|
181
|
-
|
|
182
|
-
|
|
264
|
+
The [PR autofixer](../templates/pr-autofixer.md) ships a buffer that
|
|
265
|
+
persists across restarts and drops the queue when the PR closes.
|
|
183
266
|
|
|
184
|
-
|
|
267
|
+
## Test with replay
|
|
185
268
|
|
|
186
|
-
|
|
187
|
-
[hillclimbing](../hillclimbing.md). It reads a real PR with `gh api`,
|
|
188
|
-
synthesizes GitHub-shaped payloads, signs them when a secret is
|
|
189
|
-
configured, and POSTs them at the channel. Pull access is enough: no
|
|
190
|
-
admin, and an env `GITHUB_TOKEN` is fine here. The same input produces
|
|
191
|
-
the same delivery.
|
|
269
|
+
The AgentSDK makes it convenient for you to replay a PR you can read.
|
|
192
270
|
|
|
193
271
|
```bash
|
|
194
|
-
|
|
195
|
-
agent-sdk github replay https://github.com/owner/repo/pull/123 --dir .
|
|
272
|
+
agent-sdk github replay https://github.com/acme/checkout/pull/42 --dir . --action opened
|
|
196
273
|
|
|
197
274
|
# Replay everything the channel listens for, with CI failing
|
|
198
|
-
agent-sdk github replay
|
|
275
|
+
agent-sdk github replay acme/checkout#42 --dir . --events '*' --conclusion failure
|
|
199
276
|
|
|
200
|
-
#
|
|
201
|
-
agent-sdk github replay
|
|
277
|
+
# Snapshot payloads as fixtures instead of POSTing
|
|
278
|
+
agent-sdk github replay acme/checkout#42 --dir . --events '*' --dry-run --out fixtures/github
|
|
202
279
|
```
|
|
203
280
|
|
|
204
|
-
|
|
205
|
-
declares and the CLI can synthesize. `--action`, `--conclusion`, `--comment`,
|
|
206
|
-
and `--context` shape each event. `--secret` or `GITHUB_WEBHOOK_SECRET` signs
|
|
207
|
-
them.
|
|
208
|
-
|
|
209
|
-
## Receive webhooks directly
|
|
210
|
-
|
|
211
|
-
Most hosts should pull events from Cursor instead. Use the HTTP channel
|
|
212
|
-
route when you already terminate GitHub webhooks yourself, or when you
|
|
213
|
-
are POSTing fixtures and replay locally.
|
|
214
|
-
|
|
215
|
-
With a webhook secret configured, the route admits everyone
|
|
216
|
-
(`allowAll()`) and the channel verifies `X-Hub-Signature-256` before
|
|
217
|
-
parsing. The HMAC becomes the request principal. Without a secret, the
|
|
218
|
-
route is loopback-only. The exception is `serve --dev`, which admits
|
|
219
|
-
unsigned loopback deliveries so fixtures and replay work with zero
|
|
220
|
-
config. Non-dev targets that accept real GitHub POSTs always need the
|
|
221
|
-
secret, and the same value must live on the server and on whatever signs
|
|
222
|
-
deliveries.
|
|
223
|
-
|
|
224
|
-
## Handle high event volume
|
|
225
|
-
|
|
226
|
-
These patterns come from running a PR agent against real traffic:
|
|
227
|
-
|
|
228
|
-
- Debounce per PR (~3 seconds, latest event wins), and re-buffer while
|
|
229
|
-
CI settles. Skip a flush when a turn for that PR is already running.
|
|
230
|
-
- Persist the buffer in `host.kv` before you acknowledge a wake, and
|
|
231
|
-
restore it on channel start. A restart must not drop buffered wakes.
|
|
232
|
-
- Key sessions with a stable continuation token (`pr:owner/repo#N`) so
|
|
233
|
-
every wake resumes the PR's conversation.
|
|
234
|
-
- Keep payload details out of wake prompts. Send a generic "re-check
|
|
235
|
-
the PR" and let the agent re-read source of truth instead of trusting a
|
|
236
|
-
stale snapshot.
|
|
237
|
-
- Cancel PR-scoped reminders on `pull_request.closed`.
|
|
238
|
-
- Decide explicitly which repos the agent may act on. Without an
|
|
239
|
-
allowlist the channel wakes for whatever deliveries reach it, and
|
|
240
|
-
every wake spends real model budget.
|
|
241
|
-
|
|
242
|
-
## Show PR progress
|
|
243
|
-
|
|
244
|
-
Autofix-style agents need a deterministic merge-box check and a sticky
|
|
245
|
-
PR comment that converges when the turn ends. Configure that on the
|
|
246
|
-
channel with `progress.commitStatus` and `progress.banner`. A hook can
|
|
247
|
-
read and write `ctx.host.kv` and `ctx.host.files` after a turn. Use
|
|
248
|
-
that for derived state. Keep GitHub check-run and banner writes on the
|
|
249
|
-
channel.
|
|
281
|
+
## Practices
|
|
250
282
|
|
|
251
|
-
|
|
252
|
-
|
|
283
|
+
- Re-read GitHub in the turn or a tool. Do not stuff the event payload
|
|
284
|
+
into the prompt.
|
|
285
|
+
|
|
286
|
+
- Set `botName` so replies do not re-wake the agent.
|
|
287
|
+
|
|
288
|
+
- Watch an explicit repo list (`cursorAccount.repos`). Repos under one
|
|
289
|
+
channel must share one GitHub owner.
|
|
290
|
+
|
|
291
|
+
- Cancel leftover work on `pull_request.closed`.
|
|
253
292
|
|
|
293
|
+
|
|
294
|
+
## Other hosts
|
|
295
|
+
|
|
296
|
+
The same hooks work on GitHub Enterprise Server. Point the channel at
|
|
297
|
+
your server and add a repo webhook:
|
|
298
|
+
|
|
299
|
+
```ts
|
|
254
300
|
export default githubChannel({
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
progress: {
|
|
258
|
-
reactions: false,
|
|
259
|
-
commitStatus: {
|
|
260
|
-
context: "autofix",
|
|
261
|
-
pending: "Autofix running",
|
|
262
|
-
success: "Autofix finished",
|
|
263
|
-
failure: "Autofix failed",
|
|
264
|
-
},
|
|
265
|
-
banner: {
|
|
266
|
-
pending: "Autofix running…",
|
|
267
|
-
success: "Autofix finished",
|
|
268
|
-
failure: "Autofix failed",
|
|
269
|
-
},
|
|
301
|
+
api: {
|
|
302
|
+
apiBaseUrl: "https://github.example.com/api/v3",
|
|
270
303
|
},
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
cursorAccount: {
|
|
275
|
-
repos: ["owner/repo"],
|
|
304
|
+
credentials: {
|
|
305
|
+
token: () => process.env.GITHUB_TOKEN,
|
|
306
|
+
webhookSecret: () => process.env.GITHUB_WEBHOOK_SECRET,
|
|
276
307
|
},
|
|
277
|
-
onPullRequest: (ctx, pr) =>
|
|
278
|
-
pr.action === "opened" ? { auth: defaultGitHubAuth(ctx) } : null,
|
|
279
308
|
});
|
|
280
309
|
```
|
|
281
310
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
| `turn.started` | `in_progress` | create (or keep) the sticky comment |
|
|
287
|
-
| `turn.completed` | `completed` / `success` | PATCH the same comment |
|
|
288
|
-
| `turn.failed` / `session.failed` | `completed` / `failure` | PATCH the same comment |
|
|
289
|
-
|
|
290
|
-
Omit `commitStatus` / `banner`, or set them to `false`, to keep today's
|
|
291
|
-
behavior. Reactions still default on; set `reactions: false` when the
|
|
292
|
-
eyes emoji is noise. Descriptions are optional; defaults derive from
|
|
293
|
-
`botName` or the check `context`.
|
|
294
|
-
|
|
295
|
-
To match dashboard automations, set `detailsUrl(sessionId)`,
|
|
296
|
-
`summaryLinkText: "View agent"`, and `outputTitle: "context"` so the
|
|
297
|
-
check title is the check name, the summary includes `[View agent](…)`,
|
|
298
|
-
and Details opens the session.
|
|
299
|
-
|
|
300
|
-
A comment-only first wake has no head SHA, so the check waits for a
|
|
301
|
-
PR or CI event. The banner still posts. A later turn on the same SHA
|
|
302
|
-
creates a new check run; GitHub cannot reopen a completed run.
|
|
311
|
+
Add a repository webhook for
|
|
312
|
+
`https://<your-host>/<slug>/v1/channels/github` with the same secret.
|
|
313
|
+
Event pull and `github replay` target GitHub.com, so test Enterprise
|
|
314
|
+
Server with saved fixtures.
|
|
303
315
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
`progress.reactions` composition today).
|
|
316
|
+
Prefer event pull on github.com. Use the channel route directly when
|
|
317
|
+
you already terminate GitHub webhooks yourself. Set a webhook secret on
|
|
318
|
+
both sides. The [Webhooks guide](./webhooks.md) covers the shared
|
|
319
|
+
mechanism.
|
|
309
320
|
|
|
310
321
|
## Related
|
|
311
322
|
|
|
312
|
-
- [
|
|
313
|
-
|
|
323
|
+
- [Build a PR reviewer](../quickstart.md): the full read and write
|
|
324
|
+
loop, one step at a time
|
|
325
|
+
- [PR autofixer](../templates/pr-autofixer.md): push fixes and show
|
|
326
|
+
progress on the PR
|
|
327
|
+
- [Webhooks and custom channels](./webhooks.md): the HTTP mechanism
|
|
328
|
+
under this pack
|
|
314
329
|
- [Evals](../evals.md): turn replay snapshots into regression fixtures
|
|
315
|
-
- [
|
|
316
|
-
|
|
330
|
+
- [`skills/github/SKILL.md`](../../skills/github/SKILL.md): the companion
|
|
331
|
+
skill for coding agents
|