@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,59 +1,48 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Agent-to-agent"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Let one Agent SDK agent consult an independent specialist, continue its session, or call its deterministic tools."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent-to-agent
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Use a [subagent](../reference/subagents.md) to split one job into roles
|
|
14
|
-
inside a single agent. Use a peer when the specialist is a full agent
|
|
15
|
-
you would run on its own.
|
|
16
|
-
|
|
17
|
-
| | Subagent (`agent/subagents/<id>/`) | Peer (`defineConnection({ agent })`) |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| Runs as | a child of this agent | an agent on the same host |
|
|
20
|
-
| Tools, MCP connections, sessions | the parent's | its own |
|
|
21
|
-
| Who can reach it | only the parent | other agents, MCP clients, its playground |
|
|
8
|
+
A peer connection lets one agent ask another agent on the same host for
|
|
9
|
+
help. The specialist keeps its own instructions, tools, and session,
|
|
10
|
+
while the caller decides when to delegate and returns the answer to the
|
|
11
|
+
user.
|
|
22
12
|
|
|
23
13
|
## How do I wire two agents?
|
|
24
14
|
|
|
25
|
-
Put both projects
|
|
15
|
+
Put both projects under one directory, then point the concierge at the
|
|
16
|
+
specialist's mount slug. When a user asks about weather, the concierge
|
|
17
|
+
calls the peer's `ask` tool, the weather agent runs in its own context,
|
|
18
|
+
and the concierge returns that answer.
|
|
26
19
|
|
|
27
|
-
```
|
|
20
|
+
```text
|
|
28
21
|
agents/
|
|
29
22
|
concierge/
|
|
30
23
|
agent/instructions.md
|
|
31
24
|
agent/mcp-connections/weather.ts
|
|
32
25
|
weather-agent/
|
|
26
|
+
agent/agent.ts
|
|
33
27
|
agent/instructions.md
|
|
34
28
|
```
|
|
35
29
|
|
|
36
|
-
`weather-agent` is a normal Agent SDK project. On the concierge, add a
|
|
37
|
-
connection. Set `agent` to the peer's slug, which is its directory
|
|
38
|
-
name:
|
|
39
|
-
|
|
40
30
|
```ts
|
|
41
31
|
// agents/concierge/agent/mcp-connections/weather.ts
|
|
42
32
|
import { defineConnection } from "@cursor/july/connections";
|
|
43
33
|
|
|
44
34
|
export default defineConnection({
|
|
45
35
|
agent: "weather-agent",
|
|
46
|
-
description: "Delegate weather questions to the weather
|
|
36
|
+
description: "Delegate weather questions to the weather specialist.",
|
|
47
37
|
});
|
|
48
38
|
```
|
|
49
39
|
|
|
50
|
-
|
|
51
|
-
under `weather`. See
|
|
52
|
-
[HTTP API](../reference/http-api.md#mcp-endpoint) for the MCP tools.
|
|
40
|
+
Give the concierge a narrow routing rule:
|
|
53
41
|
|
|
54
|
-
|
|
55
|
-
needs weather, ask the `weather` peer.
|
|
56
|
-
|
|
42
|
+
```md
|
|
43
|
+
When a request needs current weather, ask the `weather` peer. Return its
|
|
44
|
+
answer without delegating the same request again.
|
|
45
|
+
```
|
|
57
46
|
|
|
58
47
|
```bash
|
|
59
48
|
agent-sdk dev ./agents
|
|
@@ -61,15 +50,103 @@ agent-sdk chat --url http://127.0.0.1:3000/concierge \
|
|
|
61
50
|
--message "What's the weather in Paris right now?"
|
|
62
51
|
```
|
|
63
52
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
The connection filename becomes the MCP server name. The `agent` value
|
|
54
|
+
is the specialist's mount slug, normally its directory name.
|
|
55
|
+
|
|
56
|
+
## Continue the specialist's conversation
|
|
57
|
+
|
|
58
|
+
The first `ask` returns a peer `sessionId`. Pass that ID into the next
|
|
59
|
+
`ask` when the specialist should remember its earlier work instead of
|
|
60
|
+
starting with fresh context.
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"message": "How does that compare with tomorrow?",
|
|
65
|
+
"sessionId": "<session-id>"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The peer owns this session. Follow-ups resume its instructions and tool
|
|
70
|
+
history without merging them into the concierge's conversation.
|
|
71
|
+
|
|
72
|
+
## Wait for long-running specialist work
|
|
73
|
+
|
|
74
|
+
`ask` waits for a bounded time. If the specialist is still working, it
|
|
75
|
+
returns `status: "running"` with the session ID, allowing the caller to
|
|
76
|
+
do other work and check again later.
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"sessionId": "<session-id>",
|
|
81
|
+
"waitSeconds": 20
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Call the peer's `check` tool with that input. It returns the final reply
|
|
86
|
+
when the turn settles, or another running status when more time is
|
|
87
|
+
needed.
|
|
88
|
+
|
|
89
|
+
## Call a deterministic peer tool
|
|
90
|
+
|
|
91
|
+
When the specialist has a server tool and no second model turn should
|
|
92
|
+
make a decision, call its `call_tool` endpoint through the peer
|
|
93
|
+
connection. This example runs `get_forecast` in the weather agent's
|
|
94
|
+
workspace and returns its structured result to the concierge tool.
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
const result = await ctx.host.mcp.callTool("weather", "call_tool", {
|
|
98
|
+
toolName: "get_forecast",
|
|
99
|
+
input: { city: "Paris" },
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
ok: result.isError !== true,
|
|
104
|
+
forecast: result.structuredContent ?? null,
|
|
105
|
+
};
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`call_tool` appears only when the peer declares at least one
|
|
109
|
+
deterministic server tool.
|
|
110
|
+
|
|
111
|
+
## Peer or subagent?
|
|
112
|
+
|
|
113
|
+
Use a [subagent](../reference/subagents.md) to split one agent's job
|
|
114
|
+
into roles that share its project. Use a peer when the specialist is a
|
|
115
|
+
complete agent you would also run, inspect, or expose on its own.
|
|
116
|
+
|
|
117
|
+
| | Subagent | Peer |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| Context | Child role inside one agent | Independent agent and session |
|
|
120
|
+
| Tools and connections | Inherits the parent project | Owns its project surface |
|
|
121
|
+
| Reachability | Parent only | Other co-hosted agents and MCP clients |
|
|
122
|
+
|
|
123
|
+
## Peer sessions
|
|
124
|
+
|
|
125
|
+
Calls through `ask` create sessions on the peer's `mcp` channel. They
|
|
126
|
+
use the caller's authenticated principal and appear in the peer's
|
|
127
|
+
playground, so the same authorization boundary applies to starts,
|
|
128
|
+
follow-ups, and checks.
|
|
129
|
+
|
|
130
|
+
There is no automatic recursion guard between peers. Give each caller a
|
|
131
|
+
one-way routing rule so agent A cannot delegate the same work to B and
|
|
132
|
+
receive it back from B.
|
|
133
|
+
|
|
134
|
+
## Run peers on one host
|
|
135
|
+
|
|
136
|
+
Peers require the default multi-agent layout and one shared `serve`
|
|
137
|
+
process. Unknown slugs and self-references fail at startup.
|
|
138
|
+
Cursor-managed hosting deploys one agent per slug, so use subagents
|
|
139
|
+
there instead of peer connections.
|
|
67
140
|
|
|
68
|
-
|
|
69
|
-
|
|
141
|
+
For a self-hosted cloud-runtime caller, expose the shared process with
|
|
142
|
+
`--public-url` and protect it with `--bearer-token`. The
|
|
143
|
+
[Deployment guide](../deployment.md) owns that hosting setup.
|
|
70
144
|
|
|
71
|
-
##
|
|
145
|
+
## Related
|
|
72
146
|
|
|
73
|
-
- [MCP connections](../reference/connections.md#peer-mcp-connection):
|
|
147
|
+
- [MCP connections](../reference/connections.md#peer-mcp-connection):
|
|
148
|
+
peer configuration and connection naming
|
|
149
|
+
- [MCP endpoint](../reference/http-api.md#mcp-endpoint): exact `ask`,
|
|
150
|
+
`check`, and `call_tool` schemas
|
|
74
151
|
- [Subagents](../reference/subagents.md): specialists inside one agent
|
|
75
|
-
- [
|
|
152
|
+
- [Deployment](../deployment.md): secure shared-host setup
|
package/docs/guides/bitbucket.md
CHANGED
|
@@ -1,89 +1,290 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Bitbucket"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Review pull requests, answer comments, and triage pushes on Bitbucket Cloud or Data Center."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Bitbucket agents
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
A Bitbucket agent wakes from a verified repository event, reads the
|
|
9
|
+
current pull-request or commit state, and writes the result back to
|
|
10
|
+
Bitbucket. `bitbucketChannel()` gives the same hooks and normalized
|
|
11
|
+
payloads on Bitbucket Cloud and Data Center.
|
|
11
12
|
|
|
12
|
-
##
|
|
13
|
+
## Review a pull request
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
Creating a pull request, or pushing new commits to a Data Center pull
|
|
16
|
+
request, starts a review. The hook reads the current diff through the
|
|
17
|
+
repository-bound API, the model returns a verdict, and the completed
|
|
18
|
+
answer appears as a comment on the pull request.
|
|
15
19
|
|
|
16
20
|
```ts
|
|
17
|
-
|
|
21
|
+
// agent/channels/bitbucket.ts
|
|
22
|
+
import {
|
|
23
|
+
bitbucketChannel,
|
|
24
|
+
bitbucketChannelStateForEvent,
|
|
25
|
+
defaultBitbucketAuth,
|
|
26
|
+
} from "@cursor/july/channels/bitbucket";
|
|
27
|
+
import {
|
|
28
|
+
postPullRequestComment,
|
|
29
|
+
setPushTriageStatus,
|
|
30
|
+
} from "../lib/bitbucket.js";
|
|
18
31
|
|
|
19
|
-
export default bitbucketChannel({
|
|
32
|
+
export default bitbucketChannel({
|
|
33
|
+
repos: ["acme/widgets"],
|
|
34
|
+
onPullRequest: async (ctx, pullRequest) => {
|
|
35
|
+
if (pullRequest.draft) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const hasNewCommits =
|
|
39
|
+
pullRequest.action === "updated" &&
|
|
40
|
+
pullRequest.previousHeadSha !== undefined &&
|
|
41
|
+
pullRequest.previousHeadSha !== pullRequest.headSha;
|
|
42
|
+
if (pullRequest.action !== "created" && !hasNewCommits) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const diff = await ctx.bitbucket.api.getPullRequestDiff(pullRequest.id);
|
|
47
|
+
return {
|
|
48
|
+
// `auth` starts a model turn running as the event sender.
|
|
49
|
+
auth: defaultBitbucketAuth(ctx),
|
|
50
|
+
message: `Review ${ctx.repository.fullName}#${pullRequest.id}.`,
|
|
51
|
+
context: [`<bitbucket_diff>${diff}</bitbucket_diff>`],
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
events: {
|
|
55
|
+
async "message.completed"(event, channel, ctx) {
|
|
56
|
+
if (ctx.session.purpose === "eval") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (event.data.finishReason === "tool_call" || event.data.text === "") {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const pullRequestId = channel.state.pullRequestId;
|
|
63
|
+
if (
|
|
64
|
+
!channel.state.eventType?.startsWith("pullrequest:") ||
|
|
65
|
+
pullRequestId === null
|
|
66
|
+
) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
await postPullRequestComment(
|
|
70
|
+
channel.state,
|
|
71
|
+
pullRequestId,
|
|
72
|
+
event.data.text
|
|
73
|
+
);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
});
|
|
20
77
|
```
|
|
21
78
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
79
|
+
`postPullRequestComment` is a small wrapper around the normalized
|
|
80
|
+
Bitbucket API. Configure it with the same token and API base described
|
|
81
|
+
under [Connect](#connect). It takes the repository and PR ID from the
|
|
82
|
+
verified event state, so the model never chooses where its review is
|
|
83
|
+
posted.
|
|
27
84
|
|
|
28
|
-
|
|
29
|
-
posted by the agent from triggering another turn.
|
|
85
|
+
## Answer a pull-request comment
|
|
30
86
|
|
|
31
|
-
`
|
|
32
|
-
|
|
33
|
-
|
|
87
|
+
Mentioning `@cursor-reviewer` in a PR comment resumes that pull
|
|
88
|
+
request's conversation, and the first example's reply sink posts the
|
|
89
|
+
answer back to the same PR. The author guard ignores comments written
|
|
90
|
+
by the agent, preventing each reply from starting another turn.
|
|
34
91
|
|
|
35
|
-
|
|
92
|
+
```ts
|
|
93
|
+
const AGENT_USERNAME = "cursor-reviewer";
|
|
36
94
|
|
|
37
|
-
|
|
95
|
+
onPullRequestComment: (ctx, comment) => {
|
|
96
|
+
if (comment.author?.username === AGENT_USERNAME) {
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
if (!comment.body.includes(`@${AGENT_USERNAME}`)) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
auth: defaultBitbucketAuth(ctx),
|
|
104
|
+
message: comment.body,
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
```
|
|
38
108
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
109
|
+
Add this property to the same `bitbucketChannel()` declaration as the
|
|
110
|
+
review handler.
|
|
111
|
+
|
|
112
|
+
## Triage a push to `main`
|
|
113
|
+
|
|
114
|
+
A push to `main` immediately adds a running `cursor/push-triage` build
|
|
115
|
+
status to the new commit. The webhook is acknowledged while the model
|
|
116
|
+
investigates, then the status reports whether that triage turn
|
|
117
|
+
completed.
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
onPush: (ctx, push) => {
|
|
121
|
+
const change = push.changes.find(
|
|
122
|
+
candidate =>
|
|
123
|
+
candidate.name === "main" && candidate.after !== undefined
|
|
124
|
+
);
|
|
125
|
+
if (change?.after === undefined) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const sha = change.after;
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
// `task` runs this host sequence after the webhook is acknowledged.
|
|
132
|
+
task: async ({ send }) => {
|
|
133
|
+
await ctx.bitbucket.setBuildStatus({
|
|
134
|
+
sha,
|
|
135
|
+
key: "cursor/push-triage",
|
|
136
|
+
state: "INPROGRESS",
|
|
137
|
+
name: "Cursor push triage",
|
|
138
|
+
description: "Investigating push to main",
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
await send(`Triage push ${sha} on ${ctx.repository.fullName}.`, {
|
|
142
|
+
auth: defaultBitbucketAuth(ctx),
|
|
143
|
+
title: `Bitbucket push ${sha}`,
|
|
144
|
+
state: {
|
|
145
|
+
...bitbucketChannelStateForEvent({
|
|
146
|
+
repository: ctx.repository,
|
|
147
|
+
headSha: sha,
|
|
148
|
+
eventType: ctx.eventType,
|
|
149
|
+
}),
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Extend the `events` map so the turn's terminal event concludes the
|
|
158
|
+
status through the same provider wrapper:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
async "message.completed"(event, channel, ctx) {
|
|
162
|
+
if (
|
|
163
|
+
ctx.session.purpose !== "eval" &&
|
|
164
|
+
channel.state.eventType === "repo:push" &&
|
|
165
|
+
channel.state.headSha !== null &&
|
|
166
|
+
event.data.finishReason !== "tool_call"
|
|
167
|
+
) {
|
|
168
|
+
await setPushTriageStatus(
|
|
169
|
+
channel.state,
|
|
170
|
+
"SUCCESSFUL",
|
|
171
|
+
"Push triage complete"
|
|
172
|
+
);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Continue with the pull-request reply branch from the first example.
|
|
177
|
+
},
|
|
178
|
+
async "turn.failed"(_event, channel, ctx) {
|
|
179
|
+
if (
|
|
180
|
+
ctx.session.purpose === "eval" ||
|
|
181
|
+
channel.state.eventType !== "repo:push" ||
|
|
182
|
+
channel.state.headSha === null
|
|
183
|
+
) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
await setPushTriageStatus(
|
|
187
|
+
channel.state,
|
|
188
|
+
"FAILED",
|
|
189
|
+
"Push triage failed"
|
|
190
|
+
);
|
|
191
|
+
},
|
|
42
192
|
```
|
|
43
193
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
194
|
+
This status reports the triage run, not the health of the pushed commit
|
|
195
|
+
itself.
|
|
196
|
+
|
|
197
|
+
## Events
|
|
198
|
+
|
|
199
|
+
Use `onPullRequest`, `onPullRequestComment`, or `onPush` for the events
|
|
200
|
+
shown above. Each hook returns one of three decisions:
|
|
201
|
+
|
|
202
|
+
| Return | What happens |
|
|
203
|
+
| --- | --- |
|
|
204
|
+
| `{ auth }` | Start a model turn as the Bitbucket event sender |
|
|
205
|
+
| `{ task }` | Acknowledge the webhook, then run host code that may also call `send` |
|
|
206
|
+
| `null` | Skip the event |
|
|
207
|
+
|
|
208
|
+
The [Channels reference](../reference/channels.md) covers the remaining
|
|
209
|
+
hook and session behavior.
|
|
48
210
|
|
|
49
|
-
|
|
50
|
-
|
|
211
|
+
## Pull-request affinity
|
|
212
|
+
|
|
213
|
+
Every pull-request event and comment for the same repository and PR ID
|
|
214
|
+
resumes one agent session. A new PR, later commits, and a mention in the
|
|
215
|
+
discussion therefore share the same conversation across both Bitbucket
|
|
216
|
+
dialects.
|
|
217
|
+
|
|
218
|
+
## Call Bitbucket through `ctx.bitbucket`
|
|
219
|
+
|
|
220
|
+
Each hook receives an API client already bound to the repository and
|
|
221
|
+
dialect from the verified delivery. Use `ctx.bitbucket.api` for
|
|
222
|
+
pull-request reads and comments, `setBuildStatus()` for one status
|
|
223
|
+
update, or `createCheck()` when a status changes throughout longer
|
|
224
|
+
work.
|
|
225
|
+
|
|
226
|
+
The repository does not come from model output. Keep API calls on this
|
|
227
|
+
bound client so the event decides where reads and writes go.
|
|
228
|
+
|
|
229
|
+
## Connect
|
|
230
|
+
|
|
231
|
+
On Cursor-managed hosting, use the signed-in Cursor account and list
|
|
232
|
+
the repositories that may wake the agent:
|
|
233
|
+
|
|
234
|
+
```ts
|
|
235
|
+
export default bitbucketChannel({
|
|
236
|
+
cursorAccount: {
|
|
237
|
+
repos: ["acme/widgets"],
|
|
238
|
+
},
|
|
239
|
+
});
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
`cursorAccount` covers event delivery and API calls made through
|
|
243
|
+
`ctx.bitbucket` inside hooks. The `postPullRequestComment` and
|
|
244
|
+
`setPushTriageStatus` wrappers are separate REST clients, so configure
|
|
245
|
+
their Bitbucket API credential too.
|
|
246
|
+
|
|
247
|
+
For direct webhooks, configure the repository hook secret, API token,
|
|
248
|
+
and allowed repositories. Data Center also needs its REST API base:
|
|
51
249
|
|
|
52
250
|
```ts
|
|
53
251
|
export default bitbucketChannel({
|
|
54
|
-
apiBaseUrl: "https://bitbucket.example.com/rest/api/1.0",
|
|
55
252
|
repos: ["PLATFORM/api"],
|
|
253
|
+
webhookSecret: () => process.env.BITBUCKET_WEBHOOK_SECRET,
|
|
254
|
+
token: () => process.env.BITBUCKET_TOKEN ?? "",
|
|
255
|
+
apiBaseUrl: "https://bitbucket.example.com/rest/api/1.0",
|
|
56
256
|
});
|
|
57
257
|
```
|
|
58
258
|
|
|
59
|
-
|
|
259
|
+
Without `webhookSecret`, the direct production route stays
|
|
260
|
+
loopback-only. Setting it admits deliveries signed with the matching
|
|
261
|
+
repository-hook secret; `token` authorizes the API reads and writes in
|
|
262
|
+
the examples.
|
|
263
|
+
|
|
264
|
+
Register the repository webhook at
|
|
265
|
+
`https://<your-host>/<slug>/v1/channels/bitbucket` with the same secret.
|
|
266
|
+
For Bitbucket Cloud, omit `apiBaseUrl`.
|
|
60
267
|
|
|
61
268
|
## Test locally
|
|
62
269
|
|
|
63
|
-
|
|
270
|
+
Replay lets you exercise the same hooks with a pull request you can
|
|
271
|
+
read before registering a live repository webhook.
|
|
64
272
|
|
|
65
273
|
```bash
|
|
66
274
|
agent-sdk dev
|
|
67
275
|
agent-sdk bitbucket replay \
|
|
68
|
-
https://bitbucket.example.com/projects/PLATFORM/repos/api/pull-requests/42
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
Replay supports Bitbucket Cloud and Data Center URLs. `BITBUCKET_TOKEN` needs
|
|
72
|
-
pull request read access. The command reads the pull request, creates a payload
|
|
73
|
-
in the matching dialect, and sends it through the same channel route. Use
|
|
74
|
-
`--events '*'` to replay the supported events declared by the channel. Use
|
|
75
|
-
`--dry-run --out fixtures/bitbucket` to save fixtures.
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
agent-sdk bitbucket events --dir .
|
|
79
|
-
agent-sdk bitbucket forward --dir .
|
|
276
|
+
https://bitbucket.example.com/projects/PLATFORM/repos/api/pull-requests/42 \
|
|
277
|
+
--events '*'
|
|
80
278
|
```
|
|
81
279
|
|
|
82
|
-
|
|
83
|
-
|
|
280
|
+
Use `--dry-run --out fixtures/bitbucket` to save the payloads instead of
|
|
281
|
+
posting them. `BITBUCKET_TOKEN` needs read access to the pull request.
|
|
84
282
|
|
|
85
283
|
## Related
|
|
86
284
|
|
|
87
|
-
- [Channels reference](../reference/channels.md)
|
|
88
|
-
|
|
89
|
-
- [
|
|
285
|
+
- [Channels reference](../reference/channels.md): channel hooks,
|
|
286
|
+
dispatch decisions, and session behavior
|
|
287
|
+
- [Webhooks and custom channels](./webhooks.md): direct webhook auth
|
|
288
|
+
and reply delivery
|
|
289
|
+
- [Evals](../evals.md): turn saved Bitbucket payloads into regression
|
|
290
|
+
fixtures
|