@cursor/bdk 0.2.15 → 0.2.17
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 +2 -2
- package/dist/bin/agent-serve.js +41 -3
- package/dist/channels/github/index.d.ts +1 -1
- package/dist/channels/github/index.d.ts.map +1 -1
- package/dist/channels/github/index.js +1 -1
- package/dist/channels/slack/agentic-delivery.js +4 -4
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +7 -4
- package/dist/channels/slack/channel-watch.d.ts +2 -0
- package/dist/channels/slack/channel-watch.d.ts.map +1 -1
- package/dist/channels/slack/channel-watch.js +7 -3
- package/dist/channels/slack/dispatch.d.ts +3 -0
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +6 -2
- package/dist/channels/slack/thread-context.d.ts.map +1 -1
- package/dist/channels/slack/thread-context.js +58 -26
- package/dist/channels/slack/types.d.ts +19 -0
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/assets/{app.CRMxF0qX.js → app.CUNuFTSm.js} +4 -4
- package/dist/docs/assets/{building-with-agents.md.Bi9CQ-bR.js → building-with-agents.md.FZXrY8Nk.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.3c56VHUt.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.C4BiQe53.js → VPLocalSearchBox.Dez74k0W.js} +1 -1
- package/dist/docs/assets/chunks/{arc.D1TA2Mxn.js → arc.CJ3FhK7H.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CA-hBJCN.js → architectureDiagram-Q4EWVU46.CfUdbHsa.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.CzsSgiab.js → baseUniq.D93LawU9.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.sxrH_f0l.js → blockDiagram-DXYQGD6D.Zvsd6UHP.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.D_Z3mqAl.js → c4Diagram-AHTNJAMY.CGX5xZ9d.js} +1 -1
- package/dist/docs/assets/chunks/channel.S8-FFjmE.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.BS6_uTUf.js → chunk-4BX2VUAB.CCIf0QCo.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.D-URAeTU.js → chunk-4TB4RGXK.D_N1RPyi.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.b4SZc5kO.js → chunk-55IACEB6.B1oecjzx.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DLKEEDkN.js → chunk-EDXVE4YY.BzUNVPGX.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.3SyQHgpY.js → chunk-FMBD7UC4.DheI8WSO.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.DBKKaFeS.js → chunk-OYMX7WX6.Bg4iL0sM.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BhCYeR7H.js → chunk-QZHKN3VN.CSQjDhAD.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Cpg0VgI7.js → chunk-YZCP3GAM.BDdxnPU4.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.BB98tFjZ.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.BB98tFjZ.js +1 -0
- package/dist/docs/assets/chunks/clone.B98w8OEv.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.4q0YNZN6.js → cose-bilkent-S5V4N54A.AT0weO8r.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.Bk_CcQPr.js → dagre-KV5264BT.CJ30TxV0.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.CgreoM_Z.js → diagram-5BDNPKRD.KtE--1fW.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DlZGpm6W.js → diagram-G4DWMVQ6.BFGygSUQ.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BxtXxgIR.js → diagram-MMDJMWI5.BLU-79eb.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.DSzlJp2D.js → diagram-TYMM5635.CdjfJdVG.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BN1YUmEV.js → erDiagram-SMLLAGMA.Dj1Iwypl.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.B61NGNYu.js → flowDiagram-DWJPFMVM.BXqj_Su2.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.DR-tto3M.js → ganttDiagram-T4ZO3ILL.CNfgGSst.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CBPs2W_2.js → gitGraphDiagram-UUTBAWPF.2tgvFDBr.js} +1 -1
- package/dist/docs/assets/chunks/{graph.DmlaqzCE.js → graph.CWHZMxx6.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.obPv-fFg.js → infoDiagram-42DDH7IO.DhLIK8m1.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.CXHTUcM3.js → ishikawaDiagram-UXIWVN3A.BIN11n1G.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BoVHerYZ.js → journeyDiagram-VCZTEJTY.BARmNJ0n.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CfYmPHZg.js → kanban-definition-6JOO6SKY.BrTJYFyF.js} +1 -1
- package/dist/docs/assets/chunks/{layout.621UdAhB.js → layout.CPZIIywK.js} +1 -1
- package/dist/docs/assets/chunks/{linear.Cz_zRKjr.js → linear.DTpmzI5S.js} +1 -1
- package/dist/docs/assets/chunks/{min.ON4GjCH7.js → min.BBLQmXwZ.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DLPMLJlv.js → mindmap-definition-QFDTVHPH.5qkWJvdl.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BFp11AYt.js → pieDiagram-DEJITSTG.-4wufv_f.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.ChX7xo6B.js → quadrantDiagram-34T5L4WZ.C0jrp1-8.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.DbKtHG_Q.js → requirementDiagram-MS252O5E.DUDpANfe.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.Spw8tv-7.js → sankeyDiagram-XADWPNL6.74Lvg6Gu.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BYso9LlE.js → sequenceDiagram-FGHM5R23.BHDIH286.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.D8l54jqW.js → stateDiagram-FHFEXIEX.Dr-HIuLb.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DW_lwpZY.js +1 -0
- package/dist/docs/assets/chunks/{theme.m_Ethbkv.js → theme.H8zSBhlM.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.BLdhhyy9.js → timeline-definition-GMOUNBTQ.GtyCaSiL.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CyGT2F_P.js → vennDiagram-DHZGUBPP.DLId0rxH.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.C5JJS3bh.js → wardley-RL74JXVD.CSlECTHi.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.p_Sz9p1i.js → wardleyDiagram-NUSXRM2D.CI6mGYNG.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DtXsNUaf.js → xychartDiagram-5P7HB3ND.CG1n865F.js} +1 -1
- package/dist/docs/assets/{deployment.md.hKKN9I4c.js → deployment.md.ajc3VM0m.js} +1 -1
- package/dist/docs/assets/{guides_migrate.md.sCAvvlC6.js → guides_migrate.md.DZBL7dqT.js} +1 -1
- package/dist/docs/assets/index.md.CHAFTf6m.js +27 -0
- package/dist/docs/assets/index.md.CHAFTf6m.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.CduLGBAB.js → quickstart.md.D8JDfkKO.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.js → reference_agent-config.md.DYA6ge6t.js} +7 -4
- package/dist/docs/assets/{reference_agent-config.md.DrtLxWgR.lean.js → reference_agent-config.md.DYA6ge6t.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.BYNIHwbi.js → reference_cli.md.Bt3sAfat.js} +3 -3
- package/dist/docs/assets/{reference_evals.md.if--BLd0.js → reference_evals.md.Ccwp4x3o.js} +3 -3
- package/dist/docs/assets/{reference_evals.md.if--BLd0.lean.js → reference_evals.md.Ccwp4x3o.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.CrqhTv6S.js → reference_http-api.md.Dji-DD_Z.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.C2JMRh7p.js → reference_project-layout.md.SNzIvnmC.js} +1 -1
- package/dist/docs/building-with-agents.html +37 -37
- package/dist/docs/building-with-agents.md +4 -4
- package/dist/docs/deployment.html +37 -37
- package/dist/docs/deployment.md +3 -4
- package/dist/docs/evals.html +36 -36
- package/dist/docs/guides/agent-to-agent.html +36 -36
- package/dist/docs/guides/bitbucket.html +36 -36
- package/dist/docs/guides/cloud-agents.html +36 -36
- package/dist/docs/guides/convert-automation.html +36 -36
- package/dist/docs/guides/github.html +36 -36
- package/dist/docs/guides/gitlab.html +36 -36
- package/dist/docs/guides/grokbot-agents.html +36 -36
- package/dist/docs/guides/hooks.html +36 -36
- package/dist/docs/guides/improve.html +36 -36
- package/dist/docs/guides/jev.html +36 -36
- package/dist/docs/guides/mcp-oauth.html +36 -36
- package/dist/docs/guides/migrate.html +37 -37
- package/dist/docs/guides/migrate.md +3 -3
- package/dist/docs/guides/opentelemetry.html +36 -36
- package/dist/docs/guides/slack.html +36 -36
- package/dist/docs/guides/webhooks.html +36 -36
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +36 -36
- package/dist/docs/index.html +38 -38
- package/dist/docs/index.md +2 -2
- package/dist/docs/llms-full.txt +64 -28
- package/dist/docs/llms.txt +2 -2
- package/dist/docs/quickstart.html +37 -37
- package/dist/docs/quickstart.md +3 -3
- package/dist/docs/reference/agent-config.html +42 -39
- package/dist/docs/reference/agent-config.md +26 -1
- package/dist/docs/reference/artifacts.html +36 -36
- package/dist/docs/reference/channels.html +36 -36
- package/dist/docs/reference/cli.html +39 -39
- package/dist/docs/reference/cli.md +3 -3
- package/dist/docs/reference/connections.html +36 -36
- package/dist/docs/reference/evals.html +38 -38
- package/dist/docs/reference/evals.md +13 -0
- package/dist/docs/reference/extensions.html +36 -36
- package/dist/docs/reference/hooks.html +36 -36
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/http-api.md +4 -4
- package/dist/docs/reference/instructions.html +36 -36
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/project-layout.md +2 -3
- package/dist/docs/reference/prompt.html +36 -36
- package/dist/docs/reference/schedules.html +36 -36
- package/dist/docs/reference/sessions.html +36 -36
- package/dist/docs/reference/skills.html +36 -36
- package/dist/docs/reference/subagents.html +36 -36
- package/dist/docs/reference/tools.html +36 -36
- package/dist/docs/templates/agentic-owners.html +36 -36
- package/dist/docs/templates/grokbot-agents.html +36 -36
- package/dist/docs/templates/security-reviewer.html +36 -36
- package/dist/docs/templates/thermo-quality-review.html +36 -36
- package/dist/docs/templates/thermo-review.html +36 -36
- package/dist/docs/templates/triage.html +36 -36
- package/dist/docs/troubleshooting.html +36 -36
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +4 -8
- package/dist/internal/cli-convert-automation.js +9 -19
- package/dist/internal/cli-deploy.d.ts +1 -1
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +4 -3
- package/dist/internal/cli-init-grokbot.d.ts +29 -0
- package/dist/internal/cli-init-grokbot.d.ts.map +1 -0
- package/dist/internal/cli-init-grokbot.js +181 -0
- package/dist/internal/cli-slack.js +1 -1
- package/dist/internal/comment-safe.d.ts +8 -0
- package/dist/internal/comment-safe.d.ts.map +1 -0
- package/dist/internal/comment-safe.js +12 -0
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +2 -14
- package/dist/internal/convert-grokbot/answers.d.ts +127 -0
- package/dist/internal/convert-grokbot/answers.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/answers.js +443 -0
- package/dist/internal/convert-grokbot/bot.d.ts +50 -0
- package/dist/internal/convert-grokbot/bot.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/bot.js +72 -0
- package/dist/internal/convert-grokbot/checks.d.ts +26 -0
- package/dist/internal/convert-grokbot/checks.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/checks.js +170 -0
- package/dist/internal/convert-grokbot/convert.d.ts +60 -0
- package/dist/internal/convert-grokbot/convert.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/convert.js +470 -0
- package/dist/internal/convert-grokbot/handoff.d.ts +44 -0
- package/dist/internal/convert-grokbot/handoff.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/handoff.js +160 -0
- package/dist/internal/convert-grokbot/recipe.d.ts +61 -0
- package/dist/internal/convert-grokbot/recipe.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/recipe.js +94 -0
- package/dist/internal/convert-grokbot/routine.d.ts +51 -0
- package/dist/internal/convert-grokbot/routine.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/routine.js +128 -0
- package/dist/internal/convert-grokbot/slack.d.ts +28 -0
- package/dist/internal/convert-grokbot/slack.d.ts.map +1 -0
- package/dist/internal/convert-grokbot/slack.js +50 -0
- package/dist/internal/deploy-client.d.ts +0 -2
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +2 -11
- package/dist/internal/deploy-manifest.d.ts +6 -0
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +3 -0
- package/dist/internal/discovery/names.d.ts +2 -0
- package/dist/internal/discovery/names.d.ts.map +1 -1
- package/dist/internal/discovery/names.js +2 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +1 -3
- package/dist/internal/eval-judge-model.d.ts +10 -5
- package/dist/internal/eval-judge-model.d.ts.map +1 -1
- package/dist/internal/eval-judge-model.js +36 -25
- package/dist/internal/filesystem/subagent-inherit.d.ts +39 -0
- package/dist/internal/filesystem/subagent-inherit.d.ts.map +1 -0
- package/dist/internal/filesystem/subagent-inherit.js +96 -0
- package/dist/internal/filesystem/tools.d.ts +6 -0
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +38 -1
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +24 -1
- package/dist/internal/hosting.d.ts +1 -1
- package/dist/internal/hosting.d.ts.map +1 -1
- package/dist/internal/hosting.js +7 -3
- package/dist/internal/init-interview.d.ts +3 -5
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +15 -88
- package/dist/internal/init-project.d.ts +13 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +30 -37
- package/dist/internal/init-scaffold.d.ts +11 -0
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +48 -14
- package/dist/internal/interview/agent-questions.d.ts +19 -0
- package/dist/internal/interview/agent-questions.d.ts.map +1 -0
- package/dist/internal/interview/agent-questions.js +120 -0
- package/dist/internal/interview/question.d.ts +82 -0
- package/dist/internal/interview/question.d.ts.map +1 -0
- package/dist/internal/interview/question.js +198 -0
- package/dist/internal/local-control-plane.d.ts.map +1 -1
- package/dist/internal/local-control-plane.js +5 -1
- package/dist/internal/otel/collector.d.ts +2 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +4 -0
- package/dist/internal/peer-connections.d.ts +6 -0
- package/dist/internal/peer-connections.d.ts.map +1 -1
- package/dist/internal/peer-connections.js +9 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +2 -1
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +38 -14
- package/dist/internal/sdk-subagent-inherit-support.d.ts +9 -0
- package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -0
- package/dist/internal/sdk-subagent-inherit-support.js +89 -0
- package/dist/internal/session-engine.d.ts +13 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +59 -11
- package/dist/internal/{convert-automation/slug.d.ts → slug.d.ts} +4 -1
- package/dist/internal/slug.d.ts.map +1 -0
- package/dist/internal/{convert-automation/slug.js → slug.js} +11 -1
- package/dist/playground/assets/index-7fVUOA5l.css +1 -0
- package/dist/playground/assets/{index-DCsq6f_I.js → index-U3TRnwAP.js} +43 -43
- package/dist/playground/index.html +2 -2
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +4 -4
- package/docs/building-with-agents.md +4 -4
- package/docs/deployment.md +3 -4
- package/docs/guides/migrate.md +3 -3
- package/docs/quickstart.md +3 -3
- package/docs/reference/agent-config.md +26 -1
- package/docs/reference/cli.md +3 -3
- package/docs/reference/evals.md +13 -0
- package/docs/reference/http-api.md +4 -4
- package/docs/reference/project-layout.md +2 -3
- package/package.json +5 -4
- package/schemas/grokbot-answers.schema.json +343 -0
- package/skills/create-agent/SKILL.md +7 -5
- package/templates/agentic-owners/bot/lib/owners/handles.ts +1 -1
- package/templates/agentic-owners/bot/lib/owners/matching.ts +20 -9
- package/dist/docs/assets/chunks/@localSearchIndexroot.BZwvb2LN.js +0 -1
- package/dist/docs/assets/chunks/channel.D7DtboxW.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.irslOV8B.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.irslOV8B.js +0 -1
- package/dist/docs/assets/chunks/clone.DosLeDYL.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CAYMmzGj.js +0 -1
- package/dist/docs/assets/index.md.BIBHIQtU.js +0 -27
- package/dist/docs/assets/index.md.BIBHIQtU.lean.js +0 -1
- package/dist/internal/convert-automation/slug.d.ts.map +0 -1
- package/dist/playground/assets/index-BVYWBxLU.css +0 -1
- /package/dist/docs/assets/{building-with-agents.md.Bi9CQ-bR.lean.js → building-with-agents.md.FZXrY8Nk.lean.js} +0 -0
- /package/dist/docs/assets/{deployment.md.hKKN9I4c.lean.js → deployment.md.ajc3VM0m.lean.js} +0 -0
- /package/dist/docs/assets/{guides_migrate.md.sCAvvlC6.lean.js → guides_migrate.md.DZBL7dqT.lean.js} +0 -0
- /package/dist/docs/assets/{quickstart.md.CduLGBAB.lean.js → quickstart.md.D8JDfkKO.lean.js} +0 -0
- /package/dist/docs/assets/{reference_cli.md.BYNIHwbi.lean.js → reference_cli.md.Bt3sAfat.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.CrqhTv6S.lean.js → reference_http-api.md.Dji-DD_Z.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.C2JMRh7p.lean.js → reference_project-layout.md.SNzIvnmC.lean.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,c as i,o as
|
|
1
|
+
import{_ as e,c as i,o as t,a3 as a}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent config","description":"defineAgent at bot/agent.ts: the model, local workspace, and programmatic serving.","frontmatter":{"title":"Agent config","description":"defineAgent at bot/agent.ts: the model, local workspace, and programmatic serving."},"headers":[],"relativePath":"reference/agent-config.md","filePath":"reference/agent-config.md"}'),n={name:"reference/agent-config.md"};function o(l,s,d,h,r,p){return t(),i("div",null,[...s[0]||(s[0]=[a(`<h1 id="agent-config" tabindex="-1">Agent config <a class="header-anchor" href="#agent-config" aria-label="Permalink to "Agent config""></a></h1><p><code>bot/agent.ts</code> default-exports <code>defineAgent(config)</code>: which model runs the agent and its local harness defaults. Everything is optional on the root agent.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineAgent } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
2
2
|
<span class="line"></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> model: {</span></span>
|
|
@@ -8,13 +8,16 @@ import{_ as e,c as i,o as a,a3 as t}from"./chunks/framework.BNw1pucY.js";const k
|
|
|
8
8
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"fast"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, value: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"true"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
9
9
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
|
10
10
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }, </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// optional; this is the default</span></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="agent-fields" tabindex="-1">Agent fields <a class="header-anchor" href="#agent-fields" aria-label="Permalink to "Agent fields""></a></h2><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Meaning</th></tr></thead><tbody><tr><td><code>model</code></td><td>string or <code>{ id, params }</code></td><td>Cursor model for turns. Defaults to <code>grok-4.5</code> with <code>effort=high</code>, <code>fast=true</code> on the root agent. Subagents omit it to inherit.</td></tr><tr><td><code>name</code></td><td>string</td><td>Display name override. Defaults to the package name or directory name.</td></tr><tr><td><code>description</code></td><td>string</td><td>What the agent is for. Required on subagents; the parent model reads it to decide when to delegate. Documentation-only on the root.</td></tr><tr><td><code>instructions</code></td><td>string</td><td>Inline instructions. Prefer <code>instructions.md</code>; this exists for subagents and generated configs.</td></tr><tr><td><code>local</code></td><td><code>{ cwd?, workspaceDir?, sandbox? }</code></td><td>Local harness defaults. See <a href="#local-options">Local options</a>.</td></tr><tr><td><code>hosting</code></td><td><code>{ egressDomains?, secretNames? }</code></td><td>Managed-hosting declarations read by <code>bdk deploy</code>: the deployment's egress allowlist
|
|
11
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="agent-fields" tabindex="-1">Agent fields <a class="header-anchor" href="#agent-fields" aria-label="Permalink to "Agent fields""></a></h2><table tabindex="0"><thead><tr><th>Field</th><th>Type</th><th>Meaning</th></tr></thead><tbody><tr><td><code>model</code></td><td>string or <code>{ id, params }</code></td><td>Cursor model for turns. Defaults to <code>grok-4.5</code> with <code>effort=high</code>, <code>fast=true</code> on the root agent. Subagents omit it to inherit.</td></tr><tr><td><code>name</code></td><td>string</td><td>Display name override. Defaults to the package name or directory name.</td></tr><tr><td><code>description</code></td><td>string</td><td>What the agent is for. Required on subagents; the parent model reads it to decide when to delegate. Documentation-only on the root.</td></tr><tr><td><code>instructions</code></td><td>string</td><td>Inline instructions. Prefer <code>instructions.md</code>; this exists for subagents and generated configs.</td></tr><tr><td><code>local</code></td><td><code>{ cwd?, workspaceDir?, sandbox? }</code></td><td>Local harness defaults. See <a href="#local-options">Local options</a>.</td></tr><tr><td><code>persistent</code></td><td>boolean</td><td>Keep one long-lived runtime for the hosted deployment. Defaults to <code>false</code>. See <a href="#persistent-hosting">Persistent hosting</a>.</td></tr><tr><td><code>hosting</code></td><td><code>{ egressDomains?, secretNames?, image? }</code></td><td>Managed-hosting declarations read by <code>bdk deploy</code>: the deployment's egress allowlist, the secret names the agent expects, and a container image for a <a href="#persistent-hosting">persistent agent</a>. Mounted <a href="./extensions.html#build-an-extension">extensions</a> add their own. Ignored by local serving.</td></tr><tr><td><code>concurrency</code></td><td><code>{ maxRunningTurns? }</code></td><td>Agent-wide concurrent turn limit. See <a href="#concurrency">Concurrency</a>.</td></tr><tr><td><code>builtinTools</code></td><td><code>{ reminders? }</code></td><td>Framework-provided model-facing tools, opted in per capability. See <a href="#built-in-tools">Built-in tools</a>.</td></tr><tr><td><code>tools</code></td><td><code>ToolName[]</code></td><td>Allowlist of built-in harness tools offered to the model. Unset = the model's full standard toolset. See <a href="#harness-tools">Harness tools</a>.</td></tr></tbody></table><h2 id="model" tabindex="-1">Model <a class="header-anchor" href="#model" aria-label="Permalink to "Model""></a></h2><p><code>model</code> is a Cursor model id string, or <code>{ id, params }</code>. Effort and speed are params, not id suffixes. BDK rejects suffix-style ids like <code>grok-4.5-fast</code>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
|
|
12
12
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> id</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"grok-4.5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
13
13
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> params</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
|
|
14
14
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"effort"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, value: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"high"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
15
15
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { id: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"fast"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, value: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"true"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
16
16
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ],</span></span>
|
|
17
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>A plain string works when you don't need params:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"composer-2.5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span></code></pre></div><h2 id="local-options" tabindex="-1">Local options <a class="header-anchor" href="#local-options" aria-label="Permalink to "Local options""></a></h2><p><code>local</code> sets local-harness defaults.</p><p><code>local.workspaceDir</code> points every session at one shared harness cwd, for agents that work inside an existing checkout. It takes precedence over <code>cwd</code>, and a per-send <code>workspaceDir</code> still wins over both. Sessions share a working tree, so a file one turn writes is visible to the next.</p><p><code>local.sandbox</code> runs the harness inside Cursor's local sandbox. It's off by default: shell then auto-approves and inherits the serve process environment, including any credentials the host holds. Turn it on for agents whose turns read untrusted input (webhook payloads, PR diffs, inbound chat); it's a tool boundary, not a prompt-level one.</p><h3 id="local-cwd" tabindex="-1">Local cwd <a class="header-anchor" href="#local-cwd" aria-label="Permalink to "Local cwd""></a></h3><p><code>local.cwd</code> sets the parent directory for local harness workspaces. Each session uses <code><cwd>/<sessionId></code> unless a per-send <code>workspaceDir</code> overrides it.</p><p>Session workspaces are real Cursor project directories. The harness loads <code>AGENTS.md</code> and <code>.cursor</code> config from ancestor directories. An agent nested in another git repo (a monorepo package) defaults to a per-project cache directory under <code>~/.cache</code> when you omit <code>cwd</code>, so the enclosing checkout does not leak rules, skills, or MCP servers into the turn. A standalone git root keeps the in-project session workspace. Point <code>cwd</code> at a checkout only when the agent should inherit that tree.</p><h2 id="
|
|
17
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p>A plain string works when you don't need params:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">model</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"composer-2.5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span></code></pre></div><h2 id="local-options" tabindex="-1">Local options <a class="header-anchor" href="#local-options" aria-label="Permalink to "Local options""></a></h2><p><code>local</code> sets local-harness defaults.</p><p><code>local.workspaceDir</code> points every session at one shared harness cwd, for agents that work inside an existing checkout. It takes precedence over <code>cwd</code>, and a per-send <code>workspaceDir</code> still wins over both. Sessions share a working tree, so a file one turn writes is visible to the next.</p><p><code>local.sandbox</code> runs the harness inside Cursor's local sandbox. It's off by default: shell then auto-approves and inherits the serve process environment, including any credentials the host holds. Turn it on for agents whose turns read untrusted input (webhook payloads, PR diffs, inbound chat); it's a tool boundary, not a prompt-level one.</p><h3 id="local-cwd" tabindex="-1">Local cwd <a class="header-anchor" href="#local-cwd" aria-label="Permalink to "Local cwd""></a></h3><p><code>local.cwd</code> sets the parent directory for local harness workspaces. Each session uses <code><cwd>/<sessionId></code> unless a per-send <code>workspaceDir</code> overrides it.</p><p>Session workspaces are real Cursor project directories. The harness loads <code>AGENTS.md</code> and <code>.cursor</code> config from ancestor directories. An agent nested in another git repo (a monorepo package) defaults to a per-project cache directory under <code>~/.cache</code> when you omit <code>cwd</code>, so the enclosing checkout does not leak rules, skills, or MCP servers into the turn. A standalone git root keeps the in-project session workspace. Point <code>cwd</code> at a checkout only when the agent should inherit that tree.</p><h2 id="persistent-hosting" tabindex="-1">Persistent hosting <a class="header-anchor" href="#persistent-hosting" aria-label="Permalink to "Persistent hosting""></a></h2><p>By default, a hosted deployment starts a runtime when an event arrives and stops it when the work ends. Set <code>persistent: true</code> to keep one long-lived runtime for the deployment instead, with its state directory on the runtime's own disk. On a redeploy, the new version starts beside the old one on the same state, and the old version stops after the new one takes over. Each team can have one persistent deployment. Local serving ignores the flag.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
18
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> persistent: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
19
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> hosting: { image: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"incident-bot-base"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
20
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p><code>hosting.image</code> names a container image that your team pushed with <code>bdk images push</code>. The agent runs inside that image instead of the default Node 22 image. Only persistent agents can use it, and <code>deploy</code> rejects <code>hosting.image</code> on any other agent. A deploy pins the image it finds, so after you push a new image under the same name, deploy again to pick it up.</p><h2 id="harness-tools" tabindex="-1">Harness tools <a class="header-anchor" href="#harness-tools" aria-label="Permalink to "Harness tools""></a></h2><p>Use <code>tools</code> to limit which built-in Cursor harness tools the model can call. Omit it to keep the standard toolset. When you set it, the model gets only the tools you list. An empty list disables all native built-in tools. New platform tools stay disabled until you add them.</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineAgent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
18
21
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> model: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"composer-2.5"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
19
22
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // Read-only triage agent: search and read only.</span></span>
|
|
20
23
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // No shell, no edits, no subagents.</span></span>
|
|
@@ -29,4 +32,4 @@ import{_ as e,c as i,o as a,a3 as t}from"./chunks/framework.BNw1pucY.js";const k
|
|
|
29
32
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span>
|
|
30
33
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">console.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">log</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`listening on \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">handle</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">url</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
31
34
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// handle.callTool(...), handle.dispatchSchedule("heartbeat"),</span></span>
|
|
32
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// handle.createReminder(...), handle.project, await handle.close()</span></span></code></pre></div><p>Host settings match the documented <a href="./cli.html">CLI</a> <code>serve</code> flags. <code>serve()</code> also accepts <code>discovery</code> (project-loading options) and <code>mode: "single" | "multi"</code>. Pass <code>apiKey</code> or use the same Cursor credential as the CLI: <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, or <code>bdk login</code>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./instructions.html">Instructions</a>: the required half of a minimal agent</li><li><a href="./cli.html">CLI</a>: the <code>serve</code> flags <code>serve()</code> accepts</li><li><a href="./sessions.html">Sessions</a>: workspaces, identifiers, and turn admission</li><li><a href="./schedules.html">Schedules</a>: reminder tools opted in here</li></ul>`,
|
|
35
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// handle.createReminder(...), handle.project, await handle.close()</span></span></code></pre></div><p>Host settings match the documented <a href="./cli.html">CLI</a> <code>serve</code> flags. <code>serve()</code> also accepts <code>discovery</code> (project-loading options) and <code>mode: "single" | "multi"</code>. Pass <code>apiKey</code> or use the same Cursor credential as the CLI: <code>CURSOR_API_KEY</code>, <code>CURSOR_API_KEY_FILE</code>, <code>CURSOR_SERVICE_ACCOUNT_KEY</code>, or <code>bdk login</code>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./instructions.html">Instructions</a>: the required half of a minimal agent</li><li><a href="./cli.html">CLI</a>: the <code>serve</code> flags <code>serve()</code> accepts</li><li><a href="./sessions.html">Sessions</a>: workspaces, identifiers, and turn admission</li><li><a href="./schedules.html">Schedules</a>: reminder tools opted in here</li></ul>`,41)])])}const u=e(n,[["render",o]]);export{k as __pageData,u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as i,o as
|
|
1
|
+
import{_ as e,c as i,o as t,a3 as a}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Agent config","description":"defineAgent at bot/agent.ts: the model, local workspace, and programmatic serving.","frontmatter":{"title":"Agent config","description":"defineAgent at bot/agent.ts: the model, local workspace, and programmatic serving."},"headers":[],"relativePath":"reference/agent-config.md","filePath":"reference/agent-config.md"}'),n={name:"reference/agent-config.md"};function o(l,s,d,h,r,p){return t(),i("div",null,[...s[0]||(s[0]=[a("",41)])])}const u=e(n,[["render",o]]);export{k as __pageData,u as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to "BDK CLI""></a></h1><p>The Grok Bot Development Kit (BDK) uses the <code>@cursor/bdk</code> package and <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk <command></span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to "Command catalog""></a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to "Development commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to "Session and eval commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent's playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to "Managed hosting commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#start"><code>start</code></a></td><td>Start a stopped deployment</td></tr><tr><td><a href="#kill"><code>kill</code></a></td><td>Stop a deployment, cancel its runs, and lock deploys</td></tr><tr><td><a href="#unlock-deploys"><code>unlock-deploys</code></a></td><td>Let a killed deployment deploy again</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment's event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#rollback"><code>rollback</code></a></td><td>Move a deployment to an earlier release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment's alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr><tr><td><a href="#images"><code>images</code></a></td><td>Push, list, or remove container images for persistent agents</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to "Connection and channel commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent's MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to "Targets {#choose-a-target}""></a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url <baseUrl></code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>logs</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir <path></code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url <baseUrl></code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, <code>logs</code>, and <code>playground</code> accept it; <code>chat</code>, <code>resume</code>, <code>call</code>, <code>skill</code>, <code>sessions</code>, <code>cost</code>, and <code>mcp</code> report that the deployment doesn't support the command, and <code>eval</code> rejects the flag.</td></tr><tr><td><code>--slug <slug></code></td><td>Select an agent from a multi-agent project or a hosted deployment. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team <id></code></td><td>Select a Cursor team. The signed-in account's team is the default.</td></tr><tr><td><code>--api-key <key></code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token <token></code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root <path></code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to "Local servers""></a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to "Serve agents {#serve}""></a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir <path>] [--port <n>] [--host <host>]</span></span>
|
|
1
|
+
import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status.","frontmatter":{"title":"CLI","description":"Look up BDK commands, targets, flags, outputs, and exit status."},"headers":[],"relativePath":"reference/cli.md","filePath":"reference/cli.md"}'),d={name:"reference/cli.md"};function n(c,e,r,i,l,p){return o(),a("div",null,[...e[0]||(e[0]=[s(`<h1 id="bdk-cli" tabindex="-1">BDK CLI <a class="header-anchor" href="#bdk-cli" aria-label="Permalink to "BDK CLI""></a></h1><p>The Bot Development Kit (BDK) is published as <code>@cursor/bdk</code> with the <code>bdk</code> CLI.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk <command></span></span></code></pre></div><p>The command catalog below documents the <code>bdk</code> binary from <code>@cursor/bdk</code>. Run it with Node 22.13 or newer; Bun is not supported. Commands exit nonzero when validation or a synchronous request fails; asynchronous commands can exit <code>0</code> once work is accepted. Project paths use the <a href="./project-layout.html">BDK project layout</a>.</p><p>Install <code>@cursor/bdk</code> to obtain the binary. <code>bdk help</code> prints top-level help; the Slack, GitHub, GitLab, and Bitbucket command packs provide their own <code>help</code> subcommands.</p><h2 id="command-catalog" tabindex="-1">Command catalog <a class="header-anchor" href="#command-catalog" aria-label="Permalink to "Command catalog""></a></h2><h3 id="development-commands" tabindex="-1">Development commands <a class="header-anchor" href="#development-commands" aria-label="Permalink to "Development commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><code>help</code>, <code>--help</code>, <code>-h</code></td><td>Print top-level help</td></tr><tr><td><a href="#serve"><code>serve</code></a></td><td>Serve one or more agents over HTTP</td></tr><tr><td><a href="#dev"><code>dev</code></a></td><td>Serve agents with local-development behavior</td></tr><tr><td><a href="#docs"><code>docs</code></a></td><td>Serve the documentation bundled with <code>@cursor/bdk</code></td></tr><tr><td><a href="#init"><code>init</code></a></td><td>Scaffold a BDK project</td></tr><tr><td><a href="#convert-automation"><code>convert-automation</code></a></td><td>Export a Cursor Automation into a project</td></tr><tr><td><a href="#migrate"><code>migrate</code></a></td><td>Move an early-alpha project to architecture v2 through a pull request</td></tr><tr><td><a href="#install-skills"><code>install-skills</code></a></td><td>Refresh the bundled coding-agent skills</td></tr><tr><td><a href="#info"><code>info</code></a></td><td>Print the discovered project surface</td></tr><tr><td><a href="#validate"><code>validate</code></a></td><td>Check project diagnostics and set the exit status</td></tr><tr><td><a href="#manifest"><code>manifest</code></a></td><td>Print deployment metadata as JSON</td></tr><tr><td><a href="#version"><code>version</code></a></td><td>Print the installed package version</td></tr><tr><td><a href="#update"><code>update</code></a></td><td>Upgrade the installed CLI</td></tr><tr><td><a href="#login-logout-whoami"><code>login</code></a></td><td>Sign the host in to Cursor</td></tr><tr><td><a href="#login-logout-whoami"><code>logout</code></a></td><td>Remove the stored Cursor credential</td></tr><tr><td><a href="#login-logout-whoami"><code>whoami</code></a></td><td>Show the active Cursor credential</td></tr></tbody></table><h3 id="session-and-eval-commands" tabindex="-1">Session and eval commands <a class="header-anchor" href="#session-and-eval-commands" aria-label="Permalink to "Session and eval commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#chat"><code>chat</code></a></td><td>Talk to a running agent</td></tr><tr><td><a href="#resume"><code>resume</code></a></td><td>Reattach chat to a previous session</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>Start or continue work on a local, running, or hosted agent</td></tr><tr><td><a href="#call"><code>call</code></a></td><td>Call a server tool without a model turn</td></tr><tr><td><a href="#skill"><code>skill</code></a></td><td>Read an authored skill without a model turn</td></tr><tr><td><a href="#logs"><code>logs</code></a></td><td>Follow or dump agent logs</td></tr><tr><td><a href="#sessions"><code>sessions</code></a></td><td>List sessions</td></tr><tr><td><a href="#session"><code>session</code></a></td><td>Inspect a session or start a hosted session turn</td></tr><tr><td><a href="#cost"><code>cost</code></a></td><td>Report token usage and estimated cost</td></tr><tr><td><a href="#playground"><code>playground</code></a></td><td>Open an agent's playground</td></tr><tr><td><a href="#trajectory"><code>trajectory</code></a></td><td>Summarize a saved event stream</td></tr><tr><td><a href="#eval"><code>eval</code></a></td><td>List, run, inspect, or cancel evals</td></tr></tbody></table><h3 id="managed-hosting-commands" tabindex="-1">Managed hosting commands <a class="header-anchor" href="#managed-hosting-commands" aria-label="Permalink to "Managed hosting commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#deploy"><code>deploy</code></a></td><td>Deploy one or more agents</td></tr><tr><td><a href="#deployments"><code>deployments</code></a></td><td>List deployments</td></tr><tr><td><a href="#deployment"><code>deployment</code></a></td><td>Inspect one deployment</td></tr><tr><td><a href="#stop"><code>stop</code></a></td><td>Stop a deployment</td></tr><tr><td><a href="#start"><code>start</code></a></td><td>Start a stopped deployment</td></tr><tr><td><a href="#kill"><code>kill</code></a></td><td>Stop a deployment, cancel its runs, and lock deploys</td></tr><tr><td><a href="#unlock-deploys"><code>unlock-deploys</code></a></td><td>Let a killed deployment deploy again</td></tr><tr><td><a href="#cancel-runs"><code>cancel-runs</code></a></td><td>Cancel active runs and reminder wakes</td></tr><tr><td><a href="#event-repos"><code>event-repos</code></a></td><td>Replace a deployment's event repositories</td></tr><tr><td><a href="#upgrade"><code>upgrade</code></a></td><td>Move a deployment to a release</td></tr><tr><td><a href="#rollback"><code>rollback</code></a></td><td>Move a deployment to an earlier release</td></tr><tr><td><a href="#delete"><code>delete</code></a></td><td>Delete a deployment</td></tr><tr><td><a href="#rotate-token"><code>rotate-token</code></a></td><td>Replace a deployment's alias token</td></tr><tr><td><a href="#secrets"><code>secrets</code></a></td><td>Set, list, or remove deployment secrets</td></tr><tr><td><a href="#images"><code>images</code></a></td><td>Push, list, or remove container images for persistent agents</td></tr></tbody></table><h3 id="connection-and-channel-commands" tabindex="-1">Connection and channel commands <a class="header-anchor" href="#connection-and-channel-commands" aria-label="Permalink to "Connection and channel commands""></a></h3><table tabindex="0"><thead><tr><th>Command</th><th>Contract</th></tr></thead><tbody><tr><td><a href="#mcp"><code>mcp</code></a></td><td>Proxy an agent's MCP endpoint over stdio</td></tr><tr><td><a href="#mcp"><code>mcp install</code></a></td><td>Add the agent to an MCP client config</td></tr><tr><td><a href="#mcp-oauth"><code>mcp oauth</code></a></td><td>Authorize an MCP connection</td></tr><tr><td><a href="#slack"><code>slack</code></a></td><td>Provision and check Slack channel apps</td></tr><tr><td><a href="#github"><code>github</code></a></td><td>Forward, replay, and inspect GitHub webhooks</td></tr><tr><td><a href="#gitlab"><code>gitlab</code></a></td><td>Replay and inspect GitLab webhooks</td></tr><tr><td><a href="#bitbucket"><code>bitbucket</code></a></td><td>Replay and inspect Bitbucket webhooks</td></tr></tbody></table><h2 id="choose-a-target" tabindex="-1">Targets <a class="header-anchor" href="#choose-a-target" aria-label="Permalink to "Targets {#choose-a-target}""></a></h2><p>Commands that send requests support these targets:</p><table tabindex="0"><thead><tr><th>Target</th><th>Selection</th><th>Commands</th></tr></thead><tbody><tr><td>Ephemeral local server</td><td>Omit <code>--url</code> and <code>--prod</code></td><td><code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code></td></tr><tr><td>Running server</td><td>Pass <code>--url <baseUrl></code></td><td><code>chat</code>, <code>resume</code>, <code>run</code>, <code>call</code>, <code>skill</code>, <code>eval</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code>, <code>mcp</code></td></tr><tr><td>Default local server</td><td>Omit <code>--url</code> and <code>--prod</code>; uses <code>http://127.0.0.1:3000</code></td><td><code>chat</code>, <code>resume</code>, <code>logs</code>, <code>sessions</code>, <code>session</code>, <code>cost</code>, <code>playground</code></td></tr><tr><td>Hosted deployment</td><td>Pass <code>--prod</code></td><td><code>run</code>, <code>session</code>, <code>logs</code>, <code>playground</code></td></tr></tbody></table><p>An explicit <code>--url</code> must include the slug for a multi-agent server, such as <code>http://127.0.0.1:3000/pr-approver</code>. <code>--slug</code> never changes an explicit URL. <code>--url</code> and <code>--prod</code> are mutually exclusive.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--dir <path></code></td><td>Select the project root. The default is the current directory.</td></tr><tr><td><code>--url <baseUrl></code></td><td>Use a running agent instead of local project discovery.</td></tr><tr><td><code>--prod</code></td><td>Use the hosted deployment. Only <code>run</code>, <code>session</code>, <code>logs</code>, and <code>playground</code> accept it; <code>chat</code>, <code>resume</code>, <code>call</code>, <code>skill</code>, <code>sessions</code>, <code>cost</code>, and <code>mcp</code> report that the deployment doesn't support the command, and <code>eval</code> rejects the flag.</td></tr><tr><td><code>--slug <slug></code></td><td>Select an agent from a multi-agent project or a hosted deployment. Under <code>--prod</code>, the default is the <code>--dir</code> basename.</td></tr><tr><td><code>--team <id></code></td><td>Select a Cursor team. The signed-in account's team is the default.</td></tr><tr><td><code>--api-key <key></code></td><td>Override the Cursor credential for commands that authenticate with Cursor.</td></tr><tr><td><code>--bearer-token <token></code></td><td>Authenticate to a running server with a bearer token.</td></tr><tr><td><code>--state-root <path></code></td><td>Select local state for <code>serve</code> and ephemeral <code>run</code>, <code>call</code>, <code>skill</code>, and <code>eval</code> targets. Running and <code>--prod</code> targets ignore it.</td></tr><tr><td><code>--json</code></td><td>Request machine-readable output when the command supports it. <code>run</code> already defaults to JSON.</td></tr></tbody></table><h2 id="local-servers" tabindex="-1">Local servers <a class="header-anchor" href="#local-servers" aria-label="Permalink to "Local servers""></a></h2><h3 id="serve" tabindex="-1">Serve agents <a class="header-anchor" href="#serve" aria-label="Permalink to "Serve agents {#serve}""></a></h3><p><code>serve</code> mounts every project discovered under <code>--dir</code>:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk serve [--dir <path>] [--port <n>] [--host <host>]</span></span>
|
|
2
2
|
<span class="line"><span> [--mode multi|single] [--dev] [--api-key <key>]</span></span>
|
|
3
3
|
<span class="line"><span> [--state-root <path>]</span></span>
|
|
4
4
|
<span class="line"><span> [--bearer-token <secret> | --allow-anonymous]</span></span>
|
|
@@ -42,8 +42,8 @@ import{_ as t,c as a,o,a3 as s}from"./chunks/framework.BNw1pucY.js";const u=JSON
|
|
|
42
42
|
<span class="line"><span>bdk --version</span></span>
|
|
43
43
|
<span class="line"><span>bdk -V</span></span></code></pre></div><p>Text output is the version number. <code>--json</code> prints <code>{ name, version }</code>.</p><h3 id="update" tabindex="-1">Update the CLI <a class="header-anchor" href="#update" aria-label="Permalink to "Update the CLI {#update}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk update</span></span></code></pre></div><p><code>update</code> checks npm's <code>latest</code> tag and upgrades a recognized global or project install with its package manager. If it can't identify an installed copy, it prints a manual upgrade command instead.</p><p>Published installs check for updates at most once every 24 hours. Set <code>AGENT_SERVE_NO_UPDATE_CHECK</code>, <code>NO_UPDATE_NOTIFIER</code>, or <code>CI</code> to disable the automatic warning.</p><h2 id="managed-hosting" tabindex="-1">Managed hosting <a class="header-anchor" href="#managed-hosting" aria-label="Permalink to "Managed hosting""></a></h2><h3 id="deploy" tabindex="-1">Deploy agents <a class="header-anchor" href="#deploy" aria-label="Permalink to "Deploy agents {#deploy}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]</span></span>
|
|
44
44
|
<span class="line"><span> [--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]</span></span>
|
|
45
|
-
<span class="line"><span> [--cursor-events-repo <
|
|
46
|
-
<span class="line"><span> [--allow-domain <domain>]... [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires a team with agent hosting enabled. A team service-account API key with agent access can deploy.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--slug <slug></code></td><td>Select one project and set its deployment slug.</td></tr><tr><td><code>--all</code></td><td>Deploy every child project under a multi-agent <code>--dir</code>. Mutually exclusive with <code>--slug</code>.</td></tr><tr><td><code>--team <id></code></td><td>Select the Cursor team.</td></tr><tr><td><code>--repo <https-url></code></td><td>Set the source repository. The CLI infers it from the current checkout when possible. HTTPS is required.</td></tr><tr><td><code>--ref <git-ref></code></td><td>Set the source Git ref. The CLI infers the current branch when possible.</td></tr><tr><td><code>--path <agent-path></code></td><td>Set the project path relative to the repository root.</td></tr><tr><td><code>--cursor-events-repo <
|
|
45
|
+
<span class="line"><span> [--cursor-events-repo <repo>]...</span></span>
|
|
46
|
+
<span class="line"><span> [--allow-domain <domain>]... [--no-wait] [--json]</span></span></code></pre></div><p>Managed hosting requires a team with agent hosting enabled. A team service-account API key with agent access can deploy.</p><table tabindex="0"><thead><tr><th>Option</th><th>Contract</th></tr></thead><tbody><tr><td><code>--slug <slug></code></td><td>Select one project and set its deployment slug.</td></tr><tr><td><code>--all</code></td><td>Deploy every child project under a multi-agent <code>--dir</code>. Mutually exclusive with <code>--slug</code>.</td></tr><tr><td><code>--team <id></code></td><td>Select the Cursor team.</td></tr><tr><td><code>--repo <https-url></code></td><td>Set the source repository. The CLI infers it from the current checkout when possible. HTTPS is required.</td></tr><tr><td><code>--ref <git-ref></code></td><td>Set the source Git ref. The CLI infers the current branch when possible.</td></tr><tr><td><code>--path <agent-path></code></td><td>Set the project path relative to the repository root.</td></tr><tr><td><code>--cursor-events-repo <repo></code></td><td>Watch a repository's Cursor events. Write <code>owner/name</code> for GitHub and Origin, <code>gitlab.com/<group>/<project></code> for GitLab (subgroups allowed), or <code>bitbucket.org/<workspace>/<repo></code> for Bitbucket. Repeat the flag for each repository; the repositories you pass replace the previous list. Without the flag, the deployment watches its GitHub source repository.</td></tr><tr><td><code>--allow-domain <domain></code></td><td>Add an egress hostname. Repeat for multiple domains; values are combined with <code>hosting.egressDomains</code>.</td></tr><tr><td><code>--no-wait</code></td><td>Return after the deployment request is accepted.</td></tr><tr><td><code>--json</code></td><td>Print one object for one target or an array for multiple targets.</td></tr></tbody></table><p>Deployment slugs contain lowercase letters, digits, <code>_</code>, or <code>-</code>, start with a letter or digit, and have at most 64 characters. Egress entries are lowercase hostnames with an alphabetic top-level domain; one leading <code>*.</code> wildcard is allowed, or a trailing <code>:port</code> for a protocol that is not HTTPS, with at most 64 entries.</p><p>By default, <code>deploy</code> waits until the deployment is running and exits nonzero if it reaches a failed state. A first deployment can return an alias token once. Store it as a secret and send it as <code>X-Agent-Alias-Token</code> when calling the stable alias URL.</p><h3 id="deployments" tabindex="-1">List deployments <a class="header-anchor" href="#deployments" aria-label="Permalink to "List deployments {#deployments}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployments [--team <id>] [--json]</span></span></code></pre></div><p>Text output shows slug, status, generation, kind, and update time. <code>--json</code> prints <code>{ deployments }</code>. An empty list succeeds.</p><h3 id="deployment" tabindex="-1">Inspect a deployment <a class="header-anchor" href="#deployment" aria-label="Permalink to "Inspect a deployment {#deployment}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk deployment <slug> [--team <id>] [--json]</span></span></code></pre></div><p>Text output includes status, source, routes, secret names, egress domains, and the latest error. <code>--json</code> can include short-lived access headers, so handle its output as a credential.</p><h3 id="stop" tabindex="-1">Stop a deployment <a class="header-anchor" href="#stop" aria-label="Permalink to "Stop a deployment {#stop}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk stop <slug> [--team <id>] [--no-wait] [--cancel-runs] [--json]</span></span></code></pre></div><p>The command waits for <code>stopped</code> by default. <code>--no-wait</code> returns after the request is accepted. <code>--cancel-runs</code> also requests cancellation of active runs and reminder wakes.</p><h3 id="start" tabindex="-1">Start a deployment <a class="header-anchor" href="#start" aria-label="Permalink to "Start a deployment {#start}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk start <slug> [--team <id>] [--json]</span></span></code></pre></div><p><code>start</code> resumes a stopped deployment. It doesn't remove the deploy lock that <a href="#kill"><code>kill</code></a> sets.</p><h3 id="kill" tabindex="-1">Kill a deployment <a class="header-anchor" href="#kill" aria-label="Permalink to "Kill a deployment {#kill}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk kill <slug> [--team <id>] [--json]</span></span></code></pre></div><p>Use <code>kill</code> in an emergency. It locks deploys of the slug, stops the deployment, and requests cancellation of its active runs and reminder wakes. To bring the deployment back, run <a href="#unlock-deploys"><code>unlock-deploys</code></a> and then <a href="#start"><code>start</code></a>.</p><h3 id="unlock-deploys" tabindex="-1">Unlock deploys <a class="header-anchor" href="#unlock-deploys" aria-label="Permalink to "Unlock deploys {#unlock-deploys}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk unlock-deploys <slug> [--team <id>] [--json]</span></span></code></pre></div><p><code>unlock-deploys</code> removes the lock that <code>kill</code> sets, so <code>deploy</code>, <code>upgrade</code>, and <code>rollback</code> work for the slug again. It doesn't resume traffic; run <code>start</code> for that.</p><h3 id="cancel-runs" tabindex="-1">Cancel active runs <a class="header-anchor" href="#cancel-runs" aria-label="Permalink to "Cancel active runs {#cancel-runs}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk cancel-runs <slug> [--team <id>] [--json]</span></span></code></pre></div><p>The command requests cancellation for a deployment's active runs and reminder wakes. It exits nonzero if any cancellation request fails to start.</p><h3 id="event-repos" tabindex="-1">Replace event repositories <a class="header-anchor" href="#event-repos" aria-label="Permalink to "Replace event repositories {#event-repos}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk event-repos <slug> [--repo <owner/name>]...</span></span>
|
|
47
47
|
<span class="line"><span> [--team <id>] [--json]</span></span></code></pre></div><p>The supplied repositories replace the deployment's complete event repository list; they aren't merged with the previous list. Omit <code>--repo</code> to clear the list.</p><h3 id="upgrade" tabindex="-1">Upgrade a deployment <a class="header-anchor" href="#upgrade" aria-label="Permalink to "Upgrade a deployment {#upgrade}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk upgrade <slug> [--release <id-or-version>]</span></span>
|
|
48
48
|
<span class="line"><span> [--team <id>] [--json]</span></span></code></pre></div><p><code>--release</code> accepts a release ID or version. Omit it to select the newest ready release. <code>--json</code> prints <code>{ releaseId }</code>.</p><h3 id="rollback" tabindex="-1">Roll back a deployment <a class="header-anchor" href="#rollback" aria-label="Permalink to "Roll back a deployment {#rollback}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk rollback <slug> [--release <id-or-version>]</span></span>
|
|
49
49
|
<span class="line"><span> [--team <id>] [--json]</span></span></code></pre></div><p><code>rollback</code> moves the deployment to an earlier ready release without building a new one. Omit <code>--release</code> to select the release before the current one. <code>--json</code> prints <code>{ releaseId }</code>.</p><h3 id="delete" tabindex="-1">Delete a deployment <a class="header-anchor" href="#delete" aria-label="Permalink to "Delete a deployment {#delete}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk delete <slug> [--team <id>] [--no-wait] [--json]</span></span></code></pre></div><p><code>delete</code> removes the deployment and frees its slug. It waits until the deployment is gone unless <code>--no-wait</code> is set.</p><h3 id="rotate-token" tabindex="-1">Rotate an alias token <a class="header-anchor" href="#rotate-token" aria-label="Permalink to "Rotate an alias token {#rotate-token}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk rotate-token <slug> [--team <id>] [--json]</span></span></code></pre></div><p>The old token stops working immediately. The replacement appears once; <code>--json</code> prints <code>{ aliasToken }</code>.</p><h3 id="secrets" tabindex="-1">Manage deployment secrets <a class="header-anchor" href="#secrets" aria-label="Permalink to "Manage deployment secrets {#secrets}""></a></h3><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk secrets set <slug> NAME [NAME2 ...]</span></span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p
|
|
1
|
+
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,o,p){return i(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="evals" tabindex="-1">Evals <a class="header-anchor" href="#evals" aria-label="Permalink to "Evals""></a></h1><p>Evals run fixed cases against an agent and record whether its turns, tools, events, and output meet a contract. Files under the project-root <code>evals/</code> directory define cases with <code>@cursor/bdk/evals</code>; the runner discovers their IDs, executes them, and reports every assertion. See the <a href="./../evals.html">Evals guide</a> for the regression workflow.</p><h2 id="eval-discovery-and-case-ids" tabindex="-1">Eval discovery and case IDs <a class="header-anchor" href="#eval-discovery-and-case-ids" aria-label="Permalink to "Eval discovery and case IDs""></a></h2><p>Eval files live under the project-root <code>evals/</code> directory and end in <code>.eval.ts</code> or <code>.eval.js</code>. The path under that directory becomes the eval ID:</p><ul><li><code>evals/readiness.eval.ts</code> becomes <code>readiness</code>.</li><li><code>evals/builds/api.eval.ts</code> becomes <code>builds/api</code>.</li><li><code>evals/builds/index.eval.ts</code> becomes <code>builds</code>.</li></ul><p>Export one <code>defineEval</code> with either <code>test</code> or <code>cases</code>, not both. A case ID appends one path segment to the file ID:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> defineEval</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> tags: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"smoke"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">],</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> cases: [</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
@@ -32,7 +32,7 @@ import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k
|
|
|
32
32
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">closedQA</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"names the failing step"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><ul><li><code>.gate(threshold?)</code> fails the case when it misses.</li><li><code>.soft(threshold?)</code> records a value without failing.</li><li><code>.atLeast(threshold)</code> records a soft bar; a miss produces a <code>scored</code> verdict.</li></ul><p>Case verdicts are <code>passed</code>, <code>failed</code>, <code>scored</code>, or <code>skipped</code>. The CLI exits 1 for a failed gate. A scored result exits 0 unless <code>--strict</code> is set. Exit 2 means the selection matched no cases.</p><h2 id="judges" tabindex="-1">Judges <a class="header-anchor" href="#judges" aria-label="Permalink to "Judges""></a></h2><p>Use a judge for meaning that deterministic checks cannot express:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">factuality</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
33
33
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">summarizes</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.8</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
34
34
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">closedQA</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"names the root cause"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">gate</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
|
|
35
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sql</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.9</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Each grades <code>t.reply</code> by default; pass <code>{ on }</code> to grade another value. Judge configuration can live in the project config, eval, case, or call, with the nearest value winning.</p><p><code>t.judge.model(prompt)</code> returns a raw model reply for custom grading. Treat agent output as untrusted input: wrap it with <code>fenceUntrusted</code> and include <code>EVAL_JUDGE_INJECTION_GUARD</code> in the judge prompt.</p><h2 id="datasets-and-fixtures" tabindex="-1">Datasets and fixtures <a class="header-anchor" href="#datasets-and-fixtures" aria-label="Permalink to "Datasets and fixtures""></a></h2><p>Load committed JSON, JSONL, or YAML relative to the project root:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/evals"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
35
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">t.judge.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">sql</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(expected).</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">atLeast</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0.9</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Each grades <code>t.reply</code> by default; pass <code>{ on }</code> to grade another value. Judge configuration can live in the project config, eval, case, or call, with the nearest value winning.</p><p><code>t.judge.model(prompt)</code> returns a raw model reply for custom grading. Treat agent output as untrusted input: wrap it with <code>fenceUntrusted</code> and include <code>EVAL_JUDGE_INJECTION_GUARD</code> in the judge prompt.</p><h2 id="judge-host" tabindex="-1">Judge host <a class="header-anchor" href="#judge-host" aria-label="Permalink to "Judge host""></a></h2><p>A judge grades by calling a Cursor model. It needs a Cursor credential (<code>bdk login</code>, <code>CURSOR_API_KEY</code>, or <code>CURSOR_SERVICE_ACCOUNT_KEY</code>) and a judge model. The grading session offers no tools and turns the local SDK sandbox off, including any per-user sandbox config on the machine, so the same case grades on macOS, a Linux cloud agent, and a Linux CI runner.</p><p>Without a credential, or when that credential belongs to a different backend than the SDK will call, the case is skipped and the suite continues. Without a judge model, the case fails and the assertion names where to set one.</p><h2 id="datasets-and-fixtures" tabindex="-1">Datasets and fixtures <a class="header-anchor" href="#datasets-and-fixtures" aria-label="Permalink to "Datasets and fixtures""></a></h2><p>Load committed JSON, JSONL, or YAML relative to the project root:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineEval, includes } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/evals"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
36
36
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { loadYaml } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/evals/loaders"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
37
37
|
<span class="line"></span>
|
|
38
38
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> rows</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> await</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> loadYaml</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span></span>
|
|
@@ -53,4 +53,4 @@ import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k
|
|
|
53
53
|
<span class="line"><span>bdk eval --dir . builds/checkout</span></span>
|
|
54
54
|
<span class="line"><span>bdk eval --dir . --tag smoke</span></span></code></pre></div><p>ID filters match an exact ID and its descendants. Repeated IDs use OR; repeated tags use OR. When both are present, a case must match both groups.</p><h2 id="inspect-run-artifacts" tabindex="-1">Inspect run artifacts <a class="header-anchor" href="#inspect-run-artifacts" aria-label="Permalink to "Inspect run artifacts""></a></h2><p>Default run artifacts go under <code>evals/<stamp>/</code> in the project state directory and include <code>summary.json</code>, <code>results.jsonl</code>, and <code>evals/<case-id>.json</code>. <code>--artifacts <dir></code> chooses another destination; <code>--no-artifacts</code> disables them. This location is independent of <code>--state-root</code>.</p><h2 id="run-evals-against-a-server" tabindex="-1">Run evals against a server <a class="header-anchor" href="#run-evals-against-a-server" aria-label="Permalink to "Run evals against a server""></a></h2><p>The playground <strong>Evals</strong> view starts batches on its running server, and <code>--url</code> targets a named running server:</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bdk eval --url http://127.0.0.1:3000/vulnerability-scanner --tag smoke</span></span>
|
|
55
55
|
<span class="line"><span>bdk eval status <eval-id> --url http://127.0.0.1:3000/vulnerability-scanner</span></span>
|
|
56
|
-
<span class="line"><span>bdk eval cancel <eval-id> --url http://127.0.0.1:3000/vulnerability-scanner</span></span></code></pre></div><p>Server-side batches use the target's discovered cases and return an eval ID for <code>status</code> or <code>cancel</code>. Local reporter and concurrency flags don't apply to <code>--url</code> runs.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../evals.html">Evals guide</a></li><li><a href="./cli.html#eval">CLI reference</a></li><li><a href="./sessions.html">Sessions</a></li><li><a href="./artifacts.html">Artifacts</a></li></ul>`,
|
|
56
|
+
<span class="line"><span>bdk eval cancel <eval-id> --url http://127.0.0.1:3000/vulnerability-scanner</span></span></code></pre></div><p>Server-side batches use the target's discovered cases and return an eval ID for <code>status</code> or <code>cancel</code>. Local reporter and concurrency flags don't apply to <code>--url</code> runs.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../evals.html">Evals guide</a></li><li><a href="./cli.html#eval">CLI reference</a></li><li><a href="./sessions.html">Sessions</a></li><li><a href="./artifacts.html">Artifacts</a></li></ul>`,63)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
|
package/dist/docs/assets/{reference_evals.md.if--BLd0.lean.js → reference_evals.md.Ccwp4x3o.lean.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,p
|
|
1
|
+
import{_ as e,c as a,o as i,a3 as t}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results.","frontmatter":{"title":"Evals","description":"Define eval cases, drive turns, assert trajectories, and interpret results."},"headers":[],"relativePath":"reference/evals.md","filePath":"reference/evals.md"}'),n={name:"reference/evals.md"};function d(l,s,h,r,o,p){return i(),a("div",null,[...s[0]||(s[0]=[t("",63)])])}const E=e(n,[["render",d]]);export{k as __pageData,E as default};
|
package/dist/docs/assets/{reference_http-api.md.CrqhTv6S.js → reference_http-api.md.Dji-DD_Z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const p=JSON.parse('{"title":"HTTP API","description":"Public session, discovery, and channel routes callers use.","frontmatter":{"title":"HTTP API","description":"Public session, discovery, and channel routes callers use."},"headers":[],"relativePath":"reference/http-api.md","filePath":"reference/http-api.md"}'),d={name:"reference/http-api.md"};function n(i,e,r,l,c,h){return o(),s("div",null,[...e[0]||(e[0]=[a(`<h1 id="http-api" tabindex="-1">HTTP API <a class="header-anchor" href="#http-api" aria-label="Permalink to "HTTP API""></a></h1><p>
|
|
1
|
+
import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const p=JSON.parse('{"title":"HTTP API","description":"Public session, discovery, and channel routes callers use.","frontmatter":{"title":"HTTP API","description":"Public session, discovery, and channel routes callers use."},"headers":[],"relativePath":"reference/http-api.md","filePath":"reference/http-api.md"}'),d={name:"reference/http-api.md"};function n(i,e,r,l,c,h){return o(),s("div",null,[...e[0]||(e[0]=[a(`<h1 id="http-api" tabindex="-1">HTTP API <a class="header-anchor" href="#http-api" aria-label="Permalink to "HTTP API""></a></h1><p>Bot Development Kit (BDK) hosts expose one public HTTP surface. In the default multi-agent layout, each agent uses <code>/<slug>/v1/*</code>; <code>--mode single</code> serves the same routes at <code>/v1/*</code>. Routes use the agent's HTTP auth chain, and session-owned resources return <code>403</code> to another principal.</p><p>Unless a section says otherwise, the default auth policy is <code>localDevStrict()</code>. <code>--bearer-token</code> replaces it with bearer auth, and <code>--allow-anonymous</code> replaces it with anonymous access. Built-in JSON routes use <code>{ ok: false, error: "<code>", message? }</code> for errors, and MCP uses JSON-RPC. Custom channel routes answer hosted callers with an empty <code>202</code>; see <a href="#call-custom-channel-routes">Call custom channel routes</a>.</p><h2 id="host-routes" tabindex="-1">Host routes <a class="header-anchor" href="#host-routes" aria-label="Permalink to "Host routes""></a></h2><p>These routes live at the host root in multi-agent mode. The index routes exist only when the playground is enabled.</p><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>GET /</code></td><td>HTML index of mounted agents; no auth</td></tr><tr><td><code>GET /v1/agents</code></td><td>JSON index of mounted agents; no auth</td></tr><tr><td><code>GET /docs</code>, <code>GET /docs/*</code></td><td>Documentation site in either layout; no auth</td></tr></tbody></table><p><code>--no-playground</code> removes the two index routes. <code>--no-docs</code> removes the documentation site.</p><h2 id="start-a-session" tabindex="-1">Start a session <a class="header-anchor" href="#start-a-session" aria-label="Permalink to "Start a session""></a></h2><p><code>POST /v1/session</code> opens a durable conversation.</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">curl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -X</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> POST</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> http://127.0.0.1:3000/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">slu</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">g</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">/v1/session</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -H</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'content-type: application/json'</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> \\</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '{"message":"What can you do?"}'</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># {"ok":true,"sessionId":"ses_…","continuationToken":"http:…",</span></span>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,c as o,o as s,a3 as a}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Project layout","description":"The canonical bot/ folder layout and its path-derived naming rules.","frontmatter":{"title":"Project layout","description":"The canonical bot/ folder layout and its path-derived naming rules."},"headers":[],"relativePath":"reference/project-layout.md","filePath":"reference/project-layout.md"}'),d={name:"reference/project-layout.md"};function n(r,e,c,i,l,p){return s(),o("div",null,[...e[0]||(e[0]=[a(`<h1 id="project-layout" tabindex="-1">Project layout <a class="header-anchor" href="#project-layout" aria-label="Permalink to "Project layout""></a></h1><p>
|
|
1
|
+
import{_ as t,c as o,o as s,a3 as a}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Project layout","description":"The canonical bot/ folder layout and its path-derived naming rules.","frontmatter":{"title":"Project layout","description":"The canonical bot/ folder layout and its path-derived naming rules."},"headers":[],"relativePath":"reference/project-layout.md","filePath":"reference/project-layout.md"}'),d={name:"reference/project-layout.md"};function n(r,e,c,i,l,p){return s(),o("div",null,[...e[0]||(e[0]=[a(`<h1 id="project-layout" tabindex="-1">Project layout <a class="header-anchor" href="#project-layout" aria-label="Permalink to "Project layout""></a></h1><p>A Bot Development Kit (BDK) project keeps agent files under <code>bot/</code>. Each file's path determines how BDK loads it.</p><p>Existing projects rooted at <code>agent/</code> remain supported.</p><h2 id="folder-structure" tabindex="-1">Folder structure <a class="header-anchor" href="#folder-structure" aria-label="Permalink to "Folder structure""></a></h2><p>For the capabilities below, identity comes from the path.</p><table tabindex="0"><thead><tr><th>Path under <code>bot/</code></th><th>Resolves to</th></tr></thead><tbody><tr><td><code>tools/approve_pr.ts</code></td><td>tool <code>approve_pr</code></td></tr><tr><td><code>mcp-connections/linear.ts</code></td><td>MCP connection <code>linear</code> (model + host)</td></tr><tr><td><code>host-connections/inventory.ts</code></td><td>Host MCP connection <code>inventory</code> (host + <code>mcp oauth</code> only)</td></tr><tr><td><code>skills/pr-review.md</code></td><td>skill <code>pr-review</code></td></tr><tr><td><code>subagents/reviewer/</code></td><td>subagent <code>reviewer</code></td></tr><tr><td><code>extensions/ci.ts</code></td><td>extension mount <code>ci</code>; its contributions become <code>ci__<name></code></td></tr><tr><td><code>extensions/notion.ts</code></td><td>Cursor plugin mount <code>notion</code> (<code>cursorPlugin</code>); its skills, agents, and MCP servers become <code>notion__<name></code></td></tr><tr><td><code>channels/drive.ts</code></td><td>channel <code>drive</code>, routes under <code>/v1/channels/drive</code></td></tr></tbody></table><p>The root agent takes its name from <code>package.json</code> <code>name</code>, falling back to the directory name. When serving multiple agents, the slug is the directory name and must match <code>[A-Za-z0-9][A-Za-z0-9_-]*</code> (and not the reserved <code>v1</code>, <code>playground</code>, or <code>docs</code> segments).</p><h2 id="project-tree" tabindex="-1">Project tree <a class="header-anchor" href="#project-tree" aria-label="Permalink to "Project tree""></a></h2><p>Most projects start with this shape.</p><div class="language-text vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">text</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>my-agent/</span></span>
|
|
2
2
|
<span class="line"><span>├── package.json</span></span>
|
|
3
3
|
<span class="line"><span>├── bot/</span></span>
|
|
4
4
|
<span class="line"><span>│ ├── agent.ts # model and local harness config</span></span>
|