@probelabs/probe 0.6.0-rc146 → 0.6.0-rc148
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/bin/binaries/probe-v0.6.0-rc148-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-aarch64-unknown-linux-gnu.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-unknown-linux-gnu.tar.gz +0 -0
- package/bin/probe +12 -3
- package/build/agent/index.js +18 -404
- package/build/extractor.js +271 -0
- package/build/index.js +1 -7
- package/cjs/agent/ProbeAgent.cjs +659 -697
- package/cjs/index.cjs +610 -1274
- package/package.json +4 -12
- package/scripts/postinstall.js +75 -47
- package/src/extractor.js +271 -0
- package/src/index.js +1 -7
- package/build/agent/appTracer.js +0 -360
- package/build/agent/fileSpanExporter.js +0 -167
- package/build/agent/telemetry.js +0 -219
- package/cjs/agent/telemetry.cjs +0 -358
- package/src/agent/appTracer.js +0 -360
- package/src/agent/fileSpanExporter.js +0 -167
- package/src/agent/telemetry.js +0 -219
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -986,11 +986,11 @@ var require_dist_cjs3 = __commonJS({
|
|
|
986
986
|
eventStreamPayloadHandler
|
|
987
987
|
});
|
|
988
988
|
}
|
|
989
|
-
var eventStreamHandlingMiddleware = (options) => (next,
|
|
989
|
+
var eventStreamHandlingMiddleware = (options) => (next, context) => async (args) => {
|
|
990
990
|
const { request } = args;
|
|
991
991
|
if (!protocolHttp.HttpRequest.isInstance(request))
|
|
992
992
|
return next(args);
|
|
993
|
-
return options.eventStreamPayloadHandler.handle(next, args,
|
|
993
|
+
return options.eventStreamPayloadHandler.handle(next, args, context);
|
|
994
994
|
};
|
|
995
995
|
var eventStreamHandlingMiddlewareOptions = {
|
|
996
996
|
tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"],
|
|
@@ -1081,13 +1081,13 @@ var require_dist_cjs4 = __commonJS({
|
|
|
1081
1081
|
var require_dist_cjs5 = __commonJS({
|
|
1082
1082
|
"node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2) {
|
|
1083
1083
|
"use strict";
|
|
1084
|
-
var loggerMiddleware = () => (next,
|
|
1084
|
+
var loggerMiddleware = () => (next, context) => async (args) => {
|
|
1085
1085
|
try {
|
|
1086
1086
|
const response = await next(args);
|
|
1087
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
1087
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
|
|
1088
1088
|
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
1089
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
1090
|
-
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ??
|
|
1089
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
1090
|
+
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
|
|
1091
1091
|
const { $metadata, ...outputWithoutMetadata } = response.output;
|
|
1092
1092
|
logger2?.info?.({
|
|
1093
1093
|
clientName,
|
|
@@ -1098,9 +1098,9 @@ var require_dist_cjs5 = __commonJS({
|
|
|
1098
1098
|
});
|
|
1099
1099
|
return response;
|
|
1100
1100
|
} catch (error2) {
|
|
1101
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
1101
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
|
|
1102
1102
|
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
1103
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
1103
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
1104
1104
|
logger2?.error?.({
|
|
1105
1105
|
clientName,
|
|
1106
1106
|
commandName,
|
|
@@ -1150,8 +1150,8 @@ var require_invoke_store = __commonJS({
|
|
|
1150
1150
|
/**
|
|
1151
1151
|
* Initialize and run code within an invoke context
|
|
1152
1152
|
*/
|
|
1153
|
-
static run(
|
|
1154
|
-
return this.storage.run({ ...
|
|
1153
|
+
static run(context, fn) {
|
|
1154
|
+
return this.storage.run({ ...context }, fn);
|
|
1155
1155
|
}
|
|
1156
1156
|
/**
|
|
1157
1157
|
* Get the complete current context
|
|
@@ -1163,8 +1163,8 @@ var require_invoke_store = __commonJS({
|
|
|
1163
1163
|
* Get a specific value from the context by key
|
|
1164
1164
|
*/
|
|
1165
1165
|
static get(key) {
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1166
|
+
const context = this.storage.getStore();
|
|
1167
|
+
return context?.[key];
|
|
1168
1168
|
}
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Set a custom value in the current context
|
|
@@ -1174,9 +1174,9 @@ var require_invoke_store = __commonJS({
|
|
|
1174
1174
|
if (this.isProtectedKey(key)) {
|
|
1175
1175
|
throw new Error(`Cannot modify protected Lambda context field`);
|
|
1176
1176
|
}
|
|
1177
|
-
const
|
|
1178
|
-
if (
|
|
1179
|
-
|
|
1177
|
+
const context = this.storage.getStore();
|
|
1178
|
+
if (context) {
|
|
1179
|
+
context[key] = value;
|
|
1180
1180
|
}
|
|
1181
1181
|
}
|
|
1182
1182
|
/**
|
|
@@ -1288,7 +1288,7 @@ var import_types, getSmithyContext;
|
|
|
1288
1288
|
var init_getSmithyContext = __esm({
|
|
1289
1289
|
"node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
|
|
1290
1290
|
import_types = __toESM(require_dist_cjs());
|
|
1291
|
-
getSmithyContext = (
|
|
1291
|
+
getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
|
|
1292
1292
|
}
|
|
1293
1293
|
});
|
|
1294
1294
|
|
|
@@ -1297,7 +1297,7 @@ var require_dist_cjs7 = __commonJS({
|
|
|
1297
1297
|
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
|
|
1298
1298
|
"use strict";
|
|
1299
1299
|
var types2 = require_dist_cjs();
|
|
1300
|
-
var getSmithyContext9 = (
|
|
1300
|
+
var getSmithyContext9 = (context) => context[types2.SMITHY_CONTEXT_KEY] || (context[types2.SMITHY_CONTEXT_KEY] = {});
|
|
1301
1301
|
var normalizeProvider4 = (input) => {
|
|
1302
1302
|
if (typeof input === "function")
|
|
1303
1303
|
return input;
|
|
@@ -1349,12 +1349,12 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1349
1349
|
"node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
|
|
1350
1350
|
import_util_middleware = __toESM(require_dist_cjs7());
|
|
1351
1351
|
init_resolveAuthOptions();
|
|
1352
|
-
httpAuthSchemeMiddleware = (config, mwOptions) => (next,
|
|
1353
|
-
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config,
|
|
1352
|
+
httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
|
|
1353
|
+
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
|
|
1354
1354
|
const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
|
|
1355
1355
|
const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
|
|
1356
1356
|
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
1357
|
-
const smithyContext = (0, import_util_middleware.getSmithyContext)(
|
|
1357
|
+
const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
|
|
1358
1358
|
const failureReasons = [];
|
|
1359
1359
|
for (const option of resolvedOptions) {
|
|
1360
1360
|
const scheme = authSchemes.get(option.schemeId);
|
|
@@ -1367,7 +1367,7 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1367
1367
|
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
|
|
1368
1368
|
continue;
|
|
1369
1369
|
}
|
|
1370
|
-
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config,
|
|
1370
|
+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
|
|
1371
1371
|
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
|
|
1372
1372
|
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
|
|
1373
1373
|
smithyContext.selectedHttpAuthScheme = {
|
|
@@ -1414,7 +1414,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1414
1414
|
"node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
|
|
1415
1415
|
"use strict";
|
|
1416
1416
|
var protocolHttp = require_dist_cjs2();
|
|
1417
|
-
var deserializerMiddleware = (options, deserializer) => (next,
|
|
1417
|
+
var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
|
|
1418
1418
|
const { response } = await next(args);
|
|
1419
1419
|
try {
|
|
1420
1420
|
const parsed = await deserializer(response, options);
|
|
@@ -1431,10 +1431,10 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1431
1431
|
try {
|
|
1432
1432
|
error2.message += "\n " + hint;
|
|
1433
1433
|
} catch (e3) {
|
|
1434
|
-
if (!
|
|
1434
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
1435
1435
|
console.warn(hint);
|
|
1436
1436
|
} else {
|
|
1437
|
-
|
|
1437
|
+
context.logger?.warn?.(hint);
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -1464,9 +1464,9 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1464
1464
|
return k3.match(pattern);
|
|
1465
1465
|
}) || [void 0, void 0])[1];
|
|
1466
1466
|
};
|
|
1467
|
-
var serializerMiddleware = (options, serializer) => (next,
|
|
1467
|
+
var serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
|
|
1468
1468
|
const endpointConfig = options;
|
|
1469
|
-
const endpoint =
|
|
1469
|
+
const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;
|
|
1470
1470
|
if (!endpoint) {
|
|
1471
1471
|
throw new Error("No valid endpoint provider available.");
|
|
1472
1472
|
}
|
|
@@ -1549,11 +1549,11 @@ var init_httpSigningMiddleware = __esm({
|
|
|
1549
1549
|
};
|
|
1550
1550
|
defaultSuccessHandler = (httpResponse, signingProperties) => {
|
|
1551
1551
|
};
|
|
1552
|
-
httpSigningMiddleware = (config) => (next,
|
|
1552
|
+
httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
1553
1553
|
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
|
|
1554
1554
|
return next(args);
|
|
1555
1555
|
}
|
|
1556
|
-
const smithyContext = (0, import_util_middleware2.getSmithyContext)(
|
|
1556
|
+
const smithyContext = (0, import_util_middleware2.getSmithyContext)(context);
|
|
1557
1557
|
const scheme = smithyContext.selectedHttpAuthScheme;
|
|
1558
1558
|
if (!scheme) {
|
|
1559
1559
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
@@ -3540,14 +3540,14 @@ var import_util_stream, collectBody;
|
|
|
3540
3540
|
var init_collect_stream_body = __esm({
|
|
3541
3541
|
"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
|
|
3542
3542
|
import_util_stream = __toESM(require_dist_cjs18());
|
|
3543
|
-
collectBody = async (streamBody = new Uint8Array(),
|
|
3543
|
+
collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
3544
3544
|
if (streamBody instanceof Uint8Array) {
|
|
3545
3545
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
3546
3546
|
}
|
|
3547
3547
|
if (!streamBody) {
|
|
3548
3548
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
3549
3549
|
}
|
|
3550
|
-
const fromContext =
|
|
3550
|
+
const fromContext = context.streamCollector(streamBody);
|
|
3551
3551
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
3552
3552
|
};
|
|
3553
3553
|
}
|
|
@@ -3598,14 +3598,14 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3598
3598
|
import_protocol_http2 = __toESM(require_dist_cjs2());
|
|
3599
3599
|
import_util_middleware3 = __toESM(require_dist_cjs7());
|
|
3600
3600
|
init_operation();
|
|
3601
|
-
schemaDeserializationMiddleware = (config) => (next,
|
|
3601
|
+
schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
|
|
3602
3602
|
const { response } = await next(args);
|
|
3603
|
-
const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(
|
|
3603
|
+
const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context);
|
|
3604
3604
|
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
3605
3605
|
try {
|
|
3606
3606
|
const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t3, i3, o3), {
|
|
3607
3607
|
...config,
|
|
3608
|
-
...
|
|
3608
|
+
...context
|
|
3609
3609
|
}, response);
|
|
3610
3610
|
return {
|
|
3611
3611
|
response,
|
|
@@ -3620,10 +3620,10 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3620
3620
|
try {
|
|
3621
3621
|
error2.message += "\n " + hint;
|
|
3622
3622
|
} catch (e3) {
|
|
3623
|
-
if (!
|
|
3623
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
3624
3624
|
console.warn(hint);
|
|
3625
3625
|
} else {
|
|
3626
|
-
|
|
3626
|
+
context.logger?.warn?.(hint);
|
|
3627
3627
|
}
|
|
3628
3628
|
}
|
|
3629
3629
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -3662,13 +3662,13 @@ var init_schemaSerializationMiddleware = __esm({
|
|
|
3662
3662
|
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
3663
3663
|
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
3664
3664
|
init_operation();
|
|
3665
|
-
schemaSerializationMiddleware = (config) => (next,
|
|
3666
|
-
const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(
|
|
3665
|
+
schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
|
|
3666
|
+
const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context);
|
|
3667
3667
|
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
3668
|
-
const endpoint =
|
|
3668
|
+
const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;
|
|
3669
3669
|
const request = await config.protocol.serializeRequest(operation(ns, n3, t3, i3, o3), args.input, {
|
|
3670
3670
|
...config,
|
|
3671
|
-
...
|
|
3671
|
+
...context,
|
|
3672
3672
|
endpoint
|
|
3673
3673
|
});
|
|
3674
3674
|
return next({
|
|
@@ -4794,14 +4794,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
|
|
4794
4794
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
4795
4795
|
var _2, done = false;
|
|
4796
4796
|
for (var i3 = decorators.length - 1; i3 >= 0; i3--) {
|
|
4797
|
-
var
|
|
4798
|
-
for (var p3 in contextIn)
|
|
4799
|
-
for (var p3 in contextIn.access)
|
|
4800
|
-
|
|
4797
|
+
var context = {};
|
|
4798
|
+
for (var p3 in contextIn) context[p3] = p3 === "access" ? {} : contextIn[p3];
|
|
4799
|
+
for (var p3 in contextIn.access) context.access[p3] = contextIn.access[p3];
|
|
4800
|
+
context.addInitializer = function(f3) {
|
|
4801
4801
|
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
4802
4802
|
extraInitializers.push(accept(f3 || null));
|
|
4803
4803
|
};
|
|
4804
|
-
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key],
|
|
4804
|
+
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
4805
4805
|
if (kind === "accessor") {
|
|
4806
4806
|
if (result === void 0) continue;
|
|
4807
4807
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
@@ -5938,20 +5938,20 @@ var init_HttpProtocol = __esm({
|
|
|
5938
5938
|
getDefaultContentType() {
|
|
5939
5939
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
5940
5940
|
}
|
|
5941
|
-
async deserializeHttpMessage(schema,
|
|
5941
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
5942
5942
|
void schema;
|
|
5943
|
-
void
|
|
5943
|
+
void context;
|
|
5944
5944
|
void response;
|
|
5945
5945
|
void arg4;
|
|
5946
5946
|
void arg5;
|
|
5947
5947
|
return [];
|
|
5948
5948
|
}
|
|
5949
5949
|
getEventStreamMarshaller() {
|
|
5950
|
-
const
|
|
5951
|
-
if (!
|
|
5950
|
+
const context = this.serdeContext;
|
|
5951
|
+
if (!context.eventStreamMarshaller) {
|
|
5952
5952
|
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
5953
5953
|
}
|
|
5954
|
-
return
|
|
5954
|
+
return context.eventStreamMarshaller;
|
|
5955
5955
|
}
|
|
5956
5956
|
};
|
|
5957
5957
|
}
|
|
@@ -5969,14 +5969,14 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5969
5969
|
init_extended_encode_uri_component();
|
|
5970
5970
|
init_HttpProtocol();
|
|
5971
5971
|
HttpBindingProtocol = class extends HttpProtocol {
|
|
5972
|
-
async serializeRequest(operationSchema, _input,
|
|
5972
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
5973
5973
|
const input = {
|
|
5974
5974
|
..._input ?? {}
|
|
5975
5975
|
};
|
|
5976
5976
|
const serializer = this.serializer;
|
|
5977
5977
|
const query2 = {};
|
|
5978
5978
|
const headers = {};
|
|
5979
|
-
const endpoint = await
|
|
5979
|
+
const endpoint = await context.endpoint();
|
|
5980
5980
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
5981
5981
|
const schema = ns.getSchema();
|
|
5982
5982
|
let hasNonHttpBindingMember = false;
|
|
@@ -6101,16 +6101,16 @@ var init_HttpBindingProtocol = __esm({
|
|
|
6101
6101
|
query2[traits.httpQuery] = serializer.flush();
|
|
6102
6102
|
}
|
|
6103
6103
|
}
|
|
6104
|
-
async deserializeResponse(operationSchema,
|
|
6104
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
6105
6105
|
const deserializer = this.deserializer;
|
|
6106
6106
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
6107
6107
|
const dataObject = {};
|
|
6108
6108
|
if (response.statusCode >= 300) {
|
|
6109
|
-
const bytes = await collectBody(response.body,
|
|
6109
|
+
const bytes = await collectBody(response.body, context);
|
|
6110
6110
|
if (bytes.byteLength > 0) {
|
|
6111
6111
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
6112
6112
|
}
|
|
6113
|
-
await this.handleError(operationSchema,
|
|
6113
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
6114
6114
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
6115
6115
|
}
|
|
6116
6116
|
for (const header in response.headers) {
|
|
@@ -6118,9 +6118,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
6118
6118
|
delete response.headers[header];
|
|
6119
6119
|
response.headers[header.toLowerCase()] = value;
|
|
6120
6120
|
}
|
|
6121
|
-
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns,
|
|
6121
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
6122
6122
|
if (nonHttpBindingMembers.length) {
|
|
6123
|
-
const bytes = await collectBody(response.body,
|
|
6123
|
+
const bytes = await collectBody(response.body, context);
|
|
6124
6124
|
if (bytes.byteLength > 0) {
|
|
6125
6125
|
const dataFromBody = await deserializer.read(ns, bytes);
|
|
6126
6126
|
for (const member2 of nonHttpBindingMembers) {
|
|
@@ -6131,7 +6131,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
6131
6131
|
dataObject.$metadata = this.deserializeMetadata(response);
|
|
6132
6132
|
return dataObject;
|
|
6133
6133
|
}
|
|
6134
|
-
async deserializeHttpMessage(schema,
|
|
6134
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
6135
6135
|
let dataObject;
|
|
6136
6136
|
if (arg4 instanceof Set) {
|
|
6137
6137
|
dataObject = arg5;
|
|
@@ -6156,7 +6156,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
6156
6156
|
dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
|
|
6157
6157
|
}
|
|
6158
6158
|
} else if (response.body) {
|
|
6159
|
-
const bytes = await collectBody(response.body,
|
|
6159
|
+
const bytes = await collectBody(response.body, context);
|
|
6160
6160
|
if (bytes.byteLength > 0) {
|
|
6161
6161
|
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
6162
6162
|
}
|
|
@@ -6213,11 +6213,11 @@ var init_RpcProtocol = __esm({
|
|
|
6213
6213
|
init_collect_stream_body();
|
|
6214
6214
|
init_HttpProtocol();
|
|
6215
6215
|
RpcProtocol = class extends HttpProtocol {
|
|
6216
|
-
async serializeRequest(operationSchema, input,
|
|
6216
|
+
async serializeRequest(operationSchema, input, context) {
|
|
6217
6217
|
const serializer = this.serializer;
|
|
6218
6218
|
const query2 = {};
|
|
6219
6219
|
const headers = {};
|
|
6220
|
-
const endpoint = await
|
|
6220
|
+
const endpoint = await context.endpoint();
|
|
6221
6221
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
6222
6222
|
const schema = ns.getSchema();
|
|
6223
6223
|
let payload2;
|
|
@@ -6266,16 +6266,16 @@ var init_RpcProtocol = __esm({
|
|
|
6266
6266
|
request.method = "POST";
|
|
6267
6267
|
return request;
|
|
6268
6268
|
}
|
|
6269
|
-
async deserializeResponse(operationSchema,
|
|
6269
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
6270
6270
|
const deserializer = this.deserializer;
|
|
6271
6271
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
6272
6272
|
const dataObject = {};
|
|
6273
6273
|
if (response.statusCode >= 300) {
|
|
6274
|
-
const bytes = await collectBody(response.body,
|
|
6274
|
+
const bytes = await collectBody(response.body, context);
|
|
6275
6275
|
if (bytes.byteLength > 0) {
|
|
6276
6276
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
6277
6277
|
}
|
|
6278
|
-
await this.handleError(operationSchema,
|
|
6278
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
6279
6279
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
6280
6280
|
}
|
|
6281
6281
|
for (const header in response.headers) {
|
|
@@ -6291,7 +6291,7 @@ var init_RpcProtocol = __esm({
|
|
|
6291
6291
|
initialResponseContainer: dataObject
|
|
6292
6292
|
});
|
|
6293
6293
|
} else {
|
|
6294
|
-
const bytes = await collectBody(response.body,
|
|
6294
|
+
const bytes = await collectBody(response.body, context);
|
|
6295
6295
|
if (bytes.byteLength > 0) {
|
|
6296
6296
|
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
6297
6297
|
}
|
|
@@ -6324,8 +6324,8 @@ var init_resolve_path = __esm({
|
|
|
6324
6324
|
});
|
|
6325
6325
|
|
|
6326
6326
|
// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
|
|
6327
|
-
function requestBuilder(input,
|
|
6328
|
-
return new RequestBuilder(input,
|
|
6327
|
+
function requestBuilder(input, context) {
|
|
6328
|
+
return new RequestBuilder(input, context);
|
|
6329
6329
|
}
|
|
6330
6330
|
var import_protocol_http6, RequestBuilder;
|
|
6331
6331
|
var init_requestBuilder = __esm({
|
|
@@ -6342,9 +6342,9 @@ var init_requestBuilder = __esm({
|
|
|
6342
6342
|
body = null;
|
|
6343
6343
|
hostname = "";
|
|
6344
6344
|
resolvePathStack = [];
|
|
6345
|
-
constructor(input,
|
|
6345
|
+
constructor(input, context) {
|
|
6346
6346
|
this.input = input;
|
|
6347
|
-
this.context =
|
|
6347
|
+
this.context = context;
|
|
6348
6348
|
}
|
|
6349
6349
|
async build() {
|
|
6350
6350
|
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
@@ -6713,15 +6713,15 @@ var init_requestBuilder2 = __esm({
|
|
|
6713
6713
|
});
|
|
6714
6714
|
|
|
6715
6715
|
// node_modules/@smithy/core/dist-es/setFeature.js
|
|
6716
|
-
function setFeature(
|
|
6717
|
-
if (!
|
|
6718
|
-
|
|
6716
|
+
function setFeature(context, feature, value) {
|
|
6717
|
+
if (!context.__smithy_context) {
|
|
6718
|
+
context.__smithy_context = {
|
|
6719
6719
|
features: {}
|
|
6720
6720
|
};
|
|
6721
|
-
} else if (!
|
|
6722
|
-
|
|
6721
|
+
} else if (!context.__smithy_context.features) {
|
|
6722
|
+
context.__smithy_context.features = {};
|
|
6723
6723
|
}
|
|
6724
|
-
|
|
6724
|
+
context.__smithy_context.features[feature] = value;
|
|
6725
6725
|
}
|
|
6726
6726
|
var init_setFeature = __esm({
|
|
6727
6727
|
"node_modules/@smithy/core/dist-es/setFeature.js"() {
|
|
@@ -7864,15 +7864,15 @@ var init_setCredentialFeature = __esm({
|
|
|
7864
7864
|
});
|
|
7865
7865
|
|
|
7866
7866
|
// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
7867
|
-
function setFeature2(
|
|
7868
|
-
if (!
|
|
7869
|
-
|
|
7867
|
+
function setFeature2(context, feature, value) {
|
|
7868
|
+
if (!context.__aws_sdk_context) {
|
|
7869
|
+
context.__aws_sdk_context = {
|
|
7870
7870
|
features: {}
|
|
7871
7871
|
};
|
|
7872
|
-
} else if (!
|
|
7873
|
-
|
|
7872
|
+
} else if (!context.__aws_sdk_context.features) {
|
|
7873
|
+
context.__aws_sdk_context.features = {};
|
|
7874
7874
|
}
|
|
7875
|
-
|
|
7875
|
+
context.__aws_sdk_context.features[feature] = value;
|
|
7876
7876
|
}
|
|
7877
7877
|
var init_setFeature2 = __esm({
|
|
7878
7878
|
"node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
|
|
@@ -7973,9 +7973,9 @@ var init_AwsSdkSigV4Signer = __esm({
|
|
|
7973
7973
|
return property2;
|
|
7974
7974
|
};
|
|
7975
7975
|
validateSigningProperties = async (signingProperties) => {
|
|
7976
|
-
const
|
|
7976
|
+
const context = throwSigningPropertyError("context", signingProperties.context);
|
|
7977
7977
|
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
7978
|
-
const authScheme =
|
|
7978
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
|
7979
7979
|
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
7980
7980
|
const signer = await signerFunction(authScheme);
|
|
7981
7981
|
const signingRegion = signingProperties?.signingRegion;
|
|
@@ -9833,8 +9833,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9833
9833
|
getPayloadCodec() {
|
|
9834
9834
|
return this.codec;
|
|
9835
9835
|
}
|
|
9836
|
-
async serializeRequest(operationSchema, input,
|
|
9837
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
9836
|
+
async serializeRequest(operationSchema, input, context) {
|
|
9837
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
9838
9838
|
Object.assign(request.headers, {
|
|
9839
9839
|
"content-type": this.getDefaultContentType(),
|
|
9840
9840
|
"smithy-protocol": "rpc-v2-cbor",
|
|
@@ -9853,7 +9853,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9853
9853
|
} catch (e3) {
|
|
9854
9854
|
}
|
|
9855
9855
|
}
|
|
9856
|
-
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(
|
|
9856
|
+
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context);
|
|
9857
9857
|
const path7 = `/service/${service}/operation/${operation2}`;
|
|
9858
9858
|
if (request.path.endsWith("/")) {
|
|
9859
9859
|
request.path += path7.slice(1);
|
|
@@ -9862,10 +9862,10 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9862
9862
|
}
|
|
9863
9863
|
return request;
|
|
9864
9864
|
}
|
|
9865
|
-
async deserializeResponse(operationSchema,
|
|
9866
|
-
return super.deserializeResponse(operationSchema,
|
|
9865
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
9866
|
+
return super.deserializeResponse(operationSchema, context, response);
|
|
9867
9867
|
}
|
|
9868
|
-
async handleError(operationSchema,
|
|
9868
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
9869
9869
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
9870
9870
|
let namespace = this.options.defaultNamespace;
|
|
9871
9871
|
if (errorName.includes("#")) {
|
|
@@ -10026,14 +10026,14 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({
|
|
|
10026
10026
|
super({ defaultNamespace });
|
|
10027
10027
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
10028
10028
|
}
|
|
10029
|
-
async serializeRequest(operationSchema, input,
|
|
10030
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
10029
|
+
async serializeRequest(operationSchema, input, context) {
|
|
10030
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
10031
10031
|
if (this.awsQueryCompatible) {
|
|
10032
10032
|
request.headers["x-amzn-query-mode"] = "true";
|
|
10033
10033
|
}
|
|
10034
10034
|
return request;
|
|
10035
10035
|
}
|
|
10036
|
-
async handleError(operationSchema,
|
|
10036
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
10037
10037
|
if (this.awsQueryCompatible) {
|
|
10038
10038
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
10039
10039
|
}
|
|
@@ -10133,9 +10133,9 @@ var init_ConfigurableSerdeContext = __esm({
|
|
|
10133
10133
|
});
|
|
10134
10134
|
|
|
10135
10135
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
10136
|
-
function jsonReviver(key, value,
|
|
10137
|
-
if (
|
|
10138
|
-
const numericString =
|
|
10136
|
+
function jsonReviver(key, value, context) {
|
|
10137
|
+
if (context?.source) {
|
|
10138
|
+
const numericString = context.source;
|
|
10139
10139
|
if (typeof value === "number") {
|
|
10140
10140
|
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
|
|
10141
10141
|
const isFractional = numericString.includes(".");
|
|
@@ -10398,9 +10398,9 @@ var require_dist_cjs26 = __commonJS({
|
|
|
10398
10398
|
identifyOnResolve = toggle;
|
|
10399
10399
|
return identifyOnResolve;
|
|
10400
10400
|
},
|
|
10401
|
-
resolve: (handler,
|
|
10401
|
+
resolve: (handler, context) => {
|
|
10402
10402
|
for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
|
|
10403
|
-
handler = middleware(handler,
|
|
10403
|
+
handler = middleware(handler, context);
|
|
10404
10404
|
}
|
|
10405
10405
|
if (identifyOnResolve) {
|
|
10406
10406
|
console.log(stack.identify());
|
|
@@ -11000,7 +11000,7 @@ var init_common = __esm({
|
|
|
11000
11000
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
|
|
11001
11001
|
import_smithy_client = __toESM(require_dist_cjs27());
|
|
11002
11002
|
import_util_utf86 = __toESM(require_dist_cjs11());
|
|
11003
|
-
collectBodyString = (streamBody,
|
|
11003
|
+
collectBodyString = (streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
|
|
11004
11004
|
}
|
|
11005
11005
|
});
|
|
11006
11006
|
|
|
@@ -11009,7 +11009,7 @@ var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
|
|
|
11009
11009
|
var init_parseJsonBody = __esm({
|
|
11010
11010
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
|
11011
11011
|
init_common();
|
|
11012
|
-
parseJsonBody = (streamBody,
|
|
11012
|
+
parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
11013
11013
|
if (encoded.length) {
|
|
11014
11014
|
try {
|
|
11015
11015
|
return JSON.parse(encoded);
|
|
@@ -11024,8 +11024,8 @@ var init_parseJsonBody = __esm({
|
|
|
11024
11024
|
}
|
|
11025
11025
|
return {};
|
|
11026
11026
|
});
|
|
11027
|
-
parseJsonErrorBody = async (errorBody,
|
|
11028
|
-
const value = await parseJsonBody(errorBody,
|
|
11027
|
+
parseJsonErrorBody = async (errorBody, context) => {
|
|
11028
|
+
const value = await parseJsonBody(errorBody, context);
|
|
11029
11029
|
value.message = value.message ?? value.Message;
|
|
11030
11030
|
return value;
|
|
11031
11031
|
};
|
|
@@ -11436,8 +11436,8 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11436
11436
|
this.deserializer = this.codec.createDeserializer();
|
|
11437
11437
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
11438
11438
|
}
|
|
11439
|
-
async serializeRequest(operationSchema, input,
|
|
11440
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11439
|
+
async serializeRequest(operationSchema, input, context) {
|
|
11440
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
11441
11441
|
if (!request.path.endsWith("/")) {
|
|
11442
11442
|
request.path += "/";
|
|
11443
11443
|
}
|
|
@@ -11456,7 +11456,7 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11456
11456
|
getPayloadCodec() {
|
|
11457
11457
|
return this.codec;
|
|
11458
11458
|
}
|
|
11459
|
-
async handleError(operationSchema,
|
|
11459
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
11460
11460
|
if (this.awsQueryCompatible) {
|
|
11461
11461
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
11462
11462
|
}
|
|
@@ -11575,8 +11575,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11575
11575
|
this.codec.setSerdeContext(serdeContext);
|
|
11576
11576
|
super.setSerdeContext(serdeContext);
|
|
11577
11577
|
}
|
|
11578
|
-
async serializeRequest(operationSchema, input,
|
|
11579
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11578
|
+
async serializeRequest(operationSchema, input, context) {
|
|
11579
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
11580
11580
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
11581
11581
|
if (!request.headers["content-type"]) {
|
|
11582
11582
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -11589,14 +11589,14 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11589
11589
|
}
|
|
11590
11590
|
return request;
|
|
11591
11591
|
}
|
|
11592
|
-
async handleError(operationSchema,
|
|
11592
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
11593
11593
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
11594
11594
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
11595
11595
|
const ns = NormalizedSchema.of(errorSchema);
|
|
11596
11596
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
11597
11597
|
const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
|
|
11598
11598
|
const exception = new ErrorCtor(message);
|
|
11599
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
11599
|
+
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
11600
11600
|
const output = {};
|
|
11601
11601
|
for (const [name14, member2] of ns.structIterator()) {
|
|
11602
11602
|
const target = member2.getMergedTraits().jsonName ?? name14;
|
|
@@ -12899,8 +12899,8 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12899
12899
|
getPayloadCodec() {
|
|
12900
12900
|
throw new Error("AWSQuery protocol has no payload codec.");
|
|
12901
12901
|
}
|
|
12902
|
-
async serializeRequest(operationSchema, input,
|
|
12903
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
12902
|
+
async serializeRequest(operationSchema, input, context) {
|
|
12903
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
12904
12904
|
if (!request.path.endsWith("/")) {
|
|
12905
12905
|
request.path += "/";
|
|
12906
12906
|
}
|
|
@@ -12917,16 +12917,16 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12917
12917
|
}
|
|
12918
12918
|
return request;
|
|
12919
12919
|
}
|
|
12920
|
-
async deserializeResponse(operationSchema,
|
|
12920
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
12921
12921
|
const deserializer = this.deserializer;
|
|
12922
12922
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
12923
12923
|
const dataObject = {};
|
|
12924
12924
|
if (response.statusCode >= 300) {
|
|
12925
|
-
const bytes2 = await collectBody(response.body,
|
|
12925
|
+
const bytes2 = await collectBody(response.body, context);
|
|
12926
12926
|
if (bytes2.byteLength > 0) {
|
|
12927
12927
|
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
12928
12928
|
}
|
|
12929
|
-
await this.handleError(operationSchema,
|
|
12929
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
12930
12930
|
}
|
|
12931
12931
|
for (const header in response.headers) {
|
|
12932
12932
|
const value = response.headers[header];
|
|
@@ -12935,7 +12935,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12935
12935
|
}
|
|
12936
12936
|
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
12937
12937
|
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
12938
|
-
const bytes = await collectBody(response.body,
|
|
12938
|
+
const bytes = await collectBody(response.body, context);
|
|
12939
12939
|
if (bytes.byteLength > 0) {
|
|
12940
12940
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
12941
12941
|
}
|
|
@@ -12948,7 +12948,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12948
12948
|
useNestedResult() {
|
|
12949
12949
|
return true;
|
|
12950
12950
|
}
|
|
12951
|
-
async handleError(operationSchema,
|
|
12951
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
12952
12952
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
12953
12953
|
const errorData = this.loadQueryError(dataObject);
|
|
12954
12954
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
@@ -13029,7 +13029,7 @@ var init_parseXmlBody = __esm({
|
|
|
13029
13029
|
import_xml_builder2 = __toESM(require_dist_cjs28());
|
|
13030
13030
|
import_smithy_client5 = __toESM(require_dist_cjs27());
|
|
13031
13031
|
init_common();
|
|
13032
|
-
parseXmlBody = (streamBody,
|
|
13032
|
+
parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
13033
13033
|
if (encoded.length) {
|
|
13034
13034
|
let parsedObj;
|
|
13035
13035
|
try {
|
|
@@ -13053,8 +13053,8 @@ var init_parseXmlBody = __esm({
|
|
|
13053
13053
|
}
|
|
13054
13054
|
return {};
|
|
13055
13055
|
});
|
|
13056
|
-
parseXmlErrorBody = async (errorBody,
|
|
13057
|
-
const value = await parseXmlBody(errorBody,
|
|
13056
|
+
parseXmlErrorBody = async (errorBody, context) => {
|
|
13057
|
+
const value = await parseXmlBody(errorBody, context);
|
|
13058
13058
|
if (value.Error) {
|
|
13059
13059
|
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
13060
13060
|
}
|
|
@@ -13399,8 +13399,8 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13399
13399
|
getShapeId() {
|
|
13400
13400
|
return "aws.protocols#restXml";
|
|
13401
13401
|
}
|
|
13402
|
-
async serializeRequest(operationSchema, input,
|
|
13403
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
13402
|
+
async serializeRequest(operationSchema, input, context) {
|
|
13403
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
13404
13404
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
13405
13405
|
if (!request.headers["content-type"]) {
|
|
13406
13406
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -13415,17 +13415,17 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13415
13415
|
}
|
|
13416
13416
|
return request;
|
|
13417
13417
|
}
|
|
13418
|
-
async deserializeResponse(operationSchema,
|
|
13419
|
-
return super.deserializeResponse(operationSchema,
|
|
13418
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
13419
|
+
return super.deserializeResponse(operationSchema, context, response);
|
|
13420
13420
|
}
|
|
13421
|
-
async handleError(operationSchema,
|
|
13421
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
13422
13422
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
13423
13423
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
13424
13424
|
const ns = NormalizedSchema.of(errorSchema);
|
|
13425
13425
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
13426
13426
|
const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
|
|
13427
13427
|
const exception = new ErrorCtor(message);
|
|
13428
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
13428
|
+
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
13429
13429
|
const output = {};
|
|
13430
13430
|
for (const [name14, member2] of ns.structIterator()) {
|
|
13431
13431
|
const target = member2.getMergedTraits().xmlName ?? name14;
|
|
@@ -13554,48 +13554,48 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13554
13554
|
});
|
|
13555
13555
|
}
|
|
13556
13556
|
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
13557
|
-
async function checkFeatures(
|
|
13557
|
+
async function checkFeatures(context, config, args) {
|
|
13558
13558
|
const request = args.request;
|
|
13559
13559
|
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
|
|
13560
|
-
core$1.setFeature(
|
|
13560
|
+
core$1.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
13561
13561
|
}
|
|
13562
13562
|
if (typeof config.retryStrategy === "function") {
|
|
13563
13563
|
const retryStrategy = await config.retryStrategy();
|
|
13564
13564
|
if (typeof retryStrategy.acquireInitialRetryToken === "function") {
|
|
13565
13565
|
if (retryStrategy.constructor?.name?.includes("Adaptive")) {
|
|
13566
|
-
core$1.setFeature(
|
|
13566
|
+
core$1.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
13567
13567
|
} else {
|
|
13568
|
-
core$1.setFeature(
|
|
13568
|
+
core$1.setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
13569
13569
|
}
|
|
13570
13570
|
} else {
|
|
13571
|
-
core$1.setFeature(
|
|
13571
|
+
core$1.setFeature(context, "RETRY_MODE_LEGACY", "D");
|
|
13572
13572
|
}
|
|
13573
13573
|
}
|
|
13574
13574
|
if (typeof config.accountIdEndpointMode === "function") {
|
|
13575
|
-
const endpointV2 =
|
|
13575
|
+
const endpointV2 = context.endpointV2;
|
|
13576
13576
|
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
|
|
13577
|
-
core$1.setFeature(
|
|
13577
|
+
core$1.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
|
|
13578
13578
|
}
|
|
13579
13579
|
switch (await config.accountIdEndpointMode?.()) {
|
|
13580
13580
|
case "disabled":
|
|
13581
|
-
core$1.setFeature(
|
|
13581
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
13582
13582
|
break;
|
|
13583
13583
|
case "preferred":
|
|
13584
|
-
core$1.setFeature(
|
|
13584
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
13585
13585
|
break;
|
|
13586
13586
|
case "required":
|
|
13587
|
-
core$1.setFeature(
|
|
13587
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
13588
13588
|
break;
|
|
13589
13589
|
}
|
|
13590
13590
|
}
|
|
13591
|
-
const identity2 =
|
|
13591
|
+
const identity2 = context.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
13592
13592
|
if (identity2?.$source) {
|
|
13593
13593
|
const credentials = identity2;
|
|
13594
13594
|
if (credentials.accountId) {
|
|
13595
|
-
core$1.setFeature(
|
|
13595
|
+
core$1.setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
13596
13596
|
}
|
|
13597
13597
|
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
|
|
13598
|
-
core$1.setFeature(
|
|
13598
|
+
core$1.setFeature(context, key, value);
|
|
13599
13599
|
}
|
|
13600
13600
|
}
|
|
13601
13601
|
}
|
|
@@ -13623,17 +13623,17 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13623
13623
|
}
|
|
13624
13624
|
return buffer;
|
|
13625
13625
|
}
|
|
13626
|
-
var userAgentMiddleware = (options) => (next,
|
|
13626
|
+
var userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
13627
13627
|
const { request } = args;
|
|
13628
13628
|
if (!protocolHttp.HttpRequest.isInstance(request)) {
|
|
13629
13629
|
return next(args);
|
|
13630
13630
|
}
|
|
13631
13631
|
const { headers } = request;
|
|
13632
|
-
const userAgent =
|
|
13632
|
+
const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
|
|
13633
13633
|
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
|
|
13634
|
-
await checkFeatures(
|
|
13635
|
-
const awsContext =
|
|
13636
|
-
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({},
|
|
13634
|
+
await checkFeatures(context, options, args);
|
|
13635
|
+
const awsContext = context;
|
|
13636
|
+
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
|
|
13637
13637
|
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
|
|
13638
13638
|
const appId = await options.userAgentAppId();
|
|
13639
13639
|
if (appId) {
|
|
@@ -14942,7 +14942,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14942
14942
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
14943
14943
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
14944
14944
|
}
|
|
14945
|
-
async handle(next, args,
|
|
14945
|
+
async handle(next, args, context = {}) {
|
|
14946
14946
|
const request = args.request;
|
|
14947
14947
|
const { body: payload2, headers, query: query2 } = request;
|
|
14948
14948
|
if (!(payload2 instanceof ReadableStream)) {
|
|
@@ -15926,7 +15926,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15926
15926
|
}
|
|
15927
15927
|
return urlParser.parseUrl(endpoint);
|
|
15928
15928
|
};
|
|
15929
|
-
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig,
|
|
15929
|
+
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
15930
15930
|
if (!clientConfig.isCustomEndpoint) {
|
|
15931
15931
|
let endpointFromConfig;
|
|
15932
15932
|
if (clientConfig.serviceConfiguredEndpoint) {
|
|
@@ -15943,7 +15943,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15943
15943
|
if (typeof clientConfig.endpointProvider !== "function") {
|
|
15944
15944
|
throw new Error("config.endpointProvider is not set.");
|
|
15945
15945
|
}
|
|
15946
|
-
const endpoint = clientConfig.endpointProvider(endpointParams,
|
|
15946
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context);
|
|
15947
15947
|
return endpoint;
|
|
15948
15948
|
};
|
|
15949
15949
|
var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
@@ -15977,22 +15977,22 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15977
15977
|
return endpointParams;
|
|
15978
15978
|
};
|
|
15979
15979
|
var endpointMiddleware = ({ config, instructions }) => {
|
|
15980
|
-
return (next,
|
|
15980
|
+
return (next, context) => async (args) => {
|
|
15981
15981
|
if (config.isCustomEndpoint) {
|
|
15982
|
-
core.setFeature(
|
|
15982
|
+
core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
|
15983
15983
|
}
|
|
15984
15984
|
const endpoint = await getEndpointFromInstructions(args.input, {
|
|
15985
15985
|
getEndpointParameterInstructions() {
|
|
15986
15986
|
return instructions;
|
|
15987
15987
|
}
|
|
15988
|
-
}, { ...config },
|
|
15989
|
-
|
|
15990
|
-
|
|
15991
|
-
const authScheme =
|
|
15988
|
+
}, { ...config }, context);
|
|
15989
|
+
context.endpointV2 = endpoint;
|
|
15990
|
+
context.authSchemes = endpoint.properties?.authSchemes;
|
|
15991
|
+
const authScheme = context.authSchemes?.[0];
|
|
15992
15992
|
if (authScheme) {
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
const smithyContext = utilMiddleware.getSmithyContext(
|
|
15993
|
+
context["signing_region"] = authScheme.signingRegion;
|
|
15994
|
+
context["signing_service"] = authScheme.signingName;
|
|
15995
|
+
const smithyContext = utilMiddleware.getSmithyContext(context);
|
|
15996
15996
|
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
15997
15997
|
if (httpAuthOption) {
|
|
15998
15998
|
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
@@ -16641,12 +16641,12 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16641
16641
|
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
16642
16642
|
}
|
|
16643
16643
|
});
|
|
16644
|
-
var retryMiddleware = (options) => (next,
|
|
16644
|
+
var retryMiddleware = (options) => (next, context) => async (args) => {
|
|
16645
16645
|
let retryStrategy = await options.retryStrategy();
|
|
16646
16646
|
const maxAttempts = await options.maxAttempts();
|
|
16647
16647
|
if (isRetryStrategyV2(retryStrategy)) {
|
|
16648
16648
|
retryStrategy = retryStrategy;
|
|
16649
|
-
let retryToken = await retryStrategy.acquireInitialRetryToken(
|
|
16649
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
|
|
16650
16650
|
let lastError = new Error();
|
|
16651
16651
|
let attempts = 0;
|
|
16652
16652
|
let totalRetryDelay = 0;
|
|
@@ -16669,7 +16669,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16669
16669
|
const retryErrorInfo = getRetryErrorInfo(e3);
|
|
16670
16670
|
lastError = asSdkError(e3);
|
|
16671
16671
|
if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
|
|
16672
|
-
(
|
|
16672
|
+
(context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
16673
16673
|
throw lastError;
|
|
16674
16674
|
}
|
|
16675
16675
|
try {
|
|
@@ -16691,7 +16691,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16691
16691
|
} else {
|
|
16692
16692
|
retryStrategy = retryStrategy;
|
|
16693
16693
|
if (retryStrategy?.mode)
|
|
16694
|
-
|
|
16694
|
+
context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
|
|
16695
16695
|
return retryStrategy.retry(next, args);
|
|
16696
16696
|
}
|
|
16697
16697
|
};
|
|
@@ -16771,9 +16771,9 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16771
16771
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
16772
16772
|
var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
16773
16773
|
var util_middleware_1 = require_dist_cjs7();
|
|
16774
|
-
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config,
|
|
16774
|
+
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
16775
16775
|
return {
|
|
16776
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
16776
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
16777
16777
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
16778
16778
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
16779
16779
|
})()
|
|
@@ -16787,10 +16787,10 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16787
16787
|
name: "bedrock",
|
|
16788
16788
|
region: authParameters.region
|
|
16789
16789
|
},
|
|
16790
|
-
propertiesExtractor: (config,
|
|
16790
|
+
propertiesExtractor: (config, context) => ({
|
|
16791
16791
|
signingProperties: {
|
|
16792
16792
|
config,
|
|
16793
|
-
context
|
|
16793
|
+
context
|
|
16794
16794
|
}
|
|
16795
16795
|
})
|
|
16796
16796
|
};
|
|
@@ -16798,7 +16798,7 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16798
16798
|
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
16799
16799
|
return {
|
|
16800
16800
|
schemeId: "smithy.api#httpBearerAuth",
|
|
16801
|
-
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache },
|
|
16801
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({
|
|
16802
16802
|
identityProperties: {
|
|
16803
16803
|
profile,
|
|
16804
16804
|
filepath,
|
|
@@ -17544,10 +17544,10 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
17544
17544
|
name: "sso-oauth",
|
|
17545
17545
|
region: authParameters.region
|
|
17546
17546
|
},
|
|
17547
|
-
propertiesExtractor: (config,
|
|
17547
|
+
propertiesExtractor: (config, context) => ({
|
|
17548
17548
|
signingProperties: {
|
|
17549
17549
|
config,
|
|
17550
|
-
context
|
|
17550
|
+
context
|
|
17551
17551
|
}
|
|
17552
17552
|
})
|
|
17553
17553
|
};
|
|
@@ -17562,9 +17562,9 @@ var init_httpAuthSchemeProvider = __esm({
|
|
|
17562
17562
|
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
|
|
17563
17563
|
init_dist_es2();
|
|
17564
17564
|
import_util_middleware6 = __toESM(require_dist_cjs7());
|
|
17565
|
-
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config,
|
|
17565
|
+
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
17566
17566
|
return {
|
|
17567
|
-
operation: (0, import_util_middleware6.getSmithyContext)(
|
|
17567
|
+
operation: (0, import_util_middleware6.getSmithyContext)(context).operation,
|
|
17568
17568
|
region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => {
|
|
17569
17569
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
17570
17570
|
})()
|
|
@@ -17910,10 +17910,10 @@ var init_endpointResolver = __esm({
|
|
|
17910
17910
|
size: 50,
|
|
17911
17911
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
17912
17912
|
});
|
|
17913
|
-
defaultEndpointResolver = (endpointParams,
|
|
17913
|
+
defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
17914
17914
|
return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, {
|
|
17915
17915
|
endpointParams,
|
|
17916
|
-
logger:
|
|
17916
|
+
logger: context.logger
|
|
17917
17917
|
}));
|
|
17918
17918
|
};
|
|
17919
17919
|
import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions;
|
|
@@ -18501,8 +18501,8 @@ var init_Aws_restJson1 = __esm({
|
|
|
18501
18501
|
import_smithy_client14 = __toESM(require_dist_cjs27());
|
|
18502
18502
|
init_models_0();
|
|
18503
18503
|
init_SSOOIDCServiceException();
|
|
18504
|
-
se_CreateTokenCommand = async (input,
|
|
18505
|
-
const b3 = requestBuilder(input,
|
|
18504
|
+
se_CreateTokenCommand = async (input, context) => {
|
|
18505
|
+
const b3 = requestBuilder(input, context);
|
|
18506
18506
|
const headers = {
|
|
18507
18507
|
"content-type": "application/json"
|
|
18508
18508
|
};
|
|
@@ -18522,14 +18522,14 @@ var init_Aws_restJson1 = __esm({
|
|
|
18522
18522
|
b3.m("POST").h(headers).b(body);
|
|
18523
18523
|
return b3.build();
|
|
18524
18524
|
};
|
|
18525
|
-
de_CreateTokenCommand = async (output,
|
|
18525
|
+
de_CreateTokenCommand = async (output, context) => {
|
|
18526
18526
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
18527
|
-
return de_CommandError(output,
|
|
18527
|
+
return de_CommandError(output, context);
|
|
18528
18528
|
}
|
|
18529
18529
|
const contents = (0, import_smithy_client14.map)({
|
|
18530
18530
|
$metadata: deserializeMetadata(output)
|
|
18531
18531
|
});
|
|
18532
|
-
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body,
|
|
18532
|
+
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context)), "body");
|
|
18533
18533
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
18534
18534
|
accessToken: import_smithy_client14.expectString,
|
|
18535
18535
|
expiresIn: import_smithy_client14.expectInt32,
|
|
@@ -18540,46 +18540,46 @@ var init_Aws_restJson1 = __esm({
|
|
|
18540
18540
|
Object.assign(contents, doc);
|
|
18541
18541
|
return contents;
|
|
18542
18542
|
};
|
|
18543
|
-
de_CommandError = async (output,
|
|
18543
|
+
de_CommandError = async (output, context) => {
|
|
18544
18544
|
const parsedOutput = {
|
|
18545
18545
|
...output,
|
|
18546
|
-
body: await parseJsonErrorBody(output.body,
|
|
18546
|
+
body: await parseJsonErrorBody(output.body, context)
|
|
18547
18547
|
};
|
|
18548
18548
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
18549
18549
|
switch (errorCode) {
|
|
18550
18550
|
case "AccessDeniedException":
|
|
18551
18551
|
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
18552
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput,
|
|
18552
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
18553
18553
|
case "AuthorizationPendingException":
|
|
18554
18554
|
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
18555
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput,
|
|
18555
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
|
18556
18556
|
case "ExpiredTokenException":
|
|
18557
18557
|
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
18558
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput,
|
|
18558
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
18559
18559
|
case "InternalServerException":
|
|
18560
18560
|
case "com.amazonaws.ssooidc#InternalServerException":
|
|
18561
|
-
throw await de_InternalServerExceptionRes(parsedOutput,
|
|
18561
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
18562
18562
|
case "InvalidClientException":
|
|
18563
18563
|
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
18564
|
-
throw await de_InvalidClientExceptionRes(parsedOutput,
|
|
18564
|
+
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
|
18565
18565
|
case "InvalidGrantException":
|
|
18566
18566
|
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
18567
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput,
|
|
18567
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
|
18568
18568
|
case "InvalidRequestException":
|
|
18569
18569
|
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
18570
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput,
|
|
18570
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
18571
18571
|
case "InvalidScopeException":
|
|
18572
18572
|
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
18573
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput,
|
|
18573
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
|
18574
18574
|
case "SlowDownException":
|
|
18575
18575
|
case "com.amazonaws.ssooidc#SlowDownException":
|
|
18576
|
-
throw await de_SlowDownExceptionRes(parsedOutput,
|
|
18576
|
+
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
|
18577
18577
|
case "UnauthorizedClientException":
|
|
18578
18578
|
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
18579
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput,
|
|
18579
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
|
18580
18580
|
case "UnsupportedGrantTypeException":
|
|
18581
18581
|
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
18582
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput,
|
|
18582
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
|
18583
18583
|
default:
|
|
18584
18584
|
const parsedBody = parsedOutput.body;
|
|
18585
18585
|
return throwDefaultError({
|
|
@@ -18590,7 +18590,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18590
18590
|
}
|
|
18591
18591
|
};
|
|
18592
18592
|
throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException);
|
|
18593
|
-
de_AccessDeniedExceptionRes = async (parsedOutput,
|
|
18593
|
+
de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
18594
18594
|
const contents = (0, import_smithy_client14.map)({});
|
|
18595
18595
|
const data2 = parsedOutput.body;
|
|
18596
18596
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18605,7 +18605,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18605
18605
|
});
|
|
18606
18606
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18607
18607
|
};
|
|
18608
|
-
de_AuthorizationPendingExceptionRes = async (parsedOutput,
|
|
18608
|
+
de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
|
|
18609
18609
|
const contents = (0, import_smithy_client14.map)({});
|
|
18610
18610
|
const data2 = parsedOutput.body;
|
|
18611
18611
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18619,7 +18619,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18619
18619
|
});
|
|
18620
18620
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18621
18621
|
};
|
|
18622
|
-
de_ExpiredTokenExceptionRes = async (parsedOutput,
|
|
18622
|
+
de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
18623
18623
|
const contents = (0, import_smithy_client14.map)({});
|
|
18624
18624
|
const data2 = parsedOutput.body;
|
|
18625
18625
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18633,7 +18633,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18633
18633
|
});
|
|
18634
18634
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18635
18635
|
};
|
|
18636
|
-
de_InternalServerExceptionRes = async (parsedOutput,
|
|
18636
|
+
de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
18637
18637
|
const contents = (0, import_smithy_client14.map)({});
|
|
18638
18638
|
const data2 = parsedOutput.body;
|
|
18639
18639
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18647,7 +18647,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18647
18647
|
});
|
|
18648
18648
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18649
18649
|
};
|
|
18650
|
-
de_InvalidClientExceptionRes = async (parsedOutput,
|
|
18650
|
+
de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
18651
18651
|
const contents = (0, import_smithy_client14.map)({});
|
|
18652
18652
|
const data2 = parsedOutput.body;
|
|
18653
18653
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18661,7 +18661,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18661
18661
|
});
|
|
18662
18662
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18663
18663
|
};
|
|
18664
|
-
de_InvalidGrantExceptionRes = async (parsedOutput,
|
|
18664
|
+
de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
18665
18665
|
const contents = (0, import_smithy_client14.map)({});
|
|
18666
18666
|
const data2 = parsedOutput.body;
|
|
18667
18667
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18675,7 +18675,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18675
18675
|
});
|
|
18676
18676
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18677
18677
|
};
|
|
18678
|
-
de_InvalidRequestExceptionRes = async (parsedOutput,
|
|
18678
|
+
de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
18679
18679
|
const contents = (0, import_smithy_client14.map)({});
|
|
18680
18680
|
const data2 = parsedOutput.body;
|
|
18681
18681
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18690,7 +18690,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18690
18690
|
});
|
|
18691
18691
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18692
18692
|
};
|
|
18693
|
-
de_InvalidScopeExceptionRes = async (parsedOutput,
|
|
18693
|
+
de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
|
|
18694
18694
|
const contents = (0, import_smithy_client14.map)({});
|
|
18695
18695
|
const data2 = parsedOutput.body;
|
|
18696
18696
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18704,7 +18704,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18704
18704
|
});
|
|
18705
18705
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18706
18706
|
};
|
|
18707
|
-
de_SlowDownExceptionRes = async (parsedOutput,
|
|
18707
|
+
de_SlowDownExceptionRes = async (parsedOutput, context) => {
|
|
18708
18708
|
const contents = (0, import_smithy_client14.map)({});
|
|
18709
18709
|
const data2 = parsedOutput.body;
|
|
18710
18710
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18718,7 +18718,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18718
18718
|
});
|
|
18719
18719
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18720
18720
|
};
|
|
18721
|
-
de_UnauthorizedClientExceptionRes = async (parsedOutput,
|
|
18721
|
+
de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
|
|
18722
18722
|
const contents = (0, import_smithy_client14.map)({});
|
|
18723
18723
|
const data2 = parsedOutput.body;
|
|
18724
18724
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18732,7 +18732,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18732
18732
|
});
|
|
18733
18733
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18734
18734
|
};
|
|
18735
|
-
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput,
|
|
18735
|
+
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
|
|
18736
18736
|
const contents = (0, import_smithy_client14.map)({});
|
|
18737
18737
|
const data2 = parsedOutput.body;
|
|
18738
18738
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -19000,9 +19000,9 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
19000
19000
|
exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0;
|
|
19001
19001
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
19002
19002
|
var util_middleware_1 = require_dist_cjs7();
|
|
19003
|
-
var defaultSSOHttpAuthSchemeParametersProvider = async (config,
|
|
19003
|
+
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
19004
19004
|
return {
|
|
19005
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
19005
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
19006
19006
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
19007
19007
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
19008
19008
|
})()
|
|
@@ -19016,10 +19016,10 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
19016
19016
|
name: "awsssoportal",
|
|
19017
19017
|
region: authParameters.region
|
|
19018
19018
|
},
|
|
19019
|
-
propertiesExtractor: (config,
|
|
19019
|
+
propertiesExtractor: (config, context) => ({
|
|
19020
19020
|
signingProperties: {
|
|
19021
19021
|
config,
|
|
19022
|
-
context
|
|
19022
|
+
context
|
|
19023
19023
|
}
|
|
19024
19024
|
})
|
|
19025
19025
|
};
|
|
@@ -19217,10 +19217,10 @@ var require_endpointResolver = __commonJS({
|
|
|
19217
19217
|
size: 50,
|
|
19218
19218
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
19219
19219
|
});
|
|
19220
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
19220
|
+
var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
19221
19221
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
19222
19222
|
endpointParams,
|
|
19223
|
-
logger:
|
|
19223
|
+
logger: context.logger
|
|
19224
19224
|
}));
|
|
19225
19225
|
};
|
|
19226
19226
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -19518,8 +19518,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19518
19518
|
...obj,
|
|
19519
19519
|
...obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }
|
|
19520
19520
|
});
|
|
19521
|
-
var se_GetRoleCredentialsCommand = async (input,
|
|
19522
|
-
const b3 = core.requestBuilder(input,
|
|
19521
|
+
var se_GetRoleCredentialsCommand = async (input, context) => {
|
|
19522
|
+
const b3 = core.requestBuilder(input, context);
|
|
19523
19523
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19524
19524
|
[_xasbt]: input[_aT]
|
|
19525
19525
|
});
|
|
@@ -19532,8 +19532,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19532
19532
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19533
19533
|
return b3.build();
|
|
19534
19534
|
};
|
|
19535
|
-
var se_ListAccountRolesCommand = async (input,
|
|
19536
|
-
const b3 = core.requestBuilder(input,
|
|
19535
|
+
var se_ListAccountRolesCommand = async (input, context) => {
|
|
19536
|
+
const b3 = core.requestBuilder(input, context);
|
|
19537
19537
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19538
19538
|
[_xasbt]: input[_aT]
|
|
19539
19539
|
});
|
|
@@ -19547,8 +19547,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19547
19547
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19548
19548
|
return b3.build();
|
|
19549
19549
|
};
|
|
19550
|
-
var se_ListAccountsCommand = async (input,
|
|
19551
|
-
const b3 = core.requestBuilder(input,
|
|
19550
|
+
var se_ListAccountsCommand = async (input, context) => {
|
|
19551
|
+
const b3 = core.requestBuilder(input, context);
|
|
19552
19552
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19553
19553
|
[_xasbt]: input[_aT]
|
|
19554
19554
|
});
|
|
@@ -19561,8 +19561,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19561
19561
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19562
19562
|
return b3.build();
|
|
19563
19563
|
};
|
|
19564
|
-
var se_LogoutCommand = async (input,
|
|
19565
|
-
const b3 = core.requestBuilder(input,
|
|
19564
|
+
var se_LogoutCommand = async (input, context) => {
|
|
19565
|
+
const b3 = core.requestBuilder(input, context);
|
|
19566
19566
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19567
19567
|
[_xasbt]: input[_aT]
|
|
19568
19568
|
});
|
|
@@ -19571,28 +19571,28 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19571
19571
|
b3.m("POST").h(headers).b(body);
|
|
19572
19572
|
return b3.build();
|
|
19573
19573
|
};
|
|
19574
|
-
var de_GetRoleCredentialsCommand = async (output,
|
|
19574
|
+
var de_GetRoleCredentialsCommand = async (output, context) => {
|
|
19575
19575
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19576
|
-
return de_CommandError3(output,
|
|
19576
|
+
return de_CommandError3(output, context);
|
|
19577
19577
|
}
|
|
19578
19578
|
const contents = smithyClient.map({
|
|
19579
19579
|
$metadata: deserializeMetadata3(output)
|
|
19580
19580
|
});
|
|
19581
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19581
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
19582
19582
|
const doc = smithyClient.take(data2, {
|
|
19583
19583
|
roleCredentials: smithyClient._json
|
|
19584
19584
|
});
|
|
19585
19585
|
Object.assign(contents, doc);
|
|
19586
19586
|
return contents;
|
|
19587
19587
|
};
|
|
19588
|
-
var de_ListAccountRolesCommand = async (output,
|
|
19588
|
+
var de_ListAccountRolesCommand = async (output, context) => {
|
|
19589
19589
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19590
|
-
return de_CommandError3(output,
|
|
19590
|
+
return de_CommandError3(output, context);
|
|
19591
19591
|
}
|
|
19592
19592
|
const contents = smithyClient.map({
|
|
19593
19593
|
$metadata: deserializeMetadata3(output)
|
|
19594
19594
|
});
|
|
19595
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19595
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
19596
19596
|
const doc = smithyClient.take(data2, {
|
|
19597
19597
|
nextToken: smithyClient.expectString,
|
|
19598
19598
|
roleList: smithyClient._json
|
|
@@ -19600,14 +19600,14 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19600
19600
|
Object.assign(contents, doc);
|
|
19601
19601
|
return contents;
|
|
19602
19602
|
};
|
|
19603
|
-
var de_ListAccountsCommand = async (output,
|
|
19603
|
+
var de_ListAccountsCommand = async (output, context) => {
|
|
19604
19604
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19605
|
-
return de_CommandError3(output,
|
|
19605
|
+
return de_CommandError3(output, context);
|
|
19606
19606
|
}
|
|
19607
19607
|
const contents = smithyClient.map({
|
|
19608
19608
|
$metadata: deserializeMetadata3(output)
|
|
19609
19609
|
});
|
|
19610
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19610
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
19611
19611
|
const doc = smithyClient.take(data2, {
|
|
19612
19612
|
accountList: smithyClient._json,
|
|
19613
19613
|
nextToken: smithyClient.expectString
|
|
@@ -19615,20 +19615,20 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19615
19615
|
Object.assign(contents, doc);
|
|
19616
19616
|
return contents;
|
|
19617
19617
|
};
|
|
19618
|
-
var de_LogoutCommand = async (output,
|
|
19618
|
+
var de_LogoutCommand = async (output, context) => {
|
|
19619
19619
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19620
|
-
return de_CommandError3(output,
|
|
19620
|
+
return de_CommandError3(output, context);
|
|
19621
19621
|
}
|
|
19622
19622
|
const contents = smithyClient.map({
|
|
19623
19623
|
$metadata: deserializeMetadata3(output)
|
|
19624
19624
|
});
|
|
19625
|
-
await smithyClient.collectBody(output.body,
|
|
19625
|
+
await smithyClient.collectBody(output.body, context);
|
|
19626
19626
|
return contents;
|
|
19627
19627
|
};
|
|
19628
|
-
var de_CommandError3 = async (output,
|
|
19628
|
+
var de_CommandError3 = async (output, context) => {
|
|
19629
19629
|
const parsedOutput = {
|
|
19630
19630
|
...output,
|
|
19631
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
19631
|
+
body: await core$1.parseJsonErrorBody(output.body, context)
|
|
19632
19632
|
};
|
|
19633
19633
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
19634
19634
|
switch (errorCode) {
|
|
@@ -19654,7 +19654,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19654
19654
|
}
|
|
19655
19655
|
};
|
|
19656
19656
|
var throwDefaultError3 = smithyClient.withBaseException(SSOServiceException);
|
|
19657
|
-
var de_InvalidRequestExceptionRes2 = async (parsedOutput,
|
|
19657
|
+
var de_InvalidRequestExceptionRes2 = async (parsedOutput, context) => {
|
|
19658
19658
|
const contents = smithyClient.map({});
|
|
19659
19659
|
const data2 = parsedOutput.body;
|
|
19660
19660
|
const doc = smithyClient.take(data2, {
|
|
@@ -19667,7 +19667,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19667
19667
|
});
|
|
19668
19668
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19669
19669
|
};
|
|
19670
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
19670
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
19671
19671
|
const contents = smithyClient.map({});
|
|
19672
19672
|
const data2 = parsedOutput.body;
|
|
19673
19673
|
const doc = smithyClient.take(data2, {
|
|
@@ -19680,7 +19680,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19680
19680
|
});
|
|
19681
19681
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19682
19682
|
};
|
|
19683
|
-
var de_TooManyRequestsExceptionRes = async (parsedOutput,
|
|
19683
|
+
var de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
19684
19684
|
const contents = smithyClient.map({});
|
|
19685
19685
|
const data2 = parsedOutput.body;
|
|
19686
19686
|
const doc = smithyClient.take(data2, {
|
|
@@ -19693,7 +19693,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19693
19693
|
});
|
|
19694
19694
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19695
19695
|
};
|
|
19696
|
-
var de_UnauthorizedExceptionRes = async (parsedOutput,
|
|
19696
|
+
var de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
19697
19697
|
const contents = smithyClient.map({});
|
|
19698
19698
|
const data2 = parsedOutput.body;
|
|
19699
19699
|
const doc = smithyClient.take(data2, {
|
|
@@ -20000,10 +20000,10 @@ function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
|
|
20000
20000
|
name: "sts",
|
|
20001
20001
|
region: authParameters.region
|
|
20002
20002
|
},
|
|
20003
|
-
propertiesExtractor: (config,
|
|
20003
|
+
propertiesExtractor: (config, context) => ({
|
|
20004
20004
|
signingProperties: {
|
|
20005
20005
|
config,
|
|
20006
|
-
context
|
|
20006
|
+
context
|
|
20007
20007
|
}
|
|
20008
20008
|
})
|
|
20009
20009
|
};
|
|
@@ -20019,9 +20019,9 @@ var init_httpAuthSchemeProvider2 = __esm({
|
|
|
20019
20019
|
init_dist_es2();
|
|
20020
20020
|
import_util_middleware7 = __toESM(require_dist_cjs7());
|
|
20021
20021
|
init_STSClient();
|
|
20022
|
-
defaultSTSHttpAuthSchemeParametersProvider = async (config,
|
|
20022
|
+
defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
20023
20023
|
return {
|
|
20024
|
-
operation: (0, import_util_middleware7.getSmithyContext)(
|
|
20024
|
+
operation: (0, import_util_middleware7.getSmithyContext)(context).operation,
|
|
20025
20025
|
region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
|
|
20026
20026
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
20027
20027
|
})()
|
|
@@ -20131,10 +20131,10 @@ var init_endpointResolver2 = __esm({
|
|
|
20131
20131
|
size: 50,
|
|
20132
20132
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
|
|
20133
20133
|
});
|
|
20134
|
-
defaultEndpointResolver2 = (endpointParams,
|
|
20134
|
+
defaultEndpointResolver2 = (endpointParams, context = {}) => {
|
|
20135
20135
|
return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, {
|
|
20136
20136
|
endpointParams,
|
|
20137
|
-
logger:
|
|
20137
|
+
logger: context.logger
|
|
20138
20138
|
}));
|
|
20139
20139
|
};
|
|
20140
20140
|
import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions;
|
|
@@ -20496,80 +20496,80 @@ var init_Aws_query = __esm({
|
|
|
20496
20496
|
import_smithy_client24 = __toESM(require_dist_cjs27());
|
|
20497
20497
|
init_models_02();
|
|
20498
20498
|
init_STSServiceException();
|
|
20499
|
-
se_AssumeRoleCommand = async (input,
|
|
20499
|
+
se_AssumeRoleCommand = async (input, context) => {
|
|
20500
20500
|
const headers = SHARED_HEADERS;
|
|
20501
20501
|
let body;
|
|
20502
20502
|
body = buildFormUrlencodedString({
|
|
20503
|
-
...se_AssumeRoleRequest(input,
|
|
20503
|
+
...se_AssumeRoleRequest(input, context),
|
|
20504
20504
|
[_A]: _AR,
|
|
20505
20505
|
[_V]: _
|
|
20506
20506
|
});
|
|
20507
|
-
return buildHttpRpcRequest(
|
|
20507
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
20508
20508
|
};
|
|
20509
|
-
se_AssumeRoleWithWebIdentityCommand = async (input,
|
|
20509
|
+
se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
20510
20510
|
const headers = SHARED_HEADERS;
|
|
20511
20511
|
let body;
|
|
20512
20512
|
body = buildFormUrlencodedString({
|
|
20513
|
-
...se_AssumeRoleWithWebIdentityRequest(input,
|
|
20513
|
+
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
20514
20514
|
[_A]: _ARWWI,
|
|
20515
20515
|
[_V]: _
|
|
20516
20516
|
});
|
|
20517
|
-
return buildHttpRpcRequest(
|
|
20517
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
20518
20518
|
};
|
|
20519
|
-
de_AssumeRoleCommand = async (output,
|
|
20519
|
+
de_AssumeRoleCommand = async (output, context) => {
|
|
20520
20520
|
if (output.statusCode >= 300) {
|
|
20521
|
-
return de_CommandError2(output,
|
|
20521
|
+
return de_CommandError2(output, context);
|
|
20522
20522
|
}
|
|
20523
|
-
const data2 = await parseXmlBody(output.body,
|
|
20523
|
+
const data2 = await parseXmlBody(output.body, context);
|
|
20524
20524
|
let contents = {};
|
|
20525
|
-
contents = de_AssumeRoleResponse(data2.AssumeRoleResult,
|
|
20525
|
+
contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context);
|
|
20526
20526
|
const response = {
|
|
20527
20527
|
$metadata: deserializeMetadata2(output),
|
|
20528
20528
|
...contents
|
|
20529
20529
|
};
|
|
20530
20530
|
return response;
|
|
20531
20531
|
};
|
|
20532
|
-
de_AssumeRoleWithWebIdentityCommand = async (output,
|
|
20532
|
+
de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
20533
20533
|
if (output.statusCode >= 300) {
|
|
20534
|
-
return de_CommandError2(output,
|
|
20534
|
+
return de_CommandError2(output, context);
|
|
20535
20535
|
}
|
|
20536
|
-
const data2 = await parseXmlBody(output.body,
|
|
20536
|
+
const data2 = await parseXmlBody(output.body, context);
|
|
20537
20537
|
let contents = {};
|
|
20538
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult,
|
|
20538
|
+
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context);
|
|
20539
20539
|
const response = {
|
|
20540
20540
|
$metadata: deserializeMetadata2(output),
|
|
20541
20541
|
...contents
|
|
20542
20542
|
};
|
|
20543
20543
|
return response;
|
|
20544
20544
|
};
|
|
20545
|
-
de_CommandError2 = async (output,
|
|
20545
|
+
de_CommandError2 = async (output, context) => {
|
|
20546
20546
|
const parsedOutput = {
|
|
20547
20547
|
...output,
|
|
20548
|
-
body: await parseXmlErrorBody(output.body,
|
|
20548
|
+
body: await parseXmlErrorBody(output.body, context)
|
|
20549
20549
|
};
|
|
20550
20550
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
20551
20551
|
switch (errorCode) {
|
|
20552
20552
|
case "ExpiredTokenException":
|
|
20553
20553
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
20554
|
-
throw await de_ExpiredTokenExceptionRes2(parsedOutput,
|
|
20554
|
+
throw await de_ExpiredTokenExceptionRes2(parsedOutput, context);
|
|
20555
20555
|
case "MalformedPolicyDocument":
|
|
20556
20556
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
20557
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput,
|
|
20557
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
20558
20558
|
case "PackedPolicyTooLarge":
|
|
20559
20559
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
20560
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput,
|
|
20560
|
+
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
|
20561
20561
|
case "RegionDisabledException":
|
|
20562
20562
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
20563
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput,
|
|
20563
|
+
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
20564
20564
|
case "IDPCommunicationError":
|
|
20565
20565
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
20566
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput,
|
|
20566
|
+
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
|
20567
20567
|
case "IDPRejectedClaim":
|
|
20568
20568
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
20569
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput,
|
|
20569
|
+
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
|
20570
20570
|
case "InvalidIdentityToken":
|
|
20571
20571
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
20572
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput,
|
|
20572
|
+
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
|
20573
20573
|
default:
|
|
20574
20574
|
const parsedBody = parsedOutput.body;
|
|
20575
20575
|
return throwDefaultError2({
|
|
@@ -20579,70 +20579,70 @@ var init_Aws_query = __esm({
|
|
|
20579
20579
|
});
|
|
20580
20580
|
}
|
|
20581
20581
|
};
|
|
20582
|
-
de_ExpiredTokenExceptionRes2 = async (parsedOutput,
|
|
20582
|
+
de_ExpiredTokenExceptionRes2 = async (parsedOutput, context) => {
|
|
20583
20583
|
const body = parsedOutput.body;
|
|
20584
|
-
const deserialized = de_ExpiredTokenException(body.Error,
|
|
20584
|
+
const deserialized = de_ExpiredTokenException(body.Error, context);
|
|
20585
20585
|
const exception = new ExpiredTokenException2({
|
|
20586
20586
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20587
20587
|
...deserialized
|
|
20588
20588
|
});
|
|
20589
20589
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20590
20590
|
};
|
|
20591
|
-
de_IDPCommunicationErrorExceptionRes = async (parsedOutput,
|
|
20591
|
+
de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
|
|
20592
20592
|
const body = parsedOutput.body;
|
|
20593
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error,
|
|
20593
|
+
const deserialized = de_IDPCommunicationErrorException(body.Error, context);
|
|
20594
20594
|
const exception = new IDPCommunicationErrorException({
|
|
20595
20595
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20596
20596
|
...deserialized
|
|
20597
20597
|
});
|
|
20598
20598
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20599
20599
|
};
|
|
20600
|
-
de_IDPRejectedClaimExceptionRes = async (parsedOutput,
|
|
20600
|
+
de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
|
|
20601
20601
|
const body = parsedOutput.body;
|
|
20602
|
-
const deserialized = de_IDPRejectedClaimException(body.Error,
|
|
20602
|
+
const deserialized = de_IDPRejectedClaimException(body.Error, context);
|
|
20603
20603
|
const exception = new IDPRejectedClaimException({
|
|
20604
20604
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20605
20605
|
...deserialized
|
|
20606
20606
|
});
|
|
20607
20607
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20608
20608
|
};
|
|
20609
|
-
de_InvalidIdentityTokenExceptionRes = async (parsedOutput,
|
|
20609
|
+
de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
|
|
20610
20610
|
const body = parsedOutput.body;
|
|
20611
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error,
|
|
20611
|
+
const deserialized = de_InvalidIdentityTokenException(body.Error, context);
|
|
20612
20612
|
const exception = new InvalidIdentityTokenException({
|
|
20613
20613
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20614
20614
|
...deserialized
|
|
20615
20615
|
});
|
|
20616
20616
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20617
20617
|
};
|
|
20618
|
-
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput,
|
|
20618
|
+
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
20619
20619
|
const body = parsedOutput.body;
|
|
20620
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error,
|
|
20620
|
+
const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
|
|
20621
20621
|
const exception = new MalformedPolicyDocumentException({
|
|
20622
20622
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20623
20623
|
...deserialized
|
|
20624
20624
|
});
|
|
20625
20625
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20626
20626
|
};
|
|
20627
|
-
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput,
|
|
20627
|
+
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
20628
20628
|
const body = parsedOutput.body;
|
|
20629
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error,
|
|
20629
|
+
const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
|
|
20630
20630
|
const exception = new PackedPolicyTooLargeException({
|
|
20631
20631
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20632
20632
|
...deserialized
|
|
20633
20633
|
});
|
|
20634
20634
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20635
20635
|
};
|
|
20636
|
-
de_RegionDisabledExceptionRes = async (parsedOutput,
|
|
20636
|
+
de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
|
|
20637
20637
|
const body = parsedOutput.body;
|
|
20638
|
-
const deserialized = de_RegionDisabledException(body.Error,
|
|
20638
|
+
const deserialized = de_RegionDisabledException(body.Error, context);
|
|
20639
20639
|
const exception = new RegionDisabledException({
|
|
20640
20640
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20641
20641
|
...deserialized
|
|
20642
20642
|
});
|
|
20643
20643
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20644
20644
|
};
|
|
20645
|
-
se_AssumeRoleRequest = (input,
|
|
20645
|
+
se_AssumeRoleRequest = (input, context) => {
|
|
20646
20646
|
const entries = {};
|
|
20647
20647
|
if (input[_RA] != null) {
|
|
20648
20648
|
entries[_RA] = input[_RA];
|
|
@@ -20651,7 +20651,7 @@ var init_Aws_query = __esm({
|
|
|
20651
20651
|
entries[_RSN] = input[_RSN];
|
|
20652
20652
|
}
|
|
20653
20653
|
if (input[_PA] != null) {
|
|
20654
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20654
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
20655
20655
|
if (input[_PA]?.length === 0) {
|
|
20656
20656
|
entries.PolicyArns = [];
|
|
20657
20657
|
}
|
|
@@ -20667,7 +20667,7 @@ var init_Aws_query = __esm({
|
|
|
20667
20667
|
entries[_DS] = input[_DS];
|
|
20668
20668
|
}
|
|
20669
20669
|
if (input[_T] != null) {
|
|
20670
|
-
const memberEntries = se_tagListType(input[_T],
|
|
20670
|
+
const memberEntries = se_tagListType(input[_T], context);
|
|
20671
20671
|
if (input[_T]?.length === 0) {
|
|
20672
20672
|
entries.Tags = [];
|
|
20673
20673
|
}
|
|
@@ -20677,7 +20677,7 @@ var init_Aws_query = __esm({
|
|
|
20677
20677
|
});
|
|
20678
20678
|
}
|
|
20679
20679
|
if (input[_TTK] != null) {
|
|
20680
|
-
const memberEntries = se_tagKeyListType(input[_TTK],
|
|
20680
|
+
const memberEntries = se_tagKeyListType(input[_TTK], context);
|
|
20681
20681
|
if (input[_TTK]?.length === 0) {
|
|
20682
20682
|
entries.TransitiveTagKeys = [];
|
|
20683
20683
|
}
|
|
@@ -20699,7 +20699,7 @@ var init_Aws_query = __esm({
|
|
|
20699
20699
|
entries[_SI] = input[_SI];
|
|
20700
20700
|
}
|
|
20701
20701
|
if (input[_PC] != null) {
|
|
20702
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC],
|
|
20702
|
+
const memberEntries = se_ProvidedContextsListType(input[_PC], context);
|
|
20703
20703
|
if (input[_PC]?.length === 0) {
|
|
20704
20704
|
entries.ProvidedContexts = [];
|
|
20705
20705
|
}
|
|
@@ -20710,7 +20710,7 @@ var init_Aws_query = __esm({
|
|
|
20710
20710
|
}
|
|
20711
20711
|
return entries;
|
|
20712
20712
|
};
|
|
20713
|
-
se_AssumeRoleWithWebIdentityRequest = (input,
|
|
20713
|
+
se_AssumeRoleWithWebIdentityRequest = (input, context) => {
|
|
20714
20714
|
const entries = {};
|
|
20715
20715
|
if (input[_RA] != null) {
|
|
20716
20716
|
entries[_RA] = input[_RA];
|
|
@@ -20725,7 +20725,7 @@ var init_Aws_query = __esm({
|
|
|
20725
20725
|
entries[_PI] = input[_PI];
|
|
20726
20726
|
}
|
|
20727
20727
|
if (input[_PA] != null) {
|
|
20728
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20728
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
20729
20729
|
if (input[_PA]?.length === 0) {
|
|
20730
20730
|
entries.PolicyArns = [];
|
|
20731
20731
|
}
|
|
@@ -20742,14 +20742,14 @@ var init_Aws_query = __esm({
|
|
|
20742
20742
|
}
|
|
20743
20743
|
return entries;
|
|
20744
20744
|
};
|
|
20745
|
-
se_policyDescriptorListType = (input,
|
|
20745
|
+
se_policyDescriptorListType = (input, context) => {
|
|
20746
20746
|
const entries = {};
|
|
20747
20747
|
let counter = 1;
|
|
20748
20748
|
for (const entry of input) {
|
|
20749
20749
|
if (entry === null) {
|
|
20750
20750
|
continue;
|
|
20751
20751
|
}
|
|
20752
|
-
const memberEntries = se_PolicyDescriptorType(entry,
|
|
20752
|
+
const memberEntries = se_PolicyDescriptorType(entry, context);
|
|
20753
20753
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20754
20754
|
entries[`member.${counter}.${key}`] = value;
|
|
20755
20755
|
});
|
|
@@ -20757,14 +20757,14 @@ var init_Aws_query = __esm({
|
|
|
20757
20757
|
}
|
|
20758
20758
|
return entries;
|
|
20759
20759
|
};
|
|
20760
|
-
se_PolicyDescriptorType = (input,
|
|
20760
|
+
se_PolicyDescriptorType = (input, context) => {
|
|
20761
20761
|
const entries = {};
|
|
20762
20762
|
if (input[_a15] != null) {
|
|
20763
20763
|
entries[_a15] = input[_a15];
|
|
20764
20764
|
}
|
|
20765
20765
|
return entries;
|
|
20766
20766
|
};
|
|
20767
|
-
se_ProvidedContext = (input,
|
|
20767
|
+
se_ProvidedContext = (input, context) => {
|
|
20768
20768
|
const entries = {};
|
|
20769
20769
|
if (input[_PAr] != null) {
|
|
20770
20770
|
entries[_PAr] = input[_PAr];
|
|
@@ -20774,14 +20774,14 @@ var init_Aws_query = __esm({
|
|
|
20774
20774
|
}
|
|
20775
20775
|
return entries;
|
|
20776
20776
|
};
|
|
20777
|
-
se_ProvidedContextsListType = (input,
|
|
20777
|
+
se_ProvidedContextsListType = (input, context) => {
|
|
20778
20778
|
const entries = {};
|
|
20779
20779
|
let counter = 1;
|
|
20780
20780
|
for (const entry of input) {
|
|
20781
20781
|
if (entry === null) {
|
|
20782
20782
|
continue;
|
|
20783
20783
|
}
|
|
20784
|
-
const memberEntries = se_ProvidedContext(entry,
|
|
20784
|
+
const memberEntries = se_ProvidedContext(entry, context);
|
|
20785
20785
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20786
20786
|
entries[`member.${counter}.${key}`] = value;
|
|
20787
20787
|
});
|
|
@@ -20789,7 +20789,7 @@ var init_Aws_query = __esm({
|
|
|
20789
20789
|
}
|
|
20790
20790
|
return entries;
|
|
20791
20791
|
};
|
|
20792
|
-
se_Tag = (input,
|
|
20792
|
+
se_Tag = (input, context) => {
|
|
20793
20793
|
const entries = {};
|
|
20794
20794
|
if (input[_K] != null) {
|
|
20795
20795
|
entries[_K] = input[_K];
|
|
@@ -20799,7 +20799,7 @@ var init_Aws_query = __esm({
|
|
|
20799
20799
|
}
|
|
20800
20800
|
return entries;
|
|
20801
20801
|
};
|
|
20802
|
-
se_tagKeyListType = (input,
|
|
20802
|
+
se_tagKeyListType = (input, context) => {
|
|
20803
20803
|
const entries = {};
|
|
20804
20804
|
let counter = 1;
|
|
20805
20805
|
for (const entry of input) {
|
|
@@ -20811,14 +20811,14 @@ var init_Aws_query = __esm({
|
|
|
20811
20811
|
}
|
|
20812
20812
|
return entries;
|
|
20813
20813
|
};
|
|
20814
|
-
se_tagListType = (input,
|
|
20814
|
+
se_tagListType = (input, context) => {
|
|
20815
20815
|
const entries = {};
|
|
20816
20816
|
let counter = 1;
|
|
20817
20817
|
for (const entry of input) {
|
|
20818
20818
|
if (entry === null) {
|
|
20819
20819
|
continue;
|
|
20820
20820
|
}
|
|
20821
|
-
const memberEntries = se_Tag(entry,
|
|
20821
|
+
const memberEntries = se_Tag(entry, context);
|
|
20822
20822
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20823
20823
|
entries[`member.${counter}.${key}`] = value;
|
|
20824
20824
|
});
|
|
@@ -20826,7 +20826,7 @@ var init_Aws_query = __esm({
|
|
|
20826
20826
|
}
|
|
20827
20827
|
return entries;
|
|
20828
20828
|
};
|
|
20829
|
-
de_AssumedRoleUser = (output,
|
|
20829
|
+
de_AssumedRoleUser = (output, context) => {
|
|
20830
20830
|
const contents = {};
|
|
20831
20831
|
if (output[_ARI] != null) {
|
|
20832
20832
|
contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]);
|
|
@@ -20836,13 +20836,13 @@ var init_Aws_query = __esm({
|
|
|
20836
20836
|
}
|
|
20837
20837
|
return contents;
|
|
20838
20838
|
};
|
|
20839
|
-
de_AssumeRoleResponse = (output,
|
|
20839
|
+
de_AssumeRoleResponse = (output, context) => {
|
|
20840
20840
|
const contents = {};
|
|
20841
20841
|
if (output[_C] != null) {
|
|
20842
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20842
|
+
contents[_C] = de_Credentials(output[_C], context);
|
|
20843
20843
|
}
|
|
20844
20844
|
if (output[_ARU] != null) {
|
|
20845
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20845
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
20846
20846
|
}
|
|
20847
20847
|
if (output[_PPS] != null) {
|
|
20848
20848
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20852,16 +20852,16 @@ var init_Aws_query = __esm({
|
|
|
20852
20852
|
}
|
|
20853
20853
|
return contents;
|
|
20854
20854
|
};
|
|
20855
|
-
de_AssumeRoleWithWebIdentityResponse = (output,
|
|
20855
|
+
de_AssumeRoleWithWebIdentityResponse = (output, context) => {
|
|
20856
20856
|
const contents = {};
|
|
20857
20857
|
if (output[_C] != null) {
|
|
20858
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20858
|
+
contents[_C] = de_Credentials(output[_C], context);
|
|
20859
20859
|
}
|
|
20860
20860
|
if (output[_SFWIT] != null) {
|
|
20861
20861
|
contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]);
|
|
20862
20862
|
}
|
|
20863
20863
|
if (output[_ARU] != null) {
|
|
20864
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20864
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
20865
20865
|
}
|
|
20866
20866
|
if (output[_PPS] != null) {
|
|
20867
20867
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20877,7 +20877,7 @@ var init_Aws_query = __esm({
|
|
|
20877
20877
|
}
|
|
20878
20878
|
return contents;
|
|
20879
20879
|
};
|
|
20880
|
-
de_Credentials = (output,
|
|
20880
|
+
de_Credentials = (output, context) => {
|
|
20881
20881
|
const contents = {};
|
|
20882
20882
|
if (output[_AKI] != null) {
|
|
20883
20883
|
contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]);
|
|
@@ -20893,49 +20893,49 @@ var init_Aws_query = __esm({
|
|
|
20893
20893
|
}
|
|
20894
20894
|
return contents;
|
|
20895
20895
|
};
|
|
20896
|
-
de_ExpiredTokenException = (output,
|
|
20896
|
+
de_ExpiredTokenException = (output, context) => {
|
|
20897
20897
|
const contents = {};
|
|
20898
20898
|
if (output[_m] != null) {
|
|
20899
20899
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20900
20900
|
}
|
|
20901
20901
|
return contents;
|
|
20902
20902
|
};
|
|
20903
|
-
de_IDPCommunicationErrorException = (output,
|
|
20903
|
+
de_IDPCommunicationErrorException = (output, context) => {
|
|
20904
20904
|
const contents = {};
|
|
20905
20905
|
if (output[_m] != null) {
|
|
20906
20906
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20907
20907
|
}
|
|
20908
20908
|
return contents;
|
|
20909
20909
|
};
|
|
20910
|
-
de_IDPRejectedClaimException = (output,
|
|
20910
|
+
de_IDPRejectedClaimException = (output, context) => {
|
|
20911
20911
|
const contents = {};
|
|
20912
20912
|
if (output[_m] != null) {
|
|
20913
20913
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20914
20914
|
}
|
|
20915
20915
|
return contents;
|
|
20916
20916
|
};
|
|
20917
|
-
de_InvalidIdentityTokenException = (output,
|
|
20917
|
+
de_InvalidIdentityTokenException = (output, context) => {
|
|
20918
20918
|
const contents = {};
|
|
20919
20919
|
if (output[_m] != null) {
|
|
20920
20920
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20921
20921
|
}
|
|
20922
20922
|
return contents;
|
|
20923
20923
|
};
|
|
20924
|
-
de_MalformedPolicyDocumentException = (output,
|
|
20924
|
+
de_MalformedPolicyDocumentException = (output, context) => {
|
|
20925
20925
|
const contents = {};
|
|
20926
20926
|
if (output[_m] != null) {
|
|
20927
20927
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20928
20928
|
}
|
|
20929
20929
|
return contents;
|
|
20930
20930
|
};
|
|
20931
|
-
de_PackedPolicyTooLargeException = (output,
|
|
20931
|
+
de_PackedPolicyTooLargeException = (output, context) => {
|
|
20932
20932
|
const contents = {};
|
|
20933
20933
|
if (output[_m] != null) {
|
|
20934
20934
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20935
20935
|
}
|
|
20936
20936
|
return contents;
|
|
20937
20937
|
};
|
|
20938
|
-
de_RegionDisabledException = (output,
|
|
20938
|
+
de_RegionDisabledException = (output, context) => {
|
|
20939
20939
|
const contents = {};
|
|
20940
20940
|
if (output[_m] != null) {
|
|
20941
20941
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
@@ -20949,8 +20949,8 @@ var init_Aws_query = __esm({
|
|
|
20949
20949
|
cfId: output.headers["x-amz-cf-id"]
|
|
20950
20950
|
});
|
|
20951
20951
|
throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException);
|
|
20952
|
-
buildHttpRpcRequest = async (
|
|
20953
|
-
const { hostname, protocol = "https", port, path: basePath } = await
|
|
20952
|
+
buildHttpRpcRequest = async (context, headers, path7, resolvedHostname, body) => {
|
|
20953
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
20954
20954
|
const contents = {
|
|
20955
20955
|
protocol,
|
|
20956
20956
|
hostname,
|
|
@@ -21800,7 +21800,7 @@ var require_dist_cjs63 = __commonJS({
|
|
|
21800
21800
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
21801
21801
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
21802
21802
|
}
|
|
21803
|
-
async handle(next, args,
|
|
21803
|
+
async handle(next, args, context = {}) {
|
|
21804
21804
|
const request = args.request;
|
|
21805
21805
|
const { body: payload2, query: query2 } = request;
|
|
21806
21806
|
if (!(payload2 instanceof stream2.Readable)) {
|
|
@@ -21938,10 +21938,10 @@ var require_endpointResolver2 = __commonJS({
|
|
|
21938
21938
|
size: 50,
|
|
21939
21939
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
21940
21940
|
});
|
|
21941
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
21941
|
+
var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
21942
21942
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
21943
21943
|
endpointParams,
|
|
21944
|
-
logger:
|
|
21944
|
+
logger: context.logger
|
|
21945
21945
|
}));
|
|
21946
21946
|
};
|
|
21947
21947
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -23349,8 +23349,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23349
23349
|
...obj,
|
|
23350
23350
|
...obj.input && { input: CountTokensInputFilterSensitiveLog(obj.input) }
|
|
23351
23351
|
});
|
|
23352
|
-
var se_ApplyGuardrailCommand = async (input,
|
|
23353
|
-
const b3 = core.requestBuilder(input,
|
|
23352
|
+
var se_ApplyGuardrailCommand = async (input, context) => {
|
|
23353
|
+
const b3 = core.requestBuilder(input, context);
|
|
23354
23354
|
const headers = {
|
|
23355
23355
|
"content-type": "application/json"
|
|
23356
23356
|
};
|
|
@@ -23359,15 +23359,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23359
23359
|
b3.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
|
|
23360
23360
|
let body;
|
|
23361
23361
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23362
|
-
content: (_2) => se_GuardrailContentBlockList(_2,
|
|
23362
|
+
content: (_2) => se_GuardrailContentBlockList(_2, context),
|
|
23363
23363
|
outputScope: [],
|
|
23364
23364
|
source: []
|
|
23365
23365
|
}));
|
|
23366
23366
|
b3.m("POST").h(headers).b(body);
|
|
23367
23367
|
return b3.build();
|
|
23368
23368
|
};
|
|
23369
|
-
var se_ConverseCommand = async (input,
|
|
23370
|
-
const b3 = core.requestBuilder(input,
|
|
23369
|
+
var se_ConverseCommand = async (input, context) => {
|
|
23370
|
+
const b3 = core.requestBuilder(input, context);
|
|
23371
23371
|
const headers = {
|
|
23372
23372
|
"content-type": "application/json"
|
|
23373
23373
|
};
|
|
@@ -23379,18 +23379,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23379
23379
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23380
23380
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23381
23381
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23382
|
-
messages: (_2) => se_Messages(_2,
|
|
23382
|
+
messages: (_2) => se_Messages(_2, context),
|
|
23383
23383
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23384
23384
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23385
23385
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23386
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23386
|
+
system: (_2) => se_SystemContentBlocks(_2, context),
|
|
23387
23387
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23388
23388
|
}));
|
|
23389
23389
|
b3.m("POST").h(headers).b(body);
|
|
23390
23390
|
return b3.build();
|
|
23391
23391
|
};
|
|
23392
|
-
var se_ConverseStreamCommand = async (input,
|
|
23393
|
-
const b3 = core.requestBuilder(input,
|
|
23392
|
+
var se_ConverseStreamCommand = async (input, context) => {
|
|
23393
|
+
const b3 = core.requestBuilder(input, context);
|
|
23394
23394
|
const headers = {
|
|
23395
23395
|
"content-type": "application/json"
|
|
23396
23396
|
};
|
|
@@ -23402,18 +23402,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23402
23402
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23403
23403
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23404
23404
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23405
|
-
messages: (_2) => se_Messages(_2,
|
|
23405
|
+
messages: (_2) => se_Messages(_2, context),
|
|
23406
23406
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23407
23407
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23408
23408
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23409
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23409
|
+
system: (_2) => se_SystemContentBlocks(_2, context),
|
|
23410
23410
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23411
23411
|
}));
|
|
23412
23412
|
b3.m("POST").h(headers).b(body);
|
|
23413
23413
|
return b3.build();
|
|
23414
23414
|
};
|
|
23415
|
-
var se_CountTokensCommand = async (input,
|
|
23416
|
-
const b3 = core.requestBuilder(input,
|
|
23415
|
+
var se_CountTokensCommand = async (input, context) => {
|
|
23416
|
+
const b3 = core.requestBuilder(input, context);
|
|
23417
23417
|
const headers = {
|
|
23418
23418
|
"content-type": "application/json"
|
|
23419
23419
|
};
|
|
@@ -23421,13 +23421,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23421
23421
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23422
23422
|
let body;
|
|
23423
23423
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23424
|
-
input: (_2) => se_CountTokensInput(_2,
|
|
23424
|
+
input: (_2) => se_CountTokensInput(_2, context)
|
|
23425
23425
|
}));
|
|
23426
23426
|
b3.m("POST").h(headers).b(body);
|
|
23427
23427
|
return b3.build();
|
|
23428
23428
|
};
|
|
23429
|
-
var se_GetAsyncInvokeCommand = async (input,
|
|
23430
|
-
const b3 = core.requestBuilder(input,
|
|
23429
|
+
var se_GetAsyncInvokeCommand = async (input, context) => {
|
|
23430
|
+
const b3 = core.requestBuilder(input, context);
|
|
23431
23431
|
const headers = {};
|
|
23432
23432
|
b3.bp("/async-invoke/{invocationArn}");
|
|
23433
23433
|
b3.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
|
|
@@ -23435,8 +23435,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23435
23435
|
b3.m("GET").h(headers).b(body);
|
|
23436
23436
|
return b3.build();
|
|
23437
23437
|
};
|
|
23438
|
-
var se_InvokeModelCommand = async (input,
|
|
23439
|
-
const b3 = core.requestBuilder(input,
|
|
23438
|
+
var se_InvokeModelCommand = async (input, context) => {
|
|
23439
|
+
const b3 = core.requestBuilder(input, context);
|
|
23440
23440
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23441
23441
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23442
23442
|
[_a16]: input[_a16],
|
|
@@ -23454,8 +23454,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23454
23454
|
b3.m("POST").h(headers).b(body);
|
|
23455
23455
|
return b3.build();
|
|
23456
23456
|
};
|
|
23457
|
-
var se_InvokeModelWithBidirectionalStreamCommand = async (input,
|
|
23458
|
-
const b3 = core.requestBuilder(input,
|
|
23457
|
+
var se_InvokeModelWithBidirectionalStreamCommand = async (input, context) => {
|
|
23458
|
+
const b3 = core.requestBuilder(input, context);
|
|
23459
23459
|
const headers = {
|
|
23460
23460
|
"content-type": "application/json"
|
|
23461
23461
|
};
|
|
@@ -23463,13 +23463,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23463
23463
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23464
23464
|
let body;
|
|
23465
23465
|
if (input.body !== void 0) {
|
|
23466
|
-
body = se_InvokeModelWithBidirectionalStreamInput(input.body,
|
|
23466
|
+
body = se_InvokeModelWithBidirectionalStreamInput(input.body, context);
|
|
23467
23467
|
}
|
|
23468
23468
|
b3.m("POST").h(headers).b(body);
|
|
23469
23469
|
return b3.build();
|
|
23470
23470
|
};
|
|
23471
|
-
var se_InvokeModelWithResponseStreamCommand = async (input,
|
|
23472
|
-
const b3 = core.requestBuilder(input,
|
|
23471
|
+
var se_InvokeModelWithResponseStreamCommand = async (input, context) => {
|
|
23472
|
+
const b3 = core.requestBuilder(input, context);
|
|
23473
23473
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23474
23474
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23475
23475
|
[_xaba]: input[_a16],
|
|
@@ -23487,8 +23487,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23487
23487
|
b3.m("POST").h(headers).b(body);
|
|
23488
23488
|
return b3.build();
|
|
23489
23489
|
};
|
|
23490
|
-
var se_ListAsyncInvokesCommand = async (input,
|
|
23491
|
-
const b3 = core.requestBuilder(input,
|
|
23490
|
+
var se_ListAsyncInvokesCommand = async (input, context) => {
|
|
23491
|
+
const b3 = core.requestBuilder(input, context);
|
|
23492
23492
|
const headers = {};
|
|
23493
23493
|
b3.bp("/async-invoke");
|
|
23494
23494
|
const query2 = smithyClient.map({
|
|
@@ -23504,8 +23504,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23504
23504
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
23505
23505
|
return b3.build();
|
|
23506
23506
|
};
|
|
23507
|
-
var se_StartAsyncInvokeCommand = async (input,
|
|
23508
|
-
const b3 = core.requestBuilder(input,
|
|
23507
|
+
var se_StartAsyncInvokeCommand = async (input, context) => {
|
|
23508
|
+
const b3 = core.requestBuilder(input, context);
|
|
23509
23509
|
const headers = {
|
|
23510
23510
|
"content-type": "application/json"
|
|
23511
23511
|
};
|
|
@@ -23521,14 +23521,14 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23521
23521
|
b3.m("POST").h(headers).b(body);
|
|
23522
23522
|
return b3.build();
|
|
23523
23523
|
};
|
|
23524
|
-
var de_ApplyGuardrailCommand = async (output,
|
|
23524
|
+
var de_ApplyGuardrailCommand = async (output, context) => {
|
|
23525
23525
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23526
|
-
return de_CommandError3(output,
|
|
23526
|
+
return de_CommandError3(output, context);
|
|
23527
23527
|
}
|
|
23528
23528
|
const contents = smithyClient.map({
|
|
23529
23529
|
$metadata: deserializeMetadata3(output)
|
|
23530
23530
|
});
|
|
23531
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23531
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23532
23532
|
const doc = smithyClient.take(data2, {
|
|
23533
23533
|
action: smithyClient.expectString,
|
|
23534
23534
|
actionReason: smithyClient.expectString,
|
|
@@ -23540,18 +23540,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23540
23540
|
Object.assign(contents, doc);
|
|
23541
23541
|
return contents;
|
|
23542
23542
|
};
|
|
23543
|
-
var de_ConverseCommand = async (output,
|
|
23543
|
+
var de_ConverseCommand = async (output, context) => {
|
|
23544
23544
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23545
|
-
return de_CommandError3(output,
|
|
23545
|
+
return de_CommandError3(output, context);
|
|
23546
23546
|
}
|
|
23547
23547
|
const contents = smithyClient.map({
|
|
23548
23548
|
$metadata: deserializeMetadata3(output)
|
|
23549
23549
|
});
|
|
23550
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23550
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23551
23551
|
const doc = smithyClient.take(data2, {
|
|
23552
23552
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
23553
23553
|
metrics: smithyClient._json,
|
|
23554
|
-
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2),
|
|
23554
|
+
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context),
|
|
23555
23555
|
performanceConfig: smithyClient._json,
|
|
23556
23556
|
stopReason: smithyClient.expectString,
|
|
23557
23557
|
trace: (_2) => de_ConverseTrace(_2),
|
|
@@ -23560,39 +23560,39 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23560
23560
|
Object.assign(contents, doc);
|
|
23561
23561
|
return contents;
|
|
23562
23562
|
};
|
|
23563
|
-
var de_ConverseStreamCommand = async (output,
|
|
23563
|
+
var de_ConverseStreamCommand = async (output, context) => {
|
|
23564
23564
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23565
|
-
return de_CommandError3(output,
|
|
23565
|
+
return de_CommandError3(output, context);
|
|
23566
23566
|
}
|
|
23567
23567
|
const contents = smithyClient.map({
|
|
23568
23568
|
$metadata: deserializeMetadata3(output)
|
|
23569
23569
|
});
|
|
23570
23570
|
const data2 = output.body;
|
|
23571
|
-
contents.stream = de_ConverseStreamOutput(data2,
|
|
23571
|
+
contents.stream = de_ConverseStreamOutput(data2, context);
|
|
23572
23572
|
return contents;
|
|
23573
23573
|
};
|
|
23574
|
-
var de_CountTokensCommand = async (output,
|
|
23574
|
+
var de_CountTokensCommand = async (output, context) => {
|
|
23575
23575
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23576
|
-
return de_CommandError3(output,
|
|
23576
|
+
return de_CommandError3(output, context);
|
|
23577
23577
|
}
|
|
23578
23578
|
const contents = smithyClient.map({
|
|
23579
23579
|
$metadata: deserializeMetadata3(output)
|
|
23580
23580
|
});
|
|
23581
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23581
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23582
23582
|
const doc = smithyClient.take(data2, {
|
|
23583
23583
|
inputTokens: smithyClient.expectInt32
|
|
23584
23584
|
});
|
|
23585
23585
|
Object.assign(contents, doc);
|
|
23586
23586
|
return contents;
|
|
23587
23587
|
};
|
|
23588
|
-
var de_GetAsyncInvokeCommand = async (output,
|
|
23588
|
+
var de_GetAsyncInvokeCommand = async (output, context) => {
|
|
23589
23589
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23590
|
-
return de_CommandError3(output,
|
|
23590
|
+
return de_CommandError3(output, context);
|
|
23591
23591
|
}
|
|
23592
23592
|
const contents = smithyClient.map({
|
|
23593
23593
|
$metadata: deserializeMetadata3(output)
|
|
23594
23594
|
});
|
|
23595
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23595
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23596
23596
|
const doc = smithyClient.take(data2, {
|
|
23597
23597
|
clientRequestToken: smithyClient.expectString,
|
|
23598
23598
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -23607,33 +23607,33 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23607
23607
|
Object.assign(contents, doc);
|
|
23608
23608
|
return contents;
|
|
23609
23609
|
};
|
|
23610
|
-
var de_InvokeModelCommand = async (output,
|
|
23610
|
+
var de_InvokeModelCommand = async (output, context) => {
|
|
23611
23611
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23612
|
-
return de_CommandError3(output,
|
|
23612
|
+
return de_CommandError3(output, context);
|
|
23613
23613
|
}
|
|
23614
23614
|
const contents = smithyClient.map({
|
|
23615
23615
|
$metadata: deserializeMetadata3(output),
|
|
23616
23616
|
[_cT]: [, output.headers[_ct]],
|
|
23617
23617
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23618
23618
|
});
|
|
23619
|
-
const data2 = await smithyClient.collectBody(output.body,
|
|
23619
|
+
const data2 = await smithyClient.collectBody(output.body, context);
|
|
23620
23620
|
contents.body = data2;
|
|
23621
23621
|
return contents;
|
|
23622
23622
|
};
|
|
23623
|
-
var de_InvokeModelWithBidirectionalStreamCommand = async (output,
|
|
23623
|
+
var de_InvokeModelWithBidirectionalStreamCommand = async (output, context) => {
|
|
23624
23624
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23625
|
-
return de_CommandError3(output,
|
|
23625
|
+
return de_CommandError3(output, context);
|
|
23626
23626
|
}
|
|
23627
23627
|
const contents = smithyClient.map({
|
|
23628
23628
|
$metadata: deserializeMetadata3(output)
|
|
23629
23629
|
});
|
|
23630
23630
|
const data2 = output.body;
|
|
23631
|
-
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2,
|
|
23631
|
+
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context);
|
|
23632
23632
|
return contents;
|
|
23633
23633
|
};
|
|
23634
|
-
var de_InvokeModelWithResponseStreamCommand = async (output,
|
|
23634
|
+
var de_InvokeModelWithResponseStreamCommand = async (output, context) => {
|
|
23635
23635
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23636
|
-
return de_CommandError3(output,
|
|
23636
|
+
return de_CommandError3(output, context);
|
|
23637
23637
|
}
|
|
23638
23638
|
const contents = smithyClient.map({
|
|
23639
23639
|
$metadata: deserializeMetadata3(output),
|
|
@@ -23641,17 +23641,17 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23641
23641
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23642
23642
|
});
|
|
23643
23643
|
const data2 = output.body;
|
|
23644
|
-
contents.body = de_ResponseStream(data2,
|
|
23644
|
+
contents.body = de_ResponseStream(data2, context);
|
|
23645
23645
|
return contents;
|
|
23646
23646
|
};
|
|
23647
|
-
var de_ListAsyncInvokesCommand = async (output,
|
|
23647
|
+
var de_ListAsyncInvokesCommand = async (output, context) => {
|
|
23648
23648
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23649
|
-
return de_CommandError3(output,
|
|
23649
|
+
return de_CommandError3(output, context);
|
|
23650
23650
|
}
|
|
23651
23651
|
const contents = smithyClient.map({
|
|
23652
23652
|
$metadata: deserializeMetadata3(output)
|
|
23653
23653
|
});
|
|
23654
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23654
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23655
23655
|
const doc = smithyClient.take(data2, {
|
|
23656
23656
|
asyncInvokeSummaries: (_2) => de_AsyncInvokeSummaries(_2),
|
|
23657
23657
|
nextToken: smithyClient.expectString
|
|
@@ -23659,24 +23659,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23659
23659
|
Object.assign(contents, doc);
|
|
23660
23660
|
return contents;
|
|
23661
23661
|
};
|
|
23662
|
-
var de_StartAsyncInvokeCommand = async (output,
|
|
23662
|
+
var de_StartAsyncInvokeCommand = async (output, context) => {
|
|
23663
23663
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23664
|
-
return de_CommandError3(output,
|
|
23664
|
+
return de_CommandError3(output, context);
|
|
23665
23665
|
}
|
|
23666
23666
|
const contents = smithyClient.map({
|
|
23667
23667
|
$metadata: deserializeMetadata3(output)
|
|
23668
23668
|
});
|
|
23669
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23669
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
23670
23670
|
const doc = smithyClient.take(data2, {
|
|
23671
23671
|
invocationArn: smithyClient.expectString
|
|
23672
23672
|
});
|
|
23673
23673
|
Object.assign(contents, doc);
|
|
23674
23674
|
return contents;
|
|
23675
23675
|
};
|
|
23676
|
-
var de_CommandError3 = async (output,
|
|
23676
|
+
var de_CommandError3 = async (output, context) => {
|
|
23677
23677
|
const parsedOutput = {
|
|
23678
23678
|
...output,
|
|
23679
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
23679
|
+
body: await core$1.parseJsonErrorBody(output.body, context)
|
|
23680
23680
|
};
|
|
23681
23681
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
23682
23682
|
switch (errorCode) {
|
|
@@ -23726,7 +23726,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23726
23726
|
}
|
|
23727
23727
|
};
|
|
23728
23728
|
var throwDefaultError3 = smithyClient.withBaseException(BedrockRuntimeServiceException);
|
|
23729
|
-
var de_AccessDeniedExceptionRes2 = async (parsedOutput,
|
|
23729
|
+
var de_AccessDeniedExceptionRes2 = async (parsedOutput, context) => {
|
|
23730
23730
|
const contents = smithyClient.map({});
|
|
23731
23731
|
const data2 = parsedOutput.body;
|
|
23732
23732
|
const doc = smithyClient.take(data2, {
|
|
@@ -23739,7 +23739,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23739
23739
|
});
|
|
23740
23740
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23741
23741
|
};
|
|
23742
|
-
var de_ConflictExceptionRes = async (parsedOutput,
|
|
23742
|
+
var de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
23743
23743
|
const contents = smithyClient.map({});
|
|
23744
23744
|
const data2 = parsedOutput.body;
|
|
23745
23745
|
const doc = smithyClient.take(data2, {
|
|
@@ -23752,7 +23752,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23752
23752
|
});
|
|
23753
23753
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23754
23754
|
};
|
|
23755
|
-
var de_InternalServerExceptionRes2 = async (parsedOutput,
|
|
23755
|
+
var de_InternalServerExceptionRes2 = async (parsedOutput, context) => {
|
|
23756
23756
|
const contents = smithyClient.map({});
|
|
23757
23757
|
const data2 = parsedOutput.body;
|
|
23758
23758
|
const doc = smithyClient.take(data2, {
|
|
@@ -23765,7 +23765,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23765
23765
|
});
|
|
23766
23766
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23767
23767
|
};
|
|
23768
|
-
var de_ModelErrorExceptionRes = async (parsedOutput,
|
|
23768
|
+
var de_ModelErrorExceptionRes = async (parsedOutput, context) => {
|
|
23769
23769
|
const contents = smithyClient.map({});
|
|
23770
23770
|
const data2 = parsedOutput.body;
|
|
23771
23771
|
const doc = smithyClient.take(data2, {
|
|
@@ -23780,7 +23780,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23780
23780
|
});
|
|
23781
23781
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23782
23782
|
};
|
|
23783
|
-
var de_ModelNotReadyExceptionRes = async (parsedOutput,
|
|
23783
|
+
var de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
23784
23784
|
const contents = smithyClient.map({});
|
|
23785
23785
|
const data2 = parsedOutput.body;
|
|
23786
23786
|
const doc = smithyClient.take(data2, {
|
|
@@ -23793,7 +23793,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23793
23793
|
});
|
|
23794
23794
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23795
23795
|
};
|
|
23796
|
-
var de_ModelStreamErrorExceptionRes = async (parsedOutput,
|
|
23796
|
+
var de_ModelStreamErrorExceptionRes = async (parsedOutput, context) => {
|
|
23797
23797
|
const contents = smithyClient.map({});
|
|
23798
23798
|
const data2 = parsedOutput.body;
|
|
23799
23799
|
const doc = smithyClient.take(data2, {
|
|
@@ -23808,7 +23808,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23808
23808
|
});
|
|
23809
23809
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23810
23810
|
};
|
|
23811
|
-
var de_ModelTimeoutExceptionRes = async (parsedOutput,
|
|
23811
|
+
var de_ModelTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
23812
23812
|
const contents = smithyClient.map({});
|
|
23813
23813
|
const data2 = parsedOutput.body;
|
|
23814
23814
|
const doc = smithyClient.take(data2, {
|
|
@@ -23821,7 +23821,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23821
23821
|
});
|
|
23822
23822
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23823
23823
|
};
|
|
23824
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
23824
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
23825
23825
|
const contents = smithyClient.map({});
|
|
23826
23826
|
const data2 = parsedOutput.body;
|
|
23827
23827
|
const doc = smithyClient.take(data2, {
|
|
@@ -23834,7 +23834,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23834
23834
|
});
|
|
23835
23835
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23836
23836
|
};
|
|
23837
|
-
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput,
|
|
23837
|
+
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
23838
23838
|
const contents = smithyClient.map({});
|
|
23839
23839
|
const data2 = parsedOutput.body;
|
|
23840
23840
|
const doc = smithyClient.take(data2, {
|
|
@@ -23847,7 +23847,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23847
23847
|
});
|
|
23848
23848
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23849
23849
|
};
|
|
23850
|
-
var de_ServiceUnavailableExceptionRes = async (parsedOutput,
|
|
23850
|
+
var de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
23851
23851
|
const contents = smithyClient.map({});
|
|
23852
23852
|
const data2 = parsedOutput.body;
|
|
23853
23853
|
const doc = smithyClient.take(data2, {
|
|
@@ -23860,7 +23860,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23860
23860
|
});
|
|
23861
23861
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23862
23862
|
};
|
|
23863
|
-
var de_ThrottlingExceptionRes = async (parsedOutput,
|
|
23863
|
+
var de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
23864
23864
|
const contents = smithyClient.map({});
|
|
23865
23865
|
const data2 = parsedOutput.body;
|
|
23866
23866
|
const doc = smithyClient.take(data2, {
|
|
@@ -23873,7 +23873,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23873
23873
|
});
|
|
23874
23874
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23875
23875
|
};
|
|
23876
|
-
var de_ValidationExceptionRes = async (parsedOutput,
|
|
23876
|
+
var de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
23877
23877
|
const contents = smithyClient.map({});
|
|
23878
23878
|
const data2 = parsedOutput.body;
|
|
23879
23879
|
const doc = smithyClient.take(data2, {
|
|
@@ -23886,367 +23886,367 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23886
23886
|
});
|
|
23887
23887
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23888
23888
|
};
|
|
23889
|
-
var se_InvokeModelWithBidirectionalStreamInput = (input,
|
|
23889
|
+
var se_InvokeModelWithBidirectionalStreamInput = (input, context) => {
|
|
23890
23890
|
const eventMarshallingVisitor = (event) => exports2.InvokeModelWithBidirectionalStreamInput.visit(event, {
|
|
23891
|
-
chunk: (value) => se_BidirectionalInputPayloadPart_event(value,
|
|
23891
|
+
chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context),
|
|
23892
23892
|
_: (value) => value
|
|
23893
23893
|
});
|
|
23894
|
-
return
|
|
23894
|
+
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
23895
23895
|
};
|
|
23896
|
-
var se_BidirectionalInputPayloadPart_event = (input,
|
|
23896
|
+
var se_BidirectionalInputPayloadPart_event = (input, context) => {
|
|
23897
23897
|
const headers = {
|
|
23898
23898
|
":event-type": { type: "string", value: "chunk" },
|
|
23899
23899
|
":message-type": { type: "string", value: "event" },
|
|
23900
23900
|
":content-type": { type: "string", value: "application/json" }
|
|
23901
23901
|
};
|
|
23902
23902
|
let body = new Uint8Array();
|
|
23903
|
-
body = se_BidirectionalInputPayloadPart(input,
|
|
23904
|
-
body =
|
|
23903
|
+
body = se_BidirectionalInputPayloadPart(input, context);
|
|
23904
|
+
body = context.utf8Decoder(JSON.stringify(body));
|
|
23905
23905
|
return { headers, body };
|
|
23906
23906
|
};
|
|
23907
|
-
var de_ConverseStreamOutput = (output,
|
|
23908
|
-
return
|
|
23907
|
+
var de_ConverseStreamOutput = (output, context) => {
|
|
23908
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23909
23909
|
if (event["messageStart"] != null) {
|
|
23910
23910
|
return {
|
|
23911
|
-
messageStart: await de_MessageStartEvent_event(event["messageStart"],
|
|
23911
|
+
messageStart: await de_MessageStartEvent_event(event["messageStart"], context)
|
|
23912
23912
|
};
|
|
23913
23913
|
}
|
|
23914
23914
|
if (event["contentBlockStart"] != null) {
|
|
23915
23915
|
return {
|
|
23916
|
-
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"],
|
|
23916
|
+
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context)
|
|
23917
23917
|
};
|
|
23918
23918
|
}
|
|
23919
23919
|
if (event["contentBlockDelta"] != null) {
|
|
23920
23920
|
return {
|
|
23921
|
-
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"],
|
|
23921
|
+
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context)
|
|
23922
23922
|
};
|
|
23923
23923
|
}
|
|
23924
23924
|
if (event["contentBlockStop"] != null) {
|
|
23925
23925
|
return {
|
|
23926
|
-
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"],
|
|
23926
|
+
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context)
|
|
23927
23927
|
};
|
|
23928
23928
|
}
|
|
23929
23929
|
if (event["messageStop"] != null) {
|
|
23930
23930
|
return {
|
|
23931
|
-
messageStop: await de_MessageStopEvent_event(event["messageStop"],
|
|
23931
|
+
messageStop: await de_MessageStopEvent_event(event["messageStop"], context)
|
|
23932
23932
|
};
|
|
23933
23933
|
}
|
|
23934
23934
|
if (event["metadata"] != null) {
|
|
23935
23935
|
return {
|
|
23936
|
-
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"],
|
|
23936
|
+
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context)
|
|
23937
23937
|
};
|
|
23938
23938
|
}
|
|
23939
23939
|
if (event["internalServerException"] != null) {
|
|
23940
23940
|
return {
|
|
23941
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23941
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
23942
23942
|
};
|
|
23943
23943
|
}
|
|
23944
23944
|
if (event["modelStreamErrorException"] != null) {
|
|
23945
23945
|
return {
|
|
23946
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23946
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
23947
23947
|
};
|
|
23948
23948
|
}
|
|
23949
23949
|
if (event["validationException"] != null) {
|
|
23950
23950
|
return {
|
|
23951
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23951
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
23952
23952
|
};
|
|
23953
23953
|
}
|
|
23954
23954
|
if (event["throttlingException"] != null) {
|
|
23955
23955
|
return {
|
|
23956
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23956
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
23957
23957
|
};
|
|
23958
23958
|
}
|
|
23959
23959
|
if (event["serviceUnavailableException"] != null) {
|
|
23960
23960
|
return {
|
|
23961
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23961
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
23962
23962
|
};
|
|
23963
23963
|
}
|
|
23964
23964
|
return { $unknown: event };
|
|
23965
23965
|
});
|
|
23966
23966
|
};
|
|
23967
|
-
var de_InvokeModelWithBidirectionalStreamOutput = (output,
|
|
23968
|
-
return
|
|
23967
|
+
var de_InvokeModelWithBidirectionalStreamOutput = (output, context) => {
|
|
23968
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23969
23969
|
if (event["chunk"] != null) {
|
|
23970
23970
|
return {
|
|
23971
|
-
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"],
|
|
23971
|
+
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context)
|
|
23972
23972
|
};
|
|
23973
23973
|
}
|
|
23974
23974
|
if (event["internalServerException"] != null) {
|
|
23975
23975
|
return {
|
|
23976
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23976
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
23977
23977
|
};
|
|
23978
23978
|
}
|
|
23979
23979
|
if (event["modelStreamErrorException"] != null) {
|
|
23980
23980
|
return {
|
|
23981
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23981
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
23982
23982
|
};
|
|
23983
23983
|
}
|
|
23984
23984
|
if (event["validationException"] != null) {
|
|
23985
23985
|
return {
|
|
23986
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23986
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
23987
23987
|
};
|
|
23988
23988
|
}
|
|
23989
23989
|
if (event["throttlingException"] != null) {
|
|
23990
23990
|
return {
|
|
23991
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23991
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
23992
23992
|
};
|
|
23993
23993
|
}
|
|
23994
23994
|
if (event["modelTimeoutException"] != null) {
|
|
23995
23995
|
return {
|
|
23996
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
23996
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
|
|
23997
23997
|
};
|
|
23998
23998
|
}
|
|
23999
23999
|
if (event["serviceUnavailableException"] != null) {
|
|
24000
24000
|
return {
|
|
24001
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
24001
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
24002
24002
|
};
|
|
24003
24003
|
}
|
|
24004
24004
|
return { $unknown: event };
|
|
24005
24005
|
});
|
|
24006
24006
|
};
|
|
24007
|
-
var de_ResponseStream = (output,
|
|
24008
|
-
return
|
|
24007
|
+
var de_ResponseStream = (output, context) => {
|
|
24008
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
24009
24009
|
if (event["chunk"] != null) {
|
|
24010
24010
|
return {
|
|
24011
|
-
chunk: await de_PayloadPart_event(event["chunk"],
|
|
24011
|
+
chunk: await de_PayloadPart_event(event["chunk"], context)
|
|
24012
24012
|
};
|
|
24013
24013
|
}
|
|
24014
24014
|
if (event["internalServerException"] != null) {
|
|
24015
24015
|
return {
|
|
24016
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
24016
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
24017
24017
|
};
|
|
24018
24018
|
}
|
|
24019
24019
|
if (event["modelStreamErrorException"] != null) {
|
|
24020
24020
|
return {
|
|
24021
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
24021
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
24022
24022
|
};
|
|
24023
24023
|
}
|
|
24024
24024
|
if (event["validationException"] != null) {
|
|
24025
24025
|
return {
|
|
24026
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
24026
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
24027
24027
|
};
|
|
24028
24028
|
}
|
|
24029
24029
|
if (event["throttlingException"] != null) {
|
|
24030
24030
|
return {
|
|
24031
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
24031
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
24032
24032
|
};
|
|
24033
24033
|
}
|
|
24034
24034
|
if (event["modelTimeoutException"] != null) {
|
|
24035
24035
|
return {
|
|
24036
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
24036
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
|
|
24037
24037
|
};
|
|
24038
24038
|
}
|
|
24039
24039
|
if (event["serviceUnavailableException"] != null) {
|
|
24040
24040
|
return {
|
|
24041
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
24041
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
24042
24042
|
};
|
|
24043
24043
|
}
|
|
24044
24044
|
return { $unknown: event };
|
|
24045
24045
|
});
|
|
24046
24046
|
};
|
|
24047
|
-
var de_BidirectionalOutputPayloadPart_event = async (output,
|
|
24047
|
+
var de_BidirectionalOutputPayloadPart_event = async (output, context) => {
|
|
24048
24048
|
const contents = {};
|
|
24049
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24050
|
-
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2,
|
|
24049
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24050
|
+
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context));
|
|
24051
24051
|
return contents;
|
|
24052
24052
|
};
|
|
24053
|
-
var de_ContentBlockDeltaEvent_event = async (output,
|
|
24053
|
+
var de_ContentBlockDeltaEvent_event = async (output, context) => {
|
|
24054
24054
|
const contents = {};
|
|
24055
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24056
|
-
Object.assign(contents, de_ContentBlockDeltaEvent(data2,
|
|
24055
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24056
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data2, context));
|
|
24057
24057
|
return contents;
|
|
24058
24058
|
};
|
|
24059
|
-
var de_ContentBlockStartEvent_event = async (output,
|
|
24059
|
+
var de_ContentBlockStartEvent_event = async (output, context) => {
|
|
24060
24060
|
const contents = {};
|
|
24061
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24061
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24062
24062
|
Object.assign(contents, smithyClient._json(data2));
|
|
24063
24063
|
return contents;
|
|
24064
24064
|
};
|
|
24065
|
-
var de_ContentBlockStopEvent_event = async (output,
|
|
24065
|
+
var de_ContentBlockStopEvent_event = async (output, context) => {
|
|
24066
24066
|
const contents = {};
|
|
24067
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24067
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24068
24068
|
Object.assign(contents, smithyClient._json(data2));
|
|
24069
24069
|
return contents;
|
|
24070
24070
|
};
|
|
24071
|
-
var de_ConverseStreamMetadataEvent_event = async (output,
|
|
24071
|
+
var de_ConverseStreamMetadataEvent_event = async (output, context) => {
|
|
24072
24072
|
const contents = {};
|
|
24073
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24073
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24074
24074
|
Object.assign(contents, de_ConverseStreamMetadataEvent(data2));
|
|
24075
24075
|
return contents;
|
|
24076
24076
|
};
|
|
24077
|
-
var de_InternalServerException_event = async (output,
|
|
24077
|
+
var de_InternalServerException_event = async (output, context) => {
|
|
24078
24078
|
const parsedOutput = {
|
|
24079
24079
|
...output,
|
|
24080
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24080
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24081
24081
|
};
|
|
24082
24082
|
return de_InternalServerExceptionRes2(parsedOutput);
|
|
24083
24083
|
};
|
|
24084
|
-
var de_MessageStartEvent_event = async (output,
|
|
24084
|
+
var de_MessageStartEvent_event = async (output, context) => {
|
|
24085
24085
|
const contents = {};
|
|
24086
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24086
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24087
24087
|
Object.assign(contents, smithyClient._json(data2));
|
|
24088
24088
|
return contents;
|
|
24089
24089
|
};
|
|
24090
|
-
var de_MessageStopEvent_event = async (output,
|
|
24090
|
+
var de_MessageStopEvent_event = async (output, context) => {
|
|
24091
24091
|
const contents = {};
|
|
24092
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24092
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24093
24093
|
Object.assign(contents, de_MessageStopEvent(data2));
|
|
24094
24094
|
return contents;
|
|
24095
24095
|
};
|
|
24096
|
-
var de_ModelStreamErrorException_event = async (output,
|
|
24096
|
+
var de_ModelStreamErrorException_event = async (output, context) => {
|
|
24097
24097
|
const parsedOutput = {
|
|
24098
24098
|
...output,
|
|
24099
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24099
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24100
24100
|
};
|
|
24101
24101
|
return de_ModelStreamErrorExceptionRes(parsedOutput);
|
|
24102
24102
|
};
|
|
24103
|
-
var de_ModelTimeoutException_event = async (output,
|
|
24103
|
+
var de_ModelTimeoutException_event = async (output, context) => {
|
|
24104
24104
|
const parsedOutput = {
|
|
24105
24105
|
...output,
|
|
24106
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24106
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24107
24107
|
};
|
|
24108
24108
|
return de_ModelTimeoutExceptionRes(parsedOutput);
|
|
24109
24109
|
};
|
|
24110
|
-
var de_PayloadPart_event = async (output,
|
|
24110
|
+
var de_PayloadPart_event = async (output, context) => {
|
|
24111
24111
|
const contents = {};
|
|
24112
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
24113
|
-
Object.assign(contents, de_PayloadPart(data2,
|
|
24112
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
24113
|
+
Object.assign(contents, de_PayloadPart(data2, context));
|
|
24114
24114
|
return contents;
|
|
24115
24115
|
};
|
|
24116
|
-
var de_ServiceUnavailableException_event = async (output,
|
|
24116
|
+
var de_ServiceUnavailableException_event = async (output, context) => {
|
|
24117
24117
|
const parsedOutput = {
|
|
24118
24118
|
...output,
|
|
24119
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24119
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24120
24120
|
};
|
|
24121
24121
|
return de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
24122
24122
|
};
|
|
24123
|
-
var de_ThrottlingException_event = async (output,
|
|
24123
|
+
var de_ThrottlingException_event = async (output, context) => {
|
|
24124
24124
|
const parsedOutput = {
|
|
24125
24125
|
...output,
|
|
24126
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24126
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24127
24127
|
};
|
|
24128
24128
|
return de_ThrottlingExceptionRes(parsedOutput);
|
|
24129
24129
|
};
|
|
24130
|
-
var de_ValidationException_event = async (output,
|
|
24130
|
+
var de_ValidationException_event = async (output, context) => {
|
|
24131
24131
|
const parsedOutput = {
|
|
24132
24132
|
...output,
|
|
24133
|
-
body: await core$1.parseJsonBody(output.body,
|
|
24133
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
24134
24134
|
};
|
|
24135
24135
|
return de_ValidationExceptionRes(parsedOutput);
|
|
24136
24136
|
};
|
|
24137
|
-
var se_BidirectionalInputPayloadPart = (input,
|
|
24137
|
+
var se_BidirectionalInputPayloadPart = (input, context) => {
|
|
24138
24138
|
return smithyClient.take(input, {
|
|
24139
|
-
bytes:
|
|
24139
|
+
bytes: context.base64Encoder
|
|
24140
24140
|
});
|
|
24141
24141
|
};
|
|
24142
|
-
var se_ContentBlock = (input,
|
|
24142
|
+
var se_ContentBlock = (input, context) => {
|
|
24143
24143
|
return exports2.ContentBlock.visit(input, {
|
|
24144
24144
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24145
24145
|
citationsContent: (value) => ({ citationsContent: smithyClient._json(value) }),
|
|
24146
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
24147
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
24148
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
24149
|
-
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value,
|
|
24146
|
+
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
24147
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
24148
|
+
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
24149
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }),
|
|
24150
24150
|
text: (value) => ({ text: value }),
|
|
24151
|
-
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value,
|
|
24151
|
+
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
24152
24152
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value) }),
|
|
24153
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24153
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
24154
24154
|
_: (name14, value) => ({ [name14]: value })
|
|
24155
24155
|
});
|
|
24156
24156
|
};
|
|
24157
|
-
var se_ContentBlocks = (input,
|
|
24157
|
+
var se_ContentBlocks = (input, context) => {
|
|
24158
24158
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24159
|
-
return se_ContentBlock(entry,
|
|
24159
|
+
return se_ContentBlock(entry, context);
|
|
24160
24160
|
});
|
|
24161
24161
|
};
|
|
24162
|
-
var se_ConverseTokensRequest = (input,
|
|
24162
|
+
var se_ConverseTokensRequest = (input, context) => {
|
|
24163
24163
|
return smithyClient.take(input, {
|
|
24164
|
-
messages: (_2) => se_Messages(_2,
|
|
24165
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
24164
|
+
messages: (_2) => se_Messages(_2, context),
|
|
24165
|
+
system: (_2) => se_SystemContentBlocks(_2, context)
|
|
24166
24166
|
});
|
|
24167
24167
|
};
|
|
24168
|
-
var se_CountTokensInput = (input,
|
|
24168
|
+
var se_CountTokensInput = (input, context) => {
|
|
24169
24169
|
return exports2.CountTokensInput.visit(input, {
|
|
24170
|
-
converse: (value) => ({ converse: se_ConverseTokensRequest(value,
|
|
24171
|
-
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value,
|
|
24170
|
+
converse: (value) => ({ converse: se_ConverseTokensRequest(value, context) }),
|
|
24171
|
+
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context) }),
|
|
24172
24172
|
_: (name14, value) => ({ [name14]: value })
|
|
24173
24173
|
});
|
|
24174
24174
|
};
|
|
24175
|
-
var se_DocumentBlock = (input,
|
|
24175
|
+
var se_DocumentBlock = (input, context) => {
|
|
24176
24176
|
return smithyClient.take(input, {
|
|
24177
24177
|
citations: smithyClient._json,
|
|
24178
24178
|
context: [],
|
|
24179
24179
|
format: [],
|
|
24180
24180
|
name: [],
|
|
24181
|
-
source: (_2) => se_DocumentSource(_2,
|
|
24181
|
+
source: (_2) => se_DocumentSource(_2, context)
|
|
24182
24182
|
});
|
|
24183
24183
|
};
|
|
24184
|
-
var se_DocumentSource = (input,
|
|
24184
|
+
var se_DocumentSource = (input, context) => {
|
|
24185
24185
|
return exports2.DocumentSource.visit(input, {
|
|
24186
|
-
bytes: (value) => ({ bytes:
|
|
24186
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
24187
24187
|
content: (value) => ({ content: smithyClient._json(value) }),
|
|
24188
24188
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24189
24189
|
text: (value) => ({ text: value }),
|
|
24190
24190
|
_: (name14, value) => ({ [name14]: value })
|
|
24191
24191
|
});
|
|
24192
24192
|
};
|
|
24193
|
-
var se_GuardrailContentBlock = (input,
|
|
24193
|
+
var se_GuardrailContentBlock = (input, context) => {
|
|
24194
24194
|
return exports2.GuardrailContentBlock.visit(input, {
|
|
24195
|
-
image: (value) => ({ image: se_GuardrailImageBlock(value,
|
|
24195
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
24196
24196
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24197
24197
|
_: (name14, value) => ({ [name14]: value })
|
|
24198
24198
|
});
|
|
24199
24199
|
};
|
|
24200
|
-
var se_GuardrailContentBlockList = (input,
|
|
24200
|
+
var se_GuardrailContentBlockList = (input, context) => {
|
|
24201
24201
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24202
|
-
return se_GuardrailContentBlock(entry,
|
|
24202
|
+
return se_GuardrailContentBlock(entry, context);
|
|
24203
24203
|
});
|
|
24204
24204
|
};
|
|
24205
|
-
var se_GuardrailConverseContentBlock = (input,
|
|
24205
|
+
var se_GuardrailConverseContentBlock = (input, context) => {
|
|
24206
24206
|
return exports2.GuardrailConverseContentBlock.visit(input, {
|
|
24207
|
-
image: (value) => ({ image: se_GuardrailConverseImageBlock(value,
|
|
24207
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
24208
24208
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24209
24209
|
_: (name14, value) => ({ [name14]: value })
|
|
24210
24210
|
});
|
|
24211
24211
|
};
|
|
24212
|
-
var se_GuardrailConverseImageBlock = (input,
|
|
24212
|
+
var se_GuardrailConverseImageBlock = (input, context) => {
|
|
24213
24213
|
return smithyClient.take(input, {
|
|
24214
24214
|
format: [],
|
|
24215
|
-
source: (_2) => se_GuardrailConverseImageSource(_2,
|
|
24215
|
+
source: (_2) => se_GuardrailConverseImageSource(_2, context)
|
|
24216
24216
|
});
|
|
24217
24217
|
};
|
|
24218
|
-
var se_GuardrailConverseImageSource = (input,
|
|
24218
|
+
var se_GuardrailConverseImageSource = (input, context) => {
|
|
24219
24219
|
return exports2.GuardrailConverseImageSource.visit(input, {
|
|
24220
|
-
bytes: (value) => ({ bytes:
|
|
24220
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
24221
24221
|
_: (name14, value) => ({ [name14]: value })
|
|
24222
24222
|
});
|
|
24223
24223
|
};
|
|
24224
|
-
var se_GuardrailImageBlock = (input,
|
|
24224
|
+
var se_GuardrailImageBlock = (input, context) => {
|
|
24225
24225
|
return smithyClient.take(input, {
|
|
24226
24226
|
format: [],
|
|
24227
|
-
source: (_2) => se_GuardrailImageSource(_2,
|
|
24227
|
+
source: (_2) => se_GuardrailImageSource(_2, context)
|
|
24228
24228
|
});
|
|
24229
24229
|
};
|
|
24230
|
-
var se_GuardrailImageSource = (input,
|
|
24230
|
+
var se_GuardrailImageSource = (input, context) => {
|
|
24231
24231
|
return exports2.GuardrailImageSource.visit(input, {
|
|
24232
|
-
bytes: (value) => ({ bytes:
|
|
24232
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
24233
24233
|
_: (name14, value) => ({ [name14]: value })
|
|
24234
24234
|
});
|
|
24235
24235
|
};
|
|
24236
|
-
var se_ImageBlock = (input,
|
|
24236
|
+
var se_ImageBlock = (input, context) => {
|
|
24237
24237
|
return smithyClient.take(input, {
|
|
24238
24238
|
format: [],
|
|
24239
|
-
source: (_2) => se_ImageSource(_2,
|
|
24239
|
+
source: (_2) => se_ImageSource(_2, context)
|
|
24240
24240
|
});
|
|
24241
24241
|
};
|
|
24242
|
-
var se_ImageSource = (input,
|
|
24242
|
+
var se_ImageSource = (input, context) => {
|
|
24243
24243
|
return exports2.ImageSource.visit(input, {
|
|
24244
|
-
bytes: (value) => ({ bytes:
|
|
24244
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
24245
24245
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24246
24246
|
_: (name14, value) => ({ [name14]: value })
|
|
24247
24247
|
});
|
|
24248
24248
|
};
|
|
24249
|
-
var se_InferenceConfiguration = (input,
|
|
24249
|
+
var se_InferenceConfiguration = (input, context) => {
|
|
24250
24250
|
return smithyClient.take(input, {
|
|
24251
24251
|
maxTokens: [],
|
|
24252
24252
|
stopSequences: smithyClient._json,
|
|
@@ -24254,128 +24254,128 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24254
24254
|
topP: smithyClient.serializeFloat
|
|
24255
24255
|
});
|
|
24256
24256
|
};
|
|
24257
|
-
var se_InvokeModelTokensRequest = (input,
|
|
24257
|
+
var se_InvokeModelTokensRequest = (input, context) => {
|
|
24258
24258
|
return smithyClient.take(input, {
|
|
24259
|
-
body:
|
|
24259
|
+
body: context.base64Encoder
|
|
24260
24260
|
});
|
|
24261
24261
|
};
|
|
24262
|
-
var se_Message = (input,
|
|
24262
|
+
var se_Message = (input, context) => {
|
|
24263
24263
|
return smithyClient.take(input, {
|
|
24264
|
-
content: (_2) => se_ContentBlocks(_2,
|
|
24264
|
+
content: (_2) => se_ContentBlocks(_2, context),
|
|
24265
24265
|
role: []
|
|
24266
24266
|
});
|
|
24267
24267
|
};
|
|
24268
|
-
var se_Messages = (input,
|
|
24268
|
+
var se_Messages = (input, context) => {
|
|
24269
24269
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24270
|
-
return se_Message(entry,
|
|
24270
|
+
return se_Message(entry, context);
|
|
24271
24271
|
});
|
|
24272
24272
|
};
|
|
24273
|
-
var se_ModelInputPayload = (input,
|
|
24273
|
+
var se_ModelInputPayload = (input, context) => {
|
|
24274
24274
|
return input;
|
|
24275
24275
|
};
|
|
24276
|
-
var se_ReasoningContentBlock = (input,
|
|
24276
|
+
var se_ReasoningContentBlock = (input, context) => {
|
|
24277
24277
|
return exports2.ReasoningContentBlock.visit(input, {
|
|
24278
24278
|
reasoningText: (value) => ({ reasoningText: smithyClient._json(value) }),
|
|
24279
|
-
redactedContent: (value) => ({ redactedContent:
|
|
24279
|
+
redactedContent: (value) => ({ redactedContent: context.base64Encoder(value) }),
|
|
24280
24280
|
_: (name14, value) => ({ [name14]: value })
|
|
24281
24281
|
});
|
|
24282
24282
|
};
|
|
24283
|
-
var se_SystemContentBlock = (input,
|
|
24283
|
+
var se_SystemContentBlock = (input, context) => {
|
|
24284
24284
|
return exports2.SystemContentBlock.visit(input, {
|
|
24285
24285
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24286
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
24286
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
24287
24287
|
text: (value) => ({ text: value }),
|
|
24288
24288
|
_: (name14, value) => ({ [name14]: value })
|
|
24289
24289
|
});
|
|
24290
24290
|
};
|
|
24291
|
-
var se_SystemContentBlocks = (input,
|
|
24291
|
+
var se_SystemContentBlocks = (input, context) => {
|
|
24292
24292
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24293
|
-
return se_SystemContentBlock(entry,
|
|
24293
|
+
return se_SystemContentBlock(entry, context);
|
|
24294
24294
|
});
|
|
24295
24295
|
};
|
|
24296
|
-
var se_Tool = (input,
|
|
24296
|
+
var se_Tool = (input, context) => {
|
|
24297
24297
|
return exports2.Tool.visit(input, {
|
|
24298
24298
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24299
24299
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
|
|
24300
24300
|
_: (name14, value) => ({ [name14]: value })
|
|
24301
24301
|
});
|
|
24302
24302
|
};
|
|
24303
|
-
var se_ToolConfiguration = (input,
|
|
24303
|
+
var se_ToolConfiguration = (input, context) => {
|
|
24304
24304
|
return smithyClient.take(input, {
|
|
24305
24305
|
toolChoice: smithyClient._json,
|
|
24306
24306
|
tools: (_2) => se_Tools(_2)
|
|
24307
24307
|
});
|
|
24308
24308
|
};
|
|
24309
|
-
var se_ToolInputSchema = (input,
|
|
24309
|
+
var se_ToolInputSchema = (input, context) => {
|
|
24310
24310
|
return exports2.ToolInputSchema.visit(input, {
|
|
24311
24311
|
json: (value) => ({ json: se_Document(value) }),
|
|
24312
24312
|
_: (name14, value) => ({ [name14]: value })
|
|
24313
24313
|
});
|
|
24314
24314
|
};
|
|
24315
|
-
var se_ToolResultBlock = (input,
|
|
24315
|
+
var se_ToolResultBlock = (input, context) => {
|
|
24316
24316
|
return smithyClient.take(input, {
|
|
24317
|
-
content: (_2) => se_ToolResultContentBlocks(_2,
|
|
24317
|
+
content: (_2) => se_ToolResultContentBlocks(_2, context),
|
|
24318
24318
|
status: [],
|
|
24319
24319
|
toolUseId: []
|
|
24320
24320
|
});
|
|
24321
24321
|
};
|
|
24322
|
-
var se_ToolResultContentBlock = (input,
|
|
24322
|
+
var se_ToolResultContentBlock = (input, context) => {
|
|
24323
24323
|
return exports2.ToolResultContentBlock.visit(input, {
|
|
24324
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
24325
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
24324
|
+
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
24325
|
+
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
24326
24326
|
json: (value) => ({ json: se_Document(value) }),
|
|
24327
24327
|
text: (value) => ({ text: value }),
|
|
24328
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24328
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
24329
24329
|
_: (name14, value) => ({ [name14]: value })
|
|
24330
24330
|
});
|
|
24331
24331
|
};
|
|
24332
|
-
var se_ToolResultContentBlocks = (input,
|
|
24332
|
+
var se_ToolResultContentBlocks = (input, context) => {
|
|
24333
24333
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24334
|
-
return se_ToolResultContentBlock(entry,
|
|
24334
|
+
return se_ToolResultContentBlock(entry, context);
|
|
24335
24335
|
});
|
|
24336
24336
|
};
|
|
24337
|
-
var se_Tools = (input,
|
|
24337
|
+
var se_Tools = (input, context) => {
|
|
24338
24338
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24339
24339
|
return se_Tool(entry);
|
|
24340
24340
|
});
|
|
24341
24341
|
};
|
|
24342
|
-
var se_ToolSpecification = (input,
|
|
24342
|
+
var se_ToolSpecification = (input, context) => {
|
|
24343
24343
|
return smithyClient.take(input, {
|
|
24344
24344
|
description: [],
|
|
24345
24345
|
inputSchema: (_2) => se_ToolInputSchema(_2),
|
|
24346
24346
|
name: []
|
|
24347
24347
|
});
|
|
24348
24348
|
};
|
|
24349
|
-
var se_ToolUseBlock = (input,
|
|
24349
|
+
var se_ToolUseBlock = (input, context) => {
|
|
24350
24350
|
return smithyClient.take(input, {
|
|
24351
24351
|
input: (_2) => se_Document(_2),
|
|
24352
24352
|
name: [],
|
|
24353
24353
|
toolUseId: []
|
|
24354
24354
|
});
|
|
24355
24355
|
};
|
|
24356
|
-
var se_VideoBlock = (input,
|
|
24356
|
+
var se_VideoBlock = (input, context) => {
|
|
24357
24357
|
return smithyClient.take(input, {
|
|
24358
24358
|
format: [],
|
|
24359
|
-
source: (_2) => se_VideoSource(_2,
|
|
24359
|
+
source: (_2) => se_VideoSource(_2, context)
|
|
24360
24360
|
});
|
|
24361
24361
|
};
|
|
24362
|
-
var se_VideoSource = (input,
|
|
24362
|
+
var se_VideoSource = (input, context) => {
|
|
24363
24363
|
return exports2.VideoSource.visit(input, {
|
|
24364
|
-
bytes: (value) => ({ bytes:
|
|
24364
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
24365
24365
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24366
24366
|
_: (name14, value) => ({ [name14]: value })
|
|
24367
24367
|
});
|
|
24368
24368
|
};
|
|
24369
|
-
var se_Document = (input,
|
|
24369
|
+
var se_Document = (input, context) => {
|
|
24370
24370
|
return input;
|
|
24371
24371
|
};
|
|
24372
|
-
var de_AsyncInvokeSummaries = (output,
|
|
24372
|
+
var de_AsyncInvokeSummaries = (output, context) => {
|
|
24373
24373
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24374
24374
|
return de_AsyncInvokeSummary(entry);
|
|
24375
24375
|
});
|
|
24376
24376
|
return retVal;
|
|
24377
24377
|
};
|
|
24378
|
-
var de_AsyncInvokeSummary = (output,
|
|
24378
|
+
var de_AsyncInvokeSummary = (output, context) => {
|
|
24379
24379
|
return smithyClient.take(output, {
|
|
24380
24380
|
clientRequestToken: smithyClient.expectString,
|
|
24381
24381
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -24388,12 +24388,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24388
24388
|
submitTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2))
|
|
24389
24389
|
});
|
|
24390
24390
|
};
|
|
24391
|
-
var de_BidirectionalOutputPayloadPart = (output,
|
|
24391
|
+
var de_BidirectionalOutputPayloadPart = (output, context) => {
|
|
24392
24392
|
return smithyClient.take(output, {
|
|
24393
|
-
bytes:
|
|
24393
|
+
bytes: context.base64Decoder
|
|
24394
24394
|
});
|
|
24395
24395
|
};
|
|
24396
|
-
var de_ContentBlock = (output,
|
|
24396
|
+
var de_ContentBlock = (output, context) => {
|
|
24397
24397
|
if (output.cachePoint != null) {
|
|
24398
24398
|
return {
|
|
24399
24399
|
cachePoint: smithyClient._json(output.cachePoint)
|
|
@@ -24406,22 +24406,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24406
24406
|
}
|
|
24407
24407
|
if (output.document != null) {
|
|
24408
24408
|
return {
|
|
24409
|
-
document: de_DocumentBlock(output.document,
|
|
24409
|
+
document: de_DocumentBlock(output.document, context)
|
|
24410
24410
|
};
|
|
24411
24411
|
}
|
|
24412
24412
|
if (output.guardContent != null) {
|
|
24413
24413
|
return {
|
|
24414
|
-
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent),
|
|
24414
|
+
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context)
|
|
24415
24415
|
};
|
|
24416
24416
|
}
|
|
24417
24417
|
if (output.image != null) {
|
|
24418
24418
|
return {
|
|
24419
|
-
image: de_ImageBlock(output.image,
|
|
24419
|
+
image: de_ImageBlock(output.image, context)
|
|
24420
24420
|
};
|
|
24421
24421
|
}
|
|
24422
24422
|
if (output.reasoningContent != null) {
|
|
24423
24423
|
return {
|
|
24424
|
-
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent),
|
|
24424
|
+
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context)
|
|
24425
24425
|
};
|
|
24426
24426
|
}
|
|
24427
24427
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24429,7 +24429,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24429
24429
|
}
|
|
24430
24430
|
if (output.toolResult != null) {
|
|
24431
24431
|
return {
|
|
24432
|
-
toolResult: de_ToolResultBlock(output.toolResult,
|
|
24432
|
+
toolResult: de_ToolResultBlock(output.toolResult, context)
|
|
24433
24433
|
};
|
|
24434
24434
|
}
|
|
24435
24435
|
if (output.toolUse != null) {
|
|
@@ -24439,12 +24439,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24439
24439
|
}
|
|
24440
24440
|
if (output.video != null) {
|
|
24441
24441
|
return {
|
|
24442
|
-
video: de_VideoBlock(output.video,
|
|
24442
|
+
video: de_VideoBlock(output.video, context)
|
|
24443
24443
|
};
|
|
24444
24444
|
}
|
|
24445
24445
|
return { $unknown: Object.entries(output)[0] };
|
|
24446
24446
|
};
|
|
24447
|
-
var de_ContentBlockDelta = (output,
|
|
24447
|
+
var de_ContentBlockDelta = (output, context) => {
|
|
24448
24448
|
if (output.citation != null) {
|
|
24449
24449
|
return {
|
|
24450
24450
|
citation: smithyClient._json(output.citation)
|
|
@@ -24452,7 +24452,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24452
24452
|
}
|
|
24453
24453
|
if (output.reasoningContent != null) {
|
|
24454
24454
|
return {
|
|
24455
|
-
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent),
|
|
24455
|
+
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context)
|
|
24456
24456
|
};
|
|
24457
24457
|
}
|
|
24458
24458
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24465,27 +24465,27 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24465
24465
|
}
|
|
24466
24466
|
return { $unknown: Object.entries(output)[0] };
|
|
24467
24467
|
};
|
|
24468
|
-
var de_ContentBlockDeltaEvent = (output,
|
|
24468
|
+
var de_ContentBlockDeltaEvent = (output, context) => {
|
|
24469
24469
|
return smithyClient.take(output, {
|
|
24470
24470
|
contentBlockIndex: smithyClient.expectInt32,
|
|
24471
|
-
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2),
|
|
24471
|
+
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context)
|
|
24472
24472
|
});
|
|
24473
24473
|
};
|
|
24474
|
-
var de_ContentBlocks = (output,
|
|
24474
|
+
var de_ContentBlocks = (output, context) => {
|
|
24475
24475
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24476
|
-
return de_ContentBlock(core$1.awsExpectUnion(entry),
|
|
24476
|
+
return de_ContentBlock(core$1.awsExpectUnion(entry), context);
|
|
24477
24477
|
});
|
|
24478
24478
|
return retVal;
|
|
24479
24479
|
};
|
|
24480
|
-
var de_ConverseOutput = (output,
|
|
24480
|
+
var de_ConverseOutput = (output, context) => {
|
|
24481
24481
|
if (output.message != null) {
|
|
24482
24482
|
return {
|
|
24483
|
-
message: de_Message(output.message,
|
|
24483
|
+
message: de_Message(output.message, context)
|
|
24484
24484
|
};
|
|
24485
24485
|
}
|
|
24486
24486
|
return { $unknown: Object.entries(output)[0] };
|
|
24487
24487
|
};
|
|
24488
|
-
var de_ConverseStreamMetadataEvent = (output,
|
|
24488
|
+
var de_ConverseStreamMetadataEvent = (output, context) => {
|
|
24489
24489
|
return smithyClient.take(output, {
|
|
24490
24490
|
metrics: smithyClient._json,
|
|
24491
24491
|
performanceConfig: smithyClient._json,
|
|
@@ -24493,31 +24493,31 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24493
24493
|
usage: smithyClient._json
|
|
24494
24494
|
});
|
|
24495
24495
|
};
|
|
24496
|
-
var de_ConverseStreamTrace = (output,
|
|
24496
|
+
var de_ConverseStreamTrace = (output, context) => {
|
|
24497
24497
|
return smithyClient.take(output, {
|
|
24498
24498
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24499
24499
|
promptRouter: smithyClient._json
|
|
24500
24500
|
});
|
|
24501
24501
|
};
|
|
24502
|
-
var de_ConverseTrace = (output,
|
|
24502
|
+
var de_ConverseTrace = (output, context) => {
|
|
24503
24503
|
return smithyClient.take(output, {
|
|
24504
24504
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24505
24505
|
promptRouter: smithyClient._json
|
|
24506
24506
|
});
|
|
24507
24507
|
};
|
|
24508
|
-
var de_DocumentBlock = (output,
|
|
24508
|
+
var de_DocumentBlock = (output, context) => {
|
|
24509
24509
|
return smithyClient.take(output, {
|
|
24510
24510
|
citations: smithyClient._json,
|
|
24511
24511
|
context: smithyClient.expectString,
|
|
24512
24512
|
format: smithyClient.expectString,
|
|
24513
24513
|
name: smithyClient.expectString,
|
|
24514
|
-
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2),
|
|
24514
|
+
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context)
|
|
24515
24515
|
});
|
|
24516
24516
|
};
|
|
24517
|
-
var de_DocumentSource = (output,
|
|
24517
|
+
var de_DocumentSource = (output, context) => {
|
|
24518
24518
|
if (output.bytes != null) {
|
|
24519
24519
|
return {
|
|
24520
|
-
bytes:
|
|
24520
|
+
bytes: context.base64Decoder(output.bytes)
|
|
24521
24521
|
};
|
|
24522
24522
|
}
|
|
24523
24523
|
if (output.content != null) {
|
|
@@ -24535,7 +24535,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24535
24535
|
}
|
|
24536
24536
|
return { $unknown: Object.entries(output)[0] };
|
|
24537
24537
|
};
|
|
24538
|
-
var de_GuardrailAssessment = (output,
|
|
24538
|
+
var de_GuardrailAssessment = (output, context) => {
|
|
24539
24539
|
return smithyClient.take(output, {
|
|
24540
24540
|
automatedReasoningPolicy: (_2) => de_GuardrailAutomatedReasoningPolicyAssessment(_2),
|
|
24541
24541
|
contentPolicy: smithyClient._json,
|
|
@@ -24546,13 +24546,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24546
24546
|
wordPolicy: smithyClient._json
|
|
24547
24547
|
});
|
|
24548
24548
|
};
|
|
24549
|
-
var de_GuardrailAssessmentList = (output,
|
|
24549
|
+
var de_GuardrailAssessmentList = (output, context) => {
|
|
24550
24550
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24551
24551
|
return de_GuardrailAssessment(entry);
|
|
24552
24552
|
});
|
|
24553
24553
|
return retVal;
|
|
24554
24554
|
};
|
|
24555
|
-
var de_GuardrailAssessmentListMap = (output,
|
|
24555
|
+
var de_GuardrailAssessmentListMap = (output, context) => {
|
|
24556
24556
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24557
24557
|
if (value === null) {
|
|
24558
24558
|
return acc;
|
|
@@ -24561,7 +24561,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24561
24561
|
return acc;
|
|
24562
24562
|
}, {});
|
|
24563
24563
|
};
|
|
24564
|
-
var de_GuardrailAssessmentMap = (output,
|
|
24564
|
+
var de_GuardrailAssessmentMap = (output, context) => {
|
|
24565
24565
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24566
24566
|
if (value === null) {
|
|
24567
24567
|
return acc;
|
|
@@ -24570,7 +24570,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24570
24570
|
return acc;
|
|
24571
24571
|
}, {});
|
|
24572
24572
|
};
|
|
24573
|
-
var de_GuardrailAutomatedReasoningFinding = (output,
|
|
24573
|
+
var de_GuardrailAutomatedReasoningFinding = (output, context) => {
|
|
24574
24574
|
if (output.impossible != null) {
|
|
24575
24575
|
return {
|
|
24576
24576
|
impossible: de_GuardrailAutomatedReasoningImpossibleFinding(output.impossible)
|
|
@@ -24608,32 +24608,32 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24608
24608
|
}
|
|
24609
24609
|
return { $unknown: Object.entries(output)[0] };
|
|
24610
24610
|
};
|
|
24611
|
-
var de_GuardrailAutomatedReasoningFindingList = (output,
|
|
24611
|
+
var de_GuardrailAutomatedReasoningFindingList = (output, context) => {
|
|
24612
24612
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24613
24613
|
return de_GuardrailAutomatedReasoningFinding(core$1.awsExpectUnion(entry));
|
|
24614
24614
|
});
|
|
24615
24615
|
return retVal;
|
|
24616
24616
|
};
|
|
24617
|
-
var de_GuardrailAutomatedReasoningImpossibleFinding = (output,
|
|
24617
|
+
var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context) => {
|
|
24618
24618
|
return smithyClient.take(output, {
|
|
24619
24619
|
contradictingRules: smithyClient._json,
|
|
24620
24620
|
logicWarning: smithyClient._json,
|
|
24621
24621
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24622
24622
|
});
|
|
24623
24623
|
};
|
|
24624
|
-
var de_GuardrailAutomatedReasoningInvalidFinding = (output,
|
|
24624
|
+
var de_GuardrailAutomatedReasoningInvalidFinding = (output, context) => {
|
|
24625
24625
|
return smithyClient.take(output, {
|
|
24626
24626
|
contradictingRules: smithyClient._json,
|
|
24627
24627
|
logicWarning: smithyClient._json,
|
|
24628
24628
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24629
24629
|
});
|
|
24630
24630
|
};
|
|
24631
|
-
var de_GuardrailAutomatedReasoningPolicyAssessment = (output,
|
|
24631
|
+
var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context) => {
|
|
24632
24632
|
return smithyClient.take(output, {
|
|
24633
24633
|
findings: (_2) => de_GuardrailAutomatedReasoningFindingList(_2)
|
|
24634
24634
|
});
|
|
24635
24635
|
};
|
|
24636
|
-
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output,
|
|
24636
|
+
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context) => {
|
|
24637
24637
|
return smithyClient.take(output, {
|
|
24638
24638
|
claimsFalseScenario: smithyClient._json,
|
|
24639
24639
|
claimsTrueScenario: smithyClient._json,
|
|
@@ -24641,7 +24641,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24641
24641
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24642
24642
|
});
|
|
24643
24643
|
};
|
|
24644
|
-
var de_GuardrailAutomatedReasoningTranslation = (output,
|
|
24644
|
+
var de_GuardrailAutomatedReasoningTranslation = (output, context) => {
|
|
24645
24645
|
return smithyClient.take(output, {
|
|
24646
24646
|
claims: smithyClient._json,
|
|
24647
24647
|
confidence: smithyClient.limitedParseDouble,
|
|
@@ -24650,30 +24650,30 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24650
24650
|
untranslatedPremises: smithyClient._json
|
|
24651
24651
|
});
|
|
24652
24652
|
};
|
|
24653
|
-
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output,
|
|
24653
|
+
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context) => {
|
|
24654
24654
|
return smithyClient.take(output, {
|
|
24655
24655
|
differenceScenarios: smithyClient._json,
|
|
24656
24656
|
options: (_2) => de_GuardrailAutomatedReasoningTranslationOptionList(_2)
|
|
24657
24657
|
});
|
|
24658
24658
|
};
|
|
24659
|
-
var de_GuardrailAutomatedReasoningTranslationList = (output,
|
|
24659
|
+
var de_GuardrailAutomatedReasoningTranslationList = (output, context) => {
|
|
24660
24660
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24661
24661
|
return de_GuardrailAutomatedReasoningTranslation(entry);
|
|
24662
24662
|
});
|
|
24663
24663
|
return retVal;
|
|
24664
24664
|
};
|
|
24665
|
-
var de_GuardrailAutomatedReasoningTranslationOption = (output,
|
|
24665
|
+
var de_GuardrailAutomatedReasoningTranslationOption = (output, context) => {
|
|
24666
24666
|
return smithyClient.take(output, {
|
|
24667
24667
|
translations: (_2) => de_GuardrailAutomatedReasoningTranslationList(_2)
|
|
24668
24668
|
});
|
|
24669
24669
|
};
|
|
24670
|
-
var de_GuardrailAutomatedReasoningTranslationOptionList = (output,
|
|
24670
|
+
var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context) => {
|
|
24671
24671
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24672
24672
|
return de_GuardrailAutomatedReasoningTranslationOption(entry);
|
|
24673
24673
|
});
|
|
24674
24674
|
return retVal;
|
|
24675
24675
|
};
|
|
24676
|
-
var de_GuardrailAutomatedReasoningValidFinding = (output,
|
|
24676
|
+
var de_GuardrailAutomatedReasoningValidFinding = (output, context) => {
|
|
24677
24677
|
return smithyClient.take(output, {
|
|
24678
24678
|
claimsTrueScenario: smithyClient._json,
|
|
24679
24679
|
logicWarning: smithyClient._json,
|
|
@@ -24681,7 +24681,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24681
24681
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24682
24682
|
});
|
|
24683
24683
|
};
|
|
24684
|
-
var de_GuardrailContextualGroundingFilter = (output,
|
|
24684
|
+
var de_GuardrailContextualGroundingFilter = (output, context) => {
|
|
24685
24685
|
return smithyClient.take(output, {
|
|
24686
24686
|
action: smithyClient.expectString,
|
|
24687
24687
|
detected: smithyClient.expectBoolean,
|
|
@@ -24690,21 +24690,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24690
24690
|
type: smithyClient.expectString
|
|
24691
24691
|
});
|
|
24692
24692
|
};
|
|
24693
|
-
var de_GuardrailContextualGroundingFilters = (output,
|
|
24693
|
+
var de_GuardrailContextualGroundingFilters = (output, context) => {
|
|
24694
24694
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24695
24695
|
return de_GuardrailContextualGroundingFilter(entry);
|
|
24696
24696
|
});
|
|
24697
24697
|
return retVal;
|
|
24698
24698
|
};
|
|
24699
|
-
var de_GuardrailContextualGroundingPolicyAssessment = (output,
|
|
24699
|
+
var de_GuardrailContextualGroundingPolicyAssessment = (output, context) => {
|
|
24700
24700
|
return smithyClient.take(output, {
|
|
24701
24701
|
filters: (_2) => de_GuardrailContextualGroundingFilters(_2)
|
|
24702
24702
|
});
|
|
24703
24703
|
};
|
|
24704
|
-
var de_GuardrailConverseContentBlock = (output,
|
|
24704
|
+
var de_GuardrailConverseContentBlock = (output, context) => {
|
|
24705
24705
|
if (output.image != null) {
|
|
24706
24706
|
return {
|
|
24707
|
-
image: de_GuardrailConverseImageBlock(output.image,
|
|
24707
|
+
image: de_GuardrailConverseImageBlock(output.image, context)
|
|
24708
24708
|
};
|
|
24709
24709
|
}
|
|
24710
24710
|
if (output.text != null) {
|
|
@@ -24714,21 +24714,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24714
24714
|
}
|
|
24715
24715
|
return { $unknown: Object.entries(output)[0] };
|
|
24716
24716
|
};
|
|
24717
|
-
var de_GuardrailConverseImageBlock = (output,
|
|
24717
|
+
var de_GuardrailConverseImageBlock = (output, context) => {
|
|
24718
24718
|
return smithyClient.take(output, {
|
|
24719
24719
|
format: smithyClient.expectString,
|
|
24720
|
-
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2),
|
|
24720
|
+
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context)
|
|
24721
24721
|
});
|
|
24722
24722
|
};
|
|
24723
|
-
var de_GuardrailConverseImageSource = (output,
|
|
24723
|
+
var de_GuardrailConverseImageSource = (output, context) => {
|
|
24724
24724
|
if (output.bytes != null) {
|
|
24725
24725
|
return {
|
|
24726
|
-
bytes:
|
|
24726
|
+
bytes: context.base64Decoder(output.bytes)
|
|
24727
24727
|
};
|
|
24728
24728
|
}
|
|
24729
24729
|
return { $unknown: Object.entries(output)[0] };
|
|
24730
24730
|
};
|
|
24731
|
-
var de_GuardrailTraceAssessment = (output,
|
|
24731
|
+
var de_GuardrailTraceAssessment = (output, context) => {
|
|
24732
24732
|
return smithyClient.take(output, {
|
|
24733
24733
|
actionReason: smithyClient.expectString,
|
|
24734
24734
|
inputAssessment: (_2) => de_GuardrailAssessmentMap(_2),
|
|
@@ -24736,16 +24736,16 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24736
24736
|
outputAssessments: (_2) => de_GuardrailAssessmentListMap(_2)
|
|
24737
24737
|
});
|
|
24738
24738
|
};
|
|
24739
|
-
var de_ImageBlock = (output,
|
|
24739
|
+
var de_ImageBlock = (output, context) => {
|
|
24740
24740
|
return smithyClient.take(output, {
|
|
24741
24741
|
format: smithyClient.expectString,
|
|
24742
|
-
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2),
|
|
24742
|
+
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context)
|
|
24743
24743
|
});
|
|
24744
24744
|
};
|
|
24745
|
-
var de_ImageSource = (output,
|
|
24745
|
+
var de_ImageSource = (output, context) => {
|
|
24746
24746
|
if (output.bytes != null) {
|
|
24747
24747
|
return {
|
|
24748
|
-
bytes:
|
|
24748
|
+
bytes: context.base64Decoder(output.bytes)
|
|
24749
24749
|
};
|
|
24750
24750
|
}
|
|
24751
24751
|
if (output.s3Location != null) {
|
|
@@ -24755,24 +24755,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24755
24755
|
}
|
|
24756
24756
|
return { $unknown: Object.entries(output)[0] };
|
|
24757
24757
|
};
|
|
24758
|
-
var de_Message = (output,
|
|
24758
|
+
var de_Message = (output, context) => {
|
|
24759
24759
|
return smithyClient.take(output, {
|
|
24760
|
-
content: (_2) => de_ContentBlocks(_2,
|
|
24760
|
+
content: (_2) => de_ContentBlocks(_2, context),
|
|
24761
24761
|
role: smithyClient.expectString
|
|
24762
24762
|
});
|
|
24763
24763
|
};
|
|
24764
|
-
var de_MessageStopEvent = (output,
|
|
24764
|
+
var de_MessageStopEvent = (output, context) => {
|
|
24765
24765
|
return smithyClient.take(output, {
|
|
24766
24766
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
24767
24767
|
stopReason: smithyClient.expectString
|
|
24768
24768
|
});
|
|
24769
24769
|
};
|
|
24770
|
-
var de_PayloadPart = (output,
|
|
24770
|
+
var de_PayloadPart = (output, context) => {
|
|
24771
24771
|
return smithyClient.take(output, {
|
|
24772
|
-
bytes:
|
|
24772
|
+
bytes: context.base64Decoder
|
|
24773
24773
|
});
|
|
24774
24774
|
};
|
|
24775
|
-
var de_ReasoningContentBlock = (output,
|
|
24775
|
+
var de_ReasoningContentBlock = (output, context) => {
|
|
24776
24776
|
if (output.reasoningText != null) {
|
|
24777
24777
|
return {
|
|
24778
24778
|
reasoningText: smithyClient._json(output.reasoningText)
|
|
@@ -24780,15 +24780,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24780
24780
|
}
|
|
24781
24781
|
if (output.redactedContent != null) {
|
|
24782
24782
|
return {
|
|
24783
|
-
redactedContent:
|
|
24783
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
24784
24784
|
};
|
|
24785
24785
|
}
|
|
24786
24786
|
return { $unknown: Object.entries(output)[0] };
|
|
24787
24787
|
};
|
|
24788
|
-
var de_ReasoningContentBlockDelta = (output,
|
|
24788
|
+
var de_ReasoningContentBlockDelta = (output, context) => {
|
|
24789
24789
|
if (output.redactedContent != null) {
|
|
24790
24790
|
return {
|
|
24791
|
-
redactedContent:
|
|
24791
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
24792
24792
|
};
|
|
24793
24793
|
}
|
|
24794
24794
|
if (smithyClient.expectString(output.signature) !== void 0) {
|
|
@@ -24799,22 +24799,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24799
24799
|
}
|
|
24800
24800
|
return { $unknown: Object.entries(output)[0] };
|
|
24801
24801
|
};
|
|
24802
|
-
var de_ToolResultBlock = (output,
|
|
24802
|
+
var de_ToolResultBlock = (output, context) => {
|
|
24803
24803
|
return smithyClient.take(output, {
|
|
24804
|
-
content: (_2) => de_ToolResultContentBlocks(_2,
|
|
24804
|
+
content: (_2) => de_ToolResultContentBlocks(_2, context),
|
|
24805
24805
|
status: smithyClient.expectString,
|
|
24806
24806
|
toolUseId: smithyClient.expectString
|
|
24807
24807
|
});
|
|
24808
24808
|
};
|
|
24809
|
-
var de_ToolResultContentBlock = (output,
|
|
24809
|
+
var de_ToolResultContentBlock = (output, context) => {
|
|
24810
24810
|
if (output.document != null) {
|
|
24811
24811
|
return {
|
|
24812
|
-
document: de_DocumentBlock(output.document,
|
|
24812
|
+
document: de_DocumentBlock(output.document, context)
|
|
24813
24813
|
};
|
|
24814
24814
|
}
|
|
24815
24815
|
if (output.image != null) {
|
|
24816
24816
|
return {
|
|
24817
|
-
image: de_ImageBlock(output.image,
|
|
24817
|
+
image: de_ImageBlock(output.image, context)
|
|
24818
24818
|
};
|
|
24819
24819
|
}
|
|
24820
24820
|
if (output.json != null) {
|
|
@@ -24827,34 +24827,34 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24827
24827
|
}
|
|
24828
24828
|
if (output.video != null) {
|
|
24829
24829
|
return {
|
|
24830
|
-
video: de_VideoBlock(output.video,
|
|
24830
|
+
video: de_VideoBlock(output.video, context)
|
|
24831
24831
|
};
|
|
24832
24832
|
}
|
|
24833
24833
|
return { $unknown: Object.entries(output)[0] };
|
|
24834
24834
|
};
|
|
24835
|
-
var de_ToolResultContentBlocks = (output,
|
|
24835
|
+
var de_ToolResultContentBlocks = (output, context) => {
|
|
24836
24836
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24837
|
-
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry),
|
|
24837
|
+
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context);
|
|
24838
24838
|
});
|
|
24839
24839
|
return retVal;
|
|
24840
24840
|
};
|
|
24841
|
-
var de_ToolUseBlock = (output,
|
|
24841
|
+
var de_ToolUseBlock = (output, context) => {
|
|
24842
24842
|
return smithyClient.take(output, {
|
|
24843
24843
|
input: (_2) => de_Document(_2),
|
|
24844
24844
|
name: smithyClient.expectString,
|
|
24845
24845
|
toolUseId: smithyClient.expectString
|
|
24846
24846
|
});
|
|
24847
24847
|
};
|
|
24848
|
-
var de_VideoBlock = (output,
|
|
24848
|
+
var de_VideoBlock = (output, context) => {
|
|
24849
24849
|
return smithyClient.take(output, {
|
|
24850
24850
|
format: smithyClient.expectString,
|
|
24851
|
-
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2),
|
|
24851
|
+
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context)
|
|
24852
24852
|
});
|
|
24853
24853
|
};
|
|
24854
|
-
var de_VideoSource = (output,
|
|
24854
|
+
var de_VideoSource = (output, context) => {
|
|
24855
24855
|
if (output.bytes != null) {
|
|
24856
24856
|
return {
|
|
24857
|
-
bytes:
|
|
24857
|
+
bytes: context.base64Decoder(output.bytes)
|
|
24858
24858
|
};
|
|
24859
24859
|
}
|
|
24860
24860
|
if (output.s3Location != null) {
|
|
@@ -24864,7 +24864,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24864
24864
|
}
|
|
24865
24865
|
return { $unknown: Object.entries(output)[0] };
|
|
24866
24866
|
};
|
|
24867
|
-
var de_Document = (output,
|
|
24867
|
+
var de_Document = (output, context) => {
|
|
24868
24868
|
return output;
|
|
24869
24869
|
};
|
|
24870
24870
|
var deserializeMetadata3 = (output) => ({
|
|
@@ -35181,42 +35181,6 @@ var init_simpleTelemetry = __esm({
|
|
|
35181
35181
|
}
|
|
35182
35182
|
});
|
|
35183
35183
|
|
|
35184
|
-
// src/agent/fileSpanExporter.js
|
|
35185
|
-
var import_fs4, import_core17;
|
|
35186
|
-
var init_fileSpanExporter = __esm({
|
|
35187
|
-
"src/agent/fileSpanExporter.js"() {
|
|
35188
|
-
"use strict";
|
|
35189
|
-
import_fs4 = require("fs");
|
|
35190
|
-
import_core17 = require("@opentelemetry/core");
|
|
35191
|
-
}
|
|
35192
|
-
});
|
|
35193
|
-
|
|
35194
|
-
// src/agent/telemetry.js
|
|
35195
|
-
var import_sdk_node, import_resources, import_semantic_conventions, import_api, import_exporter_trace_otlp_http, import_sdk_trace_base, import_fs5, import_path8;
|
|
35196
|
-
var init_telemetry = __esm({
|
|
35197
|
-
"src/agent/telemetry.js"() {
|
|
35198
|
-
"use strict";
|
|
35199
|
-
import_sdk_node = require("@opentelemetry/sdk-node");
|
|
35200
|
-
import_resources = require("@opentelemetry/resources");
|
|
35201
|
-
import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
35202
|
-
import_api = require("@opentelemetry/api");
|
|
35203
|
-
import_exporter_trace_otlp_http = require("@opentelemetry/exporter-trace-otlp-http");
|
|
35204
|
-
import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
35205
|
-
import_fs5 = require("fs");
|
|
35206
|
-
import_path8 = require("path");
|
|
35207
|
-
init_fileSpanExporter();
|
|
35208
|
-
}
|
|
35209
|
-
});
|
|
35210
|
-
|
|
35211
|
-
// src/agent/appTracer.js
|
|
35212
|
-
var import_api2;
|
|
35213
|
-
var init_appTracer = __esm({
|
|
35214
|
-
"src/agent/appTracer.js"() {
|
|
35215
|
-
"use strict";
|
|
35216
|
-
import_api2 = require("@opentelemetry/api");
|
|
35217
|
-
}
|
|
35218
|
-
});
|
|
35219
|
-
|
|
35220
35184
|
// node_modules/balanced-match/index.js
|
|
35221
35185
|
var require_balanced_match = __commonJS({
|
|
35222
35186
|
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
@@ -36991,7 +36955,7 @@ var init_esm2 = __esm({
|
|
|
36991
36955
|
free: c3.#free,
|
|
36992
36956
|
// methods
|
|
36993
36957
|
isBackgroundFetch: (p3) => c3.#isBackgroundFetch(p3),
|
|
36994
|
-
backgroundFetch: (k3, index, options,
|
|
36958
|
+
backgroundFetch: (k3, index, options, context) => c3.#backgroundFetch(k3, index, options, context),
|
|
36995
36959
|
moveToTail: (index) => c3.#moveToTail(index),
|
|
36996
36960
|
indexes: (options) => c3.#indexes(options),
|
|
36997
36961
|
rindexes: (options) => c3.#rindexes(options),
|
|
@@ -37778,7 +37742,7 @@ var init_esm2 = __esm({
|
|
|
37778
37742
|
const v3 = this.#valList[index];
|
|
37779
37743
|
return this.#isBackgroundFetch(v3) ? v3.__staleWhileFetching : v3;
|
|
37780
37744
|
}
|
|
37781
|
-
#backgroundFetch(k3, index, options,
|
|
37745
|
+
#backgroundFetch(k3, index, options, context) {
|
|
37782
37746
|
const v3 = index === void 0 ? void 0 : this.#valList[index];
|
|
37783
37747
|
if (this.#isBackgroundFetch(v3)) {
|
|
37784
37748
|
return v3;
|
|
@@ -37791,7 +37755,7 @@ var init_esm2 = __esm({
|
|
|
37791
37755
|
const fetchOpts = {
|
|
37792
37756
|
signal: ac.signal,
|
|
37793
37757
|
options,
|
|
37794
|
-
context
|
|
37758
|
+
context
|
|
37795
37759
|
};
|
|
37796
37760
|
const cb = (v4, updateCache = false) => {
|
|
37797
37761
|
const { aborted } = ac.signal;
|
|
@@ -37908,7 +37872,7 @@ var init_esm2 = __esm({
|
|
|
37908
37872
|
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
|
37909
37873
|
ignoreFetchAbort = this.ignoreFetchAbort,
|
|
37910
37874
|
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
|
37911
|
-
context
|
|
37875
|
+
context,
|
|
37912
37876
|
forceRefresh = false,
|
|
37913
37877
|
status,
|
|
37914
37878
|
signal
|
|
@@ -37943,7 +37907,7 @@ var init_esm2 = __esm({
|
|
|
37943
37907
|
if (index === void 0) {
|
|
37944
37908
|
if (status)
|
|
37945
37909
|
status.fetch = "miss";
|
|
37946
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37910
|
+
const p3 = this.#backgroundFetch(k3, index, options, context);
|
|
37947
37911
|
return p3.__returned = p3;
|
|
37948
37912
|
} else {
|
|
37949
37913
|
const v3 = this.#valList[index];
|
|
@@ -37968,7 +37932,7 @@ var init_esm2 = __esm({
|
|
|
37968
37932
|
this.#statusTTL(status, index);
|
|
37969
37933
|
return v3;
|
|
37970
37934
|
}
|
|
37971
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37935
|
+
const p3 = this.#backgroundFetch(k3, index, options, context);
|
|
37972
37936
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
37973
37937
|
const staleVal = hasStale && allowStale;
|
|
37974
37938
|
if (status) {
|
|
@@ -37990,13 +37954,13 @@ var init_esm2 = __esm({
|
|
|
37990
37954
|
if (!memoMethod) {
|
|
37991
37955
|
throw new Error("no memoMethod provided to constructor");
|
|
37992
37956
|
}
|
|
37993
|
-
const { context
|
|
37957
|
+
const { context, forceRefresh, ...options } = memoOptions;
|
|
37994
37958
|
const v3 = this.get(k3, options);
|
|
37995
37959
|
if (!forceRefresh && v3 !== void 0)
|
|
37996
37960
|
return v3;
|
|
37997
37961
|
const vv = memoMethod(k3, v3, {
|
|
37998
37962
|
options,
|
|
37999
|
-
context
|
|
37963
|
+
context
|
|
38000
37964
|
});
|
|
38001
37965
|
this.set(k3, vv, options);
|
|
38002
37966
|
return vv;
|
|
@@ -39050,22 +39014,22 @@ var init_esm3 = __esm({
|
|
|
39050
39014
|
});
|
|
39051
39015
|
|
|
39052
39016
|
// node_modules/path-scurry/dist/esm/index.js
|
|
39053
|
-
var import_node_path, import_node_url,
|
|
39017
|
+
var import_node_path, import_node_url, import_fs4, actualFS, import_promises, realpathSync, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
|
|
39054
39018
|
var init_esm4 = __esm({
|
|
39055
39019
|
"node_modules/path-scurry/dist/esm/index.js"() {
|
|
39056
39020
|
init_esm2();
|
|
39057
39021
|
import_node_path = require("node:path");
|
|
39058
39022
|
import_node_url = require("node:url");
|
|
39059
|
-
|
|
39023
|
+
import_fs4 = require("fs");
|
|
39060
39024
|
actualFS = __toESM(require("node:fs"), 1);
|
|
39061
39025
|
import_promises = require("node:fs/promises");
|
|
39062
39026
|
init_esm3();
|
|
39063
|
-
realpathSync =
|
|
39027
|
+
realpathSync = import_fs4.realpathSync.native;
|
|
39064
39028
|
defaultFS = {
|
|
39065
|
-
lstatSync:
|
|
39066
|
-
readdir:
|
|
39067
|
-
readdirSync:
|
|
39068
|
-
readlinkSync:
|
|
39029
|
+
lstatSync: import_fs4.lstatSync,
|
|
39030
|
+
readdir: import_fs4.readdir,
|
|
39031
|
+
readdirSync: import_fs4.readdirSync,
|
|
39032
|
+
readlinkSync: import_fs4.readlinkSync,
|
|
39069
39033
|
realpathSync,
|
|
39070
39034
|
promises: {
|
|
39071
39035
|
lstat: import_promises.lstat,
|
|
@@ -41960,7 +41924,7 @@ function createWrappedTools(baseTools) {
|
|
|
41960
41924
|
}
|
|
41961
41925
|
return wrappedTools;
|
|
41962
41926
|
}
|
|
41963
|
-
var import_child_process9, import_util12, import_crypto3, import_events,
|
|
41927
|
+
var import_child_process9, import_util12, import_crypto3, import_events, import_fs5, import_fs6, import_path8, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
|
|
41964
41928
|
var init_probeTool = __esm({
|
|
41965
41929
|
"src/agent/probeTool.js"() {
|
|
41966
41930
|
"use strict";
|
|
@@ -41969,9 +41933,9 @@ var init_probeTool = __esm({
|
|
|
41969
41933
|
import_util12 = require("util");
|
|
41970
41934
|
import_crypto3 = require("crypto");
|
|
41971
41935
|
import_events = require("events");
|
|
41972
|
-
|
|
41973
|
-
|
|
41974
|
-
|
|
41936
|
+
import_fs5 = __toESM(require("fs"), 1);
|
|
41937
|
+
import_fs6 = require("fs");
|
|
41938
|
+
import_path8 = __toESM(require("path"), 1);
|
|
41975
41939
|
init_esm5();
|
|
41976
41940
|
toolCallEmitter = new import_events.EventEmitter();
|
|
41977
41941
|
activeToolExecutions = /* @__PURE__ */ new Map();
|
|
@@ -42059,17 +42023,17 @@ var init_probeTool = __esm({
|
|
|
42059
42023
|
execute: async (params) => {
|
|
42060
42024
|
const { directory = ".", workingDirectory } = params;
|
|
42061
42025
|
const baseCwd = workingDirectory || process.cwd();
|
|
42062
|
-
const secureBaseDir =
|
|
42026
|
+
const secureBaseDir = import_path8.default.resolve(baseCwd);
|
|
42063
42027
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
42064
42028
|
let targetDir;
|
|
42065
|
-
if (
|
|
42066
|
-
targetDir =
|
|
42067
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
42029
|
+
if (import_path8.default.isAbsolute(directory)) {
|
|
42030
|
+
targetDir = import_path8.default.resolve(directory);
|
|
42031
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path8.default.sep) && targetDir !== secureBaseDir) {
|
|
42068
42032
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
42069
42033
|
}
|
|
42070
42034
|
} else {
|
|
42071
|
-
targetDir =
|
|
42072
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
42035
|
+
targetDir = import_path8.default.resolve(secureBaseDir, directory);
|
|
42036
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path8.default.sep) && targetDir !== secureBaseDir) {
|
|
42073
42037
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
42074
42038
|
}
|
|
42075
42039
|
}
|
|
@@ -42078,7 +42042,7 @@ var init_probeTool = __esm({
|
|
|
42078
42042
|
console.log(`[DEBUG] Listing files in directory: ${targetDir}`);
|
|
42079
42043
|
}
|
|
42080
42044
|
try {
|
|
42081
|
-
const files = await
|
|
42045
|
+
const files = await import_fs6.promises.readdir(targetDir, { withFileTypes: true });
|
|
42082
42046
|
const formatSize = (size) => {
|
|
42083
42047
|
if (size < 1024) return `${size}B`;
|
|
42084
42048
|
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)}K`;
|
|
@@ -42087,10 +42051,10 @@ var init_probeTool = __esm({
|
|
|
42087
42051
|
};
|
|
42088
42052
|
const entries = await Promise.all(files.map(async (file) => {
|
|
42089
42053
|
const isDirectory = file.isDirectory();
|
|
42090
|
-
const fullPath =
|
|
42054
|
+
const fullPath = import_path8.default.join(targetDir, file.name);
|
|
42091
42055
|
let size = 0;
|
|
42092
42056
|
try {
|
|
42093
|
-
const stats = await
|
|
42057
|
+
const stats = await import_fs6.promises.stat(fullPath);
|
|
42094
42058
|
size = stats.size;
|
|
42095
42059
|
} catch (statError) {
|
|
42096
42060
|
if (debug) {
|
|
@@ -42132,17 +42096,17 @@ var init_probeTool = __esm({
|
|
|
42132
42096
|
throw new Error("Pattern is required for file search");
|
|
42133
42097
|
}
|
|
42134
42098
|
const baseCwd = workingDirectory || process.cwd();
|
|
42135
|
-
const secureBaseDir =
|
|
42099
|
+
const secureBaseDir = import_path8.default.resolve(baseCwd);
|
|
42136
42100
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
42137
42101
|
let targetDir;
|
|
42138
|
-
if (
|
|
42139
|
-
targetDir =
|
|
42140
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
42102
|
+
if (import_path8.default.isAbsolute(directory)) {
|
|
42103
|
+
targetDir = import_path8.default.resolve(directory);
|
|
42104
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path8.default.sep) && targetDir !== secureBaseDir) {
|
|
42141
42105
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
42142
42106
|
}
|
|
42143
42107
|
} else {
|
|
42144
|
-
targetDir =
|
|
42145
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
42108
|
+
targetDir = import_path8.default.resolve(secureBaseDir, directory);
|
|
42109
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path8.default.sep) && targetDir !== secureBaseDir) {
|
|
42146
42110
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
42147
42111
|
}
|
|
42148
42112
|
}
|
|
@@ -42217,8 +42181,6 @@ var init_index = __esm({
|
|
|
42217
42181
|
init_bash();
|
|
42218
42182
|
init_ProbeAgent();
|
|
42219
42183
|
init_simpleTelemetry();
|
|
42220
|
-
init_telemetry();
|
|
42221
|
-
init_appTracer();
|
|
42222
42184
|
init_probeTool();
|
|
42223
42185
|
init_storage();
|
|
42224
42186
|
init_hooks();
|
|
@@ -55512,8 +55474,8 @@ function mapFlowchartParserError(err, text) {
|
|
|
55512
55474
|
};
|
|
55513
55475
|
}
|
|
55514
55476
|
if (tokType === "QuotedString") {
|
|
55515
|
-
const
|
|
55516
|
-
const inLinkRule =
|
|
55477
|
+
const context = err?.context;
|
|
55478
|
+
const inLinkRule = context?.ruleStack?.includes("linkTextInline") || context?.ruleStack?.includes("link") || false;
|
|
55517
55479
|
const lineContent = allLines[Math.max(0, line - 1)] || "";
|
|
55518
55480
|
const beforeQuote = lineContent.slice(0, Math.max(0, column - 1));
|
|
55519
55481
|
const hasLinkBefore = beforeQuote.match(/--\s*$|==\s*$|-\.\s*$|-\.-\s*$|\[\s*$/);
|
|
@@ -73554,11 +73516,11 @@ function loadMCPConfigurationFromPath(configPath) {
|
|
|
73554
73516
|
if (!configPath) {
|
|
73555
73517
|
throw new Error("Config path is required");
|
|
73556
73518
|
}
|
|
73557
|
-
if (!(0,
|
|
73519
|
+
if (!(0, import_fs7.existsSync)(configPath)) {
|
|
73558
73520
|
throw new Error(`MCP configuration file not found: ${configPath}`);
|
|
73559
73521
|
}
|
|
73560
73522
|
try {
|
|
73561
|
-
const content = (0,
|
|
73523
|
+
const content = (0, import_fs7.readFileSync)(configPath, "utf8");
|
|
73562
73524
|
const config = JSON.parse(content);
|
|
73563
73525
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73564
73526
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73573,19 +73535,19 @@ function loadMCPConfiguration() {
|
|
|
73573
73535
|
// Environment variable path
|
|
73574
73536
|
process.env.MCP_CONFIG_PATH,
|
|
73575
73537
|
// Local project paths
|
|
73576
|
-
(0,
|
|
73577
|
-
(0,
|
|
73538
|
+
(0, import_path9.join)(process.cwd(), ".mcp", "config.json"),
|
|
73539
|
+
(0, import_path9.join)(process.cwd(), "mcp.config.json"),
|
|
73578
73540
|
// Home directory paths
|
|
73579
|
-
(0,
|
|
73580
|
-
(0,
|
|
73541
|
+
(0, import_path9.join)((0, import_os3.homedir)(), ".config", "probe", "mcp.json"),
|
|
73542
|
+
(0, import_path9.join)((0, import_os3.homedir)(), ".mcp", "config.json"),
|
|
73581
73543
|
// Claude-style config location
|
|
73582
|
-
(0,
|
|
73544
|
+
(0, import_path9.join)((0, import_os3.homedir)(), "Library", "Application Support", "Claude", "mcp_config.json")
|
|
73583
73545
|
].filter(Boolean);
|
|
73584
73546
|
let config = null;
|
|
73585
73547
|
for (const configPath of configPaths) {
|
|
73586
|
-
if ((0,
|
|
73548
|
+
if ((0, import_fs7.existsSync)(configPath)) {
|
|
73587
73549
|
try {
|
|
73588
|
-
const content = (0,
|
|
73550
|
+
const content = (0, import_fs7.readFileSync)(configPath, "utf8");
|
|
73589
73551
|
config = JSON.parse(content);
|
|
73590
73552
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73591
73553
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73681,22 +73643,22 @@ function parseEnabledServers(config) {
|
|
|
73681
73643
|
}
|
|
73682
73644
|
return servers;
|
|
73683
73645
|
}
|
|
73684
|
-
var
|
|
73646
|
+
var import_fs7, import_path9, import_os3, import_url4, __filename4, __dirname4, DEFAULT_CONFIG;
|
|
73685
73647
|
var init_config = __esm({
|
|
73686
73648
|
"src/agent/mcp/config.js"() {
|
|
73687
73649
|
"use strict";
|
|
73688
|
-
|
|
73689
|
-
|
|
73650
|
+
import_fs7 = require("fs");
|
|
73651
|
+
import_path9 = require("path");
|
|
73690
73652
|
import_os3 = require("os");
|
|
73691
73653
|
import_url4 = require("url");
|
|
73692
73654
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
73693
|
-
__dirname4 = (0,
|
|
73655
|
+
__dirname4 = (0, import_path9.dirname)(__filename4);
|
|
73694
73656
|
DEFAULT_CONFIG = {
|
|
73695
73657
|
mcpServers: {
|
|
73696
73658
|
// Example probe server configuration
|
|
73697
73659
|
"probe-local": {
|
|
73698
73660
|
command: "node",
|
|
73699
|
-
args: [(0,
|
|
73661
|
+
args: [(0, import_path9.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
|
|
73700
73662
|
transport: "stdio",
|
|
73701
73663
|
enabled: false
|
|
73702
73664
|
},
|
|
@@ -74313,7 +74275,7 @@ __export(ProbeAgent_exports, {
|
|
|
74313
74275
|
ProbeAgent: () => ProbeAgent
|
|
74314
74276
|
});
|
|
74315
74277
|
module.exports = __toCommonJS(ProbeAgent_exports);
|
|
74316
|
-
var import_dotenv2, import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2,
|
|
74278
|
+
var import_dotenv2, import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2, import_fs8, import_promises2, import_path10, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, SUPPORTED_IMAGE_EXTENSIONS, MAX_IMAGE_FILE_SIZE, ProbeAgent;
|
|
74317
74279
|
var init_ProbeAgent = __esm({
|
|
74318
74280
|
"src/agent/ProbeAgent.js"() {
|
|
74319
74281
|
import_dotenv2 = __toESM(require_main(), 1);
|
|
@@ -74324,9 +74286,9 @@ var init_ProbeAgent = __esm({
|
|
|
74324
74286
|
import_ai3 = require("ai");
|
|
74325
74287
|
import_crypto5 = require("crypto");
|
|
74326
74288
|
import_events2 = require("events");
|
|
74327
|
-
|
|
74289
|
+
import_fs8 = require("fs");
|
|
74328
74290
|
import_promises2 = require("fs/promises");
|
|
74329
|
-
|
|
74291
|
+
import_path10 = require("path");
|
|
74330
74292
|
init_tokenCounter();
|
|
74331
74293
|
init_InMemoryStorageAdapter();
|
|
74332
74294
|
init_HookManager();
|
|
@@ -74683,7 +74645,7 @@ var init_ProbeAgent = __esm({
|
|
|
74683
74645
|
let resolvedPath2 = imagePath;
|
|
74684
74646
|
if (!imagePath.includes("/") && !imagePath.includes("\\")) {
|
|
74685
74647
|
for (const dir of listFilesDirectories) {
|
|
74686
|
-
const potentialPath = (0,
|
|
74648
|
+
const potentialPath = (0, import_path10.resolve)(dir, imagePath);
|
|
74687
74649
|
const loaded = await this.loadImageIfValid(potentialPath);
|
|
74688
74650
|
if (loaded) {
|
|
74689
74651
|
if (this.debug) {
|
|
@@ -74708,7 +74670,7 @@ var init_ProbeAgent = __esm({
|
|
|
74708
74670
|
let match2;
|
|
74709
74671
|
while ((match2 = fileHeaderPattern.exec(content)) !== null) {
|
|
74710
74672
|
const filePath = match2[1].trim();
|
|
74711
|
-
const dir = (0,
|
|
74673
|
+
const dir = (0, import_path10.dirname)(filePath);
|
|
74712
74674
|
if (dir && dir !== ".") {
|
|
74713
74675
|
directories.push(dir);
|
|
74714
74676
|
if (this.debug) {
|
|
@@ -74753,13 +74715,13 @@ var init_ProbeAgent = __esm({
|
|
|
74753
74715
|
const allowedDirs = this.allowedFolders && this.allowedFolders.length > 0 ? this.allowedFolders : [process.cwd()];
|
|
74754
74716
|
let absolutePath;
|
|
74755
74717
|
let isPathAllowed = false;
|
|
74756
|
-
if ((0,
|
|
74718
|
+
if ((0, import_path10.isAbsolute)(imagePath)) {
|
|
74757
74719
|
absolutePath = imagePath;
|
|
74758
|
-
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0,
|
|
74720
|
+
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0, import_path10.resolve)(dir)));
|
|
74759
74721
|
} else {
|
|
74760
74722
|
for (const dir of allowedDirs) {
|
|
74761
|
-
const resolvedPath2 = (0,
|
|
74762
|
-
if (resolvedPath2.startsWith((0,
|
|
74723
|
+
const resolvedPath2 = (0, import_path10.resolve)(dir, imagePath);
|
|
74724
|
+
if (resolvedPath2.startsWith((0, import_path10.resolve)(dir))) {
|
|
74763
74725
|
absolutePath = resolvedPath2;
|
|
74764
74726
|
isPathAllowed = true;
|
|
74765
74727
|
break;
|