@humain/humain-code 0.4.15 → 0.4.17

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 (309) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +1 -1
  3. package/dist/bundle/agent-monitor.js +1 -1
  4. package/dist/bundle/chunks/anthropic-messages-TSNY5MWH.js +67 -0
  5. package/dist/bundle/chunks/azure-openai-responses-Z4DCXO2G.js +15 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +59 -42
  7. package/dist/bundle/chunks/{chunk-JRX7GYW3.js → chunk-4NFYTS4C.js} +8 -8
  8. package/dist/bundle/chunks/{chunk-MF2NEHP4.js → chunk-4XU7TDAL.js} +939 -560
  9. package/dist/bundle/chunks/{chunk-LUL775V7.js → chunk-5K5RFXXO.js} +4 -4
  10. package/dist/bundle/chunks/chunk-65U7MPF4.js +1790 -0
  11. package/dist/bundle/chunks/{chunk-AIXI6RIE.js → chunk-7PRU6YW3.js} +114 -82
  12. package/dist/bundle/chunks/{chunk-W5YJZKPF.js → chunk-AOL6QG6L.js} +2231 -2399
  13. package/dist/bundle/chunks/chunk-AWCJWXGD.js +212 -0
  14. package/dist/bundle/chunks/{chunk-NNKA2PAP.js → chunk-FHVNUUBF.js} +1 -1
  15. package/dist/bundle/chunks/chunk-FZUJXM6D.js +816 -0
  16. package/dist/bundle/chunks/chunk-IJYVMOB4.js +6 -0
  17. package/dist/bundle/chunks/chunk-LG2PJ6JN.js +131 -0
  18. package/dist/bundle/chunks/chunk-NCQ6WAQK.js +125 -0
  19. package/dist/bundle/chunks/{chunk-Z74ZYQPX.js → chunk-OKALNPTJ.js} +80 -210
  20. package/dist/bundle/chunks/{chunk-OX2IBCCA.js → chunk-PTP2ZHFQ.js} +88 -82
  21. package/dist/bundle/chunks/chunk-PY7SOXCA.js +10 -0
  22. package/dist/bundle/chunks/chunk-Q7VXYXY3.js +7 -0
  23. package/dist/bundle/chunks/{chunk-COF5P635.js → chunk-QEF72EIZ.js} +13 -13
  24. package/dist/bundle/chunks/{chunk-EYIYBQAR.js → chunk-RXOCQRBG.js} +1 -1
  25. package/dist/bundle/chunks/{chunk-BVHXWQLD.js → chunk-SCBU5WOP.js} +1 -1
  26. package/dist/bundle/chunks/{chunk-UDVC7A5S.js → chunk-TIFFHHW6.js} +16 -14
  27. package/dist/bundle/chunks/{chunk-L3J4P5JR.js → chunk-UGJAAWNC.js} +1 -1
  28. package/dist/bundle/chunks/chunk-V76YPIMT.js +48 -0
  29. package/dist/bundle/chunks/{chunk-Y3RFGBG2.js → chunk-X3O5MCKJ.js} +1 -1
  30. package/dist/bundle/chunks/{chunk-KK3KUUMM.js → chunk-X6OTEVGA.js} +71 -66
  31. package/dist/bundle/chunks/chunk-Y26OS23T.js +80 -0
  32. package/dist/bundle/chunks/chunk-YDBNMIA3.js +34 -0
  33. package/dist/bundle/chunks/{chunk-UHLW4KJ7.js → chunk-ZRGFX6T6.js} +92 -89
  34. package/dist/bundle/chunks/{cloudflare-workers-ai-system-one-JGN7NZCV.js → cloudflare-workers-ai-system-one-MUJQ6LT2.js} +1 -1
  35. package/dist/bundle/chunks/{compat-2S3PCPEI.js → compat-ARQPWKBQ.js} +8 -8
  36. package/dist/bundle/chunks/{dist-SGQMXO45.js → dist-D7M52E3X.js} +1416 -866
  37. package/dist/bundle/chunks/dist-LKDZAEUQ.js +7 -0
  38. package/dist/bundle/chunks/{dist-JXEXN6S2.js → dist-XVXV2CL4.js} +1 -1
  39. package/dist/bundle/chunks/dist-cjs-AXBW3N4F.js +182 -0
  40. package/dist/bundle/chunks/{easter-egg-3d-ZJ2JUFOA.js → easter-egg-3d-4SUPLBUF.js} +1 -1
  41. package/dist/bundle/chunks/{execute-LRTXH4YJ.js → execute-NTO3U76E.js} +10 -9
  42. package/dist/bundle/chunks/{extract-OZW5JHG6.js → extract-BKBHK4AK.js} +14 -13
  43. package/dist/bundle/chunks/github-copilot.js +34 -47
  44. package/dist/bundle/chunks/{google-generative-ai-YXXFSTX7.js → google-generative-ai-SJ4JO2MY.js} +2 -2
  45. package/dist/bundle/chunks/{google-vertex-3IVWLYJ5.js → google-vertex-KNLNNDET.js} +2 -2
  46. package/dist/bundle/chunks/host-63SNKK5Y.js +2 -0
  47. package/dist/bundle/chunks/jiti-static-loader-7OZNBOCI.js +2 -0
  48. package/dist/bundle/chunks/{mistral-conversations-Y7GWO3QB.js → mistral-conversations-G3GN6CMT.js} +20 -20
  49. package/dist/bundle/chunks/{node-SPBTZUUS.js → node-DZCAT4Q6.js} +1 -1
  50. package/dist/bundle/chunks/{openai-codex-responses-NSXWHIDT.js → openai-codex-responses-FJFDAWHI.js} +17 -17
  51. package/dist/bundle/chunks/openai-completions-IC7WRLTI.js +82 -0
  52. package/dist/bundle/chunks/{openai-decisions-QWEISDVO.js → openai-decisions-HESOHYZB.js} +1 -1
  53. package/dist/bundle/chunks/openai-responses-XXCYDFSM.js +24 -0
  54. package/dist/bundle/chunks/{openrouter-images-BMVMAROU.js → openrouter-images-DT2HMZNO.js} +1 -1
  55. package/dist/bundle/chunks/pdfjs-EK6K7CXX.js +3593 -0
  56. package/dist/bundle/chunks/{pi-messages-XNEG23NU.js → pi-messages-SAOV3JNW.js} +1 -1
  57. package/dist/bundle/chunks/{typesafe-system-one-62YHYXZV.js → typesafe-system-one-HCMGHK6A.js} +1 -1
  58. package/dist/bundle/chunks/{undici-7EW63V4X.js → undici-N4LWJ3S3.js} +1 -1
  59. package/dist/bundle/chunks/virtual-modules-LP2ULVLW.js +5 -0
  60. package/dist/bundle/cli-runtime.js +3 -3
  61. package/dist/bundle/cli.js +2 -2
  62. package/dist/bundle/flow/package.json +6 -5
  63. package/dist/bundle/index.js +8 -8
  64. package/dist/bundle/rpc-entry.js +3 -3
  65. package/dist/cli/credential-print.d.ts.map +1 -1
  66. package/dist/cli/credential-print.js +4 -4
  67. package/dist/cli/credential-print.js.map +1 -1
  68. package/dist/coordination/adapter/index.d.ts.map +1 -1
  69. package/dist/coordination/adapter/index.js +1 -1
  70. package/dist/coordination/adapter/index.js.map +1 -1
  71. package/dist/coordination/adapter/integration-notices.d.ts +1 -1
  72. package/dist/coordination/adapter/integration-notices.d.ts.map +1 -1
  73. package/dist/coordination/adapter/integration-notices.js +5 -2
  74. package/dist/coordination/adapter/integration-notices.js.map +1 -1
  75. package/dist/coordination/broker/extension-state.js +3 -3
  76. package/dist/coordination/broker/extension-state.js.map +1 -1
  77. package/dist/coordination/transport/framing.d.ts.map +1 -1
  78. package/dist/coordination/transport/framing.js +2 -1
  79. package/dist/coordination/transport/framing.js.map +1 -1
  80. package/dist/core/account-reporting.d.ts +3 -1
  81. package/dist/core/account-reporting.d.ts.map +1 -1
  82. package/dist/core/account-reporting.js +12 -2
  83. package/dist/core/account-reporting.js.map +1 -1
  84. package/dist/core/agent-session-services.d.ts.map +1 -1
  85. package/dist/core/agent-session-services.js +39 -36
  86. package/dist/core/agent-session-services.js.map +1 -1
  87. package/dist/core/agent-session.d.ts +4 -2
  88. package/dist/core/agent-session.d.ts.map +1 -1
  89. package/dist/core/agent-session.js +5 -4
  90. package/dist/core/agent-session.js.map +1 -1
  91. package/dist/core/codex-usage.d.ts +11 -2
  92. package/dist/core/codex-usage.d.ts.map +1 -1
  93. package/dist/core/codex-usage.js +74 -2
  94. package/dist/core/codex-usage.js.map +1 -1
  95. package/dist/core/export-html/template.js +21 -16
  96. package/dist/core/model-config.d.ts +33 -8
  97. package/dist/core/model-config.d.ts.map +1 -1
  98. package/dist/core/model-config.js +22 -4
  99. package/dist/core/model-config.js.map +1 -1
  100. package/dist/core/model-resolver.d.ts +56 -43
  101. package/dist/core/model-resolver.d.ts.map +1 -1
  102. package/dist/core/model-resolver.js +256 -361
  103. package/dist/core/model-resolver.js.map +1 -1
  104. package/dist/core/model-runtime.d.ts +6 -3
  105. package/dist/core/model-runtime.d.ts.map +1 -1
  106. package/dist/core/model-runtime.js +19 -5
  107. package/dist/core/model-runtime.js.map +1 -1
  108. package/dist/core/models-store.d.ts.map +1 -1
  109. package/dist/core/models-store.js +7 -2
  110. package/dist/core/models-store.js.map +1 -1
  111. package/dist/core/oauth-account-pool.d.ts +9 -1
  112. package/dist/core/oauth-account-pool.d.ts.map +1 -1
  113. package/dist/core/oauth-account-pool.js +63 -12
  114. package/dist/core/oauth-account-pool.js.map +1 -1
  115. package/dist/core/prompt-templates.d.ts.map +1 -1
  116. package/dist/core/prompt-templates.js +7 -2
  117. package/dist/core/prompt-templates.js.map +1 -1
  118. package/dist/core/settings-defaults.d.ts +2 -0
  119. package/dist/core/settings-defaults.d.ts.map +1 -1
  120. package/dist/core/settings-defaults.js +2 -0
  121. package/dist/core/settings-defaults.js.map +1 -1
  122. package/dist/core/settings-manager.d.ts +4 -2
  123. package/dist/core/settings-manager.d.ts.map +1 -1
  124. package/dist/core/settings-manager.js +11 -0
  125. package/dist/core/settings-manager.js.map +1 -1
  126. package/dist/core/settings-schema.d.ts +4 -0
  127. package/dist/core/settings-schema.d.ts.map +1 -1
  128. package/dist/core/settings-schema.js +8 -0
  129. package/dist/core/settings-schema.js.map +1 -1
  130. package/dist/core/slash-commands.js +1 -1
  131. package/dist/core/slash-commands.js.map +1 -1
  132. package/dist/core/tools/render-utils.d.ts +2 -0
  133. package/dist/core/tools/render-utils.d.ts.map +1 -1
  134. package/dist/core/tools/render-utils.js +21 -0
  135. package/dist/core/tools/render-utils.js.map +1 -1
  136. package/dist/core/tools/renderers/read.d.ts.map +1 -1
  137. package/dist/core/tools/renderers/read.js +7 -10
  138. package/dist/core/tools/renderers/read.js.map +1 -1
  139. package/dist/core/tools/subagent.d.ts.map +1 -1
  140. package/dist/core/tools/subagent.js +4 -7
  141. package/dist/core/tools/subagent.js.map +1 -1
  142. package/dist/core/trace/redaction.d.ts.map +1 -1
  143. package/dist/core/trace/redaction.js +3 -1
  144. package/dist/core/trace/redaction.js.map +1 -1
  145. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  146. package/dist/extensions/codemode/execute.js +12 -0
  147. package/dist/extensions/codemode/execute.js.map +1 -1
  148. package/dist/extensions/codemode/index.d.ts.map +1 -1
  149. package/dist/extensions/codemode/index.js +5 -0
  150. package/dist/extensions/codemode/index.js.map +1 -1
  151. package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +74 -20
  152. package/dist/humain/flow-accounts-host.d.ts.map +1 -1
  153. package/dist/humain/flow-accounts-host.js +3 -0
  154. package/dist/humain/flow-accounts-host.js.map +1 -1
  155. package/dist/humain/node-provider.d.ts.map +1 -1
  156. package/dist/humain/node-provider.js +2 -0
  157. package/dist/humain/node-provider.js.map +1 -1
  158. package/dist/humain/trace-capture/index.js +3 -3
  159. package/dist/humain/trace-capture/index.js.map +1 -1
  160. package/dist/humain/web-access/vendor/credential-source.d.ts +2 -0
  161. package/dist/humain/web-access/vendor/credential-source.d.ts.map +1 -1
  162. package/dist/humain/web-access/vendor/credential-source.js +50 -4
  163. package/dist/humain/web-access/vendor/credential-source.js.map +1 -1
  164. package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
  165. package/dist/humain/web-access/vendor/curator-page.js +3 -1
  166. package/dist/humain/web-access/vendor/curator-page.js.map +1 -1
  167. package/dist/humain/web-access/vendor/curator-server.d.ts.map +1 -1
  168. package/dist/humain/web-access/vendor/curator-server.js +2 -0
  169. package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
  170. package/dist/humain/web-access/vendor/deepseek.d.ts +4 -0
  171. package/dist/humain/web-access/vendor/deepseek.d.ts.map +1 -0
  172. package/dist/humain/web-access/vendor/deepseek.js +201 -0
  173. package/dist/humain/web-access/vendor/deepseek.js.map +1 -0
  174. package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
  175. package/dist/humain/web-access/vendor/extract.js +4 -2
  176. package/dist/humain/web-access/vendor/extract.js.map +1 -1
  177. package/dist/humain/web-access/vendor/gemini-adc.d.ts.map +1 -1
  178. package/dist/humain/web-access/vendor/gemini-adc.js +49 -5
  179. package/dist/humain/web-access/vendor/gemini-adc.js.map +1 -1
  180. package/dist/humain/web-access/vendor/gemini-search.d.ts +3 -3
  181. package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
  182. package/dist/humain/web-access/vendor/gemini-search.js +11 -4
  183. package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
  184. package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
  185. package/dist/humain/web-access/vendor/index.js +16 -1
  186. package/dist/humain/web-access/vendor/index.js.map +1 -1
  187. package/dist/humain/web-access/vendor/page-query.d.ts.map +1 -1
  188. package/dist/humain/web-access/vendor/page-query.js +12 -6
  189. package/dist/humain/web-access/vendor/page-query.js.map +1 -1
  190. package/dist/humain/web-access/vendor/query-rewrite.d.ts.map +1 -1
  191. package/dist/humain/web-access/vendor/query-rewrite.js +11 -4
  192. package/dist/humain/web-access/vendor/query-rewrite.js.map +1 -1
  193. package/dist/humain/web-access/vendor/searxng.d.ts.map +1 -1
  194. package/dist/humain/web-access/vendor/searxng.js +2 -1
  195. package/dist/humain/web-access/vendor/searxng.js.map +1 -1
  196. package/dist/humain/web-access/vendor/ssrf-protection.d.ts +1 -0
  197. package/dist/humain/web-access/vendor/ssrf-protection.d.ts.map +1 -1
  198. package/dist/humain/web-access/vendor/ssrf-protection.js +10 -0
  199. package/dist/humain/web-access/vendor/ssrf-protection.js.map +1 -1
  200. package/dist/humain/web-access/vendor/summary-review.d.ts.map +1 -1
  201. package/dist/humain/web-access/vendor/summary-review.js +17 -6
  202. package/dist/humain/web-access/vendor/summary-review.js.map +1 -1
  203. package/dist/humain/web-access/vendor/utils.d.ts +2 -0
  204. package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
  205. package/dist/humain/web-access/vendor/utils.js +18 -0
  206. package/dist/humain/web-access/vendor/utils.js.map +1 -1
  207. package/dist/humain/web-access/vendor/web-tool-core.d.ts +2 -0
  208. package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
  209. package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
  210. package/dist/index.d.ts +1 -0
  211. package/dist/index.d.ts.map +1 -1
  212. package/dist/index.js.map +1 -1
  213. package/dist/main.d.ts.map +1 -1
  214. package/dist/main.js +1 -0
  215. package/dist/main.js.map +1 -1
  216. package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  217. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  218. package/dist/modes/interactive/components/settings-selector.js +10 -0
  219. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  220. package/dist/modes/interactive/components/status-indicator.d.ts +5 -0
  221. package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  222. package/dist/modes/interactive/components/status-indicator.js +27 -2
  223. package/dist/modes/interactive/components/status-indicator.js.map +1 -1
  224. package/dist/modes/interactive/components/tool-execution.d.ts +2 -1
  225. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  226. package/dist/modes/interactive/components/tool-execution.js +4 -2
  227. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  228. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  229. package/dist/modes/interactive/components/tree-selector.js +2 -9
  230. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  231. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  232. package/dist/modes/interactive/interactive-mode.js +28 -14
  233. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  234. package/dist/modes/interactive/oauth-account-format.d.ts +4 -4
  235. package/dist/modes/interactive/oauth-account-format.d.ts.map +1 -1
  236. package/dist/modes/interactive/oauth-account-format.js +5 -2
  237. package/dist/modes/interactive/oauth-account-format.js.map +1 -1
  238. package/dist/modes/interactive/session-share.d.ts.map +1 -1
  239. package/dist/modes/interactive/session-share.js +9 -2
  240. package/dist/modes/interactive/session-share.js.map +1 -1
  241. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  242. package/dist/modes/rpc/rpc-mode.js +8 -3
  243. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  244. package/dist/utils/tools-manager.d.ts.map +1 -1
  245. package/dist/utils/tools-manager.js +2 -1
  246. package/dist/utils/tools-manager.js.map +1 -1
  247. package/docs/cli.md +3 -3
  248. package/docs/codemode.md +3 -1
  249. package/docs/coordination.md +6 -0
  250. package/docs/docs.json +4 -0
  251. package/docs/environment-variables.md +4 -0
  252. package/docs/flow.md +6 -0
  253. package/docs/humain-code-forge-flow-walkthrough.md +1 -1
  254. package/docs/humain-code.md +2 -4
  255. package/docs/json.md +2 -2
  256. package/docs/llama-cpp.md +1 -1
  257. package/docs/nvidia-rtx-llama-cpp.md +96 -0
  258. package/docs/rpc-commands.md +1 -1
  259. package/docs/rpc.md +9 -1
  260. package/docs/sessions.md +1 -1
  261. package/docs/settings.md +2 -0
  262. package/docs/trace.md +4 -0
  263. package/docs/usage.md +1 -1
  264. package/examples/extensions/custom-provider-anthropic/package-lock.json +16 -6
  265. package/examples/extensions/custom-provider-anthropic/package.json +2 -2
  266. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  267. package/examples/extensions/gondolin/package-lock.json +16 -16
  268. package/examples/extensions/gondolin/package.json +1 -1
  269. package/examples/extensions/minimal-mode.ts +4 -4
  270. package/examples/extensions/sandbox/package-lock.json +6 -6
  271. package/examples/extensions/sandbox/package.json +2 -2
  272. package/examples/extensions/with-deps/package-lock.json +2 -2
  273. package/examples/extensions/with-deps/package.json +1 -1
  274. package/examples/plugins/pi-example-plugin/package.json +2 -2
  275. package/examples/rpc-subagent-progress-host.ts +6 -2
  276. package/npm-shrinkwrap.json +129 -171
  277. package/package.json +19 -19
  278. package/schemas/models.schema.json +9 -5
  279. package/schemas/settings.schema.json +32 -0
  280. package/src/coordination/UPSTREAM.md +31 -1
  281. package/src/coordination/upstream.json +3 -3
  282. package/src/humain/adhd/UPSTREAM.md +8 -0
  283. package/src/humain/caveman/UPSTREAM.md +19 -3
  284. package/src/humain/caveman/upstream.json +2 -2
  285. package/src/humain/ponytail/UPSTREAM.md +23 -2
  286. package/src/humain/ponytail/upstream.json +8 -8
  287. package/src/humain/ponytail/vendor/skills/ponytail/SKILL.md +1 -1
  288. package/src/humain/ponytail/vendor/skills/ponytail-debt/SKILL.md +1 -2
  289. package/src/humain/ponytail/vendor/skills/ponytail-gain/SKILL.md +0 -1
  290. package/src/humain/web-access/UPSTREAM.md +45 -1
  291. package/src/humain/web-access/upstream.json +4 -4
  292. package/dist/bundle/chunks/anthropic-messages-YSAHA7QM.js +0 -67
  293. package/dist/bundle/chunks/azure-openai-responses-Z5XYDPHS.js +0 -15
  294. package/dist/bundle/chunks/chunk-2TTB6GIB.js +0 -47
  295. package/dist/bundle/chunks/chunk-5JHUWRJN.js +0 -1790
  296. package/dist/bundle/chunks/chunk-A7QKOI62.js +0 -572
  297. package/dist/bundle/chunks/chunk-FRUFMISJ.js +0 -505
  298. package/dist/bundle/chunks/chunk-MG5PX4KU.js +0 -31
  299. package/dist/bundle/chunks/chunk-OEOXBLWI.js +0 -540
  300. package/dist/bundle/chunks/chunk-RYC5BYVE.js +0 -5
  301. package/dist/bundle/chunks/chunk-YJ3NQWES.js +0 -9
  302. package/dist/bundle/chunks/dist-MNSGVI4C.js +0 -7
  303. package/dist/bundle/chunks/dist-cjs-4BMVQ74V.js +0 -179
  304. package/dist/bundle/chunks/host-2RMBOGA7.js +0 -2
  305. package/dist/bundle/chunks/jiti-static-loader-2RCDI6B4.js +0 -2
  306. package/dist/bundle/chunks/openai-completions-WGBQHTYA.js +0 -79
  307. package/dist/bundle/chunks/openai-responses-OKGCSIEY.js +0 -23
  308. package/dist/bundle/chunks/pdfjs-6UVU6XFX.js +0 -3564
  309. package/dist/bundle/chunks/virtual-modules-7HDINPIK.js +0 -5
@@ -1,5 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- var FifoQueue=class{incoming=[];outgoing=[];get length(){return this.incoming.length+this.outgoing.length}enqueue(value){this.incoming.push(value)}dequeue(){if(this.outgoing.length===0)for(;this.incoming.length>0;)this.outgoing.push(this.incoming.pop());return this.outgoing.pop()}},EventStream=class{queue=new FifoQueue;waiting=new FifoQueue;done=!1;finalResultPromise;resolveFinalResult;isComplete;extractResult;constructor(isComplete,extractResult){this.isComplete=isComplete,this.extractResult=extractResult,
3
- this.finalResultPromise=new Promise(resolve=>{this.resolveFinalResult=resolve})}push(event){if(this.done)return;this.isComplete(event)&&(this.done=!0,this.resolveFinalResult(this.extractResult(event)));let waiter=this.waiting.dequeue();waiter?waiter({value:event,done:!1}):this.queue.enqueue(event)}end(result){for(this.done=!0,result!==void 0&&this.resolveFinalResult(result);this.waiting.length>0;)this.waiting.dequeue()({value:void 0,done:!0})}async*[Symbol.asyncIterator](){for(;;)if(this.queue.length>
4
- 0)yield this.queue.dequeue();else{if(this.done)return;{let result=await new Promise(resolve=>this.waiting.enqueue(resolve));if(result.done)return;yield result.value}}}result(){return this.finalResultPromise}},AssistantMessageEventStream=class extends EventStream{#startedAt=Date.now();#startedAtMonotonic=performance.now();constructor(){super(event=>event.type==="done"||event.type==="error",event=>{if(event.type==="done")return event.message;if(event.type==="error")return event.error;throw new Error(
5
- "Unexpected event type for final result")})}push(event){event.type==="done"?this.#time(event.message):event.type==="error"&&this.#time(event.error),super.push(event)}end(result){result!==void 0&&this.#time(result),super.end(result)}#time(message){this.done||message.durationMs!==void 0||message.timestamp<this.#startedAt||(message.durationMs=Math.max(0,Math.round(performance.now()-this.#startedAtMonotonic)))}};function createAssistantMessageEventStream(){return new AssistantMessageEventStream}export{EventStream,AssistantMessageEventStream,createAssistantMessageEventStream};
@@ -1,9 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- function buildProviderErrorPattern(patterns){return new RegExp(patterns.join("|"),"i")}var NON_RETRYABLE_PROVIDER_LIMIT_ERROR_PATTERN=buildProviderErrorPattern(["GoUsageLimitError","FreeUsageLimitError","Monthly usage limit reached","available balance","insufficient_quota","out of budget","quota exceeded","billing","subscription_sharing_usage_limit_exceeded"]),RETRYABLE_PROVIDER_ERROR_PATTERN=buildProviderErrorPattern(["overloaded","server_busy","servers are currently busy","currently experienci\
3
- ng high demand","model is at capacity","rate.?limit","too many requests","429","500","502","503","504","520","524","service.?unavailable","server.?error","internal.?error","provider.?returned.?(?:an.?)?error","exceeded request buffer limit while retrying upstream","network.?error","connection.?error","connection.?refused","connection.?lost","other side closed","fetch failed","getaddrinfo","ENOTFOUND","EAI_AGAIN","upstream.?connect","reset before headers","socket hang up","socket connection was c\
4
- losed","timed? out","timeout","terminated","websocket.?closed","websocket.?error","ended without","stream ended before message_stop","stream ended before a terminal response event","http2 request did not get a response","pending stream has been canceled","retry delay","you can retry your request","try your request again","please retry your request","ResourceExhausted","subscription_sharing_usage_unavailable","subscription_sharing_user_unavailable"]),DEFAULT_MAX_AGENT_RETRY_DELAY_MS=6e4;function retryDelayMs(policy,attempt){
5
- let delay=policy.baseDelayMs*2**Math.max(0,attempt-1),safeDelay=Number.isSafeInteger(delay)?delay:Number.MAX_SAFE_INTEGER;return Math.min(safeDelay,policy.maxAgentDelayMs??DEFAULT_MAX_AGENT_RETRY_DELAY_MS)}var RetrySleepAbortError=class extends Error{constructor(){super("Aborted")}};function sleep(ms,signal){return new Promise((resolve,reject)=>{if(signal?.aborted){reject(new RetrySleepAbortError);return}let timeout=setTimeout(resolve,ms);signal?.addEventListener("abort",()=>{clearTimeout(timeout),
6
- reject(new RetrySleepAbortError)},{once:!0})})}async function retryAssistantCall(produce,policy,signal,callbacks){let maxAttempts=policy?.enabled?policy.maxRetries:0,attempt=0,lastRetry;for(;;){let response=await produce();if(response.stopReason==="aborted")return lastRetry&&await callbacks?.onRetryFinished?.(!1,lastRetry.attempt),response;if(response.stopReason!=="error")return lastRetry&&await callbacks?.onRetryFinished?.(!0,lastRetry.attempt),response;if(attempt>=maxAttempts||!isRetryableAssistantError(
7
- response))return lastRetry&&await callbacks?.onRetryFinished?.(!1,lastRetry.attempt,response.errorMessage),response;attempt++,lastRetry={attempt,errorMessage:response.errorMessage||"Unknown error"};let delayMs=getAssistantRetryDelayMs(response,retryDelayMs(policy,attempt));await callbacks?.onRetryScheduled?.(attempt,maxAttempts,delayMs,lastRetry.errorMessage);try{await sleep(delayMs,signal)}catch(error){if(await callbacks?.onRetryFinished?.(!1,attempt,lastRetry.errorMessage),error instanceof RetrySleepAbortError){
8
- let{errorMessage:_errorMessage,...rest}=response;return{...rest,stopReason:"aborted"}}throw error}await callbacks?.onRetryAttemptStart?.()}}function isRetryableAssistantError(message){if(message.stopReason!=="error"||!message.errorMessage)return!1;let httpError=message.diagnostics?.findLast(entry=>entry.type==="provider_http_error");if(typeof httpError?.details?.retryable=="boolean")return httpError.details.retryable;let errorMessage=message.errorMessage;return NON_RETRYABLE_PROVIDER_LIMIT_ERROR_PATTERN.
9
- test(errorMessage)?!1:RETRYABLE_PROVIDER_ERROR_PATTERN.test(errorMessage)}function getAssistantRetryDelayMs(message,baseDelayMs){let retryAt=message.diagnostics?.findLast(entry=>entry.type==="provider_http_error")?.details?.retryAt;return typeof retryAt=="number"&&Number.isFinite(retryAt)?Math.max(baseDelayMs,retryAt-Date.now()):baseDelayMs}export{DEFAULT_MAX_AGENT_RETRY_DELAY_MS,retryDelayMs,retryAssistantCall,isRetryableAssistantError,getAssistantRetryDelayMs};
@@ -1,7 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{AssistantMessageFrameEncoder,StringEnum,createFauxCore,envApiKeyAuth,fauxAssistantMessage,fauxProvider,fauxText,fauxThinking,fauxToolCall,getOverflowPatterns,isContextOverflow,isRecoverableLength,lazyOAuth,reduceAssistantMessageFrames,typebox_exports,validateToolArguments,validateToolCall}from"./chunk-FRUFMISJ.js";import{DEFAULT_MAX_AGENT_RETRY_DELAY_MS,getAssistantRetryDelayMs,isRetryableAssistantError,retryAssistantCall,retryDelayMs}from"./chunk-YJ3NQWES.js";import{cleanupSessionResources,
3
- getOpenAICodexTokenIdentity,registerSessionResourceCleanup}from"./chunk-DBL35X7L.js";import{parseJsonWithRepair,parseStreamingJson,parseStreamingJsonWhileStreaming,repairJson}from"./chunk-MG5PX4KU.js";import{InMemoryCredentialStore,InMemoryModelsStore,ModelsError,calculateCost,clampThinkingLevel,collapseSystemMessages,commitLoginCredential,contentText,createInitialSystemMessage,createModels,createProvider,declarationsEqual,defaultProviderAuthContext,getCurrentSystemMessage,getCurrentSystemPrompt,
4
- getCurrentTools,getDeclaredTools,getInitialSystemMessage,getModelType,getSupportedThinkingLevels,getSystemMessageText,getToolStateChanges,hasApi,hasNonAdditiveToolChanges,hasToolRedefinitions,isModelType,lazyApi,lazyStream,modelsAreEqual,normalizeContext,renderSystemMessageUpdate,resolveTranscript,resolveTranscriptTools,toToolDeclaration,withoutInitialSystemMessage}from"./chunk-LUL775V7.js";import{AssistantMessageEventStream,EventStream,createAssistantMessageEventStream}from"./chunk-RYC5BYVE.js";
5
- import{appendAssistantMessageDiagnostic,createAssistantMessageDiagnostic,extractDiagnosticError,formatThrownValue,uuidv7}from"./chunk-VEYTRNQC.js";import"./chunk-JXWJOIH4.js";export{AssistantMessageEventStream,AssistantMessageFrameEncoder,DEFAULT_MAX_AGENT_RETRY_DELAY_MS,EventStream,InMemoryCredentialStore,InMemoryModelsStore,ModelsError,StringEnum,typebox_exports as Type,appendAssistantMessageDiagnostic,calculateCost,clampThinkingLevel,cleanupSessionResources,collapseSystemMessages,commitLoginCredential,contentText,createAssistantMessageDiagnostic,createAssistantMessageEventStream,createFauxCore,createInitialSystemMessage,createModels,createProvider,declarationsEqual,
6
- defaultProviderAuthContext,envApiKeyAuth,extractDiagnosticError,fauxAssistantMessage,fauxProvider,fauxText,fauxThinking,fauxToolCall,formatThrownValue,getAssistantRetryDelayMs,getCurrentSystemMessage,getCurrentSystemPrompt,getCurrentTools,getDeclaredTools,getInitialSystemMessage,getModelType,getOpenAICodexTokenIdentity,getOverflowPatterns,getSupportedThinkingLevels,getSystemMessageText,getToolStateChanges,hasApi,hasNonAdditiveToolChanges,hasToolRedefinitions,isContextOverflow,isModelType,isRecoverableLength,
7
- isRetryableAssistantError,lazyApi,lazyOAuth,lazyStream,modelsAreEqual,normalizeContext,parseJsonWithRepair,parseStreamingJson,parseStreamingJsonWhileStreaming,reduceAssistantMessageFrames,registerSessionResourceCleanup,renderSystemMessageUpdate,repairJson,resolveTranscript,resolveTranscriptTools,retryAssistantCall,retryDelayMs,toToolDeclaration,uuidv7,validateToolArguments,validateToolCall,withoutInitialSystemMessage};
@@ -1,179 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{client_exports as client_exports2,dist_es_exports,httpAuthSchemes_exports,init_client as init_client2,init_dist_es,init_httpAuthSchemes,init_protocols,init_protocols2,init_retry,protocols_exports,protocols_exports2,require_dist_cjs,require_dist_cjs3 as require_dist_cjs2,retry_exports}from"./chunk-COF5P635.js";import{checksum_exports,client_exports,config_exports,endpoints_exports,init_checksum,init_client,init_config,init_endpoints,init_schema,init_serde,schema_exports,serde_exports}from"./chunk-H2FY3PEV.js";
3
- import{__commonJS,__require,__toCommonJS}from"./chunk-JXWJOIH4.js";var require_compressStream=__commonJS({"node_modules/@smithy/middleware-compression/dist-cjs/compressStream.js"(exports){var{createGzip}=__require("node:zlib");exports.compressStream=async body=>body.pipe(createGzip())}});var require_compressString=__commonJS({"node_modules/@smithy/middleware-compression/dist-cjs/compressString.js"(exports){var{promisify}=__require("node:util"),{gzip}=__require("node:zlib"),{toUint8Array}=(init_serde(),__toCommonJS(serde_exports)),gzipAsync=promisify(gzip);exports.compressString=async body=>{try{let compressedBuffer=await gzipAsync(toUint8Array(body||""));return toUint8Array(compressedBuffer)}catch(err){throw new Error("Failure during compression: "+err.message)}}}});var require_dist_cjs3=__commonJS({"node_modules/@smithy/middleware-compression/dist-cjs/index.js"(exports){var{booleanSelector,SelectorType,numberSelector}=(init_config(),__toCommonJS(config_exports)),{setFeature}=(init_dist_es(),__toCommonJS(dist_es_exports)),{HttpRequest}=(init_protocols(),__toCommonJS(protocols_exports)),{compressStream}=require_compressStream(),{compressString}=require_compressString(),{isArrayBuffer}=(init_serde(),__toCommonJS(serde_exports)),{normalizeProvider}=(init_client(),__toCommonJS(client_exports)),
4
- NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME="AWS_DISABLE_REQUEST_COMPRESSION",NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME="disable_request_compression",DEFAULT_DISABLE_REQUEST_COMPRESSION=!1,NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS={environmentVariableSelector:env=>booleanSelector(env,NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME,SelectorType.ENV),configFileSelector:profile=>booleanSelector(profile,NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME,SelectorType.CONFIG),default:DEFAULT_DISABLE_REQUEST_COMPRESSION},
5
- NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME="AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES",NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME="request_min_compression_size_bytes",DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES=10240,NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS={environmentVariableSelector:env=>numberSelector(env,NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME,SelectorType.ENV),configFileSelector:profile=>numberSelector(profile,NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME,
6
- SelectorType.CONFIG),default:DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES},CompressionAlgorithm;(function(CompressionAlgorithm2){CompressionAlgorithm2.GZIP="gzip"})(CompressionAlgorithm||(CompressionAlgorithm={}));var CLIENT_SUPPORTED_ALGORITHMS=[CompressionAlgorithm.GZIP],isStreaming=body=>body!==void 0&&typeof body!="string"&&!ArrayBuffer.isView(body)&&!isArrayBuffer(body),compressionMiddleware=(config,middlewareConfig)=>(next,context)=>async args=>{if(!HttpRequest.isInstance(args.request)||
7
- await config.disableRequestCompression())return next(args);let{request}=args,{body,headers}=request,{encodings,streamRequiresLength}=middlewareConfig,updatedBody=body,updatedHeaders=headers;for(let algorithm of encodings)if(CLIENT_SUPPORTED_ALGORITHMS.includes(algorithm)){let isRequestCompressed=!1;if(isStreaming(body))if(!streamRequiresLength)updatedBody=await compressStream(body),isRequestCompressed=!0;else throw new Error("Compression is not supported for streaming blobs that require a length\
8
- .");else{let bodyLength=config.bodyLengthChecker(body),requestMinCompressionSizeBytes=await config.requestMinCompressionSizeBytes();bodyLength&&bodyLength>=requestMinCompressionSizeBytes&&(updatedBody=await compressString(body),isRequestCompressed=!0)}if(isRequestCompressed){headers["content-encoding"]?updatedHeaders={...headers,"content-encoding":`${headers["content-encoding"]}, ${algorithm}`}:updatedHeaders={...headers,"content-encoding":algorithm},updatedHeaders["content-encoding"].includes("\
9
- gzip")&&setFeature(context,"GZIP_REQUEST_COMPRESSION","L");break}}return next({...args,request:{...request,body:updatedBody,headers:updatedHeaders}})},compressionMiddlewareOptions={name:"compressionMiddleware",step:"build",tags:["REQUEST_BODY_COMPRESSION","GZIP"],override:!0,priority:"high"},getCompressionPlugin=(config,middlewareConfig)=>({applyToStack:clientStack=>{clientStack.add(compressionMiddleware(config,middlewareConfig),compressionMiddlewareOptions)}}),resolveCompressionConfig=input=>{let{
10
- disableRequestCompression,requestMinCompressionSizeBytes:_requestMinCompressionSizeBytes}=input;return Object.assign(input,{disableRequestCompression:normalizeProvider(disableRequestCompression),requestMinCompressionSizeBytes:async()=>{let requestMinCompressionSizeBytes=await normalizeProvider(_requestMinCompressionSizeBytes)();if(requestMinCompressionSizeBytes<0||requestMinCompressionSizeBytes>10485760)throw new RangeError(`The value for requestMinCompressionSizeBytes must be between 0 and 1048\
11
- 5760 inclusive. The provided value ${requestMinCompressionSizeBytes} is outside this range."`);return requestMinCompressionSizeBytes}})};exports.DEFAULT_DISABLE_REQUEST_COMPRESSION=DEFAULT_DISABLE_REQUEST_COMPRESSION;exports.DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES=DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES;exports.NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS=NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS;exports.NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME=NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME;
12
- exports.NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME=NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME;exports.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS=NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS;exports.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME=NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME;exports.NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME=NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME;exports.compressionMiddleware=compressionMiddleware;exports.compressionMiddlewareOptions=
13
- compressionMiddlewareOptions;exports.getCompressionPlugin=getCompressionPlugin;exports.resolveCompressionConfig=resolveCompressionConfig}});var require_dist_cjs4=__commonJS({"node_modules/@aws-sdk/client-cloudwatch/dist-cjs/index.js"(exports){var{awsEndpointFunctions,emitWarningIfUnsupportedVersion:emitWarningIfUnsupportedVersion$1,createDefaultUserAgentProvider,NODE_APP_ID_CONFIG_OPTIONS,getAwsRegionExtensionConfiguration,resolveAwsRegionExtensionConfiguration,resolveUserAgentConfig,resolveHostHeaderConfig,getUserAgentPlugin,getHostHeaderPlugin,getLoggerPlugin,getRecursionDetectionPlugin}=(init_client2(),__toCommonJS(client_exports2)),
14
- {getHttpAuthSchemeEndpointRuleSetPlugin,DefaultIdentityProviderConfig,getHttpSigningPlugin,createPaginator}=(init_dist_es(),__toCommonJS(dist_es_exports)),{normalizeProvider,getSmithyContext,ServiceException,NoOpLogger,emitWarningIfUnsupportedVersion,loadConfigsForDefaultMode,getDefaultExtensionConfiguration,resolveDefaultRuntimeConfig,Client,makeBuilder,createWaiter,checkExceptions,WaiterState,createAggregatedClient}=(init_client(),__toCommonJS(client_exports)),{Command:$Command}=(init_client(),__toCommonJS(client_exports));
15
- exports.$Command=$Command;exports.__Client=Client;var{resolveDefaultsModeConfig,loadConfig,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_REGION_CONFIG_OPTIONS,NODE_REGION_CONFIG_FILE_OPTIONS,resolveRegionConfig}=(init_config(),__toCommonJS(config_exports)),{BinaryDecisionDiagram,EndpointCache,decideEndpoint,customEndpointFunctions,resolveEndpointConfig,getEndpointPlugin}=(init_endpoints(),__toCommonJS(endpoints_exports)),{parseUrl,getHttpHandlerExtensionConfiguration,
16
- resolveHttpHandlerRuntimeConfig,getContentLengthPlugin}=(init_protocols(),__toCommonJS(protocols_exports)),{DEFAULT_RETRY_MODE,NODE_RETRY_MODE_CONFIG_OPTIONS,NODE_MAX_ATTEMPT_CONFIG_OPTIONS,resolveRetryConfig,getRetryPlugin}=(init_retry(),__toCommonJS(retry_exports)),{TypeRegistry,getSchemaSerdePlugin}=(init_schema(),__toCommonJS(schema_exports)),{NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS,NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS,resolveCompressionConfig,getCompressionPlugin}=require_dist_cjs3(),
17
- {resolveAwsSdkSigV4Config,AwsSdkSigV4Signer,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS}=(init_httpAuthSchemes(),__toCommonJS(httpAuthSchemes_exports)),{defaultProvider}=require_dist_cjs2(),{toUtf8,fromUtf8,toBase64,fromBase64,calculateBodyLength}=(init_serde(),__toCommonJS(serde_exports)),{streamCollector,NodeHttpHandler}=require_dist_cjs(),{AwsJson1_0Protocol}=(init_protocols2(),__toCommonJS(protocols_exports2)),{Sha256}=(init_checksum(),__toCommonJS(checksum_exports)),defaultCloudWatchHttpAuthSchemeParametersProvider=async(config,context,input)=>({
18
- operation:getSmithyContext(context).operation,region:await normalizeProvider(config.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function createAwsAuthSigv4HttpAuthOption(authParameters){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"monitoring",region:authParameters.region},propertiesExtractor:(config,context)=>({signingProperties:{config,context}})}}var defaultCloudWatchHttpAuthSchemeProvider=authParameters=>{let options=[];switch(authParameters.
19
- operation){default:options.push(createAwsAuthSigv4HttpAuthOption(authParameters))}return options},resolveHttpAuthSchemeConfig=config=>{let config_0=resolveAwsSdkSigV4Config(config);return Object.assign(config_0,{authSchemePreference:normalizeProvider(config.authSchemePreference??[])})},resolveClientEndpointParameters=options=>Object.assign(options,{useDualstackEndpoint:options.useDualstackEndpoint??!1,useFipsEndpoint:options.useFipsEndpoint??!1,defaultSigningName:"monitoring"}),commonParams={UseFIPS:{
20
- type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},version="3.1145.0",packageInfo={version},k="ref",a=-1,b=!0,c="isSet",d="PartitionResult",e="booleanEquals",f="getAttr",g={[k]:"Endpoint"},h={[k]:d},i={},j=[{[k]:"Region"}],_data={conditions:[[c,[g]],[c,j],["aws.partition",j,d],[e,[{[k]:"UseFIPS"},b]],[e,[{[k]:"UseDualStack"},b]],["stringEquals",[{
21
- fn:f,argv:[h,"name"]},"aws-us-gov"]],[e,[{fn:f,argv:[h,"supportsFIPS"]},b]],[e,[{fn:f,argv:[h,"supportsDualStack"]},b]]],results:[[a],[a,"Invalid Configuration: FIPS and custom endpoint are not supported"],[a,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[g,i],["https://monitoring.{Region}.{PartitionResult#dnsSuffix}",i],["https://monitoring.{Region}.{PartitionResult#dualStackDnsSuffix}",i],["https://monitoring-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",i],[a,
22
- "FIPS and DualStack are enabled, but this partition does not support one or both"],["https://monitoring-fips.{Region}.{PartitionResult#dnsSuffix}",i],[a,"FIPS is enabled but this partition does not support FIPS"],[a,"DualStack is enabled but this partition does not support DualStack"],[a,"Invalid Configuration: Missing Region"]]},root=2,r=1e8,nodes=new Int32Array([-1,1,-1,0,14,3,1,4,r+11,2,5,r+11,3,8,6,4,7,r+4,7,r+5,r+10,4,11,9,5,r+4,10,6,r+8,r+9,5,r+5,12,6,13,r+7,7,r+6,r+7,3,r+1,15,4,r+2,r+3]),
23
- bdd=BinaryDecisionDiagram.from(nodes,root,_data.conditions,_data.results),cache=new EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),defaultEndpointResolver=(endpointParams,context={})=>cache.get(endpointParams,()=>decideEndpoint(bdd,{endpointParams,logger:context.logger}));customEndpointFunctions.aws=awsEndpointFunctions;var CloudWatchServiceException=class _CloudWatchServiceException extends ServiceException{constructor(options){super(options),Object.setPrototypeOf(
24
- this,_CloudWatchServiceException.prototype)}},ConflictException=class _ConflictException extends CloudWatchServiceException{name="ConflictException";$fault="client";Message;constructor(opts){super({name:"ConflictException",$fault:"client",...opts}),Object.setPrototypeOf(this,_ConflictException.prototype),this.Message=opts.Message}},KmsAccessDeniedException=class _KmsAccessDeniedException extends CloudWatchServiceException{name="KmsAccessDeniedException";$fault="client";Message;constructor(opts){
25
- super({name:"KmsAccessDeniedException",$fault:"client",...opts}),Object.setPrototypeOf(this,_KmsAccessDeniedException.prototype),this.Message=opts.Message}},KmsKeyDisabledException=class _KmsKeyDisabledException extends CloudWatchServiceException{name="KmsKeyDisabledException";$fault="client";Message;constructor(opts){super({name:"KmsKeyDisabledException",$fault:"client",...opts}),Object.setPrototypeOf(this,_KmsKeyDisabledException.prototype),this.Message=opts.Message}},KmsKeyNotFoundException=class _KmsKeyNotFoundException extends CloudWatchServiceException{name="\
26
- KmsKeyNotFoundException";$fault="client";Message;constructor(opts){super({name:"KmsKeyNotFoundException",$fault:"client",...opts}),Object.setPrototypeOf(this,_KmsKeyNotFoundException.prototype),this.Message=opts.Message}},ResourceNotFoundException=class _ResourceNotFoundException extends CloudWatchServiceException{name="ResourceNotFoundException";$fault="client";ResourceType;ResourceId;Message;constructor(opts){super({name:"ResourceNotFoundException",$fault:"client",...opts}),Object.setPrototypeOf(
27
- this,_ResourceNotFoundException.prototype),this.ResourceType=opts.ResourceType,this.ResourceId=opts.ResourceId,this.Message=opts.Message}},ConcurrentModificationException=class _ConcurrentModificationException extends CloudWatchServiceException{name="ConcurrentModificationException";$fault="client";Message;constructor(opts){super({name:"ConcurrentModificationException",$fault:"client",...opts}),Object.setPrototypeOf(this,_ConcurrentModificationException.prototype),this.Message=opts.Message}},DashboardInvalidInputError=class _DashboardInvalidInputError extends CloudWatchServiceException{name="\
28
- DashboardInvalidInputError";$fault="client";dashboardValidationMessages;constructor(opts){super({name:"DashboardInvalidInputError",$fault:"client",...opts}),Object.setPrototypeOf(this,_DashboardInvalidInputError.prototype),this.dashboardValidationMessages=opts.dashboardValidationMessages}},DashboardNotFoundError=class _DashboardNotFoundError extends CloudWatchServiceException{name="DashboardNotFoundError";$fault="client";constructor(opts){super({name:"DashboardNotFoundError",$fault:"client",...opts}),
29
- Object.setPrototypeOf(this,_DashboardNotFoundError.prototype)}},ResourceConflict=class _ResourceConflict extends CloudWatchServiceException{name="ResourceConflict";$fault="client";constructor(opts){super({name:"ResourceConflict",$fault:"client",...opts}),Object.setPrototypeOf(this,_ResourceConflict.prototype)}},ResourceNotFound=class _ResourceNotFound extends CloudWatchServiceException{name="ResourceNotFound";$fault="client";constructor(opts){super({name:"ResourceNotFound",$fault:"client",...opts}),
30
- Object.setPrototypeOf(this,_ResourceNotFound.prototype)}},InternalServiceFault=class _InternalServiceFault extends CloudWatchServiceException{name="InternalServiceFault";$fault="server";Message;constructor(opts){super({name:"InternalServiceFault",$fault:"server",...opts}),Object.setPrototypeOf(this,_InternalServiceFault.prototype),this.Message=opts.Message}},InvalidParameterCombinationException=class _InvalidParameterCombinationException extends CloudWatchServiceException{name="InvalidParameterC\
31
- ombinationException";$fault="client";constructor(opts){super({name:"InvalidParameterCombinationException",$fault:"client",...opts}),Object.setPrototypeOf(this,_InvalidParameterCombinationException.prototype)}},InvalidParameterValueException=class _InvalidParameterValueException extends CloudWatchServiceException{name="InvalidParameterValueException";$fault="client";constructor(opts){super({name:"InvalidParameterValueException",$fault:"client",...opts}),Object.setPrototypeOf(this,_InvalidParameterValueException.
32
- prototype)}},MissingRequiredParameterException=class _MissingRequiredParameterException extends CloudWatchServiceException{name="MissingRequiredParameterException";$fault="client";constructor(opts){super({name:"MissingRequiredParameterException",$fault:"client",...opts}),Object.setPrototypeOf(this,_MissingRequiredParameterException.prototype)}},InvalidNextToken=class _InvalidNextToken extends CloudWatchServiceException{name="InvalidNextToken";$fault="client";constructor(opts){super({name:"Invali\
33
- dNextToken",$fault:"client",...opts}),Object.setPrototypeOf(this,_InvalidNextToken.prototype)}},LimitExceededException=class _LimitExceededException extends CloudWatchServiceException{name="LimitExceededException";$fault="client";Message;constructor(opts){super({name:"LimitExceededException",$fault:"client",...opts}),Object.setPrototypeOf(this,_LimitExceededException.prototype),this.Message=opts.Message}},LimitExceededFault=class _LimitExceededFault extends CloudWatchServiceException{name="Limit\
34
- ExceededFault";$fault="client";constructor(opts){super({name:"LimitExceededFault",$fault:"client",...opts}),Object.setPrototypeOf(this,_LimitExceededFault.prototype)}},InvalidFormatFault=class _InvalidFormatFault extends CloudWatchServiceException{name="InvalidFormatFault";$fault="client";constructor(opts){super({name:"InvalidFormatFault",$fault:"client",...opts}),Object.setPrototypeOf(this,_InvalidFormatFault.prototype)}},ValidationException=class _ValidationException extends CloudWatchServiceException{name="\
35
- ValidationException";$fault="client";constructor(opts){super({name:"ValidationException",$fault:"client",...opts}),Object.setPrototypeOf(this,_ValidationException.prototype)}},_A="Average",_AA="AlarmActions",_AAV="ApproximateAggregateValue",_AAl="AlarmArn",_AC="AlarmContributor",_ACA="AlarmContributorAttributes",_ACI="AlarmContributorId",_ACUT="AlarmConfigurationUpdatedTimestamp",_ACl="AlarmContributors",_AD="AnomalyDetector",_ADC="AnomalyDetectorConfiguration",_ADETR="AnomalyDetectorExcludedTim\
36
- eRanges",_ADI="AnomalyDetectorId",_ADIn="AnomalyDetectorIds",_ADKK="AssociateDatasetKmsKey",_ADKKI="AssociateDatasetKmsKeyInput",_ADKKO="AssociateDatasetKmsKeyOutput",_ADT="AnomalyDetectorTypes",_ADl="AlarmDescription",_ADn="AnomalyDetectors",_AE="ActionsEnabled",_AEg="AggregationExpression",_AHI="AlarmHistoryItem",_AHIl="AlarmHistoryItems",_AI="AccountId",_ALLC="ActionLogLineCount",_ALLRA="ActionLogLineRoleArn",_AMRA="AlarmMuteRuleArn",_AMRN="AlarmMuteRuleName",_AMRS="AlarmMuteRuleSummary",_AMRSl="\
37
- AlarmMuteRuleSummaries",_AN="AlarmName",_ANP="AlarmNamePrefix",_ANl="AlarmNames",_AOTL="ApplyOnTransformedLogs",_AP="ActionPrefix",_APQLC="AlarmPromQLCriteria",_AR="AlarmRule",_AS="ActionsSuppressor",_ASB="ActionsSuppressedBy",_ASEP="ActionsSuppressorExtensionPeriod",_ASR="ActionsSuppressedReason",_ASWP="ActionsSuppressorWaitPeriod",_ASd="AdditionalStatistics",_ASg="AggregationStatistic",_AT="AlarmType",_ATl="AlarmTypes",_AUC="ApproximateUniqueCount",_AV="AggregateValue",_AVp="ApproximateValue",
38
- _Ar="Arn",_At="Attributes",_BF="BatchFailures",_C="Configuration",_CA="ContributorAttributes",_CAo="CompositeAlarm",_CAom="CompositeAlarms",_CAr="CreatedAt",_CD="CreationDate",_CE="ConflictException",_CI="ContributorId",_CME="ConcurrentModificationException",_CO="ComparisonOperator",_COAN="ChildrenOfAlarmName",_CRMC="CreateResourceMetricsConfiguration",_CRMCI="CreateResourceMetricsConfigurationInput",_CRMCO="CreateResourceMetricsConfigurationOutput",_Co="Contributors",_Cod="Code",_Cou="Counts",_D="\
39
- Dimensions",_DA="DashboardArn",_DAA="DisableAlarmActions",_DAAI="DisableAlarmActionsInput",_DAC="DescribeAlarmContributors",_DACI="DescribeAlarmContributorsInput",_DACO="DescribeAlarmContributorsOutput",_DAD="DeleteAnomalyDetector",_DADI="DeleteAnomalyDetectorInput",_DADIe="DescribeAnomalyDetectorsInput",_DADO="DeleteAnomalyDetectorOutput",_DADOe="DescribeAnomalyDetectorsOutput",_DADe="DescribeAnomalyDetectors",_DAFM="DescribeAlarmsForMetric",_DAFMI="DescribeAlarmsForMetricInput",_DAFMO="Describ\
40
- eAlarmsForMetricOutput",_DAH="DescribeAlarmHistory",_DAHI="DescribeAlarmHistoryInput",_DAHO="DescribeAlarmHistoryOutput",_DAI="DeleteAlarmsInput",_DAIe="DescribeAlarmsInput",_DAMR="DeleteAlarmMuteRule",_DAMRI="DeleteAlarmMuteRuleInput",_DAO="DescribeAlarmsOutput",_DAe="DeleteAlarms",_DAes="DescribeAlarms",_DB="DashboardBody",_DD="DeleteDashboards",_DDI="DeleteDashboardsInput",_DDKK="DisassociateDatasetKmsKey",_DDKKI="DisassociateDatasetKmsKeyInput",_DDKKO="DisassociateDatasetKmsKeyOutput",_DDO="\
41
- DeleteDashboardsOutput",_DE="DashboardEntry",_DEa="DashboardEntries",_DF="DimensionFilter",_DFi="DimensionFilters",_DI="DatasetIdentifier",_DIIE="DashboardInvalidInputError",_DIR="DeleteInsightRules",_DIRI="DeleteInsightRulesInput",_DIRIe="DescribeInsightRulesInput",_DIRIi="DisableInsightRulesInput",_DIRO="DeleteInsightRulesOutput",_DIROe="DescribeInsightRulesOutput",_DIROi="DisableInsightRulesOutput",_DIRe="DescribeInsightRules",_DIRi="DisableInsightRules",_DIa="DatasetId",_DMS="DeleteMetricStr\
42
- eam",_DMSI="DeleteMetricStreamInput",_DMSO="DeleteMetricStreamOutput",_DN="DashboardName",_DNFE="DashboardNotFoundError",_DNP="DashboardNamePrefix",_DNa="DashboardNames",_DP="DataPath",_DRMC="DeleteResourceMetricsConfiguration",_DRMCI="DeleteResourceMetricsConfigurationInput",_DRMCO="DeleteResourceMetricsConfigurationOutput",_DTA="DatapointsToAlarm",_DVM="DashboardValidationMessage",_DVMa="DashboardValidationMessages",_Da="Datapoint",_Dat="Datapoints",_De="Description",_Def="Definition",_Di="Dim\
43
- ension",_Du="Duration",_E="Entity",_EAA="EnableAlarmActions",_EAAI="EnableAlarmActionsInput",_EC="EvaluationCriteria",_ED="ExpireDate",_EDn="EndDate",_EF="ExcludeFilters",_EI="EvaluationInterval",_EIR="EnableInsightRules",_EIRI="EnableInsightRulesInput",_EIRO="EnableInsightRulesOutput",_ELSCP="EvaluateLowSampleCountPercentile",_EMD="EntityMetricData",_EMDL="EntityMetricDataList",_EP="EvaluationPeriods",_ES="ExtendedStatistics",_ESv="EvaluationState",_ESx="ExtendedStatistic",_ET="EndTime",_ETO="E\
44
- ndTimeOffset",_ETR="ExcludedTimeRanges",_ETx="ExceptionType",_EW="EvaluationWindow",_En="Entries",_Ex="Expression",_F="Failures",_FA="FirehoseArn",_FC="FailureCode",_FD="FailureDescription",_FR="FailureResource",_GAMR="GetAlarmMuteRule",_GAMRI="GetAlarmMuteRuleInput",_GAMRO="GetAlarmMuteRuleOutput",_GD="GetDashboard",_GDI="GetDashboardInput",_GDIe="GetDatasetInput",_GDO="GetDashboardOutput",_GDOe="GetDatasetOutput",_GDe="GetDataset",_GIRR="GetInsightRuleReport",_GIRRI="GetInsightRuleReportInput",
45
- _GIRRO="GetInsightRuleReportOutput",_GMD="GetMetricData",_GMDI="GetMetricDataInput",_GMDO="GetMetricDataOutput",_GMS="GetMetricStatistics",_GMSI="GetMetricStatisticsInput",_GMSIe="GetMetricStreamInput",_GMSO="GetMetricStatisticsOutput",_GMSOe="GetMetricStreamOutput",_GMSe="GetMetricStream",_GMWI="GetMetricWidgetImage",_GMWII="GetMetricWidgetImageInput",_GMWIO="GetMetricWidgetImageOutput",_GOTE="GetOTelEnrichment",_GOTEI="GetOTelEnrichmentInput",_GOTEO="GetOTelEnrichmentOutput",_GRMC="GetResource\
46
- MetricsConfiguration",_GRMCI="GetResourceMetricsConfigurationInput",_GRMCO="GetResourceMetricsConfigurationOutput",_HD="HistoryData",_HIT="HistoryItemType",_HS="HistorySummary",_I="Id",_IDA="InsufficientDataActions",_IF="IncludeFilters",_IFF="InvalidFormatFault",_ILA="IncludeLinkedAccounts",_ILAM="IncludeLinkedAccountsMetrics",_IM="IncludeMetrics",_INT="InvalidNextToken",_IPCE="InvalidParameterCombinationException",_IPVE="InvalidParameterValueException",_IR="InsightRules",_IRC="InsightRuleContri\
47
- butor",_IRCD="InsightRuleContributorDatapoint",_IRCDn="InsightRuleContributorDatapoints",_IRCn="InsightRuleContributors",_IRMD="InsightRuleMetricDatapoint",_IRMDn="InsightRuleMetricDatapoints",_IRn="InsightRule",_ISF="InternalServiceFault",_K="Keys",_KA="KeyAttributes",_KADE="KmsAccessDeniedException",_KKA="KmsKeyArn",_KKDE="KmsKeyDisabledException",_KKNFE="KmsKeyNotFoundException",_KL="KeyLabels",_Ke="Key",_L="Label",_LA="LogAlarms",_LAMR="ListAlarmMuteRules",_LAMRI="ListAlarmMuteRulesInput",_LAMRO="\
48
- ListAlarmMuteRulesOutput",_LAo="LogAlarm",_LD="ListDashboards",_LDI="ListDashboardsInput",_LDO="ListDashboardsOutput",_LEE="LimitExceededException",_LEF="LimitExceededFault",_LGI="LogGroupIdentifiers",_LM="LastModified",_LMI="ListMetricsInput",_LMIR="ListManagedInsightRules",_LMIRI="ListManagedInsightRulesInput",_LMIRO="ListManagedInsightRulesOutput",_LMO="ListMetricsOutput",_LMS="ListMetricStreams",_LMSI="ListMetricStreamsInput",_LMSO="ListMetricStreamsOutput",_LMi="ListMetrics",_LO="LabelOptio\
49
- ns",_LTFR="ListTagsForResource",_LTFRI="ListTagsForResourceInput",_LTFRO="ListTagsForResourceOutput",_LUD="LastUpdateDate",_LUT="LastUpdatedTimestamp",_M="Message",_MA="MetricAlarms",_MAe="MetricAlarm",_MC="MetricCharacteristics",_MCC="MaxContributorCount",_MCV="MaxContributorValue",_MD="MetricData",_MDQ="MetricDataQueries",_MDQe="MetricDataQuery",_MDR="MetricDataResults",_MDRM="MetricDataResultMessages",_MDRe="MetricDataResult",_MDa="MaxDatapoints",_MDe="MetricDatapoints",_MDes="MessageData",_MDet="\
50
- MetricDatum",_MMAD="MetricMathAnomalyDetector",_MN="MetricName",_MNe="MetricNames",_MR="MaxRecords",_MRD="ManagedRuleDescription",_MRDa="ManagedRuleDescriptions",_MRPE="MissingRequiredParameterException",_MRS="ManagedRuleState",_MRa="MaxResults",_MRan="ManagedRule",_MRana="ManagedRules",_MS="MetricSelections",_MSE="MetricStreamEntry",_MSEe="MetricStreamEntries",_MSF="MetricStreamFilter",_MSFe="MetricStreamFilters",_MSSC="MetricStreamStatisticsConfiguration",_MSSCe="MetricStreamStatisticsConfigur\
51
- ations",_MSSIM="MetricStreamStatisticsIncludeMetrics",_MSSM="MetricStreamStatisticsMetric",_MSe="MetricStat",_MT="MuteType",_MTe="MetricTimezone",_MTu="MuteTargets",_MW="MetricWidget",_MWI="MetricWidgetImage",_Ma="Maximum",_Me="Metrics",_Mes="Messages",_Met="Metric",_Mi="Minimum",_N="Namespace",_NT="NextToken",_Na="Name",_Nam="Names",_OA="OwningAccount",_OAw="OwningAccounts",_OB="OrderBy",_OF="OutputFormat",_OKA="OKActions",_OSEAWUPE="OnlyStartEvaluatingAfterWarmUpPeriodEnds",_OTEMS="OTelEnrichm\
52
- entMetricSelector",_OTEMSL="OTelEnrichmentMetricSelectorList",_P="Period",_PAD="PutAnomalyDetector",_PADI="PutAnomalyDetectorInput",_PADO="PutAnomalyDetectorOutput",_PAMR="PutAlarmMuteRule",_PAMRI="PutAlarmMuteRuleInput",_PCA="PutCompositeAlarm",_PCAI="PutCompositeAlarmInput",_PD="PutDashboard",_PDI="PutDashboardInput",_PDO="PutDashboardOutput",_PF="PartialFailure",_PIR="PutInsightRule",_PIRI="PutInsightRuleInput",_PIRO="PutInsightRuleOutput",_PLA="PutLogAlarm",_PLAI="PutLogAlarmInput",_PMA="Put\
53
- MetricAlarm",_PMAI="PutMetricAlarmInput",_PMD="PutMetricData",_PMDI="PutMetricDataInput",_PMIR="PutManagedInsightRules",_PMIRI="PutManagedInsightRulesInput",_PMIRO="PutManagedInsightRulesOutput",_PMS="PutMetricStream",_PMSI="PutMetricStreamInput",_PMSO="PutMetricStreamOutput",_POAN="ParentsOfAlarmName",_PP="PendingPeriod",_PQLC="PromQLCriteria",_PS="PeriodicSpikes",_Q="Query",_QARN="QueryARN",_QRTA="QueryResultsToAlarm",_QRTE="QueryResultsToEvaluate",_QS="QueryString",_R="Rule",_RA="ResourceArn",
54
- _RARN="ResourceARN",_RAe="RecentlyActive",_RAo="RoleArn",_RC="ResourceConflict",_RD="ReturnData",_RDu="RuleDefinition",_RI="ResourceId",_RMC="ResourceMetricsConfiguration",_RMS="ResourceMetricSelection",_RMSL="ResourceMetricSelectionList",_RN="RuleNames",_RNF="ResourceNotFound",_RNFE="ResourceNotFoundException",_RNu="RuleName",_RP="RecoveryPeriod",_RS="RuleState",_RT="ResourceType",_Ra="Range",_S="Status",_SAS="SetAlarmState",_SASI="SetAlarmStateInput",_SB="ScanBy",_SC="SampleCount",_SCc="Schedu\
55
- leConfiguration",_SCt="StatisticsConfigurations",_SCta="StatusCode",_SD="StartDate",_SE="ScheduleExpression",_SEV="StrictEntityValidation",_SMAD="SingleMetricAnomalyDetector",_SMS="StartMetricStreams",_SMSI="StartMetricStreamsInput",_SMSIt="StopMetricStreamsInput",_SMSO="StartMetricStreamsOutput",_SMSOt="StopMetricStreamsOutput",_SMSt="StopMetricStreams",_SOTE="StartOTelEnrichment",_SOTEI="StartOTelEnrichmentInput",_SOTEIt="StopOTelEnrichmentInput",_SOTEO="StartOTelEnrichmentOutput",_SOTEOt="Sto\
56
- pOTelEnrichmentOutput",_SOTEt="StopOTelEnrichment",_SQC="ScheduledQueryConfiguration",_SQRARN="ScheduledQueryRoleARN",_SR="StateReason",_SRD="StateReasonData",_SRt="StorageResolution",_SS="StatisticSet",_ST="StartTime",_STO="StartTimeOffset",_STT="StateTransitionedTimestamp",_SUT="StateUpdatedTimestamp",_SV="StateValue",_SVt="StatisticValues",_SW="SlidingWindow",_Sc="Schema",_Sch="Schedule",_Si="Size",_St="Stat",_Sta="Statistic",_Stat="Statistics",_State="State",_Statu="Statuses",_Su="Sum",_T="T\
57
- imestamp",_TK="TagKeys",_TL="TagList",_TMD="TreatMissingData",_TMI="ThresholdMetricId",_TN="TemplateName",_TR="TagResource",_TRI="TagResourceInput",_TRO="TagResourceOutput",_Ta="Tags",_Tag="Tag",_Th="Threshold",_Ti="Timezone",_Tim="Timestamps",_U="Unit",_UA="UpdatedAt",_UC="UniqueContributors",_UOTE="UpdateOTelEnrichment",_UOTEI="UpdateOTelEnrichmentInput",_UOTEO="UpdateOTelEnrichmentOutput",_UR="UntagResource",_URI="UntagResourceInput",_URMC="UpdateResourceMetricsConfiguration",_URMCI="UpdateRe\
58
- sourceMetricsConfigurationInput",_URMCO="UpdateResourceMetricsConfigurationOutput",_URO="UntagResourceOutput",_V="Value",_VE="ValidationException",_Va="Values",_WCW="WallClockWindow",_WUC="WarmUpConfiguration",_WUPDIM="WarmUpPeriodDurationInMinutes",_aQE="awsQueryError",_c="client",_dVM="dashboardValidationMessages",_e="error",_hE="httpError",_m="message",_s="smithy.ts.sdk.synthetic.com.amazonaws.cloudwatch",_se="server",n0="com.amazonaws.cloudwatch",_s_registry=new TypeRegistry(_s),CloudWatchServiceException$=[
59
- -3,_s,"CloudWatchServiceException",0,[],[]];_s_registry.registerError(CloudWatchServiceException$,CloudWatchServiceException);var n0_registry=new TypeRegistry(n0),ConcurrentModificationException$=[-3,n0,_CME,{[_aQE]:["ConcurrentModificationException",429],[_e]:_c,[_hE]:429},[_M],[0]];n0_registry.registerError(ConcurrentModificationException$,ConcurrentModificationException);var ConflictException$=[-3,n0,_CE,{[_e]:_c,[_hE]:409},[_M],[0]];n0_registry.registerError(ConflictException$,ConflictException);
60
- var DashboardInvalidInputError$=[-3,n0,_DIIE,{[_aQE]:["InvalidParameterInput",400],[_e]:_c,[_hE]:400},[_m,_dVM],[0,()=>DashboardValidationMessages]];n0_registry.registerError(DashboardInvalidInputError$,DashboardInvalidInputError);var DashboardNotFoundError$=[-3,n0,_DNFE,{[_aQE]:["ResourceNotFound",404],[_e]:_c,[_hE]:404},[_m],[0]];n0_registry.registerError(DashboardNotFoundError$,DashboardNotFoundError);var InternalServiceFault$=[-3,n0,_ISF,{[_aQE]:["InternalServiceError",500],[_e]:_se,[_hE]:500},
61
- [_M],[0]];n0_registry.registerError(InternalServiceFault$,InternalServiceFault);var InvalidFormatFault$=[-3,n0,_IFF,{[_aQE]:["InvalidFormat",400],[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(InvalidFormatFault$,InvalidFormatFault);var InvalidNextToken$=[-3,n0,_INT,{[_aQE]:["InvalidNextToken",400],[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(InvalidNextToken$,InvalidNextToken);var InvalidParameterCombinationException$=[-3,n0,_IPCE,{[_aQE]:["InvalidParameterCombination",400],[_e]:_c,
62
- [_hE]:400},[_m],[0]];n0_registry.registerError(InvalidParameterCombinationException$,InvalidParameterCombinationException);var InvalidParameterValueException$=[-3,n0,_IPVE,{[_aQE]:["InvalidParameterValue",400],[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(InvalidParameterValueException$,InvalidParameterValueException);var KmsAccessDeniedException$=[-3,n0,_KADE,{[_e]:_c},[_M],[0],1];n0_registry.registerError(KmsAccessDeniedException$,KmsAccessDeniedException);var KmsKeyDisabledException$=[
63
- -3,n0,_KKDE,{[_e]:_c},[_M],[0],1];n0_registry.registerError(KmsKeyDisabledException$,KmsKeyDisabledException);var KmsKeyNotFoundException$=[-3,n0,_KKNFE,{[_e]:_c},[_M],[0],1];n0_registry.registerError(KmsKeyNotFoundException$,KmsKeyNotFoundException);var LimitExceededException$=[-3,n0,_LEE,{[_aQE]:["LimitExceededException",400],[_e]:_c,[_hE]:400},[_M],[0]];n0_registry.registerError(LimitExceededException$,LimitExceededException);var LimitExceededFault$=[-3,n0,_LEF,{[_aQE]:["LimitExceeded",400],[_e]:_c,
64
- [_hE]:400},[_m],[0]];n0_registry.registerError(LimitExceededFault$,LimitExceededFault);var MissingRequiredParameterException$=[-3,n0,_MRPE,{[_aQE]:["MissingParameter",400],[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(MissingRequiredParameterException$,MissingRequiredParameterException);var ResourceConflict$=[-3,n0,_RC,{[_aQE]:["ResourceConflict",409],[_e]:_c,[_hE]:409},[_m],[0]];n0_registry.registerError(ResourceConflict$,ResourceConflict);var ResourceNotFound$=[-3,n0,_RNF,{[_aQE]:["Re\
65
- sourceNotFound",404],[_e]:_c,[_hE]:404},[_m],[0]];n0_registry.registerError(ResourceNotFound$,ResourceNotFound);var ResourceNotFoundException$=[-3,n0,_RNFE,{[_aQE]:["ResourceNotFoundException",404],[_e]:_c,[_hE]:404},[_RT,_RI,_M],[0,0,0]];n0_registry.registerError(ResourceNotFoundException$,ResourceNotFoundException);var ValidationException$=[-3,n0,_VE,{[_aQE]:["ValidationError",400],[_e]:_c,[_hE]:400},[_m],[0]];n0_registry.registerError(ValidationException$,ValidationException);var errorTypeRegistries=[
66
- _s_registry,n0_registry],AlarmContributor$=[3,n0,_AC,0,[_CI,_CA,_SR,_STT],[0,128,0,4],3],AlarmHistoryItem$=[3,n0,_AHI,0,[_AN,_ACI,_AT,_T,_HIT,_HS,_HD,_ACA],[0,0,0,4,0,0,0,128]],AlarmMuteRuleSummary$=[3,n0,_AMRS,0,[_AMRA,_ED,_S,_MT,_LUT],[0,4,0,0,4]],AlarmPromQLCriteria$=[3,n0,_APQLC,0,[_Q,_PP,_RP],[0,1,1],1],AnomalyDetector$=[3,n0,_AD,0,[_ADI,_N,_MN,_D,_St,_C,_SV,_MC,_SMAD,_MMAD],[0,0,0,()=>Dimensions,0,()=>AnomalyDetectorConfiguration$,0,()=>MetricCharacteristics$,()=>SingleMetricAnomalyDetector$,
67
- ()=>MetricMathAnomalyDetector$]],AnomalyDetectorConfiguration$=[3,n0,_ADC,0,[_ETR,_MTe],[()=>AnomalyDetectorExcludedTimeRanges,0]],AssociateDatasetKmsKeyInput$=[3,n0,_ADKKI,0,[_DI,_KKA],[0,0],2],AssociateDatasetKmsKeyOutput$=[3,n0,_ADKKO,0,[],[]],CompositeAlarm$=[3,n0,_CAo,0,[_AE,_AA,_AAl,_ACUT,_ADl,_AN,_AR,_IDA,_OKA,_SR,_SRD,_SUT,_SV,_STT,_ASB,_ASR,_AS,_ASWP,_ASEP],[2,64,0,4,0,0,0,64,64,0,0,4,0,4,0,0,0,1,1]],CreateResourceMetricsConfigurationInput$=[3,n0,_CRMCI,0,[_RA,_MS],[0,()=>ResourceMetricSelectionList],
68
- 1],CreateResourceMetricsConfigurationOutput$=[3,n0,_CRMCO,0,[_RMC],[()=>ResourceMetricsConfiguration$],1],DashboardEntry$=[3,n0,_DE,0,[_DN,_DA,_LM,_Si],[0,0,4,1]],DashboardValidationMessage$=[3,n0,_DVM,0,[_DP,_M],[0,0]],Datapoint$=[3,n0,_Da,0,[_T,_SC,_A,_Su,_Mi,_Ma,_U,_ES],[4,1,1,1,1,1,0,129]],DeleteAlarmMuteRuleInput$=[3,n0,_DAMRI,0,[_AMRN],[0],1],DeleteAlarmsInput$=[3,n0,_DAI,0,[_ANl],[64],1],DeleteAnomalyDetectorInput$=[3,n0,_DADI,0,[_ADI,_N,_MN,_D,_St,_SMAD,_MMAD],[0,0,0,()=>Dimensions,0,()=>SingleMetricAnomalyDetector$,
69
- ()=>MetricMathAnomalyDetector$]],DeleteAnomalyDetectorOutput$=[3,n0,_DADO,0,[],[]],DeleteDashboardsInput$=[3,n0,_DDI,0,[_DNa],[64],1],DeleteDashboardsOutput$=[3,n0,_DDO,0,[],[]],DeleteInsightRulesInput$=[3,n0,_DIRI,0,[_RN],[64],1],DeleteInsightRulesOutput$=[3,n0,_DIRO,0,[_F],[()=>BatchFailures]],DeleteMetricStreamInput$=[3,n0,_DMSI,0,[_Na],[0],1],DeleteMetricStreamOutput$=[3,n0,_DMSO,0,[],[]],DeleteResourceMetricsConfigurationInput$=[3,n0,_DRMCI,0,[_RA],[0],1],DeleteResourceMetricsConfigurationOutput$=[
70
- 3,n0,_DRMCO,0,[],[]],DescribeAlarmContributorsInput$=[3,n0,_DACI,0,[_AN,_NT],[0,0],1],DescribeAlarmContributorsOutput$=[3,n0,_DACO,0,[_ACl,_NT],[()=>AlarmContributors,0],1],DescribeAlarmHistoryInput$=[3,n0,_DAHI,0,[_AN,_ACI,_ATl,_HIT,_SD,_EDn,_MR,_NT,_SB],[0,0,64,0,4,4,1,0,0]],DescribeAlarmHistoryOutput$=[3,n0,_DAHO,0,[_AHIl,_NT],[()=>AlarmHistoryItems,0]],DescribeAlarmsForMetricInput$=[3,n0,_DAFMI,0,[_MN,_N,_Sta,_ESx,_D,_P,_U],[0,0,0,0,()=>Dimensions,1,0],2],DescribeAlarmsForMetricOutput$=[3,n0,
71
- _DAFMO,0,[_MA],[()=>MetricAlarms]],DescribeAlarmsInput$=[3,n0,_DAIe,0,[_ANl,_ANP,_ATl,_COAN,_POAN,_SV,_AP,_MR,_NT],[64,0,64,0,0,0,0,1,0]],DescribeAlarmsOutput$=[3,n0,_DAO,0,[_CAom,_MA,_LA,_NT],[()=>CompositeAlarms,()=>MetricAlarms,()=>LogAlarms,0]],DescribeAnomalyDetectorsInput$=[3,n0,_DADIe,0,[_ADIn,_NT,_MRa,_N,_MN,_D,_ADT],[64,0,1,0,0,()=>Dimensions,64]],DescribeAnomalyDetectorsOutput$=[3,n0,_DADOe,0,[_ADn,_NT],[()=>AnomalyDetectors,0]],DescribeInsightRulesInput$=[3,n0,_DIRIe,0,[_NT,_MRa],[0,1]],
72
- DescribeInsightRulesOutput$=[3,n0,_DIROe,0,[_NT,_IR],[0,()=>InsightRules]],Dimension$=[3,n0,_Di,0,[_Na,_V],[0,0],2],DimensionFilter$=[3,n0,_DF,0,[_Na,_V],[0,0],1],DisableAlarmActionsInput$=[3,n0,_DAAI,0,[_ANl],[64],1],DisableInsightRulesInput$=[3,n0,_DIRIi,0,[_RN],[64],1],DisableInsightRulesOutput$=[3,n0,_DIROi,0,[_F],[()=>BatchFailures]],DisassociateDatasetKmsKeyInput$=[3,n0,_DDKKI,0,[_DI],[0],1],DisassociateDatasetKmsKeyOutput$=[3,n0,_DDKKO,0,[],[]],EnableAlarmActionsInput$=[3,n0,_EAAI,0,[_ANl],
73
- [64],1],EnableInsightRulesInput$=[3,n0,_EIRI,0,[_RN],[64],1],EnableInsightRulesOutput$=[3,n0,_EIRO,0,[_F],[()=>BatchFailures]],Entity$=[3,n0,_E,0,[_KA,_At],[128,128]],EntityMetricData$=[3,n0,_EMD,0,[_E,_MD],[()=>Entity$,()=>MetricData]],GetAlarmMuteRuleInput$=[3,n0,_GAMRI,0,[_AMRN],[0],1],GetAlarmMuteRuleOutput$=[3,n0,_GAMRO,0,[_Na,_AMRA,_De,_R,_MTu,_SD,_ED,_S,_LUT,_MT],[0,0,0,()=>Rule$,()=>MuteTargets$,4,4,0,4,0]],GetDashboardInput$=[3,n0,_GDI,0,[_DN],[0],1],GetDashboardOutput$=[3,n0,_GDO,0,[_DA,
74
- _DB,_DN],[0,0,0]],GetDatasetInput$=[3,n0,_GDIe,0,[_DI],[0],1],GetDatasetOutput$=[3,n0,_GDOe,0,[_DIa,_Ar,_KKA],[0,0,0],2],GetInsightRuleReportInput$=[3,n0,_GIRRI,0,[_RNu,_ST,_ET,_P,_MCC,_Me,_OB],[0,4,4,1,1,64,0],4],GetInsightRuleReportOutput$=[3,n0,_GIRRO,0,[_KL,_ASg,_AV,_AUC,_Co,_MDe],[64,0,1,1,()=>InsightRuleContributors,()=>InsightRuleMetricDatapoints]],GetMetricDataInput$=[3,n0,_GMDI,0,[_MDQ,_ST,_ET,_NT,_SB,_MDa,_LO],[()=>MetricDataQueries,4,4,0,0,1,()=>LabelOptions$],3],GetMetricDataOutput$=[
75
- 3,n0,_GMDO,0,[_MDR,_NT,_Mes],[()=>MetricDataResults,0,()=>MetricDataResultMessages]],GetMetricStatisticsInput$=[3,n0,_GMSI,0,[_N,_MN,_ST,_ET,_P,_D,_Stat,_ES,_U],[0,0,4,4,1,()=>Dimensions,64,64,0],5],GetMetricStatisticsOutput$=[3,n0,_GMSO,0,[_L,_Dat],[0,()=>Datapoints]],GetMetricStreamInput$=[3,n0,_GMSIe,0,[_Na],[0],1],GetMetricStreamOutput$=[3,n0,_GMSOe,0,[_Ar,_Na,_IF,_EF,_FA,_RAo,_State,_CD,_LUD,_OF,_SCt,_ILAM],[0,0,()=>MetricStreamFilters,()=>MetricStreamFilters,0,0,0,4,4,0,()=>MetricStreamStatisticsConfigurations,
76
- 2]],GetMetricWidgetImageInput$=[3,n0,_GMWII,0,[_MW,_OF],[0,0],1],GetMetricWidgetImageOutput$=[3,n0,_GMWIO,0,[_MWI],[21]],GetOTelEnrichmentInput$=[3,n0,_GOTEI,0,[],[]],GetOTelEnrichmentOutput$=[3,n0,_GOTEO,0,[_S,_IF,_EF,_CAr,_UA],[0,()=>OTelEnrichmentMetricSelectorList,()=>OTelEnrichmentMetricSelectorList,4,4],1],GetResourceMetricsConfigurationInput$=[3,n0,_GRMCI,0,[_RA],[0],1],GetResourceMetricsConfigurationOutput$=[3,n0,_GRMCO,0,[_RMC],[()=>ResourceMetricsConfiguration$],1],InsightRule$=[3,n0,_IRn,
77
- 0,[_Na,_State,_Sc,_Def,_MRan,_AOTL],[0,0,0,0,2,2],4],InsightRuleContributor$=[3,n0,_IRC,0,[_K,_AAV,_Dat],[64,1,()=>InsightRuleContributorDatapoints],3],InsightRuleContributorDatapoint$=[3,n0,_IRCD,0,[_T,_AVp],[4,1],2],InsightRuleMetricDatapoint$=[3,n0,_IRMD,0,[_T,_UC,_MCV,_SC,_A,_Su,_Mi,_Ma],[4,1,1,1,1,1,1,1],1],LabelOptions$=[3,n0,_LO,0,[_Ti],[0]],ListAlarmMuteRulesInput$=[3,n0,_LAMRI,0,[_AN,_Statu,_MR,_NT],[0,64,1,0]],ListAlarmMuteRulesOutput$=[3,n0,_LAMRO,0,[_AMRSl,_NT],[()=>AlarmMuteRuleSummaries,
78
- 0]],ListDashboardsInput$=[3,n0,_LDI,0,[_DNP,_NT],[0,0]],ListDashboardsOutput$=[3,n0,_LDO,0,[_DEa,_NT],[()=>DashboardEntries,0]],ListManagedInsightRulesInput$=[3,n0,_LMIRI,0,[_RARN,_NT,_MRa],[0,0,1],1],ListManagedInsightRulesOutput$=[3,n0,_LMIRO,0,[_MRana,_NT],[()=>ManagedRuleDescriptions,0]],ListMetricsInput$=[3,n0,_LMI,0,[_N,_MN,_D,_NT,_RAe,_ILA,_OA],[0,0,()=>DimensionFilters,0,0,2,0]],ListMetricsOutput$=[3,n0,_LMO,0,[_Me,_NT,_OAw],[()=>Metrics,0,64]],ListMetricStreamsInput$=[3,n0,_LMSI,0,[_NT,
79
- _MRa],[0,1]],ListMetricStreamsOutput$=[3,n0,_LMSO,0,[_NT,_En],[0,()=>MetricStreamEntries]],ListTagsForResourceInput$=[3,n0,_LTFRI,0,[_RARN],[0],1],ListTagsForResourceOutput$=[3,n0,_LTFRO,0,[_Ta],[()=>TagList]],LogAlarm$=[3,n0,_LAo,0,[_AN,_AAl,_ADl,_ACUT,_AE,_OKA,_AA,_IDA,_SV,_SR,_SRD,_SUT,_SQC,_QRTE,_QRTA,_Th,_CO,_TMD,_STT,_ESv,_ALLC,_ALLRA,_WUC],[0,0,0,4,2,64,64,64,0,0,0,4,()=>ScheduledQueryConfiguration$,1,1,1,0,0,4,0,1,0,()=>WarmUpConfiguration$]],ManagedRule$=[3,n0,_MRan,0,[_TN,_RARN,_Ta],[0,
80
- 0,()=>TagList],2],ManagedRuleDescription$=[3,n0,_MRD,0,[_TN,_RARN,_RS],[0,0,()=>ManagedRuleState$]],ManagedRuleState$=[3,n0,_MRS,0,[_RNu,_State],[0,0],2],MessageData$=[3,n0,_MDes,0,[_Cod,_V],[0,0]],Metric$=[3,n0,_Met,0,[_N,_MN,_D],[0,0,()=>Dimensions]],MetricAlarm$=[3,n0,_MAe,0,[_AN,_AAl,_ADl,_ACUT,_AE,_OKA,_AA,_IDA,_SV,_SR,_SRD,_SUT,_MN,_N,_Sta,_ESx,_D,_P,_U,_EP,_DTA,_Th,_CO,_TMD,_ELSCP,_Me,_TMI,_ESv,_STT,_EW,_WUC,_EC,_EI],[0,0,0,4,2,64,64,64,0,0,0,4,0,0,0,0,()=>Dimensions,1,0,1,1,1,0,0,0,()=>MetricDataQueries,
81
- 0,0,4,()=>EvaluationWindow$,()=>WarmUpConfiguration$,()=>EvaluationCriteria$,1]],MetricCharacteristics$=[3,n0,_MC,0,[_PS],[2]],MetricDataQuery$=[3,n0,_MDQe,0,[_I,_MSe,_Ex,_L,_RD,_P,_AI],[0,()=>MetricStat$,0,0,2,1,0],1],MetricDataResult$=[3,n0,_MDRe,0,[_I,_L,_Tim,_Va,_SCta,_Mes],[0,0,68,65,0,()=>MetricDataResultMessages]],MetricDatum$=[3,n0,_MDet,0,[_MN,_D,_T,_V,_SVt,_Va,_Cou,_U,_SRt],[0,()=>Dimensions,4,1,()=>StatisticSet$,65,65,0,1],1],MetricMathAnomalyDetector$=[3,n0,_MMAD,0,[_MDQ],[()=>MetricDataQueries]],
82
- MetricStat$=[3,n0,_MSe,0,[_Met,_P,_St,_U],[()=>Metric$,1,0,0],3],MetricStreamEntry$=[3,n0,_MSE,0,[_Ar,_CD,_LUD,_Na,_FA,_State,_OF],[0,4,4,0,0,0,0]],MetricStreamFilter$=[3,n0,_MSF,0,[_N,_MNe],[0,64]],MetricStreamStatisticsConfiguration$=[3,n0,_MSSC,0,[_IM,_ASd],[()=>MetricStreamStatisticsIncludeMetrics,64],2],MetricStreamStatisticsMetric$=[3,n0,_MSSM,0,[_N,_MN],[0,0],2],MuteTargets$=[3,n0,_MTu,0,[_ANl],[64],1],OTelEnrichmentMetricSelector$=[3,n0,_OTEMS,0,[_N,_MNe],[0,64],1],PartialFailure$=[3,n0,
83
- _PF,0,[_FR,_ETx,_FC,_FD],[0,0,0,0]],PutAlarmMuteRuleInput$=[3,n0,_PAMRI,0,[_Na,_R,_De,_MTu,_Ta,_SD,_ED],[0,()=>Rule$,0,()=>MuteTargets$,()=>TagList,4,4],2],PutAnomalyDetectorInput$=[3,n0,_PADI,0,[_N,_MN,_D,_St,_C,_MC,_SMAD,_MMAD],[0,0,()=>Dimensions,0,()=>AnomalyDetectorConfiguration$,()=>MetricCharacteristics$,()=>SingleMetricAnomalyDetector$,()=>MetricMathAnomalyDetector$]],PutAnomalyDetectorOutput$=[3,n0,_PADO,0,[_ADI],[0]],PutCompositeAlarmInput$=[3,n0,_PCAI,0,[_AN,_AR,_AE,_AA,_ADl,_IDA,_OKA,
84
- _Ta,_AS,_ASWP,_ASEP],[0,0,2,64,0,64,64,()=>TagList,0,1,1],2],PutDashboardInput$=[3,n0,_PDI,0,[_DN,_DB,_Ta],[0,0,()=>TagList],2],PutDashboardOutput$=[3,n0,_PDO,0,[_DVMa],[()=>DashboardValidationMessages]],PutInsightRuleInput$=[3,n0,_PIRI,0,[_RNu,_RDu,_RS,_Ta,_AOTL],[0,0,0,()=>TagList,2],2],PutInsightRuleOutput$=[3,n0,_PIRO,0,[],[]],PutLogAlarmInput$=[3,n0,_PLAI,0,[_AN,_SQC,_QRTE,_QRTA,_Th,_CO,_ADl,_ALLC,_ALLRA,_AE,_OKA,_AA,_IDA,_TMD,_Ta,_WUC],[0,()=>ScheduledQueryConfiguration$,1,1,1,0,0,1,0,2,64,
85
- 64,64,0,()=>TagList,()=>WarmUpConfiguration$],6],PutManagedInsightRulesInput$=[3,n0,_PMIRI,0,[_MRana],[()=>ManagedRules],1],PutManagedInsightRulesOutput$=[3,n0,_PMIRO,0,[_F],[()=>BatchFailures]],PutMetricAlarmInput$=[3,n0,_PMAI,0,[_AN,_ADl,_AE,_OKA,_AA,_IDA,_MN,_N,_Sta,_ESx,_D,_P,_U,_EP,_DTA,_Th,_CO,_TMD,_ELSCP,_Me,_Ta,_TMI,_EW,_WUC,_EC,_EI],[0,0,2,64,64,64,0,0,0,0,()=>Dimensions,1,0,1,1,1,0,0,0,()=>MetricDataQueries,()=>TagList,0,()=>EvaluationWindow$,()=>WarmUpConfiguration$,()=>EvaluationCriteria$,
86
- 1],1],PutMetricDataInput$=[3,n0,_PMDI,0,[_N,_MD,_EMD,_SEV],[0,()=>MetricData,()=>EntityMetricDataList,2],1],PutMetricStreamInput$=[3,n0,_PMSI,0,[_Na,_FA,_RAo,_OF,_IF,_EF,_Ta,_SCt,_ILAM],[0,0,0,0,()=>MetricStreamFilters,()=>MetricStreamFilters,()=>TagList,()=>MetricStreamStatisticsConfigurations,2],4],PutMetricStreamOutput$=[3,n0,_PMSO,0,[_Ar],[0]],Range$=[3,n0,_Ra,0,[_ST,_ET],[4,4],2],ResourceMetricsConfiguration$=[3,n0,_RMC,0,[_RA,_CAr,_UA,_MS],[0,4,4,()=>ResourceMetricSelectionList],3],ResourceMetricSelection$=[
87
- 3,n0,_RMS,0,[_IM],[64],1],Rule$=[3,n0,_R,0,[_Sch],[()=>Schedule$],1],Schedule$=[3,n0,_Sch,0,[_Ex,_Du,_Ti],[0,0,0],2],ScheduleConfiguration$=[3,n0,_SCc,0,[_SE,_STO,_ETO],[0,1,1],2],ScheduledQueryConfiguration$=[3,n0,_SQC,0,[_QS,_SQRARN,_SCc,_AEg,_LGI,_QARN,_Ta],[0,0,()=>ScheduleConfiguration$,0,64,0,()=>TagList],4],SetAlarmStateInput$=[3,n0,_SASI,0,[_AN,_SV,_SR,_SRD],[0,0,0,0],3],SingleMetricAnomalyDetector$=[3,n0,_SMAD,0,[_AI,_N,_MN,_D,_St],[0,0,0,()=>Dimensions,0]],SlidingWindow$=[3,n0,_SW,0,[],
88
- []],StartMetricStreamsInput$=[3,n0,_SMSI,0,[_Nam],[64],1],StartMetricStreamsOutput$=[3,n0,_SMSO,0,[],[]],StartOTelEnrichmentInput$=[3,n0,_SOTEI,0,[_IF,_EF],[()=>OTelEnrichmentMetricSelectorList,()=>OTelEnrichmentMetricSelectorList]],StartOTelEnrichmentOutput$=[3,n0,_SOTEO,0,[_IF,_EF,_CAr,_UA],[()=>OTelEnrichmentMetricSelectorList,()=>OTelEnrichmentMetricSelectorList,4,4]],StatisticSet$=[3,n0,_SS,0,[_SC,_Su,_Mi,_Ma],[1,1,1,1],4],StopMetricStreamsInput$=[3,n0,_SMSIt,0,[_Nam],[64],1],StopMetricStreamsOutput$=[
89
- 3,n0,_SMSOt,0,[],[]],StopOTelEnrichmentInput$=[3,n0,_SOTEIt,0,[],[]],StopOTelEnrichmentOutput$=[3,n0,_SOTEOt,0,[],[]],Tag$=[3,n0,_Tag,0,[_Ke,_V],[0,0],2],TagResourceInput$=[3,n0,_TRI,0,[_RARN,_Ta],[0,()=>TagList],2],TagResourceOutput$=[3,n0,_TRO,0,[],[]],UntagResourceInput$=[3,n0,_URI,0,[_RARN,_TK],[0,64],2],UntagResourceOutput$=[3,n0,_URO,0,[],[]],UpdateOTelEnrichmentInput$=[3,n0,_UOTEI,0,[_IF,_EF],[()=>OTelEnrichmentMetricSelectorList,()=>OTelEnrichmentMetricSelectorList]],UpdateOTelEnrichmentOutput$=[
90
- 3,n0,_UOTEO,0,[_IF,_EF,_CAr,_UA],[()=>OTelEnrichmentMetricSelectorList,()=>OTelEnrichmentMetricSelectorList,4,4]],UpdateResourceMetricsConfigurationInput$=[3,n0,_URMCI,0,[_RA,_MS],[0,()=>ResourceMetricSelectionList],1],UpdateResourceMetricsConfigurationOutput$=[3,n0,_URMCO,0,[_RMC],[()=>ResourceMetricsConfiguration$],1],WallClockWindow$=[3,n0,_WCW,0,[_Ti],[0]],WarmUpConfiguration$=[3,n0,_WUC,0,[_WUPDIM,_OSEAWUPE],[1,2],1],__Unit="unit",AlarmContributors=[1,n0,_ACl,0,()=>AlarmContributor$],AlarmHistoryItems=[
91
- 1,n0,_AHIl,0,()=>AlarmHistoryItem$],AlarmMuteRuleSummaries=[1,n0,_AMRSl,0,()=>AlarmMuteRuleSummary$],AnomalyDetectorExcludedTimeRanges=[1,n0,_ADETR,0,()=>Range$],AnomalyDetectors=[1,n0,_ADn,0,()=>AnomalyDetector$],BatchFailures=[1,n0,_BF,0,()=>PartialFailure$],CompositeAlarms=[1,n0,_CAom,0,()=>CompositeAlarm$],DashboardEntries=[1,n0,_DEa,0,()=>DashboardEntry$],DashboardValidationMessages=[1,n0,_DVMa,0,()=>DashboardValidationMessage$],Datapoints=[1,n0,_Dat,0,()=>Datapoint$],DimensionFilters=[1,n0,
92
- _DFi,0,()=>DimensionFilter$],Dimensions=[1,n0,_D,0,()=>Dimension$],EntityMetricDataList=[1,n0,_EMDL,0,()=>EntityMetricData$],InsightRuleContributorDatapoints=[1,n0,_IRCDn,0,()=>InsightRuleContributorDatapoint$],InsightRuleContributors=[1,n0,_IRCn,0,()=>InsightRuleContributor$],InsightRuleMetricDatapoints=[1,n0,_IRMDn,0,()=>InsightRuleMetricDatapoint$],InsightRules=[1,n0,_IR,0,()=>InsightRule$],LogAlarms=[1,n0,_LA,0,()=>LogAlarm$],ManagedRuleDescriptions=[1,n0,_MRDa,0,()=>ManagedRuleDescription$],
93
- ManagedRules=[1,n0,_MRana,0,()=>ManagedRule$],MetricAlarms=[1,n0,_MA,0,()=>MetricAlarm$],MetricData=[1,n0,_MD,0,()=>MetricDatum$],MetricDataQueries=[1,n0,_MDQ,0,()=>MetricDataQuery$],MetricDataResultMessages=[1,n0,_MDRM,0,()=>MessageData$],MetricDataResults=[1,n0,_MDR,0,()=>MetricDataResult$],Metrics=[1,n0,_Me,0,()=>Metric$],MetricStreamEntries=[1,n0,_MSEe,0,()=>MetricStreamEntry$],MetricStreamFilters=[1,n0,_MSFe,0,()=>MetricStreamFilter$],MetricStreamStatisticsConfigurations=[1,n0,_MSSCe,0,()=>MetricStreamStatisticsConfiguration$],
94
- MetricStreamStatisticsIncludeMetrics=[1,n0,_MSSIM,0,()=>MetricStreamStatisticsMetric$],OTelEnrichmentMetricSelectorList=[1,n0,_OTEMSL,0,()=>OTelEnrichmentMetricSelector$],ResourceMetricSelectionList=[1,n0,_RMSL,0,()=>ResourceMetricSelection$],TagList=[1,n0,_TL,0,()=>Tag$],EvaluationCriteria$=[4,n0,_EC,0,[_PQLC],[()=>AlarmPromQLCriteria$]],EvaluationWindow$=[4,n0,_EW,0,[_WCW,_SW],[()=>WallClockWindow$,()=>SlidingWindow$]],AssociateDatasetKmsKey$=[9,n0,_ADKK,0,()=>AssociateDatasetKmsKeyInput$,()=>AssociateDatasetKmsKeyOutput$],
95
- CreateResourceMetricsConfiguration$=[9,n0,_CRMC,0,()=>CreateResourceMetricsConfigurationInput$,()=>CreateResourceMetricsConfigurationOutput$],DeleteAlarmMuteRule$=[9,n0,_DAMR,0,()=>DeleteAlarmMuteRuleInput$,()=>__Unit],DeleteAlarms$=[9,n0,_DAe,0,()=>DeleteAlarmsInput$,()=>__Unit],DeleteAnomalyDetector$=[9,n0,_DAD,0,()=>DeleteAnomalyDetectorInput$,()=>DeleteAnomalyDetectorOutput$],DeleteDashboards$=[9,n0,_DD,0,()=>DeleteDashboardsInput$,()=>DeleteDashboardsOutput$],DeleteInsightRules$=[9,n0,_DIR,
96
- 0,()=>DeleteInsightRulesInput$,()=>DeleteInsightRulesOutput$],DeleteMetricStream$=[9,n0,_DMS,0,()=>DeleteMetricStreamInput$,()=>DeleteMetricStreamOutput$],DeleteResourceMetricsConfiguration$=[9,n0,_DRMC,0,()=>DeleteResourceMetricsConfigurationInput$,()=>DeleteResourceMetricsConfigurationOutput$],DescribeAlarmContributors$=[9,n0,_DAC,0,()=>DescribeAlarmContributorsInput$,()=>DescribeAlarmContributorsOutput$],DescribeAlarmHistory$=[9,n0,_DAH,0,()=>DescribeAlarmHistoryInput$,()=>DescribeAlarmHistoryOutput$],
97
- DescribeAlarms$=[9,n0,_DAes,0,()=>DescribeAlarmsInput$,()=>DescribeAlarmsOutput$],DescribeAlarmsForMetric$=[9,n0,_DAFM,0,()=>DescribeAlarmsForMetricInput$,()=>DescribeAlarmsForMetricOutput$],DescribeAnomalyDetectors$=[9,n0,_DADe,0,()=>DescribeAnomalyDetectorsInput$,()=>DescribeAnomalyDetectorsOutput$],DescribeInsightRules$=[9,n0,_DIRe,0,()=>DescribeInsightRulesInput$,()=>DescribeInsightRulesOutput$],DisableAlarmActions$=[9,n0,_DAA,0,()=>DisableAlarmActionsInput$,()=>__Unit],DisableInsightRules$=[
98
- 9,n0,_DIRi,0,()=>DisableInsightRulesInput$,()=>DisableInsightRulesOutput$],DisassociateDatasetKmsKey$=[9,n0,_DDKK,2,()=>DisassociateDatasetKmsKeyInput$,()=>DisassociateDatasetKmsKeyOutput$],EnableAlarmActions$=[9,n0,_EAA,0,()=>EnableAlarmActionsInput$,()=>__Unit],EnableInsightRules$=[9,n0,_EIR,0,()=>EnableInsightRulesInput$,()=>EnableInsightRulesOutput$],GetAlarmMuteRule$=[9,n0,_GAMR,0,()=>GetAlarmMuteRuleInput$,()=>GetAlarmMuteRuleOutput$],GetDashboard$=[9,n0,_GD,0,()=>GetDashboardInput$,()=>GetDashboardOutput$],
99
- GetDataset$=[9,n0,_GDe,0,()=>GetDatasetInput$,()=>GetDatasetOutput$],GetInsightRuleReport$=[9,n0,_GIRR,0,()=>GetInsightRuleReportInput$,()=>GetInsightRuleReportOutput$],GetMetricData$=[9,n0,_GMD,0,()=>GetMetricDataInput$,()=>GetMetricDataOutput$],GetMetricStatistics$=[9,n0,_GMS,0,()=>GetMetricStatisticsInput$,()=>GetMetricStatisticsOutput$],GetMetricStream$=[9,n0,_GMSe,0,()=>GetMetricStreamInput$,()=>GetMetricStreamOutput$],GetMetricWidgetImage$=[9,n0,_GMWI,0,()=>GetMetricWidgetImageInput$,()=>GetMetricWidgetImageOutput$],
100
- GetOTelEnrichment$=[9,n0,_GOTE,0,()=>GetOTelEnrichmentInput$,()=>GetOTelEnrichmentOutput$],GetResourceMetricsConfiguration$=[9,n0,_GRMC,0,()=>GetResourceMetricsConfigurationInput$,()=>GetResourceMetricsConfigurationOutput$],ListAlarmMuteRules$=[9,n0,_LAMR,0,()=>ListAlarmMuteRulesInput$,()=>ListAlarmMuteRulesOutput$],ListDashboards$=[9,n0,_LD,0,()=>ListDashboardsInput$,()=>ListDashboardsOutput$],ListManagedInsightRules$=[9,n0,_LMIR,0,()=>ListManagedInsightRulesInput$,()=>ListManagedInsightRulesOutput$],
101
- ListMetrics$=[9,n0,_LMi,0,()=>ListMetricsInput$,()=>ListMetricsOutput$],ListMetricStreams$=[9,n0,_LMS,0,()=>ListMetricStreamsInput$,()=>ListMetricStreamsOutput$],ListTagsForResource$=[9,n0,_LTFR,0,()=>ListTagsForResourceInput$,()=>ListTagsForResourceOutput$],PutAlarmMuteRule$=[9,n0,_PAMR,0,()=>PutAlarmMuteRuleInput$,()=>__Unit],PutAnomalyDetector$=[9,n0,_PAD,0,()=>PutAnomalyDetectorInput$,()=>PutAnomalyDetectorOutput$],PutCompositeAlarm$=[9,n0,_PCA,0,()=>PutCompositeAlarmInput$,()=>__Unit],PutDashboard$=[
102
- 9,n0,_PD,0,()=>PutDashboardInput$,()=>PutDashboardOutput$],PutInsightRule$=[9,n0,_PIR,0,()=>PutInsightRuleInput$,()=>PutInsightRuleOutput$],PutLogAlarm$=[9,n0,_PLA,0,()=>PutLogAlarmInput$,()=>__Unit],PutManagedInsightRules$=[9,n0,_PMIR,0,()=>PutManagedInsightRulesInput$,()=>PutManagedInsightRulesOutput$],PutMetricAlarm$=[9,n0,_PMA,0,()=>PutMetricAlarmInput$,()=>__Unit],PutMetricData$=[9,n0,_PMD,0,()=>PutMetricDataInput$,()=>__Unit],PutMetricStream$=[9,n0,_PMS,0,()=>PutMetricStreamInput$,()=>PutMetricStreamOutput$],
103
- SetAlarmState$=[9,n0,_SAS,0,()=>SetAlarmStateInput$,()=>__Unit],StartMetricStreams$=[9,n0,_SMS,0,()=>StartMetricStreamsInput$,()=>StartMetricStreamsOutput$],StartOTelEnrichment$=[9,n0,_SOTE,0,()=>StartOTelEnrichmentInput$,()=>StartOTelEnrichmentOutput$],StopMetricStreams$=[9,n0,_SMSt,0,()=>StopMetricStreamsInput$,()=>StopMetricStreamsOutput$],StopOTelEnrichment$=[9,n0,_SOTEt,0,()=>StopOTelEnrichmentInput$,()=>StopOTelEnrichmentOutput$],TagResource$=[9,n0,_TR,0,()=>TagResourceInput$,()=>TagResourceOutput$],
104
- UntagResource$=[9,n0,_UR,0,()=>UntagResourceInput$,()=>UntagResourceOutput$],UpdateOTelEnrichment$=[9,n0,_UOTE,0,()=>UpdateOTelEnrichmentInput$,()=>UpdateOTelEnrichmentOutput$],UpdateResourceMetricsConfiguration$=[9,n0,_URMC,0,()=>UpdateResourceMetricsConfigurationInput$,()=>UpdateResourceMetricsConfigurationOutput$],getRuntimeConfig$1=config=>({apiVersion:"2010-08-01",base64Decoder:config?.base64Decoder??fromBase64,base64Encoder:config?.base64Encoder??toBase64,disableHostPrefix:config?.disableHostPrefix??
105
- !1,endpointProvider:config?.endpointProvider??defaultEndpointResolver,extensions:config?.extensions??[],httpAuthSchemeProvider:config?.httpAuthSchemeProvider??defaultCloudWatchHttpAuthSchemeProvider,httpAuthSchemes:config?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:ipc=>ipc.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer}],logger:config?.logger??new NoOpLogger,protocol:config?.protocol??AwsJson1_0Protocol,protocolSettings:config?.protocolSettings??{defaultNamespace:"\
106
- com.amazonaws.cloudwatch",errorTypeRegistries,xmlNamespace:"http://monitoring.amazonaws.com/doc/2010-08-01/",version:"2010-08-01",serviceTarget:"GraniteServiceVersion20100801",awsQueryCompatible:!0},serviceId:config?.serviceId??"CloudWatch",sha256:config?.sha256??Sha256,urlParser:config?.urlParser??parseUrl,utf8Decoder:config?.utf8Decoder??fromUtf8,utf8Encoder:config?.utf8Encoder??toUtf8}),getRuntimeConfig=config=>{emitWarningIfUnsupportedVersion(process.version);let defaultsMode=resolveDefaultsModeConfig(
107
- config),defaultConfigProvider=()=>defaultsMode().then(loadConfigsForDefaultMode),clientSharedValues=getRuntimeConfig$1(config);emitWarningIfUnsupportedVersion$1(process.version);let loaderConfig={profile:config?.profile,logger:clientSharedValues.logger};return{...clientSharedValues,...config,runtime:"node",defaultsMode,authSchemePreference:config?.authSchemePreference??loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,loaderConfig),bodyLengthChecker:config?.bodyLengthChecker??calculateBodyLength,credentialDefaultProvider:config?.
108
- credentialDefaultProvider??defaultProvider,defaultUserAgentProvider:config?.defaultUserAgentProvider??createDefaultUserAgentProvider({serviceId:clientSharedValues.serviceId,clientVersion:packageInfo.version}),disableRequestCompression:config?.disableRequestCompression??loadConfig(NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS,config),maxAttempts:config?.maxAttempts??loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS,config),region:config?.region??loadConfig(NODE_REGION_CONFIG_OPTIONS,{...NODE_REGION_CONFIG_FILE_OPTIONS,
109
- ...loaderConfig}),requestHandler:NodeHttpHandler.create(config?.requestHandler??defaultConfigProvider),requestMinCompressionSizeBytes:config?.requestMinCompressionSizeBytes??loadConfig(NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS,config),retryMode:config?.retryMode??loadConfig({...NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await defaultConfigProvider()).retryMode||DEFAULT_RETRY_MODE},config),streamCollector:config?.streamCollector??streamCollector,useDualstackEndpoint:config?.useDualstackEndpoint??
110
- loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,loaderConfig),useFipsEndpoint:config?.useFipsEndpoint??loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,loaderConfig),userAgentAppId:config?.userAgentAppId??loadConfig(NODE_APP_ID_CONFIG_OPTIONS,loaderConfig)}},getHttpAuthExtensionConfiguration=runtimeConfig=>{let _httpAuthSchemes=runtimeConfig.httpAuthSchemes,_httpAuthSchemeProvider=runtimeConfig.httpAuthSchemeProvider,_credentials=runtimeConfig.credentials;return{setHttpAuthScheme(httpAuthScheme){
111
- let index=_httpAuthSchemes.findIndex(scheme=>scheme.schemeId===httpAuthScheme.schemeId);index===-1?_httpAuthSchemes.push(httpAuthScheme):_httpAuthSchemes.splice(index,1,httpAuthScheme)},httpAuthSchemes(){return _httpAuthSchemes},setHttpAuthSchemeProvider(httpAuthSchemeProvider){_httpAuthSchemeProvider=httpAuthSchemeProvider},httpAuthSchemeProvider(){return _httpAuthSchemeProvider},setCredentials(credentials){_credentials=credentials},credentials(){return _credentials}}},resolveHttpAuthRuntimeConfig=config=>({
112
- httpAuthSchemes:config.httpAuthSchemes(),httpAuthSchemeProvider:config.httpAuthSchemeProvider(),credentials:config.credentials()}),resolveRuntimeExtensions=(runtimeConfig,extensions)=>{let extensionConfiguration=Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig),getDefaultExtensionConfiguration(runtimeConfig),getHttpHandlerExtensionConfiguration(runtimeConfig),getHttpAuthExtensionConfiguration(runtimeConfig));return extensions.forEach(extension=>extension.configure(extensionConfiguration)),
113
- Object.assign(runtimeConfig,resolveAwsRegionExtensionConfiguration(extensionConfiguration),resolveDefaultRuntimeConfig(extensionConfiguration),resolveHttpHandlerRuntimeConfig(extensionConfiguration),resolveHttpAuthRuntimeConfig(extensionConfiguration))},CloudWatchClient=class extends Client{config;constructor(...[configuration]){let _config_0=getRuntimeConfig(configuration||{});super(_config_0),this.initConfig=_config_0;let _config_1=resolveClientEndpointParameters(_config_0),_config_2=resolveUserAgentConfig(
114
- _config_1),_config_3=resolveRetryConfig(_config_2),_config_4=resolveRegionConfig(_config_3),_config_5=resolveHostHeaderConfig(_config_4),_config_6=resolveEndpointConfig(_config_5),_config_7=resolveHttpAuthSchemeConfig(_config_6),_config_8=resolveCompressionConfig(_config_7),_config_9=resolveRuntimeExtensions(_config_8,configuration?.extensions||[]);this.config=_config_9,this.middlewareStack.use(getSchemaSerdePlugin(this.config)),this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.
115
- use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultCloudWatchHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async config=>new DefaultIdentityProviderConfig(
116
- {"aws.auth#sigv4":config.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config))}destroy(){super.destroy()}},command=makeBuilder(commonParams,"GraniteServiceVersion20100801","CloudWatchClient",getEndpointPlugin),_ep0={},_mw0=(Command,cs,config,o)=>[],_mw1=(Command,cs,config,o)=>[getCompressionPlugin(config,{encodings:["gzip"]})],AssociateDatasetKmsKeyCommand=class extends command(_ep0,_mw0,"AssociateDatasetKmsKey",AssociateDatasetKmsKey$){},CreateResourceMetricsConfigurationCommand=class extends command(
117
- _ep0,_mw0,"CreateResourceMetricsConfiguration",CreateResourceMetricsConfiguration$){},DeleteAlarmMuteRuleCommand=class extends command(_ep0,_mw0,"DeleteAlarmMuteRule",DeleteAlarmMuteRule$){},DeleteAlarmsCommand=class extends command(_ep0,_mw0,"DeleteAlarms",DeleteAlarms$){},DeleteAnomalyDetectorCommand=class extends command(_ep0,_mw0,"DeleteAnomalyDetector",DeleteAnomalyDetector$){},DeleteDashboardsCommand=class extends command(_ep0,_mw0,"DeleteDashboards",DeleteDashboards$){},DeleteInsightRulesCommand=class extends command(
118
- _ep0,_mw0,"DeleteInsightRules",DeleteInsightRules$){},DeleteMetricStreamCommand=class extends command(_ep0,_mw0,"DeleteMetricStream",DeleteMetricStream$){},DeleteResourceMetricsConfigurationCommand=class extends command(_ep0,_mw0,"DeleteResourceMetricsConfiguration",DeleteResourceMetricsConfiguration$){},DescribeAlarmContributorsCommand=class extends command(_ep0,_mw0,"DescribeAlarmContributors",DescribeAlarmContributors$){},DescribeAlarmHistoryCommand=class extends command(_ep0,_mw0,"DescribeAl\
119
- armHistory",DescribeAlarmHistory$){},DescribeAlarmsCommand=class extends command(_ep0,_mw0,"DescribeAlarms",DescribeAlarms$){},DescribeAlarmsForMetricCommand=class extends command(_ep0,_mw0,"DescribeAlarmsForMetric",DescribeAlarmsForMetric$){},DescribeAnomalyDetectorsCommand=class extends command(_ep0,_mw0,"DescribeAnomalyDetectors",DescribeAnomalyDetectors$){},DescribeInsightRulesCommand=class extends command(_ep0,_mw0,"DescribeInsightRules",DescribeInsightRules$){},DisableAlarmActionsCommand=class extends command(
120
- _ep0,_mw0,"DisableAlarmActions",DisableAlarmActions$){},DisableInsightRulesCommand=class extends command(_ep0,_mw0,"DisableInsightRules",DisableInsightRules$){},DisassociateDatasetKmsKeyCommand=class extends command(_ep0,_mw0,"DisassociateDatasetKmsKey",DisassociateDatasetKmsKey$){},EnableAlarmActionsCommand=class extends command(_ep0,_mw0,"EnableAlarmActions",EnableAlarmActions$){},EnableInsightRulesCommand=class extends command(_ep0,_mw0,"EnableInsightRules",EnableInsightRules$){},GetAlarmMuteRuleCommand=class extends command(
121
- _ep0,_mw0,"GetAlarmMuteRule",GetAlarmMuteRule$){},GetDashboardCommand=class extends command(_ep0,_mw0,"GetDashboard",GetDashboard$){},GetDatasetCommand=class extends command(_ep0,_mw0,"GetDataset",GetDataset$){},GetInsightRuleReportCommand=class extends command(_ep0,_mw0,"GetInsightRuleReport",GetInsightRuleReport$){},GetMetricDataCommand=class extends command(_ep0,_mw0,"GetMetricData",GetMetricData$){},GetMetricStatisticsCommand=class extends command(_ep0,_mw0,"GetMetricStatistics",GetMetricStatistics$){},
122
- GetMetricStreamCommand=class extends command(_ep0,_mw0,"GetMetricStream",GetMetricStream$){},GetMetricWidgetImageCommand=class extends command(_ep0,_mw0,"GetMetricWidgetImage",GetMetricWidgetImage$){},GetOTelEnrichmentCommand=class extends command(_ep0,_mw0,"GetOTelEnrichment",GetOTelEnrichment$){},GetResourceMetricsConfigurationCommand=class extends command(_ep0,_mw0,"GetResourceMetricsConfiguration",GetResourceMetricsConfiguration$){},ListAlarmMuteRulesCommand=class extends command(_ep0,_mw0,"\
123
- ListAlarmMuteRules",ListAlarmMuteRules$){},ListDashboardsCommand=class extends command(_ep0,_mw0,"ListDashboards",ListDashboards$){},ListManagedInsightRulesCommand=class extends command(_ep0,_mw0,"ListManagedInsightRules",ListManagedInsightRules$){},ListMetricsCommand=class extends command(_ep0,_mw0,"ListMetrics",ListMetrics$){},ListMetricStreamsCommand=class extends command(_ep0,_mw0,"ListMetricStreams",ListMetricStreams$){},ListTagsForResourceCommand=class extends command(_ep0,_mw0,"ListTagsFo\
124
- rResource",ListTagsForResource$){},PutAlarmMuteRuleCommand=class extends command(_ep0,_mw0,"PutAlarmMuteRule",PutAlarmMuteRule$){},PutAnomalyDetectorCommand=class extends command(_ep0,_mw0,"PutAnomalyDetector",PutAnomalyDetector$){},PutCompositeAlarmCommand=class extends command(_ep0,_mw0,"PutCompositeAlarm",PutCompositeAlarm$){},PutDashboardCommand=class extends command(_ep0,_mw0,"PutDashboard",PutDashboard$){},PutInsightRuleCommand=class extends command(_ep0,_mw0,"PutInsightRule",PutInsightRule$){},
125
- PutLogAlarmCommand=class extends command(_ep0,_mw0,"PutLogAlarm",PutLogAlarm$){},PutManagedInsightRulesCommand=class extends command(_ep0,_mw0,"PutManagedInsightRules",PutManagedInsightRules$){},PutMetricAlarmCommand=class extends command(_ep0,_mw0,"PutMetricAlarm",PutMetricAlarm$){},PutMetricDataCommand=class extends command(_ep0,_mw1,"PutMetricData",PutMetricData$){},PutMetricStreamCommand=class extends command(_ep0,_mw0,"PutMetricStream",PutMetricStream$){},SetAlarmStateCommand=class extends command(
126
- _ep0,_mw0,"SetAlarmState",SetAlarmState$){},StartMetricStreamsCommand=class extends command(_ep0,_mw0,"StartMetricStreams",StartMetricStreams$){},StartOTelEnrichmentCommand=class extends command(_ep0,_mw0,"StartOTelEnrichment",StartOTelEnrichment$){},StopMetricStreamsCommand=class extends command(_ep0,_mw0,"StopMetricStreams",StopMetricStreams$){},StopOTelEnrichmentCommand=class extends command(_ep0,_mw0,"StopOTelEnrichment",StopOTelEnrichment$){},TagResourceCommand=class extends command(_ep0,_mw0,
127
- "TagResource",TagResource$){},UntagResourceCommand=class extends command(_ep0,_mw0,"UntagResource",UntagResource$){},UpdateOTelEnrichmentCommand=class extends command(_ep0,_mw0,"UpdateOTelEnrichment",UpdateOTelEnrichment$){},UpdateResourceMetricsConfigurationCommand=class extends command(_ep0,_mw0,"UpdateResourceMetricsConfiguration",UpdateResourceMetricsConfiguration$){},paginateDescribeAlarmHistory=createPaginator(CloudWatchClient,DescribeAlarmHistoryCommand,"NextToken","NextToken","MaxRecords"),
128
- paginateDescribeAlarms=createPaginator(CloudWatchClient,DescribeAlarmsCommand,"NextToken","NextToken","MaxRecords"),paginateDescribeAnomalyDetectors=createPaginator(CloudWatchClient,DescribeAnomalyDetectorsCommand,"NextToken","NextToken","MaxResults"),paginateDescribeInsightRules=createPaginator(CloudWatchClient,DescribeInsightRulesCommand,"NextToken","NextToken","MaxResults"),paginateGetMetricData=createPaginator(CloudWatchClient,GetMetricDataCommand,"NextToken","NextToken","MaxDatapoints"),paginateListAlarmMuteRules=createPaginator(
129
- CloudWatchClient,ListAlarmMuteRulesCommand,"NextToken","NextToken","MaxRecords"),paginateListDashboards=createPaginator(CloudWatchClient,ListDashboardsCommand,"NextToken","NextToken",""),paginateListManagedInsightRules=createPaginator(CloudWatchClient,ListManagedInsightRulesCommand,"NextToken","NextToken","MaxResults"),paginateListMetrics=createPaginator(CloudWatchClient,ListMetricsCommand,"NextToken","NextToken",""),paginateListMetricStreams=createPaginator(CloudWatchClient,ListMetricStreamsCommand,
130
- "NextToken","NextToken","MaxResults"),checkState$3=async(client,input)=>{let reason;try{let result=await client.send(new DescribeAlarmsCommand(input));reason=result;try{if([].concat(...result.MetricAlarms).length>0==!0)return{state:WaiterState.SUCCESS,reason}}catch{}}catch(exception){reason=exception}return{state:WaiterState.RETRY,reason}},waitForAlarmExists=async(params,input)=>createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState$3),waitUntilAlarmExists=async(params,input)=>{let result=await createWaiter(
131
- {...{minDelay:5,maxDelay:120},...params},input,checkState$3);return checkExceptions(result)},checkState$2=async(client,input)=>{let reason;try{return reason=await client.send(new GetAlarmMuteRuleCommand(input)),{state:WaiterState.SUCCESS,reason}}catch(exception){if(reason=exception,exception.name==="ResourceNotFoundException")return{state:WaiterState.RETRY,reason}}return{state:WaiterState.RETRY,reason}},waitForAlarmMuteRuleExists=async(params,input)=>createWaiter({...{minDelay:5,maxDelay:120},...params},
132
- input,checkState$2),waitUntilAlarmMuteRuleExists=async(params,input)=>{let result=await createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState$2);return checkExceptions(result)},checkState$1=async(client,input)=>{let reason;try{let result=await client.send(new DescribeAlarmsCommand(input));reason=result;try{if([].concat(...result.CompositeAlarms).length>0==!0)return{state:WaiterState.SUCCESS,reason}}catch{}}catch(exception){reason=exception}return{state:WaiterState.RETRY,reason}},
133
- waitForCompositeAlarmExists=async(params,input)=>createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState$1),waitUntilCompositeAlarmExists=async(params,input)=>{let result=await createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState$1);return checkExceptions(result)},checkState=async(client,input)=>{let reason;try{let result=await client.send(new DescribeAlarmsCommand(input));reason=result;try{if([].concat(...result.LogAlarms).length>0==!0)return{state:WaiterState.SUCCESS,
134
- reason}}catch{}}catch(exception){reason=exception}return{state:WaiterState.RETRY,reason}},waitForLogAlarmExists=async(params,input)=>createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState),waitUntilLogAlarmExists=async(params,input)=>{let result=await createWaiter({...{minDelay:5,maxDelay:120},...params},input,checkState);return checkExceptions(result)},commands={AssociateDatasetKmsKeyCommand,CreateResourceMetricsConfigurationCommand,DeleteAlarmMuteRuleCommand,DeleteAlarmsCommand,
135
- DeleteAnomalyDetectorCommand,DeleteDashboardsCommand,DeleteInsightRulesCommand,DeleteMetricStreamCommand,DeleteResourceMetricsConfigurationCommand,DescribeAlarmContributorsCommand,DescribeAlarmHistoryCommand,DescribeAlarmsCommand,DescribeAlarmsForMetricCommand,DescribeAnomalyDetectorsCommand,DescribeInsightRulesCommand,DisableAlarmActionsCommand,DisableInsightRulesCommand,DisassociateDatasetKmsKeyCommand,EnableAlarmActionsCommand,EnableInsightRulesCommand,GetAlarmMuteRuleCommand,GetDashboardCommand,
136
- GetDatasetCommand,GetInsightRuleReportCommand,GetMetricDataCommand,GetMetricStatisticsCommand,GetMetricStreamCommand,GetMetricWidgetImageCommand,GetOTelEnrichmentCommand,GetResourceMetricsConfigurationCommand,ListAlarmMuteRulesCommand,ListDashboardsCommand,ListManagedInsightRulesCommand,ListMetricsCommand,ListMetricStreamsCommand,ListTagsForResourceCommand,PutAlarmMuteRuleCommand,PutAnomalyDetectorCommand,PutCompositeAlarmCommand,PutDashboardCommand,PutInsightRuleCommand,PutLogAlarmCommand,PutManagedInsightRulesCommand,
137
- PutMetricAlarmCommand,PutMetricDataCommand,PutMetricStreamCommand,SetAlarmStateCommand,StartMetricStreamsCommand,StartOTelEnrichmentCommand,StopMetricStreamsCommand,StopOTelEnrichmentCommand,TagResourceCommand,UntagResourceCommand,UpdateOTelEnrichmentCommand,UpdateResourceMetricsConfigurationCommand},paginators={paginateDescribeAlarmHistory,paginateDescribeAlarms,paginateDescribeAnomalyDetectors,paginateDescribeInsightRules,paginateGetMetricData,paginateListAlarmMuteRules,paginateListDashboards,
138
- paginateListManagedInsightRules,paginateListMetrics,paginateListMetricStreams},waiters={waitUntilAlarmExists,waitUntilCompositeAlarmExists,waitUntilLogAlarmExists,waitUntilAlarmMuteRuleExists},CloudWatch=class extends CloudWatchClient{};createAggregatedClient(commands,CloudWatch,{paginators,waiters});var ActionsSuppressedBy={Alarm:"Alarm",ExtensionPeriod:"ExtensionPeriod",WaitPeriod:"WaitPeriod"},AlarmType={CompositeAlarm:"CompositeAlarm",LogAlarm:"LogAlarm",MetricAlarm:"MetricAlarm"},HistoryItemType={
139
- Action:"Action",AlarmContributorAction:"AlarmContributorAction",AlarmContributorStateUpdate:"AlarmContributorStateUpdate",ConfigurationUpdate:"ConfigurationUpdate",StateUpdate:"StateUpdate"},AlarmMuteRuleStatus={ACTIVE:"ACTIVE",EXPIRED:"EXPIRED",SCHEDULED:"SCHEDULED"},StandardUnit={Bits:"Bits",Bits_Second:"Bits/Second",Bytes:"Bytes",Bytes_Second:"Bytes/Second",Count:"Count",Count_Second:"Count/Second",Gigabits:"Gigabits",Gigabits_Second:"Gigabits/Second",Gigabytes:"Gigabytes",Gigabytes_Second:"G\
140
- igabytes/Second",Kilobits:"Kilobits",Kilobits_Second:"Kilobits/Second",Kilobytes:"Kilobytes",Kilobytes_Second:"Kilobytes/Second",Megabits:"Megabits",Megabits_Second:"Megabits/Second",Megabytes:"Megabytes",Megabytes_Second:"Megabytes/Second",Microseconds:"Microseconds",Milliseconds:"Milliseconds",None:"None",Percent:"Percent",Seconds:"Seconds",Terabits:"Terabits",Terabits_Second:"Terabits/Second",Terabytes:"Terabytes",Terabytes_Second:"Terabytes/Second"},AnomalyDetectorStateValue={PENDING_TRAINING:"\
141
- PENDING_TRAINING",TRAINED:"TRAINED",TRAINED_INSUFFICIENT_DATA:"TRAINED_INSUFFICIENT_DATA"},AnomalyDetectorType={METRIC_MATH:"METRIC_MATH",SINGLE_METRIC:"SINGLE_METRIC"},ComparisonOperator={GreaterThanOrEqualToThreshold:"GreaterThanOrEqualToThreshold",GreaterThanThreshold:"GreaterThanThreshold",GreaterThanUpperThreshold:"GreaterThanUpperThreshold",LessThanLowerOrGreaterThanUpperThreshold:"LessThanLowerOrGreaterThanUpperThreshold",LessThanLowerThreshold:"LessThanLowerThreshold",LessThanOrEqualToThreshold:"\
142
- LessThanOrEqualToThreshold",LessThanThreshold:"LessThanThreshold"},StateValue={ALARM:"ALARM",INSUFFICIENT_DATA:"INSUFFICIENT_DATA",OK:"OK"},ScanBy={TIMESTAMP_ASCENDING:"TimestampAscending",TIMESTAMP_DESCENDING:"TimestampDescending"},EvaluationState={EVALUATION_ERROR:"EVALUATION_ERROR",EVALUATION_FAILURE:"EVALUATION_FAILURE",PARTIAL_DATA:"PARTIAL_DATA"},Statistic={Average:"Average",Maximum:"Maximum",Minimum:"Minimum",SampleCount:"SampleCount",Sum:"Sum"},StatusCode={COMPLETE:"Complete",FORBIDDEN:"\
143
- Forbidden",INTERNAL_ERROR:"InternalError",PARTIAL_DATA:"PartialData"},MetricStreamOutputFormat={JSON:"json",OPEN_TELEMETRY_0_7:"opentelemetry0.7",OPEN_TELEMETRY_1_0:"opentelemetry1.0"},OTelEnrichmentStatus={RUNNING:"Running",STOPPED:"Stopped"},RecentlyActive={PT3H:"PT3H"};exports.ActionsSuppressedBy=ActionsSuppressedBy;exports.AlarmContributor$=AlarmContributor$;exports.AlarmHistoryItem$=AlarmHistoryItem$;exports.AlarmMuteRuleStatus=AlarmMuteRuleStatus;exports.AlarmMuteRuleSummary$=AlarmMuteRuleSummary$;
144
- exports.AlarmPromQLCriteria$=AlarmPromQLCriteria$;exports.AlarmType=AlarmType;exports.AnomalyDetector$=AnomalyDetector$;exports.AnomalyDetectorConfiguration$=AnomalyDetectorConfiguration$;exports.AnomalyDetectorStateValue=AnomalyDetectorStateValue;exports.AnomalyDetectorType=AnomalyDetectorType;exports.AssociateDatasetKmsKey$=AssociateDatasetKmsKey$;exports.AssociateDatasetKmsKeyCommand=AssociateDatasetKmsKeyCommand;exports.AssociateDatasetKmsKeyInput$=AssociateDatasetKmsKeyInput$;exports.AssociateDatasetKmsKeyOutput$=
145
- AssociateDatasetKmsKeyOutput$;exports.CloudWatch=CloudWatch;exports.CloudWatchClient=CloudWatchClient;exports.CloudWatchServiceException=CloudWatchServiceException;exports.CloudWatchServiceException$=CloudWatchServiceException$;exports.ComparisonOperator=ComparisonOperator;exports.CompositeAlarm$=CompositeAlarm$;exports.ConcurrentModificationException=ConcurrentModificationException;exports.ConcurrentModificationException$=ConcurrentModificationException$;exports.ConflictException=ConflictException;
146
- exports.ConflictException$=ConflictException$;exports.CreateResourceMetricsConfiguration$=CreateResourceMetricsConfiguration$;exports.CreateResourceMetricsConfigurationCommand=CreateResourceMetricsConfigurationCommand;exports.CreateResourceMetricsConfigurationInput$=CreateResourceMetricsConfigurationInput$;exports.CreateResourceMetricsConfigurationOutput$=CreateResourceMetricsConfigurationOutput$;exports.DashboardEntry$=DashboardEntry$;exports.DashboardInvalidInputError=DashboardInvalidInputError;
147
- exports.DashboardInvalidInputError$=DashboardInvalidInputError$;exports.DashboardNotFoundError=DashboardNotFoundError;exports.DashboardNotFoundError$=DashboardNotFoundError$;exports.DashboardValidationMessage$=DashboardValidationMessage$;exports.Datapoint$=Datapoint$;exports.DeleteAlarmMuteRule$=DeleteAlarmMuteRule$;exports.DeleteAlarmMuteRuleCommand=DeleteAlarmMuteRuleCommand;exports.DeleteAlarmMuteRuleInput$=DeleteAlarmMuteRuleInput$;exports.DeleteAlarms$=DeleteAlarms$;exports.DeleteAlarmsCommand=
148
- DeleteAlarmsCommand;exports.DeleteAlarmsInput$=DeleteAlarmsInput$;exports.DeleteAnomalyDetector$=DeleteAnomalyDetector$;exports.DeleteAnomalyDetectorCommand=DeleteAnomalyDetectorCommand;exports.DeleteAnomalyDetectorInput$=DeleteAnomalyDetectorInput$;exports.DeleteAnomalyDetectorOutput$=DeleteAnomalyDetectorOutput$;exports.DeleteDashboards$=DeleteDashboards$;exports.DeleteDashboardsCommand=DeleteDashboardsCommand;exports.DeleteDashboardsInput$=DeleteDashboardsInput$;exports.DeleteDashboardsOutput$=
149
- DeleteDashboardsOutput$;exports.DeleteInsightRules$=DeleteInsightRules$;exports.DeleteInsightRulesCommand=DeleteInsightRulesCommand;exports.DeleteInsightRulesInput$=DeleteInsightRulesInput$;exports.DeleteInsightRulesOutput$=DeleteInsightRulesOutput$;exports.DeleteMetricStream$=DeleteMetricStream$;exports.DeleteMetricStreamCommand=DeleteMetricStreamCommand;exports.DeleteMetricStreamInput$=DeleteMetricStreamInput$;exports.DeleteMetricStreamOutput$=DeleteMetricStreamOutput$;exports.DeleteResourceMetricsConfiguration$=
150
- DeleteResourceMetricsConfiguration$;exports.DeleteResourceMetricsConfigurationCommand=DeleteResourceMetricsConfigurationCommand;exports.DeleteResourceMetricsConfigurationInput$=DeleteResourceMetricsConfigurationInput$;exports.DeleteResourceMetricsConfigurationOutput$=DeleteResourceMetricsConfigurationOutput$;exports.DescribeAlarmContributors$=DescribeAlarmContributors$;exports.DescribeAlarmContributorsCommand=DescribeAlarmContributorsCommand;exports.DescribeAlarmContributorsInput$=DescribeAlarmContributorsInput$;
151
- exports.DescribeAlarmContributorsOutput$=DescribeAlarmContributorsOutput$;exports.DescribeAlarmHistory$=DescribeAlarmHistory$;exports.DescribeAlarmHistoryCommand=DescribeAlarmHistoryCommand;exports.DescribeAlarmHistoryInput$=DescribeAlarmHistoryInput$;exports.DescribeAlarmHistoryOutput$=DescribeAlarmHistoryOutput$;exports.DescribeAlarms$=DescribeAlarms$;exports.DescribeAlarmsCommand=DescribeAlarmsCommand;exports.DescribeAlarmsForMetric$=DescribeAlarmsForMetric$;exports.DescribeAlarmsForMetricCommand=
152
- DescribeAlarmsForMetricCommand;exports.DescribeAlarmsForMetricInput$=DescribeAlarmsForMetricInput$;exports.DescribeAlarmsForMetricOutput$=DescribeAlarmsForMetricOutput$;exports.DescribeAlarmsInput$=DescribeAlarmsInput$;exports.DescribeAlarmsOutput$=DescribeAlarmsOutput$;exports.DescribeAnomalyDetectors$=DescribeAnomalyDetectors$;exports.DescribeAnomalyDetectorsCommand=DescribeAnomalyDetectorsCommand;exports.DescribeAnomalyDetectorsInput$=DescribeAnomalyDetectorsInput$;exports.DescribeAnomalyDetectorsOutput$=
153
- DescribeAnomalyDetectorsOutput$;exports.DescribeInsightRules$=DescribeInsightRules$;exports.DescribeInsightRulesCommand=DescribeInsightRulesCommand;exports.DescribeInsightRulesInput$=DescribeInsightRulesInput$;exports.DescribeInsightRulesOutput$=DescribeInsightRulesOutput$;exports.Dimension$=Dimension$;exports.DimensionFilter$=DimensionFilter$;exports.DisableAlarmActions$=DisableAlarmActions$;exports.DisableAlarmActionsCommand=DisableAlarmActionsCommand;exports.DisableAlarmActionsInput$=DisableAlarmActionsInput$;
154
- exports.DisableInsightRules$=DisableInsightRules$;exports.DisableInsightRulesCommand=DisableInsightRulesCommand;exports.DisableInsightRulesInput$=DisableInsightRulesInput$;exports.DisableInsightRulesOutput$=DisableInsightRulesOutput$;exports.DisassociateDatasetKmsKey$=DisassociateDatasetKmsKey$;exports.DisassociateDatasetKmsKeyCommand=DisassociateDatasetKmsKeyCommand;exports.DisassociateDatasetKmsKeyInput$=DisassociateDatasetKmsKeyInput$;exports.DisassociateDatasetKmsKeyOutput$=DisassociateDatasetKmsKeyOutput$;
155
- exports.EnableAlarmActions$=EnableAlarmActions$;exports.EnableAlarmActionsCommand=EnableAlarmActionsCommand;exports.EnableAlarmActionsInput$=EnableAlarmActionsInput$;exports.EnableInsightRules$=EnableInsightRules$;exports.EnableInsightRulesCommand=EnableInsightRulesCommand;exports.EnableInsightRulesInput$=EnableInsightRulesInput$;exports.EnableInsightRulesOutput$=EnableInsightRulesOutput$;exports.Entity$=Entity$;exports.EntityMetricData$=EntityMetricData$;exports.EvaluationCriteria$=EvaluationCriteria$;
156
- exports.EvaluationState=EvaluationState;exports.EvaluationWindow$=EvaluationWindow$;exports.GetAlarmMuteRule$=GetAlarmMuteRule$;exports.GetAlarmMuteRuleCommand=GetAlarmMuteRuleCommand;exports.GetAlarmMuteRuleInput$=GetAlarmMuteRuleInput$;exports.GetAlarmMuteRuleOutput$=GetAlarmMuteRuleOutput$;exports.GetDashboard$=GetDashboard$;exports.GetDashboardCommand=GetDashboardCommand;exports.GetDashboardInput$=GetDashboardInput$;exports.GetDashboardOutput$=GetDashboardOutput$;exports.GetDataset$=GetDataset$;
157
- exports.GetDatasetCommand=GetDatasetCommand;exports.GetDatasetInput$=GetDatasetInput$;exports.GetDatasetOutput$=GetDatasetOutput$;exports.GetInsightRuleReport$=GetInsightRuleReport$;exports.GetInsightRuleReportCommand=GetInsightRuleReportCommand;exports.GetInsightRuleReportInput$=GetInsightRuleReportInput$;exports.GetInsightRuleReportOutput$=GetInsightRuleReportOutput$;exports.GetMetricData$=GetMetricData$;exports.GetMetricDataCommand=GetMetricDataCommand;exports.GetMetricDataInput$=GetMetricDataInput$;
158
- exports.GetMetricDataOutput$=GetMetricDataOutput$;exports.GetMetricStatistics$=GetMetricStatistics$;exports.GetMetricStatisticsCommand=GetMetricStatisticsCommand;exports.GetMetricStatisticsInput$=GetMetricStatisticsInput$;exports.GetMetricStatisticsOutput$=GetMetricStatisticsOutput$;exports.GetMetricStream$=GetMetricStream$;exports.GetMetricStreamCommand=GetMetricStreamCommand;exports.GetMetricStreamInput$=GetMetricStreamInput$;exports.GetMetricStreamOutput$=GetMetricStreamOutput$;exports.GetMetricWidgetImage$=
159
- GetMetricWidgetImage$;exports.GetMetricWidgetImageCommand=GetMetricWidgetImageCommand;exports.GetMetricWidgetImageInput$=GetMetricWidgetImageInput$;exports.GetMetricWidgetImageOutput$=GetMetricWidgetImageOutput$;exports.GetOTelEnrichment$=GetOTelEnrichment$;exports.GetOTelEnrichmentCommand=GetOTelEnrichmentCommand;exports.GetOTelEnrichmentInput$=GetOTelEnrichmentInput$;exports.GetOTelEnrichmentOutput$=GetOTelEnrichmentOutput$;exports.GetResourceMetricsConfiguration$=GetResourceMetricsConfiguration$;
160
- exports.GetResourceMetricsConfigurationCommand=GetResourceMetricsConfigurationCommand;exports.GetResourceMetricsConfigurationInput$=GetResourceMetricsConfigurationInput$;exports.GetResourceMetricsConfigurationOutput$=GetResourceMetricsConfigurationOutput$;exports.HistoryItemType=HistoryItemType;exports.InsightRule$=InsightRule$;exports.InsightRuleContributor$=InsightRuleContributor$;exports.InsightRuleContributorDatapoint$=InsightRuleContributorDatapoint$;exports.InsightRuleMetricDatapoint$=InsightRuleMetricDatapoint$;
161
- exports.InternalServiceFault=InternalServiceFault;exports.InternalServiceFault$=InternalServiceFault$;exports.InvalidFormatFault=InvalidFormatFault;exports.InvalidFormatFault$=InvalidFormatFault$;exports.InvalidNextToken=InvalidNextToken;exports.InvalidNextToken$=InvalidNextToken$;exports.InvalidParameterCombinationException=InvalidParameterCombinationException;exports.InvalidParameterCombinationException$=InvalidParameterCombinationException$;exports.InvalidParameterValueException=InvalidParameterValueException;
162
- exports.InvalidParameterValueException$=InvalidParameterValueException$;exports.KmsAccessDeniedException=KmsAccessDeniedException;exports.KmsAccessDeniedException$=KmsAccessDeniedException$;exports.KmsKeyDisabledException=KmsKeyDisabledException;exports.KmsKeyDisabledException$=KmsKeyDisabledException$;exports.KmsKeyNotFoundException=KmsKeyNotFoundException;exports.KmsKeyNotFoundException$=KmsKeyNotFoundException$;exports.LabelOptions$=LabelOptions$;exports.LimitExceededException=LimitExceededException;
163
- exports.LimitExceededException$=LimitExceededException$;exports.LimitExceededFault=LimitExceededFault;exports.LimitExceededFault$=LimitExceededFault$;exports.ListAlarmMuteRules$=ListAlarmMuteRules$;exports.ListAlarmMuteRulesCommand=ListAlarmMuteRulesCommand;exports.ListAlarmMuteRulesInput$=ListAlarmMuteRulesInput$;exports.ListAlarmMuteRulesOutput$=ListAlarmMuteRulesOutput$;exports.ListDashboards$=ListDashboards$;exports.ListDashboardsCommand=ListDashboardsCommand;exports.ListDashboardsInput$=ListDashboardsInput$;
164
- exports.ListDashboardsOutput$=ListDashboardsOutput$;exports.ListManagedInsightRules$=ListManagedInsightRules$;exports.ListManagedInsightRulesCommand=ListManagedInsightRulesCommand;exports.ListManagedInsightRulesInput$=ListManagedInsightRulesInput$;exports.ListManagedInsightRulesOutput$=ListManagedInsightRulesOutput$;exports.ListMetricStreams$=ListMetricStreams$;exports.ListMetricStreamsCommand=ListMetricStreamsCommand;exports.ListMetricStreamsInput$=ListMetricStreamsInput$;exports.ListMetricStreamsOutput$=
165
- ListMetricStreamsOutput$;exports.ListMetrics$=ListMetrics$;exports.ListMetricsCommand=ListMetricsCommand;exports.ListMetricsInput$=ListMetricsInput$;exports.ListMetricsOutput$=ListMetricsOutput$;exports.ListTagsForResource$=ListTagsForResource$;exports.ListTagsForResourceCommand=ListTagsForResourceCommand;exports.ListTagsForResourceInput$=ListTagsForResourceInput$;exports.ListTagsForResourceOutput$=ListTagsForResourceOutput$;exports.LogAlarm$=LogAlarm$;exports.ManagedRule$=ManagedRule$;exports.ManagedRuleDescription$=
166
- ManagedRuleDescription$;exports.ManagedRuleState$=ManagedRuleState$;exports.MessageData$=MessageData$;exports.Metric$=Metric$;exports.MetricAlarm$=MetricAlarm$;exports.MetricCharacteristics$=MetricCharacteristics$;exports.MetricDataQuery$=MetricDataQuery$;exports.MetricDataResult$=MetricDataResult$;exports.MetricDatum$=MetricDatum$;exports.MetricMathAnomalyDetector$=MetricMathAnomalyDetector$;exports.MetricStat$=MetricStat$;exports.MetricStreamEntry$=MetricStreamEntry$;exports.MetricStreamFilter$=
167
- MetricStreamFilter$;exports.MetricStreamOutputFormat=MetricStreamOutputFormat;exports.MetricStreamStatisticsConfiguration$=MetricStreamStatisticsConfiguration$;exports.MetricStreamStatisticsMetric$=MetricStreamStatisticsMetric$;exports.MissingRequiredParameterException=MissingRequiredParameterException;exports.MissingRequiredParameterException$=MissingRequiredParameterException$;exports.MuteTargets$=MuteTargets$;exports.OTelEnrichmentMetricSelector$=OTelEnrichmentMetricSelector$;exports.OTelEnrichmentStatus=
168
- OTelEnrichmentStatus;exports.PartialFailure$=PartialFailure$;exports.PutAlarmMuteRule$=PutAlarmMuteRule$;exports.PutAlarmMuteRuleCommand=PutAlarmMuteRuleCommand;exports.PutAlarmMuteRuleInput$=PutAlarmMuteRuleInput$;exports.PutAnomalyDetector$=PutAnomalyDetector$;exports.PutAnomalyDetectorCommand=PutAnomalyDetectorCommand;exports.PutAnomalyDetectorInput$=PutAnomalyDetectorInput$;exports.PutAnomalyDetectorOutput$=PutAnomalyDetectorOutput$;exports.PutCompositeAlarm$=PutCompositeAlarm$;exports.PutCompositeAlarmCommand=
169
- PutCompositeAlarmCommand;exports.PutCompositeAlarmInput$=PutCompositeAlarmInput$;exports.PutDashboard$=PutDashboard$;exports.PutDashboardCommand=PutDashboardCommand;exports.PutDashboardInput$=PutDashboardInput$;exports.PutDashboardOutput$=PutDashboardOutput$;exports.PutInsightRule$=PutInsightRule$;exports.PutInsightRuleCommand=PutInsightRuleCommand;exports.PutInsightRuleInput$=PutInsightRuleInput$;exports.PutInsightRuleOutput$=PutInsightRuleOutput$;exports.PutLogAlarm$=PutLogAlarm$;exports.PutLogAlarmCommand=
170
- PutLogAlarmCommand;exports.PutLogAlarmInput$=PutLogAlarmInput$;exports.PutManagedInsightRules$=PutManagedInsightRules$;exports.PutManagedInsightRulesCommand=PutManagedInsightRulesCommand;exports.PutManagedInsightRulesInput$=PutManagedInsightRulesInput$;exports.PutManagedInsightRulesOutput$=PutManagedInsightRulesOutput$;exports.PutMetricAlarm$=PutMetricAlarm$;exports.PutMetricAlarmCommand=PutMetricAlarmCommand;exports.PutMetricAlarmInput$=PutMetricAlarmInput$;exports.PutMetricData$=PutMetricData$;
171
- exports.PutMetricDataCommand=PutMetricDataCommand;exports.PutMetricDataInput$=PutMetricDataInput$;exports.PutMetricStream$=PutMetricStream$;exports.PutMetricStreamCommand=PutMetricStreamCommand;exports.PutMetricStreamInput$=PutMetricStreamInput$;exports.PutMetricStreamOutput$=PutMetricStreamOutput$;exports.Range$=Range$;exports.RecentlyActive=RecentlyActive;exports.ResourceConflict=ResourceConflict;exports.ResourceConflict$=ResourceConflict$;exports.ResourceMetricSelection$=ResourceMetricSelection$;
172
- exports.ResourceMetricsConfiguration$=ResourceMetricsConfiguration$;exports.ResourceNotFound=ResourceNotFound;exports.ResourceNotFound$=ResourceNotFound$;exports.ResourceNotFoundException=ResourceNotFoundException;exports.ResourceNotFoundException$=ResourceNotFoundException$;exports.Rule$=Rule$;exports.ScanBy=ScanBy;exports.Schedule$=Schedule$;exports.ScheduleConfiguration$=ScheduleConfiguration$;exports.ScheduledQueryConfiguration$=ScheduledQueryConfiguration$;exports.SetAlarmState$=SetAlarmState$;
173
- exports.SetAlarmStateCommand=SetAlarmStateCommand;exports.SetAlarmStateInput$=SetAlarmStateInput$;exports.SingleMetricAnomalyDetector$=SingleMetricAnomalyDetector$;exports.SlidingWindow$=SlidingWindow$;exports.StandardUnit=StandardUnit;exports.StartMetricStreams$=StartMetricStreams$;exports.StartMetricStreamsCommand=StartMetricStreamsCommand;exports.StartMetricStreamsInput$=StartMetricStreamsInput$;exports.StartMetricStreamsOutput$=StartMetricStreamsOutput$;exports.StartOTelEnrichment$=StartOTelEnrichment$;
174
- exports.StartOTelEnrichmentCommand=StartOTelEnrichmentCommand;exports.StartOTelEnrichmentInput$=StartOTelEnrichmentInput$;exports.StartOTelEnrichmentOutput$=StartOTelEnrichmentOutput$;exports.StateValue=StateValue;exports.Statistic=Statistic;exports.StatisticSet$=StatisticSet$;exports.StatusCode=StatusCode;exports.StopMetricStreams$=StopMetricStreams$;exports.StopMetricStreamsCommand=StopMetricStreamsCommand;exports.StopMetricStreamsInput$=StopMetricStreamsInput$;exports.StopMetricStreamsOutput$=
175
- StopMetricStreamsOutput$;exports.StopOTelEnrichment$=StopOTelEnrichment$;exports.StopOTelEnrichmentCommand=StopOTelEnrichmentCommand;exports.StopOTelEnrichmentInput$=StopOTelEnrichmentInput$;exports.StopOTelEnrichmentOutput$=StopOTelEnrichmentOutput$;exports.Tag$=Tag$;exports.TagResource$=TagResource$;exports.TagResourceCommand=TagResourceCommand;exports.TagResourceInput$=TagResourceInput$;exports.TagResourceOutput$=TagResourceOutput$;exports.UntagResource$=UntagResource$;exports.UntagResourceCommand=
176
- UntagResourceCommand;exports.UntagResourceInput$=UntagResourceInput$;exports.UntagResourceOutput$=UntagResourceOutput$;exports.UpdateOTelEnrichment$=UpdateOTelEnrichment$;exports.UpdateOTelEnrichmentCommand=UpdateOTelEnrichmentCommand;exports.UpdateOTelEnrichmentInput$=UpdateOTelEnrichmentInput$;exports.UpdateOTelEnrichmentOutput$=UpdateOTelEnrichmentOutput$;exports.UpdateResourceMetricsConfiguration$=UpdateResourceMetricsConfiguration$;exports.UpdateResourceMetricsConfigurationCommand=UpdateResourceMetricsConfigurationCommand;
177
- exports.UpdateResourceMetricsConfigurationInput$=UpdateResourceMetricsConfigurationInput$;exports.UpdateResourceMetricsConfigurationOutput$=UpdateResourceMetricsConfigurationOutput$;exports.ValidationException=ValidationException;exports.ValidationException$=ValidationException$;exports.WallClockWindow$=WallClockWindow$;exports.WarmUpConfiguration$=WarmUpConfiguration$;exports.errorTypeRegistries=errorTypeRegistries;exports.paginateDescribeAlarmHistory=paginateDescribeAlarmHistory;exports.paginateDescribeAlarms=
178
- paginateDescribeAlarms;exports.paginateDescribeAnomalyDetectors=paginateDescribeAnomalyDetectors;exports.paginateDescribeInsightRules=paginateDescribeInsightRules;exports.paginateGetMetricData=paginateGetMetricData;exports.paginateListAlarmMuteRules=paginateListAlarmMuteRules;exports.paginateListDashboards=paginateListDashboards;exports.paginateListManagedInsightRules=paginateListManagedInsightRules;exports.paginateListMetricStreams=paginateListMetricStreams;exports.paginateListMetrics=paginateListMetrics;
179
- exports.waitForAlarmExists=waitForAlarmExists;exports.waitForAlarmMuteRuleExists=waitForAlarmMuteRuleExists;exports.waitForCompositeAlarmExists=waitForCompositeAlarmExists;exports.waitForLogAlarmExists=waitForLogAlarmExists;exports.waitUntilAlarmExists=waitUntilAlarmExists;exports.waitUntilAlarmMuteRuleExists=waitUntilAlarmMuteRuleExists;exports.waitUntilCompositeAlarmExists=waitUntilCompositeAlarmExists;exports.waitUntilLogAlarmExists=waitUntilLogAlarmExists}});export default require_dist_cjs4();
@@ -1,2 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{buildSessionContext,resizeImage}from"./chunk-BVHXWQLD.js";import{getAgentDir}from"./chunk-YRCLNWFV.js";import"./chunk-FRUFMISJ.js";import"./chunk-YJ3NQWES.js";import"./chunk-DBL35X7L.js";import"./chunk-MG5PX4KU.js";import"./chunk-LUL775V7.js";import"./chunk-RYC5BYVE.js";import"./chunk-VEYTRNQC.js";import"./chunk-JXWJOIH4.js";export{buildSessionContext,getAgentDir,resizeImage};
@@ -1,2 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import"./chunk-JXWJOIH4.js";import{createRequire}from"node:module";var require2=createRequire(import.meta.url),createJitiImpl;function createJiti(...args){return createJitiImpl??=require2("jiti").createJiti,createJitiImpl(...args)}export{createJiti};
@@ -1,79 +0,0 @@
1
- import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{buildCopilotDynamicHeaders,hasCopilotVisionInput}from"./chunk-JEJQVFWK.js";import{iterateOpenAIStream}from"./chunk-EYIYBQAR.js";import{clampOpenAIPromptCacheKey}from"./chunk-PRRNXB7S.js";import{OpenAI}from"./chunk-AIXI6RIE.js";import"./chunk-YZMQXAJM.js";import{retryProviderRequest}from"./chunk-Z33NNMNB.js";import{appendProviderTransportDiagnostic,formatProviderError,normalizeProviderError}from"./chunk-MVYV6MJY.js";import{shortHash}from"./chunk-PJACZCIR.js";
3
- import{appendGrammarToolInputJsonDelta,buildBaseOptions,clampThinkingBudgetToAnswerRoom,createGrammarToolInputProperties,getGrammarToolInput,getJsonSchemaToolParameters,getPiUserAgent,resolveGrammarConstrainedSampling,resolveJsonSchemaStrictSampling,resolveSamplingParams,thinkingBudgetForLevel,transformMessages}from"./chunk-UDVC7A5S.js";import{hasIncompleteUsage}from"./chunk-YTVFIA3A.js";import{sanitizeSurrogates}from"./chunk-L2ZPNLYD.js";import{createRequestObserver,headersToRecord,
4
- observeFetch}from"./chunk-5CDES42D.js";import{getProviderEnvValue}from"./chunk-FACBDLFU.js";import{parseStreamingJson,parseStreamingJsonWhileStreaming}from"./chunk-MG5PX4KU.js";import{calculateCost,clampThinkingLevel,getDeclaredTools,getSystemMessageText,renderSystemMessageUpdate,resolveTranscript,resolveTranscriptTools}from"./chunk-LUL775V7.js";import{AssistantMessageEventStream}from"./chunk-RYC5BYVE.js";import{appendAssistantMessageDiagnostic}from"./chunk-VEYTRNQC.js";
5
- import"./chunk-JXWJOIH4.js";function hasHeader(headers,name){if(!headers)return!1;let expected=name.toLowerCase();for(let[key,value]of Object.entries(headers))if(key.toLowerCase()===expected&&value!==null&&value.trim().length>0)return!0;return!1}function getClientApiKey(provider,apiKey,headers){if(apiKey)return apiKey;if(hasHeader(headers,"authorization")||hasHeader(headers,"cf-aig-authorization"))return"unused";throw new Error(`No API key for provider: ${provider}`)}function hasToolHistory(messages){for(let msg of messages)
6
- if(msg.role==="toolResult"||msg.role==="assistant"&&msg.content.some(block=>block.type==="toolCall"))return!0;return!1}function isTextContentBlock(block){return block.type==="text"}function isThinkingContentBlock(block){return block.type==="thinking"}function isToolCallBlock(block){return block.type==="toolCall"}function isImageContentBlock(block){return block.type==="image"}function isReasoningDetailObject(detail){return typeof detail=="object"&&detail!==null&&!Array.isArray(detail)}function hasValidCommonReasoningDetailFields(candidate){
7
- return(candidate.id===void 0||candidate.id===null||typeof candidate.id=="string")&&(candidate.format===void 0||typeof candidate.format=="string")&&(candidate.index===void 0||typeof candidate.index=="number")}function isOpenAIReasoningDetail(detail){if(!isReasoningDetailObject(detail)||!hasValidCommonReasoningDetailFields(detail))return!1;switch(detail.type){case"reasoning.summary":return typeof detail.summary=="string";case"reasoning.encrypted":return typeof detail.data=="string";case"reasoning.\
8
- text":return typeof detail.text=="string"&&(detail.signature===void 0||detail.signature===null||typeof detail.signature=="string");default:return!1}}function parseOpenAIReasoningDetails(signature){if(signature)try{let parsed=JSON.parse(signature);return Array.isArray(parsed)&&parsed.length>0&&parsed.every(isOpenAIReasoningDetail)?parsed:void 0}catch{return}}function parseLegacyEncryptedReasoningDetail(signature){if(signature)try{let parsed=JSON.parse(signature);return isOpenAIReasoningDetail(parsed)&&
9
- parsed.type==="reasoning.encrypted"&&typeof parsed.id=="string"&&parsed.id.length>0&&parsed.data.length>0?parsed:void 0}catch{return}}function fillMissingCommonReasoningDetailFields(target,source){target.id??=source.id,target.format||=source.format,target.index??=source.index}function appendOpenAIReasoningDetail(details,detail){let lastDetail=details[details.length-1];if(detail.type==="reasoning.text"&&lastDetail?.type==="reasoning.text"){lastDetail.text+=detail.text,lastDetail.signature||=detail.
10
- signature,fillMissingCommonReasoningDetailFields(lastDetail,detail);return}if(detail.type==="reasoning.summary"&&lastDetail?.type==="reasoning.summary"){lastDetail.summary+=detail.summary,fillMissingCommonReasoningDetailFields(lastDetail,detail);return}details.push({...detail})}var OPENAI_COMPLETIONS_REASONING_FIELDS=["reasoning","reasoning_content","reasoning_text"];function isOpenAICompletionsReasoningField(field){return OPENAI_COMPLETIONS_REASONING_FIELDS.includes(field)}function resolveCacheRetention(cacheRetention,env){
11
- return cacheRetention||(getProviderEnvValue("HUMAIN_TERMINAL_CACHE_RETENTION",env)==="long"||getProviderEnvValue("PI_CACHE_RETENTION",env)==="long"?"long":"short")}var stream=(model,context,options)=>{let stream2=new AssistantMessageEventStream,normalizedContext=resolveTranscript(context,getCompat(model).supportsMidConvoSystemMessages);return(async()=>{let output={role:"assistant",content:[],api:model.api,provider:model.provider,model:model.id,usage:{usageIncomplete:!0,input:0,output:0,cacheRead:0,
12
- cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()},streamedReasoningDetails,applyStreamedReasoningDetails=block=>{streamedReasoningDetails!==void 0&&(block.thinkingSignature=JSON.stringify(streamedReasoningDetails))};try{let apiKey=getClientApiKey(model.provider,options?.apiKey,options?.headers),compat=getCompat(model),grammarToolInputProperties=createGrammarToolInputProperties(getDeclaredTools(normalizedContext.messages),
13
- compat.supportsOpenAIGrammarTools),cacheRetention=resolveCacheRetention(options?.cacheRetention,options?.env),cacheSessionId=cacheRetention==="none"?void 0:options?.sessionId,observe=createRequestObserver(options,{api:model.api,provider:model.provider,model:model.id,operation:"chat"}),client=createClient(model,normalizedContext,apiKey,options?.headers,observeFetch(options?.fetch,observe),cacheSessionId,compat),params=buildParams(model,normalizedContext,options,compat,cacheRetention,grammarToolInputProperties),
14
- nextParams=await options?.onPayload?.(params,model);nextParams!==void 0&&(params=nextParams);let requestOptions={...options?.signal?{signal:options.signal}:{},...options?.timeoutMs!==void 0?{timeout:options.timeoutMs}:{},maxRetries:0},{data:openaiStream,response}=await retryProviderRequest(()=>client.chat.completions.create(params,requestOptions).withResponse(),{maxRetries:options?.maxRetries,maxRetryDelayMs:options?.maxRetryDelayMs,signal:options?.signal,noRetryStatuses:[403]});await options?.onResponse?.(
15
- {status:response.status,headers:headersToRecord(response.headers)},model),stream2.push({type:"start",partial:output});let textBlock=null,thinkingBlock=null,hasFinishReason=!1,toolCallBlocksByIndex=new Map,toolCallBlocksById=new Map,blocks=output.content,getContentIndex=block=>blocks.indexOf(block),getCustomToolCallInput=block=>{let property=block.customInput?.property;if(property===void 0)return"";let value=block.arguments[property];return typeof value=="string"?value:""},appendCustomToolCallInput=(block,nextInput,close)=>{
16
- let customInput=block.customInput;if(!customInput)return;let delta=appendGrammarToolInputJsonDelta(customInput.jsonBuffer,customInput.property,nextInput,close);return block.arguments={[customInput.property]:nextInput},delta},finishBlock=block=>{let contentIndex=getContentIndex(block);if(contentIndex!==-1){if(block.type==="text")stream2.push({type:"text_end",contentIndex,content:block.text,partial:output});else if(block.type==="thinking")applyStreamedReasoningDetails(block),stream2.push({type:"th\
17
- inking_end",contentIndex,content:block.thinking,partial:output});else if(block.type==="toolCall"){if(block.customInput){let delta=appendCustomToolCallInput(block,getCustomToolCallInput(block),!0);delta!==void 0&&stream2.push({type:"toolcall_delta",contentIndex,delta,partial:output})}else block.arguments=parseStreamingJson(block.partialArgs);delete block.partialArgs,delete block.customInput,delete block.streamIndex,stream2.push({type:"toolcall_end",contentIndex,toolCall:block,partial:output})}}},
18
- ensureTextBlock=()=>(textBlock||(textBlock={type:"text",text:""},blocks.push(textBlock),stream2.push({type:"text_start",contentIndex:getContentIndex(textBlock),partial:output})),textBlock),ensureThinkingBlock=thinkingSignature=>(thinkingBlock||(thinkingBlock={type:"thinking",thinking:"",thinkingSignature},blocks.push(thinkingBlock),stream2.push({type:"thinking_start",contentIndex:getContentIndex(thinkingBlock),partial:output})),thinkingBlock),ensureToolCallBlock=toolCall=>{let streamIndex=typeof toolCall.
19
- index=="number"?toolCall.index:void 0,name=toolCall.function?.name??toolCall.custom?.name??"",block=streamIndex!==void 0?toolCallBlocksByIndex.get(streamIndex):void 0;if(!block&&toolCall.id&&(block=toolCallBlocksById.get(toolCall.id)),!block){let customInputProperty=toolCall.custom&&!toolCall.function?grammarToolInputProperties.get(name)??"input":void 0,hasCustomInput=customInputProperty!==void 0;block={type:"toolCall",id:toolCall.id||"",name,arguments:hasCustomInput?{[customInputProperty]:""}:{},
20
- partialArgs:hasCustomInput?void 0:"",customInput:hasCustomInput?{property:customInputProperty,jsonBuffer:{input:"",started:!1,closed:!1}}:void 0,streamIndex},streamIndex!==void 0&&toolCallBlocksByIndex.set(streamIndex,block),toolCall.id&&toolCallBlocksById.set(toolCall.id,block),blocks.push(block),stream2.push({type:"toolcall_start",contentIndex:getContentIndex(block),partial:output})}if(streamIndex!==void 0&&block.streamIndex===void 0&&(block.streamIndex=streamIndex,toolCallBlocksByIndex.set(streamIndex,
21
- block)),toolCall.id&&toolCallBlocksById.set(toolCall.id,block),!block.name&&name&&(block.name=name),toolCall.custom&&!toolCall.function&&!block.customInput){let customInputProperty=grammarToolInputProperties.get(block.name)??"input";block.arguments={[customInputProperty]:""},block.customInput={property:customInputProperty,jsonBuffer:{input:"",started:!1,closed:!1}},delete block.partialArgs}return block};for await(let chunk of iterateOpenAIStream(openaiStream,response,client)){if(await options?.onProviderStreamEvent?.(
22
- chunk,model),!chunk||typeof chunk!="object")continue;output.responseId||=chunk.id,typeof chunk.model=="string"&&chunk.model.length>0&&chunk.model!==model.id&&(output.responseModel||=chunk.model),chunk.usage&&(output.usage=parseChunkUsage(chunk.usage,model));let choice=Array.isArray(chunk.choices)?chunk.choices[0]:void 0;if(choice){if(!chunk.usage&&choice.usage&&(output.usage=parseChunkUsage(choice.usage,model)),choice.finish_reason){output.rawStopReason=choice.finish_reason;let finishReasonResult=mapStopReason(
23
- choice.finish_reason);output.stopReason=finishReasonResult.stopReason,finishReasonResult.errorMessage&&(output.errorMessage=finishReasonResult.errorMessage),hasFinishReason=!0}if(choice.delta){if(choice.delta.content!==null&&choice.delta.content!==void 0&&choice.delta.content.length>0){let block=ensureTextBlock();block.text+=choice.delta.content,stream2.push({type:"text_delta",contentIndex:getContentIndex(block),delta:choice.delta.content,partial:output})}let reasoningFields=["reasoning_content",
24
- "reasoning","reasoning_text"],deltaFields=choice.delta,foundReasoningField=null;for(let field of reasoningFields){let value=deltaFields[field];if(typeof value=="string"&&value.length>0){foundReasoningField=field;break}}if(foundReasoningField){let delta=deltaFields[foundReasoningField];if(typeof delta=="string"&&delta.length>0){let thinkingSignature=model.provider==="opencode-go"&&foundReasoningField==="reasoning"?"reasoning_content":foundReasoningField,block=ensureThinkingBlock(thinkingSignature);
25
- block.thinking+=delta,stream2.push({type:"thinking_delta",contentIndex:getContentIndex(block),delta,partial:output})}}if(choice?.delta?.tool_calls)for(let toolCall of choice.delta.tool_calls){let block=ensureToolCallBlock(toolCall);!block.id&&toolCall.id&&(block.id=toolCall.id,toolCallBlocksById.set(toolCall.id,block));let name=toolCall.function?.name??toolCall.custom?.name;!block.name&&name&&(block.name=name);let delta="";if(toolCall.function?.arguments)delta=toolCall.function.arguments,block.partialArgs=
26
- (block.partialArgs??"")+toolCall.function.arguments,block.arguments=parseStreamingJsonWhileStreaming(block,block.partialArgs,block.arguments);else if(toolCall.custom?.input){let nextInput=getCustomToolCallInput(block)+toolCall.custom.input;delta=appendCustomToolCallInput(block,nextInput,!1)??""}stream2.push({type:"toolcall_delta",contentIndex:getContentIndex(block),delta,partial:output})}let reasoningDetails=choice.delta.reasoning_details;if(Array.isArray(reasoningDetails))for(let detail of reasoningDetails)
27
- isOpenAIReasoningDetail(detail)&&(ensureThinkingBlock(""),streamedReasoningDetails??=[],appendOpenAIReasoningDetail(streamedReasoningDetails,detail))}}}for(let block of blocks)finishBlock(block);if(options?.signal?.aborted)throw new Error("Request was aborted");if(output.stopReason==="aborted")throw new Error("Request was aborted");if(!hasFinishReason&&!compat.supportsFinishReason&&(output.stopReason=output.content.some(block=>block.type==="toolCall")?"toolUse":"stop"),output.stopReason==="error")
28
- throw new Error(output.errorMessage||"Provider returned an error stop reason");if(compat.supportsFinishReason&&!hasFinishReason||output.stopReason==="pending")throw new Error("Stream ended without finish_reason");stream2.push({type:"done",reason:output.stopReason,message:output}),stream2.end()}catch(error){for(let block of output.content){block.type==="thinking"&&applyStreamedReasoningDetails(block),delete block.index;let partialArgs=block.partialArgs;block.type==="toolCall"&&partialArgs!==void 0&&
29
- (block.arguments=parseStreamingJson(partialArgs)),delete block.partialArgs,delete block.customInput,delete block.streamIndex}output.usage.usageIncomplete=!0,output.stopReason=options?.signal?.aborted?"aborted":"error";let normalizedError=normalizeProviderError(error);appendProviderTransportDiagnostic(output,normalizedError),normalizedError.status===403&&appendAssistantMessageDiagnostic(output,{type:"provider_http_error",timestamp:Date.now(),details:{status:403,retryable:!1}}),output.errorMessage=
30
- formatProviderError(normalizedError,`${model.provider==="openai"?"OpenAI":model.provider} API error`),stream2.push({type:"error",reason:output.stopReason,error:output}),stream2.end()}})(),stream2},streamSimple=(model,context,options)=>{getClientApiKey(model.provider,options?.apiKey,options?.headers);let base={...buildBaseOptions(model,context,options,options?.apiKey),toolChoice:options?.toolChoice},clampedReasoning=options?.reasoning?clampThinkingLevel(model,options.reasoning):void 0;return stream(
31
- model,context,{...base,reasoningEffort:clampedReasoning==="off"?void 0:clampedReasoning,thinkingBudgets:options?.thinkingBudgets})};function createClient(model,context,apiKey,optionsHeaders,fetch,sessionId,compat=getCompat(model)){let headers={"User-Agent":getPiUserAgent(),...model.headers};if(model.provider==="github-copilot"){let hasImages=hasCopilotVisionInput(context.messages),copilotHeaders=buildCopilotDynamicHeaders({messages:context.messages,hasImages});Object.assign(headers,copilotHeaders)}
32
- return sessionId&&compat.sendSessionAffinityHeaders&&(compat.sessionAffinityFormat==="openrouter"?headers["x-session-id"]=sessionId:(compat.sessionAffinityFormat==="openai"&&(headers.session_id=sessionId),headers["x-client-request-id"]=sessionId,headers["x-session-affinity"]=sessionId)),optionsHeaders&&Object.assign(headers,optionsHeaders),new OpenAI({apiKey,baseURL:model.baseUrl,dangerouslyAllowBrowser:!0,fetch,defaultHeaders:headers})}function buildParams(model,context,options,compat=getCompat(
33
- model),cacheRetention=resolveCacheRetention(options?.cacheRetention,options?.env),grammarToolInputProperties=createGrammarToolInputProperties(getDeclaredTools(context.messages),compat.supportsOpenAIGrammarTools)){let transcriptTools=resolveTranscriptTools(context.messages,compat.supportsMidConvoSystemMessages===!0&&compat.supportsMidConvoToolAdditions===!0),messages=convertMessages(model,context,compat,{grammarToolInputProperties}),cacheControl=getCompatCacheControl(compat,cacheRetention),params={
34
- model:model.id,messages,stream:!0,prompt_cache_key:model.baseUrl.includes("api.openai.com")&&cacheRetention!=="none"||cacheRetention==="long"&&compat.supportsLongCacheRetention?clampOpenAIPromptCacheKey(options?.sessionId):void 0,prompt_cache_retention:cacheRetention==="long"&&compat.supportsLongCacheRetention?"24h":void 0};compat.supportsUsageInStreaming!==!1&&(params.stream_options={include_usage:!0}),compat.supportsStore&&(params.store=!1),options?.maxTokens&&(compat.maxTokensField==="max_tok\
35
- ens"?params.max_tokens=options.maxTokens:params.max_completion_tokens=options.maxTokens),options?.temperature!==void 0&&(params.temperature=options.temperature),transcriptTools.requestTools.length>0?(params.tools=convertTools(transcriptTools.requestTools,compat),compat.zaiToolStream&&(params.tool_stream=!0)):hasToolHistory(context.messages)&&(params.tools=[]),cacheControl&&applyAnthropicCacheControl(messages,params.tools,cacheControl),options?.toolChoice&&(params.tool_choice=options.toolChoice),
36
- compat.vllmPriority!==void 0&&(params.priority=compat.vllmPriority);let thinkingTokenBudgetField=resolveThinkingTokenBudgetField(compat),thinkingBudget=resolveClampedThinkingBudget(model,options,params);if(compat.thinkingFormat==="zai"&&model.reasoning){let zaiParams=params;if(zaiParams.thinking=options?.reasoningEffort?{type:"enabled",clear_thinking:!1}:{type:"disabled"},options?.reasoningEffort&&compat.supportsReasoningEffort){let mappedEffort=model.thinkingLevelMap?.[options.reasoningEffort],
37
- effort=mappedEffort===void 0?options.reasoningEffort:mappedEffort;typeof effort=="string"&&(zaiParams.reasoning_effort=effort)}}else if(compat.thinkingFormat==="qwen"&&model.reasoning){if(params.enable_thinking=!!options?.reasoningEffort,options?.reasoningEffort&&compat.supportsReasoningEffort){let effort=model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort;typeof effort=="string"&&(params.reasoning_effort=effort)}}else if(compat.thinkingFormat==="qwen-chat-template"&&model.
38
- reasoning)params.chat_template_kwargs={enable_thinking:!!options?.reasoningEffort,preserve_thinking:!0};else if(compat.thinkingFormat==="chat-template"&&model.reasoning){let chatTemplateKwargs=buildChatTemplateValues(model,options,compat.chatTemplateKwargs,thinkingBudget);chatTemplateKwargs&&(params.chat_template_kwargs=chatTemplateKwargs)}else if(compat.thinkingFormat==="baseten"&&model.reasoning){let basetenParams=params,chatTemplateArgs=buildChatTemplateValues(model,options,compat.chatTemplateArgs,
39
- thinkingBudget);if(chatTemplateArgs&&(basetenParams.chat_template_args=chatTemplateArgs),compat.supportsReasoningEffort){let requestedEffort=options?.reasoningEffort,mappedEffort=requestedEffort?model.thinkingLevelMap?.[requestedEffort]:model.thinkingLevelMap?.off,effort=mappedEffort===void 0?requestedEffort:mappedEffort;typeof effort=="string"&&(basetenParams.reasoning_effort=effort)}}else if(compat.thinkingFormat==="deepseek"&&model.reasoning)options?.reasoningEffort?params.thinking={type:"ena\
40
- bled"}:model.thinkingLevelMap?.off!==null&&(params.thinking={type:"disabled"}),options?.reasoningEffort&&compat.supportsReasoningEffort&&(params.reasoning_effort=model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort);else if(compat.thinkingFormat==="openrouter"&&model.reasoning){let openRouterParams=params;options?.reasoningEffort?openRouterParams.reasoning={effort:model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort}:model.thinkingLevelMap?.off!==null&&
41
- (openRouterParams.reasoning={effort:model.thinkingLevelMap?.off??"none"})}else if(compat.thinkingFormat==="ant-ling"&&model.reasoning&&options?.reasoningEffort){let effort=model.thinkingLevelMap?.[options.reasoningEffort];typeof effort=="string"&&(params.reasoning={effort})}else if(compat.thinkingFormat==="together"&&model.reasoning){let togetherParams=params;togetherParams.reasoning={enabled:!!options?.reasoningEffort},options?.reasoningEffort&&compat.supportsReasoningEffort&&(togetherParams.reasoning_effort=
42
- model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort)}else if(compat.thinkingFormat==="string-thinking"&&model.reasoning){let stringThinkingParams=params;options?.reasoningEffort?stringThinkingParams.thinking=model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort:model.thinkingLevelMap?.off!==null&&(stringThinkingParams.thinking=model.thinkingLevelMap?.off??"none")}else if(options?.reasoningEffort&&model.reasoning&&compat.supportsReasoningEffort)params.reasoning_effort=
43
- model.thinkingLevelMap?.[options.reasoningEffort]??options.reasoningEffort;else if(!options?.reasoningEffort&&model.reasoning&&compat.supportsReasoningEffort){let offValue=model.thinkingLevelMap?.off;typeof offValue=="string"&&(params.reasoning_effort=offValue)}if(thinkingTokenBudgetField&&thinkingBudget!==void 0&&Object.assign(params,{[thinkingTokenBudgetField]:thinkingBudget}),model.compat?.openRouterRouting&&(params.provider=model.compat.openRouterRouting),model.compat?.vercelGatewayRouting){
44
- let routing=model.compat.vercelGatewayRouting;if(routing.only||routing.order){let gatewayOptions={};routing.only&&(gatewayOptions.only=routing.only),routing.order&&(gatewayOptions.order=routing.order),params.providerOptions={gateway:gatewayOptions}}}let samplingParams=resolveSamplingParams(model,options?.reasoningEffort??"off",options?.samplingParams);return samplingParams&&Object.assign(params,samplingParams),params}function resolveThinkingTokenBudgetField(compat){if(compat.thinkingTokenBudgetField)
45
- return compat.thinkingTokenBudgetField;if(compat.supportsThinkingTokenBudget)return"thinking_token_budget"}function resolveClampedThinkingBudget(model,options,params){if(!options?.reasoningEffort||!model.reasoning)return;let ceiling=params.max_tokens??params.max_completion_tokens??model.maxTokens,budget=clampThinkingBudgetToAnswerRoom(thinkingBudgetForLevel(options.reasoningEffort,options.thinkingBudgets),ceiling);return budget>0?budget:void 0}function buildChatTemplateValues(model,options,values,thinkingBudget){
46
- let resolvedValues={};for(let[key,value]of Object.entries(values)){let resolved=resolveChatTemplateKwargValue(model,options,value,thinkingBudget);resolved!==void 0&&(resolvedValues[key]=resolved)}return Object.keys(resolvedValues).length>0?resolvedValues:void 0}function resolveChatTemplateKwargValue(model,options,value,thinkingBudget){if(typeof value!="object"||value===null)return value;let reasoningEffort=options?.reasoningEffort;if(!reasoningEffort&&value.omitWhenOff)return;if(value.$var==="th\
47
- inking.enabled")return!!reasoningEffort;if(value.$var==="thinking.budget")return thinkingBudget;let mappedValue=reasoningEffort?model.thinkingLevelMap?.[reasoningEffort]:model.thinkingLevelMap?.off;return mappedValue===void 0?reasoningEffort:typeof mappedValue=="string"?mappedValue:void 0}function getCompatCacheControl(compat,cacheRetention){if(compat.cacheControlFormat!=="anthropic"||cacheRetention==="none")return;let ttl=cacheRetention==="long"&&compat.supportsLongCacheRetention?"1h":void 0;return{
48
- type:"ephemeral",...ttl?{ttl}:{}}}function applyAnthropicCacheControl(messages,tools,cacheControl){addCacheControlToSystemPrompt(messages,cacheControl),addCacheControlToLastTool(tools,cacheControl),addCacheControlToLastConversationMessage(messages,cacheControl)}function addCacheControlToSystemPrompt(messages,cacheControl){for(let message of messages)if(message.role==="system"||message.role==="developer"){addCacheControlToInstructionMessage(message,cacheControl);return}}function addCacheControlToLastConversationMessage(messages,cacheControl){
49
- for(let i=messages.length-1;i>=0;i--){let message=messages[i];if((message.role==="user"||message.role==="assistant"||message.role==="tool")&&addCacheControlToMessage(message,cacheControl))return}}function addCacheControlToLastTool(tools,cacheControl){if(!tools||tools.length===0)return;let lastTool=tools[tools.length-1];lastTool.cache_control=cacheControl}function addCacheControlToInstructionMessage(message,cacheControl){return addCacheControlToTextContent(message,cacheControl)}function addCacheControlToMessage(message,cacheControl){
50
- return message.role==="user"||message.role==="assistant"||message.role==="tool"?addCacheControlToTextContent(message,cacheControl):!1}function addCacheControlToTextContent(message,cacheControl){let content=message.content;if(typeof content=="string")return content.length===0?!1:(message.content=[{type:"text",text:content,cache_control:cacheControl}],!0);if(!Array.isArray(content))return!1;for(let i=content.length-1;i>=0;i--){let part=content[i];if(part?.type==="text"){let textPart=part;return textPart.
51
- cache_control=cacheControl,!0}}return!1}function convertMessages(model,context,compat,options){let normalizedContext=resolveTranscript(context,compat.supportsMidConvoSystemMessages),params=[],normalizeToolCallId=id=>{if(id.includes("|")){let separatorIndex=id.indexOf("|"),callId=id.slice(0,separatorIndex).replace(/[^a-zA-Z0-9_-]/g,"_"),itemId=id.slice(separatorIndex+1).replace(/[^a-zA-Z0-9_-]/g,"_"),combinedId=itemId.length>0?`${callId}_${itemId}`:callId;if(combinedId.length<=40)return combinedId;
52
- let hash=shortHash(id).slice(0,8);return`${callId.slice(0,Math.max(1,40-hash.length-1))}_${hash}`}return model.provider==="openai"&&id.length>40?id.slice(0,40):id},transformedMessages=transformMessages(normalizedContext.messages,model,id=>normalizeToolCallId(id)),transcriptTools=resolveTranscriptTools(normalizedContext.messages,compat.supportsMidConvoSystemMessages===!0&&compat.supportsMidConvoToolAdditions===!0),instructionRole=model.reasoning&&compat.supportsDeveloperRole?"developer":"system",
53
- lastRole=null;for(let i=0;i<transformedMessages.length;i++){let msg=transformedMessages[i];if(compat.requiresAssistantAfterToolResult&&lastRole==="toolResult"&&msg.role==="user"&&params.push({role:"assistant",content:"I have processed the tool results."}),msg.role==="system"){let addedTools=i>0&&transcriptTools.anchorsAdditions?msg.toolsAdded??[]:[];if(addedTools.length>0){let kimiToolMessage={role:"system",tools:convertTools(addedTools,compat)};params.push(kimiToolMessage)}let text=i===0?getSystemMessageText(
54
- msg):renderSystemMessageUpdate(msg);text.length>0&&params.push({role:instructionRole,content:sanitizeSurrogates(text)})}else if(msg.role==="user")if(typeof msg.content=="string")params.push({role:"user",content:sanitizeSurrogates(msg.content)});else{let content=msg.content.filter(item=>item.type!=="text"||item.text.length>0).map(item=>item.type==="text"?{type:"text",text:sanitizeSurrogates(item.text)}:{type:"image_url",image_url:{url:`data:${item.mimeType};base64,${item.data}`}});if(content.length===
55
- 0)continue;params.push({role:"user",content})}else if(msg.role==="assistant"){let assistantMsg={role:"assistant",content:compat.requiresAssistantAfterToolResult?"":null},assistantTextParts=msg.content.filter(isTextContentBlock).filter(block=>block.text.trim().length>0).map(block=>({type:"text",text:sanitizeSurrogates(block.text)})),assistantText=assistantTextParts.map(part=>part.text).join(""),thinkingBlocks=msg.content.filter(isThinkingContentBlock),toolCalls=msg.content.filter(isToolCallBlock),
56
- signedReasoningDetails=thinkingBlocks.map(block=>parseOpenAIReasoningDetails(block.thinkingSignature)).find(details=>details!==void 0),legacyReasoningDetails=toolCalls.map(toolCall=>parseLegacyEncryptedReasoningDetail(toolCall.thoughtSignature)).filter(detail=>detail!==void 0),preservedReasoningDetails=signedReasoningDetails??(legacyReasoningDetails.length>0?legacyReasoningDetails:void 0),nonEmptyThinkingBlocks=thinkingBlocks.filter(block=>block.thinking.trim().length>0);if(nonEmptyThinkingBlocks.
57
- length>0){if(compat.requiresThinkingAsText){let thinkingText=nonEmptyThinkingBlocks.map(block=>sanitizeSurrogates(block.thinking)).join(`
58
-
59
- `);assistantMsg.content=[{type:"text",text:thinkingText},...assistantTextParts]}else if(assistantText.length>0&&(assistantMsg.content=assistantText),!preservedReasoningDetails){let signature=nonEmptyThinkingBlocks[0].thinkingSignature;model.provider==="opencode-go"&&signature==="reasoning"&&(signature="reasoning_content"),signature&&isOpenAICompletionsReasoningField(signature)&&(assistantMsg[signature]=nonEmptyThinkingBlocks.map(block=>block.thinking).join(`
60
- `))}}else assistantText.length>0&&(assistantMsg.content=assistantText);toolCalls.length>0&&(assistantMsg.tool_calls=toolCalls.map(tc=>{let customInputProperty=options?.grammarToolInputProperties?.get(tc.name);return customInputProperty!==void 0?{id:tc.id,type:"custom",custom:{name:tc.name,input:sanitizeSurrogates(getGrammarToolInput(tc.name,tc.arguments,customInputProperty))}}:{id:tc.id,type:"function",function:{name:tc.name,arguments:JSON.stringify(tc.arguments)}}})),preservedReasoningDetails&&
61
- (assistantMsg.reasoning_details=preservedReasoningDetails),compat.requiresReasoningContentOnAssistantMessages&&model.reasoning&&assistantMsg.reasoning_content===void 0&&(assistantMsg.reasoning_content="");let content=assistantMsg.content;if(!(content!=null&&content.length>0)&&!assistantMsg.tool_calls)continue;params.push(assistantMsg)}else if(msg.role==="toolResult"){let imageBlocks=[],j=i;for(;j<transformedMessages.length&&transformedMessages[j].role==="toolResult";j++){let toolMsg=transformedMessages[j],
62
- textResult=toolMsg.content.filter(isTextContentBlock).map(block=>block.text).join(`
63
- `),hasImages=toolMsg.content.some(c=>c.type==="image"),toolResultText=textResult.length>0?textResult:hasImages?"(see attached image)":"(no tool output)",toolResultMsg={role:"tool",content:sanitizeSurrogates(toolResultText),tool_call_id:toolMsg.toolCallId};if(compat.requiresToolResultName&&toolMsg.toolName&&(toolResultMsg.name=toolMsg.toolName),params.push(toolResultMsg),hasImages&&model.input.includes("image"))for(let block of toolMsg.content)isImageContentBlock(block)&&imageBlocks.push({type:"i\
64
- mage_url",image_url:{url:`data:${block.mimeType};base64,${block.data}`}})}i=j-1,imageBlocks.length>0?(compat.requiresAssistantAfterToolResult&&params.push({role:"assistant",content:"I have processed the tool results."}),params.push({role:"user",content:[{type:"text",text:"Attached image(s) from tool result:"},...imageBlocks]}),lastRole="user"):lastRole="toolResult";continue}lastRole=msg.role}return params}function convertTools(tools,compat){return tools.map(tool=>{let grammar=resolveGrammarConstrainedSampling(
65
- tool,compat.supportsOpenAIGrammarTools);if(grammar)return{type:"custom",custom:{name:tool.name,description:tool.description,format:{type:"grammar",grammar:{syntax:grammar.format,definition:grammar.definition}}}};let strict=resolveJsonSchemaStrictSampling(tool,compat.supportsStrictMode!==!1);return{type:"function",function:{name:tool.name,description:tool.description,parameters:getJsonSchemaToolParameters(tool,strict),...compat.supportsStrictMode!==!1&&{strict:strict??!1}}}})}function parseChunkUsage(rawUsage,model){
66
- let promptTokens=rawUsage.prompt_tokens||0,cacheReadTokens=rawUsage.prompt_tokens_details?.cached_tokens??rawUsage.prompt_cache_hit_tokens??rawUsage.cached_tokens??0,cacheWriteTokens=rawUsage.prompt_tokens_details?.cache_write_tokens||0,uncachedInput=promptTokens-cacheReadTokens-cacheWriteTokens,input=Math.max(0,uncachedInput),outputTokens=rawUsage.completion_tokens||0,totalTokens=input+outputTokens+cacheReadTokens+cacheWriteTokens,usage={usageIncomplete:hasIncompleteUsage([rawUsage.prompt_tokens,
67
- rawUsage.completion_tokens,uncachedInput,totalTokens],[rawUsage.total_tokens,rawUsage.prompt_tokens_details?.cached_tokens,rawUsage.prompt_cache_hit_tokens,rawUsage.cached_tokens,rawUsage.prompt_tokens_details?.cache_write_tokens,rawUsage.completion_tokens_details?.reasoning_tokens]),input,output:outputTokens,cacheRead:cacheReadTokens,cacheWrite:cacheWriteTokens,reasoning:rawUsage.completion_tokens_details?.reasoning_tokens||0,totalTokens,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}};
68
- return calculateCost(model,usage),usage}function mapStopReason(reason){if(reason===null)return{stopReason:"stop"};switch(reason){case"stop":case"end":return{stopReason:"stop"};case"length":return{stopReason:"length"};case"function_call":case"tool_calls":return{stopReason:"toolUse"};case"content_filter":return{stopReason:"error",errorMessage:"Provider finish_reason: content_filter"};case"network_error":return{stopReason:"error",errorMessage:"Provider finish_reason: network_error"};default:return{
69
- stopReason:"error",errorMessage:`Provider finish_reason: ${reason}`}}}function detectCompat(model){let provider=model.provider,baseUrl=model.baseUrl,isZai=provider==="zai"||provider==="zai-coding-cn"||baseUrl.includes("api.z.ai")||baseUrl.includes("open.bigmodel.cn"),isTogether=provider==="together"||baseUrl.includes("api.together.ai")||baseUrl.includes("api.together.xyz"),isMoonshot=provider==="moonshotai"||provider==="moonshotai-cn"||baseUrl.includes("api.moonshot."),isOpenRouter=provider==="o\
70
- penrouter"||baseUrl.includes("openrouter.ai"),isCloudflareWorkersAI=provider==="cloudflare-workers-ai"||baseUrl.includes("api.cloudflare.com"),isCloudflareAiGateway=provider==="cloudflare-ai-gateway"||baseUrl.includes("gateway.ai.cloudflare.com"),isNvidia=provider==="nvidia"||baseUrl.includes("integrate.api.nvidia.com"),isAntLing=provider==="ant-ling"||baseUrl.includes("api.ant-ling.com"),isCerebras=provider==="cerebras"||baseUrl.includes("cerebras.ai"),isDeepSeek=provider==="deepseek"||baseUrl.
71
- toLowerCase().includes("deepseek.com"),isNonStandard=isNvidia||isCerebras||provider==="xai"||baseUrl.includes("api.x.ai")||isTogether||baseUrl.includes("chutes.ai")||isDeepSeek||isZai||isMoonshot||provider==="opencode"||baseUrl.includes("opencode.ai")||isCloudflareWorkersAI||isCloudflareAiGateway||isAntLing,useMaxTokens=baseUrl.includes("chutes.ai")||isDeepSeek||isMoonshot||isCloudflareAiGateway||isTogether||isNvidia||isAntLing||isZai,isGrok=provider==="xai"||baseUrl.includes("api.x.ai"),isOpenRouterDeveloperRoleModel=isOpenRouter&&
72
- (model.id.startsWith("anthropic/")||model.id.startsWith("openai/")),cacheControlFormat=provider==="openrouter"&&model.id.startsWith("anthropic/")?"anthropic":void 0;return{supportsStore:!isNonStandard,supportsDeveloperRole:isOpenRouterDeveloperRoleModel||!isNonStandard&&!isOpenRouter,supportsReasoningEffort:!isGrok&&!isZai&&!isMoonshot&&!isTogether&&!isCloudflareAiGateway&&!isNvidia&&!isAntLing,supportsUsageInStreaming:!0,supportsFinishReason:!0,maxTokensField:useMaxTokens?"max_tokens":"max_comp\
73
- letion_tokens",requiresToolResultName:!1,requiresAssistantAfterToolResult:!1,requiresThinkingAsText:!1,requiresReasoningContentOnAssistantMessages:isDeepSeek,thinkingFormat:isDeepSeek?"deepseek":isZai?"zai":isTogether?"together":isAntLing?"ant-ling":isOpenRouter?"openrouter":"openai",openRouterRouting:{},vercelGatewayRouting:{},chatTemplateKwargs:{},chatTemplateArgs:{},zaiToolStream:!1,supportsThinkingTokenBudget:!1,thinkingTokenBudgetField:void 0,supportsStrictMode:!1,supportsOpenAIGrammarTools:!1,
74
- supportsMidConvoSystemMessages:!1,supportsMidConvoToolAdditions:!1,cacheControlFormat,sendSessionAffinityHeaders:isOpenRouter,sessionAffinityFormat:isOpenRouter?"openrouter":"openai",supportsLongCacheRetention:!(isTogether||isCloudflareWorkersAI||isCloudflareAiGateway||isNvidia||isAntLing)}}function getCompat(model){let detected=detectCompat(model);return model.compat?{supportsStore:model.compat.supportsStore??detected.supportsStore,supportsDeveloperRole:model.compat.supportsDeveloperRole??detected.
75
- supportsDeveloperRole,supportsReasoningEffort:model.compat.supportsReasoningEffort??detected.supportsReasoningEffort,supportsUsageInStreaming:model.compat.supportsUsageInStreaming??detected.supportsUsageInStreaming,supportsFinishReason:model.compat.supportsFinishReason??detected.supportsFinishReason,maxTokensField:model.compat.maxTokensField??detected.maxTokensField,requiresToolResultName:model.compat.requiresToolResultName??detected.requiresToolResultName,requiresAssistantAfterToolResult:model.
76
- compat.requiresAssistantAfterToolResult??detected.requiresAssistantAfterToolResult,requiresThinkingAsText:model.compat.requiresThinkingAsText??detected.requiresThinkingAsText,requiresReasoningContentOnAssistantMessages:model.compat.requiresReasoningContentOnAssistantMessages??detected.requiresReasoningContentOnAssistantMessages,thinkingFormat:model.compat.thinkingFormat??detected.thinkingFormat,openRouterRouting:model.compat.openRouterRouting??{},vercelGatewayRouting:model.compat.vercelGatewayRouting??
77
- detected.vercelGatewayRouting,chatTemplateKwargs:model.compat.chatTemplateKwargs??detected.chatTemplateKwargs,chatTemplateArgs:model.compat.chatTemplateArgs??detected.chatTemplateArgs,zaiToolStream:model.compat.zaiToolStream??detected.zaiToolStream,supportsThinkingTokenBudget:model.compat.supportsThinkingTokenBudget??detected.supportsThinkingTokenBudget,thinkingTokenBudgetField:model.compat.thinkingTokenBudgetField??detected.thinkingTokenBudgetField,supportsStrictMode:model.compat.supportsStrictMode??
78
- detected.supportsStrictMode,supportsOpenAIGrammarTools:model.compat.supportsOpenAIGrammarTools??detected.supportsOpenAIGrammarTools,supportsMidConvoSystemMessages:model.compat.supportsMidConvoSystemMessages??detected.supportsMidConvoSystemMessages,supportsMidConvoToolAdditions:model.compat.supportsMidConvoToolAdditions??detected.supportsMidConvoToolAdditions,cacheControlFormat:model.compat.cacheControlFormat??detected.cacheControlFormat,sendSessionAffinityHeaders:model.compat.sendSessionAffinityHeaders??
79
- detected.sendSessionAffinityHeaders,sessionAffinityFormat:model.compat.sessionAffinityFormat??detected.sessionAffinityFormat,supportsLongCacheRetention:model.compat.supportsLongCacheRetention??detected.supportsLongCacheRetention,vllmPriority:model.compat.vllmPriority}:detected}export{convertMessages,stream,streamSimple};