@probelabs/probe 0.6.0-rc134 → 0.6.0-rc136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/agent/ProbeAgent.js +15 -15
- package/build/agent/index.js +82362 -224
- package/build/agent/schemaUtils.js +5 -2
- package/build/agent/telemetry.js +3 -4
- package/build/index.js +7 -1
- package/cjs/agent/ProbeAgent.cjs +798 -740
- package/cjs/agent/simpleTelemetry.cjs +250 -0
- package/cjs/agent/telemetry.cjs +373 -0
- package/cjs/index.cjs +1375 -691
- package/index.d.ts +155 -0
- package/package.json +5 -1
- package/src/agent/ProbeAgent.js +15 -15
- package/src/agent/schemaUtils.js +5 -2
- package/src/agent/telemetry.js +3 -4
- package/src/index.js +7 -1
package/cjs/agent/ProbeAgent.cjs
CHANGED
|
@@ -657,10 +657,10 @@ var require_dist_cjs3 = __commonJS({
|
|
|
657
657
|
}
|
|
658
658
|
__name(resolveEventStreamConfig, "resolveEventStreamConfig");
|
|
659
659
|
var import_protocol_http15 = require_dist_cjs2();
|
|
660
|
-
var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next,
|
|
660
|
+
var eventStreamHandlingMiddleware = /* @__PURE__ */ __name((options) => (next, context3) => async (args) => {
|
|
661
661
|
const { request } = args;
|
|
662
662
|
if (!import_protocol_http15.HttpRequest.isInstance(request)) return next(args);
|
|
663
|
-
return options.eventStreamPayloadHandler.handle(next, args,
|
|
663
|
+
return options.eventStreamPayloadHandler.handle(next, args, context3);
|
|
664
664
|
}, "eventStreamHandlingMiddleware");
|
|
665
665
|
var eventStreamHandlingMiddlewareOptions = {
|
|
666
666
|
tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"],
|
|
@@ -790,13 +790,13 @@ var require_dist_cjs5 = __commonJS({
|
|
|
790
790
|
loggerMiddlewareOptions: () => loggerMiddlewareOptions
|
|
791
791
|
});
|
|
792
792
|
module2.exports = __toCommonJS2(index_exports);
|
|
793
|
-
var loggerMiddleware = /* @__PURE__ */ __name(() => (next,
|
|
793
|
+
var loggerMiddleware = /* @__PURE__ */ __name(() => (next, context3) => async (args) => {
|
|
794
794
|
try {
|
|
795
795
|
const response = await next(args);
|
|
796
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
796
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
|
|
797
797
|
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
798
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
799
|
-
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ??
|
|
798
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
|
|
799
|
+
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context3.outputFilterSensitiveLog;
|
|
800
800
|
const { $metadata, ...outputWithoutMetadata } = response.output;
|
|
801
801
|
logger2?.info?.({
|
|
802
802
|
clientName,
|
|
@@ -807,9 +807,9 @@ var require_dist_cjs5 = __commonJS({
|
|
|
807
807
|
});
|
|
808
808
|
return response;
|
|
809
809
|
} catch (error2) {
|
|
810
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
810
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context3;
|
|
811
811
|
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
812
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
812
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context3.inputFilterSensitiveLog;
|
|
813
813
|
logger2?.error?.({
|
|
814
814
|
clientName,
|
|
815
815
|
commandName,
|
|
@@ -856,8 +856,8 @@ var require_invoke_store = __commonJS({
|
|
|
856
856
|
/**
|
|
857
857
|
* Initialize and run code within an invoke context
|
|
858
858
|
*/
|
|
859
|
-
static run(
|
|
860
|
-
return this.storage.run({ ...
|
|
859
|
+
static run(context3, fn) {
|
|
860
|
+
return this.storage.run({ ...context3 }, fn);
|
|
861
861
|
}
|
|
862
862
|
/**
|
|
863
863
|
* Get the complete current context
|
|
@@ -869,8 +869,8 @@ var require_invoke_store = __commonJS({
|
|
|
869
869
|
* Get a specific value from the context by key
|
|
870
870
|
*/
|
|
871
871
|
static get(key) {
|
|
872
|
-
const
|
|
873
|
-
return
|
|
872
|
+
const context3 = this.storage.getStore();
|
|
873
|
+
return context3?.[key];
|
|
874
874
|
}
|
|
875
875
|
/**
|
|
876
876
|
* Set a custom value in the current context
|
|
@@ -880,9 +880,9 @@ var require_invoke_store = __commonJS({
|
|
|
880
880
|
if (this.isProtectedKey(key)) {
|
|
881
881
|
throw new Error(`Cannot modify protected Lambda context field`);
|
|
882
882
|
}
|
|
883
|
-
const
|
|
884
|
-
if (
|
|
885
|
-
|
|
883
|
+
const context3 = this.storage.getStore();
|
|
884
|
+
if (context3) {
|
|
885
|
+
context3[key] = value;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
888
|
/**
|
|
@@ -1010,7 +1010,7 @@ var import_types, getSmithyContext;
|
|
|
1010
1010
|
var init_getSmithyContext = __esm({
|
|
1011
1011
|
"node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
|
|
1012
1012
|
import_types = __toESM(require_dist_cjs());
|
|
1013
|
-
getSmithyContext = (
|
|
1013
|
+
getSmithyContext = (context3) => context3[import_types.SMITHY_CONTEXT_KEY] || (context3[import_types.SMITHY_CONTEXT_KEY] = {});
|
|
1014
1014
|
}
|
|
1015
1015
|
});
|
|
1016
1016
|
|
|
@@ -1019,7 +1019,7 @@ var require_dist_cjs7 = __commonJS({
|
|
|
1019
1019
|
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
|
|
1020
1020
|
"use strict";
|
|
1021
1021
|
var types2 = require_dist_cjs();
|
|
1022
|
-
var getSmithyContext9 = (
|
|
1022
|
+
var getSmithyContext9 = (context3) => context3[types2.SMITHY_CONTEXT_KEY] || (context3[types2.SMITHY_CONTEXT_KEY] = {});
|
|
1023
1023
|
var normalizeProvider4 = (input) => {
|
|
1024
1024
|
if (typeof input === "function")
|
|
1025
1025
|
return input;
|
|
@@ -1071,12 +1071,12 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1071
1071
|
"node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
|
|
1072
1072
|
import_util_middleware = __toESM(require_dist_cjs7());
|
|
1073
1073
|
init_resolveAuthOptions();
|
|
1074
|
-
httpAuthSchemeMiddleware = (config, mwOptions) => (next,
|
|
1075
|
-
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config,
|
|
1074
|
+
httpAuthSchemeMiddleware = (config, mwOptions) => (next, context3) => async (args) => {
|
|
1075
|
+
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context3, args.input));
|
|
1076
1076
|
const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
|
|
1077
1077
|
const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
|
|
1078
1078
|
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
1079
|
-
const smithyContext = (0, import_util_middleware.getSmithyContext)(
|
|
1079
|
+
const smithyContext = (0, import_util_middleware.getSmithyContext)(context3);
|
|
1080
1080
|
const failureReasons = [];
|
|
1081
1081
|
for (const option of resolvedOptions) {
|
|
1082
1082
|
const scheme = authSchemes.get(option.schemeId);
|
|
@@ -1089,7 +1089,7 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
1089
1089
|
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
|
|
1090
1090
|
continue;
|
|
1091
1091
|
}
|
|
1092
|
-
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config,
|
|
1092
|
+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context3) || {};
|
|
1093
1093
|
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
|
|
1094
1094
|
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
|
|
1095
1095
|
smithyContext.selectedHttpAuthScheme = {
|
|
@@ -1136,7 +1136,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1136
1136
|
"node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
|
|
1137
1137
|
"use strict";
|
|
1138
1138
|
var protocolHttp = require_dist_cjs2();
|
|
1139
|
-
var deserializerMiddleware = (options, deserializer) => (next,
|
|
1139
|
+
var deserializerMiddleware = (options, deserializer) => (next, context3) => async (args) => {
|
|
1140
1140
|
const { response } = await next(args);
|
|
1141
1141
|
try {
|
|
1142
1142
|
const parsed = await deserializer(response, options);
|
|
@@ -1153,10 +1153,10 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1153
1153
|
try {
|
|
1154
1154
|
error2.message += "\n " + hint;
|
|
1155
1155
|
} catch (e3) {
|
|
1156
|
-
if (!
|
|
1156
|
+
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
1157
1157
|
console.warn(hint);
|
|
1158
1158
|
} else {
|
|
1159
|
-
|
|
1159
|
+
context3.logger?.warn?.(hint);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -1186,9 +1186,9 @@ var require_dist_cjs8 = __commonJS({
|
|
|
1186
1186
|
return k3.match(pattern);
|
|
1187
1187
|
}) || [void 0, void 0])[1];
|
|
1188
1188
|
};
|
|
1189
|
-
var serializerMiddleware = (options, serializer) => (next,
|
|
1189
|
+
var serializerMiddleware = (options, serializer) => (next, context3) => async (args) => {
|
|
1190
1190
|
const endpointConfig = options;
|
|
1191
|
-
const endpoint =
|
|
1191
|
+
const endpoint = context3.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context3.endpointV2.url) : endpointConfig.endpoint;
|
|
1192
1192
|
if (!endpoint) {
|
|
1193
1193
|
throw new Error("No valid endpoint provider available.");
|
|
1194
1194
|
}
|
|
@@ -1271,11 +1271,11 @@ var init_httpSigningMiddleware = __esm({
|
|
|
1271
1271
|
};
|
|
1272
1272
|
defaultSuccessHandler = (httpResponse, signingProperties) => {
|
|
1273
1273
|
};
|
|
1274
|
-
httpSigningMiddleware = (config) => (next,
|
|
1274
|
+
httpSigningMiddleware = (config) => (next, context3) => async (args) => {
|
|
1275
1275
|
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
|
|
1276
1276
|
return next(args);
|
|
1277
1277
|
}
|
|
1278
|
-
const smithyContext = (0, import_util_middleware2.getSmithyContext)(
|
|
1278
|
+
const smithyContext = (0, import_util_middleware2.getSmithyContext)(context3);
|
|
1279
1279
|
const scheme = smithyContext.selectedHttpAuthScheme;
|
|
1280
1280
|
if (!scheme) {
|
|
1281
1281
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
@@ -3268,14 +3268,14 @@ var import_util_stream, collectBody;
|
|
|
3268
3268
|
var init_collect_stream_body = __esm({
|
|
3269
3269
|
"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
|
|
3270
3270
|
import_util_stream = __toESM(require_dist_cjs18());
|
|
3271
|
-
collectBody = async (streamBody = new Uint8Array(),
|
|
3271
|
+
collectBody = async (streamBody = new Uint8Array(), context3) => {
|
|
3272
3272
|
if (streamBody instanceof Uint8Array) {
|
|
3273
3273
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
3274
3274
|
}
|
|
3275
3275
|
if (!streamBody) {
|
|
3276
3276
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
3277
3277
|
}
|
|
3278
|
-
const fromContext =
|
|
3278
|
+
const fromContext = context3.streamCollector(streamBody);
|
|
3279
3279
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
@@ -3305,83 +3305,16 @@ var init_deref = __esm({
|
|
|
3305
3305
|
}
|
|
3306
3306
|
});
|
|
3307
3307
|
|
|
3308
|
-
// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
|
|
3309
|
-
var TypeRegistry;
|
|
3310
|
-
var init_TypeRegistry = __esm({
|
|
3311
|
-
"node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() {
|
|
3312
|
-
TypeRegistry = class _TypeRegistry {
|
|
3313
|
-
namespace;
|
|
3314
|
-
schemas;
|
|
3315
|
-
exceptions;
|
|
3316
|
-
static registries = /* @__PURE__ */ new Map();
|
|
3317
|
-
constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
|
|
3318
|
-
this.namespace = namespace;
|
|
3319
|
-
this.schemas = schemas;
|
|
3320
|
-
this.exceptions = exceptions;
|
|
3321
|
-
}
|
|
3322
|
-
static for(namespace) {
|
|
3323
|
-
if (!_TypeRegistry.registries.has(namespace)) {
|
|
3324
|
-
_TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
|
|
3325
|
-
}
|
|
3326
|
-
return _TypeRegistry.registries.get(namespace);
|
|
3327
|
-
}
|
|
3328
|
-
register(shapeId, schema) {
|
|
3329
|
-
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
3330
|
-
this.schemas.set(qualifiedName, schema);
|
|
3331
|
-
}
|
|
3332
|
-
getSchema(shapeId) {
|
|
3333
|
-
const id = this.normalizeShapeId(shapeId);
|
|
3334
|
-
if (!this.schemas.has(id)) {
|
|
3335
|
-
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
3336
|
-
}
|
|
3337
|
-
return this.schemas.get(id);
|
|
3338
|
-
}
|
|
3339
|
-
registerError(es, ctor) {
|
|
3340
|
-
this.exceptions.set(es, ctor);
|
|
3341
|
-
}
|
|
3342
|
-
getErrorCtor(es) {
|
|
3343
|
-
return this.exceptions.get(es);
|
|
3344
|
-
}
|
|
3345
|
-
getBaseException() {
|
|
3346
|
-
for (const [id, schema] of this.schemas.entries()) {
|
|
3347
|
-
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
|
|
3348
|
-
return schema;
|
|
3349
|
-
}
|
|
3350
|
-
}
|
|
3351
|
-
return void 0;
|
|
3352
|
-
}
|
|
3353
|
-
find(predicate) {
|
|
3354
|
-
return [...this.schemas.values()].find(predicate);
|
|
3355
|
-
}
|
|
3356
|
-
clear() {
|
|
3357
|
-
this.schemas.clear();
|
|
3358
|
-
this.exceptions.clear();
|
|
3359
|
-
}
|
|
3360
|
-
normalizeShapeId(shapeId) {
|
|
3361
|
-
if (shapeId.includes("#")) {
|
|
3362
|
-
return shapeId;
|
|
3363
|
-
}
|
|
3364
|
-
return this.namespace + "#" + shapeId;
|
|
3365
|
-
}
|
|
3366
|
-
getNamespace(shapeId) {
|
|
3367
|
-
return this.normalizeShapeId(shapeId).split("#")[0];
|
|
3368
|
-
}
|
|
3369
|
-
};
|
|
3370
|
-
}
|
|
3371
|
-
});
|
|
3372
|
-
|
|
3373
3308
|
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js
|
|
3374
3309
|
var Schema;
|
|
3375
3310
|
var init_Schema = __esm({
|
|
3376
3311
|
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js"() {
|
|
3377
|
-
init_TypeRegistry();
|
|
3378
3312
|
Schema = class {
|
|
3379
3313
|
name;
|
|
3380
3314
|
namespace;
|
|
3381
3315
|
traits;
|
|
3382
3316
|
static assign(instance, values2) {
|
|
3383
3317
|
const schema = Object.assign(instance, values2);
|
|
3384
|
-
TypeRegistry.for(schema.namespace).register(schema.name, schema);
|
|
3385
3318
|
return schema;
|
|
3386
3319
|
}
|
|
3387
3320
|
static [Symbol.hasInstance](lhs) {
|
|
@@ -3512,7 +3445,7 @@ var init_OperationSchema = __esm({
|
|
|
3512
3445
|
});
|
|
3513
3446
|
|
|
3514
3447
|
// node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js
|
|
3515
|
-
var SimpleSchema, sim;
|
|
3448
|
+
var SimpleSchema, sim, simAdapter;
|
|
3516
3449
|
var init_SimpleSchema = __esm({
|
|
3517
3450
|
"node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js"() {
|
|
3518
3451
|
init_Schema();
|
|
@@ -3529,6 +3462,12 @@ var init_SimpleSchema = __esm({
|
|
|
3529
3462
|
traits,
|
|
3530
3463
|
schemaRef
|
|
3531
3464
|
});
|
|
3465
|
+
simAdapter = (namespace, name14, traits, schemaRef) => Schema.assign(new SimpleSchema(), {
|
|
3466
|
+
name: name14,
|
|
3467
|
+
namespace,
|
|
3468
|
+
traits,
|
|
3469
|
+
schemaRef
|
|
3470
|
+
});
|
|
3532
3471
|
}
|
|
3533
3472
|
});
|
|
3534
3473
|
|
|
@@ -3574,7 +3513,7 @@ function member(memberSchema, memberName) {
|
|
|
3574
3513
|
function hydrate(ss) {
|
|
3575
3514
|
const [id, ...rest] = ss;
|
|
3576
3515
|
return {
|
|
3577
|
-
[0]:
|
|
3516
|
+
[0]: simAdapter,
|
|
3578
3517
|
[1]: list,
|
|
3579
3518
|
[2]: map,
|
|
3580
3519
|
[3]: struct,
|
|
@@ -3817,16 +3756,16 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3817
3756
|
import_protocol_http2 = __toESM(require_dist_cjs2());
|
|
3818
3757
|
import_util_middleware3 = __toESM(require_dist_cjs7());
|
|
3819
3758
|
init_NormalizedSchema();
|
|
3820
|
-
schemaDeserializationMiddleware = (config) => (next,
|
|
3759
|
+
schemaDeserializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
3821
3760
|
const { response } = await next(args);
|
|
3822
|
-
let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(
|
|
3761
|
+
let { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context3);
|
|
3823
3762
|
if (isStaticSchema(operationSchema)) {
|
|
3824
3763
|
operationSchema = hydrate(operationSchema);
|
|
3825
3764
|
}
|
|
3826
3765
|
try {
|
|
3827
3766
|
const parsed = await config.protocol.deserializeResponse(operationSchema, {
|
|
3828
3767
|
...config,
|
|
3829
|
-
...
|
|
3768
|
+
...context3
|
|
3830
3769
|
}, response);
|
|
3831
3770
|
return {
|
|
3832
3771
|
response,
|
|
@@ -3841,10 +3780,10 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
3841
3780
|
try {
|
|
3842
3781
|
error2.message += "\n " + hint;
|
|
3843
3782
|
} catch (e3) {
|
|
3844
|
-
if (!
|
|
3783
|
+
if (!context3.logger || context3.logger?.constructor?.name === "NoOpLogger") {
|
|
3845
3784
|
console.warn(hint);
|
|
3846
3785
|
} else {
|
|
3847
|
-
|
|
3786
|
+
context3.logger?.warn?.(hint);
|
|
3848
3787
|
}
|
|
3849
3788
|
}
|
|
3850
3789
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -3883,15 +3822,15 @@ var init_schemaSerializationMiddleware = __esm({
|
|
|
3883
3822
|
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
3884
3823
|
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
3885
3824
|
init_NormalizedSchema();
|
|
3886
|
-
schemaSerializationMiddleware = (config) => (next,
|
|
3887
|
-
let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(
|
|
3825
|
+
schemaSerializationMiddleware = (config) => (next, context3) => async (args) => {
|
|
3826
|
+
let { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context3);
|
|
3888
3827
|
if (isStaticSchema(operationSchema)) {
|
|
3889
3828
|
operationSchema = hydrate(operationSchema);
|
|
3890
3829
|
}
|
|
3891
|
-
const endpoint =
|
|
3830
|
+
const endpoint = context3.endpointV2?.url && config.urlParser ? async () => config.urlParser(context3.endpointV2.url) : config.endpoint;
|
|
3892
3831
|
const request = await config.protocol.serializeRequest(operationSchema, args.input, {
|
|
3893
3832
|
...config,
|
|
3894
|
-
...
|
|
3833
|
+
...context3,
|
|
3895
3834
|
endpoint
|
|
3896
3835
|
});
|
|
3897
3836
|
return next({
|
|
@@ -3955,6 +3894,78 @@ var init_sentinels = __esm({
|
|
|
3955
3894
|
}
|
|
3956
3895
|
});
|
|
3957
3896
|
|
|
3897
|
+
// node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
|
|
3898
|
+
var TypeRegistry;
|
|
3899
|
+
var init_TypeRegistry = __esm({
|
|
3900
|
+
"node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js"() {
|
|
3901
|
+
TypeRegistry = class _TypeRegistry {
|
|
3902
|
+
namespace;
|
|
3903
|
+
schemas;
|
|
3904
|
+
exceptions;
|
|
3905
|
+
static registries = /* @__PURE__ */ new Map();
|
|
3906
|
+
constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
|
|
3907
|
+
this.namespace = namespace;
|
|
3908
|
+
this.schemas = schemas;
|
|
3909
|
+
this.exceptions = exceptions;
|
|
3910
|
+
}
|
|
3911
|
+
static for(namespace) {
|
|
3912
|
+
if (!_TypeRegistry.registries.has(namespace)) {
|
|
3913
|
+
_TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
|
|
3914
|
+
}
|
|
3915
|
+
return _TypeRegistry.registries.get(namespace);
|
|
3916
|
+
}
|
|
3917
|
+
register(shapeId, schema) {
|
|
3918
|
+
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
3919
|
+
const registry = _TypeRegistry.for(qualifiedName.split("#")[0]);
|
|
3920
|
+
registry.schemas.set(qualifiedName, schema);
|
|
3921
|
+
}
|
|
3922
|
+
getSchema(shapeId) {
|
|
3923
|
+
const id = this.normalizeShapeId(shapeId);
|
|
3924
|
+
if (!this.schemas.has(id)) {
|
|
3925
|
+
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
3926
|
+
}
|
|
3927
|
+
return this.schemas.get(id);
|
|
3928
|
+
}
|
|
3929
|
+
registerError(es, ctor) {
|
|
3930
|
+
const $error = es;
|
|
3931
|
+
const registry = _TypeRegistry.for($error[1]);
|
|
3932
|
+
registry.schemas.set($error[1] + "#" + $error[2], $error);
|
|
3933
|
+
registry.exceptions.set($error, ctor);
|
|
3934
|
+
}
|
|
3935
|
+
getErrorCtor(es) {
|
|
3936
|
+
const $error = es;
|
|
3937
|
+
const registry = _TypeRegistry.for($error[1]);
|
|
3938
|
+
return registry.exceptions.get(es);
|
|
3939
|
+
}
|
|
3940
|
+
getBaseException() {
|
|
3941
|
+
for (const exceptionKey of this.exceptions.keys()) {
|
|
3942
|
+
if (Array.isArray(exceptionKey)) {
|
|
3943
|
+
const [, ns, name14] = exceptionKey;
|
|
3944
|
+
const id = ns + "#" + name14;
|
|
3945
|
+
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) {
|
|
3946
|
+
return exceptionKey;
|
|
3947
|
+
}
|
|
3948
|
+
}
|
|
3949
|
+
}
|
|
3950
|
+
return void 0;
|
|
3951
|
+
}
|
|
3952
|
+
find(predicate) {
|
|
3953
|
+
return [...this.schemas.values()].find(predicate);
|
|
3954
|
+
}
|
|
3955
|
+
clear() {
|
|
3956
|
+
this.schemas.clear();
|
|
3957
|
+
this.exceptions.clear();
|
|
3958
|
+
}
|
|
3959
|
+
normalizeShapeId(shapeId) {
|
|
3960
|
+
if (shapeId.includes("#")) {
|
|
3961
|
+
return shapeId;
|
|
3962
|
+
}
|
|
3963
|
+
return this.namespace + "#" + shapeId;
|
|
3964
|
+
}
|
|
3965
|
+
};
|
|
3966
|
+
}
|
|
3967
|
+
});
|
|
3968
|
+
|
|
3958
3969
|
// node_modules/@smithy/core/dist-es/submodules/schema/index.js
|
|
3959
3970
|
var schema_exports = {};
|
|
3960
3971
|
__export(schema_exports, {
|
|
@@ -3979,6 +3990,7 @@ __export(schema_exports, {
|
|
|
3979
3990
|
op: () => op,
|
|
3980
3991
|
serializerMiddlewareOption: () => serializerMiddlewareOption2,
|
|
3981
3992
|
sim: () => sim,
|
|
3993
|
+
simAdapter: () => simAdapter,
|
|
3982
3994
|
struct: () => struct,
|
|
3983
3995
|
translateTraits: () => translateTraits
|
|
3984
3996
|
});
|
|
@@ -4509,14 +4521,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
|
|
4509
4521
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
4510
4522
|
var _2, done = false;
|
|
4511
4523
|
for (var i3 = decorators.length - 1; i3 >= 0; i3--) {
|
|
4512
|
-
var
|
|
4513
|
-
for (var p3 in contextIn)
|
|
4514
|
-
for (var p3 in contextIn.access)
|
|
4515
|
-
|
|
4524
|
+
var context3 = {};
|
|
4525
|
+
for (var p3 in contextIn) context3[p3] = p3 === "access" ? {} : contextIn[p3];
|
|
4526
|
+
for (var p3 in contextIn.access) context3.access[p3] = contextIn.access[p3];
|
|
4527
|
+
context3.addInitializer = function(f3) {
|
|
4516
4528
|
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
4517
4529
|
extraInitializers.push(accept(f3 || null));
|
|
4518
4530
|
};
|
|
4519
|
-
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key],
|
|
4531
|
+
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context3);
|
|
4520
4532
|
if (kind === "accessor") {
|
|
4521
4533
|
if (result === void 0) continue;
|
|
4522
4534
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
@@ -5654,20 +5666,20 @@ var init_HttpProtocol = __esm({
|
|
|
5654
5666
|
getDefaultContentType() {
|
|
5655
5667
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
5656
5668
|
}
|
|
5657
|
-
async deserializeHttpMessage(schema,
|
|
5669
|
+
async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
|
|
5658
5670
|
void schema;
|
|
5659
|
-
void
|
|
5671
|
+
void context3;
|
|
5660
5672
|
void response;
|
|
5661
5673
|
void arg4;
|
|
5662
5674
|
void arg5;
|
|
5663
5675
|
return [];
|
|
5664
5676
|
}
|
|
5665
5677
|
getEventStreamMarshaller() {
|
|
5666
|
-
const
|
|
5667
|
-
if (!
|
|
5678
|
+
const context3 = this.serdeContext;
|
|
5679
|
+
if (!context3.eventStreamMarshaller) {
|
|
5668
5680
|
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
5669
5681
|
}
|
|
5670
|
-
return
|
|
5682
|
+
return context3.eventStreamMarshaller;
|
|
5671
5683
|
}
|
|
5672
5684
|
};
|
|
5673
5685
|
}
|
|
@@ -5685,14 +5697,14 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5685
5697
|
init_extended_encode_uri_component();
|
|
5686
5698
|
init_HttpProtocol();
|
|
5687
5699
|
HttpBindingProtocol = class extends HttpProtocol {
|
|
5688
|
-
async serializeRequest(operationSchema, _input,
|
|
5700
|
+
async serializeRequest(operationSchema, _input, context3) {
|
|
5689
5701
|
const input = {
|
|
5690
5702
|
..._input ?? {}
|
|
5691
5703
|
};
|
|
5692
5704
|
const serializer = this.serializer;
|
|
5693
5705
|
const query2 = {};
|
|
5694
5706
|
const headers = {};
|
|
5695
|
-
const endpoint = await
|
|
5707
|
+
const endpoint = await context3.endpoint();
|
|
5696
5708
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
5697
5709
|
const schema = ns.getSchema();
|
|
5698
5710
|
let hasNonHttpBindingMember = false;
|
|
@@ -5817,16 +5829,16 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5817
5829
|
query2[traits.httpQuery] = serializer.flush();
|
|
5818
5830
|
}
|
|
5819
5831
|
}
|
|
5820
|
-
async deserializeResponse(operationSchema,
|
|
5832
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
5821
5833
|
const deserializer = this.deserializer;
|
|
5822
5834
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
5823
5835
|
const dataObject = {};
|
|
5824
5836
|
if (response.statusCode >= 300) {
|
|
5825
|
-
const bytes = await collectBody(response.body,
|
|
5837
|
+
const bytes = await collectBody(response.body, context3);
|
|
5826
5838
|
if (bytes.byteLength > 0) {
|
|
5827
5839
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
5828
5840
|
}
|
|
5829
|
-
await this.handleError(operationSchema,
|
|
5841
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
5830
5842
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
5831
5843
|
}
|
|
5832
5844
|
for (const header in response.headers) {
|
|
@@ -5834,9 +5846,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5834
5846
|
delete response.headers[header];
|
|
5835
5847
|
response.headers[header.toLowerCase()] = value;
|
|
5836
5848
|
}
|
|
5837
|
-
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns,
|
|
5849
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context3, response, dataObject);
|
|
5838
5850
|
if (nonHttpBindingMembers.length) {
|
|
5839
|
-
const bytes = await collectBody(response.body,
|
|
5851
|
+
const bytes = await collectBody(response.body, context3);
|
|
5840
5852
|
if (bytes.byteLength > 0) {
|
|
5841
5853
|
const dataFromBody = await deserializer.read(ns, bytes);
|
|
5842
5854
|
for (const member2 of nonHttpBindingMembers) {
|
|
@@ -5847,7 +5859,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5847
5859
|
dataObject.$metadata = this.deserializeMetadata(response);
|
|
5848
5860
|
return dataObject;
|
|
5849
5861
|
}
|
|
5850
|
-
async deserializeHttpMessage(schema,
|
|
5862
|
+
async deserializeHttpMessage(schema, context3, response, arg4, arg5) {
|
|
5851
5863
|
let dataObject;
|
|
5852
5864
|
if (arg4 instanceof Set) {
|
|
5853
5865
|
dataObject = arg5;
|
|
@@ -5872,7 +5884,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
5872
5884
|
dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
|
|
5873
5885
|
}
|
|
5874
5886
|
} else if (response.body) {
|
|
5875
|
-
const bytes = await collectBody(response.body,
|
|
5887
|
+
const bytes = await collectBody(response.body, context3);
|
|
5876
5888
|
if (bytes.byteLength > 0) {
|
|
5877
5889
|
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
5878
5890
|
}
|
|
@@ -5929,11 +5941,11 @@ var init_RpcProtocol = __esm({
|
|
|
5929
5941
|
init_collect_stream_body();
|
|
5930
5942
|
init_HttpProtocol();
|
|
5931
5943
|
RpcProtocol = class extends HttpProtocol {
|
|
5932
|
-
async serializeRequest(operationSchema, input,
|
|
5944
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
5933
5945
|
const serializer = this.serializer;
|
|
5934
5946
|
const query2 = {};
|
|
5935
5947
|
const headers = {};
|
|
5936
|
-
const endpoint = await
|
|
5948
|
+
const endpoint = await context3.endpoint();
|
|
5937
5949
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
5938
5950
|
const schema = ns.getSchema();
|
|
5939
5951
|
let payload2;
|
|
@@ -5982,16 +5994,16 @@ var init_RpcProtocol = __esm({
|
|
|
5982
5994
|
request.method = "POST";
|
|
5983
5995
|
return request;
|
|
5984
5996
|
}
|
|
5985
|
-
async deserializeResponse(operationSchema,
|
|
5997
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
5986
5998
|
const deserializer = this.deserializer;
|
|
5987
5999
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
5988
6000
|
const dataObject = {};
|
|
5989
6001
|
if (response.statusCode >= 300) {
|
|
5990
|
-
const bytes = await collectBody(response.body,
|
|
6002
|
+
const bytes = await collectBody(response.body, context3);
|
|
5991
6003
|
if (bytes.byteLength > 0) {
|
|
5992
6004
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
5993
6005
|
}
|
|
5994
|
-
await this.handleError(operationSchema,
|
|
6006
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
5995
6007
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
5996
6008
|
}
|
|
5997
6009
|
for (const header in response.headers) {
|
|
@@ -6007,7 +6019,7 @@ var init_RpcProtocol = __esm({
|
|
|
6007
6019
|
initialResponseContainer: dataObject
|
|
6008
6020
|
});
|
|
6009
6021
|
} else {
|
|
6010
|
-
const bytes = await collectBody(response.body,
|
|
6022
|
+
const bytes = await collectBody(response.body, context3);
|
|
6011
6023
|
if (bytes.byteLength > 0) {
|
|
6012
6024
|
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
6013
6025
|
}
|
|
@@ -6040,8 +6052,8 @@ var init_resolve_path = __esm({
|
|
|
6040
6052
|
});
|
|
6041
6053
|
|
|
6042
6054
|
// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
|
|
6043
|
-
function requestBuilder(input,
|
|
6044
|
-
return new RequestBuilder(input,
|
|
6055
|
+
function requestBuilder(input, context3) {
|
|
6056
|
+
return new RequestBuilder(input, context3);
|
|
6045
6057
|
}
|
|
6046
6058
|
var import_protocol_http6, RequestBuilder;
|
|
6047
6059
|
var init_requestBuilder = __esm({
|
|
@@ -6058,9 +6070,9 @@ var init_requestBuilder = __esm({
|
|
|
6058
6070
|
body = null;
|
|
6059
6071
|
hostname = "";
|
|
6060
6072
|
resolvePathStack = [];
|
|
6061
|
-
constructor(input,
|
|
6073
|
+
constructor(input, context3) {
|
|
6062
6074
|
this.input = input;
|
|
6063
|
-
this.context =
|
|
6075
|
+
this.context = context3;
|
|
6064
6076
|
}
|
|
6065
6077
|
async build() {
|
|
6066
6078
|
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
@@ -6429,15 +6441,15 @@ var init_requestBuilder2 = __esm({
|
|
|
6429
6441
|
});
|
|
6430
6442
|
|
|
6431
6443
|
// node_modules/@smithy/core/dist-es/setFeature.js
|
|
6432
|
-
function setFeature(
|
|
6433
|
-
if (!
|
|
6434
|
-
|
|
6444
|
+
function setFeature(context3, feature, value) {
|
|
6445
|
+
if (!context3.__smithy_context) {
|
|
6446
|
+
context3.__smithy_context = {
|
|
6435
6447
|
features: {}
|
|
6436
6448
|
};
|
|
6437
|
-
} else if (!
|
|
6438
|
-
|
|
6449
|
+
} else if (!context3.__smithy_context.features) {
|
|
6450
|
+
context3.__smithy_context.features = {};
|
|
6439
6451
|
}
|
|
6440
|
-
|
|
6452
|
+
context3.__smithy_context.features[feature] = value;
|
|
6441
6453
|
}
|
|
6442
6454
|
var init_setFeature = __esm({
|
|
6443
6455
|
"node_modules/@smithy/core/dist-es/setFeature.js"() {
|
|
@@ -7589,15 +7601,15 @@ var init_setCredentialFeature = __esm({
|
|
|
7589
7601
|
});
|
|
7590
7602
|
|
|
7591
7603
|
// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
7592
|
-
function setFeature2(
|
|
7593
|
-
if (!
|
|
7594
|
-
|
|
7604
|
+
function setFeature2(context3, feature, value) {
|
|
7605
|
+
if (!context3.__aws_sdk_context) {
|
|
7606
|
+
context3.__aws_sdk_context = {
|
|
7595
7607
|
features: {}
|
|
7596
7608
|
};
|
|
7597
|
-
} else if (!
|
|
7598
|
-
|
|
7609
|
+
} else if (!context3.__aws_sdk_context.features) {
|
|
7610
|
+
context3.__aws_sdk_context.features = {};
|
|
7599
7611
|
}
|
|
7600
|
-
|
|
7612
|
+
context3.__aws_sdk_context.features[feature] = value;
|
|
7601
7613
|
}
|
|
7602
7614
|
var init_setFeature2 = __esm({
|
|
7603
7615
|
"node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
|
|
@@ -7698,9 +7710,9 @@ var init_AwsSdkSigV4Signer = __esm({
|
|
|
7698
7710
|
return property2;
|
|
7699
7711
|
};
|
|
7700
7712
|
validateSigningProperties = async (signingProperties) => {
|
|
7701
|
-
const
|
|
7713
|
+
const context3 = throwSigningPropertyError("context", signingProperties.context);
|
|
7702
7714
|
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
7703
|
-
const authScheme =
|
|
7715
|
+
const authScheme = context3.endpointV2?.properties?.authSchemes?.[0];
|
|
7704
7716
|
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
7705
7717
|
const signer = await signerFunction(authScheme);
|
|
7706
7718
|
const signingRegion = signingProperties?.signingRegion;
|
|
@@ -9558,8 +9570,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9558
9570
|
getPayloadCodec() {
|
|
9559
9571
|
return this.codec;
|
|
9560
9572
|
}
|
|
9561
|
-
async serializeRequest(operationSchema, input,
|
|
9562
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
9573
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
9574
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
9563
9575
|
Object.assign(request.headers, {
|
|
9564
9576
|
"content-type": this.getDefaultContentType(),
|
|
9565
9577
|
"smithy-protocol": "rpc-v2-cbor",
|
|
@@ -9578,7 +9590,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9578
9590
|
} catch (e3) {
|
|
9579
9591
|
}
|
|
9580
9592
|
}
|
|
9581
|
-
const { service, operation } = (0, import_util_middleware5.getSmithyContext)(
|
|
9593
|
+
const { service, operation } = (0, import_util_middleware5.getSmithyContext)(context3);
|
|
9582
9594
|
const path7 = `/service/${service}/operation/${operation}`;
|
|
9583
9595
|
if (request.path.endsWith("/")) {
|
|
9584
9596
|
request.path += path7.slice(1);
|
|
@@ -9587,10 +9599,10 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
9587
9599
|
}
|
|
9588
9600
|
return request;
|
|
9589
9601
|
}
|
|
9590
|
-
async deserializeResponse(operationSchema,
|
|
9591
|
-
return super.deserializeResponse(operationSchema,
|
|
9602
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
9603
|
+
return super.deserializeResponse(operationSchema, context3, response);
|
|
9592
9604
|
}
|
|
9593
|
-
async handleError(operationSchema,
|
|
9605
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
9594
9606
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
9595
9607
|
let namespace = this.options.defaultNamespace;
|
|
9596
9608
|
if (errorName.includes("#")) {
|
|
@@ -9751,14 +9763,14 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({
|
|
|
9751
9763
|
super({ defaultNamespace });
|
|
9752
9764
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
9753
9765
|
}
|
|
9754
|
-
async serializeRequest(operationSchema, input,
|
|
9755
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
9766
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
9767
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
9756
9768
|
if (this.awsQueryCompatible) {
|
|
9757
9769
|
request.headers["x-amzn-query-mode"] = "true";
|
|
9758
9770
|
}
|
|
9759
9771
|
return request;
|
|
9760
9772
|
}
|
|
9761
|
-
async handleError(operationSchema,
|
|
9773
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
9762
9774
|
if (this.awsQueryCompatible) {
|
|
9763
9775
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
9764
9776
|
}
|
|
@@ -9858,9 +9870,9 @@ var init_ConfigurableSerdeContext = __esm({
|
|
|
9858
9870
|
});
|
|
9859
9871
|
|
|
9860
9872
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
9861
|
-
function jsonReviver(key, value,
|
|
9862
|
-
if (
|
|
9863
|
-
const numericString =
|
|
9873
|
+
function jsonReviver(key, value, context3) {
|
|
9874
|
+
if (context3?.source) {
|
|
9875
|
+
const numericString = context3.source;
|
|
9864
9876
|
if (typeof value === "number") {
|
|
9865
9877
|
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
|
|
9866
9878
|
const isFractional = numericString.includes(".");
|
|
@@ -10123,9 +10135,9 @@ var require_dist_cjs26 = __commonJS({
|
|
|
10123
10135
|
identifyOnResolve = toggle;
|
|
10124
10136
|
return identifyOnResolve;
|
|
10125
10137
|
},
|
|
10126
|
-
resolve: (handler,
|
|
10138
|
+
resolve: (handler, context3) => {
|
|
10127
10139
|
for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
|
|
10128
|
-
handler = middleware(handler,
|
|
10140
|
+
handler = middleware(handler, context3);
|
|
10129
10141
|
}
|
|
10130
10142
|
if (identifyOnResolve) {
|
|
10131
10143
|
console.log(stack.identify());
|
|
@@ -10725,7 +10737,7 @@ var init_common = __esm({
|
|
|
10725
10737
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
|
|
10726
10738
|
import_smithy_client = __toESM(require_dist_cjs27());
|
|
10727
10739
|
import_util_utf86 = __toESM(require_dist_cjs11());
|
|
10728
|
-
collectBodyString = (streamBody,
|
|
10740
|
+
collectBodyString = (streamBody, context3) => (0, import_smithy_client.collectBody)(streamBody, context3).then((body) => (context3?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
|
|
10729
10741
|
}
|
|
10730
10742
|
});
|
|
10731
10743
|
|
|
@@ -10734,7 +10746,7 @@ var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
|
|
|
10734
10746
|
var init_parseJsonBody = __esm({
|
|
10735
10747
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
|
10736
10748
|
init_common();
|
|
10737
|
-
parseJsonBody = (streamBody,
|
|
10749
|
+
parseJsonBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
|
|
10738
10750
|
if (encoded.length) {
|
|
10739
10751
|
try {
|
|
10740
10752
|
return JSON.parse(encoded);
|
|
@@ -10749,8 +10761,8 @@ var init_parseJsonBody = __esm({
|
|
|
10749
10761
|
}
|
|
10750
10762
|
return {};
|
|
10751
10763
|
});
|
|
10752
|
-
parseJsonErrorBody = async (errorBody,
|
|
10753
|
-
const value = await parseJsonBody(errorBody,
|
|
10764
|
+
parseJsonErrorBody = async (errorBody, context3) => {
|
|
10765
|
+
const value = await parseJsonBody(errorBody, context3);
|
|
10754
10766
|
value.message = value.message ?? value.Message;
|
|
10755
10767
|
return value;
|
|
10756
10768
|
};
|
|
@@ -11161,8 +11173,8 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11161
11173
|
this.deserializer = this.codec.createDeserializer();
|
|
11162
11174
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
11163
11175
|
}
|
|
11164
|
-
async serializeRequest(operationSchema, input,
|
|
11165
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11176
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
11177
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
11166
11178
|
if (!request.path.endsWith("/")) {
|
|
11167
11179
|
request.path += "/";
|
|
11168
11180
|
}
|
|
@@ -11181,7 +11193,7 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
11181
11193
|
getPayloadCodec() {
|
|
11182
11194
|
return this.codec;
|
|
11183
11195
|
}
|
|
11184
|
-
async handleError(operationSchema,
|
|
11196
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
11185
11197
|
if (this.awsQueryCompatible) {
|
|
11186
11198
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
11187
11199
|
}
|
|
@@ -11300,8 +11312,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11300
11312
|
this.codec.setSerdeContext(serdeContext);
|
|
11301
11313
|
super.setSerdeContext(serdeContext);
|
|
11302
11314
|
}
|
|
11303
|
-
async serializeRequest(operationSchema, input,
|
|
11304
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
11315
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
11316
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
11305
11317
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
11306
11318
|
if (!request.headers["content-type"]) {
|
|
11307
11319
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -11314,14 +11326,14 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
11314
11326
|
}
|
|
11315
11327
|
return request;
|
|
11316
11328
|
}
|
|
11317
|
-
async handleError(operationSchema,
|
|
11329
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
11318
11330
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
11319
11331
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
11320
11332
|
const ns = NormalizedSchema.of(errorSchema);
|
|
11321
11333
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
11322
11334
|
const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
|
|
11323
11335
|
const exception = new ErrorCtor(message);
|
|
11324
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
11336
|
+
await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
|
|
11325
11337
|
const output = {};
|
|
11326
11338
|
for (const [name14, member2] of ns.structIterator()) {
|
|
11327
11339
|
const target = member2.getMergedTraits().jsonName ?? name14;
|
|
@@ -12671,8 +12683,8 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12671
12683
|
getPayloadCodec() {
|
|
12672
12684
|
throw new Error("AWSQuery protocol has no payload codec.");
|
|
12673
12685
|
}
|
|
12674
|
-
async serializeRequest(operationSchema, input,
|
|
12675
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
12686
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
12687
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
12676
12688
|
if (!request.path.endsWith("/")) {
|
|
12677
12689
|
request.path += "/";
|
|
12678
12690
|
}
|
|
@@ -12689,16 +12701,16 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12689
12701
|
}
|
|
12690
12702
|
return request;
|
|
12691
12703
|
}
|
|
12692
|
-
async deserializeResponse(operationSchema,
|
|
12704
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
12693
12705
|
const deserializer = this.deserializer;
|
|
12694
12706
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
12695
12707
|
const dataObject = {};
|
|
12696
12708
|
if (response.statusCode >= 300) {
|
|
12697
|
-
const bytes2 = await collectBody(response.body,
|
|
12709
|
+
const bytes2 = await collectBody(response.body, context3);
|
|
12698
12710
|
if (bytes2.byteLength > 0) {
|
|
12699
12711
|
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
12700
12712
|
}
|
|
12701
|
-
await this.handleError(operationSchema,
|
|
12713
|
+
await this.handleError(operationSchema, context3, response, dataObject, this.deserializeMetadata(response));
|
|
12702
12714
|
}
|
|
12703
12715
|
for (const header in response.headers) {
|
|
12704
12716
|
const value = response.headers[header];
|
|
@@ -12707,7 +12719,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12707
12719
|
}
|
|
12708
12720
|
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
12709
12721
|
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
12710
|
-
const bytes = await collectBody(response.body,
|
|
12722
|
+
const bytes = await collectBody(response.body, context3);
|
|
12711
12723
|
if (bytes.byteLength > 0) {
|
|
12712
12724
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
12713
12725
|
}
|
|
@@ -12720,7 +12732,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
12720
12732
|
useNestedResult() {
|
|
12721
12733
|
return true;
|
|
12722
12734
|
}
|
|
12723
|
-
async handleError(operationSchema,
|
|
12735
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
12724
12736
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
12725
12737
|
const errorData = this.loadQueryError(dataObject);
|
|
12726
12738
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
@@ -12801,7 +12813,7 @@ var init_parseXmlBody = __esm({
|
|
|
12801
12813
|
import_xml_builder2 = __toESM(require_dist_cjs28());
|
|
12802
12814
|
import_smithy_client5 = __toESM(require_dist_cjs27());
|
|
12803
12815
|
init_common();
|
|
12804
|
-
parseXmlBody = (streamBody,
|
|
12816
|
+
parseXmlBody = (streamBody, context3) => collectBodyString(streamBody, context3).then((encoded) => {
|
|
12805
12817
|
if (encoded.length) {
|
|
12806
12818
|
let parsedObj;
|
|
12807
12819
|
try {
|
|
@@ -12825,8 +12837,8 @@ var init_parseXmlBody = __esm({
|
|
|
12825
12837
|
}
|
|
12826
12838
|
return {};
|
|
12827
12839
|
});
|
|
12828
|
-
parseXmlErrorBody = async (errorBody,
|
|
12829
|
-
const value = await parseXmlBody(errorBody,
|
|
12840
|
+
parseXmlErrorBody = async (errorBody, context3) => {
|
|
12841
|
+
const value = await parseXmlBody(errorBody, context3);
|
|
12830
12842
|
if (value.Error) {
|
|
12831
12843
|
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
12832
12844
|
}
|
|
@@ -13171,8 +13183,8 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13171
13183
|
getShapeId() {
|
|
13172
13184
|
return "aws.protocols#restXml";
|
|
13173
13185
|
}
|
|
13174
|
-
async serializeRequest(operationSchema, input,
|
|
13175
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
13186
|
+
async serializeRequest(operationSchema, input, context3) {
|
|
13187
|
+
const request = await super.serializeRequest(operationSchema, input, context3);
|
|
13176
13188
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
13177
13189
|
if (!request.headers["content-type"]) {
|
|
13178
13190
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -13187,17 +13199,17 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
13187
13199
|
}
|
|
13188
13200
|
return request;
|
|
13189
13201
|
}
|
|
13190
|
-
async deserializeResponse(operationSchema,
|
|
13191
|
-
return super.deserializeResponse(operationSchema,
|
|
13202
|
+
async deserializeResponse(operationSchema, context3, response) {
|
|
13203
|
+
return super.deserializeResponse(operationSchema, context3, response);
|
|
13192
13204
|
}
|
|
13193
|
-
async handleError(operationSchema,
|
|
13205
|
+
async handleError(operationSchema, context3, response, dataObject, metadata) {
|
|
13194
13206
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
13195
13207
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
13196
13208
|
const ns = NormalizedSchema.of(errorSchema);
|
|
13197
13209
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
13198
13210
|
const ErrorCtor = TypeRegistry.for(errorSchema.namespace).getErrorCtor(errorSchema) ?? Error;
|
|
13199
13211
|
const exception = new ErrorCtor(message);
|
|
13200
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
13212
|
+
await this.deserializeHttpMessage(errorSchema, context3, response, dataObject);
|
|
13201
13213
|
const output = {};
|
|
13202
13214
|
for (const [name14, member2] of ns.structIterator()) {
|
|
13203
13215
|
const target = member2.getMergedTraits().xmlName ?? name14;
|
|
@@ -13326,48 +13338,48 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13326
13338
|
});
|
|
13327
13339
|
}
|
|
13328
13340
|
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
13329
|
-
async function checkFeatures(
|
|
13341
|
+
async function checkFeatures(context3, config, args) {
|
|
13330
13342
|
const request = args.request;
|
|
13331
13343
|
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
|
|
13332
|
-
core$1.setFeature(
|
|
13344
|
+
core$1.setFeature(context3, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
13333
13345
|
}
|
|
13334
13346
|
if (typeof config.retryStrategy === "function") {
|
|
13335
13347
|
const retryStrategy = await config.retryStrategy();
|
|
13336
13348
|
if (typeof retryStrategy.acquireInitialRetryToken === "function") {
|
|
13337
13349
|
if (retryStrategy.constructor?.name?.includes("Adaptive")) {
|
|
13338
|
-
core$1.setFeature(
|
|
13350
|
+
core$1.setFeature(context3, "RETRY_MODE_ADAPTIVE", "F");
|
|
13339
13351
|
} else {
|
|
13340
|
-
core$1.setFeature(
|
|
13352
|
+
core$1.setFeature(context3, "RETRY_MODE_STANDARD", "E");
|
|
13341
13353
|
}
|
|
13342
13354
|
} else {
|
|
13343
|
-
core$1.setFeature(
|
|
13355
|
+
core$1.setFeature(context3, "RETRY_MODE_LEGACY", "D");
|
|
13344
13356
|
}
|
|
13345
13357
|
}
|
|
13346
13358
|
if (typeof config.accountIdEndpointMode === "function") {
|
|
13347
|
-
const endpointV2 =
|
|
13359
|
+
const endpointV2 = context3.endpointV2;
|
|
13348
13360
|
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
|
|
13349
|
-
core$1.setFeature(
|
|
13361
|
+
core$1.setFeature(context3, "ACCOUNT_ID_ENDPOINT", "O");
|
|
13350
13362
|
}
|
|
13351
13363
|
switch (await config.accountIdEndpointMode?.()) {
|
|
13352
13364
|
case "disabled":
|
|
13353
|
-
core$1.setFeature(
|
|
13365
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
13354
13366
|
break;
|
|
13355
13367
|
case "preferred":
|
|
13356
|
-
core$1.setFeature(
|
|
13368
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
13357
13369
|
break;
|
|
13358
13370
|
case "required":
|
|
13359
|
-
core$1.setFeature(
|
|
13371
|
+
core$1.setFeature(context3, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
13360
13372
|
break;
|
|
13361
13373
|
}
|
|
13362
13374
|
}
|
|
13363
|
-
const identity2 =
|
|
13375
|
+
const identity2 = context3.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
13364
13376
|
if (identity2?.$source) {
|
|
13365
13377
|
const credentials = identity2;
|
|
13366
13378
|
if (credentials.accountId) {
|
|
13367
|
-
core$1.setFeature(
|
|
13379
|
+
core$1.setFeature(context3, "RESOLVED_ACCOUNT_ID", "T");
|
|
13368
13380
|
}
|
|
13369
13381
|
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
|
|
13370
|
-
core$1.setFeature(
|
|
13382
|
+
core$1.setFeature(context3, key, value);
|
|
13371
13383
|
}
|
|
13372
13384
|
}
|
|
13373
13385
|
}
|
|
@@ -13395,17 +13407,17 @@ var require_dist_cjs29 = __commonJS({
|
|
|
13395
13407
|
}
|
|
13396
13408
|
return buffer;
|
|
13397
13409
|
}
|
|
13398
|
-
var userAgentMiddleware = (options) => (next,
|
|
13410
|
+
var userAgentMiddleware = (options) => (next, context3) => async (args) => {
|
|
13399
13411
|
const { request } = args;
|
|
13400
13412
|
if (!protocolHttp.HttpRequest.isInstance(request)) {
|
|
13401
13413
|
return next(args);
|
|
13402
13414
|
}
|
|
13403
13415
|
const { headers } = request;
|
|
13404
|
-
const userAgent =
|
|
13416
|
+
const userAgent = context3?.userAgent?.map(escapeUserAgent) || [];
|
|
13405
13417
|
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
|
|
13406
|
-
await checkFeatures(
|
|
13407
|
-
const awsContext =
|
|
13408
|
-
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({},
|
|
13418
|
+
await checkFeatures(context3, options, args);
|
|
13419
|
+
const awsContext = context3;
|
|
13420
|
+
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context3.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
|
|
13409
13421
|
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
|
|
13410
13422
|
const appId = await options.userAgentAppId();
|
|
13411
13423
|
if (appId) {
|
|
@@ -14737,7 +14749,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
14737
14749
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
14738
14750
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
14739
14751
|
}
|
|
14740
|
-
async handle(next, args,
|
|
14752
|
+
async handle(next, args, context3 = {}) {
|
|
14741
14753
|
const request = args.request;
|
|
14742
14754
|
const { body: payload2, headers, query: query2 } = request;
|
|
14743
14755
|
if (!(payload2 instanceof ReadableStream)) {
|
|
@@ -15721,7 +15733,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15721
15733
|
}
|
|
15722
15734
|
return urlParser.parseUrl(endpoint);
|
|
15723
15735
|
};
|
|
15724
|
-
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig,
|
|
15736
|
+
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context3) => {
|
|
15725
15737
|
if (!clientConfig.isCustomEndpoint) {
|
|
15726
15738
|
let endpointFromConfig;
|
|
15727
15739
|
if (clientConfig.serviceConfiguredEndpoint) {
|
|
@@ -15738,7 +15750,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15738
15750
|
if (typeof clientConfig.endpointProvider !== "function") {
|
|
15739
15751
|
throw new Error("config.endpointProvider is not set.");
|
|
15740
15752
|
}
|
|
15741
|
-
const endpoint = clientConfig.endpointProvider(endpointParams,
|
|
15753
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context3);
|
|
15742
15754
|
return endpoint;
|
|
15743
15755
|
};
|
|
15744
15756
|
var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
@@ -15772,22 +15784,22 @@ var require_dist_cjs44 = __commonJS({
|
|
|
15772
15784
|
return endpointParams;
|
|
15773
15785
|
};
|
|
15774
15786
|
var endpointMiddleware = ({ config, instructions }) => {
|
|
15775
|
-
return (next,
|
|
15787
|
+
return (next, context3) => async (args) => {
|
|
15776
15788
|
if (config.isCustomEndpoint) {
|
|
15777
|
-
core.setFeature(
|
|
15789
|
+
core.setFeature(context3, "ENDPOINT_OVERRIDE", "N");
|
|
15778
15790
|
}
|
|
15779
15791
|
const endpoint = await getEndpointFromInstructions(args.input, {
|
|
15780
15792
|
getEndpointParameterInstructions() {
|
|
15781
15793
|
return instructions;
|
|
15782
15794
|
}
|
|
15783
|
-
}, { ...config },
|
|
15784
|
-
|
|
15785
|
-
|
|
15786
|
-
const authScheme =
|
|
15795
|
+
}, { ...config }, context3);
|
|
15796
|
+
context3.endpointV2 = endpoint;
|
|
15797
|
+
context3.authSchemes = endpoint.properties?.authSchemes;
|
|
15798
|
+
const authScheme = context3.authSchemes?.[0];
|
|
15787
15799
|
if (authScheme) {
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
const smithyContext = utilMiddleware.getSmithyContext(
|
|
15800
|
+
context3["signing_region"] = authScheme.signingRegion;
|
|
15801
|
+
context3["signing_service"] = authScheme.signingName;
|
|
15802
|
+
const smithyContext = utilMiddleware.getSmithyContext(context3);
|
|
15791
15803
|
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
15792
15804
|
if (httpAuthOption) {
|
|
15793
15805
|
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
@@ -16436,12 +16448,12 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16436
16448
|
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
16437
16449
|
}
|
|
16438
16450
|
});
|
|
16439
|
-
var retryMiddleware = (options) => (next,
|
|
16451
|
+
var retryMiddleware = (options) => (next, context3) => async (args) => {
|
|
16440
16452
|
let retryStrategy = await options.retryStrategy();
|
|
16441
16453
|
const maxAttempts = await options.maxAttempts();
|
|
16442
16454
|
if (isRetryStrategyV2(retryStrategy)) {
|
|
16443
16455
|
retryStrategy = retryStrategy;
|
|
16444
|
-
let retryToken = await retryStrategy.acquireInitialRetryToken(
|
|
16456
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context3["partition_id"]);
|
|
16445
16457
|
let lastError = new Error();
|
|
16446
16458
|
let attempts = 0;
|
|
16447
16459
|
let totalRetryDelay = 0;
|
|
@@ -16464,7 +16476,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16464
16476
|
const retryErrorInfo = getRetryErrorInfo(e3);
|
|
16465
16477
|
lastError = asSdkError(e3);
|
|
16466
16478
|
if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
|
|
16467
|
-
(
|
|
16479
|
+
(context3.logger instanceof smithyClient.NoOpLogger ? console : context3.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
16468
16480
|
throw lastError;
|
|
16469
16481
|
}
|
|
16470
16482
|
try {
|
|
@@ -16486,7 +16498,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
16486
16498
|
} else {
|
|
16487
16499
|
retryStrategy = retryStrategy;
|
|
16488
16500
|
if (retryStrategy?.mode)
|
|
16489
|
-
|
|
16501
|
+
context3.userAgent = [...context3.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
|
|
16490
16502
|
return retryStrategy.retry(next, args);
|
|
16491
16503
|
}
|
|
16492
16504
|
};
|
|
@@ -16566,9 +16578,9 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16566
16578
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
16567
16579
|
var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
16568
16580
|
var util_middleware_1 = require_dist_cjs7();
|
|
16569
|
-
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config,
|
|
16581
|
+
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
16570
16582
|
return {
|
|
16571
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
16583
|
+
operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
|
|
16572
16584
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
16573
16585
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
16574
16586
|
})()
|
|
@@ -16582,10 +16594,10 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16582
16594
|
name: "bedrock",
|
|
16583
16595
|
region: authParameters.region
|
|
16584
16596
|
},
|
|
16585
|
-
propertiesExtractor: (config,
|
|
16597
|
+
propertiesExtractor: (config, context3) => ({
|
|
16586
16598
|
signingProperties: {
|
|
16587
16599
|
config,
|
|
16588
|
-
context
|
|
16600
|
+
context: context3
|
|
16589
16601
|
}
|
|
16590
16602
|
})
|
|
16591
16603
|
};
|
|
@@ -16593,7 +16605,7 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
16593
16605
|
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
16594
16606
|
return {
|
|
16595
16607
|
schemeId: "smithy.api#httpBearerAuth",
|
|
16596
|
-
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache },
|
|
16608
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context3) => ({
|
|
16597
16609
|
identityProperties: {
|
|
16598
16610
|
profile,
|
|
16599
16611
|
filepath,
|
|
@@ -17339,10 +17351,10 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
17339
17351
|
name: "sso-oauth",
|
|
17340
17352
|
region: authParameters.region
|
|
17341
17353
|
},
|
|
17342
|
-
propertiesExtractor: (config,
|
|
17354
|
+
propertiesExtractor: (config, context3) => ({
|
|
17343
17355
|
signingProperties: {
|
|
17344
17356
|
config,
|
|
17345
|
-
context
|
|
17357
|
+
context: context3
|
|
17346
17358
|
}
|
|
17347
17359
|
})
|
|
17348
17360
|
};
|
|
@@ -17357,9 +17369,9 @@ var init_httpAuthSchemeProvider = __esm({
|
|
|
17357
17369
|
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
|
|
17358
17370
|
init_dist_es2();
|
|
17359
17371
|
import_util_middleware6 = __toESM(require_dist_cjs7());
|
|
17360
|
-
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config,
|
|
17372
|
+
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
17361
17373
|
return {
|
|
17362
|
-
operation: (0, import_util_middleware6.getSmithyContext)(
|
|
17374
|
+
operation: (0, import_util_middleware6.getSmithyContext)(context3).operation,
|
|
17363
17375
|
region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => {
|
|
17364
17376
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
17365
17377
|
})()
|
|
@@ -17705,10 +17717,10 @@ var init_endpointResolver = __esm({
|
|
|
17705
17717
|
size: 50,
|
|
17706
17718
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
17707
17719
|
});
|
|
17708
|
-
defaultEndpointResolver = (endpointParams,
|
|
17720
|
+
defaultEndpointResolver = (endpointParams, context3 = {}) => {
|
|
17709
17721
|
return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, {
|
|
17710
17722
|
endpointParams,
|
|
17711
|
-
logger:
|
|
17723
|
+
logger: context3.logger
|
|
17712
17724
|
}));
|
|
17713
17725
|
};
|
|
17714
17726
|
import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions;
|
|
@@ -18318,8 +18330,8 @@ var init_Aws_restJson1 = __esm({
|
|
|
18318
18330
|
import_smithy_client14 = __toESM(require_dist_cjs27());
|
|
18319
18331
|
init_models_0();
|
|
18320
18332
|
init_SSOOIDCServiceException();
|
|
18321
|
-
se_CreateTokenCommand = async (input,
|
|
18322
|
-
const b3 = requestBuilder(input,
|
|
18333
|
+
se_CreateTokenCommand = async (input, context3) => {
|
|
18334
|
+
const b3 = requestBuilder(input, context3);
|
|
18323
18335
|
const headers = {
|
|
18324
18336
|
"content-type": "application/json"
|
|
18325
18337
|
};
|
|
@@ -18339,14 +18351,14 @@ var init_Aws_restJson1 = __esm({
|
|
|
18339
18351
|
b3.m("POST").h(headers).b(body);
|
|
18340
18352
|
return b3.build();
|
|
18341
18353
|
};
|
|
18342
|
-
de_CreateTokenCommand = async (output,
|
|
18354
|
+
de_CreateTokenCommand = async (output, context3) => {
|
|
18343
18355
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
18344
|
-
return de_CommandError(output,
|
|
18356
|
+
return de_CommandError(output, context3);
|
|
18345
18357
|
}
|
|
18346
18358
|
const contents = (0, import_smithy_client14.map)({
|
|
18347
18359
|
$metadata: deserializeMetadata(output)
|
|
18348
18360
|
});
|
|
18349
|
-
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body,
|
|
18361
|
+
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context3)), "body");
|
|
18350
18362
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
18351
18363
|
accessToken: import_smithy_client14.expectString,
|
|
18352
18364
|
expiresIn: import_smithy_client14.expectInt32,
|
|
@@ -18357,46 +18369,46 @@ var init_Aws_restJson1 = __esm({
|
|
|
18357
18369
|
Object.assign(contents, doc);
|
|
18358
18370
|
return contents;
|
|
18359
18371
|
};
|
|
18360
|
-
de_CommandError = async (output,
|
|
18372
|
+
de_CommandError = async (output, context3) => {
|
|
18361
18373
|
const parsedOutput = {
|
|
18362
18374
|
...output,
|
|
18363
|
-
body: await parseJsonErrorBody(output.body,
|
|
18375
|
+
body: await parseJsonErrorBody(output.body, context3)
|
|
18364
18376
|
};
|
|
18365
18377
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
18366
18378
|
switch (errorCode) {
|
|
18367
18379
|
case "AccessDeniedException":
|
|
18368
18380
|
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
18369
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput,
|
|
18381
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context3);
|
|
18370
18382
|
case "AuthorizationPendingException":
|
|
18371
18383
|
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
18372
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput,
|
|
18384
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context3);
|
|
18373
18385
|
case "ExpiredTokenException":
|
|
18374
18386
|
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
18375
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput,
|
|
18387
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context3);
|
|
18376
18388
|
case "InternalServerException":
|
|
18377
18389
|
case "com.amazonaws.ssooidc#InternalServerException":
|
|
18378
|
-
throw await de_InternalServerExceptionRes(parsedOutput,
|
|
18390
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context3);
|
|
18379
18391
|
case "InvalidClientException":
|
|
18380
18392
|
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
18381
|
-
throw await de_InvalidClientExceptionRes(parsedOutput,
|
|
18393
|
+
throw await de_InvalidClientExceptionRes(parsedOutput, context3);
|
|
18382
18394
|
case "InvalidGrantException":
|
|
18383
18395
|
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
18384
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput,
|
|
18396
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput, context3);
|
|
18385
18397
|
case "InvalidRequestException":
|
|
18386
18398
|
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
18387
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput,
|
|
18399
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context3);
|
|
18388
18400
|
case "InvalidScopeException":
|
|
18389
18401
|
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
18390
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput,
|
|
18402
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context3);
|
|
18391
18403
|
case "SlowDownException":
|
|
18392
18404
|
case "com.amazonaws.ssooidc#SlowDownException":
|
|
18393
|
-
throw await de_SlowDownExceptionRes(parsedOutput,
|
|
18405
|
+
throw await de_SlowDownExceptionRes(parsedOutput, context3);
|
|
18394
18406
|
case "UnauthorizedClientException":
|
|
18395
18407
|
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
18396
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput,
|
|
18408
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context3);
|
|
18397
18409
|
case "UnsupportedGrantTypeException":
|
|
18398
18410
|
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
18399
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput,
|
|
18411
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context3);
|
|
18400
18412
|
default:
|
|
18401
18413
|
const parsedBody = parsedOutput.body;
|
|
18402
18414
|
return throwDefaultError({
|
|
@@ -18407,7 +18419,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18407
18419
|
}
|
|
18408
18420
|
};
|
|
18409
18421
|
throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException);
|
|
18410
|
-
de_AccessDeniedExceptionRes = async (parsedOutput,
|
|
18422
|
+
de_AccessDeniedExceptionRes = async (parsedOutput, context3) => {
|
|
18411
18423
|
const contents = (0, import_smithy_client14.map)({});
|
|
18412
18424
|
const data2 = parsedOutput.body;
|
|
18413
18425
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18422,7 +18434,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18422
18434
|
});
|
|
18423
18435
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18424
18436
|
};
|
|
18425
|
-
de_AuthorizationPendingExceptionRes = async (parsedOutput,
|
|
18437
|
+
de_AuthorizationPendingExceptionRes = async (parsedOutput, context3) => {
|
|
18426
18438
|
const contents = (0, import_smithy_client14.map)({});
|
|
18427
18439
|
const data2 = parsedOutput.body;
|
|
18428
18440
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18436,7 +18448,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18436
18448
|
});
|
|
18437
18449
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18438
18450
|
};
|
|
18439
|
-
de_ExpiredTokenExceptionRes = async (parsedOutput,
|
|
18451
|
+
de_ExpiredTokenExceptionRes = async (parsedOutput, context3) => {
|
|
18440
18452
|
const contents = (0, import_smithy_client14.map)({});
|
|
18441
18453
|
const data2 = parsedOutput.body;
|
|
18442
18454
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18450,7 +18462,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18450
18462
|
});
|
|
18451
18463
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18452
18464
|
};
|
|
18453
|
-
de_InternalServerExceptionRes = async (parsedOutput,
|
|
18465
|
+
de_InternalServerExceptionRes = async (parsedOutput, context3) => {
|
|
18454
18466
|
const contents = (0, import_smithy_client14.map)({});
|
|
18455
18467
|
const data2 = parsedOutput.body;
|
|
18456
18468
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18464,7 +18476,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18464
18476
|
});
|
|
18465
18477
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18466
18478
|
};
|
|
18467
|
-
de_InvalidClientExceptionRes = async (parsedOutput,
|
|
18479
|
+
de_InvalidClientExceptionRes = async (parsedOutput, context3) => {
|
|
18468
18480
|
const contents = (0, import_smithy_client14.map)({});
|
|
18469
18481
|
const data2 = parsedOutput.body;
|
|
18470
18482
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18478,7 +18490,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18478
18490
|
});
|
|
18479
18491
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18480
18492
|
};
|
|
18481
|
-
de_InvalidGrantExceptionRes = async (parsedOutput,
|
|
18493
|
+
de_InvalidGrantExceptionRes = async (parsedOutput, context3) => {
|
|
18482
18494
|
const contents = (0, import_smithy_client14.map)({});
|
|
18483
18495
|
const data2 = parsedOutput.body;
|
|
18484
18496
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18492,7 +18504,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18492
18504
|
});
|
|
18493
18505
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18494
18506
|
};
|
|
18495
|
-
de_InvalidRequestExceptionRes = async (parsedOutput,
|
|
18507
|
+
de_InvalidRequestExceptionRes = async (parsedOutput, context3) => {
|
|
18496
18508
|
const contents = (0, import_smithy_client14.map)({});
|
|
18497
18509
|
const data2 = parsedOutput.body;
|
|
18498
18510
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18507,7 +18519,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18507
18519
|
});
|
|
18508
18520
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18509
18521
|
};
|
|
18510
|
-
de_InvalidScopeExceptionRes = async (parsedOutput,
|
|
18522
|
+
de_InvalidScopeExceptionRes = async (parsedOutput, context3) => {
|
|
18511
18523
|
const contents = (0, import_smithy_client14.map)({});
|
|
18512
18524
|
const data2 = parsedOutput.body;
|
|
18513
18525
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18521,7 +18533,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18521
18533
|
});
|
|
18522
18534
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18523
18535
|
};
|
|
18524
|
-
de_SlowDownExceptionRes = async (parsedOutput,
|
|
18536
|
+
de_SlowDownExceptionRes = async (parsedOutput, context3) => {
|
|
18525
18537
|
const contents = (0, import_smithy_client14.map)({});
|
|
18526
18538
|
const data2 = parsedOutput.body;
|
|
18527
18539
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18535,7 +18547,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18535
18547
|
});
|
|
18536
18548
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18537
18549
|
};
|
|
18538
|
-
de_UnauthorizedClientExceptionRes = async (parsedOutput,
|
|
18550
|
+
de_UnauthorizedClientExceptionRes = async (parsedOutput, context3) => {
|
|
18539
18551
|
const contents = (0, import_smithy_client14.map)({});
|
|
18540
18552
|
const data2 = parsedOutput.body;
|
|
18541
18553
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18549,7 +18561,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
18549
18561
|
});
|
|
18550
18562
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
18551
18563
|
};
|
|
18552
|
-
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput,
|
|
18564
|
+
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context3) => {
|
|
18553
18565
|
const contents = (0, import_smithy_client14.map)({});
|
|
18554
18566
|
const data2 = parsedOutput.body;
|
|
18555
18567
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -18817,9 +18829,9 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
18817
18829
|
exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0;
|
|
18818
18830
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
18819
18831
|
var util_middleware_1 = require_dist_cjs7();
|
|
18820
|
-
var defaultSSOHttpAuthSchemeParametersProvider = async (config,
|
|
18832
|
+
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
18821
18833
|
return {
|
|
18822
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
18834
|
+
operation: (0, util_middleware_1.getSmithyContext)(context3).operation,
|
|
18823
18835
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
18824
18836
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
18825
18837
|
})()
|
|
@@ -18833,10 +18845,10 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
18833
18845
|
name: "awsssoportal",
|
|
18834
18846
|
region: authParameters.region
|
|
18835
18847
|
},
|
|
18836
|
-
propertiesExtractor: (config,
|
|
18848
|
+
propertiesExtractor: (config, context3) => ({
|
|
18837
18849
|
signingProperties: {
|
|
18838
18850
|
config,
|
|
18839
|
-
context
|
|
18851
|
+
context: context3
|
|
18840
18852
|
}
|
|
18841
18853
|
})
|
|
18842
18854
|
};
|
|
@@ -19034,10 +19046,10 @@ var require_endpointResolver = __commonJS({
|
|
|
19034
19046
|
size: 50,
|
|
19035
19047
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
19036
19048
|
});
|
|
19037
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
19049
|
+
var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
|
|
19038
19050
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
19039
19051
|
endpointParams,
|
|
19040
|
-
logger:
|
|
19052
|
+
logger: context3.logger
|
|
19041
19053
|
}));
|
|
19042
19054
|
};
|
|
19043
19055
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -19335,8 +19347,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19335
19347
|
...obj,
|
|
19336
19348
|
...obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }
|
|
19337
19349
|
});
|
|
19338
|
-
var se_GetRoleCredentialsCommand = async (input,
|
|
19339
|
-
const b3 = core.requestBuilder(input,
|
|
19350
|
+
var se_GetRoleCredentialsCommand = async (input, context3) => {
|
|
19351
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19340
19352
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19341
19353
|
[_xasbt]: input[_aT]
|
|
19342
19354
|
});
|
|
@@ -19349,8 +19361,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19349
19361
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19350
19362
|
return b3.build();
|
|
19351
19363
|
};
|
|
19352
|
-
var se_ListAccountRolesCommand = async (input,
|
|
19353
|
-
const b3 = core.requestBuilder(input,
|
|
19364
|
+
var se_ListAccountRolesCommand = async (input, context3) => {
|
|
19365
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19354
19366
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19355
19367
|
[_xasbt]: input[_aT]
|
|
19356
19368
|
});
|
|
@@ -19364,8 +19376,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19364
19376
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19365
19377
|
return b3.build();
|
|
19366
19378
|
};
|
|
19367
|
-
var se_ListAccountsCommand = async (input,
|
|
19368
|
-
const b3 = core.requestBuilder(input,
|
|
19379
|
+
var se_ListAccountsCommand = async (input, context3) => {
|
|
19380
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19369
19381
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19370
19382
|
[_xasbt]: input[_aT]
|
|
19371
19383
|
});
|
|
@@ -19378,8 +19390,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19378
19390
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
19379
19391
|
return b3.build();
|
|
19380
19392
|
};
|
|
19381
|
-
var se_LogoutCommand = async (input,
|
|
19382
|
-
const b3 = core.requestBuilder(input,
|
|
19393
|
+
var se_LogoutCommand = async (input, context3) => {
|
|
19394
|
+
const b3 = core.requestBuilder(input, context3);
|
|
19383
19395
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
19384
19396
|
[_xasbt]: input[_aT]
|
|
19385
19397
|
});
|
|
@@ -19388,28 +19400,28 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19388
19400
|
b3.m("POST").h(headers).b(body);
|
|
19389
19401
|
return b3.build();
|
|
19390
19402
|
};
|
|
19391
|
-
var de_GetRoleCredentialsCommand = async (output,
|
|
19403
|
+
var de_GetRoleCredentialsCommand = async (output, context3) => {
|
|
19392
19404
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19393
|
-
return de_CommandError3(output,
|
|
19405
|
+
return de_CommandError3(output, context3);
|
|
19394
19406
|
}
|
|
19395
19407
|
const contents = smithyClient.map({
|
|
19396
19408
|
$metadata: deserializeMetadata3(output)
|
|
19397
19409
|
});
|
|
19398
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19410
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19399
19411
|
const doc = smithyClient.take(data2, {
|
|
19400
19412
|
roleCredentials: smithyClient._json
|
|
19401
19413
|
});
|
|
19402
19414
|
Object.assign(contents, doc);
|
|
19403
19415
|
return contents;
|
|
19404
19416
|
};
|
|
19405
|
-
var de_ListAccountRolesCommand = async (output,
|
|
19417
|
+
var de_ListAccountRolesCommand = async (output, context3) => {
|
|
19406
19418
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19407
|
-
return de_CommandError3(output,
|
|
19419
|
+
return de_CommandError3(output, context3);
|
|
19408
19420
|
}
|
|
19409
19421
|
const contents = smithyClient.map({
|
|
19410
19422
|
$metadata: deserializeMetadata3(output)
|
|
19411
19423
|
});
|
|
19412
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19424
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19413
19425
|
const doc = smithyClient.take(data2, {
|
|
19414
19426
|
nextToken: smithyClient.expectString,
|
|
19415
19427
|
roleList: smithyClient._json
|
|
@@ -19417,14 +19429,14 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19417
19429
|
Object.assign(contents, doc);
|
|
19418
19430
|
return contents;
|
|
19419
19431
|
};
|
|
19420
|
-
var de_ListAccountsCommand = async (output,
|
|
19432
|
+
var de_ListAccountsCommand = async (output, context3) => {
|
|
19421
19433
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19422
|
-
return de_CommandError3(output,
|
|
19434
|
+
return de_CommandError3(output, context3);
|
|
19423
19435
|
}
|
|
19424
19436
|
const contents = smithyClient.map({
|
|
19425
19437
|
$metadata: deserializeMetadata3(output)
|
|
19426
19438
|
});
|
|
19427
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
19439
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
19428
19440
|
const doc = smithyClient.take(data2, {
|
|
19429
19441
|
accountList: smithyClient._json,
|
|
19430
19442
|
nextToken: smithyClient.expectString
|
|
@@ -19432,20 +19444,20 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19432
19444
|
Object.assign(contents, doc);
|
|
19433
19445
|
return contents;
|
|
19434
19446
|
};
|
|
19435
|
-
var de_LogoutCommand = async (output,
|
|
19447
|
+
var de_LogoutCommand = async (output, context3) => {
|
|
19436
19448
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
19437
|
-
return de_CommandError3(output,
|
|
19449
|
+
return de_CommandError3(output, context3);
|
|
19438
19450
|
}
|
|
19439
19451
|
const contents = smithyClient.map({
|
|
19440
19452
|
$metadata: deserializeMetadata3(output)
|
|
19441
19453
|
});
|
|
19442
|
-
await smithyClient.collectBody(output.body,
|
|
19454
|
+
await smithyClient.collectBody(output.body, context3);
|
|
19443
19455
|
return contents;
|
|
19444
19456
|
};
|
|
19445
|
-
var de_CommandError3 = async (output,
|
|
19457
|
+
var de_CommandError3 = async (output, context3) => {
|
|
19446
19458
|
const parsedOutput = {
|
|
19447
19459
|
...output,
|
|
19448
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
19460
|
+
body: await core$1.parseJsonErrorBody(output.body, context3)
|
|
19449
19461
|
};
|
|
19450
19462
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
19451
19463
|
switch (errorCode) {
|
|
@@ -19471,7 +19483,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19471
19483
|
}
|
|
19472
19484
|
};
|
|
19473
19485
|
var throwDefaultError3 = smithyClient.withBaseException(SSOServiceException);
|
|
19474
|
-
var de_InvalidRequestExceptionRes2 = async (parsedOutput,
|
|
19486
|
+
var de_InvalidRequestExceptionRes2 = async (parsedOutput, context3) => {
|
|
19475
19487
|
const contents = smithyClient.map({});
|
|
19476
19488
|
const data2 = parsedOutput.body;
|
|
19477
19489
|
const doc = smithyClient.take(data2, {
|
|
@@ -19484,7 +19496,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19484
19496
|
});
|
|
19485
19497
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19486
19498
|
};
|
|
19487
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
19499
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
|
|
19488
19500
|
const contents = smithyClient.map({});
|
|
19489
19501
|
const data2 = parsedOutput.body;
|
|
19490
19502
|
const doc = smithyClient.take(data2, {
|
|
@@ -19497,7 +19509,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19497
19509
|
});
|
|
19498
19510
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19499
19511
|
};
|
|
19500
|
-
var de_TooManyRequestsExceptionRes = async (parsedOutput,
|
|
19512
|
+
var de_TooManyRequestsExceptionRes = async (parsedOutput, context3) => {
|
|
19501
19513
|
const contents = smithyClient.map({});
|
|
19502
19514
|
const data2 = parsedOutput.body;
|
|
19503
19515
|
const doc = smithyClient.take(data2, {
|
|
@@ -19510,7 +19522,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
19510
19522
|
});
|
|
19511
19523
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
19512
19524
|
};
|
|
19513
|
-
var de_UnauthorizedExceptionRes = async (parsedOutput,
|
|
19525
|
+
var de_UnauthorizedExceptionRes = async (parsedOutput, context3) => {
|
|
19514
19526
|
const contents = smithyClient.map({});
|
|
19515
19527
|
const data2 = parsedOutput.body;
|
|
19516
19528
|
const doc = smithyClient.take(data2, {
|
|
@@ -19817,10 +19829,10 @@ function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
|
|
19817
19829
|
name: "sts",
|
|
19818
19830
|
region: authParameters.region
|
|
19819
19831
|
},
|
|
19820
|
-
propertiesExtractor: (config,
|
|
19832
|
+
propertiesExtractor: (config, context3) => ({
|
|
19821
19833
|
signingProperties: {
|
|
19822
19834
|
config,
|
|
19823
|
-
context
|
|
19835
|
+
context: context3
|
|
19824
19836
|
}
|
|
19825
19837
|
})
|
|
19826
19838
|
};
|
|
@@ -19836,9 +19848,9 @@ var init_httpAuthSchemeProvider2 = __esm({
|
|
|
19836
19848
|
init_dist_es2();
|
|
19837
19849
|
import_util_middleware7 = __toESM(require_dist_cjs7());
|
|
19838
19850
|
init_STSClient();
|
|
19839
|
-
defaultSTSHttpAuthSchemeParametersProvider = async (config,
|
|
19851
|
+
defaultSTSHttpAuthSchemeParametersProvider = async (config, context3, input) => {
|
|
19840
19852
|
return {
|
|
19841
|
-
operation: (0, import_util_middleware7.getSmithyContext)(
|
|
19853
|
+
operation: (0, import_util_middleware7.getSmithyContext)(context3).operation,
|
|
19842
19854
|
region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
|
|
19843
19855
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
19844
19856
|
})()
|
|
@@ -19948,10 +19960,10 @@ var init_endpointResolver2 = __esm({
|
|
|
19948
19960
|
size: 50,
|
|
19949
19961
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
|
|
19950
19962
|
});
|
|
19951
|
-
defaultEndpointResolver2 = (endpointParams,
|
|
19963
|
+
defaultEndpointResolver2 = (endpointParams, context3 = {}) => {
|
|
19952
19964
|
return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, {
|
|
19953
19965
|
endpointParams,
|
|
19954
|
-
logger:
|
|
19966
|
+
logger: context3.logger
|
|
19955
19967
|
}));
|
|
19956
19968
|
};
|
|
19957
19969
|
import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions;
|
|
@@ -20313,80 +20325,80 @@ var init_Aws_query = __esm({
|
|
|
20313
20325
|
import_smithy_client24 = __toESM(require_dist_cjs27());
|
|
20314
20326
|
init_models_02();
|
|
20315
20327
|
init_STSServiceException();
|
|
20316
|
-
se_AssumeRoleCommand = async (input,
|
|
20328
|
+
se_AssumeRoleCommand = async (input, context3) => {
|
|
20317
20329
|
const headers = SHARED_HEADERS;
|
|
20318
20330
|
let body;
|
|
20319
20331
|
body = buildFormUrlencodedString({
|
|
20320
|
-
...se_AssumeRoleRequest(input,
|
|
20332
|
+
...se_AssumeRoleRequest(input, context3),
|
|
20321
20333
|
[_A]: _AR,
|
|
20322
20334
|
[_V]: _
|
|
20323
20335
|
});
|
|
20324
|
-
return buildHttpRpcRequest(
|
|
20336
|
+
return buildHttpRpcRequest(context3, headers, "/", void 0, body);
|
|
20325
20337
|
};
|
|
20326
|
-
se_AssumeRoleWithWebIdentityCommand = async (input,
|
|
20338
|
+
se_AssumeRoleWithWebIdentityCommand = async (input, context3) => {
|
|
20327
20339
|
const headers = SHARED_HEADERS;
|
|
20328
20340
|
let body;
|
|
20329
20341
|
body = buildFormUrlencodedString({
|
|
20330
|
-
...se_AssumeRoleWithWebIdentityRequest(input,
|
|
20342
|
+
...se_AssumeRoleWithWebIdentityRequest(input, context3),
|
|
20331
20343
|
[_A]: _ARWWI,
|
|
20332
20344
|
[_V]: _
|
|
20333
20345
|
});
|
|
20334
|
-
return buildHttpRpcRequest(
|
|
20346
|
+
return buildHttpRpcRequest(context3, headers, "/", void 0, body);
|
|
20335
20347
|
};
|
|
20336
|
-
de_AssumeRoleCommand = async (output,
|
|
20348
|
+
de_AssumeRoleCommand = async (output, context3) => {
|
|
20337
20349
|
if (output.statusCode >= 300) {
|
|
20338
|
-
return de_CommandError2(output,
|
|
20350
|
+
return de_CommandError2(output, context3);
|
|
20339
20351
|
}
|
|
20340
|
-
const data2 = await parseXmlBody(output.body,
|
|
20352
|
+
const data2 = await parseXmlBody(output.body, context3);
|
|
20341
20353
|
let contents = {};
|
|
20342
|
-
contents = de_AssumeRoleResponse(data2.AssumeRoleResult,
|
|
20354
|
+
contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context3);
|
|
20343
20355
|
const response = {
|
|
20344
20356
|
$metadata: deserializeMetadata2(output),
|
|
20345
20357
|
...contents
|
|
20346
20358
|
};
|
|
20347
20359
|
return response;
|
|
20348
20360
|
};
|
|
20349
|
-
de_AssumeRoleWithWebIdentityCommand = async (output,
|
|
20361
|
+
de_AssumeRoleWithWebIdentityCommand = async (output, context3) => {
|
|
20350
20362
|
if (output.statusCode >= 300) {
|
|
20351
|
-
return de_CommandError2(output,
|
|
20363
|
+
return de_CommandError2(output, context3);
|
|
20352
20364
|
}
|
|
20353
|
-
const data2 = await parseXmlBody(output.body,
|
|
20365
|
+
const data2 = await parseXmlBody(output.body, context3);
|
|
20354
20366
|
let contents = {};
|
|
20355
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult,
|
|
20367
|
+
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context3);
|
|
20356
20368
|
const response = {
|
|
20357
20369
|
$metadata: deserializeMetadata2(output),
|
|
20358
20370
|
...contents
|
|
20359
20371
|
};
|
|
20360
20372
|
return response;
|
|
20361
20373
|
};
|
|
20362
|
-
de_CommandError2 = async (output,
|
|
20374
|
+
de_CommandError2 = async (output, context3) => {
|
|
20363
20375
|
const parsedOutput = {
|
|
20364
20376
|
...output,
|
|
20365
|
-
body: await parseXmlErrorBody(output.body,
|
|
20377
|
+
body: await parseXmlErrorBody(output.body, context3)
|
|
20366
20378
|
};
|
|
20367
20379
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
20368
20380
|
switch (errorCode) {
|
|
20369
20381
|
case "ExpiredTokenException":
|
|
20370
20382
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
20371
|
-
throw await de_ExpiredTokenExceptionRes2(parsedOutput,
|
|
20383
|
+
throw await de_ExpiredTokenExceptionRes2(parsedOutput, context3);
|
|
20372
20384
|
case "MalformedPolicyDocument":
|
|
20373
20385
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
20374
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput,
|
|
20386
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context3);
|
|
20375
20387
|
case "PackedPolicyTooLarge":
|
|
20376
20388
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
20377
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput,
|
|
20389
|
+
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context3);
|
|
20378
20390
|
case "RegionDisabledException":
|
|
20379
20391
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
20380
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput,
|
|
20392
|
+
throw await de_RegionDisabledExceptionRes(parsedOutput, context3);
|
|
20381
20393
|
case "IDPCommunicationError":
|
|
20382
20394
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
20383
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput,
|
|
20395
|
+
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context3);
|
|
20384
20396
|
case "IDPRejectedClaim":
|
|
20385
20397
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
20386
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput,
|
|
20398
|
+
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context3);
|
|
20387
20399
|
case "InvalidIdentityToken":
|
|
20388
20400
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
20389
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput,
|
|
20401
|
+
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context3);
|
|
20390
20402
|
default:
|
|
20391
20403
|
const parsedBody = parsedOutput.body;
|
|
20392
20404
|
return throwDefaultError2({
|
|
@@ -20396,70 +20408,70 @@ var init_Aws_query = __esm({
|
|
|
20396
20408
|
});
|
|
20397
20409
|
}
|
|
20398
20410
|
};
|
|
20399
|
-
de_ExpiredTokenExceptionRes2 = async (parsedOutput,
|
|
20411
|
+
de_ExpiredTokenExceptionRes2 = async (parsedOutput, context3) => {
|
|
20400
20412
|
const body = parsedOutput.body;
|
|
20401
|
-
const deserialized = de_ExpiredTokenException(body.Error,
|
|
20413
|
+
const deserialized = de_ExpiredTokenException(body.Error, context3);
|
|
20402
20414
|
const exception = new ExpiredTokenException2({
|
|
20403
20415
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20404
20416
|
...deserialized
|
|
20405
20417
|
});
|
|
20406
20418
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20407
20419
|
};
|
|
20408
|
-
de_IDPCommunicationErrorExceptionRes = async (parsedOutput,
|
|
20420
|
+
de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context3) => {
|
|
20409
20421
|
const body = parsedOutput.body;
|
|
20410
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error,
|
|
20422
|
+
const deserialized = de_IDPCommunicationErrorException(body.Error, context3);
|
|
20411
20423
|
const exception = new IDPCommunicationErrorException({
|
|
20412
20424
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20413
20425
|
...deserialized
|
|
20414
20426
|
});
|
|
20415
20427
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20416
20428
|
};
|
|
20417
|
-
de_IDPRejectedClaimExceptionRes = async (parsedOutput,
|
|
20429
|
+
de_IDPRejectedClaimExceptionRes = async (parsedOutput, context3) => {
|
|
20418
20430
|
const body = parsedOutput.body;
|
|
20419
|
-
const deserialized = de_IDPRejectedClaimException(body.Error,
|
|
20431
|
+
const deserialized = de_IDPRejectedClaimException(body.Error, context3);
|
|
20420
20432
|
const exception = new IDPRejectedClaimException({
|
|
20421
20433
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20422
20434
|
...deserialized
|
|
20423
20435
|
});
|
|
20424
20436
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20425
20437
|
};
|
|
20426
|
-
de_InvalidIdentityTokenExceptionRes = async (parsedOutput,
|
|
20438
|
+
de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context3) => {
|
|
20427
20439
|
const body = parsedOutput.body;
|
|
20428
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error,
|
|
20440
|
+
const deserialized = de_InvalidIdentityTokenException(body.Error, context3);
|
|
20429
20441
|
const exception = new InvalidIdentityTokenException({
|
|
20430
20442
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20431
20443
|
...deserialized
|
|
20432
20444
|
});
|
|
20433
20445
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20434
20446
|
};
|
|
20435
|
-
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput,
|
|
20447
|
+
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context3) => {
|
|
20436
20448
|
const body = parsedOutput.body;
|
|
20437
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error,
|
|
20449
|
+
const deserialized = de_MalformedPolicyDocumentException(body.Error, context3);
|
|
20438
20450
|
const exception = new MalformedPolicyDocumentException({
|
|
20439
20451
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20440
20452
|
...deserialized
|
|
20441
20453
|
});
|
|
20442
20454
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20443
20455
|
};
|
|
20444
|
-
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput,
|
|
20456
|
+
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context3) => {
|
|
20445
20457
|
const body = parsedOutput.body;
|
|
20446
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error,
|
|
20458
|
+
const deserialized = de_PackedPolicyTooLargeException(body.Error, context3);
|
|
20447
20459
|
const exception = new PackedPolicyTooLargeException({
|
|
20448
20460
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20449
20461
|
...deserialized
|
|
20450
20462
|
});
|
|
20451
20463
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20452
20464
|
};
|
|
20453
|
-
de_RegionDisabledExceptionRes = async (parsedOutput,
|
|
20465
|
+
de_RegionDisabledExceptionRes = async (parsedOutput, context3) => {
|
|
20454
20466
|
const body = parsedOutput.body;
|
|
20455
|
-
const deserialized = de_RegionDisabledException(body.Error,
|
|
20467
|
+
const deserialized = de_RegionDisabledException(body.Error, context3);
|
|
20456
20468
|
const exception = new RegionDisabledException({
|
|
20457
20469
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
20458
20470
|
...deserialized
|
|
20459
20471
|
});
|
|
20460
20472
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
20461
20473
|
};
|
|
20462
|
-
se_AssumeRoleRequest = (input,
|
|
20474
|
+
se_AssumeRoleRequest = (input, context3) => {
|
|
20463
20475
|
const entries = {};
|
|
20464
20476
|
if (input[_RA] != null) {
|
|
20465
20477
|
entries[_RA] = input[_RA];
|
|
@@ -20468,7 +20480,7 @@ var init_Aws_query = __esm({
|
|
|
20468
20480
|
entries[_RSN] = input[_RSN];
|
|
20469
20481
|
}
|
|
20470
20482
|
if (input[_PA] != null) {
|
|
20471
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20483
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context3);
|
|
20472
20484
|
if (input[_PA]?.length === 0) {
|
|
20473
20485
|
entries.PolicyArns = [];
|
|
20474
20486
|
}
|
|
@@ -20484,7 +20496,7 @@ var init_Aws_query = __esm({
|
|
|
20484
20496
|
entries[_DS] = input[_DS];
|
|
20485
20497
|
}
|
|
20486
20498
|
if (input[_T] != null) {
|
|
20487
|
-
const memberEntries = se_tagListType(input[_T],
|
|
20499
|
+
const memberEntries = se_tagListType(input[_T], context3);
|
|
20488
20500
|
if (input[_T]?.length === 0) {
|
|
20489
20501
|
entries.Tags = [];
|
|
20490
20502
|
}
|
|
@@ -20494,7 +20506,7 @@ var init_Aws_query = __esm({
|
|
|
20494
20506
|
});
|
|
20495
20507
|
}
|
|
20496
20508
|
if (input[_TTK] != null) {
|
|
20497
|
-
const memberEntries = se_tagKeyListType(input[_TTK],
|
|
20509
|
+
const memberEntries = se_tagKeyListType(input[_TTK], context3);
|
|
20498
20510
|
if (input[_TTK]?.length === 0) {
|
|
20499
20511
|
entries.TransitiveTagKeys = [];
|
|
20500
20512
|
}
|
|
@@ -20516,7 +20528,7 @@ var init_Aws_query = __esm({
|
|
|
20516
20528
|
entries[_SI] = input[_SI];
|
|
20517
20529
|
}
|
|
20518
20530
|
if (input[_PC] != null) {
|
|
20519
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC],
|
|
20531
|
+
const memberEntries = se_ProvidedContextsListType(input[_PC], context3);
|
|
20520
20532
|
if (input[_PC]?.length === 0) {
|
|
20521
20533
|
entries.ProvidedContexts = [];
|
|
20522
20534
|
}
|
|
@@ -20527,7 +20539,7 @@ var init_Aws_query = __esm({
|
|
|
20527
20539
|
}
|
|
20528
20540
|
return entries;
|
|
20529
20541
|
};
|
|
20530
|
-
se_AssumeRoleWithWebIdentityRequest = (input,
|
|
20542
|
+
se_AssumeRoleWithWebIdentityRequest = (input, context3) => {
|
|
20531
20543
|
const entries = {};
|
|
20532
20544
|
if (input[_RA] != null) {
|
|
20533
20545
|
entries[_RA] = input[_RA];
|
|
@@ -20542,7 +20554,7 @@ var init_Aws_query = __esm({
|
|
|
20542
20554
|
entries[_PI] = input[_PI];
|
|
20543
20555
|
}
|
|
20544
20556
|
if (input[_PA] != null) {
|
|
20545
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
20557
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context3);
|
|
20546
20558
|
if (input[_PA]?.length === 0) {
|
|
20547
20559
|
entries.PolicyArns = [];
|
|
20548
20560
|
}
|
|
@@ -20559,14 +20571,14 @@ var init_Aws_query = __esm({
|
|
|
20559
20571
|
}
|
|
20560
20572
|
return entries;
|
|
20561
20573
|
};
|
|
20562
|
-
se_policyDescriptorListType = (input,
|
|
20574
|
+
se_policyDescriptorListType = (input, context3) => {
|
|
20563
20575
|
const entries = {};
|
|
20564
20576
|
let counter = 1;
|
|
20565
20577
|
for (const entry of input) {
|
|
20566
20578
|
if (entry === null) {
|
|
20567
20579
|
continue;
|
|
20568
20580
|
}
|
|
20569
|
-
const memberEntries = se_PolicyDescriptorType(entry,
|
|
20581
|
+
const memberEntries = se_PolicyDescriptorType(entry, context3);
|
|
20570
20582
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20571
20583
|
entries[`member.${counter}.${key}`] = value;
|
|
20572
20584
|
});
|
|
@@ -20574,14 +20586,14 @@ var init_Aws_query = __esm({
|
|
|
20574
20586
|
}
|
|
20575
20587
|
return entries;
|
|
20576
20588
|
};
|
|
20577
|
-
se_PolicyDescriptorType = (input,
|
|
20589
|
+
se_PolicyDescriptorType = (input, context3) => {
|
|
20578
20590
|
const entries = {};
|
|
20579
20591
|
if (input[_a15] != null) {
|
|
20580
20592
|
entries[_a15] = input[_a15];
|
|
20581
20593
|
}
|
|
20582
20594
|
return entries;
|
|
20583
20595
|
};
|
|
20584
|
-
se_ProvidedContext = (input,
|
|
20596
|
+
se_ProvidedContext = (input, context3) => {
|
|
20585
20597
|
const entries = {};
|
|
20586
20598
|
if (input[_PAr] != null) {
|
|
20587
20599
|
entries[_PAr] = input[_PAr];
|
|
@@ -20591,14 +20603,14 @@ var init_Aws_query = __esm({
|
|
|
20591
20603
|
}
|
|
20592
20604
|
return entries;
|
|
20593
20605
|
};
|
|
20594
|
-
se_ProvidedContextsListType = (input,
|
|
20606
|
+
se_ProvidedContextsListType = (input, context3) => {
|
|
20595
20607
|
const entries = {};
|
|
20596
20608
|
let counter = 1;
|
|
20597
20609
|
for (const entry of input) {
|
|
20598
20610
|
if (entry === null) {
|
|
20599
20611
|
continue;
|
|
20600
20612
|
}
|
|
20601
|
-
const memberEntries = se_ProvidedContext(entry,
|
|
20613
|
+
const memberEntries = se_ProvidedContext(entry, context3);
|
|
20602
20614
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20603
20615
|
entries[`member.${counter}.${key}`] = value;
|
|
20604
20616
|
});
|
|
@@ -20606,7 +20618,7 @@ var init_Aws_query = __esm({
|
|
|
20606
20618
|
}
|
|
20607
20619
|
return entries;
|
|
20608
20620
|
};
|
|
20609
|
-
se_Tag = (input,
|
|
20621
|
+
se_Tag = (input, context3) => {
|
|
20610
20622
|
const entries = {};
|
|
20611
20623
|
if (input[_K] != null) {
|
|
20612
20624
|
entries[_K] = input[_K];
|
|
@@ -20616,7 +20628,7 @@ var init_Aws_query = __esm({
|
|
|
20616
20628
|
}
|
|
20617
20629
|
return entries;
|
|
20618
20630
|
};
|
|
20619
|
-
se_tagKeyListType = (input,
|
|
20631
|
+
se_tagKeyListType = (input, context3) => {
|
|
20620
20632
|
const entries = {};
|
|
20621
20633
|
let counter = 1;
|
|
20622
20634
|
for (const entry of input) {
|
|
@@ -20628,14 +20640,14 @@ var init_Aws_query = __esm({
|
|
|
20628
20640
|
}
|
|
20629
20641
|
return entries;
|
|
20630
20642
|
};
|
|
20631
|
-
se_tagListType = (input,
|
|
20643
|
+
se_tagListType = (input, context3) => {
|
|
20632
20644
|
const entries = {};
|
|
20633
20645
|
let counter = 1;
|
|
20634
20646
|
for (const entry of input) {
|
|
20635
20647
|
if (entry === null) {
|
|
20636
20648
|
continue;
|
|
20637
20649
|
}
|
|
20638
|
-
const memberEntries = se_Tag(entry,
|
|
20650
|
+
const memberEntries = se_Tag(entry, context3);
|
|
20639
20651
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
20640
20652
|
entries[`member.${counter}.${key}`] = value;
|
|
20641
20653
|
});
|
|
@@ -20643,7 +20655,7 @@ var init_Aws_query = __esm({
|
|
|
20643
20655
|
}
|
|
20644
20656
|
return entries;
|
|
20645
20657
|
};
|
|
20646
|
-
de_AssumedRoleUser = (output,
|
|
20658
|
+
de_AssumedRoleUser = (output, context3) => {
|
|
20647
20659
|
const contents = {};
|
|
20648
20660
|
if (output[_ARI] != null) {
|
|
20649
20661
|
contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]);
|
|
@@ -20653,13 +20665,13 @@ var init_Aws_query = __esm({
|
|
|
20653
20665
|
}
|
|
20654
20666
|
return contents;
|
|
20655
20667
|
};
|
|
20656
|
-
de_AssumeRoleResponse = (output,
|
|
20668
|
+
de_AssumeRoleResponse = (output, context3) => {
|
|
20657
20669
|
const contents = {};
|
|
20658
20670
|
if (output[_C] != null) {
|
|
20659
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20671
|
+
contents[_C] = de_Credentials(output[_C], context3);
|
|
20660
20672
|
}
|
|
20661
20673
|
if (output[_ARU] != null) {
|
|
20662
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20674
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
|
|
20663
20675
|
}
|
|
20664
20676
|
if (output[_PPS] != null) {
|
|
20665
20677
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20669,16 +20681,16 @@ var init_Aws_query = __esm({
|
|
|
20669
20681
|
}
|
|
20670
20682
|
return contents;
|
|
20671
20683
|
};
|
|
20672
|
-
de_AssumeRoleWithWebIdentityResponse = (output,
|
|
20684
|
+
de_AssumeRoleWithWebIdentityResponse = (output, context3) => {
|
|
20673
20685
|
const contents = {};
|
|
20674
20686
|
if (output[_C] != null) {
|
|
20675
|
-
contents[_C] = de_Credentials(output[_C],
|
|
20687
|
+
contents[_C] = de_Credentials(output[_C], context3);
|
|
20676
20688
|
}
|
|
20677
20689
|
if (output[_SFWIT] != null) {
|
|
20678
20690
|
contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]);
|
|
20679
20691
|
}
|
|
20680
20692
|
if (output[_ARU] != null) {
|
|
20681
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
20693
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context3);
|
|
20682
20694
|
}
|
|
20683
20695
|
if (output[_PPS] != null) {
|
|
20684
20696
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -20694,7 +20706,7 @@ var init_Aws_query = __esm({
|
|
|
20694
20706
|
}
|
|
20695
20707
|
return contents;
|
|
20696
20708
|
};
|
|
20697
|
-
de_Credentials = (output,
|
|
20709
|
+
de_Credentials = (output, context3) => {
|
|
20698
20710
|
const contents = {};
|
|
20699
20711
|
if (output[_AKI] != null) {
|
|
20700
20712
|
contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]);
|
|
@@ -20710,49 +20722,49 @@ var init_Aws_query = __esm({
|
|
|
20710
20722
|
}
|
|
20711
20723
|
return contents;
|
|
20712
20724
|
};
|
|
20713
|
-
de_ExpiredTokenException = (output,
|
|
20725
|
+
de_ExpiredTokenException = (output, context3) => {
|
|
20714
20726
|
const contents = {};
|
|
20715
20727
|
if (output[_m] != null) {
|
|
20716
20728
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20717
20729
|
}
|
|
20718
20730
|
return contents;
|
|
20719
20731
|
};
|
|
20720
|
-
de_IDPCommunicationErrorException = (output,
|
|
20732
|
+
de_IDPCommunicationErrorException = (output, context3) => {
|
|
20721
20733
|
const contents = {};
|
|
20722
20734
|
if (output[_m] != null) {
|
|
20723
20735
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20724
20736
|
}
|
|
20725
20737
|
return contents;
|
|
20726
20738
|
};
|
|
20727
|
-
de_IDPRejectedClaimException = (output,
|
|
20739
|
+
de_IDPRejectedClaimException = (output, context3) => {
|
|
20728
20740
|
const contents = {};
|
|
20729
20741
|
if (output[_m] != null) {
|
|
20730
20742
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20731
20743
|
}
|
|
20732
20744
|
return contents;
|
|
20733
20745
|
};
|
|
20734
|
-
de_InvalidIdentityTokenException = (output,
|
|
20746
|
+
de_InvalidIdentityTokenException = (output, context3) => {
|
|
20735
20747
|
const contents = {};
|
|
20736
20748
|
if (output[_m] != null) {
|
|
20737
20749
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20738
20750
|
}
|
|
20739
20751
|
return contents;
|
|
20740
20752
|
};
|
|
20741
|
-
de_MalformedPolicyDocumentException = (output,
|
|
20753
|
+
de_MalformedPolicyDocumentException = (output, context3) => {
|
|
20742
20754
|
const contents = {};
|
|
20743
20755
|
if (output[_m] != null) {
|
|
20744
20756
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20745
20757
|
}
|
|
20746
20758
|
return contents;
|
|
20747
20759
|
};
|
|
20748
|
-
de_PackedPolicyTooLargeException = (output,
|
|
20760
|
+
de_PackedPolicyTooLargeException = (output, context3) => {
|
|
20749
20761
|
const contents = {};
|
|
20750
20762
|
if (output[_m] != null) {
|
|
20751
20763
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
20752
20764
|
}
|
|
20753
20765
|
return contents;
|
|
20754
20766
|
};
|
|
20755
|
-
de_RegionDisabledException = (output,
|
|
20767
|
+
de_RegionDisabledException = (output, context3) => {
|
|
20756
20768
|
const contents = {};
|
|
20757
20769
|
if (output[_m] != null) {
|
|
20758
20770
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
@@ -20766,8 +20778,8 @@ var init_Aws_query = __esm({
|
|
|
20766
20778
|
cfId: output.headers["x-amz-cf-id"]
|
|
20767
20779
|
});
|
|
20768
20780
|
throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException);
|
|
20769
|
-
buildHttpRpcRequest = async (
|
|
20770
|
-
const { hostname, protocol = "https", port, path: basePath } = await
|
|
20781
|
+
buildHttpRpcRequest = async (context3, headers, path7, resolvedHostname, body) => {
|
|
20782
|
+
const { hostname, protocol = "https", port, path: basePath } = await context3.endpoint();
|
|
20771
20783
|
const contents = {
|
|
20772
20784
|
protocol,
|
|
20773
20785
|
hostname,
|
|
@@ -21650,7 +21662,7 @@ var require_dist_cjs63 = __commonJS({
|
|
|
21650
21662
|
this.eventStreamCodec = new import_eventstream_codec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
21651
21663
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
21652
21664
|
}
|
|
21653
|
-
async handle(next, args,
|
|
21665
|
+
async handle(next, args, context3 = {}) {
|
|
21654
21666
|
const request = args.request;
|
|
21655
21667
|
const { body: payload2, query: query2 } = request;
|
|
21656
21668
|
if (!(payload2 instanceof import_stream.Readable)) {
|
|
@@ -21787,10 +21799,10 @@ var require_endpointResolver2 = __commonJS({
|
|
|
21787
21799
|
size: 50,
|
|
21788
21800
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
21789
21801
|
});
|
|
21790
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
21802
|
+
var defaultEndpointResolver3 = (endpointParams, context3 = {}) => {
|
|
21791
21803
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
21792
21804
|
endpointParams,
|
|
21793
|
-
logger:
|
|
21805
|
+
logger: context3.logger
|
|
21794
21806
|
}));
|
|
21795
21807
|
};
|
|
21796
21808
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -23198,8 +23210,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23198
23210
|
...obj,
|
|
23199
23211
|
...obj.input && { input: CountTokensInputFilterSensitiveLog(obj.input) }
|
|
23200
23212
|
});
|
|
23201
|
-
var se_ApplyGuardrailCommand = async (input,
|
|
23202
|
-
const b3 = core.requestBuilder(input,
|
|
23213
|
+
var se_ApplyGuardrailCommand = async (input, context3) => {
|
|
23214
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23203
23215
|
const headers = {
|
|
23204
23216
|
"content-type": "application/json"
|
|
23205
23217
|
};
|
|
@@ -23208,15 +23220,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23208
23220
|
b3.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
|
|
23209
23221
|
let body;
|
|
23210
23222
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23211
|
-
content: (_2) => se_GuardrailContentBlockList(_2,
|
|
23223
|
+
content: (_2) => se_GuardrailContentBlockList(_2, context3),
|
|
23212
23224
|
outputScope: [],
|
|
23213
23225
|
source: []
|
|
23214
23226
|
}));
|
|
23215
23227
|
b3.m("POST").h(headers).b(body);
|
|
23216
23228
|
return b3.build();
|
|
23217
23229
|
};
|
|
23218
|
-
var se_ConverseCommand = async (input,
|
|
23219
|
-
const b3 = core.requestBuilder(input,
|
|
23230
|
+
var se_ConverseCommand = async (input, context3) => {
|
|
23231
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23220
23232
|
const headers = {
|
|
23221
23233
|
"content-type": "application/json"
|
|
23222
23234
|
};
|
|
@@ -23228,18 +23240,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23228
23240
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23229
23241
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23230
23242
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23231
|
-
messages: (_2) => se_Messages(_2,
|
|
23243
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
23232
23244
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23233
23245
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23234
23246
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23235
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23247
|
+
system: (_2) => se_SystemContentBlocks(_2, context3),
|
|
23236
23248
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23237
23249
|
}));
|
|
23238
23250
|
b3.m("POST").h(headers).b(body);
|
|
23239
23251
|
return b3.build();
|
|
23240
23252
|
};
|
|
23241
|
-
var se_ConverseStreamCommand = async (input,
|
|
23242
|
-
const b3 = core.requestBuilder(input,
|
|
23253
|
+
var se_ConverseStreamCommand = async (input, context3) => {
|
|
23254
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23243
23255
|
const headers = {
|
|
23244
23256
|
"content-type": "application/json"
|
|
23245
23257
|
};
|
|
@@ -23251,18 +23263,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23251
23263
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
23252
23264
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
23253
23265
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
23254
|
-
messages: (_2) => se_Messages(_2,
|
|
23266
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
23255
23267
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
23256
23268
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
23257
23269
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
23258
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
23270
|
+
system: (_2) => se_SystemContentBlocks(_2, context3),
|
|
23259
23271
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
23260
23272
|
}));
|
|
23261
23273
|
b3.m("POST").h(headers).b(body);
|
|
23262
23274
|
return b3.build();
|
|
23263
23275
|
};
|
|
23264
|
-
var se_CountTokensCommand = async (input,
|
|
23265
|
-
const b3 = core.requestBuilder(input,
|
|
23276
|
+
var se_CountTokensCommand = async (input, context3) => {
|
|
23277
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23266
23278
|
const headers = {
|
|
23267
23279
|
"content-type": "application/json"
|
|
23268
23280
|
};
|
|
@@ -23270,13 +23282,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23270
23282
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23271
23283
|
let body;
|
|
23272
23284
|
body = JSON.stringify(smithyClient.take(input, {
|
|
23273
|
-
input: (_2) => se_CountTokensInput(_2,
|
|
23285
|
+
input: (_2) => se_CountTokensInput(_2, context3)
|
|
23274
23286
|
}));
|
|
23275
23287
|
b3.m("POST").h(headers).b(body);
|
|
23276
23288
|
return b3.build();
|
|
23277
23289
|
};
|
|
23278
|
-
var se_GetAsyncInvokeCommand = async (input,
|
|
23279
|
-
const b3 = core.requestBuilder(input,
|
|
23290
|
+
var se_GetAsyncInvokeCommand = async (input, context3) => {
|
|
23291
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23280
23292
|
const headers = {};
|
|
23281
23293
|
b3.bp("/async-invoke/{invocationArn}");
|
|
23282
23294
|
b3.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
|
|
@@ -23284,8 +23296,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23284
23296
|
b3.m("GET").h(headers).b(body);
|
|
23285
23297
|
return b3.build();
|
|
23286
23298
|
};
|
|
23287
|
-
var se_InvokeModelCommand = async (input,
|
|
23288
|
-
const b3 = core.requestBuilder(input,
|
|
23299
|
+
var se_InvokeModelCommand = async (input, context3) => {
|
|
23300
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23289
23301
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23290
23302
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23291
23303
|
[_a16]: input[_a16],
|
|
@@ -23303,8 +23315,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23303
23315
|
b3.m("POST").h(headers).b(body);
|
|
23304
23316
|
return b3.build();
|
|
23305
23317
|
};
|
|
23306
|
-
var se_InvokeModelWithBidirectionalStreamCommand = async (input,
|
|
23307
|
-
const b3 = core.requestBuilder(input,
|
|
23318
|
+
var se_InvokeModelWithBidirectionalStreamCommand = async (input, context3) => {
|
|
23319
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23308
23320
|
const headers = {
|
|
23309
23321
|
"content-type": "application/json"
|
|
23310
23322
|
};
|
|
@@ -23312,13 +23324,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23312
23324
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
23313
23325
|
let body;
|
|
23314
23326
|
if (input.body !== void 0) {
|
|
23315
|
-
body = se_InvokeModelWithBidirectionalStreamInput(input.body,
|
|
23327
|
+
body = se_InvokeModelWithBidirectionalStreamInput(input.body, context3);
|
|
23316
23328
|
}
|
|
23317
23329
|
b3.m("POST").h(headers).b(body);
|
|
23318
23330
|
return b3.build();
|
|
23319
23331
|
};
|
|
23320
|
-
var se_InvokeModelWithResponseStreamCommand = async (input,
|
|
23321
|
-
const b3 = core.requestBuilder(input,
|
|
23332
|
+
var se_InvokeModelWithResponseStreamCommand = async (input, context3) => {
|
|
23333
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23322
23334
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
23323
23335
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
23324
23336
|
[_xaba]: input[_a16],
|
|
@@ -23336,8 +23348,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23336
23348
|
b3.m("POST").h(headers).b(body);
|
|
23337
23349
|
return b3.build();
|
|
23338
23350
|
};
|
|
23339
|
-
var se_ListAsyncInvokesCommand = async (input,
|
|
23340
|
-
const b3 = core.requestBuilder(input,
|
|
23351
|
+
var se_ListAsyncInvokesCommand = async (input, context3) => {
|
|
23352
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23341
23353
|
const headers = {};
|
|
23342
23354
|
b3.bp("/async-invoke");
|
|
23343
23355
|
const query2 = smithyClient.map({
|
|
@@ -23353,8 +23365,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23353
23365
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
23354
23366
|
return b3.build();
|
|
23355
23367
|
};
|
|
23356
|
-
var se_StartAsyncInvokeCommand = async (input,
|
|
23357
|
-
const b3 = core.requestBuilder(input,
|
|
23368
|
+
var se_StartAsyncInvokeCommand = async (input, context3) => {
|
|
23369
|
+
const b3 = core.requestBuilder(input, context3);
|
|
23358
23370
|
const headers = {
|
|
23359
23371
|
"content-type": "application/json"
|
|
23360
23372
|
};
|
|
@@ -23370,14 +23382,14 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23370
23382
|
b3.m("POST").h(headers).b(body);
|
|
23371
23383
|
return b3.build();
|
|
23372
23384
|
};
|
|
23373
|
-
var de_ApplyGuardrailCommand = async (output,
|
|
23385
|
+
var de_ApplyGuardrailCommand = async (output, context3) => {
|
|
23374
23386
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23375
|
-
return de_CommandError3(output,
|
|
23387
|
+
return de_CommandError3(output, context3);
|
|
23376
23388
|
}
|
|
23377
23389
|
const contents = smithyClient.map({
|
|
23378
23390
|
$metadata: deserializeMetadata3(output)
|
|
23379
23391
|
});
|
|
23380
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23392
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23381
23393
|
const doc = smithyClient.take(data2, {
|
|
23382
23394
|
action: smithyClient.expectString,
|
|
23383
23395
|
actionReason: smithyClient.expectString,
|
|
@@ -23389,18 +23401,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23389
23401
|
Object.assign(contents, doc);
|
|
23390
23402
|
return contents;
|
|
23391
23403
|
};
|
|
23392
|
-
var de_ConverseCommand = async (output,
|
|
23404
|
+
var de_ConverseCommand = async (output, context3) => {
|
|
23393
23405
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23394
|
-
return de_CommandError3(output,
|
|
23406
|
+
return de_CommandError3(output, context3);
|
|
23395
23407
|
}
|
|
23396
23408
|
const contents = smithyClient.map({
|
|
23397
23409
|
$metadata: deserializeMetadata3(output)
|
|
23398
23410
|
});
|
|
23399
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23411
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23400
23412
|
const doc = smithyClient.take(data2, {
|
|
23401
23413
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
23402
23414
|
metrics: smithyClient._json,
|
|
23403
|
-
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2),
|
|
23415
|
+
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context3),
|
|
23404
23416
|
performanceConfig: smithyClient._json,
|
|
23405
23417
|
stopReason: smithyClient.expectString,
|
|
23406
23418
|
trace: (_2) => de_ConverseTrace(_2),
|
|
@@ -23409,39 +23421,39 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23409
23421
|
Object.assign(contents, doc);
|
|
23410
23422
|
return contents;
|
|
23411
23423
|
};
|
|
23412
|
-
var de_ConverseStreamCommand = async (output,
|
|
23424
|
+
var de_ConverseStreamCommand = async (output, context3) => {
|
|
23413
23425
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23414
|
-
return de_CommandError3(output,
|
|
23426
|
+
return de_CommandError3(output, context3);
|
|
23415
23427
|
}
|
|
23416
23428
|
const contents = smithyClient.map({
|
|
23417
23429
|
$metadata: deserializeMetadata3(output)
|
|
23418
23430
|
});
|
|
23419
23431
|
const data2 = output.body;
|
|
23420
|
-
contents.stream = de_ConverseStreamOutput(data2,
|
|
23432
|
+
contents.stream = de_ConverseStreamOutput(data2, context3);
|
|
23421
23433
|
return contents;
|
|
23422
23434
|
};
|
|
23423
|
-
var de_CountTokensCommand = async (output,
|
|
23435
|
+
var de_CountTokensCommand = async (output, context3) => {
|
|
23424
23436
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23425
|
-
return de_CommandError3(output,
|
|
23437
|
+
return de_CommandError3(output, context3);
|
|
23426
23438
|
}
|
|
23427
23439
|
const contents = smithyClient.map({
|
|
23428
23440
|
$metadata: deserializeMetadata3(output)
|
|
23429
23441
|
});
|
|
23430
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23442
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23431
23443
|
const doc = smithyClient.take(data2, {
|
|
23432
23444
|
inputTokens: smithyClient.expectInt32
|
|
23433
23445
|
});
|
|
23434
23446
|
Object.assign(contents, doc);
|
|
23435
23447
|
return contents;
|
|
23436
23448
|
};
|
|
23437
|
-
var de_GetAsyncInvokeCommand = async (output,
|
|
23449
|
+
var de_GetAsyncInvokeCommand = async (output, context3) => {
|
|
23438
23450
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23439
|
-
return de_CommandError3(output,
|
|
23451
|
+
return de_CommandError3(output, context3);
|
|
23440
23452
|
}
|
|
23441
23453
|
const contents = smithyClient.map({
|
|
23442
23454
|
$metadata: deserializeMetadata3(output)
|
|
23443
23455
|
});
|
|
23444
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23456
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23445
23457
|
const doc = smithyClient.take(data2, {
|
|
23446
23458
|
clientRequestToken: smithyClient.expectString,
|
|
23447
23459
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -23456,33 +23468,33 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23456
23468
|
Object.assign(contents, doc);
|
|
23457
23469
|
return contents;
|
|
23458
23470
|
};
|
|
23459
|
-
var de_InvokeModelCommand = async (output,
|
|
23471
|
+
var de_InvokeModelCommand = async (output, context3) => {
|
|
23460
23472
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23461
|
-
return de_CommandError3(output,
|
|
23473
|
+
return de_CommandError3(output, context3);
|
|
23462
23474
|
}
|
|
23463
23475
|
const contents = smithyClient.map({
|
|
23464
23476
|
$metadata: deserializeMetadata3(output),
|
|
23465
23477
|
[_cT]: [, output.headers[_ct]],
|
|
23466
23478
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23467
23479
|
});
|
|
23468
|
-
const data2 = await smithyClient.collectBody(output.body,
|
|
23480
|
+
const data2 = await smithyClient.collectBody(output.body, context3);
|
|
23469
23481
|
contents.body = data2;
|
|
23470
23482
|
return contents;
|
|
23471
23483
|
};
|
|
23472
|
-
var de_InvokeModelWithBidirectionalStreamCommand = async (output,
|
|
23484
|
+
var de_InvokeModelWithBidirectionalStreamCommand = async (output, context3) => {
|
|
23473
23485
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23474
|
-
return de_CommandError3(output,
|
|
23486
|
+
return de_CommandError3(output, context3);
|
|
23475
23487
|
}
|
|
23476
23488
|
const contents = smithyClient.map({
|
|
23477
23489
|
$metadata: deserializeMetadata3(output)
|
|
23478
23490
|
});
|
|
23479
23491
|
const data2 = output.body;
|
|
23480
|
-
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2,
|
|
23492
|
+
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context3);
|
|
23481
23493
|
return contents;
|
|
23482
23494
|
};
|
|
23483
|
-
var de_InvokeModelWithResponseStreamCommand = async (output,
|
|
23495
|
+
var de_InvokeModelWithResponseStreamCommand = async (output, context3) => {
|
|
23484
23496
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23485
|
-
return de_CommandError3(output,
|
|
23497
|
+
return de_CommandError3(output, context3);
|
|
23486
23498
|
}
|
|
23487
23499
|
const contents = smithyClient.map({
|
|
23488
23500
|
$metadata: deserializeMetadata3(output),
|
|
@@ -23490,17 +23502,17 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23490
23502
|
[_pCL]: [, output.headers[_xabpl]]
|
|
23491
23503
|
});
|
|
23492
23504
|
const data2 = output.body;
|
|
23493
|
-
contents.body = de_ResponseStream(data2,
|
|
23505
|
+
contents.body = de_ResponseStream(data2, context3);
|
|
23494
23506
|
return contents;
|
|
23495
23507
|
};
|
|
23496
|
-
var de_ListAsyncInvokesCommand = async (output,
|
|
23508
|
+
var de_ListAsyncInvokesCommand = async (output, context3) => {
|
|
23497
23509
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23498
|
-
return de_CommandError3(output,
|
|
23510
|
+
return de_CommandError3(output, context3);
|
|
23499
23511
|
}
|
|
23500
23512
|
const contents = smithyClient.map({
|
|
23501
23513
|
$metadata: deserializeMetadata3(output)
|
|
23502
23514
|
});
|
|
23503
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23515
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23504
23516
|
const doc = smithyClient.take(data2, {
|
|
23505
23517
|
asyncInvokeSummaries: (_2) => de_AsyncInvokeSummaries(_2),
|
|
23506
23518
|
nextToken: smithyClient.expectString
|
|
@@ -23508,24 +23520,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23508
23520
|
Object.assign(contents, doc);
|
|
23509
23521
|
return contents;
|
|
23510
23522
|
};
|
|
23511
|
-
var de_StartAsyncInvokeCommand = async (output,
|
|
23523
|
+
var de_StartAsyncInvokeCommand = async (output, context3) => {
|
|
23512
23524
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
23513
|
-
return de_CommandError3(output,
|
|
23525
|
+
return de_CommandError3(output, context3);
|
|
23514
23526
|
}
|
|
23515
23527
|
const contents = smithyClient.map({
|
|
23516
23528
|
$metadata: deserializeMetadata3(output)
|
|
23517
23529
|
});
|
|
23518
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
23530
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context3)), "body");
|
|
23519
23531
|
const doc = smithyClient.take(data2, {
|
|
23520
23532
|
invocationArn: smithyClient.expectString
|
|
23521
23533
|
});
|
|
23522
23534
|
Object.assign(contents, doc);
|
|
23523
23535
|
return contents;
|
|
23524
23536
|
};
|
|
23525
|
-
var de_CommandError3 = async (output,
|
|
23537
|
+
var de_CommandError3 = async (output, context3) => {
|
|
23526
23538
|
const parsedOutput = {
|
|
23527
23539
|
...output,
|
|
23528
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
23540
|
+
body: await core$1.parseJsonErrorBody(output.body, context3)
|
|
23529
23541
|
};
|
|
23530
23542
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
23531
23543
|
switch (errorCode) {
|
|
@@ -23575,7 +23587,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23575
23587
|
}
|
|
23576
23588
|
};
|
|
23577
23589
|
var throwDefaultError3 = smithyClient.withBaseException(BedrockRuntimeServiceException);
|
|
23578
|
-
var de_AccessDeniedExceptionRes2 = async (parsedOutput,
|
|
23590
|
+
var de_AccessDeniedExceptionRes2 = async (parsedOutput, context3) => {
|
|
23579
23591
|
const contents = smithyClient.map({});
|
|
23580
23592
|
const data2 = parsedOutput.body;
|
|
23581
23593
|
const doc = smithyClient.take(data2, {
|
|
@@ -23588,7 +23600,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23588
23600
|
});
|
|
23589
23601
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23590
23602
|
};
|
|
23591
|
-
var de_ConflictExceptionRes = async (parsedOutput,
|
|
23603
|
+
var de_ConflictExceptionRes = async (parsedOutput, context3) => {
|
|
23592
23604
|
const contents = smithyClient.map({});
|
|
23593
23605
|
const data2 = parsedOutput.body;
|
|
23594
23606
|
const doc = smithyClient.take(data2, {
|
|
@@ -23601,7 +23613,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23601
23613
|
});
|
|
23602
23614
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23603
23615
|
};
|
|
23604
|
-
var de_InternalServerExceptionRes2 = async (parsedOutput,
|
|
23616
|
+
var de_InternalServerExceptionRes2 = async (parsedOutput, context3) => {
|
|
23605
23617
|
const contents = smithyClient.map({});
|
|
23606
23618
|
const data2 = parsedOutput.body;
|
|
23607
23619
|
const doc = smithyClient.take(data2, {
|
|
@@ -23614,7 +23626,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23614
23626
|
});
|
|
23615
23627
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23616
23628
|
};
|
|
23617
|
-
var de_ModelErrorExceptionRes = async (parsedOutput,
|
|
23629
|
+
var de_ModelErrorExceptionRes = async (parsedOutput, context3) => {
|
|
23618
23630
|
const contents = smithyClient.map({});
|
|
23619
23631
|
const data2 = parsedOutput.body;
|
|
23620
23632
|
const doc = smithyClient.take(data2, {
|
|
@@ -23629,7 +23641,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23629
23641
|
});
|
|
23630
23642
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23631
23643
|
};
|
|
23632
|
-
var de_ModelNotReadyExceptionRes = async (parsedOutput,
|
|
23644
|
+
var de_ModelNotReadyExceptionRes = async (parsedOutput, context3) => {
|
|
23633
23645
|
const contents = smithyClient.map({});
|
|
23634
23646
|
const data2 = parsedOutput.body;
|
|
23635
23647
|
const doc = smithyClient.take(data2, {
|
|
@@ -23642,7 +23654,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23642
23654
|
});
|
|
23643
23655
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23644
23656
|
};
|
|
23645
|
-
var de_ModelStreamErrorExceptionRes = async (parsedOutput,
|
|
23657
|
+
var de_ModelStreamErrorExceptionRes = async (parsedOutput, context3) => {
|
|
23646
23658
|
const contents = smithyClient.map({});
|
|
23647
23659
|
const data2 = parsedOutput.body;
|
|
23648
23660
|
const doc = smithyClient.take(data2, {
|
|
@@ -23657,7 +23669,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23657
23669
|
});
|
|
23658
23670
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23659
23671
|
};
|
|
23660
|
-
var de_ModelTimeoutExceptionRes = async (parsedOutput,
|
|
23672
|
+
var de_ModelTimeoutExceptionRes = async (parsedOutput, context3) => {
|
|
23661
23673
|
const contents = smithyClient.map({});
|
|
23662
23674
|
const data2 = parsedOutput.body;
|
|
23663
23675
|
const doc = smithyClient.take(data2, {
|
|
@@ -23670,7 +23682,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23670
23682
|
});
|
|
23671
23683
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23672
23684
|
};
|
|
23673
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
23685
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context3) => {
|
|
23674
23686
|
const contents = smithyClient.map({});
|
|
23675
23687
|
const data2 = parsedOutput.body;
|
|
23676
23688
|
const doc = smithyClient.take(data2, {
|
|
@@ -23683,7 +23695,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23683
23695
|
});
|
|
23684
23696
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23685
23697
|
};
|
|
23686
|
-
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput,
|
|
23698
|
+
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context3) => {
|
|
23687
23699
|
const contents = smithyClient.map({});
|
|
23688
23700
|
const data2 = parsedOutput.body;
|
|
23689
23701
|
const doc = smithyClient.take(data2, {
|
|
@@ -23696,7 +23708,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23696
23708
|
});
|
|
23697
23709
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23698
23710
|
};
|
|
23699
|
-
var de_ServiceUnavailableExceptionRes = async (parsedOutput,
|
|
23711
|
+
var de_ServiceUnavailableExceptionRes = async (parsedOutput, context3) => {
|
|
23700
23712
|
const contents = smithyClient.map({});
|
|
23701
23713
|
const data2 = parsedOutput.body;
|
|
23702
23714
|
const doc = smithyClient.take(data2, {
|
|
@@ -23709,7 +23721,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23709
23721
|
});
|
|
23710
23722
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23711
23723
|
};
|
|
23712
|
-
var de_ThrottlingExceptionRes = async (parsedOutput,
|
|
23724
|
+
var de_ThrottlingExceptionRes = async (parsedOutput, context3) => {
|
|
23713
23725
|
const contents = smithyClient.map({});
|
|
23714
23726
|
const data2 = parsedOutput.body;
|
|
23715
23727
|
const doc = smithyClient.take(data2, {
|
|
@@ -23722,7 +23734,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23722
23734
|
});
|
|
23723
23735
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23724
23736
|
};
|
|
23725
|
-
var de_ValidationExceptionRes = async (parsedOutput,
|
|
23737
|
+
var de_ValidationExceptionRes = async (parsedOutput, context3) => {
|
|
23726
23738
|
const contents = smithyClient.map({});
|
|
23727
23739
|
const data2 = parsedOutput.body;
|
|
23728
23740
|
const doc = smithyClient.take(data2, {
|
|
@@ -23735,367 +23747,367 @@ var require_dist_cjs65 = __commonJS({
|
|
|
23735
23747
|
});
|
|
23736
23748
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
23737
23749
|
};
|
|
23738
|
-
var se_InvokeModelWithBidirectionalStreamInput = (input,
|
|
23750
|
+
var se_InvokeModelWithBidirectionalStreamInput = (input, context3) => {
|
|
23739
23751
|
const eventMarshallingVisitor = (event) => exports2.InvokeModelWithBidirectionalStreamInput.visit(event, {
|
|
23740
|
-
chunk: (value) => se_BidirectionalInputPayloadPart_event(value,
|
|
23752
|
+
chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context3),
|
|
23741
23753
|
_: (value) => value
|
|
23742
23754
|
});
|
|
23743
|
-
return
|
|
23755
|
+
return context3.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
23744
23756
|
};
|
|
23745
|
-
var se_BidirectionalInputPayloadPart_event = (input,
|
|
23757
|
+
var se_BidirectionalInputPayloadPart_event = (input, context3) => {
|
|
23746
23758
|
const headers = {
|
|
23747
23759
|
":event-type": { type: "string", value: "chunk" },
|
|
23748
23760
|
":message-type": { type: "string", value: "event" },
|
|
23749
23761
|
":content-type": { type: "string", value: "application/json" }
|
|
23750
23762
|
};
|
|
23751
23763
|
let body = new Uint8Array();
|
|
23752
|
-
body = se_BidirectionalInputPayloadPart(input,
|
|
23753
|
-
body =
|
|
23764
|
+
body = se_BidirectionalInputPayloadPart(input, context3);
|
|
23765
|
+
body = context3.utf8Decoder(JSON.stringify(body));
|
|
23754
23766
|
return { headers, body };
|
|
23755
23767
|
};
|
|
23756
|
-
var de_ConverseStreamOutput = (output,
|
|
23757
|
-
return
|
|
23768
|
+
var de_ConverseStreamOutput = (output, context3) => {
|
|
23769
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23758
23770
|
if (event["messageStart"] != null) {
|
|
23759
23771
|
return {
|
|
23760
|
-
messageStart: await de_MessageStartEvent_event(event["messageStart"],
|
|
23772
|
+
messageStart: await de_MessageStartEvent_event(event["messageStart"], context3)
|
|
23761
23773
|
};
|
|
23762
23774
|
}
|
|
23763
23775
|
if (event["contentBlockStart"] != null) {
|
|
23764
23776
|
return {
|
|
23765
|
-
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"],
|
|
23777
|
+
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context3)
|
|
23766
23778
|
};
|
|
23767
23779
|
}
|
|
23768
23780
|
if (event["contentBlockDelta"] != null) {
|
|
23769
23781
|
return {
|
|
23770
|
-
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"],
|
|
23782
|
+
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context3)
|
|
23771
23783
|
};
|
|
23772
23784
|
}
|
|
23773
23785
|
if (event["contentBlockStop"] != null) {
|
|
23774
23786
|
return {
|
|
23775
|
-
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"],
|
|
23787
|
+
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context3)
|
|
23776
23788
|
};
|
|
23777
23789
|
}
|
|
23778
23790
|
if (event["messageStop"] != null) {
|
|
23779
23791
|
return {
|
|
23780
|
-
messageStop: await de_MessageStopEvent_event(event["messageStop"],
|
|
23792
|
+
messageStop: await de_MessageStopEvent_event(event["messageStop"], context3)
|
|
23781
23793
|
};
|
|
23782
23794
|
}
|
|
23783
23795
|
if (event["metadata"] != null) {
|
|
23784
23796
|
return {
|
|
23785
|
-
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"],
|
|
23797
|
+
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context3)
|
|
23786
23798
|
};
|
|
23787
23799
|
}
|
|
23788
23800
|
if (event["internalServerException"] != null) {
|
|
23789
23801
|
return {
|
|
23790
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23802
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23791
23803
|
};
|
|
23792
23804
|
}
|
|
23793
23805
|
if (event["modelStreamErrorException"] != null) {
|
|
23794
23806
|
return {
|
|
23795
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23807
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23796
23808
|
};
|
|
23797
23809
|
}
|
|
23798
23810
|
if (event["validationException"] != null) {
|
|
23799
23811
|
return {
|
|
23800
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23812
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23801
23813
|
};
|
|
23802
23814
|
}
|
|
23803
23815
|
if (event["throttlingException"] != null) {
|
|
23804
23816
|
return {
|
|
23805
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23817
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23806
23818
|
};
|
|
23807
23819
|
}
|
|
23808
23820
|
if (event["serviceUnavailableException"] != null) {
|
|
23809
23821
|
return {
|
|
23810
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23822
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23811
23823
|
};
|
|
23812
23824
|
}
|
|
23813
23825
|
return { $unknown: event };
|
|
23814
23826
|
});
|
|
23815
23827
|
};
|
|
23816
|
-
var de_InvokeModelWithBidirectionalStreamOutput = (output,
|
|
23817
|
-
return
|
|
23828
|
+
var de_InvokeModelWithBidirectionalStreamOutput = (output, context3) => {
|
|
23829
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23818
23830
|
if (event["chunk"] != null) {
|
|
23819
23831
|
return {
|
|
23820
|
-
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"],
|
|
23832
|
+
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context3)
|
|
23821
23833
|
};
|
|
23822
23834
|
}
|
|
23823
23835
|
if (event["internalServerException"] != null) {
|
|
23824
23836
|
return {
|
|
23825
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23837
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23826
23838
|
};
|
|
23827
23839
|
}
|
|
23828
23840
|
if (event["modelStreamErrorException"] != null) {
|
|
23829
23841
|
return {
|
|
23830
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23842
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23831
23843
|
};
|
|
23832
23844
|
}
|
|
23833
23845
|
if (event["validationException"] != null) {
|
|
23834
23846
|
return {
|
|
23835
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23847
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23836
23848
|
};
|
|
23837
23849
|
}
|
|
23838
23850
|
if (event["throttlingException"] != null) {
|
|
23839
23851
|
return {
|
|
23840
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23852
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23841
23853
|
};
|
|
23842
23854
|
}
|
|
23843
23855
|
if (event["modelTimeoutException"] != null) {
|
|
23844
23856
|
return {
|
|
23845
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
23857
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
|
|
23846
23858
|
};
|
|
23847
23859
|
}
|
|
23848
23860
|
if (event["serviceUnavailableException"] != null) {
|
|
23849
23861
|
return {
|
|
23850
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23862
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23851
23863
|
};
|
|
23852
23864
|
}
|
|
23853
23865
|
return { $unknown: event };
|
|
23854
23866
|
});
|
|
23855
23867
|
};
|
|
23856
|
-
var de_ResponseStream = (output,
|
|
23857
|
-
return
|
|
23868
|
+
var de_ResponseStream = (output, context3) => {
|
|
23869
|
+
return context3.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
23858
23870
|
if (event["chunk"] != null) {
|
|
23859
23871
|
return {
|
|
23860
|
-
chunk: await de_PayloadPart_event(event["chunk"],
|
|
23872
|
+
chunk: await de_PayloadPart_event(event["chunk"], context3)
|
|
23861
23873
|
};
|
|
23862
23874
|
}
|
|
23863
23875
|
if (event["internalServerException"] != null) {
|
|
23864
23876
|
return {
|
|
23865
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
23877
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context3)
|
|
23866
23878
|
};
|
|
23867
23879
|
}
|
|
23868
23880
|
if (event["modelStreamErrorException"] != null) {
|
|
23869
23881
|
return {
|
|
23870
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
23882
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context3)
|
|
23871
23883
|
};
|
|
23872
23884
|
}
|
|
23873
23885
|
if (event["validationException"] != null) {
|
|
23874
23886
|
return {
|
|
23875
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
23887
|
+
validationException: await de_ValidationException_event(event["validationException"], context3)
|
|
23876
23888
|
};
|
|
23877
23889
|
}
|
|
23878
23890
|
if (event["throttlingException"] != null) {
|
|
23879
23891
|
return {
|
|
23880
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
23892
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context3)
|
|
23881
23893
|
};
|
|
23882
23894
|
}
|
|
23883
23895
|
if (event["modelTimeoutException"] != null) {
|
|
23884
23896
|
return {
|
|
23885
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
23897
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context3)
|
|
23886
23898
|
};
|
|
23887
23899
|
}
|
|
23888
23900
|
if (event["serviceUnavailableException"] != null) {
|
|
23889
23901
|
return {
|
|
23890
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
23902
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context3)
|
|
23891
23903
|
};
|
|
23892
23904
|
}
|
|
23893
23905
|
return { $unknown: event };
|
|
23894
23906
|
});
|
|
23895
23907
|
};
|
|
23896
|
-
var de_BidirectionalOutputPayloadPart_event = async (output,
|
|
23908
|
+
var de_BidirectionalOutputPayloadPart_event = async (output, context3) => {
|
|
23897
23909
|
const contents = {};
|
|
23898
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23899
|
-
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2,
|
|
23910
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23911
|
+
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context3));
|
|
23900
23912
|
return contents;
|
|
23901
23913
|
};
|
|
23902
|
-
var de_ContentBlockDeltaEvent_event = async (output,
|
|
23914
|
+
var de_ContentBlockDeltaEvent_event = async (output, context3) => {
|
|
23903
23915
|
const contents = {};
|
|
23904
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23905
|
-
Object.assign(contents, de_ContentBlockDeltaEvent(data2,
|
|
23916
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23917
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data2, context3));
|
|
23906
23918
|
return contents;
|
|
23907
23919
|
};
|
|
23908
|
-
var de_ContentBlockStartEvent_event = async (output,
|
|
23920
|
+
var de_ContentBlockStartEvent_event = async (output, context3) => {
|
|
23909
23921
|
const contents = {};
|
|
23910
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23922
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23911
23923
|
Object.assign(contents, smithyClient._json(data2));
|
|
23912
23924
|
return contents;
|
|
23913
23925
|
};
|
|
23914
|
-
var de_ContentBlockStopEvent_event = async (output,
|
|
23926
|
+
var de_ContentBlockStopEvent_event = async (output, context3) => {
|
|
23915
23927
|
const contents = {};
|
|
23916
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23928
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23917
23929
|
Object.assign(contents, smithyClient._json(data2));
|
|
23918
23930
|
return contents;
|
|
23919
23931
|
};
|
|
23920
|
-
var de_ConverseStreamMetadataEvent_event = async (output,
|
|
23932
|
+
var de_ConverseStreamMetadataEvent_event = async (output, context3) => {
|
|
23921
23933
|
const contents = {};
|
|
23922
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23934
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23923
23935
|
Object.assign(contents, de_ConverseStreamMetadataEvent(data2));
|
|
23924
23936
|
return contents;
|
|
23925
23937
|
};
|
|
23926
|
-
var de_InternalServerException_event = async (output,
|
|
23938
|
+
var de_InternalServerException_event = async (output, context3) => {
|
|
23927
23939
|
const parsedOutput = {
|
|
23928
23940
|
...output,
|
|
23929
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23941
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23930
23942
|
};
|
|
23931
23943
|
return de_InternalServerExceptionRes2(parsedOutput);
|
|
23932
23944
|
};
|
|
23933
|
-
var de_MessageStartEvent_event = async (output,
|
|
23945
|
+
var de_MessageStartEvent_event = async (output, context3) => {
|
|
23934
23946
|
const contents = {};
|
|
23935
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23947
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23936
23948
|
Object.assign(contents, smithyClient._json(data2));
|
|
23937
23949
|
return contents;
|
|
23938
23950
|
};
|
|
23939
|
-
var de_MessageStopEvent_event = async (output,
|
|
23951
|
+
var de_MessageStopEvent_event = async (output, context3) => {
|
|
23940
23952
|
const contents = {};
|
|
23941
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23953
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23942
23954
|
Object.assign(contents, de_MessageStopEvent(data2));
|
|
23943
23955
|
return contents;
|
|
23944
23956
|
};
|
|
23945
|
-
var de_ModelStreamErrorException_event = async (output,
|
|
23957
|
+
var de_ModelStreamErrorException_event = async (output, context3) => {
|
|
23946
23958
|
const parsedOutput = {
|
|
23947
23959
|
...output,
|
|
23948
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23960
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23949
23961
|
};
|
|
23950
23962
|
return de_ModelStreamErrorExceptionRes(parsedOutput);
|
|
23951
23963
|
};
|
|
23952
|
-
var de_ModelTimeoutException_event = async (output,
|
|
23964
|
+
var de_ModelTimeoutException_event = async (output, context3) => {
|
|
23953
23965
|
const parsedOutput = {
|
|
23954
23966
|
...output,
|
|
23955
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23967
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23956
23968
|
};
|
|
23957
23969
|
return de_ModelTimeoutExceptionRes(parsedOutput);
|
|
23958
23970
|
};
|
|
23959
|
-
var de_PayloadPart_event = async (output,
|
|
23971
|
+
var de_PayloadPart_event = async (output, context3) => {
|
|
23960
23972
|
const contents = {};
|
|
23961
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
23962
|
-
Object.assign(contents, de_PayloadPart(data2,
|
|
23973
|
+
const data2 = await core$1.parseJsonBody(output.body, context3);
|
|
23974
|
+
Object.assign(contents, de_PayloadPart(data2, context3));
|
|
23963
23975
|
return contents;
|
|
23964
23976
|
};
|
|
23965
|
-
var de_ServiceUnavailableException_event = async (output,
|
|
23977
|
+
var de_ServiceUnavailableException_event = async (output, context3) => {
|
|
23966
23978
|
const parsedOutput = {
|
|
23967
23979
|
...output,
|
|
23968
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23980
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23969
23981
|
};
|
|
23970
23982
|
return de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
23971
23983
|
};
|
|
23972
|
-
var de_ThrottlingException_event = async (output,
|
|
23984
|
+
var de_ThrottlingException_event = async (output, context3) => {
|
|
23973
23985
|
const parsedOutput = {
|
|
23974
23986
|
...output,
|
|
23975
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23987
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23976
23988
|
};
|
|
23977
23989
|
return de_ThrottlingExceptionRes(parsedOutput);
|
|
23978
23990
|
};
|
|
23979
|
-
var de_ValidationException_event = async (output,
|
|
23991
|
+
var de_ValidationException_event = async (output, context3) => {
|
|
23980
23992
|
const parsedOutput = {
|
|
23981
23993
|
...output,
|
|
23982
|
-
body: await core$1.parseJsonBody(output.body,
|
|
23994
|
+
body: await core$1.parseJsonBody(output.body, context3)
|
|
23983
23995
|
};
|
|
23984
23996
|
return de_ValidationExceptionRes(parsedOutput);
|
|
23985
23997
|
};
|
|
23986
|
-
var se_BidirectionalInputPayloadPart = (input,
|
|
23998
|
+
var se_BidirectionalInputPayloadPart = (input, context3) => {
|
|
23987
23999
|
return smithyClient.take(input, {
|
|
23988
|
-
bytes:
|
|
24000
|
+
bytes: context3.base64Encoder
|
|
23989
24001
|
});
|
|
23990
24002
|
};
|
|
23991
|
-
var se_ContentBlock = (input,
|
|
24003
|
+
var se_ContentBlock = (input, context3) => {
|
|
23992
24004
|
return exports2.ContentBlock.visit(input, {
|
|
23993
24005
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
23994
24006
|
citationsContent: (value) => ({ citationsContent: smithyClient._json(value) }),
|
|
23995
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
23996
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
23997
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
23998
|
-
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value,
|
|
24007
|
+
document: (value) => ({ document: se_DocumentBlock(value, context3) }),
|
|
24008
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
|
|
24009
|
+
image: (value) => ({ image: se_ImageBlock(value, context3) }),
|
|
24010
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context3) }),
|
|
23999
24011
|
text: (value) => ({ text: value }),
|
|
24000
|
-
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value,
|
|
24012
|
+
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context3) }),
|
|
24001
24013
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value) }),
|
|
24002
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24014
|
+
video: (value) => ({ video: se_VideoBlock(value, context3) }),
|
|
24003
24015
|
_: (name14, value) => ({ [name14]: value })
|
|
24004
24016
|
});
|
|
24005
24017
|
};
|
|
24006
|
-
var se_ContentBlocks = (input,
|
|
24018
|
+
var se_ContentBlocks = (input, context3) => {
|
|
24007
24019
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24008
|
-
return se_ContentBlock(entry,
|
|
24020
|
+
return se_ContentBlock(entry, context3);
|
|
24009
24021
|
});
|
|
24010
24022
|
};
|
|
24011
|
-
var se_ConverseTokensRequest = (input,
|
|
24023
|
+
var se_ConverseTokensRequest = (input, context3) => {
|
|
24012
24024
|
return smithyClient.take(input, {
|
|
24013
|
-
messages: (_2) => se_Messages(_2,
|
|
24014
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
24025
|
+
messages: (_2) => se_Messages(_2, context3),
|
|
24026
|
+
system: (_2) => se_SystemContentBlocks(_2, context3)
|
|
24015
24027
|
});
|
|
24016
24028
|
};
|
|
24017
|
-
var se_CountTokensInput = (input,
|
|
24029
|
+
var se_CountTokensInput = (input, context3) => {
|
|
24018
24030
|
return exports2.CountTokensInput.visit(input, {
|
|
24019
|
-
converse: (value) => ({ converse: se_ConverseTokensRequest(value,
|
|
24020
|
-
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value,
|
|
24031
|
+
converse: (value) => ({ converse: se_ConverseTokensRequest(value, context3) }),
|
|
24032
|
+
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context3) }),
|
|
24021
24033
|
_: (name14, value) => ({ [name14]: value })
|
|
24022
24034
|
});
|
|
24023
24035
|
};
|
|
24024
|
-
var se_DocumentBlock = (input,
|
|
24036
|
+
var se_DocumentBlock = (input, context3) => {
|
|
24025
24037
|
return smithyClient.take(input, {
|
|
24026
24038
|
citations: smithyClient._json,
|
|
24027
24039
|
context: [],
|
|
24028
24040
|
format: [],
|
|
24029
24041
|
name: [],
|
|
24030
|
-
source: (_2) => se_DocumentSource(_2,
|
|
24042
|
+
source: (_2) => se_DocumentSource(_2, context3)
|
|
24031
24043
|
});
|
|
24032
24044
|
};
|
|
24033
|
-
var se_DocumentSource = (input,
|
|
24045
|
+
var se_DocumentSource = (input, context3) => {
|
|
24034
24046
|
return exports2.DocumentSource.visit(input, {
|
|
24035
|
-
bytes: (value) => ({ bytes:
|
|
24047
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24036
24048
|
content: (value) => ({ content: smithyClient._json(value) }),
|
|
24037
24049
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24038
24050
|
text: (value) => ({ text: value }),
|
|
24039
24051
|
_: (name14, value) => ({ [name14]: value })
|
|
24040
24052
|
});
|
|
24041
24053
|
};
|
|
24042
|
-
var se_GuardrailContentBlock = (input,
|
|
24054
|
+
var se_GuardrailContentBlock = (input, context3) => {
|
|
24043
24055
|
return exports2.GuardrailContentBlock.visit(input, {
|
|
24044
|
-
image: (value) => ({ image: se_GuardrailImageBlock(value,
|
|
24056
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context3) }),
|
|
24045
24057
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24046
24058
|
_: (name14, value) => ({ [name14]: value })
|
|
24047
24059
|
});
|
|
24048
24060
|
};
|
|
24049
|
-
var se_GuardrailContentBlockList = (input,
|
|
24061
|
+
var se_GuardrailContentBlockList = (input, context3) => {
|
|
24050
24062
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24051
|
-
return se_GuardrailContentBlock(entry,
|
|
24063
|
+
return se_GuardrailContentBlock(entry, context3);
|
|
24052
24064
|
});
|
|
24053
24065
|
};
|
|
24054
|
-
var se_GuardrailConverseContentBlock = (input,
|
|
24066
|
+
var se_GuardrailConverseContentBlock = (input, context3) => {
|
|
24055
24067
|
return exports2.GuardrailConverseContentBlock.visit(input, {
|
|
24056
|
-
image: (value) => ({ image: se_GuardrailConverseImageBlock(value,
|
|
24068
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context3) }),
|
|
24057
24069
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
24058
24070
|
_: (name14, value) => ({ [name14]: value })
|
|
24059
24071
|
});
|
|
24060
24072
|
};
|
|
24061
|
-
var se_GuardrailConverseImageBlock = (input,
|
|
24073
|
+
var se_GuardrailConverseImageBlock = (input, context3) => {
|
|
24062
24074
|
return smithyClient.take(input, {
|
|
24063
24075
|
format: [],
|
|
24064
|
-
source: (_2) => se_GuardrailConverseImageSource(_2,
|
|
24076
|
+
source: (_2) => se_GuardrailConverseImageSource(_2, context3)
|
|
24065
24077
|
});
|
|
24066
24078
|
};
|
|
24067
|
-
var se_GuardrailConverseImageSource = (input,
|
|
24079
|
+
var se_GuardrailConverseImageSource = (input, context3) => {
|
|
24068
24080
|
return exports2.GuardrailConverseImageSource.visit(input, {
|
|
24069
|
-
bytes: (value) => ({ bytes:
|
|
24081
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24070
24082
|
_: (name14, value) => ({ [name14]: value })
|
|
24071
24083
|
});
|
|
24072
24084
|
};
|
|
24073
|
-
var se_GuardrailImageBlock = (input,
|
|
24085
|
+
var se_GuardrailImageBlock = (input, context3) => {
|
|
24074
24086
|
return smithyClient.take(input, {
|
|
24075
24087
|
format: [],
|
|
24076
|
-
source: (_2) => se_GuardrailImageSource(_2,
|
|
24088
|
+
source: (_2) => se_GuardrailImageSource(_2, context3)
|
|
24077
24089
|
});
|
|
24078
24090
|
};
|
|
24079
|
-
var se_GuardrailImageSource = (input,
|
|
24091
|
+
var se_GuardrailImageSource = (input, context3) => {
|
|
24080
24092
|
return exports2.GuardrailImageSource.visit(input, {
|
|
24081
|
-
bytes: (value) => ({ bytes:
|
|
24093
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24082
24094
|
_: (name14, value) => ({ [name14]: value })
|
|
24083
24095
|
});
|
|
24084
24096
|
};
|
|
24085
|
-
var se_ImageBlock = (input,
|
|
24097
|
+
var se_ImageBlock = (input, context3) => {
|
|
24086
24098
|
return smithyClient.take(input, {
|
|
24087
24099
|
format: [],
|
|
24088
|
-
source: (_2) => se_ImageSource(_2,
|
|
24100
|
+
source: (_2) => se_ImageSource(_2, context3)
|
|
24089
24101
|
});
|
|
24090
24102
|
};
|
|
24091
|
-
var se_ImageSource = (input,
|
|
24103
|
+
var se_ImageSource = (input, context3) => {
|
|
24092
24104
|
return exports2.ImageSource.visit(input, {
|
|
24093
|
-
bytes: (value) => ({ bytes:
|
|
24105
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24094
24106
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24095
24107
|
_: (name14, value) => ({ [name14]: value })
|
|
24096
24108
|
});
|
|
24097
24109
|
};
|
|
24098
|
-
var se_InferenceConfiguration = (input,
|
|
24110
|
+
var se_InferenceConfiguration = (input, context3) => {
|
|
24099
24111
|
return smithyClient.take(input, {
|
|
24100
24112
|
maxTokens: [],
|
|
24101
24113
|
stopSequences: smithyClient._json,
|
|
@@ -24103,128 +24115,128 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24103
24115
|
topP: smithyClient.serializeFloat
|
|
24104
24116
|
});
|
|
24105
24117
|
};
|
|
24106
|
-
var se_InvokeModelTokensRequest = (input,
|
|
24118
|
+
var se_InvokeModelTokensRequest = (input, context3) => {
|
|
24107
24119
|
return smithyClient.take(input, {
|
|
24108
|
-
body:
|
|
24120
|
+
body: context3.base64Encoder
|
|
24109
24121
|
});
|
|
24110
24122
|
};
|
|
24111
|
-
var se_Message = (input,
|
|
24123
|
+
var se_Message = (input, context3) => {
|
|
24112
24124
|
return smithyClient.take(input, {
|
|
24113
|
-
content: (_2) => se_ContentBlocks(_2,
|
|
24125
|
+
content: (_2) => se_ContentBlocks(_2, context3),
|
|
24114
24126
|
role: []
|
|
24115
24127
|
});
|
|
24116
24128
|
};
|
|
24117
|
-
var se_Messages = (input,
|
|
24129
|
+
var se_Messages = (input, context3) => {
|
|
24118
24130
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24119
|
-
return se_Message(entry,
|
|
24131
|
+
return se_Message(entry, context3);
|
|
24120
24132
|
});
|
|
24121
24133
|
};
|
|
24122
|
-
var se_ModelInputPayload = (input,
|
|
24134
|
+
var se_ModelInputPayload = (input, context3) => {
|
|
24123
24135
|
return input;
|
|
24124
24136
|
};
|
|
24125
|
-
var se_ReasoningContentBlock = (input,
|
|
24137
|
+
var se_ReasoningContentBlock = (input, context3) => {
|
|
24126
24138
|
return exports2.ReasoningContentBlock.visit(input, {
|
|
24127
24139
|
reasoningText: (value) => ({ reasoningText: smithyClient._json(value) }),
|
|
24128
|
-
redactedContent: (value) => ({ redactedContent:
|
|
24140
|
+
redactedContent: (value) => ({ redactedContent: context3.base64Encoder(value) }),
|
|
24129
24141
|
_: (name14, value) => ({ [name14]: value })
|
|
24130
24142
|
});
|
|
24131
24143
|
};
|
|
24132
|
-
var se_SystemContentBlock = (input,
|
|
24144
|
+
var se_SystemContentBlock = (input, context3) => {
|
|
24133
24145
|
return exports2.SystemContentBlock.visit(input, {
|
|
24134
24146
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24135
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
24147
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context3) }),
|
|
24136
24148
|
text: (value) => ({ text: value }),
|
|
24137
24149
|
_: (name14, value) => ({ [name14]: value })
|
|
24138
24150
|
});
|
|
24139
24151
|
};
|
|
24140
|
-
var se_SystemContentBlocks = (input,
|
|
24152
|
+
var se_SystemContentBlocks = (input, context3) => {
|
|
24141
24153
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24142
|
-
return se_SystemContentBlock(entry,
|
|
24154
|
+
return se_SystemContentBlock(entry, context3);
|
|
24143
24155
|
});
|
|
24144
24156
|
};
|
|
24145
|
-
var se_Tool = (input,
|
|
24157
|
+
var se_Tool = (input, context3) => {
|
|
24146
24158
|
return exports2.Tool.visit(input, {
|
|
24147
24159
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
24148
24160
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
|
|
24149
24161
|
_: (name14, value) => ({ [name14]: value })
|
|
24150
24162
|
});
|
|
24151
24163
|
};
|
|
24152
|
-
var se_ToolConfiguration = (input,
|
|
24164
|
+
var se_ToolConfiguration = (input, context3) => {
|
|
24153
24165
|
return smithyClient.take(input, {
|
|
24154
24166
|
toolChoice: smithyClient._json,
|
|
24155
24167
|
tools: (_2) => se_Tools(_2)
|
|
24156
24168
|
});
|
|
24157
24169
|
};
|
|
24158
|
-
var se_ToolInputSchema = (input,
|
|
24170
|
+
var se_ToolInputSchema = (input, context3) => {
|
|
24159
24171
|
return exports2.ToolInputSchema.visit(input, {
|
|
24160
24172
|
json: (value) => ({ json: se_Document(value) }),
|
|
24161
24173
|
_: (name14, value) => ({ [name14]: value })
|
|
24162
24174
|
});
|
|
24163
24175
|
};
|
|
24164
|
-
var se_ToolResultBlock = (input,
|
|
24176
|
+
var se_ToolResultBlock = (input, context3) => {
|
|
24165
24177
|
return smithyClient.take(input, {
|
|
24166
|
-
content: (_2) => se_ToolResultContentBlocks(_2,
|
|
24178
|
+
content: (_2) => se_ToolResultContentBlocks(_2, context3),
|
|
24167
24179
|
status: [],
|
|
24168
24180
|
toolUseId: []
|
|
24169
24181
|
});
|
|
24170
24182
|
};
|
|
24171
|
-
var se_ToolResultContentBlock = (input,
|
|
24183
|
+
var se_ToolResultContentBlock = (input, context3) => {
|
|
24172
24184
|
return exports2.ToolResultContentBlock.visit(input, {
|
|
24173
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
24174
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
24185
|
+
document: (value) => ({ document: se_DocumentBlock(value, context3) }),
|
|
24186
|
+
image: (value) => ({ image: se_ImageBlock(value, context3) }),
|
|
24175
24187
|
json: (value) => ({ json: se_Document(value) }),
|
|
24176
24188
|
text: (value) => ({ text: value }),
|
|
24177
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
24189
|
+
video: (value) => ({ video: se_VideoBlock(value, context3) }),
|
|
24178
24190
|
_: (name14, value) => ({ [name14]: value })
|
|
24179
24191
|
});
|
|
24180
24192
|
};
|
|
24181
|
-
var se_ToolResultContentBlocks = (input,
|
|
24193
|
+
var se_ToolResultContentBlocks = (input, context3) => {
|
|
24182
24194
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24183
|
-
return se_ToolResultContentBlock(entry,
|
|
24195
|
+
return se_ToolResultContentBlock(entry, context3);
|
|
24184
24196
|
});
|
|
24185
24197
|
};
|
|
24186
|
-
var se_Tools = (input,
|
|
24198
|
+
var se_Tools = (input, context3) => {
|
|
24187
24199
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
24188
24200
|
return se_Tool(entry);
|
|
24189
24201
|
});
|
|
24190
24202
|
};
|
|
24191
|
-
var se_ToolSpecification = (input,
|
|
24203
|
+
var se_ToolSpecification = (input, context3) => {
|
|
24192
24204
|
return smithyClient.take(input, {
|
|
24193
24205
|
description: [],
|
|
24194
24206
|
inputSchema: (_2) => se_ToolInputSchema(_2),
|
|
24195
24207
|
name: []
|
|
24196
24208
|
});
|
|
24197
24209
|
};
|
|
24198
|
-
var se_ToolUseBlock = (input,
|
|
24210
|
+
var se_ToolUseBlock = (input, context3) => {
|
|
24199
24211
|
return smithyClient.take(input, {
|
|
24200
24212
|
input: (_2) => se_Document(_2),
|
|
24201
24213
|
name: [],
|
|
24202
24214
|
toolUseId: []
|
|
24203
24215
|
});
|
|
24204
24216
|
};
|
|
24205
|
-
var se_VideoBlock = (input,
|
|
24217
|
+
var se_VideoBlock = (input, context3) => {
|
|
24206
24218
|
return smithyClient.take(input, {
|
|
24207
24219
|
format: [],
|
|
24208
|
-
source: (_2) => se_VideoSource(_2,
|
|
24220
|
+
source: (_2) => se_VideoSource(_2, context3)
|
|
24209
24221
|
});
|
|
24210
24222
|
};
|
|
24211
|
-
var se_VideoSource = (input,
|
|
24223
|
+
var se_VideoSource = (input, context3) => {
|
|
24212
24224
|
return exports2.VideoSource.visit(input, {
|
|
24213
|
-
bytes: (value) => ({ bytes:
|
|
24225
|
+
bytes: (value) => ({ bytes: context3.base64Encoder(value) }),
|
|
24214
24226
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
24215
24227
|
_: (name14, value) => ({ [name14]: value })
|
|
24216
24228
|
});
|
|
24217
24229
|
};
|
|
24218
|
-
var se_Document = (input,
|
|
24230
|
+
var se_Document = (input, context3) => {
|
|
24219
24231
|
return input;
|
|
24220
24232
|
};
|
|
24221
|
-
var de_AsyncInvokeSummaries = (output,
|
|
24233
|
+
var de_AsyncInvokeSummaries = (output, context3) => {
|
|
24222
24234
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24223
24235
|
return de_AsyncInvokeSummary(entry);
|
|
24224
24236
|
});
|
|
24225
24237
|
return retVal;
|
|
24226
24238
|
};
|
|
24227
|
-
var de_AsyncInvokeSummary = (output,
|
|
24239
|
+
var de_AsyncInvokeSummary = (output, context3) => {
|
|
24228
24240
|
return smithyClient.take(output, {
|
|
24229
24241
|
clientRequestToken: smithyClient.expectString,
|
|
24230
24242
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -24237,12 +24249,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24237
24249
|
submitTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2))
|
|
24238
24250
|
});
|
|
24239
24251
|
};
|
|
24240
|
-
var de_BidirectionalOutputPayloadPart = (output,
|
|
24252
|
+
var de_BidirectionalOutputPayloadPart = (output, context3) => {
|
|
24241
24253
|
return smithyClient.take(output, {
|
|
24242
|
-
bytes:
|
|
24254
|
+
bytes: context3.base64Decoder
|
|
24243
24255
|
});
|
|
24244
24256
|
};
|
|
24245
|
-
var de_ContentBlock = (output,
|
|
24257
|
+
var de_ContentBlock = (output, context3) => {
|
|
24246
24258
|
if (output.cachePoint != null) {
|
|
24247
24259
|
return {
|
|
24248
24260
|
cachePoint: smithyClient._json(output.cachePoint)
|
|
@@ -24255,22 +24267,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24255
24267
|
}
|
|
24256
24268
|
if (output.document != null) {
|
|
24257
24269
|
return {
|
|
24258
|
-
document: de_DocumentBlock(output.document,
|
|
24270
|
+
document: de_DocumentBlock(output.document, context3)
|
|
24259
24271
|
};
|
|
24260
24272
|
}
|
|
24261
24273
|
if (output.guardContent != null) {
|
|
24262
24274
|
return {
|
|
24263
|
-
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent),
|
|
24275
|
+
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context3)
|
|
24264
24276
|
};
|
|
24265
24277
|
}
|
|
24266
24278
|
if (output.image != null) {
|
|
24267
24279
|
return {
|
|
24268
|
-
image: de_ImageBlock(output.image,
|
|
24280
|
+
image: de_ImageBlock(output.image, context3)
|
|
24269
24281
|
};
|
|
24270
24282
|
}
|
|
24271
24283
|
if (output.reasoningContent != null) {
|
|
24272
24284
|
return {
|
|
24273
|
-
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent),
|
|
24285
|
+
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context3)
|
|
24274
24286
|
};
|
|
24275
24287
|
}
|
|
24276
24288
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24278,7 +24290,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24278
24290
|
}
|
|
24279
24291
|
if (output.toolResult != null) {
|
|
24280
24292
|
return {
|
|
24281
|
-
toolResult: de_ToolResultBlock(output.toolResult,
|
|
24293
|
+
toolResult: de_ToolResultBlock(output.toolResult, context3)
|
|
24282
24294
|
};
|
|
24283
24295
|
}
|
|
24284
24296
|
if (output.toolUse != null) {
|
|
@@ -24288,12 +24300,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24288
24300
|
}
|
|
24289
24301
|
if (output.video != null) {
|
|
24290
24302
|
return {
|
|
24291
|
-
video: de_VideoBlock(output.video,
|
|
24303
|
+
video: de_VideoBlock(output.video, context3)
|
|
24292
24304
|
};
|
|
24293
24305
|
}
|
|
24294
24306
|
return { $unknown: Object.entries(output)[0] };
|
|
24295
24307
|
};
|
|
24296
|
-
var de_ContentBlockDelta = (output,
|
|
24308
|
+
var de_ContentBlockDelta = (output, context3) => {
|
|
24297
24309
|
if (output.citation != null) {
|
|
24298
24310
|
return {
|
|
24299
24311
|
citation: smithyClient._json(output.citation)
|
|
@@ -24301,7 +24313,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24301
24313
|
}
|
|
24302
24314
|
if (output.reasoningContent != null) {
|
|
24303
24315
|
return {
|
|
24304
|
-
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent),
|
|
24316
|
+
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context3)
|
|
24305
24317
|
};
|
|
24306
24318
|
}
|
|
24307
24319
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -24314,27 +24326,27 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24314
24326
|
}
|
|
24315
24327
|
return { $unknown: Object.entries(output)[0] };
|
|
24316
24328
|
};
|
|
24317
|
-
var de_ContentBlockDeltaEvent = (output,
|
|
24329
|
+
var de_ContentBlockDeltaEvent = (output, context3) => {
|
|
24318
24330
|
return smithyClient.take(output, {
|
|
24319
24331
|
contentBlockIndex: smithyClient.expectInt32,
|
|
24320
|
-
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2),
|
|
24332
|
+
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context3)
|
|
24321
24333
|
});
|
|
24322
24334
|
};
|
|
24323
|
-
var de_ContentBlocks = (output,
|
|
24335
|
+
var de_ContentBlocks = (output, context3) => {
|
|
24324
24336
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24325
|
-
return de_ContentBlock(core$1.awsExpectUnion(entry),
|
|
24337
|
+
return de_ContentBlock(core$1.awsExpectUnion(entry), context3);
|
|
24326
24338
|
});
|
|
24327
24339
|
return retVal;
|
|
24328
24340
|
};
|
|
24329
|
-
var de_ConverseOutput = (output,
|
|
24341
|
+
var de_ConverseOutput = (output, context3) => {
|
|
24330
24342
|
if (output.message != null) {
|
|
24331
24343
|
return {
|
|
24332
|
-
message: de_Message(output.message,
|
|
24344
|
+
message: de_Message(output.message, context3)
|
|
24333
24345
|
};
|
|
24334
24346
|
}
|
|
24335
24347
|
return { $unknown: Object.entries(output)[0] };
|
|
24336
24348
|
};
|
|
24337
|
-
var de_ConverseStreamMetadataEvent = (output,
|
|
24349
|
+
var de_ConverseStreamMetadataEvent = (output, context3) => {
|
|
24338
24350
|
return smithyClient.take(output, {
|
|
24339
24351
|
metrics: smithyClient._json,
|
|
24340
24352
|
performanceConfig: smithyClient._json,
|
|
@@ -24342,31 +24354,31 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24342
24354
|
usage: smithyClient._json
|
|
24343
24355
|
});
|
|
24344
24356
|
};
|
|
24345
|
-
var de_ConverseStreamTrace = (output,
|
|
24357
|
+
var de_ConverseStreamTrace = (output, context3) => {
|
|
24346
24358
|
return smithyClient.take(output, {
|
|
24347
24359
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24348
24360
|
promptRouter: smithyClient._json
|
|
24349
24361
|
});
|
|
24350
24362
|
};
|
|
24351
|
-
var de_ConverseTrace = (output,
|
|
24363
|
+
var de_ConverseTrace = (output, context3) => {
|
|
24352
24364
|
return smithyClient.take(output, {
|
|
24353
24365
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
24354
24366
|
promptRouter: smithyClient._json
|
|
24355
24367
|
});
|
|
24356
24368
|
};
|
|
24357
|
-
var de_DocumentBlock = (output,
|
|
24369
|
+
var de_DocumentBlock = (output, context3) => {
|
|
24358
24370
|
return smithyClient.take(output, {
|
|
24359
24371
|
citations: smithyClient._json,
|
|
24360
24372
|
context: smithyClient.expectString,
|
|
24361
24373
|
format: smithyClient.expectString,
|
|
24362
24374
|
name: smithyClient.expectString,
|
|
24363
|
-
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2),
|
|
24375
|
+
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context3)
|
|
24364
24376
|
});
|
|
24365
24377
|
};
|
|
24366
|
-
var de_DocumentSource = (output,
|
|
24378
|
+
var de_DocumentSource = (output, context3) => {
|
|
24367
24379
|
if (output.bytes != null) {
|
|
24368
24380
|
return {
|
|
24369
|
-
bytes:
|
|
24381
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24370
24382
|
};
|
|
24371
24383
|
}
|
|
24372
24384
|
if (output.content != null) {
|
|
@@ -24384,7 +24396,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24384
24396
|
}
|
|
24385
24397
|
return { $unknown: Object.entries(output)[0] };
|
|
24386
24398
|
};
|
|
24387
|
-
var de_GuardrailAssessment = (output,
|
|
24399
|
+
var de_GuardrailAssessment = (output, context3) => {
|
|
24388
24400
|
return smithyClient.take(output, {
|
|
24389
24401
|
automatedReasoningPolicy: (_2) => de_GuardrailAutomatedReasoningPolicyAssessment(_2),
|
|
24390
24402
|
contentPolicy: smithyClient._json,
|
|
@@ -24395,13 +24407,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24395
24407
|
wordPolicy: smithyClient._json
|
|
24396
24408
|
});
|
|
24397
24409
|
};
|
|
24398
|
-
var de_GuardrailAssessmentList = (output,
|
|
24410
|
+
var de_GuardrailAssessmentList = (output, context3) => {
|
|
24399
24411
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24400
24412
|
return de_GuardrailAssessment(entry);
|
|
24401
24413
|
});
|
|
24402
24414
|
return retVal;
|
|
24403
24415
|
};
|
|
24404
|
-
var de_GuardrailAssessmentListMap = (output,
|
|
24416
|
+
var de_GuardrailAssessmentListMap = (output, context3) => {
|
|
24405
24417
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24406
24418
|
if (value === null) {
|
|
24407
24419
|
return acc;
|
|
@@ -24410,7 +24422,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24410
24422
|
return acc;
|
|
24411
24423
|
}, {});
|
|
24412
24424
|
};
|
|
24413
|
-
var de_GuardrailAssessmentMap = (output,
|
|
24425
|
+
var de_GuardrailAssessmentMap = (output, context3) => {
|
|
24414
24426
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
24415
24427
|
if (value === null) {
|
|
24416
24428
|
return acc;
|
|
@@ -24419,7 +24431,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24419
24431
|
return acc;
|
|
24420
24432
|
}, {});
|
|
24421
24433
|
};
|
|
24422
|
-
var de_GuardrailAutomatedReasoningFinding = (output,
|
|
24434
|
+
var de_GuardrailAutomatedReasoningFinding = (output, context3) => {
|
|
24423
24435
|
if (output.impossible != null) {
|
|
24424
24436
|
return {
|
|
24425
24437
|
impossible: de_GuardrailAutomatedReasoningImpossibleFinding(output.impossible)
|
|
@@ -24457,32 +24469,32 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24457
24469
|
}
|
|
24458
24470
|
return { $unknown: Object.entries(output)[0] };
|
|
24459
24471
|
};
|
|
24460
|
-
var de_GuardrailAutomatedReasoningFindingList = (output,
|
|
24472
|
+
var de_GuardrailAutomatedReasoningFindingList = (output, context3) => {
|
|
24461
24473
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24462
24474
|
return de_GuardrailAutomatedReasoningFinding(core$1.awsExpectUnion(entry));
|
|
24463
24475
|
});
|
|
24464
24476
|
return retVal;
|
|
24465
24477
|
};
|
|
24466
|
-
var de_GuardrailAutomatedReasoningImpossibleFinding = (output,
|
|
24478
|
+
var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context3) => {
|
|
24467
24479
|
return smithyClient.take(output, {
|
|
24468
24480
|
contradictingRules: smithyClient._json,
|
|
24469
24481
|
logicWarning: smithyClient._json,
|
|
24470
24482
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24471
24483
|
});
|
|
24472
24484
|
};
|
|
24473
|
-
var de_GuardrailAutomatedReasoningInvalidFinding = (output,
|
|
24485
|
+
var de_GuardrailAutomatedReasoningInvalidFinding = (output, context3) => {
|
|
24474
24486
|
return smithyClient.take(output, {
|
|
24475
24487
|
contradictingRules: smithyClient._json,
|
|
24476
24488
|
logicWarning: smithyClient._json,
|
|
24477
24489
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24478
24490
|
});
|
|
24479
24491
|
};
|
|
24480
|
-
var de_GuardrailAutomatedReasoningPolicyAssessment = (output,
|
|
24492
|
+
var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context3) => {
|
|
24481
24493
|
return smithyClient.take(output, {
|
|
24482
24494
|
findings: (_2) => de_GuardrailAutomatedReasoningFindingList(_2)
|
|
24483
24495
|
});
|
|
24484
24496
|
};
|
|
24485
|
-
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output,
|
|
24497
|
+
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context3) => {
|
|
24486
24498
|
return smithyClient.take(output, {
|
|
24487
24499
|
claimsFalseScenario: smithyClient._json,
|
|
24488
24500
|
claimsTrueScenario: smithyClient._json,
|
|
@@ -24490,7 +24502,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24490
24502
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24491
24503
|
});
|
|
24492
24504
|
};
|
|
24493
|
-
var de_GuardrailAutomatedReasoningTranslation = (output,
|
|
24505
|
+
var de_GuardrailAutomatedReasoningTranslation = (output, context3) => {
|
|
24494
24506
|
return smithyClient.take(output, {
|
|
24495
24507
|
claims: smithyClient._json,
|
|
24496
24508
|
confidence: smithyClient.limitedParseDouble,
|
|
@@ -24499,30 +24511,30 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24499
24511
|
untranslatedPremises: smithyClient._json
|
|
24500
24512
|
});
|
|
24501
24513
|
};
|
|
24502
|
-
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output,
|
|
24514
|
+
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context3) => {
|
|
24503
24515
|
return smithyClient.take(output, {
|
|
24504
24516
|
differenceScenarios: smithyClient._json,
|
|
24505
24517
|
options: (_2) => de_GuardrailAutomatedReasoningTranslationOptionList(_2)
|
|
24506
24518
|
});
|
|
24507
24519
|
};
|
|
24508
|
-
var de_GuardrailAutomatedReasoningTranslationList = (output,
|
|
24520
|
+
var de_GuardrailAutomatedReasoningTranslationList = (output, context3) => {
|
|
24509
24521
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24510
24522
|
return de_GuardrailAutomatedReasoningTranslation(entry);
|
|
24511
24523
|
});
|
|
24512
24524
|
return retVal;
|
|
24513
24525
|
};
|
|
24514
|
-
var de_GuardrailAutomatedReasoningTranslationOption = (output,
|
|
24526
|
+
var de_GuardrailAutomatedReasoningTranslationOption = (output, context3) => {
|
|
24515
24527
|
return smithyClient.take(output, {
|
|
24516
24528
|
translations: (_2) => de_GuardrailAutomatedReasoningTranslationList(_2)
|
|
24517
24529
|
});
|
|
24518
24530
|
};
|
|
24519
|
-
var de_GuardrailAutomatedReasoningTranslationOptionList = (output,
|
|
24531
|
+
var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context3) => {
|
|
24520
24532
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24521
24533
|
return de_GuardrailAutomatedReasoningTranslationOption(entry);
|
|
24522
24534
|
});
|
|
24523
24535
|
return retVal;
|
|
24524
24536
|
};
|
|
24525
|
-
var de_GuardrailAutomatedReasoningValidFinding = (output,
|
|
24537
|
+
var de_GuardrailAutomatedReasoningValidFinding = (output, context3) => {
|
|
24526
24538
|
return smithyClient.take(output, {
|
|
24527
24539
|
claimsTrueScenario: smithyClient._json,
|
|
24528
24540
|
logicWarning: smithyClient._json,
|
|
@@ -24530,7 +24542,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24530
24542
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
24531
24543
|
});
|
|
24532
24544
|
};
|
|
24533
|
-
var de_GuardrailContextualGroundingFilter = (output,
|
|
24545
|
+
var de_GuardrailContextualGroundingFilter = (output, context3) => {
|
|
24534
24546
|
return smithyClient.take(output, {
|
|
24535
24547
|
action: smithyClient.expectString,
|
|
24536
24548
|
detected: smithyClient.expectBoolean,
|
|
@@ -24539,21 +24551,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24539
24551
|
type: smithyClient.expectString
|
|
24540
24552
|
});
|
|
24541
24553
|
};
|
|
24542
|
-
var de_GuardrailContextualGroundingFilters = (output,
|
|
24554
|
+
var de_GuardrailContextualGroundingFilters = (output, context3) => {
|
|
24543
24555
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24544
24556
|
return de_GuardrailContextualGroundingFilter(entry);
|
|
24545
24557
|
});
|
|
24546
24558
|
return retVal;
|
|
24547
24559
|
};
|
|
24548
|
-
var de_GuardrailContextualGroundingPolicyAssessment = (output,
|
|
24560
|
+
var de_GuardrailContextualGroundingPolicyAssessment = (output, context3) => {
|
|
24549
24561
|
return smithyClient.take(output, {
|
|
24550
24562
|
filters: (_2) => de_GuardrailContextualGroundingFilters(_2)
|
|
24551
24563
|
});
|
|
24552
24564
|
};
|
|
24553
|
-
var de_GuardrailConverseContentBlock = (output,
|
|
24565
|
+
var de_GuardrailConverseContentBlock = (output, context3) => {
|
|
24554
24566
|
if (output.image != null) {
|
|
24555
24567
|
return {
|
|
24556
|
-
image: de_GuardrailConverseImageBlock(output.image,
|
|
24568
|
+
image: de_GuardrailConverseImageBlock(output.image, context3)
|
|
24557
24569
|
};
|
|
24558
24570
|
}
|
|
24559
24571
|
if (output.text != null) {
|
|
@@ -24563,21 +24575,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24563
24575
|
}
|
|
24564
24576
|
return { $unknown: Object.entries(output)[0] };
|
|
24565
24577
|
};
|
|
24566
|
-
var de_GuardrailConverseImageBlock = (output,
|
|
24578
|
+
var de_GuardrailConverseImageBlock = (output, context3) => {
|
|
24567
24579
|
return smithyClient.take(output, {
|
|
24568
24580
|
format: smithyClient.expectString,
|
|
24569
|
-
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2),
|
|
24581
|
+
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context3)
|
|
24570
24582
|
});
|
|
24571
24583
|
};
|
|
24572
|
-
var de_GuardrailConverseImageSource = (output,
|
|
24584
|
+
var de_GuardrailConverseImageSource = (output, context3) => {
|
|
24573
24585
|
if (output.bytes != null) {
|
|
24574
24586
|
return {
|
|
24575
|
-
bytes:
|
|
24587
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24576
24588
|
};
|
|
24577
24589
|
}
|
|
24578
24590
|
return { $unknown: Object.entries(output)[0] };
|
|
24579
24591
|
};
|
|
24580
|
-
var de_GuardrailTraceAssessment = (output,
|
|
24592
|
+
var de_GuardrailTraceAssessment = (output, context3) => {
|
|
24581
24593
|
return smithyClient.take(output, {
|
|
24582
24594
|
actionReason: smithyClient.expectString,
|
|
24583
24595
|
inputAssessment: (_2) => de_GuardrailAssessmentMap(_2),
|
|
@@ -24585,16 +24597,16 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24585
24597
|
outputAssessments: (_2) => de_GuardrailAssessmentListMap(_2)
|
|
24586
24598
|
});
|
|
24587
24599
|
};
|
|
24588
|
-
var de_ImageBlock = (output,
|
|
24600
|
+
var de_ImageBlock = (output, context3) => {
|
|
24589
24601
|
return smithyClient.take(output, {
|
|
24590
24602
|
format: smithyClient.expectString,
|
|
24591
|
-
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2),
|
|
24603
|
+
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context3)
|
|
24592
24604
|
});
|
|
24593
24605
|
};
|
|
24594
|
-
var de_ImageSource = (output,
|
|
24606
|
+
var de_ImageSource = (output, context3) => {
|
|
24595
24607
|
if (output.bytes != null) {
|
|
24596
24608
|
return {
|
|
24597
|
-
bytes:
|
|
24609
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24598
24610
|
};
|
|
24599
24611
|
}
|
|
24600
24612
|
if (output.s3Location != null) {
|
|
@@ -24604,24 +24616,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24604
24616
|
}
|
|
24605
24617
|
return { $unknown: Object.entries(output)[0] };
|
|
24606
24618
|
};
|
|
24607
|
-
var de_Message = (output,
|
|
24619
|
+
var de_Message = (output, context3) => {
|
|
24608
24620
|
return smithyClient.take(output, {
|
|
24609
|
-
content: (_2) => de_ContentBlocks(_2,
|
|
24621
|
+
content: (_2) => de_ContentBlocks(_2, context3),
|
|
24610
24622
|
role: smithyClient.expectString
|
|
24611
24623
|
});
|
|
24612
24624
|
};
|
|
24613
|
-
var de_MessageStopEvent = (output,
|
|
24625
|
+
var de_MessageStopEvent = (output, context3) => {
|
|
24614
24626
|
return smithyClient.take(output, {
|
|
24615
24627
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
24616
24628
|
stopReason: smithyClient.expectString
|
|
24617
24629
|
});
|
|
24618
24630
|
};
|
|
24619
|
-
var de_PayloadPart = (output,
|
|
24631
|
+
var de_PayloadPart = (output, context3) => {
|
|
24620
24632
|
return smithyClient.take(output, {
|
|
24621
|
-
bytes:
|
|
24633
|
+
bytes: context3.base64Decoder
|
|
24622
24634
|
});
|
|
24623
24635
|
};
|
|
24624
|
-
var de_ReasoningContentBlock = (output,
|
|
24636
|
+
var de_ReasoningContentBlock = (output, context3) => {
|
|
24625
24637
|
if (output.reasoningText != null) {
|
|
24626
24638
|
return {
|
|
24627
24639
|
reasoningText: smithyClient._json(output.reasoningText)
|
|
@@ -24629,15 +24641,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24629
24641
|
}
|
|
24630
24642
|
if (output.redactedContent != null) {
|
|
24631
24643
|
return {
|
|
24632
|
-
redactedContent:
|
|
24644
|
+
redactedContent: context3.base64Decoder(output.redactedContent)
|
|
24633
24645
|
};
|
|
24634
24646
|
}
|
|
24635
24647
|
return { $unknown: Object.entries(output)[0] };
|
|
24636
24648
|
};
|
|
24637
|
-
var de_ReasoningContentBlockDelta = (output,
|
|
24649
|
+
var de_ReasoningContentBlockDelta = (output, context3) => {
|
|
24638
24650
|
if (output.redactedContent != null) {
|
|
24639
24651
|
return {
|
|
24640
|
-
redactedContent:
|
|
24652
|
+
redactedContent: context3.base64Decoder(output.redactedContent)
|
|
24641
24653
|
};
|
|
24642
24654
|
}
|
|
24643
24655
|
if (smithyClient.expectString(output.signature) !== void 0) {
|
|
@@ -24648,22 +24660,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24648
24660
|
}
|
|
24649
24661
|
return { $unknown: Object.entries(output)[0] };
|
|
24650
24662
|
};
|
|
24651
|
-
var de_ToolResultBlock = (output,
|
|
24663
|
+
var de_ToolResultBlock = (output, context3) => {
|
|
24652
24664
|
return smithyClient.take(output, {
|
|
24653
|
-
content: (_2) => de_ToolResultContentBlocks(_2,
|
|
24665
|
+
content: (_2) => de_ToolResultContentBlocks(_2, context3),
|
|
24654
24666
|
status: smithyClient.expectString,
|
|
24655
24667
|
toolUseId: smithyClient.expectString
|
|
24656
24668
|
});
|
|
24657
24669
|
};
|
|
24658
|
-
var de_ToolResultContentBlock = (output,
|
|
24670
|
+
var de_ToolResultContentBlock = (output, context3) => {
|
|
24659
24671
|
if (output.document != null) {
|
|
24660
24672
|
return {
|
|
24661
|
-
document: de_DocumentBlock(output.document,
|
|
24673
|
+
document: de_DocumentBlock(output.document, context3)
|
|
24662
24674
|
};
|
|
24663
24675
|
}
|
|
24664
24676
|
if (output.image != null) {
|
|
24665
24677
|
return {
|
|
24666
|
-
image: de_ImageBlock(output.image,
|
|
24678
|
+
image: de_ImageBlock(output.image, context3)
|
|
24667
24679
|
};
|
|
24668
24680
|
}
|
|
24669
24681
|
if (output.json != null) {
|
|
@@ -24676,34 +24688,34 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24676
24688
|
}
|
|
24677
24689
|
if (output.video != null) {
|
|
24678
24690
|
return {
|
|
24679
|
-
video: de_VideoBlock(output.video,
|
|
24691
|
+
video: de_VideoBlock(output.video, context3)
|
|
24680
24692
|
};
|
|
24681
24693
|
}
|
|
24682
24694
|
return { $unknown: Object.entries(output)[0] };
|
|
24683
24695
|
};
|
|
24684
|
-
var de_ToolResultContentBlocks = (output,
|
|
24696
|
+
var de_ToolResultContentBlocks = (output, context3) => {
|
|
24685
24697
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
24686
|
-
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry),
|
|
24698
|
+
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context3);
|
|
24687
24699
|
});
|
|
24688
24700
|
return retVal;
|
|
24689
24701
|
};
|
|
24690
|
-
var de_ToolUseBlock = (output,
|
|
24702
|
+
var de_ToolUseBlock = (output, context3) => {
|
|
24691
24703
|
return smithyClient.take(output, {
|
|
24692
24704
|
input: (_2) => de_Document(_2),
|
|
24693
24705
|
name: smithyClient.expectString,
|
|
24694
24706
|
toolUseId: smithyClient.expectString
|
|
24695
24707
|
});
|
|
24696
24708
|
};
|
|
24697
|
-
var de_VideoBlock = (output,
|
|
24709
|
+
var de_VideoBlock = (output, context3) => {
|
|
24698
24710
|
return smithyClient.take(output, {
|
|
24699
24711
|
format: smithyClient.expectString,
|
|
24700
|
-
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2),
|
|
24712
|
+
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context3)
|
|
24701
24713
|
});
|
|
24702
24714
|
};
|
|
24703
|
-
var de_VideoSource = (output,
|
|
24715
|
+
var de_VideoSource = (output, context3) => {
|
|
24704
24716
|
if (output.bytes != null) {
|
|
24705
24717
|
return {
|
|
24706
|
-
bytes:
|
|
24718
|
+
bytes: context3.base64Decoder(output.bytes)
|
|
24707
24719
|
};
|
|
24708
24720
|
}
|
|
24709
24721
|
if (output.s3Location != null) {
|
|
@@ -24713,7 +24725,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
24713
24725
|
}
|
|
24714
24726
|
return { $unknown: Object.entries(output)[0] };
|
|
24715
24727
|
};
|
|
24716
|
-
var de_Document = (output,
|
|
24728
|
+
var de_Document = (output, context3) => {
|
|
24717
24729
|
return output;
|
|
24718
24730
|
};
|
|
24719
24731
|
var deserializeMetadata3 = (output) => ({
|
|
@@ -34781,6 +34793,47 @@ var init_simpleTelemetry = __esm({
|
|
|
34781
34793
|
}
|
|
34782
34794
|
});
|
|
34783
34795
|
|
|
34796
|
+
// src/agent/fileSpanExporter.js
|
|
34797
|
+
var import_fs4, import_core17, ExportResultCode;
|
|
34798
|
+
var init_fileSpanExporter = __esm({
|
|
34799
|
+
"src/agent/fileSpanExporter.js"() {
|
|
34800
|
+
"use strict";
|
|
34801
|
+
import_fs4 = require("fs");
|
|
34802
|
+
import_core17 = __toESM(require("@opentelemetry/core"), 1);
|
|
34803
|
+
({ ExportResultCode } = import_core17.default);
|
|
34804
|
+
}
|
|
34805
|
+
});
|
|
34806
|
+
|
|
34807
|
+
// src/agent/telemetry.js
|
|
34808
|
+
var import_sdk_node, import_resources, import_semantic_conventions, import_api, import_exporter_trace_otlp_http, import_sdk_trace_base, import_fs5, import_path8, NodeSDK, Resource, OTLPTraceExporter, BatchSpanProcessor, ConsoleSpanExporter;
|
|
34809
|
+
var init_telemetry = __esm({
|
|
34810
|
+
"src/agent/telemetry.js"() {
|
|
34811
|
+
"use strict";
|
|
34812
|
+
import_sdk_node = __toESM(require("@opentelemetry/sdk-node"), 1);
|
|
34813
|
+
import_resources = __toESM(require("@opentelemetry/resources"), 1);
|
|
34814
|
+
import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
34815
|
+
import_api = require("@opentelemetry/api");
|
|
34816
|
+
import_exporter_trace_otlp_http = __toESM(require("@opentelemetry/exporter-trace-otlp-http"), 1);
|
|
34817
|
+
import_sdk_trace_base = __toESM(require("@opentelemetry/sdk-trace-base"), 1);
|
|
34818
|
+
import_fs5 = require("fs");
|
|
34819
|
+
import_path8 = require("path");
|
|
34820
|
+
init_fileSpanExporter();
|
|
34821
|
+
({ NodeSDK } = import_sdk_node.default);
|
|
34822
|
+
({ Resource } = import_resources.default);
|
|
34823
|
+
({ OTLPTraceExporter } = import_exporter_trace_otlp_http.default);
|
|
34824
|
+
({ BatchSpanProcessor, ConsoleSpanExporter } = import_sdk_trace_base.default);
|
|
34825
|
+
}
|
|
34826
|
+
});
|
|
34827
|
+
|
|
34828
|
+
// src/agent/appTracer.js
|
|
34829
|
+
var import_api2;
|
|
34830
|
+
var init_appTracer = __esm({
|
|
34831
|
+
"src/agent/appTracer.js"() {
|
|
34832
|
+
"use strict";
|
|
34833
|
+
import_api2 = require("@opentelemetry/api");
|
|
34834
|
+
}
|
|
34835
|
+
});
|
|
34836
|
+
|
|
34784
34837
|
// node_modules/balanced-match/index.js
|
|
34785
34838
|
var require_balanced_match = __commonJS({
|
|
34786
34839
|
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
@@ -36555,7 +36608,7 @@ var init_esm2 = __esm({
|
|
|
36555
36608
|
free: c3.#free,
|
|
36556
36609
|
// methods
|
|
36557
36610
|
isBackgroundFetch: (p3) => c3.#isBackgroundFetch(p3),
|
|
36558
|
-
backgroundFetch: (k3, index, options,
|
|
36611
|
+
backgroundFetch: (k3, index, options, context3) => c3.#backgroundFetch(k3, index, options, context3),
|
|
36559
36612
|
moveToTail: (index) => c3.#moveToTail(index),
|
|
36560
36613
|
indexes: (options) => c3.#indexes(options),
|
|
36561
36614
|
rindexes: (options) => c3.#rindexes(options),
|
|
@@ -37342,7 +37395,7 @@ var init_esm2 = __esm({
|
|
|
37342
37395
|
const v3 = this.#valList[index];
|
|
37343
37396
|
return this.#isBackgroundFetch(v3) ? v3.__staleWhileFetching : v3;
|
|
37344
37397
|
}
|
|
37345
|
-
#backgroundFetch(k3, index, options,
|
|
37398
|
+
#backgroundFetch(k3, index, options, context3) {
|
|
37346
37399
|
const v3 = index === void 0 ? void 0 : this.#valList[index];
|
|
37347
37400
|
if (this.#isBackgroundFetch(v3)) {
|
|
37348
37401
|
return v3;
|
|
@@ -37355,7 +37408,7 @@ var init_esm2 = __esm({
|
|
|
37355
37408
|
const fetchOpts = {
|
|
37356
37409
|
signal: ac.signal,
|
|
37357
37410
|
options,
|
|
37358
|
-
context
|
|
37411
|
+
context: context3
|
|
37359
37412
|
};
|
|
37360
37413
|
const cb = (v4, updateCache = false) => {
|
|
37361
37414
|
const { aborted } = ac.signal;
|
|
@@ -37472,7 +37525,7 @@ var init_esm2 = __esm({
|
|
|
37472
37525
|
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
|
37473
37526
|
ignoreFetchAbort = this.ignoreFetchAbort,
|
|
37474
37527
|
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
|
37475
|
-
context,
|
|
37528
|
+
context: context3,
|
|
37476
37529
|
forceRefresh = false,
|
|
37477
37530
|
status,
|
|
37478
37531
|
signal
|
|
@@ -37507,7 +37560,7 @@ var init_esm2 = __esm({
|
|
|
37507
37560
|
if (index === void 0) {
|
|
37508
37561
|
if (status)
|
|
37509
37562
|
status.fetch = "miss";
|
|
37510
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37563
|
+
const p3 = this.#backgroundFetch(k3, index, options, context3);
|
|
37511
37564
|
return p3.__returned = p3;
|
|
37512
37565
|
} else {
|
|
37513
37566
|
const v3 = this.#valList[index];
|
|
@@ -37532,7 +37585,7 @@ var init_esm2 = __esm({
|
|
|
37532
37585
|
this.#statusTTL(status, index);
|
|
37533
37586
|
return v3;
|
|
37534
37587
|
}
|
|
37535
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
37588
|
+
const p3 = this.#backgroundFetch(k3, index, options, context3);
|
|
37536
37589
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
37537
37590
|
const staleVal = hasStale && allowStale;
|
|
37538
37591
|
if (status) {
|
|
@@ -37554,13 +37607,13 @@ var init_esm2 = __esm({
|
|
|
37554
37607
|
if (!memoMethod) {
|
|
37555
37608
|
throw new Error("no memoMethod provided to constructor");
|
|
37556
37609
|
}
|
|
37557
|
-
const { context, forceRefresh, ...options } = memoOptions;
|
|
37610
|
+
const { context: context3, forceRefresh, ...options } = memoOptions;
|
|
37558
37611
|
const v3 = this.get(k3, options);
|
|
37559
37612
|
if (!forceRefresh && v3 !== void 0)
|
|
37560
37613
|
return v3;
|
|
37561
37614
|
const vv = memoMethod(k3, v3, {
|
|
37562
37615
|
options,
|
|
37563
|
-
context
|
|
37616
|
+
context: context3
|
|
37564
37617
|
});
|
|
37565
37618
|
this.set(k3, vv, options);
|
|
37566
37619
|
return vv;
|
|
@@ -38614,22 +38667,22 @@ var init_esm3 = __esm({
|
|
|
38614
38667
|
});
|
|
38615
38668
|
|
|
38616
38669
|
// node_modules/path-scurry/dist/esm/index.js
|
|
38617
|
-
var import_node_path, import_node_url,
|
|
38670
|
+
var import_node_path, import_node_url, import_fs6, 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;
|
|
38618
38671
|
var init_esm4 = __esm({
|
|
38619
38672
|
"node_modules/path-scurry/dist/esm/index.js"() {
|
|
38620
38673
|
init_esm2();
|
|
38621
38674
|
import_node_path = require("node:path");
|
|
38622
38675
|
import_node_url = require("node:url");
|
|
38623
|
-
|
|
38676
|
+
import_fs6 = require("fs");
|
|
38624
38677
|
actualFS = __toESM(require("node:fs"), 1);
|
|
38625
38678
|
import_promises = require("node:fs/promises");
|
|
38626
38679
|
init_esm3();
|
|
38627
|
-
realpathSync =
|
|
38680
|
+
realpathSync = import_fs6.realpathSync.native;
|
|
38628
38681
|
defaultFS = {
|
|
38629
|
-
lstatSync:
|
|
38630
|
-
readdir:
|
|
38631
|
-
readdirSync:
|
|
38632
|
-
readlinkSync:
|
|
38682
|
+
lstatSync: import_fs6.lstatSync,
|
|
38683
|
+
readdir: import_fs6.readdir,
|
|
38684
|
+
readdirSync: import_fs6.readdirSync,
|
|
38685
|
+
readlinkSync: import_fs6.readlinkSync,
|
|
38633
38686
|
realpathSync,
|
|
38634
38687
|
promises: {
|
|
38635
38688
|
lstat: import_promises.lstat,
|
|
@@ -41524,7 +41577,7 @@ function createWrappedTools(baseTools) {
|
|
|
41524
41577
|
}
|
|
41525
41578
|
return wrappedTools;
|
|
41526
41579
|
}
|
|
41527
|
-
var import_child_process9, import_util12, import_crypto3, import_events,
|
|
41580
|
+
var import_child_process9, import_util12, import_crypto3, import_events, import_fs7, import_fs8, import_path9, toolCallEmitter, activeToolExecutions, wrapToolWithEmitter, listFilesTool, searchFilesTool, listFilesToolInstance, searchFilesToolInstance;
|
|
41528
41581
|
var init_probeTool = __esm({
|
|
41529
41582
|
"src/agent/probeTool.js"() {
|
|
41530
41583
|
"use strict";
|
|
@@ -41533,9 +41586,9 @@ var init_probeTool = __esm({
|
|
|
41533
41586
|
import_util12 = require("util");
|
|
41534
41587
|
import_crypto3 = require("crypto");
|
|
41535
41588
|
import_events = require("events");
|
|
41536
|
-
|
|
41537
|
-
|
|
41538
|
-
|
|
41589
|
+
import_fs7 = __toESM(require("fs"), 1);
|
|
41590
|
+
import_fs8 = require("fs");
|
|
41591
|
+
import_path9 = __toESM(require("path"), 1);
|
|
41539
41592
|
init_esm5();
|
|
41540
41593
|
toolCallEmitter = new import_events.EventEmitter();
|
|
41541
41594
|
activeToolExecutions = /* @__PURE__ */ new Map();
|
|
@@ -41623,17 +41676,17 @@ var init_probeTool = __esm({
|
|
|
41623
41676
|
execute: async (params) => {
|
|
41624
41677
|
const { directory = ".", workingDirectory } = params;
|
|
41625
41678
|
const baseCwd = workingDirectory || process.cwd();
|
|
41626
|
-
const secureBaseDir =
|
|
41679
|
+
const secureBaseDir = import_path9.default.resolve(baseCwd);
|
|
41627
41680
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
41628
41681
|
let targetDir;
|
|
41629
|
-
if (
|
|
41630
|
-
targetDir =
|
|
41631
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41682
|
+
if (import_path9.default.isAbsolute(directory)) {
|
|
41683
|
+
targetDir = import_path9.default.resolve(directory);
|
|
41684
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41632
41685
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
41633
41686
|
}
|
|
41634
41687
|
} else {
|
|
41635
|
-
targetDir =
|
|
41636
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41688
|
+
targetDir = import_path9.default.resolve(secureBaseDir, directory);
|
|
41689
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41637
41690
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
41638
41691
|
}
|
|
41639
41692
|
}
|
|
@@ -41642,7 +41695,7 @@ var init_probeTool = __esm({
|
|
|
41642
41695
|
console.log(`[DEBUG] Listing files in directory: ${targetDir}`);
|
|
41643
41696
|
}
|
|
41644
41697
|
try {
|
|
41645
|
-
const files = await
|
|
41698
|
+
const files = await import_fs8.promises.readdir(targetDir, { withFileTypes: true });
|
|
41646
41699
|
const formatSize = (size) => {
|
|
41647
41700
|
if (size < 1024) return `${size}B`;
|
|
41648
41701
|
if (size < 1024 * 1024) return `${(size / 1024).toFixed(1)}K`;
|
|
@@ -41651,10 +41704,10 @@ var init_probeTool = __esm({
|
|
|
41651
41704
|
};
|
|
41652
41705
|
const entries = await Promise.all(files.map(async (file) => {
|
|
41653
41706
|
const isDirectory = file.isDirectory();
|
|
41654
|
-
const fullPath =
|
|
41707
|
+
const fullPath = import_path9.default.join(targetDir, file.name);
|
|
41655
41708
|
let size = 0;
|
|
41656
41709
|
try {
|
|
41657
|
-
const stats = await
|
|
41710
|
+
const stats = await import_fs8.promises.stat(fullPath);
|
|
41658
41711
|
size = stats.size;
|
|
41659
41712
|
} catch (statError) {
|
|
41660
41713
|
if (debug) {
|
|
@@ -41696,17 +41749,17 @@ var init_probeTool = __esm({
|
|
|
41696
41749
|
throw new Error("Pattern is required for file search");
|
|
41697
41750
|
}
|
|
41698
41751
|
const baseCwd = workingDirectory || process.cwd();
|
|
41699
|
-
const secureBaseDir =
|
|
41752
|
+
const secureBaseDir = import_path9.default.resolve(baseCwd);
|
|
41700
41753
|
const isDependencyPath = directory.startsWith("/dep/") || directory.startsWith("go:") || directory.startsWith("js:") || directory.startsWith("rust:");
|
|
41701
41754
|
let targetDir;
|
|
41702
|
-
if (
|
|
41703
|
-
targetDir =
|
|
41704
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41755
|
+
if (import_path9.default.isAbsolute(directory)) {
|
|
41756
|
+
targetDir = import_path9.default.resolve(directory);
|
|
41757
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41705
41758
|
throw new Error(`Path traversal attempt detected. Cannot access directory outside workspace: ${directory}`);
|
|
41706
41759
|
}
|
|
41707
41760
|
} else {
|
|
41708
|
-
targetDir =
|
|
41709
|
-
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir +
|
|
41761
|
+
targetDir = import_path9.default.resolve(secureBaseDir, directory);
|
|
41762
|
+
if (!isDependencyPath && !targetDir.startsWith(secureBaseDir + import_path9.default.sep) && targetDir !== secureBaseDir) {
|
|
41710
41763
|
throw new Error(`Path traversal attempt detected. Access denied: ${directory}`);
|
|
41711
41764
|
}
|
|
41712
41765
|
}
|
|
@@ -41779,6 +41832,8 @@ var init_index = __esm({
|
|
|
41779
41832
|
init_bash();
|
|
41780
41833
|
init_ProbeAgent();
|
|
41781
41834
|
init_simpleTelemetry();
|
|
41835
|
+
init_telemetry();
|
|
41836
|
+
init_appTracer();
|
|
41782
41837
|
init_probeTool();
|
|
41783
41838
|
init_storage();
|
|
41784
41839
|
init_hooks();
|
|
@@ -55059,8 +55114,8 @@ function mapFlowchartParserError(err, text) {
|
|
|
55059
55114
|
};
|
|
55060
55115
|
}
|
|
55061
55116
|
if (tokType === "QuotedString") {
|
|
55062
|
-
const
|
|
55063
|
-
const inLinkRule =
|
|
55117
|
+
const context3 = err?.context;
|
|
55118
|
+
const inLinkRule = context3?.ruleStack?.includes("linkTextInline") || context3?.ruleStack?.includes("link") || false;
|
|
55064
55119
|
const lineContent = allLines[Math.max(0, line - 1)] || "";
|
|
55065
55120
|
const beforeQuote = lineContent.slice(0, Math.max(0, column - 1));
|
|
55066
55121
|
const hasLinkBefore = beforeQuote.match(/--\s*$|==\s*$|-\.\s*$|-\.-\s*$|\[\s*$/);
|
|
@@ -72651,7 +72706,7 @@ ${fixedContent}
|
|
|
72651
72706
|
};
|
|
72652
72707
|
}
|
|
72653
72708
|
}
|
|
72654
|
-
var HTML_ENTITY_MAP, JsonFixingAgent, MermaidFixingAgent;
|
|
72709
|
+
var HTML_ENTITY_MAP, sessionIdCounter, JsonFixingAgent, MermaidFixingAgent;
|
|
72655
72710
|
var init_schemaUtils = __esm({
|
|
72656
72711
|
"src/agent/schemaUtils.js"() {
|
|
72657
72712
|
"use strict";
|
|
@@ -72667,11 +72722,12 @@ var init_schemaUtils = __esm({
|
|
|
72667
72722
|
// Also handle XML/HTML5 apostrophe entity
|
|
72668
72723
|
" ": " "
|
|
72669
72724
|
};
|
|
72725
|
+
sessionIdCounter = 0;
|
|
72670
72726
|
JsonFixingAgent = class {
|
|
72671
72727
|
constructor(options = {}) {
|
|
72672
72728
|
this.ProbeAgent = null;
|
|
72673
72729
|
this.options = {
|
|
72674
|
-
sessionId: options.sessionId || `json-fixer-${Date.now()}`,
|
|
72730
|
+
sessionId: options.sessionId || `json-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
72675
72731
|
path: options.path || process.cwd(),
|
|
72676
72732
|
provider: options.provider,
|
|
72677
72733
|
model: options.model,
|
|
@@ -72821,7 +72877,7 @@ Provide only the corrected JSON without any markdown formatting or explanations.
|
|
|
72821
72877
|
constructor(options = {}) {
|
|
72822
72878
|
this.ProbeAgent = null;
|
|
72823
72879
|
this.options = {
|
|
72824
|
-
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}`,
|
|
72880
|
+
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
72825
72881
|
path: options.path || process.cwd(),
|
|
72826
72882
|
provider: options.provider,
|
|
72827
72883
|
model: options.model,
|
|
@@ -73006,11 +73062,11 @@ function loadMCPConfigurationFromPath(configPath) {
|
|
|
73006
73062
|
if (!configPath) {
|
|
73007
73063
|
throw new Error("Config path is required");
|
|
73008
73064
|
}
|
|
73009
|
-
if (!(0,
|
|
73065
|
+
if (!(0, import_fs9.existsSync)(configPath)) {
|
|
73010
73066
|
throw new Error(`MCP configuration file not found: ${configPath}`);
|
|
73011
73067
|
}
|
|
73012
73068
|
try {
|
|
73013
|
-
const content = (0,
|
|
73069
|
+
const content = (0, import_fs9.readFileSync)(configPath, "utf8");
|
|
73014
73070
|
const config = JSON.parse(content);
|
|
73015
73071
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73016
73072
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73025,19 +73081,19 @@ function loadMCPConfiguration() {
|
|
|
73025
73081
|
// Environment variable path
|
|
73026
73082
|
process.env.MCP_CONFIG_PATH,
|
|
73027
73083
|
// Local project paths
|
|
73028
|
-
(0,
|
|
73029
|
-
(0,
|
|
73084
|
+
(0, import_path10.join)(process.cwd(), ".mcp", "config.json"),
|
|
73085
|
+
(0, import_path10.join)(process.cwd(), "mcp.config.json"),
|
|
73030
73086
|
// Home directory paths
|
|
73031
|
-
(0,
|
|
73032
|
-
(0,
|
|
73087
|
+
(0, import_path10.join)((0, import_os3.homedir)(), ".config", "probe", "mcp.json"),
|
|
73088
|
+
(0, import_path10.join)((0, import_os3.homedir)(), ".mcp", "config.json"),
|
|
73033
73089
|
// Claude-style config location
|
|
73034
|
-
(0,
|
|
73090
|
+
(0, import_path10.join)((0, import_os3.homedir)(), "Library", "Application Support", "Claude", "mcp_config.json")
|
|
73035
73091
|
].filter(Boolean);
|
|
73036
73092
|
let config = null;
|
|
73037
73093
|
for (const configPath of configPaths) {
|
|
73038
|
-
if ((0,
|
|
73094
|
+
if ((0, import_fs9.existsSync)(configPath)) {
|
|
73039
73095
|
try {
|
|
73040
|
-
const content = (0,
|
|
73096
|
+
const content = (0, import_fs9.readFileSync)(configPath, "utf8");
|
|
73041
73097
|
config = JSON.parse(content);
|
|
73042
73098
|
if (process.env.DEBUG === "1" || process.env.DEBUG_MCP === "1") {
|
|
73043
73099
|
console.error(`[MCP DEBUG] Loaded configuration from: ${configPath}`);
|
|
@@ -73133,22 +73189,22 @@ function parseEnabledServers(config) {
|
|
|
73133
73189
|
}
|
|
73134
73190
|
return servers;
|
|
73135
73191
|
}
|
|
73136
|
-
var
|
|
73192
|
+
var import_fs9, import_path10, import_os3, import_url4, __filename4, __dirname4, DEFAULT_CONFIG;
|
|
73137
73193
|
var init_config = __esm({
|
|
73138
73194
|
"src/agent/mcp/config.js"() {
|
|
73139
73195
|
"use strict";
|
|
73140
|
-
|
|
73141
|
-
|
|
73196
|
+
import_fs9 = require("fs");
|
|
73197
|
+
import_path10 = require("path");
|
|
73142
73198
|
import_os3 = require("os");
|
|
73143
73199
|
import_url4 = require("url");
|
|
73144
73200
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
73145
|
-
__dirname4 = (0,
|
|
73201
|
+
__dirname4 = (0, import_path10.dirname)(__filename4);
|
|
73146
73202
|
DEFAULT_CONFIG = {
|
|
73147
73203
|
mcpServers: {
|
|
73148
73204
|
// Example probe server configuration
|
|
73149
73205
|
"probe-local": {
|
|
73150
73206
|
command: "node",
|
|
73151
|
-
args: [(0,
|
|
73207
|
+
args: [(0, import_path10.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
|
|
73152
73208
|
transport: "stdio",
|
|
73153
73209
|
enabled: false
|
|
73154
73210
|
},
|
|
@@ -73765,7 +73821,7 @@ __export(ProbeAgent_exports, {
|
|
|
73765
73821
|
ProbeAgent: () => ProbeAgent
|
|
73766
73822
|
});
|
|
73767
73823
|
module.exports = __toCommonJS(ProbeAgent_exports);
|
|
73768
|
-
var import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2,
|
|
73824
|
+
var import_anthropic, import_openai, import_google, import_ai3, import_crypto5, import_events2, import_fs10, import_promises2, import_path11, MAX_TOOL_ITERATIONS, MAX_HISTORY_MESSAGES, SUPPORTED_IMAGE_EXTENSIONS, MAX_IMAGE_FILE_SIZE, ProbeAgent;
|
|
73769
73825
|
var init_ProbeAgent = __esm({
|
|
73770
73826
|
"src/agent/ProbeAgent.js"() {
|
|
73771
73827
|
import_anthropic = require("@ai-sdk/anthropic");
|
|
@@ -73775,9 +73831,9 @@ var init_ProbeAgent = __esm({
|
|
|
73775
73831
|
import_ai3 = require("ai");
|
|
73776
73832
|
import_crypto5 = require("crypto");
|
|
73777
73833
|
import_events2 = require("events");
|
|
73778
|
-
|
|
73834
|
+
import_fs10 = require("fs");
|
|
73779
73835
|
import_promises2 = require("fs/promises");
|
|
73780
|
-
|
|
73836
|
+
import_path11 = require("path");
|
|
73781
73837
|
init_tokenCounter();
|
|
73782
73838
|
init_InMemoryStorageAdapter();
|
|
73783
73839
|
init_HookManager();
|
|
@@ -74133,7 +74189,7 @@ var init_ProbeAgent = __esm({
|
|
|
74133
74189
|
let resolvedPath2 = imagePath;
|
|
74134
74190
|
if (!imagePath.includes("/") && !imagePath.includes("\\")) {
|
|
74135
74191
|
for (const dir of listFilesDirectories) {
|
|
74136
|
-
const potentialPath = (0,
|
|
74192
|
+
const potentialPath = (0, import_path11.resolve)(dir, imagePath);
|
|
74137
74193
|
const loaded = await this.loadImageIfValid(potentialPath);
|
|
74138
74194
|
if (loaded) {
|
|
74139
74195
|
if (this.debug) {
|
|
@@ -74158,7 +74214,7 @@ var init_ProbeAgent = __esm({
|
|
|
74158
74214
|
let match2;
|
|
74159
74215
|
while ((match2 = fileHeaderPattern.exec(content)) !== null) {
|
|
74160
74216
|
const filePath = match2[1].trim();
|
|
74161
|
-
const dir = (0,
|
|
74217
|
+
const dir = (0, import_path11.dirname)(filePath);
|
|
74162
74218
|
if (dir && dir !== ".") {
|
|
74163
74219
|
directories.push(dir);
|
|
74164
74220
|
if (this.debug) {
|
|
@@ -74203,13 +74259,13 @@ var init_ProbeAgent = __esm({
|
|
|
74203
74259
|
const allowedDirs = this.allowedFolders && this.allowedFolders.length > 0 ? this.allowedFolders : [process.cwd()];
|
|
74204
74260
|
let absolutePath;
|
|
74205
74261
|
let isPathAllowed = false;
|
|
74206
|
-
if ((0,
|
|
74262
|
+
if ((0, import_path11.isAbsolute)(imagePath)) {
|
|
74207
74263
|
absolutePath = imagePath;
|
|
74208
|
-
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0,
|
|
74264
|
+
isPathAllowed = allowedDirs.some((dir) => absolutePath.startsWith((0, import_path11.resolve)(dir)));
|
|
74209
74265
|
} else {
|
|
74210
74266
|
for (const dir of allowedDirs) {
|
|
74211
|
-
const resolvedPath2 = (0,
|
|
74212
|
-
if (resolvedPath2.startsWith((0,
|
|
74267
|
+
const resolvedPath2 = (0, import_path11.resolve)(dir, imagePath);
|
|
74268
|
+
if (resolvedPath2.startsWith((0, import_path11.resolve)(dir))) {
|
|
74213
74269
|
absolutePath = resolvedPath2;
|
|
74214
74270
|
isPathAllowed = true;
|
|
74215
74271
|
break;
|
|
@@ -75044,16 +75100,14 @@ Remember: Use proper XML format with BOTH opening and closing tags:
|
|
|
75044
75100
|
<parameter>value</parameter>
|
|
75045
75101
|
</tool_name>
|
|
75046
75102
|
|
|
75047
|
-
IMPORTANT: A schema was provided for the final output format.
|
|
75103
|
+
IMPORTANT: A schema was provided for the final output format.
|
|
75048
75104
|
|
|
75049
|
-
|
|
75105
|
+
You MUST use attempt_completion to provide your answer:
|
|
75050
75106
|
<attempt_completion>
|
|
75051
|
-
[Your complete answer here - will be automatically formatted to match the schema]
|
|
75107
|
+
[Your complete answer here - provide in natural language, it will be automatically formatted to match the schema]
|
|
75052
75108
|
</attempt_completion>
|
|
75053
75109
|
|
|
75054
|
-
|
|
75055
|
-
|
|
75056
|
-
Do NOT try to format your response as JSON yourself - this will be done automatically.`;
|
|
75110
|
+
Your response will be automatically formatted to JSON. You can provide your answer in natural language or as JSON - either will work.`;
|
|
75057
75111
|
} else {
|
|
75058
75112
|
reminderContent = `Please use one of the available tools to help answer the question, or use attempt_completion if you have enough information to provide a final answer.
|
|
75059
75113
|
|
|
@@ -75290,7 +75344,7 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
75290
75344
|
}
|
|
75291
75345
|
} else if (reachedMaxIterations && options.schema && this.debug) {
|
|
75292
75346
|
console.log("[DEBUG] Skipping schema formatting due to max iterations reached without completion");
|
|
75293
|
-
} else if (completionAttempted && options.schema && !options._schemaFormatted) {
|
|
75347
|
+
} else if (completionAttempted && options.schema && !options._schemaFormatted && !options._skipValidation) {
|
|
75294
75348
|
try {
|
|
75295
75349
|
finalResult = cleanSchemaResponse(finalResult);
|
|
75296
75350
|
if (!this.disableMermaidValidation) {
|
|
@@ -75344,7 +75398,9 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
75344
75398
|
);
|
|
75345
75399
|
finalResult = await this.answer(schemaDefinitionPrompt, [], {
|
|
75346
75400
|
...options,
|
|
75347
|
-
_schemaFormatted: true
|
|
75401
|
+
_schemaFormatted: true,
|
|
75402
|
+
_skipValidation: true
|
|
75403
|
+
// Skip validation in recursive correction calls to prevent loops
|
|
75348
75404
|
});
|
|
75349
75405
|
finalResult = cleanSchemaResponse(finalResult);
|
|
75350
75406
|
validation = validateJsonResponse(finalResult);
|
|
@@ -75384,7 +75440,9 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
75384
75440
|
}
|
|
75385
75441
|
finalResult = await this.answer(correctionPrompt, [], {
|
|
75386
75442
|
...options,
|
|
75387
|
-
_schemaFormatted: true
|
|
75443
|
+
_schemaFormatted: true,
|
|
75444
|
+
_skipValidation: true
|
|
75445
|
+
// Skip validation in recursive correction calls to prevent loops
|
|
75388
75446
|
});
|
|
75389
75447
|
finalResult = cleanSchemaResponse(finalResult);
|
|
75390
75448
|
validation = validateJsonResponse(finalResult, { debug: this.debug });
|