@cursor/bdk 0.2.4 → 0.2.6
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 +76 -1154
- package/dist/bin/agent-serve.js +17 -11
- package/dist/channels/github/github-channel.d.ts +4 -4
- package/dist/channels/github/github-channel.js +5 -5
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.4kQ8Db_q.js → app.CJLKDVza.js} +4 -4
- package/dist/docs/assets/{building-with-agents.md.-fcjCmJU.js → building-with-agents.md.BPjPFxFg.js} +2 -2
- package/dist/docs/assets/{building-with-agents.md.-fcjCmJU.lean.js → building-with-agents.md.BPjPFxFg.lean.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.DY1RwB8Q.js → VPLocalSearchBox.BW9mrQmq.js} +1 -1
- package/dist/docs/assets/chunks/{arc.CxE_fSPK.js → arc.D8ZOvM1m.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CPX426ui.js → architectureDiagram-Q4EWVU46.CXEKhLW-.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.CB52JrKG.js → baseUniq.BJkVKblr.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.J0cNaQCL.js → blockDiagram-DXYQGD6D.DQDbHxor.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DJn3vEGT.js → c4Diagram-AHTNJAMY.ByMD6LYM.js} +1 -1
- package/dist/docs/assets/chunks/channel.DCU8W1RP.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Dao618F6.js → chunk-4BX2VUAB.Dtq1aVI9.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.QW8Rhjai.js → chunk-4TB4RGXK.BL_XrkoQ.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.DfRLLKF_.js → chunk-55IACEB6.BDPXu94_.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.CIV2ApKQ.js → chunk-EDXVE4YY.DhGOQj4k.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.BEheSuxp.js → chunk-FMBD7UC4.DSF5nr8v.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CUN88ENB.js → chunk-OYMX7WX6.Day7wayw.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CgqCs8b_.js → chunk-QZHKN3VN.CpBEC0zA.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.iCH0nnTJ.js → chunk-YZCP3GAM.X_7rY1rx.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +1 -0
- package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BLcUxhWE.js → cose-bilkent-S5V4N54A.BVRmi2ko.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.Ep7LofOm.js → dagre-KV5264BT.Dei9oslB.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.Bzf4GSQ4.js → diagram-5BDNPKRD._M-efGt7.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.DD6Jh-eM.js → diagram-G4DWMVQ6.D1Vmhfsj.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.oOIl8bWd.js → diagram-MMDJMWI5.cE1bmvAC.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.DHs85Ade.js → diagram-TYMM5635.DkXAfznP.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BIb5ghCk.js → erDiagram-SMLLAGMA.DH_pSwPg.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.DV4paY9k.js → flowDiagram-DWJPFMVM.kAWVN9j1.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.AyEKA6_v.js → ganttDiagram-T4ZO3ILL.8r0w49-p.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BltiCDFo.js → gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js} +1 -1
- package/dist/docs/assets/chunks/{graph.DzuEYGdC.js → graph.BMPXHz_B.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BV2l981J.js → infoDiagram-42DDH7IO.BmlcqewS.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.BA4Izf-m.js → ishikawaDiagram-UXIWVN3A.CVSEQSul.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.DjaFbFS3.js → journeyDiagram-VCZTEJTY.BpeWJ5n-.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CfTFieDs.js → kanban-definition-6JOO6SKY.DHbDXuxB.js} +1 -1
- package/dist/docs/assets/chunks/{layout.DzfWqTBV.js → layout.CzrCDgkP.js} +1 -1
- package/dist/docs/assets/chunks/{linear.BO6mpulV.js → linear.HwBsflwN.js} +1 -1
- package/dist/docs/assets/chunks/{min.BGgTadgT.js → min.DqGHolT3.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DPuIXVWY.js → mindmap-definition-QFDTVHPH.ZYGlOawh.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.BOnl3bBg.js → pieDiagram-DEJITSTG.C2KRXlNR.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DNB6Ckdc.js → quadrantDiagram-34T5L4WZ.CHj3Qefp.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.D5-Qo7vb.js → requirementDiagram-MS252O5E.B1L4Tf7k.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.8t65cesf.js → sankeyDiagram-XADWPNL6.dNR2yi1B.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.CaG07BdS.js → sequenceDiagram-FGHM5R23.BrvQ3C6m.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.TKOweTB6.js → stateDiagram-FHFEXIEX.BtehEykA.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +1 -0
- package/dist/docs/assets/chunks/{theme.Dx-JhpTB.js → theme.BDHBZUkP.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.fE53zQ2s.js → timeline-definition-GMOUNBTQ.Bn7nhqEN.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DJsZZaJg.js → vennDiagram-DHZGUBPP.DKhc38sz.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.DOXQ0w8J.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.CMZ-Ru_t.js → wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.XXrhBc7a.js → xychartDiagram-5P7HB3ND.B77HE1K8.js} +1 -1
- package/dist/docs/assets/{deployment.md.UhnJIMr-.js → deployment.md.BdqTiGdc.js} +4 -4
- package/dist/docs/assets/{deployment.md.UhnJIMr-.lean.js → deployment.md.BdqTiGdc.lean.js} +1 -1
- package/dist/docs/assets/{evals.md.CCAtNcuL.js → evals.md.C851kViu.js} +3 -3
- package/dist/docs/assets/{evals.md.CCAtNcuL.lean.js → evals.md.C851kViu.lean.js} +1 -1
- package/dist/docs/assets/{guides_agent-to-agent.md.CGkicXeB.js → guides_agent-to-agent.md.Cps5NiCV.js} +2 -2
- package/dist/docs/assets/{guides_agent-to-agent.md.CGkicXeB.lean.js → guides_agent-to-agent.md.Cps5NiCV.lean.js} +1 -1
- package/dist/docs/assets/{guides_bitbucket.md.Cb3LPKt3.js → guides_bitbucket.md.BB6fqD-M.js} +2 -2
- package/dist/docs/assets/{guides_bitbucket.md.Cb3LPKt3.lean.js → guides_bitbucket.md.BB6fqD-M.lean.js} +1 -1
- package/dist/docs/assets/{guides_cloud-agents.md.BuEkDCwo.js → guides_cloud-agents.md.CWJjS9No.js} +2 -2
- package/dist/docs/assets/{guides_cloud-agents.md.BuEkDCwo.lean.js → guides_cloud-agents.md.CWJjS9No.lean.js} +1 -1
- package/dist/docs/assets/{guides_convert-automation.md.Ci-Y2iD5.js → guides_convert-automation.md.DMEX9nF-.js} +3 -3
- package/dist/docs/assets/{guides_convert-automation.md.Ci-Y2iD5.lean.js → guides_convert-automation.md.DMEX9nF-.lean.js} +1 -1
- package/dist/docs/assets/{guides_github.md.Bq9kQU9B.js → guides_github.md.Cr1Xlf-m.js} +3 -3
- package/dist/docs/assets/{guides_github.md.Bq9kQU9B.lean.js → guides_github.md.Cr1Xlf-m.lean.js} +1 -1
- package/dist/docs/assets/{guides_gitlab.md.BM27P43u.js → guides_gitlab.md.CMpmFi4M.js} +2 -2
- package/dist/docs/assets/{guides_gitlab.md.BM27P43u.lean.js → guides_gitlab.md.CMpmFi4M.lean.js} +1 -1
- package/dist/docs/assets/{guides_grokbot-agents.md.yxVbSlKA.js → guides_grokbot-agents.md.tD1smFhU.js} +2 -2
- package/dist/docs/assets/{guides_grokbot-agents.md.yxVbSlKA.lean.js → guides_grokbot-agents.md.tD1smFhU.lean.js} +1 -1
- package/dist/docs/assets/{guides_hooks.md.BWoiNaMq.js → guides_hooks.md.5Ce3NXxZ.js} +2 -2
- package/dist/docs/assets/{guides_hooks.md.BWoiNaMq.lean.js → guides_hooks.md.5Ce3NXxZ.lean.js} +1 -1
- package/dist/docs/assets/{guides_improve.md.COtL-6ft.js → guides_improve.md.CRrYq22s.js} +2 -2
- package/dist/docs/assets/{guides_improve.md.COtL-6ft.lean.js → guides_improve.md.CRrYq22s.lean.js} +1 -1
- package/dist/docs/assets/{guides_jev.md.CRcgmjDb.js → guides_jev.md.D7XH4JH3.js} +2 -2
- package/dist/docs/assets/{guides_jev.md.CRcgmjDb.lean.js → guides_jev.md.D7XH4JH3.lean.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.Cu6mhZ_3.js → guides_mcp-oauth.md.DR3zhC9r.js} +2 -2
- package/dist/docs/assets/{guides_mcp-oauth.md.Cu6mhZ_3.lean.js → guides_mcp-oauth.md.DR3zhC9r.lean.js} +1 -1
- package/dist/docs/assets/{guides_opentelemetry.md.DLlIB5rv.js → guides_opentelemetry.md.jcPNrQbH.js} +8 -6
- package/dist/docs/assets/{guides_opentelemetry.md.DLlIB5rv.lean.js → guides_opentelemetry.md.jcPNrQbH.lean.js} +1 -1
- package/dist/docs/assets/{guides_slack.md.diqqXTTm.js → guides_slack.md.Bn-WupSE.js} +8 -8
- package/dist/docs/assets/{guides_slack.md.diqqXTTm.lean.js → guides_slack.md.Bn-WupSE.lean.js} +1 -1
- package/dist/docs/assets/{guides_webhooks.md.D0furjw0.js → guides_webhooks.md.BBvAm_VF.js} +2 -2
- package/dist/docs/assets/{guides_webhooks.md.D0furjw0.lean.js → guides_webhooks.md.BBvAm_VF.lean.js} +1 -1
- package/dist/docs/assets/{hillclimbing.md.Biy0m-Qb.js → hillclimbing.md.Dxvd-0gT.js} +2 -2
- package/dist/docs/assets/{hillclimbing.md.Biy0m-Qb.lean.js → hillclimbing.md.Dxvd-0gT.lean.js} +1 -1
- package/dist/docs/assets/index.md.Dxxr7pFa.js +27 -0
- package/dist/docs/assets/{index.md.CVc_oOA3.lean.js → index.md.Dxxr7pFa.lean.js} +1 -1
- package/dist/docs/assets/{quickstart.md.CHpHPBUN.js → quickstart.md.BK5gjHM2.js} +2 -2
- package/dist/docs/assets/{quickstart.md.CHpHPBUN.lean.js → quickstart.md.BK5gjHM2.lean.js} +1 -1
- package/dist/docs/assets/{reference_agent-config.md.Cj5uBKp4.js → reference_agent-config.md.DrtLxWgR.js} +4 -4
- package/dist/docs/assets/{reference_agent-config.md.Cj5uBKp4.lean.js → reference_agent-config.md.DrtLxWgR.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.CQfKq8F2.js → reference_artifacts.md.DLV9MZES.js} +2 -2
- package/dist/docs/assets/{reference_artifacts.md.CQfKq8F2.lean.js → reference_artifacts.md.DLV9MZES.lean.js} +1 -1
- package/dist/docs/assets/{reference_channels.md.mbNtKCiR.js → reference_channels.md.LbNIJBwd.js} +2 -2
- package/dist/docs/assets/{reference_channels.md.mbNtKCiR.lean.js → reference_channels.md.LbNIJBwd.lean.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DgeLTO18.js → reference_cli.md.BsgDqYPh.js} +4 -4
- package/dist/docs/assets/{reference_cli.md.DgeLTO18.lean.js → reference_cli.md.BsgDqYPh.lean.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.COq--gAm.js → reference_connections.md.Bljpve-y.js} +4 -4
- package/dist/docs/assets/{reference_connections.md.COq--gAm.lean.js → reference_connections.md.Bljpve-y.lean.js} +1 -1
- package/dist/docs/assets/{reference_evals.md.CJm3uCUm.js → reference_evals.md.D5i8PuXJ.js} +2 -2
- package/dist/docs/assets/{reference_evals.md.CJm3uCUm.lean.js → reference_evals.md.D5i8PuXJ.lean.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.pa2tN-e4.js → reference_extensions.md.OUacPetl.js} +3 -3
- package/dist/docs/assets/{reference_extensions.md.pa2tN-e4.lean.js → reference_extensions.md.OUacPetl.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.DbthhtIR.js → reference_hooks.md.C5LCJ1R3.js} +2 -2
- package/dist/docs/assets/{reference_hooks.md.DbthhtIR.lean.js → reference_hooks.md.C5LCJ1R3.lean.js} +1 -1
- package/dist/docs/assets/{reference_http-api.md.BZOvhCqY.js → reference_http-api.md.DbFNOubV.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.Bdwscs4G.js → reference_instructions.md.DrcHZXig.js} +2 -2
- package/dist/docs/assets/{reference_instructions.md.Bdwscs4G.lean.js → reference_instructions.md.DrcHZXig.lean.js} +1 -1
- package/dist/docs/assets/reference_playground.md.1hx0gcIu.js +1 -0
- package/dist/docs/assets/{reference_playground.md.BdQzRJc2.lean.js → reference_playground.md.1hx0gcIu.lean.js} +1 -1
- package/dist/docs/assets/{reference_project-layout.md.CpLQ9j4K.js → reference_project-layout.md.C2JMRh7p.js} +2 -2
- package/dist/docs/assets/{reference_prompt.md.BQZB4eaV.js → reference_prompt.md.DqPh71XN.js} +3 -3
- package/dist/docs/assets/{reference_prompt.md.BQZB4eaV.lean.js → reference_prompt.md.DqPh71XN.lean.js} +1 -1
- package/dist/docs/assets/{reference_schedules.md.BVU5EFbz.js → reference_schedules.md.BuJ8fgMa.js} +2 -2
- package/dist/docs/assets/{reference_schedules.md.BVU5EFbz.lean.js → reference_schedules.md.BuJ8fgMa.lean.js} +1 -1
- package/dist/docs/assets/reference_sessions.md.CM5zo3w4.js +1 -0
- package/dist/docs/assets/{reference_sessions.md.DeRUItHD.lean.js → reference_sessions.md.CM5zo3w4.lean.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.Cy00QMKS.js → reference_skills.md.ClkMoQsV.js} +2 -2
- package/dist/docs/assets/{reference_skills.md.Cy00QMKS.lean.js → reference_skills.md.ClkMoQsV.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.B8oyeXOI.js → reference_subagents.md.gmPt5J-M.js} +2 -2
- package/dist/docs/assets/{reference_subagents.md.B8oyeXOI.lean.js → reference_subagents.md.gmPt5J-M.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.hg2Wi5Bq.js → reference_tools.md.v3SXVSs_.js} +2 -2
- package/dist/docs/assets/{reference_tools.md.hg2Wi5Bq.lean.js → reference_tools.md.v3SXVSs_.lean.js} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.BykUiZ8j.js → templates_agentic-owners.md.CvmABtia.js} +2 -2
- package/dist/docs/assets/templates_grokbot-agents.md.2sydjFiO.js +5 -0
- package/dist/docs/assets/templates_grokbot-agents.md.2sydjFiO.lean.js +1 -0
- package/dist/docs/assets/{templates_security-reviewer.md.DXMmKl_o.js → templates_security-reviewer.md.Gh6EF9Us.js} +3 -2
- package/dist/docs/assets/{templates_security-reviewer.md.DXMmKl_o.lean.js → templates_security-reviewer.md.Gh6EF9Us.lean.js} +1 -1
- package/dist/docs/assets/{templates_thermo-quality-review.md.Dg1p1MsG.js → templates_thermo-quality-review.md.B77UyTrX.js} +2 -2
- package/dist/docs/assets/{templates_thermo-quality-review.md.Dg1p1MsG.lean.js → templates_thermo-quality-review.md.B77UyTrX.lean.js} +1 -1
- package/dist/docs/assets/{templates_thermo-review.md.Dlylkowj.js → templates_thermo-review.md.DRJ7mC5U.js} +2 -2
- package/dist/docs/assets/{templates_thermo-review.md.Dlylkowj.lean.js → templates_thermo-review.md.DRJ7mC5U.lean.js} +1 -1
- package/dist/docs/assets/templates_triage.md.CNN6b0JZ.js +9 -0
- package/dist/docs/assets/{templates_triage.md.CvJyx81N.lean.js → templates_triage.md.CNN6b0JZ.lean.js} +1 -1
- package/dist/docs/assets/troubleshooting.md.Bscj6ODe.js +1 -0
- package/dist/docs/assets/{troubleshooting.md.Cw5PKa3t.lean.js → troubleshooting.md.Bscj6ODe.lean.js} +1 -1
- package/dist/docs/building-with-agents.html +36 -36
- package/dist/docs/building-with-agents.md +0 -3
- package/dist/docs/deployment.html +38 -38
- package/dist/docs/deployment.md +2 -9
- package/dist/docs/evals.html +37 -37
- package/dist/docs/evals.md +2 -5
- package/dist/docs/guides/agent-to-agent.html +36 -36
- package/dist/docs/guides/agent-to-agent.md +0 -3
- package/dist/docs/guides/bitbucket.html +36 -36
- package/dist/docs/guides/bitbucket.md +0 -3
- package/dist/docs/guides/cloud-agents.html +36 -36
- package/dist/docs/guides/cloud-agents.md +0 -4
- package/dist/docs/guides/convert-automation.html +37 -37
- package/dist/docs/guides/convert-automation.md +2 -5
- package/dist/docs/guides/github.html +37 -37
- package/dist/docs/guides/github.md +1 -4
- package/dist/docs/guides/gitlab.html +36 -36
- package/dist/docs/guides/gitlab.md +0 -3
- package/dist/docs/guides/grokbot-agents.html +37 -37
- package/dist/docs/guides/grokbot-agents.md +1 -4
- package/dist/docs/guides/hooks.html +36 -36
- package/dist/docs/guides/hooks.md +0 -3
- package/dist/docs/guides/improve.html +36 -36
- package/dist/docs/guides/improve.md +0 -3
- package/dist/docs/guides/jev.html +36 -36
- package/dist/docs/guides/jev.md +0 -3
- package/dist/docs/guides/mcp-oauth.html +37 -37
- package/dist/docs/guides/mcp-oauth.md +1 -4
- package/dist/docs/guides/opentelemetry.html +42 -40
- package/dist/docs/guides/opentelemetry.md +4 -5
- package/dist/docs/guides/slack.html +43 -43
- package/dist/docs/guides/slack.md +14 -24
- package/dist/docs/guides/webhooks.html +36 -36
- package/dist/docs/guides/webhooks.md +0 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +36 -36
- package/dist/docs/hillclimbing.md +0 -3
- package/dist/docs/index.html +38 -38
- package/dist/docs/index.md +9 -16
- package/dist/docs/llms-full.txt +153 -234
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +36 -36
- package/dist/docs/quickstart.md +2 -7
- package/dist/docs/reference/agent-config.html +38 -38
- package/dist/docs/reference/agent-config.md +4 -7
- package/dist/docs/reference/artifacts.html +36 -36
- package/dist/docs/reference/artifacts.md +0 -3
- package/dist/docs/reference/channels.html +37 -37
- package/dist/docs/reference/channels.md +1 -6
- package/dist/docs/reference/cli.html +38 -38
- package/dist/docs/reference/cli.md +7 -14
- package/dist/docs/reference/connections.html +38 -38
- package/dist/docs/reference/connections.md +7 -10
- package/dist/docs/reference/evals.html +36 -36
- package/dist/docs/reference/evals.md +0 -3
- package/dist/docs/reference/extensions.html +37 -37
- package/dist/docs/reference/extensions.md +2 -5
- package/dist/docs/reference/hooks.html +36 -36
- package/dist/docs/reference/hooks.md +0 -3
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/http-api.md +1 -1
- package/dist/docs/reference/instructions.html +36 -36
- package/dist/docs/reference/instructions.md +0 -3
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/playground.md +0 -3
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/project-layout.md +2 -2
- package/dist/docs/reference/prompt.html +37 -37
- package/dist/docs/reference/prompt.md +0 -3
- package/dist/docs/reference/schedules.html +36 -36
- package/dist/docs/reference/schedules.md +0 -3
- package/dist/docs/reference/sessions.html +36 -36
- package/dist/docs/reference/sessions.md +0 -3
- package/dist/docs/reference/skills.html +36 -36
- package/dist/docs/reference/skills.md +0 -3
- package/dist/docs/reference/subagents.html +36 -36
- package/dist/docs/reference/subagents.md +0 -3
- package/dist/docs/reference/tools.html +36 -36
- package/dist/docs/reference/tools.md +1 -5
- package/dist/docs/templates/agentic-owners.html +37 -37
- package/dist/docs/templates/agentic-owners.md +2 -3
- package/dist/docs/templates/grokbot-agents.html +64 -0
- package/dist/docs/templates/grokbot-agents.md +55 -0
- package/dist/docs/templates/security-reviewer.html +38 -37
- package/dist/docs/templates/security-reviewer.md +7 -11
- package/dist/docs/templates/thermo-quality-review.html +37 -37
- package/dist/docs/templates/thermo-quality-review.md +5 -8
- package/dist/docs/templates/thermo-review.html +37 -37
- package/dist/docs/templates/thermo-review.md +5 -7
- package/dist/docs/templates/triage.html +39 -39
- package/dist/docs/templates/triage.md +8 -4
- package/dist/docs/troubleshooting.html +36 -36
- package/dist/docs/troubleshooting.md +3 -7
- package/dist/evals.d.ts +2 -2
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +14 -7
- package/dist/internal/eval-runner.js +7 -4
- package/dist/internal/init-interview.d.ts +0 -1
- package/dist/internal/init-interview.d.ts.map +1 -1
- package/dist/internal/init-interview.js +15 -24
- package/dist/internal/legacy-command-guard.d.ts +4 -1
- package/dist/internal/legacy-command-guard.d.ts.map +1 -1
- package/dist/internal/legacy-command-guard.js +11 -2
- package/dist/internal/platform-timers.d.ts +8 -1
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +10 -2
- package/dist/internal/reminder-control-plane-protocol.d.ts +8 -1
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-runner.d.ts +5 -0
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +27 -1
- package/dist/internal/resolve-prod-target.d.ts +3 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +2 -1
- package/dist/internal/run-client.d.ts +10 -1
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +152 -51
- package/dist/internal/server.d.ts +6 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +20 -8
- package/dist/internal/session-links.d.ts.map +1 -1
- package/dist/internal/session-links.js +8 -7
- package/dist/internal/sessions-client.d.ts +1 -0
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +2 -0
- package/docs/README.md +9 -16
- package/docs/building-with-agents.md +0 -3
- package/docs/deployment.md +2 -9
- package/docs/evals.md +2 -5
- package/docs/guides/agent-to-agent.md +0 -3
- package/docs/guides/bitbucket.md +0 -3
- package/docs/guides/cloud-agents.md +0 -4
- package/docs/guides/convert-automation.md +2 -5
- package/docs/guides/github.md +1 -4
- package/docs/guides/gitlab.md +0 -3
- package/docs/guides/grokbot-agents.md +1 -4
- package/docs/guides/hooks.md +0 -3
- package/docs/guides/improve.md +0 -3
- package/docs/guides/jev.md +0 -3
- package/docs/guides/mcp-oauth.md +1 -4
- package/docs/guides/opentelemetry.md +4 -5
- package/docs/guides/slack.md +14 -24
- package/docs/guides/webhooks.md +0 -3
- package/docs/hillclimbing.md +0 -3
- package/docs/quickstart.md +2 -7
- package/docs/reference/agent-config.md +4 -7
- package/docs/reference/artifacts.md +0 -3
- package/docs/reference/channels.md +1 -6
- package/docs/reference/cli.md +7 -14
- package/docs/reference/connections.md +7 -10
- package/docs/reference/evals.md +0 -3
- package/docs/reference/extensions.md +2 -5
- package/docs/reference/hooks.md +0 -3
- package/docs/reference/http-api.md +1 -1
- package/docs/reference/instructions.md +0 -3
- package/docs/reference/playground.md +0 -3
- package/docs/reference/project-layout.md +2 -2
- package/docs/reference/prompt.md +0 -3
- package/docs/reference/schedules.md +0 -3
- package/docs/reference/sessions.md +0 -3
- package/docs/reference/skills.md +0 -3
- package/docs/reference/subagents.md +0 -3
- package/docs/reference/tools.md +1 -5
- package/docs/templates/agentic-owners.md +2 -3
- package/docs/templates/grokbot-agents.md +60 -0
- package/docs/templates/security-reviewer.md +7 -11
- package/docs/templates/thermo-quality-review.md +5 -8
- package/docs/templates/thermo-review.md +5 -7
- package/docs/templates/triage.md +8 -4
- package/docs/troubleshooting.md +3 -7
- package/package.json +2 -2
- package/templates/agentic-owners/README.md +0 -3
- package/templates/agents-md/README.md +4 -3
- package/templates/agents-md/evals/agents.eval.ts +1 -0
- package/templates/code-wiki/README.md +0 -3
- package/templates/code-wiki/bot/instructions.md +4 -4
- package/templates/demo/README.md +0 -3
- package/templates/grokbot-agents/README.md +4 -6
- package/templates/security-help/README.md +12 -6
- package/templates/security-reviewer/README.md +5 -6
- package/templates/security-reviewer/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-quality-review/README.md +0 -3
- package/templates/thermo-quality-review/bot/tools/post_findings.ts +8 -8
- package/templates/thermo-review/README.md +0 -3
- package/templates/thermo-review/bot/tools/post_findings.ts +8 -8
- package/templates/triage/README.md +0 -3
- package/templates/triage/overlays/jira/README.md +0 -3
- package/templates/triage/overlays/linear/README.md +0 -3
- package/dist/docs/assets/chunks/@localSearchIndexroot.CvuAJ0My.js +0 -1
- package/dist/docs/assets/chunks/channel.BoNycAoN.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.C4x07Gkj.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.C4x07Gkj.js +0 -1
- package/dist/docs/assets/chunks/clone.Db22cH_-.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CuqmyQc4.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.844kyrjl.js +0 -162
- package/dist/docs/assets/index.md.CVc_oOA3.js +0 -27
- package/dist/docs/assets/reference_playground.md.BdQzRJc2.js +0 -1
- package/dist/docs/assets/reference_sessions.md.DeRUItHD.js +0 -1
- package/dist/docs/assets/templates_triage.md.CvJyx81N.js +0 -9
- package/dist/docs/assets/troubleshooting.md.Cw5PKa3t.js +0 -1
- /package/dist/docs/assets/{reference_http-api.md.BZOvhCqY.lean.js → reference_http-api.md.DbFNOubV.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.CpLQ9j4K.lean.js → reference_project-layout.md.C2JMRh7p.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.BykUiZ8j.lean.js → templates_agentic-owners.md.CvmABtia.lean.js} +0 -0
package/dist/docs/assets/{reference_extensions.md.pa2tN-e4.js → reference_extensions.md.OUacPetl.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds.","frontmatter":{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),t={name:"reference/extensions.md"};function l(
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds.","frontmatter":{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),t={name:"reference/extensions.md"};function l(p,s,o,h,d,r){return e(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="extensions" tabindex="-1">Extensions <a class="header-anchor" href="#extensions" aria-label="Permalink to "Extensions""></a></h1><p>An extension packages capabilities that would otherwise live under <code>bot/</code>: tools, skills, instructions, connections, hooks, channels, schedules, subagents, artifacts, and workspace seeds. One mount file adds them under a namespace without copying their source into your project.</p><p>Extensions and Cursor plugins execute as trusted host code. A namespace prevents name collisions; it does not sandbox the package or limit its side effects. Review the package before mounting it.</p><h2 id="mount-an-extension" tabindex="-1">Mount an extension <a class="header-anchor" href="#mount-an-extension" aria-label="Permalink to "Mount an extension""></a></h2><p>Install the package and add one file under <code>bot/extensions/</code>. The filename becomes the namespace, so this mount contributes names such as <code>ci__failed_jobs</code> and <code>ci__triage</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:#6A737D;--shiki-dark:#6A737D;">// bot/extensions/ci.ts</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ci </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@acme/ci-triage"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
3
|
<span class="line"></span>
|
|
4
4
|
<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;"> ci</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
@@ -23,7 +23,7 @@ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c
|
|
|
23
23
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><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:#6A737D;--shiki-dark:#6A737D;">// bot/extensions/ci/tools/retry_job.ts</span></span>
|
|
24
24
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { disableTool } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/extensions"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
25
25
|
<span class="line"></span>
|
|
26
|
-
<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;"> disableTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><p>The first file replaces <code>ci__job_log</code>; the second removes <code>ci__retry_job</code>. Use the matching <code>disable*</code> helper for another slot, or generic <code>disable()</code> when the file location already identifies it. Validation fails when an overlay names a contribution the package does not provide.</p><h2 id="mount-a-cursor-plugin" tabindex="-1">Mount a Cursor plugin <a class="header-anchor" href="#mount-a-cursor-plugin" aria-label="Permalink to "Mount a Cursor plugin""></a></h2><p><code>cursorPlugin()</code> adapts a vendored Cursor or Claude plugin into the same namespace model. Skills, commands, agents, and MCP servers become
|
|
26
|
+
<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;"> disableTool</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">();</span></span></code></pre></div><p>The first file replaces <code>ci__job_log</code>; the second removes <code>ci__retry_job</code>. Use the matching <code>disable*</code> helper for another slot, or generic <code>disable()</code> when the file location already identifies it. Validation fails when an overlay names a contribution the package does not provide.</p><h2 id="mount-a-cursor-plugin" tabindex="-1">Mount a Cursor plugin <a class="header-anchor" href="#mount-a-cursor-plugin" aria-label="Permalink to "Mount a Cursor plugin""></a></h2><p><code>cursorPlugin()</code> adapts a vendored Cursor or Claude plugin into the same namespace model. Skills, commands, agents, and MCP servers become BDK skills, subagents, and connections.</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:#6A737D;--shiki-dark:#6A737D;">// bot/extensions/notion.ts</span></span>
|
|
27
27
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { cursorPlugin } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/extensions"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
28
28
|
<span class="line"></span>
|
|
29
29
|
<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;"> cursorPlugin</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
@@ -56,4 +56,4 @@ import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c
|
|
|
56
56
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> logTailLines: z.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">number</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">positive</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">().</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">200</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">),</span></span>
|
|
57
57
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }),</span></span>
|
|
58
58
|
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> hosting</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: () </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ({ egressDomains: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"api.buildkite.com"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">] }),</span></span>
|
|
59
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Modules inside the package import this definition and read <code>extension.config</code>, which is already validated and has defaults applied. Publish the built entry point with its slot directories and prose assets beside it.</p><p><code>hosting</code> names the hosts the package calls and the secrets it reads from the environment. It receives the validated settings, and the mounting agent's <code>hosting.egressDomains</code> and <code>hosting.secretNames</code> gain whatever it returns, so a hosted deploy reaches Buildkite without the consumer listing <code>api.buildkite.com</code>. Leave out secrets that arrive through settings, such as <code>token</code> here; the consumer decides where that value comes from.</p><p>The <a href="./project-layout.html">Project layout</a> owns each contribution's authoring contract. Keep extension instructions and tool descriptions namespace-neutral because the consumer chooses the final prefix.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../guides/cloud-agents.html">Cloud agents</a>: delegate repository work through an extension</li><li><a href="./../guides/grokbot-agents.html">Grok Bot agents</a>: consult named bots</li><li><a href="./../guides/jev.html">Jev</a>: typed answers, then gated writes</li><li><a href="./../guides/improve.html">Self-improvement</a>: propose source changes through pull requests</li><li><a href="./project-layout.html">Project layout</a>: contribution slots</li><li><a href="./tools.html">Tools</a> and <a href="./skills.html">Skills</a>: capability contracts</li></ul>`,
|
|
59
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Modules inside the package import this definition and read <code>extension.config</code>, which is already validated and has defaults applied. Publish the built entry point with its slot directories and prose assets beside it.</p><p><code>hosting</code> names the hosts the package calls and the secrets it reads from the environment. It receives the validated settings, and the mounting agent's <code>hosting.egressDomains</code> and <code>hosting.secretNames</code> gain whatever it returns, so a hosted deploy reaches Buildkite without the consumer listing <code>api.buildkite.com</code>. Leave out secrets that arrive through settings, such as <code>token</code> here; the consumer decides where that value comes from.</p><p>The <a href="./project-layout.html">Project layout</a> owns each contribution's authoring contract. Keep extension instructions and tool descriptions namespace-neutral because the consumer chooses the final prefix.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../guides/cloud-agents.html">Cloud agents</a>: delegate repository work through an extension</li><li><a href="./../guides/grokbot-agents.html">Grok Bot agents</a>: consult named bots</li><li><a href="./../guides/jev.html">Jev</a>: typed answers, then gated writes</li><li><a href="./../guides/improve.html">Self-improvement</a>: propose source changes through pull requests</li><li><a href="./project-layout.html">Project layout</a>: contribution slots</li><li><a href="./tools.html">Tools</a> and <a href="./skills.html">Skills</a>: capability contracts</li></ul>`,37)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds.","frontmatter":{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),t={name:"reference/extensions.md"};function l(
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as n}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds.","frontmatter":{"title":"Extensions","description":"Mount a namespaced package of tools, skills, connections, and other agent capabilities, then inspect or override what it adds."},"headers":[],"relativePath":"reference/extensions.md","filePath":"reference/extensions.md"}'),t={name:"reference/extensions.md"};function l(p,s,o,h,d,r){return e(),a("div",null,[...s[0]||(s[0]=[n("",37)])])}const g=i(t,[["render",l]]);export{c as __pageData,g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state.","frontmatter":{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state."},"headers":[],"relativePath":"reference/hooks.md","filePath":"reference/hooks.md"}'),n={name:"reference/hooks.md"};function o(d,s,h,l,r,p){return a(),t("div",null,[...s[0]||(s[0]=[i(`<h1 id="hooks" tabindex="-1">Hooks <a class="header-anchor" href="#hooks" aria-label="Permalink to "Hooks""></a></h1><p>A hook subscribes to selected session events and can run a side effect after each matching event is recorded: an audit line, a metric, a transcript copy, or derived state. Hooks run in the serving process for every session of the agent. They cannot change the turn, the prompt, or the reply; a handler that throws is logged and skipped.</p><p>
|
|
1
|
+
import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state.","frontmatter":{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state."},"headers":[],"relativePath":"reference/hooks.md","filePath":"reference/hooks.md"}'),n={name:"reference/hooks.md"};function o(d,s,h,l,r,p){return a(),t("div",null,[...s[0]||(s[0]=[i(`<h1 id="hooks" tabindex="-1">Hooks <a class="header-anchor" href="#hooks" aria-label="Permalink to "Hooks""></a></h1><p>A hook subscribes to selected session events and can run a side effect after each matching event is recorded: an audit line, a metric, a transcript copy, or derived state. Hooks run in the serving process for every session of the agent. They cannot change the turn, the prompt, or the reply; a handler that throws is logged and skipped.</p><p>Treat the event as read-only. Later subscribers see the same object. That makes hooks safe to add to a production agent, and the wrong surface for anything that must run before the model or must fail a turn; see <a href="#hook-boundaries">Hook boundaries</a>.</p><p><code>defineHook</code> is unrelated to <a href="https://cursor.com/docs/agent/hooks" target="_blank" rel="noreferrer">Cursor Agent hooks</a>, the <code>.cursor/hooks.json</code> scripts that can observe, block, or modify the agent loop. Those still run inside a local session workspace.</p><h2 id="author-a-hook" tabindex="-1">Author a hook <a class="header-anchor" href="#author-a-hook" aria-label="Permalink to "Author a hook""></a></h2><p>Author <code>bot/hooks/<name>.ts</code> with <code>defineHook</code> from <code>@cursor/bdk/hooks</code>. This one meters tokens:</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:#6A737D;--shiki-dark:#6A737D;">// bot/hooks/usage.ts</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineHook } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "@cursor/bdk/hooks"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
3
3
|
<span class="line"></span>
|
|
4
4
|
<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;"> defineHook</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
@@ -42,4 +42,4 @@ import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const c
|
|
|
42
42
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> });</span></span>
|
|
43
43
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
44
44
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
45
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="hooks-vs-channels-vs-evals" tabindex="-1">Hooks vs channels vs evals <a class="header-anchor" href="#hooks-vs-channels-vs-evals" aria-label="Permalink to "Hooks vs channels vs evals""></a></h2><p>All three consume the same stream, for different jobs:</p><table tabindex="0"><thead><tr><th></th><th>Hooks</th><th>Channel <code>events</code></th><th>Evals</th></tr></thead><tbody><tr><td>Scope</td><td>every session of the agent</td><td>sessions the channel owns</td><td>one test turn</td></tr><tr><td>Job</td><td>observe: audit, metrics, mirrors, derived state</td><td>deliver: replies back to the channel's surface</td><td>assert: gates over the trajectory</td></tr><tr><td>Context</td><td><code>ctx.host</code>, <code>ctx.artifacts</code>, session info</td><td><code>channel.state</code>, <code>setContinuationToken</code>, <code>ctx.host</code>, session info</td><td>the <code>t</code> assertion helpers</td></tr><tr><td>Can affect the run</td><td>no</td><td>yes, it owns the surface</td><td>n/a</td></tr><tr><td>Authored at</td><td><code>bot/hooks/*.ts</code></td><td>channel config</td><td><code>evals/**/*.eval.ts</code></td></tr></tbody></table><h2 id="hook-boundaries" tabindex="-1">Hook boundaries <a class="header-anchor" href="#hook-boundaries" aria-label="Permalink to "Hook boundaries""></a></h2><table tabindex="0"><thead><tr><th>You want to</th><th>Use instead</th></tr></thead><tbody><tr><td>Add context before the model runs</td><td>The channel's <code>send</code> message and <code>workspaceFiles</code>, <code>instructions.md</code>, skills, or <code>sandbox/workspace/</code> seed files</td></tr><tr><td>Reply on Slack, comment on a PR, or post any other delivery</td><td>The channel's <code>events</code> map, or the Slack and GitHub packs</td></tr><tr><td>Show PR progress (merge-box check, sticky banner)</td><td><code>githubChannel({ progress: { commitStatus, banner } })</code>; see <a href="./../guides/github.html">GitHub agents</a></td></tr><tr><td>Block, approve, or rewrite a tool call</td><td><a href="./tools.html#gate-a-tool-on-human-approval"><code>needsApproval</code></a> on the tool</td></tr><tr><td>Act on the final assistant text, reject it for a same-turn repair, or fail a bad turn</td><td><code>defineResult</code></td></tr><tr><td>Gate a change on behavior</td><td><a href="./../evals.html">Evals</a></td></tr></tbody></table><h2 id="test-a-hook" tabindex="-1">Test a hook <a class="header-anchor" href="#test-a-hook" aria-label="Permalink to "Test a hook""></a></h2><p>A hook definition is a plain object, so a unit test calls <code>hook.events["turn.completed"]</code> directly with an event and a stub <code>HookContext</code>. Discovery skips <code>*.test.ts</code>, so the test can live next to the hook.</p><table tabindex="0"><thead><tr><th>Command</th><th>What it reports</th></tr></thead><tbody><tr><td><code>bdk validate --dir .</code></td><td>Discovery errors and the empty-handlers warning</td></tr><tr><td><code>bdk info --dir . --json</code></td><td>Loaded hooks under <code>agents[].hooks</code></td></tr><tr><td><code>bdk run --dir . --message "…"</code></td><td>Serve log on stderr, including <code>hook "<name>" handler for <event> threw: …</code></td></tr></tbody></table><p>On hosting, read the same log with <a href="./cli.html#logs"><code>bdk logs</code></a>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../guides/hooks.html">Hooks guide</a>: meter usage and page on failure</li><li><a href="./sessions.html">Sessions and streaming</a>: the event vocabulary hooks observe</li><li><a href="./../guides/opentelemetry.html">OpenTelemetry</a>: OTLP traces and metrics from the same event stream</li><li><a href="./../deployment.html#observability">Deployment</a>: runtime logs and export paths</li><li><a href="./channels.html#events">Channels</a>: the delivery-side counterpart</li></ul>`,
|
|
45
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="hooks-vs-channels-vs-evals" tabindex="-1">Hooks vs channels vs evals <a class="header-anchor" href="#hooks-vs-channels-vs-evals" aria-label="Permalink to "Hooks vs channels vs evals""></a></h2><p>All three consume the same stream, for different jobs:</p><table tabindex="0"><thead><tr><th></th><th>Hooks</th><th>Channel <code>events</code></th><th>Evals</th></tr></thead><tbody><tr><td>Scope</td><td>every session of the agent</td><td>sessions the channel owns</td><td>one test turn</td></tr><tr><td>Job</td><td>observe: audit, metrics, mirrors, derived state</td><td>deliver: replies back to the channel's surface</td><td>assert: gates over the trajectory</td></tr><tr><td>Context</td><td><code>ctx.host</code>, <code>ctx.artifacts</code>, session info</td><td><code>channel.state</code>, <code>setContinuationToken</code>, <code>ctx.host</code>, session info</td><td>the <code>t</code> assertion helpers</td></tr><tr><td>Can affect the run</td><td>no</td><td>yes, it owns the surface</td><td>n/a</td></tr><tr><td>Authored at</td><td><code>bot/hooks/*.ts</code></td><td>channel config</td><td><code>evals/**/*.eval.ts</code></td></tr></tbody></table><h2 id="hook-boundaries" tabindex="-1">Hook boundaries <a class="header-anchor" href="#hook-boundaries" aria-label="Permalink to "Hook boundaries""></a></h2><table tabindex="0"><thead><tr><th>You want to</th><th>Use instead</th></tr></thead><tbody><tr><td>Add context before the model runs</td><td>The channel's <code>send</code> message and <code>workspaceFiles</code>, <code>instructions.md</code>, skills, or <code>sandbox/workspace/</code> seed files</td></tr><tr><td>Reply on Slack, comment on a PR, or post any other delivery</td><td>The channel's <code>events</code> map, or the Slack and GitHub packs</td></tr><tr><td>Show PR progress (merge-box check, sticky banner)</td><td><code>githubChannel({ progress: { commitStatus, banner } })</code>; see <a href="./../guides/github.html">GitHub agents</a></td></tr><tr><td>Block, approve, or rewrite a tool call</td><td><a href="./tools.html#gate-a-tool-on-human-approval"><code>needsApproval</code></a> on the tool</td></tr><tr><td>Act on the final assistant text, reject it for a same-turn repair, or fail a bad turn</td><td><code>defineResult</code></td></tr><tr><td>Gate a change on behavior</td><td><a href="./../evals.html">Evals</a></td></tr></tbody></table><h2 id="test-a-hook" tabindex="-1">Test a hook <a class="header-anchor" href="#test-a-hook" aria-label="Permalink to "Test a hook""></a></h2><p>A hook definition is a plain object, so a unit test calls <code>hook.events["turn.completed"]</code> directly with an event and a stub <code>HookContext</code>. Discovery skips <code>*.test.ts</code>, so the test can live next to the hook.</p><table tabindex="0"><thead><tr><th>Command</th><th>What it reports</th></tr></thead><tbody><tr><td><code>bdk validate --dir .</code></td><td>Discovery errors and the empty-handlers warning</td></tr><tr><td><code>bdk info --dir . --json</code></td><td>Loaded hooks under <code>agents[].hooks</code></td></tr><tr><td><code>bdk run --dir . --message "…"</code></td><td>Serve log on stderr, including <code>hook "<name>" handler for <event> threw: …</code></td></tr></tbody></table><p>On hosting, read the same log with <a href="./cli.html#logs"><code>bdk logs</code></a>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./../guides/hooks.html">Hooks guide</a>: meter usage and page on failure</li><li><a href="./sessions.html">Sessions and streaming</a>: the event vocabulary hooks observe</li><li><a href="./../guides/opentelemetry.html">OpenTelemetry</a>: OTLP traces and metrics from the same event stream</li><li><a href="./../deployment.html#observability">Deployment</a>: runtime logs and export paths</li><li><a href="./channels.html#events">Channels</a>: the delivery-side counterpart</li></ul>`,31)])])}const E=e(n,[["render",o]]);export{c as __pageData,E as default};
|
package/dist/docs/assets/{reference_hooks.md.DbthhtIR.lean.js → reference_hooks.md.C5LCJ1R3.lean.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state.","frontmatter":{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state."},"headers":[],"relativePath":"reference/hooks.md","filePath":"reference/hooks.md"}'),n={name:"reference/hooks.md"};function o(d,s,h,l,r,p){return a(),t("div",null,[...s[0]||(s[0]=[i("",
|
|
1
|
+
import{_ as e,c as t,o as a,a3 as i}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state.","frontmatter":{"title":"Hooks","description":"Observe-only subscribers to the session event stream: audit logs, metrics, transcript mirrors, derived state."},"headers":[],"relativePath":"reference/hooks.md","filePath":"reference/hooks.md"}'),n={name:"reference/hooks.md"};function o(d,s,h,l,r,p){return a(),t("div",null,[...s[0]||(s[0]=[i("",31)])])}const E=e(n,[["render",o]]);export{c as __pageData,E as default};
|
package/dist/docs/assets/{reference_http-api.md.BZOvhCqY.js → reference_http-api.md.DbFNOubV.js}
RENAMED
|
@@ -8,4 +8,4 @@ import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const p=JSON
|
|
|
8
8
|
<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>
|
|
9
9
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '{"input":{"prUrl":"https://github.com/acme/checkout/pull/42"}}'</span></span>
|
|
10
10
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># {"ok":true,"toolName":"inspect_pr","callId":"tool_inspect_pr_…",</span></span>
|
|
11
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># "isError":false,"result":{…},"durationMs":12}</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Body field</th><th>Contract</th></tr></thead><tbody><tr><td><code>input</code></td><td>Tool input; defaults to <code>{}</code></td></tr><tr><td><code>sessionId</code></td><td>Bind the call to an existing session</td></tr><tr><td><code>continuationToken</code></td><td>Bind the call by its wire continuation token; mutually exclusive with <code>sessionId</code></td></tr></tbody></table><p>Omit both identifiers for an unbound call. Agent-execution tools return <code>400</code>, and an unknown name returns <code>404</code> with the available names. See <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a> for session binding, busy-session rules, and error codes.</p><h2 id="discovery-routes" tabindex="-1">Discovery routes <a class="header-anchor" href="#discovery-routes" aria-label="Permalink to "Discovery routes""></a></h2><p>These read-only routes describe the running agent.</p><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>GET /v1/info</code></td><td>Return the discovered model, tools, skills, connections, subagents, channels, schedules, hooks, and diagnostics</td></tr><tr><td><code>GET /v1/tools</code></td><td>Return live server tools and advertised MCP tools as <code>{ name, title?, source? }</code>; bind
|
|
11
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># "isError":false,"result":{…},"durationMs":12}</span></span></code></pre></div><table tabindex="0"><thead><tr><th>Body field</th><th>Contract</th></tr></thead><tbody><tr><td><code>input</code></td><td>Tool input; defaults to <code>{}</code></td></tr><tr><td><code>sessionId</code></td><td>Bind the call to an existing session</td></tr><tr><td><code>continuationToken</code></td><td>Bind the call by its wire continuation token; mutually exclusive with <code>sessionId</code></td></tr></tbody></table><p>Omit both identifiers for an unbound call. Agent-execution tools return <code>400</code>, and an unknown name returns <code>404</code> with the available names. See <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a> for session binding, busy-session rules, and error codes.</p><h2 id="discovery-routes" tabindex="-1">Discovery routes <a class="header-anchor" href="#discovery-routes" aria-label="Permalink to "Discovery routes""></a></h2><p>These read-only routes describe the running agent.</p><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>GET /v1/info</code></td><td>Return the discovered model, tools, skills, connections, subagents, channels, schedules, hooks, and diagnostics</td></tr><tr><td><code>GET /v1/tools</code></td><td>Return live server tools and advertised MCP tools as <code>{ name, title?, source? }</code>; bind session-specific listings with <code>session</code> or <code>continuationToken</code></td></tr><tr><td><code>GET /v1/tools/:name</code></td><td>Return one tool's description, execution mode, approval and effect rules, schemas, and source</td></tr><tr><td><code>GET /v1/health</code></td><td>Return per-agent liveness; no auth</td></tr><tr><td><code>GET /v1/logs?after=N</code></td><td>Return recent server logs and the next polling cursor</td></tr></tbody></table><p>An unknown tool name returns <code>404</code> with available names. If an MCP connection can't list its tools, the catalog skips that connection and includes it in <code>connectionErrors</code>.</p><h2 id="list-and-download-artifacts" tabindex="-1">List and download artifacts <a class="header-anchor" href="#list-and-download-artifacts" aria-label="Permalink to "List and download artifacts""></a></h2><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>GET /v1/artifacts</code></td><td>Return <code>{ artifacts }</code>, newest-updated first; filter with <code>kind</code>, <code>sessionId</code>, and a positive <code>limit</code></td></tr><tr><td><code>GET /v1/artifacts/:id/content</code></td><td>Download an artifact's file or blob as an attachment; return <code>404</code> when no content exists</td></tr></tbody></table><p>The list follows the same ownership rules as <code>GET /v1/sessions</code>. See <a href="./artifacts.html">Artifacts</a> for tagging and record fields.</p><h2 id="call-custom-channel-routes" tabindex="-1">Call custom channel routes <a class="header-anchor" href="#call-custom-channel-routes" aria-label="Permalink to "Call custom channel routes""></a></h2><p>Authored routes mount under <code>/v1/channels/<id></code> with their declared methods and paths. The host validates their Zod body and query schemas before calling the handler, returning <code>400</code> on failure. Each channel's auth chain applies. See <a href="./channels.html">Channels</a>.</p><h2 id="mcp-endpoint" tabindex="-1">MCP endpoint <a class="header-anchor" href="#mcp-endpoint" aria-label="Permalink to "MCP endpoint""></a></h2><p>Both MCP routes use stateless streamable HTTP. Send protocol requests with <code>POST</code>; <code>GET</code> and <code>DELETE</code> return <code>405</code>.</p><table tabindex="0"><thead><tr><th>Route</th><th>Tools and auth</th></tr></thead><tbody><tr><td><code>/v1/mcp</code></td><td><code>ask</code>, <code>check</code>, and <code>call_tool</code> when server tools exist; uses the session API auth chain</td></tr><tr><td><code>/v1/mcp/tools</code></td><td>Deterministic server tools only; uses the CLI-level loopback, bearer, or anonymous auth chain</td></tr></tbody></table><p>See <a href="./connections.html#peer-mcp-connection">MCP connections</a> to connect one agent to another.</p><h2 id="playground-eval-routes" tabindex="-1">Playground eval routes <a class="header-anchor" href="#playground-eval-routes" aria-label="Permalink to "Playground eval routes""></a></h2><p>The playground Evals tab and remote eval commands use these routes:</p><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>GET /v1/dev/evals</code></td><td>List discovered cases and eval config</td></tr><tr><td><code>GET /v1/dev/evals/runs</code></td><td>List recent run snapshots, newest first</td></tr><tr><td><code>POST /v1/dev/evals/runs</code></td><td>Start <code>{ filterIds?, tags?, timeoutMs?, verbose? }</code>; return <code>202</code>, <code>404</code> for no match, or <code>409</code> while another run is active</td></tr><tr><td><code>GET /v1/dev/evals/runs/:runId</code></td><td>Return progress and the final snapshot</td></tr><tr><td><code>POST /v1/dev/evals/runs/:runId/cancel</code></td><td>Cancel an active run; return <code>404</code> when unknown or <code>409</code> when no longer running</td></tr></tbody></table><p>Poll the run route until its status is <code>completed</code>, <code>failed</code>, or <code>cancelled</code>. Entries within <code>filterIds</code> and <code>tags</code> use OR semantics; when both fields are present, a case must match each group.</p><h2 id="dev-mode-routes" tabindex="-1">Dev-mode routes <a class="header-anchor" href="#dev-mode-routes" aria-label="Permalink to "Dev-mode routes""></a></h2><p>These routes exist only under <code>serve --dev</code>.</p><table tabindex="0"><thead><tr><th>Route</th><th>Contract</th></tr></thead><tbody><tr><td><code>POST /v1/dev/schedules/:scheduleId</code></td><td>Dispatch a schedule by hand, exactly once. Returns <code>{scheduleId, sessionIds}</code></td></tr><tr><td><code>GET /v1/dev/reminders</code></td><td>List reminders</td></tr><tr><td><code>POST /v1/dev/reminders/:reminderId</code></td><td>Fire a reminder by hand</td></tr></tbody></table><p>Schedules and reminders never fire automatically in dev mode. These routes run them manually.</p><h2 id="playground-assets" tabindex="-1">Playground assets <a class="header-anchor" href="#playground-assets" aria-label="Permalink to "Playground assets""></a></h2><p><code>GET /playground</code> and <code>GET /playground/assets/:file</code> serve the playground. <code>--no-playground</code> removes both routes.</p><h2 id="status-codes" tabindex="-1">Status codes <a class="header-anchor" href="#status-codes" aria-label="Permalink to "Status codes""></a></h2><p>Built-in routes use these common status codes.</p><table tabindex="0"><thead><tr><th>Code</th><th>Meaning</th></tr></thead><tbody><tr><td><code>400</code></td><td>Invalid body, query, tool input, or request shape</td></tr><tr><td><code>401</code></td><td>No auth policy admitted the request</td></tr><tr><td><code>403</code></td><td>The caller is authenticated but doesn't own the resource</td></tr><tr><td><code>404</code></td><td>A named resource doesn't exist, or an eval selection matches no cases</td></tr><tr><td><code>405</code></td><td>The route doesn't accept this method</td></tr><tr><td><code>409</code></td><td>The resource state rejects the request, such as a stale token or busy write</td></tr><tr><td><code>202</code></td><td>The request was accepted for asynchronous work</td></tr><tr><td><code>500</code></td><td>A write-effect tool can't create its session workspace (<code>workspace_unavailable</code>)</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./sessions.html">Sessions</a></li><li><a href="./channels.html">Channels</a></li><li><a href="./tools.html">Tools</a></li><li><a href="./../deployment.html">Deployment</a></li></ul>`,61)])])}const k=t(d,[["render",n]]);export{p as __pageData,k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as t,c as
|
|
1
|
+
import{_ as t,c as i,o as e,a3 as a}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Instructions","description":"The always-on system prompt: authoring forms, how it reaches the local harness, and what makes instructions hold up.","frontmatter":{"title":"Instructions","description":"The always-on system prompt: authoring forms, how it reaches the local harness, and what makes instructions hold up."},"headers":[],"relativePath":"reference/instructions.md","filePath":"reference/instructions.md"}'),n={name:"reference/instructions.md"};function l(o,s,r,h,d,p){return e(),i("div",null,[...s[0]||(s[0]=[a(`<h1 id="instructions" tabindex="-1">Instructions <a class="header-anchor" href="#instructions" aria-label="Permalink to "Instructions""></a></h1><p>Agent instructions form the always-on system prompt and reach the model on every turn. A root agent requires them; a subagent may inline <code>instructions</code> in <code>agent.ts</code> instead.</p><h2 id="authoring-forms" tabindex="-1">Authoring forms <a class="header-anchor" href="#authoring-forms" aria-label="Permalink to "Authoring forms""></a></h2><table tabindex="0"><thead><tr><th>Form</th><th>Use it when</th></tr></thead><tbody><tr><td><code>bot/instructions.md</code></td><td>Plain Markdown for most agents</td></tr><tr><td><code>bot/instructions.ts</code></td><td>Generated prompts. Default-export <code>defineInstructions({ markdown })</code> or a plain string</td></tr><tr><td><code>bot/instructions/</code> directory</td><td>A long prompt split across files, composed in filename order</td></tr></tbody></table><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:#6A737D;--shiki-dark:#6A737D;">// bot/instructions.ts</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { defineInstructions } </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>
|
|
3
3
|
<span class="line"></span>
|
|
4
4
|
<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;"> defineInstructions</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">({</span></span>
|
|
@@ -11,4 +11,4 @@ import{_ as t,c as a,o as i,a3 as e}from"./chunks/framework.BNw1pucY.js";const k
|
|
|
11
11
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">2.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Match your review to the complexity it reports.</span></span>
|
|
12
12
|
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">3.</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Never approve a draft.</span></span>
|
|
13
13
|
<span class="line"></span>
|
|
14
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">End with one sentence: the verdict and why.</span></span></code></pre></div><p>Name the tools and the decision rule ("use X before answering about Y"), not general encouragement. State the output contract, including length, format, and fences, so your <a href="./../evals.html">evals</a> can gate it. Put multi-step workflows the model only sometimes needs in <code>bot/skills/</code>; they load on demand and keep the always-on prompt small.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./skills.html">Skills</a>: procedures the model loads only when relevant</li><li><a href="./agent-config.html">Agent config</a>: the file next to this one</li><li><a href="./../hillclimbing.html">Hillclimbing</a>: iterating on instructions with evidence</li></ul>`,
|
|
14
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">End with one sentence: the verdict and why.</span></span></code></pre></div><p>Name the tools and the decision rule ("use X before answering about Y"), not general encouragement. State the output contract, including length, format, and fences, so your <a href="./../evals.html">evals</a> can gate it. Put multi-step workflows the model only sometimes needs in <code>bot/skills/</code>; they load on demand and keep the always-on prompt small.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./skills.html">Skills</a>: procedures the model loads only when relevant</li><li><a href="./agent-config.html">Agent config</a>: the file next to this one</li><li><a href="./../hillclimbing.html">Hillclimbing</a>: iterating on instructions with evidence</li></ul>`,13)])])}const u=t(n,[["render",l]]);export{k as __pageData,u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,c as
|
|
1
|
+
import{_ as t,c as i,o as e,a3 as a}from"./chunks/framework.BNw1pucY.js";const k=JSON.parse('{"title":"Instructions","description":"The always-on system prompt: authoring forms, how it reaches the local harness, and what makes instructions hold up.","frontmatter":{"title":"Instructions","description":"The always-on system prompt: authoring forms, how it reaches the local harness, and what makes instructions hold up."},"headers":[],"relativePath":"reference/instructions.md","filePath":"reference/instructions.md"}'),n={name:"reference/instructions.md"};function l(o,s,r,h,d,p){return e(),i("div",null,[...s[0]||(s[0]=[a("",13)])])}const u=t(n,[["render",l]]);export{k as __pageData,u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,c as a,o,a3 as r}from"./chunks/framework.BNw1pucY.js";const p=JSON.parse('{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch.","frontmatter":{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch."},"headers":[],"relativePath":"reference/playground.md","filePath":"reference/playground.md"}'),d={name:"reference/playground.md"};function s(n,e,l,c,i,h){return o(),a("div",null,[...e[0]||(e[0]=[r('<h1 id="playground" tabindex="-1">Playground <a class="header-anchor" href="#playground" aria-label="Permalink to "Playground""></a></h1><p><code>bdk serve</code> enables a web playground at <code>http://127.0.0.1:3000/<slug>/playground</code> (or <code>/playground</code> in single mode). In multi-agent mode, each agent has its own playground, and <code>/</code> lists them all.</p><h2 id="playground-surfaces" tabindex="-1">Playground surfaces <a class="header-anchor" href="#playground-surfaces" aria-label="Permalink to "Playground surfaces""></a></h2><table tabindex="0"><thead><tr><th>Surface</th><th>What you can do</th></tr></thead><tbody><tr><td>Chat</td><td>Talk to the agent. Text and reasoning stream live, and tool calls appear inline with their arguments, output, and error state</td></tr><tr><td>Slash commands</td><td>Custom channel routes without path parameters become composer commands; GitHub and Slack ingress routes are excluded. A <code>drive</code> route becomes <code>/drive <pr-url></code>, with <code>/help</code> and autocomplete</td></tr><tr><td>Try</td><td>Invoke a custom channel route from the Agent tab. The modal remembers your last body per endpoint, copies curl, and opens a session when the route creates one</td></tr><tr><td>Runs</td><td>Browse the sessions you own and eval runs. Search by title or identifier; open sessions in Chat, Trace, or Raw and eval runs in Evals</td></tr><tr><td>Approvals</td><td>Parked <code>needsApproval</code> tool calls render Approve / Deny buttons</td></tr><tr><td>Evals</td><td>List and run filesystem evals from the browser</td></tr><tr><td>Agent</td><td>Inspect the discovered tools, skills, subagents, MCP connections, channels, and hooks</td></tr><tr><td>Raw</td><td>Inspect the selected session's event stream</td></tr><tr><td>Logs</td><td>Recent server log lines, polled from <code>GET /v1/logs</code></td></tr></tbody></table><p>In <code>--dev</code> on loopback, or with <code>--allow-anonymous</code>, the session list includes every principal.</p><h2 id="remote-access" tabindex="-1">Remote access <a class="header-anchor" href="#remote-access" aria-label="Permalink to "Remote access""></a></h2><p>The default <code>localDevStrict()</code> auth admits direct loopback calls only and rejects proxy-forwarding headers, so a tunnel or LAN address won't work until you pass <code>--bearer-token <secret></code> (or <code>serve(dir, { authToken })</code>). Open the playground on the remote device and paste the token into the token field in the navbar. <code>--allow-anonymous</code> is the demo-only alternative for trusted networks.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./http-api.html">HTTP API</a>: the HTTP surface the playground uses</li><li><a href="./sessions.html">Sessions and streaming</a>: the streams it renders</li><li><a href="./tools.html#gate-a-tool-on-human-approval">Gate a tool on human approval</a>: the approval buttons in context</li></ul>',9)])])}const m=t(d,[["render",s]]);export{p as __pageData,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,c as a,o,a3 as r}from"./chunks/framework.BNw1pucY.js";const p=JSON.parse('{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch.","frontmatter":{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch."},"headers":[],"relativePath":"reference/playground.md","filePath":"reference/playground.md"}'),d={name:"reference/playground.md"};function s(n,e,l,c,i,h){return o(),a("div",null,[...e[0]||(e[0]=[r("",
|
|
1
|
+
import{_ as t,c as a,o,a3 as r}from"./chunks/framework.BNw1pucY.js";const p=JSON.parse('{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch.","frontmatter":{"title":"Playground","description":"The built-in web UI: chat with streaming, Try buttons and slash commands, session replay, approvals, and dev-mode dispatch."},"headers":[],"relativePath":"reference/playground.md","filePath":"reference/playground.md"}'),d={name:"reference/playground.md"};function s(n,e,l,c,i,h){return o(),a("div",null,[...e[0]||(e[0]=[r("",9)])])}const m=t(d,[["render",s]]);export{p as __pageData,m as default};
|
|
@@ -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>The Grok Bot Development Kit (BDK) builds a project by walking the filesystem under <code>bot/</code>. The path a file lands in 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/
|
|
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>The Grok Bot Development Kit (BDK) builds a project by walking the filesystem under <code>bot/</code>. The path a file lands in 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>
|
|
@@ -10,7 +10,7 @@ import{_ as t,c as o,o as s,a3 as a}from"./chunks/framework.BNw1pucY.js";const u
|
|
|
10
10
|
<span class="line"><span>│ ├── mcp-connections/</span></span>
|
|
11
11
|
<span class="line"><span>│ │ └── linear.ts # tools from external MCP servers</span></span>
|
|
12
12
|
<span class="line"><span>│ ├── host-connections/</span></span>
|
|
13
|
-
<span class="line"><span>│ │ └──
|
|
13
|
+
<span class="line"><span>│ │ └── inventory.ts # host-only MCP tools</span></span>
|
|
14
14
|
<span class="line"><span>│ ├── subagents/</span></span>
|
|
15
15
|
<span class="line"><span>│ │ └── reviewer/</span></span>
|
|
16
16
|
<span class="line"><span>│ │ ├── agent.ts</span></span>
|
package/dist/docs/assets/{reference_prompt.md.BQZB4eaV.js → reference_prompt.md.DqPh71XN.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{_ as e,c as i,o as
|
|
2
|
-
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// or: import { prompt } from "@cursor/bdk/prompt";</span></span></code></pre></div><
|
|
1
|
+
import{_ as e,c as i,o as t,a3 as a}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Prompt strings","description":"Write indented multi-line strings without carrying source indentation into their values.","frontmatter":{"title":"Prompt strings","description":"Write indented multi-line strings without carrying source indentation into their values."},"headers":[],"relativePath":"reference/prompt.md","filePath":"reference/prompt.md"}'),n={name:"reference/prompt.md"};function r(p,s,l,h,o,d){return t(),i("div",null,[...s[0]||(s[0]=[a(`<h1 id="prompt-strings" tabindex="-1">Prompt strings <a class="header-anchor" href="#prompt-strings" aria-label="Permalink to "Prompt strings""></a></h1><p>The <code>prompt</code> template tag keeps multi-line strings aligned with the surrounding TypeScript while returning dedented text. Use it for tool descriptions, reminder prompts, channel context, and errors. Import it from the package root or the dedicated entrypoint:</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;"> { prompt } </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
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// or: import { prompt } from "@cursor/bdk/prompt";</span></span></code></pre></div><h2 id="dedented-strings" tabindex="-1">Dedented strings <a class="header-anchor" href="#dedented-strings" aria-label="Permalink to "Dedented strings""></a></h2><p><code>prompt</code> returns one string. It removes the common leading whitespace and one newline immediately after the opening backtick.</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;">throw</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> new</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">prompt</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> It is outside business hours (Mon-Fri 9am-5pm ET).</span></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Use request_author_approval, or pass approval=human_request.</span></span>
|
|
5
5
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span></code></pre></div><p>Blank lines inside the body are preserved. Relative indentation after the common prefix is preserved, so nested lists keep their shape.</p><p>When interpolating multi-line values (for example a list of services), give those lines the same indent as the <code>prompt</code> body so dedent stays consistent.</p><h2 id="line-arrays" tabindex="-1">Line arrays <a class="header-anchor" href="#line-arrays" aria-label="Permalink to "Line arrays""></a></h2><p><code>prompt.lines</code> applies the same rules and returns <code>string[]</code>, with one entry per line. Use it when an API accepts separate context lines:</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;">context</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: prompt.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">lines</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span>
|
|
6
6
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Merged PR detected: \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">pr</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;">} by \${</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">author</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">}.</span></span>
|
|
7
7
|
<span class="line"></span>
|
|
8
8
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> Call plan_deploy, then follow its nextStep.</span></span>
|
|
9
|
-
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span></code></pre></div><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./tools.html">Tools</a></li><li><a href="./channels.html">Channels</a></li></ul>`,
|
|
9
|
+
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">\`</span></span></code></pre></div><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./tools.html">Tools</a></li><li><a href="./channels.html">Channels</a></li></ul>`,13)])])}const g=e(n,[["render",r]]);export{c as __pageData,g 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 c=JSON.parse('{"title":"Prompt strings","description":"Write indented multi-line strings without carrying source indentation into their values.","frontmatter":{"title":"Prompt strings","description":"Write indented multi-line strings without carrying source indentation into their values."},"headers":[],"relativePath":"reference/prompt.md","filePath":"reference/prompt.md"}'),n={name:"reference/prompt.md"};function r(p,s,l,h,o,d){return t(),i("div",null,[...s[0]||(s[0]=[a("",13)])])}const g=e(n,[["render",r]]);export{c as __pageData,g as default};
|
package/dist/docs/assets/{reference_schedules.md.BVU5EFbz.js → reference_schedules.md.BuJ8fgMa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime.","frontmatter":{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime."},"headers":[],"relativePath":"reference/schedules.md","filePath":"reference/schedules.md"}'),n={name:"reference/schedules.md"};function h(l,s,d,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="schedules-and-reminders" tabindex="-1">Schedules and reminders <a class="header-anchor" href="#schedules-and-reminders" aria-label="Permalink to "Schedules and reminders""></a></h1><p>An agent can act without an inbound message in two ways. A schedule is deploy-time cron: "every weekday at 09:00, summarize open incidents." A reminder is a runtime wake bound to one conversation: "re-check this PR's CI in two hours." Schedules live in the filesystem; reminders are created by running code.</p><
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime.","frontmatter":{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime."},"headers":[],"relativePath":"reference/schedules.md","filePath":"reference/schedules.md"}'),n={name:"reference/schedules.md"};function h(l,s,d,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t(`<h1 id="schedules-and-reminders" tabindex="-1">Schedules and reminders <a class="header-anchor" href="#schedules-and-reminders" aria-label="Permalink to "Schedules and reminders""></a></h1><p>An agent can act without an inbound message in two ways. A schedule is deploy-time cron: "every weekday at 09:00, summarize open incidents." A reminder is a runtime wake bound to one conversation: "re-check this PR's CI in two hours." Schedules live in the filesystem; reminders are created by running code.</p><h2 id="schedules" tabindex="-1">Schedules <a class="header-anchor" href="#schedules" aria-label="Permalink to "Schedules""></a></h2><p>Cron expressions are standard 5-field, evaluated in UTC with minute granularity.</p><h3 id="markdown-schedules" tabindex="-1">Markdown schedules <a class="header-anchor" href="#markdown-schedules" aria-label="Permalink to "Markdown schedules""></a></h3><p>A markdown file with <code>cron:</code> frontmatter is a fire-and-forget task:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">---</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">cron: "0 9 * * 1-5"</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">---</span></span>
|
|
4
4
|
<span class="line"></span>
|
|
@@ -44,4 +44,4 @@ import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
|
|
|
44
44
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> handler: ciRecheck,</span></span>
|
|
45
45
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> args: { prUrl: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"https://github.com/acme/checkout/pull/42"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
46
46
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><p>Use an anonymous <code>run</code> handler only for legacy projects that can re-arm it after a restart. New projects should use a named handler.</p><table tabindex="0"><thead><tr><th>Form</th><th>What it does</th><th>After a restart</th></tr></thead><tbody><tr><td>Prompt</td><td>Sends <code>prompt</code> into the session. <code>until</code> is the standing cancellation condition for the model</td><td>Stays armed</td></tr><tr><td>Named handler</td><td>Runs a discovered handler with serializable <code>args</code>; it starts a model turn only if the handler calls <code>followup</code></td><td>Stays armed</td></tr><tr><td>Anonymous <code>run</code></td><td>Host handler returns <code>stop</code>, <code>skip</code>, or <code>delivered</code> per tick; it starts a model turn only if it calls <code>followup</code></td><td>Must be re-armed</td></tr></tbody></table><p>The same API is <code>host.reminders</code> on channel handlers, tools, and schedule runs. <code>builtinTools: { reminders: true }</code> adds <code>reminders_create</code>, <code>reminders_list</code>, and <code>reminders_cancel</code> on the current conversation; see <a href="./agent-config.html#built-in-tools">Agent config: built-in tools</a>.</p><p><code>--dev</code> does not auto-fire reminders. Dispatch one by hand:</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:#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/dev/reminders</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # list</span></span>
|
|
47
|
-
<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/dev/reminders/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # fire one</span></span></code></pre></div><p><code>handle.dispatchReminder(id)</code> is the programmatic equivalent.</p><p>Cancel reminders when their subject dies, for example on <code>pull_request.closed</code>. Keep wake prompts generic so the agent re-reads live state instead of replaying a stale payload.</p><h2 id="schedules-vs-reminders" tabindex="-1">Schedules vs reminders <a class="header-anchor" href="#schedules-vs-reminders" aria-label="Permalink to "Schedules vs reminders""></a></h2><table tabindex="0"><thead><tr><th></th><th>Schedule</th><th>Reminder</th></tr></thead><tbody><tr><td>Defined</td><td>at deploy time, <code>bot/schedules/*</code></td><td>at runtime, <code>createReminder</code> / <code>host.reminders</code></td></tr><tr><td>Scope</td><td>global to the agent</td><td>one channel continuation (one conversation)</td></tr><tr><td>Session</td><td>starts a new task session (or hands off through <code>receive</code>)</td><td>wakes an existing conversation</td></tr><tr><td>Cadence</td><td>cron (UTC)</td><td><code>every</code>, <code>cron</code>, <code>delay</code>, or <code>at</code></td></tr><tr><td>Dev mode</td><td>manual dispatch only</td><td>manual dispatch only (timers off)</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./channels.html">Channels</a>: <code>receive</code> and the delivery events</li><li><a href="./../guides/github.html">GitHub guide</a>: reminders in a real webhook loop</li><li><a href="./http-api.html#dev-mode-routes">HTTP API</a>: the dev dispatch routes</li></ul>`,
|
|
47
|
+
<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/dev/reminders/</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"><</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">i</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">d</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">></span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # fire one</span></span></code></pre></div><p><code>handle.dispatchReminder(id)</code> is the programmatic equivalent.</p><p>Cancel reminders when their subject dies, for example on <code>pull_request.closed</code>. Keep wake prompts generic so the agent re-reads live state instead of replaying a stale payload.</p><h2 id="schedules-vs-reminders" tabindex="-1">Schedules vs reminders <a class="header-anchor" href="#schedules-vs-reminders" aria-label="Permalink to "Schedules vs reminders""></a></h2><table tabindex="0"><thead><tr><th></th><th>Schedule</th><th>Reminder</th></tr></thead><tbody><tr><td>Defined</td><td>at deploy time, <code>bot/schedules/*</code></td><td>at runtime, <code>createReminder</code> / <code>host.reminders</code></td></tr><tr><td>Scope</td><td>global to the agent</td><td>one channel continuation (one conversation)</td></tr><tr><td>Session</td><td>starts a new task session (or hands off through <code>receive</code>)</td><td>wakes an existing conversation</td></tr><tr><td>Cadence</td><td>cron (UTC)</td><td><code>every</code>, <code>cron</code>, <code>delay</code>, or <code>at</code></td></tr><tr><td>Dev mode</td><td>manual dispatch only</td><td>manual dispatch only (timers off)</td></tr></tbody></table><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./channels.html">Channels</a>: <code>receive</code> and the delivery events</li><li><a href="./../guides/github.html">GitHub guide</a>: reminders in a real webhook loop</li><li><a href="./http-api.html#dev-mode-routes">HTTP API</a>: the dev dispatch routes</li></ul>`,33)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime.","frontmatter":{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime."},"headers":[],"relativePath":"reference/schedules.md","filePath":"reference/schedules.md"}'),n={name:"reference/schedules.md"};function h(l,s,d,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t("",
|
|
1
|
+
import{_ as i,c as a,o as e,a3 as t}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime.","frontmatter":{"title":"Schedules & reminders","description":"Cron-driven runs defined at deploy time, and per-session durable wakes created at runtime."},"headers":[],"relativePath":"reference/schedules.md","filePath":"reference/schedules.md"}'),n={name:"reference/schedules.md"};function h(l,s,d,p,r,k){return e(),a("div",null,[...s[0]||(s[0]=[t("",33)])])}const E=i(n,[["render",h]]);export{c as __pageData,E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives.","frontmatter":{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives."},"headers":[],"relativePath":"reference/sessions.md","filePath":"reference/sessions.md"}'),n={name:"reference/sessions.md"};function d(r,e,i,c,l,h){return o(),s("div",null,[...e[0]||(e[0]=[a('<h1 id="sessions-events-and-streaming" tabindex="-1">Sessions, events, and streaming <a class="header-anchor" href="#sessions-events-and-streaming" aria-label="Permalink to "Sessions, events, and streaming""></a></h1><p>A session keeps one conversation, its workspace, and an append-only record of every message and tool call. Continue it with a continuation token, inspect it with a session ID, and follow progress on the NDJSON stream. Chat sessions wait for follow-ups; task sessions run once and stop.</p><h2 id="session-contents" tabindex="-1">Session contents <a class="header-anchor" href="#session-contents" aria-label="Permalink to "Session contents""></a></h2><p>Each session combines:</p><ul><li>A channel and authenticated caller</li><li>A conversation the caller can continue</li><li>A workspace for local turns</li><li>An NDJSON event stream</li><li>State that lets the conversation resume after a restart</li></ul><p>Sessions belong to the principal that created them. Follow-up, stream, and list routes return <code>403</code> when another caller tries to access one.</p><h2 id="session-identifiers" tabindex="-1">Session identifiers <a class="header-anchor" href="#session-identifiers" aria-label="Permalink to "Session identifiers""></a></h2><p>Sessions have two identifiers because conversation routing and inspection are different jobs.</p><table tabindex="0"><thead><tr><th>Identifier</th><th>Use it for</th></tr></thead><tbody><tr><td><code>continuationToken</code></td><td>Continue a conversation through its channel</td></tr><tr><td><code>sessionId</code></td><td>Stream events, inspect state, resolve approvals, or run a session-bound tool call</td></tr></tbody></table><p>Channels decide what a continuation token looks like. Slack uses its thread identity. A PR channel can use a key such as <code>pr:owner/repo#1</code>. The built-in HTTP API returns an opaque token and rotates it after each accepted follow-up. Reusing a stale HTTP token returns <code>409</code>.</p><p>Use the continuation token to keep talking. Use the session ID to observe or manage the stored session.</p><h2 id="session-modes" tabindex="-1">Session modes <a class="header-anchor" href="#session-modes" aria-label="Permalink to "Session modes""></a></h2><table tabindex="0"><thead><tr><th>Mode</th><th>Created by</th><th>What happens after a turn</th></tr></thead><tbody><tr><td><code>chat</code></td><td>HTTP sessions, channel <code>send</code>, Slack, or MCP <code>ask</code></td><td>Waits in <code>session.waiting</code> and accepts follow-ups</td></tr><tr><td><code>task</code></td><td>Markdown schedules and fire-and-forget dispatch</td><td>Ends in <code>session.completed</code> or <code>session.failed</code></td></tr></tbody></table><p>Task sessions don't accept follow-ups. Trying one returns <code>409</code>.</p><h2 id="follow-ups" tabindex="-1">Follow-ups <a class="header-anchor" href="#follow-ups" aria-label="Permalink to "Follow-ups""></a></h2><p>A follow-up to an idle chat session starts another turn. Admission when the session is already busy depends on the channel:</p><table tabindex="0"><thead><tr><th>Path</th><th>Busy-session policy</th></tr></thead><tbody><tr><td>HTTP playground / <code>POST /v1/session/:id</code> / MCP <code>ask</code></td><td><strong>Preempt</strong> (default): interrupt the in-flight turn, wait for it to settle, then run the new message</td></tr><tr><td>Slack mentions / DMs / alert-watch</td><td><strong>Coalesce</strong>: leave the active turn running and queue the follow-up. The running turn may receive it at a tool boundary; any asks that remain become one follow-up turn when it finishes</td></tr></tbody></table><p>Pass <code>admission: "coalesce"</code> on <code>send()</code> to opt into the Slack policy from other callers. Omit it (or pass <code>"preempt"</code>) to keep interrupt semantics.</p><p><code>POST /v1/session/:id/stop</code> interrupts a turn without sending a new message. The stream records <code>turn.failed</code> with <code>status: "cancelled"</code>; the session stays a chat session and can take another follow-up. A whole-message Slack <code>stop</code> / <code>@agent stop</code> does the same for that thread and clears pending coalesced follow-ups.</p><p>See <a href="./tools.html#call-a-tool-without-a-model-turn">Tools</a> for direct-call behavior while a session is busy.</p><h2 id="stream-events" tabindex="-1">Stream events <a class="header-anchor" href="#stream-events" aria-label="Permalink to "Stream events""></a></h2><p>Each NDJSON line uses this envelope: <code>{ type, index, sessionId, turnId?, at, data }</code>. The <code>index</code> increases within one session. The <code>at</code> field is an ISO-8601 timestamp.</p><table tabindex="0"><thead><tr><th>Phase</th><th>Events</th><th>What they tell you</th></tr></thead><tbody><tr><td>Session</td><td><code>session.started</code>, <code>session.waiting</code>, <code>session.completed</code>, <code>session.failed</code></td><td>Session creation, readiness, and task completion</td></tr><tr><td>Input</td><td><code>message.received</code></td><td>A user message was accepted</td></tr><tr><td>Turn</td><td><code>turn.queued</code>, <code>turn.started</code>, <code>turn.completed</code>, <code>turn.failed</code></td><td>Queue position under a <a href="./agent-config.html#concurrency"><code>maxRunningTurns</code> cap</a>, then turn status, final result, and token usage</td></tr><tr><td>Steps</td><td><code>step.started</code>, <code>step.completed</code></td><td>Model step boundaries and duration</td></tr><tr><td>Reasoning</td><td><code>reasoning.appended</code>, <code>reasoning.completed</code></td><td>Streamed reasoning blocks</td></tr><tr><td>Reply</td><td><code>message.appended</code>, <code>message.completed</code></td><td>Text deltas and finalized assistant messages</td></tr><tr><td>Tools</td><td><code>actions.requested</code>, <code>actions.completed</code>, <code>action.result</code></td><td>Tool names, validated arguments, outputs, and errors</td></tr><tr><td>Approvals</td><td><code>action.approval_requested</code>, <code>action.approval_resolved</code></td><td>A parked tool call and the human decision</td></tr><tr><td>Subagents</td><td><code>subagent.called</code>, <code>subagent.completed</code></td><td>Delegated work</td></tr><tr><td>Artifacts</td><td><code>artifact.tagged</code></td><td>A durable <a href="./artifacts.html">artifact</a> was tagged for this session, by host code or <code>tag_artifact</code></td></tr></tbody></table><p>Pair <code>actions.requested</code> with <code>actions.completed</code> for each model-step batch. <code>action.result</code> is the live per-call envelope. Read <code>turn.completed.data.usage</code> for input, output, and cache token counts. With <code>bot/result.ts</code>, <code>turn.failed</code> is emitted when <code>commit</code> throws, the turn has no assistant text, or <code>ctx.reject(message)</code> doesn't lead to an accepted revision.</p><h2 id="stream-or-replay-events" tabindex="-1">Stream or replay events <a class="header-anchor" href="#stream-or-replay-events" aria-label="Permalink to "Stream or replay events""></a></h2><p>One endpoint handles both live streaming and replay:</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;"> -N</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'http://127.0.0.1:3000/<slug>/v1/session/ses_…/stream?startIndex=0'</span></span></code></pre></div><p>Pass <code>startIndex</code> to continue after the last event you received, including after a server restart. Omit it or pass <code>0</code> to replay the full session before following new events. <code>GET /v1/session/:id/events</code> returns a one-time dump without staying connected.</p><h2 id="local-session-workspace" tabindex="-1">Local session workspace <a class="header-anchor" href="#local-session-workspace" aria-label="Permalink to "Local session workspace""></a></h2><p>BDK creates a workspace before the first local turn:</p><table tabindex="0"><thead><tr><th>Source path</th><th>Lands as</th></tr></thead><tbody><tr><td><code>skills/*</code></td><td><code>.cursor/skills/<name>/SKILL.md</code></td></tr><tr><td>agent tools (<code>execution: "agent"</code>)</td><td>scripts in the session workspace, with a catalog in <code>AGENTS.md</code></td></tr><tr><td><code>sandbox/workspace/**</code></td><td>copied in as seed files</td></tr><tr><td>per-send <code>workspaceFiles</code></td><td>written before the turn</td></tr></tbody></table><p>Instructions reach the model as its system prompt; they aren't written into the workspace. See <a href="./instructions.html#delivery">Instructions</a>.</p><p>Local turns use this workspace as their working directory. Parent directories can contribute <code>AGENTS.md</code> and <code>.cursor</code> settings. Set <code>local.cwd</code> when you need a clean parent directory. A channel can also provide a different working directory for one session, such as a PR worktree.</p><p>See <a href="./agent-config.html#local-cwd">Agent config: local cwd</a> for the inheritance rules.</p><h2 id="session-storage" tabindex="-1">Session storage <a class="header-anchor" href="#session-storage" aria-label="Permalink to "Session storage""></a></h2><p>Local session state lives under <code>--state-root</code>. A slugged mount stores it in a subdirectory named for the slug.</p><p>Deleting a session directory removes the session from the server: it disappears from listings and can no longer be streamed or continued.</p><h2 id="inspect-a-saved-event-stream" tabindex="-1">Inspect a saved event stream <a class="header-anchor" href="#inspect-a-saved-event-stream" aria-label="Permalink to "Inspect a saved event stream""></a></h2><p>Use <code>trajectory</code> with a saved trace:</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 trajectory --events <state-root>/traces/<sessionId>.ndjson</span></span></code></pre></div><p>The command prints tool calls, the reply, and token usage in the same JSON shape as <code>run</code>. Open the session's <strong>Trace</strong> view in the playground for a visual timeline.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./http-api.html">HTTP API</a></li><li><a href="./hooks.html">Hooks</a></li><li><a href="./tools.html">Tools</a></li></ul>',43)])])}const m=t(n,[["render",d]]);export{u as __pageData,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives.","frontmatter":{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives."},"headers":[],"relativePath":"reference/sessions.md","filePath":"reference/sessions.md"}'),n={name:"reference/sessions.md"};function d(r,e,i,c,l,h){return o(),s("div",null,[...e[0]||(e[0]=[a("",
|
|
1
|
+
import{_ as t,c as s,o,a3 as a}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives.","frontmatter":{"title":"Sessions, events, and streaming","description":"Understand how conversations continue, how events stream, and where session data lives."},"headers":[],"relativePath":"reference/sessions.md","filePath":"reference/sessions.md"}'),n={name:"reference/sessions.md"};function d(r,e,i,c,l,h){return o(),s("div",null,[...e[0]||(e[0]=[a("",43)])])}const m=t(n,[["render",d]]);export{u as __pageData,m as default};
|
package/dist/docs/assets/{reference_skills.md.Cy00QMKS.js → reference_skills.md.ClkMoQsV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as e,o as
|
|
1
|
+
import{_ as i,c as e,o as t,a3 as a}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Skills","description":"On-demand procedures the model loads only when relevant, in three authoring forms.","frontmatter":{"title":"Skills","description":"On-demand procedures the model loads only when relevant, in three authoring forms."},"headers":[],"relativePath":"reference/skills.md","filePath":"reference/skills.md"}'),l={name:"reference/skills.md"};function n(h,s,r,o,d,p){return t(),e("div",null,[...s[0]||(s[0]=[a(`<h1 id="skills" tabindex="-1">Skills <a class="header-anchor" href="#skills" aria-label="Permalink to "Skills""></a></h1><p>A skill is an on-demand procedure following the <code>SKILL.md</code> convention: the harness advertises each skill by its description, and the model loads the full content only when the task calls for it. Skills are how you give an agent a multi-step workflow without carrying it in the always-on <a href="./instructions.html">instructions</a>.</p><h2 id="authoring-forms" tabindex="-1">Authoring forms <a class="header-anchor" href="#authoring-forms" aria-label="Permalink to "Authoring forms""></a></h2><p>Skills support three authoring forms.</p><table tabindex="0"><thead><tr><th>Form</th><th>Reach for it when</th></tr></thead><tbody><tr><td><code>bot/skills/<name>.md</code></td><td>Static Markdown. Optional <code>description</code> frontmatter; the first body line is the fallback.</td></tr><tr><td><code>bot/skills/<name>/SKILL.md</code> plus siblings</td><td>A packaged directory with reference files (<code>references/…</code>). Requires <code>description</code> frontmatter.</td></tr><tr><td><code>bot/skills/<name>.ts</code></td><td>Generated content, with <code>defineSkill</code> from <code>@cursor/bdk/skills</code>.</td></tr></tbody></table><p>Use flat Markdown for static content:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">---</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">description: Use when a pull request needs a structured approval checklist.</span></span>
|
|
3
3
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">---</span></span>
|
|
4
4
|
<span class="line"></span>
|
|
@@ -12,4 +12,4 @@ import{_ as i,c as e,o as a,a3 as t}from"./chunks/framework.BNw1pucY.js";const c
|
|
|
12
12
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Research unfamiliar topics before answering."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
13
13
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> markdown: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"Gather evidence first, then answer with the key facts."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
14
14
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> files: { </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"references/checklist.md"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"# Checklist</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">- Find sources.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">"</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
|
|
15
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="skill-delivery" tabindex="-1">Skill delivery <a class="header-anchor" href="#skill-delivery" aria-label="Permalink to "Skill delivery""></a></h2><p>Skills land in the session workspace at <code>.cursor/skills/<name>/SKILL.md</code>, and the harness advertises and loads them natively.</p><h2 id="skills-instructions-and-tools" tabindex="-1">Skills, instructions, and tools <a class="header-anchor" href="#skills-instructions-and-tools" aria-label="Permalink to "Skills, instructions, and tools""></a></h2><p>Instructions are always in context: identity, tool-choice rules, the output contract. Keep them short. Skills load when relevant: procedures, checklists, house style. Reach for a skill when the model needs to follow something but only sometimes needs it loaded. Tools are typed, executable behavior: anything that must be correct every time belongs in tool code, not in prose the model might paraphrase.</p><p>A good skill description is a routing rule, not a title. Say when to use it, like "Use when a pull request needs a structured approval checklist," because the description is all the model sees before deciding to load it.</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>: what stays always-on</li><li><a href="./tools.html">Tools</a>: when prose needs to become code</li><li><a href="./extensions.html">Extensions</a>: skills installed as a package under a namespace</li><li><a href="./project-layout.html">Project layout</a>: where skills sit in the tree</li></ul>`,
|
|
15
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="skill-delivery" tabindex="-1">Skill delivery <a class="header-anchor" href="#skill-delivery" aria-label="Permalink to "Skill delivery""></a></h2><p>Skills land in the session workspace at <code>.cursor/skills/<name>/SKILL.md</code>, and the harness advertises and loads them natively.</p><h2 id="skills-instructions-and-tools" tabindex="-1">Skills, instructions, and tools <a class="header-anchor" href="#skills-instructions-and-tools" aria-label="Permalink to "Skills, instructions, and tools""></a></h2><p>Instructions are always in context: identity, tool-choice rules, the output contract. Keep them short. Skills load when relevant: procedures, checklists, house style. Reach for a skill when the model needs to follow something but only sometimes needs it loaded. Tools are typed, executable behavior: anything that must be correct every time belongs in tool code, not in prose the model might paraphrase.</p><p>A good skill description is a routing rule, not a title. Say when to use it, like "Use when a pull request needs a structured approval checklist," because the description is all the model sees before deciding to load it.</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>: what stays always-on</li><li><a href="./tools.html">Tools</a>: when prose needs to become code</li><li><a href="./extensions.html">Extensions</a>: skills installed as a package under a namespace</li><li><a href="./project-layout.html">Project layout</a>: where skills sit in the tree</li></ul>`,16)])])}const u=i(l,[["render",n]]);export{c as __pageData,u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as e,o as
|
|
1
|
+
import{_ as i,c as e,o as t,a3 as a}from"./chunks/framework.BNw1pucY.js";const c=JSON.parse('{"title":"Skills","description":"On-demand procedures the model loads only when relevant, in three authoring forms.","frontmatter":{"title":"Skills","description":"On-demand procedures the model loads only when relevant, in three authoring forms."},"headers":[],"relativePath":"reference/skills.md","filePath":"reference/skills.md"}'),l={name:"reference/skills.md"};function n(h,s,r,o,d,p){return t(),e("div",null,[...s[0]||(s[0]=[a("",16)])])}const u=i(l,[["render",n]]);export{c as __pageData,u as default};
|
package/dist/docs/assets/{reference_subagents.md.B8oyeXOI.js → reference_subagents.md.gmPt5J-M.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as s,c as a,o as t,a3 as n}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/.","frontmatter":{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/."},"headers":[],"relativePath":"reference/subagents.md","filePath":"reference/subagents.md"}'),i={name:"reference/subagents.md"};function o(l,e,d,r,c,
|
|
1
|
+
import{_ as s,c as a,o as t,a3 as n}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/.","frontmatter":{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/."},"headers":[],"relativePath":"reference/subagents.md","filePath":"reference/subagents.md"}'),i={name:"reference/subagents.md"};function o(l,e,d,r,c,h){return t(),a("div",null,[...e[0]||(e[0]=[n(`<h1 id="subagents" tabindex="-1">Subagents <a class="header-anchor" href="#subagents" aria-label="Permalink to "Subagents""></a></h1><p>A subagent is a specialist child agent the model can delegate to mid-turn. Each one lives under <code>bot/subagents/<id>/</code> with a required <code>agent.ts</code>. Add <code>instructions.md</code> or inline <code>instructions</code> in <code>agent.ts</code> for a custom prompt. The parent model delegates through the <code>task</code> tool, and the stream records <code>subagent.called</code> and <code>subagent.completed</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>bot/subagents/researcher/</span></span>
|
|
2
2
|
<span class="line"><span>├── agent.ts # description (required), model (optional)</span></span>
|
|
3
3
|
<span class="line"><span>└── instructions.md # optional custom system prompt</span></span></code></pre></div><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:#6A737D;--shiki-dark:#6A737D;">// bot/subagents/researcher/agent.ts</span></span>
|
|
4
4
|
<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>
|
|
@@ -7,4 +7,4 @@ import{_ as s,c as a,o as t,a3 as n}from"./chunks/framework.BNw1pucY.js";const u
|
|
|
7
7
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> description:</span></span>
|
|
8
8
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "Background research: climate history, records, comparisons across many cities."</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
9
9
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // model: omit to inherit the parent's model</span></span>
|
|
10
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="subagent-rules" tabindex="-1">Subagent rules <a class="header-anchor" href="#subagent-rules" aria-label="Permalink to "Subagent rules""></a></h2><p><code>description</code> is required. The parent model uses it to decide whether to delegate, so write it as a routing rule ("Background research: …"), following the same discipline as a <a href="./skills.html">skill</a> description. <code>model</code> is optional; omit it to inherit the parent's model, or set it to run the specialist on a different model.</p><p>Subagents inherit the parent's execution surface. Every per-subagent capability directory is reported as a warning and ignored: <code>tools/</code>, <code>skills/</code>, <code>extensions/</code>, <code>mcp-connections/</code>, <code>host-connections/</code>, <code>channels/</code>, <code>schedules/</code>, <code>reminders/</code>, <code>hooks/</code>, <code>sandbox/</code>, and nested <code>subagents/</code>.</p><p>Delegation needs both halves: the description makes it possible, and the parent's <a href="./instructions.html">instructions</a> make it happen. "When a request needs background research, delegate to the <code>researcher</code> subagent." The parent routes; the specialist executes.</p><h2 id="subagents-and-peers" tabindex="-1">Subagents and peers <a class="header-anchor" href="#subagents-and-peers" aria-label="Permalink to "Subagents and peers""></a></h2><p>Subagents split one job into roles inside a single agent. When the specialist is independently useful, with its own tools, sessions, and playground, make it a full agent. See <a href="./../guides/agent-to-agent.html#peer-or-subagent">Peer agents</a>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./skills.html">Skills</a>: when a procedure is enough and a child agent is overkill</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: independently useful specialists</li><li><a href="./agent-config.html#harness-tools">Agent config</a>: <code>"task"</code> on the parent's tool allowlist</li></ul>`,
|
|
10
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">});</span></span></code></pre></div><h2 id="subagent-rules" tabindex="-1">Subagent rules <a class="header-anchor" href="#subagent-rules" aria-label="Permalink to "Subagent rules""></a></h2><p><code>description</code> is required. The parent model uses it to decide whether to delegate, so write it as a routing rule ("Background research: …"), following the same discipline as a <a href="./skills.html">skill</a> description. <code>model</code> is optional; omit it to inherit the parent's model, or set it to run the specialist on a different model.</p><p>Subagents inherit the parent's execution surface. Every per-subagent capability directory is reported as a warning and ignored: <code>tools/</code>, <code>skills/</code>, <code>extensions/</code>, <code>mcp-connections/</code>, <code>host-connections/</code>, <code>channels/</code>, <code>schedules/</code>, <code>reminders/</code>, <code>hooks/</code>, <code>sandbox/</code>, and nested <code>subagents/</code>.</p><p>Delegation needs both halves: the description makes it possible, and the parent's <a href="./instructions.html">instructions</a> make it happen. "When a request needs background research, delegate to the <code>researcher</code> subagent." The parent routes; the specialist executes.</p><h2 id="subagents-and-peers" tabindex="-1">Subagents and peers <a class="header-anchor" href="#subagents-and-peers" aria-label="Permalink to "Subagents and peers""></a></h2><p>Subagents split one job into roles inside a single agent. When the specialist is independently useful, with its own tools, sessions, and playground, make it a full agent. See <a href="./../guides/agent-to-agent.html#peer-or-subagent">Peer agents</a>.</p><h2 id="related" tabindex="-1">Related <a class="header-anchor" href="#related" aria-label="Permalink to "Related""></a></h2><ul><li><a href="./skills.html">Skills</a>: when a procedure is enough and a child agent is overkill</li><li><a href="./../guides/agent-to-agent.html">Peer agents</a>: independently useful specialists</li><li><a href="./agent-config.html#harness-tools">Agent config</a>: <code>"task"</code> on the parent's tool allowlist</li></ul>`,12)])])}const g=s(i,[["render",o]]);export{u as __pageData,g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as s,c as a,o as t,a3 as n}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/.","frontmatter":{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/."},"headers":[],"relativePath":"reference/subagents.md","filePath":"reference/subagents.md"}'),i={name:"reference/subagents.md"};function o(l,e,d,r,c,
|
|
1
|
+
import{_ as s,c as a,o as t,a3 as n}from"./chunks/framework.BNw1pucY.js";const u=JSON.parse('{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/.","frontmatter":{"title":"Subagents","description":"Specialist child agents the model delegates to mid-turn, each its own directory under bot/subagents/."},"headers":[],"relativePath":"reference/subagents.md","filePath":"reference/subagents.md"}'),i={name:"reference/subagents.md"};function o(l,e,d,r,c,h){return t(),a("div",null,[...e[0]||(e[0]=[n("",12)])])}const g=s(i,[["render",o]]);export{u as __pageData,g as default};
|