cf 1.0.0-beta.27 → 1.0.0-beta.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.
Files changed (370) hide show
  1. package/README.md +10 -3
  2. package/dist/_meta/commands.json +7966 -5034
  3. package/dist/_meta/hand-written-commands.json +40 -10
  4. package/dist/_meta/schemas.json +3153 -3736
  5. package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
  6. package/dist/{access-BxEprr2f.mjs → access-Cte4yyIz.mjs} +1 -1
  7. package/dist/{accounts-DU2ZNYqP.mjs → accounts-G-x-_cEx.mjs} +58 -57
  8. package/dist/{acm-CBCIKBJ4.mjs → acm-Bg3HqMGG.mjs} +7 -7
  9. package/dist/{addressing-BKxiLRHk.mjs → addressing-BwEofGEm.mjs} +46 -46
  10. package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
  11. package/dist/ai-DWWRIQIt.mjs +30 -0
  12. package/dist/ai-audit-CMEBz6ZP.mjs +6 -0
  13. package/dist/ai-gateway-D2s0isU-.mjs +76 -0
  14. package/dist/ai-search-a0uqr9yJ.mjs +74 -0
  15. package/dist/{ai-security-CvZfP2JC.mjs → ai-security-H_RqjRoL.mjs} +4 -4
  16. package/dist/alerting-Bgp9rE4I.mjs +52 -0
  17. package/dist/analytics-CFYM82FD.mjs +17 -0
  18. package/dist/analytics-engine-BLiEaLxb.mjs +4 -0
  19. package/dist/api-Dnt6lRJG.mjs +3 -0
  20. package/dist/{api-security-BbcvDtff.mjs → api-security-B0YtHglt.mjs} +63 -63
  21. package/dist/argo-BPwbzHY7.mjs +14 -0
  22. package/dist/{artifacts-2R2sxIKO.mjs → artifacts-B6UwC2PH.mjs} +20 -20
  23. package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-kG97iEnI.mjs} +2 -2
  24. package/dist/auth-Czr8ChBB.mjs +2 -0
  25. package/dist/auth-DA1PHaHi.mjs +2 -0
  26. package/dist/auth-Dwfa4S3h.mjs +7 -0
  27. package/dist/{auth-token-BwpERbnG.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
  28. package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-B4tFR6ua.mjs} +118 -114
  29. package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
  30. package/dist/billing-TERxOuLR.mjs +22 -0
  31. package/dist/{blocks-C8vyXIAT.mjs → blocks-C3Im7AT0.mjs} +1 -1
  32. package/dist/body-parser-HN91kAf0.mjs +2 -0
  33. package/dist/{body-unions-CjpNjwSW.mjs → body-unions-D9OSaf4M.mjs} +1 -1
  34. package/dist/{bot-management-fwxKIbaB.mjs → bot-management-SZw9jTOC.mjs} +4 -4
  35. package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
  36. package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
  37. package/dist/browser-run-BvjfMK3f.mjs +40 -0
  38. package/dist/build-CCwo_ydV.mjs +2 -0
  39. package/dist/build-yQOzZg6Z.mjs +2 -0
  40. package/dist/builds-tMa3sbQU.mjs +62 -0
  41. package/dist/cache-b_EPh6Is.mjs +36 -0
  42. package/dist/cf-DmvZ2L51.mjs +18 -0
  43. package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
  44. package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
  45. package/dist/cli-Cc7ujzAy.mjs +4 -0
  46. package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
  47. package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
  48. package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
  49. package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
  50. package/dist/{command-BxZBNPxG.mjs → command-BQbZw4Kx.mjs} +1 -1
  51. package/dist/command-BVct0Dvr.mjs +2 -0
  52. package/dist/{command-BiIVclNA.mjs → command-C4_lMRkw.mjs} +1 -1
  53. package/dist/command-CJ3ldWrA.mjs +2 -0
  54. package/dist/command-CyOdBNur.mjs +2 -0
  55. package/dist/command-D2XkyO1e.mjs +2 -0
  56. package/dist/command-DHODgfFZ.mjs +2 -0
  57. package/dist/command-DIIaZx_f.mjs +2 -0
  58. package/dist/command-DONwHpqZ.mjs +2 -0
  59. package/dist/command-DdYnSf-8.mjs +2 -0
  60. package/dist/command-DqOU7Ql2.mjs +2 -0
  61. package/dist/{command-pMoNdd22.mjs → command-HW7k43qu.mjs} +1 -1
  62. package/dist/command-NqM0lo4a.mjs +2 -0
  63. package/dist/command-bwVDyMv4.mjs +2 -0
  64. package/dist/command-yzqs4m83.mjs +2 -0
  65. package/dist/{completions-DRzBiqpv.mjs → completions-0YKvIyBT.mjs} +2 -2
  66. package/dist/connector-interrupts-CsunbRsr.mjs +6 -0
  67. package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
  68. package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
  69. package/dist/{connectors-D1WFLJoE.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
  70. package/dist/containers-BiA_bpPR.mjs +76 -0
  71. package/dist/{content-scan-D1GfPSL0.mjs → content-scan-4SA2nacB.mjs} +6 -6
  72. package/dist/{context-Dp4CXG22.mjs → context-BGm5_wTT.mjs} +1 -1
  73. package/dist/{cps-D4uhzg3k.mjs → cps-WDmD3V5I.mjs} +3 -3
  74. package/dist/create-DmLDMvrj.mjs +2 -0
  75. package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
  76. package/dist/custom-csrs-D-lvkyRV.mjs +18 -0
  77. package/dist/custom-hostnames-B5BQX5m6.mjs +24 -0
  78. package/dist/custom-nameservers-CZrRjcjx.mjs +12 -0
  79. package/dist/custom-pages-CWwjtfbj.mjs +38 -0
  80. package/dist/d1-N81q-FAr.mjs +50 -0
  81. package/dist/{delegate-B4bKqF7i.mjs → delegate-livNdiwK.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/deploy-Ok4ncy06.mjs +2 -0
  84. package/dist/deploy-context-B_lLfxt7.mjs +55 -0
  85. package/dist/deploy-input-JZlEJwKB.mjs +2 -0
  86. package/dist/dev-DxbkJkzc.mjs +4 -0
  87. package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
  88. package/dist/dialog-CD94-Kzw.mjs +2 -0
  89. package/dist/discover-D9FNaCDK.mjs +2 -0
  90. package/dist/discover-DGsMj9ZN.mjs +2 -0
  91. package/dist/{dist-D5qkmHhC.mjs → dist-BxhwE-W1.mjs} +202 -193
  92. package/dist/{dls-DWBiYzY1.mjs → dls-5OXuxLAB.mjs} +8 -8
  93. package/dist/dns-Burep9O7.mjs +142 -0
  94. package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
  95. package/dist/docs-BFVK88kB.mjs +3 -0
  96. package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-qsnRlRk6.mjs} +1 -1
  97. package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
  98. package/dist/email-auth--2KCzZNA.mjs +6 -0
  99. package/dist/email-routing-DzaExfVf.mjs +44 -0
  100. package/dist/{email-security-CnNa1YON.mjs → email-security-DwQJszzy.mjs} +71 -71
  101. package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-mQd2qB-o.mjs} +21 -21
  102. package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
  103. package/dist/error-sanitization-D069tpKk.mjs +2 -0
  104. package/dist/errors-C_bGcR0X.mjs +11 -0
  105. package/dist/field-extractors-MVOizTlB.mjs +8 -0
  106. package/dist/{firewall-CY_oem-d.mjs → firewall-DtSIlkfL.mjs} +19 -19
  107. package/dist/flagship-9E5gwNki.mjs +24 -0
  108. package/dist/{fraud-CSUKLh8X.mjs → fraud-DjqhVJdf.mjs} +3 -3
  109. package/dist/generate-BzOnRBij.mjs +2 -0
  110. package/dist/generate-DfxZtpn9.mjs +2 -0
  111. package/dist/get-3XNn0upb.mjs +2 -0
  112. package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
  113. package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
  114. package/dist/gt-BV-jij5q.mjs +4 -0
  115. package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
  116. package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
  117. package/dist/{iam-8T74DNhH.mjs → iam-BK6N7NdQ.mjs} +31 -31
  118. package/dist/{images-C3JUaf6b.mjs → images-3bCWE6Ml.mjs} +33 -33
  119. package/dist/index.mjs +1 -1
  120. package/dist/init-BgCF9K8h.mjs +43 -0
  121. package/dist/intel-BQ58CJLt.mjs +62 -0
  122. package/dist/{interactive-CKHdGvkh.mjs → interactive-JBA3qOUa.mjs} +9 -9
  123. package/dist/{internal-CamuESs0.mjs → internal-CWPz0sBF.mjs} +2 -2
  124. package/dist/{ips-DinCNnWj.mjs → ips-3WYegiVW.mjs} +2 -2
  125. package/dist/k2-Bc_hjmiv.mjs +10 -0
  126. package/dist/kv-DbShBhhg.mjs +12 -0
  127. package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
  128. package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
  129. package/dist/{live-B6AsI_E5.mjs → live-BTtMv1a6.mjs} +2 -2
  130. package/dist/load-balancers-C2hg52WA.mjs +84 -0
  131. package/dist/{local-CgBhtmON.mjs → local-B3zt9PXR.mjs} +1 -1
  132. package/dist/local-DRxctCh9.mjs +2 -0
  133. package/dist/local-runtime-BOnDiMDc.mjs +2 -0
  134. package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
  135. package/dist/log-DBAHla_W.mjs +2 -0
  136. package/dist/login-CK3nn9a5.mjs +2 -0
  137. package/dist/{login-BJHaTERg.mjs → login-DiR-buzS.mjs} +3 -3
  138. package/dist/{logpush-qhlxsioM.mjs → logpush-CitvUX-J.mjs} +22 -22
  139. package/dist/{logs-bI54CJ0w.mjs → logs-CfWHu4Ir.mjs} +14 -16
  140. package/dist/magic-network-monitoring-gU6yzzML.mjs +34 -0
  141. package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
  142. package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
  143. package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
  144. package/dist/{mcp-CyI0sDmL.mjs → mcp-DqhQJVaz.mjs} +15 -15
  145. package/dist/{mesh-Czr0UCP4.mjs → mesh-DXVZBNDC.mjs} +12 -12
  146. package/dist/{migrate-DKDWYrz2.mjs → migrate-CmXyk9vX.mjs} +1 -1
  147. package/dist/{monetization-NUgfDtSy.mjs → monetization-CWg-mySr.mjs} +9 -9
  148. package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
  149. package/dist/{network-B42zrBic.mjs → network-jtgq5eb4.mjs} +24 -24
  150. package/dist/o11y-eYYs59X9.mjs +88 -0
  151. package/dist/oauth-BgDZMd72.mjs +5 -0
  152. package/dist/{oauth-BLQ1-y3R.mjs → oauth-V37G-PaV.mjs} +1 -1
  153. package/dist/{observability-BxhJQCgZ.mjs → observability-CB72eC4T.mjs} +2 -2
  154. package/dist/ohttp-gateway-K9ToEft8.mjs +8 -0
  155. package/dist/organizations-BllV7l_c.mjs +70 -0
  156. package/dist/output-hFMAotFl.mjs +2 -0
  157. package/dist/package-oNVeacC9.mjs +2 -0
  158. package/dist/page-rules-BVmi-ZFW.mjs +35 -0
  159. package/dist/pages-5spcBpX1.mjs +48 -0
  160. package/dist/pay-per-crawl-BgsdGcBi.mjs +36 -0
  161. package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
  162. package/dist/pipelines-CbtmLRxt.mjs +40 -0
  163. package/dist/{precursor-D3VH2MXT.mjs → precursor-Dk8YOKf_.mjs} +2 -2
  164. package/dist/previews-Bv1HMMtO.mjs +6 -0
  165. package/dist/progress-DE_G09u2.mjs +2 -0
  166. package/dist/project-settings-D_S-UC8I.mjs +3 -0
  167. package/dist/prompt-D274Im1O.mjs +4 -0
  168. package/dist/queues-DGCYUr4g.mjs +52 -0
  169. package/dist/r2-DtCk-Nfi.mjs +112 -0
  170. package/dist/{radar-CvLtu-Vr.mjs → radar-1CwqOsMZ.mjs} +150 -150
  171. package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
  172. package/dist/{ready-gsGEaWLL.mjs → ready-CcoEA7M7.mjs} +2 -2
  173. package/dist/{realtime-DiCEgFTC.mjs → realtime-DFUxwIG5.mjs} +80 -81
  174. package/dist/registrar-Cl1snz8z.mjs +43 -0
  175. package/dist/registrar-sandbox-Cne9BVCZ.mjs +58 -0
  176. package/dist/{reporting-BiHgnT8L.mjs → reporting-D9FC-Z-3.mjs} +7 -7
  177. package/dist/request-headers-Bopp5lH_.mjs +2 -0
  178. package/dist/request-tracers-CSSB9_aW.mjs +4 -0
  179. package/dist/resource-sharing-D8yuzJm7.mjs +36 -0
  180. package/dist/{rules-CRhe_ca9.mjs → rules-DzmOQ3MB.mjs} +8 -8
  181. package/dist/rulesets-DsTGcgbc.mjs +42 -0
  182. package/dist/{rum-BfnWHW_d.mjs → rum-DrJLI93T.mjs} +14 -14
  183. package/dist/run-C5yPsiO2.mjs +2 -0
  184. package/dist/run-CXWkMU3x.mjs +2 -0
  185. package/dist/schema-CfZOW8Zw.mjs +2 -0
  186. package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
  187. package/dist/schema-flags-DO3kLYBu.mjs +4 -0
  188. package/dist/scim-0OufLKru.mjs +16 -0
  189. package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
  190. package/dist/{security-insights-SlUGW3F_.mjs → security-insights-D2pj8-O-.mjs} +20 -20
  191. package/dist/{security-txt-C3YS0REz.mjs → security-txt-SKtgW4n-.mjs} +4 -4
  192. package/dist/session-COdP8BXD.mjs +2 -0
  193. package/dist/shared-D_2KLpP3.mjs +2 -0
  194. package/dist/{signed-url-ClLk45_J.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
  195. package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
  196. package/dist/snippets-DrrdpLnS.mjs +18 -0
  197. package/dist/spawn-DNf-Ge8d.mjs +5 -0
  198. package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-CHBGZbZF.mjs} +11 -11
  199. package/dist/{speed-BrVeZRyX.mjs → speed-vOlHyG3v.mjs} +11 -11
  200. package/dist/sql-BCuLxGSf.mjs +4 -0
  201. package/dist/src-ByCoEqOw.mjs +133 -0
  202. package/dist/{ssl-Bx4LCutF.mjs → ssl-BA_dcVwF.mjs} +60 -62
  203. package/dist/startup-profile-CyQk_f_L.mjs +2 -0
  204. package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
  205. package/dist/state-B6r-b_-d.mjs +2 -0
  206. package/dist/{state-BmzOLELo.mjs → state-CTLznbVs.mjs} +1 -1
  207. package/dist/{containers-DINLx5_i.mjs → static-assets-DGDoaJf1.mjs} +216 -210
  208. package/dist/stream-CzlqY8hq.mjs +89 -0
  209. package/dist/{tags-xVzjZxdt.mjs → tags-BLeaslAb.mjs} +8 -8
  210. package/dist/telemetry-COlodX5Z.mjs +2 -0
  211. package/dist/{telemetry-CJ9URio3.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
  212. package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
  213. package/dist/tenants-CRirmhxS.mjs +13 -0
  214. package/dist/{tools-C-vmgYSv.mjs → tools-BRjRgZnj.mjs} +1 -1
  215. package/dist/tunnels-nLfIWPYT.mjs +27 -0
  216. package/dist/{turnstile-B_Ugzgom.mjs → turnstile-CZjXtBCr.mjs} +10 -10
  217. package/dist/ui-dWsVmFCG.mjs +2 -0
  218. package/dist/{update-check-DRr0eRhB.mjs → update-check-CXMdVBhW.mjs} +1 -1
  219. package/dist/{update-check-DHUo4FOJ.mjs → update-check-D_Oky9-u.mjs} +1 -1
  220. package/dist/update-check-worker.mjs +1 -1
  221. package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
  222. package/dist/url-scanner-9XW3zLaU.mjs +16 -0
  223. package/dist/user-Bk1BIqZ5.mjs +103 -0
  224. package/dist/vectorize-CgOfmWYq.mjs +30 -0
  225. package/dist/verify-B9ILCohg.mjs +2 -0
  226. package/dist/verify-BCuWaO-L.mjs +2 -0
  227. package/dist/version-CcuBNjqg.mjs +2 -0
  228. package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
  229. package/dist/{web-assets-CgQXsp8m.mjs → web-assets-CWU3jrit.mjs} +29 -29
  230. package/dist/web3-CRpQ5sl4.mjs +26 -0
  231. package/dist/workers-BZMvamn0.mjs +39 -0
  232. package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
  233. package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
  234. package/dist/workflows-Dd88_Nqc.mjs +48 -0
  235. package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-BzMTJPdI.mjs} +302 -293
  236. package/dist/zaraz-BFK0p28R.mjs +22 -0
  237. package/dist/zero-trust-Cdjfp0Ie.mjs +1008 -0
  238. package/dist/{zones-DTAcguf6.mjs → zones-DDn5jk6I.mjs} +51 -51
  239. package/package.json +20 -20
  240. package/dist/ai-DqEN_hhg.mjs +0 -30
  241. package/dist/ai-audit-BmzOgt6x.mjs +0 -6
  242. package/dist/ai-gateway-B0uiYVHq.mjs +0 -74
  243. package/dist/ai-search-DbZIxdio.mjs +0 -74
  244. package/dist/alerting-BjGwBxZT.mjs +0 -52
  245. package/dist/analytics-C7kT_H-W.mjs +0 -17
  246. package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
  247. package/dist/api-X3wKppsT.mjs +0 -3
  248. package/dist/argo-D1VONzu-.mjs +0 -14
  249. package/dist/auth-CspwoBlp.mjs +0 -2
  250. package/dist/auth-D499YE2n.mjs +0 -7
  251. package/dist/auth-FK2eLQ02.mjs +0 -2
  252. package/dist/billing-DRNww0iC.mjs +0 -24
  253. package/dist/body-parser-BKcZS9iJ.mjs +0 -2
  254. package/dist/brand-protection-BVICLzBc.mjs +0 -26
  255. package/dist/browser-run-CEk-NIgP.mjs +0 -40
  256. package/dist/build-CRm2TQq8.mjs +0 -2
  257. package/dist/build-DO_GNhRl.mjs +0 -2
  258. package/dist/builds-CoazxuN-.mjs +0 -64
  259. package/dist/cache-jlLJLSu7.mjs +0 -36
  260. package/dist/cf-hP0SOgC6.mjs +0 -18
  261. package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +0 -363
  262. package/dist/cli-Nqf58-1c.mjs +0 -4
  263. package/dist/cloudforce-one-CCaIBOAo.mjs +0 -318
  264. package/dist/command-BASaTmJc.mjs +0 -2
  265. package/dist/command-Bih1HLr3.mjs +0 -2
  266. package/dist/command-ByYf12-8.mjs +0 -2
  267. package/dist/command-C0qCuw03.mjs +0 -2
  268. package/dist/command-C2FVMd1b.mjs +0 -2
  269. package/dist/command-C4OgtX_x.mjs +0 -2
  270. package/dist/command-C5Kqc5Km.mjs +0 -2
  271. package/dist/command-CFxyp8Uo.mjs +0 -2
  272. package/dist/command-CZAR85ba.mjs +0 -2
  273. package/dist/command-CelQVrZL.mjs +0 -2
  274. package/dist/command-CrAlzysj.mjs +0 -2
  275. package/dist/command-MxFFWqMg.mjs +0 -2
  276. package/dist/connector-interrupts-CrTeSyaM.mjs +0 -6
  277. package/dist/containers-BOBEs1Gk.mjs +0 -75
  278. package/dist/create-BtmuVqVL.mjs +0 -2
  279. package/dist/csam-scanner-DOOUBeBM.mjs +0 -8
  280. package/dist/custom-csrs-DtdFo5YZ.mjs +0 -18
  281. package/dist/custom-hostnames-ccdlELaD.mjs +0 -24
  282. package/dist/custom-nameservers-p3gDjfva.mjs +0 -12
  283. package/dist/custom-pages-DAkKVzgR.mjs +0 -38
  284. package/dist/d1-CDIyRdh4.mjs +0 -52
  285. package/dist/deploy-BaC5Ty7F.mjs +0 -2
  286. package/dist/deploy-context-DTTgNGro.mjs +0 -56
  287. package/dist/deploy-input-mAy06fAI.mjs +0 -2
  288. package/dist/dev-De-HszNT.mjs +0 -4
  289. package/dist/dialog-D5lus4M4.mjs +0 -2
  290. package/dist/discover-6kAmVMPp.mjs +0 -2
  291. package/dist/discover-C06Syc2B.mjs +0 -2
  292. package/dist/dns-wMjf1t6-.mjs +0 -152
  293. package/dist/docs-BA7qslb2.mjs +0 -3
  294. package/dist/email-auth-BShMFXn4.mjs +0 -6
  295. package/dist/email-domains-CDSbVclP.mjs +0 -14
  296. package/dist/email-routing-CBCkbg_F.mjs +0 -44
  297. package/dist/error-sanitization-B025CygB.mjs +0 -2
  298. package/dist/errors-DatLr-iR.mjs +0 -11
  299. package/dist/field-extractors-BwGdMnTr.mjs +0 -8
  300. package/dist/flagship-Bat5EZCk.mjs +0 -24
  301. package/dist/generate-CeeWW3eX.mjs +0 -3
  302. package/dist/generate-D6V4Q58z.mjs +0 -2
  303. package/dist/get-Be821dio.mjs +0 -2
  304. package/dist/gt-BQkaDQDq.mjs +0 -3
  305. package/dist/healthchecks-uC43QKQd.mjs +0 -20
  306. package/dist/init-BEVVz4_P.mjs +0 -43
  307. package/dist/intel-DRy4rHrt.mjs +0 -62
  308. package/dist/k2-wsanPL3y.mjs +0 -10
  309. package/dist/kv-BLSPcEnH.mjs +0 -12
  310. package/dist/leaked-credential-checks-CSZd9hBQ.mjs +0 -16
  311. package/dist/load-balancers-gap5u4b1.mjs +0 -84
  312. package/dist/local-CFsO9Tkg.mjs +0 -2
  313. package/dist/local-runtime-CmlJ20uJ.mjs +0 -2
  314. package/dist/log-DZfik9Jk.mjs +0 -2
  315. package/dist/login-BfuOf-Yi.mjs +0 -2
  316. package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
  317. package/dist/managed-transforms-CUC-uAbW.mjs +0 -8
  318. package/dist/o11y-oEUpMC3O.mjs +0 -86
  319. package/dist/oauth-BmSFLp_s.mjs +0 -4
  320. package/dist/organization-CEnlXwrl.mjs +0 -70
  321. package/dist/organizations-Dt86ToxE.mjs +0 -4
  322. package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
  323. package/dist/output-BJEgbI0G.mjs +0 -2
  324. package/dist/package-CiRJBRHO.mjs +0 -2
  325. package/dist/page-rules-J6LhwR-s.mjs +0 -38
  326. package/dist/pages-BksdnChs.mjs +0 -48
  327. package/dist/pay-per-crawl-BLcbHRoR.mjs +0 -36
  328. package/dist/pipelines-B5AoB3f3.mjs +0 -40
  329. package/dist/previews-DzJ85fsr.mjs +0 -6
  330. package/dist/progress-DLri-rA7.mjs +0 -2
  331. package/dist/project-settings-nBMEx1f-.mjs +0 -3
  332. package/dist/prompt-D0dXwuME.mjs +0 -4
  333. package/dist/queues-BsAck4To.mjs +0 -52
  334. package/dist/r2-BYjdHDEZ.mjs +0 -112
  335. package/dist/raw-fetch-DQeDx1wT.mjs +0 -2
  336. package/dist/registrar-D4wdgWpo.mjs +0 -43
  337. package/dist/registrar-sandbox-B6yopzdG.mjs +0 -58
  338. package/dist/request-headers-CoxHUNcB.mjs +0 -2
  339. package/dist/request-tracers-817HTytF.mjs +0 -4
  340. package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
  341. package/dist/rulesets-CKyc-Xlx.mjs +0 -42
  342. package/dist/run-Ciw_GIrC.mjs +0 -2
  343. package/dist/run-DD45EQTm.mjs +0 -2
  344. package/dist/schema-DuLIZRhA.mjs +0 -2
  345. package/dist/schema-flags-DrqvwQNw.mjs +0 -4
  346. package/dist/scim-C4iRWNYB.mjs +0 -16
  347. package/dist/session-D2yuwO4i.mjs +0 -2
  348. package/dist/shared--uVkAAd7.mjs +0 -2
  349. package/dist/smart-shield-Dn95hqUH.mjs +0 -22
  350. package/dist/snippets-BNUKOajz.mjs +0 -18
  351. package/dist/spawn-DuT4snxu.mjs +0 -5
  352. package/dist/sql-BX1pBqj3.mjs +0 -4
  353. package/dist/src-DPnUfK4c.mjs +0 -131
  354. package/dist/startup-profile-tZNb2HGz.mjs +0 -2
  355. package/dist/state-Uwfrmw5I.mjs +0 -2
  356. package/dist/stream-BRzr6yh0.mjs +0 -89
  357. package/dist/telemetry-Pt5GpCKD.mjs +0 -2
  358. package/dist/tunnels-DQVXKUKA.mjs +0 -27
  359. package/dist/ui-FYultowZ.mjs +0 -2
  360. package/dist/url-scanner-BH4PLy16.mjs +0 -16
  361. package/dist/user-Bn82Qw0Y.mjs +0 -103
  362. package/dist/vectorize-DoVVz_sh.mjs +0 -30
  363. package/dist/version-Zr2oF8mY.mjs +0 -2
  364. package/dist/waiting-rooms-QUW131o3.mjs +0 -52
  365. package/dist/web3-TY9s6Swn.mjs +0 -26
  366. package/dist/workers-B3uJqJKc.mjs +0 -39
  367. package/dist/workers-builds-BgGY0IGk.mjs +0 -14
  368. package/dist/workflows-6m85DdqF.mjs +0 -48
  369. package/dist/zaraz-8WSJ7l0L.mjs +0 -22
  370. package/dist/zero-trust-DK0cqDZv.mjs +0 -1022
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-D0dXwuME.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-D274Im1O.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
3
3
 
4
- Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-id>
4
+ Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));s(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/token`,errors:{404:`NotFoundError`}};function x(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create-token <repo-id>
5
5
 
6
- Creates a one-hour write token for an existing upload repository. Worker-imported repositories are system-managed and cannot receive upload tokens.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create-token <repo-id>`,describe:`Create upload token`,builder:x,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create-token`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create-token`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/token`,pathParams:{"repo-id":String(e[`repo-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(b,{account_id:l,repo_id:e[`repo-id`]}));o(u,{successLabel:`Created`})})};function C(e){return e.usage("$0 managed-defense vulnerability-discovery repositories create\n\nCreates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key. Push upload source to `main` or specify the `branch` to scan in the scan request.").option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create repository`,builder:C,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):d(e.body)});return}let u=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let _={};e.name!==void 0&&f(_,[`name`],m(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&f(_,[`worker_script_name`],m(e[`worker-script-name`],`worker-script-name`,`text`));let v=await c(`Creating`,async()=>n(u,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
6
+ Creates a one-hour write token for an existing upload repository. Worker-imported repositories are system-managed and cannot receive upload tokens.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`create-token <repo-id>`,describe:`Create upload token`,builder:x,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create-token`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery repositories create-token`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/token`,pathParams:{"repo-id":String(e[`repo-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Creating`,async()=>t.send(b,{account_id:l,repo_id:e[`repo-id`]}));s(u,{successLabel:`Created`})})};function C(e){return e.usage("$0 managed-defense vulnerability-discovery repositories create\n\nCreates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key. Push upload source to `main` or specify the `branch` to scan in the scan request.").option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`create`,describe:`Create repository`,builder:C,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):f(e.body)});return}let d=e.body===void 0?void 0:f(e.body),g=await n(e),_=e.local?o:await a();if(e.accountId=_,e.body!==void 0){let e=d,n=await c(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/managed-defense/vulnerability-discovery/repos`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let v={};e.name!==void 0&&u(v,[`name`],m(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&u(v,[`worker_script_name`],m(e[`worker-script-name`],`worker-script-name`,`text`));let y=await c(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/managed-defense/vulnerability-discovery/repos`,{body:v,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
7
7
 
8
- Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <repo-id>`,describe:`Get repository`,builder:E,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(T,{account_id:u,repo_id:e[`repo-id`],...n}));o(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
8
+ Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <repo-id>`,describe:`Get repository`,builder:E,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let n=await i();r({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(T,{account_id:u,repo_id:e[`repo-id`],...t}));s(d,{successLabel:`Loaded`})})};var O={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
9
9
 
10
- Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List repositories`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},j={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(w).command(S).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
10
+ Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List repositories`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();r({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(O,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})},j={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(w).command(S).command(D).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
11
11
 
12
- Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit repository host scopes must be authorized and explicit branch selections must exist before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repos`,{type:`string`,description:`Repository names must be unique within a request. Provide as a JSON array of objects or @path/to/file.json.`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry-window-* flag is set`)}return!0})}const N={command:`create`,describe:`Create scan`,builder:M,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repos:u(e.repos,`repos`),telemetry_window:{end:m(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:m(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):d(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let _={};e.repos!==void 0&&f(_,[`repos`],u(e.repos,`repos`)),e[`telemetry-window-end`]!==void 0&&f(_,[`telemetry_window`,`end`],m(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&f(_,[`telemetry_window`,`start`],m(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function F(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
12
+ Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit repository host scopes must be authorized and explicit branch selections must exist before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repos`,{type:`string`,description:`Repository names must be unique within a request. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "branch"?: string, "hosts"?: [string]}]. ? marks optional keys.`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry-window-* flag is set`)}return!0})}const N={command:`create`,describe:`Create scan`,builder:M,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repos:d(e.repos,`repos`),telemetry_window:{end:m(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:m(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}}):f(e.body)});return}let h=e.body===void 0?void 0:f(e.body),g=await n(e),_=e.local?o:await a();if(e.accountId=_,e.body!==void 0){let e=h,n=await c(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/managed-defense/vulnerability-discovery/scans`,{body:e,headers:Object.keys(l).length>0?l:void 0}));s(n,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let v={};e.repos!==void 0&&u(v,[`repos`],d(e.repos,`repos`)),e[`telemetry-window-end`]!==void 0&&u(v,[`telemetry_window`,`end`],m(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&u(v,[`telemetry_window`,`start`],m(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let y=await c(`Creating`,async()=>t(g,`POST`,`/accounts/${_}/managed-defense/vulnerability-discovery/scans`,{body:v,headers:Object.keys(l).length>0?l:void 0}));s(y,{successLabel:`Created`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`,409:`ConflictError`,410:`GoneError`}};function F(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
13
13
 
14
- Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:F,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(P,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function R(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
14
+ Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:F,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(P,{account_id:l,scan_id:e[`scan-id`]}));s(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function R(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
15
15
 
16
- Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <scan-id>`,describe:`Get scan`,builder:R,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(L,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans`,query:[`limit`,`cursor`,`status`,`repo`],errors:{404:`NotFoundError`}};function V(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
16
+ Gets one customer-requested scan across its review and execution lifecycle.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <scan-id>`,describe:`Get scan`,builder:R,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf managed-defense vulnerability-discovery scans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(L,{account_id:l,scan_id:e[`scan-id`]}));s(u,{successLabel:`Loaded`})})};var B={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans`,query:[`limit`,`cursor`,`status`,`repo`],errors:{404:`NotFoundError`}};function V(e){return e.usage(`$0 managed-defense vulnerability-discovery scans list
17
17
 
18
- Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List scans`,builder:V,handler:async e=>l({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor,status:e.status,repo:e.repo};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(B,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},U={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(N).command(z).command(I).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(y).command(j).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
18
+ Lists customer-requested scans across review and execution lifecycle states.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`status`,{type:`string`,description:`Repeat parameter or provide comma-separated values.`}).option(`repo`,{type:`string`,description:`Repo`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List scans`,builder:V,handler:async e=>l({command:`managed-defense vulnerability-discovery scans list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={limit:e.limit,cursor:e.cursor,status:e.status,repo:e.repo};if(e.dryRun){let e=await i();r({command:`cf managed-defense vulnerability-discovery scans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(B,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})},U={command:`scans`,describe:`Operations for vulnerability-discovery.scans`,builder:e=>e.command(N).command(z).command(I).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`vulnerability-discovery`,describe:`Operations for vulnerability-discovery`,builder:e=>e.command(y).command(j).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`managed-defense`,describe:`managed-defense`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import{n as s}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{o as c,r as l,t as u}from"./body-parser-HN91kAf0.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
3
+
4
+ Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await s({force:!!e.force}))return;let l=await a(`Deleting`,async()=>o.send(d,{zone_id:c}));i(l,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
5
+
6
+ Fetches a list of all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List Managed Transforms`,builder:h,handler:async e=>o({command:`managed-transforms list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf managed-transforms list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var _={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/managed_headers`,body:`json`};function v(e){return e.usage(`$0 managed-transforms update
7
+
8
+ Updates the status of one or more Managed Transforms.`).option(`managed-request-headers`,{type:`string`,description:`The list of Managed Request Transforms. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"enabled": boolean, "id": string} & {"id"?: string})]. ? marks optional keys.`}).option(`managed-response-headers`,{type:`string`,description:`The list of Managed Response Transforms. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"enabled": boolean, "id": string} & {"id"?: string})]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A Managed Transforms patch object. Both fields are optional; only the sections provided will be updated.`})}const y={command:`update`,describe:`Update Managed Transforms`,builder:v,handler:async e=>o({command:`managed-transforms update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf managed-transforms update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({managed_request_headers:c(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:c(e[`managed-response-headers`],`managed-response-headers`)}):l(e.body)});return}let o=e.body===void 0?void 0:l(e.body),s=await t(e),d=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let e=o,t=await a(`Updating`,async()=>s.send(_,{body:e,zone_id:d}));i(t,{successLabel:`Updated`});return}let f=u({managed_request_headers:c(e[`managed-request-headers`],`managed-request-headers`),managed_response_headers:c(e[`managed-response-headers`],`managed-response-headers`)}),p=await a(`Updating`,async()=>s.send(_,{body:f,zone_id:d}));i(p,{successLabel:`Updated`})})},b={command:`managed-transforms`,describe:`managed-transforms`,builder:e=>e.command(p).command(g).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
@@ -1,30 +1,30 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{o as l,r as u,t as d}from"./body-parser-HN91kAf0.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D274Im1O.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
3
3
 
4
- Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
4
+ Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();n({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
5
5
 
6
- Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create a new MCP Portal`,builder:b,handler:async e=>c({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(y,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await p(`hostname`,`Hostname where the MCP portal is available.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP portal.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP portal.`));let h=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),g=await s(`Creating`,async()=>c.send(y,{body:h,account_id:m}));a(g,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 mcp portals delete <id>
6
+ Creates a new MCP portal for managing AI tool access through Cloudflare Access.`).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`,default:!1}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"server_id": string, "default_disabled"?: boolean, "on_behalf"?: boolean, "updated_prompts"?: [{...}], "updated_tools"?: [{...}]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create a new MCP Portal`,builder:b,handler:async e=>c({command:`mcp portals create`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp portals create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),m=await t(e),h=e.local?a:await i();if(e.accountId=h,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>m.send(y,{body:e,account_id:h}));o(t,{successLabel:`Created`});return}e.hostname===void 0&&(e.hostname=await p(`hostname`,`Hostname where the MCP portal is available.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP portal.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP portal.`));let g=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),_=await s(`Creating`,async()=>m.send(y,{body:g,account_id:h}));o(_,{successLabel:`Created`})})};var S={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function ee(e){return e.usage(`$0 mcp portals delete <id>
7
7
 
8
- Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:S,handler:async e=>c({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP portal.`}))return;let u=await s(`Deleting`,async()=>c.send(ee,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 mcp portals list
8
+ Deletes an MCP portal from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <id>`,describe:`Delete an MCP Portal`,builder:ee,handler:async e=>c({command:`mcp portals delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp portals delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP portal.`}))return;let u=await s(`Deleting`,async()=>c.send(S,{account_id:l,id:e.id}));o(u,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function T(e){return e.usage(`$0 mcp portals list
9
9
 
10
- Lists all MCP portals configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name, hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List MCP Portals`,builder:T,handler:async e=>c({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();o({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 mcp portals read <id>
10
+ Lists all MCP portals configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name, hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List MCP Portals`,builder:T,handler:async e=>c({command:`mcp portals list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();n({command:`cf mcp portals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/portals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(w,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,errors:{404:`NotFoundError`}};function O(e){return e.usage(`$0 mcp portals read <id>
11
11
 
12
- Read the details of a single MCP Portal, including its configured servers.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:O,handler:async e=>c({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,id:e.id}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/portals/${t.portal_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function j(e){return e.usage(`$0 mcp portals tool-call-analytics <portal-id>
12
+ Read the details of a single MCP Portal, including its configured servers.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`read <id>`,describe:`Read details of an MCP Portal`,builder:O,handler:async e=>c({command:`mcp portals read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp portals read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(D,{account_id:l,id:e.id}));o(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/portals/${t.portal_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function j(e){return e.usage(`$0 mcp portals tool-call-analytics <portal-id>
13
13
 
14
- Returns daily or monthly tool-call counts for a portal.`).positional(`portal-id`,{type:`string`,description:`Portal ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:j,handler:async e=>c({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();o({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${e[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(e[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(e[`portal-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,portal_id:e[`portal-id`],...c}));a(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 mcp portals update <id>
14
+ Returns daily or monthly tool-call counts for a portal.`).positional(`portal-id`,{type:`string`,description:`Portal ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`tool-call-analytics <portal-id>`,describe:`Per-portal MCP tool-call timeseries`,builder:j,handler:async e=>c({command:`mcp portals tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();n({command:`cf mcp portals tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/portals/${e[`portal-id`]==null?`<portal-id>`:encodeURIComponent(String(e[`portal-id`]))}/tool-calls/timeseries`,pathParams:{"portal-id":String(e[`portal-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(A,{account_id:u,portal_id:e[`portal-id`],...c}));o(d,{successLabel:`Loaded`})})};var N={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function P(e){return e.usage(`$0 mcp portals update <id>
15
15
 
16
- Updates an MCP portal configuration.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <id>`,describe:`Update an MCP Portal`,builder:P,handler:async e=>c({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send(N,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),h=await s(`Updating`,async()=>c.send(N,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},I={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(v).command(x).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,body:`json`,errors:{400:`BadRequestError`}};function te(e){return e.usage(`$0 mcp servers create
16
+ Updates an MCP portal configuration.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP portal.`,demandOption:!0}).option(`allow-code-mode`,{type:`boolean`,description:"Deprecated: use `code_mode` for new integrations. `true` maps to any non-off Code Mode policy; `false` maps to `code_mode: off`. If both fields are sent, they must be consistent or the request returns a 400."}).option(`code-mode`,{type:`string`,description:"Code Mode policy for this portal. `off`: Code Mode is unavailable; query parameters are ignored. `opt_in`: Code Mode is off by default; clients turn it on with `?codemode=search_and_execute`. `default_on`: Code Mode is on by default; clients can opt out with `?codemode=off`. `enforced`: Code Mode is always on; query parameters are ignored. Defaults to `opt_in` when omitted on create. If both `code_mode` and `allow_code_mode` are sent, they must be consistent or the request returns a 400.",choices:[`off`,`opt_in`,`default_on`,`enforced`]}).coerce(`code-mode`,e=>f(e,`code-mode`,`text`)).option(`description`,{type:`string`,description:`Optional description of the MCP portal.`}).option(`hostname`,{type:`string`,description:`Hostname where the MCP portal is available.`}).option(`name`,{type:`string`,description:`Display name for the MCP portal.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound MCP traffic through Zero Trust Secure Web Gateway.`}).option(`servers`,{type:`string`,description:`MCP servers attached to the portal and their portal-specific settings. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"server_id": string, "default_disabled"?: boolean, "on_behalf"?: boolean, "updated_prompts"?: [{...}], "updated_tools"?: [{...}]}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const F={command:`update <id>`,describe:`Update an MCP Portal`,builder:P,handler:async e=>c({command:`mcp portals update`,classification:{safeFlags:[`allow-code-mode`,`code-mode`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp portals update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/portals/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),p=await t(e),m=e.local?a:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>p.send(N,{body:t,account_id:m,id:e.id}));o(n,{successLabel:`Updated`});return}let h=d({allow_code_mode:e[`allow-code-mode`],code_mode:e[`code-mode`],description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],servers:l(e.servers,`servers`)}),g=await s(`Updating`,async()=>p.send(N,{body:h,account_id:m,id:e.id}));o(g,{successLabel:`Updated`})})},I={command:`portals`,describe:`Manage MCP portals, attached servers, and Code Mode settings`,builder:e=>e.command(v).command(x).command(C).command(E).command(k).command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,body:`json`,errors:{400:`BadRequestError`}};function R(e){return e.usage(`$0 mcp servers create
17
17
 
18
- Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).coerce(`auth-type`,e=>f(e,`auth-type`,`text`)).option(`client-secret`,{type:`string`,description:`Provides 'client_secret' for a pre-registered OAuth client. This field is accepted on create or update only when 'auth_credentials.auth_mode' is 'manual'. It is required when creating an MCP server with manual OAuth credentials or changing an existing server to use manual OAuth credentials. Omit 'client_secret' on update to preserve the existing secret. Provide a new 'client_secret' to rotate the secret. The secret is never returned by read, create, or update requests.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, per-user authorization uses the shared Cloudflare callback URL as the 'redirect_uri' instead of the portal callback URL. The default is false. Set 'is_shared_oauth_callback_enabled' to true to enable the shared Cloudflare callback URL for this MCP server.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a new MCP Server`,builder:te,handler:async e=>c({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body){let t=u(e.body),n=await s(`Creating`,async()=>c.send(L,{body:t,account_id:h}));a(n,{successLabel:`Created`});return}e[`auth-type`]===void 0&&(e[`auth-type`]=await m(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),e.hostname===void 0&&(e.hostname=await p(`hostname`,`URL of the upstream MCP endpoint.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP server.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP server.`));let g=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),_=await s(`Creating`,async()=>c.send(L,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function B(e){return e.usage(`$0 mcp servers delete <id>
18
+ Creates a new MCP server for connecting to an upstream MCP endpoint.`).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`auth-type`,{type:`string`,description:`Authentication method used to connect to the upstream MCP server.`,choices:[`oauth`,`bearer`,`unauthenticated`]}).coerce(`auth-type`,e=>f(e,`auth-type`,`text`)).option(`client-secret`,{type:`string`,description:`Provides 'client_secret' for a pre-registered OAuth client. This field is accepted on create or update only when 'auth_credentials.auth_mode' is 'manual'. It is required when creating an MCP server with manual OAuth credentials or changing an existing server to use manual OAuth credentials. Omit 'client_secret' on update to preserve the existing secret. Provide a new 'client_secret' to rotate the secret. The secret is never returned by read, create, or update requests.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`hostname`,{type:`string`,description:`URL of the upstream MCP endpoint.`}).option(`id`,{type:`string`,description:`Unique identifier for the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, per-user authorization uses the shared Cloudflare callback URL as the 'redirect_uri' instead of the portal callback URL. The default is false. Set 'is_shared_oauth_callback_enabled' to true to enable the shared Cloudflare callback URL for this MCP server.`,default:!1}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`,default:!1}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "alias"?: string, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "alias"?: string, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create a new MCP Server`,builder:R,handler:async e=>c({command:`mcp servers create`,classification:{safeFlags:[`auth-type`,`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp servers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=e.body===void 0?void 0:u(e.body),h=await t(e),g=e.local?a:await i();if(e.accountId=g,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>h.send(L,{body:e,account_id:g}));o(t,{successLabel:`Created`});return}e[`auth-type`]===void 0&&(e[`auth-type`]=await m(`auth-type`,`Authentication method used to connect to the upstream MCP server.`,[`oauth`,`bearer`,`unauthenticated`])),e.hostname===void 0&&(e.hostname=await p(`hostname`,`URL of the upstream MCP endpoint.`)),e.id===void 0&&(e.id=await p(`id`,`Unique identifier for the MCP server.`)),e.name===void 0&&(e.name=await p(`name`,`Display name for the MCP server.`));let _=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),auth_type:e[`auth-type`],client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),hostname:f(e.hostname,`hostname`,`text`),id:f(e.id,`id`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),v=await s(`Creating`,async()=>h.send(L,{body:_,account_id:g}));o(v,{successLabel:`Created`})})};var z={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function B(e){return e.usage(`$0 mcp servers delete <id>
19
19
 
20
- Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <id>`,describe:`Delete an MCP Server`,builder:B,handler:async e=>c({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`}))return;let u=await s(`Deleting`,async()=>c.send(z,{account_id:l,id:e.id}));a(u,{successLabel:`Deleted`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function U(e){return e.usage(`$0 mcp servers list
20
+ Deletes an MCP server from the account.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const V={command:`delete <id>`,describe:`Delete an MCP Server`,builder:B,handler:async e=>c({command:`mcp servers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp servers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();if(e.accountId=l,!await h({force:!!e.force,message:`This operation permanently deletes the MCP server, removes it from every portal, and deletes its stored OAuth secrets.`}))return;let u=await s(`Deleting`,async()=>c.send(z,{account_id:l,id:e.id}));o(u,{successLabel:`Deleted`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers`,query:[`page`,`per_page`,`search`],errors:{400:`BadRequestError`}};function U(e){return e.usage(`$0 mcp servers list
21
21
 
22
- Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List MCP Servers`,builder:U,handler:async e=>c({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();o({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(H,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function K(e){return e.usage(`$0 mcp servers read <id>
22
+ Lists all MCP servers configured for the account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id, name`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List MCP Servers`,builder:U,handler:async e=>c({command:`mcp servers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],search:e.search};if(e.dryRun){let e=await r();n({command:`cf mcp servers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/servers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(H,{account_id:u,...c}));o(d,{successLabel:`Loaded`})})};var G={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,errors:{404:`NotFoundError`}};function K(e){return e.usage(`$0 mcp servers read <id>
23
23
 
24
- Retrieves an MCP server's configuration and capability sync state.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:K,handler:async e=>c({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(G,{account_id:l,id:e.id}));a(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}/sync`,errors:{404:`NotFoundError`}};function Y(e){return e.usage(`$0 mcp servers sync <id>
24
+ Retrieves an MCP server's configuration and capability sync state.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`read <id>`,describe:`Read the details of an MCP Server`,builder:K,handler:async e=>c({command:`mcp servers read`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp servers read`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(G,{account_id:l,id:e.id}));o(u,{successLabel:`Loaded`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}/sync`,errors:{404:`NotFoundError`}};function Y(e){return e.usage(`$0 mcp servers sync <id>
25
25
 
26
- Syncs an MCP server's capabilities and returns the updated server state, including any connection errors.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:Y,handler:async e=>c({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/sync`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(J,{account_id:l,id:e.id}));a(u,{successLabel:`Created`})})};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/servers/${t.server_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function Q(e){return e.usage(`$0 mcp servers tool-call-analytics <server-id>
26
+ Syncs an MCP server's capabilities and returns the updated server state, including any connection errors.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`sync <id>`,describe:`Sync MCP Server Capabilities`,builder:Y,handler:async e=>c({command:`mcp servers sync`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp servers sync`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}/sync`,pathParams:{id:String(e.id??``)},bodyKind:`none`});return}let c=await t(e),l=e.local?a:await i();e.accountId=l;let u=await s(`Creating`,async()=>c.send(J,{account_id:l,id:e.id}));o(u,{successLabel:`Created`})})};var Z={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/servers/${t.server_id}/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function Q(e){return e.usage(`$0 mcp servers tool-call-analytics <server-id>
27
27
 
28
- Returns daily or monthly tool-call counts for a server.`).positional(`server-id`,{type:`string`,description:`Server ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:Q,handler:async e=>c({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();o({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${e[`server-id`]==null?`<server-id>`:encodeURIComponent(String(e[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(e[`server-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Z,{account_id:u,server_id:e[`server-id`],...c}));a(d,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function re(e){return e.usage(`$0 mcp servers update <id>
28
+ Returns daily or monthly tool-call counts for a server.`).positional(`server-id`,{type:`string`,description:`Server ID`,demandOption:!0}).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`tool-call-analytics <server-id>`,describe:`Per-server MCP tool-call timeseries`,builder:Q,handler:async e=>c({command:`mcp servers tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let t=await r();n({command:`cf mcp servers tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/analytics/servers/${e[`server-id`]==null?`<server-id>`:encodeURIComponent(String(e[`server-id`]))}/tool-calls/timeseries`,pathParams:{"server-id":String(e[`server-id`]??``)},query:c,bodyKind:`none`});return}let l=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Z,{account_id:u,server_id:e[`server-id`],...c}));o(d,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/servers/${t.id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function re(e){return e.usage(`$0 mcp servers update <id>
29
29
 
30
- Updates an MCP server's configuration and credentials.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`client-secret`,{type:`string`,description:`Provides 'client_secret' for a pre-registered OAuth client. This field is accepted on create or update only when 'auth_credentials.auth_mode' is 'manual'. It is required when creating an MCP server with manual OAuth credentials or changing an existing server to use manual OAuth credentials. Omit 'client_secret' on update to preserve the existing secret. Provide a new 'client_secret' to rotate the secret. The secret is never returned by read, create, or update requests.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, per-user authorization uses the shared Cloudflare callback URL as the 'redirect_uri' instead of the portal callback URL. The default is false. Set 'is_shared_oauth_callback_enabled' to true to enable the shared Cloudflare callback URL for this MCP server.`}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <id>`,describe:`Update an MCP Server`,builder:re,handler:async e=>c({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=u(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:p,id:e.id}));a(n,{successLabel:`Updated`});return}let m=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),h=await s(`Updating`,async()=>c.send($,{body:m,account_id:p,id:e.id}));a(h,{successLabel:`Updated`})})},ae={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(R).command(V).command(W).command(q).command(X).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`mcp`,describe:`Manage MCP portals and upstream MCP servers for Cloudflare Access AI controls`,builder:e=>e.command(I).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{oe as default};
30
+ Updates an MCP server's configuration and credentials.`).positional(`id`,{type:`string`,description:`Unique identifier for the MCP server.`,demandOption:!0}).option(`auth-credentials`,{type:`string`,description:'Credential configuration for the upstream MCP server. For auth_type "bearer", either a raw token string (e.g. "sk-abc123"), which is wrapped server-side as `Authorization: Bearer <token>`, or a JSON-encoded object of the form `{"headers":{"Header-Name":"value",...}}` for custom or multiple static headers (e.g. Cloudflare Access service tokens: `{"headers":{"cf-access-client-id":"...","cf-access-client-secret":"..."}}`). For auth_type "oauth" with a pre-registered client, send a JSON-encoded object containing `auth_mode:"manual"`, `config.authorization_endpoint`, `config.token_endpoint`, and `registration_info.client_id`. Also provide `registration_info.redirect_uris` unless `is_shared_oauth_callback_enabled` is true. Optional fields include `config.issuer`, `config.revocation_endpoint`, `registration_info.scope`, and `registration_info.token_endpoint_auth_method`. Send the client secret in the separate `client_secret` field. Omit `auth_credentials` on update to preserve the existing configuration.'}).option(`client-secret`,{type:`string`,description:`Provides 'client_secret' for a pre-registered OAuth client. This field is accepted on create or update only when 'auth_credentials.auth_mode' is 'manual'. It is required when creating an MCP server with manual OAuth credentials or changing an existing server to use manual OAuth credentials. Omit 'client_secret' on update to preserve the existing secret. Provide a new 'client_secret' to rotate the secret. The secret is never returned by read, create, or update requests.`}).option(`description`,{type:`string`,description:`Optional description of the MCP server.`}).option(`is-shared-oauth-callback-enabled`,{type:`boolean`,description:`When true, per-user authorization uses the shared Cloudflare callback URL as the 'redirect_uri' instead of the portal callback URL. The default is false. Set 'is_shared_oauth_callback_enabled' to true to enable the shared Cloudflare callback URL for this MCP server.`}).option(`name`,{type:`string`,description:`Display name for the MCP server.`}).option(`secure-web-gateway`,{type:`boolean`,description:`Route outbound traffic to this MCP server through Zero Trust Secure Web Gateway.`}).option(`updated-prompts`,{type:`string`,description:`Server-wide prompt capability overrides. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "alias"?: string, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`updated-tools`,{type:`string`,description:`Server-wide tool capability overrides. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"name": string, "alias"?: string, "description"?: string, "enabled"?: boolean}]. ? marks optional keys.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ie={command:`update <id>`,describe:`Update an MCP Server`,builder:re,handler:async e=>c({command:`mcp servers update`,classification:{safeFlags:[`is-shared-oauth-callback-enabled`,`secure-web-gateway`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf mcp servers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/access/ai-controls/mcp/servers/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}):u(e.body),sensitiveBodyPaths:[[`auth_credentials`],[`client_secret`]]});return}let c=e.body===void 0?void 0:u(e.body),p=await t(e),m=e.local?a:await i();if(e.accountId=m,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>p.send($,{body:t,account_id:m,id:e.id}));o(n,{successLabel:`Updated`});return}let h=d({auth_credentials:f(e[`auth-credentials`],`auth-credentials`,`text`),client_secret:f(e[`client-secret`],`client-secret`,`text`),description:f(e.description,`description`,`text`),is_shared_oauth_callback_enabled:e[`is-shared-oauth-callback-enabled`],name:f(e.name,`name`,`text`),secure_web_gateway:e[`secure-web-gateway`],updated_prompts:l(e[`updated-prompts`],`updated-prompts`),updated_tools:l(e[`updated-tools`],`updated-tools`)}),g=await s(`Updating`,async()=>p.send($,{body:h,account_id:m,id:e.id}));o(g,{successLabel:`Updated`})})},ae={command:`servers`,describe:`Manage upstream MCP servers, credentials, capabilities, and sync state`,builder:e=>e.command(te).command(V).command(W).command(q).command(X).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`mcp`,describe:`Manage MCP portals and upstream MCP servers for Cloudflare Access AI controls`,builder:e=>e.command(I).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{oe as default};
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D0dXwuME.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D274Im1O.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
3
3
 
4
- Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
4
+ Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));s(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
5
5
 
6
- Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`mesh-config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`mesh-config-vips`,{type:`string`,description:`VIPs to assign on the CloudflareWARP interface. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mesh-config-vips-previous`,{type:`string`,description:`VIPs to clean up on demotion or version drift. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>m(e,`ha-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`mesh-config-fnr-id`,[`mesh-config-vips`,`mesh-config-vips-previous`]).conflicts(`mesh-config-vips`,[`mesh-config-fnr-id`]).conflicts(`mesh-config-vips-previous`,[`mesh-config-fnr-id`]).implies(`mesh-config-vips-previous`,[`mesh-config-vips`])}const C={command:`update <tunnel-id>`,describe:`Update Mesh node HA configuration`,builder:S,handler:async e=>l({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}e[`ha-mode`]===void 0&&(e[`ha-mode`]=await g(`ha-mode`,"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let f=p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}),h=await c(`Updating`,async()=>n.send(x,{body:f,account_id:l,tunnel_id:e[`tunnel-id`]}));o(h,{successLabel:`Updated`})})},w={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 mesh nodes connections list
6
+ Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`mesh-config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`mesh-config-vips`,{type:`string`,description:`VIPs to assign on the CloudflareWARP interface. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"address": string}].`}).option(`mesh-config-vips-previous`,{type:`string`,description:`VIPs to clean up on demotion or version drift. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"address": string}].`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>m(e,`ha-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`mesh-config-fnr-id`,[`mesh-config-vips`,`mesh-config-vips-previous`]).conflicts(`mesh-config-vips`,[`mesh-config-fnr-id`]).conflicts(`mesh-config-vips-previous`,[`mesh-config-fnr-id`]).implies(`mesh-config-vips-previous`,[`mesh-config-vips`])}const C={command:`update <tunnel-id>`,describe:`Update Mesh node HA configuration`,builder:S,handler:async e=>l({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:d(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:d(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let n=t,r=await c(`Updating`,async()=>l.send(x,{body:n,account_id:u,tunnel_id:e[`tunnel-id`]}));s(r,{successLabel:`Updated`});return}e[`ha-mode`]===void 0&&(e[`ha-mode`]=await g(`ha-mode`,"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let h=p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:d(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:d(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}),_=await c(`Updating`,async()=>l.send(x,{body:h,account_id:u,tunnel_id:e[`tunnel-id`]}));s(_,{successLabel:`Updated`})})},w={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 mesh nodes connections list
7
7
 
8
- Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Mesh node connections`,builder:T,handler:async e=>l({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connections`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connections`));o(d,{successLabel:`Loaded`})})},D={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
8
+ Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Mesh node connections`,builder:T,handler:async e=>l({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connections`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connections`));s(d,{successLabel:`Loaded`})})},D={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
9
9
 
10
- Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <connector-id>`,describe:`Get a Mesh node connector`,builder:O,handler:async e=>l({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connectors/${encodeURIComponent(String(e[`connector-id`]))}`));o(d,{successLabel:`Loaded`})})},A={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/warp_connector`,body:`json`};function M(e){return e.usage(`$0 mesh nodes create
10
+ Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <connector-id>`,describe:`Get a Mesh node connector`,builder:O,handler:async e=>l({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connectors/${encodeURIComponent(String(e[`connector-id`]))}`));s(d,{successLabel:`Loaded`})})},A={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/warp_connector`,body:`json`};function M(e){return e.usage(`$0 mesh nodes create
11
11
 
12
- Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create`,describe:`Create a Mesh node`,builder:M,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ha:e.ha,name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(j,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let u=p({ha:e.ha,name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(j,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function P(e){return e.usage(`$0 mesh nodes delete <node-id>
12
+ Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const N={command:`create`,describe:`Create a Mesh node`,builder:M,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ha:e.ha,name:m(e.name,`name`,`text`)}):f(e.body)});return}let t=e.body===void 0?void 0:f(e.body),l=await n(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>l.send(j,{body:e,account_id:u}));s(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let d=p({ha:e.ha,name:m(e.name,`name`,`text`)}),g=await c(`Creating`,async()=>l.send(j,{body:d,account_id:u}));s(g,{successLabel:`Created`})})};function P(e){return e.usage(`$0 mesh nodes delete <node-id>
13
13
 
14
- Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`}))return;let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
14
+ Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`}))return;let d=await c(`Deleting`,async()=>t(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));s(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
15
15
 
16
- Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:I,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}let h={};e.name!==void 0&&f(h,[`name`],m(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&f(h,[`tunnel_secret`],m(e[`tunnel-secret`],`tunnel-secret`,`text`));let g=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:h}));o(g,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 mesh nodes failover <node-id>
16
+ Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:I,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):f(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=e.body===void 0?void 0:f(e.body),d=await n(e),h=e.local?o:await a();if(e.accountId=h,e.body!==void 0){let n=l,r=await c(`Updating`,async()=>t(d,`PATCH`,`/accounts/${h}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:n}));s(r,{successLabel:`Updated`});return}let g={};e.name!==void 0&&u(g,[`name`],m(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&u(g,[`tunnel_secret`],m(e[`tunnel-secret`],`tunnel-secret`,`text`));let _=await c(`Updating`,async()=>t(d,`PATCH`,`/accounts/${h}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:g}));s(_,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 mesh nodes failover <node-id>
17
17
 
18
- Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`}))return;if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let g={};e[`connector-id`]!==void 0&&f(g,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:g}));o(v,{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
18
+ Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):f(e.body)});return}let l=e.body===void 0?void 0:f(e.body),d=await n(e),g=e.local?o:await a();if(e.accountId=g,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`}))return;if(e.body!==void 0){let n=l,r=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${g}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:n}));s(r,{successLabel:`Updated`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let v={};e[`connector-id`]!==void 0&&u(v,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let y=await c(`Updating`,async()=>t(d,`PUT`,`/accounts/${g}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:v}));s(y,{successLabel:`Updated`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
19
19
 
20
- Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <node-id>`,describe:`Get a Mesh node`,builder:B,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function U(e){return e.usage(`$0 mesh nodes list
20
+ Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <node-id>`,describe:`Get a Mesh node`,builder:B,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));s(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function U(e){return e.usage(`$0 mesh nodes list
21
21
 
22
- Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Mesh nodes`,builder:U,handler:async e=>l({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let n={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/warp_connector`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(H,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 mesh nodes token get <node-id>
22
+ Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Mesh nodes`,builder:U,handler:async e=>l({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let t={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();r({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/warp_connector`,pathParams:{},query:t,bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(H,{account_id:u,...t}));s(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 mesh nodes token get <node-id>
23
23
 
24
- Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <node-id>`,describe:`Get a Mesh node token`,builder:G,handler:async e=>l({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/token`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/token`));o(d,{successLabel:`Loaded`})})},q={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(W).command(w).command(D).command(A).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`mesh`,describe:`mesh`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
24
+ Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <node-id>`,describe:`Get a Mesh node token`,builder:G,handler:async e=>l({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/token`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>t(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/token`));s(d,{successLabel:`Loaded`})})},q={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(W).command(w).command(D).command(A).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`mesh`,describe:`mesh`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-FYultowZ.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-BbmGOu8l.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
2
+ import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-dWsVmFCG.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-BzMTJPdI.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.error(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};