@grok/agent-sdk 0.2.27 → 0.2.28
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 +19 -14
- package/CHANGELOG.md +1 -1
- package/README.md +15 -17
- package/dist/agent-v2-hosting.d.ts +13 -0
- package/dist/agent-v2-hosting.d.ts.map +1 -0
- package/dist/agent-v2-hosting.js +8 -0
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +1 -1
- package/dist/bin/agent-serve.d.ts +3 -15
- package/dist/bin/agent-serve.d.ts.map +1 -1
- package/dist/bin/agent-serve.js +30 -1628
- package/dist/channels/bitbucket/api.d.ts.map +1 -1
- package/dist/channels/bitbucket/api.js +3 -3
- package/dist/channels/bitbucket/binding.d.ts.map +1 -1
- package/dist/channels/bitbucket/binding.js +5 -5
- package/dist/channels/bitbucket/bitbucket-channel.d.ts.map +1 -1
- package/dist/channels/bitbucket/bitbucket-channel.js +1 -0
- package/dist/channels/bitbucket/bitbucket-webhook.d.ts.map +1 -1
- package/dist/channels/bitbucket/bitbucket-webhook.js +9 -6
- package/dist/channels/bitbucket/checks.d.ts.map +1 -1
- package/dist/channels/bitbucket/checks.js +4 -0
- package/dist/channels/bitbucket/events.d.ts.map +1 -1
- package/dist/channels/bitbucket/index.d.ts +1 -1
- package/dist/channels/bitbucket/index.js +1 -1
- package/dist/channels/bitbucket/replay.d.ts.map +1 -1
- package/dist/channels/bitbucket/replay.js +4 -3
- package/dist/channels/change-monitors/change-monitors-channel.d.ts.map +1 -1
- package/dist/channels/change-monitors/change-monitors-channel.js +15 -2
- package/dist/channels/change-monitors/claim.d.ts +5 -0
- package/dist/channels/change-monitors/claim.d.ts.map +1 -0
- package/dist/channels/change-monitors/claim.js +6 -0
- package/dist/channels/change-monitors/index.d.ts +1 -0
- package/dist/channels/change-monitors/index.d.ts.map +1 -1
- package/dist/channels/change-monitors/index.js +1 -0
- package/dist/channels/change-monitors/types.d.ts.map +1 -1
- package/dist/channels/deployments/deployments-channel.d.ts +1 -1
- package/dist/channels/deployments/deployments-channel.js +1 -1
- package/dist/channels/deployments/index.d.ts +1 -1
- package/dist/channels/deployments/index.js +1 -1
- package/dist/channels/deployments/types.d.ts.map +1 -1
- package/dist/channels/github/api.d.ts +11 -0
- package/dist/channels/github/api.d.ts.map +1 -1
- package/dist/channels/github/api.js +29 -4
- package/dist/channels/github/binding.d.ts +5 -3
- package/dist/channels/github/binding.d.ts.map +1 -1
- package/dist/channels/github/binding.js +16 -9
- package/dist/channels/github/github-channel.d.ts +7 -2
- package/dist/channels/github/github-channel.d.ts.map +1 -1
- package/dist/channels/github/github-channel.js +20 -11
- package/dist/channels/github/index.d.ts +1 -1
- package/dist/channels/github/index.js +1 -1
- package/dist/channels/github/progress.d.ts.map +1 -1
- package/dist/channels/github/progress.js +4 -0
- package/dist/channels/github/state.d.ts +2 -2
- package/dist/channels/github/state.d.ts.map +1 -1
- package/dist/channels/github/types.d.ts +7 -7
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/gitlab/api.d.ts +2 -2
- package/dist/channels/gitlab/api.d.ts.map +1 -1
- package/dist/channels/gitlab/api.js +25 -14
- package/dist/channels/gitlab/binding.d.ts.map +1 -1
- package/dist/channels/gitlab/binding.js +2 -3
- package/dist/channels/gitlab/checks.d.ts.map +1 -1
- package/dist/channels/gitlab/checks.js +4 -0
- package/dist/channels/gitlab/events.d.ts.map +1 -1
- package/dist/channels/gitlab/gitlab-channel.d.ts.map +1 -1
- package/dist/channels/gitlab/gitlab-channel.js +4 -7
- package/dist/channels/gitlab/gitlab-webhook.d.ts.map +1 -1
- package/dist/channels/gitlab/gitlab-webhook.js +11 -8
- package/dist/channels/gitlab/index.d.ts +1 -1
- package/dist/channels/gitlab/index.js +1 -1
- package/dist/channels/gitlab/replay.d.ts.map +1 -1
- package/dist/channels/gitlab/replay.js +2 -0
- package/dist/channels/gitlab/types.d.ts.map +1 -1
- package/dist/channels/issues/claim.d.ts +5 -0
- package/dist/channels/issues/claim.d.ts.map +1 -0
- package/dist/channels/issues/claim.js +6 -0
- package/dist/channels/issues/index.d.ts +1 -0
- package/dist/channels/issues/index.d.ts.map +1 -1
- package/dist/channels/issues/index.js +1 -0
- package/dist/channels/issues/issues-channel.d.ts.map +1 -1
- package/dist/channels/issues/issues-channel.js +16 -3
- package/dist/channels/issues/types.d.ts +2 -2
- package/dist/channels/issues/types.d.ts.map +1 -1
- package/dist/channels/origin/api.d.ts.map +1 -1
- package/dist/channels/origin/api.js +3 -3
- package/dist/channels/origin/index.d.ts +1 -1
- package/dist/channels/origin/index.js +1 -1
- package/dist/channels/origin/origin-channel.d.ts.map +1 -1
- package/dist/channels/origin/origin-channel.js +6 -6
- package/dist/channels/origin/origin-webhook.d.ts.map +1 -1
- package/dist/channels/origin/origin-webhook.js +2 -5
- package/dist/channels/pagerduty/api.d.ts.map +1 -1
- package/dist/channels/pagerduty/api.js +2 -1
- package/dist/channels/pagerduty/index.d.ts +1 -1
- package/dist/channels/pagerduty/index.js +1 -1
- package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -1
- package/dist/channels/pagerduty/pagerduty-channel.js +1 -0
- package/dist/channels/pagerduty/pagerduty-webhook.d.ts.map +1 -1
- package/dist/channels/pagerduty/pagerduty-webhook.js +20 -11
- package/dist/channels/pagerduty/payload.d.ts.map +1 -1
- package/dist/channels/pagerduty/payload.js +2 -3
- package/dist/channels/pagerduty/replay.d.ts.map +1 -1
- package/dist/channels/pagerduty/replay.js +4 -1
- package/dist/channels/pagerduty/self-user.d.ts.map +1 -1
- package/dist/channels/pagerduty/self-user.js +8 -9
- package/dist/channels/runs/runs-channel.d.ts.map +1 -1
- package/dist/channels/runs/runs-channel.js +8 -2
- package/dist/channels/runs/types.d.ts +2 -2
- package/dist/channels/runs/types.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.d.ts +20 -1
- package/dist/channels/slack/agentic-delivery.d.ts.map +1 -1
- package/dist/channels/slack/agentic-delivery.js +77 -12
- package/dist/channels/slack/agentic-signals.d.ts +2 -0
- package/dist/channels/slack/agentic-signals.d.ts.map +1 -1
- package/dist/channels/slack/agentic-signals.js +24 -7
- package/dist/channels/slack/api.d.ts +1 -1
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +12 -13
- package/dist/channels/slack/approvals.d.ts.map +1 -1
- package/dist/channels/slack/approvals.js +5 -4
- package/dist/channels/slack/attachments.d.ts.map +1 -1
- package/dist/channels/slack/attachments.js +34 -9
- package/dist/channels/slack/auth.d.ts.map +1 -1
- package/dist/channels/slack/auth.js +3 -1
- package/dist/channels/slack/bot-mentions.d.ts.map +1 -1
- package/dist/channels/slack/bot-mentions.js +2 -4
- package/dist/channels/slack/cli-project.d.ts.map +1 -1
- package/dist/channels/slack/cli-project.js +7 -10
- package/dist/channels/slack/constants.d.ts +7 -0
- package/dist/channels/slack/constants.d.ts.map +1 -1
- package/dist/channels/slack/constants.js +7 -0
- package/dist/channels/slack/defaults.d.ts +12 -0
- package/dist/channels/slack/defaults.d.ts.map +1 -1
- package/dist/channels/slack/defaults.js +10 -2
- package/dist/channels/slack/dispatch.d.ts +7 -1
- package/dist/channels/slack/dispatch.d.ts.map +1 -1
- package/dist/channels/slack/dispatch.js +88 -13
- package/dist/channels/slack/doctor.d.ts.map +1 -1
- package/dist/channels/slack/doctor.js +11 -11
- package/dist/channels/slack/inbound.d.ts +7 -0
- package/dist/channels/slack/inbound.d.ts.map +1 -1
- package/dist/channels/slack/inbound.js +25 -4
- package/dist/channels/slack/index.d.ts +2 -2
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +2 -2
- package/dist/channels/slack/init.d.ts +2 -0
- package/dist/channels/slack/init.d.ts.map +1 -1
- package/dist/channels/slack/init.js +10 -2
- package/dist/channels/slack/interactive.d.ts +6 -1
- package/dist/channels/slack/interactive.d.ts.map +1 -1
- package/dist/channels/slack/interactive.js +15 -25
- package/dist/channels/slack/manifest.d.ts.map +1 -1
- package/dist/channels/slack/manifest.js +15 -12
- package/dist/channels/slack/message-body.d.ts.map +1 -1
- package/dist/channels/slack/message-body.js +2 -4
- package/dist/channels/slack/nudge-carrier.d.ts.map +1 -1
- package/dist/channels/slack/nudge-carrier.js +27 -1
- package/dist/channels/slack/nudge-store.d.ts.map +1 -1
- package/dist/channels/slack/nudge-store.js +8 -3
- package/dist/channels/slack/placeholder.d.ts +3 -0
- package/dist/channels/slack/placeholder.d.ts.map +1 -1
- package/dist/channels/slack/placeholder.js +6 -5
- package/dist/channels/slack/recording-sink.d.ts.map +1 -1
- package/dist/channels/slack/recording-sink.js +4 -3
- package/dist/channels/slack/sender-name.d.ts.map +1 -1
- package/dist/channels/slack/sender-name.js +2 -3
- package/dist/channels/slack/slack-channel.d.ts +1 -3
- package/dist/channels/slack/slack-channel.d.ts.map +1 -1
- package/dist/channels/slack/slack-channel.js +63 -86
- package/dist/channels/slack/thread-context.d.ts.map +1 -1
- package/dist/channels/slack/thread-context.js +4 -9
- package/dist/channels/slack/tool-cards.d.ts.map +1 -1
- package/dist/channels/slack/tool-cards.js +4 -0
- package/dist/channels/slack/types.d.ts +19 -4
- package/dist/channels/slack/types.d.ts.map +1 -1
- package/dist/channels/slack/upload.d.ts +2 -0
- package/dist/channels/slack/upload.d.ts.map +1 -1
- package/dist/channels/slack/upload.js +49 -12
- package/dist/channels/slack/user-info.d.ts.map +1 -1
- package/dist/channels/slack/user-info.js +3 -6
- package/dist/channels.d.ts +11 -11
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +57 -30
- package/dist/connections.d.ts +1 -1
- package/dist/connections.js +1 -1
- package/dist/docs/404.html +4 -4
- package/dist/docs/architecture.svg +1 -1
- package/dist/docs/assets/{app.wA5xBBcd.js → app.DF9vlcdn.js} +4 -4
- package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.js +9 -0
- package/dist/docs/assets/building-with-agents.md.Bf1yH2tG.lean.js +1 -0
- package/dist/docs/assets/changelog.md.fZ-NNFeJ.js +1 -0
- package/dist/docs/assets/changelog.md.fZ-NNFeJ.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.mfzjiOsL.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.C29HLCVL.js → VPLocalSearchBox.D8OuwKO0.js} +1 -1
- package/dist/docs/assets/chunks/{arc.BOaoYWmh.js → arc.DCq_TCYV.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.MfG0itQh.js → architectureDiagram-Q4EWVU46.PWRNTPbk.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.CUeJciCF.js → baseUniq.BeRPvRUL.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BrXMZRtK.js → blockDiagram-DXYQGD6D.BuRmZVSo.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DfkDHeB9.js → c4Diagram-AHTNJAMY.7DKSMwuv.js} +1 -1
- package/dist/docs/assets/chunks/channel.goFR5lbe.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.xKz8CiXK.js → chunk-4BX2VUAB.7VrO9-9i.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.kkfBh4zk.js → chunk-4TB4RGXK.CHystNE2.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BClJGb94.js → chunk-55IACEB6.Nuh9TbTq.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.P9BpQ9L3.js → chunk-EDXVE4YY.CA0EKugm.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.R4iYi58S.js → chunk-FMBD7UC4.F9_mp7U8.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Cpn8L1dw.js → chunk-OYMX7WX6.CEU4QfE1.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BLftECqU.js → chunk-QZHKN3VN.B8h_x9_i.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BWDV1AYt.js → chunk-YZCP3GAM.Btfb-rKg.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.B2yLtFja.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.B2yLtFja.js +1 -0
- package/dist/docs/assets/chunks/clone.CztV97Wu.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DGpAcJ55.js → cose-bilkent-S5V4N54A.DKvc96Wa.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.BBXxGEaD.js → dagre-KV5264BT.CMo0cy1b.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.EKqOwmK2.js → diagram-5BDNPKRD.DDgMOQhB.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.CB8pdkoZ.js → diagram-G4DWMVQ6.BdJnoIsU.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.aHh4WGg9.js → diagram-MMDJMWI5.oSvhAZaL.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.YIsbRH20.js → diagram-TYMM5635.C9zZLIE-.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.B3bTCW_e.js → erDiagram-SMLLAGMA.BNhVyccy.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.M81hXIXZ.js → flowDiagram-DWJPFMVM.BEFLLBiU.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.BKg7WY--.js → ganttDiagram-T4ZO3ILL.BdUzXBgY.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CLEMZgO3.js → gitGraphDiagram-UUTBAWPF.Rd3LlOIJ.js} +1 -1
- package/dist/docs/assets/chunks/{graph.DS38W_Q-.js → graph.DnJC1GpG.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BTiWTi82.js → infoDiagram-42DDH7IO.xv0xntDJ.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DcqY_KQL.js → ishikawaDiagram-UXIWVN3A.BaGIlviU.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.0lQNZ40U.js → journeyDiagram-VCZTEJTY.Cof_h0fp.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.L5sKlf7X.js → kanban-definition-6JOO6SKY.C5GozFuU.js} +1 -1
- package/dist/docs/assets/chunks/{layout.7u4gFhQa.js → layout.zc9UShLc.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D5v33SOb.js → linear.BoqrFVcJ.js} +1 -1
- package/dist/docs/assets/chunks/{min.Dc9uCxf9.js → min.DwIfr8hG.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.B56nGoB_.js → mindmap-definition-QFDTVHPH.Dkq2yTtp.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Cba8e8lS.js → pieDiagram-DEJITSTG.B4CpTmHK.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.2YjBycHF.js → quadrantDiagram-34T5L4WZ.BqXnFC9C.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.D4P5RqVI.js → requirementDiagram-MS252O5E.DhIN2z-E.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.C0Hn8NUm.js → sankeyDiagram-XADWPNL6.BhxUAmg2.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BZm7EaoT.js → sequenceDiagram-FGHM5R23.BqgU7HU-.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DcR4f3X2.js → stateDiagram-FHFEXIEX.B1BCO18N.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.CZlVHdDZ.js +1 -0
- package/dist/docs/assets/chunks/{theme.DvfKzyXq.js → theme.oV7rddEz.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CgDh96vg.js → timeline-definition-GMOUNBTQ.oRI8UwMC.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.B4fagbC8.js → vennDiagram-DHZGUBPP.DmuWrIxN.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.Ck68omim.js → wardley-RL74JXVD.CEBjM5ov.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DBUg0bvz.js → wardleyDiagram-NUSXRM2D.m5zsCOF9.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DnKSGQE1.js → xychartDiagram-5P7HB3ND.cPN-587n.js} +1 -1
- package/dist/docs/assets/deployment.md.DDmjAVbg.js +31 -0
- package/dist/docs/assets/deployment.md.DDmjAVbg.lean.js +1 -0
- package/dist/docs/assets/{evals.md.CHR34K1Y.js → evals.md.OjKb7tNA.js} +9 -9
- package/dist/docs/assets/{guides_agent-to-agent.md.CwL5cwuE.js → guides_agent-to-agent.md.D1D5f6Jc.js} +7 -7
- package/dist/docs/assets/guides_agent-to-agent.md.D1D5f6Jc.lean.js +1 -0
- package/dist/docs/assets/{guides_bitbucket.md.CKUayYtD.js → guides_bitbucket.md.DkjkBRU8.js} +3 -3
- package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.js +9 -0
- package/dist/docs/assets/guides_cloud-agents.md.Ceyjv0ul.lean.js +1 -0
- package/dist/docs/assets/{guides_convert-automation.md.DMEX9nF-.js → guides_convert-automation.md.BjraCvok.js} +11 -11
- package/dist/docs/assets/guides_convert-automation.md.BjraCvok.lean.js +1 -0
- package/dist/docs/assets/{guides_github.md.TuNiZAOQ.js → guides_github.md.CgN5sNbW.js} +14 -14
- package/dist/docs/assets/{guides_github.md.TuNiZAOQ.lean.js → guides_github.md.CgN5sNbW.lean.js} +1 -1
- package/dist/docs/assets/{guides_gitlab.md.CtNI4fSH.js → guides_gitlab.md.DCE0p7_w.js} +3 -3
- package/dist/docs/assets/guides_grokbot-agents.md.D0PpM_Gf.js +15 -0
- package/dist/docs/assets/{guides_grokbot-agents.md.BwAykJ7U.lean.js → guides_grokbot-agents.md.D0PpM_Gf.lean.js} +1 -1
- package/dist/docs/assets/{guides_hooks.md.B2XfGX50.js → guides_hooks.md.BjeEiM7s.js} +4 -4
- package/dist/docs/assets/{guides_hooks.md.B2XfGX50.lean.js → guides_hooks.md.BjeEiM7s.lean.js} +1 -1
- package/dist/docs/assets/{guides_improve.md.CZKVt1cT.js → guides_improve.md.BFYtrtLE.js} +4 -4
- package/dist/docs/assets/{guides_improve.md.CZKVt1cT.lean.js → guides_improve.md.BFYtrtLE.lean.js} +1 -1
- package/dist/docs/assets/{guides_jev.md.D7XH4JH3.js → guides_jev.md.Ccw4pedT.js} +10 -10
- package/dist/docs/assets/{guides_mcp-oauth.md.Cxq2TxBB.js → guides_mcp-oauth.md.ekpWOZCC.js} +8 -8
- package/dist/docs/assets/{guides_mcp-oauth.md.Cxq2TxBB.lean.js → guides_mcp-oauth.md.ekpWOZCC.lean.js} +1 -1
- package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.js +8 -0
- package/dist/docs/assets/guides_migrate.md.RS9Eu-Xh.lean.js +1 -0
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.js +28 -0
- package/dist/docs/assets/guides_opentelemetry.md.CoZ1kNyd.lean.js +1 -0
- package/dist/docs/assets/{guides_pagerduty.md.BHXMcMtx.js → guides_pagerduty.md.mnKXe9U0.js} +10 -10
- package/dist/docs/assets/{guides_slack.md.ClIyi7FI.js → guides_slack.md.BqiGSYGX.js} +21 -8
- package/dist/docs/assets/{guides_slack.md.ClIyi7FI.lean.js → guides_slack.md.BqiGSYGX.lean.js} +1 -1
- package/dist/docs/assets/{guides_webhooks.md.Cpdc3BDX.js → guides_webhooks.md.BJk63ZTs.js} +9 -5
- package/dist/docs/assets/{guides_webhooks.md.Cpdc3BDX.lean.js → guides_webhooks.md.BJk63ZTs.lean.js} +1 -1
- package/dist/docs/assets/{hillclimbing.md.Dxvd-0gT.js → hillclimbing.md.By61f3uq.js} +2 -2
- package/dist/docs/assets/index.md.CVRjO09Y.js +27 -0
- package/dist/docs/assets/index.md.CVRjO09Y.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.D8JDfkKO.js → quickstart.md.DaLk4ZIF.js} +10 -10
- package/dist/docs/assets/quickstart.md.DaLk4ZIF.lean.js +1 -0
- package/dist/docs/assets/reference_access.md.CExlH_mR.js +1 -0
- package/dist/docs/assets/reference_access.md.CExlH_mR.lean.js +1 -0
- package/dist/docs/assets/{reference_agent-config.md.CZrbHOfT.js → reference_agent-config.md.11E_xe--.js} +10 -8
- package/dist/docs/assets/{reference_agent-config.md.CZrbHOfT.lean.js → reference_agent-config.md.11E_xe--.lean.js} +1 -1
- package/dist/docs/assets/{reference_artifacts.md.DLV9MZES.js → reference_artifacts.md.C-hKR2hp.js} +2 -2
- package/dist/docs/assets/reference_channels.md.DsJfGSBJ.js +22 -0
- package/dist/docs/assets/{reference_channels.md.CNNIS6K7.lean.js → reference_channels.md.DsJfGSBJ.lean.js} +1 -1
- package/dist/docs/assets/reference_cli.md.DQ3dCgmk.js +99 -0
- package/dist/docs/assets/reference_cli.md.DQ3dCgmk.lean.js +1 -0
- package/dist/docs/assets/{reference_connections.md.BJE2Zllp.js → reference_connections.md.BoAotr7_.js} +7 -7
- package/dist/docs/assets/{reference_evals.md.Ccwp4x3o.js → reference_evals.md.DYKjGFi-.js} +11 -11
- package/dist/docs/assets/{reference_extensions.md.DKxTuCIw.js → reference_extensions.md.pEVj72Xo.js} +9 -9
- package/dist/docs/assets/{reference_extensions.md.DKxTuCIw.lean.js → reference_extensions.md.pEVj72Xo.lean.js} +1 -1
- package/dist/docs/assets/{reference_hooks.md.CROr0QgC.js → reference_hooks.md.B-bwJuiG.js} +5 -5
- package/dist/docs/assets/{reference_http-api.md.Dji-DD_Z.js → reference_http-api.md._RWELr3d.js} +1 -1
- package/dist/docs/assets/{reference_instructions.md.BYMVxAkw.js → reference_instructions.md.yL2hXLnl.js} +1 -1
- package/dist/docs/assets/reference_limits.md.Da1HegjB.js +8 -0
- package/dist/docs/assets/reference_limits.md.Da1HegjB.lean.js +1 -0
- package/dist/docs/assets/reference_memory.md.Dd7cyV9V.js +4 -0
- package/dist/docs/assets/reference_playground.md.CQiJk9CM.js +1 -0
- package/dist/docs/assets/{reference_project-layout.md.mFcS8yDD.js → reference_project-layout.md.BamcPDUn.js} +4 -4
- package/dist/docs/assets/{reference_prompt.md.DqPh71XN.js → reference_prompt.md.BMjm1Jp3.js} +2 -2
- package/dist/docs/assets/{reference_schedules.md.BqWnJES4.js → reference_schedules.md.RC47aFm4.js} +4 -4
- package/dist/docs/assets/{reference_sessions.md.Bi6lHttM.js → reference_sessions.md.C7KFhWXV.js} +1 -1
- package/dist/docs/assets/{reference_skills.md.Ckddg6KX.js → reference_skills.md.Dej2zQxi.js} +2 -2
- package/dist/docs/assets/{reference_skills.md.Ckddg6KX.lean.js → reference_skills.md.Dej2zQxi.lean.js} +1 -1
- package/dist/docs/assets/{reference_subagents.md.ChNGh6HK.js → reference_subagents.md.CAhvW4yS.js} +1 -1
- package/dist/docs/assets/{reference_tools.md.Bo0UfT0a.js → reference_tools.md.DQr7Fnhu.js} +10 -10
- package/dist/docs/assets/{reference_tools.md.Bo0UfT0a.lean.js → reference_tools.md.DQr7Fnhu.lean.js} +1 -1
- package/dist/docs/assets/{style.B9o0luvp.css → style.DK0YX1WL.css} +1 -1
- package/dist/docs/assets/{templates_agentic-owners.md.CTEnR0jp.js → templates_agentic-owners.md.Dh2nDSqg.js} +4 -4
- package/dist/docs/assets/templates_security-reviewer.md.DnwXdnB5.js +3 -0
- package/dist/docs/assets/templates_thermo-quality-review.md.MJIdHkzE.js +3 -0
- package/dist/docs/assets/{templates_thermo-quality-review.md.B77UyTrX.lean.js → templates_thermo-quality-review.md.MJIdHkzE.lean.js} +1 -1
- package/dist/docs/assets/templates_thermo-review.md.DfN1OFOl.js +3 -0
- package/dist/docs/assets/{templates_thermo-review.md.DRJ7mC5U.lean.js → templates_thermo-review.md.DfN1OFOl.lean.js} +1 -1
- package/dist/docs/assets/{templates_triage.md.CNN6b0JZ.js → templates_triage.md.BYWMloV4.js} +4 -4
- package/dist/docs/assets/troubleshooting.md.AGJ3jDzj.js +1 -0
- package/dist/docs/building-with-agents.html +46 -46
- package/dist/docs/building-with-agents.md +15 -15
- package/dist/docs/changelog.html +39 -39
- package/dist/docs/changelog.md +47 -11
- package/dist/docs/deployment.html +52 -52
- package/dist/docs/deployment.md +110 -48
- package/dist/docs/evals.html +47 -47
- package/dist/docs/evals.md +11 -11
- package/dist/docs/guides/agent-to-agent.html +45 -45
- package/dist/docs/guides/agent-to-agent.md +7 -7
- package/dist/docs/guides/bitbucket.html +41 -41
- package/dist/docs/guides/bitbucket.md +5 -5
- package/dist/docs/guides/cloud-agents.html +41 -41
- package/dist/docs/guides/cloud-agents.md +3 -3
- package/dist/docs/guides/convert-automation.html +49 -49
- package/dist/docs/guides/convert-automation.md +16 -15
- package/dist/docs/guides/github.html +50 -50
- package/dist/docs/guides/github.md +16 -16
- package/dist/docs/guides/gitlab.html +41 -41
- package/dist/docs/guides/gitlab.md +5 -5
- package/dist/docs/guides/grokbot-agents.html +40 -40
- package/dist/docs/guides/grokbot-agents.md +8 -14
- package/dist/docs/guides/hooks.html +40 -40
- package/dist/docs/guides/hooks.md +3 -3
- package/dist/docs/guides/improve.html +40 -40
- package/dist/docs/guides/improve.md +2 -2
- package/dist/docs/guides/jev.html +48 -48
- package/dist/docs/guides/jev.md +10 -10
- package/dist/docs/guides/mcp-oauth.html +45 -45
- package/dist/docs/guides/mcp-oauth.md +8 -8
- package/dist/docs/guides/migrate.html +43 -42
- package/dist/docs/guides/migrate.md +34 -27
- package/dist/docs/guides/opentelemetry.html +50 -59
- package/dist/docs/guides/opentelemetry.md +61 -130
- package/dist/docs/guides/pagerduty.html +48 -48
- package/dist/docs/guides/pagerduty.md +18 -18
- package/dist/docs/guides/slack.html +58 -45
- package/dist/docs/guides/slack.md +82 -11
- package/dist/docs/guides/webhooks.html +46 -42
- package/dist/docs/guides/webhooks.md +61 -3
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +39 -39
- package/dist/docs/hillclimbing.md +2 -2
- package/dist/docs/index.html +42 -42
- package/dist/docs/index.md +14 -15
- package/dist/docs/llms-full.txt +1238 -1243
- package/dist/docs/llms.txt +13 -13
- package/dist/docs/quickstart.html +48 -48
- package/dist/docs/quickstart.md +20 -20
- package/dist/docs/reference/access.html +60 -0
- package/dist/docs/reference/access.md +22 -0
- package/dist/docs/reference/agent-config.html +46 -44
- package/dist/docs/reference/agent-config.md +54 -12
- package/dist/docs/reference/artifacts.html +39 -39
- package/dist/docs/reference/artifacts.md +2 -2
- package/dist/docs/reference/channels.html +39 -39
- package/dist/docs/reference/channels.md +29 -9
- package/dist/docs/reference/cli.html +96 -100
- package/dist/docs/reference/cli.md +363 -366
- package/dist/docs/reference/connections.html +44 -44
- package/dist/docs/reference/connections.md +9 -9
- package/dist/docs/reference/evals.html +48 -48
- package/dist/docs/reference/evals.md +13 -13
- package/dist/docs/reference/extensions.html +46 -46
- package/dist/docs/reference/extensions.md +10 -10
- package/dist/docs/reference/hooks.html +42 -42
- package/dist/docs/reference/hooks.md +11 -11
- package/dist/docs/reference/http-api.html +39 -39
- package/dist/docs/reference/http-api.md +1 -1
- package/dist/docs/reference/instructions.html +39 -39
- package/dist/docs/reference/instructions.md +1 -1
- package/dist/docs/reference/limits.html +67 -0
- package/dist/docs/reference/limits.md +37 -0
- package/dist/docs/reference/memory.html +40 -40
- package/dist/docs/reference/memory.md +7 -7
- package/dist/docs/reference/playground.html +38 -38
- package/dist/docs/reference/playground.md +1 -1
- package/dist/docs/reference/project-layout.html +41 -41
- package/dist/docs/reference/project-layout.md +6 -6
- package/dist/docs/reference/prompt.html +39 -39
- package/dist/docs/reference/prompt.md +2 -2
- package/dist/docs/reference/schedules.html +42 -42
- package/dist/docs/reference/schedules.md +4 -4
- package/dist/docs/reference/sessions.html +39 -39
- package/dist/docs/reference/sessions.md +3 -3
- package/dist/docs/reference/skills.html +39 -39
- package/dist/docs/reference/skills.md +2 -2
- package/dist/docs/reference/subagents.html +39 -39
- package/dist/docs/reference/subagents.md +1 -1
- package/dist/docs/reference/tools.html +47 -47
- package/dist/docs/reference/tools.md +31 -21
- package/dist/docs/templates/agentic-owners.html +41 -41
- package/dist/docs/templates/agentic-owners.md +7 -7
- package/dist/docs/templates/security-reviewer.html +39 -39
- package/dist/docs/templates/security-reviewer.md +6 -6
- package/dist/docs/templates/thermo-quality-review.html +40 -40
- package/dist/docs/templates/thermo-quality-review.md +7 -7
- package/dist/docs/templates/thermo-review.html +40 -40
- package/dist/docs/templates/thermo-review.md +7 -7
- package/dist/docs/templates/triage.html +41 -41
- package/dist/docs/templates/triage.md +9 -9
- package/dist/docs/troubleshooting.html +38 -38
- package/dist/docs/troubleshooting.md +24 -22
- package/dist/evals/assertions.d.ts.map +1 -1
- package/dist/evals/assertions.js +2 -2
- package/dist/evals/expect.d.ts.map +1 -1
- package/dist/evals/expect.js +9 -1
- package/dist/evals/judge.js +2 -2
- package/dist/evals/loaders.d.ts +3 -3
- package/dist/evals/loaders.d.ts.map +1 -1
- package/dist/evals/loaders.js +6 -3
- package/dist/evals/matchers.d.ts +1 -1
- package/dist/evals/matchers.d.ts.map +1 -1
- package/dist/evals/matchers.js +40 -6
- package/dist/evals/reporters.d.ts +2 -2
- package/dist/evals/reporters.js +2 -2
- package/dist/evals/results.d.ts +1 -1
- package/dist/evals/results.js +1 -1
- package/dist/evals.d.ts +1 -1
- package/dist/evals.js +1 -1
- package/dist/executors.d.ts +1 -1
- package/dist/executors.d.ts.map +1 -1
- package/dist/executors.js +2 -2
- package/dist/extensions/cursor-cloud-agents/extension.d.ts +1 -1
- package/dist/extensions/cursor-cloud-agents/extension.js +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.d.ts.map +1 -1
- package/dist/extensions/cursor-cloud-agents/lib/backend.js +13 -2
- package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +3 -3
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts +7 -13
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +1 -1
- package/dist/extensions/cursor-grokbot-agents/extension.js +7 -13
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts +6 -6
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts.map +1 -1
- package/dist/extensions/cursor-grokbot-agents/lib/backend.js +8 -7
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts +6 -6
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +6 -6
- package/dist/extensions/improve/extension.d.ts +1 -1
- package/dist/extensions/improve/extension.js +1 -1
- package/dist/extensions/jev/extension.d.ts +1 -1
- package/dist/extensions/jev/extension.js +1 -1
- package/dist/extensions/jev/lib/evaluate.d.ts +2 -2
- package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -1
- package/dist/extensions/jev/lib/evaluate.js +26 -7
- package/dist/extensions/jev/skills/gated-write.md +1 -1
- package/dist/extensions/slack-communication/extension.d.ts +1 -1
- package/dist/extensions/slack-communication/extension.js +1 -1
- package/dist/extensions/slack-communication/skills/slack-voice.js +1 -1
- package/dist/extensions/slack-communication/tools/post-file.d.ts.map +1 -1
- package/dist/extensions/slack-communication/tools/post-file.js +45 -2
- package/dist/extensions.d.ts +2 -2
- package/dist/extensions.d.ts.map +1 -1
- package/dist/extensions.js +7 -3
- package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/files-backends/cursor-hosted.js +5 -0
- package/dist/files-backends/local-fs.d.ts.map +1 -1
- package/dist/files-backends/local-fs.js +4 -3
- package/dist/filesystem.d.ts +24 -54
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +172 -104
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/internal/advertise-tools.d.ts +3 -3
- package/dist/internal/advertise-tools.d.ts.map +1 -1
- package/dist/internal/advertise-tools.js +9 -5
- package/dist/internal/artifacts-store.d.ts.map +1 -1
- package/dist/internal/artifacts-store.js +15 -6
- package/dist/internal/as-of.d.ts.map +1 -1
- package/dist/internal/as-of.js +4 -3
- package/dist/internal/authored-alias-hooks.d.ts +1 -20
- package/dist/internal/authored-alias-hooks.d.ts.map +1 -1
- package/dist/internal/authored-alias-hooks.js +54 -7
- package/dist/internal/authored-loaders.d.ts +2 -2
- package/dist/internal/authored-loaders.d.ts.map +1 -1
- package/dist/internal/authored-loaders.js +38 -13
- package/dist/internal/brand.d.ts.map +1 -1
- package/dist/internal/brand.js +25 -2
- package/dist/internal/builtin-tools/artifacts.d.ts.map +1 -1
- package/dist/internal/builtin-tools/artifacts.js +19 -3
- package/dist/internal/channel-dispatch.d.ts.map +1 -1
- package/dist/internal/channel-dispatch.js +1 -1
- package/dist/internal/channel-state.d.ts.map +1 -1
- package/dist/internal/channel-state.js +13 -8
- package/dist/internal/chat-client.d.ts.map +1 -1
- package/dist/internal/chat-client.js +14 -5
- package/dist/internal/cli/command.d.ts +134 -0
- package/dist/internal/cli/command.d.ts.map +1 -0
- package/dist/internal/cli/command.js +54 -0
- package/dist/internal/cli/commands/channels.d.ts +26 -0
- package/dist/internal/cli/commands/channels.d.ts.map +1 -0
- package/dist/internal/cli/commands/channels.js +524 -0
- package/dist/internal/cli/commands/develop.d.ts +15 -0
- package/dist/internal/cli/commands/develop.d.ts.map +1 -0
- package/dist/internal/cli/commands/develop.js +568 -0
- package/dist/internal/cli/commands/hosted.d.ts +22 -0
- package/dist/internal/cli/commands/hosted.d.ts.map +1 -0
- package/dist/internal/cli/commands/hosted.js +407 -0
- package/dist/internal/cli/commands/index.d.ts +4 -0
- package/dist/internal/cli/commands/index.d.ts.map +1 -0
- package/dist/internal/cli/commands/index.js +84 -0
- package/dist/internal/cli/commands/mcp.d.ts +6 -0
- package/dist/internal/cli/commands/mcp.d.ts.map +1 -0
- package/dist/internal/cli/commands/mcp.js +89 -0
- package/dist/internal/cli/commands/project.d.ts +5 -0
- package/dist/internal/cli/commands/project.d.ts.map +1 -0
- package/dist/internal/cli/commands/project.js +136 -0
- package/dist/internal/cli/commands/scaffold.d.ts +12 -0
- package/dist/internal/cli/commands/scaffold.d.ts.map +1 -0
- package/dist/internal/cli/commands/scaffold.js +279 -0
- package/dist/internal/cli/commands/serve.d.ts +11 -0
- package/dist/internal/cli/commands/serve.d.ts.map +1 -0
- package/dist/internal/cli/commands/serve.js +370 -0
- package/dist/internal/cli/commands/session.d.ts +7 -0
- package/dist/internal/cli/commands/session.d.ts.map +1 -0
- package/dist/internal/cli/commands/session.js +354 -0
- package/dist/internal/cli/dispatch.d.ts +46 -0
- package/dist/internal/cli/dispatch.d.ts.map +1 -0
- package/dist/internal/cli/dispatch.js +385 -0
- package/dist/internal/cli/errors.d.ts +51 -0
- package/dist/internal/cli/errors.d.ts.map +1 -0
- package/dist/internal/cli/errors.js +142 -0
- package/dist/internal/cli/flags.d.ts +186 -0
- package/dist/internal/cli/flags.d.ts.map +1 -0
- package/dist/internal/cli/flags.js +167 -0
- package/dist/internal/cli/help-command.d.ts +7 -0
- package/dist/internal/cli/help-command.d.ts.map +1 -0
- package/dist/internal/cli/help-command.js +60 -0
- package/dist/internal/cli/help.d.ts +63 -0
- package/dist/internal/cli/help.d.ts.map +1 -0
- package/dist/internal/cli/help.js +203 -0
- package/dist/internal/cli/io.d.ts +11 -0
- package/dist/internal/cli/io.d.ts.map +1 -0
- package/dist/internal/cli/io.js +33 -0
- package/dist/internal/cli/output.d.ts +54 -0
- package/dist/internal/cli/output.d.ts.map +1 -0
- package/dist/internal/cli/output.js +132 -0
- package/dist/internal/cli/value-kinds.d.ts +20 -0
- package/dist/internal/cli/value-kinds.d.ts.map +1 -0
- package/dist/internal/cli/value-kinds.js +70 -0
- package/dist/internal/cli-ax.d.ts +35 -20
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +436 -365
- package/dist/internal/cli-convert-automation.d.ts +3 -1
- package/dist/internal/cli-convert-automation.d.ts.map +1 -1
- package/dist/internal/cli-convert-automation.js +52 -20
- package/dist/internal/cli-cursor.js +5 -1
- package/dist/internal/cli-deploy.d.ts +23 -9
- package/dist/internal/cli-deploy.d.ts.map +1 -1
- package/dist/internal/cli-deploy.js +234 -508
- package/dist/internal/cli-docs.d.ts +1 -1
- package/dist/internal/cli-docs.js +3 -2
- package/dist/internal/cli-github.js +1 -0
- package/dist/internal/cli-images.d.ts.map +1 -1
- package/dist/internal/cli-images.js +44 -14
- package/dist/internal/cli-invocation.d.ts +22 -0
- package/dist/internal/cli-invocation.d.ts.map +1 -0
- package/dist/internal/cli-invocation.js +86 -0
- package/dist/internal/cli-manifest.d.ts +4 -1
- package/dist/internal/cli-manifest.d.ts.map +1 -1
- package/dist/internal/cli-manifest.js +16 -4
- package/dist/internal/cli-mcp-oauth.d.ts +7 -11
- package/dist/internal/cli-mcp-oauth.d.ts.map +1 -1
- package/dist/internal/cli-mcp-oauth.js +24 -104
- package/dist/internal/cli-mcp.d.ts +17 -28
- package/dist/internal/cli-mcp.d.ts.map +1 -1
- package/dist/internal/cli-mcp.js +64 -304
- package/dist/internal/cli-migrate.d.ts +2 -0
- package/dist/internal/cli-migrate.d.ts.map +1 -1
- package/dist/internal/cli-migrate.js +42 -14
- package/dist/internal/cli-skills.d.ts +30 -2
- package/dist/internal/cli-skills.d.ts.map +1 -1
- package/dist/internal/cli-skills.js +63 -3
- package/dist/internal/cli-slack-context.d.ts +91 -0
- package/dist/internal/cli-slack-context.d.ts.map +1 -0
- package/dist/internal/cli-slack-context.js +112 -0
- package/dist/internal/cli-slack-manual.d.ts +2 -0
- package/dist/internal/cli-slack-manual.d.ts.map +1 -1
- package/dist/internal/cli-slack-manual.js +12 -0
- package/dist/internal/cli-slack.d.ts +1 -49
- package/dist/internal/cli-slack.d.ts.map +1 -1
- package/dist/internal/cli-slack.js +27 -147
- package/dist/internal/cloud-merge.d.ts +2 -4
- package/dist/internal/cloud-merge.d.ts.map +1 -1
- package/dist/internal/cloud-merge.js +2 -7
- package/dist/internal/continuation-channel.d.ts.map +1 -1
- package/dist/internal/continuation-channel.js +10 -22
- package/dist/internal/continuation-identity.d.ts +33 -12
- package/dist/internal/continuation-identity.d.ts.map +1 -1
- package/dist/internal/continuation-identity.js +161 -43
- package/dist/internal/continuation-registration.d.ts +26 -0
- package/dist/internal/continuation-registration.d.ts.map +1 -0
- package/dist/internal/continuation-registration.js +35 -0
- package/dist/internal/conversation-mirror.d.ts.map +1 -1
- package/dist/internal/conversation-mirror.js +23 -14
- package/dist/internal/convert-automation/convert-workflow.d.ts.map +1 -1
- package/dist/internal/convert-automation/convert-workflow.js +28 -22
- package/dist/internal/convert-automation/types.d.ts +1 -1
- package/dist/internal/convert-automation/types.js +1 -1
- package/dist/internal/cursor/account-mcp.js +1 -1
- package/dist/internal/cursor/backend-client.d.ts.map +1 -1
- package/dist/internal/cursor/backend-client.js +6 -8
- package/dist/internal/cursor/bound-secret-file.d.ts.map +1 -1
- package/dist/internal/cursor/bound-secret-file.js +2 -1
- package/dist/internal/cursor/credentials.d.ts +4 -17
- package/dist/internal/cursor/credentials.d.ts.map +1 -1
- package/dist/internal/cursor/credentials.js +11 -27
- package/dist/internal/cursor/session-token.d.ts.map +1 -1
- package/dist/internal/cursor/session-token.js +3 -4
- package/dist/internal/cursor/store-api-client.d.ts.map +1 -1
- package/dist/internal/cursor/store-api-client.js +3 -2
- package/dist/internal/cursor-agent-template.d.ts +1 -1
- package/dist/internal/cursor-agent-template.d.ts.map +1 -1
- package/dist/internal/cursor-agent-template.js +2 -2
- package/dist/internal/cursor-deployment-relay.d.ts.map +1 -1
- package/dist/internal/cursor-deployment-relay.js +24 -2
- package/dist/internal/cursor-event-relay.d.ts.map +1 -1
- package/dist/internal/cursor-event-relay.js +26 -2
- package/dist/internal/cursor-relay-core.d.ts.map +1 -1
- package/dist/internal/cursor-relay-core.js +22 -3
- package/dist/internal/deploy-client.d.ts +102 -92
- package/dist/internal/deploy-client.d.ts.map +1 -1
- package/dist/internal/deploy-client.js +143 -178
- package/dist/internal/deploy-manifest.d.ts +2 -2
- package/dist/internal/deploy-manifest.d.ts.map +1 -1
- package/dist/internal/deploy-manifest.js +6 -6
- package/dist/internal/describe-error.d.ts +4 -0
- package/dist/internal/describe-error.d.ts.map +1 -1
- package/dist/internal/describe-error.js +20 -0
- package/dist/internal/discovery/agent-config.d.ts +1 -5
- package/dist/internal/discovery/agent-config.d.ts.map +1 -1
- package/dist/internal/discovery/agent-config.js +5 -11
- package/dist/internal/discovery/agent.d.ts.map +1 -1
- package/dist/internal/discovery/agent.js +24 -30
- package/dist/internal/discovery/channels.d.ts.map +1 -1
- package/dist/internal/discovery/channels.js +2 -0
- package/dist/internal/discovery/connections.d.ts.map +1 -1
- package/dist/internal/discovery/connections.js +6 -4
- package/dist/internal/discovery/context.d.ts.map +1 -1
- package/dist/internal/discovery/context.js +6 -1
- package/dist/internal/discovery/extension-overlay.d.ts +1 -1
- package/dist/internal/discovery/extension-overlay.d.ts.map +1 -1
- package/dist/internal/discovery/extension-overlay.js +1 -0
- package/dist/internal/discovery/extensions.d.ts.map +1 -1
- package/dist/internal/discovery/extensions.js +12 -5
- package/dist/internal/discovery/fs.d.ts.map +1 -1
- package/dist/internal/discovery/fs.js +2 -1
- package/dist/internal/discovery/hooks.d.ts.map +1 -1
- package/dist/internal/discovery/hooks.js +1 -0
- package/dist/internal/discovery/info.d.ts.map +1 -1
- package/dist/internal/discovery/info.js +0 -3
- package/dist/internal/discovery/instructions.d.ts.map +1 -1
- package/dist/internal/discovery/instructions.js +4 -1
- package/dist/internal/discovery/instrumentation.js +1 -1
- package/dist/internal/discovery/modules.d.ts.map +1 -1
- package/dist/internal/discovery/modules.js +4 -1
- package/dist/internal/discovery/project.js +1 -1
- package/dist/internal/discovery/reminders.d.ts.map +1 -1
- package/dist/internal/discovery/reminders.js +1 -0
- package/dist/internal/discovery/runtime.d.ts +0 -16
- package/dist/internal/discovery/runtime.d.ts.map +1 -1
- package/dist/internal/discovery/runtime.js +2 -47
- package/dist/internal/discovery/schedules.d.ts.map +1 -1
- package/dist/internal/discovery/schedules.js +1 -0
- package/dist/internal/discovery/services.d.ts.map +1 -1
- package/dist/internal/discovery/services.js +3 -1
- package/dist/internal/discovery/skills.d.ts.map +1 -1
- package/dist/internal/discovery/skills.js +1 -0
- package/dist/internal/discovery/tools.d.ts +1 -1
- package/dist/internal/discovery/tools.d.ts.map +1 -1
- package/dist/internal/discovery/tools.js +3 -1
- 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/distribution.d.ts +9 -14
- package/dist/internal/distribution.d.ts.map +1 -1
- package/dist/internal/distribution.js +54 -18
- package/dist/internal/docs-site.d.ts.map +1 -1
- package/dist/internal/docs-site.js +15 -2
- package/dist/internal/dry-run.d.ts +32 -0
- package/dist/internal/dry-run.d.ts.map +1 -0
- package/dist/internal/dry-run.js +62 -0
- package/dist/internal/duration.d.ts.map +1 -1
- package/dist/internal/duration.js +1 -0
- package/dist/internal/estimate-cost.d.ts.map +1 -1
- package/dist/internal/estimate-cost.js +12 -5
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +6 -5
- package/dist/internal/eval-runner.d.ts +0 -2
- package/dist/internal/eval-runner.d.ts.map +1 -1
- package/dist/internal/eval-runner.js +3 -3
- package/dist/internal/evals-client.d.ts.map +1 -1
- package/dist/internal/evals-client.js +60 -15
- package/dist/internal/event-log.d.ts.map +1 -1
- package/dist/internal/event-log.js +3 -11
- package/dist/internal/event-mapper.d.ts.map +1 -1
- package/dist/internal/event-mapper.js +33 -15
- package/dist/internal/expected-delivery-failure.d.ts.map +1 -1
- package/dist/internal/expected-delivery-failure.js +5 -4
- package/dist/internal/fetch-text.d.ts +8 -0
- package/dist/internal/fetch-text.d.ts.map +1 -0
- package/dist/internal/fetch-text.js +32 -0
- package/dist/internal/filesystem/errors.d.ts.map +1 -1
- package/dist/internal/filesystem/errors.js +8 -0
- package/dist/internal/filesystem/scratch.js +1 -4
- package/dist/internal/filesystem/sdk-schemas.d.ts +19 -19
- package/dist/internal/filesystem/sdk-schemas.d.ts.map +1 -1
- package/dist/internal/filesystem/sdk-schemas.js +15 -21
- package/dist/internal/filesystem/tools.d.ts +15 -4
- package/dist/internal/filesystem/tools.d.ts.map +1 -1
- package/dist/internal/filesystem/tools.js +33 -47
- package/dist/internal/filesystem/walk.d.ts.map +1 -1
- package/dist/internal/filesystem/walk.js +4 -0
- package/dist/internal/framework-file-storage.d.ts.map +1 -1
- package/dist/internal/framework-file-storage.js +2 -1
- package/dist/internal/frontmatter.d.ts.map +1 -1
- package/dist/internal/frontmatter.js +5 -1
- package/dist/internal/github-fanout.js +2 -1
- package/dist/internal/guest-network.d.ts.map +1 -1
- package/dist/internal/guest-network.js +6 -0
- package/dist/internal/handleAgentServeTrigger.d.ts +8 -0
- package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
- package/dist/internal/handleAgentServeTrigger.js +27 -1
- package/dist/internal/host-kv.d.ts.map +1 -1
- package/dist/internal/host-kv.js +4 -2
- package/dist/internal/host-otel.d.ts.map +1 -1
- package/dist/internal/host-otel.js +2 -8
- package/dist/internal/host-platforms.d.ts.map +1 -1
- package/dist/internal/host-platforms.js +17 -10
- package/dist/internal/hosted-catch-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-catch-protocol.js +26 -9
- package/dist/internal/hosted-catch.d.ts +13 -10
- package/dist/internal/hosted-catch.d.ts.map +1 -1
- package/dist/internal/hosted-catch.js +23 -11
- package/dist/internal/hosted-delivery-protocol.d.ts +1 -1
- package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
- package/dist/internal/hosted-delivery-protocol.js +75 -45
- package/dist/internal/hosted-delivery.d.ts +1 -2
- package/dist/internal/hosted-delivery.d.ts.map +1 -1
- package/dist/internal/hosted-delivery.js +27 -32
- package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
- package/dist/internal/hosted-execution-diag.js +11 -13
- package/dist/internal/hosted-execution-flush.js +1 -1
- package/dist/internal/hosted-execution-latency.d.ts.map +1 -1
- package/dist/internal/hosted-execution-latency.js +12 -1
- package/dist/internal/hosted-hints.d.ts +16 -0
- package/dist/internal/hosted-hints.d.ts.map +1 -0
- package/dist/internal/hosted-hints.js +23 -0
- package/dist/internal/hosted-managed-automation.d.ts.map +1 -1
- package/dist/internal/hosted-managed-automation.js +1 -0
- package/dist/internal/hosted-session-fixture.d.ts +26 -0
- package/dist/internal/hosted-session-fixture.d.ts.map +1 -0
- package/dist/internal/hosted-session-fixture.js +34 -0
- package/dist/internal/hosted-session-view.d.ts +48 -0
- package/dist/internal/hosted-session-view.d.ts.map +1 -0
- package/dist/internal/hosted-session-view.js +305 -0
- package/dist/internal/http-channel.d.ts.map +1 -1
- package/dist/internal/http-channel.js +8 -5
- package/dist/internal/http-control-plane-session.d.ts.map +1 -1
- package/dist/internal/http-control-plane-session.js +8 -9
- package/dist/internal/init-interview.js +2 -2
- package/dist/internal/init-project.d.ts +7 -13
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +10 -20
- package/dist/internal/init-scaffold.js +2 -2
- package/dist/internal/inline-stdio-define-stub.d.ts +1 -1
- package/dist/internal/inline-stdio-define-stub.d.ts.map +1 -1
- package/dist/internal/inline-stdio-define-stub.js +1 -1
- package/dist/internal/inline-stdio-mcp.d.ts.map +1 -1
- package/dist/internal/inline-stdio-mcp.js +31 -8
- package/dist/internal/install-cursor-skills.d.ts +22 -15
- package/dist/internal/install-cursor-skills.d.ts.map +1 -1
- package/dist/internal/install-cursor-skills.js +66 -31
- package/dist/internal/interview/agent-questions.d.ts.map +1 -1
- package/dist/internal/interview/agent-questions.js +4 -1
- package/dist/internal/interview/question.d.ts +1 -1
- package/dist/internal/interview/question.js +1 -1
- package/dist/internal/json-schema.d.ts +3 -2
- package/dist/internal/json-schema.d.ts.map +1 -1
- package/dist/internal/json-schema.js +83 -3
- package/dist/internal/json-value.d.ts +20 -0
- package/dist/internal/json-value.d.ts.map +1 -0
- package/dist/internal/json-value.js +56 -0
- package/dist/internal/logs-client.d.ts +4 -25
- package/dist/internal/logs-client.d.ts.map +1 -1
- package/dist/internal/logs-client.js +17 -174
- package/dist/internal/mcp-endpoint.d.ts +1 -1
- package/dist/internal/mcp-endpoint.js +2 -1
- package/dist/internal/mcp-host.d.ts.map +1 -1
- package/dist/internal/mcp-host.js +22 -9
- package/dist/internal/mcp-oauth.d.ts +2 -2
- package/dist/internal/mcp-oauth.d.ts.map +1 -1
- package/dist/internal/mcp-oauth.js +61 -8
- package/dist/internal/named-webhook-secret.d.ts +12 -0
- package/dist/internal/named-webhook-secret.d.ts.map +1 -1
- package/dist/internal/named-webhook-secret.js +18 -0
- package/dist/internal/otel/bind-telemetry.d.ts +26 -0
- package/dist/internal/otel/bind-telemetry.d.ts.map +1 -0
- package/dist/internal/otel/bind-telemetry.js +36 -0
- package/dist/internal/otel/collector.d.ts.map +1 -1
- package/dist/internal/otel/collector.js +94 -42
- package/dist/internal/otel/config.d.ts.map +1 -1
- package/dist/internal/otel/config.js +4 -3
- package/dist/internal/otel/conversation-span-processor.d.ts.map +1 -1
- package/dist/internal/otel/conversation-span-processor.js +5 -2
- package/dist/internal/otel/customer.d.ts +1 -5
- package/dist/internal/otel/customer.d.ts.map +1 -1
- package/dist/internal/otel/customer.js +35 -13
- package/dist/internal/otel/http.d.ts +1 -1
- package/dist/internal/otel/http.d.ts.map +1 -1
- package/dist/internal/otel/http.js +5 -3
- package/dist/internal/otel/propagation.d.ts +3 -2
- package/dist/internal/otel/propagation.d.ts.map +1 -1
- package/dist/internal/otel/propagation.js +3 -2
- package/dist/internal/otel/reserved-attributes.d.ts +8 -0
- package/dist/internal/otel/reserved-attributes.d.ts.map +1 -0
- package/dist/internal/otel/reserved-attributes.js +24 -0
- package/dist/internal/otel/runtime.d.ts.map +1 -1
- package/dist/internal/otel/runtime.js +9 -2
- package/dist/internal/otel/session-telemetry.d.ts +22 -0
- package/dist/internal/otel/session-telemetry.d.ts.map +1 -0
- package/dist/internal/otel/session-telemetry.js +30 -0
- package/dist/internal/otel/telemetry-attributes.d.ts +7 -0
- package/dist/internal/otel/telemetry-attributes.d.ts.map +1 -0
- package/dist/internal/otel/telemetry-attributes.js +35 -0
- package/dist/internal/otel/telemetry-processor.d.ts +7 -0
- package/dist/internal/otel/telemetry-processor.d.ts.map +1 -0
- package/dist/internal/otel/telemetry-processor.js +47 -0
- package/dist/internal/otel/tool-error-class.d.ts.map +1 -1
- package/dist/internal/otel/tool-error-class.js +4 -0
- package/dist/internal/package-inline-stdio.d.ts.map +1 -1
- package/dist/internal/package-inline-stdio.js +2 -2
- package/dist/internal/persistent-stage-log-mirror.js +2 -5
- package/dist/internal/platform-timers.d.ts.map +1 -1
- package/dist/internal/platform-timers.js +32 -1
- package/dist/internal/playground/toolchain.d.ts.map +1 -1
- package/dist/internal/playground/toolchain.js +16 -3
- package/dist/internal/playground-proxy.d.ts +6 -27
- package/dist/internal/playground-proxy.d.ts.map +1 -1
- package/dist/internal/playground-proxy.js +25 -83
- package/dist/internal/private-file.d.ts +2 -0
- package/dist/internal/private-file.d.ts.map +1 -0
- package/dist/internal/private-file.js +8 -0
- package/dist/internal/reminder-control-plane-protocol.d.ts.map +1 -1
- package/dist/internal/reminder-control-plane-protocol.js +4 -2
- package/dist/internal/reminder-runner.d.ts.map +1 -1
- package/dist/internal/reminder-runner.js +12 -25
- package/dist/internal/reminder-schedule.js +1 -1
- package/dist/internal/reminder-store.d.ts.map +1 -1
- package/dist/internal/reminder-store.js +16 -21
- package/dist/internal/request-headers.d.ts +2 -2
- package/dist/internal/request-headers.d.ts.map +1 -1
- package/dist/internal/request-headers.js +1 -1
- package/dist/internal/resolve-prod-target.d.ts +9 -65
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +20 -187
- package/dist/internal/resolved-connections.js +1 -1
- package/dist/internal/{factory-resource-channel.d.ts → resource-channel.d.ts} +10 -10
- package/dist/internal/resource-channel.d.ts.map +1 -0
- package/dist/internal/{factory-resource-channel.js → resource-channel.js} +9 -7
- package/dist/internal/run-client.d.ts.map +1 -1
- package/dist/internal/run-client.js +4 -1
- package/dist/internal/sdk-runner.d.ts +2 -2
- package/dist/internal/sdk-runner.d.ts.map +1 -1
- package/dist/internal/sdk-runner.js +19 -16
- package/dist/internal/sdk-subagent-inherit-support.d.ts.map +1 -1
- package/dist/internal/sdk-subagent-inherit-support.js +3 -2
- package/dist/internal/serve-restart.d.ts +3 -0
- package/dist/internal/serve-restart.d.ts.map +1 -1
- package/dist/internal/serve-restart.js +8 -4
- package/dist/internal/server.d.ts +4 -0
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +71 -64
- package/dist/internal/session-cost.d.ts +4 -4
- package/dist/internal/session-cost.d.ts.map +1 -1
- package/dist/internal/session-cost.js +5 -5
- package/dist/internal/session-engine.d.ts +22 -8
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +170 -75
- package/dist/internal/session-links.js +2 -1
- package/dist/internal/session-live-publisher.d.ts +0 -7
- package/dist/internal/session-live-publisher.d.ts.map +1 -1
- package/dist/internal/session-live-publisher.js +20 -7
- package/dist/internal/session-run-log.d.ts.map +1 -1
- package/dist/internal/session-run-log.js +19 -5
- package/dist/internal/session-store.d.ts.map +1 -1
- package/dist/internal/session-store.js +17 -3
- package/dist/internal/sessions-client.d.ts +2 -0
- package/dist/internal/sessions-client.d.ts.map +1 -1
- package/dist/internal/sessions-client.js +44 -10
- package/dist/internal/shallow-clone.d.ts +258 -0
- package/dist/internal/shallow-clone.d.ts.map +1 -0
- package/dist/internal/shallow-clone.js +644 -0
- package/dist/internal/slack-bot-scopes.d.ts +3 -0
- package/dist/internal/slack-bot-scopes.d.ts.map +1 -0
- package/dist/internal/slack-bot-scopes.js +2 -0
- package/dist/internal/slack-manifest-opt-in.d.ts +26 -0
- package/dist/internal/slack-manifest-opt-in.d.ts.map +1 -0
- package/dist/internal/slack-manifest-opt-in.js +63 -0
- package/dist/internal/slack-provision-client.d.ts +8 -24
- package/dist/internal/slack-provision-client.d.ts.map +1 -1
- package/dist/internal/slack-provision-client.js +21 -20
- package/dist/internal/slack-thread-key.d.ts +8 -3
- package/dist/internal/slack-thread-key.d.ts.map +1 -1
- package/dist/internal/slack-thread-key.js +6 -6
- package/dist/internal/sqlite-experimental-warning.js +1 -1
- package/dist/internal/start-log-store.d.ts.map +1 -1
- package/dist/internal/start-log-store.js +2 -5
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +49 -20
- package/dist/internal/stored-eval-run.d.ts +17 -0
- package/dist/internal/stored-eval-run.d.ts.map +1 -0
- package/dist/internal/stored-eval-run.js +305 -0
- package/dist/internal/stream-progress.d.ts.map +1 -1
- package/dist/internal/stream-progress.js +1 -1
- package/dist/internal/tcp-address.d.ts +4 -0
- package/dist/internal/tcp-address.d.ts.map +1 -0
- package/dist/internal/tcp-address.js +8 -0
- package/dist/internal/terminal-style.js +2 -2
- package/dist/internal/testing/pagerduty-continuation-fixtures.d.ts +1 -1
- package/dist/internal/testing/pagerduty-continuation-fixtures.js +1 -1
- package/dist/internal/testing/scm-continuation-fixtures.d.ts +1 -1
- package/dist/internal/testing/scm-continuation-fixtures.js +1 -1
- package/dist/internal/testing/slack-continuation-fixtures.d.ts +12 -6
- package/dist/internal/testing/slack-continuation-fixtures.d.ts.map +1 -1
- package/dist/internal/testing/slack-continuation-fixtures.js +74 -3
- package/dist/internal/tool-call-retry.d.ts +35 -7
- package/dist/internal/tool-call-retry.d.ts.map +1 -1
- package/dist/internal/tool-call-retry.js +108 -108
- package/dist/internal/tool-catalog.d.ts.map +1 -1
- package/dist/internal/tool-catalog.js +7 -2
- package/dist/internal/tool-policy.d.ts +20 -7
- package/dist/internal/tool-policy.d.ts.map +1 -1
- package/dist/internal/tool-policy.js +39 -11
- package/dist/internal/tool-result.d.ts +0 -5
- package/dist/internal/tool-result.d.ts.map +1 -1
- package/dist/internal/tool-result.js +26 -6
- package/dist/internal/trajectory.d.ts.map +1 -1
- package/dist/internal/trajectory.js +5 -1
- package/dist/internal/turn-outbox.d.ts.map +1 -1
- package/dist/internal/turn-outbox.js +1 -0
- package/dist/internal/update-check.d.ts +2 -0
- package/dist/internal/update-check.d.ts.map +1 -1
- package/dist/internal/update-check.js +4 -0
- package/dist/internal/workspace.d.ts +3 -4
- package/dist/internal/workspace.d.ts.map +1 -1
- package/dist/internal/workspace.js +5 -5
- package/dist/kv/memory-kv.d.ts +1 -1
- package/dist/kv/memory-kv.js +1 -1
- package/dist/kv.d.ts +9 -2
- package/dist/kv.d.ts.map +1 -1
- package/dist/kv.js +10 -2
- package/dist/memory.d.ts +1 -1
- package/dist/memory.js +1 -1
- package/dist/otel-public.d.ts +2 -1
- package/dist/otel-public.d.ts.map +1 -1
- package/dist/otel-public.js +2 -1
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +6 -2
- package/dist/playground/assets/cursor-icons-16-QUmxS7q3.woff2 +0 -0
- package/dist/playground/assets/index-BMpVzZzC.css +1 -0
- package/dist/playground/assets/index-_3zz3yh8.js +62 -0
- package/dist/playground/index.html +2 -2
- package/dist/prompt.d.ts +1 -1
- package/dist/prompt.js +1 -1
- package/dist/public-deprecated.d.ts +11 -12
- package/dist/public-deprecated.d.ts.map +1 -1
- package/dist/public-deprecated.js +8 -9
- package/dist/reminders.d.ts +2 -2
- package/dist/reminders.js +2 -2
- package/dist/schedules.d.ts +1 -1
- package/dist/schedules.js +1 -1
- package/dist/scm.d.ts +2 -0
- package/dist/scm.d.ts.map +1 -0
- package/dist/scm.js +1 -0
- package/dist/skills.d.ts +1 -1
- package/dist/skills.js +1 -1
- package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
- package/dist/storage-backends/cursor-hosted.js +5 -3
- package/dist/storage-backends/file-kv.d.ts +3 -2
- package/dist/storage-backends/file-kv.d.ts.map +1 -1
- package/dist/storage-backends/file-kv.js +20 -8
- package/dist/storage.d.ts +2 -3
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +9 -5
- package/dist/telemetry.d.ts +12 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +11 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +2 -1
- package/dist/types.d.ts +54 -41
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -4
- package/docs/README.md +16 -17
- package/docs/building-with-agents.md +16 -16
- package/docs/changelog.md +48 -12
- package/docs/deployment.md +111 -49
- package/docs/evals.md +11 -11
- package/docs/guides/agent-to-agent.md +8 -8
- package/docs/guides/bitbucket.md +5 -5
- package/docs/guides/cloud-agents.md +4 -4
- package/docs/guides/convert-automation.md +17 -16
- package/docs/guides/github.md +16 -16
- package/docs/guides/gitlab.md +5 -5
- package/docs/guides/grokbot-agents.md +8 -14
- package/docs/guides/hooks.md +3 -3
- package/docs/guides/improve.md +2 -2
- package/docs/guides/jev.md +10 -10
- package/docs/guides/mcp-oauth.md +8 -8
- package/docs/guides/migrate.md +35 -28
- package/docs/guides/opentelemetry.md +61 -130
- package/docs/guides/pagerduty.md +18 -18
- package/docs/guides/slack.md +82 -11
- package/docs/guides/webhooks.md +61 -3
- package/docs/hillclimbing.md +2 -2
- package/docs/quickstart.md +21 -21
- package/docs/reference/access.md +27 -0
- package/docs/reference/agent-config.md +54 -12
- package/docs/reference/artifacts.md +2 -2
- package/docs/reference/channels.md +29 -9
- package/docs/reference/cli.md +364 -367
- package/docs/reference/connections.md +9 -9
- package/docs/reference/evals.md +13 -13
- package/docs/reference/extensions.md +10 -10
- package/docs/reference/hooks.md +11 -11
- package/docs/reference/http-api.md +1 -1
- package/docs/reference/instructions.md +1 -1
- package/docs/reference/limits.md +42 -0
- package/docs/reference/memory.md +7 -7
- package/docs/reference/playground.md +1 -1
- package/docs/reference/project-layout.md +6 -6
- package/docs/reference/prompt.md +2 -2
- package/docs/reference/schedules.md +4 -4
- package/docs/reference/sessions.md +3 -3
- package/docs/reference/skills.md +2 -2
- package/docs/reference/subagents.md +1 -1
- package/docs/reference/tools.md +31 -21
- package/docs/templates/agentic-owners.md +7 -7
- package/docs/templates/security-reviewer.md +6 -6
- package/docs/templates/thermo-quality-review.md +7 -7
- package/docs/templates/thermo-review.md +7 -7
- package/docs/templates/triage.md +9 -9
- package/docs/troubleshooting.md +24 -22
- package/package.json +51 -92
- package/scripts/install-cursor-skills.mjs +2 -2
- package/skills/cli/SKILL.md +125 -0
- package/skills/create-agent/SKILL.md +11 -9
- package/skills/debug/SKILL.md +3 -3
- package/skills/deploy/SKILL.md +46 -43
- package/skills/evals/SKILL.md +7 -7
- package/skills/framework-map/SKILL.md +8 -7
- package/skills/github/SKILL.md +4 -4
- package/skills/hillclimb/SKILL.md +3 -3
- package/skills/migrate-v2/SKILL.md +50 -53
- package/skills/otel/SKILL.md +36 -6
- package/skills/setup-slack/SKILL.md +3 -3
- package/templates/agentic-owners/README.md +1 -1
- package/templates/agentic-owners/bot/agent.ts +1 -1
- package/templates/agentic-owners/bot/channels/github.ts +1 -1
- package/templates/agentic-owners/bot/lib/github.ts +2 -2
- package/templates/agentic-owners/bot/lib/owners/parse.ts +1 -1
- package/templates/agentic-owners/bot/lib/owners/policyMode.ts +6 -2
- package/templates/agentic-owners/bot/lib/review.ts +7 -3
- package/templates/agentic-owners/bot/tools/record_review.ts +2 -2
- package/templates/agentic-owners/evals/evals.config.ts +1 -1
- package/templates/agentic-owners/evals/owners.eval.ts +1 -1
- package/templates/agentic-owners/package.json +2 -2
- package/templates/agents-md/README.md +1 -1
- package/templates/agents-md/bot/agent.ts +1 -1
- package/templates/agents-md/bot/channels/github.ts +1 -1
- package/templates/agents-md/bot/channels/queue.ts +5 -3
- package/templates/agents-md/bot/channels/slack.ts +1 -1
- package/templates/agents-md/bot/lib/collect.ts +1 -1
- package/templates/agents-md/bot/schedules/weekly.ts +6 -6
- package/templates/agents-md/bot/tools/apply_agents.ts +2 -2
- package/templates/agents-md/evals/agents.eval.ts +1 -1
- package/templates/agents-md/evals/evals.config.ts +1 -1
- package/templates/agents-md/package.json +2 -2
- package/templates/code-wiki/README.md +1 -1
- package/templates/code-wiki/bot/agent.ts +1 -1
- package/templates/code-wiki/bot/channels/github.ts +3 -3
- package/templates/code-wiki/bot/tools/apply_wiki.ts +3 -3
- package/templates/code-wiki/evals/evals.config.ts +1 -1
- package/templates/code-wiki/evals/wiki.eval.ts +1 -1
- package/templates/code-wiki/package.json +2 -2
- package/templates/demo/README.md +1 -1
- package/templates/demo/bot/agent.ts +1 -1
- package/templates/demo/bot/channels/github.ts +7 -3
- package/templates/demo/bot/channels/queue.ts +5 -5
- package/templates/demo/bot/lib/collect.ts +2 -2
- package/templates/demo/bot/tools/record_demo.ts +2 -2
- package/templates/demo/evals/demo.eval.ts +1 -1
- package/templates/demo/evals/evals.config.ts +1 -1
- package/templates/demo/package.json +2 -2
- package/templates/pr-autofixer/bot/agent.ts +1 -1
- package/templates/pr-autofixer/bot/channels/drive.ts +1 -1
- package/templates/pr-autofixer/bot/channels/github.ts +3 -3
- package/templates/pr-autofixer/bot/channels/slack.ts +1 -1
- package/templates/pr-autofixer/bot/hooks/bind-agent.ts +1 -1
- package/templates/pr-autofixer/bot/lib/affinity.ts +1 -1
- package/templates/pr-autofixer/bot/lib/drive.ts +2 -2
- package/templates/pr-autofixer/bot/lib/merge-watch.ts +4 -4
- package/templates/pr-autofixer/bot/lib/pr-state.ts +1 -1
- package/templates/pr-autofixer/bot/lib/start-drive.ts +2 -2
- package/templates/pr-autofixer/bot/lib/webhook-buffer.ts +1 -1
- package/templates/pr-autofixer/bot/lib/webhook-routing.ts +1 -1
- package/templates/pr-autofixer/bot/tools/drive_pr.ts +1 -1
- package/templates/pr-autofixer/evals/coordinator.eval.ts +1 -1
- package/templates/pr-autofixer/evals/evals.config.ts +1 -1
- package/templates/pr-autofixer/package.json +2 -2
- package/templates/security-help/.gitignore +4 -0
- package/templates/security-help/README.md +1 -1
- package/templates/security-help/bot/agent.ts +1 -1
- package/templates/security-help/bot/channels/github.ts +1 -1
- package/templates/security-help/bot/channels/slack.ts +1 -1
- package/templates/security-help/bot/lib/pr-first-pass.ts +3 -3
- package/templates/security-help/evals/evals.config.ts +1 -1
- package/templates/security-help/evals/security-help.eval.ts +1 -1
- package/templates/security-help/package.json +1 -1
- package/templates/security-reviewer/README.md +1 -1
- package/templates/security-reviewer/bot/agent.ts +1 -1
- package/templates/security-reviewer/bot/channels/github.ts +2 -2
- package/templates/security-reviewer/bot/tools/post_findings.ts +2 -2
- package/templates/security-reviewer/evals/evals.config.ts +1 -1
- package/templates/security-reviewer/evals/review.eval.ts +1 -1
- package/templates/security-reviewer/package.json +2 -2
- package/templates/thermo-quality-review/README.md +1 -1
- package/templates/thermo-quality-review/bot/agent.ts +1 -1
- package/templates/thermo-quality-review/bot/channels/github.ts +2 -2
- package/templates/thermo-quality-review/bot/tools/post_findings.ts +2 -2
- package/templates/thermo-quality-review/evals/evals.config.ts +1 -1
- package/templates/thermo-quality-review/evals/review.eval.ts +1 -1
- package/templates/thermo-quality-review/package.json +2 -2
- package/templates/thermo-review/README.md +1 -1
- package/templates/thermo-review/bot/agent.ts +1 -1
- package/templates/thermo-review/bot/channels/github.ts +2 -2
- package/templates/thermo-review/bot/tools/post_findings.ts +2 -2
- package/templates/thermo-review/evals/evals.config.ts +1 -1
- package/templates/thermo-review/evals/review.eval.ts +1 -1
- package/templates/thermo-review/package.json +2 -2
- package/templates/triage/README.md +2 -2
- package/templates/triage/bot/agent.ts +1 -1
- package/templates/triage/bot/channels/queue.ts +5 -5
- package/templates/triage/bot/channels/webhook.ts +5 -5
- package/templates/triage/bot/hooks/memory.ts +1 -1
- package/templates/triage/bot/lib/actuate.ts +2 -2
- package/templates/triage/bot/tools/record_triage.ts +1 -1
- package/templates/triage/evals/evals.config.ts +1 -1
- package/templates/triage/evals/triage.eval.ts +1 -1
- package/templates/triage/overlays/jira/README.md +1 -1
- package/templates/triage/overlays/jira/bot/mcp-connections/tracker.ts +1 -1
- package/templates/triage/overlays/linear/README.md +1 -1
- package/templates/triage/overlays/linear/bot/mcp-connections/tracker.ts +1 -1
- package/templates/triage/package.json +2 -2
- package/dist/bin/agent-sdk.js +0 -2
- package/dist/docs/assets/building-with-agents.md.FZXrY8Nk.js +0 -9
- package/dist/docs/assets/building-with-agents.md.FZXrY8Nk.lean.js +0 -1
- package/dist/docs/assets/changelog.md.BvHRIiMH.js +0 -1
- package/dist/docs/assets/changelog.md.BvHRIiMH.lean.js +0 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.BoDEJQWv.js +0 -1
- package/dist/docs/assets/chunks/channel.D2BTz0L-.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DqByliAC.js +0 -1
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DqByliAC.js +0 -1
- package/dist/docs/assets/chunks/clone.CldT1lbQ.js +0 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.Bb4oMe0P.js +0 -1
- package/dist/docs/assets/deployment.md.3MMWuPeV.js +0 -31
- package/dist/docs/assets/deployment.md.3MMWuPeV.lean.js +0 -1
- package/dist/docs/assets/guides_agent-to-agent.md.CwL5cwuE.lean.js +0 -1
- package/dist/docs/assets/guides_cloud-agents.md.BzbzcOyj.js +0 -9
- package/dist/docs/assets/guides_cloud-agents.md.BzbzcOyj.lean.js +0 -1
- package/dist/docs/assets/guides_convert-automation.md.DMEX9nF-.lean.js +0 -1
- package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.js +0 -55
- package/dist/docs/assets/guides_export-grokbot.md.qo5bxi4h.lean.js +0 -1
- package/dist/docs/assets/guides_grokbot-agents.md.BwAykJ7U.js +0 -15
- package/dist/docs/assets/guides_migrate.md.CQlGaBKX.js +0 -7
- package/dist/docs/assets/guides_migrate.md.CQlGaBKX.lean.js +0 -1
- package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.js +0 -37
- package/dist/docs/assets/guides_opentelemetry.md.D4wO7_8v.lean.js +0 -1
- package/dist/docs/assets/index.md.CAnsLl8D.js +0 -27
- package/dist/docs/assets/index.md.CAnsLl8D.lean.js +0 -1
- package/dist/docs/assets/quickstart.md.D8JDfkKO.lean.js +0 -1
- package/dist/docs/assets/reference_channels.md.CNNIS6K7.js +0 -22
- package/dist/docs/assets/reference_cli.md.1o_TqKdt.js +0 -103
- package/dist/docs/assets/reference_cli.md.1o_TqKdt.lean.js +0 -1
- package/dist/docs/assets/reference_memory.md.BwyJXYZe.js +0 -4
- package/dist/docs/assets/reference_playground.md.q4MI-0td.js +0 -1
- package/dist/docs/assets/templates_grokbot-agents.md.DgpPEs7B.js +0 -5
- package/dist/docs/assets/templates_grokbot-agents.md.DgpPEs7B.lean.js +0 -1
- package/dist/docs/assets/templates_security-reviewer.md.Gh6EF9Us.js +0 -3
- package/dist/docs/assets/templates_thermo-quality-review.md.B77UyTrX.js +0 -3
- package/dist/docs/assets/templates_thermo-review.md.DRJ7mC5U.js +0 -3
- package/dist/docs/assets/troubleshooting.md.DFnoTDlQ.js +0 -1
- package/dist/docs/guides/export-grokbot.html +0 -114
- package/dist/docs/guides/export-grokbot.md +0 -239
- package/dist/docs/templates/grokbot-agents.html +0 -64
- package/dist/docs/templates/grokbot-agents.md +0 -55
- package/dist/internal/cli-init-grokbot.d.ts +0 -29
- package/dist/internal/cli-init-grokbot.d.ts.map +0 -1
- package/dist/internal/cli-init-grokbot.js +0 -181
- package/dist/internal/convert-grokbot/answers.d.ts +0 -127
- package/dist/internal/convert-grokbot/answers.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/answers.js +0 -445
- package/dist/internal/convert-grokbot/bot.d.ts +0 -50
- package/dist/internal/convert-grokbot/bot.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/bot.js +0 -72
- package/dist/internal/convert-grokbot/checks.d.ts +0 -26
- package/dist/internal/convert-grokbot/checks.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/checks.js +0 -170
- package/dist/internal/convert-grokbot/convert.d.ts +0 -60
- package/dist/internal/convert-grokbot/convert.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/convert.js +0 -470
- package/dist/internal/convert-grokbot/handoff.d.ts +0 -44
- package/dist/internal/convert-grokbot/handoff.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/handoff.js +0 -160
- package/dist/internal/convert-grokbot/recipe.d.ts +0 -61
- package/dist/internal/convert-grokbot/recipe.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/recipe.js +0 -94
- package/dist/internal/convert-grokbot/routine.d.ts +0 -51
- package/dist/internal/convert-grokbot/routine.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/routine.js +0 -128
- package/dist/internal/convert-grokbot/slack.d.ts +0 -28
- package/dist/internal/convert-grokbot/slack.d.ts.map +0 -1
- package/dist/internal/convert-grokbot/slack.js +0 -50
- package/dist/internal/factory-resource-channel.d.ts.map +0 -1
- package/dist/internal/legacy-command-guard.d.ts +0 -24
- package/dist/internal/legacy-command-guard.d.ts.map +0 -1
- package/dist/internal/legacy-command-guard.js +0 -47
- package/dist/internal/runtime-dispatch-runner.d.ts +0 -25
- package/dist/internal/runtime-dispatch-runner.d.ts.map +0 -1
- package/dist/internal/runtime-dispatch-runner.js +0 -35
- package/dist/internal/testing/factory-resource-fixtures.d.ts +0 -64
- package/dist/internal/testing/factory-resource-fixtures.d.ts.map +0 -1
- package/dist/internal/testing/factory-resource-fixtures.js +0 -55
- package/dist/playground/assets/cursor-icons-16-DfKNljMZ.woff2 +0 -0
- package/dist/playground/assets/index-B3_YohwW.js +0 -62
- package/dist/playground/assets/index-Cn3-adsJ.css +0 -1
- package/docs/guides/export-grokbot.md +0 -244
- package/docs/templates/grokbot-agents.md +0 -60
- package/schemas/grokbot-answers.schema.json +0 -354
- package/templates/grokbot-agents/README.md +0 -27
- package/templates/grokbot-agents/bot/agent.ts +0 -6
- package/templates/grokbot-agents/bot/extensions/grokbot.ts +0 -5
- package/templates/grokbot-agents/bot/instructions.md +0 -7
- package/templates/grokbot-agents/evals/evals.config.ts +0 -5
- package/templates/grokbot-agents/evals/grokbot-agents.eval.ts +0 -18
- package/templates/grokbot-agents/init.json +0 -18
- package/templates/grokbot-agents/package.json +0 -17
- package/templates/grokbot-agents/tsconfig.json +0 -12
- /package/dist/docs/assets/{evals.md.CHR34K1Y.lean.js → evals.md.OjKb7tNA.lean.js} +0 -0
- /package/dist/docs/assets/{guides_bitbucket.md.CKUayYtD.lean.js → guides_bitbucket.md.DkjkBRU8.lean.js} +0 -0
- /package/dist/docs/assets/{guides_gitlab.md.CtNI4fSH.lean.js → guides_gitlab.md.DCE0p7_w.lean.js} +0 -0
- /package/dist/docs/assets/{guides_jev.md.D7XH4JH3.lean.js → guides_jev.md.Ccw4pedT.lean.js} +0 -0
- /package/dist/docs/assets/{guides_pagerduty.md.BHXMcMtx.lean.js → guides_pagerduty.md.mnKXe9U0.lean.js} +0 -0
- /package/dist/docs/assets/{hillclimbing.md.Dxvd-0gT.lean.js → hillclimbing.md.By61f3uq.lean.js} +0 -0
- /package/dist/docs/assets/{reference_artifacts.md.DLV9MZES.lean.js → reference_artifacts.md.C-hKR2hp.lean.js} +0 -0
- /package/dist/docs/assets/{reference_connections.md.BJE2Zllp.lean.js → reference_connections.md.BoAotr7_.lean.js} +0 -0
- /package/dist/docs/assets/{reference_evals.md.Ccwp4x3o.lean.js → reference_evals.md.DYKjGFi-.lean.js} +0 -0
- /package/dist/docs/assets/{reference_hooks.md.CROr0QgC.lean.js → reference_hooks.md.B-bwJuiG.lean.js} +0 -0
- /package/dist/docs/assets/{reference_http-api.md.Dji-DD_Z.lean.js → reference_http-api.md._RWELr3d.lean.js} +0 -0
- /package/dist/docs/assets/{reference_instructions.md.BYMVxAkw.lean.js → reference_instructions.md.yL2hXLnl.lean.js} +0 -0
- /package/dist/docs/assets/{reference_memory.md.BwyJXYZe.lean.js → reference_memory.md.Dd7cyV9V.lean.js} +0 -0
- /package/dist/docs/assets/{reference_playground.md.q4MI-0td.lean.js → reference_playground.md.CQiJk9CM.lean.js} +0 -0
- /package/dist/docs/assets/{reference_project-layout.md.mFcS8yDD.lean.js → reference_project-layout.md.BamcPDUn.lean.js} +0 -0
- /package/dist/docs/assets/{reference_prompt.md.DqPh71XN.lean.js → reference_prompt.md.BMjm1Jp3.lean.js} +0 -0
- /package/dist/docs/assets/{reference_schedules.md.BqWnJES4.lean.js → reference_schedules.md.RC47aFm4.lean.js} +0 -0
- /package/dist/docs/assets/{reference_sessions.md.Bi6lHttM.lean.js → reference_sessions.md.C7KFhWXV.lean.js} +0 -0
- /package/dist/docs/assets/{reference_subagents.md.ChNGh6HK.lean.js → reference_subagents.md.CAhvW4yS.lean.js} +0 -0
- /package/dist/docs/assets/{templates_agentic-owners.md.CTEnR0jp.lean.js → templates_agentic-owners.md.Dh2nDSqg.lean.js} +0 -0
- /package/dist/docs/assets/{templates_security-reviewer.md.Gh6EF9Us.lean.js → templates_security-reviewer.md.DnwXdnB5.lean.js} +0 -0
- /package/dist/docs/assets/{templates_triage.md.CNN6b0JZ.lean.js → templates_triage.md.BYWMloV4.lean.js} +0 -0
- /package/dist/docs/assets/{troubleshooting.md.DFnoTDlQ.lean.js → troubleshooting.md.AGJ3jDzj.lean.js} +0 -0
package/dist/bin/agent-serve.js
CHANGED
|
@@ -1,1640 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* agent-sdk dev [path] [--port 3000] [--host 127.0.0.1]
|
|
7
|
-
* agent-sdk docs [--port 0] [--host 127.0.0.1] [--print]
|
|
8
|
-
* agent-sdk chat [--url http://127.0.0.1:3000] [--message "..."] [--json]
|
|
9
|
-
* agent-sdk resume [sessionId] [--url | --prod] [--message "..."]
|
|
10
|
-
* agent-sdk run [--dir .] [--message "..."] [--json|--text]
|
|
11
|
-
* agent-sdk trajectory --events <file.ndjson>
|
|
12
|
-
* agent-sdk init [dir] [--json]
|
|
13
|
-
* agent-sdk convert-automation <url> [--dir <path>] [--json]
|
|
14
|
-
* agent-sdk migrate [--dir .] [--no-wait] [--json]
|
|
15
|
-
* agent-sdk eval [--dir .] [evalId...]
|
|
16
|
-
* agent-sdk validate [--dir .] [--json]
|
|
17
|
-
* agent-sdk slack <subcommand>
|
|
3
|
+
* The `bdk` CLI entry point. Every command is declared once in
|
|
4
|
+
* `internal/cli/commands/`, which also produces `--help` and
|
|
5
|
+
* `bdk help --json`. Run `bdk` for the command index.
|
|
18
6
|
*/
|
|
19
|
-
import { spawn } from "node:child_process";
|
|
20
|
-
import { readFile } from "node:fs/promises";
|
|
21
|
-
import { resolve } from "node:path";
|
|
22
|
-
import { parseArgs } from "node:util";
|
|
23
|
-
import { serve } from "../index.js";
|
|
24
7
|
import { registerAuthoredModuleLoaders } from "../internal/authored-loaders.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { CLI_COMMAND_NAME as CLI, formatCliVersion, PACKAGE_NAME, packageVersion, } from "../internal/distribution.js";
|
|
31
|
-
import { initFlagConflict } from "../internal/init-project.js";
|
|
32
|
-
import { v2HostedVerifyHint } from "../internal/legacy-command-guard.js";
|
|
33
|
-
import { loadAgentLocalEnv } from "../internal/local-env.js";
|
|
34
|
-
import { ENTER_RESTART_EXIT_CODE, isServeRestartWorker, runEnterRestartSupervisor, } from "../internal/serve-restart.js";
|
|
8
|
+
import { COMMANDS } from "../internal/cli/commands/index.js";
|
|
9
|
+
import { isHelpRequest, runCli } from "../internal/cli/dispatch.js";
|
|
10
|
+
import { askOnTty, writeStdout } from "../internal/cli/io.js";
|
|
11
|
+
import { formatCliVersion } from "../internal/distribution.js";
|
|
12
|
+
import { isServeRestartWorker } from "../internal/serve-restart.js";
|
|
35
13
|
import { flushSessionRunFatal } from "../internal/session-run-log.js";
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
Usage:
|
|
41
|
-
${CLI} serve [--dir <path>] [--port <n>] [--host <host>] [--dev]
|
|
42
|
-
[--mode single|multi] [--api-key <key>] [--no-schedules]
|
|
43
|
-
[--public-url <url>]
|
|
44
|
-
[--cursor-events --repo <owner/name>]...
|
|
45
|
-
${CLI} dev [path] [--port <n>] [--host <host>] …
|
|
46
|
-
Same flags as serve; implies --dev. Path defaults to
|
|
47
|
-
the current directory (or pass --dir).
|
|
48
|
-
${CLI} chat [--url <baseUrl> | --prod] [--message <text>] [--json] [--text]
|
|
49
|
-
[--session <id> | --resume] [--continuation-token <t>]
|
|
50
|
-
[--slug <slug>] [--team <id>]
|
|
51
|
-
${CLI} resume [sessionId] [--url <baseUrl> | --prod] [--message <text>]
|
|
52
|
-
[--json] [--text] [--continuation-token <t>]
|
|
53
|
-
[--slug <slug>] [--team <id>]
|
|
54
|
-
${CLI} logs [<ses_>] [--url <baseUrl> | --prod] [--session <ses_>]
|
|
55
|
-
[--once] [--json] [--slug <slug>] [--team <id>]
|
|
56
|
-
[--dir <path>]
|
|
57
|
-
${CLI} sessions [--url <baseUrl> | --prod] [--json]
|
|
58
|
-
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
59
|
-
v2: unsupported. ${v2HostedVerifyHint()}
|
|
60
|
-
${CLI} session <sessionId> [--url <baseUrl> | --prod]
|
|
61
|
-
[--json | --text | --events] [--out <file.ndjson>]
|
|
62
|
-
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
63
|
-
or: --prod [<sessionId>] --slug <slug> --message "…" [--dry-run] [--as-of <instant>]
|
|
64
|
-
${CLI} cost [sessionId] [--url <baseUrl> | --prod] [--json]
|
|
65
|
-
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
66
|
-
${CLI} playground [--url <baseUrl> | --prod] [--session <id>] [--print]
|
|
67
|
-
[--slug <slug>] [--team <id>] [--dir <path>]
|
|
68
|
-
${CLI} docs [--port <n>] [--host <host>] [--print]
|
|
69
|
-
${CLI} run [--dir <path>] [--message <text>]... [--url <baseUrl> | --prod]
|
|
70
|
-
[--session <id>] [--continuation-token <t>]
|
|
71
|
-
[--events <file.ndjson>] [--no-events] [--text]
|
|
72
|
-
[--timeout-ms <n>] [--no-stream] [--slug <slug>] [--team <id>]
|
|
73
|
-
[--dry-run] [--as-of <instant>]
|
|
74
|
-
${CLI} trajectory --events <file.ndjson> [--text]
|
|
75
|
-
${CLI} call <tool> [--input <json>] [--dir <path> | --url <baseUrl> | --prod]
|
|
76
|
-
[--session <id>] [--slug <slug>] [--team <id>]
|
|
77
|
-
v2: unsupported. ${v2HostedVerifyHint()}
|
|
78
|
-
${CLI} skill <name> [--dir <path> | --url <baseUrl> | --prod]
|
|
79
|
-
[--slug <slug>] [--team <id>] [--text]
|
|
80
|
-
${CLI} init [dir] [--template <name>] [--var id=value]... [--json]
|
|
81
|
-
${CLI} init [dir] --from-grokbot <recipe.json> [--answers <file>]
|
|
82
|
-
[--dry-run] [--json]
|
|
83
|
-
${CLI} convert-automation <url> [--dir <path>] [--json]
|
|
84
|
-
${CLI} migrate [--dir <path>] [--repo <url>] [--ref <ref>] [--path <agentPath>]
|
|
85
|
-
[--no-wait] [--json]
|
|
86
|
-
${CLI} install-skills [--print] [--json]
|
|
87
|
-
${CLI} mcp --prod [--slug <slug>] [--team <id>] [--dir <path>]
|
|
88
|
-
| --url <baseUrl> [--bearer-token <t>]
|
|
89
|
-
${CLI} mcp install [--name <serverName>] [--print] [--json]
|
|
90
|
-
(same target flags as mcp)
|
|
91
|
-
${CLI} mcp oauth <connection> [--dir <path>] [--store] [--slug <slug>]
|
|
92
|
-
${CLI} eval [--dir <path>] [evalId...] [--list] [--json]
|
|
93
|
-
[--tag <tag>]... [--verbose] [--timeout-ms <n>]
|
|
94
|
-
[--strict] [--max-concurrency <n>]
|
|
95
|
-
[--junit <path>] [--artifacts <dir>|--no-artifacts]
|
|
96
|
-
[--out <file.json>]
|
|
97
|
-
[--skip-report] [--no-stream] [--no-wait]
|
|
98
|
-
[--url <baseUrl>] [--slug <slug>]
|
|
99
|
-
${CLI} eval status [runId] --url <baseUrl> [--dir <path>] [--json]
|
|
100
|
-
[--out <file.json>]
|
|
101
|
-
${CLI} eval cancel <runId> --url <baseUrl> [--dir <path>] [--json]
|
|
102
|
-
${CLI} info [--dir <path>] [--json]
|
|
103
|
-
${CLI} validate [--dir <path>] [--json]
|
|
104
|
-
${CLI} login [--api-key <key>] [--key-name <name>]
|
|
105
|
-
${CLI} logout
|
|
106
|
-
${CLI} whoami [--json]
|
|
107
|
-
${CLI} update
|
|
108
|
-
${CLI} version [--json]
|
|
109
|
-
${CLI} deploy [--dir <path>] [--slug <slug> | --all] [--team <id>] [--json]
|
|
110
|
-
[--no-wait] [--repo <url>] [--ref <ref>]
|
|
111
|
-
[--path <agentPath>] [--cursor-events-repo <repo>]...
|
|
112
|
-
[--allow-domain <domain>]...
|
|
113
|
-
${CLI} manifest [--dir <path>] [--json]
|
|
114
|
-
${CLI} deployments [--team <id>] [--json]
|
|
115
|
-
${CLI} deployment <slug> [--team <id>] [--json]
|
|
116
|
-
${CLI} stop <slug> [--team <id>] [--json] [--no-wait] [--cancel-runs]
|
|
117
|
-
${CLI} start <slug> [--team <id>] [--json]
|
|
118
|
-
${CLI} kill <slug> [--team <id>] [--json]
|
|
119
|
-
${CLI} unlock-deploys <slug> [--team <id>] [--json]
|
|
120
|
-
${CLI} cancel-runs <slug> [--team <id>] [--json]
|
|
121
|
-
${CLI} event-repos <slug> [--repo <owner/name>]... [--team <id>] [--json]
|
|
122
|
-
${CLI} upgrade <slug> [--release <id|version>] [--team <id>] [--json]
|
|
123
|
-
${CLI} rollback <slug> [--release <id|version>] [--team <id>] [--json]
|
|
124
|
-
${CLI} delete <slug> [--team <id>] [--json] [--no-wait]
|
|
125
|
-
${CLI} rotate-token <slug> [--team <id>]
|
|
126
|
-
${CLI} secrets set <slug> NAME... | list <slug> | unset <slug> NAME
|
|
127
|
-
[--team <id>] [--json] [--from-argv]
|
|
128
|
-
${CLI} slack <subcommand> …
|
|
129
|
-
${CLI} github <subcommand> …
|
|
130
|
-
|
|
131
|
-
Commands:
|
|
132
|
-
serve Serve agents under /<slug>/... (index at /). Runs \`${CLI} login\`
|
|
133
|
-
when unsigned. On a TTY, press Enter to restart (re-executes this
|
|
134
|
-
process so agent code, evals, and Vite reload).
|
|
135
|
-
dev Local development: same as \`${CLI} serve --dev\` (manual
|
|
136
|
-
schedule/reminder dispatch, unsigned GitHub loopback, Vite HMR).
|
|
137
|
-
Also runs \`${CLI} login\` when unsigned.
|
|
138
|
-
chat Interactive REPL against a running server (follow-ups keep the
|
|
139
|
-
session + continuation token). Optional --message seeds the first
|
|
140
|
-
turn then stays open on a TTY. --session reattaches (looks up the
|
|
141
|
-
continuation token via /v1/sessions when omitted) and replays the
|
|
142
|
-
transcript. --resume reattaches the most recently updated
|
|
143
|
-
followable session (no id needed). --json is one-shot. Pass
|
|
144
|
-
--prod to hit the team's hosted deployment (slug from --slug or
|
|
145
|
-
the directory name).
|
|
146
|
-
resume Reattach chat to a session (same as \`${CLI} chat --session <id>\`
|
|
147
|
-
or \`${CLI} chat --resume\` with no id). Omit the session id to
|
|
148
|
-
resume the previous followable session from /v1/sessions. Looks
|
|
149
|
-
up the continuation token via /v1/sessions when
|
|
150
|
-
--continuation-token is omitted, then replays the transcript.
|
|
151
|
-
Pass --prod for a hosted deployment.
|
|
152
|
-
logs Tail agent logs. Default follows (Ctrl-C to stop); --once dumps
|
|
153
|
-
the current buffer. Without --prod, tails the local server (or
|
|
154
|
-
--url). On a v1 deployment, --prod shows deploy progress until
|
|
155
|
-
the deployment is running, then tails runtime logs. On
|
|
156
|
-
architecture v2, --prod tails the output of the deployment's
|
|
157
|
-
most recent sessions, each under a ==> ses_… <== header; pass a
|
|
158
|
-
session id (positional or --session) to tail only that session.
|
|
159
|
-
sessions List sessions on a running agent or a v1 --prod deployment.
|
|
160
|
-
Unsupported on architecture v2. ${v2HostedVerifyHint()}
|
|
161
|
-
session Show one session. On v2: \`${CLI} session <ses_> --prod --slug <slug>\`.
|
|
162
|
-
Default: text trajectory. --json for trajectory
|
|
163
|
-
JSON; --events for the raw event list. To continue interactively,
|
|
164
|
-
use \`${CLI} resume [id]\`.
|
|
165
|
-
cost Pull cost metrics. With a session id: per-turn token usage and
|
|
166
|
-
estimated cost for that session. Without one: one row per
|
|
167
|
-
session plus a total. Costs are the engine's recorded estimates
|
|
168
|
-
from turn.completed events; --json for machine-readable reports.
|
|
169
|
-
playground Open the web playground. --prod opens the v1 hosted alias or
|
|
170
|
-
v2 portal UI; --session deep-links a session. --print skips
|
|
171
|
-
opening a browser. Ctrl-C stops local credential proxies.
|
|
172
|
-
docs Serve the shipped documentation site on loopback and open it
|
|
173
|
-
(also: npx @cursor/bdk docs). No agent project required.
|
|
174
|
-
--print skips opening a browser. Ctrl-C stops the server.
|
|
175
|
-
run One-shot create→test loop: ephemeral server + JSON trajectory.
|
|
176
|
-
Writes a single events.ndjson trace (summarize with trajectory).
|
|
177
|
-
Streams tool calls and reply text to stderr when stderr is a TTY.
|
|
178
|
-
Pass --prod to hit the hosted deployment instead of a local server.
|
|
179
|
-
On an AgentSDK v2 slug, --prod starts a hosted session through
|
|
180
|
-
the control plane (Temporal, no resident engine). ${v2HostedVerifyHint()}
|
|
181
|
-
--session ses_… resumes that exact session. A 404 falls back to the v1
|
|
182
|
-
engine alias.
|
|
183
|
-
trajectory Summarize an events.ndjson file into a trajectory.
|
|
184
|
-
call Call an authored server tool deterministically (no model turn)
|
|
185
|
-
via POST /v1/tools/:toolName. --session runs it inside an
|
|
186
|
-
existing session and records it on that session's event stream.
|
|
187
|
-
Unsupported on architecture v2. ${v2HostedVerifyHint()}
|
|
188
|
-
skill Read an authored skill deterministically (no model turn)
|
|
189
|
-
via GET /v1/skills/:skillName. --text prints SKILL.md.
|
|
190
|
-
init Scaffold a project (skipping existing files), npm install,
|
|
191
|
-
run login when unsigned, then print next steps. Templates
|
|
192
|
-
with init.json interview on a TTY; --var answers without a
|
|
193
|
-
prompt. With --json or off a TTY, each question without a
|
|
194
|
-
default needs --var. --json is machine-readable and never
|
|
195
|
-
blocks on login. No directory: print the setup guide.
|
|
196
|
-
--from-grokbot converts a Grok Bot recipe instead: it asks
|
|
197
|
-
the export questions on a TTY or reads them from --answers
|
|
198
|
-
(schema: schemas/grokbot-answers.schema.json), writes the
|
|
199
|
-
project with SECRETS.md, a finish-the-export skill, and
|
|
200
|
-
SLACK.md for Slack bots, and installs npm dependencies. The
|
|
201
|
-
directory defaults to the answers' location. --dry-run
|
|
202
|
-
prints the preview and writes nothing.
|
|
203
|
-
convert-automation
|
|
204
|
-
Export a Cursor Automation into an agentsdk project. <url> is
|
|
205
|
-
the dashboard URL (…/automations/<uuid> or
|
|
206
|
-
…/custom-agents/<uuid>) or a bare uuid. Fetches the definition
|
|
207
|
-
with your Cursor credentials, writes the converted files into
|
|
208
|
-
--dir (default ./<automation-name>), fills in the init scaffold
|
|
209
|
-
around them (existing files are kept), and installs npm
|
|
210
|
-
dependencies. MCP servers convert to Cursor-account connections
|
|
211
|
-
resolved at runtime (manage authorization in Cursor, dashboard
|
|
212
|
-
-> MCP). Review the project, then run \`validate\` / \`dev\`.
|
|
213
|
-
Warnings never fail the command.
|
|
214
|
-
migrate Early-alpha projects only: start a Cursor cloud agent that
|
|
215
|
-
moves the project from hosted architecture v1 to v2 with the
|
|
216
|
-
bdk-migrate-v2 skill and opens a pull request. Reads the
|
|
217
|
-
pushed ref; --repo/--ref/--path are inferred like deploy.
|
|
218
|
-
Waits for the pull request unless --no-wait. Never deploys.
|
|
219
|
-
install-skills
|
|
220
|
-
Refresh the BDK skills for coding agents in
|
|
221
|
-
~/.cursor/skills/bdk and print where they landed.
|
|
222
|
-
Installed copies set alwaysApply so Cursor injects them
|
|
223
|
-
into context. \`npm install\` / \`npx\` already copies them
|
|
224
|
-
(postinstall); this command overwrites with the package
|
|
225
|
-
version without asking. \`init\` also offers a TTY refresh.
|
|
226
|
-
--print previews without writing.
|
|
227
|
-
mcp Serve this agent's MCP endpoint over stdio for MCP clients
|
|
228
|
-
that spawn local servers (e.g. Cursor). Proxies
|
|
229
|
-
newline-delimited JSON-RPC to <target>/v1/mcp. --prod resolves
|
|
230
|
-
the hosted deployment with the signed-in Cursor account and
|
|
231
|
-
re-mints short-lived engine credentials as they expire;
|
|
232
|
-
--url targets a running server. stdout is reserved for the
|
|
233
|
-
MCP wire. \`mcp install\` writes the matching entry into
|
|
234
|
-
~/.cursor/mcp.json (--print to preview; --name to override
|
|
235
|
-
the server name). \`mcp oauth <connection>\` runs host PKCE
|
|
236
|
-
for defineConnection({ url, oauth: true }); \`--store\` upserts
|
|
237
|
-
MCP_OAUTH_<NAME>_* secrets on the hosted deployment.
|
|
238
|
-
eval Run filesystem evals under evals/**/*.eval.ts (streams on a TTY).
|
|
239
|
-
Default: ephemeral local harness against evals on disk. Pass
|
|
240
|
-
--url to kick off the batch on a running server via
|
|
241
|
-
/v1/dev/evals/runs so results appear in the playground and
|
|
242
|
-
persist when the agent declares an evals storage table. With
|
|
243
|
-
--url, prints an Eval ID as soon as the batch is accepted (also
|
|
244
|
-
with --no-wait). Check later with
|
|
245
|
-
\`${CLI} eval status <evalId> --url <baseUrl>\` (omit id to list
|
|
246
|
-
recent runs; exit 3 while still running) or cancel with
|
|
247
|
-
\`${CLI} eval cancel <evalId> --url <baseUrl>\`. The
|
|
248
|
-
status/cancel subcommands only bind when --url is set, so an
|
|
249
|
-
eval id named status/cancel still runs locally. eval does not
|
|
250
|
-
accept --prod. Pass evalId args to
|
|
251
|
-
select: one datapoint (weather/nyc), a whole file (weather → all
|
|
252
|
-
cases in that file), several of either, or omit to run all.
|
|
253
|
-
info Print the discovered agent surface (tools, skills, channels, ...).
|
|
254
|
-
validate Check the project(s) and exit non-zero on error diagnostics.
|
|
255
|
-
login Sign the host in to Cursor: browser sign-in mints a named,
|
|
256
|
-
dashboard-revocable API key (only the key is stored). It powers
|
|
257
|
-
inference and cursorAccount MCP connections.
|
|
258
|
-
logout Remove the stored Cursor credentials.
|
|
259
|
-
whoami Show which Cursor account powers this host (and why).
|
|
260
|
-
update Upgrade this install to the latest published version (detects
|
|
261
|
-
global npm/pnpm/yarn/bun installs and project dependencies).
|
|
262
|
-
version Print the ${PACKAGE_NAME} version this CLI will use and exit
|
|
263
|
-
(also --version / -V). Text is the version number; --json
|
|
264
|
-
prints { name, version, cli }.
|
|
265
|
-
deploy Deploy onto Cursor's managed agent-serve hosting, then wait for
|
|
266
|
-
the engine to come up. --repo/--ref/--path stay available;
|
|
267
|
-
inside an agent git checkout they are inferred when omitted
|
|
268
|
-
(flags always win). When --dir is a multi-agent parent,
|
|
269
|
-
pick one interactively, or pass --slug / --all. First deploy
|
|
270
|
-
of a slug prints the alias token exactly once — save it.
|
|
271
|
-
deployments List the team's deployments (slug, status, generation, kind).
|
|
272
|
-
deployment Show one deployment in full (status, lastError, engine info).
|
|
273
|
-
stop Stop every install of a slug and wait until it reports
|
|
274
|
-
stopped. Does not lock deploys or flip tenant enabled.
|
|
275
|
-
start Resume every enabled install of a slug. Does not unlock
|
|
276
|
-
deploys; run unlock-deploys first after kill.
|
|
277
|
-
kill Emergency stop: lock deploys, stop every install, cancel
|
|
278
|
-
runs and reminder clocks.
|
|
279
|
-
unlock-deploys Allow deploy/upgrade again after kill. Does not resume
|
|
280
|
-
traffic; start after unlock.
|
|
281
|
-
cancel-runs Request cancellation for active Agent SDK v2 session runs
|
|
282
|
-
and reminder clocks, and mark factory creating/active
|
|
283
|
-
sessions failed. For a multi-tenant application this
|
|
284
|
-
cancels every install, not just the caller's.
|
|
285
|
-
Install-local cancel is stop --cancel-runs.
|
|
286
|
-
event-repos Set the repositories a multi-tenant install receives events
|
|
287
|
-
for. A deploy cannot carry these; pass every repository you
|
|
288
|
-
want, since the list is replaced rather than merged.
|
|
289
|
-
upgrade Move this team's install onto a release, the newest ready one
|
|
290
|
-
by default. Deploying a multi-tenant application publishes a
|
|
291
|
-
release without moving any tenant onto it.
|
|
292
|
-
rollback Move this team's install onto an earlier ready release, the
|
|
293
|
-
nearest one by default. Does not publish a release. Pass
|
|
294
|
-
--release to choose an older id or version.
|
|
295
|
-
delete Delete a deployment (teardown + purge the record) and wait
|
|
296
|
-
until GET 404s. The slug is then free to redeploy.
|
|
297
|
-
rotate-token Mint a new alias token for a deployment (shown once); the old
|
|
298
|
-
token stops working immediately.
|
|
299
|
-
secrets Manage deployment secrets: set (names only by default: hidden
|
|
300
|
-
prompt or piped stdin; NAME=VALUE requires --from-argv), list
|
|
301
|
-
(names + createdAt; never values), unset.
|
|
302
|
-
images Container images for persistent agents: push <local-image>
|
|
303
|
-
--name <name> (docker save, upload), list, rm <name>.
|
|
304
|
-
slack Slack channel pack: create/destroy/icon (dashboard wizard),
|
|
305
|
-
doctor (see slack help).
|
|
306
|
-
github GitHub webhook pack: forward live deliveries, events, doctor
|
|
307
|
-
(wraps \`gh webhook forward\`; see github help).
|
|
308
|
-
gitlab GitLab webhook pack: replay a merge request, events, forward
|
|
309
|
-
recipe (see gitlab help).
|
|
310
|
-
bitbucket Bitbucket webhook pack (Cloud + Data Center): replay a pull
|
|
311
|
-
request, events, forward recipe (see bitbucket help).
|
|
312
|
-
pagerduty PagerDuty webhook pack: replay synthesized incident events,
|
|
313
|
-
events (see pagerduty help).
|
|
314
|
-
|
|
315
|
-
Agent loop:
|
|
316
|
-
${CLI} validate --dir .
|
|
317
|
-
${CLI} info --dir . --json
|
|
318
|
-
${CLI} run --dir . --message "..."
|
|
319
|
-
${CLI} eval --dir .
|
|
320
|
-
${CLI} dev .
|
|
321
|
-
|
|
322
|
-
Options:
|
|
323
|
-
--version, -V Print the version number and exit.
|
|
324
|
-
--dir Project root (defaults to the current directory).
|
|
325
|
-
--port Port to listen on (default 3000). When the default is
|
|
326
|
-
taken, serve tries the next free port and prints a notice.
|
|
327
|
-
An explicit --port fails with a next-port hint instead.
|
|
328
|
-
--host Host to bind (default 127.0.0.1).
|
|
329
|
-
--mode serve: "multi" (default, slugged /<dir>/v1/*) or "single"
|
|
330
|
-
(unslugged /v1/*). Multi also exposes host /v1/health for
|
|
331
|
-
ALB/ECS checks; use single when one agent is the whole host.
|
|
332
|
-
--dev Dev mode: mounts POST /v1/dev/schedules/:scheduleId and
|
|
333
|
-
disables the cron runner (dispatch schedules by hand).
|
|
334
|
-
--api-key Cursor API key (defaults to CURSOR_API_KEY, then
|
|
335
|
-
CURSOR_API_KEY_FILE — hosted default
|
|
336
|
-
/run/cursor/secrets/CURSOR_API_KEY when unset —
|
|
337
|
-
then CURSOR_SERVICE_ACCOUNT_KEY, then the stored
|
|
338
|
-
\`${CLI} login\` credential).
|
|
339
|
-
--key-name login: label for the minted API key (defaults to
|
|
340
|
-
"${CLI} (<hostname>)").
|
|
341
|
-
--state-root Durable state directory (default <dir>/.agent-serve). Put it
|
|
342
|
-
outside any repository whose rules should not reach the agent.
|
|
343
|
-
--bearer-token serve: require this bearer token on API routes. chat/run/eval:
|
|
344
|
-
send it as the Authorization bearer.
|
|
345
|
-
--allow-anonymous serve: admit all HTTP callers (allowAll). For demos behind a
|
|
346
|
-
trusted network only; mutually exclusive with --bearer-token.
|
|
347
|
-
--allow-anonymous-cursor-github
|
|
348
|
-
serve: allow --allow-anonymous together with
|
|
349
|
-
githubChannel({ cursorAccount }). Admitted callers can drive
|
|
350
|
-
sessions holding the account's repo-scoped GitHub credential,
|
|
351
|
-
so use only behind a trusted boundary (e.g. an SSO proxy).
|
|
352
|
-
--allow-anonymous-grokbot
|
|
353
|
-
serve: allow --allow-anonymous together with a
|
|
354
|
-
runtime: "grokbot" mount. Admitted callers can drive turns
|
|
355
|
-
on the signed-in account's hosted Grok Bot computer, so use
|
|
356
|
-
only behind a trusted boundary (e.g. an SSO proxy).
|
|
357
|
-
--allow-anonymous-cursor-account-mcp
|
|
358
|
-
serve: allow --allow-anonymous together with
|
|
359
|
-
defineConnection({ cursorAccount: true }). Admitted callers
|
|
360
|
-
can drive the account's MCP connectors, so use only behind
|
|
361
|
-
a trusted boundary (e.g. an SSO proxy or hosted alias token).
|
|
362
|
-
--cursor-scm-proxy serve: route every SCM channel's cursorAccount API calls
|
|
363
|
-
(githubChannel, gitlabChannel, bitbucketChannel) through
|
|
364
|
-
the Cursor backend's per-forge forwarder instead of
|
|
365
|
-
minting raw tokens into this process
|
|
366
|
-
(AGENT_SERVE_<FORGE>_PROXY_URL overrides a base URL).
|
|
367
|
-
--public-url serve: base URL where this host is reachable from outside
|
|
368
|
-
(e.g. https://agent-serve.example.com).
|
|
369
|
-
--no-schedules Disable the cron runner outside dev mode.
|
|
370
|
-
--no-control-plane serve: do not start the bundled control plane (schedule
|
|
371
|
-
and reminder clocks). Cursor hosting passes this so the
|
|
372
|
-
kit uses the Cursor backend instead.
|
|
373
|
-
--cloud-tools-url serve: Cursor hosting passes the deployment's server-tools
|
|
374
|
-
MCP URL here. Hosted install probes this help text for the
|
|
375
|
-
flag before trusting a checkout build; keep it listed.
|
|
376
|
-
--peers-url serve: Cursor hosting passes the base URL where a
|
|
377
|
-
single-agent serve reaches its peers
|
|
378
|
-
(defineConnection({ agent })) at <url>/<slug>/v1/mcp,
|
|
379
|
-
authenticated with CURSOR_API_KEY. Hosting probes this
|
|
380
|
-
help text for the flag; keep it listed.
|
|
381
|
-
--team deploy/deployments/deployment/stop/rotate-token and
|
|
382
|
-
chat/resume/run/call/logs/sessions/session/playground
|
|
383
|
-
--prod: Cursor team id. Defaults to the account's team when
|
|
384
|
-
it has one.
|
|
385
|
-
--prod chat/resume/run/call/logs/sessions/session/playground:
|
|
386
|
-
use the team's hosted deployment. Slug from --slug or the
|
|
387
|
-
--dir basename. Mutually exclusive with --url. Requires
|
|
388
|
-
\`${CLI} login\`. eval does not accept --prod.
|
|
389
|
-
v2: only run, session, logs, and playground support
|
|
390
|
-
--prod. ${v2HostedVerifyHint()}
|
|
391
|
-
--dry-run run/session --prod: mark the hosted v2 turn non-mutating.
|
|
392
|
-
${v2HostedVerifyHint()}
|
|
393
|
-
--component run/session --prod: wake this v2 component key,
|
|
394
|
-
not the application default.
|
|
395
|
-
--as-of run/session --prod: freeze the session clock at this
|
|
396
|
-
timezone-bearing ISO-8601 instant.
|
|
397
|
-
--once logs: print current progress / log buffer once and exit
|
|
398
|
-
(default is to follow).
|
|
399
|
-
--print playground/docs: print the URL only; do not open a
|
|
400
|
-
browser. install-skills: list the skills and the install
|
|
401
|
-
path without writing them.
|
|
402
|
-
--no-wait deploy/stop/eval: return right after the request is
|
|
403
|
-
accepted instead of polling until a terminal status.
|
|
404
|
-
For eval, prints the runId (--url only). migrate: print
|
|
405
|
-
the cloud agent URL and exit.
|
|
406
|
-
--cancel-runs stop: also cancel this install's active Agent SDK v2
|
|
407
|
-
session runs and reminder clocks, and mark factory
|
|
408
|
-
creating/active sessions failed (not every tenant).
|
|
409
|
-
--no-playground Disable the bundled web playground at /playground (also skips
|
|
410
|
-
auto-build / HMR).
|
|
411
|
-
--no-docs Disable the documentation site at /docs (also skips its
|
|
412
|
-
auto-build).
|
|
413
|
-
--url chat/resume/run/call/eval/logs/sessions/session/playground:
|
|
414
|
-
base URL of a running agent (skip local host). Mutually
|
|
415
|
-
exclusive with --prod.
|
|
416
|
-
--message chat/resume/run: user message (repeatable for run).
|
|
417
|
-
--input call: JSON object of tool arguments (default {}).
|
|
418
|
-
--messages-file JSON array of strings (run).
|
|
419
|
-
--session Existing session id (run/call follow-up, or chat reattach).
|
|
420
|
-
Prefer \`${CLI} resume [sessionId]\` for interactive
|
|
421
|
-
reattach. logs --prod (v2): tail only this session.
|
|
422
|
-
--resume chat: reattach the previous followable session (most
|
|
423
|
-
recently updated in /v1/sessions). Same as
|
|
424
|
-
\`${CLI} resume\` with no session id. Ignored when
|
|
425
|
-
--session is also set.
|
|
426
|
-
--continuation-token Token from a prior run/chat/resume response (optional
|
|
427
|
-
for resume / chat --session/--resume; looked up via
|
|
428
|
-
/v1/sessions when omitted).
|
|
429
|
-
--events run: write NDJSON trace to this path (default
|
|
430
|
-
<dir>/.agent-serve/traces/<sessionId>.ndjson).
|
|
431
|
-
trajectory: read this file. session: print raw
|
|
432
|
-
{ sessionId, events } JSON (boolean; no path).
|
|
433
|
-
--no-events run: do not write a trace file.
|
|
434
|
-
--slug Agent slug when --dir mounts multiple agents.
|
|
435
|
-
--timeout-ms Abort a hung turn after N milliseconds.
|
|
436
|
-
--tag eval: only run cases with this tag (repeatable).
|
|
437
|
-
--list eval: print discovered cases without running.
|
|
438
|
-
--verbose eval: stream t.log lines and reply snippets.
|
|
439
|
-
--strict eval: a missed soft threshold (SCORED) also exits 1.
|
|
440
|
-
--max-concurrency eval: override evals.config.ts maxConcurrency.
|
|
441
|
-
--junit eval: write JUnit XML here for CI annotations.
|
|
442
|
-
--artifacts eval: run-artifact directory (default a timestamped dir
|
|
443
|
-
under <dir>/.agent-serve/evals/).
|
|
444
|
-
--no-artifacts eval: do not write run artifacts.
|
|
445
|
-
--skip-report eval: ignore reporters from evals.config.ts / eval files.
|
|
446
|
-
--no-stream run/eval: silence live progress on stderr (JSON still prints).
|
|
447
|
-
--json JSON output (init/convert-automation/install-skills/
|
|
448
|
-
info/validate/chat/eval/logs/version/
|
|
449
|
-
sessions/session/github; run defaults to JSON). logs:
|
|
450
|
-
NDJSON progress/log events (v2: {sessionId, line}).
|
|
451
|
-
session: trajectory JSON
|
|
452
|
-
(not raw events).
|
|
453
|
-
--no-color chat: force plain output.
|
|
454
|
-
--cursor-events serve: pull SCM webhook events from /v0/scm-events. The
|
|
455
|
-
stream is read as your Cursor user, so serve requires
|
|
456
|
-
sign-in (\`${CLI} login\` / CURSOR_API_KEY) and --repo.
|
|
457
|
-
Offset under <state-root>/cursor-events/.
|
|
458
|
-
CURSOR_API_BASE_URL overrides.
|
|
459
|
-
--repo serve --cursor-events: repo to subscribe to (repeatable).
|
|
460
|
-
github forward: owner/repo to forward from (inferred from
|
|
461
|
-
the git remote when omitted; last wins).
|
|
462
|
-
deploy/migrate: https git repo URL (optional; inferred
|
|
463
|
-
from git remote origin when omitted).
|
|
464
|
-
--ref deploy/migrate: git ref to build or migrate (optional;
|
|
465
|
-
inferred from the current branch when omitted).
|
|
466
|
-
--path deploy/migrate: agent dir relative to repo root
|
|
467
|
-
(optional; inferred from --dir vs git toplevel when
|
|
468
|
-
omitted).
|
|
469
|
-
--all deploy: every child agent under a multi-agent --dir
|
|
470
|
-
(skips the interactive picker; mutually exclusive with
|
|
471
|
-
--slug).
|
|
472
|
-
--cursor-events-repo deploy: repo the deployed agent watches
|
|
473
|
-
(repeatable): owner/name for GitHub and Origin,
|
|
474
|
-
gitlab.com/<group>/<project>, or
|
|
475
|
-
bitbucket.org/<workspace>/<repo>.
|
|
476
|
-
--allow-domain deploy: egress domain the engine pod may reach
|
|
477
|
-
(repeatable; unioned with hosting.egressDomains from the
|
|
478
|
-
agent manifest). Repo-backed deploys only.
|
|
479
|
-
--from-argv secrets set: allow NAME=VALUE on argv (leaks into shell
|
|
480
|
-
history and agent-captured terminals). Default is names
|
|
481
|
-
only with a hidden prompt or piped stdin.
|
|
482
|
-
--org github forward: organization login (org-level hooks).
|
|
483
|
-
--channel github: select one channel id when several are declared.
|
|
484
|
-
--secret github forward: webhook signing secret (defaults to
|
|
485
|
-
GITHUB_WEBHOOK_SECRET). github: --events overrides the
|
|
486
|
-
derived webhook event list.
|
|
487
|
-
--install github: install the cli/gh-webhook extension if missing.
|
|
488
|
-
slack init --manual: require Slack CLI app install.
|
|
489
|
-
--no-install slack init --manual: skip Slack CLI app install.
|
|
490
|
-
--action github/gitlab replay: event action (e.g. opened, open).
|
|
491
|
-
--conclusion github replay: CI conclusion (check_run/suite/status).
|
|
492
|
-
gitlab replay: pipeline status (success, failed, …).
|
|
493
|
-
--comment github/gitlab/bitbucket/pagerduty replay: comment / note body.
|
|
494
|
-
--context github replay: commit-status context.
|
|
495
|
-
--dry-run github replay: print synthesized payloads, don't POST.
|
|
496
|
-
--out eval / eval status <runId>: also write the full results
|
|
497
|
-
JSON to this path. session: write the raw NDJSON trace
|
|
498
|
-
there instead of printing (same format as run --events;
|
|
499
|
-
playground-openable). github replay: write synthesized
|
|
500
|
-
payloads as fixtures.
|
|
501
|
-
`;
|
|
502
|
-
function writeStdout(text) {
|
|
503
|
-
return new Promise((resolve, reject) => {
|
|
504
|
-
process.stdout.write(text, (error) => {
|
|
505
|
-
if (error) {
|
|
506
|
-
reject(error);
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
resolve();
|
|
510
|
-
});
|
|
511
|
-
});
|
|
512
|
-
}
|
|
14
|
+
import { warnIfOutdated } from "../internal/update-check.js";
|
|
15
|
+
/** Commands that skip the update notice: `update` checks itself, and `mcp` owns stdout. */
|
|
16
|
+
const NO_UPDATE_NOTICE = new Set(["update", "mcp"]);
|
|
513
17
|
async function main(argv) {
|
|
514
|
-
const [command, ...
|
|
515
|
-
if (command ===
|
|
516
|
-
|
|
517
|
-
// after main() would otherwise truncate --help under execFile / CI.
|
|
518
|
-
await writeStdout(HELP);
|
|
519
|
-
return command === undefined ? 1 : 0;
|
|
520
|
-
}
|
|
521
|
-
if (command === "version" || command === "--version" || command === "-V") {
|
|
522
|
-
await writeStdout(formatCliVersion({ json: restIn.includes("--json") }));
|
|
523
|
-
return 0;
|
|
524
|
-
}
|
|
525
|
-
// `session --events` means "dump raw events" (boolean). Rewrite so it does
|
|
526
|
-
// not collide with run/trajectory's `--events <file.ndjson>` string flag.
|
|
527
|
-
const rest = command === "session"
|
|
528
|
-
? restIn.map((arg) => (arg === "--events" ? "--raw-events" : arg))
|
|
529
|
-
: restIn;
|
|
530
|
-
const { values, positionals } = parseArgs({
|
|
531
|
-
args: rest,
|
|
532
|
-
allowPositionals: true,
|
|
533
|
-
options: {
|
|
534
|
-
dir: { type: "string", default: "." },
|
|
535
|
-
template: { type: "string" },
|
|
536
|
-
var: { type: "string", multiple: true },
|
|
537
|
-
"from-grokbot": { type: "string" },
|
|
538
|
-
answers: { type: "string" },
|
|
539
|
-
port: { type: "string" },
|
|
540
|
-
host: { type: "string" },
|
|
541
|
-
mode: { type: "string" },
|
|
542
|
-
dev: { type: "boolean", default: false },
|
|
543
|
-
"api-key": { type: "string" },
|
|
544
|
-
"key-name": { type: "string" },
|
|
545
|
-
"state-root": { type: "string" },
|
|
546
|
-
"bearer-token": { type: "string" },
|
|
547
|
-
"allow-anonymous": { type: "boolean", default: false },
|
|
548
|
-
"allow-anonymous-cursor-github": { type: "boolean", default: false },
|
|
549
|
-
"allow-anonymous-cursor-account-mcp": { type: "boolean", default: false },
|
|
550
|
-
"allow-anonymous-grokbot": { type: "boolean", default: false },
|
|
551
|
-
"cursor-scm-proxy": { type: "boolean", default: false },
|
|
552
|
-
"no-schedules": { type: "boolean", default: false },
|
|
553
|
-
"no-control-plane": { type: "boolean", default: false },
|
|
554
|
-
"no-playground": { type: "boolean", default: false },
|
|
555
|
-
"no-docs": { type: "boolean", default: false },
|
|
556
|
-
url: { type: "string" },
|
|
557
|
-
prod: { type: "boolean", default: false },
|
|
558
|
-
message: { type: "string", multiple: true },
|
|
559
|
-
input: { type: "string" },
|
|
560
|
-
"messages-file": { type: "string" },
|
|
561
|
-
"session-id": { type: "string" },
|
|
562
|
-
session: { type: "string" },
|
|
563
|
-
resume: { type: "boolean", default: false },
|
|
564
|
-
"continuation-token": { type: "string" },
|
|
565
|
-
events: { type: "string" },
|
|
566
|
-
"no-events": { type: "boolean", default: false },
|
|
567
|
-
slug: { type: "string" },
|
|
568
|
-
"timeout-ms": { type: "string" },
|
|
569
|
-
tag: { type: "string", multiple: true },
|
|
570
|
-
list: { type: "boolean", default: false },
|
|
571
|
-
verbose: { type: "boolean", default: false },
|
|
572
|
-
text: { type: "boolean", default: false },
|
|
573
|
-
"no-color": { type: "boolean", default: false },
|
|
574
|
-
"no-stream": { type: "boolean", default: false },
|
|
575
|
-
once: { type: "boolean", default: false },
|
|
576
|
-
"raw-events": { type: "boolean", default: false },
|
|
577
|
-
json: { type: "boolean", default: false },
|
|
578
|
-
name: { type: "string" },
|
|
579
|
-
env: { type: "string" },
|
|
580
|
-
"public-url": { type: "string" },
|
|
581
|
-
"cloud-tools-url": { type: "string" },
|
|
582
|
-
"peers-url": { type: "string" },
|
|
583
|
-
"mount-path": { type: "string" },
|
|
584
|
-
"base-url": { type: "string" },
|
|
585
|
-
print: { type: "boolean", default: false },
|
|
586
|
-
store: { type: "boolean", default: false },
|
|
587
|
-
remote: { type: "boolean", default: false },
|
|
588
|
-
transport: { type: "string" },
|
|
589
|
-
prefix: { type: "string" },
|
|
590
|
-
"no-prefix": { type: "boolean", default: false },
|
|
591
|
-
"channel-posts": { type: "boolean", default: false },
|
|
592
|
-
"slack-team": { type: "string" },
|
|
593
|
-
icon: { type: "string" },
|
|
594
|
-
force: { type: "boolean", default: false },
|
|
595
|
-
manual: { type: "boolean", default: false },
|
|
596
|
-
repo: { type: "string", multiple: true },
|
|
597
|
-
org: { type: "string" },
|
|
598
|
-
"cursor-events": { type: "boolean", default: false },
|
|
599
|
-
secret: { type: "string" },
|
|
600
|
-
channel: { type: "string", multiple: true },
|
|
601
|
-
install: { type: "boolean", default: false },
|
|
602
|
-
"no-install": { type: "boolean", default: false },
|
|
603
|
-
action: { type: "string" },
|
|
604
|
-
conclusion: { type: "string" },
|
|
605
|
-
context: { type: "string" },
|
|
606
|
-
comment: { type: "string" },
|
|
607
|
-
"dry-run": { type: "boolean", default: false },
|
|
608
|
-
"as-of": { type: "string" },
|
|
609
|
-
component: { type: "string" },
|
|
610
|
-
out: { type: "string" },
|
|
611
|
-
team: { type: "string" },
|
|
612
|
-
"no-wait": { type: "boolean", default: false },
|
|
613
|
-
"cancel-runs": { type: "boolean", default: false },
|
|
614
|
-
ref: { type: "string" },
|
|
615
|
-
release: { type: "string" },
|
|
616
|
-
path: { type: "string" },
|
|
617
|
-
all: { type: "boolean", default: false },
|
|
618
|
-
"cursor-events-repo": { type: "string", multiple: true },
|
|
619
|
-
"allow-domain": { type: "string", multiple: true },
|
|
620
|
-
// Hidden Anysphere-only flag; omitted from help.
|
|
621
|
-
"multi-tenant": { type: "boolean", default: false },
|
|
622
|
-
"from-argv": { type: "boolean", default: false },
|
|
623
|
-
strict: { type: "boolean", default: false },
|
|
624
|
-
junit: { type: "string" },
|
|
625
|
-
artifacts: { type: "string" },
|
|
626
|
-
"no-artifacts": { type: "boolean", default: false },
|
|
627
|
-
"skip-report": { type: "boolean", default: false },
|
|
628
|
-
"max-concurrency": { type: "string" },
|
|
629
|
-
version: { type: "boolean", short: "V", default: false },
|
|
630
|
-
},
|
|
631
|
-
});
|
|
632
|
-
const dir = values.dir ?? ".";
|
|
633
|
-
if (values.version === true) {
|
|
634
|
-
await writeStdout(formatCliVersion({ json: values.json === true }));
|
|
18
|
+
const [command, ...rest] = argv;
|
|
19
|
+
if (command === "--version" || command === "-V") {
|
|
20
|
+
await writeStdout(formatCliVersion({ json: rest.includes("--json") }));
|
|
635
21
|
return 0;
|
|
636
22
|
}
|
|
637
|
-
// Best-effort, cached, and silent on failure.
|
|
638
|
-
//
|
|
639
|
-
//
|
|
640
|
-
if (command !==
|
|
641
|
-
|
|
642
|
-
|
|
23
|
+
// Best-effort, cached, and silent on failure. --json runs stay quiet for
|
|
24
|
+
// machine consumers. Help runs skip it, so the hosting probe of
|
|
25
|
+
// `bdk --help` never waits on the registry.
|
|
26
|
+
if (command !== undefined &&
|
|
27
|
+
!isHelpRequest(argv) &&
|
|
28
|
+
!NO_UPDATE_NOTICE.has(command) &&
|
|
29
|
+
!rest.includes("--json") &&
|
|
643
30
|
!isServeRestartWorker()) {
|
|
644
31
|
await warnIfOutdated();
|
|
645
32
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
: undefined;
|
|
652
|
-
return cmdSlack(positionals[0], {
|
|
653
|
-
dir,
|
|
654
|
-
name: values.name,
|
|
655
|
-
env,
|
|
656
|
-
json: values.json,
|
|
657
|
-
print: values.print,
|
|
658
|
-
prefix: values.prefix,
|
|
659
|
-
noPrefix: values["no-prefix"],
|
|
660
|
-
channelPosts: values["channel-posts"],
|
|
661
|
-
channels: values.channel,
|
|
662
|
-
slackTeam: values["slack-team"],
|
|
663
|
-
prod: values.prod,
|
|
664
|
-
team: values.team,
|
|
665
|
-
apiKey: values["api-key"],
|
|
666
|
-
icon: values.icon,
|
|
667
|
-
force: values.force,
|
|
668
|
-
manual: values.manual,
|
|
669
|
-
install: values.install,
|
|
670
|
-
noInstall: values["no-install"],
|
|
671
|
-
iconSource: positionals[0] === "icon" ? positionals[1] : undefined,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
case "github": {
|
|
675
|
-
const port = values.port === undefined ? undefined : Number.parseInt(values.port, 10);
|
|
676
|
-
if (port !== undefined && (Number.isNaN(port) || port < 0 || port > 65535)) {
|
|
677
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
678
|
-
return 1;
|
|
679
|
-
}
|
|
680
|
-
const { cmdGithub } = await import("../internal/cli-github.js");
|
|
681
|
-
return cmdGithub(positionals[0], {
|
|
682
|
-
dir,
|
|
683
|
-
slug: values.slug,
|
|
684
|
-
// `--channel` is repeatable for `slack doctor`; the github
|
|
685
|
-
// subcommands target a single channel, so the last one wins.
|
|
686
|
-
channel: values.channel?.at(-1),
|
|
687
|
-
host: values.host,
|
|
688
|
-
port,
|
|
689
|
-
url: values.url,
|
|
690
|
-
events: values.events,
|
|
691
|
-
// `--repo` is repeatable for `serve --cursor-events`; the github
|
|
692
|
-
// subcommands target a single repo, so the last one wins.
|
|
693
|
-
repo: values.repo?.at(-1),
|
|
694
|
-
org: values.org,
|
|
695
|
-
secret: values.secret,
|
|
696
|
-
install: values.install,
|
|
697
|
-
json: values.json,
|
|
698
|
-
prUrl: positionals[1],
|
|
699
|
-
action: values.action,
|
|
700
|
-
conclusion: values.conclusion,
|
|
701
|
-
context: values.context,
|
|
702
|
-
comment: values.comment,
|
|
703
|
-
dryRun: values["dry-run"],
|
|
704
|
-
out: values.out,
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
case "gitlab": {
|
|
708
|
-
const port = values.port === undefined ? undefined : Number.parseInt(values.port, 10);
|
|
709
|
-
if (port !== undefined && (Number.isNaN(port) || port < 0 || port > 65535)) {
|
|
710
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
711
|
-
return 1;
|
|
712
|
-
}
|
|
713
|
-
const { cmdGitlab } = await import("../internal/cli-gitlab.js");
|
|
714
|
-
return cmdGitlab(positionals[0], {
|
|
715
|
-
dir,
|
|
716
|
-
slug: values.slug,
|
|
717
|
-
channel: values.channel?.at(-1),
|
|
718
|
-
host: values.host,
|
|
719
|
-
port,
|
|
720
|
-
url: values.url,
|
|
721
|
-
events: values.events,
|
|
722
|
-
secret: values.secret,
|
|
723
|
-
json: values.json,
|
|
724
|
-
mrUrl: positionals[1],
|
|
725
|
-
action: values.action,
|
|
726
|
-
conclusion: values.conclusion,
|
|
727
|
-
comment: values.comment,
|
|
728
|
-
dryRun: values["dry-run"],
|
|
729
|
-
out: values.out,
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
case "pagerduty": {
|
|
733
|
-
const port = values.port === undefined ? undefined : Number.parseInt(values.port, 10);
|
|
734
|
-
if (port !== undefined && (Number.isNaN(port) || port < 0 || port > 65535)) {
|
|
735
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
736
|
-
return 1;
|
|
737
|
-
}
|
|
738
|
-
const { cmdPagerDuty } = await import("../internal/cli-pagerduty.js");
|
|
739
|
-
return cmdPagerDuty(positionals[0], {
|
|
740
|
-
dir,
|
|
741
|
-
slug: values.slug,
|
|
742
|
-
channel: values.channel?.at(-1),
|
|
743
|
-
host: values.host,
|
|
744
|
-
port,
|
|
745
|
-
url: values.url,
|
|
746
|
-
events: values.events,
|
|
747
|
-
secret: values.secret,
|
|
748
|
-
json: values.json,
|
|
749
|
-
incidentId: positionals[1],
|
|
750
|
-
comment: values.comment,
|
|
751
|
-
dryRun: values["dry-run"],
|
|
752
|
-
out: values.out,
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
case "bitbucket": {
|
|
756
|
-
const port = values.port === undefined ? undefined : Number.parseInt(values.port, 10);
|
|
757
|
-
if (port !== undefined && (Number.isNaN(port) || port < 0 || port > 65535)) {
|
|
758
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
759
|
-
return 1;
|
|
760
|
-
}
|
|
761
|
-
const { cmdBitbucket } = await import("../internal/cli-bitbucket.js");
|
|
762
|
-
return cmdBitbucket(positionals[0], {
|
|
763
|
-
dir,
|
|
764
|
-
slug: values.slug,
|
|
765
|
-
channel: values.channel?.at(-1),
|
|
766
|
-
host: values.host,
|
|
767
|
-
port,
|
|
768
|
-
url: values.url,
|
|
769
|
-
events: values.events,
|
|
770
|
-
secret: values.secret,
|
|
771
|
-
json: values.json,
|
|
772
|
-
prUrl: positionals[1],
|
|
773
|
-
comment: values.comment,
|
|
774
|
-
dryRun: values["dry-run"],
|
|
775
|
-
out: values.out,
|
|
776
|
-
});
|
|
777
|
-
}
|
|
778
|
-
case "init": {
|
|
779
|
-
const conflict = initFlagConflict({
|
|
780
|
-
fromGrokbot: values["from-grokbot"],
|
|
781
|
-
answers: values.answers,
|
|
782
|
-
dryRun: values["dry-run"],
|
|
783
|
-
template: values.template,
|
|
784
|
-
vars: values.var,
|
|
785
|
-
});
|
|
786
|
-
if (conflict !== undefined) {
|
|
787
|
-
if (values.json) {
|
|
788
|
-
await writeStdout(`${JSON.stringify({ ok: false, error: conflict })}\n`);
|
|
789
|
-
}
|
|
790
|
-
process.stderr.write(`${conflict}\n`);
|
|
791
|
-
return 1;
|
|
792
|
-
}
|
|
793
|
-
if (values["from-grokbot"] !== undefined) {
|
|
794
|
-
const { cmdInitFromGrokbot } = await import("../internal/cli-init-grokbot.js");
|
|
795
|
-
return cmdInitFromGrokbot({
|
|
796
|
-
recipe: values["from-grokbot"],
|
|
797
|
-
answers: values.answers,
|
|
798
|
-
dir: positionals[0],
|
|
799
|
-
dryRun: values["dry-run"],
|
|
800
|
-
json: values.json,
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
return cmdInit({
|
|
804
|
-
dir,
|
|
805
|
-
initTarget: positionals[0],
|
|
806
|
-
template: values.template,
|
|
807
|
-
vars: values.var,
|
|
808
|
-
json: values.json,
|
|
809
|
-
});
|
|
810
|
-
}
|
|
811
|
-
case "convert-automation": {
|
|
812
|
-
const { cmdConvertAutomation } = await import("../internal/cli-convert-automation.js");
|
|
813
|
-
const dirFlagPassed = rest.includes("--dir") || rest.some((arg) => arg.startsWith("--dir="));
|
|
814
|
-
return cmdConvertAutomation({
|
|
815
|
-
url: positionals[0],
|
|
816
|
-
// Default target is ./<automation-name-slug>, not the cwd.
|
|
817
|
-
dir: dirFlagPassed ? dir : undefined,
|
|
818
|
-
json: values.json,
|
|
819
|
-
apiKey: values["api-key"],
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
case "migrate": {
|
|
823
|
-
const { cmdMigrate } = await import("../internal/cli-migrate.js");
|
|
824
|
-
return cmdMigrate({
|
|
825
|
-
dir,
|
|
826
|
-
repo: values.repo?.at(-1),
|
|
827
|
-
ref: values.ref,
|
|
828
|
-
path: values.path,
|
|
829
|
-
noWait: values["no-wait"],
|
|
830
|
-
json: values.json,
|
|
831
|
-
apiKey: values["api-key"],
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
case "install-skills": {
|
|
835
|
-
const { cmdInstallSkills } = await import("../internal/cli-skills.js");
|
|
836
|
-
return cmdInstallSkills({
|
|
837
|
-
json: values.json,
|
|
838
|
-
print: values.print,
|
|
839
|
-
});
|
|
840
|
-
}
|
|
841
|
-
case "mcp": {
|
|
842
|
-
const { cmdMcp } = await import("../internal/cli-mcp.js");
|
|
843
|
-
const mcpSub = positionals[0];
|
|
844
|
-
return cmdMcp(mcpSub, {
|
|
845
|
-
dir,
|
|
846
|
-
slug: values.slug,
|
|
847
|
-
team: values.team,
|
|
848
|
-
apiKey: values["api-key"],
|
|
849
|
-
url: values.url,
|
|
850
|
-
prod: values.prod,
|
|
851
|
-
bearerToken: values["bearer-token"],
|
|
852
|
-
name: values.name,
|
|
853
|
-
print: values.print,
|
|
854
|
-
json: values.json,
|
|
855
|
-
store: values.store,
|
|
856
|
-
remote: values.remote,
|
|
857
|
-
oauthConnection: mcpSub === "oauth" ? positionals[1] : undefined,
|
|
858
|
-
});
|
|
859
|
-
}
|
|
860
|
-
case "login": {
|
|
861
|
-
const { cmdLogin } = await import("../internal/cli-cursor.js");
|
|
862
|
-
return cmdLogin({
|
|
863
|
-
apiKey: values["api-key"],
|
|
864
|
-
keyName: values["key-name"],
|
|
865
|
-
});
|
|
866
|
-
}
|
|
867
|
-
case "logout": {
|
|
868
|
-
const { cmdLogout } = await import("../internal/cli-cursor.js");
|
|
869
|
-
return cmdLogout();
|
|
870
|
-
}
|
|
871
|
-
case "whoami": {
|
|
872
|
-
const { cmdWhoami } = await import("../internal/cli-cursor.js");
|
|
873
|
-
return cmdWhoami({ json: values.json });
|
|
874
|
-
}
|
|
875
|
-
case "update": {
|
|
876
|
-
return cmdUpdate();
|
|
877
|
-
}
|
|
878
|
-
case "deploy": {
|
|
879
|
-
// `--repo` is repeatable for `serve --cursor-events`; deploy targets a
|
|
880
|
-
// single source repo, so the last one wins.
|
|
881
|
-
const repo = values.repo?.at(-1);
|
|
882
|
-
const dirFlagPassed = rest.includes("--dir") || rest.some((arg) => arg.startsWith("--dir="));
|
|
883
|
-
return cmdDeploy({
|
|
884
|
-
...deployOptionsFromValues(values),
|
|
885
|
-
dir: dirFlagPassed ? dir : undefined,
|
|
886
|
-
...(values.slug === undefined ? {} : { slug: values.slug }),
|
|
887
|
-
all: values.all === true,
|
|
888
|
-
...(repo === undefined ? {} : { repo }),
|
|
889
|
-
...(values.ref === undefined ? {} : { ref: values.ref }),
|
|
890
|
-
...(values.path === undefined ? {} : { path: values.path }),
|
|
891
|
-
...(values["cursor-events-repo"] === undefined
|
|
892
|
-
? {}
|
|
893
|
-
: { cursorEventsRepos: values["cursor-events-repo"] }),
|
|
894
|
-
...(values["allow-domain"] === undefined ? {} : { allowDomains: values["allow-domain"] }),
|
|
895
|
-
multiTenant: values["multi-tenant"] === true,
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
case "manifest": {
|
|
899
|
-
// Offline extraction of deploy metadata (events, egress, routes,
|
|
900
|
-
// /v1/info payload) — no VM, no network. Wd-1 of the event-ingress
|
|
901
|
-
// plan; `deploy` attaches this to the request from Wd-2 on.
|
|
902
|
-
return cmdManifest({ dir, json: values.json === true });
|
|
903
|
-
}
|
|
904
|
-
case "deployments": {
|
|
905
|
-
return cmdDeployments(deployOptionsFromValues(values));
|
|
906
|
-
}
|
|
907
|
-
case "deployment": {
|
|
908
|
-
return cmdDeploymentStatus(positionals[0], deployOptionsFromValues(values));
|
|
909
|
-
}
|
|
910
|
-
case "stop": {
|
|
911
|
-
return cmdStop(positionals[0], deployOptionsFromValues(values));
|
|
912
|
-
}
|
|
913
|
-
case "kill": {
|
|
914
|
-
return cmdKill(positionals[0], deployOptionsFromValues(values));
|
|
915
|
-
}
|
|
916
|
-
case "unlock-deploys": {
|
|
917
|
-
return cmdUnlockDeploys(positionals[0], deployOptionsFromValues(values));
|
|
918
|
-
}
|
|
919
|
-
case "start": {
|
|
920
|
-
return cmdStart(positionals[0], deployOptionsFromValues(values));
|
|
921
|
-
}
|
|
922
|
-
case "cancel-runs": {
|
|
923
|
-
return cmdCancelRuns(positionals[0], deployOptionsFromValues(values));
|
|
924
|
-
}
|
|
925
|
-
case "event-repos": {
|
|
926
|
-
return cmdEventRepos(positionals[0], values.repo ?? [], deployOptionsFromValues(values));
|
|
927
|
-
}
|
|
928
|
-
case "upgrade": {
|
|
929
|
-
return cmdUpgrade({ slug: positionals[0], release: values.release }, deployOptionsFromValues(values));
|
|
930
|
-
}
|
|
931
|
-
case "rollback": {
|
|
932
|
-
return cmdRollback({ slug: positionals[0], release: values.release }, deployOptionsFromValues(values));
|
|
933
|
-
}
|
|
934
|
-
case "delete": {
|
|
935
|
-
return cmdDelete(positionals[0], deployOptionsFromValues(values));
|
|
936
|
-
}
|
|
937
|
-
case "rotate-token": {
|
|
938
|
-
return cmdRotateToken(positionals[0], deployOptionsFromValues(values));
|
|
939
|
-
}
|
|
940
|
-
case "secrets": {
|
|
941
|
-
const base = deployOptionsFromValues(values);
|
|
942
|
-
switch (positionals[0]) {
|
|
943
|
-
case "set":
|
|
944
|
-
return cmdSecretsSet(positionals[1], positionals.slice(2), base);
|
|
945
|
-
case "list":
|
|
946
|
-
return cmdSecretsList(positionals[1], base);
|
|
947
|
-
case "unset":
|
|
948
|
-
return cmdSecretsUnset(positionals[1], positionals[2], base);
|
|
949
|
-
default:
|
|
950
|
-
process.stderr.write(`Usage: ${CLI} secrets <set|list|unset> <slug> ... [--team <id>] [--json]\n`);
|
|
951
|
-
return 1;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
case "images": {
|
|
955
|
-
const base = deployOptionsFromValues(values);
|
|
956
|
-
switch (positionals[0]) {
|
|
957
|
-
case "push":
|
|
958
|
-
return cmdImagesPush({ image: positionals[1], name: values.name }, base);
|
|
959
|
-
case "list":
|
|
960
|
-
return cmdImagesList(base);
|
|
961
|
-
case "rm":
|
|
962
|
-
return cmdImagesRm(positionals[1], base);
|
|
963
|
-
default:
|
|
964
|
-
process.stderr.write(`Usage: ${CLI} images <push <local-image> --name <name>|list|rm <name>> [--team <id>] [--json]\n`);
|
|
965
|
-
return 1;
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
case "run": {
|
|
969
|
-
const messages = await loadMessages(values.message, values["messages-file"]);
|
|
970
|
-
return cmdRun(axFromOptions({
|
|
971
|
-
dir,
|
|
972
|
-
messages,
|
|
973
|
-
sessionId: values["session-id"] ?? values.session,
|
|
974
|
-
continuationToken: values["continuation-token"],
|
|
975
|
-
events: values["no-events"] ? false : values.events === undefined ? true : values.events,
|
|
976
|
-
text: values.text,
|
|
977
|
-
url: values.url,
|
|
978
|
-
prod: values.prod,
|
|
979
|
-
team: values.team,
|
|
980
|
-
apiKey: values["api-key"],
|
|
981
|
-
slug: values.slug,
|
|
982
|
-
bearerToken: values["bearer-token"],
|
|
983
|
-
stateRoot: values["state-root"],
|
|
984
|
-
timeoutMs: parseTimeoutMs(values["timeout-ms"]),
|
|
985
|
-
stream: values["no-stream"] ? false : undefined,
|
|
986
|
-
dryRun: values["dry-run"],
|
|
987
|
-
asOf: values["as-of"],
|
|
988
|
-
componentKey: values.component,
|
|
989
|
-
}));
|
|
990
|
-
}
|
|
991
|
-
case "call": {
|
|
992
|
-
return cmdCall(axFromOptions({
|
|
993
|
-
dir,
|
|
994
|
-
toolName: positionals[0],
|
|
995
|
-
toolInput: values.input,
|
|
996
|
-
sessionId: values["session-id"] ?? values.session,
|
|
997
|
-
url: values.url,
|
|
998
|
-
prod: values.prod,
|
|
999
|
-
team: values.team,
|
|
1000
|
-
apiKey: values["api-key"],
|
|
1001
|
-
slug: values.slug,
|
|
1002
|
-
bearerToken: values["bearer-token"],
|
|
1003
|
-
stateRoot: values["state-root"],
|
|
1004
|
-
}));
|
|
1005
|
-
}
|
|
1006
|
-
case "skill": {
|
|
1007
|
-
return cmdSkill(positionals[0], axFromOptions({
|
|
1008
|
-
dir,
|
|
1009
|
-
text: values.text,
|
|
1010
|
-
url: values.url,
|
|
1011
|
-
prod: values.prod,
|
|
1012
|
-
team: values.team,
|
|
1013
|
-
apiKey: values["api-key"],
|
|
1014
|
-
slug: values.slug,
|
|
1015
|
-
bearerToken: values["bearer-token"],
|
|
1016
|
-
stateRoot: values["state-root"],
|
|
1017
|
-
}));
|
|
1018
|
-
}
|
|
1019
|
-
case "trajectory": {
|
|
1020
|
-
if (values.events === undefined) {
|
|
1021
|
-
process.stderr.write("trajectory requires --events <file.ndjson>\n");
|
|
1022
|
-
return 1;
|
|
1023
|
-
}
|
|
1024
|
-
return cmdTrajectory(axFromOptions({
|
|
1025
|
-
dir,
|
|
1026
|
-
events: values.events,
|
|
1027
|
-
text: values.text,
|
|
1028
|
-
}));
|
|
1029
|
-
}
|
|
1030
|
-
case "eval": {
|
|
1031
|
-
// Remote status subcommand only when targeting --url. Otherwise the
|
|
1032
|
-
// bare token "status" is a normal eval id (evals/status.eval.ts).
|
|
1033
|
-
if (positionals[0] === "status" && values.url !== undefined) {
|
|
1034
|
-
return cmdEvalStatus(positionals[1], axFromOptions({
|
|
1035
|
-
dir,
|
|
1036
|
-
json: values.json,
|
|
1037
|
-
url: values.url,
|
|
1038
|
-
prod: values.prod,
|
|
1039
|
-
slug: values.slug,
|
|
1040
|
-
bearerToken: values["bearer-token"],
|
|
1041
|
-
out: values.out,
|
|
1042
|
-
}));
|
|
1043
|
-
}
|
|
1044
|
-
if (positionals[0] === "cancel" && values.url !== undefined) {
|
|
1045
|
-
return cmdEvalCancel(positionals[1], axFromOptions({
|
|
1046
|
-
dir,
|
|
1047
|
-
json: values.json,
|
|
1048
|
-
url: values.url,
|
|
1049
|
-
prod: values.prod,
|
|
1050
|
-
slug: values.slug,
|
|
1051
|
-
bearerToken: values["bearer-token"],
|
|
1052
|
-
}));
|
|
1053
|
-
}
|
|
1054
|
-
return cmdEval(axFromOptions({
|
|
1055
|
-
dir,
|
|
1056
|
-
evalIds: positionals,
|
|
1057
|
-
list: values.list,
|
|
1058
|
-
verbose: values.verbose,
|
|
1059
|
-
json: values.json,
|
|
1060
|
-
tags: values.tag,
|
|
1061
|
-
url: values.url,
|
|
1062
|
-
prod: values.prod,
|
|
1063
|
-
noWait: values["no-wait"],
|
|
1064
|
-
slug: values.slug,
|
|
1065
|
-
bearerToken: values["bearer-token"],
|
|
1066
|
-
stateRoot: values["state-root"],
|
|
1067
|
-
timeoutMs: parseTimeoutMs(values["timeout-ms"]),
|
|
1068
|
-
stream: values["no-stream"] ? false : undefined,
|
|
1069
|
-
strict: values.strict,
|
|
1070
|
-
junit: values.junit,
|
|
1071
|
-
artifacts: values["no-artifacts"] ? false : values.artifacts,
|
|
1072
|
-
skipReport: values["skip-report"],
|
|
1073
|
-
maxConcurrency: parseMaxConcurrency(values["max-concurrency"]),
|
|
1074
|
-
out: values.out,
|
|
1075
|
-
}));
|
|
1076
|
-
}
|
|
1077
|
-
case "chat": {
|
|
1078
|
-
return cmdChat(axFromOptions({
|
|
1079
|
-
dir,
|
|
1080
|
-
messages: values.message,
|
|
1081
|
-
url: values.url,
|
|
1082
|
-
prod: values.prod,
|
|
1083
|
-
team: values.team,
|
|
1084
|
-
apiKey: values["api-key"],
|
|
1085
|
-
slug: values.slug,
|
|
1086
|
-
sessionId: values["session-id"] ?? values.session,
|
|
1087
|
-
resume: values.resume,
|
|
1088
|
-
continuationToken: values["continuation-token"],
|
|
1089
|
-
bearerToken: values["bearer-token"],
|
|
1090
|
-
json: values.json,
|
|
1091
|
-
text: values.text,
|
|
1092
|
-
noColor: values["no-color"],
|
|
1093
|
-
}));
|
|
1094
|
-
}
|
|
1095
|
-
case "resume": {
|
|
1096
|
-
return cmdResume(positionals[0], axFromOptions({
|
|
1097
|
-
dir,
|
|
1098
|
-
messages: values.message,
|
|
1099
|
-
url: values.url,
|
|
1100
|
-
prod: values.prod,
|
|
1101
|
-
team: values.team,
|
|
1102
|
-
apiKey: values["api-key"],
|
|
1103
|
-
slug: values.slug,
|
|
1104
|
-
// Positional wins; --session is accepted as a redundant alias.
|
|
1105
|
-
// No id → resume previous (cmdResume sets resume: true).
|
|
1106
|
-
sessionId: positionals[0] ?? values["session-id"] ?? values.session,
|
|
1107
|
-
continuationToken: values["continuation-token"],
|
|
1108
|
-
bearerToken: values["bearer-token"],
|
|
1109
|
-
json: values.json,
|
|
1110
|
-
text: values.text,
|
|
1111
|
-
noColor: values["no-color"],
|
|
1112
|
-
}));
|
|
1113
|
-
}
|
|
1114
|
-
case "logs": {
|
|
1115
|
-
return cmdLogs(axFromOptions({
|
|
1116
|
-
dir,
|
|
1117
|
-
url: values.url,
|
|
1118
|
-
prod: values.prod,
|
|
1119
|
-
team: values.team,
|
|
1120
|
-
apiKey: values["api-key"],
|
|
1121
|
-
slug: values.slug,
|
|
1122
|
-
bearerToken: values["bearer-token"],
|
|
1123
|
-
sessionId: positionals[0] ?? values["session-id"] ?? values.session,
|
|
1124
|
-
json: values.json,
|
|
1125
|
-
once: values.once,
|
|
1126
|
-
}));
|
|
1127
|
-
}
|
|
1128
|
-
case "sessions": {
|
|
1129
|
-
return cmdSessions(axFromOptions({
|
|
1130
|
-
dir,
|
|
1131
|
-
url: values.url,
|
|
1132
|
-
prod: values.prod,
|
|
1133
|
-
team: values.team,
|
|
1134
|
-
apiKey: values["api-key"],
|
|
1135
|
-
slug: values.slug,
|
|
1136
|
-
bearerToken: values["bearer-token"],
|
|
1137
|
-
json: values.json,
|
|
1138
|
-
}));
|
|
1139
|
-
}
|
|
1140
|
-
case "session": {
|
|
1141
|
-
const messages = await loadMessages(values.message, values["messages-file"]);
|
|
1142
|
-
return cmdSession(positionals[0], axFromOptions({
|
|
1143
|
-
dir,
|
|
1144
|
-
url: values.url,
|
|
1145
|
-
prod: values.prod,
|
|
1146
|
-
team: values.team,
|
|
1147
|
-
apiKey: values["api-key"],
|
|
1148
|
-
slug: values.slug,
|
|
1149
|
-
bearerToken: values["bearer-token"],
|
|
1150
|
-
json: values.json,
|
|
1151
|
-
text: values.text,
|
|
1152
|
-
rawEvents: values["raw-events"],
|
|
1153
|
-
out: values.out,
|
|
1154
|
-
messages,
|
|
1155
|
-
sessionId: values["session-id"] ?? values.session,
|
|
1156
|
-
dryRun: values["dry-run"],
|
|
1157
|
-
asOf: values["as-of"],
|
|
1158
|
-
componentKey: values.component,
|
|
1159
|
-
}));
|
|
1160
|
-
}
|
|
1161
|
-
case "cost": {
|
|
1162
|
-
return cmdCost(positionals[0] ?? values["session-id"] ?? values.session, axFromOptions({
|
|
1163
|
-
dir,
|
|
1164
|
-
url: values.url,
|
|
1165
|
-
prod: values.prod,
|
|
1166
|
-
team: values.team,
|
|
1167
|
-
apiKey: values["api-key"],
|
|
1168
|
-
slug: values.slug,
|
|
1169
|
-
bearerToken: values["bearer-token"],
|
|
1170
|
-
json: values.json,
|
|
1171
|
-
}));
|
|
1172
|
-
}
|
|
1173
|
-
case "playground": {
|
|
1174
|
-
return cmdPlayground(axFromOptions({
|
|
1175
|
-
dir,
|
|
1176
|
-
url: values.url,
|
|
1177
|
-
prod: values.prod,
|
|
1178
|
-
team: values.team,
|
|
1179
|
-
apiKey: values["api-key"],
|
|
1180
|
-
slug: values.slug,
|
|
1181
|
-
bearerToken: values["bearer-token"],
|
|
1182
|
-
sessionId: values["session-id"] ?? values.session,
|
|
1183
|
-
print: values.print,
|
|
1184
|
-
}));
|
|
1185
|
-
}
|
|
1186
|
-
case "docs": {
|
|
1187
|
-
const docsPort = values.port === undefined ? 0 : Number.parseInt(values.port, 10);
|
|
1188
|
-
if (Number.isNaN(docsPort) || docsPort < 0 || docsPort > 65535) {
|
|
1189
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
1190
|
-
return 1;
|
|
1191
|
-
}
|
|
1192
|
-
const { cmdDocs } = await import("../internal/cli-docs.js");
|
|
1193
|
-
return cmdDocs({
|
|
1194
|
-
port: docsPort,
|
|
1195
|
-
host: values.host,
|
|
1196
|
-
print: values.print === true,
|
|
1197
|
-
});
|
|
1198
|
-
}
|
|
1199
|
-
case "validate": {
|
|
1200
|
-
const mounts = await loadMounts(dir);
|
|
1201
|
-
if (values.json === true) {
|
|
1202
|
-
process.stdout.write(formatValidateJson(mounts));
|
|
1203
|
-
}
|
|
1204
|
-
else {
|
|
1205
|
-
for (const { slug, project } of mounts) {
|
|
1206
|
-
const label = slug === "" ? project.name : `${slug} (${project.name})`;
|
|
1207
|
-
if (project.diagnostics.length === 0) {
|
|
1208
|
-
process.stdout.write(`ok: ${label} has no diagnostics\n`);
|
|
1209
|
-
continue;
|
|
1210
|
-
}
|
|
1211
|
-
process.stdout.write(`${label}:\n${formatDiagnostics(project.diagnostics)}\n`);
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
const hasError = mounts.some((mount) => mount.project.diagnostics.some((diagnostic) => diagnostic.severity === "error"));
|
|
1215
|
-
return hasError ? 1 : 0;
|
|
1216
|
-
}
|
|
1217
|
-
case "info": {
|
|
1218
|
-
const mounts = await loadMounts(dir);
|
|
1219
|
-
if (values.json) {
|
|
1220
|
-
const payload = mounts.length === 1 && mounts[0]?.slug === ""
|
|
1221
|
-
? projectInfo(mounts[0].project)
|
|
1222
|
-
: {
|
|
1223
|
-
agents: mounts.map(({ slug, project }) => ({
|
|
1224
|
-
slug,
|
|
1225
|
-
...projectInfo(project),
|
|
1226
|
-
})),
|
|
1227
|
-
};
|
|
1228
|
-
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
1229
|
-
return 0;
|
|
1230
|
-
}
|
|
1231
|
-
if (mounts.length > 1 || mounts[0]?.slug !== "") {
|
|
1232
|
-
process.stdout.write(`${mounts.length} agents under ${dir}:\n\n`);
|
|
1233
|
-
for (const { slug, project } of mounts) {
|
|
1234
|
-
const info = projectInfo(project);
|
|
1235
|
-
process.stdout.write(` /${slug} — ${info.name} (${formatModel(info.model)}, ${info.tools.length} tools, ${info.channels.length} channels)\n`);
|
|
1236
|
-
}
|
|
1237
|
-
const anyError = mounts.some((m) => m.project.diagnostics.some((d) => d.severity === "error"));
|
|
1238
|
-
return anyError ? 1 : 0;
|
|
1239
|
-
}
|
|
1240
|
-
const project = mounts[0]?.project;
|
|
1241
|
-
const info = projectInfo(project);
|
|
1242
|
-
const lines = [];
|
|
1243
|
-
lines.push(`agent: ${info.name}`);
|
|
1244
|
-
lines.push(`model: ${formatModel(info.model)}`);
|
|
1245
|
-
lines.push(`mcp: ${info.mcp.path} (${info.mcp.tools.join(", ")})`);
|
|
1246
|
-
if (info.instructions !== undefined) {
|
|
1247
|
-
lines.push(`instructions: ${info.instructions.chars} chars`);
|
|
1248
|
-
}
|
|
1249
|
-
lines.push(section("tools", info.tools.map((t) => `${t.name} — ${t.description}`)));
|
|
1250
|
-
lines.push(section("skills", info.skills.map((s) => `${s.name} — ${s.description}`)));
|
|
1251
|
-
lines.push(section("extensions", info.extensions.map((e) => {
|
|
1252
|
-
const contributed = [...e.tools, ...e.skills].join(", ") || "(nothing contributed)";
|
|
1253
|
-
const egress = e.hosting?.egressDomains ?? [];
|
|
1254
|
-
return egress.length === 0
|
|
1255
|
-
? `${e.name} — ${contributed}`
|
|
1256
|
-
: `${e.name} — ${contributed}; egress: ${egress.join(", ")}`;
|
|
1257
|
-
})));
|
|
1258
|
-
lines.push(section("MCP connections", info.connections.map((c) => `${c.name} — ${c.transport}`)));
|
|
1259
|
-
lines.push(section("subagents", info.subagents.map((s) => `${s.name} — ${s.description ?? ""}`)));
|
|
1260
|
-
lines.push(section("channels", info.channels.map((c) => `${c.id}: ${c.routes.map((r) => `${r.method} ${r.url}`).join(", ") || "(events only)"}`)));
|
|
1261
|
-
lines.push(section("schedules", info.schedules.map((s) => `${s.name} (${s.cron}, ${s.kind})`)));
|
|
1262
|
-
lines.push(section("hooks", info.hooks));
|
|
1263
|
-
lines.push(section("hosting egress domains", info.hosting?.egressDomains ?? []));
|
|
1264
|
-
lines.push(section("hosting secret names", info.hosting?.secretNames ?? []));
|
|
1265
|
-
if (info.diagnostics.length > 0) {
|
|
1266
|
-
lines.push(`\ndiagnostics:\n${formatDiagnostics(info.diagnostics)}`);
|
|
1267
|
-
}
|
|
1268
|
-
process.stdout.write(`${lines.filter((line) => line !== "").join("\n")}\n`);
|
|
1269
|
-
return info.diagnostics.some((d) => d.severity === "error") ? 1 : 0;
|
|
1270
|
-
}
|
|
1271
|
-
case "dev":
|
|
1272
|
-
case "serve": {
|
|
1273
|
-
const serveDirResult = resolveServeDir({
|
|
1274
|
-
command,
|
|
1275
|
-
dir,
|
|
1276
|
-
positionals,
|
|
1277
|
-
dirFlagPassed: rest.includes("--dir"),
|
|
1278
|
-
});
|
|
1279
|
-
if (typeof serveDirResult !== "string") {
|
|
1280
|
-
process.stderr.write(serveDirResult.error);
|
|
1281
|
-
return 1;
|
|
1282
|
-
}
|
|
1283
|
-
const serveDir = serveDirResult;
|
|
1284
|
-
const port = values.port === undefined ? undefined : Number.parseInt(values.port, 10);
|
|
1285
|
-
if (port !== undefined && (Number.isNaN(port) || port < 0 || port > 65535)) {
|
|
1286
|
-
process.stderr.write(`invalid --port: ${values.port}\n`);
|
|
1287
|
-
return 1;
|
|
1288
|
-
}
|
|
1289
|
-
if (values["allow-anonymous"] === true && values["bearer-token"] !== undefined) {
|
|
1290
|
-
process.stderr.write("--allow-anonymous and --bearer-token are mutually exclusive\n");
|
|
1291
|
-
return 1;
|
|
1292
|
-
}
|
|
1293
|
-
const mode = values.mode;
|
|
1294
|
-
if (mode !== undefined && mode !== "single" && mode !== "multi") {
|
|
1295
|
-
process.stderr.write(`invalid --mode: ${mode} (expected "single" or "multi")\n`);
|
|
1296
|
-
return 1;
|
|
1297
|
-
}
|
|
1298
|
-
const dev = command === "dev" || values.dev === true;
|
|
1299
|
-
const style = stdoutPalette();
|
|
1300
|
-
// Real env wins (loadEnvFile never overrides). Runs inside start()
|
|
1301
|
-
// so dev's Enter-restart picks up tokens written since boot.
|
|
1302
|
-
const loadLocalEnv = () => {
|
|
1303
|
-
const loadedEnvFiles = loadAgentLocalEnv(serveDir);
|
|
1304
|
-
if (loadedEnvFiles.length > 0) {
|
|
1305
|
-
process.stdout.write(`${style.dim(`env: loaded ${loadedEnvFiles.join(", ")}`)}\n`);
|
|
1306
|
-
}
|
|
1307
|
-
};
|
|
1308
|
-
const serveOptions = {
|
|
1309
|
-
port,
|
|
1310
|
-
host: values.host,
|
|
1311
|
-
mode: mode,
|
|
1312
|
-
dev,
|
|
1313
|
-
apiKey: values["api-key"],
|
|
1314
|
-
stateRoot: values["state-root"],
|
|
1315
|
-
authToken: values["bearer-token"],
|
|
1316
|
-
allowAnonymous: values["allow-anonymous"] === true ? true : undefined,
|
|
1317
|
-
allowAnonymousCursorGithub: values["allow-anonymous-cursor-github"] === true ? true : undefined,
|
|
1318
|
-
allowAnonymousCursorAccountMcp: values["allow-anonymous-cursor-account-mcp"] === true ? true : undefined,
|
|
1319
|
-
allowAnonymousGrokbot: values["allow-anonymous-grokbot"] === true ? true : undefined,
|
|
1320
|
-
cursorScmProxy: values["cursor-scm-proxy"] === true ? true : undefined,
|
|
1321
|
-
schedules: values["no-schedules"] === true ? false : undefined,
|
|
1322
|
-
noControlPlane: values["no-control-plane"] === true ? true : undefined,
|
|
1323
|
-
playground: values["no-playground"] === true ? false : undefined,
|
|
1324
|
-
docs: values["no-docs"] === true ? false : undefined,
|
|
1325
|
-
publicUrl: values["public-url"],
|
|
1326
|
-
cloudToolsUrl: values["cloud-tools-url"],
|
|
1327
|
-
peersUrl: values["peers-url"],
|
|
1328
|
-
cursorEvents: values["cursor-events"] === true ? { repos: values.repo ?? [] } : undefined,
|
|
1329
|
-
// Soft boot logs stay secondary to the banner. `dim` is a no-op on
|
|
1330
|
-
// already-styled lines (the MCP warning box).
|
|
1331
|
-
logger: (line) => {
|
|
1332
|
-
process.stdout.write(`${style.dim(line)}\n`);
|
|
1333
|
-
},
|
|
1334
|
-
};
|
|
1335
|
-
const enterToRestart = process.stdin.isTTY === true;
|
|
1336
|
-
if (enterToRestart && !isServeRestartWorker()) {
|
|
1337
|
-
return runEnterRestartSupervisor({
|
|
1338
|
-
spawn: (command, args, spawnOptions) => spawn(command, args, spawnOptions),
|
|
1339
|
-
onRestart: () => {
|
|
1340
|
-
clearTerminal();
|
|
1341
|
-
},
|
|
1342
|
-
});
|
|
1343
|
-
}
|
|
1344
|
-
const bannerOpts = {
|
|
1345
|
-
noPlayground: values["no-playground"] === true,
|
|
1346
|
-
dev,
|
|
1347
|
-
bearerToken: values["bearer-token"] !== undefined,
|
|
1348
|
-
noSchedules: values["no-schedules"] === true,
|
|
1349
|
-
};
|
|
1350
|
-
const start = async () => {
|
|
1351
|
-
loadLocalEnv();
|
|
1352
|
-
const next = await serve(serveDir, serveOptions);
|
|
1353
|
-
printServeBanner(next, bannerOpts);
|
|
1354
|
-
if (enterToRestart) {
|
|
1355
|
-
process.stdout.write(style.dim(" press Enter to restart\n"));
|
|
1356
|
-
}
|
|
1357
|
-
return next;
|
|
1358
|
-
};
|
|
1359
|
-
const handle = await start();
|
|
1360
|
-
let closing = false;
|
|
1361
|
-
let restartRequested = false;
|
|
1362
|
-
await new Promise((resolve) => {
|
|
1363
|
-
const shutdown = () => {
|
|
1364
|
-
if (closing) {
|
|
1365
|
-
return;
|
|
1366
|
-
}
|
|
1367
|
-
closing = true;
|
|
1368
|
-
process.stdout.write("\nshutting down (draining running turns)\n");
|
|
1369
|
-
void handle.close().finally(resolve);
|
|
1370
|
-
};
|
|
1371
|
-
process.on("SIGINT", shutdown);
|
|
1372
|
-
process.on("SIGTERM", shutdown);
|
|
1373
|
-
if (!enterToRestart) {
|
|
1374
|
-
return;
|
|
1375
|
-
}
|
|
1376
|
-
process.stdin.resume();
|
|
1377
|
-
process.stdin.on("data", (chunk) => {
|
|
1378
|
-
const text = typeof chunk === "string" ? chunk : chunk.toString("utf8");
|
|
1379
|
-
if (!isEnterOnly(text) || closing) {
|
|
1380
|
-
return;
|
|
1381
|
-
}
|
|
1382
|
-
closing = true;
|
|
1383
|
-
restartRequested = true;
|
|
1384
|
-
clearTerminal();
|
|
1385
|
-
process.stdout.write(style.dim("restarting…\n"));
|
|
1386
|
-
void handle.close().finally(resolve);
|
|
1387
|
-
});
|
|
1388
|
-
});
|
|
1389
|
-
return restartRequested ? ENTER_RESTART_EXIT_CODE : 0;
|
|
1390
|
-
}
|
|
1391
|
-
default: {
|
|
1392
|
-
process.stderr.write(`Unknown command "${command}"\n\n${HELP}`);
|
|
1393
|
-
return 1;
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
function deployOptionsFromValues(values) {
|
|
1398
|
-
return {
|
|
1399
|
-
team: values.team,
|
|
1400
|
-
json: values.json === true,
|
|
1401
|
-
noWait: values["no-wait"] === true,
|
|
1402
|
-
cancelRuns: values["cancel-runs"] === true,
|
|
1403
|
-
apiKey: values["api-key"],
|
|
1404
|
-
fromArgv: values["from-argv"] === true ? true : undefined,
|
|
1405
|
-
};
|
|
1406
|
-
}
|
|
1407
|
-
function axFromOptions(partial) {
|
|
1408
|
-
return {
|
|
1409
|
-
dir: partial.dir,
|
|
1410
|
-
cwd: partial.cwd,
|
|
1411
|
-
slug: partial.slug,
|
|
1412
|
-
bearerToken: partial.bearerToken,
|
|
1413
|
-
stateRoot: partial.stateRoot,
|
|
1414
|
-
messages: partial.messages,
|
|
1415
|
-
sessionId: partial.sessionId,
|
|
1416
|
-
resume: partial.resume,
|
|
1417
|
-
continuationToken: partial.continuationToken,
|
|
1418
|
-
dryRun: partial.dryRun,
|
|
1419
|
-
asOf: partial.asOf,
|
|
1420
|
-
componentKey: partial.componentKey,
|
|
1421
|
-
timeoutMs: partial.timeoutMs,
|
|
1422
|
-
events: partial.events,
|
|
1423
|
-
text: partial.text,
|
|
1424
|
-
json: partial.json,
|
|
1425
|
-
list: partial.list,
|
|
1426
|
-
verbose: partial.verbose,
|
|
1427
|
-
tags: partial.tags,
|
|
1428
|
-
evalIds: partial.evalIds,
|
|
1429
|
-
initTarget: partial.initTarget,
|
|
1430
|
-
vars: partial.vars,
|
|
1431
|
-
toolName: partial.toolName,
|
|
1432
|
-
toolInput: partial.toolInput,
|
|
1433
|
-
url: partial.url,
|
|
1434
|
-
prod: partial.prod,
|
|
1435
|
-
noWait: partial.noWait,
|
|
1436
|
-
team: partial.team,
|
|
1437
|
-
apiKey: partial.apiKey,
|
|
1438
|
-
fetchImpl: partial.fetchImpl,
|
|
1439
|
-
stream: partial.stream,
|
|
1440
|
-
noColor: partial.noColor,
|
|
1441
|
-
once: partial.once,
|
|
1442
|
-
rawEvents: partial.rawEvents,
|
|
1443
|
-
print: partial.print,
|
|
1444
|
-
strict: partial.strict,
|
|
1445
|
-
junit: partial.junit,
|
|
1446
|
-
artifacts: partial.artifacts,
|
|
1447
|
-
skipReport: partial.skipReport,
|
|
1448
|
-
maxConcurrency: partial.maxConcurrency,
|
|
1449
|
-
out: partial.out,
|
|
1450
|
-
};
|
|
1451
|
-
}
|
|
1452
|
-
async function loadMessages(messages, messagesFile) {
|
|
1453
|
-
const out = [];
|
|
1454
|
-
if (messagesFile !== undefined) {
|
|
1455
|
-
const raw = await readFile(resolve(messagesFile), "utf8");
|
|
1456
|
-
const parsed = JSON.parse(raw);
|
|
1457
|
-
if (!Array.isArray(parsed)) {
|
|
1458
|
-
throw new Error("--messages-file must be a JSON array of strings");
|
|
1459
|
-
}
|
|
1460
|
-
for (const item of parsed) {
|
|
1461
|
-
if (typeof item !== "string") {
|
|
1462
|
-
throw new Error("--messages-file entries must be strings");
|
|
1463
|
-
}
|
|
1464
|
-
out.push(item);
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
if (messages !== undefined) {
|
|
1468
|
-
out.push(...messages);
|
|
1469
|
-
}
|
|
1470
|
-
return out;
|
|
1471
|
-
}
|
|
1472
|
-
function parseTimeoutMs(value) {
|
|
1473
|
-
if (value === undefined) {
|
|
1474
|
-
return undefined;
|
|
1475
|
-
}
|
|
1476
|
-
const n = Number.parseInt(value, 10);
|
|
1477
|
-
if (Number.isNaN(n) || n <= 0) {
|
|
1478
|
-
throw new Error(`invalid --timeout-ms: ${value}`);
|
|
1479
|
-
}
|
|
1480
|
-
return n;
|
|
1481
|
-
}
|
|
1482
|
-
function parseMaxConcurrency(value) {
|
|
1483
|
-
if (value === undefined) {
|
|
1484
|
-
return undefined;
|
|
1485
|
-
}
|
|
1486
|
-
const n = Number.parseInt(value, 10);
|
|
1487
|
-
if (Number.isNaN(n) || n <= 0) {
|
|
1488
|
-
throw new Error(`invalid --max-concurrency: ${value}`);
|
|
1489
|
-
}
|
|
1490
|
-
return n;
|
|
1491
|
-
}
|
|
1492
|
-
/**
|
|
1493
|
-
* Load mounts the same way `serve` does (multi-agent layout by default).
|
|
1494
|
-
*/
|
|
1495
|
-
async function loadMounts(dir) {
|
|
1496
|
-
return resolveAgentMounts(dir);
|
|
1497
|
-
}
|
|
1498
|
-
function section(title, items) {
|
|
1499
|
-
if (items.length === 0) {
|
|
1500
|
-
return "";
|
|
1501
|
-
}
|
|
1502
|
-
return `${title}:\n${items.map((item) => ` - ${item}`).join("\n")}`;
|
|
1503
|
-
}
|
|
1504
|
-
function isEnterOnly(text) {
|
|
1505
|
-
return text.length > 0 && [...text].every((ch) => ch === "\n" || ch === "\r");
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* `dev [path]` takes a positional project root; `serve` keeps `--dir` only.
|
|
1509
|
-
* Reject mixing a positional with an explicit `--dir`, and extra args on `dev`.
|
|
1510
|
-
*/
|
|
1511
|
-
function resolveServeDir(args) {
|
|
1512
|
-
if (args.command !== "dev") {
|
|
1513
|
-
return args.dir;
|
|
1514
|
-
}
|
|
1515
|
-
if (args.positionals.length > 1) {
|
|
1516
|
-
return {
|
|
1517
|
-
error: `${CLI} dev: unexpected arguments: ${args.positionals.slice(1).join(" ")}\n`,
|
|
1518
|
-
};
|
|
1519
|
-
}
|
|
1520
|
-
const positionalDir = args.positionals[0];
|
|
1521
|
-
if (positionalDir === undefined) {
|
|
1522
|
-
return args.dir;
|
|
1523
|
-
}
|
|
1524
|
-
if (args.dirFlagPassed && args.dir !== positionalDir) {
|
|
1525
|
-
return {
|
|
1526
|
-
error: `${CLI} dev: pass a path as a positional or --dir, not both\n`,
|
|
1527
|
-
};
|
|
1528
|
-
}
|
|
1529
|
-
return positionalDir;
|
|
1530
|
-
}
|
|
1531
|
-
function printServeBanner(handle, opts) {
|
|
1532
|
-
const c = stdoutPalette();
|
|
1533
|
-
const agents = handle.agents;
|
|
1534
|
-
// Name the framework build in the boot line: hosted engines install the
|
|
1535
|
-
// published package at provision time, so the serve log is the only
|
|
1536
|
-
// durable record of which build a deployment's turns actually ran on.
|
|
1537
|
-
const versionTag = c.dim(`(${PACKAGE_NAME} ${packageVersion()})`);
|
|
1538
|
-
if (agents.length > 1) {
|
|
1539
|
-
process.stdout.write(`${agents.length} agents listening ${versionTag}\n`);
|
|
1540
|
-
}
|
|
1541
|
-
else {
|
|
1542
|
-
const info = agents[0]?.info;
|
|
1543
|
-
if (info !== undefined) {
|
|
1544
|
-
process.stdout.write(`${info.name} listening ${versionTag}\n`);
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
const playgroundUrl = resolvePlaygroundBannerUrl(handle, opts.noPlayground);
|
|
1548
|
-
if (playgroundUrl !== undefined) {
|
|
1549
|
-
process.stdout.write(` playground ${c.cyan(playgroundUrl)}\n`);
|
|
1550
|
-
}
|
|
1551
|
-
// `/` is only mounted when the playground host home is enabled.
|
|
1552
|
-
if (!opts.noPlayground) {
|
|
1553
|
-
process.stdout.write(` home ${c.cyan(`${handle.url}/`)}\n`);
|
|
1554
|
-
}
|
|
1555
|
-
// Dev is playground-first (Vite proxies the API). Keep API/route detail for
|
|
1556
|
-
// plain `serve`, where operators often curl the HTTP surface directly.
|
|
1557
|
-
if (!opts.dev) {
|
|
1558
|
-
process.stdout.write(c.dim(` api ${handle.url}\n`));
|
|
1559
|
-
if (agents.length > 1 || agents[0]?.slug !== "") {
|
|
1560
|
-
for (const agent of agents) {
|
|
1561
|
-
const info = agent.info;
|
|
1562
|
-
process.stdout.write(c.dim(` /${agent.slug} ${info.name}\n`));
|
|
1563
|
-
}
|
|
1564
|
-
}
|
|
1565
|
-
else {
|
|
1566
|
-
const info = agents[0]?.info;
|
|
1567
|
-
if (info !== undefined) {
|
|
1568
|
-
process.stdout.write(c.dim(` POST ${handle.url}/v1/session\n`));
|
|
1569
|
-
process.stdout.write(c.dim(` GET ${handle.url}/v1/session/:sessionId/stream\n`));
|
|
1570
|
-
for (const channel of info.channels) {
|
|
1571
|
-
if (channel.id === "http") {
|
|
1572
|
-
continue;
|
|
1573
|
-
}
|
|
1574
|
-
for (const route of channel.routes) {
|
|
1575
|
-
process.stdout.write(c.dim(` ${route.method} ${handle.url}${route.url}\n`));
|
|
1576
|
-
}
|
|
1577
|
-
}
|
|
1578
|
-
if (info.schedules.length > 0) {
|
|
1579
|
-
const scheduleMode = opts.noSchedules ? "disabled" : "running on cron cadence (UTC)";
|
|
1580
|
-
process.stdout.write(c.dim(` schedules: ${info.schedules.map((s) => s.name).join(", ")} — ${scheduleMode}\n`));
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
if (handle.docsUrl !== undefined) {
|
|
1585
|
-
process.stdout.write(c.dim(` docs ${handle.docsUrl}\n`));
|
|
1586
|
-
}
|
|
1587
|
-
}
|
|
1588
|
-
if (opts.bearerToken) {
|
|
1589
|
-
process.stdout.write(c.dim(" auth: bearer token required on API routes (playground has a token field)\n"));
|
|
1590
|
-
}
|
|
1591
|
-
if (opts.dev &&
|
|
1592
|
-
(process.env.GITHUB_WEBHOOK_SECRET === undefined || process.env.GITHUB_WEBHOOK_SECRET === "") &&
|
|
1593
|
-
handle.agents.some((agent) => agent.info.channels.some((c) => c.kind === "github"))) {
|
|
1594
|
-
process.stdout.write(c.dim(` github: dev accepts unsigned loopback deliveries (${CLI} github forward works without a secret; set GITHUB_WEBHOOK_SECRET to verify signatures)\n`));
|
|
1595
|
-
}
|
|
1596
|
-
if (opts.dev &&
|
|
1597
|
-
(process.env.GITLAB_WEBHOOK_SECRET === undefined || process.env.GITLAB_WEBHOOK_SECRET === "") &&
|
|
1598
|
-
handle.agents.some((agent) => agent.info.channels.some((c) => c.kind === "gitlab"))) {
|
|
1599
|
-
process.stdout.write(c.dim(` gitlab: dev accepts unsigned loopback deliveries (${CLI} gitlab replay works without a secret; set GITLAB_WEBHOOK_SECRET to verify X-Gitlab-Token)\n`));
|
|
1600
|
-
}
|
|
1601
|
-
if (opts.dev &&
|
|
1602
|
-
(process.env.BITBUCKET_WEBHOOK_SECRET === undefined ||
|
|
1603
|
-
process.env.BITBUCKET_WEBHOOK_SECRET === "") &&
|
|
1604
|
-
handle.agents.some((agent) => agent.info.channels.some((c) => c.kind === "bitbucket"))) {
|
|
1605
|
-
process.stdout.write(c.dim(` bitbucket: dev accepts unsigned loopback deliveries (${CLI} bitbucket replay works without a secret; set BITBUCKET_WEBHOOK_SECRET to verify X-Hub-Signature)\n`));
|
|
1606
|
-
}
|
|
1607
|
-
if (opts.dev &&
|
|
1608
|
-
(process.env.PAGERDUTY_WEBHOOK_SECRET === undefined ||
|
|
1609
|
-
process.env.PAGERDUTY_WEBHOOK_SECRET === "") &&
|
|
1610
|
-
handle.agents.some((agent) => agent.info.channels.some((c) => c.kind === "pagerduty"))) {
|
|
1611
|
-
process.stdout.write(c.dim(` pagerduty: dev accepts unsigned loopback deliveries (${CLI} pagerduty replay works without a secret; set PAGERDUTY_WEBHOOK_SECRET to verify X-PagerDuty-Signature)\n`));
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
/** Prefer the Vite playground URL in --dev; otherwise the static SPA path. */
|
|
1615
|
-
function resolvePlaygroundBannerUrl(handle, noPlayground) {
|
|
1616
|
-
if (noPlayground) {
|
|
1617
|
-
return undefined;
|
|
1618
|
-
}
|
|
1619
|
-
if (handle.playgroundDevUrl !== undefined) {
|
|
1620
|
-
return handle.playgroundDevUrl.replace(/\/$/, "");
|
|
1621
|
-
}
|
|
1622
|
-
if (handle.agents.length === 1) {
|
|
1623
|
-
return `${handle.agents[0].url}/playground`;
|
|
1624
|
-
}
|
|
1625
|
-
if (handle.agents.length > 1) {
|
|
1626
|
-
return handle.url;
|
|
1627
|
-
}
|
|
1628
|
-
return undefined;
|
|
1629
|
-
}
|
|
1630
|
-
function formatModel(model) {
|
|
1631
|
-
if (model === undefined) {
|
|
1632
|
-
return "(unset)";
|
|
1633
|
-
}
|
|
1634
|
-
if (typeof model === "string") {
|
|
1635
|
-
return model;
|
|
1636
|
-
}
|
|
1637
|
-
return JSON.stringify(model);
|
|
33
|
+
return runCli(COMMANDS, argv, {
|
|
34
|
+
stdout: writeStdout,
|
|
35
|
+
stderr: (text) => void process.stderr.write(text),
|
|
36
|
+
ask: askOnTty,
|
|
37
|
+
});
|
|
1638
38
|
}
|
|
1639
39
|
/**
|
|
1640
40
|
* The Cursor SDK's Connect/HTTP2 client sometimes emits uncaught stream
|
|
@@ -1695,8 +95,10 @@ installTransportErrorGuards();
|
|
|
1695
95
|
registerAuthoredModuleLoaders()
|
|
1696
96
|
.then(() => main(process.argv.slice(2)))
|
|
1697
97
|
.then((code) => {
|
|
1698
|
-
// Ephemeral run/eval can leave SDK/HTTP handles open; force exit.
|
|
1699
|
-
|
|
98
|
+
// Ephemeral run/eval can leave SDK/HTTP handles open; force exit. Exit
|
|
99
|
+
// only after stdout drains: a pipe write is async, so an early exit cuts
|
|
100
|
+
// a --json payload at the pipe buffer (8 KiB under a Node parent).
|
|
101
|
+
process.stdout.write("", () => process.exit(code));
|
|
1700
102
|
}, (error) => {
|
|
1701
103
|
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1702
104
|
process.exit(1);
|