@cursor/july 0.1.111 → 0.1.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/bin/agent-serve.js +20 -4
- package/dist/channels/checks.d.ts +10 -0
- package/dist/channels/checks.d.ts.map +1 -1
- package/dist/channels/github/github-channel.d.ts +29 -19
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +29 -19
- package/dist/channels/origin/checks.d.ts +1 -1
- package/dist/channels/origin/checks.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.js +2 -0
- package/dist/channels/slack/dispatch.d.ts +11 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +146 -39
- package/dist/channels/slack/placeholder.d.ts +26 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -1
- package/dist/channels/slack/placeholder.js +28 -0
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +9 -16
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.Drol6mi6.js → app.CAeK13eM.js} +4 -4
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.js +9 -0
- package/dist/docs/assets/building-with-agents.md.BBCx0AUo.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.Ck9E52Ls.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.CdqoBZJX.js → VPLocalSearchBox.C9LbPHod.js} +1 -1
- package/dist/docs/assets/chunks/{arc.BVX3ycTn.js → arc.CmMq2zmS.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CcChnMxX.js → architectureDiagram-Q4EWVU46.CCXB8Uj5.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.xwtXO-yt.js → baseUniq.CyQo6eLe.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.CijZ_taK.js → blockDiagram-DXYQGD6D.JYq6w91N.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.0FBvwBvK.js → c4Diagram-AHTNJAMY.BRV8GPJJ.js} +1 -1
- package/dist/docs/assets/chunks/channel.BHiYmnZ4.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CELMmMDA.js → chunk-4BX2VUAB.Bv4ooYQR.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.C4bhFtSm.js → chunk-4TB4RGXK.t4JtKPcj.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.ZnQ9gRRQ.js → chunk-55IACEB6.34lCHj9Y.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DPlmglG-.js → chunk-EDXVE4YY.BSwrPNrt.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BrUk8pff.js → chunk-FMBD7UC4.Beeun-R-.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CcmWIncu.js → chunk-OYMX7WX6.BUUFUcJc.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.D65-cs8I.js → chunk-QZHKN3VN.B2XjHzN_.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.qoXZpG9F.js → chunk-YZCP3GAM.CLYG8znk.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.Degh8l90.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.Degh8l90.js +1 -0
- package/dist/docs/assets/chunks/clone.BIywbczV.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.8rYtqudO.js → cose-bilkent-S5V4N54A.DVEa6fZp.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DrRP1fOh.js → dagre-KV5264BT.C9PZQK-S.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.DHj_xA2_.js → diagram-5BDNPKRD.DoN0uv3Y.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Bz_6nAKj.js → diagram-G4DWMVQ6.Czv3duqx.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BWA0xSW9.js → diagram-MMDJMWI5.BinJ5kWb.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.CpTJLNJI.js → diagram-TYMM5635.DW326M4K.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.-7AWWSrP.js → erDiagram-SMLLAGMA.U2pR_OA7.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.BTnQ742_.js → flowDiagram-DWJPFMVM.ByWJXeYK.js} +1 -1
- package/dist/docs/assets/chunks/framework.BNw1pucY.js +19 -0
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.B5_HiiQ5.js → ganttDiagram-T4ZO3ILL.OquF0Rtg.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CZcNTFZd.js → gitGraphDiagram-UUTBAWPF.Bpn01P7X.js} +1 -1
- package/dist/docs/assets/chunks/{graph.V2GLaab4.js → graph.CNRB6ETL.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.7pZOkCCU.js → infoDiagram-42DDH7IO.CqhknMWi.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DSMo3Qa3.js → ishikawaDiagram-UXIWVN3A.C6xpR2af.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BNEgWN1S.js → journeyDiagram-VCZTEJTY.Cg5f7oB3.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.B-4d4tC7.js → kanban-definition-6JOO6SKY.Cx9YTwlU.js} +1 -1
- package/dist/docs/assets/chunks/{layout.Dvbn9nSb.js → layout.ljS-wFtK.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D2GM4p4b.js → linear.jSxNrsFC.js} +1 -1
- package/dist/docs/assets/chunks/{min.DVBtLK-B.js → min.Cum8AlQw.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.CnJRI55x.js → mindmap-definition-QFDTVHPH.BLiysLpe.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.CtoaTFlA.js → pieDiagram-DEJITSTG.BoIDyuKF.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DtT24_vN.js → quadrantDiagram-34T5L4WZ.DLkpDytR.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.CjSO4o8f.js → requirementDiagram-MS252O5E.DqTVqSu2.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.-wWiIVWa.js → sankeyDiagram-XADWPNL6.CG_6FF7j.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DSk8s4gX.js → sequenceDiagram-FGHM5R23.BIp9602K.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BFKAsdkN.js → stateDiagram-FHFEXIEX.COSXsD9I.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.qrxrbFsX.js +1 -0
- package/dist/docs/assets/chunks/{theme.C0MctGaz.js → theme.CXJ7PNwy.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.TUNJbAFe.js → timeline-definition-GMOUNBTQ.CXdVqkLq.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.C-RGNnk4.js → vennDiagram-DHZGUBPP.CZxGuc4r.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.g5efOWmT.js → wardley-RL74JXVD.3oVgfqQk.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DH4zt73Y.js → wardleyDiagram-NUSXRM2D.6_irCgGJ.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B-3k6bF6.js → xychartDiagram-5P7HB3ND.TRPe92m3.js} +1 -1
- package/dist/docs/assets/deployment.md.D2jQZuFx.js +32 -0
- package/dist/docs/assets/deployment.md.D2jQZuFx.lean.js +1 -0
- package/dist/docs/assets/evals.md.D3Y3Aixt.js +72 -0
- package/dist/docs/assets/evals.md.D3Y3Aixt.lean.js +1 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.js +41 -0
- package/dist/docs/assets/guides_agent-to-agent.md.CD4T5FIl.lean.js +1 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.js +145 -0
- package/dist/docs/assets/guides_bitbucket.md.mpevW-VP.lean.js +1 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.js +15 -0
- package/dist/docs/assets/guides_cloud-agents.md.Cp1O3u-X.lean.js +1 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.js +43 -0
- package/dist/docs/assets/guides_convert-automation.md.CqEyfP6Y.lean.js +1 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.js +156 -0
- package/dist/docs/assets/guides_github.md.BwpBp3ed.lean.js +1 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.js +153 -0
- package/dist/docs/assets/guides_gitlab.md.DaEC3nMk.lean.js +1 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.js +16 -0
- package/dist/docs/assets/guides_grokbot-agents.md.CMhZNdEU.lean.js +1 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.js +22 -0
- package/dist/docs/assets/guides_improve.md.Bnp4F99w.lean.js +1 -0
- package/dist/docs/assets/guides_jev.md.F5fAkkfN.js +189 -0
- package/dist/docs/assets/guides_jev.md.F5fAkkfN.lean.js +1 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.js +50 -0
- package/dist/docs/assets/guides_mcp-oauth.md.bSFakfCY.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.js +35 -0
- package/dist/docs/assets/guides_opentelemetry.md.BKDxQmmd.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.js +70 -0
- package/dist/docs/assets/guides_slack.md.Bo96y42E.lean.js +1 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.js +92 -0
- package/dist/docs/assets/guides_webhooks.md.1A72_VEE.lean.js +1 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.js +7 -0
- package/dist/docs/assets/hillclimbing.md.D4E1o5Sa.lean.js +1 -0
- package/dist/docs/assets/{index.md.BFVyY2KT.js → index.md.C-t81M5J.js} +2 -2
- package/dist/docs/assets/{index.md.BFVyY2KT.lean.js → index.md.C-t81M5J.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.D3MjSZN-.js → quickstart.md.DAvVhuuU.js} +1 -1
- package/dist/docs/assets/{quickstart.md.D3MjSZN-.lean.js → quickstart.md.DAvVhuuU.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.js → reference_agent-config.md.DGPyw7ms.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.CfVA-LZJ.lean.js → reference_agent-config.md.DGPyw7ms.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.js → reference_artifacts.md.Bu_4HmsD.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.Vf7qyIZ-.lean.js → reference_artifacts.md.Bu_4HmsD.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.icqLKcTc.js → reference_channels.md.nFWbzAic.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.icqLKcTc.lean.js → reference_channels.md.nFWbzAic.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.B2dBL6L8.js → reference_cli.md.DLWDz9ij.js} +3 -1
- package/dist/docs/assets/{reference_cli.md.B2dBL6L8.lean.js → reference_cli.md.DLWDz9ij.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.js → reference_connections.md.Je9dMsdd.js} +2 -2
- package/dist/docs/assets/{reference_connections.md.Cb3U_c8n.lean.js → reference_connections.md.Je9dMsdd.lean.js} +1 -1
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.js +57 -0
- package/dist/docs/assets/reference_evals.md.DNJzM_yf.lean.js +1 -0
- package/dist/docs/assets/reference_extensions.md.Cv5aLCz_.js +58 -0
- package/dist/docs/assets/reference_extensions.md.Cv5aLCz_.lean.js +1 -0
- package/dist/docs/assets/{reference_hooks.md.CZuynAxj.js → reference_hooks.md.B7uzNENk.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.CZuynAxj.lean.js → reference_hooks.md.B7uzNENk.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.js → reference_http-api.md.CduHavZ2.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.DTKcYE6L.lean.js → reference_http-api.md.CduHavZ2.lean.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.D7gkckK-.js → reference_instructions.md.CU1My5My.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.D7gkckK-.lean.js → reference_instructions.md.CU1My5My.lean.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.D2YExv5K.js → reference_playground.md.Ch2d0Iqi.js} +1 -1
- package/dist/docs/assets/{reference_playground.md.D2YExv5K.lean.js → reference_playground.md.Ch2d0Iqi.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.js → reference_project-layout.md.BGhgpy9V.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.DPxbUJyt.lean.js → reference_project-layout.md.BGhgpy9V.lean.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.js → reference_prompt.md.Ccp0R53H.js} +1 -1
- package/dist/docs/assets/{reference_prompt.md.BQ5uAv1F.lean.js → reference_prompt.md.Ccp0R53H.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.BasfZWO-.js → reference_schedules.md.B2Nm6FaD.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.BasfZWO-.lean.js → reference_schedules.md.B2Nm6FaD.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.js → reference_sessions.md.1_6Vyv7x.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.YKvIsWAx.lean.js → reference_sessions.md.1_6Vyv7x.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.rNgpsGd0.js → reference_skills.md.DjQkRefx.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.rNgpsGd0.lean.js → reference_skills.md.DjQkRefx.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.e5qitjJt.js → reference_subagents.md.Dl16gcBj.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.e5qitjJt.lean.js → reference_subagents.md.Dl16gcBj.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.js → reference_tools.md.B1dH1lpa.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.BdCO2aHZ.lean.js → reference_tools.md.B1dH1lpa.lean.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.js → templates_agentic-owners.md.9M575F5C.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.Da_AGDlH.lean.js → templates_agentic-owners.md.9M575F5C.lean.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.js → templates_pr-autofixer.md.ws0DDXDy.js} +1 -1
- package/dist/docs/assets/{templates_pr-autofixer.md.DqxocIGh.lean.js → templates_pr-autofixer.md.ws0DDXDy.lean.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.js → templates_security-reviewer.md.KEFYXzfK.js} +1 -1
- package/dist/docs/assets/{templates_security-reviewer.md.Bhnvd8VE.lean.js → templates_security-reviewer.md.KEFYXzfK.lean.js} +1 -1
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.js +3 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.VNJ_mohX.lean.js +1 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.js +3 -0
- package/dist/docs/assets/templates_thermo-review.md.Hi3zWOkP.lean.js +1 -0
- package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.js → templates_triage.md.CVGe_FG6.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.BdBWO9Ic.lean.js → templates_triage.md.CVGe_FG6.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.js +1 -0
- package/dist/docs/assets/troubleshooting.md.mnfFG2Em.lean.js +1 -0
- package/dist/docs/building-with-agents.html +44 -48
- package/dist/docs/building-with-agents.md +94 -82
- package/dist/docs/deployment.html +59 -78
- package/dist/docs/deployment.md +117 -363
- package/dist/docs/evals.html +85 -224
- package/dist/docs/evals.md +149 -673
- package/dist/docs/guides/agent-to-agent.html +74 -47
- package/dist/docs/guides/agent-to-agent.md +128 -46
- package/dist/docs/guides/bitbucket.html +179 -44
- package/dist/docs/guides/bitbucket.md +249 -48
- package/dist/docs/guides/cloud-agents.html +46 -40
- package/dist/docs/guides/cloud-agents.md +119 -66
- package/dist/docs/guides/convert-automation.html +80 -49
- package/dist/docs/guides/convert-automation.md +156 -147
- package/dist/docs/guides/github.html +184 -92
- package/dist/docs/guides/github.md +260 -245
- package/dist/docs/guides/gitlab.html +184 -45
- package/dist/docs/guides/gitlab.md +249 -50
- package/dist/docs/guides/grokbot-agents.html +48 -41
- package/dist/docs/guides/grokbot-agents.md +99 -53
- package/dist/docs/guides/improve.html +48 -40
- package/dist/docs/guides/improve.md +111 -58
- package/dist/docs/guides/jev.html +248 -0
- package/dist/docs/guides/jev.md +348 -0
- package/dist/docs/guides/mcp-oauth.html +74 -52
- package/dist/docs/guides/mcp-oauth.md +111 -121
- package/dist/docs/guides/opentelemetry.html +63 -54
- package/dist/docs/guides/opentelemetry.md +96 -165
- package/dist/docs/guides/slack.html +83 -59
- package/dist/docs/guides/slack.md +157 -227
- package/dist/docs/guides/webhooks.html +97 -230
- package/dist/docs/guides/webhooks.md +154 -385
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +44 -38
- package/dist/docs/hillclimbing.md +101 -55
- package/dist/docs/index.html +38 -38
- package/dist/docs/index.md +2 -0
- package/dist/docs/llms-full.txt +3490 -3146
- package/dist/docs/llms.txt +22 -18
- package/dist/docs/quickstart.html +37 -37
- package/dist/docs/reference/agent-config.html +37 -37
- package/dist/docs/reference/artifacts.html +38 -38
- package/dist/docs/reference/channels.html +37 -37
- package/dist/docs/reference/cli.html +39 -37
- package/dist/docs/reference/cli.md +2 -0
- package/dist/docs/reference/connections.html +38 -38
- package/dist/docs/reference/connections.md +1 -1
- package/dist/docs/reference/evals.html +116 -0
- package/dist/docs/reference/evals.md +293 -0
- package/dist/docs/reference/extensions.html +80 -84
- package/dist/docs/reference/extensions.md +131 -202
- package/dist/docs/reference/hooks.html +39 -39
- package/dist/docs/reference/hooks.md +34 -34
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/instructions.html +37 -37
- package/dist/docs/reference/playground.html +37 -37
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/prompt.html +37 -37
- package/dist/docs/reference/schedules.html +37 -37
- package/dist/docs/reference/sessions.html +37 -37
- package/dist/docs/reference/skills.html +37 -37
- package/dist/docs/reference/subagents.html +38 -38
- package/dist/docs/reference/subagents.md +1 -1
- package/dist/docs/reference/tools.html +38 -38
- package/dist/docs/reference/tools.md +4 -0
- package/dist/docs/templates/agentic-owners.html +38 -38
- package/dist/docs/templates/pr-autofixer.html +37 -37
- package/dist/docs/templates/security-reviewer.html +38 -38
- package/dist/docs/templates/thermo-quality-review.html +62 -0
- package/dist/docs/templates/thermo-quality-review.md +75 -0
- package/dist/docs/templates/thermo-review.html +62 -0
- package/dist/docs/templates/thermo-review.md +74 -0
- package/dist/docs/templates/triage.html +37 -37
- package/dist/docs/troubleshooting.html +38 -38
- package/dist/docs/troubleshooting.md +97 -66
- package/dist/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/dist/extensions/improve/extension.d.ts +3 -1
- package/dist/extensions/improve/extension.d.ts.map +1 -1
- package/dist/extensions/improve/extension.js +4 -2
- package/dist/extensions/improve/skills/yourself.js +1 -1
- package/dist/extensions/jev/extension.d.ts +43 -0
- package/dist/extensions/jev/extension.d.ts.map +1 -0
- package/dist/extensions/jev/extension.js +47 -0
- package/dist/extensions/jev/lib/evaluate.d.ts +101 -0
- package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/lib/evaluate.js +167 -0
- package/dist/extensions/jev/skills/gated-write.md +25 -0
- package/dist/extensions/jev/skills/questions.md +33 -0
- package/dist/extensions/jev/tools/evaluate.d.ts +4 -0
- package/dist/extensions/jev/tools/evaluate.d.ts.map +1 -0
- package/dist/extensions/jev/tools/evaluate.js +88 -0
- package/dist/extensions.d.ts +1 -1
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +2 -0
- package/dist/filesystem.d.ts +46 -2
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +149 -102
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +6 -0
- package/dist/internal/cli-ax.d.ts +6 -0
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +72 -14
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +1 -0
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -0
- package/dist/internal/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +18 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +8 -4
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +1 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +2 -2
- package/dist/internal/filesystem/walk.d.ts +7 -4
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +34 -11
- package/dist/internal/hosted-admission-adapter.d.ts +3 -0
- package/dist/internal/hosted-admission-adapter.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts +20 -0
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +51 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +23 -25
- package/dist/internal/hosted-execution-diag.d.ts +12 -4
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +26 -4
- package/dist/internal/hosted-execution-flush.d.ts +1 -0
- package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
- package/dist/internal/hosted-execution-flush.js +4 -2
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +4 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +111 -48
- package/dist/internal/session-engine.d.ts +4 -1
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +39 -9
- package/dist/internal/skill-catalog.d.ts +28 -0
- package/dist/internal/skill-catalog.d.ts.map +1 -0
- package/dist/internal/skill-catalog.js +44 -0
- package/dist/playground/assets/index-DSMAewbx.css +1 -0
- package/dist/playground/assets/index-De_lpFxE.js +67 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +32 -3
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +2 -0
- package/docs/building-with-agents.md +96 -84
- package/docs/deployment.md +118 -364
- package/docs/evals.md +149 -673
- package/docs/guides/agent-to-agent.md +130 -48
- package/docs/guides/bitbucket.md +250 -49
- package/docs/guides/cloud-agents.md +119 -67
- package/docs/guides/convert-automation.md +157 -148
- package/docs/guides/github.md +261 -246
- package/docs/guides/gitlab.md +250 -51
- package/docs/guides/grokbot-agents.md +100 -55
- package/docs/guides/improve.md +112 -59
- package/docs/guides/jev.md +353 -0
- package/docs/guides/mcp-oauth.md +112 -122
- package/docs/guides/opentelemetry.md +97 -166
- package/docs/guides/slack.md +158 -228
- package/docs/guides/webhooks.md +155 -386
- package/docs/hillclimbing.md +102 -56
- package/docs/reference/cli.md +2 -0
- package/docs/reference/connections.md +1 -1
- package/docs/reference/evals.md +298 -0
- package/docs/reference/extensions.md +132 -203
- package/docs/reference/hooks.md +34 -34
- package/docs/reference/subagents.md +1 -1
- package/docs/reference/tools.md +4 -0
- package/docs/templates/thermo-quality-review.md +80 -0
- package/docs/templates/thermo-review.md +79 -0
- package/docs/troubleshooting.md +98 -67
- package/package.json +8 -1
- package/skills/github/SKILL.md +21 -13
- package/src/bin/agent-serve.ts +24 -3
- package/src/channels/checks.ts +8 -0
- package/src/channels/github/github-channel.ts +29 -19
- package/src/channels/origin/checks.ts +3 -1
- package/src/channels/slack/agentic-delivery.ts +2 -0
- package/src/channels/slack/dispatch.ts +131 -4
- package/src/channels/slack/placeholder.ts +51 -0
- package/src/channels/slack/slack-channel.ts +9 -2
- package/src/extensions/cursor-cloud-agents/skills/handoff.md +3 -7
- package/src/extensions/improve/extension.ts +4 -2
- package/src/extensions/improve/skills/yourself.ts +1 -1
- package/src/extensions/jev/extension.ts +95 -0
- package/src/extensions/jev/lib/evaluate.ts +289 -0
- package/src/extensions/jev/skills/gated-write.md +25 -0
- package/src/extensions/jev/skills/questions.md +33 -0
- package/src/extensions/jev/tools/evaluate.ts +90 -0
- package/src/extensions.ts +2 -0
- package/src/filesystem.ts +168 -65
- package/src/index.ts +3 -0
- package/src/internal/advertise-tools.ts +6 -0
- package/src/internal/cli-ax.ts +88 -15
- package/src/internal/continuation-identity.ts +1 -0
- package/src/internal/cursor-agent-template.ts +2 -0
- package/src/internal/discovery/connections.ts +21 -0
- package/src/internal/discovery/extensions.ts +12 -4
- package/src/internal/discovery/info.ts +1 -0
- package/src/internal/filesystem/tools.ts +2 -0
- package/src/internal/filesystem/walk.ts +60 -15
- package/src/internal/hosted-admission-adapter.ts +3 -0
- package/src/internal/hosted-delivery-protocol.ts +82 -1
- package/src/internal/hosted-delivery.ts +23 -0
- package/src/internal/hosted-execution-diag.ts +33 -4
- package/src/internal/hosted-execution-flush.ts +4 -0
- package/src/internal/init-project.ts +4 -0
- package/src/internal/server.ts +130 -53
- package/src/internal/session-engine.ts +46 -8
- package/src/internal/skill-catalog.ts +69 -0
- package/src/types.ts +33 -3
- package/templates/thermo-quality-review/README.md +35 -0
- package/templates/thermo-quality-review/agent/agent.ts +8 -0
- package/templates/thermo-quality-review/agent/channels/github.ts +42 -0
- package/templates/thermo-quality-review/agent/instructions.md +43 -0
- package/templates/thermo-quality-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-quality-review/evals/evals.config.ts +5 -0
- package/templates/thermo-quality-review/evals/review.eval.ts +62 -0
- package/templates/thermo-quality-review/package.json +18 -0
- package/templates/thermo-quality-review/tsconfig.json +12 -0
- package/templates/thermo-review/README.md +35 -0
- package/templates/thermo-review/agent/agent.ts +8 -0
- package/templates/thermo-review/agent/channels/github.ts +42 -0
- package/templates/thermo-review/agent/instructions.md +40 -0
- package/templates/thermo-review/agent/tools/post_findings.ts +70 -0
- package/templates/thermo-review/evals/evals.config.ts +5 -0
- package/templates/thermo-review/evals/review.eval.ts +53 -0
- package/templates/thermo-review/package.json +18 -0
- package/templates/thermo-review/tsconfig.json +12 -0
- package/dist/docs/assets/building-with-agents.md.CEGVXkmO.js +0 -13
- package/dist/docs/assets/building-with-agents.md.CEGVXkmO.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.DtXk1hy-.js +0 -1
- package/dist/docs/assets/chunks/channel.Bkv1N-gK.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CZDco1o8.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CZDco1o8.js +0 -1
- package/dist/docs/assets/chunks/clone.YSt_40_s.js +0 -1
- package/dist/docs/assets/chunks/framework.dypDpWZ3.js +0 -19
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C4CLm481.js +0 -1
- package/dist/docs/assets/deployment.md.Dm4Qo3hp.js +0 -51
- package/dist/docs/assets/deployment.md.Dm4Qo3hp.lean.js +0 -1
- package/dist/docs/assets/evals.md.BLDRt5LH.js +0 -211
- package/dist/docs/assets/evals.md.BLDRt5LH.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.js +0 -14
- package/dist/docs/assets/guides_agent-to-agent.md.BI0xclmy.lean.js +0 -1
- package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.js +0 -10
- package/dist/docs/assets/guides_bitbucket.md.CTpCl__f.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.js +0 -9
- package/dist/docs/assets/guides_cloud-agents.md.lSE_l7lH.lean.js +0 -1
- package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.js +0 -12
- package/dist/docs/assets/guides_convert-automation.md.Ck6Cr68A.lean.js +0 -1
- package/dist/docs/assets/guides_github.md.D6ER29dG.js +0 -64
- package/dist/docs/assets/guides_github.md.D6ER29dG.lean.js +0 -1
- package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.js +0 -14
- package/dist/docs/assets/guides_gitlab.md.P-TjBnS5.lean.js +0 -1
- package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.js +0 -9
- package/dist/docs/assets/guides_grokbot-agents.md.WBZIOvkz.lean.js +0 -1
- package/dist/docs/assets/guides_improve.md.BKaDuKKK.js +0 -14
- package/dist/docs/assets/guides_improve.md.BKaDuKKK.lean.js +0 -1
- package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.js +0 -28
- package/dist/docs/assets/guides_mcp-oauth.md.DMNMpXtO.lean.js +0 -1
- package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.js +0 -26
- package/dist/docs/assets/guides_opentelemetry.md._CRfDyzH.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.DdT8rmsj.js +0 -46
- package/dist/docs/assets/guides_slack.md.DdT8rmsj.lean.js +0 -1
- package/dist/docs/assets/guides_webhooks.md.aQW10HRe.js +0 -225
- package/dist/docs/assets/guides_webhooks.md.aQW10HRe.lean.js +0 -1
- package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.js +0 -1
- package/dist/docs/assets/hillclimbing.md.Dq4kkVIL.lean.js +0 -1
- package/dist/docs/assets/reference_extensions.md.wlFD3cUR.js +0 -62
- package/dist/docs/assets/reference_extensions.md.wlFD3cUR.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.js +0 -1
- package/dist/docs/assets/troubleshooting.md.BcgNoYtJ.lean.js +0 -1
- package/dist/playground/assets/index-BLlKgZtI.css +0 -1
- package/dist/playground/assets/index-CDS5p9sR.js +0 -67
|
@@ -1,59 +1,37 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
description: "
|
|
2
|
+
title: "Peer agents"
|
|
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
|
+
# Peer agents
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
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. Co-host both projects under one `agent-sdk` process.
|
|
10
12
|
|
|
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 |
|
|
22
|
-
|
|
23
|
-
## How do I wire two agents?
|
|
13
|
+
## Delegate a question to a specialist
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
agents/
|
|
29
|
-
concierge/
|
|
30
|
-
agent/instructions.md
|
|
31
|
-
agent/mcp-connections/weather.ts
|
|
32
|
-
weather-agent/
|
|
33
|
-
agent/instructions.md
|
|
34
|
-
```
|
|
35
|
-
|
|
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:
|
|
15
|
+
Ask the concierge about the weather and it hands the question to the
|
|
16
|
+
specialist. The weather agent answers in its own context, then the
|
|
17
|
+
concierge returns that answer to you.
|
|
39
18
|
|
|
40
19
|
```ts
|
|
41
|
-
//
|
|
20
|
+
// agent/mcp-connections/weather.ts
|
|
42
21
|
import { defineConnection } from "@cursor/july/connections";
|
|
43
22
|
|
|
44
23
|
export default defineConnection({
|
|
45
24
|
agent: "weather-agent",
|
|
46
|
-
description: "Delegate weather questions to the weather
|
|
25
|
+
description: "Delegate weather questions to the weather specialist.",
|
|
47
26
|
});
|
|
48
27
|
```
|
|
49
28
|
|
|
50
|
-
|
|
51
|
-
under `weather`. See
|
|
52
|
-
[HTTP API](../reference/http-api.md#mcp-endpoint) for the MCP tools.
|
|
29
|
+
Give the concierge a narrow routing rule:
|
|
53
30
|
|
|
54
|
-
|
|
55
|
-
needs weather, ask the `weather` peer.
|
|
56
|
-
|
|
31
|
+
```md
|
|
32
|
+
When a request needs current weather, ask the `weather` peer. Return its
|
|
33
|
+
answer.
|
|
34
|
+
```
|
|
57
35
|
|
|
58
36
|
```bash
|
|
59
37
|
agent-sdk dev ./agents
|
|
@@ -61,15 +39,119 @@ agent-sdk chat --url http://127.0.0.1:3000/concierge \
|
|
|
61
39
|
--message "What's the weather in Paris right now?"
|
|
62
40
|
```
|
|
63
41
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
The connection filename is the MCP server name the concierge calls, and
|
|
43
|
+
`agent` is the specialist's mount slug, normally its directory name.
|
|
44
|
+
|
|
45
|
+
## Continue the specialist's session
|
|
46
|
+
|
|
47
|
+
Ask a follow-up about the same forecast and the specialist picks up
|
|
48
|
+
where it left off, with its own instructions and tool history still in
|
|
49
|
+
place. The first `ask` returns `{ status, sessionId, reply }` as text on
|
|
50
|
+
the `callTool` result. Parse `sessionId` and pass it on the next `ask`
|
|
51
|
+
so the peer remembers its earlier work instead of starting fresh.
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
const first = await ctx.host.mcp.callTool("weather", "ask", {
|
|
55
|
+
message: "What's the weather in Paris right now?",
|
|
56
|
+
});
|
|
57
|
+
const firstText = first.content.find((part) => part.type === "text");
|
|
58
|
+
if (firstText?.text === undefined) {
|
|
59
|
+
throw new Error("weather ask returned no text payload");
|
|
60
|
+
}
|
|
61
|
+
const { sessionId } = JSON.parse(firstText.text) as { sessionId: string };
|
|
62
|
+
|
|
63
|
+
await ctx.host.mcp.callTool("weather", "ask", {
|
|
64
|
+
message: "How does that compare with tomorrow?",
|
|
65
|
+
sessionId,
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
If the specialist is still working, `ask` returns `status: "running"`
|
|
70
|
+
with the session ID, and you can do other work before calling `check`.
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
await ctx.host.mcp.callTool("weather", "check", {
|
|
74
|
+
sessionId,
|
|
75
|
+
waitSeconds: 20,
|
|
76
|
+
});
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The peer owns this session. Follow-ups stay on the specialist and leave
|
|
80
|
+
the concierge's conversation unchanged.
|
|
81
|
+
|
|
82
|
+
## Call a deterministic peer tool
|
|
83
|
+
|
|
84
|
+
You need a forecast for Paris, and the weather agent already has
|
|
85
|
+
`get_forecast`. Host code calls that tool in the specialist's workspace
|
|
86
|
+
and the forecast comes back to the concierge, with no second model turn.
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const result = await ctx.host.mcp.callTool("weather", "call_tool", {
|
|
90
|
+
toolName: "get_forecast",
|
|
91
|
+
input: { city: "Paris" },
|
|
92
|
+
});
|
|
93
|
+
const part = result.content.find((item) => item.type === "text");
|
|
94
|
+
if (part?.text === undefined) {
|
|
95
|
+
return { ok: false, forecast: null };
|
|
96
|
+
}
|
|
97
|
+
const payload = JSON.parse(part.text) as {
|
|
98
|
+
isError?: boolean;
|
|
99
|
+
result?: unknown;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
ok: result.isError !== true && payload.isError !== true,
|
|
104
|
+
forecast: payload.result ?? 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
|
+
## Affinity
|
|
124
|
+
|
|
125
|
+
Follow-up `ask` and `check` calls resume the same specialist session
|
|
126
|
+
and run as the caller. Those turns show up in the peer's playground;
|
|
127
|
+
only that caller can continue or check the session.
|
|
128
|
+
|
|
129
|
+
## Practices
|
|
130
|
+
|
|
131
|
+
- Give each caller a one-way routing rule so agent A cannot send work
|
|
132
|
+
to B and receive the same request back.
|
|
133
|
+
|
|
134
|
+
- Prefer `ask` when the specialist should reason. Use `call_tool` when
|
|
135
|
+
host code already knows which server tool to run.
|
|
136
|
+
|
|
137
|
+
- Cursor-managed hosting deploys one agent per slug. Use
|
|
138
|
+
[subagents](../reference/subagents.md) there instead of peer
|
|
139
|
+
connections.
|
|
140
|
+
|
|
141
|
+
## Other hosts
|
|
142
|
+
|
|
143
|
+
Peers need the default multi-agent layout and one shared process;
|
|
144
|
+
unknown slugs and self-references fail at startup.
|
|
67
145
|
|
|
68
|
-
|
|
69
|
-
|
|
146
|
+
For a self-hosted caller, expose the shared process with `--public-url`
|
|
147
|
+
and protect it with `--bearer-token`. The
|
|
148
|
+
[Deployment guide](../deployment.md) owns that hosting setup.
|
|
70
149
|
|
|
71
|
-
##
|
|
150
|
+
## Related
|
|
72
151
|
|
|
73
|
-
- [MCP connections](../reference/connections.md#peer-mcp-connection):
|
|
152
|
+
- [MCP connections](../reference/connections.md#peer-mcp-connection):
|
|
153
|
+
peer configuration and connection naming
|
|
154
|
+
- [MCP endpoint](../reference/http-api.md#mcp-endpoint): exact `ask`,
|
|
155
|
+
`check`, and `call_tool` schemas
|
|
74
156
|
- [Subagents](../reference/subagents.md): specialists inside one agent
|
|
75
|
-
- [
|
|
157
|
+
- [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
|