cf 1.0.0-beta.29 → 1.0.0-beta.30

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 (237) hide show
  1. package/dist/_meta/commands.json +584 -96
  2. package/dist/_meta/hand-written-commands.json +7 -1
  3. package/dist/_meta/schemas.json +182 -48
  4. package/dist/{abuse-reports-DqXYX_6F.mjs → abuse-reports-Dzop8iDe.mjs} +1 -1
  5. package/dist/{access-Cte4yyIz.mjs → access-2NeD3Gu8.mjs} +1 -1
  6. package/dist/{accounts-G-x-_cEx.mjs → accounts-CeJbhhX4.mjs} +1 -1
  7. package/dist/{acm-Bg3HqMGG.mjs → acm-Dub0B14J.mjs} +1 -1
  8. package/dist/{addressing-BwEofGEm.mjs → addressing-BzWJU8m6.mjs} +1 -1
  9. package/dist/{agent-memory-DhwZ2KRw.mjs → agent-memory-2l9zyQFA.mjs} +1 -1
  10. package/dist/{ai-audit-CMEBz6ZP.mjs → ai-audit-rgNePq5W.mjs} +1 -1
  11. package/dist/{ai-gateway-D2s0isU-.mjs → ai-gateway-e9b8CcL6.mjs} +2 -2
  12. package/dist/{ai-DWWRIQIt.mjs → ai-laLv3daG.mjs} +1 -1
  13. package/dist/{ai-search-a0uqr9yJ.mjs → ai-search-DZ0AqoPe.mjs} +1 -1
  14. package/dist/{ai-security-H_RqjRoL.mjs → ai-security-CQuBTtmw.mjs} +1 -1
  15. package/dist/{alerting-Bgp9rE4I.mjs → alerting-_4ra-f_v.mjs} +1 -1
  16. package/dist/{analytics-CFYM82FD.mjs → analytics-DLNn4bJ4.mjs} +1 -1
  17. package/dist/{analytics-engine-BLiEaLxb.mjs → analytics-engine-CY45yWuL.mjs} +1 -1
  18. package/dist/{api-security-B0YtHglt.mjs → api-security-BSvJAjJV.mjs} +1 -1
  19. package/dist/{argo-BPwbzHY7.mjs → argo-xzl0p--1.mjs} +1 -1
  20. package/dist/{artifacts-B6UwC2PH.mjs → artifacts-DAS14gcM.mjs} +1 -1
  21. package/dist/{audit-logs-kG97iEnI.mjs → audit-logs-3nYyCGQA.mjs} +1 -1
  22. package/dist/auth-B0mFB6nU.mjs +3 -0
  23. package/dist/auth-CXR2vsII.mjs +2 -0
  24. package/dist/{auth-DA1PHaHi.mjs → auth-cj71dGxS.mjs} +1 -1
  25. package/dist/{auth-token-CE3Wa5-b.mjs → auth-token-D9MnaZ-L.mjs} +1 -1
  26. package/dist/{autoconfig-B4tFR6ua.mjs → autoconfig-DoLQ5ct8.mjs} +1 -1
  27. package/dist/{basin-catalog-DzVEPupy.mjs → basin-catalog-BbCsAKyZ.mjs} +1 -1
  28. package/dist/{billing-TERxOuLR.mjs → billing-BsiLsjWJ.mjs} +1 -1
  29. package/dist/{blocks-C3Im7AT0.mjs → blocks-DK5qAzLe.mjs} +1 -1
  30. package/dist/{body-unions-D9OSaf4M.mjs → body-unions-QFGGUlIr.mjs} +1 -1
  31. package/dist/{bot-management-SZw9jTOC.mjs → bot-management-DkErOsIO.mjs} +1 -1
  32. package/dist/{botnet-feed-DjdAeUtb.mjs → botnet-feed-CK4_PKrf.mjs} +1 -1
  33. package/dist/{brand-protection-BpA7Gmf1.mjs → brand-protection-Czt-2Ei5.mjs} +1 -1
  34. package/dist/{browser-run-BvjfMK3f.mjs → browser-run-DLMdEaSJ.mjs} +20 -20
  35. package/dist/build-ByjJ6yIB.mjs +2 -0
  36. package/dist/{build-yQOzZg6Z.mjs → build-DiEXOgHH.mjs} +1 -1
  37. package/dist/{builds-tMa3sbQU.mjs → builds-D--zUbR2.mjs} +1 -1
  38. package/dist/{cache-b_EPh6Is.mjs → cache-C8PQmkjD.mjs} +1 -1
  39. package/dist/{cf-DmvZ2L51.mjs → cf-QIG83e0V.mjs} +6 -6
  40. package/dist/{chunk-DSGVRFIS-Cj7pO-YQ.mjs → chunk-DSGVRFIS-CeCM3XGQ.mjs} +1 -1
  41. package/dist/{chunk-Q5KVZMHK-WOCEMyET.mjs → chunk-Q5KVZMHK-Bjvrcihk.mjs} +2 -2
  42. package/dist/{cli-Cc7ujzAy.mjs → cli-BBv5YMan.mjs} +1 -1
  43. package/dist/{client-side-security-DVkeCzcC.mjs → client-side-security-CFxePUL9.mjs} +1 -1
  44. package/dist/{cloud-connector-MVf4acRR.mjs → cloud-connector-BitfLQ3s.mjs} +1 -1
  45. package/dist/{cloudflared-BOkMl8Gm.mjs → cloudflared-DKh4JK7j.mjs} +1 -1
  46. package/dist/{cloudforce-one-KrCfQbRx.mjs → cloudforce-one-D2dzA7VD.mjs} +1 -1
  47. package/dist/{command-C4_lMRkw.mjs → command-B6ustzcW.mjs} +1 -1
  48. package/dist/{command-DqOU7Ql2.mjs → command-BC_nezLE.mjs} +1 -1
  49. package/dist/{command-CJ3ldWrA.mjs → command-BORazCDG.mjs} +1 -1
  50. package/dist/{command-DONwHpqZ.mjs → command-BwcAuPBr.mjs} +1 -1
  51. package/dist/{command-HW7k43qu.mjs → command-C2HYwGn_.mjs} +1 -1
  52. package/dist/{command-NqM0lo4a.mjs → command-CQhD3Q1t.mjs} +1 -1
  53. package/dist/{command-DHODgfFZ.mjs → command-D5FrTb2N.mjs} +1 -1
  54. package/dist/{command-D2XkyO1e.mjs → command-DoXuskBZ.mjs} +1 -1
  55. package/dist/{command-bwVDyMv4.mjs → command-Xqidhyr_.mjs} +1 -1
  56. package/dist/{command-BQbZw4Kx.mjs → command-aeKPI1bt.mjs} +1 -1
  57. package/dist/{command-yzqs4m83.mjs → command-b1KxgQwf.mjs} +1 -1
  58. package/dist/{command-DdYnSf-8.mjs → command-iwrZ2Sb1.mjs} +1 -1
  59. package/dist/{command-DIIaZx_f.mjs → command-n7QausoH.mjs} +1 -1
  60. package/dist/{command-BVct0Dvr.mjs → command-s15KaL-x.mjs} +1 -1
  61. package/dist/{command-CyOdBNur.mjs → command-ycXauMSv.mjs} +1 -1
  62. package/dist/{completions-0YKvIyBT.mjs → completions-BAUSggys.mjs} +1 -1
  63. package/dist/{connector-interrupts-CsunbRsr.mjs → connector-interrupts-D9tI84Fk.mjs} +1 -1
  64. package/dist/{connector-telemetry-events-DmQPD7xC.mjs → connector-telemetry-events-Bs9wLYwc.mjs} +1 -1
  65. package/dist/{connector-telemetry-snapshots-C62iHjC9.mjs → connector-telemetry-snapshots-CbwE4lrE.mjs} +1 -1
  66. package/dist/{connectors-Bg0MU6ZT.mjs → connectors-LyJN1htu.mjs} +1 -1
  67. package/dist/{containers-BiA_bpPR.mjs → containers-CKs7ZyZq.mjs} +2 -2
  68. package/dist/{content-scan-4SA2nacB.mjs → content-scan-BQRz7C7Z.mjs} +1 -1
  69. package/dist/{context-BGm5_wTT.mjs → context-DlFhI9cN.mjs} +1 -1
  70. package/dist/{cps-WDmD3V5I.mjs → cps-DYlXx89C.mjs} +1 -1
  71. package/dist/{csam-scanner-Rmy-hBEA.mjs → csam-scanner-BFANxGD-.mjs} +1 -1
  72. package/dist/{custom-csrs-D-lvkyRV.mjs → custom-csrs-BX4aCeof.mjs} +1 -1
  73. package/dist/{custom-hostnames-B5BQX5m6.mjs → custom-hostnames-BRYABKN3.mjs} +1 -1
  74. package/dist/{custom-nameservers-CZrRjcjx.mjs → custom-nameservers-CP1Vf1TD.mjs} +1 -1
  75. package/dist/{custom-pages-CWwjtfbj.mjs → custom-pages-BNL69ToU.mjs} +1 -1
  76. package/dist/{d1-N81q-FAr.mjs → d1-D4AZsUKn.mjs} +1 -1
  77. package/dist/{delegate-livNdiwK.mjs → delegate-BKlomUk6.mjs} +1 -1
  78. package/dist/delegate.mjs +1 -1
  79. package/dist/{deploy-Ok4ncy06.mjs → deploy-LbXgSfAd.mjs} +1 -1
  80. package/dist/{deploy-context-B_lLfxt7.mjs → deploy-context-BYw6gbl-.mjs} +9 -9
  81. package/dist/{deploy-input-JZlEJwKB.mjs → deploy-input-BFWpjDVr.mjs} +1 -1
  82. package/dist/{dev-DxbkJkzc.mjs → dev-DaFSd8WC.mjs} +1 -1
  83. package/dist/{diagnostics-DlJzpO8b.mjs → diagnostics-Dk3pyWx_.mjs} +1 -1
  84. package/dist/disk-cache-nbuwH1Dh.mjs +2 -0
  85. package/dist/{dist-BxhwE-W1.mjs → dist-DwxlJ9Ms.mjs} +4 -1
  86. package/dist/{dls-5OXuxLAB.mjs → dls-DU6EdhQK.mjs} +1 -1
  87. package/dist/{dns-Burep9O7.mjs → dns-3QDtCu6f.mjs} +1 -1
  88. package/dist/{dns-firewall-hUHaQ0DE.mjs → dns-firewall-Bbrr_0_a.mjs} +1 -1
  89. package/dist/{docs-BFVK88kB.mjs → docs-lLLKcLr_.mjs} +1 -1
  90. package/dist/{dry-run-qsnRlRk6.mjs → dry-run-mrA7FFLR.mjs} +1 -1
  91. package/dist/{durable-objects-D6R8S2Dk.mjs → durable-objects-DPf1DMeq.mjs} +1 -1
  92. package/dist/{email-auth--2KCzZNA.mjs → email-auth-DOlEoi8q.mjs} +1 -1
  93. package/dist/{email-routing-DzaExfVf.mjs → email-routing-D56SPGty.mjs} +1 -1
  94. package/dist/{email-security-DwQJszzy.mjs → email-security-CSawx0kD.mjs} +1 -1
  95. package/dist/{email-sending-mQd2qB-o.mjs → email-sending-CgFi0cLA.mjs} +1 -1
  96. package/dist/{errors-C_bGcR0X.mjs → errors-CilNjDVk.mjs} +1 -1
  97. package/dist/{field-extractors-MVOizTlB.mjs → field-extractors-FvIgySB4.mjs} +1 -1
  98. package/dist/{firewall-DtSIlkfL.mjs → firewall-BrTvywhW.mjs} +1 -1
  99. package/dist/{flagship-9E5gwNki.mjs → flagship-BGFN1Epo.mjs} +1 -1
  100. package/dist/{fraud-DjqhVJdf.mjs → fraud-DzK6OIO3.mjs} +1 -1
  101. package/dist/{google-tag-gateway-BM5GmCZa.mjs → google-tag-gateway-Cd9v8A7Z.mjs} +1 -1
  102. package/dist/{healthchecks-CEZ5f3XJ.mjs → healthchecks-Cm7EHaBA.mjs} +1 -1
  103. package/dist/{hyperdrive-Da8hCcUw.mjs → hyperdrive-CVaSt0qX.mjs} +1 -1
  104. package/dist/{iam-BK6N7NdQ.mjs → iam-CWN62Mi4.mjs} +1 -1
  105. package/dist/{images-3bCWE6Ml.mjs → images-Bo_pdvQC.mjs} +1 -1
  106. package/dist/index.mjs +1 -1
  107. package/dist/{init-BgCF9K8h.mjs → init-Dwmpc_S-.mjs} +1 -1
  108. package/dist/{intel-BQ58CJLt.mjs → intel-CQFYeGEA.mjs} +1 -1
  109. package/dist/{interactive-JBA3qOUa.mjs → interactive-DCbIwYxy.mjs} +1 -1
  110. package/dist/{internal-CWPz0sBF.mjs → internal-CYrPZ9IX.mjs} +1 -1
  111. package/dist/{ips-3WYegiVW.mjs → ips-jTSzoqMU.mjs} +1 -1
  112. package/dist/{k2-Bc_hjmiv.mjs → k2-utE2lCYd.mjs} +1 -1
  113. package/dist/{kv-DbShBhhg.mjs → kv-Cdh5hHte.mjs} +1 -1
  114. package/dist/{lazy-command-CbGyEqFK.mjs → lazy-command-QoHlmXHW.mjs} +1 -1
  115. package/dist/{leaked-credential-checks-DgPefxP9.mjs → leaked-credential-checks-CqApscD3.mjs} +1 -1
  116. package/dist/{live-BTtMv1a6.mjs → live-hZgMkXJf.mjs} +1 -1
  117. package/dist/{load-balancers-C2hg52WA.mjs → load-balancers-w_4Uz9Gi.mjs} +1 -1
  118. package/dist/login-BBSJytOt.mjs +2 -0
  119. package/dist/{login-DiR-buzS.mjs → login-CS3KxVbk.mjs} +2 -2
  120. package/dist/{logpush-CitvUX-J.mjs → logpush-C76I5dgN.mjs} +1 -1
  121. package/dist/{logs-CfWHu4Ir.mjs → logs-B5aCYVCv.mjs} +1 -1
  122. package/dist/{magic-network-monitoring-gU6yzzML.mjs → magic-network-monitoring-CGf7cVQ9.mjs} +1 -1
  123. package/dist/{magic-transit-B3JY9u5o.mjs → magic-transit-CN5noqOR.mjs} +1 -1
  124. package/dist/{managed-defense-C_EQ-NYp.mjs → managed-defense-DAGr0UGm.mjs} +1 -1
  125. package/dist/{managed-transforms-DIGl6JkM.mjs → managed-transforms-_SuwzZ-5.mjs} +1 -1
  126. package/dist/{mcp-DqhQJVaz.mjs → mcp-CzedsjOf.mjs} +1 -1
  127. package/dist/{mesh-DXVZBNDC.mjs → mesh-DXX1S3pX.mjs} +1 -1
  128. package/dist/{migrate-CmXyk9vX.mjs → migrate-CvRQ4x3_.mjs} +1 -1
  129. package/dist/{monetization-CWg-mySr.mjs → monetization-8nt9PYln.mjs} +1 -1
  130. package/dist/{network-jtgq5eb4.mjs → network-CaiRDY2e.mjs} +1 -1
  131. package/dist/{network-interconnects-DhfKL5tG.mjs → network-interconnects-Ad6JbAVd.mjs} +1 -1
  132. package/dist/{o11y-eYYs59X9.mjs → o11y-DD2Hfnzi.mjs} +1 -1
  133. package/dist/{oauth-BgDZMd72.mjs → oauth-BUcV_xbm.mjs} +1 -1
  134. package/dist/{oauth-V37G-PaV.mjs → oauth-CQRlNgt5.mjs} +1 -1
  135. package/dist/{observability-CB72eC4T.mjs → observability-BzKBUUSf.mjs} +1 -1
  136. package/dist/{ohttp-gateway-K9ToEft8.mjs → ohttp-gateway-Sej9-GCm.mjs} +1 -1
  137. package/dist/{organizations-BllV7l_c.mjs → organizations-DwYsCbYD.mjs} +1 -1
  138. package/dist/{output-hFMAotFl.mjs → output-PRKYaJuo.mjs} +1 -1
  139. package/dist/package-DXaRIx2f.mjs +2 -0
  140. package/dist/{page-rules-BVmi-ZFW.mjs → page-rules-CjufEmIt.mjs} +1 -1
  141. package/dist/{pages-5spcBpX1.mjs → pages-Dj0Cdf3G.mjs} +2 -2
  142. package/dist/{pay-per-crawl-BgsdGcBi.mjs → pay-per-crawl-DPVlluRA.mjs} +1 -1
  143. package/dist/{pay-per-use-CzmI1kEA.mjs → pay-per-use-DhuLjaoo.mjs} +1 -1
  144. package/dist/{pipelines-CbtmLRxt.mjs → pipelines-D2pM69oq.mjs} +12 -10
  145. package/dist/{precursor-Dk8YOKf_.mjs → precursor-DzuA1m8D.mjs} +1 -1
  146. package/dist/{previews-Bv1HMMtO.mjs → previews-CHHd5Rx7.mjs} +1 -1
  147. package/dist/{progress-DE_G09u2.mjs → progress-AML-AVs4.mjs} +1 -1
  148. package/dist/prompt-Bnon9lfK.mjs +4 -0
  149. package/dist/{queues-DGCYUr4g.mjs → queues-GDwznw0o.mjs} +1 -1
  150. package/dist/{r2-DtCk-Nfi.mjs → r2-B3Xkb0S4.mjs} +49 -49
  151. package/dist/{radar-1CwqOsMZ.mjs → radar-fBT7VIO2.mjs} +1 -1
  152. package/dist/{raw-fetch-DhlyWQtk.mjs → raw-fetch-0T1SwPa1.mjs} +1 -1
  153. package/dist/{ready-CcoEA7M7.mjs → ready-BkXNDNTd.mjs} +1 -1
  154. package/dist/{realtime-DFUxwIG5.mjs → realtime-B7mR3XtY.mjs} +1 -1
  155. package/dist/{registrar-Cl1snz8z.mjs → registrar-DOoxlZc7.mjs} +9 -9
  156. package/dist/{registrar-sandbox-Cne9BVCZ.mjs → registrar-sandbox-DC7xAqqc.mjs} +1 -1
  157. package/dist/{reporting-D9FC-Z-3.mjs → reporting-DlD7J6Pq.mjs} +1 -1
  158. package/dist/{request-headers-Bopp5lH_.mjs → request-headers-BEYXy4JN.mjs} +1 -1
  159. package/dist/{request-tracers-CSSB9_aW.mjs → request-tracers-DYCGkszp.mjs} +1 -1
  160. package/dist/{resource-sharing-D8yuzJm7.mjs → resource-sharing-D_bUv7E8.mjs} +1 -1
  161. package/dist/{rules-DzmOQ3MB.mjs → rules-C4cu3_jr.mjs} +1 -1
  162. package/dist/{rulesets-DsTGcgbc.mjs → rulesets-Bl4mLnXA.mjs} +1 -1
  163. package/dist/{rum-DrJLI93T.mjs → rum-DE_uJb09.mjs} +1 -1
  164. package/dist/run-Cg9utScS.mjs +2 -0
  165. package/dist/{run-CXWkMU3x.mjs → run-DAg7dfIW.mjs} +1 -1
  166. package/dist/sanitize-DHx5dAJu.mjs +2 -0
  167. package/dist/{schema-CfZOW8Zw.mjs → schema-BX822YfT.mjs} +1 -1
  168. package/dist/schema-cache-CTVUtkAl.mjs +3 -0
  169. package/dist/{schema-flags-DO3kLYBu.mjs → schema-flags-YgeJ6Bey.mjs} +1 -1
  170. package/dist/{scim-0OufLKru.mjs → scim-Dz4r0fnH.mjs} +1 -1
  171. package/dist/{secrets-store-BQeLzFxv.mjs → secrets-store-C2GwCUKs.mjs} +1 -1
  172. package/dist/{security-insights-D2pj8-O-.mjs → security-insights-DZCm5D3U.mjs} +1 -1
  173. package/dist/{security-txt-SKtgW4n-.mjs → security-txt-Dbi9KxNc.mjs} +1 -1
  174. package/dist/session-BEsQIuwP.mjs +2 -0
  175. package/dist/{shared-D_2KLpP3.mjs → shared-DqW2vICA.mjs} +1 -1
  176. package/dist/{signed-url-CcE2zQ4Y.mjs → signed-url-BhHSAUam.mjs} +1 -1
  177. package/dist/{smart-shield-Dod9Gs6T.mjs → smart-shield-C2uSFcGN.mjs} +1 -1
  178. package/dist/{snippets-DrrdpLnS.mjs → snippets-BoaGEAC6.mjs} +1 -1
  179. package/dist/{spawn-DNf-Ge8d.mjs → spawn-B4y5Urjv.mjs} +1 -1
  180. package/dist/{spectrum-CHBGZbZF.mjs → spectrum-Bb0KXA8R.mjs} +1 -1
  181. package/dist/{speed-vOlHyG3v.mjs → speed-zKYgLTHA.mjs} +1 -1
  182. package/dist/{sql-BCuLxGSf.mjs → sql-pjWozuvl.mjs} +1 -1
  183. package/dist/src-B8i6_XGg.mjs +133 -0
  184. package/dist/{ssl-BA_dcVwF.mjs → ssl-C5bg1X0i.mjs} +1 -1
  185. package/dist/{startup-profile-uh-F0HRS.mjs → startup-profile-CyIelqtC.mjs} +1 -1
  186. package/dist/startup-profile-Dif7XOsU.mjs +2 -0
  187. package/dist/{state-CTLznbVs.mjs → state-BI_wSuID.mjs} +1 -1
  188. package/dist/state-xUh3Z77T.mjs +2 -0
  189. package/dist/{static-assets-DGDoaJf1.mjs → static-assets-CTv7XwIQ.mjs} +3 -3
  190. package/dist/{stream-CzlqY8hq.mjs → stream-C_FiNrLV.mjs} +1 -1
  191. package/dist/string-width-D6-CGlwN.mjs +2 -0
  192. package/dist/{tags-BLeaslAb.mjs → tags-CXlivF3y.mjs} +1 -1
  193. package/dist/{telemetry-DF7A5Bpk.mjs → telemetry-CtQWhsmy.mjs} +1 -1
  194. package/dist/telemetry-DDs3zhdw.mjs +2 -0
  195. package/dist/{tenant-custom-nameservers-C5rh6jPf.mjs → tenant-custom-nameservers-DBg9Hzvn.mjs} +1 -1
  196. package/dist/{tenants-CRirmhxS.mjs → tenants-89Q0u5_Q.mjs} +1 -1
  197. package/dist/{tools-BRjRgZnj.mjs → tools-aVtEAIvu.mjs} +1 -1
  198. package/dist/{tunnels-nLfIWPYT.mjs → tunnels-CL2fIINH.mjs} +2 -2
  199. package/dist/{turnstile-CZjXtBCr.mjs → turnstile-D6GtQULo.mjs} +1 -1
  200. package/dist/ui-CY75N4Tm.mjs +2 -0
  201. package/dist/{update-check-CXMdVBhW.mjs → update-check-0kpbTLvy.mjs} +1 -1
  202. package/dist/{update-check-D_Oky9-u.mjs → update-check-D3axIoUi.mjs} +1 -1
  203. package/dist/update-check-worker.mjs +1 -1
  204. package/dist/{url-normalization-DTKgJHE8.mjs → url-normalization--iS57OT_.mjs} +1 -1
  205. package/dist/{url-scanner-9XW3zLaU.mjs → url-scanner-C6AtXGc2.mjs} +1 -1
  206. package/dist/{user-Bk1BIqZ5.mjs → user-C5vRYIta.mjs} +1 -1
  207. package/dist/{vectorize-CgOfmWYq.mjs → vectorize-C1Kxb1Ou.mjs} +1 -1
  208. package/dist/version-pcpa_kv3.mjs +2 -0
  209. package/dist/{waiting-rooms-C3nTKfK9.mjs → waiting-rooms-BCVZY9vI.mjs} +1 -1
  210. package/dist/{web-assets-CWU3jrit.mjs → web-assets-D2gXqKZS.mjs} +1 -1
  211. package/dist/{web3-CRpQ5sl4.mjs → web3-CJDZQCOk.mjs} +1 -1
  212. package/dist/whoami-2eFTt0-Y.mjs +2 -0
  213. package/dist/whoami-BEad9QUB.mjs +8 -0
  214. package/dist/{workers-BZMvamn0.mjs → workers-DzXSJMv9.mjs} +2 -2
  215. package/dist/{workers-for-platforms-C7F2ev-5.mjs → workers-for-platforms-CvazgrqD.mjs} +2 -2
  216. package/dist/{workers-vpc-ztEKvWmq.mjs → workers-vpc-DP4QC6UC.mjs} +1 -1
  217. package/dist/{workflows-Dd88_Nqc.mjs → workflows-BSOj56io.mjs} +1 -1
  218. package/dist/{wrangler-migration-BzMTJPdI.mjs → wrangler-migration-DZ9Oelof.mjs} +6 -3
  219. package/dist/{zaraz-BFK0p28R.mjs → zaraz-BnQvKXFy.mjs} +1 -1
  220. package/dist/{zero-trust-Cdjfp0Ie.mjs → zero-trust-DsslXRub.mjs} +1 -1
  221. package/dist/{zones-DDn5jk6I.mjs → zones-DQ3SjGsZ.mjs} +1 -1
  222. package/package.json +14 -13
  223. package/dist/auth-Czr8ChBB.mjs +0 -2
  224. package/dist/auth-Dwfa4S3h.mjs +0 -7
  225. package/dist/build-CCwo_ydV.mjs +0 -2
  226. package/dist/login-CK3nn9a5.mjs +0 -2
  227. package/dist/package-oNVeacC9.mjs +0 -2
  228. package/dist/prompt-D274Im1O.mjs +0 -4
  229. package/dist/run-C5yPsiO2.mjs +0 -2
  230. package/dist/schema-cache-CtqAs0PP.mjs +0 -3
  231. package/dist/session-COdP8BXD.mjs +0 -2
  232. package/dist/src-ByCoEqOw.mjs +0 -133
  233. package/dist/startup-profile-CyQk_f_L.mjs +0 -2
  234. package/dist/state-B6r-b_-d.mjs +0 -2
  235. package/dist/telemetry-COlodX5Z.mjs +0 -2
  236. package/dist/ui-dWsVmFCG.mjs +0 -2
  237. package/dist/version-CcuBNjqg.mjs +0 -2
@@ -601,9 +601,15 @@
601
601
  "fullPath": ["auth", "whoami"],
602
602
  "category": "read",
603
603
  "description": "Show current user and authentication status",
604
- "usage": "cf auth whoami",
604
+ "usage": "cf auth whoami [options]",
605
605
  "arguments": [],
606
606
  "options": [
607
+ {
608
+ "name": "json",
609
+ "type": "boolean",
610
+ "required": false,
611
+ "description": "Show full JSON (default for CI, non-interactive runs and agents; use --no-json for a summary)"
612
+ },
607
613
  {
608
614
  "name": "dry-run",
609
615
  "type": "boolean",
@@ -19443,6 +19443,112 @@
19443
19443
  "hasRequestBody": false,
19444
19444
  "requestBodyFields": []
19445
19445
  },
19446
+ "browser-run script create": {
19447
+ "operationId": "browser-run.script.create",
19448
+ "httpMethod": "POST",
19449
+ "path": "/accounts/{account_id}/browser-rendering/script",
19450
+ "pathParams": [
19451
+ {
19452
+ "name": "account_id",
19453
+ "type": "string",
19454
+ "required": true
19455
+ }
19456
+ ],
19457
+ "queryParams": [
19458
+ {
19459
+ "name": "keep_alive",
19460
+ "flag": "keep-alive",
19461
+ "type": "number",
19462
+ "required": false
19463
+ },
19464
+ {
19465
+ "name": "lab",
19466
+ "flag": "lab",
19467
+ "type": "boolean",
19468
+ "required": false
19469
+ },
19470
+ {
19471
+ "name": "recording",
19472
+ "flag": "recording",
19473
+ "type": "boolean",
19474
+ "required": false
19475
+ },
19476
+ {
19477
+ "name": "browser",
19478
+ "flag": "browser",
19479
+ "type": "string",
19480
+ "required": false
19481
+ }
19482
+ ],
19483
+ "hasRequestBody": true,
19484
+ "requestBodyFields": [
19485
+ {
19486
+ "name": "code",
19487
+ "type": "string",
19488
+ "required": true,
19489
+ "description": "Function body executed against the selected library's runner."
19490
+ },
19491
+ {
19492
+ "name": "library",
19493
+ "type": "string",
19494
+ "required": false,
19495
+ "description": "Library the script runs with. Defaults to raw CDP when omitted."
19496
+ },
19497
+ {
19498
+ "name": "timeout",
19499
+ "type": "number",
19500
+ "required": false,
19501
+ "description": "Maximum script run time in milliseconds."
19502
+ }
19503
+ ]
19504
+ },
19505
+ "browser-run script execute": {
19506
+ "operationId": "browser-run.script.execute",
19507
+ "httpMethod": "POST",
19508
+ "path": "/accounts/{account_id}/browser-rendering/script/{session_id}",
19509
+ "pathParams": [
19510
+ {
19511
+ "name": "account_id",
19512
+ "type": "string",
19513
+ "required": true
19514
+ },
19515
+ {
19516
+ "name": "session_id",
19517
+ "flag": "session-id",
19518
+ "positional": true,
19519
+ "type": "string",
19520
+ "required": true
19521
+ }
19522
+ ],
19523
+ "queryParams": [],
19524
+ "hasRequestBody": true,
19525
+ "requestBodyFields": [
19526
+ {
19527
+ "name": "code",
19528
+ "type": "string",
19529
+ "required": true,
19530
+ "description": "Function body executed against the selected library's runner."
19531
+ },
19532
+ {
19533
+ "name": "library",
19534
+ "type": "string",
19535
+ "required": false,
19536
+ "description": "Library the script runs with. Defaults to raw CDP when omitted."
19537
+ },
19538
+ {
19539
+ "name": "target-id",
19540
+ "type": "string",
19541
+ "required": false,
19542
+ "description": "Page target the script attaches to. Defaults to the session's first page."
19543
+ },
19544
+ {
19545
+ "name": "timeout",
19546
+ "type": "number",
19547
+ "required": false,
19548
+ "description": "Maximum script run time in milliseconds."
19549
+ }
19550
+ ]
19551
+ },
19446
19552
  "builds cancel": {
19447
19553
  "operationId": "builds.cancel",
19448
19554
  "httpMethod": "PUT",
@@ -64075,6 +64181,28 @@
64075
64181
  "hasRequestBody": false,
64076
64182
  "requestBodyFields": []
64077
64183
  },
64184
+ "pipelines sinks update": {
64185
+ "operationId": "pipelines.sinks.update",
64186
+ "httpMethod": "PATCH",
64187
+ "path": "/accounts/{account_id}/pipelines/v1/sinks/{sink_id}",
64188
+ "pathParams": [
64189
+ {
64190
+ "name": "account_id",
64191
+ "type": "string",
64192
+ "required": true
64193
+ },
64194
+ {
64195
+ "name": "sink_id",
64196
+ "flag": "sink-id",
64197
+ "positional": true,
64198
+ "type": "string",
64199
+ "required": true
64200
+ }
64201
+ ],
64202
+ "queryParams": [],
64203
+ "hasRequestBody": true,
64204
+ "requestBodyFields": []
64205
+ },
64078
64206
  "pipelines streams create": {
64079
64207
  "operationId": "pipelines.streams.create",
64080
64208
  "httpMethod": "POST",
@@ -64312,6 +64440,28 @@
64312
64440
  }
64313
64441
  ]
64314
64442
  },
64443
+ "pipelines update-tables": {
64444
+ "operationId": "pipelines.update-tables",
64445
+ "httpMethod": "POST",
64446
+ "path": "/accounts/{account_id}/pipelines/v1/pipelines/{pipeline_id}/update_tables",
64447
+ "pathParams": [
64448
+ {
64449
+ "name": "account_id",
64450
+ "type": "string",
64451
+ "required": true
64452
+ },
64453
+ {
64454
+ "name": "pipeline_id",
64455
+ "flag": "pipeline-id",
64456
+ "positional": true,
64457
+ "type": "string",
64458
+ "required": true
64459
+ }
64460
+ ],
64461
+ "queryParams": [],
64462
+ "hasRequestBody": false,
64463
+ "requestBodyFields": []
64464
+ },
64315
64465
  "pipelines validate-sql": {
64316
64466
  "operationId": "pipelines.validate-sql",
64317
64467
  "httpMethod": "POST",
@@ -65416,28 +65566,6 @@
65416
65566
  }
65417
65567
  ]
65418
65568
  },
65419
- "r2 buckets create-by-name": {
65420
- "operationId": "r2.buckets.create-by-name",
65421
- "httpMethod": "PUT",
65422
- "path": "/accounts/{account_id}/r2/buckets/{bucket_name}",
65423
- "pathParams": [
65424
- {
65425
- "name": "account_id",
65426
- "type": "string",
65427
- "required": true
65428
- },
65429
- {
65430
- "name": "bucket_name",
65431
- "flag": "bucket-name",
65432
- "positional": true,
65433
- "type": "string",
65434
- "required": true
65435
- }
65436
- ],
65437
- "queryParams": [],
65438
- "hasRequestBody": false,
65439
- "requestBodyFields": []
65440
- },
65441
65569
  "r2 buckets delete": {
65442
65570
  "operationId": "r2.buckets.delete",
65443
65571
  "httpMethod": "DELETE",
@@ -66214,8 +66342,8 @@
66214
66342
  "hasRequestBody": false,
66215
66343
  "requestBodyFields": []
66216
66344
  },
66217
- "r2 buckets sippy delete": {
66218
- "operationId": "r2.buckets.sippy.delete",
66345
+ "r2 buckets sippy disable": {
66346
+ "operationId": "r2.buckets.sippy.disable",
66219
66347
  "httpMethod": "DELETE",
66220
66348
  "path": "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy",
66221
66349
  "pathParams": [
@@ -66236,30 +66364,8 @@
66236
66364
  "hasRequestBody": false,
66237
66365
  "requestBodyFields": []
66238
66366
  },
66239
- "r2 buckets sippy get": {
66240
- "operationId": "r2.buckets.sippy.get",
66241
- "httpMethod": "GET",
66242
- "path": "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy",
66243
- "pathParams": [
66244
- {
66245
- "name": "account_id",
66246
- "type": "string",
66247
- "required": true
66248
- },
66249
- {
66250
- "name": "bucket_name",
66251
- "flag": "bucket-name",
66252
- "positional": true,
66253
- "type": "string",
66254
- "required": true
66255
- }
66256
- ],
66257
- "queryParams": [],
66258
- "hasRequestBody": false,
66259
- "requestBodyFields": []
66260
- },
66261
- "r2 buckets sippy update": {
66262
- "operationId": "r2.buckets.sippy.update",
66367
+ "r2 buckets sippy enable": {
66368
+ "operationId": "r2.buckets.sippy.enable",
66263
66369
  "httpMethod": "PUT",
66264
66370
  "path": "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy",
66265
66371
  "pathParams": [
@@ -66371,6 +66477,28 @@
66371
66477
  }
66372
66478
  ]
66373
66479
  },
66480
+ "r2 buckets sippy get": {
66481
+ "operationId": "r2.buckets.sippy.get",
66482
+ "httpMethod": "GET",
66483
+ "path": "/accounts/{account_id}/r2/buckets/{bucket_name}/sippy",
66484
+ "pathParams": [
66485
+ {
66486
+ "name": "account_id",
66487
+ "type": "string",
66488
+ "required": true
66489
+ },
66490
+ {
66491
+ "name": "bucket_name",
66492
+ "flag": "bucket-name",
66493
+ "positional": true,
66494
+ "type": "string",
66495
+ "required": true
66496
+ }
66497
+ ],
66498
+ "queryParams": [],
66499
+ "hasRequestBody": false,
66500
+ "requestBodyFields": []
66501
+ },
66374
66502
  "r2 objects bulk-delete": {
66375
66503
  "operationId": "r2.objects.bulk-delete",
66376
66504
  "httpMethod": "DELETE",
@@ -100114,6 +100242,12 @@
100114
100242
  "type": "string",
100115
100243
  "required": false,
100116
100244
  "description": "The name of the dispatch namespace."
100245
+ },
100246
+ {
100247
+ "name": "trusted-workers",
100248
+ "type": "boolean",
100249
+ "required": false,
100250
+ "description": "Whether the Workers in the namespace are executed in a \"trusted\" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` object on incoming Requests. When a Worker is untrusted, caches are not shared across the zone, and `request.cf` is undefined. By default, Workers in a namespace are \"untrusted\"."
100117
100251
  }
100118
100252
  ]
100119
100253
  },
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{c as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g}from"./prompt-D274Im1O.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/abuse-reports/${t.report_id}/appeals/eligibility`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 abuse-reports appeals eligibility <report-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,t as a}from"./context-DlFhI9cN.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-PRKYaJuo.mjs";import{t as c}from"./progress-AML-AVs4.mjs";import{t as l}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{c as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g}from"./prompt-Bnon9lfK.mjs";var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/abuse-reports/${t.report_id}/appeals/eligibility`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(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. Report-level appeals are currently available only for DMCA (copyright) reports. For other report types this operation returns the same \`404 Report not found\` response as a report that does not exist for the account.`).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 y={command:`eligibility <report-id>`,describe:`Check whether a report can be appealed`,builder:v,handler:async e=>l({command:`abuse-reports appeals eligibility`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/abuse-reports/${e[`report-id`]==null?`<report-id>`:encodeURIComponent(String(e[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(e[`report-id`]??``)},bodyKind:`none`});return}let t=await n(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>t.send(_,{account_id:l,report_id:e[`report-id`]}));s(u,{successLabel:`Loaded`})})},b={command:`appeals`,describe:`Appeal eligibility for abuse reports`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage("$0 abuse-reports create <report-type>\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 `Trust and Safety Write` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below). Delegated reports: In limited circumstances, Cloudflare delegates processing of abuse reports to select customers who have established abuse-handling programs. For these customers, Cloudflare may forward abuse reports directly and in full—including reporter contact information, comments, and supporting evidence—without redaction or preprocessing by Cloudflare. This allows the customer to investigate and respond using their own policies and processes. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of the `host_notification` and `owner_notification` values.").positional(`report-type`,{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`]}).coerce(`act`,e=>m(e,`act`,`text`)).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters. With the exception of delegated reports, comments are kept internal to Cloudflare and not shared with the host or customer as part of regular processing. For the limited circumstances where we delegate reports to customers with established abuse-handling programs, comments may be shared in full.`}).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. For delegated reports, the report—including contact information and comments—will be forwarded to the customer in full regardless of this value. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{t as e}from"./lazy-command-CbGyEqFK.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";var n=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-DdYnSf-8.mjs`),{command:`access curl`,recordArgs:!1}),r=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-DIIaZx_f.mjs`),{command:`access login`,recordArgs:!1}),i=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-DONwHpqZ.mjs`),{command:`access ssh-config`,recordArgs:!1}),a=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-DqOU7Ql2.mjs`),{command:`access ssh-gen`,recordArgs:!1}),o={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-DHODgfFZ.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},s=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-NqM0lo4a.mjs`),{command:`access token`,recordArgs:!1});const c={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t(n,`preview`)).command(t(r,`preview`)).command(t(i,`preview`)).command(t(a,`preview`)).command(t(o,`preview`)).command(t(s,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
2
+ import{t as e}from"./lazy-command-QoHlmXHW.mjs";import{t}from"./hand-written-dry-run-B82fRl2N.mjs";var n=e(`curl <url>`,`Run curl against an Access-protected application with its JWT injected by cloudflared.`,()=>import(`./command-iwrZ2Sb1.mjs`),{command:`access curl`,recordArgs:!1}),r=e(`login <url>`,`Authenticate with an Access application and store its JWT through cloudflared.`,()=>import(`./command-n7QausoH.mjs`),{command:`access login`,recordArgs:!1}),i=e(`ssh-config`,`Print an example SSH configuration for an Access application.`,()=>import(`./command-BwcAuPBr.mjs`),{command:`access ssh-config`,recordArgs:!1}),a=e(`ssh-gen`,`Generate a short-lived certificate for an Access SSH application.`,()=>import(`./command-BC_nezLE.mjs`),{command:`access ssh-gen`,recordArgs:!1}),o={...e(`tcp`,`Proxy a TCP connection through Access. The command is also available as ssh, rdp, and smb.`,()=>import(`./command-D5FrTb2N.mjs`),{command:`access tcp`,recordArgs:!1}),aliases:[`ssh`,`rdp`,`smb`]},s=e(`token <url>`,`Print a JWT for authenticating with an Access application.`,()=>import(`./command-CQhD3Q1t.mjs`),{command:`access token`,recordArgs:!1});const c={command:`access`,describe:`Access protected applications and services`,builder:e=>e.command(t(n,`preview`)).command(t(r,`preview`)).command(t(i,`preview`)).command(t(a,`preview`)).command(t(o,`preview`)).command(t(s,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n,s as r}from"./auth-DA1PHaHi.mjs";import{c as i,o as a,r as o,t as s}from"./body-parser-HN91kAf0.mjs";import{a as c,i as l,t as u}from"./context-BGm5_wTT.mjs";import{t as d}from"./dry-run-qsnRlRk6.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{t as p}from"./local-B3zt9PXR.mjs";import{t as m}from"./run-CXWkMU3x.mjs";import{t as h}from"./output-hFMAotFl.mjs";import{t as g}from"./progress-DE_G09u2.mjs";import{a as _,i as v,n as y}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{n as ee,t as te}from"./raw-fetch-DhlyWQtk.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/resource-library/applications`,body:`json`,errors:{403:`ForbiddenError`,429:`TooManyRequestsError`}};function ne(e){return e.usage(`$0 accounts applications create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n,s as r}from"./auth-cj71dGxS.mjs";import{c as i,o as a,r as o,t as s}from"./body-parser-HN91kAf0.mjs";import{a as c,i as l,t as u}from"./context-DlFhI9cN.mjs";import{t as d}from"./dry-run-mrA7FFLR.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{t as p}from"./local-B3zt9PXR.mjs";import{t as m}from"./run-DAg7dfIW.mjs";import{t as h}from"./output-PRKYaJuo.mjs";import{t as g}from"./progress-AML-AVs4.mjs";import{a as _,i as v,n as y}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as ee,t as te}from"./raw-fetch-0T1SwPa1.mjs";var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/resource-library/applications`,body:`json`,errors:{403:`ForbiddenError`,429:`TooManyRequestsError`}};function ne(e){return e.usage(`$0 accounts applications create
3
3
 
4
4
  Create a custom application for an account from a name, category, and optional network matchers.`).option(`category-id`,{type:`number`,description:`Numeric identifier for an application category.`}).option(`hostnames`,{type:`string`,array:!0,description:`Hostnames matched by the application.`}).option(`human-id`,{type:`string`,description:`Human-readable identifier for the application.`}).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:`Application name.`}).option(`port-protocols`,{type:`string`,array:!0,description:"Ports matched by the application, in `protocol/port` or inclusive `protocol/start-end` format (for example, `tcp/443` or `udp/10000-20000`). TCP and UDP ports must be between 0 and 65535."}).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. A NUL character (U+0000) in any string value returns `400`. "})}const re={command:`create`,describe:`Create application`,builder:ne,handler:async e=>m({command:`accounts applications create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();d({command:`cf accounts applications create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/resource-library/applications`,pathParams:{},bodyKind:`json`,body:e.body===void 0?s({category_id:e[`category-id`],hostnames:e.hostnames,human_id:f(e[`human-id`],`human-id`,`text`),ip_subnets:e[`ip-subnets`],name:f(e.name,`name`,`text`),port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}):o(e.body)});return}let t=e.body===void 0?void 0:o(e.body),r=await n(e),i=e.local?p:await u();if(e.accountId=i,e.body!==void 0){let e=t,n=await g(`Creating`,async()=>r.send(b,{body:e,account_id:i}));h(n,{successLabel:`Created`});return}if(e[`category-id`]===void 0)throw Error(`--category-id is required (or pass --body with this field set).`);e[`human-id`]===void 0&&(e[`human-id`]=await _(`human-id`,`Human-readable identifier for the application.`)),e.name===void 0&&(e.name=await _(`name`,`Application name.`));let a=s({category_id:e[`category-id`],hostnames:e.hostnames,human_id:f(e[`human-id`],`human-id`,`text`),ip_subnets:e[`ip-subnets`],name:f(e.name,`name`,`text`),port_protocols:e[`port-protocols`],support_domains:e[`support-domains`]}),l=await g(`Creating`,async()=>r.send(b,{body:a,account_id:i}));h(l,{successLabel:`Created`})})};var ie={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/resource-library/applications/${t.id}`,errors:{403:`ForbiddenError`,409:`ConflictError`,429:`TooManyRequestsError`,502:`BadGatewayError`}};function ae(e){return e.usage(`$0 accounts applications delete <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-qsnRlRk6.mjs";import{n as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./run-CXWkMU3x.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{a as u,n as d}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store`,body:`json`};function p(e){return e.usage(`$0 acm custom-trust-store create
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{r,t as i}from"./body-parser-HN91kAf0.mjs";import{t as a}from"./dry-run-mrA7FFLR.mjs";import{n as o}from"./input-validation-D7z60HJH.mjs";import{t as s}from"./run-DAg7dfIW.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-AML-AVs4.mjs";import{a as u,n as d}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var f={method:`POST`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store`,body:`json`};function p(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 m={command:`create`,describe:`Upload Custom Origin Trust Store`,builder:p,handler:async e=>s({command:`acm custom-trust-store create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf acm custom-trust-store create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/acm/custom_trust_store`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?i({certificate:o(e.certificate,`certificate`,`text`)}):r(e.body)});return}let s=e.body===void 0?void 0:r(e.body),d=await t(e),p=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=p,e.body!==void 0){let e=s,t=await l(`Creating`,async()=>d.send(f,{body:e,zone_id:p}));c(t,{successLabel:`Created`});return}e.certificate===void 0&&(e.certificate=await u(`certificate`,`The root CA certificate in PEM format. Only root CA certificates are accepted; intermediate and leaf certificates are not supported.`));let m=i({certificate:o(e.certificate,`certificate`,`text`)}),h=await l(`Creating`,async()=>d.send(f,{body:m,zone_id:p}));c(h,{successLabel:`Created`})})};var h={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/acm/custom_trust_store/${t.custom_origin_trust_store_id}`};function g(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"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{a as i,i as a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-hFMAotFl.mjs";import{t as l}from"./progress-DE_G09u2.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{a as d,n as f}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";import{o as p,r as m,t as h}from"./body-parser-HN91kAf0.mjs";import{n as g,t as ee}from"./input-validation-D7z60HJH.mjs";import{n as te,t as _}from"./raw-fetch-DhlyWQtk.mjs";var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function ne(e){return e.usage(`$0 addressing address-maps accounts delete <member-account-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{a as i,i as a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./local-B3zt9PXR.mjs";import{t as c}from"./output-PRKYaJuo.mjs";import{t as l}from"./progress-AML-AVs4.mjs";import{t as u}from"./run-DAg7dfIW.mjs";import{a as d,n as f}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as p,r as m,t as h}from"./body-parser-HN91kAf0.mjs";import{n as g,t as ee}from"./input-validation-D7z60HJH.mjs";import{n as te,t as _}from"./raw-fetch-0T1SwPa1.mjs";var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function ne(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 re={command:`delete <member-account-id>`,describe:`Remove an account membership from an Address Map`,builder:ne,handler:async e=>u({command:`addressing address-maps accounts delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();r({command:`cf addressing address-maps accounts delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/addressing/address_maps/${e[`address-map-id`]==null?`<address-map-id>`:encodeURIComponent(String(e[`address-map-id`]))}/accounts/${e[`member-account-id`]==null?`<member-account-id>`:encodeURIComponent(String(e[`member-account-id`]))}`,pathParams:{"address-map-id":String(e[`address-map-id`]??``),"member-account-id":String(e[`member-account-id`]??``)},bodyKind:`none`});return}let t=await n(e),a=e.local?s:await o();if(e.accountId=a,!await f({force:!!e.force}))return;let u=await l(`Deleting`,async()=>t.send(v,{account_id:a,address_map_id:e[`address-map-id`],member_account_id:e[`member-account-id`]}));c(u,{successLabel:`Deleted`})})};var ie={method:`PUT`,path:t=>e`/accounts/${t.account_id}/addressing/address_maps/${t.address_map_id}/accounts/${t.member_account_id}`};function ae(e){return e.usage(`$0 addressing address-maps accounts update <member-account-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-BGm5_wTT.mjs";import{t as s}from"./dry-run-qsnRlRk6.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-CXWkMU3x.mjs";import{t as d}from"./output-hFMAotFl.mjs";import{t as f}from"./progress-DE_G09u2.mjs";import{a as p,n as m}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces`,body:`json`};function g(e){return e.usage(`$0 agent-memory create-namespace
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{o as n,r,t as i}from"./body-parser-HN91kAf0.mjs";import{a,t as o}from"./context-DlFhI9cN.mjs";import{t as s}from"./dry-run-mrA7FFLR.mjs";import{n as c}from"./input-validation-D7z60HJH.mjs";import{t as l}from"./local-B3zt9PXR.mjs";import{t as u}from"./run-DAg7dfIW.mjs";import{t as d}from"./output-PRKYaJuo.mjs";import{t as f}from"./progress-AML-AVs4.mjs";import{a as p,n as m}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces`,body:`json`};function g(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 _={command:`create-namespace`,describe:`Create a namespace`,builder:g,handler:async e=>u({command:`agent-memory create-namespace`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await a();s({command:`cf agent-memory create-namespace`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/agent-memory/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?i({name:c(e.name,`name`,`text`)}):r(e.body)});return}let n=e.body===void 0?void 0:r(e.body),u=await t(e),m=e.local?l:await o();if(e.accountId=m,e.body!==void 0){let e=n,t=await f(`Creating`,async()=>u.send(h,{body:e,account_id:m}));d(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await p(`name`,`Namespace name.`));let g=i({name:c(e.name,`name`,`text`)}),_=await f(`Creating`,async()=>u.send(h,{body:g,account_id:m}));d(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/agent-memory/namespaces/${t.namespace_name}/profiles/${t.profile_name}/memories/${t.memory_id}`};function y(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"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{r}from"./body-parser-HN91kAf0.mjs";import{t as i}from"./dry-run-qsnRlRk6.mjs";import{t as a}from"./output-hFMAotFl.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";var c={method:`POST`,path:t=>e`/zones/${t.zone_id}/ai-audit/robots/bulk`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,408:`RequestTimeoutError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function l(e){return e.usage(`$0 ai-audit robots bulk-get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{r}from"./body-parser-HN91kAf0.mjs";import{t as i}from"./dry-run-mrA7FFLR.mjs";import{t as a}from"./output-PRKYaJuo.mjs";import{t as o}from"./run-DAg7dfIW.mjs";import{t as s}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";var c={method:`POST`,path:t=>e`/zones/${t.zone_id}/ai-audit/robots/bulk`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,408:`RequestTimeoutError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function l(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 u={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:l,handler:async e=>o({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:r(e.body,[],25)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let o=e.body===void 0?void 0:r(e.body,[],25),l=await t(e),u=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=u,e.body!==void 0){let e=o,t=await s(`Loading`,async()=>l.send(c,{body:e,zone_id:u}));a(t,{successLabel:`Loaded`})}})};var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-audit/robots`,query:[`subdomain`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage(`$0 ai-audit robots get
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-DA1PHaHi.mjs";import{c as r,i,o as a,r as o,t as s}from"./body-parser-HN91kAf0.mjs";import{a as c,t as l}from"./context-BGm5_wTT.mjs";import{t as u}from"./dry-run-qsnRlRk6.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{t as f}from"./local-B3zt9PXR.mjs";import{t as p}from"./run-CXWkMU3x.mjs";import{t as m}from"./output-hFMAotFl.mjs";import{t as h}from"./progress-DE_G09u2.mjs";import{a as g,n as _}from"./prompt-D274Im1O.mjs";import"./telemetry-COlodX5Z.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/custom-domains`,body:`json`,errors:{400:`BadRequestError`}};function y(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{i as t,n}from"./auth-cj71dGxS.mjs";import{c as r,i,o as a,r as o,t as s}from"./body-parser-HN91kAf0.mjs";import{a as c,t as l}from"./context-DlFhI9cN.mjs";import{t as u}from"./dry-run-mrA7FFLR.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{t as f}from"./local-B3zt9PXR.mjs";import{t as p}from"./run-DAg7dfIW.mjs";import{t as m}from"./output-PRKYaJuo.mjs";import{t as h}from"./progress-AML-AVs4.mjs";import{a as g,n as _}from"./prompt-Bnon9lfK.mjs";import"./telemetry-DDs3zhdw.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/custom-domains`,body:`json`,errors:{400:`BadRequestError`}};function y(e){return e.usage(`$0 ai-gateway custom-domains create <gateway-id>
3
3
 
4
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`]}).coerce(`min-tls`,e=>d(e,`min-tls`,`text`)).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 b={command:`create <gateway-id>`,describe:`Create a custom domain for a gateway`,builder:y,handler:async e=>p({command:`ai-gateway custom-domains create`,classification:{safeFlags:[`min-tls`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();u({command:`cf ai-gateway custom-domains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}/custom-domains`,pathParams:{"gateway-id":String(e[`gateway-id`]??``)},bodyKind:`json`,body:e.body===void 0?s({domain:d(e.domain,`domain`,`text`),minTLS:e[`min-tls`],zone_id:d(e[`zone-id`],`zone-id`,`text`)}):o(e.body)});return}let t=e.body===void 0?void 0:o(e.body),r=await n(e),i=e.local?f:await l();if(e.accountId=i,e.body!==void 0){let n=t,a=await h(`Creating`,async()=>r.send(v,{body:n,account_id:i,gateway_id:e[`gateway-id`]}));m(a,{successLabel:`Created`});return}e.domain===void 0&&(e.domain=await g(`domain`,"Custom hostname that you own, such as `ai.example.com`.")),e[`zone-id`]===void 0&&(e[`zone-id`]=await g(`zone-id`,`ID of the Cloudflare zone that contains the custom hostname.`));let a=s({domain:d(e.domain,`domain`,`text`),minTLS:e[`min-tls`],zone_id:d(e[`zone-id`],`zone-id`,`text`)}),p=await h(`Creating`,async()=>r.send(v,{body:a,account_id:i,gateway_id:e[`gateway-id`]}));m(p,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/custom-domains/${t.hostname}`,errors:{404:`NotFoundError`}};function S(e){return e.usage(`$0 ai-gateway custom-domains delete <hostname>
5
5
 
@@ -61,7 +61,7 @@ Checks whether stored credentials can list models through the provider implement
61
61
 
62
62
  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 rt={command:`update <id>`,describe:`Rotate a provider key`,builder:nt,handler:async e=>p({command:`ai-gateway gateways providers update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await c();u({command:`cf ai-gateway gateways providers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}/provider_configs/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{"gateway-id":String(e[`gateway-id`]??``),id:String(e.id??``)},bodyKind:`json`,body:e.body===void 0?s({secret:d(e.secret,`secret`,`text`)}):o(e.body),sensitiveBodyPaths:[[`secret`]]});return}let t=e.body===void 0?void 0:o(e.body),r=await n(e),i=e.local?f:await l();if(e.accountId=i,e.body!==void 0){let n=t,a=await h(`Updating`,async()=>r.send(Z,{body:n,account_id:i,gateway_id:e[`gateway-id`],id:e.id}));m(a,{successLabel:`Updated`});return}e.secret===void 0&&(e.secret=await g(`secret`,`Provider API key to store in the Secrets Store configured on the gateway.`,{kind:`secret`}));let a=s({secret:d(e.secret,`secret`,`text`)}),p=await h(`Updating`,async()=>r.send(Z,{body:a,account_id:i,gateway_id:e[`gateway-id`],id:e.id}));m(p,{successLabel:`Updated`})})},it={command:`providers`,describe:`Store and rotate upstream AI provider keys for a gateway`,builder:e=>e.command(Ue).command(Ke).command(Ye).command(Qe).command(tt).command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.usage(`$0 ai-gateway gateways update <gateway-id>
63
63
 
64
- 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:`Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.`}).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`]}).coerce(`guardrails-prompt-p1`,e=>d(e,`guardrails-prompt-p1`,`text`)).option(`guardrails-prompt-s1`,{type:`string`,description:`The guardrails.prompt.S1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s1`,e=>d(e,`guardrails-prompt-s1`,`text`)).option(`guardrails-prompt-s10`,{type:`string`,description:`The guardrails.prompt.S10 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s10`,e=>d(e,`guardrails-prompt-s10`,`text`)).option(`guardrails-prompt-s11`,{type:`string`,description:`The guardrails.prompt.S11 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s11`,e=>d(e,`guardrails-prompt-s11`,`text`)).option(`guardrails-prompt-s12`,{type:`string`,description:`The guardrails.prompt.S12 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s12`,e=>d(e,`guardrails-prompt-s12`,`text`)).option(`guardrails-prompt-s13`,{type:`string`,description:`The guardrails.prompt.S13 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s13`,e=>d(e,`guardrails-prompt-s13`,`text`)).option(`guardrails-prompt-s14`,{type:`string`,description:`The guardrails.prompt.S14 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s14`,e=>d(e,`guardrails-prompt-s14`,`text`)).option(`guardrails-prompt-s2`,{type:`string`,description:`The guardrails.prompt.S2 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s2`,e=>d(e,`guardrails-prompt-s2`,`text`)).option(`guardrails-prompt-s3`,{type:`string`,description:`The guardrails.prompt.S3 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s3`,e=>d(e,`guardrails-prompt-s3`,`text`)).option(`guardrails-prompt-s4`,{type:`string`,description:`The guardrails.prompt.S4 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s4`,e=>d(e,`guardrails-prompt-s4`,`text`)).option(`guardrails-prompt-s5`,{type:`string`,description:`The guardrails.prompt.S5 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s5`,e=>d(e,`guardrails-prompt-s5`,`text`)).option(`guardrails-prompt-s6`,{type:`string`,description:`The guardrails.prompt.S6 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s6`,e=>d(e,`guardrails-prompt-s6`,`text`)).option(`guardrails-prompt-s7`,{type:`string`,description:`The guardrails.prompt.S7 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s7`,e=>d(e,`guardrails-prompt-s7`,`text`)).option(`guardrails-prompt-s8`,{type:`string`,description:`The guardrails.prompt.S8 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s8`,e=>d(e,`guardrails-prompt-s8`,`text`)).option(`guardrails-prompt-s9`,{type:`string`,description:`The guardrails.prompt.S9 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s9`,e=>d(e,`guardrails-prompt-s9`,`text`)).option(`guardrails-response-p1`,{type:`string`,description:`The guardrails.response.P1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-p1`,e=>d(e,`guardrails-response-p1`,`text`)).option(`guardrails-response-s1`,{type:`string`,description:`The guardrails.response.S1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s1`,e=>d(e,`guardrails-response-s1`,`text`)).option(`guardrails-response-s10`,{type:`string`,description:`The guardrails.response.S10 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s10`,e=>d(e,`guardrails-response-s10`,`text`)).option(`guardrails-response-s11`,{type:`string`,description:`The guardrails.response.S11 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s11`,e=>d(e,`guardrails-response-s11`,`text`)).option(`guardrails-response-s12`,{type:`string`,description:`The guardrails.response.S12 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s12`,e=>d(e,`guardrails-response-s12`,`text`)).option(`guardrails-response-s13`,{type:`string`,description:`The guardrails.response.S13 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s13`,e=>d(e,`guardrails-response-s13`,`text`)).option(`guardrails-response-s14`,{type:`string`,description:`The guardrails.response.S14 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s14`,e=>d(e,`guardrails-response-s14`,`text`)).option(`guardrails-response-s2`,{type:`string`,description:`The guardrails.response.S2 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s2`,e=>d(e,`guardrails-response-s2`,`text`)).option(`guardrails-response-s3`,{type:`string`,description:`The guardrails.response.S3 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s3`,e=>d(e,`guardrails-response-s3`,`text`)).option(`guardrails-response-s4`,{type:`string`,description:`The guardrails.response.S4 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s4`,e=>d(e,`guardrails-response-s4`,`text`)).option(`guardrails-response-s5`,{type:`string`,description:`The guardrails.response.S5 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s5`,e=>d(e,`guardrails-response-s5`,`text`)).option(`guardrails-response-s6`,{type:`string`,description:`The guardrails.response.S6 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s6`,e=>d(e,`guardrails-response-s6`,`text`)).option(`guardrails-response-s7`,{type:`string`,description:`The guardrails.response.S7 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s7`,e=>d(e,`guardrails-response-s7`,`text`)).option(`guardrails-response-s8`,{type:`string`,description:`The guardrails.response.S8 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s8`,e=>d(e,`guardrails-response-s8`,`text`)).option(`guardrails-response-s9`,{type:`string`,description:`The guardrails.response.S9 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s9`,e=>d(e,`guardrails-response-s9`,`text`)).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`]}).coerce(`log-management-strategy`,e=>d(e,`log-management-strategy`,`text`)).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. Shape: [{"headers": {...}, "url": string, "authorization"?: string, "content_type"?: "json" | "protobuf"}]. ? marks optional keys.`}).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`]}).coerce(`rate-limiting-technique`,e=>d(e,`rate-limiting-technique`,`text`)).option(`retry-backoff`,{type:`string`,description:`Backoff strategy for retry delays`,choices:[`constant`,`linear`,`exponential`]}).coerce(`retry-backoff`,e=>d(e,`retry-backoff`,`text`)).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(`spend-limits-rules`,{type:`string`,description:`The spend_limits.rules field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"limit": number, "limitType": "cost", "window": number, "enabled"?: boolean, "id"?: string, ...more}]. ? marks optional keys.`}).option(`store-id`,{type:`string`,description:`Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.`}).option(`stripe-authorization`,{type:`string`,description:`The stripe.authorization field`}).option(`stripe-usage-events`,{type:`string`,description:`The stripe.usage_events field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"payload": string}].`}).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`]}).coerce(`workers-ai-billing-mode`,e=>d(e,`workers-ai-billing-mode`,`text`)).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=>{let t=[`stripe-authorization`,`stripe-usage-events`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`stripe-authorization`,`stripe-usage-events`].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 ot={command:`update <gateway-id>`,describe:`Update a gateway`,builder:at,handler:async e=>p({command:`ai-gateway gateways update`,classification:{safeFlags:/* @__PURE__ */ `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-s14.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-s14.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(`.`)}},e,async()=>{if(e.dryRun){let t=await c();u({command:`cf ai-gateway gateways update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}`,pathParams:{"gateway-id":String(e[`gateway-id`]??``)},bodyKind:`json`,body:e.body===void 0?s({authentication:e.authentication,byok_only:e[`byok-only`],cache_invalidate_on_update:e[`cache-invalidate-on-update`],cache_ttl:e[`cache-ttl`],collect_logs:e[`collect-logs`],guardrails:{prompt:{P1:e[`guardrails-prompt-p1`],S1:e[`guardrails-prompt-s1`],S10:e[`guardrails-prompt-s10`],S11:e[`guardrails-prompt-s11`],S12:e[`guardrails-prompt-s12`],S13:e[`guardrails-prompt-s13`],S14:e[`guardrails-prompt-s14`],S2:e[`guardrails-prompt-s2`],S3:e[`guardrails-prompt-s3`],S4:e[`guardrails-prompt-s4`],S5:e[`guardrails-prompt-s5`],S6:e[`guardrails-prompt-s6`],S7:e[`guardrails-prompt-s7`],S8:e[`guardrails-prompt-s8`],S9:e[`guardrails-prompt-s9`]},response:{P1:e[`guardrails-response-p1`],S1:e[`guardrails-response-s1`],S10:e[`guardrails-response-s10`],S11:e[`guardrails-response-s11`],S12:e[`guardrails-response-s12`],S13:e[`guardrails-response-s13`],S14:e[`guardrails-response-s14`],S2:e[`guardrails-response-s2`],S3:e[`guardrails-response-s3`],S4:e[`guardrails-response-s4`],S5:e[`guardrails-response-s5`],S6:e[`guardrails-response-s6`],S7:e[`guardrails-response-s7`],S8:e[`guardrails-response-s8`],S9:e[`guardrails-response-s9`]}},log_classification:e[`log-classification`],log_management:e[`log-management`],log_management_strategy:e[`log-management-strategy`],logpush:e.logpush,logpush_public_key:d(e[`logpush-public-key`],`logpush-public-key`,`text`),otel:a(e.otel,`otel`),rate_limiting_interval:e[`rate-limiting-interval`],rate_limiting_limit:e[`rate-limiting-limit`],rate_limiting_technique:e[`rate-limiting-technique`],retry_backoff:e[`retry-backoff`],retry_delay:e[`retry-delay`],retry_max_attempts:e[`retry-max-attempts`],spend_limits:{enabled:e[`spend-limits-enabled`],rules:a(e[`spend-limits-rules`],`spend-limits-rules`)},store_id:d(e[`store-id`],`store-id`,`text`),stripe:{authorization:d(e[`stripe-authorization`],`stripe-authorization`,`text`),usage_events:a(e[`stripe-usage-events`],`stripe-usage-events`)},workers_ai_billing_mode:e[`workers-ai-billing-mode`],zdr:e.zdr}):o(e.body)});return}let i=e.body===void 0?void 0:o(e.body),p=await n(e),g=e.local?f:await l();if(e.accountId=g,e.body!==void 0){let n=i,r=await h(`Updating`,async()=>t(p,`PUT`,`/accounts/${g}/ai-gateway/gateways/${encodeURIComponent(String(e[`gateway-id`]))}`,{body:n}));m(r,{successLabel:`Updated`});return}if(e[`cache-invalidate-on-update`]===void 0)throw Error(`--cache-invalidate-on-update is required (or pass --body with this field set).`);if(e[`cache-ttl`]===void 0)throw Error(`--cache-ttl is required (or pass --body with this field set).`);if(e[`collect-logs`]===void 0)throw Error(`--collect-logs is required (or pass --body with this field set).`);if(e[`rate-limiting-interval`]===void 0)throw Error(`--rate-limiting-interval is required (or pass --body with this field set).`);if(e[`rate-limiting-limit`]===void 0)throw Error(`--rate-limiting-limit is required (or pass --body with this field set).`);let _={};e.authentication!==void 0&&r(_,[`authentication`],e.authentication),e[`byok-only`]!==void 0&&r(_,[`byok_only`],e[`byok-only`]),e[`cache-invalidate-on-update`]!==void 0&&r(_,[`cache_invalidate_on_update`],e[`cache-invalidate-on-update`]),e[`cache-ttl`]!==void 0&&r(_,[`cache_ttl`],e[`cache-ttl`]),e[`collect-logs`]!==void 0&&r(_,[`collect_logs`],e[`collect-logs`]),e[`guardrails-prompt-p1`]!==void 0&&r(_,[`guardrails`,`prompt`,`P1`],e[`guardrails-prompt-p1`]),e[`guardrails-prompt-s1`]!==void 0&&r(_,[`guardrails`,`prompt`,`S1`],e[`guardrails-prompt-s1`]),e[`guardrails-prompt-s10`]!==void 0&&r(_,[`guardrails`,`prompt`,`S10`],e[`guardrails-prompt-s10`]),e[`guardrails-prompt-s11`]!==void 0&&r(_,[`guardrails`,`prompt`,`S11`],e[`guardrails-prompt-s11`]),e[`guardrails-prompt-s12`]!==void 0&&r(_,[`guardrails`,`prompt`,`S12`],e[`guardrails-prompt-s12`]),e[`guardrails-prompt-s13`]!==void 0&&r(_,[`guardrails`,`prompt`,`S13`],e[`guardrails-prompt-s13`]),e[`guardrails-prompt-s14`]!==void 0&&r(_,[`guardrails`,`prompt`,`S14`],e[`guardrails-prompt-s14`]),e[`guardrails-prompt-s2`]!==void 0&&r(_,[`guardrails`,`prompt`,`S2`],e[`guardrails-prompt-s2`]),e[`guardrails-prompt-s3`]!==void 0&&r(_,[`guardrails`,`prompt`,`S3`],e[`guardrails-prompt-s3`]),e[`guardrails-prompt-s4`]!==void 0&&r(_,[`guardrails`,`prompt`,`S4`],e[`guardrails-prompt-s4`]),e[`guardrails-prompt-s5`]!==void 0&&r(_,[`guardrails`,`prompt`,`S5`],e[`guardrails-prompt-s5`]),e[`guardrails-prompt-s6`]!==void 0&&r(_,[`guardrails`,`prompt`,`S6`],e[`guardrails-prompt-s6`]),e[`guardrails-prompt-s7`]!==void 0&&r(_,[`guardrails`,`prompt`,`S7`],e[`guardrails-prompt-s7`]),e[`guardrails-prompt-s8`]!==void 0&&r(_,[`guardrails`,`prompt`,`S8`],e[`guardrails-prompt-s8`]),e[`guardrails-prompt-s9`]!==void 0&&r(_,[`guardrails`,`prompt`,`S9`],e[`guardrails-prompt-s9`]),e[`guardrails-response-p1`]!==void 0&&r(_,[`guardrails`,`response`,`P1`],e[`guardrails-response-p1`]),e[`guardrails-response-s1`]!==void 0&&r(_,[`guardrails`,`response`,`S1`],e[`guardrails-response-s1`]),e[`guardrails-response-s10`]!==void 0&&r(_,[`guardrails`,`response`,`S10`],e[`guardrails-response-s10`]),e[`guardrails-response-s11`]!==void 0&&r(_,[`guardrails`,`response`,`S11`],e[`guardrails-response-s11`]),e[`guardrails-response-s12`]!==void 0&&r(_,[`guardrails`,`response`,`S12`],e[`guardrails-response-s12`]),e[`guardrails-response-s13`]!==void 0&&r(_,[`guardrails`,`response`,`S13`],e[`guardrails-response-s13`]),e[`guardrails-response-s14`]!==void 0&&r(_,[`guardrails`,`response`,`S14`],e[`guardrails-response-s14`]),e[`guardrails-response-s2`]!==void 0&&r(_,[`guardrails`,`response`,`S2`],e[`guardrails-response-s2`]),e[`guardrails-response-s3`]!==void 0&&r(_,[`guardrails`,`response`,`S3`],e[`guardrails-response-s3`]),e[`guardrails-response-s4`]!==void 0&&r(_,[`guardrails`,`response`,`S4`],e[`guardrails-response-s4`]),e[`guardrails-response-s5`]!==void 0&&r(_,[`guardrails`,`response`,`S5`],e[`guardrails-response-s5`]),e[`guardrails-response-s6`]!==void 0&&r(_,[`guardrails`,`response`,`S6`],e[`guardrails-response-s6`]),e[`guardrails-response-s7`]!==void 0&&r(_,[`guardrails`,`response`,`S7`],e[`guardrails-response-s7`]),e[`guardrails-response-s8`]!==void 0&&r(_,[`guardrails`,`response`,`S8`],e[`guardrails-response-s8`]),e[`guardrails-response-s9`]!==void 0&&r(_,[`guardrails`,`response`,`S9`],e[`guardrails-response-s9`]),e[`log-classification`]!==void 0&&r(_,[`log_classification`],e[`log-classification`]),e[`log-management`]!==void 0&&r(_,[`log_management`],e[`log-management`]),e[`log-management-strategy`]!==void 0&&r(_,[`log_management_strategy`],e[`log-management-strategy`]),e.logpush!==void 0&&r(_,[`logpush`],e.logpush),e[`logpush-public-key`]!==void 0&&r(_,[`logpush_public_key`],d(e[`logpush-public-key`],`logpush-public-key`,`text`)),e.otel!==void 0&&r(_,[`otel`],a(e.otel,`otel`)),e[`rate-limiting-interval`]!==void 0&&r(_,[`rate_limiting_interval`],e[`rate-limiting-interval`]),e[`rate-limiting-limit`]!==void 0&&r(_,[`rate_limiting_limit`],e[`rate-limiting-limit`]),e[`rate-limiting-technique`]!==void 0&&r(_,[`rate_limiting_technique`],e[`rate-limiting-technique`]),e[`retry-backoff`]!==void 0&&r(_,[`retry_backoff`],e[`retry-backoff`]),e[`retry-delay`]!==void 0&&r(_,[`retry_delay`],e[`retry-delay`]),e[`retry-max-attempts`]!==void 0&&r(_,[`retry_max_attempts`],e[`retry-max-attempts`]),e[`spend-limits-enabled`]!==void 0&&r(_,[`spend_limits`,`enabled`],e[`spend-limits-enabled`]),e[`spend-limits-rules`]!==void 0&&r(_,[`spend_limits`,`rules`],a(e[`spend-limits-rules`],`spend-limits-rules`)),e[`store-id`]!==void 0&&r(_,[`store_id`],d(e[`store-id`],`store-id`,`text`)),e[`stripe-authorization`]!==void 0&&r(_,[`stripe`,`authorization`],d(e[`stripe-authorization`],`stripe-authorization`,`text`)),e[`stripe-usage-events`]!==void 0&&r(_,[`stripe`,`usage_events`],a(e[`stripe-usage-events`],`stripe-usage-events`)),e[`workers-ai-billing-mode`]!==void 0&&r(_,[`workers_ai_billing_mode`],e[`workers-ai-billing-mode`]),e.zdr!==void 0&&r(_,[`zdr`],e.zdr);let v=await h(`Updating`,async()=>t(p,`PUT`,`/accounts/${g}/ai-gateway/gateways/${encodeURIComponent(String(e[`gateway-id`]))}`,{body:_}));m(v,{successLabel:`Updated`})})},st={command:`gateways`,describe:`Create and configure AI Gateways for an account`,builder:e=>e.command(Me).command(Pe).command(Re).command(Ie).command(Ve).command(ot).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ct={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/logs`,query:[`order_by`,`order_by_direction`,`filters`,`limit`],errors:{400:`BadRequestError`}};function lt(e){return e.usage(`$0 ai-gateway logs delete <gateway-id>
64
+ Updates the configuration of an AI Gateway, such as its caching, rate limiting, spend limits, 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:`Require authentication for gateway access. New gateways must have authentication enabled. Once enabled, authentication cannot be disabled.`}).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`]}).coerce(`guardrails-prompt-p1`,e=>d(e,`guardrails-prompt-p1`,`text`)).option(`guardrails-prompt-s1`,{type:`string`,description:`The guardrails.prompt.S1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s1`,e=>d(e,`guardrails-prompt-s1`,`text`)).option(`guardrails-prompt-s10`,{type:`string`,description:`The guardrails.prompt.S10 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s10`,e=>d(e,`guardrails-prompt-s10`,`text`)).option(`guardrails-prompt-s11`,{type:`string`,description:`The guardrails.prompt.S11 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s11`,e=>d(e,`guardrails-prompt-s11`,`text`)).option(`guardrails-prompt-s12`,{type:`string`,description:`The guardrails.prompt.S12 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s12`,e=>d(e,`guardrails-prompt-s12`,`text`)).option(`guardrails-prompt-s13`,{type:`string`,description:`The guardrails.prompt.S13 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s13`,e=>d(e,`guardrails-prompt-s13`,`text`)).option(`guardrails-prompt-s14`,{type:`string`,description:`The guardrails.prompt.S14 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s14`,e=>d(e,`guardrails-prompt-s14`,`text`)).option(`guardrails-prompt-s2`,{type:`string`,description:`The guardrails.prompt.S2 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s2`,e=>d(e,`guardrails-prompt-s2`,`text`)).option(`guardrails-prompt-s3`,{type:`string`,description:`The guardrails.prompt.S3 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s3`,e=>d(e,`guardrails-prompt-s3`,`text`)).option(`guardrails-prompt-s4`,{type:`string`,description:`The guardrails.prompt.S4 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s4`,e=>d(e,`guardrails-prompt-s4`,`text`)).option(`guardrails-prompt-s5`,{type:`string`,description:`The guardrails.prompt.S5 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s5`,e=>d(e,`guardrails-prompt-s5`,`text`)).option(`guardrails-prompt-s6`,{type:`string`,description:`The guardrails.prompt.S6 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s6`,e=>d(e,`guardrails-prompt-s6`,`text`)).option(`guardrails-prompt-s7`,{type:`string`,description:`The guardrails.prompt.S7 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s7`,e=>d(e,`guardrails-prompt-s7`,`text`)).option(`guardrails-prompt-s8`,{type:`string`,description:`The guardrails.prompt.S8 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s8`,e=>d(e,`guardrails-prompt-s8`,`text`)).option(`guardrails-prompt-s9`,{type:`string`,description:`The guardrails.prompt.S9 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-prompt-s9`,e=>d(e,`guardrails-prompt-s9`,`text`)).option(`guardrails-response-p1`,{type:`string`,description:`The guardrails.response.P1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-p1`,e=>d(e,`guardrails-response-p1`,`text`)).option(`guardrails-response-s1`,{type:`string`,description:`The guardrails.response.S1 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s1`,e=>d(e,`guardrails-response-s1`,`text`)).option(`guardrails-response-s10`,{type:`string`,description:`The guardrails.response.S10 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s10`,e=>d(e,`guardrails-response-s10`,`text`)).option(`guardrails-response-s11`,{type:`string`,description:`The guardrails.response.S11 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s11`,e=>d(e,`guardrails-response-s11`,`text`)).option(`guardrails-response-s12`,{type:`string`,description:`The guardrails.response.S12 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s12`,e=>d(e,`guardrails-response-s12`,`text`)).option(`guardrails-response-s13`,{type:`string`,description:`The guardrails.response.S13 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s13`,e=>d(e,`guardrails-response-s13`,`text`)).option(`guardrails-response-s14`,{type:`string`,description:`The guardrails.response.S14 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s14`,e=>d(e,`guardrails-response-s14`,`text`)).option(`guardrails-response-s2`,{type:`string`,description:`The guardrails.response.S2 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s2`,e=>d(e,`guardrails-response-s2`,`text`)).option(`guardrails-response-s3`,{type:`string`,description:`The guardrails.response.S3 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s3`,e=>d(e,`guardrails-response-s3`,`text`)).option(`guardrails-response-s4`,{type:`string`,description:`The guardrails.response.S4 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s4`,e=>d(e,`guardrails-response-s4`,`text`)).option(`guardrails-response-s5`,{type:`string`,description:`The guardrails.response.S5 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s5`,e=>d(e,`guardrails-response-s5`,`text`)).option(`guardrails-response-s6`,{type:`string`,description:`The guardrails.response.S6 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s6`,e=>d(e,`guardrails-response-s6`,`text`)).option(`guardrails-response-s7`,{type:`string`,description:`The guardrails.response.S7 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s7`,e=>d(e,`guardrails-response-s7`,`text`)).option(`guardrails-response-s8`,{type:`string`,description:`The guardrails.response.S8 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s8`,e=>d(e,`guardrails-response-s8`,`text`)).option(`guardrails-response-s9`,{type:`string`,description:`The guardrails.response.S9 field`,choices:[`FLAG`,`BLOCK`]}).coerce(`guardrails-response-s9`,e=>d(e,`guardrails-response-s9`,`text`)).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`]}).coerce(`log-management-strategy`,e=>d(e,`log-management-strategy`,`text`)).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. Shape: [{"headers": {...}, "url": string, "authorization"?: string, "content_type"?: "json" | "protobuf"}]. ? marks optional keys.`}).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`]}).coerce(`rate-limiting-technique`,e=>d(e,`rate-limiting-technique`,`text`)).option(`retry-backoff`,{type:`string`,description:`Backoff strategy for retry delays`,choices:[`constant`,`linear`,`exponential`]}).coerce(`retry-backoff`,e=>d(e,`retry-backoff`,`text`)).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(`spend-limits-rules`,{type:`string`,description:`The spend_limits.rules field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"limit": number, "limitType": "cost", "window": number, "enabled"?: boolean, "id"?: string, ...more}]. ? marks optional keys.`}).option(`store-id`,{type:`string`,description:`Secrets Store used by this gateway. Omit on update to keep the current store. Cannot be cleared while stored keys or secret references depend on it.`}).option(`stripe-authorization`,{type:`string`,description:`The stripe.authorization field`}).option(`stripe-usage-events`,{type:`string`,description:`The stripe.usage_events field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"payload": string}].`}).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`]}).coerce(`workers-ai-billing-mode`,e=>d(e,`workers-ai-billing-mode`,`text`)).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=>{let t=[`stripe-authorization`,`stripe-usage-events`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`stripe-authorization`,`stripe-usage-events`].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 ot={command:`update <gateway-id>`,describe:`Update a gateway`,builder:at,handler:async e=>p({command:`ai-gateway gateways update`,classification:{safeFlags:/* @__PURE__ */ `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-s14.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-s14.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(`.`)}},e,async()=>{if(e.dryRun){let t=await c();u({command:`cf ai-gateway gateways update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}`,pathParams:{"gateway-id":String(e[`gateway-id`]??``)},bodyKind:`json`,body:e.body===void 0?s({authentication:e.authentication,byok_only:e[`byok-only`],cache_invalidate_on_update:e[`cache-invalidate-on-update`],cache_ttl:e[`cache-ttl`],collect_logs:e[`collect-logs`],guardrails:{prompt:{P1:e[`guardrails-prompt-p1`],S1:e[`guardrails-prompt-s1`],S10:e[`guardrails-prompt-s10`],S11:e[`guardrails-prompt-s11`],S12:e[`guardrails-prompt-s12`],S13:e[`guardrails-prompt-s13`],S14:e[`guardrails-prompt-s14`],S2:e[`guardrails-prompt-s2`],S3:e[`guardrails-prompt-s3`],S4:e[`guardrails-prompt-s4`],S5:e[`guardrails-prompt-s5`],S6:e[`guardrails-prompt-s6`],S7:e[`guardrails-prompt-s7`],S8:e[`guardrails-prompt-s8`],S9:e[`guardrails-prompt-s9`]},response:{P1:e[`guardrails-response-p1`],S1:e[`guardrails-response-s1`],S10:e[`guardrails-response-s10`],S11:e[`guardrails-response-s11`],S12:e[`guardrails-response-s12`],S13:e[`guardrails-response-s13`],S14:e[`guardrails-response-s14`],S2:e[`guardrails-response-s2`],S3:e[`guardrails-response-s3`],S4:e[`guardrails-response-s4`],S5:e[`guardrails-response-s5`],S6:e[`guardrails-response-s6`],S7:e[`guardrails-response-s7`],S8:e[`guardrails-response-s8`],S9:e[`guardrails-response-s9`]}},log_classification:e[`log-classification`],log_management:e[`log-management`],log_management_strategy:e[`log-management-strategy`],logpush:e.logpush,logpush_public_key:d(e[`logpush-public-key`],`logpush-public-key`,`text`),otel:a(e.otel,`otel`),rate_limiting_interval:e[`rate-limiting-interval`],rate_limiting_limit:e[`rate-limiting-limit`],rate_limiting_technique:e[`rate-limiting-technique`],retry_backoff:e[`retry-backoff`],retry_delay:e[`retry-delay`],retry_max_attempts:e[`retry-max-attempts`],spend_limits:{enabled:e[`spend-limits-enabled`],rules:a(e[`spend-limits-rules`],`spend-limits-rules`)},store_id:d(e[`store-id`],`store-id`,`text`),stripe:{authorization:d(e[`stripe-authorization`],`stripe-authorization`,`text`),usage_events:a(e[`stripe-usage-events`],`stripe-usage-events`)},workers_ai_billing_mode:e[`workers-ai-billing-mode`],zdr:e.zdr}):o(e.body)});return}let i=e.body===void 0?void 0:o(e.body),p=await n(e),g=e.local?f:await l();if(e.accountId=g,e.body!==void 0){let n=i,r=await h(`Updating`,async()=>t(p,`PUT`,`/accounts/${g}/ai-gateway/gateways/${encodeURIComponent(String(e[`gateway-id`]))}`,{body:n}));m(r,{successLabel:`Updated`});return}if(e[`cache-invalidate-on-update`]===void 0)throw Error(`--cache-invalidate-on-update is required (or pass --body with this field set).`);if(e[`cache-ttl`]===void 0)throw Error(`--cache-ttl is required (or pass --body with this field set).`);if(e[`collect-logs`]===void 0)throw Error(`--collect-logs is required (or pass --body with this field set).`);if(e[`rate-limiting-interval`]===void 0)throw Error(`--rate-limiting-interval is required (or pass --body with this field set).`);if(e[`rate-limiting-limit`]===void 0)throw Error(`--rate-limiting-limit is required (or pass --body with this field set).`);let _={};e.authentication!==void 0&&r(_,[`authentication`],e.authentication),e[`byok-only`]!==void 0&&r(_,[`byok_only`],e[`byok-only`]),e[`cache-invalidate-on-update`]!==void 0&&r(_,[`cache_invalidate_on_update`],e[`cache-invalidate-on-update`]),e[`cache-ttl`]!==void 0&&r(_,[`cache_ttl`],e[`cache-ttl`]),e[`collect-logs`]!==void 0&&r(_,[`collect_logs`],e[`collect-logs`]),e[`guardrails-prompt-p1`]!==void 0&&r(_,[`guardrails`,`prompt`,`P1`],e[`guardrails-prompt-p1`]),e[`guardrails-prompt-s1`]!==void 0&&r(_,[`guardrails`,`prompt`,`S1`],e[`guardrails-prompt-s1`]),e[`guardrails-prompt-s10`]!==void 0&&r(_,[`guardrails`,`prompt`,`S10`],e[`guardrails-prompt-s10`]),e[`guardrails-prompt-s11`]!==void 0&&r(_,[`guardrails`,`prompt`,`S11`],e[`guardrails-prompt-s11`]),e[`guardrails-prompt-s12`]!==void 0&&r(_,[`guardrails`,`prompt`,`S12`],e[`guardrails-prompt-s12`]),e[`guardrails-prompt-s13`]!==void 0&&r(_,[`guardrails`,`prompt`,`S13`],e[`guardrails-prompt-s13`]),e[`guardrails-prompt-s14`]!==void 0&&r(_,[`guardrails`,`prompt`,`S14`],e[`guardrails-prompt-s14`]),e[`guardrails-prompt-s2`]!==void 0&&r(_,[`guardrails`,`prompt`,`S2`],e[`guardrails-prompt-s2`]),e[`guardrails-prompt-s3`]!==void 0&&r(_,[`guardrails`,`prompt`,`S3`],e[`guardrails-prompt-s3`]),e[`guardrails-prompt-s4`]!==void 0&&r(_,[`guardrails`,`prompt`,`S4`],e[`guardrails-prompt-s4`]),e[`guardrails-prompt-s5`]!==void 0&&r(_,[`guardrails`,`prompt`,`S5`],e[`guardrails-prompt-s5`]),e[`guardrails-prompt-s6`]!==void 0&&r(_,[`guardrails`,`prompt`,`S6`],e[`guardrails-prompt-s6`]),e[`guardrails-prompt-s7`]!==void 0&&r(_,[`guardrails`,`prompt`,`S7`],e[`guardrails-prompt-s7`]),e[`guardrails-prompt-s8`]!==void 0&&r(_,[`guardrails`,`prompt`,`S8`],e[`guardrails-prompt-s8`]),e[`guardrails-prompt-s9`]!==void 0&&r(_,[`guardrails`,`prompt`,`S9`],e[`guardrails-prompt-s9`]),e[`guardrails-response-p1`]!==void 0&&r(_,[`guardrails`,`response`,`P1`],e[`guardrails-response-p1`]),e[`guardrails-response-s1`]!==void 0&&r(_,[`guardrails`,`response`,`S1`],e[`guardrails-response-s1`]),e[`guardrails-response-s10`]!==void 0&&r(_,[`guardrails`,`response`,`S10`],e[`guardrails-response-s10`]),e[`guardrails-response-s11`]!==void 0&&r(_,[`guardrails`,`response`,`S11`],e[`guardrails-response-s11`]),e[`guardrails-response-s12`]!==void 0&&r(_,[`guardrails`,`response`,`S12`],e[`guardrails-response-s12`]),e[`guardrails-response-s13`]!==void 0&&r(_,[`guardrails`,`response`,`S13`],e[`guardrails-response-s13`]),e[`guardrails-response-s14`]!==void 0&&r(_,[`guardrails`,`response`,`S14`],e[`guardrails-response-s14`]),e[`guardrails-response-s2`]!==void 0&&r(_,[`guardrails`,`response`,`S2`],e[`guardrails-response-s2`]),e[`guardrails-response-s3`]!==void 0&&r(_,[`guardrails`,`response`,`S3`],e[`guardrails-response-s3`]),e[`guardrails-response-s4`]!==void 0&&r(_,[`guardrails`,`response`,`S4`],e[`guardrails-response-s4`]),e[`guardrails-response-s5`]!==void 0&&r(_,[`guardrails`,`response`,`S5`],e[`guardrails-response-s5`]),e[`guardrails-response-s6`]!==void 0&&r(_,[`guardrails`,`response`,`S6`],e[`guardrails-response-s6`]),e[`guardrails-response-s7`]!==void 0&&r(_,[`guardrails`,`response`,`S7`],e[`guardrails-response-s7`]),e[`guardrails-response-s8`]!==void 0&&r(_,[`guardrails`,`response`,`S8`],e[`guardrails-response-s8`]),e[`guardrails-response-s9`]!==void 0&&r(_,[`guardrails`,`response`,`S9`],e[`guardrails-response-s9`]),e[`log-classification`]!==void 0&&r(_,[`log_classification`],e[`log-classification`]),e[`log-management`]!==void 0&&r(_,[`log_management`],e[`log-management`]),e[`log-management-strategy`]!==void 0&&r(_,[`log_management_strategy`],e[`log-management-strategy`]),e.logpush!==void 0&&r(_,[`logpush`],e.logpush),e[`logpush-public-key`]!==void 0&&r(_,[`logpush_public_key`],d(e[`logpush-public-key`],`logpush-public-key`,`text`)),e.otel!==void 0&&r(_,[`otel`],a(e.otel,`otel`)),e[`rate-limiting-interval`]!==void 0&&r(_,[`rate_limiting_interval`],e[`rate-limiting-interval`]),e[`rate-limiting-limit`]!==void 0&&r(_,[`rate_limiting_limit`],e[`rate-limiting-limit`]),e[`rate-limiting-technique`]!==void 0&&r(_,[`rate_limiting_technique`],e[`rate-limiting-technique`]),e[`retry-backoff`]!==void 0&&r(_,[`retry_backoff`],e[`retry-backoff`]),e[`retry-delay`]!==void 0&&r(_,[`retry_delay`],e[`retry-delay`]),e[`retry-max-attempts`]!==void 0&&r(_,[`retry_max_attempts`],e[`retry-max-attempts`]),e[`spend-limits-enabled`]!==void 0&&r(_,[`spend_limits`,`enabled`],e[`spend-limits-enabled`]),e[`spend-limits-rules`]!==void 0&&r(_,[`spend_limits`,`rules`],a(e[`spend-limits-rules`],`spend-limits-rules`)),e[`store-id`]!==void 0&&r(_,[`store_id`],d(e[`store-id`],`store-id`,`text`)),e[`stripe-authorization`]!==void 0&&r(_,[`stripe`,`authorization`],d(e[`stripe-authorization`],`stripe-authorization`,`text`)),e[`stripe-usage-events`]!==void 0&&r(_,[`stripe`,`usage_events`],a(e[`stripe-usage-events`],`stripe-usage-events`)),e[`workers-ai-billing-mode`]!==void 0&&r(_,[`workers_ai_billing_mode`],e[`workers-ai-billing-mode`]),e.zdr!==void 0&&r(_,[`zdr`],e.zdr);let v=await h(`Updating`,async()=>t(p,`PUT`,`/accounts/${g}/ai-gateway/gateways/${encodeURIComponent(String(e[`gateway-id`]))}`,{body:_}));m(v,{successLabel:`Updated`})})},st={command:`gateways`,describe:`Create and configure AI Gateways for an account`,builder:e=>e.command(Me).command(Pe).command(Re).command(Ie).command(Ve).command(ot).command(it).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ct={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/logs`,query:[`order_by`,`order_by_direction`,`filters`,`limit`],errors:{400:`BadRequestError`}};function lt(e){return e.usage(`$0 ai-gateway logs delete <gateway-id>
65
65
 
66
66
  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`,array:!0,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 ut={command:`delete <gateway-id>`,describe:`Delete Gateway Logs`,builder:lt,handler:async e=>p({command:`ai-gateway logs delete`,classification:{safeFlags:[`order-by`,`order-by-direction`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={order_by:e[`order-by`],order_by_direction:e[`order-by-direction`],filters:e.filters,limit:e.limit};if(e.dryRun){let n=await c();u({command:`cf ai-gateway logs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/ai-gateway/gateways/${e[`gateway-id`]==null?`<gateway-id>`:encodeURIComponent(String(e[`gateway-id`]))}/logs`,pathParams:{"gateway-id":String(e[`gateway-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),i=e.local?f:await l();if(e.accountId=i,!await _({force:!!e.force,message:`This permanently deletes every stored log entry on the gateway that matches the filters. Deleted logs cannot be recovered.`}))return;let a=await h(`Deleting`,async()=>r.send(ct,{account_id:i,gateway_id:e[`gateway-id`],...t}));m(a,{successLabel:`Deleted`})})};var dt={method:`GET`,path:t=>e`/accounts/${t.account_id}/ai-gateway/gateways/${t.gateway_id}/logs/${t.id}/request`,errors:{404:`NotFoundError`}};function ft(e){return e.usage(`$0 ai-gateway logs get-request <id>
67
67
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{a as e,i as t,n}from"./auth-DA1PHaHi.mjs";import{t as r}from"./path-DRw6Y-nd.mjs";import{t as i}from"./dry-run-qsnRlRk6.mjs";import{n as a,t as o}from"./local-B3zt9PXR.mjs";import{a as s,t as c}from"./context-BGm5_wTT.mjs";import{t as l}from"./output-hFMAotFl.mjs";import{t as u}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import{n as d,t as f}from"./run-CXWkMU3x.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{r as h,t as g}from"./body-parser-HN91kAf0.mjs";import{a as _,i as ee,n as te}from"./prompt-D274Im1O.mjs";import{a as ne,i as re,n as v,r as ie,t as y}from"./schema-cache-CtqAs0PP.mjs";import{n as b}from"./raw-fetch-DhlyWQtk.mjs";import{c as x,f as ae,i as oe,l as S,n as se,p as ce,r as C,s as w,t as T,u as E}from"./schema-flags-DO3kLYBu.mjs";import{r as D}from"./theme-BGHWSKCw.mjs";var O={method:`GET`,path:e=>r`/accounts/${e.account_id}/ai/authors/search`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 ai authors list
2
+ import"./api-Dnt6lRJG.mjs";import{a as e,i as t,n}from"./auth-cj71dGxS.mjs";import{t as r}from"./path-DRw6Y-nd.mjs";import{t as i}from"./dry-run-mrA7FFLR.mjs";import{n as a,t as o}from"./local-B3zt9PXR.mjs";import{a as s,t as c}from"./context-DlFhI9cN.mjs";import{t as l}from"./output-PRKYaJuo.mjs";import{t as u}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import{n as d,t as f}from"./run-DAg7dfIW.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{r as h,t as g}from"./body-parser-HN91kAf0.mjs";import{a as _,i as ee,n as te}from"./prompt-Bnon9lfK.mjs";import{a as ne,i as re,n as v,r as ie,t as y}from"./schema-cache-CTVUtkAl.mjs";import{n as b}from"./raw-fetch-0T1SwPa1.mjs";import{c as x,f as ae,i as oe,l as S,n as se,p as ce,r as C,s as w,t as T,u as E}from"./schema-flags-YgeJ6Bey.mjs";import{r as D}from"./theme-BGHWSKCw.mjs";var O={method:`GET`,path:e=>r`/accounts/${e.account_id}/ai/authors/search`,errors:{400:`BadRequestError`}};function k(e){return e.usage(`$0 ai authors list
3
3
 
4
4
  Searches Workers AI models by author or organization name.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`Author Search`,builder:k,handler:async e=>f({command:`ai authors list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await s();i({command:`cf ai authors list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/ai/authors/search`,pathParams:{},bodyKind:`none`});return}let t=await n(e),r=e.local?o:await c();e.accountId=r;let a=await u(`Loading`,async()=>t.send(O,{account_id:r}));l(a,{successLabel:`Loaded`})})},j={command:`authors`,describe:`Operations for authors`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 ai finetunes assets create <finetune-id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{c as r,i,n as a,o,r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{t as l}from"./dry-run-qsnRlRk6.mjs";import{a as u,t as d}from"./context-BGm5_wTT.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{t as m}from"./local-B3zt9PXR.mjs";import{t as h}from"./output-hFMAotFl.mjs";import{t as g}from"./run-CXWkMU3x.mjs";import{t as _}from"./progress-DE_G09u2.mjs";import"./telemetry-COlodX5Z.mjs";import"./api-Dnt6lRJG.mjs";import{a as v,i as y,n as b}from"./prompt-D274Im1O.mjs";import{n as ee,t as te}from"./raw-fetch-DhlyWQtk.mjs";function ne(e){return e.usage(`$0 ai-search chat-completions <instance-id>
2
+ import{i as e,n as t}from"./auth-cj71dGxS.mjs";import{t as n}from"./path-DRw6Y-nd.mjs";import{c as r,i,n as a,o,r as s,t as c}from"./body-parser-HN91kAf0.mjs";import{t as l}from"./dry-run-mrA7FFLR.mjs";import{a as u,t as d}from"./context-DlFhI9cN.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{t as m}from"./local-B3zt9PXR.mjs";import{t as h}from"./output-PRKYaJuo.mjs";import{t as g}from"./run-DAg7dfIW.mjs";import{t as _}from"./progress-AML-AVs4.mjs";import"./telemetry-DDs3zhdw.mjs";import"./api-Dnt6lRJG.mjs";import{a as v,i as y,n as b}from"./prompt-Bnon9lfK.mjs";import{n as ee,t as te}from"./raw-fetch-0T1SwPa1.mjs";function ne(e){return e.usage(`$0 ai-search chat-completions <instance-id>
3
3
 
4
4
  Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`instance-id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace to use for this operation.`,default:`default`}).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`]}).coerce(`ai-search-options-cache-cache-threshold`,e=>f(e,`ai-search-options-cache-cache-threshold`,`text`)).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-custom-metadata`,{type:`string`,description:`Metadata added to AI Gateway logs for requests this operation triggers. Accepts up to 2 string, number, or boolean entries. Reserved keys: 'ai-search', 'task', 'origin', and any key beginning with 'cf.'. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (string | number | boolean)}.`}).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:`Minimum reranker relevance score a chunk must reach to be returned. When omitted, falls back to the instance-level score_threshold, then to 0.4.`}).option(`ai-search-options-reranking-model`,{type:`string`,description:`The ai_search_options.reranking.model field`}).option(`ai-search-options-retrieval-boost-by`,{type:`string`,description:`Metadata fields to boost search results by. Overrides the instance-level boost_by config. Direction defaults to 'asc' for numeric/datetime fields, 'exists' for text/boolean fields. Fields must match 'timestamp' or a defined custom_metadata field. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"field": string, "direction"?: "asc" | "desc" | "exists" | ...more}]. ? marks optional keys.`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-filters`,{type:`string`,description:`The ai_search_options.retrieval.filters field. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": unknown}.`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).coerce(`ai-search-options-retrieval-fusion-method`,e=>f(e,`ai-search-options-retrieval-fusion-method`,`text`)).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents become candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term and ranks results according to BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).coerce(`ai-search-options-retrieval-keyword-match-mode`,e=>f(e,`ai-search-options-retrieval-keyword-match-mode`,`text`)).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`Minimum similarity score a chunk must reach to be returned. When omitted, falls back to the instance-level score_threshold, then to 0.4.`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`Maximum number of results to return. When omitted, falls back to the instance-level max_num_results, then to 10.`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).coerce(`ai-search-options-retrieval-retrieval-type`,e=>f(e,`ai-search-options-retrieval-retrieval-type`,`text`)).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. Shape: [{"content": (string | [{...}] | null), "role": "system" | "developer" | "user" | ...more, "<key>": unknown}].`}).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 re={command:`chat-completions <instance-id>`,describe:`Chat Completions`,builder:ne,handler:async n=>g({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`]}},n,async()=>{if(n.dryRun){let e=await u();l({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/ai-search/namespaces/${n.namespace==null?`<namespace>`:encodeURIComponent(String(n.namespace))}/instances/${n[`instance-id`]==null?`<instance-id>`:encodeURIComponent(String(n[`instance-id`]))}/chat/completions`,pathParams:{namespace:String(n.namespace??``),"instance-id":String(n[`instance-id`]??``)},bodyKind:`json`,body:n.body===void 0?c({ai_search_options:{cache:{cache_threshold:n[`ai-search-options-cache-cache-threshold`],enabled:n[`ai-search-options-cache-enabled`]},custom_metadata:i(n[`ai-search-options-custom-metadata`],`ai-search-options-custom-metadata`),query_rewrite:{enabled:n[`ai-search-options-query-rewrite-enabled`],model:f(n[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(n[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:n[`ai-search-options-reranking-enabled`],match_threshold:n[`ai-search-options-reranking-match-threshold`],model:f(n[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{boost_by:o(n[`ai-search-options-retrieval-boost-by`],`ai-search-options-retrieval-boost-by`),context_expansion:n[`ai-search-options-retrieval-context-expansion`],filters:i(n[`ai-search-options-retrieval-filters`],`ai-search-options-retrieval-filters`),fusion_method:n[`ai-search-options-retrieval-fusion-method`],keyword_match_mode:n[`ai-search-options-retrieval-keyword-match-mode`],match_threshold:n[`ai-search-options-retrieval-match-threshold`],max_num_results:n[`ai-search-options-retrieval-max-num-results`],retrieval_type:n[`ai-search-options-retrieval-retrieval-type`],return_on_failure:n[`ai-search-options-retrieval-return-on-failure`]}},messages:o(n.messages,`messages`),model:f(n.model,`model`,`text`),stream:n.stream},[[`ai_search_options`,`custom_metadata`],[`ai_search_options`,`retrieval`,`filters`]]):s(n.body)});return}let a=n.body===void 0?void 0:s(n.body),p=await t(n),g=n.local?m:await d();if(n.accountId=g,n.body!==void 0){let t=a,r=await _(`Creating`,async()=>e(p,`POST`,`/accounts/${g}/ai-search/namespaces/${encodeURIComponent(String(n.namespace))}/instances/${encodeURIComponent(String(n[`instance-id`]))}/chat/completions`,{body:t}));h(r,{successLabel:`Created`});return}if(n.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let v={};n[`ai-search-options-cache-cache-threshold`]!==void 0&&r(v,[`ai_search_options`,`cache`,`cache_threshold`],n[`ai-search-options-cache-cache-threshold`]),n[`ai-search-options-cache-enabled`]!==void 0&&r(v,[`ai_search_options`,`cache`,`enabled`],n[`ai-search-options-cache-enabled`]),n[`ai-search-options-custom-metadata`]!==void 0&&r(v,[`ai_search_options`,`custom_metadata`],i(n[`ai-search-options-custom-metadata`],`ai-search-options-custom-metadata`)),n[`ai-search-options-query-rewrite-enabled`]!==void 0&&r(v,[`ai_search_options`,`query_rewrite`,`enabled`],n[`ai-search-options-query-rewrite-enabled`]),n[`ai-search-options-query-rewrite-model`]!==void 0&&r(v,[`ai_search_options`,`query_rewrite`,`model`],f(n[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`)),n[`ai-search-options-query-rewrite-rewrite-prompt`]!==void 0&&r(v,[`ai_search_options`,`query_rewrite`,`rewrite_prompt`],f(n[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)),n[`ai-search-options-reranking-enabled`]!==void 0&&r(v,[`ai_search_options`,`reranking`,`enabled`],n[`ai-search-options-reranking-enabled`]),n[`ai-search-options-reranking-match-threshold`]!==void 0&&r(v,[`ai_search_options`,`reranking`,`match_threshold`],n[`ai-search-options-reranking-match-threshold`]),n[`ai-search-options-reranking-model`]!==void 0&&r(v,[`ai_search_options`,`reranking`,`model`],f(n[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)),n[`ai-search-options-retrieval-boost-by`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`boost_by`],o(n[`ai-search-options-retrieval-boost-by`],`ai-search-options-retrieval-boost-by`)),n[`ai-search-options-retrieval-context-expansion`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`context_expansion`],n[`ai-search-options-retrieval-context-expansion`]),n[`ai-search-options-retrieval-filters`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`filters`],i(n[`ai-search-options-retrieval-filters`],`ai-search-options-retrieval-filters`)),n[`ai-search-options-retrieval-fusion-method`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`fusion_method`],n[`ai-search-options-retrieval-fusion-method`]),n[`ai-search-options-retrieval-keyword-match-mode`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`keyword_match_mode`],n[`ai-search-options-retrieval-keyword-match-mode`]),n[`ai-search-options-retrieval-match-threshold`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`match_threshold`],n[`ai-search-options-retrieval-match-threshold`]),n[`ai-search-options-retrieval-max-num-results`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`max_num_results`],n[`ai-search-options-retrieval-max-num-results`]),n[`ai-search-options-retrieval-retrieval-type`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`retrieval_type`],n[`ai-search-options-retrieval-retrieval-type`]),n[`ai-search-options-retrieval-return-on-failure`]!==void 0&&r(v,[`ai_search_options`,`retrieval`,`return_on_failure`],n[`ai-search-options-retrieval-return-on-failure`]),n.messages!==void 0&&r(v,[`messages`],o(n.messages,`messages`)),n.model!==void 0&&r(v,[`model`],f(n.model,`model`,`text`)),n.stream!==void 0&&r(v,[`stream`],n.stream);let y=await _(`Creating`,async()=>e(p,`POST`,`/accounts/${g}/ai-search/namespaces/${encodeURIComponent(String(n.namespace))}/instances/${encodeURIComponent(String(n[`instance-id`]))}/chat/completions`,{body:v}));h(y,{successLabel:`Created`})})};var x={method:`POST`,path:e=>n`/accounts/${e.account_id}/ai-search/namespaces/${e.namespace}/instances`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,503:`ServiceUnavailableError`}};function S(e){return e.usage(`$0 ai-search create <id>
5
5
 
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{o as s,r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./prompt-D274Im1O.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(e){return e.usage(`$0 ai-security custom-topics get
2
+ import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-cj71dGxS.mjs";import{i as n}from"./context-DlFhI9cN.mjs";import{t as r}from"./dry-run-mrA7FFLR.mjs";import{t as i}from"./output-PRKYaJuo.mjs";import{t as a}from"./progress-AML-AVs4.mjs";import{t as o}from"./run-DAg7dfIW.mjs";import"./telemetry-DDs3zhdw.mjs";import{o as s,r as c,t as l}from"./body-parser-HN91kAf0.mjs";import{n as u}from"./prompt-Bnon9lfK.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`};function f(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 p={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:f,handler:async e=>o({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));i(c,{successLabel:`Loaded`})})};var m={method:`PUT`,path:t=>e`/zones/${t.zone_id}/ai-security/custom-topics`,body:`json`};function h(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 UTF-8 bytes. Text in any language is supported, including spaces, numbers, punctuation, and symbols. Tabs, line breaks, invalid text, and invisible formatting characters are not allowed. - 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. Shape: [{"label": string, "topic": string}].`}).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 g={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:h,handler:async e=>o({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({topics:s(e.topics,`topics`)}):c(e.body)});return}let o=e.body===void 0?void 0:c(e.body),d=await t(e),f=await n({zone:e.zone},d,{quiet:e.quiet});if(e.zoneId=f,!await u({force:!!e.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Updating`,async()=>d.send(m,{body:e,zone_id:f}));i(t,{successLabel:`Updated`});return}let p=l({topics:s(e.topics,`topics`)}),h=await a(`Updating`,async()=>d.send(m,{body:p,zone_id:f}));i(h,{successLabel:`Updated`})})},_={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/ai-security/settings`};function y(e){return e.usage(`$0 ai-security get
5
5