cf 1.0.0-beta.2 → 1.0.0-beta.3

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 (305) hide show
  1. package/README.md +1 -0
  2. package/dist/_meta/commands.json +28025 -30372
  3. package/dist/_meta/hand-written-commands.json +72 -49
  4. package/dist/_meta/schemas.json +18618 -20269
  5. package/dist/{abuse-reports-JcwSaW-c.mjs → abuse-reports-CWX7WKhe.mjs} +1 -1
  6. package/dist/access-2aKv_Dya.mjs +2 -0
  7. package/dist/{account-CLsfIk5j.mjs → account-CnZO9-bl.mjs} +1 -1
  8. package/dist/{account-tags-BJdDiyDi.mjs → account-tags-ClLZOfTA.mjs} +1 -1
  9. package/dist/{accounts-6eXqIqSW.mjs → accounts-Cbj9aFyY.mjs} +1 -1
  10. package/dist/{acm-ChNLnPqM.mjs → acm-wGJ9cnzE.mjs} +1 -1
  11. package/dist/{addressing-z8ei_TCh.mjs → addressing-YvHX2dAb.mjs} +5 -5
  12. package/dist/{agent-memory-Un0usAVF.mjs → agent-memory-B4N-lmLb.mjs} +1 -1
  13. package/dist/{ai-audit-FR6QuDK_.mjs → ai-audit-CG_DG6N7.mjs} +1 -1
  14. package/dist/ai-gateway-DUttjxrN.mjs +80 -0
  15. package/dist/{ai-Bj8kgDf7.mjs → ai-lziiVEGR.mjs} +1 -1
  16. package/dist/{ai-search-BvMeOKK6.mjs → ai-search-k63uopiK.mjs} +1 -1
  17. package/dist/{ai-security-BHvDKoM1.mjs → ai-security-D10lzYTn.mjs} +1 -1
  18. package/dist/{alerting-DmRZCAjg.mjs → alerting-c4ICS8KO.mjs} +1 -1
  19. package/dist/{analytics-DqidJ4qc.mjs → analytics-CEQ0EVTq.mjs} +1 -1
  20. package/dist/{analytics_engine-I7N0I6yP.mjs → analytics_engine-B9kiAPbY.mjs} +1 -1
  21. package/dist/{api-security-BMNhdDyR.mjs → api-security-6LlxeiOi.mjs} +1 -1
  22. package/dist/{argo-U5TIBcub.mjs → argo-BCcp1ybr.mjs} +1 -1
  23. package/dist/{artifacts-Byw1W73U.mjs → artifacts-PoO3rAvo.mjs} +1 -1
  24. package/dist/{audit-logs-C6zyFeKM.mjs → audit-logs-Vt3NbAA1.mjs} +1 -1
  25. package/dist/{auth-B5p3SIhO.mjs → auth-3bFlHTVl.mjs} +2 -2
  26. package/dist/{auth-CosaKfuk.mjs → auth-BfYtTyXo.mjs} +1 -1
  27. package/dist/{autoconfig-DED3bWob.mjs → autoconfig-DqgOi1kW.mjs} +28 -28
  28. package/dist/{banner-Xk4xBN8U.mjs → banner-ClclgnBn.mjs} +1 -1
  29. package/dist/{billing-BS1raRJt.mjs → billing-DVrpin2a.mjs} +1 -1
  30. package/dist/{bot-management-Cn6xfGzJ.mjs → bot-management-Bw-GZWoT.mjs} +1 -1
  31. package/dist/{botnet-feed-DtWOPNfw.mjs → botnet-feed-ov970cZf.mjs} +1 -1
  32. package/dist/{brand-protection-BcEQ66bT.mjs → brand-protection-C7WOvdx6.mjs} +1 -1
  33. package/dist/{browser-run-RZ7ZPRop.mjs → browser-run-DhnKUXVv.mjs} +1 -1
  34. package/dist/build-CVvo9BvP.mjs +2 -0
  35. package/dist/{build-DG8NfVjJ.mjs → build-vfD1txJe.mjs} +1 -1
  36. package/dist/{builds-AOCMH4CE.mjs → builds-BIqfNXEE.mjs} +1 -1
  37. package/dist/{cache-D_EBxDff.mjs → cache-Dzl3kth1.mjs} +1 -1
  38. package/dist/{certificate-authorities-B6rtjuaT.mjs → certificate-authorities-CQinLiq_.mjs} +1 -1
  39. package/dist/{cf--3tGe71B.mjs → cf-O3gEaXYZ.mjs} +11 -11
  40. package/dist/{chunk-M77HNR46-BqG3fjQz.mjs → chunk-M77HNR46-DPbhuhiy.mjs} +1 -1
  41. package/dist/{chunk-RV27PEH3-C8_6bMgi.mjs → chunk-RV27PEH3-Cws_30ln.mjs} +30 -30
  42. package/dist/cli-ZXrxm369.mjs +6 -0
  43. package/dist/{client-certificates-uBOjGcgo.mjs → client-certificates--vw-4vvy.mjs} +1 -1
  44. package/dist/{client-side-security-Bm7JwGaG.mjs → client-side-security-YCsdeK3e.mjs} +1 -1
  45. package/dist/{cloud-connector-69M2Dx8h.mjs → cloud-connector-CwSi4zZI.mjs} +1 -1
  46. package/dist/{cloudflared-Ba5LySkU.mjs → cloudflared-CH8rOneA.mjs} +1 -1
  47. package/dist/{cloudforce-one-Xn2mlAPv.mjs → cloudforce-one-hEykJeqy.mjs} +1 -1
  48. package/dist/command-Axp5Wfpj.mjs +2 -0
  49. package/dist/command-BH-TMJWp.mjs +2 -0
  50. package/dist/command-C1CwuI4O.mjs +2 -0
  51. package/dist/{command-Cb0pS8T5.mjs → command-CIZDQPmS.mjs} +1 -1
  52. package/dist/{command-DEC5PwJo.mjs → command-CeL8kQCM.mjs} +1 -1
  53. package/dist/command-ChDtawgh.mjs +2 -0
  54. package/dist/{command-DCpX9Cem.mjs → command-D5nZoVE1.mjs} +1 -1
  55. package/dist/command-DBCoI1fN.mjs +2 -0
  56. package/dist/command-DBpr6U4L.mjs +2 -0
  57. package/dist/command-DrQKTf1O.mjs +2 -0
  58. package/dist/{command-Cz_bKDWf.mjs → command-IuYNIUk9.mjs} +1 -1
  59. package/dist/command-L0y09SE5.mjs +2 -0
  60. package/dist/{command-BxQbIQWT.mjs → command-ZSxcR8-J.mjs} +1 -1
  61. package/dist/command-egPOyKbx.mjs +2 -0
  62. package/dist/command-jJKEah9i.mjs +2 -0
  63. package/dist/{completions-DZDltM9V.mjs → completions-DNisLHie.mjs} +26 -26
  64. package/dist/{connector-interrupts-DTy6laab.mjs → connector-interrupts-uIHLde10.mjs} +1 -1
  65. package/dist/{connector-telemetry-events-CJqGGvFJ.mjs → connector-telemetry-events-D2MH0OSs.mjs} +1 -1
  66. package/dist/{connector-telemetry-snapshots-BPxhPhr6.mjs → connector-telemetry-snapshots-CQICQaGf.mjs} +1 -1
  67. package/dist/{connectors-CdfCcZuA.mjs → connectors-BXwvP7SF.mjs} +1 -1
  68. package/dist/{containers-C7z53QcY.mjs → containers-ClK7HGfx.mjs} +88 -90
  69. package/dist/{containers-VMqcxH5a.mjs → containers-DOyOrVV9.mjs} +1 -1
  70. package/dist/{content-scan-BirgZrmr.mjs → content-scan-B71JZ7G6.mjs} +1 -1
  71. package/dist/{context-Dzzbc9RK.mjs → context-5JRcefHh.mjs} +2 -2
  72. package/dist/{cps-DzFm3zKp.mjs → cps-CzNfFv-5.mjs} +1 -1
  73. package/dist/{csamScanner-D2_OO5-1.mjs → csamScanner-BfZcrcjk.mjs} +1 -1
  74. package/dist/{ct-alerting-B7wQkFVl.mjs → ct-alerting-Cm8YLmXE.mjs} +1 -1
  75. package/dist/{custom-certificates-BKcCfbH8.mjs → custom-certificates-DFMRe9_D.mjs} +1 -1
  76. package/dist/{custom-csrs-CXoOxir4.mjs → custom-csrs-B5njuvdd.mjs} +1 -1
  77. package/dist/{custom-hostnames-CNYfnCOd.mjs → custom-hostnames-D06jQfNs.mjs} +1 -1
  78. package/dist/{custom-nameservers-BlLM7a4L.mjs → custom-nameservers-CKwKLqbF.mjs} +1 -1
  79. package/dist/{custom-pages-BcWoypet.mjs → custom-pages-D339_r6I.mjs} +1 -1
  80. package/dist/{d1-CvrHsqYY.mjs → d1-CHXmF-Ga.mjs} +1 -1
  81. package/dist/{dcv-delegation-9_Hl-5v-.mjs → dcv-delegation-BAnTwW8J.mjs} +1 -1
  82. package/dist/delegate.mjs +1 -1
  83. package/dist/{deploy-BlXYtvTd.mjs → deploy-CsQbufsL.mjs} +1 -1
  84. package/dist/{deploy-input-DTXVZ2QJ.mjs → deploy-input-dwBe8pSi.mjs} +1 -1
  85. package/dist/{dev-reqdKM28.mjs → dev-BpvWl6pG.mjs} +1 -1
  86. package/dist/{diagnostics-BxHs1EJB.mjs → diagnostics-BEUAWeLH.mjs} +1 -1
  87. package/dist/{dialog-ClHoC_cG.mjs → dialog-BlUXJKbA.mjs} +1 -1
  88. package/dist/discover-DmIsaE54.mjs +2 -0
  89. package/dist/{dist-CmyJy57B.mjs → dist-CpufWpsP.mjs} +14 -14
  90. package/dist/{dist-Cpb7_h4N.mjs → dist-DW47TUGh.mjs} +1 -1
  91. package/dist/{dist-cGGV-p_F.mjs → dist-DfMipWKR.mjs} +3 -3
  92. package/dist/{dls-D7GXW-N3.mjs → dls-CXS7bPlj.mjs} +1 -1
  93. package/dist/{dns-B0mdWJO5.mjs → dns-Dx7oPdtH.mjs} +1 -1
  94. package/dist/{dns-firewall-BG0bzuL3.mjs → dns-firewall-wcP1fgB-.mjs} +1 -1
  95. package/dist/{dot-prop-IITUZ2XW-BO5KJUwL.mjs → dot-prop-IITUZ2XW-BilKo4kO.mjs} +1 -1
  96. package/dist/dotenv-CcQjGlV0.mjs +4 -0
  97. package/dist/dry-run-Bq0JAsbX.mjs +2 -0
  98. package/dist/{durable-objects-DW0CsJzR.mjs → durable-objects-DmieQflu.mjs} +1 -1
  99. package/dist/{email-auth-Ls-7Yijm.mjs → email-auth-DiO-k5wt.mjs} +1 -1
  100. package/dist/{email-routing-DVaFhg-3.mjs → email-routing-CycPV4UR.mjs} +1 -1
  101. package/dist/{email-security-vnwkqlgp.mjs → email-security-DhtBU1X_.mjs} +1 -1
  102. package/dist/{email-sending-CbMUicJz.mjs → email-sending-BjgiwUht.mjs} +1 -1
  103. package/dist/error-sanitization-Cu-8OKRA.mjs +2 -0
  104. package/dist/{error-sanitization-TV6O0aCD.mjs → error-sanitization-Dc4bLj8k.mjs} +1 -1
  105. package/dist/{fieldExtractors-2EkDoJg8.mjs → fieldExtractors-BOBRZ8gw.mjs} +1 -1
  106. package/dist/{firewall-BK4QYqRe.mjs → firewall-Dc0Xm26N.mjs} +1 -1
  107. package/dist/{flagship--lHQ0H3n.mjs → flagship-BRqR3ioN.mjs} +1 -1
  108. package/dist/{fraud-CaoRrQ8W.mjs → fraud-Czu1ed5n.mjs} +1 -1
  109. package/dist/generate-BAHK895m.mjs +2 -0
  110. package/dist/{generate-CrKNH6ms.mjs → generate-DWW1YPjv.mjs} +1 -1
  111. package/dist/{google-tag-gateway-DDzLPmk5.mjs → google-tag-gateway-DsZA0a1r.mjs} +1 -1
  112. package/dist/gt-DmcMNPX6.mjs +2 -0
  113. package/dist/{healthchecks-Q2uXvt4m.mjs → healthchecks-CFH5bIAG.mjs} +1 -1
  114. package/dist/{hostnames-CsaYnis6.mjs → hostnames-CKDSQsXT.mjs} +1 -1
  115. package/dist/{hyperdrive-DDr6sAkw.mjs → hyperdrive-BLiI7eoy.mjs} +1 -1
  116. package/dist/{iam-CmzocepZ.mjs → iam-B5mdfq5e.mjs} +1 -1
  117. package/dist/{images-Ux0Phsbi.mjs → images-IVRjrB4_.mjs} +1 -1
  118. package/dist/index.mjs +1 -1
  119. package/dist/{init-Nx4RRgfT.mjs → init-C6pA2OKl.mjs} +2 -2
  120. package/dist/{intel-bgS4g7nx.mjs → intel-CvesITo3.mjs} +1 -1
  121. package/dist/interactive-SgAjen2z.mjs +2 -0
  122. package/dist/{ips-BDiolgWF.mjs → ips-DT9GaimG.mjs} +1 -1
  123. package/dist/{keyless-certificates-C_TwTMql.mjs → keyless-certificates-B0Xe5WqA.mjs} +1 -1
  124. package/dist/{keys-Cr8AqQDY.mjs → keys-BfcwaSGe.mjs} +1 -1
  125. package/dist/kv-BAKDr9h1.mjs +15 -0
  126. package/dist/lazy-command-BR3u8SQ2.mjs +2 -0
  127. package/dist/{leaked-credential-checks-De7ph4VA.mjs → leaked-credential-checks-gRpF7J9-.mjs} +1 -1
  128. package/dist/{load-balancers-DXt4ndF4.mjs → load-balancers-CLVWIN9d.mjs} +1 -1
  129. package/dist/local-22UA5g9y.mjs +2 -0
  130. package/dist/{local-OKXweFsd.mjs → local-CxYne8s2.mjs} +1 -1
  131. package/dist/{local-runtime-tTYpniPS.mjs → local-runtime-C_fR3pz4.mjs} +1 -1
  132. package/dist/{login-BurQ63Ws.mjs → login-B2IW-LZC.mjs} +1 -1
  133. package/dist/{login-CmlHvH5k.mjs → login-BKQI53YQ.mjs} +1 -1
  134. package/dist/{logo-matches-CQ60P96J.mjs → logo-matches-CmCWQC_j.mjs} +1 -1
  135. package/dist/{logos-u7UwT8MH.mjs → logos-DoGIvvML.mjs} +1 -1
  136. package/dist/{logpush-IoIe8e80.mjs → logpush-C2fS4mz8.mjs} +1 -1
  137. package/dist/{logs-ih5tyXEE.mjs → logs-DOchrxC9.mjs} +1 -1
  138. package/dist/{magic-cloud-networking-CWNFnjcY.mjs → magic-cloud-networking-BTWKttlB.mjs} +1 -1
  139. package/dist/{magic-network-monitoring-ClfZleF8.mjs → magic-network-monitoring-C_6hCn_f.mjs} +1 -1
  140. package/dist/{magic-transit-D69pkEVW.mjs → magic-transit-B-Rmmg-Z.mjs} +1 -1
  141. package/dist/{managed-defense-BHdmL0vx.mjs → managed-defense-BPSLbGgV.mjs} +1 -1
  142. package/dist/{managed-transforms-DbCR4LUg.mjs → managed-transforms-BqiDVQD6.mjs} +1 -1
  143. package/dist/{matches-Cou6RVkh.mjs → matches-wLc335So.mjs} +1 -1
  144. package/dist/{mcp-CQYfM19s.mjs → mcp-CmQOrkzP.mjs} +1 -1
  145. package/dist/{mesh-CXqaAFS4.mjs → mesh-DRuFq2pw.mjs} +1 -1
  146. package/dist/migrate-DBwOnU6B.mjs +2 -0
  147. package/dist/{mtls-certificates-DNeId8xS.mjs → mtls-certificates-BUcQwJGQ.mjs} +1 -1
  148. package/dist/{network-B7V3JbU7.mjs → network-BuXy0ysq.mjs} +1 -1
  149. package/dist/{network-interconnects-BNon8iUs.mjs → network-interconnects-BzfPaxkW.mjs} +1 -1
  150. package/dist/{oauth-CeXh-ACI.mjs → oauth-BYmfy7l7.mjs} +1 -1
  151. package/dist/{oauth-DM8q-TYg.mjs → oauth-BlFK0DPZ.mjs} +1 -1
  152. package/dist/{oauth-clients-gGmWIWHl.mjs → oauth-clients-CnABE4xT.mjs} +1 -1
  153. package/dist/{oauth-scopes-DSEu331u.mjs → oauth-scopes-BFy1Hw7K.mjs} +1 -1
  154. package/dist/{observability-_VJhfwM1.mjs → observability-B1IkzeE0.mjs} +1 -1
  155. package/dist/{open-PCXX3ZDZ-DobJT1Mj.mjs → open-PCXX3ZDZ-BKRik1gi.mjs} +3 -3
  156. package/dist/{organization-DW4EpwGl.mjs → organization-DeIzTyFr.mjs} +1 -1
  157. package/dist/{organizations-DE1g2wVq.mjs → organizations-dpNO5XaQ.mjs} +1 -1
  158. package/dist/{origin-ca-certificates-D3ULDV__.mjs → origin-ca-certificates-B-1YtC61.mjs} +1 -1
  159. package/dist/{origin-post-quantum-encryption-BLropaz7.mjs → origin-post-quantum-encryption-DdvwucsG.mjs} +1 -1
  160. package/dist/{origin-tls-client-auth-C87TG2i_.mjs → origin-tls-client-auth-CzfpVmTE.mjs} +1 -1
  161. package/dist/{output-CZt-berV.mjs → output-CvQFJkvi.mjs} +1 -1
  162. package/dist/{page-rules-tlb9P-7V.mjs → page-rules--wnIp30C.mjs} +1 -1
  163. package/dist/pages-DvhJZv5S.mjs +60 -0
  164. package/dist/{pay-per-crawl-C50wI-Iz.mjs → pay-per-crawl-lqX3Rwt9.mjs} +1 -1
  165. package/dist/{pay-per-use-DHHIvynU.mjs → pay-per-use-BRKnBlz2.mjs} +1 -1
  166. package/dist/{pipelines-Y2icOwuf.mjs → pipelines-CvePummb.mjs} +1 -1
  167. package/dist/{precursor-DeyurJSC.mjs → precursor-DgotmHQd.mjs} +1 -1
  168. package/dist/previews-Brsuhzmk.mjs +4 -0
  169. package/dist/{progress-C9dWgc3J.mjs → progress-DUeNqM-j.mjs} +1 -1
  170. package/dist/{prompt-Mh69ni1N.mjs → prompt-DV6YTdoa.mjs} +1 -1
  171. package/dist/{queries-DyUJefwL.mjs → queries-CLqy4AM6.mjs} +1 -1
  172. package/dist/{queues-CdNe4tGY.mjs → queues-D0Y4LNP1.mjs} +1 -1
  173. package/dist/r2-D_FuuTGm.mjs +132 -0
  174. package/dist/{r2-data-catalog-D_zDlmVD.mjs → r2-data-catalog-D5Fvpr3C.mjs} +1 -1
  175. package/dist/{radar-CSguicKC.mjs → radar-B6bYFNVn.mjs} +1 -1
  176. package/dist/{raw-fetch-1ygCOcT_.mjs → raw-fetch-Cp3EaTcj.mjs} +1 -1
  177. package/dist/{realtime-CvWs5pi3.mjs → realtime-BTBZoZNW.mjs} +1 -1
  178. package/dist/{registrar-DQUxn0FK.mjs → registrar-CFh4TCkC.mjs} +1 -1
  179. package/dist/{registrar-sandbox-Q7ZEmg2x.mjs → registrar-sandbox-By6ukXxf.mjs} +1 -1
  180. package/dist/{registry-4Sw95M5_.mjs → registry-kYRASukx.mjs} +1 -1
  181. package/dist/{reporting-DJShxeDv.mjs → reporting-Cf3q4cuO.mjs} +1 -1
  182. package/dist/{request-headers-DFBBErJg.mjs → request-headers-jdUlF-_S.mjs} +1 -1
  183. package/dist/{request-tracers-DD8HlG61.mjs → request-tracers-CqNmb-dS.mjs} +1 -1
  184. package/dist/resolve-PZuJ878-.mjs +2 -0
  185. package/dist/{resource-sharing-J46JMWQP.mjs → resource-sharing-vDvq5J5a.mjs} +1 -1
  186. package/dist/{resource-tagging-DLZJLIqy.mjs → resource-tagging-DRCkpRmf.mjs} +1 -1
  187. package/dist/{rules-D068LfBR.mjs → rules-D-IfU82u.mjs} +1 -1
  188. package/dist/{rulesets-Cz6P7Oje.mjs → rulesets-ezJUnXm7.mjs} +1 -1
  189. package/dist/{rum-C6GQC2vI.mjs → rum-G42H7AXu.mjs} +1 -1
  190. package/dist/run-BhfDNWCI.mjs +2 -0
  191. package/dist/run-djd1-6kN.mjs +2 -0
  192. package/dist/{schema-flags-BmY0Nzp0.mjs → schema-flags-yDMur8UR.mjs} +1 -1
  193. package/dist/{schema-VZPw_2CY.mjs → schema-s22s29sJ.mjs} +1 -1
  194. package/dist/{scim-DMTp_Zhc.mjs → scim-DgRlqTtE.mjs} +1 -1
  195. package/dist/{sdk-BuF3fTHr.mjs → sdk-Bx29ZKK3.mjs} +2 -2
  196. package/dist/{secrets-store-C2epk0sQ.mjs → secrets-store-DcNmMGG2.mjs} +1 -1
  197. package/dist/{security-center-DwMdQ02Y.mjs → security-center-CZwVaL7t.mjs} +1 -1
  198. package/dist/{security-txt-CORQfMul.mjs → security-txt-CD0RAEsU.mjs} +1 -1
  199. package/dist/{session-BEXskZi2.mjs → session-CjQFm10R.mjs} +1 -1
  200. package/dist/shared-Cfuwhk19.mjs +2 -0
  201. package/dist/{smart-shield-BZ0xjy_6.mjs → smart-shield-C72SYuAe.mjs} +1 -1
  202. package/dist/{snippets-LSkJGDOc.mjs → snippets-Bl4Rfvdf.mjs} +1 -1
  203. package/dist/spawn-PBhhCQdl.mjs +10 -0
  204. package/dist/{spectrum-zU8_GFTV.mjs → spectrum-BgOMd04u.mjs} +1 -1
  205. package/dist/{speed-4XbFmeYM.mjs → speed-dahwVmv-.mjs} +1 -1
  206. package/dist/src-npcmT3gh.mjs +109 -0
  207. package/dist/{ssl-DiCsMY_a.mjs → ssl-BMZZPgJx.mjs} +1 -1
  208. package/dist/startup-profile-B0UCc9_J.mjs +2 -0
  209. package/dist/{startup-profile-6fCkD04r.mjs → startup-profile-DrV846S5.mjs} +3 -3
  210. package/dist/{state-DiHwKWTy.mjs → state-DhHOAdTo.mjs} +1 -1
  211. package/dist/state-Dyo8DcW7.mjs +2 -0
  212. package/dist/{stream-BG3NUAVE.mjs → stream-CsQ8wMMF.mjs} +1 -1
  213. package/dist/{submit-CKSaSFS1.mjs → submit-DdoTeeRt.mjs} +1 -1
  214. package/dist/{tags-uT9Mi-bX.mjs → tags-BESTUjkv.mjs} +1 -1
  215. package/dist/telemetry-CVjp5qaj.mjs +2 -0
  216. package/dist/telemetry-iBZ-f6og.mjs +2 -0
  217. package/dist/{tenant--UrYFHM0.mjs → tenant-COyp8x56.mjs} +1 -1
  218. package/dist/{tenant-custom-nameservers-8Z4TVJtr.mjs → tenant-custom-nameservers-BdrnvyTk.mjs} +1 -1
  219. package/dist/{tools-DNGD0l7I.mjs → tools-LlzHD_86.mjs} +1 -1
  220. package/dist/{tunnels-5lGSXYpl.mjs → tunnels-CjDCYR0_.mjs} +1 -1
  221. package/dist/{turnstile-CT3AkMPV.mjs → turnstile-crX-kMig.mjs} +1 -1
  222. package/dist/{ui-D1hhIDIs.mjs → ui-BQxRjahW.mjs} +1 -1
  223. package/dist/update-check-BpLdkJeA.mjs +2 -0
  224. package/dist/update-check-CtmTFJ-O.mjs +2 -0
  225. package/dist/update-check-worker.mjs +1 -1
  226. package/dist/{url-info-DvpNcNl8.mjs → url-info-CSU3TaVe.mjs} +1 -1
  227. package/dist/{url-normalization-C9URZnpq.mjs → url-normalization-DKZYH3Tv.mjs} +1 -1
  228. package/dist/{url-scanner-CIwK3wB5.mjs → url-scanner-mtiMlSyE.mjs} +1 -1
  229. package/dist/{user-DGA7cqdf.mjs → user-DuDnsFvs.mjs} +1 -1
  230. package/dist/{values-BzS0b25w.mjs → values-B4gL0UvN.mjs} +1 -1
  231. package/dist/{vectorize-DtDjl2fJ.mjs → vectorize-CEC7tpRJ.mjs} +1 -1
  232. package/dist/version-CPwqVR_p.mjs +2 -0
  233. package/dist/{waiting-rooms-CjTh4F3B.mjs → waiting-rooms-CosskYpi.mjs} +1 -1
  234. package/dist/{web-assets-4l1B5V9b.mjs → web-assets-Do2JEl4p.mjs} +1 -1
  235. package/dist/{web3-C0Z4AJjC.mjs → web3-C3sb4DR8.mjs} +1 -1
  236. package/dist/workers-ByA4Nddg.mjs +36 -0
  237. package/dist/{workers-builds-DYGeoxmX.mjs → workers-builds-CDE-wcw-.mjs} +1 -1
  238. package/dist/{workers-for-platforms-CSw0K8Nl.mjs → workers-for-platforms-CvZI2B1d.mjs} +1 -1
  239. package/dist/{workers-vpc-DJ7Couct.mjs → workers-vpc-WbwBVV_L.mjs} +1 -1
  240. package/dist/{workflows-Dm03QT8U.mjs → workflows-Ch7cNhhq.mjs} +1 -1
  241. package/dist/{zaraz-DJbWUUe3.mjs → zaraz-BO7WT_U7.mjs} +1 -1
  242. package/dist/{zero-trust-DiMY-pN5.mjs → zero-trust-CTKtzxxW.mjs} +431 -281
  243. package/dist/{zone-BWjBv1yy.mjs → zone-DSHj2Vv2.mjs} +1 -1
  244. package/dist/{zones-zGqcQvcY.mjs → zones-CeFb9USG.mjs} +1 -1
  245. package/package.json +1 -1
  246. package/dist/access-B3TvAe5h.mjs +0 -27
  247. package/dist/ai-gateway-DrQhTvKf.mjs +0 -147
  248. package/dist/build-kgS7iKwi.mjs +0 -2
  249. package/dist/cli-Ct980dyx.mjs +0 -3
  250. package/dist/command-B7SzqjQM.mjs +0 -2
  251. package/dist/command-BLHcNQ8m.mjs +0 -2
  252. package/dist/command-C0SMCHZp.mjs +0 -2
  253. package/dist/command-CE8k5TuK.mjs +0 -2
  254. package/dist/command-CPiCDUth.mjs +0 -2
  255. package/dist/command-DHjsstFb.mjs +0 -2
  256. package/dist/command-MTUsmZU5.mjs +0 -2
  257. package/dist/command-Sb9lOxWT.mjs +0 -2
  258. package/dist/command-sQ8yswii.mjs +0 -2
  259. package/dist/config-DcppJ5D2.mjs +0 -2
  260. package/dist/data-security-BxzLSdGk.mjs +0 -71
  261. package/dist/dry-run-BmzTxDtZ.mjs +0 -2
  262. package/dist/error-sanitization-cyGBhW1Z.mjs +0 -2
  263. package/dist/generate-Djb5Af37.mjs +0 -2
  264. package/dist/interactive-B_dcVghB.mjs +0 -2
  265. package/dist/kv-DmAQCqXl.mjs +0 -21
  266. package/dist/lazy-command-B_bwSa2F.mjs +0 -2
  267. package/dist/local-CFd107fr.mjs +0 -2
  268. package/dist/migrate-CXMbQPyC.mjs +0 -2
  269. package/dist/pages-CjPErYik.mjs +0 -60
  270. package/dist/previews-Dj_LcGRd.mjs +0 -4
  271. package/dist/r2-C0W2J4sT.mjs +0 -127
  272. package/dist/resolve-BVxXAYG7.mjs +0 -2
  273. package/dist/run-C_qUgBTs.mjs +0 -2
  274. package/dist/run-DK1d9BJz.mjs +0 -2
  275. package/dist/shared--lvrXmXY.mjs +0 -2
  276. package/dist/spawn-Da3HnlmB.mjs +0 -10
  277. package/dist/src-BLLpnbzC.mjs +0 -109
  278. package/dist/startup-profile-Cw-_akjQ.mjs +0 -2
  279. package/dist/state-CcktNox9.mjs +0 -2
  280. package/dist/telemetry-C0k8vfbq.mjs +0 -2
  281. package/dist/telemetry-Dh-8kdfY.mjs +0 -5
  282. package/dist/telemetry-IrDBqbQW.mjs +0 -2
  283. package/dist/update-check-BYJnL8J8.mjs +0 -2
  284. package/dist/update-check-DFoSm5GT.mjs +0 -2
  285. package/dist/version-B47pK_PZ.mjs +0 -2
  286. package/dist/workers-CNBv6GxE.mjs +0 -36
  287. package/dist/zt-Bt4Q6iM1.mjs +0 -110
  288. /package/dist/{Page-BchtVjAO.mjs → Page-CjJht2qT.mjs} +0 -0
  289. /package/dist/{alerts-DY_7Nknx.mjs → alerts-DqZgVSCT.mjs} +0 -0
  290. /package/dist/{autorag-K396-M2S.mjs → autorag-Cq9k9Ye6.mjs} +0 -0
  291. /package/dist/{body-parser-BpPZBRMr.mjs → body-parser-hh2avzkz.mjs} +0 -0
  292. /package/dist/{brands-Uy0Cmv1w.mjs → brands-DeLbFxSt.mjs} +0 -0
  293. /package/dist/{browser-extension-D_siSsD9.mjs → browser-extension-C1zmKFDG.mjs} +0 -0
  294. /package/dist/{chunk-U6NEESU5-CAnOLcsu.mjs → chunk-U6NEESU5-BhF4rnpx.mjs} +0 -0
  295. /package/dist/{chunk-WMOON6TZ-D3H84qpM.mjs → chunk-WMOON6TZ-D_ToS88f.mjs} +0 -0
  296. /package/dist/{clear-CpcO2ExU.mjs → clear-CRfI7WS7.mjs} +0 -0
  297. /package/dist/{cli-types-B6tm-8uL.mjs → cli-types-DoVT5q_M.mjs} +0 -0
  298. /package/dist/{connector-telemetry-events-latest-oguk5Zyj.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
  299. /package/dist/{connector-telemetry-snapshots-latest-B6zuxkr0.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
  300. /package/dist/{delegate-CCGgla7X.mjs → delegate-B6LetRpZ.mjs} +0 -0
  301. /package/dist/{input-validation-D3e278L_.mjs → input-validation-Dk52b0me.mjs} +0 -0
  302. /package/dist/{interactive-D80kbTap.mjs → interactive-C-o16XQs.mjs} +0 -0
  303. /package/dist/{lifecycle-Cyc3fmyN.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
  304. /package/dist/{project-settings-Bf6rReo1.mjs → project-settings-DO6njFg_.mjs} +0 -0
  305. /package/dist/{resolve-qPFfBMrn.mjs → resolve-BCTrtcx7.mjs} +0 -0
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,i as p}from"./prompt-Mh69ni1N.mjs";import{t as m}from"./cli-types-B6tm-8uL.mjs";function h(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,i as p}from"./prompt-DV6YTdoa.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
3
3
 
4
4
  Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse.`).positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`eligibility <report-id>`,describe:`Check whether a report can be appealed`,builder:h,handler:async c=>s({command:`abuse-reports appeals eligibility`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/abuse-reports/${c[`report-id`]==null?`<report-id>`:encodeURIComponent(String(c[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(c[`report-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.abuseReports.appeals.eligibility({account_id:l,report_id:c[`report-id`]})),{successLabel:`Loaded`})})},_={command:`appeals`,describe:`Operations for appeals`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage("$0 abuse-reports create <report-param>\n\nSubmit an abuse report of a particular type. Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the `Account > Abuse Reports > Edit` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).").positional(`report-param`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`act`,{type:`string`,description:`The act field`,choices:[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`]}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
5
5
  `}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./lazy-command-BR3u8SQ2.mjs";var t=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-Axp5Wfpj.mjs`),{command:`access curl`,recordArgs:!1}),n=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-jJKEah9i.mjs`),{command:`access login`,recordArgs:!1}),r=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-DBCoI1fN.mjs`),{command:`access ssh-config`,recordArgs:!1}),i=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-egPOyKbx.mjs`),{command:`access ssh-gen`,recordArgs:!1}),a={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-BH-TMJWp.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},o=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-DrQKTf1O.mjs`),{command:`access token`,recordArgs:!1});const s={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t).command(n).command(r).command(i).command(a).command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d}from"./prompt-Mh69ni1N.mjs";function f(e){return e.usage(`$0 account batch move
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d}from"./prompt-DV6YTdoa.mjs";function f(e){return e.usage(`$0 account batch move
3
3
 
4
4
  Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`).option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization ID.`}).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 p={command:`move`,describe:`Batch move accounts`,builder:f,handler:async e=>s({command:`account batch move`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?l({account_ids:e[`account-ids`],destination_organization_id:u(e[`destination-organization-id`],`destination-organization-id`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await d(`destination-organization-id`,`Move accounts to this organization ID.`));let n=l({account_ids:e[`account-ids`],destination_organization_id:u(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})})},m={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 account move
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as u,n as d,t as f}from"./body-parser-BpPZBRMr.mjs";import{n as p}from"./input-validation-D3e278L_.mjs";import{a as m,i as h,n as g}from"./prompt-Mh69ni1N.mjs";import{t as _}from"./cli-types-B6tm-8uL.mjs";function v(e){return e.usage(`$0 account-tags delete
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as u,n as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DV6YTdoa.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 account-tags delete
3
3
 
4
4
  Removes all tags from a specific account or zone-level resource.`).option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
5
5
  verify the current resource ETag matches before applying the write. Returns
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-BpPZBRMr.mjs";import{n as m}from"./input-validation-D3e278L_.mjs";import{a as h,i as g,n as _}from"./prompt-Mh69ni1N.mjs";import{t as v}from"./cli-types-B6tm-8uL.mjs";import{n as ee,t as te}from"./raw-fetch-1ygCOcT_.mjs";function y(e){return e.usage(`$0 accounts applications create
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m}from"./input-validation-Dk52b0me.mjs";import{a as h,i as g,n as _}from"./prompt-DV6YTdoa.mjs";import{t as v}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-Cp3EaTcj.mjs";function y(e){return e.usage(`$0 accounts applications create
3
3
 
4
4
  Create a custom application for an account.`).option(`category-id`,{type:`number`,description:`Returns the category ID.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Returns the human readable ID.`}).option(`ip-subnets`,{type:`string`,array:!0,description:`IP subnets for this application. Custom application create and update requests accept IPv4 prefix lengths /8 through /32 and IPv6 prefix lengths /32 through /128.`}).option(`name`,{type:`string`,description:`Returns the application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:`Port and protocol pairs matched by the application.`}).option(`support-domains`,{type:`string`,array:!0,description:`Support domains matched by the application.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom application. At least one hostname or IP subnet is required. Support domains and port/protocol pairs do not satisfy this requirement. `})}const b={command:`create`,describe:`Create application`,builder:y,handler:async n=>l({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:n.body===void 0?p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]}):d(n.body)});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,n.body){let e=d(n.body);o(await c(`Creating`,async()=>i.accounts.applications.create({body:e,account_id:l})),{successLabel:`Created`});return}if(n[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);n[`human-id`]===void 0&&(n[`human-id`]=await h(`human-id`,`Returns the human readable ID.`)),n.name===void 0&&(n.name=await h(`name`,`Returns the application name.`));let u=p({category_id:n[`category-id`],hostnames:n.hostnames,human_id:m(n[`human-id`],`human-id`,`text`),ip_subnets:n[`ip-subnets`],name:m(n.name,`name`,`text`),port_protocols:n[`port-protocols`],support_domains:n[`support-domains`]});o(await c(`Creating`,async()=>i.accounts.applications.create({body:u,account_id:l})),{successLabel:`Created`})})};function x(e){return e.usage(`$0 accounts applications delete <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,t as s}from"./body-parser-BpPZBRMr.mjs";import{n as c}from"./input-validation-D3e278L_.mjs";import{a as l,n as u}from"./prompt-Mh69ni1N.mjs";function d(e){return e.usage(`$0 acm custom-trust-store create
2
+ import{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{a as l,n as u}from"./prompt-DV6YTdoa.mjs";function d(e){return e.usage(`$0 acm custom-trust-store create
3
3
 
4
4
  Upload a root CA certificate to the Custom Origin Trust Store for a Zone. Only root CA certificates are accepted.`).option(`certificate`,{type:`string`,description:`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`}).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:`create`,describe:`Upload Custom Origin Trust Store`,builder:d,handler:async u=>a({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({certificate:c(u.certificate,`certificate`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...e,zone_id:d})),{successLabel:`Created`});return}u.certificate===void 0&&(u.certificate=await l(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let f=s({certificate:c(u.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>a.acm.customTrustStore.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 acm custom-trust-store delete <custom-origin-trust-store-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as u,r as d,t as f}from"./body-parser-BpPZBRMr.mjs";import{n as p,t as m}from"./input-validation-D3e278L_.mjs";import{a as h,n as g}from"./prompt-Mh69ni1N.mjs";import{n as ee,t as te}from"./raw-fetch-1ygCOcT_.mjs";function _(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-DV6YTdoa.mjs";import{n as ee,t as te}from"./raw-fetch-Cp3EaTcj.mjs";function _(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
3
3
 
4
4
  Remove an account as a member of a particular address map.`).positional(`member-account-id`,{type:`string`,description:`Identifier of a Cloudflare account.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:_,handler:async n=>l({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/accounts/${n[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(n[`member-account-id`]))}`,pathParams:{"address-map-id":String(n[`address-map-id`]??``),"member-account-id":String(n[`member-account-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await g({force:!!n.force})){process.stderr.write(`Aborted.
5
5
  `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.accounts.delete({account_id:l,address_map_id:n[`address-map-id`],member_account_id:n[`member-account-id`]})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
@@ -20,12 +20,12 @@ Remove an IP from a particular address map.`).positional(`ip-address`,{type:`str
20
20
 
21
21
  Add an IP from a prefix owned by the account to a particular address map.`).positional(`ip-address`,{type:`string`,description:`An IPv4 or IPv6 address.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`update <ip-address>`,describe:`Add an IP to an Address Map`,builder:M,handler:async n=>l({command:`addressing address-maps ips update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps ips update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/ips/${n[`ip-address`]==null?`<ip-address>`:encodeURIComponent(String(n[`ip-address`]))}`,pathParams:{"ip-address":String(n[`ip-address`]??``),"address-map-id":String(n[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Updating`,async()=>i.addressing.addressMaps.ips.update({account_id:l,address_map_id:n[`address-map-id`],ip_address:n[`ip-address`]})),{successLabel:`Updated`})})},P={command:`ips`,describe:`Operations for address-maps.ips`,builder:e=>e.command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 addressing address-maps list
22
22
 
23
- List all address maps owned by the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List Address Maps`,builder:F,handler:async n=>l({command:`addressing address-maps list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.addressing.addressMaps.list({account_id:l})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 addressing address-maps zones delete
23
+ List all address maps owned by the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`list`,describe:`List Address Maps`,builder:F,handler:async n=>l({command:`addressing address-maps list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.addressing.addressMaps.list({account_id:l})),{successLabel:`Loaded`})})};function L(e){return e.usage(`$0 addressing address-maps zones delete <member-zone-id>
24
24
 
25
- Remove a zone as a member of a particular address map.`).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 R={command:`delete`,describe:`Remove a zone membership from an Address Map`,builder:L,handler:async i=>l({command:`addressing address-maps zones delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){s({command:`cf addressing address-maps zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${i[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(i[`address-map-id`]))}/zones/${i.zone??i.zoneId??`<zone>`}`,pathParams:{"zone-id":String(i.zone??i[`zone-id`]??``),"address-map-id":String(i[`address-map-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.local?e:await r();i.accountId=u;let d=await n({zone:i.zone},l,{quiet:i.quiet});if(i.zoneId=d,!await g({force:!!i.force})){process.stderr.write(`Aborted.
26
- `);return}o(await c(`Deleting`,async()=>l.addressing.addressMaps.zones.delete({account_id:u,address_map_id:i[`address-map-id`],zone_id:d})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 addressing address-maps zones update
25
+ Remove a zone as a member of a particular address map.`).positional(`member-zone-id`,{type:`string`,description:`Identifier of a zone.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,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 R={command:`delete <member-zone-id>`,describe:`Remove a zone membership from an Address Map`,builder:L,handler:async n=>l({command:`addressing address-maps zones delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/zones/${n[`member-zone-id`]==null?`<member-zone-id>`:encodeURIComponent(String(n[`member-zone-id`]))}`,pathParams:{"member-zone-id":String(n[`member-zone-id`]??``),"address-map-id":String(n[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();if(n.accountId=l,!await g({force:!!n.force})){process.stderr.write(`Aborted.
26
+ `);return}o(await c(`Deleting`,async()=>i.addressing.addressMaps.zones.delete({account_id:l,address_map_id:n[`address-map-id`],member_zone_id:n[`member-zone-id`]})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 addressing address-maps zones update <member-zone-id>
27
27
 
28
- Add a zone as a member of a particular address map.`).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`update`,describe:`Add a zone membership to an Address Map`,builder:z,handler:async i=>l({command:`addressing address-maps zones update`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){s({command:`cf addressing address-maps zones update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${i[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(i[`address-map-id`]))}/zones/${i.zone??i.zoneId??`<zone>`}`,pathParams:{"zone-id":String(i.zone??i[`zone-id`]??``),"address-map-id":String(i[`address-map-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.local?e:await r();i.accountId=u;let d=await n({zone:i.zone},l,{quiet:i.quiet});i.zoneId=d,o(await c(`Updating`,async()=>l.addressing.addressMaps.zones.update({account_id:u,address_map_id:i[`address-map-id`],zone_id:d})),{successLabel:`Updated`})})},V={command:`zones`,describe:`Operations for address-maps.zones`,builder:e=>e.command(R).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`address-maps`,describe:`Operations for address-maps`,builder:e=>e.command(C).command(T).command(D).command(k).command(I).command(x).command(P).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.usage(`$0 addressing leases list
28
+ Add a zone as a member of a particular address map.`).positional(`member-zone-id`,{type:`string`,description:`Identifier of a zone.`,demandOption:!0}).option(`address-map-id`,{type:`string`,description:`Identifier of an Address Map.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`update <member-zone-id>`,describe:`Add a zone membership to an Address Map`,builder:z,handler:async n=>l({command:`addressing address-maps zones update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf addressing address-maps zones update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/address_maps/${n[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(n[`address-map-id`]))}/zones/${n[`member-zone-id`]==null?`<member-zone-id>`:encodeURIComponent(String(n[`member-zone-id`]))}`,pathParams:{"member-zone-id":String(n[`member-zone-id`]??``),"address-map-id":String(n[`address-map-id`]??``)},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Updating`,async()=>i.addressing.addressMaps.zones.update({account_id:l,address_map_id:n[`address-map-id`],member_zone_id:n[`member-zone-id`]})),{successLabel:`Updated`})})},V={command:`zones`,describe:`Operations for address-maps.zones`,builder:e=>e.command(R).command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},H={command:`address-maps`,describe:`Operations for address-maps`,builder:e=>e.command(C).command(T).command(D).command(k).command(I).command(x).command(P).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.usage(`$0 addressing leases list
29
29
 
30
30
  List all leases owned by the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Leases`,builder:U,handler:async n=>l({command:`addressing leases list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){s({command:`cf addressing leases list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/addressing/leases`,pathParams:{},bodyKind:`none`});return}let i=await a(n),l=n.local?e:await r();n.accountId=l,o(await c(`Loading`,async()=>i.addressing.leases.list({account_id:l})),{successLabel:`Loaded`})})},G={command:`leases`,describe:`Operations for leases`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.usage(`$0 addressing loa-documents create
31
31
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,r as l,t as u}from"./body-parser-BpPZBRMr.mjs";import{n as d}from"./input-validation-D3e278L_.mjs";import{a as f,n as p}from"./prompt-Mh69ni1N.mjs";import{t as m}from"./cli-types-B6tm-8uL.mjs";function h(e){return e.usage(`$0 agent-memory create-namespace
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as c,r as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-DV6YTdoa.mjs";import{t as m}from"./cli-types-DoVT5q_M.mjs";function h(e){return e.usage(`$0 agent-memory create-namespace
3
3
 
4
4
  Creates a new memory namespace owned by the account.`).option(`name`,{type:`string`,description:`Namespace name.`}).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 g={command:`create-namespace`,describe:`Create a namespace`,builder:h,handler:async l=>s({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await n();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Namespace name.`));let m=u({name:d(l.name,`name`,`text`)});i(await o(`Creating`,async()=>s.agentMemory.createNamespace({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 agent-memory delete-memory <memory-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{a as t,r as n}from"./auth-B5p3SIhO.mjs";import{t as r}from"./output-CZt-berV.mjs";import{t as i}from"./dry-run-BmzTxDtZ.mjs";import{t as a}from"./progress-C9dWgc3J.mjs";import{t as o}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as s}from"./body-parser-BpPZBRMr.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
2
+ import{i as e}from"./context-5JRcefHh.mjs";import{a as t,r as n}from"./auth-3bFlHTVl.mjs";import{t as r}from"./output-CvQFJkvi.mjs";import{t as i}from"./dry-run-Bq0JAsbX.mjs";import{t as a}from"./progress-DUeNqM-j.mjs";import{t as o}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as s}from"./body-parser-hh2avzkz.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
3
3
 
4
4
  Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const l={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:c,handler:async c=>o({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let s=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:s}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function u(e){return e.usage(`$0 ai-audit robots get
5
5
 
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,n as h}from"./prompt-DV6YTdoa.mjs";import{t as g}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
3
+
4
+ Provisions a Cloudflare-for-SaaS custom hostname and returns the CNAME target to point DNS at.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`domain`,{type:`string`,description:"Custom hostname that you own, such as `ai.example.com`."}).option(`min-tls`,{type:`string`,description:`The minTLS field`,choices:[`1.0`,`1.1`,`1.2`,`1.3`]}).option(`zone-id`,{type:`string`,description:`ID of the Cloudflare zone that contains the custom hostname.`}).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 <gateway-id>`,describe:`Create a custom domain for a gateway`,builder:ee,handler:async r=>c({command:`ai-gateway custom-domains create`,classification:{safeFlags:[`min-tls`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...e,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`});return}r.domain===void 0&&(r.domain=await m(`domain`,"Custom hostname that you own, such as `ai.example.com`.")),r[`zone-id`]===void 0&&(r[`zone-id`]=await m(`zone-id`,`ID of the Cloudflare zone that contains the custom hostname.`));let d=f({domain:p(r.domain,`domain`,`text`),minTLS:p(r[`min-tls`],`min-tls`,`text`),zone_id:p(r[`zone-id`],`zone-id`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.customDomains.create({...d,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 ai-gateway custom-domains delete <hostname>
5
+
6
+ Deletes a custom domain from an AI Gateway and removes its Cloudflare for SaaS custom hostname.`).positional(`hostname`,{type:`string`,description:"Custom hostname that you own, such as `ai.example.com`.",demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,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 <hostname>`,describe:`Delete a custom domain`,builder:_,handler:async r=>c({command:`ai-gateway custom-domains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-domains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains/${r.hostname==null?`<hostname>`:encodeURIComponent(String(r.hostname))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),hostname:String(r.hostname??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await h({force:!!r.force,message:`This deletes the custom domain and its custom hostname. Requests to this hostname will stop reaching the gateway.`})){process.stderr.write(`Aborted.
7
+ `);return}a(await s(`Deleting`,async()=>c.aiGateway.customDomains.delete({account_id:l,gateway_id:r[`gateway-id`],hostname:r.hostname})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 ai-gateway custom-domains get <hostname>
8
+
9
+ Retrieves a custom domain attached to an AI Gateway, including its status and CNAME target.`).positional(`hostname`,{type:`string`,description:"Custom hostname that you own, such as `ai.example.com`.",demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <hostname>`,describe:`Get a custom domain`,builder:y,handler:async r=>c({command:`ai-gateway custom-domains get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains/${r.hostname==null?`<hostname>`:encodeURIComponent(String(r.hostname))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),hostname:String(r.hostname??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.customDomains.get({account_id:l,gateway_id:r[`gateway-id`],hostname:r.hostname})),{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 ai-gateway custom-domains list
10
+
11
+ Lists the custom domains attached to an AI Gateway, including the certificate and validation status of each domain.`).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`status`,{type:`string`,description:`Status`,choices:[`initializing`,`pending_dcv`,`active`,`blocked`,`error`]}).option(`search`,{type:`string`,description:`Search by hostname`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List custom domains`,builder:g(x),handler:async r=>c({command:`ai-gateway custom-domains list`,classification:{safeFlags:[`status`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],status:r.status,search:r.search};if(r.dryRun){o({command:`cf ai-gateway custom-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.customDomains.list({account_id:u,gateway_id:r[`gateway-id`],...c})),{successLabel:`Loaded`})})},C={command:`custom-domains`,describe:`Manage custom hostnames that route requests through an AI Gateway`,builder:e=>e.command(te).command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.usage(`$0 ai-gateway custom-providers create
12
+
13
+ Creates an account-level custom provider that forwards AI Gateway requests to the HTTPS base URL you supply. Requests reference the provider as \`custom-{slug}\`, so the slug must be unique within the account.`).option(`base-url`,{type:`string`,description:`The base_url field`}).option(`beta`,{type:`boolean`,description:`The beta field`}).option(`curl-example`,{type:`string`,description:`The curl_example field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`headers`,{type:`string`,description:`JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.`}).option(`js-example`,{type:`string`,description:`The js_example field`}).option(`link`,{type:`string`,description:`The link field`}).option(`name`,{type:`string`,description:`The name field`}).option(`position`,{type:`number`,description:`The position field`}).option(`slug`,{type:`string`,description:`The slug 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 T={command:`create`,describe:`Create a custom provider`,builder:w,handler:async r=>c({command:`ai-gateway custom-providers create`,classification:{safeFlags:[`beta`,`enable`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-providers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/custom-providers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({base_url:p(r[`base-url`],`base-url`,`text`),beta:r.beta,curl_example:p(r[`curl-example`],`curl-example`,`text`),description:p(r.description,`description`,`text`),enable:r.enable,headers:p(r.headers,`headers`,`text`),js_example:p(r[`js-example`],`js-example`,`text`),link:p(r.link,`link`,`text`),name:p(r.name,`name`,`text`),position:r.position,slug:p(r.slug,`slug`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.customProviders.create({...e,account_id:l})),{successLabel:`Created`});return}r[`base-url`]===void 0&&(r[`base-url`]=await m(`base-url`,`The base_url field`)),r.name===void 0&&(r.name=await m(`name`,`The name field`)),r.slug===void 0&&(r.slug=await m(`slug`,`The slug field`));let d=f({base_url:p(r[`base-url`],`base-url`,`text`),beta:r.beta,curl_example:p(r[`curl-example`],`curl-example`,`text`),description:p(r.description,`description`,`text`),enable:r.enable,headers:p(r.headers,`headers`,`text`),js_example:p(r[`js-example`],`js-example`,`text`),link:p(r.link,`link`,`text`),name:p(r.name,`name`,`text`),position:r.position,slug:p(r.slug,`slug`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.customProviders.create({...d,account_id:l})),{successLabel:`Created`})})};function E(e){return e.usage(`$0 ai-gateway custom-providers delete <id>
14
+
15
+ Deletes a custom provider and every pricing rule that belongs to it.`).positional(`id`,{type:`string`,description:`ID`,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 D={command:`delete <id>`,describe:`Delete a custom provider`,builder:E,handler:async r=>c({command:`ai-gateway custom-providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/custom-providers/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await h({force:!!r.force,message:"This permanently deletes the custom provider and all of its pricing rules. Gateway requests that use `custom-{slug}` for this provider will stop routing."})){process.stderr.write(`Aborted.
16
+ `);return}a(await s(`Deleting`,async()=>c.aiGateway.customProviders.delete({account_id:l,id:r.id})),{successLabel:`Deleted`})})};function O(e){return e.usage(`$0 ai-gateway custom-providers get <id>
17
+
18
+ Retrieves a custom provider, including its slug, base URL, and custom headers.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <id>`,describe:`Get a custom provider`,builder:O,handler:async r=>c({command:`ai-gateway custom-providers get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-providers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/custom-providers/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.customProviders.get({account_id:l,id:r.id})),{successLabel:`Loaded`})})};function A(e){return e.usage(`$0 ai-gateway custom-providers list
19
+
20
+ Lists the custom providers configured for the account, ordered by position and then name.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`beta`,{type:`boolean`,description:`Beta`}).option(`enable`,{type:`boolean`,description:`Enable`}).option(`search`,{type:`string`,description:`Search by id, name, slug`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List custom providers`,builder:A,handler:async r=>c({command:`ai-gateway custom-providers list`,classification:{safeFlags:[`beta`,`enable`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],beta:r.beta,enable:r.enable,search:r.search};if(r.dryRun){o({command:`cf ai-gateway custom-providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/custom-providers`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.customProviders.list({account_id:u,...c})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 ai-gateway custom-providers update <id>
21
+
22
+ Updates the specified fields of a custom provider. Changes clear cached entries for the provider.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`base-url`,{type:`string`,description:`The base_url field`}).option(`beta`,{type:`boolean`,description:`The beta field`}).option(`curl-example`,{type:`string`,description:`The curl_example field`}).option(`description`,{type:`string`,description:`The description field`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`headers`,{type:`string`,description:`JSON object of extra HTTP headers that AI Gateway sends to the provider. Values can contain credentials.`}).option(`js-example`,{type:`string`,description:`The js_example field`}).option(`link`,{type:`string`,description:`The link field`}).option(`logo`,{type:`string`,description:`The logo field`}).option(`name`,{type:`string`,description:`The name field`}).option(`position`,{type:`number`,description:`The position field`}).option(`slug`,{type:`string`,description:`The slug 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 N={command:`update <id>`,describe:`Update a custom provider`,builder:M,handler:async r=>c({command:`ai-gateway custom-providers update`,classification:{safeFlags:[`beta`,`enable`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway custom-providers update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/custom-providers/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({base_url:p(r[`base-url`],`base-url`,`text`),beta:r.beta,curl_example:p(r[`curl-example`],`curl-example`,`text`),description:p(r.description,`description`,`text`),enable:r.enable,headers:p(r.headers,`headers`,`text`),js_example:p(r[`js-example`],`js-example`,`text`),link:p(r.link,`link`,`text`),logo:p(r.logo,`logo`,`text`),name:p(r.name,`name`,`text`),position:r.position,slug:p(r.slug,`slug`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.aiGateway.customProviders.update({...e,account_id:l,id:r.id})),{successLabel:`Updated`});return}let d=f({base_url:p(r[`base-url`],`base-url`,`text`),beta:r.beta,curl_example:p(r[`curl-example`],`curl-example`,`text`),description:p(r.description,`description`,`text`),enable:r.enable,headers:p(r.headers,`headers`,`text`),js_example:p(r[`js-example`],`js-example`,`text`),link:p(r.link,`link`,`text`),logo:p(r.logo,`logo`,`text`),name:p(r.name,`name`,`text`),position:r.position,slug:p(r.slug,`slug`,`text`)});a(await s(`Updating`,async()=>c.aiGateway.customProviders.update({...d,account_id:l,id:r.id})),{successLabel:`Updated`})})},P={command:`custom-providers`,describe:`Manage account-level custom AI providers and their endpoint settings`,builder:e=>e.command(T).command(D).command(k).command(j).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.usage(`$0 ai-gateway dynamic-routing create <gateway-id>
23
+
24
+ Creates a dynamic route on an AI Gateway from the specified routing elements. Clients call the route by using \`dynamic/{name}\` as the model name.`).positional(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`elements`,{type:`string`,description:`The elements field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`name`,{type:`string`,description:`The 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 I={command:`create <gateway-id>`,describe:`Create a dynamic route`,builder:F,handler:async r=>c({command:`ai-gateway dynamic-routing create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({elements:d(r.elements,`elements`),name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.create({...e,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`});return}if(r.elements===void 0)throw Error(`--elements is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await m(`name`,`The name field`));let h=f({elements:d(r.elements,`elements`),name:p(r.name,`name`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.create({...h,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`})})};function L(e){return e.usage(`$0 ai-gateway dynamic-routing delete <id>
25
+
26
+ Deletes a dynamic route from an AI Gateway.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,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 R={command:`delete <id>`,describe:`Delete a dynamic route`,builder:L,handler:async r=>c({command:`ai-gateway dynamic-routing delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
27
+ `);return}a(await s(`Deleting`,async()=>c.aiGateway.dynamicRouting.delete({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Deleted`})})};function z(e){return e.usage(`$0 ai-gateway dynamic-routing deployments create <id>
28
+
29
+ Deploys the specified version of a dynamic route so that it serves traffic. Deploy an earlier version to roll back.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`version-id`,{type:`string`,description:`The version_id 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 B={command:`create <id>`,describe:`Deploy a dynamic route version`,builder:z,handler:async r=>c({command:`ai-gateway dynamic-routing deployments create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing deployments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/deployments`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({version_id:p(r[`version-id`],`version-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.deployments.create({...e,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Created`});return}r[`version-id`]===void 0&&(r[`version-id`]=await m(`version-id`,`The version_id field`));let d=f({version_id:p(r[`version-id`],`version-id`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.deployments.create({...d,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Created`})})};function V(e){return e.usage(`$0 ai-gateway dynamic-routing deployments list
30
+
31
+ Lists the deployment history of a dynamic route.`).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`list`,describe:`List dynamic route deployments`,builder:V,handler:async r=>c({command:`ai-gateway dynamic-routing deployments list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing deployments list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/deployments`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.dynamicRouting.deployments.list({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})},U={command:`deployments`,describe:`Deploy dynamic route versions and view deployment history`,builder:e=>e.command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage(`$0 ai-gateway dynamic-routing get <id>
32
+
33
+ Retrieves a dynamic route with its routing elements, active version, and current deployment.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <id>`,describe:`Get a dynamic route`,builder:W,handler:async r=>c({command:`ai-gateway dynamic-routing get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.dynamicRouting.get({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})};function K(e){return e.usage(`$0 ai-gateway dynamic-routing list
34
+
35
+ Lists the dynamic routes configured on an AI Gateway.`).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number`}).option(`per-page`,{type:`number`,description:`Number of routes per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`list`,describe:`List dynamic routes`,builder:K,handler:async r=>c({command:`ai-gateway dynamic-routing list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf ai-gateway dynamic-routing list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.dynamicRouting.list({account_id:u,gateway_id:r[`gateway-id`],...c})),{successLabel:`Loaded`})})};function J(e){return e.usage(`$0 ai-gateway dynamic-routing update <id>
36
+
37
+ Updates the name of a dynamic route. To change routing behaviour, create and deploy a new version.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`name`,{type:`string`,description:`The 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 Y={command:`update <id>`,describe:`Rename a dynamic route`,builder:J,handler:async r=>c({command:`ai-gateway dynamic-routing update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({name:p(r.name,`name`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.aiGateway.dynamicRouting.update({...e,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await m(`name`,`The name field`));let d=f({name:p(r.name,`name`,`text`)});a(await s(`Updating`,async()=>c.aiGateway.dynamicRouting.update({...d,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`})})};function X(e){return e.usage(`$0 ai-gateway dynamic-routing versions create <id>
38
+
39
+ Creates a new version of a dynamic route from the specified routing elements. The version does not serve traffic until you deploy it.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`elements`,{type:`string`,description:`The elements field. 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 Z={command:`create <id>`,describe:`Create a dynamic route version`,builder:X,handler:async r=>c({command:`ai-gateway dynamic-routing versions create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing versions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/versions`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({elements:d(r.elements,`elements`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.versions.create({...e,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Created`});return}if(r.elements===void 0)throw Error(`--elements is required (or pass --body with this field set).`);let p=f({elements:d(r.elements,`elements`)});a(await s(`Creating`,async()=>c.aiGateway.dynamicRouting.versions.create({...p,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Created`})})};function Q(e){return e.usage(`$0 ai-gateway dynamic-routing versions get <version-id>
40
+
41
+ Retrieves a saved version of a dynamic route, including its routing elements.`).positional(`version-id`,{type:`string`,description:`Version ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <version-id>`,describe:`Get a dynamic route version`,builder:Q,handler:async r=>c({command:`ai-gateway dynamic-routing versions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing versions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/versions/${r[`version-id`]==null?`<version-id>`:encodeURIComponent(String(r[`version-id`]))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``),"version-id":String(r[`version-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.dynamicRouting.versions.get({account_id:l,gateway_id:r[`gateway-id`],id:r.id,version_id:r[`version-id`]})),{successLabel:`Loaded`})})};function re(e){return e.usage(`$0 ai-gateway dynamic-routing versions list
42
+
43
+ Lists the saved versions of a dynamic route.`).option(`gateway-id`,{type:`string`,description:`Gateway ID`,demandOption:!0}).option(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`list`,describe:`List dynamic route versions`,builder:re,handler:async r=>c({command:`ai-gateway dynamic-routing versions list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway dynamic-routing versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/routes/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/versions`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.dynamicRouting.versions.list({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})},ae={command:`versions`,describe:`Create and inspect saved versions of a dynamic route`,builder:e=>e.command(Z).command(ne).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},oe={command:`dynamic-routing`,describe:`Route requests across multiple AI providers with fallback, load-balancing, and versioned deployments`,builder:e=>e.command(I).command(R).command(G).command(q).command(Y).command(U).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.usage(`$0 ai-gateway gateways create
44
+
45
+ Creates an AI Gateway in the account with the specified caching, rate limiting, logging, and authentication settings. The gateway ID appears in request URLs and must be unique within the account.`).option(`authentication`,{type:`boolean`,description:`The authentication field`}).option(`byok-only`,{type:`boolean`,description:`Requires customer-provided provider credentials and prevents fallback to Unified Billing.`}).option(`cache-invalidate-on-update`,{type:`boolean`,description:`The cache_invalidate_on_update field`}).option(`cache-ttl`,{type:`number`,description:`The cache_ttl field`}).option(`collect-logs`,{type:`boolean`,description:`The collect_logs field`}).option(`id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`}).option(`log-management`,{type:`number`,description:`The log_management field`}).option(`log-management-strategy`,{type:`string`,description:`The log_management_strategy field`,choices:[`STOP_INSERTING`,`DELETE_OLDEST`]}).option(`logpush`,{type:`boolean`,description:`The logpush field`}).option(`logpush-public-key`,{type:`string`,description:`The logpush_public_key field`}).option(`rate-limiting-interval`,{type:`number`,description:`The rate_limiting_interval field`}).option(`rate-limiting-limit`,{type:`number`,description:`The rate_limiting_limit field`}).option(`rate-limiting-technique`,{type:`string`,description:`The rate_limiting_technique field`,choices:[`fixed`,`sliding`]}).option(`retry-backoff`,{type:`string`,description:`Backoff strategy for retry delays`,choices:[`constant`,`linear`,`exponential`]}).option(`retry-delay`,{type:`number`,description:`Delay between retry attempts in milliseconds (0-60000)`}).option(`retry-max-attempts`,{type:`number`,description:`Maximum number of retry attempts for failed requests (1-5)`}).option(`store-id`,{type:`string`,description:`The store_id field`}).option(`workers-ai-billing-mode`,{type:`string`,description:`Controls how Workers AI inference calls routed through this gateway are billed. 'postpaid' bills the account directly through Workers AI; 'unified' deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.`,choices:[`postpaid`,`unified`],default:`postpaid`}).option(`zdr`,{type:`boolean`,description:`The zdr 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 ce={command:`create`,describe:`Create a gateway`,builder:se,handler:async r=>c({command:`ai-gateway gateways create`,classification:{safeFlags:[`authentication`,`byok-only`,`cache-invalidate-on-update`,`collect-logs`,`log-management-strategy`,`logpush`,`rate-limiting-technique`,`retry-backoff`,`workers-ai-billing-mode`,`zdr`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway gateways create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({authentication:r.authentication,byok_only:r[`byok-only`],cache_invalidate_on_update:r[`cache-invalidate-on-update`],cache_ttl:r[`cache-ttl`],collect_logs:r[`collect-logs`],id:p(r.id,`id`,`text`),log_management:r[`log-management`],log_management_strategy:p(r[`log-management-strategy`],`log-management-strategy`,`text`),logpush:r.logpush,logpush_public_key:p(r[`logpush-public-key`],`logpush-public-key`,`text`),rate_limiting_interval:r[`rate-limiting-interval`],rate_limiting_limit:r[`rate-limiting-limit`],rate_limiting_technique:p(r[`rate-limiting-technique`],`rate-limiting-technique`,`text`),retry_backoff:p(r[`retry-backoff`],`retry-backoff`,`text`),retry_delay:r[`retry-delay`],retry_max_attempts:r[`retry-max-attempts`],store_id:p(r[`store-id`],`store-id`,`text`),workers_ai_billing_mode:p(r[`workers-ai-billing-mode`],`workers-ai-billing-mode`,`text`),zdr:r.zdr}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.gateways.create({...e,account_id:l})),{successLabel:`Created`});return}if(r[`cache-invalidate-on-update`]===void 0)throw Error(`--cache-invalidate-on-update is required (or pass --body with this field set).`);if(r[`cache-ttl`]===void 0)throw Error(`--cache-ttl is required (or pass --body with this field set).`);if(r[`collect-logs`]===void 0)throw Error(`--collect-logs is required (or pass --body with this field set).`);if(r.id===void 0&&(r.id=await m(`id`,`Unique identifier of the AI Gateway within the account.`)),r[`rate-limiting-interval`]===void 0)throw Error(`--rate-limiting-interval is required (or pass --body with this field set).`);if(r[`rate-limiting-limit`]===void 0)throw Error(`--rate-limiting-limit is required (or pass --body with this field set).`);let d=f({authentication:r.authentication,byok_only:r[`byok-only`],cache_invalidate_on_update:r[`cache-invalidate-on-update`],cache_ttl:r[`cache-ttl`],collect_logs:r[`collect-logs`],id:p(r.id,`id`,`text`),log_management:r[`log-management`],log_management_strategy:p(r[`log-management-strategy`],`log-management-strategy`,`text`),logpush:r.logpush,logpush_public_key:p(r[`logpush-public-key`],`logpush-public-key`,`text`),rate_limiting_interval:r[`rate-limiting-interval`],rate_limiting_limit:r[`rate-limiting-limit`],rate_limiting_technique:p(r[`rate-limiting-technique`],`rate-limiting-technique`,`text`),retry_backoff:p(r[`retry-backoff`],`retry-backoff`,`text`),retry_delay:r[`retry-delay`],retry_max_attempts:r[`retry-max-attempts`],store_id:p(r[`store-id`],`store-id`,`text`),workers_ai_billing_mode:p(r[`workers-ai-billing-mode`],`workers-ai-billing-mode`,`text`),zdr:r.zdr});a(await s(`Creating`,async()=>c.aiGateway.gateways.create({...d,account_id:l})),{successLabel:`Created`})})};function le(e){return e.usage(`$0 ai-gateway gateways delete <gateway-id>
46
+
47
+ Permanently deletes an AI Gateway, its configuration, and its stored logs.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,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 ue={command:`delete <gateway-id>`,describe:`Delete a gateway`,builder:le,handler:async l=>c({command:`ai-gateway gateways delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){o({command:`cf ai-gateway gateways delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${l[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(l[`gateway-id`]))}`,pathParams:{"gateway-id":String(l[`gateway-id`]??``)},bodyKind:`none`});return}let c=await i(l),u=l.local?e:await n();if(l.accountId=u,!await h({force:!!l.force,message:`This permanently deletes the gateway, its configuration, and its stored logs. Requests sent to this gateway will fail. This action cannot be undone.`})){process.stderr.write(`Aborted.
48
+ `);return}a(await s(`Deleting`,async()=>r(c,`DELETE`,`/accounts/${u}/ai-gateway/gateways/${encodeURIComponent(String(l[`gateway-id`]))}`)),{successLabel:`Deleted`})})};function de(e){return e.usage(`$0 ai-gateway gateways get-url <provider>
49
+
50
+ Retrieves the endpoint URL for an AI Gateway.`).positional(`provider`,{type:`string`,description:`Provider`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get-url <provider>`,describe:`Get Gateway URL`,builder:de,handler:async r=>c({command:`ai-gateway gateways get-url`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway gateways get-url`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/url/${r.provider==null?`<provider>`:encodeURIComponent(String(r.provider))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),provider:String(r.provider??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.gateways.getUrl({account_id:l,gateway_id:r[`gateway-id`],provider:r.provider})),{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 ai-gateway gateways get <gateway-id>
51
+
52
+ Retrieves the configuration of an AI Gateway.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get <gateway-id>`,describe:`Get a gateway`,builder:pe,handler:async l=>c({command:`ai-gateway gateways get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf ai-gateway gateways get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${l[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(l[`gateway-id`]))}`,pathParams:{"gateway-id":String(l[`gateway-id`]??``)},bodyKind:`none`});return}let c=await i(l),u=l.local?e:await n();l.accountId=u,a(await s(`Loading`,async()=>r(c,`GET`,`/accounts/${u}/ai-gateway/gateways/${encodeURIComponent(String(l[`gateway-id`]))}`)),{successLabel:`Loaded`})})};function he(e){return e.usage(`$0 ai-gateway gateways list
53
+
54
+ Lists the AI Gateways in the account. Use \`search\` to filter by gateway ID.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`search`,{type:`string`,description:`Search by id`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ge={command:`list`,describe:`List gateways`,builder:he,handler:async r=>c({command:`ai-gateway gateways list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],search:r.search};if(r.dryRun){o({command:`cf ai-gateway gateways list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.gateways.list({account_id:u,...c})),{successLabel:`Loaded`})})};function _e(e){return e.usage(`$0 ai-gateway gateways providers create <gateway-id>
55
+
56
+ Stores an upstream AI provider API key for an AI Gateway in the Secrets Store configured on the gateway, with an optional rate limit. Pass \`secret\` to store a new key, or omit it to use an existing Secrets Store secret.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`alias`,{type:`string`,description:`The alias field`}).option(`default-config`,{type:`boolean`,description:`The default_config field`}).option(`provider-slug`,{type:`string`,description:`The provider_slug field`}).option(`rate-limit`,{type:`number`,description:`The rate_limit field`}).option(`rate-limit-period`,{type:`number`,description:`The rate_limit_period field`,default:60}).option(`secret`,{type:`string`,description:`Provider API key to store in the Secrets Store configured on the gateway.`}).option(`secret-id`,{type:`string`,description:`The secret_id 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 ve={command:`create <gateway-id>`,describe:`Store a provider key`,builder:_e,handler:async r=>c({command:`ai-gateway gateways providers create`,classification:{safeFlags:[`default-config`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway gateways providers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/provider_configs`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({alias:p(r.alias,`alias`,`text`),default_config:r[`default-config`],provider_slug:p(r[`provider-slug`],`provider-slug`,`text`),rate_limit:r[`rate-limit`],rate_limit_period:r[`rate-limit-period`],secret:p(r.secret,`secret`,`text`),secret_id:p(r[`secret-id`],`secret-id`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.gateways.providers.create({...e,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`});return}if(r.alias===void 0&&(r.alias=await m(`alias`,`The alias field`)),r[`default-config`]===void 0)throw Error(`--default-config is required (or pass --body with this field set).`);r[`provider-slug`]===void 0&&(r[`provider-slug`]=await m(`provider-slug`,`The provider_slug field`));let d=f({alias:p(r.alias,`alias`,`text`),default_config:r[`default-config`],provider_slug:p(r[`provider-slug`],`provider-slug`,`text`),rate_limit:r[`rate-limit`],rate_limit_period:r[`rate-limit-period`],secret:p(r.secret,`secret`,`text`),secret_id:p(r[`secret-id`],`secret-id`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.gateways.providers.create({...d,account_id:l,gateway_id:r[`gateway-id`]})),{successLabel:`Created`})})};function ye(e){return e.usage(`$0 ai-gateway gateways providers delete <id>
57
+
58
+ Deletes a provider key configuration from an AI Gateway and deletes its secret from the Secrets Store.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,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 be={command:`delete <id>`,describe:`Delete a provider key`,builder:ye,handler:async r=>c({command:`ai-gateway gateways providers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway gateways providers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/provider_configs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,!await h({force:!!r.force,message:`This deletes the stored provider key and its Secrets Store secret. Requests that rely on this key will stop authenticating with it.`})){process.stderr.write(`Aborted.
59
+ `);return}a(await s(`Deleting`,async()=>c.aiGateway.gateways.providers.delete({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Deleted`})})};function xe(e){return e.usage(`$0 ai-gateway gateways providers list
60
+
61
+ Lists the provider keys stored for an AI Gateway. Responses show a masked preview of each key, never the key itself.`).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`list`,describe:`List provider keys`,builder:xe,handler:async r=>c({command:`ai-gateway gateways providers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf ai-gateway gateways providers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/provider_configs`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.gateways.providers.list({account_id:u,gateway_id:r[`gateway-id`],...c})),{successLabel:`Loaded`})})};function Ce(e){return e.usage(`$0 ai-gateway gateways providers update <id>
62
+
63
+ Replaces the stored API key of a provider key configuration. Only the key can change.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`secret`,{type:`string`,description:`Provider API key to store in the Secrets Store configured on the gateway.`}).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 we={command:`update <id>`,describe:`Rotate a provider key`,builder:Ce,handler:async r=>c({command:`ai-gateway gateways providers update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway gateways providers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/provider_configs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{"gateway-id":String(r[`gateway-id`]??``),id:String(r.id??``)},bodyKind:`json`,body:r.body===void 0?f({secret:p(r.secret,`secret`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.aiGateway.gateways.providers.update({...e,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`});return}r.secret===void 0&&(r.secret=await m(`secret`,`Provider API key to store in the Secrets Store configured on the gateway.`,{kind:`secret`}));let d=f({secret:p(r.secret,`secret`,`text`)});a(await s(`Updating`,async()=>c.aiGateway.gateways.providers.update({...d,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`})})},Te={command:`providers`,describe:`Store and rotate upstream AI provider keys for a gateway`,builder:e=>e.command(ve).command(be).command(Se).command(we).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(e){return e.usage(`$0 ai-gateway gateways update <gateway-id>
64
+
65
+ Updates the configuration of an AI Gateway, such as its caching, rate limiting, logging, and authentication settings.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`authentication`,{type:`boolean`,description:`The authentication field`}).option(`byok-only`,{type:`boolean`,description:`Requires customer-provided provider credentials and prevents fallback to Unified Billing.`}).option(`cache-invalidate-on-update`,{type:`boolean`,description:`The cache_invalidate_on_update field`}).option(`cache-ttl`,{type:`number`,description:`The cache_ttl field`}).option(`collect-logs`,{type:`boolean`,description:`The collect_logs field`}).option(`guardrails-prompt-p1`,{type:`string`,description:`The guardrails.prompt.P1 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s1`,{type:`string`,description:`The guardrails.prompt.S1 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s10`,{type:`string`,description:`The guardrails.prompt.S10 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s11`,{type:`string`,description:`The guardrails.prompt.S11 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s12`,{type:`string`,description:`The guardrails.prompt.S12 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s13`,{type:`string`,description:`The guardrails.prompt.S13 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s2`,{type:`string`,description:`The guardrails.prompt.S2 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s3`,{type:`string`,description:`The guardrails.prompt.S3 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s4`,{type:`string`,description:`The guardrails.prompt.S4 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s5`,{type:`string`,description:`The guardrails.prompt.S5 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s6`,{type:`string`,description:`The guardrails.prompt.S6 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s7`,{type:`string`,description:`The guardrails.prompt.S7 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s8`,{type:`string`,description:`The guardrails.prompt.S8 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-prompt-s9`,{type:`string`,description:`The guardrails.prompt.S9 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-p1`,{type:`string`,description:`The guardrails.response.P1 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s1`,{type:`string`,description:`The guardrails.response.S1 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s10`,{type:`string`,description:`The guardrails.response.S10 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s11`,{type:`string`,description:`The guardrails.response.S11 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s12`,{type:`string`,description:`The guardrails.response.S12 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s13`,{type:`string`,description:`The guardrails.response.S13 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s2`,{type:`string`,description:`The guardrails.response.S2 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s3`,{type:`string`,description:`The guardrails.response.S3 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s4`,{type:`string`,description:`The guardrails.response.S4 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s5`,{type:`string`,description:`The guardrails.response.S5 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s6`,{type:`string`,description:`The guardrails.response.S6 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s7`,{type:`string`,description:`The guardrails.response.S7 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s8`,{type:`string`,description:`The guardrails.response.S8 field`,choices:[`FLAG`,`BLOCK`]}).option(`guardrails-response-s9`,{type:`string`,description:`The guardrails.response.S9 field`,choices:[`FLAG`,`BLOCK`]}).option(`log-classification`,{type:`boolean`,description:`The log_classification field`}).option(`log-management`,{type:`number`,description:`The log_management field`}).option(`log-management-strategy`,{type:`string`,description:`The log_management_strategy field`,choices:[`STOP_INSERTING`,`DELETE_OLDEST`]}).option(`logpush`,{type:`boolean`,description:`The logpush field`}).option(`logpush-public-key`,{type:`string`,description:`The logpush_public_key field`}).option(`otel`,{type:`string`,description:`The otel field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`rate-limiting-interval`,{type:`number`,description:`The rate_limiting_interval field`}).option(`rate-limiting-limit`,{type:`number`,description:`The rate_limiting_limit field`}).option(`rate-limiting-technique`,{type:`string`,description:`The rate_limiting_technique field`,choices:[`fixed`,`sliding`]}).option(`retry-backoff`,{type:`string`,description:`Backoff strategy for retry delays`,choices:[`constant`,`linear`,`exponential`]}).option(`retry-delay`,{type:`number`,description:`Delay between retry attempts in milliseconds (0-60000)`}).option(`retry-max-attempts`,{type:`number`,description:`Maximum number of retry attempts for failed requests (1-5)`}).option(`spend-limits-enabled`,{type:`boolean`,description:`The spend_limits.enabled field`}).option(`store-id`,{type:`string`,description:`The store_id field`}).option(`stripe-authorization`,{type:`string`,description:`The stripe.authorization field`}).option(`workers-ai-billing-mode`,{type:`string`,description:`Controls how Workers AI inference calls routed through this gateway are billed. 'postpaid' bills the account directly through Workers AI; 'unified' deducts credits via AI Gateway using neuron-based pricing and delegates billing to AI Gateway.`,choices:[`postpaid`,`unified`]}).option(`zdr`,{type:`boolean`,description:`The zdr 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=>{if([`stripe-authorization`].some(t=>e[t]!==void 0)){let t=[`stripe-authorization`].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 --stripe-* flag is set`)}return!0})}const De={command:`update <gateway-id>`,describe:`Update a gateway`,builder:Ee,handler:async m=>c({command:`ai-gateway gateways update`,classification:{safeFlags:`authentication.byok-only.cache-invalidate-on-update.collect-logs.guardrails-prompt-p1.guardrails-prompt-s1.guardrails-prompt-s10.guardrails-prompt-s11.guardrails-prompt-s12.guardrails-prompt-s13.guardrails-prompt-s2.guardrails-prompt-s3.guardrails-prompt-s4.guardrails-prompt-s5.guardrails-prompt-s6.guardrails-prompt-s7.guardrails-prompt-s8.guardrails-prompt-s9.guardrails-response-p1.guardrails-response-s1.guardrails-response-s10.guardrails-response-s11.guardrails-response-s12.guardrails-response-s13.guardrails-response-s2.guardrails-response-s3.guardrails-response-s4.guardrails-response-s5.guardrails-response-s6.guardrails-response-s7.guardrails-response-s8.guardrails-response-s9.log-classification.log-management-strategy.logpush.rate-limiting-technique.retry-backoff.spend-limits-enabled.workers-ai-billing-mode.zdr.dry-run`.split(`.`)}},m,async()=>{if(m.dryRun){o({command:`cf ai-gateway gateways update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${m[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(m[`gateway-id`]))}`,pathParams:{"gateway-id":String(m[`gateway-id`]??``)},bodyKind:`json`,body:m.body===void 0?f({authentication:m.authentication,byok_only:m[`byok-only`],cache_invalidate_on_update:m[`cache-invalidate-on-update`],cache_ttl:m[`cache-ttl`],collect_logs:m[`collect-logs`],guardrails:{prompt:{P1:p(m[`guardrails-prompt-p1`],`guardrails-prompt-p1`,`text`),S1:p(m[`guardrails-prompt-s1`],`guardrails-prompt-s1`,`text`),S10:p(m[`guardrails-prompt-s10`],`guardrails-prompt-s10`,`text`),S11:p(m[`guardrails-prompt-s11`],`guardrails-prompt-s11`,`text`),S12:p(m[`guardrails-prompt-s12`],`guardrails-prompt-s12`,`text`),S13:p(m[`guardrails-prompt-s13`],`guardrails-prompt-s13`,`text`),S2:p(m[`guardrails-prompt-s2`],`guardrails-prompt-s2`,`text`),S3:p(m[`guardrails-prompt-s3`],`guardrails-prompt-s3`,`text`),S4:p(m[`guardrails-prompt-s4`],`guardrails-prompt-s4`,`text`),S5:p(m[`guardrails-prompt-s5`],`guardrails-prompt-s5`,`text`),S6:p(m[`guardrails-prompt-s6`],`guardrails-prompt-s6`,`text`),S7:p(m[`guardrails-prompt-s7`],`guardrails-prompt-s7`,`text`),S8:p(m[`guardrails-prompt-s8`],`guardrails-prompt-s8`,`text`),S9:p(m[`guardrails-prompt-s9`],`guardrails-prompt-s9`,`text`)},response:{P1:p(m[`guardrails-response-p1`],`guardrails-response-p1`,`text`),S1:p(m[`guardrails-response-s1`],`guardrails-response-s1`,`text`),S10:p(m[`guardrails-response-s10`],`guardrails-response-s10`,`text`),S11:p(m[`guardrails-response-s11`],`guardrails-response-s11`,`text`),S12:p(m[`guardrails-response-s12`],`guardrails-response-s12`,`text`),S13:p(m[`guardrails-response-s13`],`guardrails-response-s13`,`text`),S2:p(m[`guardrails-response-s2`],`guardrails-response-s2`,`text`),S3:p(m[`guardrails-response-s3`],`guardrails-response-s3`,`text`),S4:p(m[`guardrails-response-s4`],`guardrails-response-s4`,`text`),S5:p(m[`guardrails-response-s5`],`guardrails-response-s5`,`text`),S6:p(m[`guardrails-response-s6`],`guardrails-response-s6`,`text`),S7:p(m[`guardrails-response-s7`],`guardrails-response-s7`,`text`),S8:p(m[`guardrails-response-s8`],`guardrails-response-s8`,`text`),S9:p(m[`guardrails-response-s9`],`guardrails-response-s9`,`text`)}},log_classification:m[`log-classification`],log_management:m[`log-management`],log_management_strategy:p(m[`log-management-strategy`],`log-management-strategy`,`text`),logpush:m.logpush,logpush_public_key:p(m[`logpush-public-key`],`logpush-public-key`,`text`),otel:d(m.otel,`otel`),rate_limiting_interval:m[`rate-limiting-interval`],rate_limiting_limit:m[`rate-limiting-limit`],rate_limiting_technique:p(m[`rate-limiting-technique`],`rate-limiting-technique`,`text`),retry_backoff:p(m[`retry-backoff`],`retry-backoff`,`text`),retry_delay:m[`retry-delay`],retry_max_attempts:m[`retry-max-attempts`],spend_limits:{enabled:m[`spend-limits-enabled`]},store_id:p(m[`store-id`],`store-id`,`text`),stripe:{authorization:p(m[`stripe-authorization`],`stripe-authorization`,`text`)},workers_ai_billing_mode:p(m[`workers-ai-billing-mode`],`workers-ai-billing-mode`,`text`),zdr:m.zdr}):u(m.body)});return}let c=await i(m),h=m.local?e:await n();if(m.accountId=h,m.body){let e=u(m.body);a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${h}/ai-gateway/gateways/${encodeURIComponent(String(m[`gateway-id`]))}`,{body:e})),{successLabel:`Updated`});return}if(m[`cache-invalidate-on-update`]===void 0)throw Error(`--cache-invalidate-on-update is required (or pass --body with this field set).`);if(m[`cache-ttl`]===void 0)throw Error(`--cache-ttl is required (or pass --body with this field set).`);if(m[`collect-logs`]===void 0)throw Error(`--collect-logs is required (or pass --body with this field set).`);if(m[`rate-limiting-interval`]===void 0)throw Error(`--rate-limiting-interval is required (or pass --body with this field set).`);if(m[`rate-limiting-limit`]===void 0)throw Error(`--rate-limiting-limit is required (or pass --body with this field set).`);let g={};m.authentication!==void 0&&l(g,[`authentication`],m.authentication),m[`byok-only`]!==void 0&&l(g,[`byok_only`],m[`byok-only`]),m[`cache-invalidate-on-update`]!==void 0&&l(g,[`cache_invalidate_on_update`],m[`cache-invalidate-on-update`]),m[`cache-ttl`]!==void 0&&l(g,[`cache_ttl`],m[`cache-ttl`]),m[`collect-logs`]!==void 0&&l(g,[`collect_logs`],m[`collect-logs`]),m[`guardrails-prompt-p1`]!==void 0&&l(g,[`guardrails`,`prompt`,`P1`],p(m[`guardrails-prompt-p1`],`guardrails-prompt-p1`,`text`)),m[`guardrails-prompt-s1`]!==void 0&&l(g,[`guardrails`,`prompt`,`S1`],p(m[`guardrails-prompt-s1`],`guardrails-prompt-s1`,`text`)),m[`guardrails-prompt-s10`]!==void 0&&l(g,[`guardrails`,`prompt`,`S10`],p(m[`guardrails-prompt-s10`],`guardrails-prompt-s10`,`text`)),m[`guardrails-prompt-s11`]!==void 0&&l(g,[`guardrails`,`prompt`,`S11`],p(m[`guardrails-prompt-s11`],`guardrails-prompt-s11`,`text`)),m[`guardrails-prompt-s12`]!==void 0&&l(g,[`guardrails`,`prompt`,`S12`],p(m[`guardrails-prompt-s12`],`guardrails-prompt-s12`,`text`)),m[`guardrails-prompt-s13`]!==void 0&&l(g,[`guardrails`,`prompt`,`S13`],p(m[`guardrails-prompt-s13`],`guardrails-prompt-s13`,`text`)),m[`guardrails-prompt-s2`]!==void 0&&l(g,[`guardrails`,`prompt`,`S2`],p(m[`guardrails-prompt-s2`],`guardrails-prompt-s2`,`text`)),m[`guardrails-prompt-s3`]!==void 0&&l(g,[`guardrails`,`prompt`,`S3`],p(m[`guardrails-prompt-s3`],`guardrails-prompt-s3`,`text`)),m[`guardrails-prompt-s4`]!==void 0&&l(g,[`guardrails`,`prompt`,`S4`],p(m[`guardrails-prompt-s4`],`guardrails-prompt-s4`,`text`)),m[`guardrails-prompt-s5`]!==void 0&&l(g,[`guardrails`,`prompt`,`S5`],p(m[`guardrails-prompt-s5`],`guardrails-prompt-s5`,`text`)),m[`guardrails-prompt-s6`]!==void 0&&l(g,[`guardrails`,`prompt`,`S6`],p(m[`guardrails-prompt-s6`],`guardrails-prompt-s6`,`text`)),m[`guardrails-prompt-s7`]!==void 0&&l(g,[`guardrails`,`prompt`,`S7`],p(m[`guardrails-prompt-s7`],`guardrails-prompt-s7`,`text`)),m[`guardrails-prompt-s8`]!==void 0&&l(g,[`guardrails`,`prompt`,`S8`],p(m[`guardrails-prompt-s8`],`guardrails-prompt-s8`,`text`)),m[`guardrails-prompt-s9`]!==void 0&&l(g,[`guardrails`,`prompt`,`S9`],p(m[`guardrails-prompt-s9`],`guardrails-prompt-s9`,`text`)),m[`guardrails-response-p1`]!==void 0&&l(g,[`guardrails`,`response`,`P1`],p(m[`guardrails-response-p1`],`guardrails-response-p1`,`text`)),m[`guardrails-response-s1`]!==void 0&&l(g,[`guardrails`,`response`,`S1`],p(m[`guardrails-response-s1`],`guardrails-response-s1`,`text`)),m[`guardrails-response-s10`]!==void 0&&l(g,[`guardrails`,`response`,`S10`],p(m[`guardrails-response-s10`],`guardrails-response-s10`,`text`)),m[`guardrails-response-s11`]!==void 0&&l(g,[`guardrails`,`response`,`S11`],p(m[`guardrails-response-s11`],`guardrails-response-s11`,`text`)),m[`guardrails-response-s12`]!==void 0&&l(g,[`guardrails`,`response`,`S12`],p(m[`guardrails-response-s12`],`guardrails-response-s12`,`text`)),m[`guardrails-response-s13`]!==void 0&&l(g,[`guardrails`,`response`,`S13`],p(m[`guardrails-response-s13`],`guardrails-response-s13`,`text`)),m[`guardrails-response-s2`]!==void 0&&l(g,[`guardrails`,`response`,`S2`],p(m[`guardrails-response-s2`],`guardrails-response-s2`,`text`)),m[`guardrails-response-s3`]!==void 0&&l(g,[`guardrails`,`response`,`S3`],p(m[`guardrails-response-s3`],`guardrails-response-s3`,`text`)),m[`guardrails-response-s4`]!==void 0&&l(g,[`guardrails`,`response`,`S4`],p(m[`guardrails-response-s4`],`guardrails-response-s4`,`text`)),m[`guardrails-response-s5`]!==void 0&&l(g,[`guardrails`,`response`,`S5`],p(m[`guardrails-response-s5`],`guardrails-response-s5`,`text`)),m[`guardrails-response-s6`]!==void 0&&l(g,[`guardrails`,`response`,`S6`],p(m[`guardrails-response-s6`],`guardrails-response-s6`,`text`)),m[`guardrails-response-s7`]!==void 0&&l(g,[`guardrails`,`response`,`S7`],p(m[`guardrails-response-s7`],`guardrails-response-s7`,`text`)),m[`guardrails-response-s8`]!==void 0&&l(g,[`guardrails`,`response`,`S8`],p(m[`guardrails-response-s8`],`guardrails-response-s8`,`text`)),m[`guardrails-response-s9`]!==void 0&&l(g,[`guardrails`,`response`,`S9`],p(m[`guardrails-response-s9`],`guardrails-response-s9`,`text`)),m[`log-classification`]!==void 0&&l(g,[`log_classification`],m[`log-classification`]),m[`log-management`]!==void 0&&l(g,[`log_management`],m[`log-management`]),m[`log-management-strategy`]!==void 0&&l(g,[`log_management_strategy`],p(m[`log-management-strategy`],`log-management-strategy`,`text`)),m.logpush!==void 0&&l(g,[`logpush`],m.logpush),m[`logpush-public-key`]!==void 0&&l(g,[`logpush_public_key`],p(m[`logpush-public-key`],`logpush-public-key`,`text`)),m.otel!==void 0&&l(g,[`otel`],d(m.otel,`otel`)),m[`rate-limiting-interval`]!==void 0&&l(g,[`rate_limiting_interval`],m[`rate-limiting-interval`]),m[`rate-limiting-limit`]!==void 0&&l(g,[`rate_limiting_limit`],m[`rate-limiting-limit`]),m[`rate-limiting-technique`]!==void 0&&l(g,[`rate_limiting_technique`],p(m[`rate-limiting-technique`],`rate-limiting-technique`,`text`)),m[`retry-backoff`]!==void 0&&l(g,[`retry_backoff`],p(m[`retry-backoff`],`retry-backoff`,`text`)),m[`retry-delay`]!==void 0&&l(g,[`retry_delay`],m[`retry-delay`]),m[`retry-max-attempts`]!==void 0&&l(g,[`retry_max_attempts`],m[`retry-max-attempts`]),m[`spend-limits-enabled`]!==void 0&&l(g,[`spend_limits`,`enabled`],m[`spend-limits-enabled`]),m[`store-id`]!==void 0&&l(g,[`store_id`],p(m[`store-id`],`store-id`,`text`)),m[`stripe-authorization`]!==void 0&&l(g,[`stripe`,`authorization`],p(m[`stripe-authorization`],`stripe-authorization`,`text`)),m[`workers-ai-billing-mode`]!==void 0&&l(g,[`workers_ai_billing_mode`],p(m[`workers-ai-billing-mode`],`workers-ai-billing-mode`,`text`)),m.zdr!==void 0&&l(g,[`zdr`],m.zdr),a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${h}/ai-gateway/gateways/${encodeURIComponent(String(m[`gateway-id`]))}`,{body:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`})})},Oe={command:`gateways`,describe:`Create and configure AI Gateways for an account`,builder:e=>e.command(ce).command(ue).command(me).command(fe).command(ge).command(De).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.usage(`$0 ai-gateway logs delete <gateway-id>
66
+
67
+ Deletes gateway log entries matching the specified criteria.`).positional(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`order-by`,{type:`string`,description:`Order by`,choices:[`created_at`,`provider`,`model`,`model_type`,`success`,`cached`,`cost`,`tokens_in`,`tokens_out`,`duration`,`feedback`]}).option(`order-by-direction`,{type:`string`,description:`Order by direction`,choices:[`asc`,`desc`]}).option(`filters`,{type:`string`,description:`Filters`}).option(`limit`,{type:`number`,description:`Limit`}).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 Ae={command:`delete <gateway-id>`,describe:`Delete Gateway Logs`,builder:g(ke),handler:async r=>c({command:`ai-gateway logs delete`,classification:{safeFlags:[`order-by`,`order-by-direction`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{let c={order_by:r[`order-by`],order_by_direction:r[`order-by-direction`],filters:r.filters,limit:r.limit};if(r.dryRun){o({command:`cf ai-gateway logs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();if(r.accountId=u,!await h({force:!!r.force,message:`This permanently deletes every stored log entry on the gateway that matches the filters. Deleted logs cannot be recovered.`})){process.stderr.write(`Aborted.
68
+ `);return}a(await s(`Deleting`,async()=>l.aiGateway.logs.delete({account_id:u,gateway_id:r[`gateway-id`],...c})),{successLabel:`Deleted`})})};function je(e){return e.usage(`$0 ai-gateway logs get-request <id>
69
+
70
+ Retrieves the original request payload for an AI Gateway log entry.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`get-request <id>`,describe:`Get Gateway Log Request`,builder:je,handler:async r=>c({command:`ai-gateway logs get-request`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway logs get-request`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/request`,pathParams:{id:String(r.id??``),"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.logs.getRequest({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})};function Ne(e){return e.usage(`$0 ai-gateway logs get-response <id>
71
+
72
+ Retrieves the response payload for an AI Gateway log entry.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`get-response <id>`,describe:`Get Gateway Log Response`,builder:Ne,handler:async r=>c({command:`ai-gateway logs get-response`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway logs get-response`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/response`,pathParams:{id:String(r.id??``),"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.logs.getResponse({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 ai-gateway logs get <id>
73
+
74
+ Retrieves detailed information for a specific AI Gateway log entry.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get <id>`,describe:`Get Gateway Log Detail`,builder:$,handler:async r=>c({command:`ai-gateway logs get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway logs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``),"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await n();r.accountId=l,a(await s(`Loading`,async()=>c.aiGateway.logs.get({account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Loaded`})})};function Ie(e){return e.usage(`$0 ai-gateway logs list
75
+
76
+ Lists request/response log entries for the AI gateway with filtering and pagination.`).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`search`,{type:`string`,description:`Free-text search over log metadata.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`order-by`,{type:`string`,description:`Order by`,choices:[`created_at`,`provider`,`model`,`model_type`,`success`,`cached`]}).option(`order-by-direction`,{type:`string`,description:`Order by direction`,choices:[`asc`,`desc`]}).option(`filters`,{type:`string`,description:`Filters`}).option(`meta-info`,{type:`boolean`,description:`Meta info`}).option(`direction`,{type:`string`,description:`Direction`,choices:[`asc`,`desc`]}).option(`start-date`,{type:`string`,description:`Start date`}).option(`end-date`,{type:`string`,description:`End date`}).option(`min-cost`,{type:`number`,description:`Min cost`}).option(`max-cost`,{type:`number`,description:`Max cost`}).option(`min-tokens-in`,{type:`number`,description:`Min tokens in`}).option(`max-tokens-in`,{type:`number`,description:`Max tokens in`}).option(`min-tokens-out`,{type:`number`,description:`Min tokens out`}).option(`max-tokens-out`,{type:`number`,description:`Max tokens out`}).option(`min-total-tokens`,{type:`number`,description:`Min total tokens`}).option(`max-total-tokens`,{type:`number`,description:`Max total tokens`}).option(`min-duration`,{type:`number`,description:`Min duration`}).option(`max-duration`,{type:`number`,description:`Max duration`}).option(`feedback`,{type:`string`,description:`Feedback`,choices:[`-1`]}).option(`success`,{type:`boolean`,description:`Success`}).option(`cached`,{type:`boolean`,description:`Cached`}).option(`model`,{type:`string`,description:`Model filter.`}).option(`model-type`,{type:`string`,description:`Model type`}).option(`provider`,{type:`string`,description:`Provider`}).option(`request-content-type`,{type:`string`,description:`Request content type`}).option(`response-content-type`,{type:`string`,description:`Response content type`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`list`,describe:`List Gateway Logs`,builder:g(Ie),handler:async r=>c({command:`ai-gateway logs list`,classification:{safeFlags:[`order-by`,`order-by-direction`,`meta-info`,`direction`,`feedback`,`success`,`cached`,`dry-run`]}},r,async()=>{let c={search:r.search,page:r.page,per_page:r[`per-page`],order_by:r[`order-by`],order_by_direction:r[`order-by-direction`],filters:r.filters,meta_info:r[`meta-info`],direction:r.direction,start_date:r[`start-date`],end_date:r[`end-date`],min_cost:r[`min-cost`],max_cost:r[`max-cost`],min_tokens_in:r[`min-tokens-in`],max_tokens_in:r[`max-tokens-in`],min_tokens_out:r[`min-tokens-out`],max_tokens_out:r[`max-tokens-out`],min_total_tokens:r[`min-total-tokens`],max_total_tokens:r[`max-total-tokens`],min_duration:r[`min-duration`],max_duration:r[`max-duration`],feedback:r.feedback,success:r.success,cached:r.cached,model:r.model,model_type:r[`model-type`],provider:r.provider,request_content_type:r[`request-content-type`],response_content_type:r[`response-content-type`]};if(r.dryRun){o({command:`cf ai-gateway logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs`,pathParams:{"gateway-id":String(r[`gateway-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await n();r.accountId=u,a(await s(`Loading`,async()=>l.aiGateway.logs.list({account_id:u,gateway_id:r[`gateway-id`],...c})),{successLabel:`Loaded`})})};function Re(e){return e.usage(`$0 ai-gateway logs update <id>
77
+
78
+ Updates metadata for an AI Gateway log entry.`).positional(`id`,{type:`string`,description:`ID`,demandOption:!0}).option(`gateway-id`,{type:`string`,description:`Unique identifier of the AI Gateway within the account.`,demandOption:!0}).option(`feedback`,{type:`number`,description:`The feedback field`}).option(`score`,{type:`number`,description:`The score 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 ze={command:`update <id>`,describe:`Patch Gateway Log`,builder:Re,handler:async r=>c({command:`ai-gateway logs update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway logs update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-gateway/gateways/${r[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(r[`gateway-id`]))}/logs/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}`,pathParams:{id:String(r.id??``),"gateway-id":String(r[`gateway-id`]??``)},bodyKind:`json`,body:r.body===void 0?f({feedback:r.feedback,score:r.score}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Updating`,async()=>c.aiGateway.logs.update({...e,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`});return}let d=f({feedback:r.feedback,score:r.score});a(await s(`Updating`,async()=>c.aiGateway.logs.update({...d,account_id:l,gateway_id:r[`gateway-id`],id:r.id})),{successLabel:`Updated`})})},Be={command:`logs`,describe:`Inspect, annotate, and delete gateway request logs stored by Legacy Logs`,builder:e=>e.command(Ae).command(Fe).command(Me).command(Pe).command(Le).command(ze).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ve(e){return e.usage(`$0 ai-gateway web-search
79
+
80
+ Run a web search through a configured AI Gateway.`).option(`byok-alias`,{type:`string`,description:`The byokAlias field`}).option(`limit`,{type:`number`,description:`The limit field`}).option(`options-gateway-id`,{type:`string`,description:`The options.gateway.id field`}).option(`provider`,{type:`string`,description:`The provider field`}).option(`query`,{type:`string`,description:`The query 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 He={command:`web-search`,describe:`Search the web through AI Gateway`,builder:Ve,handler:async r=>c({command:`ai-gateway web-search`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-gateway web-search`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai/websearch`,pathParams:{},bodyKind:`json`,body:r.body===void 0?f({byokAlias:p(r[`byok-alias`],`byok-alias`,`text`),limit:r.limit,options:{gateway:{id:p(r[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:p(r.provider,`provider`,`text`),query:p(r.query,`query`,`text`)}):u(r.body)});return}let c=await i(r),l=r.local?e:await n();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.aiGateway.webSearch({...e,account_id:l})),{successLabel:`Created`});return}r[`options-gateway-id`]===void 0&&(r[`options-gateway-id`]=await m(`options-gateway-id`,`The options.gateway.id field`)),r.query===void 0&&(r.query=await m(`query`,`The query field`));let d=f({byokAlias:p(r[`byok-alias`],`byok-alias`,`text`),limit:r.limit,options:{gateway:{id:p(r[`options-gateway-id`],`options-gateway-id`,`text`)}},provider:p(r.provider,`provider`,`text`),query:p(r.query,`query`,`text`)});a(await s(`Creating`,async()=>c.aiGateway.webSearch({...d,account_id:l})),{successLabel:`Created`})})},Ue={command:`ai-gateway`,describe:`Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more`,builder:e=>e.command(He).command(C).command(P).command(oe).command(Oe).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ue as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-OKXweFsd.mjs";import{a as r,t as i}from"./context-Dzzbc9RK.mjs";import{a,o,r as s}from"./auth-B5p3SIhO.mjs";import{t as c}from"./output-CZt-berV.mjs";import{t as l}from"./dry-run-BmzTxDtZ.mjs";import{t as u}from"./progress-C9dWgc3J.mjs";import{n as d,t as f}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as p,t as m}from"./body-parser-BpPZBRMr.mjs";import{n as h,t as g}from"./input-validation-D3e278L_.mjs";import{a as _,i as v,n as y}from"./prompt-Mh69ni1N.mjs";import{t as b}from"./cli-types-B6tm-8uL.mjs";import{n as x}from"./raw-fetch-1ygCOcT_.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-BmY0Nzp0.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await r()??`<account-id>`:await i(),d=n.split(`/`).map(encodeURIComponent).join(`/`),f;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);f=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
2
+ import{r as e}from"./theme-BIWQFmZ0.mjs";import{n as t,t as n}from"./local-CxYne8s2.mjs";import{a as r,t as i}from"./context-5JRcefHh.mjs";import{a,o,r as s}from"./auth-3bFlHTVl.mjs";import{t as c}from"./output-CvQFJkvi.mjs";import{t as l}from"./dry-run-Bq0JAsbX.mjs";import{t as u}from"./progress-DUeNqM-j.mjs";import{n as d,t as f}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as p,t as m}from"./body-parser-hh2avzkz.mjs";import{n as h,t as g}from"./input-validation-Dk52b0me.mjs";import{a as _,i as v,n as y}from"./prompt-DV6YTdoa.mjs";import{t as b}from"./cli-types-DoVT5q_M.mjs";import{n as x}from"./raw-fetch-Cp3EaTcj.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-yDMur8UR.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await r()??`<account-id>`:await i(),d=n.split(`/`).map(encodeURIComponent).join(`/`),f;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);f=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
3
3
  `)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);let a=new Set;for(;;){let t=D(r,e).find(e=>!a.has(e.name)&&(e.choices!==void 0||e.type===`string`));if(!t)break;a.add(t.name),t.choices?e[t.name]=await v(t.name,P(t),t.choices,t.choiceLabels):e[t.name]=await _(t.name,P(t))}let c=N(t.schema),l=F(r,e,{reserved:z}),u=l.errors.length===0?c?w(t.schema,l.body):T(t.schema,l.body):l.errors;if(u.length>0)throw Error(`${u.join(`
4
4
  `)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);f=l.body}if(e.dryRun){l({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${o}/ai/run/${d}`,pathParams:{"model-name":n},bodyKind:`json`,body:f});return}let m=await s(e);e.accountId=o;let h=await u(`Running`,async()=>a(m,`POST`,`/accounts/${o}/ai/run/${d}`,{body:f,preserveNonJsonBytes:!0}));if(Buffer.isBuffer(h)){x(h);return}c(h,{successLabel:`Ran`})}},{command:`ai run`,recordArgs:!1});function W(e){return e.usage(`$0 ai authors list
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,r as u,t as d}from"./body-parser-BpPZBRMr.mjs";import{n as f,t as p}from"./input-validation-D3e278L_.mjs";import{a as m,i as h,n as g}from"./prompt-Mh69ni1N.mjs";import{t as _}from"./cli-types-B6tm-8uL.mjs";import{n as ee,t as te}from"./raw-fetch-1ygCOcT_.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,r as u,t as d}from"./body-parser-hh2avzkz.mjs";import{n as f,t as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DV6YTdoa.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";import{n as ee,t as te}from"./raw-fetch-Cp3EaTcj.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
3
3
 
4
4
  Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`name`,{type:`string`,description:`Namespace to use for this operation.`,demandOption:!0}).option(`ai-search-options-cache-cache-threshold`,{type:`string`,description:`The ai_search_options.cache.cache_threshold field`,choices:[`super_strict_match`,`close_enough`,`flexible_friend`,`anything_goes`]}).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-query-rewrite-enabled`,{type:`boolean`,description:`The ai_search_options.query_rewrite.enabled field`}).option(`ai-search-options-query-rewrite-model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`ai-search-options-query-rewrite-rewrite-prompt`,{type:`string`,description:`The ai_search_options.query_rewrite.rewrite_prompt field`}).option(`ai-search-options-reranking-enabled`,{type:`boolean`,description:`The ai_search_options.reranking.enabled field`}).option(`ai-search-options-reranking-match-threshold`,{type:`number`,description:`The ai_search_options.reranking.match_threshold field`}).option(`ai-search-options-reranking-model`,{type:`string`,description:`The ai_search_options.reranking.model field`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`The ai_search_options.retrieval.match_threshold field`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`The ai_search_options.retrieval.max_num_results field`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).option(`ai-search-options-retrieval-return-on-failure`,{type:`boolean`,description:`The ai_search_options.retrieval.return_on_failure field`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`stream`,{type:`boolean`,description:`The stream 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 y={command:`chat-completions <id>`,describe:`Chat Completions`,builder:v,handler:async r=>c({command:`ai-search chat-completions`,classification:{safeFlags:[`ai-search-options-cache-cache-threshold`,`ai-search-options-cache-enabled`,`ai-search-options-query-rewrite-enabled`,`ai-search-options-reranking-enabled`,`ai-search-options-retrieval-fusion-method`,`ai-search-options-retrieval-keyword-match-mode`,`ai-search-options-retrieval-retrieval-type`,`ai-search-options-retrieval-return-on-failure`,`stream`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/ai-search/namespaces/${r.name==null?`<name>`:encodeURIComponent(String(r.name))}/instances/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/chat/completions`,pathParams:{id:String(r.id??``),name:String(r.name??``)},bodyKind:`json`,body:r.body===void 0?d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream}):l(r.body)});return}let c=await i(r),p=r.local?e:await n();if(r.accountId=p,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...e,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`});return}if(r.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let m=d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream});a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...m,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 ai-search create <name> <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,r as s,t as c}from"./body-parser-BpPZBRMr.mjs";import{n as l}from"./prompt-Mh69ni1N.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
2
+ import{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as o,r as s,t as c}from"./body-parser-hh2avzkz.mjs";import{n as l}from"./prompt-DV6YTdoa.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
3
3
 
4
4
  Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:u,handler:async o=>a({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.aiSecurity.customTopics.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 printable ASCII characters. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. 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(`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 p={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:f,handler:async u=>a({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({topics:s(u.topics,`topics`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,!await l({force:!!u.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`})){process.stderr.write(`Aborted.
5
5
  `);return}if(u.body){let e=o(u.body);n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:e,zone_id:d})),{successLabel:`Deleted`});return}let f=c({topics:s(u.topics,`topics`)});n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:f,zone_id:d})),{successLabel:`Deleted`})})},m={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 ai-security get
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{r}from"./auth-B5p3SIhO.mjs";import{t as i}from"./output-CZt-berV.mjs";import{t as a}from"./dry-run-BmzTxDtZ.mjs";import{t as o}from"./progress-C9dWgc3J.mjs";import{t as s}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as c,t as l}from"./body-parser-BpPZBRMr.mjs";import{n as u}from"./input-validation-D3e278L_.mjs";import{a as d,i as f,n as p}from"./prompt-Mh69ni1N.mjs";import{n as m,t as h}from"./raw-fetch-1ygCOcT_.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{r}from"./auth-3bFlHTVl.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-DUeNqM-j.mjs";import{t as s}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as c,t as l}from"./body-parser-hh2avzkz.mjs";import{n as u}from"./input-validation-Dk52b0me.mjs";import{a as d,i as f,n as p}from"./prompt-DV6YTdoa.mjs";import{n as m,t as h}from"./raw-fetch-Cp3EaTcj.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
3
3
 
4
4
  Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await n();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-BpPZBRMr.mjs";import{n as m,t as h}from"./input-validation-D3e278L_.mjs";import{a as g}from"./prompt-Mh69ni1N.mjs";function _(e){return e.usage(`$0 analytics latency colos get
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-hh2avzkz.mjs";import{n as m,t as h}from"./input-validation-Dk52b0me.mjs";import{a as g}from"./prompt-DV6YTdoa.mjs";function _(e){return e.usage(`$0 analytics latency colos get
3
3
 
4
4
  Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
5
5
 
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,t as n}from"./context-Dzzbc9RK.mjs";import{a as r,r as i}from"./auth-B5p3SIhO.mjs";import{t as a}from"./output-CZt-berV.mjs";import{t as o}from"./dry-run-BmzTxDtZ.mjs";import{t as s}from"./progress-C9dWgc3J.mjs";import{t as c}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as l,t as u}from"./input-validation-D3e278L_.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,t as n}from"./context-5JRcefHh.mjs";import{a as r,r as i}from"./auth-3bFlHTVl.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-DUeNqM-j.mjs";import{t as c}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
3
3
 
4
4
  Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await n();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./local-OKXweFsd.mjs";import{a as t,i as n,t as r}from"./context-Dzzbc9RK.mjs";import{a as i,r as a}from"./auth-B5p3SIhO.mjs";import{t as o}from"./output-CZt-berV.mjs";import{t as s}from"./dry-run-BmzTxDtZ.mjs";import{t as c}from"./progress-C9dWgc3J.mjs";import{t as l}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as u,r as d,t as f}from"./body-parser-BpPZBRMr.mjs";import{n as p}from"./input-validation-D3e278L_.mjs";import{a as m,i as h,n as g}from"./prompt-Mh69ni1N.mjs";import{t as _}from"./cli-types-B6tm-8uL.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
2
+ import{t as e}from"./local-CxYne8s2.mjs";import{a as t,i as n,t as r}from"./context-5JRcefHh.mjs";import{a as i,r as a}from"./auth-3bFlHTVl.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-DUeNqM-j.mjs";import{t as l}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p}from"./input-validation-Dk52b0me.mjs";import{a as m,i as h,n as g}from"./prompt-DV6YTdoa.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
3
3
 
4
4
  Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).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:`Upload a schema`,builder:ee,handler:async e=>l({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):u(e.body)});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=u(e.body);o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...n,zone_id:r})),{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await h(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await m(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await m(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let i=f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]});o(await c(`Creating`,async()=>t.apiSecurity.schemaValidation.schemas.create({...i,zone_id:r})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e}from"./context-Dzzbc9RK.mjs";import{r as t}from"./auth-B5p3SIhO.mjs";import{t as n}from"./output-CZt-berV.mjs";import{t as r}from"./dry-run-BmzTxDtZ.mjs";import{t as i}from"./progress-C9dWgc3J.mjs";import{t as a}from"./run-DK1d9BJz.mjs";import"./telemetry-C0k8vfbq.mjs";import{n as o,t as s}from"./body-parser-BpPZBRMr.mjs";import{n as c}from"./input-validation-D3e278L_.mjs";import{i as l}from"./prompt-Mh69ni1N.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
2
+ import{i as e}from"./context-5JRcefHh.mjs";import{r as t}from"./auth-3bFlHTVl.mjs";import{t as n}from"./output-CvQFJkvi.mjs";import{t as r}from"./dry-run-Bq0JAsbX.mjs";import{t as i}from"./progress-DUeNqM-j.mjs";import{t as a}from"./run-BhfDNWCI.mjs";import"./telemetry-iBZ-f6og.mjs";import{n as o,t as s}from"./body-parser-hh2avzkz.mjs";import{n as c}from"./input-validation-Dk52b0me.mjs";import{i as l}from"./prompt-DV6YTdoa.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
3
3
 
4
4
  Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const d={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:u,handler:async u=>a({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...f,zone_id:d})),{successLabel:`Updated`})})};function f(e){return e.usage(`$0 argo smart-routing get
5
5