@openclaw/amazon-bedrock-provider 2026.9.4 → 2026.9.6

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 (198) hide show
  1. package/assets/activity.svg +30 -0
  2. package/assets/icon.png +0 -0
  3. package/dist/stream.runtime.js +38 -8
  4. package/dist/thinking-policy.js +5 -4
  5. package/node_modules/@aws-sdk/client-bedrock/dist-cjs/index.js +2 -1
  6. package/node_modules/@aws-sdk/client-bedrock/dist-es/models/enums.js +1 -0
  7. package/node_modules/@aws-sdk/client-bedrock/dist-types/commands/GetAccountDataRetentionCommand.d.ts +1 -1
  8. package/node_modules/@aws-sdk/client-bedrock/dist-types/commands/PutAccountDataRetentionCommand.d.ts +2 -2
  9. package/node_modules/@aws-sdk/client-bedrock/dist-types/models/enums.d.ts +1 -0
  10. package/node_modules/@aws-sdk/client-bedrock/dist-types/ts3.4/models/enums.d.ts +1 -0
  11. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  12. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  13. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  14. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  15. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  16. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  17. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  18. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/core/package.json +1 -1
  19. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  20. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  21. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  22. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  23. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  24. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  25. package/node_modules/@aws-sdk/client-bedrock/node_modules/@aws-sdk/token-providers/package.json +3 -3
  26. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/CHANGELOG.md +16 -0
  27. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  28. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  29. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  30. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  31. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  32. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  33. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  34. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  35. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  36. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  37. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  38. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  39. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  40. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  41. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  42. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  43. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  44. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/errors.d.ts +5 -0
  45. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/errors.js +5 -0
  46. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/core/package.json +11 -2
  47. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/fetch-http-handler/CHANGELOG.md +11 -0
  48. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
  49. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -1
  50. package/node_modules/@aws-sdk/client-bedrock/node_modules/@smithy/fetch-http-handler/package.json +3 -3
  51. package/node_modules/@aws-sdk/client-bedrock/package.json +4 -4
  52. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -1
  53. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  54. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  55. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  56. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  57. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  58. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  59. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  60. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core/package.json +1 -1
  61. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/middleware-websocket/package.json +2 -2
  62. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  63. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  64. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  65. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  66. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  67. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  68. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/token-providers/package.json +3 -3
  69. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/CHANGELOG.md +16 -0
  70. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  71. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  72. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  73. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  74. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  75. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  76. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  77. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  78. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  79. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  80. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  81. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  82. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  83. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  84. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  85. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  86. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  87. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/errors.d.ts +5 -0
  88. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/errors.js +5 -0
  89. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/core/package.json +11 -2
  90. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/fetch-http-handler/CHANGELOG.md +11 -0
  91. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
  92. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -1
  93. package/node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/fetch-http-handler/package.json +3 -3
  94. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +5 -5
  95. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +2 -0
  96. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +2 -0
  97. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +5 -0
  98. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  99. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  100. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  101. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  102. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  103. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  104. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/core/package.json +1 -1
  105. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  106. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  107. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  108. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  109. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  110. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  111. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  112. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  113. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  114. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  115. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  116. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  117. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  118. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@aws-sdk/token-providers/package.json +3 -3
  119. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/CHANGELOG.md +16 -0
  120. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  121. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  122. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  123. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  124. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  125. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  126. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  127. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  128. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  129. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  130. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  131. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  132. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  133. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  134. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  135. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  136. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  137. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/errors.d.ts +5 -0
  138. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/errors.js +5 -0
  139. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/core/package.json +11 -2
  140. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/fetch-http-handler/CHANGELOG.md +11 -0
  141. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -1
  142. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -1
  143. package/node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/fetch-http-handler/package.json +3 -3
  144. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  145. package/node_modules/@smithy/node-http-handler/CHANGELOG.md +14 -0
  146. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -4
  147. package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +1 -0
  148. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -3
  149. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +8 -1
  150. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/CHANGELOG.md +16 -0
  151. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  152. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  153. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  154. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  155. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  156. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  157. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  158. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  159. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  160. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  161. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  162. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  163. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  164. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  165. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  166. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  167. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  168. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/errors.d.ts +5 -0
  169. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/errors.js +5 -0
  170. package/node_modules/@smithy/node-http-handler/node_modules/@smithy/core/package.json +11 -2
  171. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  172. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/CHANGELOG.md +16 -0
  173. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  174. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +11 -10
  175. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +11 -10
  176. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -0
  177. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +25 -8
  178. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -0
  179. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  180. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  181. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  182. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  183. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  184. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  185. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  186. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  187. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  188. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  189. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  190. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/errors.d.ts +5 -0
  191. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/errors.js +5 -0
  192. package/node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/core/package.json +11 -2
  193. package/node_modules/@smithy/types/CHANGELOG.md +6 -0
  194. package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +14 -0
  195. package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +14 -0
  196. package/node_modules/@smithy/types/package.json +1 -1
  197. package/openclaw.plugin.json +15 -1
  198. package/package.json +13 -10
@@ -34,6 +34,7 @@ export class FetchHttpHandler {
34
34
  const requestTimeoutInMs = requestTimeout ?? this.config.requestTimeout;
35
35
  const keepAlive = this.config.keepAlive === true;
36
36
  const credentials = this.config.credentials;
37
+ const fetchFn = this.config.customFetch ?? fetch;
37
38
  if (abortSignal?.aborted) {
38
39
  const abortError = buildAbortError(abortSignal);
39
40
  return Promise.reject(abortError);
@@ -79,7 +80,7 @@ export class FetchHttpHandler {
79
80
  let removeSignalEventListener = () => { };
80
81
  const fetchRequest = createRequest(url, requestOptions);
81
82
  const raceOfPromises = [
82
- fetch(fetchRequest).then((response) => {
83
+ fetchFn(fetchRequest).then((response) => {
83
84
  const fetchHeaders = response.headers;
84
85
  const transformedHeaders = {};
85
86
  for (const pair of fetchHeaders.entries()) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/fetch-http-handler",
3
- "version": "5.7.2",
3
+ "version": "5.8.0",
4
4
  "description": "Provides a way to make requests",
5
5
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/fetch-http-handler",
6
6
  "license": "Apache-2.0",
@@ -40,8 +40,8 @@
40
40
  "test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.mts"
41
41
  },
42
42
  "dependencies": {
43
- "@smithy/core": "^3.33.2",
44
- "@smithy/types": "^4.17.2",
43
+ "@smithy/core": "^3.33.3",
44
+ "@smithy/types": "^4.18.0",
45
45
  "tslib": "^2.6.2"
46
46
  },
47
47
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/credential-provider-node",
3
- "version": "3.972.81",
3
+ "version": "3.972.83",
4
4
  "description": "AWS credential provider that sources credentials from a Node.JS environment. ",
5
5
  "keywords": [
6
6
  "aws",
@@ -45,12 +45,12 @@
45
45
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
46
46
  },
47
47
  "dependencies": {
48
- "@aws-sdk/credential-provider-env": "^3.972.70",
49
- "@aws-sdk/credential-provider-http": "^3.972.72",
50
- "@aws-sdk/credential-provider-ini": "^3.973.15",
51
- "@aws-sdk/credential-provider-process": "^3.972.70",
52
- "@aws-sdk/credential-provider-sso": "^3.973.14",
53
- "@aws-sdk/credential-provider-web-identity": "^3.972.76",
48
+ "@aws-sdk/credential-provider-env": "^3.972.71",
49
+ "@aws-sdk/credential-provider-http": "^3.972.73",
50
+ "@aws-sdk/credential-provider-ini": "^3.973.16",
51
+ "@aws-sdk/credential-provider-process": "^3.972.71",
52
+ "@aws-sdk/credential-provider-sso": "^3.973.15",
53
+ "@aws-sdk/credential-provider-web-identity": "^3.972.77",
54
54
  "@aws-sdk/types": "^3.974.5",
55
55
  "@smithy/core": "^3.33.3",
56
56
  "@smithy/credential-provider-imds": "^4.4.16",
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1d85108: Clear the HTTP/2 session timeout before destroying a session. Node keeps a destroyed `Http2Session` reachable until its pending `setTimeout` fires, so with the default 300 s timer on isolated sessions every completed request was retained for 5 minutes.
8
+ - Updated dependencies [016389b]
9
+ - @smithy/types@4.18.0
10
+
11
+ ## 4.12.0
12
+
13
+ ### Minor Changes
14
+
15
+ - bb68484: destroy isolated http2 session and manage timeout
16
+
3
17
  ## 4.11.3
4
18
 
5
19
  ### Patch Changes
@@ -491,6 +491,7 @@ class ClientHttp2SessionRef {
491
491
  destroy() {
492
492
  this.refs = 0;
493
493
  if (!this.session.destroyed) {
494
+ this.session.setTimeout(0);
494
495
  this.session.destroy();
495
496
  }
496
497
  }
@@ -608,9 +609,8 @@ class NodeHttp2ConnectionManager {
608
609
  session.on("error", ensureDestroyed);
609
610
  session.on("frameError", ensureDestroyed);
610
611
  session.on("close", ensureDestroyed);
611
- if (connectionConfiguration.requestTimeout) {
612
- session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
613
- }
612
+ const timeout = connectionConfiguration.requestTimeout ?? 300_000;
613
+ session.setTimeout(timeout, ensureDestroyed);
614
614
  ref.retain();
615
615
  return ref;
616
616
  }
@@ -817,6 +817,9 @@ class NodeHttp2Handler {
817
817
  resolve({ response: httpResponse });
818
818
  if (useIsolatedSession) {
819
819
  session.close();
820
+ clientHttp2Stream.on("end", () => {
821
+ ref.destroy();
822
+ });
820
823
  }
821
824
  });
822
825
  clientHttp2Stream.on("close", () => {
@@ -827,7 +830,11 @@ class NodeHttp2Handler {
827
830
  this.connectionManager.release(requestContext, ref);
828
831
  }
829
832
  if (!fulfilled) {
830
- rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
833
+ const error = new Error("Unexpected error: http2 request did not get a response");
834
+ if (session.destroyed) {
835
+ error.name = "TimeoutError";
836
+ }
837
+ rejectWithDestroy(error);
831
838
  }
832
839
  });
833
840
  writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
@@ -41,6 +41,7 @@ export class ClientHttp2SessionRef {
41
41
  destroy() {
42
42
  this.refs = 0;
43
43
  if (!this.session.destroyed) {
44
+ this.session.setTimeout(0);
44
45
  this.session.destroy();
45
46
  }
46
47
  }
@@ -64,9 +64,8 @@ export class NodeHttp2ConnectionManager {
64
64
  session.on("error", ensureDestroyed);
65
65
  session.on("frameError", ensureDestroyed);
66
66
  session.on("close", ensureDestroyed);
67
- if (connectionConfiguration.requestTimeout) {
68
- session.setTimeout(connectionConfiguration.requestTimeout, ensureDestroyed);
69
- }
67
+ const timeout = connectionConfiguration.requestTimeout ?? 300_000;
68
+ session.setTimeout(timeout, ensureDestroyed);
70
69
  ref.retain();
71
70
  return ref;
72
71
  }
@@ -142,6 +142,9 @@ export class NodeHttp2Handler {
142
142
  resolve({ response: httpResponse });
143
143
  if (useIsolatedSession) {
144
144
  session.close();
145
+ clientHttp2Stream.on("end", () => {
146
+ ref.destroy();
147
+ });
145
148
  }
146
149
  });
147
150
  clientHttp2Stream.on("close", () => {
@@ -152,7 +155,11 @@ export class NodeHttp2Handler {
152
155
  this.connectionManager.release(requestContext, ref);
153
156
  }
154
157
  if (!fulfilled) {
155
- rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
158
+ const error = new Error("Unexpected error: http2 request did not get a response");
159
+ if (session.destroyed) {
160
+ error.name = "TimeoutError";
161
+ }
162
+ rejectWithDestroy(error);
156
163
  }
157
164
  });
158
165
  writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.34.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 90e722f: error and backpressure fixes for AWS chunked encoding streams
8
+
9
+ ## 3.34.0
10
+
11
+ ### Minor Changes
12
+
13
+ - c45b1ba: Add custom error classes to identify and differentiate Smithy runtime errors from other errors.
14
+
15
+ ### Patch Changes
16
+
17
+ - fbcc573: identify AbortError as terminal
18
+
3
19
  ## 3.33.3
4
20
 
5
21
  ### Patch Changes
@@ -0,0 +1,20 @@
1
+ class SmithyError extends Error {
2
+ name = "SmithyError";
3
+ $source = errors.$source;
4
+ }
5
+ class SmithyTypeError extends TypeError {
6
+ name = "SmithyTypeError";
7
+ $source = errors.$source;
8
+ }
9
+ class SmithyRangeError extends RangeError {
10
+ name = "SmithyRangeError";
11
+ $source = errors.$source;
12
+ }
13
+ const errors = {
14
+ $source: "smithy",
15
+ Error: SmithyError,
16
+ TypeError: SmithyTypeError,
17
+ RangeError: SmithyRangeError,
18
+ };
19
+
20
+ exports.errors = errors;
@@ -55,16 +55,17 @@ const isBrowserNetworkError = (error) => {
55
55
  const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||
56
56
  THROTTLING_ERROR_CODES.includes(error.name) ||
57
57
  error.$retryable?.throttling == true;
58
- const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||
59
- isClockSkewCorrectedError(error) ||
60
- (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
61
- TRANSIENT_ERROR_CODES.includes(error.name) ||
62
- NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
63
- NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
64
- TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
65
- isBrowserNetworkError(error) ||
66
- isNodeJsHttp2TransientError(error) ||
67
- (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
58
+ const isTransientError = (error, depth = 0) => error?.name !== "AbortError" &&
59
+ (isRetryableByTrait(error) ||
60
+ isClockSkewCorrectedError(error) ||
61
+ (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
62
+ TRANSIENT_ERROR_CODES.includes(error.name) ||
63
+ NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
64
+ NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
65
+ TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
66
+ isBrowserNetworkError(error) ||
67
+ isNodeJsHttp2TransientError(error) ||
68
+ (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)));
68
69
  const isServerError = (error) => {
69
70
  if (error.$metadata?.httpStatusCode !== undefined) {
70
71
  const statusCode = error.$metadata.httpStatusCode;
@@ -57,16 +57,17 @@ const isBrowserNetworkError = (error) => {
57
57
  const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||
58
58
  THROTTLING_ERROR_CODES.includes(error.name) ||
59
59
  error.$retryable?.throttling == true;
60
- const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||
61
- isClockSkewCorrectedError(error) ||
62
- (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
63
- TRANSIENT_ERROR_CODES.includes(error.name) ||
64
- NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
65
- NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
66
- TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
67
- isBrowserNetworkError(error) ||
68
- isNodeJsHttp2TransientError(error) ||
69
- (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
60
+ const isTransientError = (error, depth = 0) => error?.name !== "AbortError" &&
61
+ (isRetryableByTrait(error) ||
62
+ isClockSkewCorrectedError(error) ||
63
+ (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
64
+ TRANSIENT_ERROR_CODES.includes(error.name) ||
65
+ NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
66
+ NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
67
+ TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
68
+ isBrowserNetworkError(error) ||
69
+ isNodeJsHttp2TransientError(error) ||
70
+ (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)));
70
71
  const isServerError = (error) => {
71
72
  if (error.$metadata?.httpStatusCode !== undefined) {
72
73
  const statusCode = error.$metadata.httpStatusCode;
@@ -1170,6 +1170,8 @@ const getAwsChunkedEncodingStream = (readableStream, options) => {
1170
1170
  checksumLocationName !== undefined &&
1171
1171
  streamHasher !== undefined;
1172
1172
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
1173
+ Promise.resolve(digest).catch(() => {
1174
+ });
1173
1175
  const reader = readableStream.getReader();
1174
1176
  return new ReadableStream({
1175
1177
  async pull(controller) {
@@ -1352,6 +1352,8 @@ const getAwsChunkedEncodingStream$1 = (readableStream, options) => {
1352
1352
  checksumLocationName !== undefined &&
1353
1353
  streamHasher !== undefined;
1354
1354
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
1355
+ Promise.resolve(digest).catch(() => {
1356
+ });
1355
1357
  const reader = readableStream.getReader();
1356
1358
  return new ReadableStream({
1357
1359
  async pull(controller) {
@@ -1384,8 +1386,12 @@ function getAwsChunkedEncodingStream(stream, options) {
1384
1386
  checksumLocationName !== undefined &&
1385
1387
  streamHasher !== undefined;
1386
1388
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;
1389
+ Promise.resolve(digest).catch(() => {
1390
+ });
1387
1391
  const awsChunkedEncodingStream = new Readable({
1388
- read: () => { },
1392
+ read() {
1393
+ readable.resume();
1394
+ },
1389
1395
  });
1390
1396
  readable.on("data", (data) => {
1391
1397
  const length = bodyLengthChecker(data) || 0;
@@ -1394,16 +1400,27 @@ function getAwsChunkedEncodingStream(stream, options) {
1394
1400
  }
1395
1401
  awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`);
1396
1402
  awsChunkedEncodingStream.push(data);
1397
- awsChunkedEncodingStream.push("\r\n");
1403
+ if (!awsChunkedEncodingStream.push("\r\n")) {
1404
+ readable.pause();
1405
+ }
1398
1406
  });
1407
+ readable.on("error", (err) => {
1408
+ awsChunkedEncodingStream.destroy(err);
1409
+ });
1410
+ readable.pause();
1399
1411
  readable.on("end", async () => {
1400
- awsChunkedEncodingStream.push(`0\r\n`);
1401
- if (checksumRequired) {
1402
- const checksum = base64Encoder(await digest);
1403
- awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`);
1404
- awsChunkedEncodingStream.push(`\r\n`);
1412
+ try {
1413
+ awsChunkedEncodingStream.push(`0\r\n`);
1414
+ if (checksumRequired) {
1415
+ const checksum = base64Encoder(await digest);
1416
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`);
1417
+ awsChunkedEncodingStream.push(`\r\n`);
1418
+ }
1419
+ awsChunkedEncodingStream.push(null);
1420
+ }
1421
+ catch (err) {
1422
+ awsChunkedEncodingStream.destroy(err);
1405
1423
  }
1406
- awsChunkedEncodingStream.push(null);
1407
1424
  });
1408
1425
  return awsChunkedEncodingStream;
1409
1426
  }
@@ -1170,6 +1170,8 @@ const getAwsChunkedEncodingStream = (readableStream, options) => {
1170
1170
  checksumLocationName !== undefined &&
1171
1171
  streamHasher !== undefined;
1172
1172
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
1173
+ Promise.resolve(digest).catch(() => {
1174
+ });
1173
1175
  const reader = readableStream.getReader();
1174
1176
  return new ReadableStream({
1175
1177
  async pull(controller) {
@@ -0,0 +1,18 @@
1
+ export class SmithyError extends Error {
2
+ name = "SmithyError";
3
+ $source = errors.$source;
4
+ }
5
+ export class SmithyTypeError extends TypeError {
6
+ name = "SmithyTypeError";
7
+ $source = errors.$source;
8
+ }
9
+ export class SmithyRangeError extends RangeError {
10
+ name = "SmithyRangeError";
11
+ $source = errors.$source;
12
+ }
13
+ export const errors = {
14
+ $source: "smithy",
15
+ Error: SmithyError,
16
+ TypeError: SmithyTypeError,
17
+ RangeError: SmithyRangeError,
18
+ };
@@ -19,16 +19,17 @@ export const isBrowserNetworkError = (error) => {
19
19
  export const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 ||
20
20
  THROTTLING_ERROR_CODES.includes(error.name) ||
21
21
  error.$retryable?.throttling == true;
22
- export const isTransientError = (error, depth = 0) => isRetryableByTrait(error) ||
23
- isClockSkewCorrectedError(error) ||
24
- (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
25
- TRANSIENT_ERROR_CODES.includes(error.name) ||
26
- NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
27
- NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
28
- TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
29
- isBrowserNetworkError(error) ||
30
- isNodeJsHttp2TransientError(error) ||
31
- (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1));
22
+ export const isTransientError = (error, depth = 0) => error?.name !== "AbortError" &&
23
+ (isRetryableByTrait(error) ||
24
+ isClockSkewCorrectedError(error) ||
25
+ (error.name === "InvalidSignatureException" && error.message?.includes("Signature expired")) ||
26
+ TRANSIENT_ERROR_CODES.includes(error.name) ||
27
+ NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") ||
28
+ NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") ||
29
+ TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) ||
30
+ isBrowserNetworkError(error) ||
31
+ isNodeJsHttp2TransientError(error) ||
32
+ (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)));
32
33
  export const isServerError = (error) => {
33
34
  if (error.$metadata?.httpStatusCode !== undefined) {
34
35
  const statusCode = error.$metadata.httpStatusCode;
@@ -6,6 +6,8 @@ export const getAwsChunkedEncodingStream = (readableStream, options) => {
6
6
  checksumLocationName !== undefined &&
7
7
  streamHasher !== undefined;
8
8
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;
9
+ Promise.resolve(digest).catch(() => {
10
+ });
9
11
  const reader = readableStream.getReader();
10
12
  return new ReadableStream({
11
13
  async pull(controller) {
@@ -13,8 +13,12 @@ export function getAwsChunkedEncodingStream(stream, options) {
13
13
  checksumLocationName !== undefined &&
14
14
  streamHasher !== undefined;
15
15
  const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined;
16
+ Promise.resolve(digest).catch(() => {
17
+ });
16
18
  const awsChunkedEncodingStream = new Readable({
17
- read: () => { },
19
+ read() {
20
+ readable.resume();
21
+ },
18
22
  });
19
23
  readable.on("data", (data) => {
20
24
  const length = bodyLengthChecker(data) || 0;
@@ -23,16 +27,27 @@ export function getAwsChunkedEncodingStream(stream, options) {
23
27
  }
24
28
  awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`);
25
29
  awsChunkedEncodingStream.push(data);
26
- awsChunkedEncodingStream.push("\r\n");
30
+ if (!awsChunkedEncodingStream.push("\r\n")) {
31
+ readable.pause();
32
+ }
27
33
  });
34
+ readable.on("error", (err) => {
35
+ awsChunkedEncodingStream.destroy(err);
36
+ });
37
+ readable.pause();
28
38
  readable.on("end", async () => {
29
- awsChunkedEncodingStream.push(`0\r\n`);
30
- if (checksumRequired) {
31
- const checksum = base64Encoder(await digest);
32
- awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`);
33
- awsChunkedEncodingStream.push(`\r\n`);
39
+ try {
40
+ awsChunkedEncodingStream.push(`0\r\n`);
41
+ if (checksumRequired) {
42
+ const checksum = base64Encoder(await digest);
43
+ awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`);
44
+ awsChunkedEncodingStream.push(`\r\n`);
45
+ }
46
+ awsChunkedEncodingStream.push(null);
47
+ }
48
+ catch (err) {
49
+ awsChunkedEncodingStream.destroy(err);
34
50
  }
35
- awsChunkedEncodingStream.push(null);
36
51
  });
37
52
  return awsChunkedEncodingStream;
38
53
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A general SDK error that does not fall into a more specific category.
3
+ *
4
+ * @public
5
+ */
6
+ export declare class SmithyError extends Error {
7
+ name: string;
8
+ readonly $source: string;
9
+ }
10
+ /**
11
+ * A value had the wrong type or could not be interpreted as the expected type.
12
+ *
13
+ * @public
14
+ */
15
+ export declare class SmithyTypeError extends TypeError {
16
+ name: string;
17
+ readonly $source: string;
18
+ }
19
+ /**
20
+ * A value was the correct type but fell outside its allowed range or bounds.
21
+ *
22
+ * @public
23
+ */
24
+ export declare class SmithyRangeError extends RangeError {
25
+ name: string;
26
+ readonly $source: string;
27
+ }
28
+ /**
29
+ * @public
30
+ */
31
+ export type ErrorConstructor<E extends Error = Error> = new (message?: string) => E;
32
+ /**
33
+ * @public
34
+ */
35
+ export interface ErrorContainer {
36
+ readonly $source: string;
37
+ readonly Error: ErrorConstructor<SmithyError>;
38
+ readonly TypeError: ErrorConstructor<SmithyTypeError>;
39
+ readonly RangeError: ErrorConstructor<SmithyRangeError>;
40
+ }
41
+ /**
42
+ * @public
43
+ */
44
+ export declare const errors: ErrorContainer;
@@ -0,0 +1 @@
1
+ export { errors, type SmithyError, type SmithyRangeError, type SmithyTypeError } from "./errors";
@@ -19,6 +19,10 @@ export declare const isThrottlingError: (error: SdkError) => boolean;
19
19
  * included here because there is an error scenario with unknown root
20
20
  * cause where the NodeHttpHandler does not decorate the Error with
21
21
  * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition.
22
+ *
23
+ * Errors named "AbortError" are considered terminal. AbortSignal.timeout()
24
+ * produces an underlying cause which would otherwise be considered retryable as
25
+ * a TimeoutError.
22
26
  */
23
27
  export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
24
28
  export declare const isServerError: (error: SdkError) => boolean;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A general SDK error that does not fall into a more specific category.
3
+ *
4
+ * @public
5
+ */
6
+ export declare class SmithyError extends Error {
7
+ name: string;
8
+ readonly $source: string;
9
+ }
10
+ /**
11
+ * A value had the wrong type or could not be interpreted as the expected type.
12
+ *
13
+ * @public
14
+ */
15
+ export declare class SmithyTypeError extends TypeError {
16
+ name: string;
17
+ readonly $source: string;
18
+ }
19
+ /**
20
+ * A value was the correct type but fell outside its allowed range or bounds.
21
+ *
22
+ * @public
23
+ */
24
+ export declare class SmithyRangeError extends RangeError {
25
+ name: string;
26
+ readonly $source: string;
27
+ }
28
+ /**
29
+ * @public
30
+ */
31
+ export type ErrorConstructor<E extends Error = Error> = new (message?: string) => E;
32
+ /**
33
+ * @public
34
+ */
35
+ export interface ErrorContainer {
36
+ readonly $source: string;
37
+ readonly Error: ErrorConstructor<SmithyError>;
38
+ readonly TypeError: ErrorConstructor<SmithyTypeError>;
39
+ readonly RangeError: ErrorConstructor<SmithyRangeError>;
40
+ }
41
+ /**
42
+ * @public
43
+ */
44
+ export declare const errors: ErrorContainer;
@@ -0,0 +1 @@
1
+ export { errors, SmithyError, SmithyRangeError, SmithyTypeError } from "./errors";
@@ -19,6 +19,10 @@ export declare const isThrottlingError: (error: SdkError) => boolean;
19
19
  * included here because there is an error scenario with unknown root
20
20
  * cause where the NodeHttpHandler does not decorate the Error with
21
21
  * the name "TimeoutError" to be checked by the TRANSIENT_ERROR_CODES condition.
22
+ *
23
+ * Errors named "AbortError" are considered terminal. AbortSignal.timeout()
24
+ * produces an underlying cause which would otherwise be considered retryable as
25
+ * a TimeoutError.
22
26
  */
23
27
  export declare const isTransientError: (error: SdkError, depth?: number) => boolean;
24
28
  export declare const isServerError: (error: SdkError) => boolean;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ export * from "./dist-types/submodules/errors/index";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Do not edit:
3
+ * This is a compatibility redirect for contexts that do not understand package.json exports field.
4
+ */
5
+ module.exports = require("./dist-cjs/submodules/errors/index.js");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.33.3",
3
+ "version": "3.34.1",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -24,6 +24,8 @@
24
24
  "./config.js",
25
25
  "./endpoints.d.ts",
26
26
  "./endpoints.js",
27
+ "./errors.d.ts",
28
+ "./errors.js",
27
29
  "./event-streams.d.ts",
28
30
  "./event-streams.js",
29
31
  "./protocols.d.ts",
@@ -212,6 +214,13 @@
212
214
  "node": "./dist-cjs/submodules/transport/index.js",
213
215
  "import": "./dist-es/submodules/transport/index.js",
214
216
  "require": "./dist-cjs/submodules/transport/index.js"
217
+ },
218
+ "./errors": {
219
+ "types": "./dist-types/submodules/errors/index.d.ts",
220
+ "module": "./dist-es/submodules/errors/index.js",
221
+ "node": "./dist-cjs/submodules/errors/index.js",
222
+ "import": "./dist-es/submodules/errors/index.js",
223
+ "require": "./dist-cjs/submodules/errors/index.js"
215
224
  }
216
225
  },
217
226
  "scripts": {
@@ -232,7 +241,7 @@
232
241
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
233
242
  },
234
243
  "dependencies": {
235
- "@smithy/types": "^4.17.2",
244
+ "@smithy/types": "^4.18.0",
236
245
  "tslib": "^2.6.2"
237
246
  },
238
247
  "devDependencies": {