@probelabs/probe 0.6.0-rc135 → 0.6.0-rc136

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.
package/cjs/index.cjs CHANGED
@@ -8357,10 +8357,10 @@ var require_dist_cjs3 = __commonJS({
8357
8357
  }
8358
8358
  __name(resolveEventStreamConfig, "resolveEventStreamConfig");
8359
8359
  var import_protocol_http15 = require_dist_cjs2();
8360
- var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {
8360
+ var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context3) => async (args) => {
8361
8361
  const { request } = args;
8362
8362
  if (!import_protocol_http15.HttpRequest.isInstance(request)) return next(args);
8363
- return options.eventStreamPayloadHandler.handle(next, args, context);
8363
+ return options.eventStreamPayloadHandler.handle(next, args, context3);
8364
8364
  }, "eventStreamHandlingMiddleware");
8365
8365
  var eventStreamHandlingMiddlewareOptions = {
8366
8366
  tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"],
@@ -8490,13 +8490,13 @@ var require_dist_cjs5 = __commonJS({
8490
8490
  loggerMiddlewareOptions: () => loggerMiddlewareOptions
8491
8491
  });
8492
8492
  module2.exports = __toCommonJS2(index_exports2);
8493
- var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {
8493
+ var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context3) => async (args) => {
8494
8494
  try {
8495
8495
  const response = await next(args);
8496
- const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
8496
+ const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
8497
8497
  const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
8498
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
8499
- const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
8498
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
8499
+ const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context3.outputFilterSensitiveLog;
8500
8500
  const { $metadata, ...outputWithoutMetadata } = response.output;
8501
8501
  logger2?.info?.({
8502
8502
  clientName,
@@ -8507,9 +8507,9 @@ var require_dist_cjs5 = __commonJS({
8507
8507
  });
8508
8508
  return response;
8509
8509
  } catch (error2) {
8510
- const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
8510
+ const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
8511
8511
  const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
8512
- const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
8512
+ const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
8513
8513
  logger2?.error?.({
8514
8514
  clientName,
8515
8515
  commandName,
@@ -8556,8 +8556,8 @@ var require_invoke_store = __commonJS({
8556
8556
  /**
8557
8557
  * Initialize and run code within an invoke context
8558
8558
  */
8559
- static run(context, fn) {
8560
- return this.storage.run({ ...context }, fn);
8559
+ static run(context3, fn) {
8560
+ return this.storage.run({ ...context3 }, fn);
8561
8561
  }
8562
8562
  /**
8563
8563
  * Get the complete current context
@@ -8569,8 +8569,8 @@ var require_invoke_store = __commonJS({
8569
8569
  * Get a specific value from the context by key
8570
8570
  */
8571
8571
  static get(key) {
8572
- const context = this.storage.getStore();
8573
- return context?.[key];
8572
+ const context3 = this.storage.getStore();
8573
+ return context3?.[key];
8574
8574
  }
8575
8575
  /**
8576
8576
  * Set a custom value in the current context
@@ -8580,9 +8580,9 @@ var require_invoke_store = __commonJS({
8580
8580
  if (this.isProtectedKey(key)) {
8581
8581
  throw new Error(`Cannot modify protected Lambda context field`);
8582
8582
  }
8583
- const context = this.storage.getStore();
8584
- if (context) {
8585
- context[key] = value;
8583
+ const context3 = this.storage.getStore();
8584
+ if (context3) {
8585
+ context3[key] = value;
8586
8586
  }
8587
8587
  }
8588
8588
  /**
@@ -8710,7 +8710,7 @@ var import_types, getSmithyContext;
8710
8710
  var init_getSmithyContext = __esm({
8711
8711
  "node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
8712
8712
  import_types = __toESM(require_dist_cjs());
8713
- getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
8713
+ getSmithyContext = (context3) => context3[import_types.SMITHY_CONTEXT_KEY] || (context3[import_types.SMITHY_CONTEXT_KEY] = {});
8714
8714
  }
8715
8715
  });
8716
8716
 
@@ -8719,7 +8719,7 @@ var require_dist_cjs7 = __commonJS({
8719
8719
  "node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
8720
8720
  "use strict";
8721
8721
  var types2 = require_dist_cjs();
8722
- var getSmithyContext9 = (context) => context[types2.SMITHY_CONTEXT_KEY] || (context[types2.SMITHY_CONTEXT_KEY] = {});
8722
+ var getSmithyContext9 = (context3) => context3[types2.SMITHY_CONTEXT_KEY] || (context3[types2.SMITHY_CONTEXT_KEY] = {});
8723
8723
  var normalizeProvider4 = (input) => {
8724
8724
  if (typeof input === "function")
8725
8725
  return input;
@@ -8771,12 +8771,12 @@ var init_httpAuthSchemeMiddleware = __esm({
8771
8771
  "node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
8772
8772
  import_util_middleware = __toESM(require_dist_cjs7());
8773
8773
  init_resolveAuthOptions();
8774
- httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
8775
- const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
8774
+ httpAuthSchemeMiddleware = (config, mwOptions) => (next, context3) => async (args) => {
8775
+ const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context3, args.input));
8776
8776
  const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
8777
8777
  const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
8778
8778
  const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
8779
- const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
8779
+ const smithyContext = (0, import_util_middleware.getSmithyContext)(context3);
8780
8780
  const failureReasons = [];
8781
8781
  for (const option of resolvedOptions) {
8782
8782
  const scheme = authSchemes.get(option.schemeId);
@@ -8789,7 +8789,7 @@ var init_httpAuthSchemeMiddleware = __esm({
8789
8789
  failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
8790
8790
  continue;
8791
8791
  }
8792
- const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
8792
+ const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context3) || {};
8793
8793
  option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
8794
8794
  option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
8795
8795
  smithyContext.selectedHttpAuthScheme = {
@@ -8836,7 +8836,7 @@ var require_dist_cjs8 = __commonJS({
8836
8836
  "node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
8837
8837
  "use strict";
8838
8838
  var protocolHttp = require_dist_cjs2();
8839
- var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
8839
+ var deserializerMiddleware = (options, deserializer) => (next, context3) => async (args) => {
8840
8840
  const { response } = await next(args);
8841
8841
  try {
8842
8842
  const parsed = await deserializer(response, options);
@@ -8853,10 +8853,10 @@ var require_dist_cjs8 = __commonJS({
8853
8853
  try {
8854
8854
  error2.message += "\n " + hint;
8855
8855
  } catch (e3) {
8856
- if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
8856
+ if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
8857
8857
  console.warn(hint);
8858
8858
  } else {
8859
- context.logger?.warn?.(hint);
8859
+ context3.logger?.warn?.(hint);
8860
8860
  }
8861
8861
  }
8862
8862
  if (typeof error2.$responseBodyText !== "undefined") {
@@ -8886,9 +8886,9 @@ var require_dist_cjs8 = __commonJS({
8886
8886
  return k3.match(pattern);
8887
8887
  }) || [void 0, void 0])[1];
8888
8888
  };
8889
- var serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
8889
+ var serializerMiddleware = (options, serializer) => (next, context3) => async (args) => {
8890
8890
  const endpointConfig = options;
8891
- const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;
8891
+ const endpoint = context3.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context3.endpointV2.url) : endpointConfig.endpoint;
8892
8892
  if (!endpoint) {
8893
8893
  throw new Error("No valid endpoint provider available.");
8894
8894
  }
@@ -8971,11 +8971,11 @@ var init_httpSigningMiddleware = __esm({
8971
8971
  };
8972
8972
  defaultSuccessHandler = (httpResponse, signingProperties) => {
8973
8973
  };
8974
- httpSigningMiddleware = (config) => (next, context) => async (args) => {
8974
+ httpSigningMiddleware = (config) => (next, context3) => async (args) => {
8975
8975
  if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
8976
8976
  return next(args);
8977
8977
  }
8978
- const smithyContext = (0, import_util_middleware2.getSmithyContext)(context);
8978
+ const smithyContext = (0, import_util_middleware2.getSmithyContext)(context3);
8979
8979
  const scheme = smithyContext.selectedHttpAuthScheme;
8980
8980
  if (!scheme) {
8981
8981
  throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
@@ -10968,14 +10968,14 @@ var import_util_stream, collectBody;
10968
10968
  var init_collect_stream_body = __esm({
10969
10969
  "node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
10970
10970
  import_util_stream = __toESM(require_dist_cjs18());
10971
- collectBody = async (streamBody = new Uint8Array(), context) => {
10971
+ collectBody = async (streamBody = new Uint8Array(), context3) => {
10972
10972
  if (streamBody instanceof Uint8Array) {
10973
10973
  return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
10974
10974
  }
10975
10975
  if (!streamBody) {
10976
10976
  return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
10977
10977
  }
10978
- const fromContext = context.streamCollector(streamBody);
10978
+ const fromContext = context3.streamCollector(streamBody);
10979
10979
  return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
10980
10980
  };
10981
10981
  }
@@ -11456,16 +11456,16 @@ var init_schemaDeserializationMiddleware = __esm({
11456
11456
  import_protocol_http2 = __toESM(require_dist_cjs2());
11457
11457
  import_util_middleware3 = __toESM(require_dist_cjs7());
11458
11458
  init_NormalizedSchema();
11459
- schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
11459
+ schemaDeserializationMiddleware = (config) => (next, context3) => async (args) => {
11460
11460
  const { response } = await next(args);
11461
- let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context);
11461
+ let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context3);
11462
11462
  if (isStaticSchema(operationSchema)) {
11463
11463
  operationSchema = hydrate(operationSchema);
11464
11464
  }
11465
11465
  try {
11466
11466
  const parsed = await config.protocol.deserializeResponse(operationSchema, {
11467
11467
  ...config,
11468
- ...context
11468
+ ...context3
11469
11469
  }, response);
11470
11470
  return {
11471
11471
  response,
@@ -11480,10 +11480,10 @@ var init_schemaDeserializationMiddleware = __esm({
11480
11480
  try {
11481
11481
  error2.message += "\n " + hint;
11482
11482
  } catch (e3) {
11483
- if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
11483
+ if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
11484
11484
  console.warn(hint);
11485
11485
  } else {
11486
- context.logger?.warn?.(hint);
11486
+ context3.logger?.warn?.(hint);
11487
11487
  }
11488
11488
  }
11489
11489
  if (typeof error2.$responseBodyText !== "undefined") {
@@ -11522,15 +11522,15 @@ var init_schemaSerializationMiddleware = __esm({
11522
11522
  "node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
11523
11523
  import_util_middleware4 = __toESM(require_dist_cjs7());
11524
11524
  init_NormalizedSchema();
11525
- schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
11526
- let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context);
11525
+ schemaSerializationMiddleware = (config) => (next, context3) => async (args) => {
11526
+ let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context3);
11527
11527
  if (isStaticSchema(operationSchema)) {
11528
11528
  operationSchema = hydrate(operationSchema);
11529
11529
  }
11530
- const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;
11530
+ const endpoint = context3.endpointV2?.url && config.urlParser ? async () => config.urlParser(context3.endpointV2.url) : config.endpoint;
11531
11531
  const request = await config.protocol.serializeRequest(operationSchema, args.input, {
11532
11532
  ...config,
11533
- ...context,
11533
+ ...context3,
11534
11534
  endpoint
11535
11535
  });
11536
11536
  return next({
@@ -12221,14 +12221,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
12221
12221
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
12222
12222
  var _2, done = false;
12223
12223
  for (var i3 = decorators.length - 1; i3 >= 0; i3--) {
12224
- var context = {};
12225
- for (var p3 in contextIn) context[p3] = p3 === "access" ? {} : contextIn[p3];
12226
- for (var p3 in contextIn.access) context.access[p3] = contextIn.access[p3];
12227
- context.addInitializer = function(f3) {
12224
+ var context3 = {};
12225
+ for (var p3 in contextIn) context3[p3] = p3 === "access" ? {} : contextIn[p3];
12226
+ for (var p3 in contextIn.access) context3.access[p3] = contextIn.access[p3];
12227
+ context3.addInitializer = function(f3) {
12228
12228
  if (done) throw new TypeError("Cannot add initializers after decoration has completed");
12229
12229
  extraInitializers.push(accept(f3 || null));
12230
12230
  };
12231
- var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
12231
+ var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
12232
12232
  if (kind === "accessor") {
12233
12233
  if (result === void 0) continue;
12234
12234
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
@@ -13366,20 +13366,20 @@ var init_HttpProtocol = __esm({
13366
13366
  getDefaultContentType() {
13367
13367
  throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
13368
13368
  }
13369
- async deserializeHttpMessage(schema, context, response, arg4, arg5) {
13369
+ async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
13370
13370
  void schema;
13371
- void context;
13371
+ void context3;
13372
13372
  void response;
13373
13373
  void arg4;
13374
13374
  void arg5;
13375
13375
  return [];
13376
13376
  }
13377
13377
  getEventStreamMarshaller() {
13378
- const context = this.serdeContext;
13379
- if (!context.eventStreamMarshaller) {
13378
+ const context3 = this.serdeContext;
13379
+ if (!context3.eventStreamMarshaller) {
13380
13380
  throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
13381
13381
  }
13382
- return context.eventStreamMarshaller;
13382
+ return context3.eventStreamMarshaller;
13383
13383
  }
13384
13384
  };
13385
13385
  }
@@ -13397,14 +13397,14 @@ var init_HttpBindingProtocol = __esm({
13397
13397
  init_extended_encode_uri_component();
13398
13398
  init_HttpProtocol();
13399
13399
  HttpBindingProtocol = class extends HttpProtocol {
13400
- async serializeRequest(operationSchema, _input, context) {
13400
+ async serializeRequest(operationSchema, _input, context3) {
13401
13401
  const input = {
13402
13402
  ..._input ?? {}
13403
13403
  };
13404
13404
  const serializer = this.serializer;
13405
13405
  const query2 = {};
13406
13406
  const headers = {};
13407
- const endpoint = await context.endpoint();
13407
+ const endpoint = await context3.endpoint();
13408
13408
  const ns = NormalizedSchema.of(operationSchema?.input);
13409
13409
  const schema = ns.getSchema();
13410
13410
  let hasNonHttpBindingMember = false;
@@ -13529,16 +13529,16 @@ var init_HttpBindingProtocol = __esm({
13529
13529
  query2[traits.httpQuery] = serializer.flush();
13530
13530
  }
13531
13531
  }
13532
- async deserializeResponse(operationSchema, context, response) {
13532
+ async deserializeResponse(operationSchema, context3, response) {
13533
13533
  const deserializer = this.deserializer;
13534
13534
  const ns = NormalizedSchema.of(operationSchema.output);
13535
13535
  const dataObject = {};
13536
13536
  if (response.statusCode >= 300) {
13537
- const bytes = await collectBody(response.body, context);
13537
+ const bytes = await collectBody(response.body, context3);
13538
13538
  if (bytes.byteLength > 0) {
13539
13539
  Object.assign(dataObject, await deserializer.read(15, bytes));
13540
13540
  }
13541
- await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
13541
+ await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
13542
13542
  throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
13543
13543
  }
13544
13544
  for (const header in response.headers) {
@@ -13546,9 +13546,9 @@ var init_HttpBindingProtocol = __esm({
13546
13546
  delete response.headers[header];
13547
13547
  response.headers[header.toLowerCase()] = value;
13548
13548
  }
13549
- const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
13549
+ const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context3, response, dataObject);
13550
13550
  if (nonHttpBindingMembers.length) {
13551
- const bytes = await collectBody(response.body, context);
13551
+ const bytes = await collectBody(response.body, context3);
13552
13552
  if (bytes.byteLength > 0) {
13553
13553
  const dataFromBody = await deserializer.read(ns, bytes);
13554
13554
  for (const member2 of nonHttpBindingMembers) {
@@ -13559,7 +13559,7 @@ var init_HttpBindingProtocol = __esm({
13559
13559
  dataObject.$metadata = this.deserializeMetadata(response);
13560
13560
  return dataObject;
13561
13561
  }
13562
- async deserializeHttpMessage(schema, context, response, arg4, arg5) {
13562
+ async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
13563
13563
  let dataObject;
13564
13564
  if (arg4 instanceof Set) {
13565
13565
  dataObject = arg5;
@@ -13584,7 +13584,7 @@ var init_HttpBindingProtocol = __esm({
13584
13584
  dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
13585
13585
  }
13586
13586
  } else if (response.body) {
13587
- const bytes = await collectBody(response.body, context);
13587
+ const bytes = await collectBody(response.body, context3);
13588
13588
  if (bytes.byteLength > 0) {
13589
13589
  dataObject[memberName] = await deserializer.read(memberSchema, bytes);
13590
13590
  }
@@ -13641,11 +13641,11 @@ var init_RpcProtocol = __esm({
13641
13641
  init_collect_stream_body();
13642
13642
  init_HttpProtocol();
13643
13643
  RpcProtocol = class extends HttpProtocol {
13644
- async serializeRequest(operationSchema, input, context) {
13644
+ async serializeRequest(operationSchema, input, context3) {
13645
13645
  const serializer = this.serializer;
13646
13646
  const query2 = {};
13647
13647
  const headers = {};
13648
- const endpoint = await context.endpoint();
13648
+ const endpoint = await context3.endpoint();
13649
13649
  const ns = NormalizedSchema.of(operationSchema?.input);
13650
13650
  const schema = ns.getSchema();
13651
13651
  let payload2;
@@ -13694,16 +13694,16 @@ var init_RpcProtocol = __esm({
13694
13694
  request.method = "POST";
13695
13695
  return request;
13696
13696
  }
13697
- async deserializeResponse(operationSchema, context, response) {
13697
+ async deserializeResponse(operationSchema, context3, response) {
13698
13698
  const deserializer = this.deserializer;
13699
13699
  const ns = NormalizedSchema.of(operationSchema.output);
13700
13700
  const dataObject = {};
13701
13701
  if (response.statusCode >= 300) {
13702
- const bytes = await collectBody(response.body, context);
13702
+ const bytes = await collectBody(response.body, context3);
13703
13703
  if (bytes.byteLength > 0) {
13704
13704
  Object.assign(dataObject, await deserializer.read(15, bytes));
13705
13705
  }
13706
- await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
13706
+ await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
13707
13707
  throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
13708
13708
  }
13709
13709
  for (const header in response.headers) {
@@ -13719,7 +13719,7 @@ var init_RpcProtocol = __esm({
13719
13719
  initialResponseContainer: dataObject
13720
13720
  });
13721
13721
  } else {
13722
- const bytes = await collectBody(response.body, context);
13722
+ const bytes = await collectBody(response.body, context3);
13723
13723
  if (bytes.byteLength > 0) {
13724
13724
  Object.assign(dataObject, await deserializer.read(ns, bytes));
13725
13725
  }
@@ -13752,8 +13752,8 @@ var init_resolve_path = __esm({
13752
13752
  });
13753
13753
 
13754
13754
  // node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
13755
- function requestBuilder(input, context) {
13756
- return new RequestBuilder(input, context);
13755
+ function requestBuilder(input, context3) {
13756
+ return new RequestBuilder(input, context3);
13757
13757
  }
13758
13758
  var import_protocol_http6, RequestBuilder;
13759
13759
  var init_requestBuilder = __esm({
@@ -13770,9 +13770,9 @@ var init_requestBuilder = __esm({
13770
13770
  body = null;
13771
13771
  hostname = "";
13772
13772
  resolvePathStack = [];
13773
- constructor(input, context) {
13773
+ constructor(input, context3) {
13774
13774
  this.input = input;
13775
- this.context = context;
13775
+ this.context = context3;
13776
13776
  }
13777
13777
  async build() {
13778
13778
  const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
@@ -14141,15 +14141,15 @@ var init_requestBuilder2 = __esm({
14141
14141
  });
14142
14142
 
14143
14143
  // node_modules/@smithy/core/dist-es/setFeature.js
14144
- function setFeature(context, feature, value) {
14145
- if (!context.__smithy_context) {
14146
- context.__smithy_context = {
14144
+ function setFeature(context3, feature, value) {
14145
+ if (!context3.__smithy_context) {
14146
+ context3.__smithy_context = {
14147
14147
  features: {}
14148
14148
  };
14149
- } else if (!context.__smithy_context.features) {
14150
- context.__smithy_context.features = {};
14149
+ } else if (!context3.__smithy_context.features) {
14150
+ context3.__smithy_context.features = {};
14151
14151
  }
14152
- context.__smithy_context.features[feature] = value;
14152
+ context3.__smithy_context.features[feature] = value;
14153
14153
  }
14154
14154
  var init_setFeature = __esm({
14155
14155
  "node_modules/@smithy/core/dist-es/setFeature.js"() {
@@ -15301,15 +15301,15 @@ var init_setCredentialFeature = __esm({
15301
15301
  });
15302
15302
 
15303
15303
  // node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
15304
- function setFeature2(context, feature, value) {
15305
- if (!context.__aws_sdk_context) {
15306
- context.__aws_sdk_context = {
15304
+ function setFeature2(context3, feature, value) {
15305
+ if (!context3.__aws_sdk_context) {
15306
+ context3.__aws_sdk_context = {
15307
15307
  features: {}
15308
15308
  };
15309
- } else if (!context.__aws_sdk_context.features) {
15310
- context.__aws_sdk_context.features = {};
15309
+ } else if (!context3.__aws_sdk_context.features) {
15310
+ context3.__aws_sdk_context.features = {};
15311
15311
  }
15312
- context.__aws_sdk_context.features[feature] = value;
15312
+ context3.__aws_sdk_context.features[feature] = value;
15313
15313
  }
15314
15314
  var init_setFeature2 = __esm({
15315
15315
  "node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
@@ -15410,9 +15410,9 @@ var init_AwsSdkSigV4Signer = __esm({
15410
15410
  return property2;
15411
15411
  };
15412
15412
  validateSigningProperties = async (signingProperties) => {
15413
- const context = throwSigningPropertyError("context", signingProperties.context);
15413
+ const context3 = throwSigningPropertyError("context", signingProperties.context);
15414
15414
  const config = throwSigningPropertyError("config", signingProperties.config);
15415
- const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
15415
+ const authScheme = context3.endpointV2?.properties?.authSchemes?.[0];
15416
15416
  const signerFunction = throwSigningPropertyError("signer", config.signer);
15417
15417
  const signer = await signerFunction(authScheme);
15418
15418
  const signingRegion = signingProperties?.signingRegion;
@@ -17270,8 +17270,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
17270
17270
  getPayloadCodec() {
17271
17271
  return this.codec;
17272
17272
  }
17273
- async serializeRequest(operationSchema, input, context) {
17274
- const request = await super.serializeRequest(operationSchema, input, context);
17273
+ async serializeRequest(operationSchema, input, context3) {
17274
+ const request = await super.serializeRequest(operationSchema, input, context3);
17275
17275
  Object.assign(request.headers, {
17276
17276
  "content-type": this.getDefaultContentType(),
17277
17277
  "smithy-protocol": "rpc-v2-cbor",
@@ -17290,7 +17290,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
17290
17290
  } catch (e3) {
17291
17291
  }
17292
17292
  }
17293
- const { service, operation } = (0, import_util_middleware5.getSmithyContext)(context);
17293
+ const { service, operation } = (0, import_util_middleware5.getSmithyContext)(context3);
17294
17294
  const path7 = `/service/${service}/operation/${operation}`;
17295
17295
  if (request.path.endsWith("/")) {
17296
17296
  request.path += path7.slice(1);
@@ -17299,10 +17299,10 @@ var init_SmithyRpcV2CborProtocol = __esm({
17299
17299
  }
17300
17300
  return request;
17301
17301
  }
17302
- async deserializeResponse(operationSchema, context, response) {
17303
- return super.deserializeResponse(operationSchema, context, response);
17302
+ async deserializeResponse(operationSchema, context3, response) {
17303
+ return super.deserializeResponse(operationSchema, context3, response);
17304
17304
  }
17305
- async handleError(operationSchema, context, response, dataObject, metadata) {
17305
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
17306
17306
  const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
17307
17307
  let namespace = this.options.defaultNamespace;
17308
17308
  if (errorName.includes("#")) {
@@ -17463,14 +17463,14 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({
17463
17463
  super({ defaultNamespace });
17464
17464
  this.awsQueryCompatible = !!awsQueryCompatible;
17465
17465
  }
17466
- async serializeRequest(operationSchema, input, context) {
17467
- const request = await super.serializeRequest(operationSchema, input, context);
17466
+ async serializeRequest(operationSchema, input, context3) {
17467
+ const request = await super.serializeRequest(operationSchema, input, context3);
17468
17468
  if (this.awsQueryCompatible) {
17469
17469
  request.headers["x-amzn-query-mode"] = "true";
17470
17470
  }
17471
17471
  return request;
17472
17472
  }
17473
- async handleError(operationSchema, context, response, dataObject, metadata) {
17473
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
17474
17474
  if (this.awsQueryCompatible) {
17475
17475
  this.mixin.setQueryCompatError(dataObject, response);
17476
17476
  }
@@ -17570,9 +17570,9 @@ var init_ConfigurableSerdeContext = __esm({
17570
17570
  });
17571
17571
 
17572
17572
  // node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
17573
- function jsonReviver(key, value, context) {
17574
- if (context?.source) {
17575
- const numericString = context.source;
17573
+ function jsonReviver(key, value, context3) {
17574
+ if (context3?.source) {
17575
+ const numericString = context3.source;
17576
17576
  if (typeof value === "number") {
17577
17577
  if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
17578
17578
  const isFractional = numericString.includes(".");
@@ -17835,9 +17835,9 @@ var require_dist_cjs26 = __commonJS({
17835
17835
  identifyOnResolve = toggle;
17836
17836
  return identifyOnResolve;
17837
17837
  },
17838
- resolve: (handler, context) => {
17838
+ resolve: (handler, context3) => {
17839
17839
  for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
17840
- handler = middleware(handler, context);
17840
+ handler = middleware(handler, context3);
17841
17841
  }
17842
17842
  if (identifyOnResolve) {
17843
17843
  console.log(stack.identify());
@@ -18437,7 +18437,7 @@ var init_common2 = __esm({
18437
18437
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
18438
18438
  import_smithy_client = __toESM(require_dist_cjs27());
18439
18439
  import_util_utf86 = __toESM(require_dist_cjs11());
18440
- collectBodyString = (streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
18440
+ collectBodyString = (streamBody, context3) => (0, import_smithy_client.collectBody)(streamBody, context3).then((body) => (context3?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
18441
18441
  }
18442
18442
  });
18443
18443
 
@@ -18446,7 +18446,7 @@ var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
18446
18446
  var init_parseJsonBody = __esm({
18447
18447
  "node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
18448
18448
  init_common2();
18449
- parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
18449
+ parseJsonBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
18450
18450
  if (encoded.length) {
18451
18451
  try {
18452
18452
  return JSON.parse(encoded);
@@ -18461,8 +18461,8 @@ var init_parseJsonBody = __esm({
18461
18461
  }
18462
18462
  return {};
18463
18463
  });
18464
- parseJsonErrorBody = async (errorBody, context) => {
18465
- const value = await parseJsonBody(errorBody, context);
18464
+ parseJsonErrorBody = async (errorBody, context3) => {
18465
+ const value = await parseJsonBody(errorBody, context3);
18466
18466
  value.message = value.message ?? value.Message;
18467
18467
  return value;
18468
18468
  };
@@ -18873,8 +18873,8 @@ var init_AwsJsonRpcProtocol = __esm({
18873
18873
  this.deserializer = this.codec.createDeserializer();
18874
18874
  this.awsQueryCompatible = !!awsQueryCompatible;
18875
18875
  }
18876
- async serializeRequest(operationSchema, input, context) {
18877
- const request = await super.serializeRequest(operationSchema, input, context);
18876
+ async serializeRequest(operationSchema, input, context3) {
18877
+ const request = await super.serializeRequest(operationSchema, input, context3);
18878
18878
  if (!request.path.endsWith("/")) {
18879
18879
  request.path += "/";
18880
18880
  }
@@ -18893,7 +18893,7 @@ var init_AwsJsonRpcProtocol = __esm({
18893
18893
  getPayloadCodec() {
18894
18894
  return this.codec;
18895
18895
  }
18896
- async handleError(operationSchema, context, response, dataObject, metadata) {
18896
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
18897
18897
  if (this.awsQueryCompatible) {
18898
18898
  this.mixin.setQueryCompatError(dataObject, response);
18899
18899
  }
@@ -19012,8 +19012,8 @@ var init_AwsRestJsonProtocol = __esm({
19012
19012
  this.codec.setSerdeContext(serdeContext);
19013
19013
  super.setSerdeContext(serdeContext);
19014
19014
  }
19015
- async serializeRequest(operationSchema, input, context) {
19016
- const request = await super.serializeRequest(operationSchema, input, context);
19015
+ async serializeRequest(operationSchema, input, context3) {
19016
+ const request = await super.serializeRequest(operationSchema, input, context3);
19017
19017
  const inputSchema = NormalizedSchema.of(operationSchema.input);
19018
19018
  if (!request.headers["content-type"]) {
19019
19019
  const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
@@ -19026,14 +19026,14 @@ var init_AwsRestJsonProtocol = __esm({
19026
19026
  }
19027
19027
  return request;
19028
19028
  }
19029
- async handleError(operationSchema, context, response, dataObject, metadata) {
19029
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
19030
19030
  const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
19031
19031
  const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
19032
19032
  const ns = NormalizedSchema.of(errorSchema);
19033
19033
  const message = dataObject.message ?? dataObject.Message ?? "Unknown";
19034
19034
  const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
19035
19035
  const exception = new ErrorCtor(message);
19036
- await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
19036
+ await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
19037
19037
  const output = {};
19038
19038
  for (const [name14, member2] of ns.structIterator()) {
19039
19039
  const target = member2.getMergedTraits().jsonName ?? name14;
@@ -20383,8 +20383,8 @@ var init_AwsQueryProtocol = __esm({
20383
20383
  getPayloadCodec() {
20384
20384
  throw new Error("AWSQuery protocol has no payload codec.");
20385
20385
  }
20386
- async serializeRequest(operationSchema, input, context) {
20387
- const request = await super.serializeRequest(operationSchema, input, context);
20386
+ async serializeRequest(operationSchema, input, context3) {
20387
+ const request = await super.serializeRequest(operationSchema, input, context3);
20388
20388
  if (!request.path.endsWith("/")) {
20389
20389
  request.path += "/";
20390
20390
  }
@@ -20401,16 +20401,16 @@ var init_AwsQueryProtocol = __esm({
20401
20401
  }
20402
20402
  return request;
20403
20403
  }
20404
- async deserializeResponse(operationSchema, context, response) {
20404
+ async deserializeResponse(operationSchema, context3, response) {
20405
20405
  const deserializer = this.deserializer;
20406
20406
  const ns = NormalizedSchema.of(operationSchema.output);
20407
20407
  const dataObject = {};
20408
20408
  if (response.statusCode >= 300) {
20409
- const bytes2 = await collectBody(response.body, context);
20409
+ const bytes2 = await collectBody(response.body, context3);
20410
20410
  if (bytes2.byteLength > 0) {
20411
20411
  Object.assign(dataObject, await deserializer.read(15, bytes2));
20412
20412
  }
20413
- await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
20413
+ await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
20414
20414
  }
20415
20415
  for (const header in response.headers) {
20416
20416
  const value = response.headers[header];
@@ -20419,7 +20419,7 @@ var init_AwsQueryProtocol = __esm({
20419
20419
  }
20420
20420
  const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
20421
20421
  const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
20422
- const bytes = await collectBody(response.body, context);
20422
+ const bytes = await collectBody(response.body, context3);
20423
20423
  if (bytes.byteLength > 0) {
20424
20424
  Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
20425
20425
  }
@@ -20432,7 +20432,7 @@ var init_AwsQueryProtocol = __esm({
20432
20432
  useNestedResult() {
20433
20433
  return true;
20434
20434
  }
20435
- async handleError(operationSchema, context, response, dataObject, metadata) {
20435
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
20436
20436
  const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
20437
20437
  const errorData = this.loadQueryError(dataObject);
20438
20438
  const message = this.loadQueryErrorMessage(dataObject);
@@ -20513,7 +20513,7 @@ var init_parseXmlBody = __esm({
20513
20513
  import_xml_builder2 = __toESM(require_dist_cjs28());
20514
20514
  import_smithy_client5 = __toESM(require_dist_cjs27());
20515
20515
  init_common2();
20516
- parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
20516
+ parseXmlBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
20517
20517
  if (encoded.length) {
20518
20518
  let parsedObj;
20519
20519
  try {
@@ -20537,8 +20537,8 @@ var init_parseXmlBody = __esm({
20537
20537
  }
20538
20538
  return {};
20539
20539
  });
20540
- parseXmlErrorBody = async (errorBody, context) => {
20541
- const value = await parseXmlBody(errorBody, context);
20540
+ parseXmlErrorBody = async (errorBody, context3) => {
20541
+ const value = await parseXmlBody(errorBody, context3);
20542
20542
  if (value.Error) {
20543
20543
  value.Error.message = value.Error.message ?? value.Error.Message;
20544
20544
  }
@@ -20883,8 +20883,8 @@ var init_AwsRestXmlProtocol = __esm({
20883
20883
  getShapeId() {
20884
20884
  return "aws.protocols#restXml";
20885
20885
  }
20886
- async serializeRequest(operationSchema, input, context) {
20887
- const request = await super.serializeRequest(operationSchema, input, context);
20886
+ async serializeRequest(operationSchema, input, context3) {
20887
+ const request = await super.serializeRequest(operationSchema, input, context3);
20888
20888
  const inputSchema = NormalizedSchema.of(operationSchema.input);
20889
20889
  if (!request.headers["content-type"]) {
20890
20890
  const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
@@ -20899,17 +20899,17 @@ var init_AwsRestXmlProtocol = __esm({
20899
20899
  }
20900
20900
  return request;
20901
20901
  }
20902
- async deserializeResponse(operationSchema, context, response) {
20903
- return super.deserializeResponse(operationSchema, context, response);
20902
+ async deserializeResponse(operationSchema, context3, response) {
20903
+ return super.deserializeResponse(operationSchema, context3, response);
20904
20904
  }
20905
- async handleError(operationSchema, context, response, dataObject, metadata) {
20905
+ async handleError(operationSchema, context3, response, dataObject, metadata) {
20906
20906
  const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
20907
20907
  const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
20908
20908
  const ns = NormalizedSchema.of(errorSchema);
20909
20909
  const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
20910
20910
  const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
20911
20911
  const exception = new ErrorCtor(message);
20912
- await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
20912
+ await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
20913
20913
  const output = {};
20914
20914
  for (const [name14, member2] of ns.structIterator()) {
20915
20915
  const target = member2.getMergedTraits().xmlName ?? name14;
@@ -21038,48 +21038,48 @@ var require_dist_cjs29 = __commonJS({
21038
21038
  });
21039
21039
  }
21040
21040
  var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
21041
- async function checkFeatures(context, config, args) {
21041
+ async function checkFeatures(context3, config, args) {
21042
21042
  const request = args.request;
21043
21043
  if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
21044
- core$1.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
21044
+ core$1.setFeature(context3, "PROTOCOL_RPC_V2_CBOR", "M");
21045
21045
  }
21046
21046
  if (typeof config.retryStrategy === "function") {
21047
21047
  const retryStrategy = await config.retryStrategy();
21048
21048
  if (typeof retryStrategy.acquireInitialRetryToken === "function") {
21049
21049
  if (retryStrategy.constructor?.name?.includes("Adaptive")) {
21050
- core$1.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
21050
+ core$1.setFeature(context3, "RETRY_MODE_ADAPTIVE", "F");
21051
21051
  } else {
21052
- core$1.setFeature(context, "RETRY_MODE_STANDARD", "E");
21052
+ core$1.setFeature(context3, "RETRY_MODE_STANDARD", "E");
21053
21053
  }
21054
21054
  } else {
21055
- core$1.setFeature(context, "RETRY_MODE_LEGACY", "D");
21055
+ core$1.setFeature(context3, "RETRY_MODE_LEGACY", "D");
21056
21056
  }
21057
21057
  }
21058
21058
  if (typeof config.accountIdEndpointMode === "function") {
21059
- const endpointV2 = context.endpointV2;
21059
+ const endpointV2 = context3.endpointV2;
21060
21060
  if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
21061
- core$1.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
21061
+ core$1.setFeature(context3, "ACCOUNT_ID_ENDPOINT", "O");
21062
21062
  }
21063
21063
  switch (await config.accountIdEndpointMode?.()) {
21064
21064
  case "disabled":
21065
- core$1.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
21065
+ core$1.setFeature(context3, "ACCOUNT_ID_MODE_DISABLED", "Q");
21066
21066
  break;
21067
21067
  case "preferred":
21068
- core$1.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
21068
+ core$1.setFeature(context3, "ACCOUNT_ID_MODE_PREFERRED", "P");
21069
21069
  break;
21070
21070
  case "required":
21071
- core$1.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
21071
+ core$1.setFeature(context3, "ACCOUNT_ID_MODE_REQUIRED", "R");
21072
21072
  break;
21073
21073
  }
21074
21074
  }
21075
- const identity2 = context.__smithy_context?.selectedHttpAuthScheme?.identity;
21075
+ const identity2 = context3.__smithy_context?.selectedHttpAuthScheme?.identity;
21076
21076
  if (identity2?.$source) {
21077
21077
  const credentials = identity2;
21078
21078
  if (credentials.accountId) {
21079
- core$1.setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
21079
+ core$1.setFeature(context3, "RESOLVED_ACCOUNT_ID", "T");
21080
21080
  }
21081
21081
  for (const [key, value] of Object.entries(credentials.$source ?? {})) {
21082
- core$1.setFeature(context, key, value);
21082
+ core$1.setFeature(context3, key, value);
21083
21083
  }
21084
21084
  }
21085
21085
  }
@@ -21107,17 +21107,17 @@ var require_dist_cjs29 = __commonJS({
21107
21107
  }
21108
21108
  return buffer;
21109
21109
  }
21110
- var userAgentMiddleware = (options) => (next, context) => async (args) => {
21110
+ var userAgentMiddleware = (options) => (next, context3) => async (args) => {
21111
21111
  const { request } = args;
21112
21112
  if (!protocolHttp.HttpRequest.isInstance(request)) {
21113
21113
  return next(args);
21114
21114
  }
21115
21115
  const { headers } = request;
21116
- const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
21116
+ const userAgent = context3?.userAgent?.map(escapeUserAgent) || [];
21117
21117
  const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
21118
- await checkFeatures(context, options, args);
21119
- const awsContext = context;
21120
- defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
21118
+ await checkFeatures(context3, options, args);
21119
+ const awsContext = context3;
21120
+ defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context3.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
21121
21121
  const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
21122
21122
  const appId = await options.userAgentAppId();
21123
21123
  if (appId) {
@@ -22449,7 +22449,7 @@ var require_dist_cjs37 = __commonJS({
22449
22449
  this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
22450
22450
  this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
22451
22451
  }
22452
- async handle(next, args, context = {}) {
22452
+ async handle(next, args, context3 = {}) {
22453
22453
  const request = args.request;
22454
22454
  const { body: payload2, headers, query: query2 } = request;
22455
22455
  if (!(payload2 instanceof ReadableStream)) {
@@ -23433,7 +23433,7 @@ var require_dist_cjs44 = __commonJS({
23433
23433
  }
23434
23434
  return urlParser.parseUrl(endpoint);
23435
23435
  };
23436
- var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
23436
+ var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context3) => {
23437
23437
  if (!clientConfig.isCustomEndpoint) {
23438
23438
  let endpointFromConfig;
23439
23439
  if (clientConfig.serviceConfiguredEndpoint) {
@@ -23450,7 +23450,7 @@ var require_dist_cjs44 = __commonJS({
23450
23450
  if (typeof clientConfig.endpointProvider !== "function") {
23451
23451
  throw new Error("config.endpointProvider is not set.");
23452
23452
  }
23453
- const endpoint = clientConfig.endpointProvider(endpointParams, context);
23453
+ const endpoint = clientConfig.endpointProvider(endpointParams, context3);
23454
23454
  return endpoint;
23455
23455
  };
23456
23456
  var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
@@ -23484,22 +23484,22 @@ var require_dist_cjs44 = __commonJS({
23484
23484
  return endpointParams;
23485
23485
  };
23486
23486
  var endpointMiddleware = ({ config, instructions }) => {
23487
- return (next, context) => async (args) => {
23487
+ return (next, context3) => async (args) => {
23488
23488
  if (config.isCustomEndpoint) {
23489
- core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
23489
+ core.setFeature(context3, "ENDPOINT_OVERRIDE", "N");
23490
23490
  }
23491
23491
  const endpoint = await getEndpointFromInstructions(args.input, {
23492
23492
  getEndpointParameterInstructions() {
23493
23493
  return instructions;
23494
23494
  }
23495
- }, { ...config }, context);
23496
- context.endpointV2 = endpoint;
23497
- context.authSchemes = endpoint.properties?.authSchemes;
23498
- const authScheme = context.authSchemes?.[0];
23495
+ }, { ...config }, context3);
23496
+ context3.endpointV2 = endpoint;
23497
+ context3.authSchemes = endpoint.properties?.authSchemes;
23498
+ const authScheme = context3.authSchemes?.[0];
23499
23499
  if (authScheme) {
23500
- context["signing_region"] = authScheme.signingRegion;
23501
- context["signing_service"] = authScheme.signingName;
23502
- const smithyContext = utilMiddleware.getSmithyContext(context);
23500
+ context3["signing_region"] = authScheme.signingRegion;
23501
+ context3["signing_service"] = authScheme.signingName;
23502
+ const smithyContext = utilMiddleware.getSmithyContext(context3);
23503
23503
  const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
23504
23504
  if (httpAuthOption) {
23505
23505
  httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
@@ -24148,12 +24148,12 @@ var require_dist_cjs47 = __commonJS({
24148
24148
  clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
24149
24149
  }
24150
24150
  });
24151
- var retryMiddleware = (options) => (next, context) => async (args) => {
24151
+ var retryMiddleware = (options) => (next, context3) => async (args) => {
24152
24152
  let retryStrategy = await options.retryStrategy();
24153
24153
  const maxAttempts = await options.maxAttempts();
24154
24154
  if (isRetryStrategyV2(retryStrategy)) {
24155
24155
  retryStrategy = retryStrategy;
24156
- let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
24156
+ let retryToken = await retryStrategy.acquireInitialRetryToken(context3["partition_id"]);
24157
24157
  let lastError = new Error();
24158
24158
  let attempts = 0;
24159
24159
  let totalRetryDelay = 0;
@@ -24176,7 +24176,7 @@ var require_dist_cjs47 = __commonJS({
24176
24176
  const retryErrorInfo = getRetryErrorInfo(e3);
24177
24177
  lastError = asSdkError(e3);
24178
24178
  if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
24179
- (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
24179
+ (context3.logger instanceof smithyClient.NoOpLogger ? console : context3.logger)?.warn("An error was encountered in a non-retryable streaming request.");
24180
24180
  throw lastError;
24181
24181
  }
24182
24182
  try {
@@ -24198,7 +24198,7 @@ var require_dist_cjs47 = __commonJS({
24198
24198
  } else {
24199
24199
  retryStrategy = retryStrategy;
24200
24200
  if (retryStrategy?.mode)
24201
- context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
24201
+ context3.userAgent = [...context3.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
24202
24202
  return retryStrategy.retry(next, args);
24203
24203
  }
24204
24204
  };
@@ -24278,9 +24278,9 @@ var require_httpAuthSchemeProvider = __commonJS({
24278
24278
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
24279
24279
  var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
24280
24280
  var util_middleware_1 = require_dist_cjs7();
24281
- var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
24281
+ var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context3, input) => {
24282
24282
  return {
24283
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
24283
+ operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
24284
24284
  region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
24285
24285
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
24286
24286
  })()
@@ -24294,10 +24294,10 @@ var require_httpAuthSchemeProvider = __commonJS({
24294
24294
  name: "bedrock",
24295
24295
  region: authParameters.region
24296
24296
  },
24297
- propertiesExtractor: (config, context) => ({
24297
+ propertiesExtractor: (config, context3) => ({
24298
24298
  signingProperties: {
24299
24299
  config,
24300
- context
24300
+ context: context3
24301
24301
  }
24302
24302
  })
24303
24303
  };
@@ -24305,7 +24305,7 @@ var require_httpAuthSchemeProvider = __commonJS({
24305
24305
  function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
24306
24306
  return {
24307
24307
  schemeId: "smithy.api#httpBearerAuth",
24308
- propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({
24308
+ propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context3) => ({
24309
24309
  identityProperties: {
24310
24310
  profile,
24311
24311
  filepath,
@@ -25051,10 +25051,10 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
25051
25051
  name: "sso-oauth",
25052
25052
  region: authParameters.region
25053
25053
  },
25054
- propertiesExtractor: (config, context) => ({
25054
+ propertiesExtractor: (config, context3) => ({
25055
25055
  signingProperties: {
25056
25056
  config,
25057
- context
25057
+ context: context3
25058
25058
  }
25059
25059
  })
25060
25060
  };
@@ -25069,9 +25069,9 @@ var init_httpAuthSchemeProvider = __esm({
25069
25069
  "node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
25070
25070
  init_dist_es2();
25071
25071
  import_util_middleware6 = __toESM(require_dist_cjs7());
25072
- defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
25072
+ defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context3, input) => {
25073
25073
  return {
25074
- operation: (0, import_util_middleware6.getSmithyContext)(context).operation,
25074
+ operation: (0, import_util_middleware6.getSmithyContext)(context3).operation,
25075
25075
  region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => {
25076
25076
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
25077
25077
  })()
@@ -25417,10 +25417,10 @@ var init_endpointResolver = __esm({
25417
25417
  size: 50,
25418
25418
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
25419
25419
  });
25420
- defaultEndpointResolver = (endpointParams, context = {}) => {
25420
+ defaultEndpointResolver = (endpointParams, context3 = {}) => {
25421
25421
  return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, {
25422
25422
  endpointParams,
25423
- logger: context.logger
25423
+ logger: context3.logger
25424
25424
  }));
25425
25425
  };
25426
25426
  import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions;
@@ -26030,8 +26030,8 @@ var init_Aws_restJson1 = __esm({
26030
26030
  import_smithy_client14 = __toESM(require_dist_cjs27());
26031
26031
  init_models_0();
26032
26032
  init_SSOOIDCServiceException();
26033
- se_CreateTokenCommand = async (input, context) => {
26034
- const b3 = requestBuilder(input, context);
26033
+ se_CreateTokenCommand = async (input, context3) => {
26034
+ const b3 = requestBuilder(input, context3);
26035
26035
  const headers = {
26036
26036
  "content-type": "application/json"
26037
26037
  };
@@ -26051,14 +26051,14 @@ var init_Aws_restJson1 = __esm({
26051
26051
  b3.m("POST").h(headers).b(body);
26052
26052
  return b3.build();
26053
26053
  };
26054
- de_CreateTokenCommand = async (output, context) => {
26054
+ de_CreateTokenCommand = async (output, context3) => {
26055
26055
  if (output.statusCode !== 200 && output.statusCode >= 300) {
26056
- return de_CommandError(output, context);
26056
+ return de_CommandError(output, context3);
26057
26057
  }
26058
26058
  const contents = (0, import_smithy_client14.map)({
26059
26059
  $metadata: deserializeMetadata(output)
26060
26060
  });
26061
- const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context)), "body");
26061
+ const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context3)), "body");
26062
26062
  const doc = (0, import_smithy_client14.take)(data2, {
26063
26063
  accessToken: import_smithy_client14.expectString,
26064
26064
  expiresIn: import_smithy_client14.expectInt32,
@@ -26069,46 +26069,46 @@ var init_Aws_restJson1 = __esm({
26069
26069
  Object.assign(contents, doc);
26070
26070
  return contents;
26071
26071
  };
26072
- de_CommandError = async (output, context) => {
26072
+ de_CommandError = async (output, context3) => {
26073
26073
  const parsedOutput = {
26074
26074
  ...output,
26075
- body: await parseJsonErrorBody(output.body, context)
26075
+ body: await parseJsonErrorBody(output.body, context3)
26076
26076
  };
26077
26077
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
26078
26078
  switch (errorCode) {
26079
26079
  case "AccessDeniedException":
26080
26080
  case "com.amazonaws.ssooidc#AccessDeniedException":
26081
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
26081
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context3);
26082
26082
  case "AuthorizationPendingException":
26083
26083
  case "com.amazonaws.ssooidc#AuthorizationPendingException":
26084
- throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
26084
+ throw await de_AuthorizationPendingExceptionRes(parsedOutput, context3);
26085
26085
  case "ExpiredTokenException":
26086
26086
  case "com.amazonaws.ssooidc#ExpiredTokenException":
26087
- throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
26087
+ throw await de_ExpiredTokenExceptionRes(parsedOutput, context3);
26088
26088
  case "InternalServerException":
26089
26089
  case "com.amazonaws.ssooidc#InternalServerException":
26090
- throw await de_InternalServerExceptionRes(parsedOutput, context);
26090
+ throw await de_InternalServerExceptionRes(parsedOutput, context3);
26091
26091
  case "InvalidClientException":
26092
26092
  case "com.amazonaws.ssooidc#InvalidClientException":
26093
- throw await de_InvalidClientExceptionRes(parsedOutput, context);
26093
+ throw await de_InvalidClientExceptionRes(parsedOutput, context3);
26094
26094
  case "InvalidGrantException":
26095
26095
  case "com.amazonaws.ssooidc#InvalidGrantException":
26096
- throw await de_InvalidGrantExceptionRes(parsedOutput, context);
26096
+ throw await de_InvalidGrantExceptionRes(parsedOutput, context3);
26097
26097
  case "InvalidRequestException":
26098
26098
  case "com.amazonaws.ssooidc#InvalidRequestException":
26099
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
26099
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context3);
26100
26100
  case "InvalidScopeException":
26101
26101
  case "com.amazonaws.ssooidc#InvalidScopeException":
26102
- throw await de_InvalidScopeExceptionRes(parsedOutput, context);
26102
+ throw await de_InvalidScopeExceptionRes(parsedOutput, context3);
26103
26103
  case "SlowDownException":
26104
26104
  case "com.amazonaws.ssooidc#SlowDownException":
26105
- throw await de_SlowDownExceptionRes(parsedOutput, context);
26105
+ throw await de_SlowDownExceptionRes(parsedOutput, context3);
26106
26106
  case "UnauthorizedClientException":
26107
26107
  case "com.amazonaws.ssooidc#UnauthorizedClientException":
26108
- throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
26108
+ throw await de_UnauthorizedClientExceptionRes(parsedOutput, context3);
26109
26109
  case "UnsupportedGrantTypeException":
26110
26110
  case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
26111
- throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
26111
+ throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context3);
26112
26112
  default:
26113
26113
  const parsedBody = parsedOutput.body;
26114
26114
  return throwDefaultError({
@@ -26119,7 +26119,7 @@ var init_Aws_restJson1 = __esm({
26119
26119
  }
26120
26120
  };
26121
26121
  throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException);
26122
- de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
26122
+ de_AccessDeniedExceptionRes = async (parsedOutput, context3) => {
26123
26123
  const contents = (0, import_smithy_client14.map)({});
26124
26124
  const data2 = parsedOutput.body;
26125
26125
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26134,7 +26134,7 @@ var init_Aws_restJson1 = __esm({
26134
26134
  });
26135
26135
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26136
26136
  };
26137
- de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
26137
+ de_AuthorizationPendingExceptionRes = async (parsedOutput, context3) => {
26138
26138
  const contents = (0, import_smithy_client14.map)({});
26139
26139
  const data2 = parsedOutput.body;
26140
26140
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26148,7 +26148,7 @@ var init_Aws_restJson1 = __esm({
26148
26148
  });
26149
26149
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26150
26150
  };
26151
- de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
26151
+ de_ExpiredTokenExceptionRes = async (parsedOutput, context3) => {
26152
26152
  const contents = (0, import_smithy_client14.map)({});
26153
26153
  const data2 = parsedOutput.body;
26154
26154
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26162,7 +26162,7 @@ var init_Aws_restJson1 = __esm({
26162
26162
  });
26163
26163
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26164
26164
  };
26165
- de_InternalServerExceptionRes = async (parsedOutput, context) => {
26165
+ de_InternalServerExceptionRes = async (parsedOutput, context3) => {
26166
26166
  const contents = (0, import_smithy_client14.map)({});
26167
26167
  const data2 = parsedOutput.body;
26168
26168
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26176,7 +26176,7 @@ var init_Aws_restJson1 = __esm({
26176
26176
  });
26177
26177
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26178
26178
  };
26179
- de_InvalidClientExceptionRes = async (parsedOutput, context) => {
26179
+ de_InvalidClientExceptionRes = async (parsedOutput, context3) => {
26180
26180
  const contents = (0, import_smithy_client14.map)({});
26181
26181
  const data2 = parsedOutput.body;
26182
26182
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26190,7 +26190,7 @@ var init_Aws_restJson1 = __esm({
26190
26190
  });
26191
26191
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26192
26192
  };
26193
- de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
26193
+ de_InvalidGrantExceptionRes = async (parsedOutput, context3) => {
26194
26194
  const contents = (0, import_smithy_client14.map)({});
26195
26195
  const data2 = parsedOutput.body;
26196
26196
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26204,7 +26204,7 @@ var init_Aws_restJson1 = __esm({
26204
26204
  });
26205
26205
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26206
26206
  };
26207
- de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
26207
+ de_InvalidRequestExceptionRes = async (parsedOutput, context3) => {
26208
26208
  const contents = (0, import_smithy_client14.map)({});
26209
26209
  const data2 = parsedOutput.body;
26210
26210
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26219,7 +26219,7 @@ var init_Aws_restJson1 = __esm({
26219
26219
  });
26220
26220
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26221
26221
  };
26222
- de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
26222
+ de_InvalidScopeExceptionRes = async (parsedOutput, context3) => {
26223
26223
  const contents = (0, import_smithy_client14.map)({});
26224
26224
  const data2 = parsedOutput.body;
26225
26225
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26233,7 +26233,7 @@ var init_Aws_restJson1 = __esm({
26233
26233
  });
26234
26234
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26235
26235
  };
26236
- de_SlowDownExceptionRes = async (parsedOutput, context) => {
26236
+ de_SlowDownExceptionRes = async (parsedOutput, context3) => {
26237
26237
  const contents = (0, import_smithy_client14.map)({});
26238
26238
  const data2 = parsedOutput.body;
26239
26239
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26247,7 +26247,7 @@ var init_Aws_restJson1 = __esm({
26247
26247
  });
26248
26248
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26249
26249
  };
26250
- de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
26250
+ de_UnauthorizedClientExceptionRes = async (parsedOutput, context3) => {
26251
26251
  const contents = (0, import_smithy_client14.map)({});
26252
26252
  const data2 = parsedOutput.body;
26253
26253
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26261,7 +26261,7 @@ var init_Aws_restJson1 = __esm({
26261
26261
  });
26262
26262
  return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
26263
26263
  };
26264
- de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
26264
+ de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context3) => {
26265
26265
  const contents = (0, import_smithy_client14.map)({});
26266
26266
  const data2 = parsedOutput.body;
26267
26267
  const doc = (0, import_smithy_client14.take)(data2, {
@@ -26529,9 +26529,9 @@ var require_httpAuthSchemeProvider2 = __commonJS({
26529
26529
  exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0;
26530
26530
  var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
26531
26531
  var util_middleware_1 = require_dist_cjs7();
26532
- var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
26532
+ var defaultSSOHttpAuthSchemeParametersProvider = async (config, context3, input) => {
26533
26533
  return {
26534
- operation: (0, util_middleware_1.getSmithyContext)(context).operation,
26534
+ operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
26535
26535
  region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
26536
26536
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
26537
26537
  })()
@@ -26545,10 +26545,10 @@ var require_httpAuthSchemeProvider2 = __commonJS({
26545
26545
  name: "awsssoportal",
26546
26546
  region: authParameters.region
26547
26547
  },
26548
- propertiesExtractor: (config, context) => ({
26548
+ propertiesExtractor: (config, context3) => ({
26549
26549
  signingProperties: {
26550
26550
  config,
26551
- context
26551
+ context: context3
26552
26552
  }
26553
26553
  })
26554
26554
  };
@@ -26746,10 +26746,10 @@ var require_endpointResolver = __commonJS({
26746
26746
  size: 50,
26747
26747
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
26748
26748
  });
26749
- var defaultEndpointResolver3 = (endpointParams, context = {}) => {
26749
+ var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
26750
26750
  return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
26751
26751
  endpointParams,
26752
- logger: context.logger
26752
+ logger: context3.logger
26753
26753
  }));
26754
26754
  };
26755
26755
  exports2.defaultEndpointResolver = defaultEndpointResolver3;
@@ -27047,8 +27047,8 @@ var require_dist_cjs57 = __commonJS({
27047
27047
  ...obj,
27048
27048
  ...obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }
27049
27049
  });
27050
- var se_GetRoleCredentialsCommand = async (input, context) => {
27051
- const b3 = core.requestBuilder(input, context);
27050
+ var se_GetRoleCredentialsCommand = async (input, context3) => {
27051
+ const b3 = core.requestBuilder(input, context3);
27052
27052
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
27053
27053
  [_xasbt]: input[_aT]
27054
27054
  });
@@ -27061,8 +27061,8 @@ var require_dist_cjs57 = __commonJS({
27061
27061
  b3.m("GET").h(headers).q(query2).b(body);
27062
27062
  return b3.build();
27063
27063
  };
27064
- var se_ListAccountRolesCommand = async (input, context) => {
27065
- const b3 = core.requestBuilder(input, context);
27064
+ var se_ListAccountRolesCommand = async (input, context3) => {
27065
+ const b3 = core.requestBuilder(input, context3);
27066
27066
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
27067
27067
  [_xasbt]: input[_aT]
27068
27068
  });
@@ -27076,8 +27076,8 @@ var require_dist_cjs57 = __commonJS({
27076
27076
  b3.m("GET").h(headers).q(query2).b(body);
27077
27077
  return b3.build();
27078
27078
  };
27079
- var se_ListAccountsCommand = async (input, context) => {
27080
- const b3 = core.requestBuilder(input, context);
27079
+ var se_ListAccountsCommand = async (input, context3) => {
27080
+ const b3 = core.requestBuilder(input, context3);
27081
27081
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
27082
27082
  [_xasbt]: input[_aT]
27083
27083
  });
@@ -27090,8 +27090,8 @@ var require_dist_cjs57 = __commonJS({
27090
27090
  b3.m("GET").h(headers).q(query2).b(body);
27091
27091
  return b3.build();
27092
27092
  };
27093
- var se_LogoutCommand = async (input, context) => {
27094
- const b3 = core.requestBuilder(input, context);
27093
+ var se_LogoutCommand = async (input, context3) => {
27094
+ const b3 = core.requestBuilder(input, context3);
27095
27095
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
27096
27096
  [_xasbt]: input[_aT]
27097
27097
  });
@@ -27100,28 +27100,28 @@ var require_dist_cjs57 = __commonJS({
27100
27100
  b3.m("POST").h(headers).b(body);
27101
27101
  return b3.build();
27102
27102
  };
27103
- var de_GetRoleCredentialsCommand = async (output, context) => {
27103
+ var de_GetRoleCredentialsCommand = async (output, context3) => {
27104
27104
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27105
- return de_CommandError3(output, context);
27105
+ return de_CommandError3(output, context3);
27106
27106
  }
27107
27107
  const contents = smithyClient.map({
27108
27108
  $metadata: deserializeMetadata3(output)
27109
27109
  });
27110
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
27110
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
27111
27111
  const doc = smithyClient.take(data2, {
27112
27112
  roleCredentials: smithyClient._json
27113
27113
  });
27114
27114
  Object.assign(contents, doc);
27115
27115
  return contents;
27116
27116
  };
27117
- var de_ListAccountRolesCommand = async (output, context) => {
27117
+ var de_ListAccountRolesCommand = async (output, context3) => {
27118
27118
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27119
- return de_CommandError3(output, context);
27119
+ return de_CommandError3(output, context3);
27120
27120
  }
27121
27121
  const contents = smithyClient.map({
27122
27122
  $metadata: deserializeMetadata3(output)
27123
27123
  });
27124
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
27124
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
27125
27125
  const doc = smithyClient.take(data2, {
27126
27126
  nextToken: smithyClient.expectString,
27127
27127
  roleList: smithyClient._json
@@ -27129,14 +27129,14 @@ var require_dist_cjs57 = __commonJS({
27129
27129
  Object.assign(contents, doc);
27130
27130
  return contents;
27131
27131
  };
27132
- var de_ListAccountsCommand = async (output, context) => {
27132
+ var de_ListAccountsCommand = async (output, context3) => {
27133
27133
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27134
- return de_CommandError3(output, context);
27134
+ return de_CommandError3(output, context3);
27135
27135
  }
27136
27136
  const contents = smithyClient.map({
27137
27137
  $metadata: deserializeMetadata3(output)
27138
27138
  });
27139
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
27139
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
27140
27140
  const doc = smithyClient.take(data2, {
27141
27141
  accountList: smithyClient._json,
27142
27142
  nextToken: smithyClient.expectString
@@ -27144,20 +27144,20 @@ var require_dist_cjs57 = __commonJS({
27144
27144
  Object.assign(contents, doc);
27145
27145
  return contents;
27146
27146
  };
27147
- var de_LogoutCommand = async (output, context) => {
27147
+ var de_LogoutCommand = async (output, context3) => {
27148
27148
  if (output.statusCode !== 200 && output.statusCode >= 300) {
27149
- return de_CommandError3(output, context);
27149
+ return de_CommandError3(output, context3);
27150
27150
  }
27151
27151
  const contents = smithyClient.map({
27152
27152
  $metadata: deserializeMetadata3(output)
27153
27153
  });
27154
- await smithyClient.collectBody(output.body, context);
27154
+ await smithyClient.collectBody(output.body, context3);
27155
27155
  return contents;
27156
27156
  };
27157
- var de_CommandError3 = async (output, context) => {
27157
+ var de_CommandError3 = async (output, context3) => {
27158
27158
  const parsedOutput = {
27159
27159
  ...output,
27160
- body: await core$1.parseJsonErrorBody(output.body, context)
27160
+ body: await core$1.parseJsonErrorBody(output.body, context3)
27161
27161
  };
27162
27162
  const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
27163
27163
  switch (errorCode) {
@@ -27183,7 +27183,7 @@ var require_dist_cjs57 = __commonJS({
27183
27183
  }
27184
27184
  };
27185
27185
  var throwDefaultError3 = smithyClient.withBaseException(SSOServiceException);
27186
- var de_InvalidRequestExceptionRes2 = async (parsedOutput, context) => {
27186
+ var de_InvalidRequestExceptionRes2 = async (parsedOutput, context3) => {
27187
27187
  const contents = smithyClient.map({});
27188
27188
  const data2 = parsedOutput.body;
27189
27189
  const doc = smithyClient.take(data2, {
@@ -27196,7 +27196,7 @@ var require_dist_cjs57 = __commonJS({
27196
27196
  });
27197
27197
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
27198
27198
  };
27199
- var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
27199
+ var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
27200
27200
  const contents = smithyClient.map({});
27201
27201
  const data2 = parsedOutput.body;
27202
27202
  const doc = smithyClient.take(data2, {
@@ -27209,7 +27209,7 @@ var require_dist_cjs57 = __commonJS({
27209
27209
  });
27210
27210
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
27211
27211
  };
27212
- var de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
27212
+ var de_TooManyRequestsExceptionRes = async (parsedOutput, context3) => {
27213
27213
  const contents = smithyClient.map({});
27214
27214
  const data2 = parsedOutput.body;
27215
27215
  const doc = smithyClient.take(data2, {
@@ -27222,7 +27222,7 @@ var require_dist_cjs57 = __commonJS({
27222
27222
  });
27223
27223
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
27224
27224
  };
27225
- var de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
27225
+ var de_UnauthorizedExceptionRes = async (parsedOutput, context3) => {
27226
27226
  const contents = smithyClient.map({});
27227
27227
  const data2 = parsedOutput.body;
27228
27228
  const doc = smithyClient.take(data2, {
@@ -27529,10 +27529,10 @@ function createAwsAuthSigv4HttpAuthOption2(authParameters) {
27529
27529
  name: "sts",
27530
27530
  region: authParameters.region
27531
27531
  },
27532
- propertiesExtractor: (config, context) => ({
27532
+ propertiesExtractor: (config, context3) => ({
27533
27533
  signingProperties: {
27534
27534
  config,
27535
- context
27535
+ context: context3
27536
27536
  }
27537
27537
  })
27538
27538
  };
@@ -27548,9 +27548,9 @@ var init_httpAuthSchemeProvider2 = __esm({
27548
27548
  init_dist_es2();
27549
27549
  import_util_middleware7 = __toESM(require_dist_cjs7());
27550
27550
  init_STSClient();
27551
- defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
27551
+ defaultSTSHttpAuthSchemeParametersProvider = async (config, context3, input) => {
27552
27552
  return {
27553
- operation: (0, import_util_middleware7.getSmithyContext)(context).operation,
27553
+ operation: (0, import_util_middleware7.getSmithyContext)(context3).operation,
27554
27554
  region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
27555
27555
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
27556
27556
  })()
@@ -27660,10 +27660,10 @@ var init_endpointResolver2 = __esm({
27660
27660
  size: 50,
27661
27661
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
27662
27662
  });
27663
- defaultEndpointResolver2 = (endpointParams, context = {}) => {
27663
+ defaultEndpointResolver2 = (endpointParams, context3 = {}) => {
27664
27664
  return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, {
27665
27665
  endpointParams,
27666
- logger: context.logger
27666
+ logger: context3.logger
27667
27667
  }));
27668
27668
  };
27669
27669
  import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions;
@@ -28025,80 +28025,80 @@ var init_Aws_query = __esm({
28025
28025
  import_smithy_client24 = __toESM(require_dist_cjs27());
28026
28026
  init_models_02();
28027
28027
  init_STSServiceException();
28028
- se_AssumeRoleCommand = async (input, context) => {
28028
+ se_AssumeRoleCommand = async (input, context3) => {
28029
28029
  const headers = SHARED_HEADERS;
28030
28030
  let body;
28031
28031
  body = buildFormUrlencodedString({
28032
- ...se_AssumeRoleRequest(input, context),
28032
+ ...se_AssumeRoleRequest(input, context3),
28033
28033
  [_A]: _AR,
28034
28034
  [_V]: _
28035
28035
  });
28036
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
28036
+ return buildHttpRpcRequest(context3, headers, "/", void 0, body);
28037
28037
  };
28038
- se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
28038
+ se_AssumeRoleWithWebIdentityCommand = async (input, context3) => {
28039
28039
  const headers = SHARED_HEADERS;
28040
28040
  let body;
28041
28041
  body = buildFormUrlencodedString({
28042
- ...se_AssumeRoleWithWebIdentityRequest(input, context),
28042
+ ...se_AssumeRoleWithWebIdentityRequest(input, context3),
28043
28043
  [_A]: _ARWWI,
28044
28044
  [_V]: _
28045
28045
  });
28046
- return buildHttpRpcRequest(context, headers, "/", void 0, body);
28046
+ return buildHttpRpcRequest(context3, headers, "/", void 0, body);
28047
28047
  };
28048
- de_AssumeRoleCommand = async (output, context) => {
28048
+ de_AssumeRoleCommand = async (output, context3) => {
28049
28049
  if (output.statusCode >= 300) {
28050
- return de_CommandError2(output, context);
28050
+ return de_CommandError2(output, context3);
28051
28051
  }
28052
- const data2 = await parseXmlBody(output.body, context);
28052
+ const data2 = await parseXmlBody(output.body, context3);
28053
28053
  let contents = {};
28054
- contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context);
28054
+ contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context3);
28055
28055
  const response = {
28056
28056
  $metadata: deserializeMetadata2(output),
28057
28057
  ...contents
28058
28058
  };
28059
28059
  return response;
28060
28060
  };
28061
- de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
28061
+ de_AssumeRoleWithWebIdentityCommand = async (output, context3) => {
28062
28062
  if (output.statusCode >= 300) {
28063
- return de_CommandError2(output, context);
28063
+ return de_CommandError2(output, context3);
28064
28064
  }
28065
- const data2 = await parseXmlBody(output.body, context);
28065
+ const data2 = await parseXmlBody(output.body, context3);
28066
28066
  let contents = {};
28067
- contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context);
28067
+ contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context3);
28068
28068
  const response = {
28069
28069
  $metadata: deserializeMetadata2(output),
28070
28070
  ...contents
28071
28071
  };
28072
28072
  return response;
28073
28073
  };
28074
- de_CommandError2 = async (output, context) => {
28074
+ de_CommandError2 = async (output, context3) => {
28075
28075
  const parsedOutput = {
28076
28076
  ...output,
28077
- body: await parseXmlErrorBody(output.body, context)
28077
+ body: await parseXmlErrorBody(output.body, context3)
28078
28078
  };
28079
28079
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
28080
28080
  switch (errorCode) {
28081
28081
  case "ExpiredTokenException":
28082
28082
  case "com.amazonaws.sts#ExpiredTokenException":
28083
- throw await de_ExpiredTokenExceptionRes2(parsedOutput, context);
28083
+ throw await de_ExpiredTokenExceptionRes2(parsedOutput, context3);
28084
28084
  case "MalformedPolicyDocument":
28085
28085
  case "com.amazonaws.sts#MalformedPolicyDocumentException":
28086
- throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
28086
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context3);
28087
28087
  case "PackedPolicyTooLarge":
28088
28088
  case "com.amazonaws.sts#PackedPolicyTooLargeException":
28089
- throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
28089
+ throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context3);
28090
28090
  case "RegionDisabledException":
28091
28091
  case "com.amazonaws.sts#RegionDisabledException":
28092
- throw await de_RegionDisabledExceptionRes(parsedOutput, context);
28092
+ throw await de_RegionDisabledExceptionRes(parsedOutput, context3);
28093
28093
  case "IDPCommunicationError":
28094
28094
  case "com.amazonaws.sts#IDPCommunicationErrorException":
28095
- throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
28095
+ throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context3);
28096
28096
  case "IDPRejectedClaim":
28097
28097
  case "com.amazonaws.sts#IDPRejectedClaimException":
28098
- throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
28098
+ throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context3);
28099
28099
  case "InvalidIdentityToken":
28100
28100
  case "com.amazonaws.sts#InvalidIdentityTokenException":
28101
- throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
28101
+ throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context3);
28102
28102
  default:
28103
28103
  const parsedBody = parsedOutput.body;
28104
28104
  return throwDefaultError2({
@@ -28108,70 +28108,70 @@ var init_Aws_query = __esm({
28108
28108
  });
28109
28109
  }
28110
28110
  };
28111
- de_ExpiredTokenExceptionRes2 = async (parsedOutput, context) => {
28111
+ de_ExpiredTokenExceptionRes2 = async (parsedOutput, context3) => {
28112
28112
  const body = parsedOutput.body;
28113
- const deserialized = de_ExpiredTokenException(body.Error, context);
28113
+ const deserialized = de_ExpiredTokenException(body.Error, context3);
28114
28114
  const exception = new ExpiredTokenException2({
28115
28115
  $metadata: deserializeMetadata2(parsedOutput),
28116
28116
  ...deserialized
28117
28117
  });
28118
28118
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28119
28119
  };
28120
- de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
28120
+ de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context3) => {
28121
28121
  const body = parsedOutput.body;
28122
- const deserialized = de_IDPCommunicationErrorException(body.Error, context);
28122
+ const deserialized = de_IDPCommunicationErrorException(body.Error, context3);
28123
28123
  const exception = new IDPCommunicationErrorException({
28124
28124
  $metadata: deserializeMetadata2(parsedOutput),
28125
28125
  ...deserialized
28126
28126
  });
28127
28127
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28128
28128
  };
28129
- de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
28129
+ de_IDPRejectedClaimExceptionRes = async (parsedOutput, context3) => {
28130
28130
  const body = parsedOutput.body;
28131
- const deserialized = de_IDPRejectedClaimException(body.Error, context);
28131
+ const deserialized = de_IDPRejectedClaimException(body.Error, context3);
28132
28132
  const exception = new IDPRejectedClaimException({
28133
28133
  $metadata: deserializeMetadata2(parsedOutput),
28134
28134
  ...deserialized
28135
28135
  });
28136
28136
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28137
28137
  };
28138
- de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
28138
+ de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context3) => {
28139
28139
  const body = parsedOutput.body;
28140
- const deserialized = de_InvalidIdentityTokenException(body.Error, context);
28140
+ const deserialized = de_InvalidIdentityTokenException(body.Error, context3);
28141
28141
  const exception = new InvalidIdentityTokenException({
28142
28142
  $metadata: deserializeMetadata2(parsedOutput),
28143
28143
  ...deserialized
28144
28144
  });
28145
28145
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28146
28146
  };
28147
- de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
28147
+ de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context3) => {
28148
28148
  const body = parsedOutput.body;
28149
- const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
28149
+ const deserialized = de_MalformedPolicyDocumentException(body.Error, context3);
28150
28150
  const exception = new MalformedPolicyDocumentException({
28151
28151
  $metadata: deserializeMetadata2(parsedOutput),
28152
28152
  ...deserialized
28153
28153
  });
28154
28154
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28155
28155
  };
28156
- de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
28156
+ de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context3) => {
28157
28157
  const body = parsedOutput.body;
28158
- const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
28158
+ const deserialized = de_PackedPolicyTooLargeException(body.Error, context3);
28159
28159
  const exception = new PackedPolicyTooLargeException({
28160
28160
  $metadata: deserializeMetadata2(parsedOutput),
28161
28161
  ...deserialized
28162
28162
  });
28163
28163
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28164
28164
  };
28165
- de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
28165
+ de_RegionDisabledExceptionRes = async (parsedOutput, context3) => {
28166
28166
  const body = parsedOutput.body;
28167
- const deserialized = de_RegionDisabledException(body.Error, context);
28167
+ const deserialized = de_RegionDisabledException(body.Error, context3);
28168
28168
  const exception = new RegionDisabledException({
28169
28169
  $metadata: deserializeMetadata2(parsedOutput),
28170
28170
  ...deserialized
28171
28171
  });
28172
28172
  return (0, import_smithy_client24.decorateServiceException)(exception, body);
28173
28173
  };
28174
- se_AssumeRoleRequest = (input, context) => {
28174
+ se_AssumeRoleRequest = (input, context3) => {
28175
28175
  const entries = {};
28176
28176
  if (input[_RA] != null) {
28177
28177
  entries[_RA] = input[_RA];
@@ -28180,7 +28180,7 @@ var init_Aws_query = __esm({
28180
28180
  entries[_RSN] = input[_RSN];
28181
28181
  }
28182
28182
  if (input[_PA] != null) {
28183
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
28183
+ const memberEntries = se_policyDescriptorListType(input[_PA], context3);
28184
28184
  if (input[_PA]?.length === 0) {
28185
28185
  entries.PolicyArns = [];
28186
28186
  }
@@ -28196,7 +28196,7 @@ var init_Aws_query = __esm({
28196
28196
  entries[_DS] = input[_DS];
28197
28197
  }
28198
28198
  if (input[_T] != null) {
28199
- const memberEntries = se_tagListType(input[_T], context);
28199
+ const memberEntries = se_tagListType(input[_T], context3);
28200
28200
  if (input[_T]?.length === 0) {
28201
28201
  entries.Tags = [];
28202
28202
  }
@@ -28206,7 +28206,7 @@ var init_Aws_query = __esm({
28206
28206
  });
28207
28207
  }
28208
28208
  if (input[_TTK] != null) {
28209
- const memberEntries = se_tagKeyListType(input[_TTK], context);
28209
+ const memberEntries = se_tagKeyListType(input[_TTK], context3);
28210
28210
  if (input[_TTK]?.length === 0) {
28211
28211
  entries.TransitiveTagKeys = [];
28212
28212
  }
@@ -28228,7 +28228,7 @@ var init_Aws_query = __esm({
28228
28228
  entries[_SI] = input[_SI];
28229
28229
  }
28230
28230
  if (input[_PC] != null) {
28231
- const memberEntries = se_ProvidedContextsListType(input[_PC], context);
28231
+ const memberEntries = se_ProvidedContextsListType(input[_PC], context3);
28232
28232
  if (input[_PC]?.length === 0) {
28233
28233
  entries.ProvidedContexts = [];
28234
28234
  }
@@ -28239,7 +28239,7 @@ var init_Aws_query = __esm({
28239
28239
  }
28240
28240
  return entries;
28241
28241
  };
28242
- se_AssumeRoleWithWebIdentityRequest = (input, context) => {
28242
+ se_AssumeRoleWithWebIdentityRequest = (input, context3) => {
28243
28243
  const entries = {};
28244
28244
  if (input[_RA] != null) {
28245
28245
  entries[_RA] = input[_RA];
@@ -28254,7 +28254,7 @@ var init_Aws_query = __esm({
28254
28254
  entries[_PI] = input[_PI];
28255
28255
  }
28256
28256
  if (input[_PA] != null) {
28257
- const memberEntries = se_policyDescriptorListType(input[_PA], context);
28257
+ const memberEntries = se_policyDescriptorListType(input[_PA], context3);
28258
28258
  if (input[_PA]?.length === 0) {
28259
28259
  entries.PolicyArns = [];
28260
28260
  }
@@ -28271,14 +28271,14 @@ var init_Aws_query = __esm({
28271
28271
  }
28272
28272
  return entries;
28273
28273
  };
28274
- se_policyDescriptorListType = (input, context) => {
28274
+ se_policyDescriptorListType = (input, context3) => {
28275
28275
  const entries = {};
28276
28276
  let counter = 1;
28277
28277
  for (const entry of input) {
28278
28278
  if (entry === null) {
28279
28279
  continue;
28280
28280
  }
28281
- const memberEntries = se_PolicyDescriptorType(entry, context);
28281
+ const memberEntries = se_PolicyDescriptorType(entry, context3);
28282
28282
  Object.entries(memberEntries).forEach(([key, value]) => {
28283
28283
  entries[`member.${counter}.${key}`] = value;
28284
28284
  });
@@ -28286,14 +28286,14 @@ var init_Aws_query = __esm({
28286
28286
  }
28287
28287
  return entries;
28288
28288
  };
28289
- se_PolicyDescriptorType = (input, context) => {
28289
+ se_PolicyDescriptorType = (input, context3) => {
28290
28290
  const entries = {};
28291
28291
  if (input[_a15] != null) {
28292
28292
  entries[_a15] = input[_a15];
28293
28293
  }
28294
28294
  return entries;
28295
28295
  };
28296
- se_ProvidedContext = (input, context) => {
28296
+ se_ProvidedContext = (input, context3) => {
28297
28297
  const entries = {};
28298
28298
  if (input[_PAr] != null) {
28299
28299
  entries[_PAr] = input[_PAr];
@@ -28303,14 +28303,14 @@ var init_Aws_query = __esm({
28303
28303
  }
28304
28304
  return entries;
28305
28305
  };
28306
- se_ProvidedContextsListType = (input, context) => {
28306
+ se_ProvidedContextsListType = (input, context3) => {
28307
28307
  const entries = {};
28308
28308
  let counter = 1;
28309
28309
  for (const entry of input) {
28310
28310
  if (entry === null) {
28311
28311
  continue;
28312
28312
  }
28313
- const memberEntries = se_ProvidedContext(entry, context);
28313
+ const memberEntries = se_ProvidedContext(entry, context3);
28314
28314
  Object.entries(memberEntries).forEach(([key, value]) => {
28315
28315
  entries[`member.${counter}.${key}`] = value;
28316
28316
  });
@@ -28318,7 +28318,7 @@ var init_Aws_query = __esm({
28318
28318
  }
28319
28319
  return entries;
28320
28320
  };
28321
- se_Tag = (input, context) => {
28321
+ se_Tag = (input, context3) => {
28322
28322
  const entries = {};
28323
28323
  if (input[_K] != null) {
28324
28324
  entries[_K] = input[_K];
@@ -28328,7 +28328,7 @@ var init_Aws_query = __esm({
28328
28328
  }
28329
28329
  return entries;
28330
28330
  };
28331
- se_tagKeyListType = (input, context) => {
28331
+ se_tagKeyListType = (input, context3) => {
28332
28332
  const entries = {};
28333
28333
  let counter = 1;
28334
28334
  for (const entry of input) {
@@ -28340,14 +28340,14 @@ var init_Aws_query = __esm({
28340
28340
  }
28341
28341
  return entries;
28342
28342
  };
28343
- se_tagListType = (input, context) => {
28343
+ se_tagListType = (input, context3) => {
28344
28344
  const entries = {};
28345
28345
  let counter = 1;
28346
28346
  for (const entry of input) {
28347
28347
  if (entry === null) {
28348
28348
  continue;
28349
28349
  }
28350
- const memberEntries = se_Tag(entry, context);
28350
+ const memberEntries = se_Tag(entry, context3);
28351
28351
  Object.entries(memberEntries).forEach(([key, value]) => {
28352
28352
  entries[`member.${counter}.${key}`] = value;
28353
28353
  });
@@ -28355,7 +28355,7 @@ var init_Aws_query = __esm({
28355
28355
  }
28356
28356
  return entries;
28357
28357
  };
28358
- de_AssumedRoleUser = (output, context) => {
28358
+ de_AssumedRoleUser = (output, context3) => {
28359
28359
  const contents = {};
28360
28360
  if (output[_ARI] != null) {
28361
28361
  contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]);
@@ -28365,13 +28365,13 @@ var init_Aws_query = __esm({
28365
28365
  }
28366
28366
  return contents;
28367
28367
  };
28368
- de_AssumeRoleResponse = (output, context) => {
28368
+ de_AssumeRoleResponse = (output, context3) => {
28369
28369
  const contents = {};
28370
28370
  if (output[_C] != null) {
28371
- contents[_C] = de_Credentials(output[_C], context);
28371
+ contents[_C] = de_Credentials(output[_C], context3);
28372
28372
  }
28373
28373
  if (output[_ARU] != null) {
28374
- contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
28374
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
28375
28375
  }
28376
28376
  if (output[_PPS] != null) {
28377
28377
  contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
@@ -28381,16 +28381,16 @@ var init_Aws_query = __esm({
28381
28381
  }
28382
28382
  return contents;
28383
28383
  };
28384
- de_AssumeRoleWithWebIdentityResponse = (output, context) => {
28384
+ de_AssumeRoleWithWebIdentityResponse = (output, context3) => {
28385
28385
  const contents = {};
28386
28386
  if (output[_C] != null) {
28387
- contents[_C] = de_Credentials(output[_C], context);
28387
+ contents[_C] = de_Credentials(output[_C], context3);
28388
28388
  }
28389
28389
  if (output[_SFWIT] != null) {
28390
28390
  contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]);
28391
28391
  }
28392
28392
  if (output[_ARU] != null) {
28393
- contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
28393
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
28394
28394
  }
28395
28395
  if (output[_PPS] != null) {
28396
28396
  contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
@@ -28406,7 +28406,7 @@ var init_Aws_query = __esm({
28406
28406
  }
28407
28407
  return contents;
28408
28408
  };
28409
- de_Credentials = (output, context) => {
28409
+ de_Credentials = (output, context3) => {
28410
28410
  const contents = {};
28411
28411
  if (output[_AKI] != null) {
28412
28412
  contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]);
@@ -28422,49 +28422,49 @@ var init_Aws_query = __esm({
28422
28422
  }
28423
28423
  return contents;
28424
28424
  };
28425
- de_ExpiredTokenException = (output, context) => {
28425
+ de_ExpiredTokenException = (output, context3) => {
28426
28426
  const contents = {};
28427
28427
  if (output[_m] != null) {
28428
28428
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28429
28429
  }
28430
28430
  return contents;
28431
28431
  };
28432
- de_IDPCommunicationErrorException = (output, context) => {
28432
+ de_IDPCommunicationErrorException = (output, context3) => {
28433
28433
  const contents = {};
28434
28434
  if (output[_m] != null) {
28435
28435
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28436
28436
  }
28437
28437
  return contents;
28438
28438
  };
28439
- de_IDPRejectedClaimException = (output, context) => {
28439
+ de_IDPRejectedClaimException = (output, context3) => {
28440
28440
  const contents = {};
28441
28441
  if (output[_m] != null) {
28442
28442
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28443
28443
  }
28444
28444
  return contents;
28445
28445
  };
28446
- de_InvalidIdentityTokenException = (output, context) => {
28446
+ de_InvalidIdentityTokenException = (output, context3) => {
28447
28447
  const contents = {};
28448
28448
  if (output[_m] != null) {
28449
28449
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28450
28450
  }
28451
28451
  return contents;
28452
28452
  };
28453
- de_MalformedPolicyDocumentException = (output, context) => {
28453
+ de_MalformedPolicyDocumentException = (output, context3) => {
28454
28454
  const contents = {};
28455
28455
  if (output[_m] != null) {
28456
28456
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28457
28457
  }
28458
28458
  return contents;
28459
28459
  };
28460
- de_PackedPolicyTooLargeException = (output, context) => {
28460
+ de_PackedPolicyTooLargeException = (output, context3) => {
28461
28461
  const contents = {};
28462
28462
  if (output[_m] != null) {
28463
28463
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
28464
28464
  }
28465
28465
  return contents;
28466
28466
  };
28467
- de_RegionDisabledException = (output, context) => {
28467
+ de_RegionDisabledException = (output, context3) => {
28468
28468
  const contents = {};
28469
28469
  if (output[_m] != null) {
28470
28470
  contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
@@ -28478,8 +28478,8 @@ var init_Aws_query = __esm({
28478
28478
  cfId: output.headers["x-amz-cf-id"]
28479
28479
  });
28480
28480
  throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException);
28481
- buildHttpRpcRequest = async (context, headers, path7, resolvedHostname, body) => {
28482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
28481
+ buildHttpRpcRequest = async (context3, headers, path7, resolvedHostname, body) => {
28482
+ const { hostname, protocol = "https", port, path: basePath } = await context3.endpoint();
28483
28483
  const contents = {
28484
28484
  protocol,
28485
28485
  hostname,
@@ -29362,7 +29362,7 @@ var require_dist_cjs63 = __commonJS({
29362
29362
  this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
29363
29363
  this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
29364
29364
  }
29365
- async handle(next, args, context = {}) {
29365
+ async handle(next, args, context3 = {}) {
29366
29366
  const request = args.request;
29367
29367
  const { body: payload2, query: query2 } = request;
29368
29368
  if (!(payload2 instanceof import_stream.Readable)) {
@@ -29499,10 +29499,10 @@ var require_endpointResolver2 = __commonJS({
29499
29499
  size: 50,
29500
29500
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
29501
29501
  });
29502
- var defaultEndpointResolver3 = (endpointParams, context = {}) => {
29502
+ var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
29503
29503
  return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
29504
29504
  endpointParams,
29505
- logger: context.logger
29505
+ logger: context3.logger
29506
29506
  }));
29507
29507
  };
29508
29508
  exports2.defaultEndpointResolver = defaultEndpointResolver3;
@@ -30910,8 +30910,8 @@ var require_dist_cjs65 = __commonJS({
30910
30910
  ...obj,
30911
30911
  ...obj.input && { input: CountTokensInputFilterSensitiveLog(obj.input) }
30912
30912
  });
30913
- var se_ApplyGuardrailCommand = async (input, context) => {
30914
- const b3 = core.requestBuilder(input, context);
30913
+ var se_ApplyGuardrailCommand = async (input, context3) => {
30914
+ const b3 = core.requestBuilder(input, context3);
30915
30915
  const headers = {
30916
30916
  "content-type": "application/json"
30917
30917
  };
@@ -30920,15 +30920,15 @@ var require_dist_cjs65 = __commonJS({
30920
30920
  b3.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
30921
30921
  let body;
30922
30922
  body = JSON.stringify(smithyClient.take(input, {
30923
- content: (_2) => se_GuardrailContentBlockList(_2, context),
30923
+ content: (_2) => se_GuardrailContentBlockList(_2, context3),
30924
30924
  outputScope: [],
30925
30925
  source: []
30926
30926
  }));
30927
30927
  b3.m("POST").h(headers).b(body);
30928
30928
  return b3.build();
30929
30929
  };
30930
- var se_ConverseCommand = async (input, context) => {
30931
- const b3 = core.requestBuilder(input, context);
30930
+ var se_ConverseCommand = async (input, context3) => {
30931
+ const b3 = core.requestBuilder(input, context3);
30932
30932
  const headers = {
30933
30933
  "content-type": "application/json"
30934
30934
  };
@@ -30940,18 +30940,18 @@ var require_dist_cjs65 = __commonJS({
30940
30940
  additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
30941
30941
  guardrailConfig: (_2) => smithyClient._json(_2),
30942
30942
  inferenceConfig: (_2) => se_InferenceConfiguration(_2),
30943
- messages: (_2) => se_Messages(_2, context),
30943
+ messages: (_2) => se_Messages(_2, context3),
30944
30944
  performanceConfig: (_2) => smithyClient._json(_2),
30945
30945
  promptVariables: (_2) => smithyClient._json(_2),
30946
30946
  requestMetadata: (_2) => smithyClient._json(_2),
30947
- system: (_2) => se_SystemContentBlocks(_2, context),
30947
+ system: (_2) => se_SystemContentBlocks(_2, context3),
30948
30948
  toolConfig: (_2) => se_ToolConfiguration(_2)
30949
30949
  }));
30950
30950
  b3.m("POST").h(headers).b(body);
30951
30951
  return b3.build();
30952
30952
  };
30953
- var se_ConverseStreamCommand = async (input, context) => {
30954
- const b3 = core.requestBuilder(input, context);
30953
+ var se_ConverseStreamCommand = async (input, context3) => {
30954
+ const b3 = core.requestBuilder(input, context3);
30955
30955
  const headers = {
30956
30956
  "content-type": "application/json"
30957
30957
  };
@@ -30963,18 +30963,18 @@ var require_dist_cjs65 = __commonJS({
30963
30963
  additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
30964
30964
  guardrailConfig: (_2) => smithyClient._json(_2),
30965
30965
  inferenceConfig: (_2) => se_InferenceConfiguration(_2),
30966
- messages: (_2) => se_Messages(_2, context),
30966
+ messages: (_2) => se_Messages(_2, context3),
30967
30967
  performanceConfig: (_2) => smithyClient._json(_2),
30968
30968
  promptVariables: (_2) => smithyClient._json(_2),
30969
30969
  requestMetadata: (_2) => smithyClient._json(_2),
30970
- system: (_2) => se_SystemContentBlocks(_2, context),
30970
+ system: (_2) => se_SystemContentBlocks(_2, context3),
30971
30971
  toolConfig: (_2) => se_ToolConfiguration(_2)
30972
30972
  }));
30973
30973
  b3.m("POST").h(headers).b(body);
30974
30974
  return b3.build();
30975
30975
  };
30976
- var se_CountTokensCommand = async (input, context) => {
30977
- const b3 = core.requestBuilder(input, context);
30976
+ var se_CountTokensCommand = async (input, context3) => {
30977
+ const b3 = core.requestBuilder(input, context3);
30978
30978
  const headers = {
30979
30979
  "content-type": "application/json"
30980
30980
  };
@@ -30982,13 +30982,13 @@ var require_dist_cjs65 = __commonJS({
30982
30982
  b3.p("modelId", () => input.modelId, "{modelId}", false);
30983
30983
  let body;
30984
30984
  body = JSON.stringify(smithyClient.take(input, {
30985
- input: (_2) => se_CountTokensInput(_2, context)
30985
+ input: (_2) => se_CountTokensInput(_2, context3)
30986
30986
  }));
30987
30987
  b3.m("POST").h(headers).b(body);
30988
30988
  return b3.build();
30989
30989
  };
30990
- var se_GetAsyncInvokeCommand = async (input, context) => {
30991
- const b3 = core.requestBuilder(input, context);
30990
+ var se_GetAsyncInvokeCommand = async (input, context3) => {
30991
+ const b3 = core.requestBuilder(input, context3);
30992
30992
  const headers = {};
30993
30993
  b3.bp("/async-invoke/{invocationArn}");
30994
30994
  b3.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
@@ -30996,8 +30996,8 @@ var require_dist_cjs65 = __commonJS({
30996
30996
  b3.m("GET").h(headers).b(body);
30997
30997
  return b3.build();
30998
30998
  };
30999
- var se_InvokeModelCommand = async (input, context) => {
31000
- const b3 = core.requestBuilder(input, context);
30999
+ var se_InvokeModelCommand = async (input, context3) => {
31000
+ const b3 = core.requestBuilder(input, context3);
31001
31001
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
31002
31002
  [_ct]: input[_cT] || "application/octet-stream",
31003
31003
  [_a16]: input[_a16],
@@ -31015,8 +31015,8 @@ var require_dist_cjs65 = __commonJS({
31015
31015
  b3.m("POST").h(headers).b(body);
31016
31016
  return b3.build();
31017
31017
  };
31018
- var se_InvokeModelWithBidirectionalStreamCommand = async (input, context) => {
31019
- const b3 = core.requestBuilder(input, context);
31018
+ var se_InvokeModelWithBidirectionalStreamCommand = async (input, context3) => {
31019
+ const b3 = core.requestBuilder(input, context3);
31020
31020
  const headers = {
31021
31021
  "content-type": "application/json"
31022
31022
  };
@@ -31024,13 +31024,13 @@ var require_dist_cjs65 = __commonJS({
31024
31024
  b3.p("modelId", () => input.modelId, "{modelId}", false);
31025
31025
  let body;
31026
31026
  if (input.body !== void 0) {
31027
- body = se_InvokeModelWithBidirectionalStreamInput(input.body, context);
31027
+ body = se_InvokeModelWithBidirectionalStreamInput(input.body, context3);
31028
31028
  }
31029
31029
  b3.m("POST").h(headers).b(body);
31030
31030
  return b3.build();
31031
31031
  };
31032
- var se_InvokeModelWithResponseStreamCommand = async (input, context) => {
31033
- const b3 = core.requestBuilder(input, context);
31032
+ var se_InvokeModelWithResponseStreamCommand = async (input, context3) => {
31033
+ const b3 = core.requestBuilder(input, context3);
31034
31034
  const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
31035
31035
  [_ct]: input[_cT] || "application/octet-stream",
31036
31036
  [_xaba]: input[_a16],
@@ -31048,8 +31048,8 @@ var require_dist_cjs65 = __commonJS({
31048
31048
  b3.m("POST").h(headers).b(body);
31049
31049
  return b3.build();
31050
31050
  };
31051
- var se_ListAsyncInvokesCommand = async (input, context) => {
31052
- const b3 = core.requestBuilder(input, context);
31051
+ var se_ListAsyncInvokesCommand = async (input, context3) => {
31052
+ const b3 = core.requestBuilder(input, context3);
31053
31053
  const headers = {};
31054
31054
  b3.bp("/async-invoke");
31055
31055
  const query2 = smithyClient.map({
@@ -31065,8 +31065,8 @@ var require_dist_cjs65 = __commonJS({
31065
31065
  b3.m("GET").h(headers).q(query2).b(body);
31066
31066
  return b3.build();
31067
31067
  };
31068
- var se_StartAsyncInvokeCommand = async (input, context) => {
31069
- const b3 = core.requestBuilder(input, context);
31068
+ var se_StartAsyncInvokeCommand = async (input, context3) => {
31069
+ const b3 = core.requestBuilder(input, context3);
31070
31070
  const headers = {
31071
31071
  "content-type": "application/json"
31072
31072
  };
@@ -31082,14 +31082,14 @@ var require_dist_cjs65 = __commonJS({
31082
31082
  b3.m("POST").h(headers).b(body);
31083
31083
  return b3.build();
31084
31084
  };
31085
- var de_ApplyGuardrailCommand = async (output, context) => {
31085
+ var de_ApplyGuardrailCommand = async (output, context3) => {
31086
31086
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31087
- return de_CommandError3(output, context);
31087
+ return de_CommandError3(output, context3);
31088
31088
  }
31089
31089
  const contents = smithyClient.map({
31090
31090
  $metadata: deserializeMetadata3(output)
31091
31091
  });
31092
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31092
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31093
31093
  const doc = smithyClient.take(data2, {
31094
31094
  action: smithyClient.expectString,
31095
31095
  actionReason: smithyClient.expectString,
@@ -31101,18 +31101,18 @@ var require_dist_cjs65 = __commonJS({
31101
31101
  Object.assign(contents, doc);
31102
31102
  return contents;
31103
31103
  };
31104
- var de_ConverseCommand = async (output, context) => {
31104
+ var de_ConverseCommand = async (output, context3) => {
31105
31105
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31106
- return de_CommandError3(output, context);
31106
+ return de_CommandError3(output, context3);
31107
31107
  }
31108
31108
  const contents = smithyClient.map({
31109
31109
  $metadata: deserializeMetadata3(output)
31110
31110
  });
31111
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31111
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31112
31112
  const doc = smithyClient.take(data2, {
31113
31113
  additionalModelResponseFields: (_2) => de_Document(_2),
31114
31114
  metrics: smithyClient._json,
31115
- output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context),
31115
+ output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context3),
31116
31116
  performanceConfig: smithyClient._json,
31117
31117
  stopReason: smithyClient.expectString,
31118
31118
  trace: (_2) => de_ConverseTrace(_2),
@@ -31121,39 +31121,39 @@ var require_dist_cjs65 = __commonJS({
31121
31121
  Object.assign(contents, doc);
31122
31122
  return contents;
31123
31123
  };
31124
- var de_ConverseStreamCommand = async (output, context) => {
31124
+ var de_ConverseStreamCommand = async (output, context3) => {
31125
31125
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31126
- return de_CommandError3(output, context);
31126
+ return de_CommandError3(output, context3);
31127
31127
  }
31128
31128
  const contents = smithyClient.map({
31129
31129
  $metadata: deserializeMetadata3(output)
31130
31130
  });
31131
31131
  const data2 = output.body;
31132
- contents.stream = de_ConverseStreamOutput(data2, context);
31132
+ contents.stream = de_ConverseStreamOutput(data2, context3);
31133
31133
  return contents;
31134
31134
  };
31135
- var de_CountTokensCommand = async (output, context) => {
31135
+ var de_CountTokensCommand = async (output, context3) => {
31136
31136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31137
- return de_CommandError3(output, context);
31137
+ return de_CommandError3(output, context3);
31138
31138
  }
31139
31139
  const contents = smithyClient.map({
31140
31140
  $metadata: deserializeMetadata3(output)
31141
31141
  });
31142
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31142
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31143
31143
  const doc = smithyClient.take(data2, {
31144
31144
  inputTokens: smithyClient.expectInt32
31145
31145
  });
31146
31146
  Object.assign(contents, doc);
31147
31147
  return contents;
31148
31148
  };
31149
- var de_GetAsyncInvokeCommand = async (output, context) => {
31149
+ var de_GetAsyncInvokeCommand = async (output, context3) => {
31150
31150
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31151
- return de_CommandError3(output, context);
31151
+ return de_CommandError3(output, context3);
31152
31152
  }
31153
31153
  const contents = smithyClient.map({
31154
31154
  $metadata: deserializeMetadata3(output)
31155
31155
  });
31156
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31156
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31157
31157
  const doc = smithyClient.take(data2, {
31158
31158
  clientRequestToken: smithyClient.expectString,
31159
31159
  endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
@@ -31168,33 +31168,33 @@ var require_dist_cjs65 = __commonJS({
31168
31168
  Object.assign(contents, doc);
31169
31169
  return contents;
31170
31170
  };
31171
- var de_InvokeModelCommand = async (output, context) => {
31171
+ var de_InvokeModelCommand = async (output, context3) => {
31172
31172
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31173
- return de_CommandError3(output, context);
31173
+ return de_CommandError3(output, context3);
31174
31174
  }
31175
31175
  const contents = smithyClient.map({
31176
31176
  $metadata: deserializeMetadata3(output),
31177
31177
  [_cT]: [, output.headers[_ct]],
31178
31178
  [_pCL]: [, output.headers[_xabpl]]
31179
31179
  });
31180
- const data2 = await smithyClient.collectBody(output.body, context);
31180
+ const data2 = await smithyClient.collectBody(output.body, context3);
31181
31181
  contents.body = data2;
31182
31182
  return contents;
31183
31183
  };
31184
- var de_InvokeModelWithBidirectionalStreamCommand = async (output, context) => {
31184
+ var de_InvokeModelWithBidirectionalStreamCommand = async (output, context3) => {
31185
31185
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31186
- return de_CommandError3(output, context);
31186
+ return de_CommandError3(output, context3);
31187
31187
  }
31188
31188
  const contents = smithyClient.map({
31189
31189
  $metadata: deserializeMetadata3(output)
31190
31190
  });
31191
31191
  const data2 = output.body;
31192
- contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context);
31192
+ contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context3);
31193
31193
  return contents;
31194
31194
  };
31195
- var de_InvokeModelWithResponseStreamCommand = async (output, context) => {
31195
+ var de_InvokeModelWithResponseStreamCommand = async (output, context3) => {
31196
31196
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31197
- return de_CommandError3(output, context);
31197
+ return de_CommandError3(output, context3);
31198
31198
  }
31199
31199
  const contents = smithyClient.map({
31200
31200
  $metadata: deserializeMetadata3(output),
@@ -31202,17 +31202,17 @@ var require_dist_cjs65 = __commonJS({
31202
31202
  [_pCL]: [, output.headers[_xabpl]]
31203
31203
  });
31204
31204
  const data2 = output.body;
31205
- contents.body = de_ResponseStream(data2, context);
31205
+ contents.body = de_ResponseStream(data2, context3);
31206
31206
  return contents;
31207
31207
  };
31208
- var de_ListAsyncInvokesCommand = async (output, context) => {
31208
+ var de_ListAsyncInvokesCommand = async (output, context3) => {
31209
31209
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31210
- return de_CommandError3(output, context);
31210
+ return de_CommandError3(output, context3);
31211
31211
  }
31212
31212
  const contents = smithyClient.map({
31213
31213
  $metadata: deserializeMetadata3(output)
31214
31214
  });
31215
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31215
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31216
31216
  const doc = smithyClient.take(data2, {
31217
31217
  asyncInvokeSummaries: (_2) => de_AsyncInvokeSummaries(_2),
31218
31218
  nextToken: smithyClient.expectString
@@ -31220,24 +31220,24 @@ var require_dist_cjs65 = __commonJS({
31220
31220
  Object.assign(contents, doc);
31221
31221
  return contents;
31222
31222
  };
31223
- var de_StartAsyncInvokeCommand = async (output, context) => {
31223
+ var de_StartAsyncInvokeCommand = async (output, context3) => {
31224
31224
  if (output.statusCode !== 200 && output.statusCode >= 300) {
31225
- return de_CommandError3(output, context);
31225
+ return de_CommandError3(output, context3);
31226
31226
  }
31227
31227
  const contents = smithyClient.map({
31228
31228
  $metadata: deserializeMetadata3(output)
31229
31229
  });
31230
- const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
31230
+ const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
31231
31231
  const doc = smithyClient.take(data2, {
31232
31232
  invocationArn: smithyClient.expectString
31233
31233
  });
31234
31234
  Object.assign(contents, doc);
31235
31235
  return contents;
31236
31236
  };
31237
- var de_CommandError3 = async (output, context) => {
31237
+ var de_CommandError3 = async (output, context3) => {
31238
31238
  const parsedOutput = {
31239
31239
  ...output,
31240
- body: await core$1.parseJsonErrorBody(output.body, context)
31240
+ body: await core$1.parseJsonErrorBody(output.body, context3)
31241
31241
  };
31242
31242
  const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
31243
31243
  switch (errorCode) {
@@ -31287,7 +31287,7 @@ var require_dist_cjs65 = __commonJS({
31287
31287
  }
31288
31288
  };
31289
31289
  var throwDefaultError3 = smithyClient.withBaseException(BedrockRuntimeServiceException);
31290
- var de_AccessDeniedExceptionRes2 = async (parsedOutput, context) => {
31290
+ var de_AccessDeniedExceptionRes2 = async (parsedOutput, context3) => {
31291
31291
  const contents = smithyClient.map({});
31292
31292
  const data2 = parsedOutput.body;
31293
31293
  const doc = smithyClient.take(data2, {
@@ -31300,7 +31300,7 @@ var require_dist_cjs65 = __commonJS({
31300
31300
  });
31301
31301
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31302
31302
  };
31303
- var de_ConflictExceptionRes = async (parsedOutput, context) => {
31303
+ var de_ConflictExceptionRes = async (parsedOutput, context3) => {
31304
31304
  const contents = smithyClient.map({});
31305
31305
  const data2 = parsedOutput.body;
31306
31306
  const doc = smithyClient.take(data2, {
@@ -31313,7 +31313,7 @@ var require_dist_cjs65 = __commonJS({
31313
31313
  });
31314
31314
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31315
31315
  };
31316
- var de_InternalServerExceptionRes2 = async (parsedOutput, context) => {
31316
+ var de_InternalServerExceptionRes2 = async (parsedOutput, context3) => {
31317
31317
  const contents = smithyClient.map({});
31318
31318
  const data2 = parsedOutput.body;
31319
31319
  const doc = smithyClient.take(data2, {
@@ -31326,7 +31326,7 @@ var require_dist_cjs65 = __commonJS({
31326
31326
  });
31327
31327
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31328
31328
  };
31329
- var de_ModelErrorExceptionRes = async (parsedOutput, context) => {
31329
+ var de_ModelErrorExceptionRes = async (parsedOutput, context3) => {
31330
31330
  const contents = smithyClient.map({});
31331
31331
  const data2 = parsedOutput.body;
31332
31332
  const doc = smithyClient.take(data2, {
@@ -31341,7 +31341,7 @@ var require_dist_cjs65 = __commonJS({
31341
31341
  });
31342
31342
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31343
31343
  };
31344
- var de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
31344
+ var de_ModelNotReadyExceptionRes = async (parsedOutput, context3) => {
31345
31345
  const contents = smithyClient.map({});
31346
31346
  const data2 = parsedOutput.body;
31347
31347
  const doc = smithyClient.take(data2, {
@@ -31354,7 +31354,7 @@ var require_dist_cjs65 = __commonJS({
31354
31354
  });
31355
31355
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31356
31356
  };
31357
- var de_ModelStreamErrorExceptionRes = async (parsedOutput, context) => {
31357
+ var de_ModelStreamErrorExceptionRes = async (parsedOutput, context3) => {
31358
31358
  const contents = smithyClient.map({});
31359
31359
  const data2 = parsedOutput.body;
31360
31360
  const doc = smithyClient.take(data2, {
@@ -31369,7 +31369,7 @@ var require_dist_cjs65 = __commonJS({
31369
31369
  });
31370
31370
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31371
31371
  };
31372
- var de_ModelTimeoutExceptionRes = async (parsedOutput, context) => {
31372
+ var de_ModelTimeoutExceptionRes = async (parsedOutput, context3) => {
31373
31373
  const contents = smithyClient.map({});
31374
31374
  const data2 = parsedOutput.body;
31375
31375
  const doc = smithyClient.take(data2, {
@@ -31382,7 +31382,7 @@ var require_dist_cjs65 = __commonJS({
31382
31382
  });
31383
31383
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31384
31384
  };
31385
- var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
31385
+ var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
31386
31386
  const contents = smithyClient.map({});
31387
31387
  const data2 = parsedOutput.body;
31388
31388
  const doc = smithyClient.take(data2, {
@@ -31395,7 +31395,7 @@ var require_dist_cjs65 = __commonJS({
31395
31395
  });
31396
31396
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31397
31397
  };
31398
- var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
31398
+ var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context3) => {
31399
31399
  const contents = smithyClient.map({});
31400
31400
  const data2 = parsedOutput.body;
31401
31401
  const doc = smithyClient.take(data2, {
@@ -31408,7 +31408,7 @@ var require_dist_cjs65 = __commonJS({
31408
31408
  });
31409
31409
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31410
31410
  };
31411
- var de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
31411
+ var de_ServiceUnavailableExceptionRes = async (parsedOutput, context3) => {
31412
31412
  const contents = smithyClient.map({});
31413
31413
  const data2 = parsedOutput.body;
31414
31414
  const doc = smithyClient.take(data2, {
@@ -31421,7 +31421,7 @@ var require_dist_cjs65 = __commonJS({
31421
31421
  });
31422
31422
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31423
31423
  };
31424
- var de_ThrottlingExceptionRes = async (parsedOutput, context) => {
31424
+ var de_ThrottlingExceptionRes = async (parsedOutput, context3) => {
31425
31425
  const contents = smithyClient.map({});
31426
31426
  const data2 = parsedOutput.body;
31427
31427
  const doc = smithyClient.take(data2, {
@@ -31434,7 +31434,7 @@ var require_dist_cjs65 = __commonJS({
31434
31434
  });
31435
31435
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31436
31436
  };
31437
- var de_ValidationExceptionRes = async (parsedOutput, context) => {
31437
+ var de_ValidationExceptionRes = async (parsedOutput, context3) => {
31438
31438
  const contents = smithyClient.map({});
31439
31439
  const data2 = parsedOutput.body;
31440
31440
  const doc = smithyClient.take(data2, {
@@ -31447,367 +31447,367 @@ var require_dist_cjs65 = __commonJS({
31447
31447
  });
31448
31448
  return smithyClient.decorateServiceException(exception, parsedOutput.body);
31449
31449
  };
31450
- var se_InvokeModelWithBidirectionalStreamInput = (input, context) => {
31450
+ var se_InvokeModelWithBidirectionalStreamInput = (input, context3) => {
31451
31451
  const eventMarshallingVisitor = (event) => exports2.InvokeModelWithBidirectionalStreamInput.visit(event, {
31452
- chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context),
31452
+ chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context3),
31453
31453
  _: (value) => value
31454
31454
  });
31455
- return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
31455
+ return context3.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
31456
31456
  };
31457
- var se_BidirectionalInputPayloadPart_event = (input, context) => {
31457
+ var se_BidirectionalInputPayloadPart_event = (input, context3) => {
31458
31458
  const headers = {
31459
31459
  ":event-type": { type: "string", value: "chunk" },
31460
31460
  ":message-type": { type: "string", value: "event" },
31461
31461
  ":content-type": { type: "string", value: "application/json" }
31462
31462
  };
31463
31463
  let body = new Uint8Array();
31464
- body = se_BidirectionalInputPayloadPart(input, context);
31465
- body = context.utf8Decoder(JSON.stringify(body));
31464
+ body = se_BidirectionalInputPayloadPart(input, context3);
31465
+ body = context3.utf8Decoder(JSON.stringify(body));
31466
31466
  return { headers, body };
31467
31467
  };
31468
- var de_ConverseStreamOutput = (output, context) => {
31469
- return context.eventStreamMarshaller.deserialize(output, async (event) => {
31468
+ var de_ConverseStreamOutput = (output, context3) => {
31469
+ return context3.eventStreamMarshaller.deserialize(output, async (event) => {
31470
31470
  if (event["messageStart"] != null) {
31471
31471
  return {
31472
- messageStart: await de_MessageStartEvent_event(event["messageStart"], context)
31472
+ messageStart: await de_MessageStartEvent_event(event["messageStart"], context3)
31473
31473
  };
31474
31474
  }
31475
31475
  if (event["contentBlockStart"] != null) {
31476
31476
  return {
31477
- contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context)
31477
+ contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context3)
31478
31478
  };
31479
31479
  }
31480
31480
  if (event["contentBlockDelta"] != null) {
31481
31481
  return {
31482
- contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context)
31482
+ contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context3)
31483
31483
  };
31484
31484
  }
31485
31485
  if (event["contentBlockStop"] != null) {
31486
31486
  return {
31487
- contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context)
31487
+ contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context3)
31488
31488
  };
31489
31489
  }
31490
31490
  if (event["messageStop"] != null) {
31491
31491
  return {
31492
- messageStop: await de_MessageStopEvent_event(event["messageStop"], context)
31492
+ messageStop: await de_MessageStopEvent_event(event["messageStop"], context3)
31493
31493
  };
31494
31494
  }
31495
31495
  if (event["metadata"] != null) {
31496
31496
  return {
31497
- metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context)
31497
+ metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context3)
31498
31498
  };
31499
31499
  }
31500
31500
  if (event["internalServerException"] != null) {
31501
31501
  return {
31502
- internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
31502
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
31503
31503
  };
31504
31504
  }
31505
31505
  if (event["modelStreamErrorException"] != null) {
31506
31506
  return {
31507
- modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
31507
+ modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
31508
31508
  };
31509
31509
  }
31510
31510
  if (event["validationException"] != null) {
31511
31511
  return {
31512
- validationException: await de_ValidationException_event(event["validationException"], context)
31512
+ validationException: await de_ValidationException_event(event["validationException"], context3)
31513
31513
  };
31514
31514
  }
31515
31515
  if (event["throttlingException"] != null) {
31516
31516
  return {
31517
- throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
31517
+ throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
31518
31518
  };
31519
31519
  }
31520
31520
  if (event["serviceUnavailableException"] != null) {
31521
31521
  return {
31522
- serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
31522
+ serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
31523
31523
  };
31524
31524
  }
31525
31525
  return { $unknown: event };
31526
31526
  });
31527
31527
  };
31528
- var de_InvokeModelWithBidirectionalStreamOutput = (output, context) => {
31529
- return context.eventStreamMarshaller.deserialize(output, async (event) => {
31528
+ var de_InvokeModelWithBidirectionalStreamOutput = (output, context3) => {
31529
+ return context3.eventStreamMarshaller.deserialize(output, async (event) => {
31530
31530
  if (event["chunk"] != null) {
31531
31531
  return {
31532
- chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context)
31532
+ chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context3)
31533
31533
  };
31534
31534
  }
31535
31535
  if (event["internalServerException"] != null) {
31536
31536
  return {
31537
- internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
31537
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
31538
31538
  };
31539
31539
  }
31540
31540
  if (event["modelStreamErrorException"] != null) {
31541
31541
  return {
31542
- modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
31542
+ modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
31543
31543
  };
31544
31544
  }
31545
31545
  if (event["validationException"] != null) {
31546
31546
  return {
31547
- validationException: await de_ValidationException_event(event["validationException"], context)
31547
+ validationException: await de_ValidationException_event(event["validationException"], context3)
31548
31548
  };
31549
31549
  }
31550
31550
  if (event["throttlingException"] != null) {
31551
31551
  return {
31552
- throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
31552
+ throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
31553
31553
  };
31554
31554
  }
31555
31555
  if (event["modelTimeoutException"] != null) {
31556
31556
  return {
31557
- modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
31557
+ modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
31558
31558
  };
31559
31559
  }
31560
31560
  if (event["serviceUnavailableException"] != null) {
31561
31561
  return {
31562
- serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
31562
+ serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
31563
31563
  };
31564
31564
  }
31565
31565
  return { $unknown: event };
31566
31566
  });
31567
31567
  };
31568
- var de_ResponseStream = (output, context) => {
31569
- return context.eventStreamMarshaller.deserialize(output, async (event) => {
31568
+ var de_ResponseStream = (output, context3) => {
31569
+ return context3.eventStreamMarshaller.deserialize(output, async (event) => {
31570
31570
  if (event["chunk"] != null) {
31571
31571
  return {
31572
- chunk: await de_PayloadPart_event(event["chunk"], context)
31572
+ chunk: await de_PayloadPart_event(event["chunk"], context3)
31573
31573
  };
31574
31574
  }
31575
31575
  if (event["internalServerException"] != null) {
31576
31576
  return {
31577
- internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
31577
+ internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
31578
31578
  };
31579
31579
  }
31580
31580
  if (event["modelStreamErrorException"] != null) {
31581
31581
  return {
31582
- modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
31582
+ modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
31583
31583
  };
31584
31584
  }
31585
31585
  if (event["validationException"] != null) {
31586
31586
  return {
31587
- validationException: await de_ValidationException_event(event["validationException"], context)
31587
+ validationException: await de_ValidationException_event(event["validationException"], context3)
31588
31588
  };
31589
31589
  }
31590
31590
  if (event["throttlingException"] != null) {
31591
31591
  return {
31592
- throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
31592
+ throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
31593
31593
  };
31594
31594
  }
31595
31595
  if (event["modelTimeoutException"] != null) {
31596
31596
  return {
31597
- modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
31597
+ modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
31598
31598
  };
31599
31599
  }
31600
31600
  if (event["serviceUnavailableException"] != null) {
31601
31601
  return {
31602
- serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
31602
+ serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
31603
31603
  };
31604
31604
  }
31605
31605
  return { $unknown: event };
31606
31606
  });
31607
31607
  };
31608
- var de_BidirectionalOutputPayloadPart_event = async (output, context) => {
31608
+ var de_BidirectionalOutputPayloadPart_event = async (output, context3) => {
31609
31609
  const contents = {};
31610
- const data2 = await core$1.parseJsonBody(output.body, context);
31611
- Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context));
31610
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31611
+ Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context3));
31612
31612
  return contents;
31613
31613
  };
31614
- var de_ContentBlockDeltaEvent_event = async (output, context) => {
31614
+ var de_ContentBlockDeltaEvent_event = async (output, context3) => {
31615
31615
  const contents = {};
31616
- const data2 = await core$1.parseJsonBody(output.body, context);
31617
- Object.assign(contents, de_ContentBlockDeltaEvent(data2, context));
31616
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31617
+ Object.assign(contents, de_ContentBlockDeltaEvent(data2, context3));
31618
31618
  return contents;
31619
31619
  };
31620
- var de_ContentBlockStartEvent_event = async (output, context) => {
31620
+ var de_ContentBlockStartEvent_event = async (output, context3) => {
31621
31621
  const contents = {};
31622
- const data2 = await core$1.parseJsonBody(output.body, context);
31622
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31623
31623
  Object.assign(contents, smithyClient._json(data2));
31624
31624
  return contents;
31625
31625
  };
31626
- var de_ContentBlockStopEvent_event = async (output, context) => {
31626
+ var de_ContentBlockStopEvent_event = async (output, context3) => {
31627
31627
  const contents = {};
31628
- const data2 = await core$1.parseJsonBody(output.body, context);
31628
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31629
31629
  Object.assign(contents, smithyClient._json(data2));
31630
31630
  return contents;
31631
31631
  };
31632
- var de_ConverseStreamMetadataEvent_event = async (output, context) => {
31632
+ var de_ConverseStreamMetadataEvent_event = async (output, context3) => {
31633
31633
  const contents = {};
31634
- const data2 = await core$1.parseJsonBody(output.body, context);
31634
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31635
31635
  Object.assign(contents, de_ConverseStreamMetadataEvent(data2));
31636
31636
  return contents;
31637
31637
  };
31638
- var de_InternalServerException_event = async (output, context) => {
31638
+ var de_InternalServerException_event = async (output, context3) => {
31639
31639
  const parsedOutput = {
31640
31640
  ...output,
31641
- body: await core$1.parseJsonBody(output.body, context)
31641
+ body: await core$1.parseJsonBody(output.body, context3)
31642
31642
  };
31643
31643
  return de_InternalServerExceptionRes2(parsedOutput);
31644
31644
  };
31645
- var de_MessageStartEvent_event = async (output, context) => {
31645
+ var de_MessageStartEvent_event = async (output, context3) => {
31646
31646
  const contents = {};
31647
- const data2 = await core$1.parseJsonBody(output.body, context);
31647
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31648
31648
  Object.assign(contents, smithyClient._json(data2));
31649
31649
  return contents;
31650
31650
  };
31651
- var de_MessageStopEvent_event = async (output, context) => {
31651
+ var de_MessageStopEvent_event = async (output, context3) => {
31652
31652
  const contents = {};
31653
- const data2 = await core$1.parseJsonBody(output.body, context);
31653
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31654
31654
  Object.assign(contents, de_MessageStopEvent(data2));
31655
31655
  return contents;
31656
31656
  };
31657
- var de_ModelStreamErrorException_event = async (output, context) => {
31657
+ var de_ModelStreamErrorException_event = async (output, context3) => {
31658
31658
  const parsedOutput = {
31659
31659
  ...output,
31660
- body: await core$1.parseJsonBody(output.body, context)
31660
+ body: await core$1.parseJsonBody(output.body, context3)
31661
31661
  };
31662
31662
  return de_ModelStreamErrorExceptionRes(parsedOutput);
31663
31663
  };
31664
- var de_ModelTimeoutException_event = async (output, context) => {
31664
+ var de_ModelTimeoutException_event = async (output, context3) => {
31665
31665
  const parsedOutput = {
31666
31666
  ...output,
31667
- body: await core$1.parseJsonBody(output.body, context)
31667
+ body: await core$1.parseJsonBody(output.body, context3)
31668
31668
  };
31669
31669
  return de_ModelTimeoutExceptionRes(parsedOutput);
31670
31670
  };
31671
- var de_PayloadPart_event = async (output, context) => {
31671
+ var de_PayloadPart_event = async (output, context3) => {
31672
31672
  const contents = {};
31673
- const data2 = await core$1.parseJsonBody(output.body, context);
31674
- Object.assign(contents, de_PayloadPart(data2, context));
31673
+ const data2 = await core$1.parseJsonBody(output.body, context3);
31674
+ Object.assign(contents, de_PayloadPart(data2, context3));
31675
31675
  return contents;
31676
31676
  };
31677
- var de_ServiceUnavailableException_event = async (output, context) => {
31677
+ var de_ServiceUnavailableException_event = async (output, context3) => {
31678
31678
  const parsedOutput = {
31679
31679
  ...output,
31680
- body: await core$1.parseJsonBody(output.body, context)
31680
+ body: await core$1.parseJsonBody(output.body, context3)
31681
31681
  };
31682
31682
  return de_ServiceUnavailableExceptionRes(parsedOutput);
31683
31683
  };
31684
- var de_ThrottlingException_event = async (output, context) => {
31684
+ var de_ThrottlingException_event = async (output, context3) => {
31685
31685
  const parsedOutput = {
31686
31686
  ...output,
31687
- body: await core$1.parseJsonBody(output.body, context)
31687
+ body: await core$1.parseJsonBody(output.body, context3)
31688
31688
  };
31689
31689
  return de_ThrottlingExceptionRes(parsedOutput);
31690
31690
  };
31691
- var de_ValidationException_event = async (output, context) => {
31691
+ var de_ValidationException_event = async (output, context3) => {
31692
31692
  const parsedOutput = {
31693
31693
  ...output,
31694
- body: await core$1.parseJsonBody(output.body, context)
31694
+ body: await core$1.parseJsonBody(output.body, context3)
31695
31695
  };
31696
31696
  return de_ValidationExceptionRes(parsedOutput);
31697
31697
  };
31698
- var se_BidirectionalInputPayloadPart = (input, context) => {
31698
+ var se_BidirectionalInputPayloadPart = (input, context3) => {
31699
31699
  return smithyClient.take(input, {
31700
- bytes: context.base64Encoder
31700
+ bytes: context3.base64Encoder
31701
31701
  });
31702
31702
  };
31703
- var se_ContentBlock = (input, context) => {
31703
+ var se_ContentBlock = (input, context3) => {
31704
31704
  return exports2.ContentBlock.visit(input, {
31705
31705
  cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
31706
31706
  citationsContent: (value) => ({ citationsContent: smithyClient._json(value) }),
31707
- document: (value) => ({ document: se_DocumentBlock(value, context) }),
31708
- guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
31709
- image: (value) => ({ image: se_ImageBlock(value, context) }),
31710
- reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }),
31707
+ document: (value) => ({ document: se_DocumentBlock(value, context3) }),
31708
+ guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
31709
+ image: (value) => ({ image: se_ImageBlock(value, context3) }),
31710
+ reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context3) }),
31711
31711
  text: (value) => ({ text: value }),
31712
- toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
31712
+ toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context3) }),
31713
31713
  toolUse: (value) => ({ toolUse: se_ToolUseBlock(value) }),
31714
- video: (value) => ({ video: se_VideoBlock(value, context) }),
31714
+ video: (value) => ({ video: se_VideoBlock(value, context3) }),
31715
31715
  _: (name14, value) => ({ [name14]: value })
31716
31716
  });
31717
31717
  };
31718
- var se_ContentBlocks = (input, context) => {
31718
+ var se_ContentBlocks = (input, context3) => {
31719
31719
  return input.filter((e3) => e3 != null).map((entry) => {
31720
- return se_ContentBlock(entry, context);
31720
+ return se_ContentBlock(entry, context3);
31721
31721
  });
31722
31722
  };
31723
- var se_ConverseTokensRequest = (input, context) => {
31723
+ var se_ConverseTokensRequest = (input, context3) => {
31724
31724
  return smithyClient.take(input, {
31725
- messages: (_2) => se_Messages(_2, context),
31726
- system: (_2) => se_SystemContentBlocks(_2, context)
31725
+ messages: (_2) => se_Messages(_2, context3),
31726
+ system: (_2) => se_SystemContentBlocks(_2, context3)
31727
31727
  });
31728
31728
  };
31729
- var se_CountTokensInput = (input, context) => {
31729
+ var se_CountTokensInput = (input, context3) => {
31730
31730
  return exports2.CountTokensInput.visit(input, {
31731
- converse: (value) => ({ converse: se_ConverseTokensRequest(value, context) }),
31732
- invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context) }),
31731
+ converse: (value) => ({ converse: se_ConverseTokensRequest(value, context3) }),
31732
+ invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context3) }),
31733
31733
  _: (name14, value) => ({ [name14]: value })
31734
31734
  });
31735
31735
  };
31736
- var se_DocumentBlock = (input, context) => {
31736
+ var se_DocumentBlock = (input, context3) => {
31737
31737
  return smithyClient.take(input, {
31738
31738
  citations: smithyClient._json,
31739
31739
  context: [],
31740
31740
  format: [],
31741
31741
  name: [],
31742
- source: (_2) => se_DocumentSource(_2, context)
31742
+ source: (_2) => se_DocumentSource(_2, context3)
31743
31743
  });
31744
31744
  };
31745
- var se_DocumentSource = (input, context) => {
31745
+ var se_DocumentSource = (input, context3) => {
31746
31746
  return exports2.DocumentSource.visit(input, {
31747
- bytes: (value) => ({ bytes: context.base64Encoder(value) }),
31747
+ bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
31748
31748
  content: (value) => ({ content: smithyClient._json(value) }),
31749
31749
  s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
31750
31750
  text: (value) => ({ text: value }),
31751
31751
  _: (name14, value) => ({ [name14]: value })
31752
31752
  });
31753
31753
  };
31754
- var se_GuardrailContentBlock = (input, context) => {
31754
+ var se_GuardrailContentBlock = (input, context3) => {
31755
31755
  return exports2.GuardrailContentBlock.visit(input, {
31756
- image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
31756
+ image: (value) => ({ image: se_GuardrailImageBlock(value, context3) }),
31757
31757
  text: (value) => ({ text: smithyClient._json(value) }),
31758
31758
  _: (name14, value) => ({ [name14]: value })
31759
31759
  });
31760
31760
  };
31761
- var se_GuardrailContentBlockList = (input, context) => {
31761
+ var se_GuardrailContentBlockList = (input, context3) => {
31762
31762
  return input.filter((e3) => e3 != null).map((entry) => {
31763
- return se_GuardrailContentBlock(entry, context);
31763
+ return se_GuardrailContentBlock(entry, context3);
31764
31764
  });
31765
31765
  };
31766
- var se_GuardrailConverseContentBlock = (input, context) => {
31766
+ var se_GuardrailConverseContentBlock = (input, context3) => {
31767
31767
  return exports2.GuardrailConverseContentBlock.visit(input, {
31768
- image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
31768
+ image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context3) }),
31769
31769
  text: (value) => ({ text: smithyClient._json(value) }),
31770
31770
  _: (name14, value) => ({ [name14]: value })
31771
31771
  });
31772
31772
  };
31773
- var se_GuardrailConverseImageBlock = (input, context) => {
31773
+ var se_GuardrailConverseImageBlock = (input, context3) => {
31774
31774
  return smithyClient.take(input, {
31775
31775
  format: [],
31776
- source: (_2) => se_GuardrailConverseImageSource(_2, context)
31776
+ source: (_2) => se_GuardrailConverseImageSource(_2, context3)
31777
31777
  });
31778
31778
  };
31779
- var se_GuardrailConverseImageSource = (input, context) => {
31779
+ var se_GuardrailConverseImageSource = (input, context3) => {
31780
31780
  return exports2.GuardrailConverseImageSource.visit(input, {
31781
- bytes: (value) => ({ bytes: context.base64Encoder(value) }),
31781
+ bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
31782
31782
  _: (name14, value) => ({ [name14]: value })
31783
31783
  });
31784
31784
  };
31785
- var se_GuardrailImageBlock = (input, context) => {
31785
+ var se_GuardrailImageBlock = (input, context3) => {
31786
31786
  return smithyClient.take(input, {
31787
31787
  format: [],
31788
- source: (_2) => se_GuardrailImageSource(_2, context)
31788
+ source: (_2) => se_GuardrailImageSource(_2, context3)
31789
31789
  });
31790
31790
  };
31791
- var se_GuardrailImageSource = (input, context) => {
31791
+ var se_GuardrailImageSource = (input, context3) => {
31792
31792
  return exports2.GuardrailImageSource.visit(input, {
31793
- bytes: (value) => ({ bytes: context.base64Encoder(value) }),
31793
+ bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
31794
31794
  _: (name14, value) => ({ [name14]: value })
31795
31795
  });
31796
31796
  };
31797
- var se_ImageBlock = (input, context) => {
31797
+ var se_ImageBlock = (input, context3) => {
31798
31798
  return smithyClient.take(input, {
31799
31799
  format: [],
31800
- source: (_2) => se_ImageSource(_2, context)
31800
+ source: (_2) => se_ImageSource(_2, context3)
31801
31801
  });
31802
31802
  };
31803
- var se_ImageSource = (input, context) => {
31803
+ var se_ImageSource = (input, context3) => {
31804
31804
  return exports2.ImageSource.visit(input, {
31805
- bytes: (value) => ({ bytes: context.base64Encoder(value) }),
31805
+ bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
31806
31806
  s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
31807
31807
  _: (name14, value) => ({ [name14]: value })
31808
31808
  });
31809
31809
  };
31810
- var se_InferenceConfiguration = (input, context) => {
31810
+ var se_InferenceConfiguration = (input, context3) => {
31811
31811
  return smithyClient.take(input, {
31812
31812
  maxTokens: [],
31813
31813
  stopSequences: smithyClient._json,
@@ -31815,128 +31815,128 @@ var require_dist_cjs65 = __commonJS({
31815
31815
  topP: smithyClient.serializeFloat
31816
31816
  });
31817
31817
  };
31818
- var se_InvokeModelTokensRequest = (input, context) => {
31818
+ var se_InvokeModelTokensRequest = (input, context3) => {
31819
31819
  return smithyClient.take(input, {
31820
- body: context.base64Encoder
31820
+ body: context3.base64Encoder
31821
31821
  });
31822
31822
  };
31823
- var se_Message = (input, context) => {
31823
+ var se_Message = (input, context3) => {
31824
31824
  return smithyClient.take(input, {
31825
- content: (_2) => se_ContentBlocks(_2, context),
31825
+ content: (_2) => se_ContentBlocks(_2, context3),
31826
31826
  role: []
31827
31827
  });
31828
31828
  };
31829
- var se_Messages = (input, context) => {
31829
+ var se_Messages = (input, context3) => {
31830
31830
  return input.filter((e3) => e3 != null).map((entry) => {
31831
- return se_Message(entry, context);
31831
+ return se_Message(entry, context3);
31832
31832
  });
31833
31833
  };
31834
- var se_ModelInputPayload = (input, context) => {
31834
+ var se_ModelInputPayload = (input, context3) => {
31835
31835
  return input;
31836
31836
  };
31837
- var se_ReasoningContentBlock = (input, context) => {
31837
+ var se_ReasoningContentBlock = (input, context3) => {
31838
31838
  return exports2.ReasoningContentBlock.visit(input, {
31839
31839
  reasoningText: (value) => ({ reasoningText: smithyClient._json(value) }),
31840
- redactedContent: (value) => ({ redactedContent: context.base64Encoder(value) }),
31840
+ redactedContent: (value) => ({ redactedContent: context3.base64Encoder(value) }),
31841
31841
  _: (name14, value) => ({ [name14]: value })
31842
31842
  });
31843
31843
  };
31844
- var se_SystemContentBlock = (input, context) => {
31844
+ var se_SystemContentBlock = (input, context3) => {
31845
31845
  return exports2.SystemContentBlock.visit(input, {
31846
31846
  cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
31847
- guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
31847
+ guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
31848
31848
  text: (value) => ({ text: value }),
31849
31849
  _: (name14, value) => ({ [name14]: value })
31850
31850
  });
31851
31851
  };
31852
- var se_SystemContentBlocks = (input, context) => {
31852
+ var se_SystemContentBlocks = (input, context3) => {
31853
31853
  return input.filter((e3) => e3 != null).map((entry) => {
31854
- return se_SystemContentBlock(entry, context);
31854
+ return se_SystemContentBlock(entry, context3);
31855
31855
  });
31856
31856
  };
31857
- var se_Tool = (input, context) => {
31857
+ var se_Tool = (input, context3) => {
31858
31858
  return exports2.Tool.visit(input, {
31859
31859
  cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
31860
31860
  toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
31861
31861
  _: (name14, value) => ({ [name14]: value })
31862
31862
  });
31863
31863
  };
31864
- var se_ToolConfiguration = (input, context) => {
31864
+ var se_ToolConfiguration = (input, context3) => {
31865
31865
  return smithyClient.take(input, {
31866
31866
  toolChoice: smithyClient._json,
31867
31867
  tools: (_2) => se_Tools(_2)
31868
31868
  });
31869
31869
  };
31870
- var se_ToolInputSchema = (input, context) => {
31870
+ var se_ToolInputSchema = (input, context3) => {
31871
31871
  return exports2.ToolInputSchema.visit(input, {
31872
31872
  json: (value) => ({ json: se_Document(value) }),
31873
31873
  _: (name14, value) => ({ [name14]: value })
31874
31874
  });
31875
31875
  };
31876
- var se_ToolResultBlock = (input, context) => {
31876
+ var se_ToolResultBlock = (input, context3) => {
31877
31877
  return smithyClient.take(input, {
31878
- content: (_2) => se_ToolResultContentBlocks(_2, context),
31878
+ content: (_2) => se_ToolResultContentBlocks(_2, context3),
31879
31879
  status: [],
31880
31880
  toolUseId: []
31881
31881
  });
31882
31882
  };
31883
- var se_ToolResultContentBlock = (input, context) => {
31883
+ var se_ToolResultContentBlock = (input, context3) => {
31884
31884
  return exports2.ToolResultContentBlock.visit(input, {
31885
- document: (value) => ({ document: se_DocumentBlock(value, context) }),
31886
- image: (value) => ({ image: se_ImageBlock(value, context) }),
31885
+ document: (value) => ({ document: se_DocumentBlock(value, context3) }),
31886
+ image: (value) => ({ image: se_ImageBlock(value, context3) }),
31887
31887
  json: (value) => ({ json: se_Document(value) }),
31888
31888
  text: (value) => ({ text: value }),
31889
- video: (value) => ({ video: se_VideoBlock(value, context) }),
31889
+ video: (value) => ({ video: se_VideoBlock(value, context3) }),
31890
31890
  _: (name14, value) => ({ [name14]: value })
31891
31891
  });
31892
31892
  };
31893
- var se_ToolResultContentBlocks = (input, context) => {
31893
+ var se_ToolResultContentBlocks = (input, context3) => {
31894
31894
  return input.filter((e3) => e3 != null).map((entry) => {
31895
- return se_ToolResultContentBlock(entry, context);
31895
+ return se_ToolResultContentBlock(entry, context3);
31896
31896
  });
31897
31897
  };
31898
- var se_Tools = (input, context) => {
31898
+ var se_Tools = (input, context3) => {
31899
31899
  return input.filter((e3) => e3 != null).map((entry) => {
31900
31900
  return se_Tool(entry);
31901
31901
  });
31902
31902
  };
31903
- var se_ToolSpecification = (input, context) => {
31903
+ var se_ToolSpecification = (input, context3) => {
31904
31904
  return smithyClient.take(input, {
31905
31905
  description: [],
31906
31906
  inputSchema: (_2) => se_ToolInputSchema(_2),
31907
31907
  name: []
31908
31908
  });
31909
31909
  };
31910
- var se_ToolUseBlock = (input, context) => {
31910
+ var se_ToolUseBlock = (input, context3) => {
31911
31911
  return smithyClient.take(input, {
31912
31912
  input: (_2) => se_Document(_2),
31913
31913
  name: [],
31914
31914
  toolUseId: []
31915
31915
  });
31916
31916
  };
31917
- var se_VideoBlock = (input, context) => {
31917
+ var se_VideoBlock = (input, context3) => {
31918
31918
  return smithyClient.take(input, {
31919
31919
  format: [],
31920
- source: (_2) => se_VideoSource(_2, context)
31920
+ source: (_2) => se_VideoSource(_2, context3)
31921
31921
  });
31922
31922
  };
31923
- var se_VideoSource = (input, context) => {
31923
+ var se_VideoSource = (input, context3) => {
31924
31924
  return exports2.VideoSource.visit(input, {
31925
- bytes: (value) => ({ bytes: context.base64Encoder(value) }),
31925
+ bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
31926
31926
  s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
31927
31927
  _: (name14, value) => ({ [name14]: value })
31928
31928
  });
31929
31929
  };
31930
- var se_Document = (input, context) => {
31930
+ var se_Document = (input, context3) => {
31931
31931
  return input;
31932
31932
  };
31933
- var de_AsyncInvokeSummaries = (output, context) => {
31933
+ var de_AsyncInvokeSummaries = (output, context3) => {
31934
31934
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
31935
31935
  return de_AsyncInvokeSummary(entry);
31936
31936
  });
31937
31937
  return retVal;
31938
31938
  };
31939
- var de_AsyncInvokeSummary = (output, context) => {
31939
+ var de_AsyncInvokeSummary = (output, context3) => {
31940
31940
  return smithyClient.take(output, {
31941
31941
  clientRequestToken: smithyClient.expectString,
31942
31942
  endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
@@ -31949,12 +31949,12 @@ var require_dist_cjs65 = __commonJS({
31949
31949
  submitTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2))
31950
31950
  });
31951
31951
  };
31952
- var de_BidirectionalOutputPayloadPart = (output, context) => {
31952
+ var de_BidirectionalOutputPayloadPart = (output, context3) => {
31953
31953
  return smithyClient.take(output, {
31954
- bytes: context.base64Decoder
31954
+ bytes: context3.base64Decoder
31955
31955
  });
31956
31956
  };
31957
- var de_ContentBlock = (output, context) => {
31957
+ var de_ContentBlock = (output, context3) => {
31958
31958
  if (output.cachePoint != null) {
31959
31959
  return {
31960
31960
  cachePoint: smithyClient._json(output.cachePoint)
@@ -31967,22 +31967,22 @@ var require_dist_cjs65 = __commonJS({
31967
31967
  }
31968
31968
  if (output.document != null) {
31969
31969
  return {
31970
- document: de_DocumentBlock(output.document, context)
31970
+ document: de_DocumentBlock(output.document, context3)
31971
31971
  };
31972
31972
  }
31973
31973
  if (output.guardContent != null) {
31974
31974
  return {
31975
- guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context)
31975
+ guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context3)
31976
31976
  };
31977
31977
  }
31978
31978
  if (output.image != null) {
31979
31979
  return {
31980
- image: de_ImageBlock(output.image, context)
31980
+ image: de_ImageBlock(output.image, context3)
31981
31981
  };
31982
31982
  }
31983
31983
  if (output.reasoningContent != null) {
31984
31984
  return {
31985
- reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context)
31985
+ reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context3)
31986
31986
  };
31987
31987
  }
31988
31988
  if (smithyClient.expectString(output.text) !== void 0) {
@@ -31990,7 +31990,7 @@ var require_dist_cjs65 = __commonJS({
31990
31990
  }
31991
31991
  if (output.toolResult != null) {
31992
31992
  return {
31993
- toolResult: de_ToolResultBlock(output.toolResult, context)
31993
+ toolResult: de_ToolResultBlock(output.toolResult, context3)
31994
31994
  };
31995
31995
  }
31996
31996
  if (output.toolUse != null) {
@@ -32000,12 +32000,12 @@ var require_dist_cjs65 = __commonJS({
32000
32000
  }
32001
32001
  if (output.video != null) {
32002
32002
  return {
32003
- video: de_VideoBlock(output.video, context)
32003
+ video: de_VideoBlock(output.video, context3)
32004
32004
  };
32005
32005
  }
32006
32006
  return { $unknown: Object.entries(output)[0] };
32007
32007
  };
32008
- var de_ContentBlockDelta = (output, context) => {
32008
+ var de_ContentBlockDelta = (output, context3) => {
32009
32009
  if (output.citation != null) {
32010
32010
  return {
32011
32011
  citation: smithyClient._json(output.citation)
@@ -32013,7 +32013,7 @@ var require_dist_cjs65 = __commonJS({
32013
32013
  }
32014
32014
  if (output.reasoningContent != null) {
32015
32015
  return {
32016
- reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context)
32016
+ reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context3)
32017
32017
  };
32018
32018
  }
32019
32019
  if (smithyClient.expectString(output.text) !== void 0) {
@@ -32026,27 +32026,27 @@ var require_dist_cjs65 = __commonJS({
32026
32026
  }
32027
32027
  return { $unknown: Object.entries(output)[0] };
32028
32028
  };
32029
- var de_ContentBlockDeltaEvent = (output, context) => {
32029
+ var de_ContentBlockDeltaEvent = (output, context3) => {
32030
32030
  return smithyClient.take(output, {
32031
32031
  contentBlockIndex: smithyClient.expectInt32,
32032
- delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context)
32032
+ delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context3)
32033
32033
  });
32034
32034
  };
32035
- var de_ContentBlocks = (output, context) => {
32035
+ var de_ContentBlocks = (output, context3) => {
32036
32036
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32037
- return de_ContentBlock(core$1.awsExpectUnion(entry), context);
32037
+ return de_ContentBlock(core$1.awsExpectUnion(entry), context3);
32038
32038
  });
32039
32039
  return retVal;
32040
32040
  };
32041
- var de_ConverseOutput = (output, context) => {
32041
+ var de_ConverseOutput = (output, context3) => {
32042
32042
  if (output.message != null) {
32043
32043
  return {
32044
- message: de_Message(output.message, context)
32044
+ message: de_Message(output.message, context3)
32045
32045
  };
32046
32046
  }
32047
32047
  return { $unknown: Object.entries(output)[0] };
32048
32048
  };
32049
- var de_ConverseStreamMetadataEvent = (output, context) => {
32049
+ var de_ConverseStreamMetadataEvent = (output, context3) => {
32050
32050
  return smithyClient.take(output, {
32051
32051
  metrics: smithyClient._json,
32052
32052
  performanceConfig: smithyClient._json,
@@ -32054,31 +32054,31 @@ var require_dist_cjs65 = __commonJS({
32054
32054
  usage: smithyClient._json
32055
32055
  });
32056
32056
  };
32057
- var de_ConverseStreamTrace = (output, context) => {
32057
+ var de_ConverseStreamTrace = (output, context3) => {
32058
32058
  return smithyClient.take(output, {
32059
32059
  guardrail: (_2) => de_GuardrailTraceAssessment(_2),
32060
32060
  promptRouter: smithyClient._json
32061
32061
  });
32062
32062
  };
32063
- var de_ConverseTrace = (output, context) => {
32063
+ var de_ConverseTrace = (output, context3) => {
32064
32064
  return smithyClient.take(output, {
32065
32065
  guardrail: (_2) => de_GuardrailTraceAssessment(_2),
32066
32066
  promptRouter: smithyClient._json
32067
32067
  });
32068
32068
  };
32069
- var de_DocumentBlock = (output, context) => {
32069
+ var de_DocumentBlock = (output, context3) => {
32070
32070
  return smithyClient.take(output, {
32071
32071
  citations: smithyClient._json,
32072
32072
  context: smithyClient.expectString,
32073
32073
  format: smithyClient.expectString,
32074
32074
  name: smithyClient.expectString,
32075
- source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context)
32075
+ source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context3)
32076
32076
  });
32077
32077
  };
32078
- var de_DocumentSource = (output, context) => {
32078
+ var de_DocumentSource = (output, context3) => {
32079
32079
  if (output.bytes != null) {
32080
32080
  return {
32081
- bytes: context.base64Decoder(output.bytes)
32081
+ bytes: context3.base64Decoder(output.bytes)
32082
32082
  };
32083
32083
  }
32084
32084
  if (output.content != null) {
@@ -32096,7 +32096,7 @@ var require_dist_cjs65 = __commonJS({
32096
32096
  }
32097
32097
  return { $unknown: Object.entries(output)[0] };
32098
32098
  };
32099
- var de_GuardrailAssessment = (output, context) => {
32099
+ var de_GuardrailAssessment = (output, context3) => {
32100
32100
  return smithyClient.take(output, {
32101
32101
  automatedReasoningPolicy: (_2) => de_GuardrailAutomatedReasoningPolicyAssessment(_2),
32102
32102
  contentPolicy: smithyClient._json,
@@ -32107,13 +32107,13 @@ var require_dist_cjs65 = __commonJS({
32107
32107
  wordPolicy: smithyClient._json
32108
32108
  });
32109
32109
  };
32110
- var de_GuardrailAssessmentList = (output, context) => {
32110
+ var de_GuardrailAssessmentList = (output, context3) => {
32111
32111
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32112
32112
  return de_GuardrailAssessment(entry);
32113
32113
  });
32114
32114
  return retVal;
32115
32115
  };
32116
- var de_GuardrailAssessmentListMap = (output, context) => {
32116
+ var de_GuardrailAssessmentListMap = (output, context3) => {
32117
32117
  return Object.entries(output).reduce((acc, [key, value]) => {
32118
32118
  if (value === null) {
32119
32119
  return acc;
@@ -32122,7 +32122,7 @@ var require_dist_cjs65 = __commonJS({
32122
32122
  return acc;
32123
32123
  }, {});
32124
32124
  };
32125
- var de_GuardrailAssessmentMap = (output, context) => {
32125
+ var de_GuardrailAssessmentMap = (output, context3) => {
32126
32126
  return Object.entries(output).reduce((acc, [key, value]) => {
32127
32127
  if (value === null) {
32128
32128
  return acc;
@@ -32131,7 +32131,7 @@ var require_dist_cjs65 = __commonJS({
32131
32131
  return acc;
32132
32132
  }, {});
32133
32133
  };
32134
- var de_GuardrailAutomatedReasoningFinding = (output, context) => {
32134
+ var de_GuardrailAutomatedReasoningFinding = (output, context3) => {
32135
32135
  if (output.impossible != null) {
32136
32136
  return {
32137
32137
  impossible: de_GuardrailAutomatedReasoningImpossibleFinding(output.impossible)
@@ -32169,32 +32169,32 @@ var require_dist_cjs65 = __commonJS({
32169
32169
  }
32170
32170
  return { $unknown: Object.entries(output)[0] };
32171
32171
  };
32172
- var de_GuardrailAutomatedReasoningFindingList = (output, context) => {
32172
+ var de_GuardrailAutomatedReasoningFindingList = (output, context3) => {
32173
32173
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32174
32174
  return de_GuardrailAutomatedReasoningFinding(core$1.awsExpectUnion(entry));
32175
32175
  });
32176
32176
  return retVal;
32177
32177
  };
32178
- var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context) => {
32178
+ var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context3) => {
32179
32179
  return smithyClient.take(output, {
32180
32180
  contradictingRules: smithyClient._json,
32181
32181
  logicWarning: smithyClient._json,
32182
32182
  translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
32183
32183
  });
32184
32184
  };
32185
- var de_GuardrailAutomatedReasoningInvalidFinding = (output, context) => {
32185
+ var de_GuardrailAutomatedReasoningInvalidFinding = (output, context3) => {
32186
32186
  return smithyClient.take(output, {
32187
32187
  contradictingRules: smithyClient._json,
32188
32188
  logicWarning: smithyClient._json,
32189
32189
  translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
32190
32190
  });
32191
32191
  };
32192
- var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context) => {
32192
+ var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context3) => {
32193
32193
  return smithyClient.take(output, {
32194
32194
  findings: (_2) => de_GuardrailAutomatedReasoningFindingList(_2)
32195
32195
  });
32196
32196
  };
32197
- var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context) => {
32197
+ var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context3) => {
32198
32198
  return smithyClient.take(output, {
32199
32199
  claimsFalseScenario: smithyClient._json,
32200
32200
  claimsTrueScenario: smithyClient._json,
@@ -32202,7 +32202,7 @@ var require_dist_cjs65 = __commonJS({
32202
32202
  translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
32203
32203
  });
32204
32204
  };
32205
- var de_GuardrailAutomatedReasoningTranslation = (output, context) => {
32205
+ var de_GuardrailAutomatedReasoningTranslation = (output, context3) => {
32206
32206
  return smithyClient.take(output, {
32207
32207
  claims: smithyClient._json,
32208
32208
  confidence: smithyClient.limitedParseDouble,
@@ -32211,30 +32211,30 @@ var require_dist_cjs65 = __commonJS({
32211
32211
  untranslatedPremises: smithyClient._json
32212
32212
  });
32213
32213
  };
32214
- var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context) => {
32214
+ var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context3) => {
32215
32215
  return smithyClient.take(output, {
32216
32216
  differenceScenarios: smithyClient._json,
32217
32217
  options: (_2) => de_GuardrailAutomatedReasoningTranslationOptionList(_2)
32218
32218
  });
32219
32219
  };
32220
- var de_GuardrailAutomatedReasoningTranslationList = (output, context) => {
32220
+ var de_GuardrailAutomatedReasoningTranslationList = (output, context3) => {
32221
32221
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32222
32222
  return de_GuardrailAutomatedReasoningTranslation(entry);
32223
32223
  });
32224
32224
  return retVal;
32225
32225
  };
32226
- var de_GuardrailAutomatedReasoningTranslationOption = (output, context) => {
32226
+ var de_GuardrailAutomatedReasoningTranslationOption = (output, context3) => {
32227
32227
  return smithyClient.take(output, {
32228
32228
  translations: (_2) => de_GuardrailAutomatedReasoningTranslationList(_2)
32229
32229
  });
32230
32230
  };
32231
- var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context) => {
32231
+ var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context3) => {
32232
32232
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32233
32233
  return de_GuardrailAutomatedReasoningTranslationOption(entry);
32234
32234
  });
32235
32235
  return retVal;
32236
32236
  };
32237
- var de_GuardrailAutomatedReasoningValidFinding = (output, context) => {
32237
+ var de_GuardrailAutomatedReasoningValidFinding = (output, context3) => {
32238
32238
  return smithyClient.take(output, {
32239
32239
  claimsTrueScenario: smithyClient._json,
32240
32240
  logicWarning: smithyClient._json,
@@ -32242,7 +32242,7 @@ var require_dist_cjs65 = __commonJS({
32242
32242
  translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
32243
32243
  });
32244
32244
  };
32245
- var de_GuardrailContextualGroundingFilter = (output, context) => {
32245
+ var de_GuardrailContextualGroundingFilter = (output, context3) => {
32246
32246
  return smithyClient.take(output, {
32247
32247
  action: smithyClient.expectString,
32248
32248
  detected: smithyClient.expectBoolean,
@@ -32251,21 +32251,21 @@ var require_dist_cjs65 = __commonJS({
32251
32251
  type: smithyClient.expectString
32252
32252
  });
32253
32253
  };
32254
- var de_GuardrailContextualGroundingFilters = (output, context) => {
32254
+ var de_GuardrailContextualGroundingFilters = (output, context3) => {
32255
32255
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32256
32256
  return de_GuardrailContextualGroundingFilter(entry);
32257
32257
  });
32258
32258
  return retVal;
32259
32259
  };
32260
- var de_GuardrailContextualGroundingPolicyAssessment = (output, context) => {
32260
+ var de_GuardrailContextualGroundingPolicyAssessment = (output, context3) => {
32261
32261
  return smithyClient.take(output, {
32262
32262
  filters: (_2) => de_GuardrailContextualGroundingFilters(_2)
32263
32263
  });
32264
32264
  };
32265
- var de_GuardrailConverseContentBlock = (output, context) => {
32265
+ var de_GuardrailConverseContentBlock = (output, context3) => {
32266
32266
  if (output.image != null) {
32267
32267
  return {
32268
- image: de_GuardrailConverseImageBlock(output.image, context)
32268
+ image: de_GuardrailConverseImageBlock(output.image, context3)
32269
32269
  };
32270
32270
  }
32271
32271
  if (output.text != null) {
@@ -32275,21 +32275,21 @@ var require_dist_cjs65 = __commonJS({
32275
32275
  }
32276
32276
  return { $unknown: Object.entries(output)[0] };
32277
32277
  };
32278
- var de_GuardrailConverseImageBlock = (output, context) => {
32278
+ var de_GuardrailConverseImageBlock = (output, context3) => {
32279
32279
  return smithyClient.take(output, {
32280
32280
  format: smithyClient.expectString,
32281
- source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context)
32281
+ source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context3)
32282
32282
  });
32283
32283
  };
32284
- var de_GuardrailConverseImageSource = (output, context) => {
32284
+ var de_GuardrailConverseImageSource = (output, context3) => {
32285
32285
  if (output.bytes != null) {
32286
32286
  return {
32287
- bytes: context.base64Decoder(output.bytes)
32287
+ bytes: context3.base64Decoder(output.bytes)
32288
32288
  };
32289
32289
  }
32290
32290
  return { $unknown: Object.entries(output)[0] };
32291
32291
  };
32292
- var de_GuardrailTraceAssessment = (output, context) => {
32292
+ var de_GuardrailTraceAssessment = (output, context3) => {
32293
32293
  return smithyClient.take(output, {
32294
32294
  actionReason: smithyClient.expectString,
32295
32295
  inputAssessment: (_2) => de_GuardrailAssessmentMap(_2),
@@ -32297,16 +32297,16 @@ var require_dist_cjs65 = __commonJS({
32297
32297
  outputAssessments: (_2) => de_GuardrailAssessmentListMap(_2)
32298
32298
  });
32299
32299
  };
32300
- var de_ImageBlock = (output, context) => {
32300
+ var de_ImageBlock = (output, context3) => {
32301
32301
  return smithyClient.take(output, {
32302
32302
  format: smithyClient.expectString,
32303
- source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context)
32303
+ source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context3)
32304
32304
  });
32305
32305
  };
32306
- var de_ImageSource = (output, context) => {
32306
+ var de_ImageSource = (output, context3) => {
32307
32307
  if (output.bytes != null) {
32308
32308
  return {
32309
- bytes: context.base64Decoder(output.bytes)
32309
+ bytes: context3.base64Decoder(output.bytes)
32310
32310
  };
32311
32311
  }
32312
32312
  if (output.s3Location != null) {
@@ -32316,24 +32316,24 @@ var require_dist_cjs65 = __commonJS({
32316
32316
  }
32317
32317
  return { $unknown: Object.entries(output)[0] };
32318
32318
  };
32319
- var de_Message = (output, context) => {
32319
+ var de_Message = (output, context3) => {
32320
32320
  return smithyClient.take(output, {
32321
- content: (_2) => de_ContentBlocks(_2, context),
32321
+ content: (_2) => de_ContentBlocks(_2, context3),
32322
32322
  role: smithyClient.expectString
32323
32323
  });
32324
32324
  };
32325
- var de_MessageStopEvent = (output, context) => {
32325
+ var de_MessageStopEvent = (output, context3) => {
32326
32326
  return smithyClient.take(output, {
32327
32327
  additionalModelResponseFields: (_2) => de_Document(_2),
32328
32328
  stopReason: smithyClient.expectString
32329
32329
  });
32330
32330
  };
32331
- var de_PayloadPart = (output, context) => {
32331
+ var de_PayloadPart = (output, context3) => {
32332
32332
  return smithyClient.take(output, {
32333
- bytes: context.base64Decoder
32333
+ bytes: context3.base64Decoder
32334
32334
  });
32335
32335
  };
32336
- var de_ReasoningContentBlock = (output, context) => {
32336
+ var de_ReasoningContentBlock = (output, context3) => {
32337
32337
  if (output.reasoningText != null) {
32338
32338
  return {
32339
32339
  reasoningText: smithyClient._json(output.reasoningText)
@@ -32341,15 +32341,15 @@ var require_dist_cjs65 = __commonJS({
32341
32341
  }
32342
32342
  if (output.redactedContent != null) {
32343
32343
  return {
32344
- redactedContent: context.base64Decoder(output.redactedContent)
32344
+ redactedContent: context3.base64Decoder(output.redactedContent)
32345
32345
  };
32346
32346
  }
32347
32347
  return { $unknown: Object.entries(output)[0] };
32348
32348
  };
32349
- var de_ReasoningContentBlockDelta = (output, context) => {
32349
+ var de_ReasoningContentBlockDelta = (output, context3) => {
32350
32350
  if (output.redactedContent != null) {
32351
32351
  return {
32352
- redactedContent: context.base64Decoder(output.redactedContent)
32352
+ redactedContent: context3.base64Decoder(output.redactedContent)
32353
32353
  };
32354
32354
  }
32355
32355
  if (smithyClient.expectString(output.signature) !== void 0) {
@@ -32360,22 +32360,22 @@ var require_dist_cjs65 = __commonJS({
32360
32360
  }
32361
32361
  return { $unknown: Object.entries(output)[0] };
32362
32362
  };
32363
- var de_ToolResultBlock = (output, context) => {
32363
+ var de_ToolResultBlock = (output, context3) => {
32364
32364
  return smithyClient.take(output, {
32365
- content: (_2) => de_ToolResultContentBlocks(_2, context),
32365
+ content: (_2) => de_ToolResultContentBlocks(_2, context3),
32366
32366
  status: smithyClient.expectString,
32367
32367
  toolUseId: smithyClient.expectString
32368
32368
  });
32369
32369
  };
32370
- var de_ToolResultContentBlock = (output, context) => {
32370
+ var de_ToolResultContentBlock = (output, context3) => {
32371
32371
  if (output.document != null) {
32372
32372
  return {
32373
- document: de_DocumentBlock(output.document, context)
32373
+ document: de_DocumentBlock(output.document, context3)
32374
32374
  };
32375
32375
  }
32376
32376
  if (output.image != null) {
32377
32377
  return {
32378
- image: de_ImageBlock(output.image, context)
32378
+ image: de_ImageBlock(output.image, context3)
32379
32379
  };
32380
32380
  }
32381
32381
  if (output.json != null) {
@@ -32388,34 +32388,34 @@ var require_dist_cjs65 = __commonJS({
32388
32388
  }
32389
32389
  if (output.video != null) {
32390
32390
  return {
32391
- video: de_VideoBlock(output.video, context)
32391
+ video: de_VideoBlock(output.video, context3)
32392
32392
  };
32393
32393
  }
32394
32394
  return { $unknown: Object.entries(output)[0] };
32395
32395
  };
32396
- var de_ToolResultContentBlocks = (output, context) => {
32396
+ var de_ToolResultContentBlocks = (output, context3) => {
32397
32397
  const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
32398
- return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context);
32398
+ return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context3);
32399
32399
  });
32400
32400
  return retVal;
32401
32401
  };
32402
- var de_ToolUseBlock = (output, context) => {
32402
+ var de_ToolUseBlock = (output, context3) => {
32403
32403
  return smithyClient.take(output, {
32404
32404
  input: (_2) => de_Document(_2),
32405
32405
  name: smithyClient.expectString,
32406
32406
  toolUseId: smithyClient.expectString
32407
32407
  });
32408
32408
  };
32409
- var de_VideoBlock = (output, context) => {
32409
+ var de_VideoBlock = (output, context3) => {
32410
32410
  return smithyClient.take(output, {
32411
32411
  format: smithyClient.expectString,
32412
- source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context)
32412
+ source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context3)
32413
32413
  });
32414
32414
  };
32415
- var de_VideoSource = (output, context) => {
32415
+ var de_VideoSource = (output, context3) => {
32416
32416
  if (output.bytes != null) {
32417
32417
  return {
32418
- bytes: context.base64Decoder(output.bytes)
32418
+ bytes: context3.base64Decoder(output.bytes)
32419
32419
  };
32420
32420
  }
32421
32421
  if (output.s3Location != null) {
@@ -32425,7 +32425,7 @@ var require_dist_cjs65 = __commonJS({
32425
32425
  }
32426
32426
  return { $unknown: Object.entries(output)[0] };
32427
32427
  };
32428
- var de_Document = (output, context) => {
32428
+ var de_Document = (output, context3) => {
32429
32429
  return output;
32430
32430
  };
32431
32431
  var deserializeMetadata3 = (output) => ({
@@ -36991,7 +36991,7 @@ var init_esm2 = __esm({
36991
36991
  free: c3.#free,
36992
36992
  // methods
36993
36993
  isBackgroundFetch: (p3) => c3.#isBackgroundFetch(p3),
36994
- backgroundFetch: (k3, index, options, context) => c3.#backgroundFetch(k3, index, options, context),
36994
+ backgroundFetch: (k3, index, options, context3) => c3.#backgroundFetch(k3, index, options, context3),
36995
36995
  moveToTail: (index) => c3.#moveToTail(index),
36996
36996
  indexes: (options) => c3.#indexes(options),
36997
36997
  rindexes: (options) => c3.#rindexes(options),
@@ -37778,7 +37778,7 @@ var init_esm2 = __esm({
37778
37778
  const v3 = this.#valList[index];
37779
37779
  return this.#isBackgroundFetch(v3) ? v3.__staleWhileFetching : v3;
37780
37780
  }
37781
- #backgroundFetch(k3, index, options, context) {
37781
+ #backgroundFetch(k3, index, options, context3) {
37782
37782
  const v3 = index === void 0 ? void 0 : this.#valList[index];
37783
37783
  if (this.#isBackgroundFetch(v3)) {
37784
37784
  return v3;
@@ -37791,7 +37791,7 @@ var init_esm2 = __esm({
37791
37791
  const fetchOpts = {
37792
37792
  signal: ac.signal,
37793
37793
  options,
37794
- context
37794
+ context: context3
37795
37795
  };
37796
37796
  const cb = (v4, updateCache = false) => {
37797
37797
  const { aborted } = ac.signal;
@@ -37908,7 +37908,7 @@ var init_esm2 = __esm({
37908
37908
  allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
37909
37909
  ignoreFetchAbort = this.ignoreFetchAbort,
37910
37910
  allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
37911
- context,
37911
+ context: context3,
37912
37912
  forceRefresh = false,
37913
37913
  status,
37914
37914
  signal
@@ -37943,7 +37943,7 @@ var init_esm2 = __esm({
37943
37943
  if (index === void 0) {
37944
37944
  if (status)
37945
37945
  status.fetch = "miss";
37946
- const p3 = this.#backgroundFetch(k3, index, options, context);
37946
+ const p3 = this.#backgroundFetch(k3, index, options, context3);
37947
37947
  return p3.__returned = p3;
37948
37948
  } else {
37949
37949
  const v3 = this.#valList[index];
@@ -37968,7 +37968,7 @@ var init_esm2 = __esm({
37968
37968
  this.#statusTTL(status, index);
37969
37969
  return v3;
37970
37970
  }
37971
- const p3 = this.#backgroundFetch(k3, index, options, context);
37971
+ const p3 = this.#backgroundFetch(k3, index, options, context3);
37972
37972
  const hasStale = p3.__staleWhileFetching !== void 0;
37973
37973
  const staleVal = hasStale && allowStale;
37974
37974
  if (status) {
@@ -37990,13 +37990,13 @@ var init_esm2 = __esm({
37990
37990
  if (!memoMethod) {
37991
37991
  throw new Error("no memoMethod provided to constructor");
37992
37992
  }
37993
- const { context, forceRefresh, ...options } = memoOptions;
37993
+ const { context: context3, forceRefresh, ...options } = memoOptions;
37994
37994
  const v3 = this.get(k3, options);
37995
37995
  if (!forceRefresh && v3 !== void 0)
37996
37996
  return v3;
37997
37997
  const vv = memoMethod(k3, v3, {
37998
37998
  options,
37999
- context
37999
+ context: context3
38000
38000
  });
38001
38001
  this.set(k3, vv, options);
38002
38002
  return vv;
@@ -55251,8 +55251,8 @@ function mapFlowchartParserError(err, text) {
55251
55251
  };
55252
55252
  }
55253
55253
  if (tokType === "QuotedString") {
55254
- const context = err?.context;
55255
- const inLinkRule = context?.ruleStack?.includes("linkTextInline") || context?.ruleStack?.includes("link") || false;
55254
+ const context3 = err?.context;
55255
+ const inLinkRule = context3?.ruleStack?.includes("linkTextInline") || context3?.ruleStack?.includes("link") || false;
55256
55256
  const lineContent = allLines[Math.max(0, line - 1)] || "";
55257
55257
  const beforeQuote = lineContent.slice(0, Math.max(0, column - 1));
55258
55258
  const hasLinkBefore = beforeQuote.match(/--\s*$|==\s*$|-\.\s*$|-\.-\s*$|\[\s*$/);
@@ -72843,7 +72843,7 @@ ${fixedContent}
72843
72843
  };
72844
72844
  }
72845
72845
  }
72846
- var HTML_ENTITY_MAP, JsonFixingAgent, MermaidFixingAgent;
72846
+ var HTML_ENTITY_MAP, sessionIdCounter, JsonFixingAgent, MermaidFixingAgent;
72847
72847
  var init_schemaUtils = __esm({
72848
72848
  "src/agent/schemaUtils.js"() {
72849
72849
  "use strict";
@@ -72859,11 +72859,12 @@ var init_schemaUtils = __esm({
72859
72859
  // Also handle XML/HTML5 apostrophe entity
72860
72860
  "&nbsp;": " "
72861
72861
  };
72862
+ sessionIdCounter = 0;
72862
72863
  JsonFixingAgent = class {
72863
72864
  constructor(options = {}) {
72864
72865
  this.ProbeAgent = null;
72865
72866
  this.options = {
72866
- sessionId: options.sessionId || `json-fixer-${Date.now()}`,
72867
+ sessionId: options.sessionId || `json-fixer-${Date.now()}-${sessionIdCounter++}`,
72867
72868
  path: options.path || process.cwd(),
72868
72869
  provider: options.provider,
72869
72870
  model: options.model,
@@ -73013,7 +73014,7 @@ Provide only the corrected JSON without any markdown formatting or explanations.
73013
73014
  constructor(options = {}) {
73014
73015
  this.ProbeAgent = null;
73015
73016
  this.options = {
73016
- sessionId: options.sessionId || `mermaid-fixer-${Date.now()}`,
73017
+ sessionId: options.sessionId || `mermaid-fixer-${Date.now()}-${sessionIdCounter++}`,
73017
73018
  path: options.path || process.cwd(),
73018
73019
  provider: options.provider,
73019
73020
  model: options.model,
@@ -76109,6 +76110,667 @@ var init_simpleTelemetry = __esm({
76109
76110
  }
76110
76111
  });
76111
76112
 
76113
+ // src/agent/fileSpanExporter.js
76114
+ var import_fs9, import_core17, ExportResultCode, FileSpanExporter;
76115
+ var init_fileSpanExporter = __esm({
76116
+ "src/agent/fileSpanExporter.js"() {
76117
+ "use strict";
76118
+ import_fs9 = require("fs");
76119
+ import_core17 = __toESM(require("@opentelemetry/core"), 1);
76120
+ ({ ExportResultCode } = import_core17.default);
76121
+ FileSpanExporter = class {
76122
+ constructor(filePath = "./traces.jsonl") {
76123
+ this.filePath = filePath;
76124
+ this.stream = (0, import_fs9.createWriteStream)(filePath, { flags: "a" });
76125
+ this.stream.on("error", (error2) => {
76126
+ console.error(`[FileSpanExporter] Stream error: ${error2.message}`);
76127
+ });
76128
+ }
76129
+ /**
76130
+ * Export spans to file
76131
+ * @param {ReadableSpan[]} spans - Array of spans to export
76132
+ * @param {function} resultCallback - Callback to call with the export result
76133
+ */
76134
+ export(spans, resultCallback) {
76135
+ if (!spans || spans.length === 0) {
76136
+ resultCallback({ code: ExportResultCode.SUCCESS });
76137
+ return;
76138
+ }
76139
+ try {
76140
+ const timestamp = Date.now();
76141
+ spans.forEach((span, index) => {
76142
+ let parentSpanId = void 0;
76143
+ if (span.parentSpanContext) {
76144
+ parentSpanId = span.parentSpanContext.spanId;
76145
+ } else if (span._parentSpanContext) {
76146
+ parentSpanId = span._parentSpanContext.spanId;
76147
+ } else if (span.parent) {
76148
+ parentSpanId = span.parent.spanId;
76149
+ } else if (span._parent) {
76150
+ parentSpanId = span._parent.spanId;
76151
+ } else if (span._parentId) {
76152
+ parentSpanId = span._parentId;
76153
+ } else if (span.parentSpanId) {
76154
+ parentSpanId = span.parentSpanId;
76155
+ }
76156
+ const spanData = {
76157
+ traceId: span.spanContext().traceId,
76158
+ spanId: span.spanContext().spanId,
76159
+ parentSpanId,
76160
+ name: span.name,
76161
+ kind: span.kind,
76162
+ startTimeUnixNano: span.startTime[0] * 1e9 + span.startTime[1],
76163
+ endTimeUnixNano: span.endTime[0] * 1e9 + span.endTime[1],
76164
+ attributes: this.convertAttributes(span.attributes),
76165
+ status: span.status,
76166
+ events: span.events?.map((event) => ({
76167
+ timeUnixNano: event.time[0] * 1e9 + event.time[1],
76168
+ name: event.name,
76169
+ attributes: this.convertAttributes(event.attributes)
76170
+ })) || [],
76171
+ links: span.links?.map((link) => ({
76172
+ traceId: link.context.traceId,
76173
+ spanId: link.context.spanId,
76174
+ attributes: this.convertAttributes(link.attributes)
76175
+ })) || [],
76176
+ resource: {
76177
+ attributes: this.convertAttributes(span.resource?.attributes || {})
76178
+ },
76179
+ instrumentationLibrary: {
76180
+ name: span.instrumentationLibrary?.name || "unknown",
76181
+ version: span.instrumentationLibrary?.version || "unknown"
76182
+ },
76183
+ timestamp
76184
+ };
76185
+ this.stream.write(JSON.stringify(spanData) + "\n");
76186
+ });
76187
+ resultCallback({ code: ExportResultCode.SUCCESS });
76188
+ } catch (error2) {
76189
+ console.error(`[FileSpanExporter] Export error: ${error2.message}`);
76190
+ resultCallback({
76191
+ code: ExportResultCode.FAILED,
76192
+ error: error2
76193
+ });
76194
+ }
76195
+ }
76196
+ /**
76197
+ * Convert OpenTelemetry attributes to plain object
76198
+ * @param {Object} attributes - OpenTelemetry attributes
76199
+ * @returns {Object} Plain object with string values
76200
+ */
76201
+ convertAttributes(attributes) {
76202
+ if (!attributes) return {};
76203
+ const result = {};
76204
+ for (const [key, value] of Object.entries(attributes)) {
76205
+ if (typeof value === "object" && value !== null) {
76206
+ result[key] = JSON.stringify(value);
76207
+ } else {
76208
+ result[key] = String(value);
76209
+ }
76210
+ }
76211
+ return result;
76212
+ }
76213
+ /**
76214
+ * Shutdown the exporter
76215
+ * @returns {Promise<void>}
76216
+ */
76217
+ async shutdown() {
76218
+ return new Promise((resolve4) => {
76219
+ if (this.stream) {
76220
+ this.stream.end(() => {
76221
+ console.log(`[FileSpanExporter] File stream closed: ${this.filePath}`);
76222
+ resolve4();
76223
+ });
76224
+ } else {
76225
+ resolve4();
76226
+ }
76227
+ });
76228
+ }
76229
+ /**
76230
+ * Force flush any pending spans
76231
+ * @returns {Promise<void>}
76232
+ */
76233
+ async forceFlush() {
76234
+ return new Promise((resolve4, reject2) => {
76235
+ if (this.stream) {
76236
+ const flushTimeout = setTimeout(() => {
76237
+ console.warn("[FileSpanExporter] Flush timeout after 5 seconds");
76238
+ resolve4();
76239
+ }, 5e3);
76240
+ if (this.stream.writableCorked) {
76241
+ this.stream.uncork();
76242
+ }
76243
+ if (this.stream.writableNeedDrain) {
76244
+ this.stream.once("drain", () => {
76245
+ clearTimeout(flushTimeout);
76246
+ resolve4();
76247
+ });
76248
+ } else {
76249
+ setImmediate(() => {
76250
+ clearTimeout(flushTimeout);
76251
+ resolve4();
76252
+ });
76253
+ }
76254
+ } else {
76255
+ resolve4();
76256
+ }
76257
+ });
76258
+ }
76259
+ };
76260
+ }
76261
+ });
76262
+
76263
+ // src/agent/telemetry.js
76264
+ function initializeTelemetryFromOptions(options) {
76265
+ const config = new TelemetryConfig({
76266
+ serviceName: "probe-agent",
76267
+ serviceVersion: "1.0.0",
76268
+ enableFile: options.traceFile !== void 0,
76269
+ enableRemote: options.traceRemote !== void 0,
76270
+ enableConsole: options.traceConsole,
76271
+ filePath: options.traceFile || "./traces.jsonl",
76272
+ remoteEndpoint: options.traceRemote || "http://localhost:4318/v1/traces"
76273
+ });
76274
+ config.initialize();
76275
+ return config;
76276
+ }
76277
+ var import_sdk_node, import_resources, import_semantic_conventions, import_api, import_exporter_trace_otlp_http, import_sdk_trace_base, import_fs10, import_path11, NodeSDK, Resource, OTLPTraceExporter, BatchSpanProcessor, ConsoleSpanExporter, TelemetryConfig;
76278
+ var init_telemetry = __esm({
76279
+ "src/agent/telemetry.js"() {
76280
+ "use strict";
76281
+ import_sdk_node = __toESM(require("@opentelemetry/sdk-node"), 1);
76282
+ import_resources = __toESM(require("@opentelemetry/resources"), 1);
76283
+ import_semantic_conventions = require("@opentelemetry/semantic-conventions");
76284
+ import_api = require("@opentelemetry/api");
76285
+ import_exporter_trace_otlp_http = __toESM(require("@opentelemetry/exporter-trace-otlp-http"), 1);
76286
+ import_sdk_trace_base = __toESM(require("@opentelemetry/sdk-trace-base"), 1);
76287
+ import_fs10 = require("fs");
76288
+ import_path11 = require("path");
76289
+ init_fileSpanExporter();
76290
+ ({ NodeSDK } = import_sdk_node.default);
76291
+ ({ Resource } = import_resources.default);
76292
+ ({ OTLPTraceExporter } = import_exporter_trace_otlp_http.default);
76293
+ ({ BatchSpanProcessor, ConsoleSpanExporter } = import_sdk_trace_base.default);
76294
+ TelemetryConfig = class {
76295
+ constructor(options = {}) {
76296
+ this.serviceName = options.serviceName || "probe-agent";
76297
+ this.serviceVersion = options.serviceVersion || "1.0.0";
76298
+ this.enableFile = options.enableFile || false;
76299
+ this.enableRemote = options.enableRemote || false;
76300
+ this.enableConsole = options.enableConsole || false;
76301
+ this.filePath = options.filePath || "./traces.jsonl";
76302
+ this.remoteEndpoint = options.remoteEndpoint || "http://localhost:4318/v1/traces";
76303
+ this.sdk = null;
76304
+ this.tracer = null;
76305
+ }
76306
+ /**
76307
+ * Initialize OpenTelemetry SDK
76308
+ */
76309
+ initialize() {
76310
+ if (this.sdk) {
76311
+ console.warn("Telemetry already initialized");
76312
+ return;
76313
+ }
76314
+ const resource = new Resource({
76315
+ [import_semantic_conventions.ATTR_SERVICE_NAME]: this.serviceName,
76316
+ [import_semantic_conventions.ATTR_SERVICE_VERSION]: this.serviceVersion
76317
+ });
76318
+ const spanProcessors = [];
76319
+ if (this.enableFile) {
76320
+ try {
76321
+ const dir = (0, import_path11.dirname)(this.filePath);
76322
+ if (!(0, import_fs10.existsSync)(dir)) {
76323
+ (0, import_fs10.mkdirSync)(dir, { recursive: true });
76324
+ }
76325
+ const fileExporter = new FileSpanExporter(this.filePath);
76326
+ spanProcessors.push(new BatchSpanProcessor(fileExporter, {
76327
+ maxQueueSize: 2048,
76328
+ maxExportBatchSize: 512,
76329
+ scheduledDelayMillis: 500,
76330
+ exportTimeoutMillis: 3e4
76331
+ }));
76332
+ console.log(`[Telemetry] File exporter enabled, writing to: ${this.filePath}`);
76333
+ } catch (error2) {
76334
+ console.error(`[Telemetry] Failed to initialize file exporter: ${error2.message}`);
76335
+ }
76336
+ }
76337
+ if (this.enableRemote) {
76338
+ try {
76339
+ const remoteExporter = new OTLPTraceExporter({
76340
+ url: this.remoteEndpoint
76341
+ });
76342
+ spanProcessors.push(new BatchSpanProcessor(remoteExporter, {
76343
+ maxQueueSize: 2048,
76344
+ maxExportBatchSize: 512,
76345
+ scheduledDelayMillis: 500,
76346
+ exportTimeoutMillis: 3e4
76347
+ }));
76348
+ console.log(`[Telemetry] Remote exporter enabled, endpoint: ${this.remoteEndpoint}`);
76349
+ } catch (error2) {
76350
+ console.error(`[Telemetry] Failed to initialize remote exporter: ${error2.message}`);
76351
+ }
76352
+ }
76353
+ if (this.enableConsole) {
76354
+ const consoleExporter = new ConsoleSpanExporter();
76355
+ spanProcessors.push(new BatchSpanProcessor(consoleExporter, {
76356
+ maxQueueSize: 2048,
76357
+ maxExportBatchSize: 512,
76358
+ scheduledDelayMillis: 500,
76359
+ exportTimeoutMillis: 3e4
76360
+ }));
76361
+ console.log(`[Telemetry] Console exporter enabled`);
76362
+ }
76363
+ if (spanProcessors.length === 0) {
76364
+ console.log("[Telemetry] No exporters configured, telemetry will not be collected");
76365
+ return;
76366
+ }
76367
+ this.sdk = new NodeSDK({
76368
+ resource,
76369
+ spanProcessors
76370
+ });
76371
+ try {
76372
+ this.sdk.start();
76373
+ this.tracer = import_api.trace.getTracer(this.serviceName, this.serviceVersion);
76374
+ console.log(`[Telemetry] OpenTelemetry SDK initialized successfully`);
76375
+ } catch (error2) {
76376
+ console.error(`[Telemetry] Failed to start OpenTelemetry SDK: ${error2.message}`);
76377
+ }
76378
+ }
76379
+ /**
76380
+ * Get the tracer instance
76381
+ */
76382
+ getTracer() {
76383
+ return this.tracer;
76384
+ }
76385
+ /**
76386
+ * Create a span with the given name and attributes
76387
+ */
76388
+ createSpan(name14, attributes = {}) {
76389
+ if (!this.tracer) {
76390
+ return null;
76391
+ }
76392
+ return this.tracer.startSpan(name14, {
76393
+ attributes
76394
+ });
76395
+ }
76396
+ /**
76397
+ * Wrap a function to automatically create spans
76398
+ */
76399
+ wrapFunction(name14, fn, attributes = {}) {
76400
+ if (!this.tracer) {
76401
+ return fn;
76402
+ }
76403
+ return async (...args) => {
76404
+ const span = this.createSpan(name14, attributes);
76405
+ if (!span) {
76406
+ return fn(...args);
76407
+ }
76408
+ try {
76409
+ const result = await import_api.context.with(import_api.trace.setSpan(import_api.context.active(), span), () => fn(...args));
76410
+ span.setStatus({ code: import_api.SpanStatusCode.OK });
76411
+ return result;
76412
+ } catch (error2) {
76413
+ span.setStatus({
76414
+ code: import_api.SpanStatusCode.ERROR,
76415
+ message: error2.message
76416
+ });
76417
+ span.recordException(error2);
76418
+ throw error2;
76419
+ } finally {
76420
+ span.end();
76421
+ }
76422
+ };
76423
+ }
76424
+ /**
76425
+ * Force flush all pending spans
76426
+ */
76427
+ async forceFlush() {
76428
+ if (this.sdk) {
76429
+ try {
76430
+ const tracerProvider = import_api.trace.getTracerProvider();
76431
+ if (tracerProvider && typeof tracerProvider.forceFlush === "function") {
76432
+ await tracerProvider.forceFlush();
76433
+ }
76434
+ await new Promise((resolve4) => setTimeout(resolve4, 100));
76435
+ console.log("[Telemetry] OpenTelemetry spans flushed successfully");
76436
+ } catch (error2) {
76437
+ console.error(`[Telemetry] Failed to flush OpenTelemetry spans: ${error2.message}`);
76438
+ }
76439
+ }
76440
+ }
76441
+ /**
76442
+ * Shutdown telemetry
76443
+ */
76444
+ async shutdown() {
76445
+ if (this.sdk) {
76446
+ try {
76447
+ await this.sdk.shutdown();
76448
+ console.log("[Telemetry] OpenTelemetry SDK shutdown successfully");
76449
+ } catch (error2) {
76450
+ console.error(`[Telemetry] Failed to shutdown OpenTelemetry SDK: ${error2.message}`);
76451
+ }
76452
+ }
76453
+ }
76454
+ };
76455
+ }
76456
+ });
76457
+
76458
+ // src/agent/appTracer.js
76459
+ var import_api2, AppTracer;
76460
+ var init_appTracer = __esm({
76461
+ "src/agent/appTracer.js"() {
76462
+ "use strict";
76463
+ import_api2 = require("@opentelemetry/api");
76464
+ AppTracer = class {
76465
+ constructor(telemetryConfig, sessionId = null) {
76466
+ this.telemetryConfig = telemetryConfig;
76467
+ this.tracer = telemetryConfig?.getTracer();
76468
+ this.sessionId = sessionId || this.generateSessionId();
76469
+ this.traceId = this.generateTraceId();
76470
+ }
76471
+ /**
76472
+ * Generate a unique session ID
76473
+ */
76474
+ generateSessionId() {
76475
+ return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
76476
+ }
76477
+ /**
76478
+ * Generate trace ID from session ID for consistent tracing
76479
+ */
76480
+ generateTraceId() {
76481
+ if (!this.sessionId) return null;
76482
+ const hash = this.hashString(this.sessionId);
76483
+ return hash.padEnd(32, "0").substring(0, 32);
76484
+ }
76485
+ /**
76486
+ * Simple hash function for session ID
76487
+ */
76488
+ hashString(str) {
76489
+ let hash = 0;
76490
+ for (let i3 = 0; i3 < str.length; i3++) {
76491
+ const char = str.charCodeAt(i3);
76492
+ hash = (hash << 5) - hash + char;
76493
+ hash = hash & hash;
76494
+ }
76495
+ return Math.abs(hash).toString(16);
76496
+ }
76497
+ /**
76498
+ * Check if tracing is enabled
76499
+ */
76500
+ isEnabled() {
76501
+ return this.tracer !== null;
76502
+ }
76503
+ /**
76504
+ * Create a root span for the agent session
76505
+ */
76506
+ createSessionSpan(attributes = {}) {
76507
+ if (!this.isEnabled()) return null;
76508
+ return this.tracer.startSpan("agent.session", {
76509
+ attributes: {
76510
+ "session.id": this.sessionId,
76511
+ "trace.id": this.traceId,
76512
+ ...attributes
76513
+ }
76514
+ });
76515
+ }
76516
+ /**
76517
+ * Create a span for AI model requests
76518
+ */
76519
+ createAISpan(modelName, provider, attributes = {}) {
76520
+ if (!this.isEnabled()) return null;
76521
+ return this.tracer.startSpan("ai.request", {
76522
+ attributes: {
76523
+ "ai.model": modelName,
76524
+ "ai.provider": provider,
76525
+ "session.id": this.sessionId,
76526
+ ...attributes
76527
+ }
76528
+ });
76529
+ }
76530
+ /**
76531
+ * Create a span for tool calls
76532
+ */
76533
+ createToolSpan(toolName, attributes = {}) {
76534
+ if (!this.isEnabled()) return null;
76535
+ return this.tracer.startSpan("tool.call", {
76536
+ attributes: {
76537
+ "tool.name": toolName,
76538
+ "session.id": this.sessionId,
76539
+ ...attributes
76540
+ }
76541
+ });
76542
+ }
76543
+ /**
76544
+ * Create a span for code search operations
76545
+ */
76546
+ createSearchSpan(query2, attributes = {}) {
76547
+ if (!this.isEnabled()) return null;
76548
+ return this.tracer.startSpan("search.query", {
76549
+ attributes: {
76550
+ "search.query": query2,
76551
+ "session.id": this.sessionId,
76552
+ ...attributes
76553
+ }
76554
+ });
76555
+ }
76556
+ /**
76557
+ * Create a span for code extraction operations
76558
+ */
76559
+ createExtractSpan(files, attributes = {}) {
76560
+ if (!this.isEnabled()) return null;
76561
+ return this.tracer.startSpan("extract.files", {
76562
+ attributes: {
76563
+ "extract.file_count": Array.isArray(files) ? files.length : 1,
76564
+ "extract.files": Array.isArray(files) ? files.join(",") : files,
76565
+ "session.id": this.sessionId,
76566
+ ...attributes
76567
+ }
76568
+ });
76569
+ }
76570
+ /**
76571
+ * Create a span for agent iterations
76572
+ */
76573
+ createIterationSpan(iteration, attributes = {}) {
76574
+ if (!this.isEnabled()) return null;
76575
+ return this.tracer.startSpan("agent.iteration", {
76576
+ attributes: {
76577
+ "iteration.number": iteration,
76578
+ "session.id": this.sessionId,
76579
+ ...attributes
76580
+ }
76581
+ });
76582
+ }
76583
+ /**
76584
+ * Create a span for delegation operations
76585
+ */
76586
+ createDelegationSpan(task, attributes = {}) {
76587
+ if (!this.isEnabled()) return null;
76588
+ return this.tracer.startSpan("agent.delegation", {
76589
+ attributes: {
76590
+ "delegation.task": task.substring(0, 200) + (task.length > 200 ? "..." : ""),
76591
+ "delegation.task_length": task.length,
76592
+ "session.id": this.sessionId,
76593
+ ...attributes
76594
+ }
76595
+ });
76596
+ }
76597
+ /**
76598
+ * Create a span for JSON validation operations
76599
+ */
76600
+ createJsonValidationSpan(responseLength, attributes = {}) {
76601
+ if (!this.isEnabled()) return null;
76602
+ return this.tracer.startSpan("validation.json", {
76603
+ attributes: {
76604
+ "validation.response_length": responseLength,
76605
+ "session.id": this.sessionId,
76606
+ ...attributes
76607
+ }
76608
+ });
76609
+ }
76610
+ /**
76611
+ * Create a span for Mermaid validation operations
76612
+ */
76613
+ createMermaidValidationSpan(diagramCount, attributes = {}) {
76614
+ if (!this.isEnabled()) return null;
76615
+ return this.tracer.startSpan("validation.mermaid", {
76616
+ attributes: {
76617
+ "validation.diagram_count": diagramCount,
76618
+ "session.id": this.sessionId,
76619
+ ...attributes
76620
+ }
76621
+ });
76622
+ }
76623
+ /**
76624
+ * Create a span for schema processing operations
76625
+ */
76626
+ createSchemaProcessingSpan(schemaType, attributes = {}) {
76627
+ if (!this.isEnabled()) return null;
76628
+ return this.tracer.startSpan("schema.processing", {
76629
+ attributes: {
76630
+ "schema.type": schemaType,
76631
+ "session.id": this.sessionId,
76632
+ ...attributes
76633
+ }
76634
+ });
76635
+ }
76636
+ /**
76637
+ * Record delegation events
76638
+ */
76639
+ recordDelegationEvent(eventType, data2 = {}) {
76640
+ if (!this.isEnabled()) return;
76641
+ this.addEvent(`delegation.${eventType}`, {
76642
+ "session.id": this.sessionId,
76643
+ ...data2
76644
+ });
76645
+ }
76646
+ /**
76647
+ * Record JSON validation events
76648
+ */
76649
+ recordJsonValidationEvent(eventType, data2 = {}) {
76650
+ if (!this.isEnabled()) return;
76651
+ this.addEvent(`json_validation.${eventType}`, {
76652
+ "session.id": this.sessionId,
76653
+ ...data2
76654
+ });
76655
+ }
76656
+ /**
76657
+ * Record Mermaid validation events
76658
+ */
76659
+ recordMermaidValidationEvent(eventType, data2 = {}) {
76660
+ if (!this.isEnabled()) return;
76661
+ this.addEvent(`mermaid_validation.${eventType}`, {
76662
+ "session.id": this.sessionId,
76663
+ ...data2
76664
+ });
76665
+ }
76666
+ /**
76667
+ * Add an event to the current or most recent span
76668
+ */
76669
+ addEvent(name14, attributes = {}) {
76670
+ if (!this.isEnabled()) return;
76671
+ const activeSpan = import_api2.trace.getActiveSpan();
76672
+ if (activeSpan) {
76673
+ activeSpan.addEvent(name14, {
76674
+ "session.id": this.sessionId,
76675
+ ...attributes
76676
+ });
76677
+ } else {
76678
+ if (this.telemetryConfig?.enableConsole) {
76679
+ console.log(`[Event] ${name14}:`, attributes);
76680
+ }
76681
+ }
76682
+ }
76683
+ /**
76684
+ * Set attributes on the current span
76685
+ */
76686
+ setAttributes(attributes) {
76687
+ if (!this.isEnabled()) return;
76688
+ const activeSpan = import_api2.trace.getActiveSpan();
76689
+ if (activeSpan) {
76690
+ activeSpan.setAttributes({
76691
+ "session.id": this.sessionId,
76692
+ ...attributes
76693
+ });
76694
+ }
76695
+ }
76696
+ /**
76697
+ * Wrap a function with automatic span creation
76698
+ */
76699
+ wrapFunction(spanName, fn, attributes = {}) {
76700
+ if (!this.isEnabled()) {
76701
+ return fn;
76702
+ }
76703
+ return async (...args) => {
76704
+ const span = this.tracer.startSpan(spanName, {
76705
+ attributes: {
76706
+ "session.id": this.sessionId,
76707
+ ...attributes
76708
+ }
76709
+ });
76710
+ try {
76711
+ const result = await import_api2.context.with(import_api2.trace.setSpan(import_api2.context.active(), span), () => fn(...args));
76712
+ span.setStatus({ code: import_api2.SpanStatusCode.OK });
76713
+ return result;
76714
+ } catch (error2) {
76715
+ span.setStatus({
76716
+ code: import_api2.SpanStatusCode.ERROR,
76717
+ message: error2.message
76718
+ });
76719
+ span.recordException(error2);
76720
+ throw error2;
76721
+ } finally {
76722
+ span.end();
76723
+ }
76724
+ };
76725
+ }
76726
+ /**
76727
+ * Execute a function within a span context
76728
+ */
76729
+ async withSpan(spanName, fn, attributes = {}) {
76730
+ if (!this.isEnabled()) {
76731
+ return fn();
76732
+ }
76733
+ const span = this.tracer.startSpan(spanName, {
76734
+ attributes: {
76735
+ "session.id": this.sessionId,
76736
+ ...attributes
76737
+ }
76738
+ });
76739
+ try {
76740
+ const result = await import_api2.context.with(import_api2.trace.setSpan(import_api2.context.active(), span), () => fn());
76741
+ span.setStatus({ code: import_api2.SpanStatusCode.OK });
76742
+ return result;
76743
+ } catch (error2) {
76744
+ span.setStatus({
76745
+ code: import_api2.SpanStatusCode.ERROR,
76746
+ message: error2.message
76747
+ });
76748
+ span.recordException(error2);
76749
+ throw error2;
76750
+ } finally {
76751
+ span.end();
76752
+ }
76753
+ }
76754
+ /**
76755
+ * Force flush all pending spans
76756
+ */
76757
+ async flush() {
76758
+ if (this.telemetryConfig) {
76759
+ await this.telemetryConfig.forceFlush();
76760
+ }
76761
+ }
76762
+ /**
76763
+ * Shutdown tracing
76764
+ */
76765
+ async shutdown() {
76766
+ if (this.telemetryConfig) {
76767
+ await this.telemetryConfig.shutdown();
76768
+ }
76769
+ }
76770
+ };
76771
+ }
76772
+ });
76773
+
76112
76774
  // src/agent/storage/index.js
76113
76775
  var init_storage = __esm({
76114
76776
  "src/agent/storage/index.js"() {
@@ -76129,6 +76791,7 @@ var init_hooks = __esm({
76129
76791
  // src/index.js
76130
76792
  var index_exports = {};
76131
76793
  __export(index_exports, {
76794
+ AppTracer: () => AppTracer,
76132
76795
  DEFAULT_SYSTEM_MESSAGE: () => DEFAULT_SYSTEM_MESSAGE,
76133
76796
  HOOK_TYPES: () => HOOK_TYPES,
76134
76797
  HookManager: () => HookManager,
@@ -76137,6 +76800,7 @@ __export(index_exports, {
76137
76800
  SimpleAppTracer: () => SimpleAppTracer,
76138
76801
  SimpleTelemetry: () => SimpleTelemetry,
76139
76802
  StorageAdapter: () => StorageAdapter,
76803
+ TelemetryConfig: () => TelemetryConfig,
76140
76804
  attemptCompletionSchema: () => attemptCompletionSchema,
76141
76805
  attemptCompletionToolDefinition: () => attemptCompletionToolDefinition,
76142
76806
  bashSchema: () => bashSchema,
@@ -76153,6 +76817,7 @@ __export(index_exports, {
76153
76817
  getBinaryPath: () => getBinaryPath,
76154
76818
  grep: () => grep,
76155
76819
  initializeSimpleTelemetryFromOptions: () => initializeSimpleTelemetryFromOptions,
76820
+ initializeTelemetryFromOptions: () => initializeTelemetryFromOptions,
76156
76821
  listFilesByLevel: () => listFilesByLevel,
76157
76822
  listFilesToolInstance: () => listFilesToolInstance,
76158
76823
  parseXmlToolCall: () => parseXmlToolCall,
@@ -76185,6 +76850,8 @@ var init_index = __esm({
76185
76850
  init_bash();
76186
76851
  init_ProbeAgent();
76187
76852
  init_simpleTelemetry();
76853
+ init_telemetry();
76854
+ init_appTracer();
76188
76855
  init_probeTool();
76189
76856
  init_storage();
76190
76857
  init_hooks();
@@ -76193,6 +76860,7 @@ var init_index = __esm({
76193
76860
  init_index();
76194
76861
  // Annotate the CommonJS export names for ESM import in node:
76195
76862
  0 && (module.exports = {
76863
+ AppTracer,
76196
76864
  DEFAULT_SYSTEM_MESSAGE,
76197
76865
  HOOK_TYPES,
76198
76866
  HookManager,
@@ -76201,6 +76869,7 @@ init_index();
76201
76869
  SimpleAppTracer,
76202
76870
  SimpleTelemetry,
76203
76871
  StorageAdapter,
76872
+ TelemetryConfig,
76204
76873
  attemptCompletionSchema,
76205
76874
  attemptCompletionToolDefinition,
76206
76875
  bashSchema,
@@ -76217,6 +76886,7 @@ init_index();
76217
76886
  getBinaryPath,
76218
76887
  grep,
76219
76888
  initializeSimpleTelemetryFromOptions,
76889
+ initializeTelemetryFromOptions,
76220
76890
  listFilesByLevel,
76221
76891
  listFilesToolInstance,
76222
76892
  parseXmlToolCall,