@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
|
@@ -3,20 +3,18 @@
|
|
|
3
3
|
* secrets set|list|unset` — Heroku-style deploys
|
|
4
4
|
* onto Cursor's managed agent-serve hosting.
|
|
5
5
|
*
|
|
6
|
-
* All intelligence is server-side (
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
6
|
+
* All intelligence is server-side. These handlers resolve parameters (credentials, team, slug, the project's
|
|
7
|
+
* `hosting` / `architecture` manifest block), call the v2 agentsdk
|
|
8
|
+
* management API through `deploy-client.ts`, poll status, and render.
|
|
9
|
+
* `deployment`, `stop`, and `delete` keep a v1 fallback so the owner of a
|
|
10
|
+
* live v1 deployment can still see, stop, or remove it.
|
|
11
11
|
*/
|
|
12
12
|
import { basename, relative, resolve } from "node:path";
|
|
13
13
|
import { catchAuthDeclaration, isPublicEndpointPolicy } from "../channels.js";
|
|
14
|
-
import { isCursorAccountTransport, } from "../types.js";
|
|
15
14
|
import { CursorBackendClient } from "./cursor/backend-client.js";
|
|
16
15
|
import { cursorExternalApiUrl, resolveApiKey, SIGN_IN_HINT } from "./cursor/credentials.js";
|
|
17
|
-
import { authorizeCursorAccountConnectors } from "./cursor-account-mcp-auth.js";
|
|
18
16
|
import { readDeployTemplate } from "./cursor-agent-template.js";
|
|
19
|
-
import { AgentServeDeployClient, SEVERAL_AGENTS_DEPLOY_ALONE, DeployApiError,
|
|
17
|
+
import { AgentServeDeployClient, SEVERAL_AGENTS_DEPLOY_ALONE, DeployApiError, SECRET_NOT_FOUND_MESSAGE, TERMINAL_AGENTKIT_DEPLOY_STATUSES, validateDeploymentSlug, } from "./deploy-client.js";
|
|
20
18
|
import { channelCatchSecretNames, channelCredentialSecretNames, channelSecretAlternatives, } from "./deploy-manifest.js";
|
|
21
19
|
import { unmetSecretAlternatives } from "./secret-alternatives.js";
|
|
22
20
|
import { inferDeployGitSource } from "./deploy-source.js";
|
|
@@ -24,7 +22,10 @@ import { describeError } from "./describe-error.js";
|
|
|
24
22
|
import { formatDiagnostics, hasErrorDiagnostics, isAgentProjectDir, listChildAgentDirs, loadAgentProject, } from "./discovery.js";
|
|
25
23
|
import { CLI_COMMAND_NAME as CLI } from "./distribution.js";
|
|
26
24
|
import { isReservedSecretName, isValidCursorEventRepo, validateSettableSecretName, } from "./hosting.js";
|
|
27
|
-
import {
|
|
25
|
+
import { CliError, EXIT_CODE_BY_ERROR, errorCodeForStatus } from "./cli/errors.js";
|
|
26
|
+
import { DEFAULT_LIST_LIMIT, nextPageHint, pageLocally, printJson, printListJson, } from "./cli/output.js";
|
|
27
|
+
import { dryRunActive } from "./dry-run.js";
|
|
28
|
+
import { V1_MIGRATE_HINT } from "./hosted-hints.js";
|
|
28
29
|
import { deployProgressLabel, sanitizeCustomerError } from "./logs-client.js";
|
|
29
30
|
import { sleep } from "./sleep.js";
|
|
30
31
|
import { slugFromDirectoryName } from "./slug.js";
|
|
@@ -32,6 +33,8 @@ import { stderrPalette } from "./terminal-style.js";
|
|
|
32
33
|
const DEFAULT_POLL_INTERVAL_MS = 3_000;
|
|
33
34
|
const DEFAULT_DEPLOY_TIMEOUT_MS = 10 * 60 * 1000;
|
|
34
35
|
const MULTI_COMPONENT_ALLOWED_TEAM_ID = 1;
|
|
36
|
+
/** Server-side v1 deploys are closed; `migrate` moves a v1 project to v2. */
|
|
37
|
+
const V1_DEPLOYS_CLOSED = `Architecture v1 deploys are closed. ${V1_MIGRATE_HINT}`;
|
|
35
38
|
function canPublishAgentsAsOne(teamId) {
|
|
36
39
|
return teamId === MULTI_COMPONENT_ALLOWED_TEAM_ID;
|
|
37
40
|
}
|
|
@@ -45,7 +48,7 @@ export async function resolveDeployAuth(options) {
|
|
|
45
48
|
const resolved = await resolveApiKey(options.apiKey === undefined ? undefined : { apiKey: options.apiKey });
|
|
46
49
|
if (resolved === undefined) {
|
|
47
50
|
err(`Not signed in to Cursor. ${SIGN_IN_HINT}\n`);
|
|
48
|
-
return
|
|
51
|
+
return EXIT_CODE_BY_ERROR.unauthenticated;
|
|
49
52
|
}
|
|
50
53
|
// The deployment management routes live on the external API host
|
|
51
54
|
// (api.cursor.com), not the default backend (api2.cursor.sh) — see
|
|
@@ -60,7 +63,7 @@ export async function resolveDeployAuth(options) {
|
|
|
60
63
|
teamId = Number.parseInt(options.team, 10);
|
|
61
64
|
if (Number.isNaN(teamId) || teamId <= 0) {
|
|
62
65
|
err(`Invalid --team: ${options.team} (expected a positive team id)\n`);
|
|
63
|
-
return
|
|
66
|
+
return EXIT_CODE_BY_ERROR.usage;
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
else {
|
|
@@ -114,6 +117,8 @@ export async function prepare(options) {
|
|
|
114
117
|
apiKey: auth.apiKey,
|
|
115
118
|
backendUrl: auth.backendUrl,
|
|
116
119
|
json: options.json === true,
|
|
120
|
+
fields: options.fields,
|
|
121
|
+
list: { limit: options.limit ?? DEFAULT_LIST_LIMIT, pageToken: options.pageToken },
|
|
117
122
|
noWait: options.noWait === true,
|
|
118
123
|
pollIntervalMs: options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS,
|
|
119
124
|
timeoutMs: options.timeoutMs ?? DEFAULT_DEPLOY_TIMEOUT_MS,
|
|
@@ -144,70 +149,32 @@ export async function cmdDeploy(options) {
|
|
|
144
149
|
for (const target of targets) {
|
|
145
150
|
manifests.push(await readDeployManifest(target.dir));
|
|
146
151
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (!ctx.json) {
|
|
154
|
-
ctx.err(options.all === true
|
|
155
|
-
? deployingAllAgentsLine(options, targets)
|
|
156
|
-
: deployingAsOneApplicationLine(options, targets));
|
|
157
|
-
}
|
|
158
|
-
return deployAgentsdkApplication(ctx, options, targets, {
|
|
159
|
-
// `persistent` is per child agent, like `agentPath`: each release
|
|
160
|
-
// component carries its own.
|
|
161
|
-
componentPersistent: Object.fromEntries(targets.map((target, index) => [target.slug, manifests[index]?.persistent === true])),
|
|
162
|
-
componentImage: Object.fromEntries(targets.flatMap((target, index) => manifests[index]?.image === undefined ? [] : [[target.slug, manifests[index].image]])),
|
|
163
|
-
hasScmChannels: manifests.some((manifest) => manifest.hasScmChannels),
|
|
164
|
-
declaredSecretNames: declaredSecretNames(manifests),
|
|
165
|
-
hasDeploymentsChannels: manifests.some((manifest) => manifest.hasDeploymentsChannels),
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
if (!ctx.json && options.all === true) {
|
|
169
|
-
ctx.err(deployingAllAgentsLine(options, targets));
|
|
170
|
-
}
|
|
171
|
-
if (!ctx.json && manifests.some((manifest) => manifest.architecture === "v2")) {
|
|
172
|
-
ctx.err(`warning: agents under this parent mix architectures; deploying each separately (v2 children become standalone single-component applications).\n`);
|
|
173
|
-
}
|
|
174
|
-
// --path is per-agent (relative to the repo root). When deploying several
|
|
175
|
-
// agents, ignore a shared --path so each target can infer its own path.
|
|
176
|
-
let deployOptions = options;
|
|
177
|
-
if (options.path !== undefined) {
|
|
178
|
-
if (!ctx.json) {
|
|
179
|
-
ctx.err(`warning: ignoring --path ${JSON.stringify(options.path)} for a multi-agent deploy; each agent infers its own path from git.\n`);
|
|
180
|
-
}
|
|
181
|
-
deployOptions = { ...options, path: undefined };
|
|
182
|
-
}
|
|
183
|
-
// Multi-agent batch: deploy sequentially; --json emits an array.
|
|
184
|
-
const jsonResults = [];
|
|
185
|
-
let failures = 0;
|
|
186
|
-
for (const [index, target] of targets.entries()) {
|
|
187
|
-
if (!ctx.json) {
|
|
188
|
-
ctx.err(`\n=== [${index + 1}/${targets.length}] Deploying ${target.slug} ===\n`);
|
|
189
|
-
}
|
|
190
|
-
const before = jsonResults.length;
|
|
191
|
-
const code = await deployOne(ctx, deployOptions, target, {
|
|
192
|
-
jsonCollect: ctx.json ? jsonResults : undefined,
|
|
193
|
-
});
|
|
194
|
-
if (code !== 0) {
|
|
195
|
-
failures += 1;
|
|
196
|
-
if (ctx.json && jsonResults.length === before) {
|
|
197
|
-
jsonResults.push({ slug: target.slug, error: "deploy failed" });
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
if (ctx.json) {
|
|
202
|
-
ctx.out(`${JSON.stringify(jsonResults, null, 2)}\n`);
|
|
203
|
-
}
|
|
204
|
-
else if (failures > 0) {
|
|
205
|
-
ctx.err(`\n${failures} of ${targets.length} deploy(s) failed.\n`);
|
|
152
|
+
const v1Agents = targets.filter((_, index) => manifests[index]?.architecture === "v1");
|
|
153
|
+
if (v1Agents.length > 0) {
|
|
154
|
+
ctx.err(`${V1_DEPLOYS_CLOSED} These agents set architecture: "v1": ${v1Agents
|
|
155
|
+
.map((target) => target.slug)
|
|
156
|
+
.join(", ")}.\n`);
|
|
157
|
+
return 1;
|
|
206
158
|
}
|
|
207
|
-
|
|
208
|
-
|
|
159
|
+
// One team can publish several agents as one deployment. Other teams deploy each agent alone.
|
|
160
|
+
if (!canPublishAgentsAsOne(ctx.teamId)) {
|
|
161
|
+
ctx.err(severalAgentsDeployAloneText(options, targets));
|
|
162
|
+
return 1;
|
|
209
163
|
}
|
|
210
|
-
|
|
164
|
+
if (!ctx.json) {
|
|
165
|
+
ctx.err(options.all === true
|
|
166
|
+
? deployingAllAgentsLine(options, targets)
|
|
167
|
+
: deployingAsOneApplicationLine(options, targets));
|
|
168
|
+
}
|
|
169
|
+
return deployAgentsdkApplication(ctx, options, targets, {
|
|
170
|
+
// `persistent` is per child agent, like `agentPath`: each release
|
|
171
|
+
// component carries its own.
|
|
172
|
+
componentPersistent: Object.fromEntries(targets.map((target, index) => [target.slug, manifests[index]?.persistent])),
|
|
173
|
+
componentImage: Object.fromEntries(targets.flatMap((target, index) => manifests[index]?.image === undefined ? [] : [[target.slug, manifests[index].image]])),
|
|
174
|
+
hasScmChannels: manifests.some((manifest) => manifest.hasScmChannels),
|
|
175
|
+
declaredSecretNames: declaredSecretNames(manifests),
|
|
176
|
+
hasDeploymentsChannels: manifests.some((manifest) => manifest.hasDeploymentsChannels),
|
|
177
|
+
});
|
|
211
178
|
}
|
|
212
179
|
/**
|
|
213
180
|
* Resolve which agent directory(ies) to deploy from `--dir` / `--slug` /
|
|
@@ -334,9 +301,7 @@ async function resolveDeployTargets(options, ctx) {
|
|
|
334
301
|
((agents) => promptChooseDeployTargets(agents, {
|
|
335
302
|
err: ctx.err,
|
|
336
303
|
stdin: options.stdin ?? process.stdin,
|
|
337
|
-
interactive: ctx.json
|
|
338
|
-
(options.stdin ?? process.stdin).isTTY === true &&
|
|
339
|
-
process.stderr.isTTY === true,
|
|
304
|
+
interactive: !ctx.json && (options.stdin ?? process.stdin).isTTY === true && process.stderr.isTTY,
|
|
340
305
|
}));
|
|
341
306
|
const chosen = await chooser(children);
|
|
342
307
|
if (chosen === null) {
|
|
@@ -376,9 +341,6 @@ function copiedDeployFlags(options) {
|
|
|
376
341
|
for (const repo of options.cursorEventsRepos ?? []) {
|
|
377
342
|
parts.push(`--cursor-events-repo ${quoteShell(repo)}`);
|
|
378
343
|
}
|
|
379
|
-
for (const domain of options.allowDomains ?? []) {
|
|
380
|
-
parts.push(`--allow-domain ${quoteShell(domain)}`);
|
|
381
|
-
}
|
|
382
344
|
return parts.length === 0 ? "" : ` ${parts.join(" ")}`;
|
|
383
345
|
}
|
|
384
346
|
function relativeDeployDir(dir) {
|
|
@@ -449,7 +411,7 @@ export async function promptChooseDeployTargets(agents, options) {
|
|
|
449
411
|
}
|
|
450
412
|
const MISSING_DEPLOY_REPO_HINT = `Could not resolve an https:// git repository URL for this deploy.\n` +
|
|
451
413
|
` Pass --repo https://github.com/<owner>/<repo>, https://gitlab.com/<group>/<project>, or an Origin repository URL (inferred from origin when possible).\n`;
|
|
452
|
-
async function deployOne(ctx, options, target
|
|
414
|
+
async function deployOne(ctx, options, target) {
|
|
453
415
|
const { dir, slug } = target;
|
|
454
416
|
// Fill --repo/--ref/--path from the local git checkout when omitted so
|
|
455
417
|
// `agent-sdk deploy` inside an agent directory is enough. Only probe git
|
|
@@ -498,26 +460,17 @@ async function deployOne(ctx, options, target, extras) {
|
|
|
498
460
|
: ` (inferred ${inferredBits.join(", ")} from git; pass --repo/--ref/--path to override)\n`));
|
|
499
461
|
}
|
|
500
462
|
// The package manifest (`defineAgent({ hosting })`) is the source of
|
|
501
|
-
// truth for
|
|
502
|
-
//
|
|
503
|
-
//
|
|
504
|
-
// the channels declared public via `publicEndpoint()`.
|
|
463
|
+
// truth for expected secret names. Directories without an agent project
|
|
464
|
+
// have no manifest and deploy with defaults; the hosted build reads the
|
|
465
|
+
// project from git.
|
|
505
466
|
const manifest = isAgent ? await readDeployManifest(dir) : undefined;
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
const publicRoutePaths = (manifest?.publicChannelIds ?? []).map((channelId) => `/v1/channels/${channelId}`);
|
|
467
|
+
if (manifest?.architecture === "v1") {
|
|
468
|
+
ctx.err(`${V1_DEPLOYS_CLOSED}\n`);
|
|
469
|
+
return 1;
|
|
470
|
+
}
|
|
511
471
|
if (!ctx.json && manifest?.httpChannelPublicEndpoint === true) {
|
|
512
472
|
ctx.err(`warning: publicEndpoint() on the built-in HTTP channel has no effect on hosting — only custom channels (/v1/channels/…) can be public; the session API always requires the alias token.\n`);
|
|
513
473
|
}
|
|
514
|
-
if (!ctx.json && publicRoutePaths.length > 0 && manifest?.architecture !== "v2") {
|
|
515
|
-
// Security-relevant surface change: say exactly what will be reachable
|
|
516
|
-
// without the alias token before the deploy is accepted. v2 registers
|
|
517
|
-
// these routes only after bake, so a relative path here would not be a
|
|
518
|
-
// live webhook URL — the running status prints the absolute one.
|
|
519
|
-
ctx.err(` public: ${publicRoutePaths.join(", ")} (served WITHOUT the alias token — these channels authenticate requests themselves)\n`);
|
|
520
|
-
}
|
|
521
474
|
const extensionEgress = manifest?.extensionEgress ?? [];
|
|
522
475
|
if (!ctx.json && extensionEgress.length > 0) {
|
|
523
476
|
// Mounted packages widen the pod's egress without an agent.ts edit; name
|
|
@@ -532,116 +485,24 @@ async function deployOne(ctx, options, target, extras) {
|
|
|
532
485
|
.map((channelId) => `/v1/channels/${channelId}`)
|
|
533
486
|
.join(", ")}: publicEndpoint() sits beside sharedSecretAuth()/hmacSignatureAuth() — auth chains are any-of, so every request is admitted and those secret policies never run. Drop publicEndpoint() to enforce them, or drop them to make the intent explicit.\n`);
|
|
534
487
|
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}
|
|
539
|
-
return deployOneAgentsdk(ctx, extras, {
|
|
540
|
-
persistent: manifest.persistent,
|
|
541
|
-
image: manifest.image,
|
|
542
|
-
slug,
|
|
543
|
-
gitRepoUrl,
|
|
544
|
-
gitRef,
|
|
545
|
-
agentPath,
|
|
546
|
-
repositories: options.cursorEventsRepos,
|
|
547
|
-
hasScmChannels: manifest.hasScmChannels,
|
|
548
|
-
declaredSecretNames: declaredSecretNames([manifest]),
|
|
549
|
-
hasDeploymentsChannels: manifest.hasDeploymentsChannels,
|
|
550
|
-
multiTenant: options.multiTenant === true,
|
|
551
|
-
template: readDeployTemplate(dir),
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
if (options.multiTenant === true) {
|
|
555
|
-
ctx.err("--multi-tenant is only valid for architecture: v2 deploys (Cursor-managed products).\n");
|
|
556
|
-
return 1;
|
|
557
|
-
}
|
|
558
|
-
// Today's only source shape: the control plane builds from a git ref.
|
|
559
|
-
// See DeploySource for the artifact seam.
|
|
560
|
-
const source = {
|
|
561
|
-
kind: "git-ref",
|
|
562
|
-
gitRepoUrl,
|
|
563
|
-
...(gitRef === undefined ? {} : { gitRef }),
|
|
564
|
-
...(agentPath === undefined ? {} : { agentPath }),
|
|
565
|
-
...(options.cursorEventsRepos === undefined || options.cursorEventsRepos.length === 0
|
|
566
|
-
? {}
|
|
567
|
-
: { cursorEventRepos: options.cursorEventsRepos }),
|
|
568
|
-
...(egressAllowedDomains.length === 0 ? {} : { egressAllowedDomains }),
|
|
569
|
-
publicRoutePaths: publicRoutePaths.length === 0 ? undefined : publicRoutePaths,
|
|
570
|
-
// Deliberately NO manifest here: the control plane captures it from the
|
|
571
|
-
// provisioned engine (`GET /v1/manifest` after the health probe), which
|
|
572
|
-
// is the single write path for deploy manifests. `july manifest` remains
|
|
573
|
-
// available for local visibility only.
|
|
574
|
-
};
|
|
575
|
-
let accepted;
|
|
576
|
-
try {
|
|
577
|
-
accepted = await ctx.client.deploy({
|
|
578
|
-
teamId: ctx.teamId,
|
|
579
|
-
slug,
|
|
580
|
-
source,
|
|
581
|
-
template: readDeployTemplate(dir),
|
|
582
|
-
});
|
|
583
|
-
}
|
|
584
|
-
catch (error) {
|
|
585
|
-
return renderApiError(error, ctx.err);
|
|
586
|
-
}
|
|
587
|
-
const aliasUrl = ctx.client.aliasUrl(accepted.engineAlias);
|
|
588
|
-
if (!ctx.json && accepted.aliasToken !== undefined) {
|
|
589
|
-
ctx.out(aliasTokenBlock(accepted.aliasToken));
|
|
590
|
-
}
|
|
591
|
-
if (ctx.noWait) {
|
|
592
|
-
if (extras?.jsonCollect !== undefined) {
|
|
593
|
-
extras.jsonCollect.push(accepted);
|
|
594
|
-
}
|
|
595
|
-
else if (ctx.json) {
|
|
596
|
-
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
597
|
-
}
|
|
598
|
-
else {
|
|
599
|
-
ctx.out(`Deploy accepted: ${slug} (team ${ctx.teamId}, generation ${accepted.generation}, ${accepted.deploymentKind})\n` +
|
|
600
|
-
` alias: ${aliasUrl}\n` +
|
|
601
|
-
`Check progress with \`${CLI} deployment ${slug} --team ${ctx.teamId}\`.\n`);
|
|
602
|
-
}
|
|
603
|
-
return 0;
|
|
604
|
-
}
|
|
605
|
-
let detail;
|
|
606
|
-
try {
|
|
607
|
-
detail = await pollUntil(ctx, slug, TERMINAL_DEPLOY_STATUSES, () => ctx.client.getDeployment({ teamId: ctx.teamId, slug }));
|
|
608
|
-
}
|
|
609
|
-
catch (error) {
|
|
610
|
-
return renderApiError(error, ctx.err);
|
|
611
|
-
}
|
|
612
|
-
warnMissingSecrets(ctx, slug, declaredSecretNames([manifest]), detail.secretNames);
|
|
613
|
-
const payload = accepted.aliasToken === undefined ? detail : { ...detail, aliasToken: accepted.aliasToken };
|
|
614
|
-
if (extras?.jsonCollect !== undefined) {
|
|
615
|
-
extras.jsonCollect.push(payload);
|
|
616
|
-
return detail.status === "running" ? 0 : 1;
|
|
617
|
-
}
|
|
618
|
-
if (ctx.json) {
|
|
619
|
-
ctx.out(`${JSON.stringify(payload, null, 2)}\n`);
|
|
620
|
-
return detail.status === "running" ? 0 : 1;
|
|
621
|
-
}
|
|
622
|
-
if (detail.status !== "running") {
|
|
623
|
-
ctx.err(`Deployment ${slug} ended ${detail.status}${deployFailureDetail(detail.lastError)}\n`);
|
|
624
|
-
return 1;
|
|
488
|
+
const persistent = manifest?.persistent === true;
|
|
489
|
+
if (!ctx.json) {
|
|
490
|
+
ctx.err(` architecture: v2${persistent ? " (persistent)" : ""}${manifest?.image === undefined ? "" : `\n image: ${manifest.image}`}\n`);
|
|
625
491
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
` generation: ${detail.generation}\n` +
|
|
630
|
-
` kind: ${detail.deploymentKind}\n` +
|
|
631
|
-
` alias: ${aliasUrl}\n` +
|
|
632
|
-
` playground: ${aliasUrl}/playground (sign in with the alias token)\n` +
|
|
633
|
-
` open: ${CLI} playground --prod --slug ${slug} --team ${ctx.teamId}\n` +
|
|
634
|
-
// Paste-ready webhook URLs: these subtrees skip the alias token, so
|
|
635
|
-
// the channel handler must verify deliveries (webhook signatures).
|
|
636
|
-
deployedPublicRoutes
|
|
637
|
-
.map((path) => ` public: ${aliasUrl}${path} (no alias token)\n`)
|
|
638
|
-
.join(""));
|
|
639
|
-
await runPostDeployConnectorAuth(ctx, options, {
|
|
492
|
+
return deployOneAgentsdk(ctx, {
|
|
493
|
+
persistent,
|
|
494
|
+
image: manifest?.image,
|
|
640
495
|
slug,
|
|
641
|
-
|
|
642
|
-
|
|
496
|
+
gitRepoUrl,
|
|
497
|
+
gitRef,
|
|
498
|
+
agentPath,
|
|
499
|
+
repositories: options.cursorEventsRepos,
|
|
500
|
+
hasScmChannels: manifest?.hasScmChannels === true,
|
|
501
|
+
declaredSecretNames: declaredSecretNames([manifest]),
|
|
502
|
+
hasDeploymentsChannels: manifest?.hasDeploymentsChannels === true,
|
|
503
|
+
multiTenant: options.multiTenant === true,
|
|
504
|
+
template: readDeployTemplate(dir),
|
|
643
505
|
});
|
|
644
|
-
return 0;
|
|
645
506
|
}
|
|
646
507
|
/**
|
|
647
508
|
* Multi-agent parent whose children all declare `architecture: "v2"`:
|
|
@@ -685,7 +546,7 @@ async function deployAgentsdkApplication(ctx, options, targets, declarations) {
|
|
|
685
546
|
agentPath: [parentPath, basename(target.dir)]
|
|
686
547
|
.filter((part) => part !== undefined && part !== "")
|
|
687
548
|
.join("/"),
|
|
688
|
-
persistent: declarations.componentPersistent[target.slug]
|
|
549
|
+
persistent: declarations.componentPersistent[target.slug],
|
|
689
550
|
image: declarations.componentImage[target.slug],
|
|
690
551
|
}));
|
|
691
552
|
if (!ctx.json) {
|
|
@@ -696,7 +557,7 @@ async function deployAgentsdkApplication(ctx, options, targets, declarations) {
|
|
|
696
557
|
.map((component) => ` component: ${component.componentKey} (${component.agentPath ?? "."})${component.persistent ? " persistent" : ""}${component.image === undefined ? "" : ` image ${component.image}`}\n`)
|
|
697
558
|
.join(""));
|
|
698
559
|
}
|
|
699
|
-
return deployOneAgentsdk(ctx,
|
|
560
|
+
return deployOneAgentsdk(ctx, {
|
|
700
561
|
// Multi-component: the flag travels on each component instead.
|
|
701
562
|
persistent: false,
|
|
702
563
|
slug,
|
|
@@ -716,7 +577,7 @@ async function deployAgentsdkApplication(ctx, options, targets, declarations) {
|
|
|
716
577
|
* `architecture: "v2"` deploy: POST `/internal/agentsdk/deployments` and
|
|
717
578
|
* poll the matching GET.
|
|
718
579
|
*/
|
|
719
|
-
async function deployOneAgentsdk(ctx,
|
|
580
|
+
async function deployOneAgentsdk(ctx, args) {
|
|
720
581
|
const { slug } = args;
|
|
721
582
|
const componentsLine = args.components === undefined
|
|
722
583
|
? ""
|
|
@@ -741,7 +602,7 @@ async function deployOneAgentsdk(ctx, extras, args) {
|
|
|
741
602
|
});
|
|
742
603
|
}
|
|
743
604
|
catch (error) {
|
|
744
|
-
|
|
605
|
+
throw apiError(error, {
|
|
745
606
|
multiTenant: args.multiTenant,
|
|
746
607
|
teamId: ctx.teamId,
|
|
747
608
|
});
|
|
@@ -750,10 +611,7 @@ async function deployOneAgentsdk(ctx, extras, args) {
|
|
|
750
611
|
ctx.out(aliasTokenBlock(accepted.aliasToken));
|
|
751
612
|
}
|
|
752
613
|
if (ctx.noWait) {
|
|
753
|
-
if (
|
|
754
|
-
extras.jsonCollect.push(accepted);
|
|
755
|
-
}
|
|
756
|
-
else if (ctx.json) {
|
|
614
|
+
if (ctx.json) {
|
|
757
615
|
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
758
616
|
}
|
|
759
617
|
else {
|
|
@@ -770,13 +628,9 @@ async function deployOneAgentsdk(ctx, extras, args) {
|
|
|
770
628
|
detail = await pollUntil(ctx, slug, TERMINAL_AGENTKIT_DEPLOY_STATUSES, () => ctx.client.getAgentkitDeploy({ teamId: ctx.teamId, slug }));
|
|
771
629
|
}
|
|
772
630
|
catch (error) {
|
|
773
|
-
|
|
631
|
+
throw apiError(error);
|
|
774
632
|
}
|
|
775
633
|
const payload = { ...detail, aliasToken: accepted.aliasToken };
|
|
776
|
-
if (extras?.jsonCollect !== undefined) {
|
|
777
|
-
extras.jsonCollect.push(payload);
|
|
778
|
-
return detail.status === "running" ? 0 : 1;
|
|
779
|
-
}
|
|
780
634
|
if (ctx.json) {
|
|
781
635
|
ctx.out(`${JSON.stringify(payload, null, 2)}\n`);
|
|
782
636
|
return detail.status === "running" ? 0 : 1;
|
|
@@ -819,69 +673,9 @@ async function deployOneAgentsdk(ctx, extras, args) {
|
|
|
819
673
|
}
|
|
820
674
|
return 0;
|
|
821
675
|
}
|
|
822
|
-
/**
|
|
823
|
-
* Post-deploy connector authorization for `cursorAccount` connections: the
|
|
824
|
-
* agent's connectors execute with tokens owned by the deployment's service
|
|
825
|
-
* account, which start out unauthorized. On a TTY this runs the dashboard's
|
|
826
|
-
* Authenticate flow inline (browser OAuth per connector, already-authorized
|
|
827
|
-
* ones skipped); otherwise it reports status only. Never affects the deploy
|
|
828
|
-
* outcome — anything left unauthorized just gets a playground-page pointer.
|
|
829
|
-
*/
|
|
830
|
-
async function runPostDeployConnectorAuth(ctx, options, args) {
|
|
831
|
-
if (args.connections.length === 0) {
|
|
832
|
-
return;
|
|
833
|
-
}
|
|
834
|
-
const { serviceAccountId } = args;
|
|
835
|
-
if (serviceAccountId === undefined) {
|
|
836
|
-
ctx.err(`warning: this agent uses Cursor account connectors, but the deployment has no service account; redeploy to mint one.\n`);
|
|
837
|
-
return;
|
|
838
|
-
}
|
|
839
|
-
const backendClient = new CursorBackendClient({
|
|
840
|
-
backendUrl: ctx.backendUrl,
|
|
841
|
-
apiKey: ctx.apiKey,
|
|
842
|
-
fetchImpl: options.fetchImpl,
|
|
843
|
-
});
|
|
844
|
-
const interactive = options.openBrowserImpl !== undefined ||
|
|
845
|
-
(process.stdout.isTTY === true && process.stdin.isTTY === true);
|
|
846
|
-
let anyUnauthorized = false;
|
|
847
|
-
for (const ref of args.connections) {
|
|
848
|
-
ctx.out(`\nThis agent uses Cursor account connectors (connection "${ref.name}"${ref.servers === undefined || ref.servers.length === 0 ? "" : `: ${ref.servers.join(", ")}`}).\n`);
|
|
849
|
-
try {
|
|
850
|
-
const result = await authorizeCursorAccountConnectors({
|
|
851
|
-
backendClient,
|
|
852
|
-
teamId: ctx.teamId,
|
|
853
|
-
slug: args.slug,
|
|
854
|
-
serviceAccountId,
|
|
855
|
-
connectionName: ref.name,
|
|
856
|
-
servers: ref.servers,
|
|
857
|
-
interactive,
|
|
858
|
-
out: ctx.out,
|
|
859
|
-
err: ctx.err,
|
|
860
|
-
openBrowserImpl: options.openBrowserImpl,
|
|
861
|
-
sleep: options.sleepImpl,
|
|
862
|
-
pollIntervalMs: options.connectorPollIntervalMs,
|
|
863
|
-
pollTimeoutMs: options.connectorPollTimeoutMs,
|
|
864
|
-
});
|
|
865
|
-
if (result.pending.length > 0 || result.errored.length > 0) {
|
|
866
|
-
anyUnauthorized = true;
|
|
867
|
-
if (result.pending.length > 0) {
|
|
868
|
-
ctx.out(`Connectors not authorized yet: ${result.pending.join(", ")}.\n`);
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
catch (error) {
|
|
873
|
-
anyUnauthorized = true;
|
|
874
|
-
ctx.err(`warning: could not check connector authorization for "${ref.name}": ${describeError(error)}\n`);
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
if (anyUnauthorized) {
|
|
878
|
-
ctx.out(`You can authorize connectors at the playground page (cursor.com dashboard → Deployed Agents → ${args.slug}) or with \`${CLI} mcp oauth <connection>\`.\n`);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
676
|
/**
|
|
882
677
|
* Read the deploy-relevant bits of the project manifest at `dir` in one
|
|
883
|
-
* load: the `hosting` block,
|
|
884
|
-
* channels declared public via `publicEndpoint()`.
|
|
678
|
+
* load: the `hosting` block, declared secrets, and channel warnings.
|
|
885
679
|
*/
|
|
886
680
|
async function readDeployManifest(dir) {
|
|
887
681
|
const project = await loadAgentProject(dir);
|
|
@@ -896,12 +690,6 @@ async function readDeployManifest(dir) {
|
|
|
896
690
|
architecture: project.agent.architecture,
|
|
897
691
|
persistent: project.agent.persistent === true,
|
|
898
692
|
image: project.agent.hosting?.image,
|
|
899
|
-
cursorAccountConnections: project.agent.connections.flatMap((connection) => isCursorAccountTransport(connection.transport)
|
|
900
|
-
? [{ name: connection.name, servers: connection.transport.servers }]
|
|
901
|
-
: []),
|
|
902
|
-
publicChannelIds: project.channels
|
|
903
|
-
.filter((channel) => (channel.definition.auth ?? []).some(isPublicEndpointPolicy))
|
|
904
|
-
.map((channel) => channel.id),
|
|
905
693
|
publicChannelIdsWithDeadSecretPolicies: project.channels
|
|
906
694
|
.filter((channel) => {
|
|
907
695
|
const auth = channel.definition.auth ?? [];
|
|
@@ -957,7 +745,7 @@ function declaredSecretNames(manifests) {
|
|
|
957
745
|
function warnMissingSecrets(ctx, slug, declared, set) {
|
|
958
746
|
for (const group of unmetSecretAlternatives(declared?.alternatives ?? [], set)) {
|
|
959
747
|
ctx.err(`warning: none of ${group.names.join(", ")} is set on ${slug}: ${group.unsetEffect}\n` +
|
|
960
|
-
` set one with \`${CLI}
|
|
748
|
+
` set one with \`${CLI} secret set ${slug} ${group.names[0]}\`\n`);
|
|
961
749
|
}
|
|
962
750
|
if (declared === undefined || declared.names.length === 0) {
|
|
963
751
|
return;
|
|
@@ -970,7 +758,7 @@ function warnMissingSecrets(ctx, slug, declared, set) {
|
|
|
970
758
|
return;
|
|
971
759
|
}
|
|
972
760
|
ctx.err(`warning: secrets declared in the agent manifest but not set on ${slug}: ${missing.join(", ")}\n` +
|
|
973
|
-
` set them with \`${CLI}
|
|
761
|
+
` set them with \`${CLI} secret set ${slug} ${missing.join(" ")}\`\n`);
|
|
974
762
|
}
|
|
975
763
|
// ============================================================================
|
|
976
764
|
// deployments (list)
|
|
@@ -980,55 +768,40 @@ export async function cmdDeployments(options) {
|
|
|
980
768
|
if (typeof ctx === "number") {
|
|
981
769
|
return ctx;
|
|
982
770
|
}
|
|
983
|
-
let
|
|
771
|
+
let page;
|
|
984
772
|
try {
|
|
985
|
-
|
|
986
|
-
}
|
|
987
|
-
catch (error) {
|
|
988
|
-
return renderApiError(error, ctx.err);
|
|
989
|
-
}
|
|
990
|
-
let applications = [];
|
|
991
|
-
try {
|
|
992
|
-
applications = await ctx.client.listAgentkitDeployments({
|
|
773
|
+
page = await ctx.client.listAgentkitDeploymentsPage({
|
|
993
774
|
teamId: ctx.teamId,
|
|
775
|
+
pageSize: ctx.list.limit,
|
|
776
|
+
pageToken: ctx.list.pageToken,
|
|
994
777
|
});
|
|
995
778
|
}
|
|
996
779
|
catch (error) {
|
|
997
|
-
|
|
998
|
-
if (!(error instanceof DeployApiError && error.status === 404)) {
|
|
999
|
-
return renderApiError(error, ctx.err);
|
|
1000
|
-
}
|
|
780
|
+
throw apiError(error);
|
|
1001
781
|
}
|
|
1002
782
|
if (ctx.json) {
|
|
1003
|
-
|
|
1004
|
-
ctx.out(`${JSON.stringify(applications.length === 0 ? { deployments } : { deployments, applications }, null, 2)}\n`);
|
|
783
|
+
printListJson({ items: page.deployments, nextPageToken: page.nextPageToken }, { fields: ctx.fields, write: ctx.out });
|
|
1005
784
|
return 0;
|
|
1006
785
|
}
|
|
1007
|
-
if (deployments.length === 0
|
|
1008
|
-
|
|
786
|
+
if (page.deployments.length === 0) {
|
|
787
|
+
// Past the last page the team can still have deployments.
|
|
788
|
+
ctx.out(ctx.list.pageToken === undefined
|
|
789
|
+
? `No deployments on team ${ctx.teamId}. Create one with \`${CLI} deploy\`.\n`
|
|
790
|
+
: "No more deployments.\n");
|
|
1009
791
|
return 0;
|
|
1010
792
|
}
|
|
1011
|
-
ctx.out(`${renderTable(["SLUG", "
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
application.status,
|
|
1024
|
-
"-",
|
|
1025
|
-
"application",
|
|
1026
|
-
application.deployments
|
|
1027
|
-
.map((row) => row.desiredUpdatedAt)
|
|
1028
|
-
.sort()
|
|
1029
|
-
.at(-1) ?? "",
|
|
1030
|
-
]),
|
|
1031
|
-
])}\n`);
|
|
793
|
+
ctx.out(`${renderTable(["SLUG", "STATUS", "UPDATED"], page.deployments.map((application) => [
|
|
794
|
+
application.slug,
|
|
795
|
+
application.status,
|
|
796
|
+
application.deployments
|
|
797
|
+
.map((row) => row.desiredUpdatedAt)
|
|
798
|
+
.sort()
|
|
799
|
+
.at(-1) ?? "",
|
|
800
|
+
]))}\n`);
|
|
801
|
+
const hint = nextPageHint(page.nextPageToken);
|
|
802
|
+
if (hint !== undefined) {
|
|
803
|
+
ctx.err(hint);
|
|
804
|
+
}
|
|
1032
805
|
return 0;
|
|
1033
806
|
}
|
|
1034
807
|
// ============================================================================
|
|
@@ -1036,16 +809,15 @@ export async function cmdDeployments(options) {
|
|
|
1036
809
|
// ============================================================================
|
|
1037
810
|
export async function cmdDeploymentStatus(slug, options) {
|
|
1038
811
|
if (slug === undefined || slug === "") {
|
|
1039
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment <slug> [--team <id>] [--json]\n`);
|
|
812
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment get <slug> [--team <id>] [--json]\n`);
|
|
1040
813
|
return 1;
|
|
1041
814
|
}
|
|
1042
815
|
const ctx = await prepare(options);
|
|
1043
816
|
if (typeof ctx === "number") {
|
|
1044
817
|
return ctx;
|
|
1045
818
|
}
|
|
1046
|
-
//
|
|
1047
|
-
//
|
|
1048
|
-
// through to the v1 agent-serve detail.
|
|
819
|
+
// v1 409s architecture-v2 slugs, so the v2 GET goes first. A v2 404 falls
|
|
820
|
+
// through to the v1 detail: the exit ramp for a deployment not yet on v2.
|
|
1049
821
|
try {
|
|
1050
822
|
const detail = await ctx.client.getAgentkitDeploy({
|
|
1051
823
|
teamId: ctx.teamId,
|
|
@@ -1056,7 +828,7 @@ export async function cmdDeploymentStatus(slug, options) {
|
|
|
1056
828
|
}
|
|
1057
829
|
catch (error) {
|
|
1058
830
|
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
1059
|
-
|
|
831
|
+
throw apiError(error);
|
|
1060
832
|
}
|
|
1061
833
|
}
|
|
1062
834
|
let detail;
|
|
@@ -1064,65 +836,26 @@ export async function cmdDeploymentStatus(slug, options) {
|
|
|
1064
836
|
detail = await ctx.client.getDeployment({ teamId: ctx.teamId, slug });
|
|
1065
837
|
}
|
|
1066
838
|
catch (error) {
|
|
1067
|
-
|
|
839
|
+
throw apiError(error);
|
|
1068
840
|
}
|
|
1069
841
|
if (ctx.json) {
|
|
1070
|
-
|
|
1071
|
-
return 0;
|
|
1072
|
-
}
|
|
1073
|
-
const aliasUrl = ctx.client.aliasUrl(detail.engineAlias);
|
|
1074
|
-
const lines = [`${detail.slug} (team ${detail.teamId})`, ` status: ${detail.status}`];
|
|
1075
|
-
if (detail.progress !== undefined) {
|
|
1076
|
-
lines.push(` progress: ${detail.progress}`);
|
|
1077
|
-
}
|
|
1078
|
-
if (detail.statusMessage !== null &&
|
|
1079
|
-
detail.statusMessage !== undefined &&
|
|
1080
|
-
detail.statusMessage.trim() !== "") {
|
|
1081
|
-
lines.push(` step: ${detail.statusMessage}`);
|
|
1082
|
-
}
|
|
1083
|
-
lines.push(` generation: ${detail.generation}`, ` kind: ${detail.deploymentKind}`, ` alias: ${aliasUrl}`, ` playground: ${aliasUrl}/playground`);
|
|
1084
|
-
if (detail.gitRepoUrl !== null && detail.gitRepoUrl !== undefined) {
|
|
1085
|
-
lines.push(` repo: ${detail.gitRepoUrl} @ ${detail.gitRef ?? ""}`);
|
|
842
|
+
printJson({ ...detail, architecture: "v1" }, { fields: ctx.fields, write: ctx.out });
|
|
1086
843
|
}
|
|
1087
|
-
|
|
1088
|
-
lines
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
if (detail.egressAllowedDomains !== undefined && detail.egressAllowedDomains.length > 0) {
|
|
1096
|
-
lines.push(` egress: ${detail.egressAllowedDomains.join(", ")}`);
|
|
1097
|
-
}
|
|
1098
|
-
if (detail.publicRoutePaths !== undefined && detail.publicRoutePaths.length > 0) {
|
|
1099
|
-
// Served through the alias WITHOUT X-Agent-Alias-Token (the channel
|
|
1100
|
-
// authenticates deliveries itself).
|
|
1101
|
-
for (const path of detail.publicRoutePaths) {
|
|
1102
|
-
lines.push(` public: ${aliasUrl}${path} (no alias token)`);
|
|
844
|
+
else {
|
|
845
|
+
const lines = [
|
|
846
|
+
`${detail.slug} (team ${detail.teamId})`,
|
|
847
|
+
` status: ${detail.status}`,
|
|
848
|
+
` architecture: v1`,
|
|
849
|
+
];
|
|
850
|
+
if (detail.lastError !== null && detail.lastError !== undefined) {
|
|
851
|
+
lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
|
|
1103
852
|
}
|
|
853
|
+
if (detail.desiredUpdatedAt !== undefined) {
|
|
854
|
+
lines.push(` updated: ${detail.desiredUpdatedAt}`);
|
|
855
|
+
}
|
|
856
|
+
ctx.out(`${lines.join("\n")}\n`);
|
|
1104
857
|
}
|
|
1105
|
-
|
|
1106
|
-
lines.push(` secrets: ${detail.secretNames.join(", ")}`);
|
|
1107
|
-
}
|
|
1108
|
-
if (detail.podCredentialMaskedKey !== undefined && detail.podCredentialMaskedKey !== null) {
|
|
1109
|
-
lines.push(` pod credential: ${detail.podCredentialMaskedKey}`);
|
|
1110
|
-
}
|
|
1111
|
-
if (detail.engineUrl !== null && detail.engineUrl !== undefined) {
|
|
1112
|
-
lines.push(` engine: ${detail.engineUrl}`);
|
|
1113
|
-
}
|
|
1114
|
-
if (detail.engineAccess !== null &&
|
|
1115
|
-
detail.engineAccess !== undefined &&
|
|
1116
|
-
typeof detail.engineAccess === "object") {
|
|
1117
|
-
lines.push(` engine access: ${detail.engineAccess.url} (expires ${detail.engineAccess.expiresAt})`);
|
|
1118
|
-
}
|
|
1119
|
-
if (detail.lastError !== null && detail.lastError !== undefined) {
|
|
1120
|
-
lines.push(` last error: ${sanitizeCustomerError(detail.lastError)}`);
|
|
1121
|
-
}
|
|
1122
|
-
if (detail.desiredUpdatedAt !== undefined) {
|
|
1123
|
-
lines.push(` updated: ${detail.desiredUpdatedAt}`);
|
|
1124
|
-
}
|
|
1125
|
-
ctx.out(`${lines.join("\n")}\n`);
|
|
858
|
+
ctx.err(`${V1_MIGRATE_HINT}\n`);
|
|
1126
859
|
return 0;
|
|
1127
860
|
}
|
|
1128
861
|
/**
|
|
@@ -1143,7 +876,7 @@ function livePublicWebhookLines(ctx, detail) {
|
|
|
1143
876
|
}
|
|
1144
877
|
function renderAgentkitDeploymentStatus(ctx, detail) {
|
|
1145
878
|
if (ctx.json) {
|
|
1146
|
-
|
|
879
|
+
printJson(detail, { fields: ctx.fields, write: ctx.out });
|
|
1147
880
|
return;
|
|
1148
881
|
}
|
|
1149
882
|
const lines = [
|
|
@@ -1177,18 +910,17 @@ function renderAgentkitDeploymentStatus(ctx, detail) {
|
|
|
1177
910
|
// ============================================================================
|
|
1178
911
|
export async function cmdStop(slug, options) {
|
|
1179
912
|
if (slug === undefined || slug === "") {
|
|
1180
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} stop <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
913
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment stop <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
1181
914
|
return 1;
|
|
1182
915
|
}
|
|
1183
916
|
const ctx = await prepare(options);
|
|
1184
917
|
if (typeof ctx === "number") {
|
|
1185
918
|
return ctx;
|
|
1186
919
|
}
|
|
1187
|
-
// Stop takes only a slug, so there is no manifest to dispatch on
|
|
1188
|
-
//
|
|
1189
|
-
//
|
|
1190
|
-
//
|
|
1191
|
-
// the `/internal/agentsdk` mount) falls back to the v1 stop.
|
|
920
|
+
// Stop takes only a slug, so there is no manifest to dispatch on. The v2
|
|
921
|
+
// agentsdk control plane goes first: v1 endpoints refuse `architecture:
|
|
922
|
+
// "v2"` slugs with a 409 rather than a 404. A v2 404 falls back to the v1
|
|
923
|
+
// stop, the exit ramp for a deployment not yet on v2.
|
|
1192
924
|
let architecture = "v2";
|
|
1193
925
|
let accepted;
|
|
1194
926
|
try {
|
|
@@ -1200,7 +932,7 @@ export async function cmdStop(slug, options) {
|
|
|
1200
932
|
}
|
|
1201
933
|
catch (error) {
|
|
1202
934
|
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
1203
|
-
|
|
935
|
+
throw apiError(error);
|
|
1204
936
|
}
|
|
1205
937
|
if (options.cancelRuns === true) {
|
|
1206
938
|
ctx.err(`Canceling active runs while stopping is supported only for Agent SDK v2 deployments.\n`);
|
|
@@ -1211,7 +943,7 @@ export async function cmdStop(slug, options) {
|
|
|
1211
943
|
architecture = "v1";
|
|
1212
944
|
}
|
|
1213
945
|
catch (v1Error) {
|
|
1214
|
-
|
|
946
|
+
throw apiError(v1Error);
|
|
1215
947
|
}
|
|
1216
948
|
}
|
|
1217
949
|
const cancellation = "cancellation" in accepted ? accepted.cancellation : undefined;
|
|
@@ -1235,13 +967,14 @@ export async function cmdStop(slug, options) {
|
|
|
1235
967
|
: await pollUntil(ctx, slug, new Set(["stopped"]), () => ctx.client.getDeployment({ teamId: ctx.teamId, slug }));
|
|
1236
968
|
}
|
|
1237
969
|
catch (error) {
|
|
1238
|
-
|
|
970
|
+
throw apiError(error);
|
|
1239
971
|
}
|
|
1240
972
|
if (ctx.json) {
|
|
1241
|
-
|
|
973
|
+
// One document: the cancellation result rides along with the detail.
|
|
974
|
+
ctx.out(`${JSON.stringify(cancellation === undefined ? detail : { ...detail, cancellation }, null, 2)}\n`);
|
|
1242
975
|
}
|
|
1243
976
|
else if (stoppedGlobally) {
|
|
1244
|
-
ctx.out(`Stopped ${slug} across all tenants (team ${ctx.teamId}); resume with \`${CLI} start ${slug}\`.\n`);
|
|
977
|
+
ctx.out(`Stopped ${slug} across all tenants (team ${ctx.teamId}); resume with \`${CLI} deployment start ${slug}\`.\n`);
|
|
1245
978
|
}
|
|
1246
979
|
else {
|
|
1247
980
|
ctx.out(`Stopped ${slug} (team ${ctx.teamId}).\n`);
|
|
@@ -1252,19 +985,21 @@ export async function cmdStop(slug, options) {
|
|
|
1252
985
|
return 0;
|
|
1253
986
|
}
|
|
1254
987
|
function writeCancellationStarted(ctx, cancellation, slug) {
|
|
1255
|
-
ctx.
|
|
1256
|
-
|
|
1257
|
-
|
|
988
|
+
if (!ctx.json) {
|
|
989
|
+
ctx.out(`Started cancellation across ${cancellation.batchesStarted} deployment batch(es).\n`);
|
|
990
|
+
if (cancellation.sessionsMarkedFailed !== undefined) {
|
|
991
|
+
ctx.out(`Marked ${cancellation.sessionsMarkedFailed} factory session(s) failed.\n`);
|
|
992
|
+
}
|
|
1258
993
|
}
|
|
1259
994
|
if (cancellation.failed > 0) {
|
|
1260
|
-
ctx.err(`Failed to start ${cancellation.failed} cancellation batch(es); retry with \`${CLI} cancel-runs ${slug}\`.\n`);
|
|
995
|
+
ctx.err(`Failed to start ${cancellation.failed} cancellation batch(es); retry with \`${CLI} deployment cancel-runs ${slug}\`.\n`);
|
|
1261
996
|
return 1;
|
|
1262
997
|
}
|
|
1263
998
|
return 0;
|
|
1264
999
|
}
|
|
1265
1000
|
export async function cmdStart(slug, options) {
|
|
1266
1001
|
if (slug === undefined || slug === "") {
|
|
1267
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} start <slug> [--team <id>] [--json]\n`);
|
|
1002
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment start <slug> [--team <id>] [--json]\n`);
|
|
1268
1003
|
return 1;
|
|
1269
1004
|
}
|
|
1270
1005
|
const ctx = await prepare(options);
|
|
@@ -1285,12 +1020,12 @@ export async function cmdStart(slug, options) {
|
|
|
1285
1020
|
return 0;
|
|
1286
1021
|
}
|
|
1287
1022
|
catch (error) {
|
|
1288
|
-
|
|
1023
|
+
throw apiError(error);
|
|
1289
1024
|
}
|
|
1290
1025
|
}
|
|
1291
1026
|
export async function cmdKill(slug, options) {
|
|
1292
1027
|
if (slug === undefined || slug === "") {
|
|
1293
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} kill <slug> [--team <id>] [--json]\n`);
|
|
1028
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment kill <slug> [--team <id>] [--json]\n`);
|
|
1294
1029
|
return 1;
|
|
1295
1030
|
}
|
|
1296
1031
|
const ctx = await prepare(options);
|
|
@@ -1302,7 +1037,7 @@ export async function cmdKill(slug, options) {
|
|
|
1302
1037
|
accepted = await ctx.client.killAgentkit({ teamId: ctx.teamId, slug });
|
|
1303
1038
|
}
|
|
1304
1039
|
catch (error) {
|
|
1305
|
-
|
|
1040
|
+
throw apiError(error);
|
|
1306
1041
|
}
|
|
1307
1042
|
if (ctx.json) {
|
|
1308
1043
|
ctx.out(`${JSON.stringify(accepted, null, 2)}\n`);
|
|
@@ -1311,8 +1046,7 @@ export async function cmdKill(slug, options) {
|
|
|
1311
1046
|
ctx.out(accepted.scope === "global"
|
|
1312
1047
|
? `Killed ${slug} across all tenants (team ${ctx.teamId}): deploys locked, admission stopped.\n`
|
|
1313
1048
|
: `Killed ${slug} (team ${ctx.teamId}): deploys locked, admission stopped.\n`);
|
|
1314
|
-
ctx.out(`Resume traffic with \`${CLI} unlock
|
|
1315
|
-
ctx.out(`Unlock deploys with \`${CLI} unlock-deploys ${slug}\`.\n`);
|
|
1049
|
+
ctx.out(`Resume traffic with \`${CLI} deployment unlock ${slug}\` then \`${CLI} deployment start ${slug}\`.\n`);
|
|
1316
1050
|
}
|
|
1317
1051
|
if (accepted.cancellation !== undefined) {
|
|
1318
1052
|
return writeCancellationStarted(ctx, accepted.cancellation, slug);
|
|
@@ -1321,7 +1055,7 @@ export async function cmdKill(slug, options) {
|
|
|
1321
1055
|
}
|
|
1322
1056
|
export async function cmdUnlockDeploys(slug, options) {
|
|
1323
1057
|
if (slug === undefined || slug === "") {
|
|
1324
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} unlock
|
|
1058
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment unlock <slug> [--team <id>] [--json]\n`);
|
|
1325
1059
|
return 1;
|
|
1326
1060
|
}
|
|
1327
1061
|
const ctx = await prepare(options);
|
|
@@ -1342,12 +1076,12 @@ export async function cmdUnlockDeploys(slug, options) {
|
|
|
1342
1076
|
return 0;
|
|
1343
1077
|
}
|
|
1344
1078
|
catch (error) {
|
|
1345
|
-
|
|
1079
|
+
throw apiError(error);
|
|
1346
1080
|
}
|
|
1347
1081
|
}
|
|
1348
1082
|
export async function cmdCancelRuns(slug, options) {
|
|
1349
1083
|
if (slug === undefined || slug === "") {
|
|
1350
|
-
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI} cancel-runs <slug> [--team <id>] [--json]\n`);
|
|
1084
|
+
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI} deployment cancel-runs <slug> [--team <id>] [--json]\n`);
|
|
1351
1085
|
return 1;
|
|
1352
1086
|
}
|
|
1353
1087
|
const ctx = await prepare(options);
|
|
@@ -1362,7 +1096,7 @@ export async function cmdCancelRuns(slug, options) {
|
|
|
1362
1096
|
});
|
|
1363
1097
|
}
|
|
1364
1098
|
catch (error) {
|
|
1365
|
-
|
|
1099
|
+
throw apiError(error);
|
|
1366
1100
|
}
|
|
1367
1101
|
if (ctx.json) {
|
|
1368
1102
|
ctx.out(`${JSON.stringify(result, null, 2)}\n`);
|
|
@@ -1384,7 +1118,7 @@ export async function cmdCancelRuns(slug, options) {
|
|
|
1384
1118
|
// ============================================================================
|
|
1385
1119
|
export async function cmdEventRepos(slug, repositories, options) {
|
|
1386
1120
|
if (slug === undefined || slug === "") {
|
|
1387
|
-
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI}
|
|
1121
|
+
(options.err ?? ((text) => void process.stderr.write(text)))(`Usage: ${CLI} deployment update <slug> --event-repo <owner/name>... [--team <id>] [--json]\n`);
|
|
1388
1122
|
return 1;
|
|
1389
1123
|
}
|
|
1390
1124
|
const ctx = await prepare(options);
|
|
@@ -1400,7 +1134,7 @@ export async function cmdEventRepos(slug, repositories, options) {
|
|
|
1400
1134
|
});
|
|
1401
1135
|
}
|
|
1402
1136
|
catch (error) {
|
|
1403
|
-
|
|
1137
|
+
throw apiError(error);
|
|
1404
1138
|
}
|
|
1405
1139
|
if (ctx.json) {
|
|
1406
1140
|
ctx.out(`${JSON.stringify({ repositories: configured }, null, 2)}\n`);
|
|
@@ -1420,14 +1154,14 @@ export async function cmdEventRepos(slug, repositories, options) {
|
|
|
1420
1154
|
const RELEASE_ID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
1421
1155
|
export async function cmdUpgrade(args, options) {
|
|
1422
1156
|
return cmdPinRelease(args, options, {
|
|
1423
|
-
usage: `Usage: ${CLI} upgrade <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1157
|
+
usage: `Usage: ${CLI} deployment upgrade <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1424
1158
|
pin: (client, request) => client.upgradeAgentkitInstall(request),
|
|
1425
1159
|
success: (slug, releaseId) => `${slug} now runs release ${releaseId}.\n`,
|
|
1426
1160
|
});
|
|
1427
1161
|
}
|
|
1428
1162
|
export async function cmdRollback(args, options) {
|
|
1429
1163
|
return cmdPinRelease(args, options, {
|
|
1430
|
-
usage: `Usage: ${CLI} rollback <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1164
|
+
usage: `Usage: ${CLI} deployment rollback <slug> [--release <id|version>] [--team <id>] [--json]\n`,
|
|
1431
1165
|
pin: (client, request) => client.rollbackAgentkitInstall(request),
|
|
1432
1166
|
success: (slug, releaseId) => `${slug} rolled back to release ${releaseId}.\n`,
|
|
1433
1167
|
});
|
|
@@ -1456,7 +1190,7 @@ async function cmdPinRelease(args, options, pin) {
|
|
|
1456
1190
|
});
|
|
1457
1191
|
}
|
|
1458
1192
|
catch (error) {
|
|
1459
|
-
|
|
1193
|
+
throw apiError(error);
|
|
1460
1194
|
}
|
|
1461
1195
|
if (ctx.json) {
|
|
1462
1196
|
ctx.out(`${JSON.stringify({ releaseId }, null, 2)}\n`);
|
|
@@ -1471,7 +1205,7 @@ async function cmdPinRelease(args, options, pin) {
|
|
|
1471
1205
|
// ============================================================================
|
|
1472
1206
|
export async function cmdDelete(slug, options) {
|
|
1473
1207
|
if (slug === undefined || slug === "") {
|
|
1474
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} delete <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
1208
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment delete <slug> [--team <id>] [--json] [--no-wait]\n`);
|
|
1475
1209
|
return 1;
|
|
1476
1210
|
}
|
|
1477
1211
|
const ctx = await prepare(options);
|
|
@@ -1479,8 +1213,8 @@ export async function cmdDelete(slug, options) {
|
|
|
1479
1213
|
return ctx;
|
|
1480
1214
|
}
|
|
1481
1215
|
// Same dispatch as `stop`: v1 409s architecture-v2 slugs, so the v2
|
|
1482
|
-
// DELETE goes first. A v2 404
|
|
1483
|
-
//
|
|
1216
|
+
// DELETE goes first. A v2 404 falls through to the v1 delete, the exit
|
|
1217
|
+
// ramp for a deployment not yet on v2.
|
|
1484
1218
|
let architecture = "v2";
|
|
1485
1219
|
let accepted;
|
|
1486
1220
|
try {
|
|
@@ -1488,7 +1222,7 @@ export async function cmdDelete(slug, options) {
|
|
|
1488
1222
|
}
|
|
1489
1223
|
catch (error) {
|
|
1490
1224
|
if (!(error instanceof DeployApiError) || error.status !== 404) {
|
|
1491
|
-
|
|
1225
|
+
throw apiError(error);
|
|
1492
1226
|
}
|
|
1493
1227
|
try {
|
|
1494
1228
|
accepted = await ctx.client.deleteDeployment({
|
|
@@ -1498,7 +1232,7 @@ export async function cmdDelete(slug, options) {
|
|
|
1498
1232
|
architecture = "v1";
|
|
1499
1233
|
}
|
|
1500
1234
|
catch (v1Error) {
|
|
1501
|
-
|
|
1235
|
+
throw apiError(v1Error);
|
|
1502
1236
|
}
|
|
1503
1237
|
}
|
|
1504
1238
|
if (ctx.noWait) {
|
|
@@ -1516,7 +1250,7 @@ export async function cmdDelete(slug, options) {
|
|
|
1516
1250
|
: ctx.client.getDeployment({ teamId: ctx.teamId, slug }));
|
|
1517
1251
|
}
|
|
1518
1252
|
catch (error) {
|
|
1519
|
-
|
|
1253
|
+
throw apiError(error);
|
|
1520
1254
|
}
|
|
1521
1255
|
if (ctx.json) {
|
|
1522
1256
|
ctx.out(`${JSON.stringify({ slug, status: "deleted" }, null, 2)}\n`);
|
|
@@ -1531,7 +1265,7 @@ export async function cmdDelete(slug, options) {
|
|
|
1531
1265
|
// ============================================================================
|
|
1532
1266
|
export async function cmdRotateToken(slug, options) {
|
|
1533
1267
|
if (slug === undefined || slug === "") {
|
|
1534
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} rotate-token <slug> [--team <id>]\n`);
|
|
1268
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} deployment rotate-token <slug> [--team <id>]\n`);
|
|
1535
1269
|
return 1;
|
|
1536
1270
|
}
|
|
1537
1271
|
const ctx = await prepare(options);
|
|
@@ -1540,24 +1274,13 @@ export async function cmdRotateToken(slug, options) {
|
|
|
1540
1274
|
}
|
|
1541
1275
|
let aliasToken;
|
|
1542
1276
|
try {
|
|
1543
|
-
|
|
1544
|
-
client: ctx.client,
|
|
1277
|
+
aliasToken = await ctx.client.rotateAgentsdkAliasToken({
|
|
1545
1278
|
teamId: ctx.teamId,
|
|
1546
1279
|
slug,
|
|
1547
1280
|
});
|
|
1548
|
-
aliasToken =
|
|
1549
|
-
architecture === "v2"
|
|
1550
|
-
? await ctx.client.rotateAgentsdkAliasToken({
|
|
1551
|
-
teamId: ctx.teamId,
|
|
1552
|
-
slug,
|
|
1553
|
-
})
|
|
1554
|
-
: await ctx.client.rotateAliasToken({
|
|
1555
|
-
teamId: ctx.teamId,
|
|
1556
|
-
slug,
|
|
1557
|
-
});
|
|
1558
1281
|
}
|
|
1559
1282
|
catch (error) {
|
|
1560
|
-
|
|
1283
|
+
throw apiError(error);
|
|
1561
1284
|
}
|
|
1562
1285
|
if (ctx.json) {
|
|
1563
1286
|
ctx.out(`${JSON.stringify({ aliasToken }, null, 2)}\n`);
|
|
@@ -1569,17 +1292,10 @@ export async function cmdRotateToken(slug, options) {
|
|
|
1569
1292
|
// ============================================================================
|
|
1570
1293
|
// secrets set|list|unset
|
|
1571
1294
|
// ============================================================================
|
|
1572
|
-
async function secretDeploymentArchitecture(ctx, slug) {
|
|
1573
|
-
return deploymentArchitecture({
|
|
1574
|
-
client: ctx.client,
|
|
1575
|
-
teamId: ctx.teamId,
|
|
1576
|
-
slug,
|
|
1577
|
-
});
|
|
1578
|
-
}
|
|
1579
1295
|
export async function cmdSecretsSet(slug, specs, options) {
|
|
1580
1296
|
const usageErr = options.err ?? ((t) => void process.stderr.write(t));
|
|
1581
1297
|
if (slug === undefined || slug === "" || specs.length === 0) {
|
|
1582
|
-
usageErr(`Usage: ${CLI}
|
|
1298
|
+
usageErr(`Usage: ${CLI} secret set <slug> NAME [NAME2 ...] [--team <id>] [--json]\n` +
|
|
1583
1299
|
` Hidden prompt on a TTY. One NAME reads all of stdin (redirect a PEM).\n` +
|
|
1584
1300
|
` Several NAMEs: one stdin line each.\n` +
|
|
1585
1301
|
` Opt-in (leaks into argv / agent terminals): NAME=VALUE … --from-argv\n`);
|
|
@@ -1602,9 +1318,9 @@ export async function cmdSecretsSet(slug, specs, options) {
|
|
|
1602
1318
|
if (hasArgvValues && options.fromArgv !== true) {
|
|
1603
1319
|
usageErr(`Refusing NAME=VALUE on argv (shows up in shell history and agent-captured terminals).\n` +
|
|
1604
1320
|
`Pass names only:\n` +
|
|
1605
|
-
` ${CLI}
|
|
1321
|
+
` ${CLI} secret set ${slug} NAME\n` +
|
|
1606
1322
|
`Hidden prompt on a TTY. One NAME reads all of stdin, including newlines:\n` +
|
|
1607
|
-
` ${CLI}
|
|
1323
|
+
` ${CLI} secret set ${slug} NAME < ./secret.pem\n` +
|
|
1608
1324
|
`Several NAMEs take one stdin line each.\n`);
|
|
1609
1325
|
return 1;
|
|
1610
1326
|
}
|
|
@@ -1618,10 +1334,13 @@ export async function cmdSecretsSet(slug, specs, options) {
|
|
|
1618
1334
|
const stdin = options.stdin ?? process.stdin;
|
|
1619
1335
|
const secrets = [];
|
|
1620
1336
|
let secretNames;
|
|
1621
|
-
let architecture;
|
|
1622
1337
|
try {
|
|
1623
1338
|
const only = parsed.length === 1 ? parsed[0] : undefined;
|
|
1624
|
-
if (
|
|
1339
|
+
if (dryRunActive()) {
|
|
1340
|
+
// A dry run reads no value: the request below stops with names only.
|
|
1341
|
+
secrets.push(...parsed.map((entry) => ({ name: entry.name, value: "" })));
|
|
1342
|
+
}
|
|
1343
|
+
else if (only !== undefined && only.value === undefined && stdin.isTTY !== true) {
|
|
1625
1344
|
secrets.push({
|
|
1626
1345
|
name: only.name,
|
|
1627
1346
|
value: await readWholeStdinValue(stdin, only.name),
|
|
@@ -1636,22 +1355,14 @@ export async function cmdSecretsSet(slug, specs, options) {
|
|
|
1636
1355
|
});
|
|
1637
1356
|
}
|
|
1638
1357
|
}
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
slug,
|
|
1645
|
-
secrets,
|
|
1646
|
-
})
|
|
1647
|
-
: await ctx.client.setSecrets({
|
|
1648
|
-
teamId: ctx.teamId,
|
|
1649
|
-
slug,
|
|
1650
|
-
secrets,
|
|
1651
|
-
});
|
|
1358
|
+
secretNames = await ctx.client.setAgentkitSecrets({
|
|
1359
|
+
teamId: ctx.teamId,
|
|
1360
|
+
slug,
|
|
1361
|
+
secrets,
|
|
1362
|
+
});
|
|
1652
1363
|
}
|
|
1653
1364
|
catch (error) {
|
|
1654
|
-
|
|
1365
|
+
throw apiError(error);
|
|
1655
1366
|
}
|
|
1656
1367
|
if (ctx.json) {
|
|
1657
1368
|
ctx.out(`${JSON.stringify({ secretNames }, null, 2)}\n`);
|
|
@@ -1659,14 +1370,12 @@ export async function cmdSecretsSet(slug, specs, options) {
|
|
|
1659
1370
|
}
|
|
1660
1371
|
ctx.out(`Set ${secrets.length} secret${secrets.length === 1 ? "" : "s"} on ${slug}.\n` +
|
|
1661
1372
|
`Secrets now set: ${secretNames.join(", ")}\n` +
|
|
1662
|
-
|
|
1663
|
-
? `The next task picks them up; no redeploy is required.\n`
|
|
1664
|
-
: `The engine picks them up on its next deploy.\n`));
|
|
1373
|
+
`The next task picks them up; no redeploy is required.\n`);
|
|
1665
1374
|
return 0;
|
|
1666
1375
|
}
|
|
1667
1376
|
export async function cmdSecretsList(slug, options) {
|
|
1668
1377
|
if (slug === undefined || slug === "") {
|
|
1669
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI}
|
|
1378
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} secret list <slug> [--team <id>] [--json]\n`);
|
|
1670
1379
|
return 1;
|
|
1671
1380
|
}
|
|
1672
1381
|
const ctx = await prepare(options);
|
|
@@ -1675,29 +1384,35 @@ export async function cmdSecretsList(slug, options) {
|
|
|
1675
1384
|
}
|
|
1676
1385
|
let secrets;
|
|
1677
1386
|
try {
|
|
1678
|
-
|
|
1679
|
-
secrets =
|
|
1680
|
-
architecture === "v2"
|
|
1681
|
-
? await ctx.client.listAgentkitSecrets({ teamId: ctx.teamId, slug })
|
|
1682
|
-
: await ctx.client.listSecrets({ teamId: ctx.teamId, slug });
|
|
1387
|
+
secrets = await ctx.client.listAgentkitSecrets({ teamId: ctx.teamId, slug });
|
|
1683
1388
|
}
|
|
1684
1389
|
catch (error) {
|
|
1685
|
-
|
|
1390
|
+
throw apiError(error);
|
|
1686
1391
|
}
|
|
1392
|
+
// The secrets route returns every secret at once, so page here.
|
|
1393
|
+
const page = pageLocally(secrets, ctx.list);
|
|
1687
1394
|
if (ctx.json) {
|
|
1688
|
-
|
|
1395
|
+
printListJson(page, { fields: ctx.fields, write: ctx.out });
|
|
1689
1396
|
return 0;
|
|
1690
1397
|
}
|
|
1691
1398
|
if (secrets.length === 0) {
|
|
1692
|
-
ctx.out(`No secrets set on ${slug}. Add one with \`${CLI}
|
|
1399
|
+
ctx.out(`No secrets set on ${slug}. Add one with \`${CLI} secret set ${slug} NAME\`.\n`);
|
|
1693
1400
|
return 0;
|
|
1694
1401
|
}
|
|
1695
|
-
|
|
1402
|
+
if (page.items.length === 0) {
|
|
1403
|
+
ctx.out("No more secrets.\n");
|
|
1404
|
+
return 0;
|
|
1405
|
+
}
|
|
1406
|
+
ctx.out(`${renderTable(["NAME", "CREATED"], page.items.map((secret) => [secret.name, secret.createdAt]))}\n`);
|
|
1407
|
+
const hint = nextPageHint(page.nextPageToken);
|
|
1408
|
+
if (hint !== undefined) {
|
|
1409
|
+
ctx.err(hint);
|
|
1410
|
+
}
|
|
1696
1411
|
return 0;
|
|
1697
1412
|
}
|
|
1698
1413
|
export async function cmdSecretsUnset(slug, name, options) {
|
|
1699
1414
|
if (slug === undefined || slug === "" || name === undefined || name === "") {
|
|
1700
|
-
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI}
|
|
1415
|
+
(options.err ?? ((t) => void process.stderr.write(t)))(`Usage: ${CLI} secret delete <slug> NAME [--team <id>]\n`);
|
|
1701
1416
|
return 1;
|
|
1702
1417
|
}
|
|
1703
1418
|
const ctx = await prepare(options);
|
|
@@ -1705,24 +1420,23 @@ export async function cmdSecretsUnset(slug, name, options) {
|
|
|
1705
1420
|
return ctx;
|
|
1706
1421
|
}
|
|
1707
1422
|
try {
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
name,
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
else {
|
|
1717
|
-
await ctx.client.deleteSecret({ teamId: ctx.teamId, slug, name });
|
|
1718
|
-
}
|
|
1423
|
+
await ctx.client.deleteAgentkitSecret({
|
|
1424
|
+
teamId: ctx.teamId,
|
|
1425
|
+
slug,
|
|
1426
|
+
name,
|
|
1427
|
+
});
|
|
1719
1428
|
}
|
|
1720
1429
|
catch (error) {
|
|
1721
|
-
if (error instanceof DeployApiError &&
|
|
1722
|
-
|
|
1723
|
-
|
|
1430
|
+
if (error instanceof DeployApiError &&
|
|
1431
|
+
error.status === 404 &&
|
|
1432
|
+
error.message === SECRET_NOT_FOUND_MESSAGE) {
|
|
1433
|
+
throw new CliError(`No secret named ${name} on deployment ${slug}.`, {
|
|
1434
|
+
code: "not_found",
|
|
1435
|
+
hint: `Check \`${CLI} secret list ${slug}\` (and the slug / --team).`,
|
|
1436
|
+
cause: error,
|
|
1437
|
+
});
|
|
1724
1438
|
}
|
|
1725
|
-
|
|
1439
|
+
throw apiError(error);
|
|
1726
1440
|
}
|
|
1727
1441
|
if (ctx.json) {
|
|
1728
1442
|
ctx.out(`${JSON.stringify({ removed: name }, null, 2)}\n`);
|
|
@@ -1747,7 +1461,7 @@ function createSecretValueReader(stdin, err) {
|
|
|
1747
1461
|
return async (name) => {
|
|
1748
1462
|
const line = await readLine();
|
|
1749
1463
|
if (line === undefined) {
|
|
1750
|
-
throw new
|
|
1464
|
+
throw new CliError(`stdin ended before a value for ${name} was provided (pipe one line per secret).`, { code: "invalid_argument" });
|
|
1751
1465
|
}
|
|
1752
1466
|
return line;
|
|
1753
1467
|
};
|
|
@@ -1801,7 +1515,7 @@ function promptHidden(stdin, err, prompt) {
|
|
|
1801
1515
|
}
|
|
1802
1516
|
if (ch === "\u0003") {
|
|
1803
1517
|
cleanup();
|
|
1804
|
-
reject(new
|
|
1518
|
+
reject(new CliError("Aborted."));
|
|
1805
1519
|
return;
|
|
1806
1520
|
}
|
|
1807
1521
|
if (ch === "\u007f" || ch === "\b") {
|
|
@@ -1824,7 +1538,9 @@ function promptHidden(stdin, err, prompt) {
|
|
|
1824
1538
|
async function readWholeStdinValue(stdin, name) {
|
|
1825
1539
|
const raw = await readStreamText(stdin);
|
|
1826
1540
|
if (raw === "") {
|
|
1827
|
-
throw new
|
|
1541
|
+
throw new CliError(`stdin ended before a value for ${name} was provided.`, {
|
|
1542
|
+
code: "invalid_argument",
|
|
1543
|
+
});
|
|
1828
1544
|
}
|
|
1829
1545
|
return stripOneTrailingNewline(raw);
|
|
1830
1546
|
}
|
|
@@ -1911,7 +1627,7 @@ export function createLineReader(stream) {
|
|
|
1911
1627
|
*/
|
|
1912
1628
|
async function pollUntil(ctx, slug, terminal, fetchDetail) {
|
|
1913
1629
|
const startedAt = Date.now();
|
|
1914
|
-
const tty = process.stderr.isTTY
|
|
1630
|
+
const tty = process.stderr.isTTY;
|
|
1915
1631
|
let lastLabel;
|
|
1916
1632
|
let sawProgress = false;
|
|
1917
1633
|
const report = (detail) => {
|
|
@@ -1971,7 +1687,7 @@ async function pollUntil(ctx, slug, terminal, fetchDetail) {
|
|
|
1971
1687
|
if (Date.now() - startedAt >= ctx.timeoutMs) {
|
|
1972
1688
|
finishProgressLine();
|
|
1973
1689
|
const last = deployProgressLabel(detail);
|
|
1974
|
-
throw new
|
|
1690
|
+
throw new CliError(`Timed out after ${Math.round(ctx.timeoutMs / 1000)}s waiting for ${slug} (last: ${last}). It may still converge — check \`${CLI} deployment get ${slug} --team ${ctx.teamId}\`.`, { code: "pending" });
|
|
1975
1691
|
}
|
|
1976
1692
|
await sleep(ctx.pollIntervalMs);
|
|
1977
1693
|
}
|
|
@@ -1994,7 +1710,7 @@ function transientDeployStatusWaitMs(error, pollIntervalMs) {
|
|
|
1994
1710
|
*/
|
|
1995
1711
|
async function pollUntilGone(ctx, slug, getDetail) {
|
|
1996
1712
|
const startedAt = Date.now();
|
|
1997
|
-
const tty = process.stderr.isTTY
|
|
1713
|
+
const tty = process.stderr.isTTY;
|
|
1998
1714
|
let sawProgress = false;
|
|
1999
1715
|
const report = (label) => {
|
|
2000
1716
|
if (ctx.json) {
|
|
@@ -2026,7 +1742,7 @@ async function pollUntilGone(ctx, slug, getDetail) {
|
|
|
2026
1742
|
}
|
|
2027
1743
|
if (Date.now() - startedAt >= ctx.timeoutMs) {
|
|
2028
1744
|
finishProgressLine();
|
|
2029
|
-
throw new
|
|
1745
|
+
throw new CliError(`Timed out after ${Math.round(ctx.timeoutMs / 1000)}s waiting for ${slug} to disappear. It may still be deleting — check \`${CLI} deployment get ${slug} --team ${ctx.teamId}\`.`, { code: "pending" });
|
|
2030
1746
|
}
|
|
2031
1747
|
await sleep(ctx.pollIntervalMs);
|
|
2032
1748
|
}
|
|
@@ -2035,7 +1751,7 @@ function aliasTokenBlock(aliasToken) {
|
|
|
2035
1751
|
return (`\n Alias token (shown ONCE — save it now, it cannot be retrieved again):\n\n` +
|
|
2036
1752
|
` ${aliasToken}\n\n` +
|
|
2037
1753
|
` Send it as the X-Agent-Alias-Token header on requests to the alias URL.\n` +
|
|
2038
|
-
` Lost tokens: \`${CLI} rotate-token <slug>\` mints a replacement.\n\n`);
|
|
1754
|
+
` Lost tokens: \`${CLI} deployment rotate-token <slug>\` mints a replacement.\n\n`);
|
|
2039
1755
|
}
|
|
2040
1756
|
/**
|
|
2041
1757
|
* `: <reason>` suffix for a deploy that ended in a non-running state, or
|
|
@@ -2047,20 +1763,30 @@ function deployFailureDetail(lastError) {
|
|
|
2047
1763
|
}
|
|
2048
1764
|
return `: ${sanitizeCustomerError(lastError.trim())}`;
|
|
2049
1765
|
}
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
1766
|
+
/**
|
|
1767
|
+
* A Cursor backend error as a {@link CliError}: its HTTP status picks the
|
|
1768
|
+
* error code (and so the exit code), plus a hint where one helps. Any other
|
|
1769
|
+
* error comes back unchanged, so `throw apiError(error)` keeps it.
|
|
1770
|
+
*/
|
|
1771
|
+
export function apiError(error, context) {
|
|
1772
|
+
if (!(error instanceof DeployApiError)) {
|
|
1773
|
+
return error;
|
|
1774
|
+
}
|
|
1775
|
+
let hint;
|
|
1776
|
+
if (error.status === 409 && error.message.includes("application multiTenant does not match")) {
|
|
1777
|
+
if (context?.multiTenant === true) {
|
|
1778
|
+
hint = "This slug is a single-tenant application. Redeploy it without --multi-tenant.";
|
|
1779
|
+
}
|
|
1780
|
+
else if (context?.teamId === MULTI_COMPONENT_ALLOWED_TEAM_ID) {
|
|
1781
|
+
hint =
|
|
1782
|
+
"This slug is a Cursor-managed (multi-tenant) product. Redeploy it with --multi-tenant.";
|
|
2060
1783
|
}
|
|
2061
|
-
return 1;
|
|
2062
1784
|
}
|
|
2063
|
-
|
|
1785
|
+
return new CliError(error.message, {
|
|
1786
|
+
code: errorCodeForStatus(error.status),
|
|
1787
|
+
hint,
|
|
1788
|
+
cause: error,
|
|
1789
|
+
});
|
|
2064
1790
|
}
|
|
2065
1791
|
export function renderTable(header, rows) {
|
|
2066
1792
|
const widths = header.map((h, i) => Math.max(h.length, ...rows.map((row) => (row[i] ?? "").length)));
|