@cursor/bdk 0.2.24 → 0.2.25
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/AGENTS.md +1 -0
- package/dist/bin/agent-serve.d.ts +1 -1
- package/dist/bin/agent-serve.js +48 -12
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts +3 -2
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -1
- package/dist/channels/bitbucket/bitbucket-webhook.js +14 -9
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +9 -18
- package/dist/channels/pagerduty/api.d.ts +74 -0
- package/dist/channels/pagerduty/api.d.ts.map +1 -0
- package/dist/channels/pagerduty/api.js +101 -0
- package/dist/channels/pagerduty/defaults.d.ts +42 -0
- package/dist/channels/pagerduty/defaults.d.ts.map +1 -0
- package/dist/channels/pagerduty/defaults.js +132 -0
- package/dist/channels/pagerduty/events.d.ts +24 -0
- package/dist/channels/pagerduty/events.d.ts.map +1 -0
- package/dist/channels/pagerduty/events.js +38 -0
- package/dist/channels/pagerduty/index.d.ts +31 -0
- package/dist/channels/pagerduty/index.d.ts.map +1 -0
- package/dist/channels/pagerduty/index.js +30 -0
- package/dist/channels/pagerduty/pagerduty-channel.d.ts +64 -0
- package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -0
- package/dist/channels/pagerduty/pagerduty-channel.js +195 -0
- package/dist/channels/pagerduty/pagerduty-webhook.d.ts +70 -0
- package/dist/channels/pagerduty/pagerduty-webhook.d.ts.map +1 -0
- package/dist/channels/pagerduty/pagerduty-webhook.js +280 -0
- package/dist/channels/pagerduty/payload.d.ts +33 -0
- package/dist/channels/pagerduty/payload.d.ts.map +1 -0
- package/dist/channels/pagerduty/payload.js +150 -0
- package/dist/channels/pagerduty/replay.d.ts +35 -0
- package/dist/channels/pagerduty/replay.d.ts.map +1 -0
- package/dist/channels/pagerduty/replay.js +115 -0
- package/dist/channels/pagerduty/secrets.d.ts +16 -0
- package/dist/channels/pagerduty/secrets.d.ts.map +1 -0
- package/dist/channels/pagerduty/secrets.js +23 -0
- package/dist/channels/pagerduty/self-user.d.ts +51 -0
- package/dist/channels/pagerduty/self-user.d.ts.map +1 -0
- package/dist/channels/pagerduty/self-user.js +157 -0
- package/dist/channels/pagerduty/state.d.ts +31 -0
- package/dist/channels/pagerduty/state.d.ts.map +1 -0
- package/dist/channels/pagerduty/state.js +30 -0
- package/dist/channels/pagerduty/types.d.ts +217 -0
- package/dist/channels/pagerduty/types.d.ts.map +1 -0
- package/dist/channels/pagerduty/types.js +1 -0
- package/dist/channels.d.ts +6 -0
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +11 -23
- package/dist/docs/404.html +2 -2
- package/dist/docs/assets/{app.DTIg0uKK.js → app.BjS1QEI4.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.oGqZumnJ.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BpJoSaxi.js → VPLocalSearchBox.BOuvjb5Y.js} +1 -1
- package/dist/docs/assets/chunks/{arc.ylgNvRNq.js → arc.3WR6Jf-y.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.BMrNJqYk.js → architectureDiagram-Q4EWVU46.Dtb6Dqh6.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.BBWUEqf9.js → baseUniq.BUyrgrZE.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DFMu-Vza.js → blockDiagram-DXYQGD6D.BVLV_voZ.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.8nkAAxWv.js → c4Diagram-AHTNJAMY.jXJ1q70M.js} +1 -1
- package/dist/docs/assets/chunks/channel.Dt4aweTm.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.sO-z2Bag.js → chunk-4BX2VUAB.zz1SMBvK.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BMROzTMq.js → chunk-4TB4RGXK.CzYKuv3I.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.X81urwg7.js → chunk-55IACEB6.C7_tcJZD.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.eaZVFLZM.js → chunk-EDXVE4YY.DeTwQPVO.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CmZhzstR.js → chunk-FMBD7UC4.DhMTl7ut.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.CTezt9Lc.js → chunk-OYMX7WX6.Me7f5hEp.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.s-T8zukB.js → chunk-QZHKN3VN.D0E0Bb6g.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.DN4Nhy-D.js → chunk-YZCP3GAM.CdOOBFYL.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DGUHZs6j.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DGUHZs6j.js +1 -0
- package/dist/docs/assets/chunks/clone.DWf3k0Z0.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.Cqyp4BUH.js → cose-bilkent-S5V4N54A.BNbGESzN.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.BIECOiqR.js → dagre-KV5264BT.zU7Lu_xJ.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.1tLyWoTg.js → diagram-5BDNPKRD.B9qOdE5h.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.BVY_6VMO.js → diagram-G4DWMVQ6.D8X-sf77.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.BSZ7xiBB.js → diagram-MMDJMWI5.CW7MvMlE.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.Bho6GmLh.js → diagram-TYMM5635.J489G0Nd.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.A0yVIANn.js → erDiagram-SMLLAGMA.BkW7tGfs.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.ZMgbllH6.js → flowDiagram-DWJPFMVM.jc9iWORD.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.BCCPBhXo.js → ganttDiagram-T4ZO3ILL.B-UQfd9E.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BOkL0BbA.js → gitGraphDiagram-UUTBAWPF.DFzrTSlJ.js} +1 -1
- package/dist/docs/assets/chunks/{graph.DMyZPu86.js → graph.C5IB6_e_.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.CjG1IiEw.js → infoDiagram-42DDH7IO.DwF0-c8L.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.UCe-kq9g.js → ishikawaDiagram-UXIWVN3A.fBaTqzE7.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.3WyOK_eY.js → journeyDiagram-VCZTEJTY.CM8gDVJy.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.WoRG2qY1.js → kanban-definition-6JOO6SKY.YiD1p0LB.js} +1 -1
- package/dist/docs/assets/chunks/{layout.DV07xDd5.js → layout.6Um-DVJT.js} +1 -1
- package/dist/docs/assets/chunks/{linear.CTO8mN6o.js → linear.DcTeg4Hn.js} +1 -1
- package/dist/docs/assets/chunks/{min.SvTtcKuZ.js → min.CIxkY8Fe.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.DMGgQ-HB.js → mindmap-definition-QFDTVHPH.D4QM_voR.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.B7851apI.js → pieDiagram-DEJITSTG.nmB309G1.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CEqyypIX.js → quadrantDiagram-34T5L4WZ.D1HtZR3C.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.C3Mwsw-H.js → requirementDiagram-MS252O5E.CZgQWob-.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DyYK0XxY.js → sankeyDiagram-XADWPNL6.DtiBfU-P.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.SiQPH-XM.js → sequenceDiagram-FGHM5R23.Cld4gDSt.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.CTJMsP4p.js → stateDiagram-FHFEXIEX.DatP823_.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.C0571l4D.js +1 -0
- package/dist/docs/assets/chunks/{theme.DJo4my9R.js → theme.D5jbBys7.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CxSNRlQ6.js → timeline-definition-GMOUNBTQ.DwQLI2be.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.BdoJskyD.js → vennDiagram-DHZGUBPP.a5yMfnsa.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.B-FXivgT.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.IjIbFn_F.js → wardleyDiagram-NUSXRM2D.Dz--Opy3.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CPUxDZLH.js → xychartDiagram-5P7HB3ND.Dl8w8TeT.js} +1 -1
- package/dist/docs/assets/{guides_opentelemetry.md.Ck1o2frw.js → guides_opentelemetry.md.DBQtp7_V.js} +4 -4
- package/dist/docs/assets/{guides_opentelemetry.md.Ck1o2frw.lean.js → guides_opentelemetry.md.DBQtp7_V.lean.js} +1 -1
- package/dist/docs/assets/guides_pagerduty.md.BHXMcMtx.js +60 -0
- package/dist/docs/assets/guides_pagerduty.md.BHXMcMtx.lean.js +1 -0
- package/dist/docs/assets/{reference_channels.md.DYg0CLud.js → reference_channels.md.Bxaa020x.js} +1 -1
- package/dist/docs/assets/{reference_cli.md.DB7Llw3T.js → reference_cli.md.1o_TqKdt.js} +7 -2
- package/dist/docs/assets/{reference_cli.md.DB7Llw3T.lean.js → reference_cli.md.1o_TqKdt.lean.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.08XR7lIl.js → reference_tools.md.-6pypsWt.js} +1 -1
- package/dist/docs/building-with-agents.html +35 -35
- package/dist/docs/deployment.html +35 -35
- package/dist/docs/evals.html +35 -35
- package/dist/docs/guides/agent-to-agent.html +35 -35
- package/dist/docs/guides/bitbucket.html +36 -36
- package/dist/docs/guides/cloud-agents.html +35 -35
- package/dist/docs/guides/convert-automation.html +35 -35
- package/dist/docs/guides/export-grokbot.html +35 -35
- package/dist/docs/guides/github.html +35 -35
- package/dist/docs/guides/gitlab.html +35 -35
- package/dist/docs/guides/grokbot-agents.html +35 -35
- package/dist/docs/guides/hooks.html +35 -35
- package/dist/docs/guides/improve.html +35 -35
- package/dist/docs/guides/jev.html +35 -35
- package/dist/docs/guides/mcp-oauth.html +35 -35
- package/dist/docs/guides/migrate.html +35 -35
- package/dist/docs/guides/opentelemetry.html +39 -39
- package/dist/docs/guides/opentelemetry.md +10 -5
- package/dist/docs/guides/pagerduty.html +119 -0
- package/dist/docs/guides/pagerduty.md +336 -0
- package/dist/docs/guides/slack.html +35 -35
- package/dist/docs/guides/webhooks.html +35 -35
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +35 -35
- package/dist/docs/index.html +35 -35
- package/dist/docs/llms-full.txt +381 -6
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/quickstart.html +35 -35
- package/dist/docs/reference/agent-config.html +35 -35
- package/dist/docs/reference/artifacts.html +35 -35
- package/dist/docs/reference/channels.html +37 -37
- package/dist/docs/reference/channels.md +2 -1
- package/dist/docs/reference/cli.html +42 -37
- package/dist/docs/reference/cli.md +27 -0
- package/dist/docs/reference/connections.html +35 -35
- package/dist/docs/reference/evals.html +35 -35
- package/dist/docs/reference/extensions.html +36 -36
- package/dist/docs/reference/hooks.html +35 -35
- package/dist/docs/reference/http-api.html +35 -35
- package/dist/docs/reference/instructions.html +35 -35
- package/dist/docs/reference/memory.html +35 -35
- package/dist/docs/reference/playground.html +35 -35
- package/dist/docs/reference/project-layout.html +35 -35
- package/dist/docs/reference/prompt.html +35 -35
- package/dist/docs/reference/schedules.html +35 -35
- package/dist/docs/reference/sessions.html +35 -35
- package/dist/docs/reference/skills.html +35 -35
- package/dist/docs/reference/subagents.html +35 -35
- package/dist/docs/reference/tools.html +37 -37
- package/dist/docs/reference/tools.md +1 -0
- package/dist/docs/templates/agentic-owners.html +35 -35
- package/dist/docs/templates/grokbot-agents.html +35 -35
- package/dist/docs/templates/security-reviewer.html +35 -35
- package/dist/docs/templates/thermo-quality-review.html +35 -35
- package/dist/docs/templates/thermo-review.html +35 -35
- package/dist/docs/templates/triage.html +35 -35
- package/dist/docs/troubleshooting.html +35 -35
- package/dist/internal/approval-gate.d.ts +4 -2
- package/dist/internal/approval-gate.d.ts.map +1 -1
- package/dist/internal/approval-gate.js +2 -1
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
- package/dist/internal/builtin-tools/artifacts.js +45 -12
- package/dist/internal/channel-architecture.d.ts +1 -1
- package/dist/internal/channel-architecture.d.ts.map +1 -1
- package/dist/internal/channel-architecture.js +4 -2
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +21 -12
- package/dist/internal/cli-pagerduty.d.ts +32 -0
- package/dist/internal/cli-pagerduty.d.ts.map +1 -0
- package/dist/internal/cli-pagerduty.js +242 -0
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +7 -0
- package/dist/internal/continuation-identity.d.ts +11 -3
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +83 -0
- package/dist/internal/deploy-manifest.d.ts +11 -4
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +17 -5
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +10 -10
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +10 -10
- package/dist/internal/discovery/channels.d.ts.map +1 -1
- package/dist/internal/discovery/channels.js +20 -16
- package/dist/internal/discovery/context.d.ts +16 -0
- package/dist/internal/discovery/context.d.ts.map +1 -1
- package/dist/internal/discovery/context.js +66 -0
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -1
- package/dist/internal/discovery/extension-overlay.js +2 -6
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +3 -0
- package/dist/internal/discovery/instructions.d.ts.map +1 -1
- package/dist/internal/discovery/instructions.js +3 -6
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +3 -6
- package/dist/internal/discovery/project.d.ts +6 -0
- package/dist/internal/discovery/project.d.ts.map +1 -1
- package/dist/internal/discovery/project.js +27 -5
- package/dist/internal/discovery/runtime.d.ts.map +1 -1
- package/dist/internal/discovery/runtime.js +8 -8
- package/dist/internal/discovery.d.ts +1 -1
- package/dist/internal/discovery.d.ts.map +1 -1
- package/dist/internal/discovery.js +1 -1
- package/dist/internal/expected-delivery-failure.d.ts.map +1 -1
- package/dist/internal/expected-delivery-failure.js +6 -0
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -1
- package/dist/internal/filesystem/sdk-schemas.js +4 -3
- package/dist/internal/hmac-secret-values.d.ts +48 -0
- package/dist/internal/hmac-secret-values.d.ts.map +1 -0
- package/dist/internal/hmac-secret-values.js +68 -0
- package/dist/internal/host-platforms.d.ts.map +1 -1
- package/dist/internal/host-platforms.js +8 -2
- package/dist/internal/json-schema.d.ts +7 -7
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +13 -16
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +3 -1
- package/dist/internal/otel/config.d.ts +6 -1
- package/dist/internal/otel/config.d.ts.map +1 -1
- package/dist/internal/otel/config.js +27 -1
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +26 -3
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +21 -6
- package/dist/internal/sdk-runner.d.ts +2 -3
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +8 -4
- package/dist/internal/secret-alternatives.d.ts +11 -0
- package/dist/internal/secret-alternatives.d.ts.map +1 -0
- package/dist/internal/secret-alternatives.js +13 -0
- package/dist/internal/server.js +2 -2
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +5 -4
- package/dist/internal/sqlite-experimental-warning.d.ts +2 -0
- package/dist/internal/sqlite-experimental-warning.d.ts.map +1 -0
- package/dist/internal/sqlite-experimental-warning.js +22 -0
- package/dist/internal/testing/conversation-identity-vectors.d.ts +6 -1
- package/dist/internal/testing/conversation-identity-vectors.d.ts.map +1 -1
- package/dist/internal/testing/conversation-identity-vectors.js +34 -0
- package/dist/internal/testing/hmac-secret-vectors.d.ts +38 -0
- package/dist/internal/testing/hmac-secret-vectors.d.ts.map +1 -0
- package/dist/internal/testing/hmac-secret-vectors.js +89 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts +42 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts.map +1 -0
- package/dist/internal/testing/pagerduty-continuation-fixtures.js +175 -0
- package/dist/internal/zod-schema.d.ts +14 -0
- package/dist/internal/zod-schema.d.ts.map +1 -0
- package/dist/internal/zod-schema.js +22 -0
- package/dist/playground/assets/cursor-icons-16-DmHBTm1-.woff2 +0 -0
- package/dist/playground/assets/index-BdMwybMt.css +1 -0
- package/dist/playground/assets/{index-DKKdkF29.js → index-CHk6O92d.js} +38 -38
- package/dist/playground/index.html +2 -2
- package/dist/tools.d.ts +13 -10
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +3 -2
- package/dist/types.d.ts +67 -16
- package/dist/types.d.ts.map +1 -1
- package/docs/guides/opentelemetry.md +10 -5
- package/docs/guides/pagerduty.md +341 -0
- package/docs/reference/channels.md +2 -1
- package/docs/reference/cli.md +27 -0
- package/docs/reference/tools.md +1 -0
- package/package.json +10 -3
- package/skills/migrate-v2/SKILL.md +1 -1
- package/skills/otel/SKILL.md +7 -3
- package/templates/agentic-owners/README.md +6 -1
- package/templates/agentic-owners/bot/lib/owners/decision.ts +31 -5
- package/templates/agentic-owners/bot/lib/owners/globalOverride.ts +60 -0
- package/templates/agentic-owners/bot/lib/owners/match.ts +85 -19
- package/templates/agentic-owners/bot/lib/owners/parse.ts +133 -2
- package/templates/agentic-owners/bot/lib/owners/types.ts +23 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.3ebvCWKy.js +0 -1
- package/dist/docs/assets/chunks/channel.BOebySCN.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.C55IaN-T.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.C55IaN-T.js +0 -1
- package/dist/docs/assets/chunks/clone.D06pA7ML.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DddRVjeq.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.CVCRSuQK.js +0 -162
- package/dist/playground/assets/cursor-icons-16-gwXtdAvu.woff2 +0 -0
- package/dist/playground/assets/index-DpKinTMs.css +0 -1
- /package/dist/docs/assets/{reference_channels.md.DYg0CLud.lean.js → reference_channels.md.Bxaa020x.lean.js} +0 -0
- /package/dist/docs/assets/{reference_tools.md.08XR7lIl.lean.js → reference_tools.md.-6pypsWt.lean.js} +0 -0
package/dist/docs/llms-full.txt
CHANGED
|
@@ -3393,6 +3393,10 @@ export OTEL_SERVICE_NAME=incident-agent
|
|
|
3393
3393
|
bdk serve --dir . --dev
|
|
3394
3394
|
```
|
|
3395
3395
|
|
|
3396
|
+
Metrics use delta temporality by default. For Grafana Cloud, set
|
|
3397
|
+
`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` to `cumulative`.
|
|
3398
|
+
Grafana Cloud rejects delta metrics.
|
|
3399
|
+
|
|
3396
3400
|
The default protocol is OTLP/HTTP protobuf. If you already call
|
|
3397
3401
|
`serve()` from TypeScript, you can configure the same destination in
|
|
3398
3402
|
code:
|
|
@@ -3450,10 +3454,10 @@ bdk secrets set my-agent OTEL_EXPORTER_OTLP_ENDPOINT OTEL_EXPORTER_OTLP_HEADERS
|
|
|
3450
3454
|
|
|
3451
3455
|
A later `bdk secrets set` changes the headers on the next export.
|
|
3452
3456
|
You do not redeploy to rotate a token. The URL, service name,
|
|
3453
|
-
resource attributes, signals, sample ratio,
|
|
3454
|
-
|
|
3455
|
-
one of those. BDK logs a warning when one of them
|
|
3456
|
-
running agent.
|
|
3457
|
+
resource attributes, signals, sample ratio, metric export interval,
|
|
3458
|
+
and metrics temporality stay as they were on the first export.
|
|
3459
|
+
Redeploy to change one of those. BDK logs a warning when one of them
|
|
3460
|
+
changes on a running agent.
|
|
3457
3461
|
|
|
3458
3462
|
When an exporter host is missing from `hosting.egressDomains`, BDK
|
|
3459
3463
|
logs an error that names the host. Add the host and redeploy.
|
|
@@ -3568,7 +3572,8 @@ The first metrics to look for are `cursor.token.usage`,
|
|
|
3568
3572
|
## Control what leaves the process
|
|
3569
3573
|
|
|
3570
3574
|
Traces include structure, tool names, usage metrics, and span
|
|
3571
|
-
status. A failed tool's status
|
|
3575
|
+
status. A failed tool's span status and its `action.result` log
|
|
3576
|
+
include a short failure reason.
|
|
3572
3577
|
A tool or subagent that is still open when the turn ends gets
|
|
3573
3578
|
ERROR status with the reason `no result`. User prompts, tool
|
|
3574
3579
|
arguments, and full tool results stay off the wire until you opt in.
|
|
@@ -3602,6 +3607,347 @@ The same controls are available as
|
|
|
3602
3607
|
|
|
3603
3608
|
---
|
|
3604
3609
|
|
|
3610
|
+
Source: /docs/guides/pagerduty.md
|
|
3611
|
+
|
|
3612
|
+
# PagerDuty agents
|
|
3613
|
+
|
|
3614
|
+
A PagerDuty agent wakes when an incident triggers, investigates it, and
|
|
3615
|
+
writes what it found back to the incident. `pagerdutyChannel()` receives
|
|
3616
|
+
PagerDuty's v3 webhooks, verifies them, and keeps every later event for
|
|
3617
|
+
the same incident in one session, so the agent sees an acknowledgement,
|
|
3618
|
+
a note, or a responder's reply in the context of the investigation it
|
|
3619
|
+
already started. Every setting has a default read from a well-known secret, so
|
|
3620
|
+
the channel needs no configuration beyond its hooks; see
|
|
3621
|
+
[Connect](#connect) for the variables.
|
|
3622
|
+
|
|
3623
|
+
## Investigate a new incident
|
|
3624
|
+
|
|
3625
|
+
When an incident triggers, the agent starts a turn with the incident's
|
|
3626
|
+
title, service, urgency, and link. It reads whatever the investigation
|
|
3627
|
+
needs, and with `deliverReplies: true` its reply is posted as a note on
|
|
3628
|
+
the incident, where the person on call already looks.
|
|
3629
|
+
|
|
3630
|
+
```ts
|
|
3631
|
+
// bot/channels/pagerduty.ts
|
|
3632
|
+
import { defaultPagerDutyAuth, pagerdutyChannel } from "@cursor/bdk/channels/pagerduty";
|
|
3633
|
+
|
|
3634
|
+
export default pagerdutyChannel({
|
|
3635
|
+
deliverReplies: true,
|
|
3636
|
+
onIncident: (ctx, event) => {
|
|
3637
|
+
if (event.eventType !== "incident.triggered") {
|
|
3638
|
+
return null;
|
|
3639
|
+
}
|
|
3640
|
+
return {
|
|
3641
|
+
// `auth` starts a model turn running as the event's PagerDuty actor.
|
|
3642
|
+
auth: defaultPagerDutyAuth(ctx),
|
|
3643
|
+
message: `Investigate PagerDuty incident #${event.incident.number}: ${event.incident.title}`,
|
|
3644
|
+
context: [`Service: ${event.incident.service?.summary ?? "unknown"}`],
|
|
3645
|
+
};
|
|
3646
|
+
},
|
|
3647
|
+
});
|
|
3648
|
+
```
|
|
3649
|
+
|
|
3650
|
+
Reply notes are off unless you set `deliverReplies: true`, so the channel
|
|
3651
|
+
writes nothing to PagerDuty on its own. An agent that writes to PagerDuty
|
|
3652
|
+
through its own path, such as a service that audits each write, leaves it
|
|
3653
|
+
off and posts only what it chooses, from `events` or `ctx.pagerduty`.
|
|
3654
|
+
|
|
3655
|
+
With `deliverReplies: true`, the channel posts each completed reply as a
|
|
3656
|
+
note on the session's incident, and a short note if a turn fails, using
|
|
3657
|
+
the `PAGERDUTY_TOKEN` secret. The note goes to the incident in the
|
|
3658
|
+
verified event's state, so the model never chooses which incident it
|
|
3659
|
+
writes to. Eval runs and agents without a token post nothing. Nothing is
|
|
3660
|
+
posted until the channel knows the agent's own PagerDuty user (see
|
|
3661
|
+
[Ignore your own actions](#ignore-your-own-actions)), because each note
|
|
3662
|
+
comes back as a webhook event that only the echo skip keeps from starting
|
|
3663
|
+
another turn. Handlers you write in `events` replace the built-in ones.
|
|
3664
|
+
|
|
3665
|
+
Hooks also get `ctx.pagerduty`, a REST client with the channel's
|
|
3666
|
+
credentials, for reads and writes of their own:
|
|
3667
|
+
|
|
3668
|
+
```ts
|
|
3669
|
+
onIncident: async (ctx, event) => {
|
|
3670
|
+
const incident = await ctx.pagerduty.getIncident(event.incident.id);
|
|
3671
|
+
// …
|
|
3672
|
+
},
|
|
3673
|
+
```
|
|
3674
|
+
|
|
3675
|
+
Hosted, the agent also declares PagerDuty's API host and the token:
|
|
3676
|
+
|
|
3677
|
+
```ts
|
|
3678
|
+
// bot/agent.ts
|
|
3679
|
+
import { defineAgent } from "@cursor/bdk";
|
|
3680
|
+
|
|
3681
|
+
export default defineAgent({
|
|
3682
|
+
architecture: "v2",
|
|
3683
|
+
hosting: {
|
|
3684
|
+
egressDomains: ["api.pagerduty.com"],
|
|
3685
|
+
secretNames: ["PAGERDUTY_TOKEN"],
|
|
3686
|
+
},
|
|
3687
|
+
});
|
|
3688
|
+
```
|
|
3689
|
+
|
|
3690
|
+
## Follow the incident in one session
|
|
3691
|
+
|
|
3692
|
+
People act on an incident while the agent investigates: someone
|
|
3693
|
+
acknowledges it, adds a note, pulls in a responder, or resolves it.
|
|
3694
|
+
Return a dispatch for those events too, and each one arrives in the
|
|
3695
|
+
session that is already working on the incident, with the earlier
|
|
3696
|
+
findings in context.
|
|
3697
|
+
|
|
3698
|
+
```ts
|
|
3699
|
+
onIncident: (ctx, event) => {
|
|
3700
|
+
const followUps = ["incident.acknowledged", "incident.reassigned", "incident.resolved"];
|
|
3701
|
+
if (event.eventType !== "incident.triggered" && !followUps.includes(event.eventType)) {
|
|
3702
|
+
return null;
|
|
3703
|
+
}
|
|
3704
|
+
return {
|
|
3705
|
+
auth: defaultPagerDutyAuth(ctx),
|
|
3706
|
+
message: `${event.eventType} by ${ctx.agent?.summary ?? "PagerDuty"}`,
|
|
3707
|
+
};
|
|
3708
|
+
},
|
|
3709
|
+
onNote: (ctx, note) => {
|
|
3710
|
+
return {
|
|
3711
|
+
auth: defaultPagerDutyAuth(ctx),
|
|
3712
|
+
message: `Note on the incident: ${note.content}`,
|
|
3713
|
+
};
|
|
3714
|
+
},
|
|
3715
|
+
```
|
|
3716
|
+
|
|
3717
|
+
Add these to the same `pagerdutyChannel()` declaration as the
|
|
3718
|
+
investigation handler.
|
|
3719
|
+
|
|
3720
|
+
## Ignore your own actions
|
|
3721
|
+
|
|
3722
|
+
PagerDuty sends the agent's own changes back as webhook events: the
|
|
3723
|
+
note it posted, or an acknowledgement or resolve made through its
|
|
3724
|
+
PagerDuty user. The channel acknowledges those events without running a
|
|
3725
|
+
hook or starting a turn. The same action by a person is still delivered.
|
|
3726
|
+
|
|
3727
|
+
The channel finds the agent's user in this order, on each delivery:
|
|
3728
|
+
|
|
3729
|
+
1. The `selfUserIds` option, when you pass one. Nothing below is used.
|
|
3730
|
+
2. The `PAGERDUTY_USER_ID` secret: one PagerDuty user id.
|
|
3731
|
+
3. The user `PAGERDUTY_TOKEN` acts as, which PagerDuty reports at
|
|
3732
|
+
`GET /users/me`.
|
|
3733
|
+
|
|
3734
|
+
When none of these names a user, echo skip is off. `bdk deploy` warns
|
|
3735
|
+
while neither `PAGERDUTY_USER_ID` nor `PAGERDUTY_TOKEN` is set, and the
|
|
3736
|
+
agent logs a warning when its token names no single user.
|
|
3737
|
+
|
|
3738
|
+
Inference depends on the kind of token:
|
|
3739
|
+
|
|
3740
|
+
| `PAGERDUTY_TOKEN` | Inferred user |
|
|
3741
|
+
| --- | --- |
|
|
3742
|
+
| User token REST API key | The key's own user |
|
|
3743
|
+
| OAuth user token (Classic User OAuth or Scoped OAuth), written as `Bearer <token>` | The user who authorized the app |
|
|
3744
|
+
| General access (account-level) REST API key | The user whose email is exactly `PAGERDUTY_FROM_EMAIL`, if set |
|
|
3745
|
+
| Scoped OAuth app token (client credentials) | The user whose email is exactly `PAGERDUTY_FROM_EMAIL`, if set |
|
|
3746
|
+
|
|
3747
|
+
PagerDuty serves
|
|
3748
|
+
[`GET /users/me`](https://developer.pagerduty.com/api-reference/0b6f8b0c3e8d1-get-the-current-user)
|
|
3749
|
+
only to a user-level API key or a token from an OAuth flow, not to an
|
|
3750
|
+
account-level key. An app token
|
|
3751
|
+
[acts as the app](https://docs.pagerduty.com/developer/private-apps),
|
|
3752
|
+
not as a user. With either, the channel looks up `PAGERDUTY_FROM_EMAIL`,
|
|
3753
|
+
the `From` user the token writes as, through `GET /users?query=` and uses
|
|
3754
|
+
the one user whose email matches exactly. The inferred id is kept in the
|
|
3755
|
+
agent's memory for an hour per token, never in agent storage, and an
|
|
3756
|
+
unresolved answer is retried after five minutes. Hosted, the lookup needs
|
|
3757
|
+
`api.pagerduty.com` (or your `PAGERDUTY_API_BASE_URL` host) in
|
|
3758
|
+
`hosting.egressDomains`, the same entry write-backs need.
|
|
3759
|
+
|
|
3760
|
+
A read-only agent with no token sets the id directly:
|
|
3761
|
+
|
|
3762
|
+
```bash
|
|
3763
|
+
bdk secrets set incident-responder PAGERDUTY_USER_ID
|
|
3764
|
+
```
|
|
3765
|
+
|
|
3766
|
+
`PAGERDUTY_USER_ID` holds one id because a deployment has one token
|
|
3767
|
+
and so acts as one PagerDuty user. To skip several users, or to keep the
|
|
3768
|
+
id in code, pass `selfUserIds`:
|
|
3769
|
+
|
|
3770
|
+
```ts
|
|
3771
|
+
export default pagerdutyChannel({
|
|
3772
|
+
selfUserIds: ["PBOT001"],
|
|
3773
|
+
onIncident: (ctx) => ({ auth: defaultPagerDutyAuth(ctx) }),
|
|
3774
|
+
});
|
|
3775
|
+
```
|
|
3776
|
+
|
|
3777
|
+
`selfUserIds: { secretName: "OTHER_NAME" }` reads one id from another
|
|
3778
|
+
secret and never falls back to inference.
|
|
3779
|
+
|
|
3780
|
+
## Events
|
|
3781
|
+
|
|
3782
|
+
Each hook receives one family of v3 events:
|
|
3783
|
+
|
|
3784
|
+
| Hook | Events |
|
|
3785
|
+
| --- | --- |
|
|
3786
|
+
| `onIncident` | `incident.triggered`, `.acknowledged`, `.unacknowledged`, `.escalated`, `.reassigned`, `.delegated`, `.resolved`, `.reopened`, `.priority_updated`, `.incident_type.changed` |
|
|
3787
|
+
| `onNote` | `incident.annotated` |
|
|
3788
|
+
| `onResponder` | `incident.responder.added`, `incident.responder.replied` |
|
|
3789
|
+
| `onEvent` | Everything else, such as status updates and workflow events |
|
|
3790
|
+
|
|
3791
|
+
Without `onIncident`, a triggered or reopened incident starts a turn and
|
|
3792
|
+
other lifecycle events are acknowledged. Notes, responder events, and
|
|
3793
|
+
the rest are acknowledged until you add their hook. Each hook returns
|
|
3794
|
+
one of three decisions:
|
|
3795
|
+
|
|
3796
|
+
| Return | What happens |
|
|
3797
|
+
| --- | --- |
|
|
3798
|
+
| `{ auth }` | Start or continue a model turn as the event's actor |
|
|
3799
|
+
| `{ task }` | Acknowledge the webhook, then run host code that may also call `send` |
|
|
3800
|
+
| `null` | Skip the event |
|
|
3801
|
+
|
|
3802
|
+
## Incident affinity
|
|
3803
|
+
|
|
3804
|
+
Every event for one incident joins one session, keyed on the incident
|
|
3805
|
+
id. Lifecycle events carry the incident, and notes and responder events
|
|
3806
|
+
name it by reference, so all of them reach the same session.
|
|
3807
|
+
|
|
3808
|
+
A re-trigger after a resolve is a new PagerDuty incident, so it starts a
|
|
3809
|
+
new session. `ctx.incidentKey` carries the dedup key of the alert that
|
|
3810
|
+
opened an incident (its `incident_key`, set per alert by a Datadog
|
|
3811
|
+
monitor, a Sentry issue, or a Grafana rule), for an agent that wants to
|
|
3812
|
+
recall what it found the last time the same alert fired.
|
|
3813
|
+
|
|
3814
|
+
## Connect
|
|
3815
|
+
|
|
3816
|
+
Create a v3 webhook subscription in PagerDuty for the services that
|
|
3817
|
+
should wake the agent, and point it at
|
|
3818
|
+
`https://<your-host>/<slug>/v1/channels/pagerduty`. Then set the
|
|
3819
|
+
channel's secrets on the deployment. Locally the same names are
|
|
3820
|
+
environment variables.
|
|
3821
|
+
|
|
3822
|
+
| Variable | Used for | Override |
|
|
3823
|
+
| --- | --- | --- |
|
|
3824
|
+
| `PAGERDUTY_WEBHOOK_SECRET` | Verifying `X-PagerDuty-Signature`. Hosted, the platform checks it before any compute starts and answers a bad delivery with `401` | `webhookSecret: { secretName }` |
|
|
3825
|
+
| `PAGERDUTY_USER_ID` | Skipping the agent's own actions: its PagerDuty user id. Optional when `PAGERDUTY_TOKEN` names a user | `selfUserIds: [ids]` or `{ secretName }` |
|
|
3826
|
+
| `PAGERDUTY_TOKEN` | Reply notes (with `deliverReplies: true`), `ctx.pagerduty`, and inferring the agent's user: a REST API key, or an OAuth token as `Bearer <token>` | `token: { secretName }` |
|
|
3827
|
+
| `PAGERDUTY_FROM_EMAIL` | The `From` user PagerDuty requires for writes made with an account-level key or app token, and the user inferred for those tokens | `from: { secretName }` |
|
|
3828
|
+
| `PAGERDUTY_API_BASE_URL` | The REST host, such as `https://api.eu.pagerduty.com`. Defaults to `https://api.pagerduty.com` | `apiBaseUrl` |
|
|
3829
|
+
|
|
3830
|
+
Set `token`, `from`, and `apiBaseUrl` on `pagerdutyChannel()`; they cover
|
|
3831
|
+
reply notes, `ctx.pagerduty`, and inference. `createPagerDutyClient()`
|
|
3832
|
+
takes the same options for code outside the channel.
|
|
3833
|
+
|
|
3834
|
+
```bash
|
|
3835
|
+
bdk deploy --dir . --slug incident-responder
|
|
3836
|
+
bdk secrets set incident-responder PAGERDUTY_WEBHOOK_SECRET PAGERDUTY_TOKEN
|
|
3837
|
+
bdk secrets list incident-responder
|
|
3838
|
+
```
|
|
3839
|
+
|
|
3840
|
+
`bdk deploy` warns until `PAGERDUTY_WEBHOOK_SECRET` is set, and until
|
|
3841
|
+
either `PAGERDUTY_USER_ID` or `PAGERDUTY_TOKEN` is. The next delivery
|
|
3842
|
+
uses a new value without another deploy.
|
|
3843
|
+
|
|
3844
|
+
### Several subscriptions
|
|
3845
|
+
|
|
3846
|
+
PagerDuty gives each webhook subscription its own signing secret, so an
|
|
3847
|
+
agent fed by several subscriptions (one per service, say) needs all of
|
|
3848
|
+
them. Put them in `PAGERDUTY_WEBHOOK_SECRET`, one per line:
|
|
3849
|
+
|
|
3850
|
+
```text
|
|
3851
|
+
<signing secret of subscription 1>
|
|
3852
|
+
<signing secret of subscription 2>
|
|
3853
|
+
```
|
|
3854
|
+
|
|
3855
|
+
A delivery is admitted when any `v1=` signature in its
|
|
3856
|
+
`X-PagerDuty-Signature` header matches any line. Each line is trimmed,
|
|
3857
|
+
blank lines are ignored, and a value without a line break is one secret,
|
|
3858
|
+
used as-is. The value holds at most 32 secrets. Past that, every delivery
|
|
3859
|
+
is rejected rather than checked against only some of them.
|
|
3860
|
+
|
|
3861
|
+
Keep the list in a file, since `bdk secrets list` never shows values,
|
|
3862
|
+
and set it from stdin, which keeps the line breaks:
|
|
3863
|
+
|
|
3864
|
+
```bash
|
|
3865
|
+
bdk secrets set incident-responder PAGERDUTY_WEBHOOK_SECRET < pagerduty-webhook-secrets.txt
|
|
3866
|
+
```
|
|
3867
|
+
|
|
3868
|
+
Rotate by adding before removing. Add the new secret as a line before
|
|
3869
|
+
PagerDuty starts signing with it, for example before creating the
|
|
3870
|
+
replacement subscription. Remove the old line only once nothing signs
|
|
3871
|
+
with the old secret, for example after deleting the subscription it
|
|
3872
|
+
replaced. While both are live, a delivery signed with either secret
|
|
3873
|
+
verifies, including one whose header carries both signatures. Removing
|
|
3874
|
+
the old line first rejects those deliveries until the new one is added.
|
|
3875
|
+
|
|
3876
|
+
The same format works for every `hmacSignatureAuth()` secret, including
|
|
3877
|
+
`GITHUB_WEBHOOK_SECRET` and `BITBUCKET_WEBHOOK_SECRET`. It needs
|
|
3878
|
+
`@cursor/bdk` 0.2.25 or later. Earlier versions check the signature again
|
|
3879
|
+
in the agent with the whole value as one secret, so they reject every
|
|
3880
|
+
delivery once the value has a second line.
|
|
3881
|
+
|
|
3882
|
+
Only signature checks read the value as a list. Everywhere else it is
|
|
3883
|
+
used whole: a `sharedSecretAuth()` header compares the entire value, and
|
|
3884
|
+
a `${NAME}` template in an MCP connection's `headers` would put the line
|
|
3885
|
+
breaks into the header. Keep a list secret for webhook signing only.
|
|
3886
|
+
|
|
3887
|
+
Until `PAGERDUTY_WEBHOOK_SECRET` is set, the route accepts only local
|
|
3888
|
+
traffic: loopback deliveries under `bdk dev`, nothing in production.
|
|
3889
|
+
|
|
3890
|
+
## Test locally
|
|
3891
|
+
|
|
3892
|
+
`bdk pagerduty replay` posts synthesized v3 deliveries for one incident
|
|
3893
|
+
to the running agent, in order. With `PAGERDUTY_WEBHOOK_SECRET` unset,
|
|
3894
|
+
`bdk dev` admits them unsigned from loopback; with it set, replay signs
|
|
3895
|
+
them the way PagerDuty does:
|
|
3896
|
+
|
|
3897
|
+
```bash
|
|
3898
|
+
bdk dev &
|
|
3899
|
+
bdk pagerduty replay --events triggered,acknowledged,annotated,resolved \
|
|
3900
|
+
--comment "Rolled back the 09:30 deploy."
|
|
3901
|
+
```
|
|
3902
|
+
|
|
3903
|
+
The trigger comes from PagerDuty itself, and the later events come from a
|
|
3904
|
+
person, so each one joins the session the trigger started. Pass an
|
|
3905
|
+
incident id to start another session, `--dry-run` to print the bodies,
|
|
3906
|
+
or `--out fixtures/pagerduty` to save them as fixtures for
|
|
3907
|
+
[evals](/docs/evals.md). `bdk pagerduty events` lists the channels and the
|
|
3908
|
+
events each accepts.
|
|
3909
|
+
|
|
3910
|
+
To post a real delivery saved from the webhook's delivery log, sign it
|
|
3911
|
+
with the secret:
|
|
3912
|
+
|
|
3913
|
+
```bash
|
|
3914
|
+
export PAGERDUTY_WEBHOOK_SECRET=local-test-secret
|
|
3915
|
+
bdk dev &
|
|
3916
|
+
|
|
3917
|
+
body=fixtures/pagerduty/incident-triggered.json
|
|
3918
|
+
signature=$(openssl dgst -sha256 -hmac "$PAGERDUTY_WEBHOOK_SECRET" -hex < "$body" | awk '{print $NF}')
|
|
3919
|
+
curl -X POST http://127.0.0.1:3000/v1/channels/pagerduty \
|
|
3920
|
+
-H 'content-type: application/json' \
|
|
3921
|
+
-H "x-pagerduty-signature: v1=$signature" \
|
|
3922
|
+
--data-binary @"$body"
|
|
3923
|
+
```
|
|
3924
|
+
|
|
3925
|
+
Set `event.agent.id` in a saved body to the agent's own user id to see
|
|
3926
|
+
the delivery skipped as an echo.
|
|
3927
|
+
|
|
3928
|
+
## Practices
|
|
3929
|
+
|
|
3930
|
+
- Write back from host code with the incident in channel state or
|
|
3931
|
+
`ctx`, never from an incident id the model produced.
|
|
3932
|
+
|
|
3933
|
+
- Make sure the agent knows its own user before it acts on incidents, so
|
|
3934
|
+
its own notes and resolves do not wake it again: a user-level token, a
|
|
3935
|
+
`PAGERDUTY_FROM_EMAIL` with an account-level key, or `PAGERDUTY_USER_ID`.
|
|
3936
|
+
|
|
3937
|
+
- Scope the webhook subscription to the services the agent responds to;
|
|
3938
|
+
every delivery it sends reaches the channel.
|
|
3939
|
+
|
|
3940
|
+
## Related
|
|
3941
|
+
|
|
3942
|
+
- [Channels reference](/docs/reference/channels.md): channel hooks,
|
|
3943
|
+
dispatch decisions, and session behavior
|
|
3944
|
+
- [Webhooks and custom channels](/docs/guides/webhooks.md): direct webhook auth
|
|
3945
|
+
and reply delivery
|
|
3946
|
+
- [Evals](/docs/evals.md): turn saved PagerDuty payloads into regression
|
|
3947
|
+
fixtures
|
|
3948
|
+
|
|
3949
|
+
---
|
|
3950
|
+
|
|
3605
3951
|
Source: /docs/guides/slack.md
|
|
3606
3952
|
|
|
3607
3953
|
# Slack agents
|
|
@@ -5193,7 +5539,7 @@ returns `401`.
|
|
|
5193
5539
|
| `loopbackOnly()` | Any loopback TCP peer, including local relays that carry forwarding headers |
|
|
5194
5540
|
| `bearerAuth(tokenOrVerify)` | A matching bearer token, or a token accepted by the verifier |
|
|
5195
5541
|
| `sharedSecretAuth({ header, secret })` | A header matching the named environment or deployment secret |
|
|
5196
|
-
| `hmacSignatureAuth({ header, secret, prefix? })` | A hex HMAC-SHA256 signature over the raw body using the named secret |
|
|
5542
|
+
| `hmacSignatureAuth({ header, secret, prefix?, separator? })` | A hex HMAC-SHA256 signature over the raw body using the named secret. With `separator`, any of several signatures in the header. A secret holding one value per line verifies under any of them (at most 32, `@cursor/bdk` 0.2.25 or later) |
|
|
5197
5543
|
| `allowAll()` | Every caller as an anonymous principal |
|
|
5198
5544
|
| `publicEndpoint()` | Every caller on this custom channel; managed hosting also exposes the route without an alias token |
|
|
5199
5545
|
|
|
@@ -5220,6 +5566,7 @@ author their own chain, and `--allow-anonymous` swaps it for
|
|
|
5220
5566
|
| `@cursor/bdk/channels/github` | `githubChannel()` | GitHub and GitHub Enterprise webhooks. See [GitHub](/docs/guides/github.md) |
|
|
5221
5567
|
| `@cursor/bdk/channels/gitlab` | `gitlabChannel()` | GitLab.com and self-managed GitLab hooks. See [GitLab](/docs/guides/gitlab.md) |
|
|
5222
5568
|
| `@cursor/bdk/channels/bitbucket` | `bitbucketChannel()` | Bitbucket Cloud and Data Center hooks. See [Bitbucket](/docs/guides/bitbucket.md) |
|
|
5569
|
+
| `@cursor/bdk/channels/pagerduty` | `pagerdutyChannel()` | PagerDuty v3 incident webhooks. Replies post as incident notes only with `deliverReplies: true`. See [PagerDuty](/docs/guides/pagerduty.md) |
|
|
5223
5570
|
| `@cursor/bdk/channels/deployments` | `deploymentsChannel()` | Deployment events filtered by source, environment, or event name |
|
|
5224
5571
|
|
|
5225
5572
|
For other platforms like Discord or Teams, use the authored
|
|
@@ -6265,6 +6612,33 @@ follow the GitHub replay contract.
|
|
|
6265
6612
|
|
|
6266
6613
|
See [Bitbucket](/docs/guides/bitbucket.md) for Cloud and Data Center setup.
|
|
6267
6614
|
|
|
6615
|
+
### Test PagerDuty webhooks {#pagerduty}
|
|
6616
|
+
|
|
6617
|
+
```text
|
|
6618
|
+
bdk pagerduty replay [incident-id]
|
|
6619
|
+
[--events a,b,c | '*'] [--comment <body>]
|
|
6620
|
+
[--dir <path>] [--slug <slug>] [--channel <id>]
|
|
6621
|
+
[--url <url>] [--host <host>] [--port <n>]
|
|
6622
|
+
[--secret <secret>] [--dry-run] [--out <dir>] [--json]
|
|
6623
|
+
bdk pagerduty events [--dir <path>] [--host <host>] [--port <n>] [--json]
|
|
6624
|
+
```
|
|
6625
|
+
|
|
6626
|
+
| Subcommand | Contract |
|
|
6627
|
+
| --- | --- |
|
|
6628
|
+
| `replay` | Synthesize v3 webhook bodies for one incident and post them, in order, to matching channels. The default event is `incident.triggered`; `'*'` selects every declared event replay supports. |
|
|
6629
|
+
| `events` | List discovered PagerDuty channel URLs and event types. |
|
|
6630
|
+
|
|
6631
|
+
Replay supports `incident.triggered`, `.acknowledged`, `.annotated`,
|
|
6632
|
+
`.escalated`, `.resolved`, and `.reopened`, by full name or by action alone
|
|
6633
|
+
(`resolved`). It needs no PagerDuty account. The incident id defaults to
|
|
6634
|
+
`PREPLAY1`, and `--comment` is the note body for `annotated`. `--secret`
|
|
6635
|
+
defaults to `PAGERDUTY_WEBHOOK_SECRET`, signing with its first line when it
|
|
6636
|
+
lists several; without either the deliveries are unsigned, which `bdk dev`
|
|
6637
|
+
admits from loopback. `--dry-run` and `--out`
|
|
6638
|
+
follow the GitHub replay contract.
|
|
6639
|
+
|
|
6640
|
+
See [PagerDuty](/docs/guides/pagerduty.md) for channel setup.
|
|
6641
|
+
|
|
6268
6642
|
## Environment variables
|
|
6269
6643
|
|
|
6270
6644
|
Credential resolution follows this order: `--api-key`, `CURSOR_API_KEY`,
|
|
@@ -8537,6 +8911,7 @@ export default defineTool({
|
|
|
8537
8911
|
| --- | --- |
|
|
8538
8912
|
| `ctx.toolCallId` | The call id, matching the `actions.requested` / `action.result` stream events |
|
|
8539
8913
|
| `ctx.session` | Read-only session info: id, channel, mode, auth |
|
|
8914
|
+
| `ctx.approvedBy` | For a `needsApproval` tool, the auth of whoever approved this call, in the same shape as `ctx.session.auth`. On Slack, `attributes.user_id` is the person who clicked Approve, who can differ from the person who started the thread. Unset when the call needed no approval |
|
|
8540
8915
|
| `ctx.workspaceDir` | The session's workspace directory |
|
|
8541
8916
|
| `ctx.stateRoot` | The agent's durable state root, shared across every session |
|
|
8542
8917
|
| `ctx.host` | Shared host services (see below) |
|
package/dist/docs/llms.txt
CHANGED
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
- [Host MCP OAuth](/docs/guides/mcp-oauth.md): Authorize a private MCP server locally, constrain its tools, and choose where its credentials live.
|
|
41
41
|
- [Migrate an early-alpha project](/docs/guides/migrate.md): Move a hosted BDK architecture v1 project to v2 through a reviewed pull request.
|
|
42
42
|
- [OpenTelemetry](/docs/guides/opentelemetry.md): Send agent traces and metrics to an OTLP collector, follow one conversation, and add domain telemetry.
|
|
43
|
+
- [PagerDuty](/docs/guides/pagerduty.md): Respond to PagerDuty incidents: investigate a page, follow it through acknowledgement and resolution, and ignore your own actions.
|
|
43
44
|
- [Slack](/docs/guides/slack.md): Wake your agent from mentions, DMs, and watched posts, then reply in the thread.
|
|
44
45
|
- [Webhooks & custom channels](/docs/guides/webhooks.md): Receive provider events, keep one conversation per domain object, and deliver agent replies back out.
|
|
45
46
|
|