@grok/agent-sdk 0.2.29 → 0.4.0
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/channels/slack/cli-project.js +1 -1
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +27 -14
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.DMrZKFjI.js → app.BSH__xV4.js} +4 -4
- package/dist/docs/assets/building-with-agents.md.Bo3ct-rf.js +6 -0
- package/dist/docs/assets/{building-with-agents.md.Bf1yH2tG.lean.js → building-with-agents.md.Bo3ct-rf.lean.js} +1 -1
- package/dist/docs/assets/changelog.md.b6H_ea44.js +1 -0
- package/dist/docs/assets/changelog.md.b6H_ea44.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.CiRGcfZg.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DQvuw1KA.js → VPLocalSearchBox.Cadl7A0k.js} +1 -1
- package/dist/docs/assets/chunks/{arc.ahOG-Qza.js → arc.K7t9nNY6.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.BcgfYNO_.js → architectureDiagram-Q4EWVU46.SlHEknkX.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.DeIYZrWh.js → baseUniq.DJLRMLkz.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.HjJ2goMX.js → blockDiagram-DXYQGD6D.Bs6XxFpe.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.C1QTb9GM.js → c4Diagram-AHTNJAMY.CyLg6Ovc.js} +1 -1
- package/dist/docs/assets/chunks/channel.CVTdqYx0.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.UuZiDiVp.js → chunk-4BX2VUAB.DTQ4TinT.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.5A3YmkhI.js → chunk-4TB4RGXK.Es84IgcH.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.B4uf1yYV.js → chunk-55IACEB6.Clm3cGPQ.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CoXBce8t.js → chunk-EDXVE4YY.DE4CRkS5.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DnC5NO4e.js → chunk-FMBD7UC4.Bf8HCvqp.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CzfHCeIi.js → chunk-OYMX7WX6.eub-7nSx.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.C6tcwkVd.js → chunk-QZHKN3VN.WyP9VAS_.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM._oboyZ1A.js → chunk-YZCP3GAM.LO9ohhDE.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CsJJyx6-.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CsJJyx6-.js +1 -0
- package/dist/docs/assets/chunks/clone.Dk8KvtOB.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BfPVKeId.js → cose-bilkent-S5V4N54A.D5za6aH0.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.CLMLc0lD.js → dagre-KV5264BT.Dq1daUru.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.C7OF7UfH.js → diagram-5BDNPKRD.j1YL5BKS.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.Dpao0Bl1.js → diagram-G4DWMVQ6.Bi1aLdhC.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DLnM9eLp.js → diagram-MMDJMWI5.BOzMEkAr.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.BcpVgA_M.js → diagram-TYMM5635.Dx2FVhCr.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.CsL5JuCV.js → erDiagram-SMLLAGMA.DI4TNkye.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.MFihq9AF.js → flowDiagram-DWJPFMVM.C58Z9uPK.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.CJeLodyG.js → ganttDiagram-T4ZO3ILL.DXSpW809.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.1HhlE45Z.js → gitGraphDiagram-UUTBAWPF.B955oaFl.js} +1 -1
- package/dist/docs/assets/chunks/{graph.BS02KkWA.js → graph.BQXhKtxS.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.fp5gvytQ.js → infoDiagram-42DDH7IO.Dozj_-Gm.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.C6Wk1V4I.js → ishikawaDiagram-UXIWVN3A.D2140OzH.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.qJt4uJ_H.js → journeyDiagram-VCZTEJTY.DrqrMhCk.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.z2tG9kly.js → kanban-definition-6JOO6SKY.Dv-LTrlw.js} +1 -1
- package/dist/docs/assets/chunks/{layout.BPCkdejr.js → layout.CGtHp49X.js} +1 -1
- package/dist/docs/assets/chunks/{linear.CL3TC3u7.js → linear.CHZLYB52.js} +1 -1
- package/dist/docs/assets/chunks/{min.SPrSp704.js → min.D4Vt3eIy.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DgrQRFZW.js → mindmap-definition-QFDTVHPH.BBfpYTea.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Ba7yxiW2.js → pieDiagram-DEJITSTG.BVYvElmY.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.Bvskad4p.js → quadrantDiagram-34T5L4WZ.C6Gc2mdY.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.Ce70ugV9.js → requirementDiagram-MS252O5E.DWa8b4cn.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.BJ5OEULO.js → sankeyDiagram-XADWPNL6.Bi-g4ajv.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.C8a1hDs6.js → sequenceDiagram-FGHM5R23.DlU3vVN9.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.D2D8A5CK.js → stateDiagram-FHFEXIEX.CeqJRqnU.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DE0BnUZh.js +1 -0
- package/dist/docs/assets/chunks/{theme.DRciHmS1.js → theme.DGq7D4tt.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.C4ePrY8-.js → timeline-definition-GMOUNBTQ.Cqf2kjq9.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.Dzso6dEA.js → vennDiagram-DHZGUBPP.BeOpE_lM.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.djgXR0ar.js → wardley-RL74JXVD.FMQXA-6q.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Bf2ICxjh.js → wardleyDiagram-NUSXRM2D.BXS65dAC.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DEH4BcVJ.js → xychartDiagram-5P7HB3ND.haEiSxqc.js} +1 -1
- package/dist/docs/assets/deployment.md.DJtuDVLh.js +31 -0
- package/dist/docs/assets/{deployment.md.KW0Ni_rY.lean.js → deployment.md.DJtuDVLh.lean.js} +1 -1
- package/dist/docs/assets/evals.md.Dne6VRmZ.js +49 -0
- package/dist/docs/assets/evals.md.Dne6VRmZ.lean.js +1 -0
- package/dist/docs/assets/{guides_agent-to-agent.md.D1D5f6Jc.js → guides_agent-to-agent.md.DcB3nhOz.js} +8 -8
- package/dist/docs/assets/guides_agent-to-agent.md.DcB3nhOz.lean.js +1 -0
- package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.js → guides_bitbucket.md.BiA6ZMFW.js} +27 -27
- package/dist/docs/assets/{guides_bitbucket.md.DkjkBRU8.lean.js → guides_bitbucket.md.BiA6ZMFW.lean.js} +1 -1
- package/dist/docs/assets/guides_cloud-agents.md.CiXAW6on.js +9 -0
- package/dist/docs/assets/{guides_cloud-agents.md.Ceyjv0ul.lean.js → guides_cloud-agents.md.CiXAW6on.lean.js} +1 -1
- package/dist/docs/assets/guides_convert-automation.md.BvTxsJ8J.js +26 -0
- package/dist/docs/assets/{guides_convert-automation.md.BjraCvok.lean.js → guides_convert-automation.md.BvTxsJ8J.lean.js} +1 -1
- package/dist/docs/assets/{guides_github.md.CgN5sNbW.js → guides_github.md.CcuZ7keS.js} +11 -19
- package/dist/docs/assets/{guides_github.md.CgN5sNbW.lean.js → guides_github.md.CcuZ7keS.lean.js} +1 -1
- package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.js → guides_gitlab.md.DcKusOcU.js} +63 -73
- package/dist/docs/assets/{guides_gitlab.md.DCE0p7_w.lean.js → guides_gitlab.md.DcKusOcU.lean.js} +1 -1
- package/dist/docs/assets/guides_improve.md.o3WOGR7n.js +16 -0
- package/dist/docs/assets/{guides_improve.md.BFYtrtLE.lean.js → guides_improve.md.o3WOGR7n.lean.js} +1 -1
- package/dist/docs/assets/{guides_jev.md.CEqLgjj9.js → guides_jev.md.DGCzkMUN.js} +20 -60
- package/dist/docs/assets/{guides_jev.md.CEqLgjj9.lean.js → guides_jev.md.DGCzkMUN.lean.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.DrGY92u4.js → guides_mcp-oauth.md.GVPMKcYl.js} +3 -5
- package/dist/docs/assets/{guides_mcp-oauth.md.DrGY92u4.lean.js → guides_mcp-oauth.md.GVPMKcYl.lean.js} +1 -1
- package/dist/docs/assets/guides_migrate.md.B8CZxnnX.js +3 -0
- package/dist/docs/assets/{guides_migrate.md.RS9Eu-Xh.lean.js → guides_migrate.md.B8CZxnnX.lean.js} +1 -1
- package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.js +26 -0
- package/dist/docs/assets/guides_opentelemetry.md.BRSktBHt.lean.js +1 -0
- package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.js +61 -0
- package/dist/docs/assets/guides_pagerduty.md.pMXUkZZc.lean.js +1 -0
- package/dist/docs/assets/guides_slack.md.D7Rwyva4.js +82 -0
- package/dist/docs/assets/{guides_slack.md.BwXHURvY.lean.js → guides_slack.md.D7Rwyva4.lean.js} +1 -1
- package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.js → guides_webhooks.md.B5DXt2v1.js} +7 -7
- package/dist/docs/assets/{guides_webhooks.md.BJk63ZTs.lean.js → guides_webhooks.md.B5DXt2v1.lean.js} +1 -1
- package/dist/docs/assets/hillclimbing.md.M51bF-oT.js +5 -0
- package/dist/docs/assets/hillclimbing.md.M51bF-oT.lean.js +1 -0
- package/dist/docs/assets/index.md.DnJPj_B6.js +14 -0
- package/dist/docs/assets/index.md.DnJPj_B6.lean.js +1 -0
- package/dist/docs/assets/quickstart.md.r-oE8nkX.js +113 -0
- package/dist/docs/assets/{quickstart.md.CljDaJBi.lean.js → quickstart.md.r-oE8nkX.lean.js} +1 -1
- package/dist/docs/assets/reference_access.md.C5lblfUC.js +1 -0
- package/dist/docs/assets/reference_access.md.C5lblfUC.lean.js +1 -0
- package/dist/docs/assets/reference_agent-config.md.BSNp2uJ7.js +27 -0
- package/dist/docs/assets/{reference_agent-config.md.Ck29qYNj.lean.js → reference_agent-config.md.BSNp2uJ7.lean.js} +1 -1
- package/dist/docs/assets/reference_artifacts.md.BJpAI7h9.js +17 -0
- package/dist/docs/assets/{reference_artifacts.md.C-hKR2hp.lean.js → reference_artifacts.md.BJpAI7h9.lean.js} +1 -1
- package/dist/docs/assets/reference_channels.md.CPWOpdsC.js +21 -0
- package/dist/docs/assets/{reference_channels.md.DsJfGSBJ.lean.js → reference_channels.md.CPWOpdsC.lean.js} +1 -1
- package/dist/docs/assets/reference_cli.md.DHm6DmYk.js +83 -0
- package/dist/docs/assets/reference_cli.md.DHm6DmYk.lean.js +1 -0
- package/dist/docs/assets/reference_connections.md.DoY4vrDH.js +54 -0
- package/dist/docs/assets/{reference_connections.md.BoAotr7_.lean.js → reference_connections.md.DoY4vrDH.lean.js} +1 -1
- package/dist/docs/assets/reference_evals.md.DgfUtfIc.js +69 -0
- package/dist/docs/assets/{reference_evals.md.2BXeMiO2.lean.js → reference_evals.md.DgfUtfIc.lean.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.DI5X5x8p.js → reference_extensions.md.DHbW6eOf.js} +6 -8
- package/dist/docs/assets/{reference_extensions.md.DI5X5x8p.lean.js → reference_extensions.md.DHbW6eOf.lean.js} +1 -1
- package/dist/docs/assets/reference_hooks.md.vbIM394-.js +39 -0
- package/dist/docs/assets/reference_hooks.md.vbIM394-.lean.js +1 -0
- package/dist/docs/assets/reference_http-api.md.C7Cb0r2J.js +7 -0
- package/dist/docs/assets/{reference_http-api.md._RWELr3d.lean.js → reference_http-api.md.C7Cb0r2J.lean.js} +1 -1
- package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.js +14 -0
- package/dist/docs/assets/reference_instructions.md.CV6Qq0UX.lean.js +1 -0
- package/dist/docs/assets/reference_limits.md.CbdtFr4T.js +8 -0
- package/dist/docs/assets/reference_limits.md.CbdtFr4T.lean.js +1 -0
- package/dist/docs/assets/reference_memory.md.CdoJISM-.js +3 -0
- package/dist/docs/assets/{reference_memory.md.Dd7cyV9V.lean.js → reference_memory.md.CdoJISM-.lean.js} +1 -1
- package/dist/docs/assets/reference_playground.md.DIUsRAcy.js +1 -0
- package/dist/docs/assets/{reference_playground.md.CQiJk9CM.lean.js → reference_playground.md.DIUsRAcy.lean.js} +1 -1
- package/dist/docs/assets/reference_project-layout.md.9DiKoE16.js +26 -0
- package/dist/docs/assets/reference_project-layout.md.9DiKoE16.lean.js +1 -0
- package/dist/docs/assets/reference_schedules.md.Dd8_d0WG.js +45 -0
- package/dist/docs/assets/{reference_schedules.md.RC47aFm4.lean.js → reference_schedules.md.Dd8_d0WG.lean.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.NXVQt9mP.js +22 -0
- package/dist/docs/assets/{reference_sessions.md.C7KFhWXV.lean.js → reference_sessions.md.NXVQt9mP.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.Dej2zQxi.js → reference_skills.md.DzCPNPkG.js} +4 -4
- package/dist/docs/assets/{reference_skills.md.Dej2zQxi.lean.js → reference_skills.md.DzCPNPkG.lean.js} +1 -1
- package/dist/docs/assets/reference_subagents.md.Dvpq2sUu.js +10 -0
- package/dist/docs/assets/{reference_subagents.md.CAhvW4yS.lean.js → reference_subagents.md.Dvpq2sUu.lean.js} +1 -1
- package/dist/docs/assets/reference_tools.md.B2OaR1Nb.js +62 -0
- package/dist/docs/assets/{reference_tools.md.DQr7Fnhu.lean.js → reference_tools.md.B2OaR1Nb.lean.js} +1 -1
- package/dist/docs/assets/templates_agentic-owners.md.B6ZmKAzT.js +13 -0
- package/dist/docs/assets/{templates_agentic-owners.md.Dh2nDSqg.lean.js → templates_agentic-owners.md.B6ZmKAzT.lean.js} +1 -1
- package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.js +10 -0
- package/dist/docs/assets/templates_reviews.md.dr9Xv_KM.lean.js +1 -0
- package/dist/docs/assets/troubleshooting.md.DfKKvW1R.js +3 -0
- package/dist/docs/assets/{troubleshooting.md.CGOdNVAL.lean.js → troubleshooting.md.DfKKvW1R.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +41 -44
- package/dist/docs/building-with-agents.md +11 -104
- package/dist/docs/changelog.html +37 -37
- package/dist/docs/changelog.md +14 -145
- package/dist/docs/deployment.html +54 -54
- package/dist/docs/deployment.md +97 -270
- package/dist/docs/evals.html +52 -71
- package/dist/docs/evals.md +33 -129
- package/dist/docs/guides/agent-to-agent.html +43 -43
- package/dist/docs/guides/agent-to-agent.md +29 -64
- package/dist/docs/guides/bitbucket.html +62 -62
- package/dist/docs/guides/bitbucket.md +73 -134
- package/dist/docs/guides/cloud-agents.html +37 -37
- package/dist/docs/guides/cloud-agents.md +23 -53
- package/dist/docs/guides/convert-automation.html +39 -56
- package/dist/docs/guides/convert-automation.md +31 -115
- package/dist/docs/guides/github.html +46 -54
- package/dist/docs/guides/github.md +49 -131
- package/dist/docs/guides/gitlab.html +98 -108
- package/dist/docs/guides/gitlab.md +104 -184
- package/dist/docs/guides/improve.html +38 -43
- package/dist/docs/guides/improve.md +24 -90
- package/dist/docs/guides/jev.html +55 -95
- package/dist/docs/guides/jev.md +53 -160
- package/dist/docs/guides/mcp-oauth.html +38 -40
- package/dist/docs/guides/mcp-oauth.md +33 -67
- package/dist/docs/guides/migrate.html +38 -43
- package/dist/docs/guides/migrate.md +56 -130
- package/dist/docs/guides/opentelemetry.html +41 -43
- package/dist/docs/guides/opentelemetry.md +32 -27
- package/dist/docs/guides/pagerduty.html +50 -49
- package/dist/docs/guides/pagerduty.md +65 -199
- package/dist/docs/guides/slack.html +51 -57
- package/dist/docs/guides/slack.md +76 -204
- package/dist/docs/guides/webhooks.html +42 -42
- package/dist/docs/guides/webhooks.md +64 -146
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +40 -42
- package/dist/docs/hillclimbing.md +40 -102
- package/dist/docs/index.html +49 -61
- package/dist/docs/index.md +42 -82
- package/dist/docs/llms-full.txt +2272 -5711
- package/dist/docs/llms.txt +9 -14
- package/dist/docs/quickstart.html +95 -152
- package/dist/docs/quickstart.md +91 -180
- package/dist/docs/reference/access.html +36 -36
- package/dist/docs/reference/access.md +7 -12
- package/dist/docs/reference/agent-config.html +45 -58
- package/dist/docs/reference/agent-config.md +92 -176
- package/dist/docs/reference/artifacts.html +38 -39
- package/dist/docs/reference/artifacts.md +38 -62
- package/dist/docs/reference/channels.html +38 -39
- package/dist/docs/reference/channels.md +102 -151
- package/dist/docs/reference/cli.html +68 -84
- package/dist/docs/reference/cli.md +232 -697
- package/dist/docs/reference/connections.html +45 -57
- package/dist/docs/reference/connections.md +83 -164
- package/dist/docs/reference/evals.html +47 -54
- package/dist/docs/reference/evals.md +75 -141
- package/dist/docs/reference/extensions.html +41 -43
- package/dist/docs/reference/extensions.md +37 -70
- package/dist/docs/reference/hooks.html +40 -52
- package/dist/docs/reference/hooks.md +62 -133
- package/dist/docs/reference/http-api.html +38 -42
- package/dist/docs/reference/http-api.md +66 -118
- package/dist/docs/reference/instructions.html +39 -39
- package/dist/docs/reference/instructions.md +19 -29
- package/dist/docs/reference/limits.html +38 -38
- package/dist/docs/reference/limits.md +9 -21
- package/dist/docs/reference/memory.html +37 -38
- package/dist/docs/reference/memory.md +38 -75
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/playground.md +14 -22
- package/dist/docs/reference/project-layout.html +49 -48
- package/dist/docs/reference/project-layout.md +38 -84
- package/dist/docs/reference/schedules.html +44 -46
- package/dist/docs/reference/schedules.md +59 -90
- package/dist/docs/reference/sessions.html +37 -37
- package/dist/docs/reference/sessions.md +66 -113
- package/dist/docs/reference/skills.html +39 -39
- package/dist/docs/reference/skills.md +11 -31
- package/dist/docs/reference/subagents.html +37 -37
- package/dist/docs/reference/subagents.md +17 -31
- package/dist/docs/reference/tools.html +47 -64
- package/dist/docs/reference/tools.md +48 -130
- package/dist/docs/templates/agentic-owners.html +38 -38
- package/dist/docs/templates/agentic-owners.md +50 -74
- package/dist/docs/templates/reviews.html +69 -0
- package/dist/docs/templates/reviews.md +71 -0
- package/dist/docs/troubleshooting.html +38 -36
- package/dist/docs/troubleshooting.md +48 -101
- package/dist/filesystem.d.ts +7 -320
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +10 -691
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/authored-alias-hooks.d.ts +6 -0
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +12 -0
- package/dist/internal/authored-loaders.js +10 -1
- package/dist/internal/cli/commands/scaffold.js +1 -1
- package/dist/internal/cli-deploy.js +1 -1
- package/dist/internal/cli-docs.js +1 -1
- package/dist/internal/cli-images.js +1 -1
- package/dist/internal/cli-skills.js +1 -1
- package/dist/internal/continuation-session-ids.d.ts +15 -0
- package/dist/internal/continuation-session-ids.d.ts.map +1 -0
- package/dist/internal/continuation-session-ids.js +43 -0
- package/dist/internal/cursor/credentials.js +1 -1
- package/dist/internal/deploy-manifest.d.ts +1 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +0 -1
- package/dist/internal/discovery/agent-config.d.ts +2 -6
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +8 -25
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +2 -3
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +15 -0
- package/dist/internal/filesystem/walk.d.ts +1 -5
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +1 -9
- package/dist/internal/hosted-catch-protocol.d.ts +3 -3
- package/dist/internal/hosted-catch-protocol.js +3 -3
- package/dist/internal/hosted-fetch.d.ts +7 -0
- package/dist/internal/hosted-fetch.d.ts.map +1 -0
- package/dist/internal/hosted-fetch.js +26 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +7 -5
- package/dist/internal/install-cursor-skills.d.ts +5 -6
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +19 -4
- package/dist/internal/mcp-endpoint.js +4 -4
- package/dist/internal/model-config.d.ts.map +1 -1
- package/dist/internal/model-config.js +11 -4
- package/dist/internal/platform-timers.d.ts +3 -7
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +10 -51
- package/dist/internal/reminder-runner.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +6 -1
- package/dist/internal/session-engine.d.ts +3 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +13 -4
- package/dist/internal/shallow-clone.js +1 -1
- package/dist/playground/assets/index-Bno25Cg0.css +1 -0
- package/dist/playground/assets/index-SGKsaznh.js +62 -0
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +6 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +2 -2
- package/docs/README.md +42 -82
- package/docs/building-with-agents.md +11 -104
- package/docs/changelog.md +15 -146
- package/docs/deployment.md +97 -270
- package/docs/evals.md +34 -130
- package/docs/guides/agent-to-agent.md +29 -64
- package/docs/guides/bitbucket.md +73 -134
- package/docs/guides/cloud-agents.md +23 -53
- package/docs/guides/convert-automation.md +31 -115
- package/docs/guides/github.md +49 -131
- package/docs/guides/gitlab.md +104 -184
- package/docs/guides/improve.md +24 -90
- package/docs/guides/jev.md +53 -160
- package/docs/guides/mcp-oauth.md +33 -67
- package/docs/guides/migrate.md +56 -130
- package/docs/guides/opentelemetry.md +37 -27
- package/docs/guides/pagerduty.md +68 -200
- package/docs/guides/slack.md +76 -204
- package/docs/guides/webhooks.md +64 -146
- package/docs/hillclimbing.md +41 -103
- package/docs/quickstart.md +91 -180
- package/docs/reference/access.md +7 -12
- package/docs/reference/agent-config.md +92 -176
- package/docs/reference/artifacts.md +38 -62
- package/docs/reference/channels.md +102 -151
- package/docs/reference/cli.md +232 -697
- package/docs/reference/connections.md +83 -164
- package/docs/reference/evals.md +75 -141
- package/docs/reference/extensions.md +37 -70
- package/docs/reference/hooks.md +61 -132
- package/docs/reference/http-api.md +66 -118
- package/docs/reference/instructions.md +20 -30
- package/docs/reference/limits.md +10 -22
- package/docs/reference/memory.md +38 -75
- package/docs/reference/playground.md +14 -22
- package/docs/reference/project-layout.md +38 -84
- package/docs/reference/schedules.md +59 -90
- package/docs/reference/sessions.md +66 -113
- package/docs/reference/skills.md +12 -32
- package/docs/reference/subagents.md +17 -31
- package/docs/reference/tools.md +48 -130
- package/docs/templates/agentic-owners.md +50 -74
- package/docs/templates/reviews.md +76 -0
- package/docs/troubleshooting.md +48 -101
- package/package.json +4 -4
- package/skills/cli/SKILL.md +1 -1
- package/skills/create-agent/SKILL.md +61 -7
- package/skills/debug/SKILL.md +1 -1
- package/skills/deploy/SKILL.md +3 -3
- package/skills/evals/SKILL.md +1 -1
- package/skills/framework-map/SKILL.md +2 -2
- package/skills/github/SKILL.md +1 -1
- package/skills/hillclimb/SKILL.md +1 -1
- package/skills/mcp-auth/SKILL.md +1 -1
- package/skills/migrate-v2/SKILL.md +2 -3
- package/skills/otel/SKILL.md +1 -1
- package/skills/setup-slack/SKILL.md +2 -2
- package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.js +0 -9
- package/dist/docs/assets/changelog.md.DrLFQUlu.js +0 -1
- package/dist/docs/assets/changelog.md.DrLFQUlu.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.Dpd_wxVU.js +0 -1
- package/dist/docs/assets/chunks/channel._fZX_hvU.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.eClS1Q0E.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.eClS1Q0E.js +0 -1
- package/dist/docs/assets/chunks/clone.W1Phdw9P.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.77yf4kRr.js +0 -1
- package/dist/docs/assets/deployment.md.KW0Ni_rY.js +0 -31
- package/dist/docs/assets/evals.md.DiljU__Z.js +0 -68
- package/dist/docs/assets/evals.md.DiljU__Z.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.js +0 -9
- package/dist/docs/assets/guides_convert-automation.md.BjraCvok.js +0 -43
- package/dist/docs/assets/guides_hooks.md.BjeEiM7s.js +0 -54
- package/dist/docs/assets/guides_hooks.md.BjeEiM7s.lean.js +0 -1
- package/dist/docs/assets/guides_improve.md.BFYtrtLE.js +0 -21
- package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.js +0 -8
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.js +0 -28
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.lean.js +0 -1
- package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.js +0 -60
- package/dist/docs/assets/guides_pagerduty.md.mnKXe9U0.lean.js +0 -1
- package/dist/docs/assets/guides_slack.md.BwXHURvY.js +0 -88
- package/dist/docs/assets/hillclimbing.md.By61f3uq.js +0 -7
- package/dist/docs/assets/hillclimbing.md.By61f3uq.lean.js +0 -1
- package/dist/docs/assets/index.md.CAruw_rp.js +0 -26
- package/dist/docs/assets/index.md.CAruw_rp.lean.js +0 -1
- package/dist/docs/assets/quickstart.md.CljDaJBi.js +0 -170
- package/dist/docs/assets/reference_access.md.CEtibb4i.js +0 -1
- package/dist/docs/assets/reference_access.md.CEtibb4i.lean.js +0 -1
- package/dist/docs/assets/reference_agent-config.md.Ck29qYNj.js +0 -40
- package/dist/docs/assets/reference_artifacts.md.C-hKR2hp.js +0 -18
- package/dist/docs/assets/reference_channels.md.DsJfGSBJ.js +0 -22
- package/dist/docs/assets/reference_cli.md.BkdLRbXg.js +0 -99
- package/dist/docs/assets/reference_cli.md.BkdLRbXg.lean.js +0 -1
- package/dist/docs/assets/reference_connections.md.BoAotr7_.js +0 -66
- package/dist/docs/assets/reference_evals.md.2BXeMiO2.js +0 -76
- package/dist/docs/assets/reference_hooks.md.B-bwJuiG.js +0 -51
- package/dist/docs/assets/reference_hooks.md.B-bwJuiG.lean.js +0 -1
- package/dist/docs/assets/reference_http-api.md._RWELr3d.js +0 -11
- package/dist/docs/assets/reference_instructions.md.yL2hXLnl.js +0 -14
- package/dist/docs/assets/reference_instructions.md.yL2hXLnl.lean.js +0 -1
- package/dist/docs/assets/reference_limits.md.BCCnvt3o.js +0 -8
- package/dist/docs/assets/reference_limits.md.BCCnvt3o.lean.js +0 -1
- package/dist/docs/assets/reference_memory.md.Dd7cyV9V.js +0 -4
- package/dist/docs/assets/reference_playground.md.CQiJk9CM.js +0 -1
- package/dist/docs/assets/reference_project-layout.md.BamcPDUn.js +0 -25
- package/dist/docs/assets/reference_project-layout.md.BamcPDUn.lean.js +0 -1
- package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.js +0 -9
- package/dist/docs/assets/reference_prompt.md.BMjm1Jp3.lean.js +0 -1
- package/dist/docs/assets/reference_schedules.md.RC47aFm4.js +0 -47
- package/dist/docs/assets/reference_sessions.md.C7KFhWXV.js +0 -22
- package/dist/docs/assets/reference_subagents.md.CAhvW4yS.js +0 -10
- package/dist/docs/assets/reference_tools.md.DQr7Fnhu.js +0 -79
- package/dist/docs/assets/templates_agentic-owners.md.Dh2nDSqg.js +0 -13
- package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.js +0 -3
- package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.lean.js +0 -1
- package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.js +0 -3
- package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.lean.js +0 -1
- package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.js +0 -3
- package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.lean.js +0 -1
- package/dist/docs/assets/templates_triage.md.BYWMloV4.js +0 -9
- package/dist/docs/assets/templates_triage.md.BYWMloV4.lean.js +0 -1
- package/dist/docs/assets/troubleshooting.md.CGOdNVAL.js +0 -1
- package/dist/docs/guides/hooks.html +0 -113
- package/dist/docs/guides/hooks.md +0 -116
- package/dist/docs/package/skills/create-agent/SKILL.md +0 -178
- package/dist/docs/package/skills/evals/SKILL.md +0 -145
- package/dist/docs/package/skills/github/SKILL.md +0 -133
- package/dist/docs/package/skills/hillclimb/SKILL.md +0 -63
- package/dist/docs/package/skills/mcp-auth/SKILL.md +0 -60
- package/dist/docs/package/skills/migrate-v2/SKILL.md +0 -394
- package/dist/docs/package/skills/setup-slack/SKILL.md +0 -136
- package/dist/docs/reference/prompt.html +0 -68
- package/dist/docs/reference/prompt.md +0 -47
- package/dist/docs/templates/security-reviewer.html +0 -62
- package/dist/docs/templates/security-reviewer.md +0 -81
- package/dist/docs/templates/thermo-quality-review.html +0 -62
- package/dist/docs/templates/thermo-quality-review.md +0 -75
- package/dist/docs/templates/thermo-review.html +0 -62
- package/dist/docs/templates/thermo-review.md +0 -75
- package/dist/docs/templates/triage.html +0 -68
- package/dist/docs/templates/triage.md +0 -101
- package/dist/internal/filesystem/errors.d.ts +0 -64
- package/dist/internal/filesystem/errors.d.ts.map +0 -1
- package/dist/internal/filesystem/errors.js +0 -180
- package/dist/internal/filesystem/merge.d.ts +0 -34
- package/dist/internal/filesystem/merge.d.ts.map +0 -1
- package/dist/internal/filesystem/merge.js +0 -154
- package/dist/playground/assets/index-Cl9zvmmf.js +0 -62
- package/dist/playground/assets/index-F8b5WvWi.css +0 -1
- package/docs/guides/hooks.md +0 -121
- package/docs/reference/prompt.md +0 -52
- package/docs/templates/security-reviewer.md +0 -86
- package/docs/templates/thermo-quality-review.md +0 -80
- package/docs/templates/thermo-review.md +0 -80
- package/docs/templates/triage.md +0 -106
package/docs/quickstart.md
CHANGED
|
@@ -5,44 +5,53 @@ description: "Create an Agent SDK bot or agent that reviews pull requests by com
|
|
|
5
5
|
|
|
6
6
|
# Build a PR reviewer with Agent SDK
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
changes as `trivial`, `moderate`, or `large`, then approves safe changes or
|
|
10
|
-
requests human review.
|
|
8
|
+
You'll build a reviewer that rates each pull request as `trivial`, `moderate`, or `large`, then approves safe changes or asks for a human review.
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
When it's deployed, you'll manage it in [Deployed Agents](https://cursor.com/dashboard/deployed-agents).
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
## Build it with a coding agent
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
Paste this prompt into your coding agent to build the reviewer from this page. The sections after
|
|
15
|
+
it walk through the same steps by hand.
|
|
17
16
|
|
|
18
17
|
```text
|
|
19
|
-
|
|
18
|
+
Build the PR reviewer from https://cursor.com/docs/agent-sdk/quickstart.md
|
|
19
|
+
in ./pr-reviewer. Fetch that page and follow each step in order.
|
|
20
|
+
|
|
21
|
+
- If agent-sdk isn't on PATH, install it with
|
|
22
|
+
npm install --global @grok/agent-sdk. Wait while I finish agent-sdk login.
|
|
23
|
+
- Use the code from the page as written. Ask me for a GitHub repository and
|
|
24
|
+
a pull request I didn't author, and use them in place of acme/checkout#42.
|
|
25
|
+
- Run both tool-call checks, and confirm the complexity each one reports.
|
|
26
|
+
- Ask me before any step that posts a review on GitHub. Skip the deploy step.
|
|
27
|
+
|
|
28
|
+
Finish with agent-sdk validate --dir . and the project's TypeScript check,
|
|
29
|
+
then tell me what passed.
|
|
20
30
|
```
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
## Prerequisites
|
|
23
33
|
|
|
24
|
-
|
|
34
|
+
You need Node 22.13 or newer and a Cursor login for model turns:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install -g @grok/agent-sdk
|
|
25
38
|
agent-sdk login
|
|
26
39
|
```
|
|
27
40
|
|
|
28
41
|
## Create and run the project
|
|
29
42
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```text
|
|
43
|
+
```bash
|
|
33
44
|
agent-sdk init ./pr-reviewer
|
|
34
45
|
cd pr-reviewer
|
|
35
46
|
agent-sdk dev
|
|
36
47
|
```
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
In a second terminal, confirm the agent replies:
|
|
39
50
|
|
|
40
|
-
```
|
|
51
|
+
```bash
|
|
41
52
|
agent-sdk run --dir . --message "Introduce yourself in one sentence."
|
|
42
53
|
```
|
|
43
54
|
|
|
44
|
-
Confirm the agent replies.
|
|
45
|
-
|
|
46
55
|
## Add review instructions
|
|
47
56
|
|
|
48
57
|
Replace `bot/instructions.md`:
|
|
@@ -50,107 +59,72 @@ Replace `bot/instructions.md`:
|
|
|
50
59
|
```md
|
|
51
60
|
# PR reviewer
|
|
52
61
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
62
|
+
Call `inspect_pr` before you judge a pull request, then act on the
|
|
63
|
+
complexity it reports:
|
|
64
|
+
|
|
65
|
+
- `trivial`: approve with `submit_review` if the diff matches the title
|
|
66
|
+
and nothing looks risky.
|
|
67
|
+
- `moderate`: approve only when you understand every patch and see no
|
|
68
|
+
risk. Otherwise request a human review and name the files that worry you.
|
|
69
|
+
- `large`: request a human review right away and point the reviewer at
|
|
70
|
+
the biggest files.
|
|
71
|
+
|
|
72
|
+
Never approve a draft. End with one sentence that gives the verdict and why.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Share the URL parser
|
|
76
|
+
|
|
77
|
+
Both tools parse a pull request URL, so put the parser in `bot/lib/github.ts`, where Agent SDK doesn't look for tools.
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
export function parsePrUrl(prUrl: string) {
|
|
81
|
+
const [owner, repo, pulls, number] = new URL(prUrl).pathname.split("/").filter(Boolean);
|
|
82
|
+
const pull_number = Number.parseInt(number ?? "", 10);
|
|
83
|
+
if (pulls !== "pull" || owner === undefined || repo === undefined || Number.isNaN(pull_number)) {
|
|
84
|
+
throw new Error(`Not a pull request URL: ${prUrl}`);
|
|
85
|
+
}
|
|
86
|
+
return { owner, repo, pull_number };
|
|
87
|
+
}
|
|
72
88
|
```
|
|
73
89
|
|
|
74
90
|
## Add the inspect tool
|
|
75
91
|
|
|
76
|
-
Create `bot/tools/inspect_pr.ts
|
|
92
|
+
Create `bot/tools/inspect_pr.ts`. It skips patches on a large pull request and caps the rest at 3,000 characters.
|
|
77
93
|
|
|
78
94
|
```ts
|
|
79
95
|
import { defineTool } from "@grok/agent-sdk/tools";
|
|
80
96
|
import { z } from "zod";
|
|
97
|
+
import { parsePrUrl } from "../lib/github.js";
|
|
81
98
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
function rateComplexity(linesChanged: number, changedFiles: number): Complexity {
|
|
99
|
+
function rateComplexity(linesChanged: number, changedFiles: number) {
|
|
85
100
|
if (linesChanged <= 25 && changedFiles <= 2) {
|
|
86
101
|
return "trivial";
|
|
87
102
|
}
|
|
88
|
-
|
|
89
103
|
if (linesChanged <= 400 && changedFiles <= 15) {
|
|
90
104
|
return "moderate";
|
|
91
105
|
}
|
|
92
|
-
|
|
93
106
|
return "large";
|
|
94
107
|
}
|
|
95
108
|
|
|
96
|
-
/** Keep one oversized file from flooding the model's context. */
|
|
97
|
-
function trimPatch(patch: string | undefined): string | undefined {
|
|
98
|
-
if (patch === undefined || patch.length <= 3000) {
|
|
99
|
-
return patch;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
return `${patch.slice(0, 3000)}\n[... patch trimmed ...]`;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
109
|
export default defineTool({
|
|
106
|
-
description:
|
|
107
|
-
|
|
108
|
-
inputSchema: z.object({
|
|
109
|
-
prUrl: z
|
|
110
|
-
.string()
|
|
111
|
-
.describe("Pull request URL: https://github.com/owner/repo/pull/123"),
|
|
112
|
-
}),
|
|
110
|
+
description: "Fetch a pull request's title, patches, and complexity.",
|
|
111
|
+
inputSchema: z.object({ prUrl: z.string().describe("GitHub pull request URL") }),
|
|
113
112
|
async execute({ prUrl }, ctx) {
|
|
114
|
-
const
|
|
115
|
-
const [owner, repo, pulls, number] = url.pathname.split("/").filter(Boolean);
|
|
116
|
-
const pull_number = Number.parseInt(number ?? "", 10);
|
|
117
|
-
if (pulls !== "pull" || owner === undefined || Number.isNaN(pull_number)) {
|
|
118
|
-
throw new Error(`Not a pull request URL: ${prUrl}`);
|
|
119
|
-
}
|
|
120
|
-
|
|
113
|
+
const pull = parsePrUrl(prUrl);
|
|
121
114
|
const octokit = await ctx.host.github.getOctokit();
|
|
122
|
-
const { data: pr } = await octokit.rest.pulls.get(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
pull_number,
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
const { data: files } = await octokit.rest.pulls.listFiles({
|
|
129
|
-
owner,
|
|
130
|
-
repo,
|
|
131
|
-
pull_number,
|
|
132
|
-
per_page: 100,
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
const complexity = rateComplexity(
|
|
136
|
-
pr.additions + pr.deletions,
|
|
137
|
-
pr.changed_files
|
|
138
|
-
);
|
|
115
|
+
const { data: pr } = await octokit.rest.pulls.get(pull);
|
|
116
|
+
const { data: files } = await octokit.rest.pulls.listFiles({ ...pull, per_page: 100 });
|
|
117
|
+
const complexity = rateComplexity(pr.additions + pr.deletions, pr.changed_files);
|
|
139
118
|
|
|
140
119
|
return {
|
|
141
120
|
title: pr.title,
|
|
142
|
-
author: pr.user?.login,
|
|
143
|
-
state: pr.state,
|
|
144
121
|
draft: pr.draft ?? false,
|
|
145
|
-
additions: pr.additions,
|
|
146
|
-
deletions: pr.deletions,
|
|
147
|
-
changedFiles: pr.changed_files,
|
|
148
122
|
complexity,
|
|
149
123
|
files: files.map((file) => ({
|
|
150
124
|
path: file.filename,
|
|
151
125
|
additions: file.additions,
|
|
152
126
|
deletions: file.deletions,
|
|
153
|
-
|
|
127
|
+
patch: complexity === "large" ? undefined : file.patch?.slice(0, 3000),
|
|
154
128
|
})),
|
|
155
129
|
};
|
|
156
130
|
},
|
|
@@ -159,98 +133,61 @@ export default defineTool({
|
|
|
159
133
|
|
|
160
134
|
## Verify complexity classification
|
|
161
135
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
```text
|
|
165
|
-
agent-sdk tool call inspect_pr --dir . \
|
|
166
|
-
--input '{"prUrl":"https://github.com/facebook/react/pull/35623"}'
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
Confirm the result contains `"complexity": "trivial"`.
|
|
136
|
+
Call the tool without a model turn:
|
|
170
137
|
|
|
171
|
-
|
|
138
|
+
```bash
|
|
139
|
+
# Expect "complexity": "trivial"
|
|
140
|
+
agent-sdk tool call inspect_pr --dir . --input '{"prUrl":"https://github.com/facebook/react/pull/35623"}'
|
|
172
141
|
|
|
173
|
-
|
|
174
|
-
agent-sdk tool call inspect_pr --dir .
|
|
175
|
-
--input '{"prUrl":"https://github.com/facebook/react/pull/25229"}'
|
|
142
|
+
# Expect "complexity": "large" and no patch fields
|
|
143
|
+
agent-sdk tool call inspect_pr --dir . --input '{"prUrl":"https://github.com/facebook/react/pull/25229"}'
|
|
176
144
|
```
|
|
177
145
|
|
|
178
|
-
Confirm the result contains `"complexity": "large"` and no `patch`
|
|
179
|
-
fields.
|
|
180
|
-
|
|
181
146
|
## Add the review tool
|
|
182
147
|
|
|
183
|
-
Create `bot/tools/submit_review.ts
|
|
148
|
+
Create `bot/tools/submit_review.ts`:
|
|
184
149
|
|
|
185
150
|
```ts
|
|
186
151
|
import { defineTool } from "@grok/agent-sdk/tools";
|
|
187
152
|
import { z } from "zod";
|
|
153
|
+
import { parsePrUrl } from "../lib/github.js";
|
|
188
154
|
|
|
189
155
|
export default defineTool({
|
|
190
|
-
description:
|
|
191
|
-
"Post the review decision to GitHub: approve the pull request, or comment asking for a human review.",
|
|
156
|
+
description: "Approve the pull request, or comment asking for a human review.",
|
|
192
157
|
inputSchema: z.object({
|
|
193
|
-
prUrl: z
|
|
194
|
-
.string()
|
|
195
|
-
.describe("Pull request URL: https://github.com/owner/repo/pull/123"),
|
|
158
|
+
prUrl: z.string().describe("GitHub pull request URL"),
|
|
196
159
|
verdict: z.enum(["approve", "request_human_review"]),
|
|
197
|
-
summary: z
|
|
198
|
-
.string()
|
|
199
|
-
.describe("One or two sentences explaining the verdict."),
|
|
160
|
+
summary: z.string().describe("One or two sentences on why."),
|
|
200
161
|
}),
|
|
201
162
|
async execute({ prUrl, verdict, summary }, ctx) {
|
|
202
|
-
const
|
|
203
|
-
const [owner, repo, pulls, number] = url.pathname.split("/").filter(Boolean);
|
|
204
|
-
const pull_number = Number.parseInt(number ?? "", 10);
|
|
205
|
-
if (pulls !== "pull" || owner === undefined || Number.isNaN(pull_number)) {
|
|
206
|
-
throw new Error(`Not a pull request URL: ${prUrl}`);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const review =
|
|
210
|
-
verdict === "approve"
|
|
211
|
-
? { event: "APPROVE" as const, body: `PR reviewer: ${summary}` }
|
|
212
|
-
: {
|
|
213
|
-
event: "COMMENT" as const,
|
|
214
|
-
body: `PR reviewer: this change needs a human review. ${summary}`,
|
|
215
|
-
};
|
|
216
|
-
|
|
163
|
+
const approve = verdict === "approve";
|
|
217
164
|
const octokit = await ctx.host.github.getOctokit();
|
|
218
165
|
await octokit.rest.pulls.createReview({
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
event: review.event,
|
|
223
|
-
body: review.body,
|
|
166
|
+
...parsePrUrl(prUrl),
|
|
167
|
+
event: approve ? "APPROVE" : "COMMENT",
|
|
168
|
+
body: approve ? summary : `Human review needed. ${summary}`,
|
|
224
169
|
});
|
|
225
|
-
return { posted: true,
|
|
170
|
+
return { posted: true, verdict };
|
|
226
171
|
},
|
|
227
172
|
});
|
|
228
173
|
```
|
|
229
174
|
|
|
230
|
-
|
|
231
|
-
author.
|
|
175
|
+
You need GitHub write access and a pull request you didn't author.
|
|
232
176
|
|
|
233
177
|
## Review a pull request
|
|
234
178
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
```text
|
|
238
|
-
agent-sdk run --dir . \
|
|
239
|
-
--message "Review https://github.com/acme/checkout/pull/42"
|
|
179
|
+
```bash
|
|
180
|
+
agent-sdk run --dir . --message "Review https://github.com/acme/checkout/pull/42"
|
|
240
181
|
```
|
|
241
182
|
|
|
242
|
-
Confirm `inspect_pr` runs before `submit_review`, then
|
|
243
|
-
on GitHub.
|
|
183
|
+
Confirm `inspect_pr` runs before `submit_review`, then check the review on GitHub.
|
|
244
184
|
|
|
245
185
|
## Trigger reviews from GitHub
|
|
246
186
|
|
|
247
187
|
Create `bot/channels/github.ts`:
|
|
248
188
|
|
|
249
189
|
```ts
|
|
250
|
-
import {
|
|
251
|
-
defaultGitHubAuth,
|
|
252
|
-
githubChannel,
|
|
253
|
-
} from "@grok/agent-sdk/channels/github";
|
|
190
|
+
import { defaultGitHubAuth, githubChannel } from "@grok/agent-sdk/channels/github";
|
|
254
191
|
|
|
255
192
|
const REVIEW_ACTIONS = new Set(["opened", "reopened", "ready_for_review"]);
|
|
256
193
|
|
|
@@ -265,52 +202,26 @@ export default githubChannel({
|
|
|
265
202
|
return {
|
|
266
203
|
auth: defaultGitHubAuth(ctx),
|
|
267
204
|
title: `Review ${ctx.repository.fullName}#${pr.number}`,
|
|
268
|
-
context: [
|
|
269
|
-
`Review ${pr.url}. Inspect it first, then submit your verdict with submit_review.`,
|
|
270
|
-
],
|
|
205
|
+
context: [`Review ${pr.url}.`],
|
|
271
206
|
};
|
|
272
207
|
},
|
|
273
208
|
});
|
|
274
209
|
```
|
|
275
210
|
|
|
276
|
-
|
|
277
|
-
an array. The `context` label under `progress.commitStatus` is a separate
|
|
278
|
-
string option.
|
|
279
|
-
|
|
280
|
-
Keep `agent-sdk dev` running. In a second terminal, replay an open pull
|
|
281
|
-
request. Pull access is enough; repo admin isn't required:
|
|
211
|
+
With `agent-sdk dev` running, replay an open pull request. Pull access is enough:
|
|
282
212
|
|
|
283
|
-
```
|
|
284
|
-
agent-sdk github replay https://github.com/acme/checkout/pull/42
|
|
285
|
-
--dir . --action opened
|
|
213
|
+
```bash
|
|
214
|
+
agent-sdk github replay https://github.com/acme/checkout/pull/42 --dir . --action opened
|
|
286
215
|
```
|
|
287
216
|
|
|
288
|
-
Open the playground and confirm `Review acme/checkout#42`
|
|
289
|
-
trigger, both tool calls, and the verdict.
|
|
290
|
-
|
|
291
|
-
## Run options
|
|
292
|
-
|
|
293
|
-
1. **CLI message**
|
|
294
|
-
```text
|
|
295
|
-
agent-sdk run --dir . --message "Review https://github.com/acme/checkout/pull/42"
|
|
296
|
-
```
|
|
297
|
-
2. **Local replay**
|
|
298
|
-
```text
|
|
299
|
-
agent-sdk github replay https://github.com/acme/checkout/pull/42 \
|
|
300
|
-
--dir . --action opened
|
|
301
|
-
```
|
|
217
|
+
Open the playground and confirm `Review acme/checkout#42` shows both tool calls and the verdict.
|
|
302
218
|
|
|
303
219
|
## Deploy the reviewer
|
|
304
220
|
|
|
305
|
-
Follow [Deployment](./deployment.md)
|
|
221
|
+
Follow [Deployment](./deployment.md) to run `agent-sdk deploy`, then manage the reviewer in [Deployed Agents](https://cursor.com/dashboard/deployed-agents).
|
|
306
222
|
|
|
307
223
|
## Where to go next
|
|
308
224
|
|
|
309
|
-
-
|
|
310
|
-
|
|
311
|
-
- [
|
|
312
|
-
and direct calls
|
|
313
|
-
- [GitHub](./guides/github.md): fixtures, forwarding, and pulling
|
|
314
|
-
events from Cursor
|
|
315
|
-
- [Building agents with agents](./building-with-agents.md): have a
|
|
316
|
-
coding agent extend the project for you
|
|
225
|
+
- Turn these two PRs into regression checks with [Evals](./evals.md).
|
|
226
|
+
- Read about typed tools in [Tools](./reference/tools.md).
|
|
227
|
+
- Set up fixtures and forwarding with the [GitHub guide](./guides/github.md).
|
package/docs/reference/access.md
CHANGED
|
@@ -5,13 +5,7 @@ description: "Who can view, deploy, and manage a deployed bot."
|
|
|
5
5
|
|
|
6
6
|
# Access
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
A deployed bot has three access levels. [Deployed Agents](https://cursor.com/dashboard/deployed-agents) shows Viewer, Editor,
|
|
11
|
-
and Owner. The API returns `viewer`, `deployer`, and `admin`. `admin` is
|
|
12
|
-
Owner. A write also accepts `owner` for that role, and `editor` for Editor.
|
|
13
|
-
The response value for Owner becomes `owner` in a later change, after
|
|
14
|
-
[Deployed Agents](https://cursor.com/dashboard/deployed-agents) shows `owner`.
|
|
8
|
+
[Deployed Agents](https://cursor.com/dashboard/deployed-agents) calls the three access levels Viewer, Editor, and Owner, and the API calls them `viewer`, `deployer`, and `admin`. `admin` is Owner, and a write also accepts `owner` for that role and `editor` for Editor.
|
|
15
9
|
|
|
16
10
|
| Dashboard | API value | What it allows |
|
|
17
11
|
| --- | --- | --- |
|
|
@@ -19,9 +13,10 @@ The response value for Owner becomes `owner` in a later change, after
|
|
|
19
13
|
| Editor | `deployer` | Deploy, stop, and restart |
|
|
20
14
|
| Owner | `admin` | Editor, plus secrets and who else has access |
|
|
21
15
|
|
|
22
|
-
A
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
A new deploy gives the person who deployed it Owner and the team that owns the bot Viewer. Deploying that bot again does not change who has access. A team that already has access keeps it.
|
|
17
|
+
|
|
18
|
+
A deploy from a service account, such as CI, gives Owner to the person who created that account. The service account is not an Owner. If the account has no creating person, the team is Viewer and a team Admin can manage the bot.
|
|
19
|
+
|
|
20
|
+
A team Admin can manage every bot that team owns, including a bot the team can only view. The same person cannot manage a bot another team published, including a catalog bot installed into their team.
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
remove deploy, secrets, or access management until that team grant is narrowed.
|
|
22
|
+
An Owner changes who has access in [Deployed Agents](https://cursor.com/dashboard/deployed-agents).
|