@cursor/bdk 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/agent-serve.js +28 -26
- package/dist/channels/bitbucket/api.js +8 -8
- package/dist/channels/bitbucket/binding.js +4 -4
- package/dist/channels/bitbucket/bitbucket-channel.js +1 -1
- package/dist/channels/bitbucket/bitbucket-webhook.js +1 -1
- package/dist/channels/bitbucket/checks.js +1 -1
- package/dist/channels/bitbucket/cursor-account.js +1 -1
- package/dist/channels/bitbucket/events.js +1 -1
- package/dist/channels/change-monitors/change-monitors-channel.js +1 -1
- package/dist/channels/checks.js +2 -2
- package/dist/channels/deployments/deployments-channel.js +1 -1
- package/dist/channels/github/cursor-account.js +3 -3
- package/dist/channels/github/defaults.js +3 -3
- package/dist/channels/github/events.js +1 -1
- package/dist/channels/github/forward.js +8 -8
- package/dist/channels/github/github-channel.js +2 -2
- package/dist/channels/gitlab/binding.js +4 -4
- package/dist/channels/gitlab/checks.js +1 -1
- package/dist/channels/gitlab/cursor-account.js +1 -1
- package/dist/channels/gitlab/events.js +1 -1
- package/dist/channels/gitlab/gitlab-channel.js +1 -1
- package/dist/channels/gitlab/gitlab-webhook.js +1 -1
- package/dist/channels/gitlab/replay.js +2 -2
- package/dist/channels/origin/binding.js +3 -3
- package/dist/channels/origin/checks.js +1 -1
- package/dist/channels/origin/cursor-account.js +1 -1
- package/dist/channels/origin/events.js +1 -1
- package/dist/channels/origin/origin-channel.js +1 -1
- package/dist/channels/origin/origin-webhook.js +2 -2
- package/dist/channels/slack/agentic-delivery.js +3 -3
- package/dist/channels/slack/agentic-signals.js +1 -1
- package/dist/channels/slack/api.js +5 -5
- package/dist/channels/slack/approvals.js +1 -1
- package/dist/channels/slack/attachments.js +3 -3
- package/dist/channels/slack/blocks.js +3 -3
- package/dist/channels/slack/bot-mentions.js +4 -4
- package/dist/channels/slack/channel-watch.js +4 -4
- package/dist/channels/slack/cli-project.js +3 -3
- package/dist/channels/slack/dispatch.js +1 -1
- package/dist/channels/slack/doctor.js +1 -1
- package/dist/channels/slack/eval-directive.js +1 -1
- package/dist/channels/slack/footer.js +1 -1
- package/dist/channels/slack/interactive.js +2 -2
- package/dist/channels/slack/log.d.ts.map +1 -1
- package/dist/channels/slack/log.js +1 -1
- package/dist/channels/slack/manifest.js +1 -1
- package/dist/channels/slack/nudge-carrier.js +1 -1
- package/dist/channels/slack/nudge-store.js +2 -2
- package/dist/channels/slack/recording-sink.js +6 -6
- package/dist/channels/slack/reply-options.js +6 -6
- package/dist/channels/slack/self-identity.d.ts +7 -4
- package/dist/channels/slack/self-identity.d.ts.map +1 -1
- package/dist/channels/slack/self-identity.js +17 -8
- package/dist/channels/slack/sender-name.d.ts.map +1 -1
- package/dist/channels/slack/sender-name.js +2 -6
- package/dist/channels/slack/setup.d.ts.map +1 -1
- package/dist/channels/slack/setup.js +1 -1
- package/dist/channels/slack/slack-channel.js +2 -2
- package/dist/channels/slack/socket-mode.js +2 -2
- package/dist/channels/slack/thread-context.js +8 -8
- package/dist/channels/slack/tool-cards.js +1 -1
- package/dist/channels/slack/user-info.d.ts +2 -1
- package/dist/channels/slack/user-info.d.ts.map +1 -1
- package/dist/channels/slack/user-info.js +16 -1
- package/dist/channels.js +1 -1
- package/dist/docs/404.html +3 -3
- package/dist/docs/assets/{app.DXI7bwox.js → app.CKta5zX1.js} +4 -4
- package/dist/docs/assets/chunks/@localSearchIndexroot.DtlCe4t6.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.BrbO5mEe.js → VPLocalSearchBox.4vRM3EDG.js} +2 -2
- package/dist/docs/assets/chunks/{arc.BOG1yms8.js → arc.CofbA8tA.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.C0hsMZnZ.js → architectureDiagram-Q4EWVU46.Mt2UV5M-.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.H044KjKs.js → baseUniq.C_W0Aqp4.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BsRW6GoB.js → blockDiagram-DXYQGD6D.dAc4goE-.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.B9HV5PFR.js → c4Diagram-AHTNJAMY.dnbRC3Dm.js} +1 -1
- package/dist/docs/assets/chunks/channel.DpljPUVU.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.CPoT_ajl.js → chunk-4BX2VUAB.B42ltSTd.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.DZBwWuCL.js → chunk-4TB4RGXK.2GbAul_E.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.CZ3yTiyq.js → chunk-55IACEB6.pjzY-v-B.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.6DfvHSd8.js → chunk-EDXVE4YY.BB1GXLj2.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.CpBj8HfK.js → chunk-FMBD7UC4.B2WxZkoA.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.BdKo8YqS.js → chunk-OYMX7WX6.BMvb2w73.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BnXNyxJx.js → chunk-QZHKN3VN.Bmu_2lNr.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.Cg1OcF8G.js → chunk-YZCP3GAM.Cth65EaC.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DFNHq2OM.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DFNHq2OM.js +1 -0
- package/dist/docs/assets/chunks/clone.DssygCzX.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.1SP8al9c.js → cose-bilkent-S5V4N54A.CrfA7Iw_.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.DS1L6hJt.js → dagre-KV5264BT.PCD6KQDb.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.ChsausbG.js → diagram-5BDNPKRD.CGNlYlP1.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.3XsptNWj.js → diagram-G4DWMVQ6.C0cvryPD.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.DPA9Dk_P.js → diagram-MMDJMWI5.DHlkZHNV.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.BVswXWrB.js → diagram-TYMM5635.DDGqH_4B.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.BSak5OSP.js → erDiagram-SMLLAGMA.4gOY_C3v.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.CQgN4TTz.js → flowDiagram-DWJPFMVM.8i7zsxuh.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.GrT0kA4a.js → ganttDiagram-T4ZO3ILL.BEKHYdM-.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CdS7Ucll.js → gitGraphDiagram-UUTBAWPF.ACzeLGiB.js} +1 -1
- package/dist/docs/assets/chunks/{graph.BVqKRmRo.js → graph.08C3hS6m.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.C3C9FRto.js → infoDiagram-42DDH7IO.D8R9obOH.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.2FuAh_Zj.js → ishikawaDiagram-UXIWVN3A.CmgYpCWL.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.CaHMfK4b.js → journeyDiagram-VCZTEJTY.DUzjGfoZ.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.CjhIUwcA.js → kanban-definition-6JOO6SKY.DbcW2iZ0.js} +1 -1
- package/dist/docs/assets/chunks/{layout.CGU3gfSf.js → layout.BaDEpJzu.js} +1 -1
- package/dist/docs/assets/chunks/{linear.DaihpW_n.js → linear.B_zRQgCU.js} +1 -1
- package/dist/docs/assets/chunks/{min.BS-j8kHQ.js → min.BYscCdSu.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.BVJ1Bbnk.js → mindmap-definition-QFDTVHPH.Ggu0jg86.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Cz1WIv9r.js → pieDiagram-DEJITSTG.D_q4SVDT.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.DKLFxcjy.js → quadrantDiagram-34T5L4WZ.D3zGj5ok.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.BHegiK7x.js → requirementDiagram-MS252O5E.DVTg7zr2.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.DYkY6yPc.js → sankeyDiagram-XADWPNL6.D3X8jm57.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.DYQ1QUrI.js → sequenceDiagram-FGHM5R23.Dpjai9YP.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.Iru8BsFo.js → stateDiagram-FHFEXIEX.D_AbQBuP.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CWKWRxRx.js +1 -0
- package/dist/docs/assets/chunks/{theme.DaplWQhQ.js → theme.BcgOnbZ6.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.BwFA8hiX.js → timeline-definition-GMOUNBTQ.Cp3DKBe2.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.CZ60W1C_.js → vennDiagram-DHZGUBPP.Bcvg-Aqu.js} +1 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.CCpdcUSq.js +162 -0
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.B69D2r8-.js → wardleyDiagram-NUSXRM2D.L0yehCc5.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.CLPZEIU9.js → xychartDiagram-5P7HB3ND.Cw8-tJmw.js} +1 -1
- package/dist/docs/assets/{reference_connections.md.Bljpve-y.js → reference_connections.md.DLrgAd5f.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.js → reference_hooks.md.B-eGa2km.js} +3 -3
- package/dist/docs/assets/{reference_hooks.md.C5LCJ1R3.lean.js → reference_hooks.md.B-eGa2km.lean.js} +1 -1
- package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.js → reference_sessions.md.CyM7ARz1.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.v3SXVSs_.js → reference_tools.md.DzIY9JzY.js} +3 -3
- package/dist/docs/assets/{reference_tools.md.v3SXVSs_.lean.js → reference_tools.md.DzIY9JzY.lean.js} +1 -1
- package/dist/docs/assets/{style.C130MVnH.css → style.Dwls12uf.css} +1 -1
- package/dist/docs/building-with-agents.html +37 -37
- package/dist/docs/deployment.html +37 -37
- package/dist/docs/evals.html +37 -37
- package/dist/docs/guides/agent-to-agent.html +37 -37
- package/dist/docs/guides/bitbucket.html +37 -37
- package/dist/docs/guides/cloud-agents.html +37 -37
- package/dist/docs/guides/convert-automation.html +37 -37
- package/dist/docs/guides/github.html +37 -37
- package/dist/docs/guides/gitlab.html +37 -37
- package/dist/docs/guides/grokbot-agents.html +37 -37
- package/dist/docs/guides/hooks.html +37 -37
- package/dist/docs/guides/improve.html +37 -37
- package/dist/docs/guides/jev.html +37 -37
- package/dist/docs/guides/mcp-oauth.html +37 -37
- package/dist/docs/guides/migrate.html +37 -37
- package/dist/docs/guides/opentelemetry.html +37 -37
- package/dist/docs/guides/slack.html +37 -37
- package/dist/docs/guides/webhooks.html +37 -37
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +37 -37
- package/dist/docs/index.html +37 -37
- package/dist/docs/llms-full.txt +15 -2
- package/dist/docs/quickstart.html +37 -37
- package/dist/docs/reference/agent-config.html +37 -37
- package/dist/docs/reference/artifacts.html +37 -37
- package/dist/docs/reference/channels.html +37 -37
- package/dist/docs/reference/cli.html +37 -37
- package/dist/docs/reference/connections.html +39 -39
- package/dist/docs/reference/connections.md +2 -1
- package/dist/docs/reference/evals.html +37 -37
- package/dist/docs/reference/extensions.html +37 -37
- package/dist/docs/reference/hooks.html +39 -39
- package/dist/docs/reference/hooks.md +1 -0
- package/dist/docs/reference/http-api.html +37 -37
- package/dist/docs/reference/instructions.html +37 -37
- package/dist/docs/reference/playground.html +36 -36
- package/dist/docs/reference/project-layout.html +37 -37
- package/dist/docs/reference/prompt.html +37 -37
- package/dist/docs/reference/schedules.html +37 -37
- package/dist/docs/reference/sessions.html +37 -37
- package/dist/docs/reference/sessions.md +1 -1
- package/dist/docs/reference/skills.html +37 -37
- package/dist/docs/reference/subagents.html +37 -37
- package/dist/docs/reference/tools.html +39 -39
- package/dist/docs/reference/tools.md +11 -0
- package/dist/docs/templates/agentic-owners.html +37 -37
- package/dist/docs/templates/grokbot-agents.html +37 -37
- package/dist/docs/templates/security-reviewer.html +37 -37
- package/dist/docs/templates/thermo-quality-review.html +37 -37
- package/dist/docs/templates/thermo-review.html +37 -37
- package/dist/docs/templates/triage.html +37 -37
- package/dist/docs/troubleshooting.html +36 -36
- package/dist/evals/assertions.d.ts.map +1 -1
- package/dist/evals/assertions.js +21 -19
- package/dist/evals/expect.js +1 -1
- package/dist/evals/judge.js +1 -1
- package/dist/evals/reporters.js +8 -8
- package/dist/evals/run-facts.js +2 -2
- package/dist/evals.js +6 -6
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +2 -0
- package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +2 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts +16 -0
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +44 -3
- package/dist/extensions/cursor-cloud-agents/lib/fleet.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts +23 -0
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.d.ts.map +1 -0
- package/dist/extensions/cursor-cloud-agents/lib/launch-agent.js +32 -0
- package/dist/extensions/cursor-cloud-agents/lib/repos.js +2 -2
- package/dist/extensions/cursor-cloud-agents/lib/transcript.js +2 -2
- package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/watch.js +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -8
- package/dist/extensions/cursor-cloud-agents/tools/list.js +1 -1
- package/dist/extensions/cursor-grokbot-agents/extension.js +3 -3
- package/dist/extensions/cursor-grokbot-agents/lib/agents.js +3 -3
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +3 -3
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +4 -4
- package/dist/extensions/cursor-grokbot-agents/tools/list.js +1 -1
- package/dist/extensions/improve/skills/yourself.js +1 -1
- package/dist/extensions/jev/extension.js +2 -2
- package/dist/extensions/jev/tools/evaluate.js +1 -1
- package/dist/extensions/slack-communication/tools/react.js +1 -1
- package/dist/files-backends/cursor-hosted.js +8 -8
- package/dist/files-backends/local-fs.js +1 -1
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +15 -15
- package/dist/internal/advertise-tools.d.ts +3 -2
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +11 -9
- package/dist/internal/approval-gate.js +1 -1
- package/dist/internal/artifacts-store.js +13 -13
- package/dist/internal/as-of.js +2 -2
- package/dist/internal/authored-alias-hooks.js +1 -1
- package/dist/internal/builtin-tools/reminders.js +2 -2
- package/dist/internal/chat-client.js +5 -5
- package/dist/internal/cli-ax.js +14 -14
- package/dist/internal/cli-bitbucket.js +10 -10
- package/dist/internal/cli-convert-automation.js +2 -2
- package/dist/internal/cli-cursor.js +2 -2
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +40 -40
- package/dist/internal/cli-docs.js +5 -5
- package/dist/internal/cli-github.js +15 -15
- package/dist/internal/cli-gitlab.js +10 -10
- package/dist/internal/cli-images.js +16 -16
- package/dist/internal/cli-manifest.js +1 -1
- package/dist/internal/cli-mcp-oauth.js +5 -5
- package/dist/internal/cli-mcp.js +3 -3
- package/dist/internal/cli-migrate.js +1 -1
- package/dist/internal/cli-skills.js +2 -2
- package/dist/internal/cli-slack.js +5 -5
- package/dist/internal/cloud-turn-cost.js +1 -1
- package/dist/internal/continuation-identity.js +6 -6
- package/dist/internal/conversation-mirror.js +5 -5
- package/dist/internal/convert-automation/convert-workflow.js +24 -24
- package/dist/internal/cursor/account-mcp.d.ts.map +1 -1
- package/dist/internal/cursor/account-mcp.js +20 -20
- package/dist/internal/cursor/backend-client.js +6 -6
- package/dist/internal/cursor/credentials.js +1 -1
- package/dist/internal/cursor/store-api-client.js +1 -1
- package/dist/internal/cursor-account-mcp-auth.js +9 -9
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +9 -9
- package/dist/internal/cursor-event-relay.js +10 -10
- package/dist/internal/cursor-relay-core.js +2 -2
- package/dist/internal/deploy-manifest.js +10 -10
- package/dist/internal/discovery/agent-config.js +2 -2
- package/dist/internal/discovery/agent.js +6 -6
- package/dist/internal/discovery/connections.js +5 -5
- package/dist/internal/discovery/cursor-plugin.js +12 -12
- package/dist/internal/discovery/extension-overlay.js +3 -3
- package/dist/internal/discovery/extensions.js +6 -6
- package/dist/internal/discovery/info.js +9 -9
- package/dist/internal/discovery/instructions.js +1 -1
- package/dist/internal/discovery/project.js +3 -3
- package/dist/internal/discovery/services.js +1 -1
- package/dist/internal/discovery/tools.js +1 -1
- package/dist/internal/docs-site.js +2 -2
- package/dist/internal/env-file.js +1 -1
- package/dist/internal/eval-run-store.js +7 -7
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +14 -14
- package/dist/internal/eval-transport.js +1 -1
- package/dist/internal/evals-client.js +4 -4
- package/dist/internal/event-log.js +8 -8
- package/dist/internal/event-mapper.js +13 -13
- package/dist/internal/expected-delivery-failure.js +2 -2
- package/dist/internal/filesystem/format.js +2 -2
- package/dist/internal/filesystem/nearest.js +3 -3
- package/dist/internal/filesystem/scratch.js +3 -3
- package/dist/internal/filesystem/tools.js +6 -6
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +2 -2
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +6 -5
- package/dist/internal/framework-storage-selection.d.ts.map +1 -1
- package/dist/internal/framework-storage-selection.js +4 -2
- package/dist/internal/github-fanout.d.ts.map +1 -1
- package/dist/internal/github-fanout.js +3 -3
- package/dist/internal/guest-network.js +4 -4
- package/dist/internal/host-files.js +1 -1
- package/dist/internal/host-kv.js +2 -2
- package/dist/internal/hosted-catch-protocol.js +1 -1
- package/dist/internal/hosted-catch.js +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +14 -14
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +23 -9
- package/dist/internal/hosted-eval-cases.js +4 -4
- package/dist/internal/hosted-execution-diag.js +3 -3
- package/dist/internal/hosting.js +1 -1
- package/dist/internal/http-channel.js +1 -1
- package/dist/internal/http-control-plane-session.js +2 -2
- package/dist/internal/init-interview.js +7 -7
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +12 -12
- package/dist/internal/inline-stdio-mcp.js +2 -2
- package/dist/internal/install-cursor-skills.js +11 -11
- package/dist/internal/json-schema.js +1 -1
- package/dist/internal/local-control-plane.js +3 -3
- package/dist/internal/local-env.js +3 -3
- package/dist/internal/log-ring.js +1 -1
- package/dist/internal/logs-client.js +1 -1
- package/dist/internal/mcp-endpoint.js +8 -8
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +5 -5
- package/dist/internal/mcp-oauth-on-demand.js +3 -3
- package/dist/internal/mcp-oauth.js +5 -5
- package/dist/internal/net.js +2 -2
- package/dist/internal/otel/config.js +3 -3
- package/dist/internal/otel/runtime.js +13 -13
- package/dist/internal/peer-connections.js +2 -2
- package/dist/internal/persistent-stage-log-mirror.d.ts +57 -0
- package/dist/internal/persistent-stage-log-mirror.d.ts.map +1 -0
- package/dist/internal/persistent-stage-log-mirror.js +231 -0
- package/dist/internal/platform-schedule-sync.js +1 -1
- package/dist/internal/platform-timers.js +1 -1
- package/dist/internal/playground/static.js +2 -2
- package/dist/internal/playground/toolchain.js +2 -2
- package/dist/internal/playground-proxy.js +3 -3
- package/dist/internal/process-memory-telemetry.js +1 -1
- package/dist/internal/reminder-runner.d.ts +1 -1
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +14 -16
- package/dist/internal/reminder-store.js +1 -1
- package/dist/internal/resolved-connections.js +8 -8
- package/dist/internal/router.js +4 -4
- package/dist/internal/run-client.js +2 -2
- package/dist/internal/schedule-runner.js +6 -6
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +6 -6
- package/dist/internal/serve-restart.js +1 -1
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +93 -72
- package/dist/internal/session-cost.js +3 -3
- package/dist/internal/session-engine.d.ts +8 -0
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +183 -118
- package/dist/internal/session-live-publisher.d.ts +46 -0
- package/dist/internal/session-live-publisher.d.ts.map +1 -0
- package/dist/internal/session-live-publisher.js +352 -0
- package/dist/internal/session-run-log.js +6 -6
- package/dist/internal/sessions-client.js +3 -3
- package/dist/internal/skill-catalog.js +2 -2
- package/dist/internal/sleep.js +1 -1
- package/dist/internal/start-log-store.d.ts +5 -1
- package/dist/internal/start-log-store.d.ts.map +1 -1
- package/dist/internal/start-log-store.js +5 -3
- package/dist/internal/storage-coordinator.js +12 -12
- package/dist/internal/store-api-protocol.d.ts +51 -0
- package/dist/internal/store-api-protocol.d.ts.map +1 -1
- package/dist/internal/store-api-protocol.js +39 -2
- package/dist/internal/store-mirror.js +4 -4
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +4 -0
- package/dist/internal/terminal-style.js +2 -2
- package/dist/internal/tool-call-retry.d.ts +87 -0
- package/dist/internal/tool-call-retry.d.ts.map +1 -0
- package/dist/internal/tool-call-retry.js +387 -0
- package/dist/internal/tool-result.js +3 -3
- package/dist/internal/trajectory.js +7 -7
- package/dist/internal/turn-governor.js +2 -2
- package/dist/internal/turn-outbox.js +1 -1
- package/dist/internal/update-check.d.ts.map +1 -1
- package/dist/internal/update-check.js +4 -2
- package/dist/internal/v2-hosting.d.ts +6 -0
- package/dist/internal/v2-hosting.d.ts.map +1 -1
- package/dist/internal/v2-hosting.js +7 -1
- package/dist/internal/workspace.js +4 -4
- package/dist/kv/memory-kv.js +3 -3
- package/dist/playground/assets/{index-Be0-1hw2.js → index-HN5lOuAX.js} +42 -42
- package/dist/playground/assets/index-JY1wKCMg.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/prompt.js +1 -1
- package/dist/storage-backends/cursor-hosted-v2.js +2 -2
- package/dist/storage-backends/file-kv.js +7 -7
- package/dist/storage-protocol.d.ts +7 -0
- package/dist/storage-protocol.d.ts.map +1 -1
- package/dist/storage-protocol.js +7 -0
- package/dist/storage.js +3 -3
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -4
- package/docs/reference/connections.md +2 -1
- package/docs/reference/hooks.md +1 -0
- package/docs/reference/sessions.md +1 -1
- package/docs/reference/tools.md +11 -0
- package/package.json +6 -6
- package/templates/agentic-owners/bot/channels/github.ts +2 -2
- package/templates/agentic-owners/bot/lib/github.ts +7 -5
- package/templates/agentic-owners/bot/lib/owners/decision.ts +9 -9
- package/templates/agentic-owners/bot/lib/owners/handles.ts +2 -2
- package/templates/agentic-owners/bot/lib/owners/match.ts +5 -3
- package/templates/agentic-owners/bot/lib/owners/matching.ts +1 -1
- package/templates/agentic-owners/bot/lib/owners/parse.ts +4 -4
- package/templates/agentic-owners/bot/lib/owners/prompt.ts +1 -1
- package/templates/agentic-owners/bot/lib/review.ts +18 -17
- package/templates/agentic-owners/evals/owners.eval.ts +2 -2
- package/templates/agents-md/bot/lib/collect.ts +6 -6
- package/templates/agents-md/bot/lib/config.ts +1 -1
- package/templates/agents-md/bot/tools/apply_agents.ts +4 -4
- package/templates/code-wiki/bot/channels/github.ts +3 -3
- package/templates/code-wiki/bot/lib/repos.ts +1 -1
- package/templates/code-wiki/bot/tools/apply_wiki.ts +2 -2
- package/templates/demo/bot/lib/collect.ts +1 -1
- package/templates/demo/bot/lib/repos.ts +1 -1
- package/templates/demo/bot/tools/record_demo.ts +1 -1
- package/templates/pr-autofixer/bot/channels/github.ts +2 -2
- package/templates/pr-autofixer/bot/lib/merge-watch.ts +2 -2
- package/templates/pr-autofixer/bot/lib/repos.ts +2 -2
- package/templates/pr-autofixer/bot/lib/webhook-routing.ts +1 -1
- package/templates/security-help/bot/lib/repos.ts +1 -1
- package/templates/security-reviewer/bot/lib/repos.ts +1 -1
- package/templates/triage/bot/lib/actuate.ts +15 -15
- package/dist/docs/assets/chunks/@localSearchIndexroot.CtLtpWcx.js +0 -1
- package/dist/docs/assets/chunks/channel.CBwrU9rP.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CbC_mrvB.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CbC_mrvB.js +0 -1
- package/dist/docs/assets/chunks/clone.BTvFyY1a.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.BYXl4LW6.js +0 -1
- package/dist/docs/assets/chunks/wardley-RL74JXVD.iXazD3Z7.js +0 -162
- package/dist/playground/assets/index-Clz6uHj9.css +0 -1
- /package/dist/docs/assets/{reference_connections.md.Bljpve-y.lean.js → reference_connections.md.DLrgAd5f.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.CM5zo3w4.lean.js → reference_sessions.md.CyM7ARz1.lean.js} +0 -0
|
@@ -137,7 +137,7 @@ export function authorOwnsRule(
|
|
|
137
137
|
return false;
|
|
138
138
|
}
|
|
139
139
|
const handle = normalizeHandle(author.handle);
|
|
140
|
-
return rule.users.some(user => normalizeHandle(user) === handle);
|
|
140
|
+
return rule.users.some((user) => normalizeHandle(user) === handle);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
/**
|
|
@@ -149,7 +149,7 @@ function selfReviewRuleForAuthor(
|
|
|
149
149
|
matchedRules: readonly AgenticOwnersPathRule[],
|
|
150
150
|
author: ApprovalAuthor | undefined,
|
|
151
151
|
): AgenticOwnersPathRule | undefined {
|
|
152
|
-
return matchedRules.find(rule => rule.selfReview && authorOwnsRule(rule, author));
|
|
152
|
+
return matchedRules.find((rule) => rule.selfReview && authorOwnsRule(rule, author));
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -176,11 +176,11 @@ export function authorSelfReviewCoversMatchedRules(
|
|
|
176
176
|
author: ApprovalAuthor | undefined,
|
|
177
177
|
): boolean {
|
|
178
178
|
const reviewCapableRules = matchedRules.filter(
|
|
179
|
-
rule => !rule.alwaysApprove && !ruleIsNotifyOnly(rule),
|
|
179
|
+
(rule) => !rule.alwaysApprove && !ruleIsNotifyOnly(rule),
|
|
180
180
|
);
|
|
181
181
|
return (
|
|
182
182
|
reviewCapableRules.length > 0 &&
|
|
183
|
-
reviewCapableRules.every(rule => rule.selfReview && authorOwnsRule(rule, author))
|
|
183
|
+
reviewCapableRules.every((rule) => rule.selfReview && authorOwnsRule(rule, author))
|
|
184
184
|
);
|
|
185
185
|
}
|
|
186
186
|
|
|
@@ -235,11 +235,11 @@ function reviewersToRequest({
|
|
|
235
235
|
* `always_approve`, notify-only, or a mix — worded to match which it was.
|
|
236
236
|
*/
|
|
237
237
|
function reasonForNoBlockingOwners(matchedRules: readonly AgenticOwnersPathRule[]): string {
|
|
238
|
-
const anyNotifyOnly = matchedRules.some(rule => ruleIsNotifyOnly(rule));
|
|
238
|
+
const anyNotifyOnly = matchedRules.some((rule) => ruleIsNotifyOnly(rule));
|
|
239
239
|
if (!anyNotifyOnly) {
|
|
240
240
|
return "all matched policies set always_approve";
|
|
241
241
|
}
|
|
242
|
-
const anyAlwaysApprove = matchedRules.some(rule => rule.alwaysApprove);
|
|
242
|
+
const anyAlwaysApprove = matchedRules.some((rule) => rule.alwaysApprove);
|
|
243
243
|
return anyAlwaysApprove
|
|
244
244
|
? "matched policies are notify-only or always_approve (no blocking owners)"
|
|
245
245
|
: "all matched policies are notify-only (no blocking owners)";
|
|
@@ -273,10 +273,10 @@ export function decideApproval(input: {
|
|
|
273
273
|
}): ApprovalDecision {
|
|
274
274
|
const { matchedRules, riskLevel, author } = input;
|
|
275
275
|
const reviewRequiredRules = matchedRules.filter(
|
|
276
|
-
rule => !rule.alwaysApprove && !ruleIsNotifyOnly(rule),
|
|
276
|
+
(rule) => !rule.alwaysApprove && !ruleIsNotifyOnly(rule),
|
|
277
277
|
);
|
|
278
278
|
const riskBucket = approvalRiskBucket(riskLevel);
|
|
279
|
-
const humanReviewRequired = reviewRequiredRules.some(rule => ruleIsHardGate(rule));
|
|
279
|
+
const humanReviewRequired = reviewRequiredRules.some((rule) => ruleIsHardGate(rule));
|
|
280
280
|
const requestReviewers = reviewersToRequest({
|
|
281
281
|
recommendedReviewers: input.recommendedReviewers ?? [],
|
|
282
282
|
author,
|
|
@@ -384,7 +384,7 @@ function baseApprovalVerdict(input: {
|
|
|
384
384
|
// owner self_review on that same rule. Low-risk auto-approve never clears a
|
|
385
385
|
// hard gate without self_review.
|
|
386
386
|
const blockingHardGate = reviewRequiredRules.find(
|
|
387
|
-
rule => ruleIsHardGate(rule) && !(rule.selfReview && authorOwnsRule(rule, author)),
|
|
387
|
+
(rule) => ruleIsHardGate(rule) && !(rule.selfReview && authorOwnsRule(rule, author)),
|
|
388
388
|
);
|
|
389
389
|
if (blockingHardGate !== undefined) {
|
|
390
390
|
return requestVerdict("a matched policy requires human review");
|
|
@@ -28,8 +28,8 @@ export function sanitizeReviewerHandle(raw: string): string | undefined {
|
|
|
28
28
|
.replace(/\.+$/, "")
|
|
29
29
|
.toLowerCase()
|
|
30
30
|
.split("/")
|
|
31
|
-
.map(segment => segment.trim())
|
|
32
|
-
.filter(segment => segment !== "");
|
|
31
|
+
.map((segment) => segment.trim())
|
|
32
|
+
.filter((segment) => segment !== "");
|
|
33
33
|
// A GitHub team handle is always exactly `org/team`. Collapse a duplicated
|
|
34
34
|
// leading org (the shape a double-prefix bug produces) before validating.
|
|
35
35
|
while (segments.length > 2 && segments[0] === segments[1]) {
|
|
@@ -70,7 +70,7 @@ function patternMatchesFileFromPolicy({
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function ruleMatchesFile({ rule, filepath }: { rule: PathScopedRule; filepath: string }): boolean {
|
|
73
|
-
return rule.paths.some(pattern =>
|
|
73
|
+
return rule.paths.some((pattern) =>
|
|
74
74
|
patternMatchesFileFromPolicy({
|
|
75
75
|
rule,
|
|
76
76
|
pattern,
|
|
@@ -175,7 +175,9 @@ export function changedFilesWithoutWinningRule({
|
|
|
175
175
|
changedFiles: readonly string[];
|
|
176
176
|
rules: readonly AgenticOwnersPathRule[];
|
|
177
177
|
}): string[] {
|
|
178
|
-
return changedFiles.filter(
|
|
178
|
+
return changedFiles.filter(
|
|
179
|
+
(filepath) => pickWinningRuleForFile({ filepath, rules }) === undefined,
|
|
180
|
+
);
|
|
179
181
|
}
|
|
180
182
|
|
|
181
183
|
/**
|
|
@@ -197,7 +199,7 @@ export function everyChangedFileGloballyExcluded({
|
|
|
197
199
|
return false;
|
|
198
200
|
}
|
|
199
201
|
return changedFiles.every(
|
|
200
|
-
filepath => pickWinningRuleForFile({ filepath, rules })?.globalExclusion === true,
|
|
202
|
+
(filepath) => pickWinningRuleForFile({ filepath, rules })?.globalExclusion === true,
|
|
201
203
|
);
|
|
202
204
|
}
|
|
203
205
|
|
|
@@ -57,7 +57,7 @@ export function patternSpecificity(pattern: string): number {
|
|
|
57
57
|
const normalized = pattern.replace(/^\/+/, "");
|
|
58
58
|
const globIndex = normalized.search(/[*?[\]{}!]/);
|
|
59
59
|
const literalPrefix = globIndex === -1 ? normalized : normalized.slice(0, globIndex);
|
|
60
|
-
const segments = literalPrefix.split("/").filter(segment => segment !== "").length;
|
|
60
|
+
const segments = literalPrefix.split("/").filter((segment) => segment !== "").length;
|
|
61
61
|
return literalPrefix.length * 100 + segments;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -92,11 +92,11 @@ function parsePaths(value: unknown, label: string, issues: string[]): string[] |
|
|
|
92
92
|
issues.push(`${label}: missing paths`);
|
|
93
93
|
return undefined;
|
|
94
94
|
}
|
|
95
|
-
if (!Array.isArray(value) || value.some(entry => typeof entry !== "string")) {
|
|
95
|
+
if (!Array.isArray(value) || value.some((entry) => typeof entry !== "string")) {
|
|
96
96
|
issues.push(`${label}: paths must be a list of strings`);
|
|
97
97
|
return undefined;
|
|
98
98
|
}
|
|
99
|
-
const paths = value.map(entry => entry.trim()).filter(entry => entry !== "");
|
|
99
|
+
const paths = value.map((entry) => entry.trim()).filter((entry) => entry !== "");
|
|
100
100
|
if (paths.length === 0) {
|
|
101
101
|
issues.push(`${label}: paths must not be empty`);
|
|
102
102
|
return undefined;
|
|
@@ -239,7 +239,7 @@ function parseOwnerList({
|
|
|
239
239
|
owners.push(parsedSingular);
|
|
240
240
|
}
|
|
241
241
|
if (plural !== undefined) {
|
|
242
|
-
if (!Array.isArray(plural) || plural.some(entry => typeof entry !== "string")) {
|
|
242
|
+
if (!Array.isArray(plural) || plural.some((entry) => typeof entry !== "string")) {
|
|
243
243
|
issues.push(`${label}.${field}: ${field} must be a list of strings`);
|
|
244
244
|
} else {
|
|
245
245
|
for (const [index, entry] of plural.entries()) {
|
|
@@ -300,7 +300,7 @@ function scopeDepthForConfigPath(configPath: string): number {
|
|
|
300
300
|
if (prefix === "") {
|
|
301
301
|
return 0;
|
|
302
302
|
}
|
|
303
|
-
return prefix.split("/").filter(segment => segment !== "").length;
|
|
303
|
+
return prefix.split("/").filter((segment) => segment !== "").length;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
function validatePathsStayWithinRepository({
|
|
@@ -35,7 +35,7 @@ export function composeReviewPrompt(args: {
|
|
|
35
35
|
basePrompt: string;
|
|
36
36
|
rulePrompts: readonly string[];
|
|
37
37
|
}): string {
|
|
38
|
-
const parts = [args.basePrompt, ...args.rulePrompts].filter(part => part !== "");
|
|
38
|
+
const parts = [args.basePrompt, ...args.rulePrompts].filter((part) => part !== "");
|
|
39
39
|
const composed = parts.join("\n\n");
|
|
40
40
|
if (composed.length > AGENTIC_OWNERS_MAX_COMPOSED_PROMPT_CHARS) {
|
|
41
41
|
throw new AgenticOwnersConfigValidationError([
|
|
@@ -125,8 +125,8 @@ function buildDiff(files: readonly ChangedFile[]): {
|
|
|
125
125
|
} {
|
|
126
126
|
const usablePatch = (file: ChangedFile): boolean =>
|
|
127
127
|
file.patch !== undefined && file.patch.trim() !== "";
|
|
128
|
-
const noPatches = files.every(file => !usablePatch(file));
|
|
129
|
-
const anyMissingPatch = files.some(file => !usablePatch(file));
|
|
128
|
+
const noPatches = files.every((file) => !usablePatch(file));
|
|
129
|
+
const anyMissingPatch = files.some((file) => !usablePatch(file));
|
|
130
130
|
const parts: string[] = [];
|
|
131
131
|
let used = 0;
|
|
132
132
|
for (const file of files) {
|
|
@@ -166,16 +166,16 @@ export async function loadReviewState(
|
|
|
166
166
|
const filesTruncated = changed.length < pr.changedFilesCount;
|
|
167
167
|
// Renames count both sides for matching; runtime-generated
|
|
168
168
|
// `.agentic-owners/generated/` paths never participate.
|
|
169
|
-
const reviewable = changed.filter(file => !isGeneratedAgenticOwnersPath(file.filename));
|
|
169
|
+
const reviewable = changed.filter((file) => !isGeneratedAgenticOwnersPath(file.filename));
|
|
170
170
|
const names = [
|
|
171
171
|
...new Set(
|
|
172
|
-
reviewable.flatMap(file =>
|
|
172
|
+
reviewable.flatMap((file) =>
|
|
173
173
|
file.previousFilename === undefined
|
|
174
174
|
? [file.filename]
|
|
175
175
|
: [file.filename, file.previousFilename],
|
|
176
176
|
),
|
|
177
177
|
),
|
|
178
|
-
].filter(path => !isGeneratedAgenticOwnersPath(path));
|
|
178
|
+
].filter((path) => !isGeneratedAgenticOwnersPath(path));
|
|
179
179
|
if (names.length === 0 && !filesTruncated) {
|
|
180
180
|
return { enrolled: false, reason: "no reviewable files" };
|
|
181
181
|
}
|
|
@@ -239,7 +239,7 @@ export async function loadReviewState(
|
|
|
239
239
|
const directory = ruleDirectory(rule.sourcePath);
|
|
240
240
|
return directory === "" ? rule.prompt : `${directory}/${rule.prompt}`;
|
|
241
241
|
};
|
|
242
|
-
const promptPaths = [...new Set(committed.flatMap(rule => rulePromptPath(rule) ?? []))];
|
|
242
|
+
const promptPaths = [...new Set(committed.flatMap((rule) => rulePromptPath(rule) ?? []))];
|
|
243
243
|
const promptContents =
|
|
244
244
|
promptPaths.length > 0
|
|
245
245
|
? await forge.readFilesAtRef(pr.baseRef, promptPaths)
|
|
@@ -288,11 +288,11 @@ function displayPath(path: string): string {
|
|
|
288
288
|
export function renderReviewWake(state: ReviewState): string {
|
|
289
289
|
const rulesBlock =
|
|
290
290
|
state.matchedRules.length > 0
|
|
291
|
-
? state.matchedRules.map(rule => `- ${describeRuleForContext(rule)}`).join("\n")
|
|
291
|
+
? state.matchedRules.map((rule) => `- ${describeRuleForContext(rule)}`).join("\n")
|
|
292
292
|
: "- (none — default risk review applies)";
|
|
293
293
|
const candidatesBlock =
|
|
294
294
|
state.candidates.length > 0
|
|
295
|
-
? state.candidates.map(handle => `- ${handle}`).join("\n")
|
|
295
|
+
? state.candidates.map((handle) => `- ${handle}`).join("\n")
|
|
296
296
|
: "- (none — recommend no reviewers rather than guessing handles)";
|
|
297
297
|
const existing =
|
|
298
298
|
state.pr.requestedReviewers.length > 0
|
|
@@ -302,7 +302,7 @@ export function renderReviewWake(state: ReviewState): string {
|
|
|
302
302
|
? " (truncated at the host char budget — assess what is present)"
|
|
303
303
|
: "";
|
|
304
304
|
const fence = "`".repeat(
|
|
305
|
-
Math.max(4, ...[...state.diff.matchAll(/`+/g)].map(run => run[0].length + 1)),
|
|
305
|
+
Math.max(4, ...[...state.diff.matchAll(/`+/g)].map((run) => run[0].length + 1)),
|
|
306
306
|
);
|
|
307
307
|
|
|
308
308
|
return `${state.composedPrompt}
|
|
@@ -321,7 +321,7 @@ it.
|
|
|
321
321
|
${state.pr.baseRef}
|
|
322
322
|
|
|
323
323
|
## Changed files (${state.reviewableFiles.length})
|
|
324
|
-
${state.reviewableFiles.map(file => `- ${displayPath(file)}`).join("\n")}
|
|
324
|
+
${state.reviewableFiles.map((file) => `- ${displayPath(file)}`).join("\n")}
|
|
325
325
|
|
|
326
326
|
## Matched policy rules
|
|
327
327
|
${rulesBlock}
|
|
@@ -451,7 +451,7 @@ function commentBody(input: {
|
|
|
451
451
|
}): string {
|
|
452
452
|
const policies =
|
|
453
453
|
input.matchedRules.length > 0
|
|
454
|
-
? [...new Set(input.matchedRules.map(rule => `\`${rule.sourcePath}\``))].join(", ")
|
|
454
|
+
? [...new Set(input.matchedRules.map((rule) => `\`${rule.sourcePath}\``))].join(", ")
|
|
455
455
|
: "none — default risk review";
|
|
456
456
|
const reviewers =
|
|
457
457
|
input.requested.length > 0
|
|
@@ -500,7 +500,7 @@ async function upsertMarkerComment(
|
|
|
500
500
|
body: string,
|
|
501
501
|
createIfMissing: boolean,
|
|
502
502
|
): Promise<void> {
|
|
503
|
-
const existing = (await forge.listComments()).find(comment =>
|
|
503
|
+
const existing = (await forge.listComments()).find((comment) =>
|
|
504
504
|
comment.body.startsWith(REVIEW_MARKER),
|
|
505
505
|
);
|
|
506
506
|
if (existing !== undefined) {
|
|
@@ -520,7 +520,7 @@ async function upsertMarkerComment(
|
|
|
520
520
|
*/
|
|
521
521
|
export async function dismissStaleApprovals(forge: OwnersForge, message: string): Promise<void> {
|
|
522
522
|
const stale = (await forge.listReviews()).filter(
|
|
523
|
-
review => review.state === "APPROVED" && review.body.includes(APPROVED_HEAD_MARKER_PREFIX),
|
|
523
|
+
(review) => review.state === "APPROVED" && review.body.includes(APPROVED_HEAD_MARKER_PREFIX),
|
|
524
524
|
);
|
|
525
525
|
for (const review of stale) {
|
|
526
526
|
await forge.dismissApproval({ reviewId: review.id, message });
|
|
@@ -536,7 +536,7 @@ export async function reportPolicyError(
|
|
|
536
536
|
REVIEW_MARKER,
|
|
537
537
|
"**Agentic Owners** — policy validation failed; not reviewing until it parses.",
|
|
538
538
|
"",
|
|
539
|
-
...error.issues.map(issue => `- ${issue}`),
|
|
539
|
+
...error.issues.map((issue) => `- ${issue}`),
|
|
540
540
|
].join("\n");
|
|
541
541
|
await upsertMarkerComment(forge, body, true);
|
|
542
542
|
await dismissStaleApprovals(
|
|
@@ -599,7 +599,7 @@ export async function actuateReview(input: {
|
|
|
599
599
|
const recommended = filterToCandidates({
|
|
600
600
|
recommended: verdict.recommendedReviewers ?? [],
|
|
601
601
|
candidates: state.candidates,
|
|
602
|
-
}).filter(handle => normalizeHandle(handle) !== normalizeHandle(pr.authorLogin ?? ""));
|
|
602
|
+
}).filter((handle) => normalizeHandle(handle) !== normalizeHandle(pr.authorLogin ?? ""));
|
|
603
603
|
const decision = decideApproval({
|
|
604
604
|
matchedRules: state.matchedRules,
|
|
605
605
|
riskLevel: verdict.riskLevel,
|
|
@@ -617,7 +617,8 @@ export async function actuateReview(input: {
|
|
|
617
617
|
|
|
618
618
|
if (decision.approve) {
|
|
619
619
|
const alreadyApproved = (await forge.listReviews()).some(
|
|
620
|
-
review =>
|
|
620
|
+
(review) =>
|
|
621
|
+
review.state === "APPROVED" && review.body.includes(approvedHeadMarker(pr.headSha)),
|
|
621
622
|
);
|
|
622
623
|
if (!alreadyApproved) {
|
|
623
624
|
try {
|
|
@@ -692,7 +693,7 @@ export async function actuateReview(input: {
|
|
|
692
693
|
|
|
693
694
|
const alreadyRequested = new Set(pr.requestedReviewers.map(normalizeHandle));
|
|
694
695
|
const newReviewers = decision.requestReviewers
|
|
695
|
-
.filter(handle => !alreadyRequested.has(normalizeHandle(handle)))
|
|
696
|
+
.filter((handle) => !alreadyRequested.has(normalizeHandle(handle)))
|
|
696
697
|
.slice(0, Math.max(0, MAX_REQUESTED_REVIEWERS - pr.requestedReviewers.length));
|
|
697
698
|
if (newReviewers.length > 0) {
|
|
698
699
|
const split = splitReviewers(newReviewers);
|
|
@@ -28,14 +28,14 @@ function wake(input: {
|
|
|
28
28
|
changedFilesCount: input.files.length,
|
|
29
29
|
requestedReviewers: [],
|
|
30
30
|
},
|
|
31
|
-
reviewableFiles: input.files.map(file => file.filename),
|
|
31
|
+
reviewableFiles: input.files.map((file) => file.filename),
|
|
32
32
|
matchedRules: rules,
|
|
33
33
|
composedPrompt: composeReviewPrompt({
|
|
34
34
|
basePrompt: readBaseReviewPrompt(),
|
|
35
35
|
rulePrompts: [],
|
|
36
36
|
}),
|
|
37
37
|
candidates: input.candidates ?? [],
|
|
38
|
-
diff: input.files.map(file => `--- ${file.filename} (modified)\n${file.patch}`).join("\n\n"),
|
|
38
|
+
diff: input.files.map((file) => `--- ${file.filename} (modified)\n${file.patch}`).join("\n\n"),
|
|
39
39
|
diffTruncated: false,
|
|
40
40
|
diffEmpty: false,
|
|
41
41
|
filesTruncated: false,
|
|
@@ -171,11 +171,11 @@ async function loadPull(
|
|
|
171
171
|
}),
|
|
172
172
|
]);
|
|
173
173
|
const comments = [...issue.data, ...review.data]
|
|
174
|
-
.map(item => {
|
|
174
|
+
.map((item) => {
|
|
175
175
|
const author = item.user?.login ?? "unknown";
|
|
176
176
|
return `@${author}: ${clip(item.body ?? "", MAX_LINE)}`;
|
|
177
177
|
})
|
|
178
|
-
.filter(line => !line.endsWith(": "));
|
|
178
|
+
.filter((line) => !line.endsWith(": "));
|
|
179
179
|
return {
|
|
180
180
|
number: pull.number,
|
|
181
181
|
title: pull.title,
|
|
@@ -183,7 +183,7 @@ async function loadPull(
|
|
|
183
183
|
author: pull.user?.login ?? "unknown",
|
|
184
184
|
merged: pull.merged_at ?? "",
|
|
185
185
|
url: pull.html_url,
|
|
186
|
-
files: listed.data.map(file => file.filename),
|
|
186
|
+
files: listed.data.map((file) => file.filename),
|
|
187
187
|
comments,
|
|
188
188
|
};
|
|
189
189
|
}
|
|
@@ -234,7 +234,7 @@ async function listAgents(
|
|
|
234
234
|
recursive: "1",
|
|
235
235
|
});
|
|
236
236
|
return (data.tree ?? [])
|
|
237
|
-
.map(entry => entry.path)
|
|
237
|
+
.map((entry) => entry.path)
|
|
238
238
|
.filter((path): path is string => typeof path === "string" && isAgentsPath(path));
|
|
239
239
|
} catch (error) {
|
|
240
240
|
if (isNotFound(error)) {
|
|
@@ -317,7 +317,7 @@ async function resolveChannel(client: Slack, name: string): Promise<string | und
|
|
|
317
317
|
limit: 200,
|
|
318
318
|
cursor,
|
|
319
319
|
});
|
|
320
|
-
const match = listed.channels?.find(channel => channel.name === trimmed);
|
|
320
|
+
const match = listed.channels?.find((channel) => channel.name === trimmed);
|
|
321
321
|
if (match?.id !== undefined) {
|
|
322
322
|
return match.id;
|
|
323
323
|
}
|
|
@@ -358,7 +358,7 @@ function formatPull(pull: Pull): string {
|
|
|
358
358
|
const comments =
|
|
359
359
|
pull.comments.length === 0
|
|
360
360
|
? ""
|
|
361
|
-
: `\n\n### comments\n${pull.comments.map(line => `- ${line}`).join("\n")}`;
|
|
361
|
+
: `\n\n### comments\n${pull.comments.map((line) => `- ${line}`).join("\n")}`;
|
|
362
362
|
return `## #${pull.number} ${pull.title}
|
|
363
363
|
url: ${pull.url}
|
|
364
364
|
author: @${pull.author}
|
|
@@ -4,5 +4,5 @@ export const SLACK_CHANNELS: readonly string[] = ["#eng"];
|
|
|
4
4
|
const SKIP = new Set(["", "none", "-"]);
|
|
5
5
|
|
|
6
6
|
export function slackChannels(): readonly string[] {
|
|
7
|
-
return SLACK_CHANNELS.filter(name => !SKIP.has(name.toLowerCase()));
|
|
7
|
+
return SLACK_CHANNELS.filter((name) => !SKIP.has(name.toLowerCase()));
|
|
8
8
|
}
|
|
@@ -26,8 +26,8 @@ type Write = {
|
|
|
26
26
|
|
|
27
27
|
export default defineTool({
|
|
28
28
|
description: "Skip or open an AGENTS.md follow-up PR for this weekly review. Call once.",
|
|
29
|
-
needsApproval: input => input.verdict === "update",
|
|
30
|
-
effect: input => (input.verdict === "update" ? "write" : "read"),
|
|
29
|
+
needsApproval: (input) => input.verdict === "update",
|
|
30
|
+
effect: (input) => (input.verdict === "update" ? "write" : "read"),
|
|
31
31
|
inputSchema: z.discriminatedUnion("verdict", [
|
|
32
32
|
z.object({
|
|
33
33
|
verdict: z.literal("skip"),
|
|
@@ -54,7 +54,7 @@ export default defineTool({
|
|
|
54
54
|
if (repo === undefined || branch === undefined || window === "") {
|
|
55
55
|
throw new Error("missing week/repo.txt, week/base.ref, or week/window.txt");
|
|
56
56
|
}
|
|
57
|
-
const files = input.files.map(item => {
|
|
57
|
+
const files = input.files.map((item) => {
|
|
58
58
|
const path = agentsPath(item.path);
|
|
59
59
|
if (path === undefined) {
|
|
60
60
|
throw new Error(`invalid AGENTS.md path: ${item.path}`);
|
|
@@ -103,7 +103,7 @@ async function openAgentsPr(input: Write) {
|
|
|
103
103
|
commit_sha: parent,
|
|
104
104
|
});
|
|
105
105
|
const blobs = await Promise.all(
|
|
106
|
-
input.files.map(async item => {
|
|
106
|
+
input.files.map(async (item) => {
|
|
107
107
|
const { data } = await input.octokit.rest.git.createBlob({
|
|
108
108
|
...repo,
|
|
109
109
|
content: Buffer.from(item.content).toString("base64"),
|
|
@@ -33,7 +33,7 @@ export default githubChannel({
|
|
|
33
33
|
...pull,
|
|
34
34
|
per_page: 100,
|
|
35
35
|
});
|
|
36
|
-
const files = listed.map(file => file.filename);
|
|
36
|
+
const files = listed.map((file) => file.filename);
|
|
37
37
|
if (files.length > 0 && files.length < LIST_FILES_CAP && files.every(isWikiPath)) {
|
|
38
38
|
return null;
|
|
39
39
|
}
|
|
@@ -75,12 +75,12 @@ async function loadWiki(
|
|
|
75
75
|
if (!Array.isArray(listed)) {
|
|
76
76
|
return { "wiki/pages.txt": "" };
|
|
77
77
|
}
|
|
78
|
-
const markdown = listed.filter(item => item.type === "file" && item.name.endsWith(".md"));
|
|
78
|
+
const markdown = listed.filter((item) => item.type === "file" && item.name.endsWith(".md"));
|
|
79
79
|
const truncated = markdown.length > MAX_WIKI_PAGES;
|
|
80
80
|
const files = markdown.slice(0, MAX_WIKI_PAGES);
|
|
81
81
|
const pages: Record<string, string> = {};
|
|
82
82
|
await Promise.all(
|
|
83
|
-
files.map(async file => {
|
|
83
|
+
files.map(async (file) => {
|
|
84
84
|
const body = await readContents(octokit, {
|
|
85
85
|
owner,
|
|
86
86
|
repo,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const REPOS: readonly string[] = ["owner/repo"];
|
|
2
2
|
|
|
3
3
|
export function watches(fullName: string): boolean {
|
|
4
|
-
return REPOS.some(repo => repo.toLowerCase() === fullName.toLowerCase());
|
|
4
|
+
return REPOS.some((repo) => repo.toLowerCase() === fullName.toLowerCase());
|
|
5
5
|
}
|
|
@@ -55,7 +55,7 @@ export default defineTool({
|
|
|
55
55
|
if (branch === undefined) {
|
|
56
56
|
throw new Error("missing pr/base.ref");
|
|
57
57
|
}
|
|
58
|
-
const pages = input.pages.map(item => {
|
|
58
|
+
const pages = input.pages.map((item) => {
|
|
59
59
|
const path = wikiPagePath(item.path);
|
|
60
60
|
if (path === undefined) {
|
|
61
61
|
throw new Error(`invalid wiki path: ${item.path}`);
|
|
@@ -112,7 +112,7 @@ async function openWikiPr(input: Write) {
|
|
|
112
112
|
commit_sha: parent,
|
|
113
113
|
});
|
|
114
114
|
const blobs = await Promise.all(
|
|
115
|
-
input.pages.map(async item => {
|
|
115
|
+
input.pages.map(async (item) => {
|
|
116
116
|
const { data } = await input.octokit.rest.git.createBlob({
|
|
117
117
|
...repo,
|
|
118
118
|
content: Buffer.from(item.content).toString("base64"),
|
|
@@ -56,7 +56,7 @@ export async function collectPr(github: HostGitHubClient, ref: GitHubPrRef): Pro
|
|
|
56
56
|
...ref,
|
|
57
57
|
title: pull.data.title,
|
|
58
58
|
body: pull.data.body ?? "",
|
|
59
|
-
files: listed.data.map(file => file.filename),
|
|
59
|
+
files: listed.data.map((file) => file.filename),
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const REPOS: readonly string[] = ["owner/repo"];
|
|
2
2
|
|
|
3
3
|
export function watches(fullName: string): boolean {
|
|
4
|
-
return REPOS.some(repo => repo.toLowerCase() === fullName.toLowerCase());
|
|
4
|
+
return REPOS.some((repo) => repo.toLowerCase() === fullName.toLowerCase());
|
|
5
5
|
}
|
|
@@ -6,7 +6,7 @@ import { parseToken } from "../lib/collect.js";
|
|
|
6
6
|
function comment(summary: string, artifacts: string[]): string {
|
|
7
7
|
const lines = ["### Demo", "", summary];
|
|
8
8
|
if (artifacts.length > 0) {
|
|
9
|
-
lines.push("", ...artifacts.map(path => `- \`${path}\``));
|
|
9
|
+
lines.push("", ...artifacts.map((path) => `- \`${path}\``));
|
|
10
10
|
}
|
|
11
11
|
return lines.join("\n");
|
|
12
12
|
}
|
|
@@ -124,7 +124,7 @@ export default githubChannel({
|
|
|
124
124
|
return wake(bufferedEventFromPr({ ctx, pr }));
|
|
125
125
|
},
|
|
126
126
|
|
|
127
|
-
onComment: ctx => wake(bufferedEventFromComment({ ctx, eventName: ctx.eventName })),
|
|
127
|
+
onComment: (ctx) => wake(bufferedEventFromComment({ ctx, eventName: ctx.eventName })),
|
|
128
128
|
|
|
129
129
|
onCheckSuite: async (ctx, suite) => wake(await bufferedEventFromCheckSuite({ ctx, suite })),
|
|
130
130
|
|
|
@@ -134,7 +134,7 @@ export default githubChannel({
|
|
|
134
134
|
|
|
135
135
|
onEvent: (ctx, event) => wake(bufferedEventFromRaw({ ctx, event })),
|
|
136
136
|
|
|
137
|
-
onStart: async args => {
|
|
137
|
+
onStart: async (args) => {
|
|
138
138
|
runtime = {
|
|
139
139
|
send: args.send,
|
|
140
140
|
github: args.host.github,
|
|
@@ -108,9 +108,9 @@ export async function cancelRemindersForPr(input: {
|
|
|
108
108
|
status: "armed",
|
|
109
109
|
purpose: MERGE_CONFLICT_PURPOSE,
|
|
110
110
|
});
|
|
111
|
-
const matches = armed.filter(rem => isMergeConflictWatchForPr(rem, input.pr));
|
|
111
|
+
const matches = armed.filter((rem) => isMergeConflictWatchForPr(rem, input.pr));
|
|
112
112
|
await Promise.all(
|
|
113
|
-
matches.map(rem => input.reminders.cancel(rem.id, input.reason ?? "pr_closed")),
|
|
113
|
+
matches.map((rem) => input.reminders.cancel(rem.id, input.reason ?? "pr_closed")),
|
|
114
114
|
);
|
|
115
115
|
return matches.length;
|
|
116
116
|
}
|
|
@@ -7,8 +7,8 @@ export function githubRepos(): readonly string[] {
|
|
|
7
7
|
? [...GITHUB_REPOS]
|
|
8
8
|
: fromEnv
|
|
9
9
|
.split(",")
|
|
10
|
-
.map(repo => repo.trim())
|
|
11
|
-
.filter(repo => repo !== "");
|
|
10
|
+
.map((repo) => repo.trim())
|
|
11
|
+
.filter((repo) => repo !== "");
|
|
12
12
|
if (repos.length === 0) {
|
|
13
13
|
throw new Error(
|
|
14
14
|
"Set GITHUB_REPOS in bot/lib/repos.ts or PR_AUTOFIXER_REPOS to a comma-separated owner/repo list.",
|
|
@@ -105,7 +105,7 @@ async function resolvePrFromCommitSha(input: {
|
|
|
105
105
|
commit_sha: input.sha,
|
|
106
106
|
},
|
|
107
107
|
);
|
|
108
|
-
const open = pulls.find(pull => pull.state === "open");
|
|
108
|
+
const open = pulls.find((pull) => pull.state === "open");
|
|
109
109
|
if (open === undefined) {
|
|
110
110
|
return undefined;
|
|
111
111
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const REPOS: readonly string[] = ["owner/repo"];
|
|
2
2
|
|
|
3
3
|
export function watches(fullName: string): boolean {
|
|
4
|
-
return REPOS.some(repo => repo.toLowerCase() === fullName.toLowerCase());
|
|
4
|
+
return REPOS.some((repo) => repo.toLowerCase() === fullName.toLowerCase());
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const REPOS: readonly string[] = ["owner/repo"];
|
|
2
2
|
|
|
3
3
|
export function watches(fullName: string): boolean {
|
|
4
|
-
return REPOS.some(repo => repo.toLowerCase() === fullName.toLowerCase());
|
|
4
|
+
return REPOS.some((repo) => repo.toLowerCase() === fullName.toLowerCase());
|
|
5
5
|
}
|