@openclaw/amazon-bedrock-provider 2026.6.5 → 2026.6.6-beta.2

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 (127) hide show
  1. package/dist/bedrock-options.js +1 -0
  2. package/dist/discovery.js +19 -12
  3. package/dist/provider-policy-api.js +1 -1
  4. package/dist/register.sync.runtime.js +58 -21
  5. package/dist/stream.runtime.js +110 -48
  6. package/dist/thinking-policy.js +81 -7
  7. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  8. package/node_modules/@aws-sdk/credential-provider-http/package.json +8 -8
  9. package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
  10. package/node_modules/@aws-sdk/credential-provider-login/package.json +7 -7
  11. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +12 -1
  12. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
  13. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  14. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  15. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/LICENSE +201 -0
  16. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/README.md +62 -0
  17. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +156 -0
  18. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/constants.js +2 -0
  19. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromEnvSigningName.js +16 -0
  20. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +80 -0
  21. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromStatic.js +8 -0
  22. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getNewSsoOidcToken.js +11 -0
  23. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/getSsoOidcClient.js +10 -0
  24. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/index.js +4 -0
  25. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/nodeProvider.js +5 -0
  26. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js +7 -0
  27. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js +7 -0
  28. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js +8 -0
  29. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/constants.d.ts +8 -0
  30. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromEnvSigningName.d.ts +18 -0
  31. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromSso.d.ts +12 -0
  32. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/fromStatic.d.ts +9 -0
  33. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getNewSsoOidcToken.d.ts +8 -0
  34. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/getSsoOidcClient.d.ts +7 -0
  35. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/index.d.ts +4 -0
  36. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/nodeProvider.d.ts +18 -0
  37. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/constants.d.ts +3 -0
  38. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromEnvSigningName.d.ts +11 -0
  39. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromSso.d.ts +14 -0
  40. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/fromStatic.d.ts +12 -0
  41. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getNewSsoOidcToken.d.ts +11 -0
  42. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/getSsoOidcClient.d.ts +7 -0
  43. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/index.d.ts +4 -0
  44. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/nodeProvider.d.ts +5 -0
  45. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenExpiry.d.ts +2 -0
  46. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/validateTokenKey.d.ts +5 -0
  47. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/ts3.4/writeSSOTokenToFile.d.ts +5 -0
  48. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenExpiry.d.ts +5 -0
  49. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/validateTokenKey.d.ts +4 -0
  50. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-types/writeSSOTokenToFile.d.ts +5 -0
  51. package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +69 -0
  52. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  53. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  54. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +5 -5
  55. package/node_modules/@aws-sdk/middleware-eventstream/package.json +5 -5
  56. package/node_modules/@aws-sdk/middleware-websocket/package.json +8 -8
  57. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +99 -106
  58. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +62 -120
  59. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +55 -86
  60. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +73 -104
  61. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +102 -185
  62. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +4 -5
  63. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/endpoint/bdd.js +21 -57
  64. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +1 -2
  65. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -4
  66. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +73 -41
  67. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +4 -5
  68. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/bdd.js +20 -52
  69. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.browser.js +1 -2
  70. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -4
  71. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +36 -59
  72. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +4 -5
  73. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js +17 -45
  74. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.browser.js +1 -2
  75. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -4
  76. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +32 -32
  77. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +4 -5
  78. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js +17 -45
  79. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +1 -2
  80. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -4
  81. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +50 -50
  82. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +4 -5
  83. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js +1 -1
  84. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/bdd.js +34 -96
  85. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.browser.js +1 -2
  86. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +3 -6
  87. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +63 -80
  88. package/node_modules/@aws-sdk/nested-clients/package.json +9 -9
  89. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +5 -5
  90. package/node_modules/@aws-sdk/types/package.json +3 -3
  91. package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
  92. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
  93. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
  94. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
  95. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
  96. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
  97. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
  98. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
  99. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
  100. package/node_modules/@smithy/core/dist-types/submodules/retry/middleware-retry/configurations.d.ts +4 -1
  101. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/ConfiguredRetryStrategy.d.ts +1 -2
  102. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/DefaultRetryToken.d.ts +3 -0
  103. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/StandardRetryStrategy.d.ts +1 -1
  104. package/node_modules/@smithy/core/package.json +2 -2
  105. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
  106. package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
  107. package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js +2 -2
  108. package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/node-http.js +2 -0
  109. package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts +1 -1
  110. package/node_modules/@smithy/credential-provider-imds/dist-types/remoteProvider/node-http.d.ts +2 -0
  111. package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
  112. package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
  113. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +6 -4
  114. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +7 -6
  115. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +2 -1
  116. package/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
  117. package/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
  118. package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +2 -2
  119. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
  120. package/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
  121. package/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
  122. package/node_modules/@smithy/node-http-handler/package.json +4 -4
  123. package/node_modules/@smithy/signature-v4/package.json +3 -3
  124. package/node_modules/@smithy/types/dist-types/retry.d.ts +25 -0
  125. package/node_modules/@smithy/types/package.json +1 -1
  126. package/npm-shrinkwrap.json +169 -152
  127. package/package.json +7 -7
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var node_https = require('node:https');
4
3
  var protocols = require('@smithy/core/protocols');
4
+ var node_https = require('node:https');
5
5
  var node_stream = require('node:stream');
6
6
  var http2 = require('node:http2');
7
7
 
@@ -414,7 +414,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
414
414
  socketAcquisitionWarningTimeout,
415
415
  throwOnRequestTimeout,
416
416
  httpAgentProvider: async () => {
417
- const { Agent, request } = await import('node:http');
417
+ const node_http = await import('node:http');
418
+ const { Agent, request } = node_http.default ?? node_http;
418
419
  hRequest = request;
419
420
  hAgent = Agent;
420
421
  if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
@@ -666,6 +667,7 @@ class NodeHttp2ConnectionManager {
666
667
  }
667
668
  }
668
669
 
670
+ const { constants } = http2;
669
671
  class NodeHttp2Handler {
670
672
  config;
671
673
  configProvider;
@@ -760,8 +762,8 @@ class NodeHttp2Handler {
760
762
  }
761
763
  const clientHttp2Stream = session.request({
762
764
  ...request.headers,
763
- [http2.constants.HTTP2_HEADER_PATH]: path,
764
- [http2.constants.HTTP2_HEADER_METHOD]: method,
765
+ [constants.HTTP2_HEADER_PATH]: path,
766
+ [constants.HTTP2_HEADER_METHOD]: method,
765
767
  });
766
768
  if (effectiveRequestTimeout) {
767
769
  clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
@@ -1,8 +1,8 @@
1
- import { Agent as hsAgent, request as hsRequest } from "node:https";
2
1
  import { HttpResponse, buildQueryString } from "@smithy/core/protocols";
3
2
  import { buildAbortError } from "./build-abort-error";
4
3
  import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants";
5
4
  import { getTransformedHeaders } from "./get-transformed-headers";
5
+ import { node_https } from "./node-https";
6
6
  import { setConnectionTimeout } from "./set-connection-timeout";
7
7
  import { setRequestTimeout } from "./set-request-timeout";
8
8
  import { setSocketKeepAlive } from "./set-socket-keep-alive";
@@ -107,7 +107,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
107
107
  const expectContinue = headers ? (headers.Expect ?? headers.expect) === "100-continue" : false;
108
108
  let agent = isSSL ? config.httpsAgent : config.httpAgent;
109
109
  if (expectContinue && !this.externalAgent) {
110
- agent = new (isSSL ? hsAgent : hAgent)({
110
+ agent = new (isSSL ? node_https.Agent : hAgent)({
111
111
  keepAlive: false,
112
112
  maxSockets: Infinity,
113
113
  });
@@ -145,7 +145,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
145
145
  agent,
146
146
  auth,
147
147
  };
148
- const requestFunc = isSSL ? hsRequest : hRequest;
148
+ const requestFunc = isSSL ? node_https.request : hRequest;
149
149
  const req = requestFunc(nodeHttpsOptions, (res) => {
150
150
  const httpResponse = new HttpResponse({
151
151
  statusCode: res.statusCode || -1,
@@ -218,7 +218,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
218
218
  socketAcquisitionWarningTimeout,
219
219
  throwOnRequestTimeout,
220
220
  httpAgentProvider: async () => {
221
- const { Agent, request } = await import("node:http");
221
+ const node_http = await import("node:http");
222
+ const { Agent, request } = node_http.default ?? node_http;
222
223
  hRequest = request;
223
224
  hAgent = Agent;
224
225
  if (httpAgent instanceof hAgent || typeof httpAgent?.destroy === "function") {
@@ -228,11 +229,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
228
229
  return new hAgent({ keepAlive, maxSockets, ...httpAgent });
229
230
  },
230
231
  httpsAgent: (() => {
231
- if (httpsAgent instanceof hsAgent || typeof httpsAgent?.destroy === "function") {
232
+ if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
232
233
  this.externalAgent = true;
233
234
  return httpsAgent;
234
235
  }
235
- return new hsAgent({ keepAlive, maxSockets, ...httpsAgent });
236
+ return new node_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
236
237
  })(),
237
238
  logger,
238
239
  };
@@ -1,9 +1,10 @@
1
- import { constants } from "node:http2";
2
1
  import { HttpResponse, buildQueryString } from "@smithy/core/protocols";
3
2
  import { buildAbortError } from "./build-abort-error";
4
3
  import { getTransformedHeaders } from "./get-transformed-headers";
4
+ import { node_http2 } from "./node-http2";
5
5
  import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager";
6
6
  import { writeRequestBody } from "./write-request-body";
7
+ const { constants } = node_http2;
7
8
  export class NodeHttp2Handler {
8
9
  config;
9
10
  configProvider;
@@ -0,0 +1,2 @@
1
+ import node_http2 from "node:http2";
2
+ export { node_http2 };
@@ -0,0 +1,2 @@
1
+ import node_https from "node:https";
2
+ export { node_https };
@@ -1,5 +1,5 @@
1
1
  import type { Agent as hAgentType } from "node:http";
2
- import { Agent as hsAgent } from "node:https";
2
+ import type { Agent as hsAgentType } from "node:https";
3
3
  import { HttpResponse, type HttpHandler, type HttpRequest } from "@smithy/core/protocols";
4
4
  import type { HttpHandlerOptions, Logger, NodeHttpHandlerOptions, Provider } from "@smithy/types";
5
5
  export { NodeHttpHandlerOptions };
@@ -35,7 +35,7 @@ export declare class NodeHttpHandler implements HttpHandler<NodeHttpHandlerOptio
35
35
  * @param logger - channel for the warning.
36
36
  * @returns timestamp of last emitted warning.
37
37
  */
38
- static checkSocketUsage(agent: hAgentType | hsAgent, socketWarningTimestamp: number, logger?: Logger): number;
38
+ static checkSocketUsage(agent: hAgentType | hsAgentType, socketWarningTimestamp: number, logger?: Logger): number;
39
39
  constructor(options?: NodeHttpHandlerOptions | Provider<NodeHttpHandlerOptions | void>);
40
40
  destroy(): void;
41
41
  handle(request: HttpRequest, { abortSignal, requestTimeout }?: HttpHandlerOptions): Promise<{
@@ -1,4 +1,4 @@
1
- import { type ClientSessionOptions, type SecureClientSessionOptions } from "node:http2";
1
+ import type { ClientSessionOptions, SecureClientSessionOptions } from "node:http2";
2
2
  import { HttpResponse, type HttpHandler, type HttpRequest } from "@smithy/core/protocols";
3
3
  import type { HttpHandlerOptions, Provider } from "@smithy/types";
4
4
  /**
@@ -0,0 +1,2 @@
1
+ import node_http2 from "node:http2";
2
+ export { node_http2 };
@@ -0,0 +1,2 @@
1
+ import node_https from "node:https";
2
+ export { node_https };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "4.7.5",
3
+ "version": "4.7.7",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
@@ -26,12 +26,12 @@
26
26
  "module": "./dist-es/index.js",
27
27
  "types": "./dist-types/index.d.ts",
28
28
  "dependencies": {
29
- "@smithy/core": "^3.24.5",
30
- "@smithy/types": "^4.14.2",
29
+ "@smithy/core": "^3.24.6",
30
+ "@smithy/types": "^4.14.3",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "devDependencies": {
34
- "@smithy/abort-controller": "^4.2.15",
34
+ "@smithy/abort-controller": "^4.2.16",
35
35
  "@types/node": "^18.11.9",
36
36
  "concurrently": "7.0.0",
37
37
  "downlevel-dts": "0.10.1",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "5.4.5",
3
+ "version": "5.4.6",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,8 +25,8 @@
25
25
  "license": "Apache-2.0",
26
26
  "sideEffects": false,
27
27
  "dependencies": {
28
- "@smithy/core": "^3.24.5",
29
- "@smithy/types": "^4.14.2",
28
+ "@smithy/core": "^3.24.6",
29
+ "@smithy/types": "^4.14.3",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
@@ -75,10 +75,24 @@ export interface RetryStrategyOptions {
75
75
  */
76
76
  export interface RetryToken {
77
77
  /**
78
+ * Starts at 0 for the initial request, which is not a "retry" by definition.
79
+ * 1 indicates the first retry.
80
+ *
78
81
  * @returns the current count of retry.
79
82
  */
80
83
  getRetryCount(): number;
81
84
  /**
85
+ * RetryStrategies implemented by `@smithy/core` will return tokens with a
86
+ * delay of zero.
87
+ *
88
+ * This is because the RetryStrategy token acquisition methods took over the
89
+ * task of idling for the delay period. If a user-implemented retry token
90
+ * contains a delay, the default Smithy retry middleware will still honor it.
91
+ *
92
+ * That is to say, you may either sleep within the RetryStrategy methods for acquiring
93
+ * the token, OR return a token with a retry delay that will cause the retry middleware
94
+ * to sleep.
95
+ *
82
96
  * @returns the number of milliseconds to wait before retrying an action.
83
97
  */
84
98
  getRetryDelay(): number;
@@ -86,6 +100,14 @@ export interface RetryToken {
86
100
  * @returns whether the operation which generated this token is long polling.
87
101
  */
88
102
  isLongPoll?(): boolean;
103
+ /**
104
+ * Delays that have already been executed by the time the token
105
+ * is accessible. This is needed for the token handler to understand what has happened.
106
+ * @internal
107
+ */
108
+ $retryLog?: {
109
+ acquisitionDelay?: number;
110
+ };
89
111
  }
90
112
  /**
91
113
  * @public
@@ -116,6 +138,9 @@ export interface RetryStrategyV2 {
116
138
  * either choose to allow another retry and send a new or updated token,
117
139
  * or reject the retry attempt and report the error either in an exception
118
140
  * or returning an error.
141
+ *
142
+ * This method should either delay internally and return a token with 0 delay, OR
143
+ * do not sleep and return a token with the desired delay duration.
119
144
  */
120
145
  refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
121
146
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/types",
3
- "version": "4.14.2",
3
+ "version": "4.14.3",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
6
6
  "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline types",