@grok/agent-sdk 0.2.27 → 0.2.29
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 +42 -37
- 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 +1 -1
- package/dist/channels/pagerduty/pagerduty-channel.d.ts.map +1 -1
- package/dist/channels/pagerduty/pagerduty-channel.js +2 -1
- 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 +1 -1
- package/dist/channels/pagerduty/replay.d.ts.map +1 -1
- package/dist/channels/pagerduty/replay.js +8 -5
- 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.DMrZKFjI.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.DrLFQUlu.js +1 -0
- package/dist/docs/assets/changelog.md.DrLFQUlu.lean.js +1 -0
- package/dist/docs/assets/chunks/@localSearchIndexroot.Dpd_wxVU.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.C29HLCVL.js → VPLocalSearchBox.DQvuw1KA.js} +1 -1
- package/dist/docs/assets/chunks/{arc.BOaoYWmh.js → arc.ahOG-Qza.js} +1 -1
- package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.MfG0itQh.js → architectureDiagram-Q4EWVU46.BcgfYNO_.js} +1 -1
- package/dist/docs/assets/chunks/{baseUniq.CUeJciCF.js → baseUniq.DeIYZrWh.js} +1 -1
- package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.BrXMZRtK.js → blockDiagram-DXYQGD6D.HjJ2goMX.js} +1 -1
- package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.DfkDHeB9.js → c4Diagram-AHTNJAMY.C1QTb9GM.js} +1 -1
- package/dist/docs/assets/chunks/channel._fZX_hvU.js +1 -0
- package/dist/docs/assets/chunks/{chunk-4BX2VUAB.xKz8CiXK.js → chunk-4BX2VUAB.UuZiDiVp.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-4TB4RGXK.kkfBh4zk.js → chunk-4TB4RGXK.5A3YmkhI.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-55IACEB6.BClJGb94.js → chunk-55IACEB6.B4uf1yYV.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-EDXVE4YY.P9BpQ9L3.js → chunk-EDXVE4YY.CoXBce8t.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-FMBD7UC4.R4iYi58S.js → chunk-FMBD7UC4.DnC5NO4e.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Cpn8L1dw.js → chunk-OYMX7WX6.CzfHCeIi.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-QZHKN3VN.BLftECqU.js → chunk-QZHKN3VN.C6tcwkVd.js} +1 -1
- package/dist/docs/assets/chunks/{chunk-YZCP3GAM.BWDV1AYt.js → chunk-YZCP3GAM._oboyZ1A.js} +1 -1
- package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.eClS1Q0E.js +1 -0
- package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.eClS1Q0E.js +1 -0
- package/dist/docs/assets/chunks/clone.W1Phdw9P.js +1 -0
- package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.DGpAcJ55.js → cose-bilkent-S5V4N54A.BfPVKeId.js} +1 -1
- package/dist/docs/assets/chunks/{dagre-KV5264BT.BBXxGEaD.js → dagre-KV5264BT.CLMLc0lD.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-5BDNPKRD.EKqOwmK2.js → diagram-5BDNPKRD.C7OF7UfH.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.CB8pdkoZ.js → diagram-G4DWMVQ6.Dpao0Bl1.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-MMDJMWI5.aHh4WGg9.js → diagram-MMDJMWI5.DLnM9eLp.js} +1 -1
- package/dist/docs/assets/chunks/{diagram-TYMM5635.YIsbRH20.js → diagram-TYMM5635.BcpVgA_M.js} +1 -1
- package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.B3bTCW_e.js → erDiagram-SMLLAGMA.CsL5JuCV.js} +1 -1
- package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.M81hXIXZ.js → flowDiagram-DWJPFMVM.MFihq9AF.js} +1 -1
- package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.BKg7WY--.js → ganttDiagram-T4ZO3ILL.CJeLodyG.js} +1 -1
- package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.CLEMZgO3.js → gitGraphDiagram-UUTBAWPF.1HhlE45Z.js} +1 -1
- package/dist/docs/assets/chunks/{graph.DS38W_Q-.js → graph.BS02KkWA.js} +1 -1
- package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BTiWTi82.js → infoDiagram-42DDH7IO.fp5gvytQ.js} +1 -1
- package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.DcqY_KQL.js → ishikawaDiagram-UXIWVN3A.C6Wk1V4I.js} +1 -1
- package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.0lQNZ40U.js → journeyDiagram-VCZTEJTY.qJt4uJ_H.js} +1 -1
- package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.L5sKlf7X.js → kanban-definition-6JOO6SKY.z2tG9kly.js} +1 -1
- package/dist/docs/assets/chunks/{layout.7u4gFhQa.js → layout.BPCkdejr.js} +1 -1
- package/dist/docs/assets/chunks/{linear.D5v33SOb.js → linear.CL3TC3u7.js} +1 -1
- package/dist/docs/assets/chunks/{min.Dc9uCxf9.js → min.SPrSp704.js} +1 -1
- package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.B56nGoB_.js → mindmap-definition-QFDTVHPH.DgrQRFZW.js} +1 -1
- package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.Cba8e8lS.js → pieDiagram-DEJITSTG.Ba7yxiW2.js} +1 -1
- package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.2YjBycHF.js → quadrantDiagram-34T5L4WZ.Bvskad4p.js} +1 -1
- package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.D4P5RqVI.js → requirementDiagram-MS252O5E.Ce70ugV9.js} +1 -1
- package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.C0Hn8NUm.js → sankeyDiagram-XADWPNL6.BJ5OEULO.js} +1 -1
- package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BZm7EaoT.js → sequenceDiagram-FGHM5R23.C8a1hDs6.js} +1 -1
- package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.DcR4f3X2.js → stateDiagram-FHFEXIEX.D2D8A5CK.js} +1 -1
- package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.77yf4kRr.js +1 -0
- package/dist/docs/assets/chunks/{theme.DvfKzyXq.js → theme.DRciHmS1.js} +2 -2
- package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.CgDh96vg.js → timeline-definition-GMOUNBTQ.C4ePrY8-.js} +1 -1
- package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.B4fagbC8.js → vennDiagram-DHZGUBPP.Dzso6dEA.js} +1 -1
- package/dist/docs/assets/chunks/{wardley-RL74JXVD.Ck68omim.js → wardley-RL74JXVD.djgXR0ar.js} +1 -1
- package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.DBUg0bvz.js → wardleyDiagram-NUSXRM2D.Bf2ICxjh.js} +1 -1
- package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.DnKSGQE1.js → xychartDiagram-5P7HB3ND.DEH4BcVJ.js} +1 -1
- package/dist/docs/assets/deployment.md.KW0Ni_rY.js +31 -0
- package/dist/docs/assets/deployment.md.KW0Ni_rY.lean.js +1 -0
- package/dist/docs/assets/{evals.md.CHR34K1Y.js → evals.md.DiljU__Z.js} +10 -10
- 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_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.CEqLgjj9.js} +12 -12
- package/dist/docs/assets/{guides_jev.md.D7XH4JH3.lean.js → guides_jev.md.CEqLgjj9.lean.js} +1 -1
- package/dist/docs/assets/{guides_mcp-oauth.md.Cxq2TxBB.js → guides_mcp-oauth.md.DrGY92u4.js} +8 -8
- package/dist/docs/assets/{guides_mcp-oauth.md.Cxq2TxBB.lean.js → guides_mcp-oauth.md.DrGY92u4.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.BwXHURvY.js} +21 -8
- package/dist/docs/assets/{guides_slack.md.ClIyi7FI.lean.js → guides_slack.md.BwXHURvY.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.CAruw_rp.js +26 -0
- package/dist/docs/assets/index.md.CAruw_rp.lean.js +1 -0
- package/dist/docs/assets/{quickstart.md.D8JDfkKO.js → quickstart.md.CljDaJBi.js} +12 -12
- package/dist/docs/assets/quickstart.md.CljDaJBi.lean.js +1 -0
- package/dist/docs/assets/reference_access.md.CEtibb4i.js +1 -0
- package/dist/docs/assets/reference_access.md.CEtibb4i.lean.js +1 -0
- package/dist/docs/assets/{reference_agent-config.md.CZrbHOfT.js → reference_agent-config.md.Ck29qYNj.js} +10 -8
- package/dist/docs/assets/{reference_agent-config.md.CZrbHOfT.lean.js → reference_agent-config.md.Ck29qYNj.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.BkdLRbXg.js +99 -0
- package/dist/docs/assets/reference_cli.md.BkdLRbXg.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.2BXeMiO2.js} +31 -11
- package/dist/docs/assets/{reference_evals.md.Ccwp4x3o.lean.js → reference_evals.md.2BXeMiO2.lean.js} +1 -1
- package/dist/docs/assets/{reference_extensions.md.DKxTuCIw.js → reference_extensions.md.DI5X5x8p.js} +10 -10
- package/dist/docs/assets/{reference_extensions.md.DKxTuCIw.lean.js → reference_extensions.md.DI5X5x8p.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.BCCnvt3o.js +8 -0
- package/dist/docs/assets/reference_limits.md.BCCnvt3o.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.CGOdNVAL.js +1 -0
- package/dist/docs/building-with-agents.html +46 -46
- package/dist/docs/building-with-agents.md +20 -20
- package/dist/docs/changelog.html +39 -39
- package/dist/docs/changelog.md +57 -11
- package/dist/docs/deployment.html +54 -54
- package/dist/docs/deployment.md +115 -53
- package/dist/docs/evals.html +48 -48
- package/dist/docs/evals.md +15 -13
- 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 +17 -17
- package/dist/docs/guides/gitlab.html +41 -41
- package/dist/docs/guides/gitlab.md +5 -5
- package/dist/docs/guides/hooks.html +40 -40
- package/dist/docs/guides/hooks.md +3 -3
- package/dist/docs/guides/improve.html +41 -41
- package/dist/docs/guides/improve.md +2 -2
- package/dist/docs/guides/jev.html +48 -48
- package/dist/docs/guides/jev.md +15 -10
- package/dist/docs/guides/mcp-oauth.html +45 -45
- package/dist/docs/guides/mcp-oauth.md +10 -11
- package/dist/docs/guides/migrate.html +43 -42
- package/dist/docs/guides/migrate.md +36 -29
- 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 +87 -17
- 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 +4 -4
- package/dist/docs/index.html +56 -57
- package/dist/docs/index.md +31 -31
- package/dist/docs/llms-full.txt +1333 -1417
- package/dist/docs/llms.txt +13 -14
- package/dist/docs/package/skills/create-agent/SKILL.md +178 -0
- package/dist/docs/package/skills/evals/SKILL.md +145 -0
- package/dist/docs/package/skills/github/SKILL.md +133 -0
- package/dist/docs/package/skills/hillclimb/SKILL.md +63 -0
- package/dist/docs/package/skills/mcp-auth/SKILL.md +60 -0
- package/dist/docs/package/skills/migrate-v2/SKILL.md +394 -0
- package/dist/docs/package/skills/setup-slack/SKILL.md +136 -0
- package/dist/docs/quickstart.html +50 -50
- package/dist/docs/quickstart.md +25 -21
- 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 +10 -10
- package/dist/docs/reference/evals.html +68 -48
- package/dist/docs/reference/evals.md +48 -13
- package/dist/docs/reference/extensions.html +47 -47
- package/dist/docs/reference/extensions.md +12 -12
- 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 +26 -24
- 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 +3 -3
- 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/improve/extension.d.ts +1 -1
- package/dist/extensions/improve/extension.js +1 -1
- package/dist/extensions/jev/extension.d.ts +13 -3
- package/dist/extensions/jev/extension.d.ts.map +1 -1
- package/dist/extensions/jev/extension.js +5 -1
- package/dist/extensions/jev/lib/evaluate.d.ts +33 -6
- package/dist/extensions/jev/lib/evaluate.d.ts.map +1 -1
- package/dist/extensions/jev/lib/evaluate.js +44 -11
- 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 +577 -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 +282 -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 +359 -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 +439 -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 +3 -1
- package/dist/internal/cli-migrate.d.ts.map +1 -1
- package/dist/internal/cli-migrate.js +43 -15
- package/dist/internal/cli-pagerduty.d.ts +1 -1
- package/dist/internal/cli-pagerduty.js +1 -1
- 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 +104 -94
- 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 +14 -16
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +63 -27
- package/dist/internal/init-scaffold.d.ts +2 -1
- package/dist/internal/init-scaffold.d.ts.map +1 -1
- package/dist/internal/init-scaffold.js +22 -9
- 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/peer-connections.js +1 -1
- 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 +5 -1
- 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-Cl9zvmmf.js +62 -0
- package/dist/playground/assets/index-F8b5WvWi.css +1 -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 +59 -46
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -4
- package/docs/README.md +33 -33
- package/docs/building-with-agents.md +16 -16
- package/docs/changelog.md +58 -12
- package/docs/deployment.md +116 -54
- package/docs/evals.md +14 -12
- 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/hooks.md +3 -3
- package/docs/guides/improve.md +2 -2
- package/docs/guides/jev.md +15 -10
- package/docs/guides/mcp-oauth.md +9 -10
- 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 +85 -15
- package/docs/guides/webhooks.md +61 -3
- package/docs/hillclimbing.md +2 -2
- package/docs/quickstart.md +26 -22
- 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 +48 -13
- package/docs/reference/extensions.md +12 -12
- 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 +26 -24
- package/package.json +52 -99
- package/scripts/install-cursor-skills.mjs +2 -2
- package/skills/cli/SKILL.md +125 -0
- package/skills/create-agent/SKILL.md +29 -26
- package/skills/debug/SKILL.md +6 -6
- package/skills/deploy/SKILL.md +47 -44
- package/skills/evals/SKILL.md +13 -13
- package/skills/framework-map/SKILL.md +9 -8
- package/skills/github/SKILL.md +10 -10
- package/skills/hillclimb/SKILL.md +6 -6
- package/skills/mcp-auth/SKILL.md +3 -3
- package/skills/migrate-v2/SKILL.md +67 -70
- package/skills/otel/SKILL.md +36 -6
- package/skills/setup-slack/SKILL.md +11 -11
- package/templates/agentic-owners/README.md +6 -6
- 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 +3 -3
- 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 +3 -3
- package/templates/agents-md/README.md +5 -5
- 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 +3 -3
- package/templates/code-wiki/README.md +4 -4
- 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 +3 -3
- package/templates/demo/README.md +4 -4
- 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 +3 -3
- 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 +3 -3
- package/templates/security-help/.gitignore +4 -0
- package/templates/security-help/README.md +6 -6
- 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 +2 -2
- package/templates/security-reviewer/README.md +4 -4
- 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 +3 -3
- package/templates/thermo-quality-review/README.md +5 -5
- 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 +3 -3
- package/templates/thermo-review/README.md +5 -5
- 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 +3 -3
- package/templates/triage/README.md +5 -5
- 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 +4 -4
- package/templates/triage/overlays/jira/bot/mcp-connections/tracker.ts +1 -1
- package/templates/triage/overlays/linear/README.md +4 -4
- package/templates/triage/overlays/linear/bot/mcp-connections/tracker.ts +1 -1
- package/templates/triage/package.json +3 -3
- 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_grokbot-agents.md.BwAykJ7U.lean.js +0 -1
- 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/guides/grokbot-agents.html +0 -74
- package/dist/docs/guides/grokbot-agents.md +0 -135
- package/dist/docs/templates/grokbot-agents.html +0 -64
- package/dist/docs/templates/grokbot-agents.md +0 -55
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts +0 -77
- package/dist/extensions/cursor-grokbot-agents/extension.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/extension.js +0 -70
- package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts +0 -11
- package/dist/extensions/cursor-grokbot-agents/lib/agents.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/agents.js +0 -31
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts +0 -56
- package/dist/extensions/cursor-grokbot-agents/lib/backend.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/backend.js +0 -138
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts +0 -28
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/contacts.js +0 -46
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts +0 -53
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/conversation.js +0 -186
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts +0 -4
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/inputs.js +0 -15
- package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts +0 -12
- package/dist/extensions/cursor-grokbot-agents/lib/lock.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/lib/lock.js +0 -24
- package/dist/extensions/cursor-grokbot-agents/skills/consult.md +0 -40
- package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts +0 -4
- package/dist/extensions/cursor-grokbot-agents/tools/ask.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/tools/ask.js +0 -26
- package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts +0 -4
- package/dist/extensions/cursor-grokbot-agents/tools/check.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/tools/check.js +0 -21
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts +0 -4
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/tools/interrupt.js +0 -13
- package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts +0 -4
- package/dist/extensions/cursor-grokbot-agents/tools/list.d.ts.map +0 -1
- package/dist/extensions/cursor-grokbot-agents/tools/list.js +0 -22
- 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/guides/grokbot-agents.md +0 -140
- 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.DiljU__Z.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_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_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.CGOdNVAL.lean.js} +0 -0
package/dist/internal/cli-ax.js
CHANGED
|
@@ -12,26 +12,33 @@ import { Artifacts, JUnit } from "../evals/reporters.js";
|
|
|
12
12
|
import { serve } from "../index.js";
|
|
13
13
|
import { lookupSessionContinuation, runChat } from "./chat-client.js";
|
|
14
14
|
import { ensureCursorLogin } from "./cli-cursor.js";
|
|
15
|
-
import { resolveDeployAuth } from "./cli-deploy.js";
|
|
15
|
+
import { apiError, resolveDeployAuth } from "./cli-deploy.js";
|
|
16
16
|
import { resolveApiKey } from "./cursor/credentials.js";
|
|
17
17
|
import { DeployApiError, } from "./deploy-client.js";
|
|
18
|
+
import { CliError, CliUsageError, errorCodeForStatus } from "./cli/errors.js";
|
|
19
|
+
import { DEFAULT_LIST_LIMIT, nextPageHint, pageLocally, printJson, printListJson, projectFields, } from "./cli/output.js";
|
|
18
20
|
import { CLI_COMMAND_NAME, PACKAGE_NAME } from "./distribution.js";
|
|
21
|
+
import { dryRunActive, stopIfDryRun } from "./dry-run.js";
|
|
22
|
+
import { isValidDuration, parseDuration } from "./duration.js";
|
|
19
23
|
import { discoverEvals, filterDiscoveredEvals, runDiscoveredEvals, } from "./eval-runner.js";
|
|
20
24
|
import { cancelRemoteEvalRun, getRemoteEvalRun, listRemoteEvalRuns, listRemoteEvals, pollRemoteEvalRun, RemoteEvalError, snapshotToEvalRunResults, startRemoteEvalRun, } from "./evals-client.js";
|
|
21
25
|
import { runTemplateInit } from "./init-interview.js";
|
|
22
26
|
import { checkInitTarget, formatInitNextSteps, formatInitScaffoldSummary, initNextCommands, initProject, installScaffoldDependencies, linkCliOntoPath, printInitGuide, resolveTemplate, } from "./init-project.js";
|
|
23
27
|
import { offerInstallCursorSkills } from "./install-cursor-skills.js";
|
|
24
|
-
import {
|
|
28
|
+
import { prodNotSupportedMessage, v2HostedVerifyHint } from "./hosted-hints.js";
|
|
29
|
+
import { createHostedProdLogReader, readHostedSessionView } from "./hosted-session-view.js";
|
|
25
30
|
import { followHostedLogs, runLogsTail, sanitizeCustomerError } from "./logs-client.js";
|
|
26
31
|
import { mapPool } from "./map-pool.js";
|
|
27
32
|
import { openBrowser } from "./open-browser.js";
|
|
28
33
|
import { startPlaygroundProxy } from "./playground-proxy.js";
|
|
29
|
-
import {
|
|
34
|
+
import { prodPlaygroundUrl, resolveProdSlug, trimNonEmpty } from "./resolve-prod-target.js";
|
|
30
35
|
import { runSession } from "./run-client.js";
|
|
36
|
+
import { sleep } from "./sleep.js";
|
|
31
37
|
import { buildSessionCostReport, formatSessionCostText, formatSessionsCostText, } from "./session-cost.js";
|
|
32
|
-
import { fetchSessionCost, fetchSessionEvents, formatSessionsTable, listSessionsWithSource, resolvePreviousSessionId, } from "./sessions-client.js";
|
|
38
|
+
import { fetchSessionCost, fetchSessionEvents, formatHostedSessionsTable, formatSessionsTable, listSessionsWithSource, resolvePreviousSessionId, } from "./sessions-client.js";
|
|
33
39
|
import { createStreamProgress } from "./stream-progress.js";
|
|
34
40
|
import { buildTrajectory, formatTrajectoryText, loadTrajectoryFromEventsFile, } from "./trajectory.js";
|
|
41
|
+
import { isRecord } from "./is-record.js";
|
|
35
42
|
function shouldStreamProgress(options) {
|
|
36
43
|
if (options.stream === false) {
|
|
37
44
|
return false;
|
|
@@ -39,22 +46,27 @@ function shouldStreamProgress(options) {
|
|
|
39
46
|
if (options.stream === true) {
|
|
40
47
|
return true;
|
|
41
48
|
}
|
|
42
|
-
return process.stderr.isTTY
|
|
49
|
+
return process.stderr.isTTY;
|
|
43
50
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
/** A usage problem: the dispatcher prints it (text or JSON) and exits 2. */
|
|
52
|
+
function usage(message) {
|
|
53
|
+
throw new CliUsageError(message);
|
|
54
|
+
}
|
|
55
|
+
/** Usage error for a local command that got `--prod`. */
|
|
56
|
+
function rejectProd(command) {
|
|
57
|
+
process.stderr.write(`${prodNotSupportedMessage(command)}\n`);
|
|
58
|
+
return 2;
|
|
47
59
|
}
|
|
48
60
|
function pickAgentUrl(handle, slug) {
|
|
49
61
|
if (handle.agents.length === 0) {
|
|
50
|
-
|
|
62
|
+
throw new CliError("No agents discovered.", { code: "not_found" });
|
|
51
63
|
}
|
|
52
64
|
if (slug !== undefined && slug !== "") {
|
|
53
65
|
const match = handle.agents.find((a) => a.slug === slug);
|
|
54
66
|
if (match === undefined) {
|
|
55
|
-
|
|
67
|
+
throw new CliError(`Unknown agent slug "${slug}". Available: ${handle.agents
|
|
56
68
|
.map((a) => a.slug || "(root)")
|
|
57
|
-
.join(", ")}
|
|
69
|
+
.join(", ")}`, { code: "not_found" });
|
|
58
70
|
}
|
|
59
71
|
return match.url;
|
|
60
72
|
}
|
|
@@ -89,24 +101,11 @@ async function startEphemeral(options, evals = false) {
|
|
|
89
101
|
},
|
|
90
102
|
};
|
|
91
103
|
}
|
|
104
|
+
/** A running server (`--url`) or an ephemeral local one. */
|
|
92
105
|
export async function resolveTarget(options) {
|
|
93
|
-
if (options.prod === true && options.url !== undefined) {
|
|
94
|
-
die("--prod and --url are mutually exclusive");
|
|
95
|
-
}
|
|
96
106
|
if (options.url !== undefined) {
|
|
97
107
|
return { agentUrl: options.url.replace(/\/$/, "") };
|
|
98
108
|
}
|
|
99
|
-
if (options.prod === true) {
|
|
100
|
-
const prod = await resolveProdTarget({
|
|
101
|
-
dir: options.dir,
|
|
102
|
-
cwd: options.cwd,
|
|
103
|
-
slug: options.slug,
|
|
104
|
-
team: options.team,
|
|
105
|
-
apiKey: options.apiKey,
|
|
106
|
-
fetchImpl: options.fetchImpl,
|
|
107
|
-
});
|
|
108
|
-
return { agentUrl: prod.agentUrl, headers: prod.headers };
|
|
109
|
-
}
|
|
110
109
|
return startEphemeral(options);
|
|
111
110
|
}
|
|
112
111
|
export async function cmdInit(options) {
|
|
@@ -141,7 +140,7 @@ export async function cmdInit(options) {
|
|
|
141
140
|
const interview = await runTemplateInit({
|
|
142
141
|
templateDir,
|
|
143
142
|
vars: options.vars,
|
|
144
|
-
interactive: options.json !== true && process.stdin.isTTY
|
|
143
|
+
interactive: options.json !== true && process.stdin.isTTY && process.stdout.isTTY,
|
|
145
144
|
});
|
|
146
145
|
if (!interview.ok) {
|
|
147
146
|
process.stderr.write(`${interview.error}\n`);
|
|
@@ -157,7 +156,21 @@ export async function cmdInit(options) {
|
|
|
157
156
|
templateName,
|
|
158
157
|
answers,
|
|
159
158
|
initSpec,
|
|
159
|
+
dryRun: options.dryRun,
|
|
160
160
|
});
|
|
161
|
+
if (options.dryRun === true) {
|
|
162
|
+
if (options.json === true) {
|
|
163
|
+
process.stdout.write(`${JSON.stringify({ dryRun: true, directory: result.rootDir, files: result.files }, null, 2)}\n`);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
process.stdout.write(`Dry run: would scaffold ${result.rootDir}, then run npm install.\n` +
|
|
167
|
+
result.files
|
|
168
|
+
.map((file) => ` ${file.action === "create" ? "create" : "keep "} ${file.path}\n`)
|
|
169
|
+
.join("") +
|
|
170
|
+
"Nothing was written.\n");
|
|
171
|
+
}
|
|
172
|
+
return 0;
|
|
173
|
+
}
|
|
161
174
|
let signedIn = (await resolveApiKey()) !== undefined;
|
|
162
175
|
// Machine-readable path: install deps (piped), never block on browser login.
|
|
163
176
|
if (options.json) {
|
|
@@ -206,6 +219,9 @@ export async function cmdInit(options) {
|
|
|
206
219
|
process.stdout.write("\n");
|
|
207
220
|
process.stdout.write(`Installing ${CLI_COMMAND_NAME} on your PATH\n\n`);
|
|
208
221
|
const linked = await linkCliOntoPath(result.rootDir, { stdio: "inherit" });
|
|
222
|
+
if (linked.replaced.length > 0) {
|
|
223
|
+
process.stdout.write(`\nReplaced the global ${linked.replaced.join(" and ")} install with ${PACKAGE_NAME}.\n`);
|
|
224
|
+
}
|
|
209
225
|
const cliOnPath = linked.ok;
|
|
210
226
|
if (!cliOnPath) {
|
|
211
227
|
process.stderr.write(`\nCould not put ${CLI_COMMAND_NAME} on PATH (${linked.stderr.trim() || `exit ${linked.exitCode}`}). Next steps use npx ${PACKAGE_NAME} instead.\n\n`);
|
|
@@ -241,11 +257,14 @@ export async function cmdInit(options) {
|
|
|
241
257
|
* session. When the id is omitted, picks the most recently updated
|
|
242
258
|
* followable session from `/v1/sessions` (same as `chat --resume`).
|
|
243
259
|
* Looks up the continuation token via `/v1/sessions` when
|
|
244
|
-
* `--continuation-token` is omitted. Same flags as `chat` (`--
|
|
245
|
-
* `--
|
|
246
|
-
*
|
|
260
|
+
* `--continuation-token` is omitted. Same flags as `chat` (`--message`,
|
|
261
|
+
* `--json`, …). `--session` is accepted as a redundant alias for the
|
|
262
|
+
* positional id.
|
|
247
263
|
*/
|
|
248
264
|
export async function cmdResume(sessionId, options) {
|
|
265
|
+
if (options.prod === true) {
|
|
266
|
+
return rejectProd("resume");
|
|
267
|
+
}
|
|
249
268
|
const resolved = trimNonEmpty(sessionId) ?? trimNonEmpty(options.sessionId);
|
|
250
269
|
if (resolved !== undefined) {
|
|
251
270
|
return cmdChat({
|
|
@@ -260,23 +279,19 @@ export async function cmdResume(sessionId, options) {
|
|
|
260
279
|
resume: true,
|
|
261
280
|
});
|
|
262
281
|
}
|
|
263
|
-
function trimNonEmpty(value) {
|
|
264
|
-
if (value === undefined) {
|
|
265
|
-
return undefined;
|
|
266
|
-
}
|
|
267
|
-
const trimmed = value.trim();
|
|
268
|
-
return trimmed === "" ? undefined : trimmed;
|
|
269
|
-
}
|
|
270
282
|
/**
|
|
271
|
-
* `chat` — talk to a running
|
|
272
|
-
*
|
|
283
|
+
* `chat` — talk to a running agent. With `--json`, prints a trajectory
|
|
284
|
+
* instead of the interactive UI.
|
|
273
285
|
*/
|
|
274
286
|
export async function cmdChat(options) {
|
|
287
|
+
if (options.prod === true) {
|
|
288
|
+
return rejectProd("chat");
|
|
289
|
+
}
|
|
275
290
|
const message = options.messages?.[0];
|
|
276
291
|
// chat never starts an ephemeral server — default to local serve URL.
|
|
277
292
|
const target = await resolveTarget({
|
|
278
293
|
...options,
|
|
279
|
-
url: options.
|
|
294
|
+
url: options.url ?? "http://127.0.0.1:3000",
|
|
280
295
|
});
|
|
281
296
|
let sessionId = trimNonEmpty(options.sessionId);
|
|
282
297
|
// `--resume` without an id → most recently updated followable session.
|
|
@@ -287,7 +302,6 @@ export async function cmdChat(options) {
|
|
|
287
302
|
baseUrl: target.agentUrl,
|
|
288
303
|
auth: {
|
|
289
304
|
bearerToken: options.bearerToken,
|
|
290
|
-
headers: target.headers,
|
|
291
305
|
},
|
|
292
306
|
fetchImpl: options.fetchImpl,
|
|
293
307
|
});
|
|
@@ -316,7 +330,6 @@ export async function cmdChat(options) {
|
|
|
316
330
|
sessionId,
|
|
317
331
|
auth: {
|
|
318
332
|
bearerToken: options.bearerToken,
|
|
319
|
-
headers: target.headers,
|
|
320
333
|
},
|
|
321
334
|
});
|
|
322
335
|
}
|
|
@@ -331,7 +344,6 @@ export async function cmdChat(options) {
|
|
|
331
344
|
sessionId,
|
|
332
345
|
continuationToken,
|
|
333
346
|
bearerToken: options.bearerToken,
|
|
334
|
-
headers: target.headers,
|
|
335
347
|
});
|
|
336
348
|
if (options.text) {
|
|
337
349
|
process.stdout.write(formatTrajectoryText(result.trajectory));
|
|
@@ -353,7 +365,6 @@ export async function cmdChat(options) {
|
|
|
353
365
|
sessionId,
|
|
354
366
|
continuationToken: options.continuationToken,
|
|
355
367
|
bearerToken: options.bearerToken,
|
|
356
|
-
headers: target.headers,
|
|
357
368
|
noColor: options.noColor,
|
|
358
369
|
});
|
|
359
370
|
return 0;
|
|
@@ -366,18 +377,12 @@ export async function cmdChat(options) {
|
|
|
366
377
|
/** Covers the server's billed lookup plus its catalog retry; `run` reports no cost past it. */
|
|
367
378
|
const RUN_SESSION_COST_TIMEOUT_MS = 15_000;
|
|
368
379
|
export async function cmdRun(options) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
// engine-alias path untouched.
|
|
372
|
-
if (options.prod === true && hostedSessionRejection(options) === undefined) {
|
|
373
|
-
const started = await cmdHostedSession(options);
|
|
374
|
-
if (started !== "fallback") {
|
|
375
|
-
return started;
|
|
376
|
-
}
|
|
380
|
+
if (options.prod === true) {
|
|
381
|
+
return cmdHostedSession(options);
|
|
377
382
|
}
|
|
378
383
|
const messages = options.messages ?? [];
|
|
379
384
|
if (messages.length === 0) {
|
|
380
|
-
|
|
385
|
+
usage("Provide --message (repeatable) or --messages-file");
|
|
381
386
|
}
|
|
382
387
|
const stream = shouldStreamProgress(options);
|
|
383
388
|
const progress = stream ? createStreamProgress() : undefined;
|
|
@@ -392,20 +397,17 @@ export async function cmdRun(options) {
|
|
|
392
397
|
sessionId: options.sessionId,
|
|
393
398
|
continuationToken: options.continuationToken,
|
|
394
399
|
bearerToken: options.bearerToken,
|
|
395
|
-
headers: target.headers,
|
|
396
400
|
timeoutMs: options.timeoutMs,
|
|
397
401
|
onEvent: progress === undefined ? undefined : (e) => progress.onEvent(e),
|
|
398
402
|
});
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
result.trajectory.totalCostUsd = cost.costUsd;
|
|
408
|
-
}
|
|
403
|
+
const cost = await fetchSessionCost({
|
|
404
|
+
baseUrl: target.agentUrl,
|
|
405
|
+
sessionId: result.sessionId,
|
|
406
|
+
auth: { bearerToken: options.bearerToken },
|
|
407
|
+
signal: AbortSignal.timeout(RUN_SESSION_COST_TIMEOUT_MS),
|
|
408
|
+
});
|
|
409
|
+
if (cost !== undefined) {
|
|
410
|
+
result.trajectory.totalCostUsd = cost.costUsd;
|
|
409
411
|
}
|
|
410
412
|
let eventsPath;
|
|
411
413
|
const writeEvents = options.events !== false;
|
|
@@ -421,37 +423,18 @@ export async function cmdRun(options) {
|
|
|
421
423
|
}
|
|
422
424
|
await writeFile(eventsPath, `${result.events.map((e) => JSON.stringify(e)).join("\n")}\n`, "utf8");
|
|
423
425
|
}
|
|
424
|
-
const playgroundUrl = options.
|
|
425
|
-
?
|
|
426
|
-
: options.url !== undefined
|
|
427
|
-
? `${target.agentUrl.replace(/\/$/, "")}/playground?sessionId=${encodeURIComponent(result.sessionId)}`
|
|
428
|
-
: null;
|
|
429
|
-
const playgroundHint = options.prod === true
|
|
430
|
-
? [
|
|
431
|
-
CLI_COMMAND_NAME,
|
|
432
|
-
"playground",
|
|
433
|
-
"--prod",
|
|
434
|
-
...(options.slug !== undefined && options.slug.trim() !== ""
|
|
435
|
-
? ["--slug", options.slug.trim()]
|
|
436
|
-
: []),
|
|
437
|
-
...(options.team !== undefined && options.team.trim() !== ""
|
|
438
|
-
? ["--team", options.team.trim()]
|
|
439
|
-
: []),
|
|
440
|
-
"--session",
|
|
441
|
-
result.sessionId,
|
|
442
|
-
].join(" ")
|
|
426
|
+
const playgroundUrl = options.url !== undefined
|
|
427
|
+
? `${target.agentUrl.replace(/\/$/, "")}/playground?sessionId=${encodeURIComponent(result.sessionId)}`
|
|
443
428
|
: null;
|
|
444
|
-
if (options.
|
|
429
|
+
if (options.json !== true) {
|
|
445
430
|
process.stdout.write(formatTrajectoryText(result.trajectory));
|
|
431
|
+
process.stderr.write(`\nsession: ${result.sessionId}\n`);
|
|
446
432
|
if (eventsPath !== undefined) {
|
|
447
|
-
process.stderr.write(
|
|
433
|
+
process.stderr.write(`trace: ${eventsPath}\n`);
|
|
448
434
|
}
|
|
449
435
|
if (playgroundUrl !== null) {
|
|
450
436
|
process.stderr.write(`playground: ${playgroundUrl}\n`);
|
|
451
437
|
}
|
|
452
|
-
else if (playgroundHint !== null) {
|
|
453
|
-
process.stderr.write(`playground: ${playgroundHint}\n`);
|
|
454
|
-
}
|
|
455
438
|
}
|
|
456
439
|
else {
|
|
457
440
|
console.log(JSON.stringify({
|
|
@@ -460,14 +443,11 @@ export async function cmdRun(options) {
|
|
|
460
443
|
continuationToken: result.continuationToken ?? null,
|
|
461
444
|
trace: eventsPath ?? null,
|
|
462
445
|
playgroundUrl,
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
: eventsPath !== undefined
|
|
469
|
-
? `${CLI_COMMAND_NAME} trajectory --events ${eventsPath}`
|
|
470
|
-
: null,
|
|
446
|
+
visualize: playgroundUrl !== null
|
|
447
|
+
? `Open ${playgroundUrl}`
|
|
448
|
+
: eventsPath !== undefined
|
|
449
|
+
? `${CLI_COMMAND_NAME} session get --file ${eventsPath}`
|
|
450
|
+
: null,
|
|
471
451
|
trajectory: result.trajectory,
|
|
472
452
|
}, null, 2));
|
|
473
453
|
}
|
|
@@ -481,13 +461,6 @@ export async function cmdRun(options) {
|
|
|
481
461
|
}
|
|
482
462
|
}
|
|
483
463
|
const HOSTED_SESSION_ID_RE = /^ses_[a-f0-9]{24}$/;
|
|
484
|
-
/**
|
|
485
|
-
* Hosted v2 session start: POST the agentsdk control plane, which hands the
|
|
486
|
-
* wake to Temporal (no resident engine, no `/engine/*` alias). `--session
|
|
487
|
-
* ses_…` resumes that exact session; there is no continuation token on
|
|
488
|
-
* this path. A 404 means the slug is not a v2 control-plane deployment, so
|
|
489
|
-
* `run --prod` falls back to the v1 engine alias.
|
|
490
|
-
*/
|
|
491
464
|
/** Why these options cannot be a hosted v2 session start, if they cannot. */
|
|
492
465
|
function hostedSessionRejection(options) {
|
|
493
466
|
if (options.url !== undefined) {
|
|
@@ -506,10 +479,16 @@ function hostedSessionRejection(options) {
|
|
|
506
479
|
}
|
|
507
480
|
return undefined;
|
|
508
481
|
}
|
|
482
|
+
/**
|
|
483
|
+
* Hosted v2 session start: POST the agentsdk control plane, which hands the
|
|
484
|
+
* wake to Temporal (no resident engine). `--session ses_…` resumes that
|
|
485
|
+
* exact session; there is no continuation token on this path.
|
|
486
|
+
*/
|
|
509
487
|
async function cmdHostedSession(options) {
|
|
510
488
|
const rejection = hostedSessionRejection(options);
|
|
511
489
|
if (rejection !== undefined) {
|
|
512
|
-
|
|
490
|
+
process.stderr.write(`${rejection}\n`);
|
|
491
|
+
return 2;
|
|
513
492
|
}
|
|
514
493
|
const messages = options.messages ?? [];
|
|
515
494
|
const sessionId = trimNonEmpty(options.sessionId);
|
|
@@ -522,46 +501,101 @@ async function cmdHostedSession(options) {
|
|
|
522
501
|
return auth;
|
|
523
502
|
}
|
|
524
503
|
const slug = resolveProdSlug(options);
|
|
504
|
+
let accepted;
|
|
525
505
|
try {
|
|
526
|
-
|
|
506
|
+
accepted = await auth.client.startSession({
|
|
527
507
|
teamId: auth.teamId,
|
|
528
508
|
slug,
|
|
529
509
|
message: messages[0].trim(),
|
|
530
510
|
sessionId,
|
|
531
|
-
dryRun: options.
|
|
511
|
+
dryRun: options.readOnly,
|
|
532
512
|
asOf: options.asOf,
|
|
533
513
|
componentKey: trimNonEmpty(options.componentKey),
|
|
534
514
|
});
|
|
535
|
-
console.log(JSON.stringify(accepted, null, 2));
|
|
536
|
-
if (accepted.sessionId === undefined) {
|
|
537
|
-
process.stderr.write(`${v2HostedVerifyHint(slug)}\n`);
|
|
538
|
-
}
|
|
539
|
-
return 0;
|
|
540
515
|
}
|
|
541
516
|
catch (error) {
|
|
542
|
-
|
|
543
|
-
|
|
517
|
+
throw apiError(error);
|
|
518
|
+
}
|
|
519
|
+
const sessionIdNow = options.wait === true && accepted.sessionId === undefined
|
|
520
|
+
? await waitForHostedSession(auth, slug, accepted.deliveryId, options.timeoutMs)
|
|
521
|
+
: accepted.sessionId;
|
|
522
|
+
const result = { ...accepted, sessionId: sessionIdNow };
|
|
523
|
+
if (options.json === true) {
|
|
524
|
+
console.log(JSON.stringify(result, null, 2));
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
process.stdout.write([
|
|
528
|
+
`accepted: delivery ${result.deliveryId}`,
|
|
529
|
+
` session: ${result.sessionId ?? "(allocated later)"}`,
|
|
530
|
+
` mode: ${result.sessionMode}${result.dryRun === true ? " (read-only)" : ""}`,
|
|
531
|
+
"",
|
|
532
|
+
].join("\n"));
|
|
533
|
+
}
|
|
534
|
+
if (result.sessionId === undefined) {
|
|
535
|
+
process.stderr.write(`${v2HostedVerifyHint(slug)}\n`);
|
|
536
|
+
}
|
|
537
|
+
else {
|
|
538
|
+
process.stderr.write(`Read it: \`${CLI_COMMAND_NAME} session get ${result.sessionId} --prod --slug ${slug}\`\n`);
|
|
539
|
+
}
|
|
540
|
+
return 0;
|
|
541
|
+
}
|
|
542
|
+
const HOSTED_SESSION_WAIT_DEFAULT_MS = 120_000;
|
|
543
|
+
const HOSTED_SESSION_POLL_MS = 1_000;
|
|
544
|
+
/**
|
|
545
|
+
* Poll a session start's delivery until it names a session. Skipped and
|
|
546
|
+
* failed deliveries never get one, so they fail at once; a slow one ends
|
|
547
|
+
* `pending` (exit 3) with the delivery id to poll again.
|
|
548
|
+
*/
|
|
549
|
+
async function waitForHostedSession(auth, slug, deliveryId, timeoutMs = HOSTED_SESSION_WAIT_DEFAULT_MS) {
|
|
550
|
+
const deadline = Date.now() + timeoutMs;
|
|
551
|
+
for (;;) {
|
|
552
|
+
let delivery;
|
|
553
|
+
try {
|
|
554
|
+
delivery = await auth.client.getAgentkitSessionDelivery({
|
|
555
|
+
teamId: auth.teamId,
|
|
556
|
+
slug,
|
|
557
|
+
deliveryId,
|
|
558
|
+
});
|
|
544
559
|
}
|
|
545
|
-
|
|
546
|
-
|
|
560
|
+
catch (error) {
|
|
561
|
+
throw apiError(error);
|
|
562
|
+
}
|
|
563
|
+
if (delivery.status === "allocated") {
|
|
564
|
+
return delivery.sessionId;
|
|
565
|
+
}
|
|
566
|
+
if (delivery.status === "skipped" || delivery.status === "failed") {
|
|
567
|
+
throw new CliError(`Delivery ${deliveryId} was ${delivery.status}; it reached no session.`);
|
|
568
|
+
}
|
|
569
|
+
if (Date.now() + HOSTED_SESSION_POLL_MS > deadline) {
|
|
570
|
+
throw new CliError(`Delivery ${deliveryId} has no session yet.`, {
|
|
571
|
+
code: "pending",
|
|
572
|
+
hint: `Run the same command again with a longer --timeout-ms, or list the deployment's sessions with \`${CLI_COMMAND_NAME} session list --prod\`.`,
|
|
573
|
+
details: { deliveryId },
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
await sleep(HOSTED_SESSION_POLL_MS);
|
|
547
577
|
}
|
|
548
578
|
}
|
|
549
579
|
/**
|
|
550
|
-
* Shared deterministic-route fetch (`call`, `skill`):
|
|
580
|
+
* Shared deterministic-route fetch (`call`, `skill`):
|
|
551
581
|
* bearer auth, and JSON. The payload is `undefined` when the body does
|
|
552
582
|
* not decode; callers print `invalid_response` and fail.
|
|
553
583
|
*/
|
|
554
584
|
async function fetchAgentJson(target, path, args = {}) {
|
|
555
585
|
const headers = {};
|
|
556
|
-
if (target.headers !== undefined) {
|
|
557
|
-
Object.assign(headers, target.headers);
|
|
558
|
-
}
|
|
559
586
|
if (args.body !== undefined) {
|
|
560
587
|
headers["content-type"] = "application/json";
|
|
561
588
|
}
|
|
562
589
|
if (args.bearerToken !== undefined) {
|
|
563
590
|
headers.authorization = `Bearer ${args.bearerToken}`;
|
|
564
591
|
}
|
|
592
|
+
if (dryRunActive()) {
|
|
593
|
+
stopIfDryRun({
|
|
594
|
+
method: args.method ?? "GET",
|
|
595
|
+
path: `${target.agentUrl}${path}`,
|
|
596
|
+
body: args.body === undefined ? undefined : JSON.parse(args.body),
|
|
597
|
+
});
|
|
598
|
+
}
|
|
565
599
|
const response = await fetch(`${target.agentUrl}${path}`, {
|
|
566
600
|
method: args.method,
|
|
567
601
|
headers,
|
|
@@ -570,17 +604,39 @@ async function fetchAgentJson(target, path, args = {}) {
|
|
|
570
604
|
const payload = await response.json().catch(() => undefined);
|
|
571
605
|
return { response, payload };
|
|
572
606
|
}
|
|
573
|
-
|
|
574
|
-
|
|
607
|
+
/** The `message` or `errorMessage` of an agent server's JSON error body. */
|
|
608
|
+
function agentErrorMessage(payload) {
|
|
609
|
+
if (payload === null || typeof payload !== "object") {
|
|
610
|
+
return undefined;
|
|
611
|
+
}
|
|
612
|
+
const { message, errorMessage } = payload;
|
|
613
|
+
if (typeof errorMessage === "string" && errorMessage !== "") {
|
|
614
|
+
return errorMessage;
|
|
615
|
+
}
|
|
616
|
+
return typeof message === "string" && message !== "" ? message : undefined;
|
|
617
|
+
}
|
|
618
|
+
/** A tool result as text: a string as is, anything else as pretty JSON. */
|
|
619
|
+
function formatResultText(result) {
|
|
620
|
+
const text = typeof result === "string" ? result : JSON.stringify(result ?? null, null, 2);
|
|
621
|
+
return text.endsWith("\n") ? text : `${text}\n`;
|
|
622
|
+
}
|
|
623
|
+
/** The agent server answered with a body that is not JSON. */
|
|
624
|
+
function invalidResponse(path, status) {
|
|
625
|
+
return new CliError(`The agent server returned a non-JSON response to ${path} (HTTP ${status}).`, {
|
|
626
|
+
code: "unavailable",
|
|
627
|
+
});
|
|
575
628
|
}
|
|
576
629
|
/**
|
|
577
630
|
* `agent-sdk call <tool>` — deterministic tool invocation over
|
|
578
631
|
* `POST /v1/tools/:toolName` (ephemeral local server unless --url).
|
|
579
632
|
*/
|
|
580
633
|
export async function cmdCall(options) {
|
|
634
|
+
if (options.prod === true) {
|
|
635
|
+
return rejectProd("call");
|
|
636
|
+
}
|
|
581
637
|
const toolName = options.toolName;
|
|
582
638
|
if (toolName === undefined || toolName === "") {
|
|
583
|
-
|
|
639
|
+
usage(`Provide a tool name: ${CLI_COMMAND_NAME} tool call <tool> [--input '{...}']`);
|
|
584
640
|
}
|
|
585
641
|
let input = {};
|
|
586
642
|
if (options.toolInput !== undefined) {
|
|
@@ -588,7 +644,7 @@ export async function cmdCall(options) {
|
|
|
588
644
|
input = JSON.parse(options.toolInput);
|
|
589
645
|
}
|
|
590
646
|
catch (error) {
|
|
591
|
-
|
|
647
|
+
usage(`--input must be valid JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
592
648
|
}
|
|
593
649
|
}
|
|
594
650
|
let target;
|
|
@@ -596,6 +652,10 @@ export async function cmdCall(options) {
|
|
|
596
652
|
target = await resolveTarget(options);
|
|
597
653
|
}
|
|
598
654
|
catch (error) {
|
|
655
|
+
// A typed error (such as `not_found` from discovery) keeps its exit code.
|
|
656
|
+
if (error instanceof CliError) {
|
|
657
|
+
throw error;
|
|
658
|
+
}
|
|
599
659
|
process.stderr.write(`${sanitizeCustomerError(error instanceof Error ? error.message : String(error))}\n`);
|
|
600
660
|
return 1;
|
|
601
661
|
}
|
|
@@ -610,15 +670,23 @@ export async function cmdCall(options) {
|
|
|
610
670
|
bearerToken: options.bearerToken,
|
|
611
671
|
});
|
|
612
672
|
if (payload === undefined) {
|
|
613
|
-
|
|
614
|
-
return 1;
|
|
673
|
+
throw invalidResponse(`/v1/tools/${toolName}`, response.status);
|
|
615
674
|
}
|
|
616
|
-
console.log(JSON.stringify(payload, null, 2));
|
|
617
675
|
const ok = response.ok &&
|
|
618
676
|
typeof payload === "object" &&
|
|
619
677
|
payload !== null &&
|
|
620
678
|
payload.ok === true;
|
|
621
|
-
|
|
679
|
+
if (options.json === true) {
|
|
680
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
681
|
+
return ok ? 0 : 1;
|
|
682
|
+
}
|
|
683
|
+
if (!ok) {
|
|
684
|
+
throw new CliError(agentErrorMessage(payload) ?? `Tool ${toolName} failed.`, {
|
|
685
|
+
code: response.ok ? "failed" : errorCodeForStatus(response.status),
|
|
686
|
+
});
|
|
687
|
+
}
|
|
688
|
+
process.stdout.write(formatResultText(payload.result));
|
|
689
|
+
return 0;
|
|
622
690
|
}
|
|
623
691
|
finally {
|
|
624
692
|
if (target.close !== undefined) {
|
|
@@ -632,28 +700,35 @@ export async function cmdCall(options) {
|
|
|
632
700
|
* `--text` prints the rendered SKILL.md instead of JSON.
|
|
633
701
|
*/
|
|
634
702
|
export async function cmdSkill(skillName, options) {
|
|
703
|
+
if (options.prod === true) {
|
|
704
|
+
return rejectProd("skill");
|
|
705
|
+
}
|
|
635
706
|
if (skillName === undefined || skillName === "") {
|
|
636
|
-
process.stderr.write(`Usage: ${CLI_COMMAND_NAME} skill <name> [--dir <path> | --url <baseUrl>
|
|
707
|
+
process.stderr.write(`Usage: ${CLI_COMMAND_NAME} skill <name> [--dir <path> | --url <baseUrl>]\n`);
|
|
637
708
|
return 2;
|
|
638
709
|
}
|
|
639
710
|
const target = await resolveTarget(options);
|
|
640
711
|
try {
|
|
641
712
|
const { response, payload } = await fetchAgentJson(target, `/v1/skills/${encodeURIComponent(skillName)}`, { bearerToken: options.bearerToken });
|
|
713
|
+
const path = `/v1/skills/${skillName}`;
|
|
642
714
|
if (payload === undefined) {
|
|
643
|
-
|
|
644
|
-
return 1;
|
|
715
|
+
throw invalidResponse(path, response.status);
|
|
645
716
|
}
|
|
646
|
-
if (options.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
printInvalidResponse();
|
|
650
|
-
return 1;
|
|
651
|
-
}
|
|
652
|
-
process.stdout.write(skillMd.endsWith("\n") ? skillMd : `${skillMd}\n`);
|
|
653
|
-
return 0;
|
|
717
|
+
if (options.json === true) {
|
|
718
|
+
console.log(JSON.stringify(payload, null, 2));
|
|
719
|
+
return response.ok ? 0 : 1;
|
|
654
720
|
}
|
|
655
|
-
|
|
656
|
-
|
|
721
|
+
if (!response.ok) {
|
|
722
|
+
throw new CliError(agentErrorMessage(payload) ?? `GET ${path} returned HTTP ${response.status}`, {
|
|
723
|
+
code: errorCodeForStatus(response.status),
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
const skillMd = isRecord(payload) ? payload.skillMd : undefined;
|
|
727
|
+
if (typeof skillMd !== "string") {
|
|
728
|
+
throw invalidResponse(path, response.status);
|
|
729
|
+
}
|
|
730
|
+
process.stdout.write(skillMd.endsWith("\n") ? skillMd : `${skillMd}\n`);
|
|
731
|
+
return 0;
|
|
657
732
|
}
|
|
658
733
|
finally {
|
|
659
734
|
if (target.close !== undefined) {
|
|
@@ -663,14 +738,14 @@ export async function cmdSkill(skillName, options) {
|
|
|
663
738
|
}
|
|
664
739
|
export async function cmdTrajectory(options) {
|
|
665
740
|
if (typeof options.events !== "string") {
|
|
666
|
-
|
|
741
|
+
usage(`trajectory requires --events <file.ndjson> (write one with: ${CLI_COMMAND_NAME} run --events …)`);
|
|
667
742
|
}
|
|
668
743
|
const trajectory = await loadTrajectoryFromEventsFile(resolve(options.events));
|
|
669
|
-
if (options.
|
|
670
|
-
|
|
744
|
+
if (options.json === true) {
|
|
745
|
+
console.log(JSON.stringify(trajectory, null, 2));
|
|
671
746
|
}
|
|
672
747
|
else {
|
|
673
|
-
|
|
748
|
+
process.stdout.write(formatTrajectoryText(trajectory));
|
|
674
749
|
}
|
|
675
750
|
return trajectory.ok ? 0 : 1;
|
|
676
751
|
}
|
|
@@ -722,7 +797,7 @@ export async function cmdEval(options) {
|
|
|
722
797
|
return 2;
|
|
723
798
|
}
|
|
724
799
|
if (options.noWait === true) {
|
|
725
|
-
process.stderr.write(`--out needs the finished results; drop --no-wait, or poll later with ${CLI_COMMAND_NAME} eval
|
|
800
|
+
process.stderr.write(`--out needs the finished results; drop --no-wait, or poll later with ${CLI_COMMAND_NAME} eval get <evalId> --out <path>\n`);
|
|
726
801
|
return 2;
|
|
727
802
|
}
|
|
728
803
|
}
|
|
@@ -743,7 +818,6 @@ export async function cmdEval(options) {
|
|
|
743
818
|
baseUrl: target.agentUrl,
|
|
744
819
|
auth: {
|
|
745
820
|
bearerToken: options.bearerToken,
|
|
746
|
-
headers: target.headers,
|
|
747
821
|
},
|
|
748
822
|
fetchImpl: options.fetchImpl,
|
|
749
823
|
filterIds,
|
|
@@ -794,7 +868,6 @@ export async function cmdEval(options) {
|
|
|
794
868
|
reporters: buildCliEvalReporters(options, artifactsDir),
|
|
795
869
|
target: { baseUrl: target.agentUrl, mode: "local" },
|
|
796
870
|
bearerToken: options.bearerToken,
|
|
797
|
-
headers: target.headers,
|
|
798
871
|
verbose: Boolean(options.verbose) || stream,
|
|
799
872
|
onEvent: progress === undefined ? undefined : (e) => progress.onEvent(e),
|
|
800
873
|
});
|
|
@@ -818,7 +891,6 @@ export async function cmdEval(options) {
|
|
|
818
891
|
verbose: Boolean(options.verbose),
|
|
819
892
|
auth: {
|
|
820
893
|
bearerToken: options.bearerToken,
|
|
821
|
-
headers: target.headers,
|
|
822
894
|
},
|
|
823
895
|
fetchImpl: options.fetchImpl,
|
|
824
896
|
});
|
|
@@ -834,7 +906,6 @@ export async function cmdEval(options) {
|
|
|
834
906
|
verbose: Boolean(options.verbose) || stream,
|
|
835
907
|
auth: {
|
|
836
908
|
bearerToken: options.bearerToken,
|
|
837
|
-
headers: target.headers,
|
|
838
909
|
},
|
|
839
910
|
fetchImpl: options.fetchImpl,
|
|
840
911
|
});
|
|
@@ -845,7 +916,6 @@ export async function cmdEval(options) {
|
|
|
845
916
|
runId: started.runId,
|
|
846
917
|
auth: {
|
|
847
918
|
bearerToken: options.bearerToken,
|
|
848
|
-
headers: target.headers,
|
|
849
919
|
},
|
|
850
920
|
fetchImpl: options.fetchImpl,
|
|
851
921
|
onSnapshot: progress === undefined ? undefined : progress.onSnapshot,
|
|
@@ -896,7 +966,7 @@ function printEvalIdBanner(started, options, agentUrl) {
|
|
|
896
966
|
const durable = started.config.durableRuns === true ? " (persisted)" : "";
|
|
897
967
|
process.stderr.write(`Eval ID: ${started.runId}${durable} — ${started.summary.total} case(s)\n`);
|
|
898
968
|
process.stderr.write(`Cancel: ${CLI_COMMAND_NAME} eval cancel ${started.runId}${statusFlags}\n`);
|
|
899
|
-
process.stderr.write(`Status: ${CLI_COMMAND_NAME} eval
|
|
969
|
+
process.stderr.write(`Status: ${CLI_COMMAND_NAME} eval get ${started.runId}${statusFlags}\n`);
|
|
900
970
|
if (playgroundUrl !== undefined) {
|
|
901
971
|
process.stderr.write(`Playground: ${playgroundUrl}\n`);
|
|
902
972
|
}
|
|
@@ -923,7 +993,7 @@ function printEvalAccepted(started, options, agentUrl) {
|
|
|
923
993
|
const durable = started.config.durableRuns === true ? " (persisted)" : "";
|
|
924
994
|
process.stdout.write(`Eval ID: ${started.runId}${durable} — ${started.summary.total} case(s)\n`);
|
|
925
995
|
process.stdout.write(`Cancel: ${CLI_COMMAND_NAME} eval cancel ${started.runId}${statusFlags}\n`);
|
|
926
|
-
process.stdout.write(`Status: ${CLI_COMMAND_NAME} eval
|
|
996
|
+
process.stdout.write(`Status: ${CLI_COMMAND_NAME} eval get ${started.runId}${statusFlags}\n`);
|
|
927
997
|
if (playgroundUrl !== undefined) {
|
|
928
998
|
process.stdout.write(`Playground: ${playgroundUrl}\n`);
|
|
929
999
|
}
|
|
@@ -977,7 +1047,6 @@ export async function cmdEvalCancel(runId, options) {
|
|
|
977
1047
|
runId,
|
|
978
1048
|
auth: {
|
|
979
1049
|
bearerToken: options.bearerToken,
|
|
980
|
-
headers: target.headers,
|
|
981
1050
|
},
|
|
982
1051
|
fetchImpl: options.fetchImpl,
|
|
983
1052
|
});
|
|
@@ -1029,7 +1098,6 @@ export async function cmdEvalStatus(runId, options) {
|
|
|
1029
1098
|
}
|
|
1030
1099
|
const auth = {
|
|
1031
1100
|
bearerToken: options.bearerToken,
|
|
1032
|
-
headers: target.headers,
|
|
1033
1101
|
};
|
|
1034
1102
|
try {
|
|
1035
1103
|
if (runId === undefined || runId === "") {
|
|
@@ -1038,19 +1106,30 @@ export async function cmdEvalStatus(runId, options) {
|
|
|
1038
1106
|
auth,
|
|
1039
1107
|
fetchImpl: options.fetchImpl,
|
|
1040
1108
|
});
|
|
1109
|
+
// The runs route returns every run at once, so page here.
|
|
1110
|
+
const page = pageLocally(runs, listOptionsOf(options));
|
|
1041
1111
|
if (options.json) {
|
|
1042
|
-
|
|
1112
|
+
printJson({
|
|
1113
|
+
items: projectFields(page.items, options.fields),
|
|
1114
|
+
nextPageToken: page.nextPageToken,
|
|
1115
|
+
activeRunId,
|
|
1116
|
+
});
|
|
1043
1117
|
}
|
|
1044
1118
|
else if (runs.length === 0) {
|
|
1045
1119
|
process.stdout.write("No eval runs on this agent.\n");
|
|
1046
1120
|
}
|
|
1121
|
+
else if (page.items.length === 0) {
|
|
1122
|
+
// Past the last page the agent can still have runs.
|
|
1123
|
+
process.stdout.write("No more eval runs.\n");
|
|
1124
|
+
}
|
|
1047
1125
|
else {
|
|
1048
1126
|
if (activeRunId !== undefined) {
|
|
1049
1127
|
process.stdout.write(`active: ${activeRunId}\n`);
|
|
1050
1128
|
}
|
|
1051
|
-
for (const run of
|
|
1129
|
+
for (const run of page.items) {
|
|
1052
1130
|
process.stdout.write(`${formatEvalRunSummaryLine(run)}\n`);
|
|
1053
1131
|
}
|
|
1132
|
+
writeNextPageHint(page.nextPageToken);
|
|
1054
1133
|
}
|
|
1055
1134
|
return 0;
|
|
1056
1135
|
}
|
|
@@ -1062,7 +1141,7 @@ export async function cmdEvalStatus(runId, options) {
|
|
|
1062
1141
|
});
|
|
1063
1142
|
const outPath = await writeJsonOutFile(options.out, snap);
|
|
1064
1143
|
if (options.json) {
|
|
1065
|
-
|
|
1144
|
+
printJson(snap, { fields: options.fields });
|
|
1066
1145
|
if (outPath !== undefined) {
|
|
1067
1146
|
process.stderr.write(`results: ${outPath}\n`);
|
|
1068
1147
|
}
|
|
@@ -1093,8 +1172,7 @@ export async function cmdEvalStatus(runId, options) {
|
|
|
1093
1172
|
return failed ? 1 : 0;
|
|
1094
1173
|
}
|
|
1095
1174
|
catch (error) {
|
|
1096
|
-
|
|
1097
|
-
return 1;
|
|
1175
|
+
throw sessionReadError(error);
|
|
1098
1176
|
}
|
|
1099
1177
|
finally {
|
|
1100
1178
|
if (target.close !== undefined) {
|
|
@@ -1316,9 +1394,10 @@ export function formatEvalAssertionLine(assertion) {
|
|
|
1316
1394
|
return `${mark} ${assertion.name}${soft ? " [soft]" : ""}${suffix}`;
|
|
1317
1395
|
}
|
|
1318
1396
|
/**
|
|
1319
|
-
* `logs` —
|
|
1320
|
-
*
|
|
1321
|
-
*
|
|
1397
|
+
* `logs` — tail runtime logs. Local / `--url` tails `/v1/logs`. `--prod`
|
|
1398
|
+
* prints the hosted v2 deployment's persistent process output and session
|
|
1399
|
+
* tails. A session id also prints that session's process output and tool
|
|
1400
|
+
* names.
|
|
1322
1401
|
*/
|
|
1323
1402
|
export async function cmdLogs(options) {
|
|
1324
1403
|
if (options.prod === true && options.url !== undefined) {
|
|
@@ -1327,7 +1406,7 @@ export async function cmdLogs(options) {
|
|
|
1327
1406
|
}
|
|
1328
1407
|
const sessionId = trimNonEmpty(options.sessionId);
|
|
1329
1408
|
if (sessionId !== undefined && options.prod !== true) {
|
|
1330
|
-
process.stderr.write("A session id needs --prod
|
|
1409
|
+
process.stderr.write("A session id needs --prod\n");
|
|
1331
1410
|
return 2;
|
|
1332
1411
|
}
|
|
1333
1412
|
const controller = new AbortController();
|
|
@@ -1351,58 +1430,22 @@ export async function cmdLogs(options) {
|
|
|
1351
1430
|
if (typeof auth === "number") {
|
|
1352
1431
|
return auth;
|
|
1353
1432
|
}
|
|
1354
|
-
|
|
1355
|
-
client: auth.client,
|
|
1356
|
-
teamId: auth.teamId,
|
|
1433
|
+
await followHostedLogs({
|
|
1357
1434
|
slug,
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1435
|
+
read: createHostedProdLogReader({
|
|
1436
|
+
client: auth.client,
|
|
1437
|
+
teamId: auth.teamId,
|
|
1361
1438
|
slug,
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
});
|
|
1368
|
-
return 0;
|
|
1369
|
-
}
|
|
1370
|
-
if (sessionId !== undefined) {
|
|
1371
|
-
process.stderr.write(`A session id needs an architecture v2 deployment; "${slug}" is v1\n`);
|
|
1372
|
-
return 2;
|
|
1373
|
-
}
|
|
1374
|
-
await runLogsTail({
|
|
1375
|
-
prod: true,
|
|
1376
|
-
dir: options.dir,
|
|
1377
|
-
cwd: options.cwd,
|
|
1378
|
-
slug,
|
|
1379
|
-
team: options.team,
|
|
1380
|
-
apiKey: options.apiKey,
|
|
1381
|
-
bearerToken: options.bearerToken,
|
|
1382
|
-
once: options.once,
|
|
1383
|
-
json: options.json,
|
|
1384
|
-
fetchImpl: options.fetchImpl,
|
|
1439
|
+
sessionId,
|
|
1440
|
+
}),
|
|
1441
|
+
scoped: sessionId !== undefined,
|
|
1442
|
+
once: options.once === true,
|
|
1443
|
+
json: options.json === true,
|
|
1385
1444
|
signal: controller.signal,
|
|
1386
|
-
getDeployment: () => auth.client.getDeployment({ teamId: auth.teamId, slug }),
|
|
1387
|
-
resolveRuntime: async () => {
|
|
1388
|
-
const target = await resolveProdTarget({
|
|
1389
|
-
dir: options.dir,
|
|
1390
|
-
cwd: options.cwd,
|
|
1391
|
-
slug,
|
|
1392
|
-
team: options.team,
|
|
1393
|
-
apiKey: options.apiKey,
|
|
1394
|
-
fetchImpl: options.fetchImpl,
|
|
1395
|
-
err: () => { },
|
|
1396
|
-
skipLegacyArchitectureCheck: true,
|
|
1397
|
-
});
|
|
1398
|
-
return { agentUrl: target.agentUrl, headers: target.headers };
|
|
1399
|
-
},
|
|
1400
1445
|
});
|
|
1401
1446
|
return 0;
|
|
1402
1447
|
}
|
|
1403
1448
|
await runLogsTail({
|
|
1404
|
-
dir: options.dir,
|
|
1405
|
-
cwd: options.cwd,
|
|
1406
1449
|
url: options.url ?? "http://127.0.0.1:3000",
|
|
1407
1450
|
bearerToken: options.bearerToken,
|
|
1408
1451
|
once: options.once,
|
|
@@ -1425,86 +1468,125 @@ export async function cmdLogs(options) {
|
|
|
1425
1468
|
process.off("SIGTERM", onSignal);
|
|
1426
1469
|
}
|
|
1427
1470
|
}
|
|
1428
|
-
/**
|
|
1429
|
-
|
|
1430
|
-
if (options.prod === true && options.url !== undefined) {
|
|
1431
|
-
process.stderr.write("--prod and --url are mutually exclusive\n");
|
|
1432
|
-
return 2;
|
|
1433
|
-
}
|
|
1434
|
-
if (options.prod === true) {
|
|
1435
|
-
try {
|
|
1436
|
-
const target = await resolveProdTarget({
|
|
1437
|
-
dir: options.dir,
|
|
1438
|
-
cwd: options.cwd,
|
|
1439
|
-
slug: options.slug,
|
|
1440
|
-
team: options.team,
|
|
1441
|
-
apiKey: options.apiKey,
|
|
1442
|
-
fetchImpl: options.fetchImpl,
|
|
1443
|
-
});
|
|
1444
|
-
return { agentUrl: target.agentUrl, headers: target.headers };
|
|
1445
|
-
}
|
|
1446
|
-
catch (error) {
|
|
1447
|
-
process.stderr.write(`${sanitizeCustomerError(error instanceof Error ? error.message : String(error))}\n`);
|
|
1448
|
-
return 1;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1471
|
+
/** The running server a session command reads: `--url`, else local `serve`. */
|
|
1472
|
+
function resolveSessionTarget(options) {
|
|
1451
1473
|
return {
|
|
1452
1474
|
agentUrl: (options.url ?? "http://127.0.0.1:3000").replace(/\/$/, ""),
|
|
1453
1475
|
};
|
|
1454
1476
|
}
|
|
1455
1477
|
/**
|
|
1456
|
-
* `sessions` — list sessions on a running
|
|
1478
|
+
* `sessions` — list sessions on a running agent or a `--prod` hosted v2
|
|
1479
|
+
* deployment.
|
|
1457
1480
|
*/
|
|
1458
1481
|
export async function cmdSessions(options) {
|
|
1459
|
-
const
|
|
1460
|
-
if (
|
|
1461
|
-
|
|
1482
|
+
const sinceMs = options.since === undefined ? undefined : parseSessionsSince(options.since, Date.now());
|
|
1483
|
+
if (options.since !== undefined && sinceMs === undefined) {
|
|
1484
|
+
process.stderr.write(`Invalid --since ${JSON.stringify(options.since)}: expected a duration like 24h or an ISO-8601 date or instant\n`);
|
|
1485
|
+
return 2;
|
|
1486
|
+
}
|
|
1487
|
+
if (options.prod === true && options.url !== undefined) {
|
|
1488
|
+
process.stderr.write("--prod and --url are mutually exclusive\n");
|
|
1489
|
+
return 2;
|
|
1490
|
+
}
|
|
1491
|
+
if (options.prod === true) {
|
|
1492
|
+
return listHostedSessions(options, sinceMs);
|
|
1462
1493
|
}
|
|
1494
|
+
const target = resolveSessionTarget(options);
|
|
1495
|
+
let listed;
|
|
1463
1496
|
try {
|
|
1464
|
-
|
|
1497
|
+
listed = await listSessionsWithSource({
|
|
1465
1498
|
baseUrl: target.agentUrl,
|
|
1466
1499
|
auth: {
|
|
1467
1500
|
bearerToken: options.bearerToken,
|
|
1468
|
-
headers: target.headers,
|
|
1469
1501
|
},
|
|
1470
1502
|
fetchImpl: options.fetchImpl,
|
|
1471
1503
|
});
|
|
1472
|
-
if (options.json === true) {
|
|
1473
|
-
const payload = listed.source === undefined
|
|
1474
|
-
? { sessions: listed.sessions }
|
|
1475
|
-
: { sessions: listed.sessions, source: listed.source };
|
|
1476
|
-
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
1477
|
-
return 0;
|
|
1478
|
-
}
|
|
1479
|
-
process.stdout.write(formatSessionsTable(listed.sessions, { source: listed.source }));
|
|
1480
|
-
return 0;
|
|
1481
1504
|
}
|
|
1482
1505
|
catch (error) {
|
|
1483
|
-
|
|
1484
|
-
|
|
1506
|
+
throw sessionReadError(error);
|
|
1507
|
+
}
|
|
1508
|
+
const sessions = sinceMs === undefined
|
|
1509
|
+
? listed.sessions
|
|
1510
|
+
: listed.sessions.filter((s) => Date.parse(s.updatedAt) >= sinceMs);
|
|
1511
|
+
// A local server returns every session at once, so page here.
|
|
1512
|
+
const page = pageLocally(sessions, listOptionsOf(options));
|
|
1513
|
+
if (options.json === true) {
|
|
1514
|
+
printJson({
|
|
1515
|
+
items: projectFields(page.items, options.fields),
|
|
1516
|
+
nextPageToken: page.nextPageToken,
|
|
1517
|
+
source: listed.source,
|
|
1518
|
+
});
|
|
1519
|
+
return 0;
|
|
1520
|
+
}
|
|
1521
|
+
if (page.items.length === 0 && sessions.length > 0) {
|
|
1522
|
+
// Past the last page the agent can still have sessions.
|
|
1523
|
+
process.stdout.write("No more sessions.\n");
|
|
1524
|
+
return 0;
|
|
1525
|
+
}
|
|
1526
|
+
process.stdout.write(formatSessionsTable(page.items, { source: listed.source }));
|
|
1527
|
+
writeNextPageHint(page.nextPageToken);
|
|
1528
|
+
return 0;
|
|
1529
|
+
}
|
|
1530
|
+
function listOptionsOf(options) {
|
|
1531
|
+
return { limit: options.limit ?? DEFAULT_LIST_LIMIT, pageToken: options.pageToken };
|
|
1532
|
+
}
|
|
1533
|
+
function writeNextPageHint(nextPageToken) {
|
|
1534
|
+
const hint = nextPageHint(nextPageToken);
|
|
1535
|
+
if (hint !== undefined) {
|
|
1536
|
+
process.stderr.write(hint);
|
|
1485
1537
|
}
|
|
1486
1538
|
}
|
|
1487
|
-
|
|
1488
|
-
function
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
(
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1539
|
+
/** A failed read: API errors keep their status; others are sanitized. */
|
|
1540
|
+
function sessionReadError(error) {
|
|
1541
|
+
if (error instanceof DeployApiError) {
|
|
1542
|
+
return apiError(error);
|
|
1543
|
+
}
|
|
1544
|
+
if (error instanceof RemoteEvalError || error instanceof CliError) {
|
|
1545
|
+
return error;
|
|
1546
|
+
}
|
|
1547
|
+
return new CliError(sanitizeCustomerError(error instanceof Error ? error.message : String(error)), { code: "unavailable", cause: error });
|
|
1548
|
+
}
|
|
1549
|
+
function parseSessionsSince(raw, nowMs) {
|
|
1550
|
+
const trimmed = raw.trim();
|
|
1551
|
+
if (/^\d+(?:\.\d+)?\s*[a-z]+$/i.test(trimmed)) {
|
|
1552
|
+
return isValidDuration(trimmed) ? nowMs - parseDuration(trimmed) : undefined;
|
|
1553
|
+
}
|
|
1554
|
+
if (!/^\d{4}-\d{2}-\d{2}/.test(trimmed)) {
|
|
1555
|
+
return undefined;
|
|
1556
|
+
}
|
|
1557
|
+
const instant = Date.parse(trimmed);
|
|
1558
|
+
return Number.isNaN(instant) ? undefined : instant;
|
|
1559
|
+
}
|
|
1560
|
+
/** The hosted session cursor as an opaque `--page-token`. */
|
|
1561
|
+
function encodeSessionCursor(cursor) {
|
|
1562
|
+
return Buffer.from(JSON.stringify([cursor.lastActivityAt, cursor.id])).toString("base64url");
|
|
1563
|
+
}
|
|
1564
|
+
function decodeSessionCursor(token) {
|
|
1565
|
+
if (token === undefined) {
|
|
1566
|
+
return null;
|
|
1567
|
+
}
|
|
1568
|
+
try {
|
|
1569
|
+
const decoded = JSON.parse(Buffer.from(token, "base64url").toString("utf8"));
|
|
1570
|
+
if (Array.isArray(decoded) &&
|
|
1571
|
+
decoded.length === 2 &&
|
|
1572
|
+
typeof decoded[0] === "string" &&
|
|
1573
|
+
typeof decoded[1] === "string") {
|
|
1574
|
+
return { lastActivityAt: decoded[0], id: decoded[1] };
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
catch {
|
|
1578
|
+
// Fall through to the usage error.
|
|
1579
|
+
}
|
|
1580
|
+
throw new CliUsageError(`--page-token ${JSON.stringify(token)} is not a sessions page token`);
|
|
1505
1581
|
}
|
|
1506
|
-
/**
|
|
1507
|
-
|
|
1582
|
+
/**
|
|
1583
|
+
* Up to `--limit` of the hosted deployment's sessions, most recently active
|
|
1584
|
+
* first, following cursors as needed. With --since, the list stops at the
|
|
1585
|
+
* cutoff and has no next page after it.
|
|
1586
|
+
*/
|
|
1587
|
+
async function listHostedSessions(options, sinceMs) {
|
|
1588
|
+
// Check the token before any network call.
|
|
1589
|
+
decodeSessionCursor(options.pageToken);
|
|
1508
1590
|
const auth = await resolveDeployAuth({
|
|
1509
1591
|
team: options.team,
|
|
1510
1592
|
apiKey: options.apiKey,
|
|
@@ -1513,40 +1595,51 @@ async function readHostedSessionRuns(sessionId, options) {
|
|
|
1513
1595
|
if (typeof auth === "number") {
|
|
1514
1596
|
return auth;
|
|
1515
1597
|
}
|
|
1598
|
+
const slug = resolveProdSlug(options);
|
|
1599
|
+
const limit = options.limit ?? DEFAULT_LIST_LIMIT;
|
|
1600
|
+
const sessions = [];
|
|
1601
|
+
let nextPageToken = null;
|
|
1516
1602
|
try {
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
sessionId,
|
|
1522
|
-
});
|
|
1523
|
-
if (options.rawEvents === true || trimNonEmpty(options.out) !== undefined) {
|
|
1524
|
-
process.stderr.write("--events and --out need an engine trajectory.\n");
|
|
1525
|
-
return 2;
|
|
1526
|
-
}
|
|
1527
|
-
const latest = runs.executions.at(-1);
|
|
1528
|
-
const events = runs.executions.length === 0 || latest?.turnStatus === "running"
|
|
1529
|
-
? await auth.client
|
|
1530
|
-
.getAgentkitSessionEvents({
|
|
1603
|
+
// Ask only for what is still missing, so every page is used whole and
|
|
1604
|
+
// its cursor is a valid next-page token.
|
|
1605
|
+
for (let cursor = decodeSessionCursor(options.pageToken);;) {
|
|
1606
|
+
const page = await auth.client.listAgentkitSessions({
|
|
1531
1607
|
teamId: auth.teamId,
|
|
1532
1608
|
slug,
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
})
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1609
|
+
limit: limit - sessions.length,
|
|
1610
|
+
cursor,
|
|
1611
|
+
});
|
|
1612
|
+
const inWindow = sinceMs === undefined
|
|
1613
|
+
? page.sessions
|
|
1614
|
+
: page.sessions.filter((s) => Date.parse(s.lastActivityAt) >= sinceMs);
|
|
1615
|
+
sessions.push(...inWindow);
|
|
1616
|
+
if (page.nextCursor === null || inWindow.length < page.sessions.length) {
|
|
1617
|
+
break;
|
|
1618
|
+
}
|
|
1619
|
+
// Without --since one request is one page. With it, keep reading
|
|
1620
|
+
// back until the cutoff or --limit.
|
|
1621
|
+
if (sinceMs === undefined || sessions.length >= limit || page.sessions.length === 0) {
|
|
1622
|
+
nextPageToken = encodeSessionCursor(page.nextCursor);
|
|
1623
|
+
break;
|
|
1624
|
+
}
|
|
1625
|
+
cursor = page.nextCursor;
|
|
1626
|
+
}
|
|
1542
1627
|
}
|
|
1543
1628
|
catch (error) {
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
return
|
|
1629
|
+
throw sessionReadError(error);
|
|
1630
|
+
}
|
|
1631
|
+
if (options.json === true) {
|
|
1632
|
+
printListJson({ items: sessions, nextPageToken }, { fields: options.fields });
|
|
1633
|
+
return 0;
|
|
1634
|
+
}
|
|
1635
|
+
if (sessions.length === 0 && options.pageToken !== undefined) {
|
|
1636
|
+
// Past the last page the deployment can still have sessions.
|
|
1637
|
+
process.stdout.write("No more sessions.\n");
|
|
1638
|
+
return 0;
|
|
1549
1639
|
}
|
|
1640
|
+
process.stdout.write(formatHostedSessionsTable(sessions));
|
|
1641
|
+
writeNextPageHint(nextPageToken);
|
|
1642
|
+
return 0;
|
|
1550
1643
|
}
|
|
1551
1644
|
/**
|
|
1552
1645
|
* `session <id>` — view a full session (trajectory text by default).
|
|
@@ -1558,71 +1651,67 @@ async function readHostedSessionRuns(sessionId, options) {
|
|
|
1558
1651
|
export async function cmdSession(sessionId, options) {
|
|
1559
1652
|
if (options.prod === true && (options.messages?.length ?? 0) > 0) {
|
|
1560
1653
|
// `session --prod [ses_…] --message` is the same hosted start as
|
|
1561
|
-
// `run --prod`, with the positional id as the session to resume.
|
|
1562
|
-
|
|
1563
|
-
const started = await cmdHostedSession({
|
|
1654
|
+
// `run --prod`, with the positional id as the session to resume.
|
|
1655
|
+
return cmdHostedSession({
|
|
1564
1656
|
...options,
|
|
1565
1657
|
sessionId: trimNonEmpty(sessionId) ?? options.sessionId,
|
|
1566
1658
|
});
|
|
1567
|
-
if (started === "fallback") {
|
|
1568
|
-
process.stderr.write(`Hosted session start returned 404 for slug ${resolveProdSlug(options)}: deploy a running AgentSDK v2 agent, or use \`${CLI_COMMAND_NAME} run --prod\` (falls back to the v1 engine).\n`);
|
|
1569
|
-
return 1;
|
|
1570
|
-
}
|
|
1571
|
-
return started;
|
|
1572
1659
|
}
|
|
1573
1660
|
if (sessionId === undefined || sessionId.trim() === "") {
|
|
1574
|
-
process.stderr.write(`Usage: ${CLI_COMMAND_NAME} session <ses_> [--url | --prod] [--slug <slug>] [--
|
|
1575
|
-
` or: ${CLI_COMMAND_NAME} session
|
|
1661
|
+
process.stderr.write(`Usage: ${CLI_COMMAND_NAME} session get <ses_> [--url | --prod] [--slug <slug>] [--view trajectory|events|cost] [--json] [--trace <file.ndjson>]\n` +
|
|
1662
|
+
` or: ${CLI_COMMAND_NAME} session create --slug <slug> --message "…" [--session <ses_>] [--wait]\n`);
|
|
1576
1663
|
return 2;
|
|
1577
1664
|
}
|
|
1578
1665
|
if (options.rawEvents === true && options.json === true) {
|
|
1579
|
-
process.stderr.write("--events and --json are mutually exclusive\n");
|
|
1666
|
+
process.stderr.write("--view events and --json are mutually exclusive\n");
|
|
1580
1667
|
return 2;
|
|
1581
1668
|
}
|
|
1582
|
-
if (options.prod === true && options.url
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
return hosted;
|
|
1586
|
-
}
|
|
1669
|
+
if (options.prod === true && options.url !== undefined) {
|
|
1670
|
+
process.stderr.write("--prod and --url are mutually exclusive\n");
|
|
1671
|
+
return 2;
|
|
1587
1672
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
return target;
|
|
1673
|
+
if (options.prod === true) {
|
|
1674
|
+
return readHostedSessionView(sessionId, options);
|
|
1591
1675
|
}
|
|
1676
|
+
const target = resolveSessionTarget(options);
|
|
1677
|
+
let events;
|
|
1592
1678
|
try {
|
|
1593
|
-
|
|
1679
|
+
events = await fetchSessionEvents({
|
|
1594
1680
|
baseUrl: target.agentUrl,
|
|
1595
1681
|
sessionId,
|
|
1596
1682
|
auth: {
|
|
1597
1683
|
bearerToken: options.bearerToken,
|
|
1598
|
-
headers: target.headers,
|
|
1599
1684
|
},
|
|
1600
1685
|
fetchImpl: options.fetchImpl,
|
|
1601
1686
|
});
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
process.stdout.write(`${JSON.stringify({ sessionId, events }, null, 2)}\n`);
|
|
1612
|
-
return 0;
|
|
1613
|
-
}
|
|
1614
|
-
const trajectory = buildTrajectory(events);
|
|
1687
|
+
}
|
|
1688
|
+
catch (error) {
|
|
1689
|
+
throw sessionReadError(error);
|
|
1690
|
+
}
|
|
1691
|
+
const outPath = trimNonEmpty(options.out);
|
|
1692
|
+
if (outPath !== undefined) {
|
|
1693
|
+
const targetPath = resolve(outPath);
|
|
1694
|
+
await mkdir(dirname(targetPath), { recursive: true });
|
|
1695
|
+
await writeFile(targetPath, `${events.map((e) => JSON.stringify(e)).join("\n")}\n`, "utf8");
|
|
1615
1696
|
if (options.json === true) {
|
|
1616
|
-
|
|
1617
|
-
|
|
1697
|
+
printJson({ trace: targetPath, events: events.length });
|
|
1698
|
+
}
|
|
1699
|
+
else {
|
|
1700
|
+
process.stdout.write(`trace: ${targetPath} (${events.length} events)\n`);
|
|
1618
1701
|
}
|
|
1619
|
-
process.stdout.write(formatTrajectoryText(trajectory));
|
|
1620
1702
|
return 0;
|
|
1621
1703
|
}
|
|
1622
|
-
|
|
1623
|
-
process.
|
|
1624
|
-
return
|
|
1704
|
+
if (options.rawEvents === true) {
|
|
1705
|
+
process.stdout.write(`${JSON.stringify({ sessionId, events }, null, 2)}\n`);
|
|
1706
|
+
return 0;
|
|
1707
|
+
}
|
|
1708
|
+
const trajectory = buildTrajectory(events);
|
|
1709
|
+
if (options.json === true) {
|
|
1710
|
+
printJson(trajectory, { fields: options.fields });
|
|
1711
|
+
return 0;
|
|
1625
1712
|
}
|
|
1713
|
+
process.stdout.write(formatTrajectoryText(trajectory));
|
|
1714
|
+
return 0;
|
|
1626
1715
|
}
|
|
1627
1716
|
/** Sessions fetched concurrently when `cost` aggregates every session. */
|
|
1628
1717
|
const COST_FETCH_CONCURRENCY = 4;
|
|
@@ -1637,13 +1726,12 @@ const COST_FETCH_CONCURRENCY = 4;
|
|
|
1637
1726
|
* text is the default.
|
|
1638
1727
|
*/
|
|
1639
1728
|
export async function cmdCost(sessionId, options) {
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
return target;
|
|
1729
|
+
if (options.prod === true) {
|
|
1730
|
+
return rejectProd("cost");
|
|
1643
1731
|
}
|
|
1732
|
+
const target = resolveSessionTarget(options);
|
|
1644
1733
|
const auth = {
|
|
1645
1734
|
bearerToken: options.bearerToken,
|
|
1646
|
-
headers: target.headers,
|
|
1647
1735
|
};
|
|
1648
1736
|
try {
|
|
1649
1737
|
const resolved = trimNonEmpty(sessionId);
|
|
@@ -1709,11 +1797,10 @@ export async function cmdCost(sessionId, options) {
|
|
|
1709
1797
|
}
|
|
1710
1798
|
}
|
|
1711
1799
|
/**
|
|
1712
|
-
* `playground` — open the local web UI
|
|
1800
|
+
* `playground` — open the local web UI or the hosted v2 portal UI.
|
|
1713
1801
|
*
|
|
1714
|
-
* `--prod` opens the
|
|
1715
|
-
*
|
|
1716
|
-
* proxy — Ctrl-C stops that proxy.
|
|
1802
|
+
* `--prod` opens the portal URL. `--bearer-token` on local targets runs a
|
|
1803
|
+
* loopback reverse proxy — Ctrl-C stops that proxy.
|
|
1717
1804
|
*/
|
|
1718
1805
|
export async function cmdPlayground(options) {
|
|
1719
1806
|
if (options.prod === true && options.url !== undefined) {
|
|
@@ -1723,36 +1810,24 @@ export async function cmdPlayground(options) {
|
|
|
1723
1810
|
const sessionId = options.sessionId !== undefined && options.sessionId.trim() !== ""
|
|
1724
1811
|
? options.sessionId.trim()
|
|
1725
1812
|
: undefined;
|
|
1726
|
-
// Hosted
|
|
1813
|
+
// Hosted opens the portal-hosted shell.
|
|
1727
1814
|
if (options.prod === true) {
|
|
1728
|
-
let
|
|
1815
|
+
let playgroundUrl;
|
|
1729
1816
|
try {
|
|
1730
|
-
|
|
1731
|
-
dir: options.dir,
|
|
1732
|
-
cwd: options.cwd,
|
|
1733
|
-
slug: options.slug,
|
|
1734
|
-
team: options.team,
|
|
1735
|
-
apiKey: options.apiKey,
|
|
1736
|
-
fetchImpl: options.fetchImpl,
|
|
1737
|
-
sessionId,
|
|
1738
|
-
});
|
|
1817
|
+
playgroundUrl = prodPlaygroundUrl(resolveProdSlug(options), sessionId);
|
|
1739
1818
|
}
|
|
1740
1819
|
catch (error) {
|
|
1741
|
-
process.stderr.write(`${
|
|
1820
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
|
|
1742
1821
|
return 1;
|
|
1743
1822
|
}
|
|
1744
|
-
process.stdout.write(`${
|
|
1823
|
+
process.stdout.write(`${playgroundUrl}\n`);
|
|
1745
1824
|
if (options.print !== true) {
|
|
1746
|
-
openBrowser(
|
|
1825
|
+
openBrowser(playgroundUrl);
|
|
1747
1826
|
}
|
|
1748
1827
|
return 0;
|
|
1749
1828
|
}
|
|
1750
|
-
const target =
|
|
1751
|
-
|
|
1752
|
-
return target;
|
|
1753
|
-
}
|
|
1754
|
-
const needsProxy = (target.headers !== undefined && Object.keys(target.headers).length > 0) ||
|
|
1755
|
-
(options.bearerToken !== undefined && options.bearerToken.trim() !== "");
|
|
1829
|
+
const target = resolveSessionTarget(options);
|
|
1830
|
+
const needsProxy = options.bearerToken !== undefined && options.bearerToken.trim() !== "";
|
|
1756
1831
|
if (!needsProxy) {
|
|
1757
1832
|
const base = `${target.agentUrl.replace(/\/$/, "")}/playground`;
|
|
1758
1833
|
const playgroundUrl = sessionId === undefined ? base : `${base}?sessionId=${encodeURIComponent(sessionId)}`;
|
|
@@ -1766,7 +1841,6 @@ export async function cmdPlayground(options) {
|
|
|
1766
1841
|
try {
|
|
1767
1842
|
proxy = await startPlaygroundProxy({
|
|
1768
1843
|
upstreamUrl: target.agentUrl,
|
|
1769
|
-
headers: target.headers,
|
|
1770
1844
|
bearerToken: options.bearerToken,
|
|
1771
1845
|
});
|
|
1772
1846
|
}
|
|
@@ -1786,7 +1860,7 @@ async function runPlaygroundProxySession(args) {
|
|
|
1786
1860
|
const playgroundUrl = proxy.playgroundUrl(args.sessionId);
|
|
1787
1861
|
process.stdout.write(`${playgroundUrl}\n`);
|
|
1788
1862
|
process.stderr.write(`Playground proxy on loopback (Ctrl-C to stop).\n`);
|
|
1789
|
-
if (args.print
|
|
1863
|
+
if (!args.print) {
|
|
1790
1864
|
openBrowser(playgroundUrl);
|
|
1791
1865
|
}
|
|
1792
1866
|
const controller = new AbortController();
|