@probelabs/probe 0.6.0-rc146 → 0.6.0-rc148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/binaries/probe-v0.6.0-rc148-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-aarch64-unknown-linux-gnu.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc148-x86_64-unknown-linux-gnu.tar.gz +0 -0
- package/bin/probe +12 -3
- package/build/agent/index.js +18 -404
- package/build/extractor.js +271 -0
- package/build/index.js +1 -7
- package/cjs/agent/ProbeAgent.cjs +659 -697
- package/cjs/index.cjs +610 -1274
- package/package.json +4 -12
- package/scripts/postinstall.js +75 -47
- package/src/extractor.js +271 -0
- package/src/index.js +1 -7
- package/build/agent/appTracer.js +0 -360
- package/build/agent/fileSpanExporter.js +0 -167
- package/build/agent/telemetry.js +0 -219
- package/cjs/agent/telemetry.cjs +0 -358
- package/src/agent/appTracer.js +0 -360
- package/src/agent/fileSpanExporter.js +0 -167
- package/src/agent/telemetry.js +0 -219
package/cjs/index.cjs
CHANGED
|
@@ -8935,11 +8935,11 @@ var require_dist_cjs3 = __commonJS({
|
|
|
8935
8935
|
eventStreamPayloadHandler
|
|
8936
8936
|
});
|
|
8937
8937
|
}
|
|
8938
|
-
var eventStreamHandlingMiddleware = (options) => (next,
|
|
8938
|
+
var eventStreamHandlingMiddleware = (options) => (next, context) => async (args) => {
|
|
8939
8939
|
const { request } = args;
|
|
8940
8940
|
if (!protocolHttp.HttpRequest.isInstance(request))
|
|
8941
8941
|
return next(args);
|
|
8942
|
-
return options.eventStreamPayloadHandler.handle(next, args,
|
|
8942
|
+
return options.eventStreamPayloadHandler.handle(next, args, context);
|
|
8943
8943
|
};
|
|
8944
8944
|
var eventStreamHandlingMiddlewareOptions = {
|
|
8945
8945
|
tags: ["EVENT_STREAM", "SIGNATURE", "HANDLE"],
|
|
@@ -9030,13 +9030,13 @@ var require_dist_cjs4 = __commonJS({
|
|
|
9030
9030
|
var require_dist_cjs5 = __commonJS({
|
|
9031
9031
|
"node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js"(exports2) {
|
|
9032
9032
|
"use strict";
|
|
9033
|
-
var loggerMiddleware = () => (next,
|
|
9033
|
+
var loggerMiddleware = () => (next, context) => async (args) => {
|
|
9034
9034
|
try {
|
|
9035
9035
|
const response = await next(args);
|
|
9036
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
9036
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
|
|
9037
9037
|
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
9038
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
9039
|
-
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ??
|
|
9038
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
9039
|
+
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
|
|
9040
9040
|
const { $metadata, ...outputWithoutMetadata } = response.output;
|
|
9041
9041
|
logger2?.info?.({
|
|
9042
9042
|
clientName,
|
|
@@ -9047,9 +9047,9 @@ var require_dist_cjs5 = __commonJS({
|
|
|
9047
9047
|
});
|
|
9048
9048
|
return response;
|
|
9049
9049
|
} catch (error2) {
|
|
9050
|
-
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } =
|
|
9050
|
+
const { clientName, commandName, logger: logger2, dynamoDbDocumentClientOptions = {} } = context;
|
|
9051
9051
|
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
9052
|
-
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ??
|
|
9052
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
9053
9053
|
logger2?.error?.({
|
|
9054
9054
|
clientName,
|
|
9055
9055
|
commandName,
|
|
@@ -9099,8 +9099,8 @@ var require_invoke_store = __commonJS({
|
|
|
9099
9099
|
/**
|
|
9100
9100
|
* Initialize and run code within an invoke context
|
|
9101
9101
|
*/
|
|
9102
|
-
static run(
|
|
9103
|
-
return this.storage.run({ ...
|
|
9102
|
+
static run(context, fn) {
|
|
9103
|
+
return this.storage.run({ ...context }, fn);
|
|
9104
9104
|
}
|
|
9105
9105
|
/**
|
|
9106
9106
|
* Get the complete current context
|
|
@@ -9112,8 +9112,8 @@ var require_invoke_store = __commonJS({
|
|
|
9112
9112
|
* Get a specific value from the context by key
|
|
9113
9113
|
*/
|
|
9114
9114
|
static get(key) {
|
|
9115
|
-
const
|
|
9116
|
-
return
|
|
9115
|
+
const context = this.storage.getStore();
|
|
9116
|
+
return context?.[key];
|
|
9117
9117
|
}
|
|
9118
9118
|
/**
|
|
9119
9119
|
* Set a custom value in the current context
|
|
@@ -9123,9 +9123,9 @@ var require_invoke_store = __commonJS({
|
|
|
9123
9123
|
if (this.isProtectedKey(key)) {
|
|
9124
9124
|
throw new Error(`Cannot modify protected Lambda context field`);
|
|
9125
9125
|
}
|
|
9126
|
-
const
|
|
9127
|
-
if (
|
|
9128
|
-
|
|
9126
|
+
const context = this.storage.getStore();
|
|
9127
|
+
if (context) {
|
|
9128
|
+
context[key] = value;
|
|
9129
9129
|
}
|
|
9130
9130
|
}
|
|
9131
9131
|
/**
|
|
@@ -9237,7 +9237,7 @@ var import_types, getSmithyContext;
|
|
|
9237
9237
|
var init_getSmithyContext = __esm({
|
|
9238
9238
|
"node_modules/@smithy/core/dist-es/getSmithyContext.js"() {
|
|
9239
9239
|
import_types = __toESM(require_dist_cjs());
|
|
9240
|
-
getSmithyContext = (
|
|
9240
|
+
getSmithyContext = (context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {});
|
|
9241
9241
|
}
|
|
9242
9242
|
});
|
|
9243
9243
|
|
|
@@ -9246,7 +9246,7 @@ var require_dist_cjs7 = __commonJS({
|
|
|
9246
9246
|
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
|
|
9247
9247
|
"use strict";
|
|
9248
9248
|
var types2 = require_dist_cjs();
|
|
9249
|
-
var getSmithyContext9 = (
|
|
9249
|
+
var getSmithyContext9 = (context) => context[types2.SMITHY_CONTEXT_KEY] || (context[types2.SMITHY_CONTEXT_KEY] = {});
|
|
9250
9250
|
var normalizeProvider4 = (input) => {
|
|
9251
9251
|
if (typeof input === "function")
|
|
9252
9252
|
return input;
|
|
@@ -9298,12 +9298,12 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
9298
9298
|
"node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
|
|
9299
9299
|
import_util_middleware = __toESM(require_dist_cjs7());
|
|
9300
9300
|
init_resolveAuthOptions();
|
|
9301
|
-
httpAuthSchemeMiddleware = (config, mwOptions) => (next,
|
|
9302
|
-
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config,
|
|
9301
|
+
httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
|
|
9302
|
+
const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input));
|
|
9303
9303
|
const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];
|
|
9304
9304
|
const resolvedOptions = resolveAuthOptions(options, authSchemePreference);
|
|
9305
9305
|
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
9306
|
-
const smithyContext = (0, import_util_middleware.getSmithyContext)(
|
|
9306
|
+
const smithyContext = (0, import_util_middleware.getSmithyContext)(context);
|
|
9307
9307
|
const failureReasons = [];
|
|
9308
9308
|
for (const option of resolvedOptions) {
|
|
9309
9309
|
const scheme = authSchemes.get(option.schemeId);
|
|
@@ -9316,7 +9316,7 @@ var init_httpAuthSchemeMiddleware = __esm({
|
|
|
9316
9316
|
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
|
|
9317
9317
|
continue;
|
|
9318
9318
|
}
|
|
9319
|
-
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config,
|
|
9319
|
+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
|
|
9320
9320
|
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
|
|
9321
9321
|
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
|
|
9322
9322
|
smithyContext.selectedHttpAuthScheme = {
|
|
@@ -9363,7 +9363,7 @@ var require_dist_cjs8 = __commonJS({
|
|
|
9363
9363
|
"node_modules/@smithy/middleware-serde/dist-cjs/index.js"(exports2) {
|
|
9364
9364
|
"use strict";
|
|
9365
9365
|
var protocolHttp = require_dist_cjs2();
|
|
9366
|
-
var deserializerMiddleware = (options, deserializer) => (next,
|
|
9366
|
+
var deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => {
|
|
9367
9367
|
const { response } = await next(args);
|
|
9368
9368
|
try {
|
|
9369
9369
|
const parsed = await deserializer(response, options);
|
|
@@ -9380,10 +9380,10 @@ var require_dist_cjs8 = __commonJS({
|
|
|
9380
9380
|
try {
|
|
9381
9381
|
error2.message += "\n " + hint;
|
|
9382
9382
|
} catch (e3) {
|
|
9383
|
-
if (!
|
|
9383
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
9384
9384
|
console.warn(hint);
|
|
9385
9385
|
} else {
|
|
9386
|
-
|
|
9386
|
+
context.logger?.warn?.(hint);
|
|
9387
9387
|
}
|
|
9388
9388
|
}
|
|
9389
9389
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -9413,9 +9413,9 @@ var require_dist_cjs8 = __commonJS({
|
|
|
9413
9413
|
return k3.match(pattern);
|
|
9414
9414
|
}) || [void 0, void 0])[1];
|
|
9415
9415
|
};
|
|
9416
|
-
var serializerMiddleware = (options, serializer) => (next,
|
|
9416
|
+
var serializerMiddleware = (options, serializer) => (next, context) => async (args) => {
|
|
9417
9417
|
const endpointConfig = options;
|
|
9418
|
-
const endpoint =
|
|
9418
|
+
const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;
|
|
9419
9419
|
if (!endpoint) {
|
|
9420
9420
|
throw new Error("No valid endpoint provider available.");
|
|
9421
9421
|
}
|
|
@@ -9498,11 +9498,11 @@ var init_httpSigningMiddleware = __esm({
|
|
|
9498
9498
|
};
|
|
9499
9499
|
defaultSuccessHandler = (httpResponse, signingProperties) => {
|
|
9500
9500
|
};
|
|
9501
|
-
httpSigningMiddleware = (config) => (next,
|
|
9501
|
+
httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
9502
9502
|
if (!import_protocol_http.HttpRequest.isInstance(args.request)) {
|
|
9503
9503
|
return next(args);
|
|
9504
9504
|
}
|
|
9505
|
-
const smithyContext = (0, import_util_middleware2.getSmithyContext)(
|
|
9505
|
+
const smithyContext = (0, import_util_middleware2.getSmithyContext)(context);
|
|
9506
9506
|
const scheme = smithyContext.selectedHttpAuthScheme;
|
|
9507
9507
|
if (!scheme) {
|
|
9508
9508
|
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
@@ -11489,14 +11489,14 @@ var import_util_stream, collectBody;
|
|
|
11489
11489
|
var init_collect_stream_body = __esm({
|
|
11490
11490
|
"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"() {
|
|
11491
11491
|
import_util_stream = __toESM(require_dist_cjs18());
|
|
11492
|
-
collectBody = async (streamBody = new Uint8Array(),
|
|
11492
|
+
collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
11493
11493
|
if (streamBody instanceof Uint8Array) {
|
|
11494
11494
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
11495
11495
|
}
|
|
11496
11496
|
if (!streamBody) {
|
|
11497
11497
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
11498
11498
|
}
|
|
11499
|
-
const fromContext =
|
|
11499
|
+
const fromContext = context.streamCollector(streamBody);
|
|
11500
11500
|
return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
11501
11501
|
};
|
|
11502
11502
|
}
|
|
@@ -11547,14 +11547,14 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
11547
11547
|
import_protocol_http2 = __toESM(require_dist_cjs2());
|
|
11548
11548
|
import_util_middleware3 = __toESM(require_dist_cjs7());
|
|
11549
11549
|
init_operation();
|
|
11550
|
-
schemaDeserializationMiddleware = (config) => (next,
|
|
11550
|
+
schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
|
|
11551
11551
|
const { response } = await next(args);
|
|
11552
|
-
const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(
|
|
11552
|
+
const { operationSchema } = (0, import_util_middleware3.getSmithyContext)(context);
|
|
11553
11553
|
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
11554
11554
|
try {
|
|
11555
11555
|
const parsed = await config.protocol.deserializeResponse(operation(ns, n3, t3, i3, o3), {
|
|
11556
11556
|
...config,
|
|
11557
|
-
...
|
|
11557
|
+
...context
|
|
11558
11558
|
}, response);
|
|
11559
11559
|
return {
|
|
11560
11560
|
response,
|
|
@@ -11569,10 +11569,10 @@ var init_schemaDeserializationMiddleware = __esm({
|
|
|
11569
11569
|
try {
|
|
11570
11570
|
error2.message += "\n " + hint;
|
|
11571
11571
|
} catch (e3) {
|
|
11572
|
-
if (!
|
|
11572
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") {
|
|
11573
11573
|
console.warn(hint);
|
|
11574
11574
|
} else {
|
|
11575
|
-
|
|
11575
|
+
context.logger?.warn?.(hint);
|
|
11576
11576
|
}
|
|
11577
11577
|
}
|
|
11578
11578
|
if (typeof error2.$responseBodyText !== "undefined") {
|
|
@@ -11611,13 +11611,13 @@ var init_schemaSerializationMiddleware = __esm({
|
|
|
11611
11611
|
"node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js"() {
|
|
11612
11612
|
import_util_middleware4 = __toESM(require_dist_cjs7());
|
|
11613
11613
|
init_operation();
|
|
11614
|
-
schemaSerializationMiddleware = (config) => (next,
|
|
11615
|
-
const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(
|
|
11614
|
+
schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
|
|
11615
|
+
const { operationSchema } = (0, import_util_middleware4.getSmithyContext)(context);
|
|
11616
11616
|
const [, ns, n3, t3, i3, o3] = operationSchema ?? [];
|
|
11617
|
-
const endpoint =
|
|
11617
|
+
const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;
|
|
11618
11618
|
const request = await config.protocol.serializeRequest(operation(ns, n3, t3, i3, o3), args.input, {
|
|
11619
11619
|
...config,
|
|
11620
|
-
...
|
|
11620
|
+
...context,
|
|
11621
11621
|
endpoint
|
|
11622
11622
|
});
|
|
11623
11623
|
return next({
|
|
@@ -12743,14 +12743,14 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
|
|
|
12743
12743
|
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
12744
12744
|
var _2, done = false;
|
|
12745
12745
|
for (var i3 = decorators.length - 1; i3 >= 0; i3--) {
|
|
12746
|
-
var
|
|
12747
|
-
for (var p3 in contextIn)
|
|
12748
|
-
for (var p3 in contextIn.access)
|
|
12749
|
-
|
|
12746
|
+
var context = {};
|
|
12747
|
+
for (var p3 in contextIn) context[p3] = p3 === "access" ? {} : contextIn[p3];
|
|
12748
|
+
for (var p3 in contextIn.access) context.access[p3] = contextIn.access[p3];
|
|
12749
|
+
context.addInitializer = function(f3) {
|
|
12750
12750
|
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
12751
12751
|
extraInitializers.push(accept(f3 || null));
|
|
12752
12752
|
};
|
|
12753
|
-
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key],
|
|
12753
|
+
var result = (0, decorators[i3])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
12754
12754
|
if (kind === "accessor") {
|
|
12755
12755
|
if (result === void 0) continue;
|
|
12756
12756
|
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
@@ -13887,20 +13887,20 @@ var init_HttpProtocol = __esm({
|
|
|
13887
13887
|
getDefaultContentType() {
|
|
13888
13888
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
13889
13889
|
}
|
|
13890
|
-
async deserializeHttpMessage(schema,
|
|
13890
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
13891
13891
|
void schema;
|
|
13892
|
-
void
|
|
13892
|
+
void context;
|
|
13893
13893
|
void response;
|
|
13894
13894
|
void arg4;
|
|
13895
13895
|
void arg5;
|
|
13896
13896
|
return [];
|
|
13897
13897
|
}
|
|
13898
13898
|
getEventStreamMarshaller() {
|
|
13899
|
-
const
|
|
13900
|
-
if (!
|
|
13899
|
+
const context = this.serdeContext;
|
|
13900
|
+
if (!context.eventStreamMarshaller) {
|
|
13901
13901
|
throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
13902
13902
|
}
|
|
13903
|
-
return
|
|
13903
|
+
return context.eventStreamMarshaller;
|
|
13904
13904
|
}
|
|
13905
13905
|
};
|
|
13906
13906
|
}
|
|
@@ -13918,14 +13918,14 @@ var init_HttpBindingProtocol = __esm({
|
|
|
13918
13918
|
init_extended_encode_uri_component();
|
|
13919
13919
|
init_HttpProtocol();
|
|
13920
13920
|
HttpBindingProtocol = class extends HttpProtocol {
|
|
13921
|
-
async serializeRequest(operationSchema, _input,
|
|
13921
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
13922
13922
|
const input = {
|
|
13923
13923
|
..._input ?? {}
|
|
13924
13924
|
};
|
|
13925
13925
|
const serializer = this.serializer;
|
|
13926
13926
|
const query2 = {};
|
|
13927
13927
|
const headers = {};
|
|
13928
|
-
const endpoint = await
|
|
13928
|
+
const endpoint = await context.endpoint();
|
|
13929
13929
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
13930
13930
|
const schema = ns.getSchema();
|
|
13931
13931
|
let hasNonHttpBindingMember = false;
|
|
@@ -14050,16 +14050,16 @@ var init_HttpBindingProtocol = __esm({
|
|
|
14050
14050
|
query2[traits.httpQuery] = serializer.flush();
|
|
14051
14051
|
}
|
|
14052
14052
|
}
|
|
14053
|
-
async deserializeResponse(operationSchema,
|
|
14053
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
14054
14054
|
const deserializer = this.deserializer;
|
|
14055
14055
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
14056
14056
|
const dataObject = {};
|
|
14057
14057
|
if (response.statusCode >= 300) {
|
|
14058
|
-
const bytes = await collectBody(response.body,
|
|
14058
|
+
const bytes = await collectBody(response.body, context);
|
|
14059
14059
|
if (bytes.byteLength > 0) {
|
|
14060
14060
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
14061
14061
|
}
|
|
14062
|
-
await this.handleError(operationSchema,
|
|
14062
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
14063
14063
|
throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
|
|
14064
14064
|
}
|
|
14065
14065
|
for (const header in response.headers) {
|
|
@@ -14067,9 +14067,9 @@ var init_HttpBindingProtocol = __esm({
|
|
|
14067
14067
|
delete response.headers[header];
|
|
14068
14068
|
response.headers[header.toLowerCase()] = value;
|
|
14069
14069
|
}
|
|
14070
|
-
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns,
|
|
14070
|
+
const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);
|
|
14071
14071
|
if (nonHttpBindingMembers.length) {
|
|
14072
|
-
const bytes = await collectBody(response.body,
|
|
14072
|
+
const bytes = await collectBody(response.body, context);
|
|
14073
14073
|
if (bytes.byteLength > 0) {
|
|
14074
14074
|
const dataFromBody = await deserializer.read(ns, bytes);
|
|
14075
14075
|
for (const member2 of nonHttpBindingMembers) {
|
|
@@ -14080,7 +14080,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
14080
14080
|
dataObject.$metadata = this.deserializeMetadata(response);
|
|
14081
14081
|
return dataObject;
|
|
14082
14082
|
}
|
|
14083
|
-
async deserializeHttpMessage(schema,
|
|
14083
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
14084
14084
|
let dataObject;
|
|
14085
14085
|
if (arg4 instanceof Set) {
|
|
14086
14086
|
dataObject = arg5;
|
|
@@ -14105,7 +14105,7 @@ var init_HttpBindingProtocol = __esm({
|
|
|
14105
14105
|
dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);
|
|
14106
14106
|
}
|
|
14107
14107
|
} else if (response.body) {
|
|
14108
|
-
const bytes = await collectBody(response.body,
|
|
14108
|
+
const bytes = await collectBody(response.body, context);
|
|
14109
14109
|
if (bytes.byteLength > 0) {
|
|
14110
14110
|
dataObject[memberName] = await deserializer.read(memberSchema, bytes);
|
|
14111
14111
|
}
|
|
@@ -14162,11 +14162,11 @@ var init_RpcProtocol = __esm({
|
|
|
14162
14162
|
init_collect_stream_body();
|
|
14163
14163
|
init_HttpProtocol();
|
|
14164
14164
|
RpcProtocol = class extends HttpProtocol {
|
|
14165
|
-
async serializeRequest(operationSchema, input,
|
|
14165
|
+
async serializeRequest(operationSchema, input, context) {
|
|
14166
14166
|
const serializer = this.serializer;
|
|
14167
14167
|
const query2 = {};
|
|
14168
14168
|
const headers = {};
|
|
14169
|
-
const endpoint = await
|
|
14169
|
+
const endpoint = await context.endpoint();
|
|
14170
14170
|
const ns = NormalizedSchema.of(operationSchema?.input);
|
|
14171
14171
|
const schema = ns.getSchema();
|
|
14172
14172
|
let payload2;
|
|
@@ -14215,16 +14215,16 @@ var init_RpcProtocol = __esm({
|
|
|
14215
14215
|
request.method = "POST";
|
|
14216
14216
|
return request;
|
|
14217
14217
|
}
|
|
14218
|
-
async deserializeResponse(operationSchema,
|
|
14218
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
14219
14219
|
const deserializer = this.deserializer;
|
|
14220
14220
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
14221
14221
|
const dataObject = {};
|
|
14222
14222
|
if (response.statusCode >= 300) {
|
|
14223
|
-
const bytes = await collectBody(response.body,
|
|
14223
|
+
const bytes = await collectBody(response.body, context);
|
|
14224
14224
|
if (bytes.byteLength > 0) {
|
|
14225
14225
|
Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
14226
14226
|
}
|
|
14227
|
-
await this.handleError(operationSchema,
|
|
14227
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
14228
14228
|
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
14229
14229
|
}
|
|
14230
14230
|
for (const header in response.headers) {
|
|
@@ -14240,7 +14240,7 @@ var init_RpcProtocol = __esm({
|
|
|
14240
14240
|
initialResponseContainer: dataObject
|
|
14241
14241
|
});
|
|
14242
14242
|
} else {
|
|
14243
|
-
const bytes = await collectBody(response.body,
|
|
14243
|
+
const bytes = await collectBody(response.body, context);
|
|
14244
14244
|
if (bytes.byteLength > 0) {
|
|
14245
14245
|
Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
14246
14246
|
}
|
|
@@ -14273,8 +14273,8 @@ var init_resolve_path = __esm({
|
|
|
14273
14273
|
});
|
|
14274
14274
|
|
|
14275
14275
|
// node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js
|
|
14276
|
-
function requestBuilder(input,
|
|
14277
|
-
return new RequestBuilder(input,
|
|
14276
|
+
function requestBuilder(input, context) {
|
|
14277
|
+
return new RequestBuilder(input, context);
|
|
14278
14278
|
}
|
|
14279
14279
|
var import_protocol_http6, RequestBuilder;
|
|
14280
14280
|
var init_requestBuilder = __esm({
|
|
@@ -14291,9 +14291,9 @@ var init_requestBuilder = __esm({
|
|
|
14291
14291
|
body = null;
|
|
14292
14292
|
hostname = "";
|
|
14293
14293
|
resolvePathStack = [];
|
|
14294
|
-
constructor(input,
|
|
14294
|
+
constructor(input, context) {
|
|
14295
14295
|
this.input = input;
|
|
14296
|
-
this.context =
|
|
14296
|
+
this.context = context;
|
|
14297
14297
|
}
|
|
14298
14298
|
async build() {
|
|
14299
14299
|
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();
|
|
@@ -14662,15 +14662,15 @@ var init_requestBuilder2 = __esm({
|
|
|
14662
14662
|
});
|
|
14663
14663
|
|
|
14664
14664
|
// node_modules/@smithy/core/dist-es/setFeature.js
|
|
14665
|
-
function setFeature(
|
|
14666
|
-
if (!
|
|
14667
|
-
|
|
14665
|
+
function setFeature(context, feature, value) {
|
|
14666
|
+
if (!context.__smithy_context) {
|
|
14667
|
+
context.__smithy_context = {
|
|
14668
14668
|
features: {}
|
|
14669
14669
|
};
|
|
14670
|
-
} else if (!
|
|
14671
|
-
|
|
14670
|
+
} else if (!context.__smithy_context.features) {
|
|
14671
|
+
context.__smithy_context.features = {};
|
|
14672
14672
|
}
|
|
14673
|
-
|
|
14673
|
+
context.__smithy_context.features[feature] = value;
|
|
14674
14674
|
}
|
|
14675
14675
|
var init_setFeature = __esm({
|
|
14676
14676
|
"node_modules/@smithy/core/dist-es/setFeature.js"() {
|
|
@@ -15813,15 +15813,15 @@ var init_setCredentialFeature = __esm({
|
|
|
15813
15813
|
});
|
|
15814
15814
|
|
|
15815
15815
|
// node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
15816
|
-
function setFeature2(
|
|
15817
|
-
if (!
|
|
15818
|
-
|
|
15816
|
+
function setFeature2(context, feature, value) {
|
|
15817
|
+
if (!context.__aws_sdk_context) {
|
|
15818
|
+
context.__aws_sdk_context = {
|
|
15819
15819
|
features: {}
|
|
15820
15820
|
};
|
|
15821
|
-
} else if (!
|
|
15822
|
-
|
|
15821
|
+
} else if (!context.__aws_sdk_context.features) {
|
|
15822
|
+
context.__aws_sdk_context.features = {};
|
|
15823
15823
|
}
|
|
15824
|
-
|
|
15824
|
+
context.__aws_sdk_context.features[feature] = value;
|
|
15825
15825
|
}
|
|
15826
15826
|
var init_setFeature2 = __esm({
|
|
15827
15827
|
"node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"() {
|
|
@@ -15922,9 +15922,9 @@ var init_AwsSdkSigV4Signer = __esm({
|
|
|
15922
15922
|
return property2;
|
|
15923
15923
|
};
|
|
15924
15924
|
validateSigningProperties = async (signingProperties) => {
|
|
15925
|
-
const
|
|
15925
|
+
const context = throwSigningPropertyError("context", signingProperties.context);
|
|
15926
15926
|
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
15927
|
-
const authScheme =
|
|
15927
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
|
15928
15928
|
const signerFunction = throwSigningPropertyError("signer", config.signer);
|
|
15929
15929
|
const signer = await signerFunction(authScheme);
|
|
15930
15930
|
const signingRegion = signingProperties?.signingRegion;
|
|
@@ -17782,8 +17782,8 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
17782
17782
|
getPayloadCodec() {
|
|
17783
17783
|
return this.codec;
|
|
17784
17784
|
}
|
|
17785
|
-
async serializeRequest(operationSchema, input,
|
|
17786
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
17785
|
+
async serializeRequest(operationSchema, input, context) {
|
|
17786
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
17787
17787
|
Object.assign(request.headers, {
|
|
17788
17788
|
"content-type": this.getDefaultContentType(),
|
|
17789
17789
|
"smithy-protocol": "rpc-v2-cbor",
|
|
@@ -17802,7 +17802,7 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
17802
17802
|
} catch (e3) {
|
|
17803
17803
|
}
|
|
17804
17804
|
}
|
|
17805
|
-
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(
|
|
17805
|
+
const { service, operation: operation2 } = (0, import_util_middleware5.getSmithyContext)(context);
|
|
17806
17806
|
const path7 = `/service/${service}/operation/${operation2}`;
|
|
17807
17807
|
if (request.path.endsWith("/")) {
|
|
17808
17808
|
request.path += path7.slice(1);
|
|
@@ -17811,10 +17811,10 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
17811
17811
|
}
|
|
17812
17812
|
return request;
|
|
17813
17813
|
}
|
|
17814
|
-
async deserializeResponse(operationSchema,
|
|
17815
|
-
return super.deserializeResponse(operationSchema,
|
|
17814
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
17815
|
+
return super.deserializeResponse(operationSchema, context, response);
|
|
17816
17816
|
}
|
|
17817
|
-
async handleError(operationSchema,
|
|
17817
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
17818
17818
|
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
17819
17819
|
let namespace = this.options.defaultNamespace;
|
|
17820
17820
|
if (errorName.includes("#")) {
|
|
@@ -17975,14 +17975,14 @@ var init_AwsSmithyRpcV2CborProtocol = __esm({
|
|
|
17975
17975
|
super({ defaultNamespace });
|
|
17976
17976
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
17977
17977
|
}
|
|
17978
|
-
async serializeRequest(operationSchema, input,
|
|
17979
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
17978
|
+
async serializeRequest(operationSchema, input, context) {
|
|
17979
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
17980
17980
|
if (this.awsQueryCompatible) {
|
|
17981
17981
|
request.headers["x-amzn-query-mode"] = "true";
|
|
17982
17982
|
}
|
|
17983
17983
|
return request;
|
|
17984
17984
|
}
|
|
17985
|
-
async handleError(operationSchema,
|
|
17985
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
17986
17986
|
if (this.awsQueryCompatible) {
|
|
17987
17987
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
17988
17988
|
}
|
|
@@ -18082,9 +18082,9 @@ var init_ConfigurableSerdeContext = __esm({
|
|
|
18082
18082
|
});
|
|
18083
18083
|
|
|
18084
18084
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js
|
|
18085
|
-
function jsonReviver(key, value,
|
|
18086
|
-
if (
|
|
18087
|
-
const numericString =
|
|
18085
|
+
function jsonReviver(key, value, context) {
|
|
18086
|
+
if (context?.source) {
|
|
18087
|
+
const numericString = context.source;
|
|
18088
18088
|
if (typeof value === "number") {
|
|
18089
18089
|
if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
|
|
18090
18090
|
const isFractional = numericString.includes(".");
|
|
@@ -18347,9 +18347,9 @@ var require_dist_cjs26 = __commonJS({
|
|
|
18347
18347
|
identifyOnResolve = toggle;
|
|
18348
18348
|
return identifyOnResolve;
|
|
18349
18349
|
},
|
|
18350
|
-
resolve: (handler,
|
|
18350
|
+
resolve: (handler, context) => {
|
|
18351
18351
|
for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {
|
|
18352
|
-
handler = middleware(handler,
|
|
18352
|
+
handler = middleware(handler, context);
|
|
18353
18353
|
}
|
|
18354
18354
|
if (identifyOnResolve) {
|
|
18355
18355
|
console.log(stack.identify());
|
|
@@ -18949,7 +18949,7 @@ var init_common2 = __esm({
|
|
|
18949
18949
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"() {
|
|
18950
18950
|
import_smithy_client = __toESM(require_dist_cjs27());
|
|
18951
18951
|
import_util_utf86 = __toESM(require_dist_cjs11());
|
|
18952
|
-
collectBodyString = (streamBody,
|
|
18952
|
+
collectBodyString = (streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf86.toUtf8)(body));
|
|
18953
18953
|
}
|
|
18954
18954
|
});
|
|
18955
18955
|
|
|
@@ -18958,7 +18958,7 @@ var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
|
|
|
18958
18958
|
var init_parseJsonBody = __esm({
|
|
18959
18959
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
|
18960
18960
|
init_common2();
|
|
18961
|
-
parseJsonBody = (streamBody,
|
|
18961
|
+
parseJsonBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
18962
18962
|
if (encoded.length) {
|
|
18963
18963
|
try {
|
|
18964
18964
|
return JSON.parse(encoded);
|
|
@@ -18973,8 +18973,8 @@ var init_parseJsonBody = __esm({
|
|
|
18973
18973
|
}
|
|
18974
18974
|
return {};
|
|
18975
18975
|
});
|
|
18976
|
-
parseJsonErrorBody = async (errorBody,
|
|
18977
|
-
const value = await parseJsonBody(errorBody,
|
|
18976
|
+
parseJsonErrorBody = async (errorBody, context) => {
|
|
18977
|
+
const value = await parseJsonBody(errorBody, context);
|
|
18978
18978
|
value.message = value.message ?? value.Message;
|
|
18979
18979
|
return value;
|
|
18980
18980
|
};
|
|
@@ -19385,8 +19385,8 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
19385
19385
|
this.deserializer = this.codec.createDeserializer();
|
|
19386
19386
|
this.awsQueryCompatible = !!awsQueryCompatible;
|
|
19387
19387
|
}
|
|
19388
|
-
async serializeRequest(operationSchema, input,
|
|
19389
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
19388
|
+
async serializeRequest(operationSchema, input, context) {
|
|
19389
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
19390
19390
|
if (!request.path.endsWith("/")) {
|
|
19391
19391
|
request.path += "/";
|
|
19392
19392
|
}
|
|
@@ -19405,7 +19405,7 @@ var init_AwsJsonRpcProtocol = __esm({
|
|
|
19405
19405
|
getPayloadCodec() {
|
|
19406
19406
|
return this.codec;
|
|
19407
19407
|
}
|
|
19408
|
-
async handleError(operationSchema,
|
|
19408
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
19409
19409
|
if (this.awsQueryCompatible) {
|
|
19410
19410
|
this.mixin.setQueryCompatError(dataObject, response);
|
|
19411
19411
|
}
|
|
@@ -19524,8 +19524,8 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
19524
19524
|
this.codec.setSerdeContext(serdeContext);
|
|
19525
19525
|
super.setSerdeContext(serdeContext);
|
|
19526
19526
|
}
|
|
19527
|
-
async serializeRequest(operationSchema, input,
|
|
19528
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
19527
|
+
async serializeRequest(operationSchema, input, context) {
|
|
19528
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
19529
19529
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
19530
19530
|
if (!request.headers["content-type"]) {
|
|
19531
19531
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -19538,14 +19538,14 @@ var init_AwsRestJsonProtocol = __esm({
|
|
|
19538
19538
|
}
|
|
19539
19539
|
return request;
|
|
19540
19540
|
}
|
|
19541
|
-
async handleError(operationSchema,
|
|
19541
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
19542
19542
|
const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown";
|
|
19543
19543
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
19544
19544
|
const ns = NormalizedSchema.of(errorSchema);
|
|
19545
19545
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
19546
19546
|
const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
|
|
19547
19547
|
const exception = new ErrorCtor(message);
|
|
19548
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
19548
|
+
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
19549
19549
|
const output = {};
|
|
19550
19550
|
for (const [name14, member2] of ns.structIterator()) {
|
|
19551
19551
|
const target = member2.getMergedTraits().jsonName ?? name14;
|
|
@@ -20848,8 +20848,8 @@ var init_AwsQueryProtocol = __esm({
|
|
|
20848
20848
|
getPayloadCodec() {
|
|
20849
20849
|
throw new Error("AWSQuery protocol has no payload codec.");
|
|
20850
20850
|
}
|
|
20851
|
-
async serializeRequest(operationSchema, input,
|
|
20852
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
20851
|
+
async serializeRequest(operationSchema, input, context) {
|
|
20852
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
20853
20853
|
if (!request.path.endsWith("/")) {
|
|
20854
20854
|
request.path += "/";
|
|
20855
20855
|
}
|
|
@@ -20866,16 +20866,16 @@ var init_AwsQueryProtocol = __esm({
|
|
|
20866
20866
|
}
|
|
20867
20867
|
return request;
|
|
20868
20868
|
}
|
|
20869
|
-
async deserializeResponse(operationSchema,
|
|
20869
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
20870
20870
|
const deserializer = this.deserializer;
|
|
20871
20871
|
const ns = NormalizedSchema.of(operationSchema.output);
|
|
20872
20872
|
const dataObject = {};
|
|
20873
20873
|
if (response.statusCode >= 300) {
|
|
20874
|
-
const bytes2 = await collectBody(response.body,
|
|
20874
|
+
const bytes2 = await collectBody(response.body, context);
|
|
20875
20875
|
if (bytes2.byteLength > 0) {
|
|
20876
20876
|
Object.assign(dataObject, await deserializer.read(15, bytes2));
|
|
20877
20877
|
}
|
|
20878
|
-
await this.handleError(operationSchema,
|
|
20878
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
20879
20879
|
}
|
|
20880
20880
|
for (const header in response.headers) {
|
|
20881
20881
|
const value = response.headers[header];
|
|
@@ -20884,7 +20884,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
20884
20884
|
}
|
|
20885
20885
|
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
20886
20886
|
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
20887
|
-
const bytes = await collectBody(response.body,
|
|
20887
|
+
const bytes = await collectBody(response.body, context);
|
|
20888
20888
|
if (bytes.byteLength > 0) {
|
|
20889
20889
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
20890
20890
|
}
|
|
@@ -20897,7 +20897,7 @@ var init_AwsQueryProtocol = __esm({
|
|
|
20897
20897
|
useNestedResult() {
|
|
20898
20898
|
return true;
|
|
20899
20899
|
}
|
|
20900
|
-
async handleError(operationSchema,
|
|
20900
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
20901
20901
|
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
20902
20902
|
const errorData = this.loadQueryError(dataObject);
|
|
20903
20903
|
const message = this.loadQueryErrorMessage(dataObject);
|
|
@@ -20978,7 +20978,7 @@ var init_parseXmlBody = __esm({
|
|
|
20978
20978
|
import_xml_builder2 = __toESM(require_dist_cjs28());
|
|
20979
20979
|
import_smithy_client5 = __toESM(require_dist_cjs27());
|
|
20980
20980
|
init_common2();
|
|
20981
|
-
parseXmlBody = (streamBody,
|
|
20981
|
+
parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
20982
20982
|
if (encoded.length) {
|
|
20983
20983
|
let parsedObj;
|
|
20984
20984
|
try {
|
|
@@ -21002,8 +21002,8 @@ var init_parseXmlBody = __esm({
|
|
|
21002
21002
|
}
|
|
21003
21003
|
return {};
|
|
21004
21004
|
});
|
|
21005
|
-
parseXmlErrorBody = async (errorBody,
|
|
21006
|
-
const value = await parseXmlBody(errorBody,
|
|
21005
|
+
parseXmlErrorBody = async (errorBody, context) => {
|
|
21006
|
+
const value = await parseXmlBody(errorBody, context);
|
|
21007
21007
|
if (value.Error) {
|
|
21008
21008
|
value.Error.message = value.Error.message ?? value.Error.Message;
|
|
21009
21009
|
}
|
|
@@ -21348,8 +21348,8 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
21348
21348
|
getShapeId() {
|
|
21349
21349
|
return "aws.protocols#restXml";
|
|
21350
21350
|
}
|
|
21351
|
-
async serializeRequest(operationSchema, input,
|
|
21352
|
-
const request = await super.serializeRequest(operationSchema, input,
|
|
21351
|
+
async serializeRequest(operationSchema, input, context) {
|
|
21352
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
21353
21353
|
const inputSchema = NormalizedSchema.of(operationSchema.input);
|
|
21354
21354
|
if (!request.headers["content-type"]) {
|
|
21355
21355
|
const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema);
|
|
@@ -21364,17 +21364,17 @@ var init_AwsRestXmlProtocol = __esm({
|
|
|
21364
21364
|
}
|
|
21365
21365
|
return request;
|
|
21366
21366
|
}
|
|
21367
|
-
async deserializeResponse(operationSchema,
|
|
21368
|
-
return super.deserializeResponse(operationSchema,
|
|
21367
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
21368
|
+
return super.deserializeResponse(operationSchema, context, response);
|
|
21369
21369
|
}
|
|
21370
|
-
async handleError(operationSchema,
|
|
21370
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
21371
21371
|
const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown";
|
|
21372
21372
|
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata);
|
|
21373
21373
|
const ns = NormalizedSchema.of(errorSchema);
|
|
21374
21374
|
const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown";
|
|
21375
21375
|
const ErrorCtor = TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error;
|
|
21376
21376
|
const exception = new ErrorCtor(message);
|
|
21377
|
-
await this.deserializeHttpMessage(errorSchema,
|
|
21377
|
+
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
21378
21378
|
const output = {};
|
|
21379
21379
|
for (const [name14, member2] of ns.structIterator()) {
|
|
21380
21380
|
const target = member2.getMergedTraits().xmlName ?? name14;
|
|
@@ -21503,48 +21503,48 @@ var require_dist_cjs29 = __commonJS({
|
|
|
21503
21503
|
});
|
|
21504
21504
|
}
|
|
21505
21505
|
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
21506
|
-
async function checkFeatures(
|
|
21506
|
+
async function checkFeatures(context, config, args) {
|
|
21507
21507
|
const request = args.request;
|
|
21508
21508
|
if (request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") {
|
|
21509
|
-
core$1.setFeature(
|
|
21509
|
+
core$1.setFeature(context, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
21510
21510
|
}
|
|
21511
21511
|
if (typeof config.retryStrategy === "function") {
|
|
21512
21512
|
const retryStrategy = await config.retryStrategy();
|
|
21513
21513
|
if (typeof retryStrategy.acquireInitialRetryToken === "function") {
|
|
21514
21514
|
if (retryStrategy.constructor?.name?.includes("Adaptive")) {
|
|
21515
|
-
core$1.setFeature(
|
|
21515
|
+
core$1.setFeature(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
21516
21516
|
} else {
|
|
21517
|
-
core$1.setFeature(
|
|
21517
|
+
core$1.setFeature(context, "RETRY_MODE_STANDARD", "E");
|
|
21518
21518
|
}
|
|
21519
21519
|
} else {
|
|
21520
|
-
core$1.setFeature(
|
|
21520
|
+
core$1.setFeature(context, "RETRY_MODE_LEGACY", "D");
|
|
21521
21521
|
}
|
|
21522
21522
|
}
|
|
21523
21523
|
if (typeof config.accountIdEndpointMode === "function") {
|
|
21524
|
-
const endpointV2 =
|
|
21524
|
+
const endpointV2 = context.endpointV2;
|
|
21525
21525
|
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {
|
|
21526
|
-
core$1.setFeature(
|
|
21526
|
+
core$1.setFeature(context, "ACCOUNT_ID_ENDPOINT", "O");
|
|
21527
21527
|
}
|
|
21528
21528
|
switch (await config.accountIdEndpointMode?.()) {
|
|
21529
21529
|
case "disabled":
|
|
21530
|
-
core$1.setFeature(
|
|
21530
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
21531
21531
|
break;
|
|
21532
21532
|
case "preferred":
|
|
21533
|
-
core$1.setFeature(
|
|
21533
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
21534
21534
|
break;
|
|
21535
21535
|
case "required":
|
|
21536
|
-
core$1.setFeature(
|
|
21536
|
+
core$1.setFeature(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
21537
21537
|
break;
|
|
21538
21538
|
}
|
|
21539
21539
|
}
|
|
21540
|
-
const identity2 =
|
|
21540
|
+
const identity2 = context.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
21541
21541
|
if (identity2?.$source) {
|
|
21542
21542
|
const credentials = identity2;
|
|
21543
21543
|
if (credentials.accountId) {
|
|
21544
|
-
core$1.setFeature(
|
|
21544
|
+
core$1.setFeature(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
21545
21545
|
}
|
|
21546
21546
|
for (const [key, value] of Object.entries(credentials.$source ?? {})) {
|
|
21547
|
-
core$1.setFeature(
|
|
21547
|
+
core$1.setFeature(context, key, value);
|
|
21548
21548
|
}
|
|
21549
21549
|
}
|
|
21550
21550
|
}
|
|
@@ -21572,17 +21572,17 @@ var require_dist_cjs29 = __commonJS({
|
|
|
21572
21572
|
}
|
|
21573
21573
|
return buffer;
|
|
21574
21574
|
}
|
|
21575
|
-
var userAgentMiddleware = (options) => (next,
|
|
21575
|
+
var userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
21576
21576
|
const { request } = args;
|
|
21577
21577
|
if (!protocolHttp.HttpRequest.isInstance(request)) {
|
|
21578
21578
|
return next(args);
|
|
21579
21579
|
}
|
|
21580
21580
|
const { headers } = request;
|
|
21581
|
-
const userAgent =
|
|
21581
|
+
const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
|
|
21582
21582
|
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
|
|
21583
|
-
await checkFeatures(
|
|
21584
|
-
const awsContext =
|
|
21585
|
-
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({},
|
|
21583
|
+
await checkFeatures(context, options, args);
|
|
21584
|
+
const awsContext = context;
|
|
21585
|
+
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
|
|
21586
21586
|
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
|
|
21587
21587
|
const appId = await options.userAgentAppId();
|
|
21588
21588
|
if (appId) {
|
|
@@ -22891,7 +22891,7 @@ var require_dist_cjs37 = __commonJS({
|
|
|
22891
22891
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
22892
22892
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
22893
22893
|
}
|
|
22894
|
-
async handle(next, args,
|
|
22894
|
+
async handle(next, args, context = {}) {
|
|
22895
22895
|
const request = args.request;
|
|
22896
22896
|
const { body: payload2, headers, query: query2 } = request;
|
|
22897
22897
|
if (!(payload2 instanceof ReadableStream)) {
|
|
@@ -23875,7 +23875,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
23875
23875
|
}
|
|
23876
23876
|
return urlParser.parseUrl(endpoint);
|
|
23877
23877
|
};
|
|
23878
|
-
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig,
|
|
23878
|
+
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
23879
23879
|
if (!clientConfig.isCustomEndpoint) {
|
|
23880
23880
|
let endpointFromConfig;
|
|
23881
23881
|
if (clientConfig.serviceConfiguredEndpoint) {
|
|
@@ -23892,7 +23892,7 @@ var require_dist_cjs44 = __commonJS({
|
|
|
23892
23892
|
if (typeof clientConfig.endpointProvider !== "function") {
|
|
23893
23893
|
throw new Error("config.endpointProvider is not set.");
|
|
23894
23894
|
}
|
|
23895
|
-
const endpoint = clientConfig.endpointProvider(endpointParams,
|
|
23895
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context);
|
|
23896
23896
|
return endpoint;
|
|
23897
23897
|
};
|
|
23898
23898
|
var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
@@ -23926,22 +23926,22 @@ var require_dist_cjs44 = __commonJS({
|
|
|
23926
23926
|
return endpointParams;
|
|
23927
23927
|
};
|
|
23928
23928
|
var endpointMiddleware = ({ config, instructions }) => {
|
|
23929
|
-
return (next,
|
|
23929
|
+
return (next, context) => async (args) => {
|
|
23930
23930
|
if (config.isCustomEndpoint) {
|
|
23931
|
-
core.setFeature(
|
|
23931
|
+
core.setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
|
23932
23932
|
}
|
|
23933
23933
|
const endpoint = await getEndpointFromInstructions(args.input, {
|
|
23934
23934
|
getEndpointParameterInstructions() {
|
|
23935
23935
|
return instructions;
|
|
23936
23936
|
}
|
|
23937
|
-
}, { ...config },
|
|
23938
|
-
|
|
23939
|
-
|
|
23940
|
-
const authScheme =
|
|
23937
|
+
}, { ...config }, context);
|
|
23938
|
+
context.endpointV2 = endpoint;
|
|
23939
|
+
context.authSchemes = endpoint.properties?.authSchemes;
|
|
23940
|
+
const authScheme = context.authSchemes?.[0];
|
|
23941
23941
|
if (authScheme) {
|
|
23942
|
-
|
|
23943
|
-
|
|
23944
|
-
const smithyContext = utilMiddleware.getSmithyContext(
|
|
23942
|
+
context["signing_region"] = authScheme.signingRegion;
|
|
23943
|
+
context["signing_service"] = authScheme.signingName;
|
|
23944
|
+
const smithyContext = utilMiddleware.getSmithyContext(context);
|
|
23945
23945
|
const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;
|
|
23946
23946
|
if (httpAuthOption) {
|
|
23947
23947
|
httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
@@ -24590,12 +24590,12 @@ var require_dist_cjs47 = __commonJS({
|
|
|
24590
24590
|
clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);
|
|
24591
24591
|
}
|
|
24592
24592
|
});
|
|
24593
|
-
var retryMiddleware = (options) => (next,
|
|
24593
|
+
var retryMiddleware = (options) => (next, context) => async (args) => {
|
|
24594
24594
|
let retryStrategy = await options.retryStrategy();
|
|
24595
24595
|
const maxAttempts = await options.maxAttempts();
|
|
24596
24596
|
if (isRetryStrategyV2(retryStrategy)) {
|
|
24597
24597
|
retryStrategy = retryStrategy;
|
|
24598
|
-
let retryToken = await retryStrategy.acquireInitialRetryToken(
|
|
24598
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
|
|
24599
24599
|
let lastError = new Error();
|
|
24600
24600
|
let attempts = 0;
|
|
24601
24601
|
let totalRetryDelay = 0;
|
|
@@ -24618,7 +24618,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
24618
24618
|
const retryErrorInfo = getRetryErrorInfo(e3);
|
|
24619
24619
|
lastError = asSdkError(e3);
|
|
24620
24620
|
if (isRequest && isStreamingPayload.isStreamingPayload(request)) {
|
|
24621
|
-
(
|
|
24621
|
+
(context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
24622
24622
|
throw lastError;
|
|
24623
24623
|
}
|
|
24624
24624
|
try {
|
|
@@ -24640,7 +24640,7 @@ var require_dist_cjs47 = __commonJS({
|
|
|
24640
24640
|
} else {
|
|
24641
24641
|
retryStrategy = retryStrategy;
|
|
24642
24642
|
if (retryStrategy?.mode)
|
|
24643
|
-
|
|
24643
|
+
context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
|
|
24644
24644
|
return retryStrategy.retry(next, args);
|
|
24645
24645
|
}
|
|
24646
24646
|
};
|
|
@@ -24720,9 +24720,9 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
24720
24720
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
24721
24721
|
var core_2 = (init_dist_es(), __toCommonJS(dist_es_exports));
|
|
24722
24722
|
var util_middleware_1 = require_dist_cjs7();
|
|
24723
|
-
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config,
|
|
24723
|
+
var defaultBedrockRuntimeHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
24724
24724
|
return {
|
|
24725
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
24725
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
24726
24726
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
24727
24727
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
24728
24728
|
})()
|
|
@@ -24736,10 +24736,10 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
24736
24736
|
name: "bedrock",
|
|
24737
24737
|
region: authParameters.region
|
|
24738
24738
|
},
|
|
24739
|
-
propertiesExtractor: (config,
|
|
24739
|
+
propertiesExtractor: (config, context) => ({
|
|
24740
24740
|
signingProperties: {
|
|
24741
24741
|
config,
|
|
24742
|
-
context
|
|
24742
|
+
context
|
|
24743
24743
|
}
|
|
24744
24744
|
})
|
|
24745
24745
|
};
|
|
@@ -24747,7 +24747,7 @@ var require_httpAuthSchemeProvider = __commonJS({
|
|
|
24747
24747
|
function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
|
|
24748
24748
|
return {
|
|
24749
24749
|
schemeId: "smithy.api#httpBearerAuth",
|
|
24750
|
-
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache },
|
|
24750
|
+
propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache }, context) => ({
|
|
24751
24751
|
identityProperties: {
|
|
24752
24752
|
profile,
|
|
24753
24753
|
filepath,
|
|
@@ -25493,10 +25493,10 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
|
25493
25493
|
name: "sso-oauth",
|
|
25494
25494
|
region: authParameters.region
|
|
25495
25495
|
},
|
|
25496
|
-
propertiesExtractor: (config,
|
|
25496
|
+
propertiesExtractor: (config, context) => ({
|
|
25497
25497
|
signingProperties: {
|
|
25498
25498
|
config,
|
|
25499
|
-
context
|
|
25499
|
+
context
|
|
25500
25500
|
}
|
|
25501
25501
|
})
|
|
25502
25502
|
};
|
|
@@ -25511,9 +25511,9 @@ var init_httpAuthSchemeProvider = __esm({
|
|
|
25511
25511
|
"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"() {
|
|
25512
25512
|
init_dist_es2();
|
|
25513
25513
|
import_util_middleware6 = __toESM(require_dist_cjs7());
|
|
25514
|
-
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config,
|
|
25514
|
+
defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
25515
25515
|
return {
|
|
25516
|
-
operation: (0, import_util_middleware6.getSmithyContext)(
|
|
25516
|
+
operation: (0, import_util_middleware6.getSmithyContext)(context).operation,
|
|
25517
25517
|
region: await (0, import_util_middleware6.normalizeProvider)(config.region)() || (() => {
|
|
25518
25518
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
25519
25519
|
})()
|
|
@@ -25859,10 +25859,10 @@ var init_endpointResolver = __esm({
|
|
|
25859
25859
|
size: 50,
|
|
25860
25860
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
25861
25861
|
});
|
|
25862
|
-
defaultEndpointResolver = (endpointParams,
|
|
25862
|
+
defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
25863
25863
|
return cache.get(endpointParams, () => (0, import_util_endpoints2.resolveEndpoint)(ruleSet, {
|
|
25864
25864
|
endpointParams,
|
|
25865
|
-
logger:
|
|
25865
|
+
logger: context.logger
|
|
25866
25866
|
}));
|
|
25867
25867
|
};
|
|
25868
25868
|
import_util_endpoints2.customEndpointFunctions.aws = import_util_endpoints.awsEndpointFunctions;
|
|
@@ -26450,8 +26450,8 @@ var init_Aws_restJson1 = __esm({
|
|
|
26450
26450
|
import_smithy_client14 = __toESM(require_dist_cjs27());
|
|
26451
26451
|
init_models_0();
|
|
26452
26452
|
init_SSOOIDCServiceException();
|
|
26453
|
-
se_CreateTokenCommand = async (input,
|
|
26454
|
-
const b3 = requestBuilder(input,
|
|
26453
|
+
se_CreateTokenCommand = async (input, context) => {
|
|
26454
|
+
const b3 = requestBuilder(input, context);
|
|
26455
26455
|
const headers = {
|
|
26456
26456
|
"content-type": "application/json"
|
|
26457
26457
|
};
|
|
@@ -26471,14 +26471,14 @@ var init_Aws_restJson1 = __esm({
|
|
|
26471
26471
|
b3.m("POST").h(headers).b(body);
|
|
26472
26472
|
return b3.build();
|
|
26473
26473
|
};
|
|
26474
|
-
de_CreateTokenCommand = async (output,
|
|
26474
|
+
de_CreateTokenCommand = async (output, context) => {
|
|
26475
26475
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
26476
|
-
return de_CommandError(output,
|
|
26476
|
+
return de_CommandError(output, context);
|
|
26477
26477
|
}
|
|
26478
26478
|
const contents = (0, import_smithy_client14.map)({
|
|
26479
26479
|
$metadata: deserializeMetadata(output)
|
|
26480
26480
|
});
|
|
26481
|
-
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body,
|
|
26481
|
+
const data2 = (0, import_smithy_client14.expectNonNull)((0, import_smithy_client14.expectObject)(await parseJsonBody(output.body, context)), "body");
|
|
26482
26482
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
26483
26483
|
accessToken: import_smithy_client14.expectString,
|
|
26484
26484
|
expiresIn: import_smithy_client14.expectInt32,
|
|
@@ -26489,46 +26489,46 @@ var init_Aws_restJson1 = __esm({
|
|
|
26489
26489
|
Object.assign(contents, doc);
|
|
26490
26490
|
return contents;
|
|
26491
26491
|
};
|
|
26492
|
-
de_CommandError = async (output,
|
|
26492
|
+
de_CommandError = async (output, context) => {
|
|
26493
26493
|
const parsedOutput = {
|
|
26494
26494
|
...output,
|
|
26495
|
-
body: await parseJsonErrorBody(output.body,
|
|
26495
|
+
body: await parseJsonErrorBody(output.body, context)
|
|
26496
26496
|
};
|
|
26497
26497
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
26498
26498
|
switch (errorCode) {
|
|
26499
26499
|
case "AccessDeniedException":
|
|
26500
26500
|
case "com.amazonaws.ssooidc#AccessDeniedException":
|
|
26501
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput,
|
|
26501
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
26502
26502
|
case "AuthorizationPendingException":
|
|
26503
26503
|
case "com.amazonaws.ssooidc#AuthorizationPendingException":
|
|
26504
|
-
throw await de_AuthorizationPendingExceptionRes(parsedOutput,
|
|
26504
|
+
throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);
|
|
26505
26505
|
case "ExpiredTokenException":
|
|
26506
26506
|
case "com.amazonaws.ssooidc#ExpiredTokenException":
|
|
26507
|
-
throw await de_ExpiredTokenExceptionRes(parsedOutput,
|
|
26507
|
+
throw await de_ExpiredTokenExceptionRes(parsedOutput, context);
|
|
26508
26508
|
case "InternalServerException":
|
|
26509
26509
|
case "com.amazonaws.ssooidc#InternalServerException":
|
|
26510
|
-
throw await de_InternalServerExceptionRes(parsedOutput,
|
|
26510
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
26511
26511
|
case "InvalidClientException":
|
|
26512
26512
|
case "com.amazonaws.ssooidc#InvalidClientException":
|
|
26513
|
-
throw await de_InvalidClientExceptionRes(parsedOutput,
|
|
26513
|
+
throw await de_InvalidClientExceptionRes(parsedOutput, context);
|
|
26514
26514
|
case "InvalidGrantException":
|
|
26515
26515
|
case "com.amazonaws.ssooidc#InvalidGrantException":
|
|
26516
|
-
throw await de_InvalidGrantExceptionRes(parsedOutput,
|
|
26516
|
+
throw await de_InvalidGrantExceptionRes(parsedOutput, context);
|
|
26517
26517
|
case "InvalidRequestException":
|
|
26518
26518
|
case "com.amazonaws.ssooidc#InvalidRequestException":
|
|
26519
|
-
throw await de_InvalidRequestExceptionRes(parsedOutput,
|
|
26519
|
+
throw await de_InvalidRequestExceptionRes(parsedOutput, context);
|
|
26520
26520
|
case "InvalidScopeException":
|
|
26521
26521
|
case "com.amazonaws.ssooidc#InvalidScopeException":
|
|
26522
|
-
throw await de_InvalidScopeExceptionRes(parsedOutput,
|
|
26522
|
+
throw await de_InvalidScopeExceptionRes(parsedOutput, context);
|
|
26523
26523
|
case "SlowDownException":
|
|
26524
26524
|
case "com.amazonaws.ssooidc#SlowDownException":
|
|
26525
|
-
throw await de_SlowDownExceptionRes(parsedOutput,
|
|
26525
|
+
throw await de_SlowDownExceptionRes(parsedOutput, context);
|
|
26526
26526
|
case "UnauthorizedClientException":
|
|
26527
26527
|
case "com.amazonaws.ssooidc#UnauthorizedClientException":
|
|
26528
|
-
throw await de_UnauthorizedClientExceptionRes(parsedOutput,
|
|
26528
|
+
throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);
|
|
26529
26529
|
case "UnsupportedGrantTypeException":
|
|
26530
26530
|
case "com.amazonaws.ssooidc#UnsupportedGrantTypeException":
|
|
26531
|
-
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput,
|
|
26531
|
+
throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);
|
|
26532
26532
|
default:
|
|
26533
26533
|
const parsedBody = parsedOutput.body;
|
|
26534
26534
|
return throwDefaultError({
|
|
@@ -26539,7 +26539,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26539
26539
|
}
|
|
26540
26540
|
};
|
|
26541
26541
|
throwDefaultError = (0, import_smithy_client14.withBaseException)(SSOOIDCServiceException);
|
|
26542
|
-
de_AccessDeniedExceptionRes = async (parsedOutput,
|
|
26542
|
+
de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
26543
26543
|
const contents = (0, import_smithy_client14.map)({});
|
|
26544
26544
|
const data2 = parsedOutput.body;
|
|
26545
26545
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26554,7 +26554,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26554
26554
|
});
|
|
26555
26555
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26556
26556
|
};
|
|
26557
|
-
de_AuthorizationPendingExceptionRes = async (parsedOutput,
|
|
26557
|
+
de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => {
|
|
26558
26558
|
const contents = (0, import_smithy_client14.map)({});
|
|
26559
26559
|
const data2 = parsedOutput.body;
|
|
26560
26560
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26568,7 +26568,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26568
26568
|
});
|
|
26569
26569
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26570
26570
|
};
|
|
26571
|
-
de_ExpiredTokenExceptionRes = async (parsedOutput,
|
|
26571
|
+
de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
|
|
26572
26572
|
const contents = (0, import_smithy_client14.map)({});
|
|
26573
26573
|
const data2 = parsedOutput.body;
|
|
26574
26574
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26582,7 +26582,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26582
26582
|
});
|
|
26583
26583
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26584
26584
|
};
|
|
26585
|
-
de_InternalServerExceptionRes = async (parsedOutput,
|
|
26585
|
+
de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
26586
26586
|
const contents = (0, import_smithy_client14.map)({});
|
|
26587
26587
|
const data2 = parsedOutput.body;
|
|
26588
26588
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26596,7 +26596,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26596
26596
|
});
|
|
26597
26597
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26598
26598
|
};
|
|
26599
|
-
de_InvalidClientExceptionRes = async (parsedOutput,
|
|
26599
|
+
de_InvalidClientExceptionRes = async (parsedOutput, context) => {
|
|
26600
26600
|
const contents = (0, import_smithy_client14.map)({});
|
|
26601
26601
|
const data2 = parsedOutput.body;
|
|
26602
26602
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26610,7 +26610,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26610
26610
|
});
|
|
26611
26611
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26612
26612
|
};
|
|
26613
|
-
de_InvalidGrantExceptionRes = async (parsedOutput,
|
|
26613
|
+
de_InvalidGrantExceptionRes = async (parsedOutput, context) => {
|
|
26614
26614
|
const contents = (0, import_smithy_client14.map)({});
|
|
26615
26615
|
const data2 = parsedOutput.body;
|
|
26616
26616
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26624,7 +26624,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26624
26624
|
});
|
|
26625
26625
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26626
26626
|
};
|
|
26627
|
-
de_InvalidRequestExceptionRes = async (parsedOutput,
|
|
26627
|
+
de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
|
|
26628
26628
|
const contents = (0, import_smithy_client14.map)({});
|
|
26629
26629
|
const data2 = parsedOutput.body;
|
|
26630
26630
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26639,7 +26639,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26639
26639
|
});
|
|
26640
26640
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26641
26641
|
};
|
|
26642
|
-
de_InvalidScopeExceptionRes = async (parsedOutput,
|
|
26642
|
+
de_InvalidScopeExceptionRes = async (parsedOutput, context) => {
|
|
26643
26643
|
const contents = (0, import_smithy_client14.map)({});
|
|
26644
26644
|
const data2 = parsedOutput.body;
|
|
26645
26645
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26653,7 +26653,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26653
26653
|
});
|
|
26654
26654
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26655
26655
|
};
|
|
26656
|
-
de_SlowDownExceptionRes = async (parsedOutput,
|
|
26656
|
+
de_SlowDownExceptionRes = async (parsedOutput, context) => {
|
|
26657
26657
|
const contents = (0, import_smithy_client14.map)({});
|
|
26658
26658
|
const data2 = parsedOutput.body;
|
|
26659
26659
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26667,7 +26667,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26667
26667
|
});
|
|
26668
26668
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26669
26669
|
};
|
|
26670
|
-
de_UnauthorizedClientExceptionRes = async (parsedOutput,
|
|
26670
|
+
de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => {
|
|
26671
26671
|
const contents = (0, import_smithy_client14.map)({});
|
|
26672
26672
|
const data2 = parsedOutput.body;
|
|
26673
26673
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26681,7 +26681,7 @@ var init_Aws_restJson1 = __esm({
|
|
|
26681
26681
|
});
|
|
26682
26682
|
return (0, import_smithy_client14.decorateServiceException)(exception, parsedOutput.body);
|
|
26683
26683
|
};
|
|
26684
|
-
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput,
|
|
26684
|
+
de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => {
|
|
26685
26685
|
const contents = (0, import_smithy_client14.map)({});
|
|
26686
26686
|
const data2 = parsedOutput.body;
|
|
26687
26687
|
const doc = (0, import_smithy_client14.take)(data2, {
|
|
@@ -26949,9 +26949,9 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
26949
26949
|
exports2.resolveHttpAuthSchemeConfig = exports2.defaultSSOHttpAuthSchemeProvider = exports2.defaultSSOHttpAuthSchemeParametersProvider = void 0;
|
|
26950
26950
|
var core_1 = (init_dist_es2(), __toCommonJS(dist_es_exports2));
|
|
26951
26951
|
var util_middleware_1 = require_dist_cjs7();
|
|
26952
|
-
var defaultSSOHttpAuthSchemeParametersProvider = async (config,
|
|
26952
|
+
var defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
26953
26953
|
return {
|
|
26954
|
-
operation: (0, util_middleware_1.getSmithyContext)(
|
|
26954
|
+
operation: (0, util_middleware_1.getSmithyContext)(context).operation,
|
|
26955
26955
|
region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
|
|
26956
26956
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
26957
26957
|
})()
|
|
@@ -26965,10 +26965,10 @@ var require_httpAuthSchemeProvider2 = __commonJS({
|
|
|
26965
26965
|
name: "awsssoportal",
|
|
26966
26966
|
region: authParameters.region
|
|
26967
26967
|
},
|
|
26968
|
-
propertiesExtractor: (config,
|
|
26968
|
+
propertiesExtractor: (config, context) => ({
|
|
26969
26969
|
signingProperties: {
|
|
26970
26970
|
config,
|
|
26971
|
-
context
|
|
26971
|
+
context
|
|
26972
26972
|
}
|
|
26973
26973
|
})
|
|
26974
26974
|
};
|
|
@@ -27166,10 +27166,10 @@ var require_endpointResolver = __commonJS({
|
|
|
27166
27166
|
size: 50,
|
|
27167
27167
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
27168
27168
|
});
|
|
27169
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
27169
|
+
var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
27170
27170
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
27171
27171
|
endpointParams,
|
|
27172
|
-
logger:
|
|
27172
|
+
logger: context.logger
|
|
27173
27173
|
}));
|
|
27174
27174
|
};
|
|
27175
27175
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -27467,8 +27467,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27467
27467
|
...obj,
|
|
27468
27468
|
...obj.accessToken && { accessToken: smithyClient.SENSITIVE_STRING }
|
|
27469
27469
|
});
|
|
27470
|
-
var se_GetRoleCredentialsCommand = async (input,
|
|
27471
|
-
const b3 = core.requestBuilder(input,
|
|
27470
|
+
var se_GetRoleCredentialsCommand = async (input, context) => {
|
|
27471
|
+
const b3 = core.requestBuilder(input, context);
|
|
27472
27472
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
27473
27473
|
[_xasbt]: input[_aT]
|
|
27474
27474
|
});
|
|
@@ -27481,8 +27481,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27481
27481
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
27482
27482
|
return b3.build();
|
|
27483
27483
|
};
|
|
27484
|
-
var se_ListAccountRolesCommand = async (input,
|
|
27485
|
-
const b3 = core.requestBuilder(input,
|
|
27484
|
+
var se_ListAccountRolesCommand = async (input, context) => {
|
|
27485
|
+
const b3 = core.requestBuilder(input, context);
|
|
27486
27486
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
27487
27487
|
[_xasbt]: input[_aT]
|
|
27488
27488
|
});
|
|
@@ -27496,8 +27496,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27496
27496
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
27497
27497
|
return b3.build();
|
|
27498
27498
|
};
|
|
27499
|
-
var se_ListAccountsCommand = async (input,
|
|
27500
|
-
const b3 = core.requestBuilder(input,
|
|
27499
|
+
var se_ListAccountsCommand = async (input, context) => {
|
|
27500
|
+
const b3 = core.requestBuilder(input, context);
|
|
27501
27501
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
27502
27502
|
[_xasbt]: input[_aT]
|
|
27503
27503
|
});
|
|
@@ -27510,8 +27510,8 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27510
27510
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
27511
27511
|
return b3.build();
|
|
27512
27512
|
};
|
|
27513
|
-
var se_LogoutCommand = async (input,
|
|
27514
|
-
const b3 = core.requestBuilder(input,
|
|
27513
|
+
var se_LogoutCommand = async (input, context) => {
|
|
27514
|
+
const b3 = core.requestBuilder(input, context);
|
|
27515
27515
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
27516
27516
|
[_xasbt]: input[_aT]
|
|
27517
27517
|
});
|
|
@@ -27520,28 +27520,28 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27520
27520
|
b3.m("POST").h(headers).b(body);
|
|
27521
27521
|
return b3.build();
|
|
27522
27522
|
};
|
|
27523
|
-
var de_GetRoleCredentialsCommand = async (output,
|
|
27523
|
+
var de_GetRoleCredentialsCommand = async (output, context) => {
|
|
27524
27524
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
27525
|
-
return de_CommandError3(output,
|
|
27525
|
+
return de_CommandError3(output, context);
|
|
27526
27526
|
}
|
|
27527
27527
|
const contents = smithyClient.map({
|
|
27528
27528
|
$metadata: deserializeMetadata3(output)
|
|
27529
27529
|
});
|
|
27530
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
27530
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
27531
27531
|
const doc = smithyClient.take(data2, {
|
|
27532
27532
|
roleCredentials: smithyClient._json
|
|
27533
27533
|
});
|
|
27534
27534
|
Object.assign(contents, doc);
|
|
27535
27535
|
return contents;
|
|
27536
27536
|
};
|
|
27537
|
-
var de_ListAccountRolesCommand = async (output,
|
|
27537
|
+
var de_ListAccountRolesCommand = async (output, context) => {
|
|
27538
27538
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
27539
|
-
return de_CommandError3(output,
|
|
27539
|
+
return de_CommandError3(output, context);
|
|
27540
27540
|
}
|
|
27541
27541
|
const contents = smithyClient.map({
|
|
27542
27542
|
$metadata: deserializeMetadata3(output)
|
|
27543
27543
|
});
|
|
27544
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
27544
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
27545
27545
|
const doc = smithyClient.take(data2, {
|
|
27546
27546
|
nextToken: smithyClient.expectString,
|
|
27547
27547
|
roleList: smithyClient._json
|
|
@@ -27549,14 +27549,14 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27549
27549
|
Object.assign(contents, doc);
|
|
27550
27550
|
return contents;
|
|
27551
27551
|
};
|
|
27552
|
-
var de_ListAccountsCommand = async (output,
|
|
27552
|
+
var de_ListAccountsCommand = async (output, context) => {
|
|
27553
27553
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
27554
|
-
return de_CommandError3(output,
|
|
27554
|
+
return de_CommandError3(output, context);
|
|
27555
27555
|
}
|
|
27556
27556
|
const contents = smithyClient.map({
|
|
27557
27557
|
$metadata: deserializeMetadata3(output)
|
|
27558
27558
|
});
|
|
27559
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
27559
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
27560
27560
|
const doc = smithyClient.take(data2, {
|
|
27561
27561
|
accountList: smithyClient._json,
|
|
27562
27562
|
nextToken: smithyClient.expectString
|
|
@@ -27564,20 +27564,20 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27564
27564
|
Object.assign(contents, doc);
|
|
27565
27565
|
return contents;
|
|
27566
27566
|
};
|
|
27567
|
-
var de_LogoutCommand = async (output,
|
|
27567
|
+
var de_LogoutCommand = async (output, context) => {
|
|
27568
27568
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
27569
|
-
return de_CommandError3(output,
|
|
27569
|
+
return de_CommandError3(output, context);
|
|
27570
27570
|
}
|
|
27571
27571
|
const contents = smithyClient.map({
|
|
27572
27572
|
$metadata: deserializeMetadata3(output)
|
|
27573
27573
|
});
|
|
27574
|
-
await smithyClient.collectBody(output.body,
|
|
27574
|
+
await smithyClient.collectBody(output.body, context);
|
|
27575
27575
|
return contents;
|
|
27576
27576
|
};
|
|
27577
|
-
var de_CommandError3 = async (output,
|
|
27577
|
+
var de_CommandError3 = async (output, context) => {
|
|
27578
27578
|
const parsedOutput = {
|
|
27579
27579
|
...output,
|
|
27580
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
27580
|
+
body: await core$1.parseJsonErrorBody(output.body, context)
|
|
27581
27581
|
};
|
|
27582
27582
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
27583
27583
|
switch (errorCode) {
|
|
@@ -27603,7 +27603,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27603
27603
|
}
|
|
27604
27604
|
};
|
|
27605
27605
|
var throwDefaultError3 = smithyClient.withBaseException(SSOServiceException);
|
|
27606
|
-
var de_InvalidRequestExceptionRes2 = async (parsedOutput,
|
|
27606
|
+
var de_InvalidRequestExceptionRes2 = async (parsedOutput, context) => {
|
|
27607
27607
|
const contents = smithyClient.map({});
|
|
27608
27608
|
const data2 = parsedOutput.body;
|
|
27609
27609
|
const doc = smithyClient.take(data2, {
|
|
@@ -27616,7 +27616,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27616
27616
|
});
|
|
27617
27617
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
27618
27618
|
};
|
|
27619
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
27619
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
27620
27620
|
const contents = smithyClient.map({});
|
|
27621
27621
|
const data2 = parsedOutput.body;
|
|
27622
27622
|
const doc = smithyClient.take(data2, {
|
|
@@ -27629,7 +27629,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27629
27629
|
});
|
|
27630
27630
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
27631
27631
|
};
|
|
27632
|
-
var de_TooManyRequestsExceptionRes = async (parsedOutput,
|
|
27632
|
+
var de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
27633
27633
|
const contents = smithyClient.map({});
|
|
27634
27634
|
const data2 = parsedOutput.body;
|
|
27635
27635
|
const doc = smithyClient.take(data2, {
|
|
@@ -27642,7 +27642,7 @@ var require_dist_cjs57 = __commonJS({
|
|
|
27642
27642
|
});
|
|
27643
27643
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
27644
27644
|
};
|
|
27645
|
-
var de_UnauthorizedExceptionRes = async (parsedOutput,
|
|
27645
|
+
var de_UnauthorizedExceptionRes = async (parsedOutput, context) => {
|
|
27646
27646
|
const contents = smithyClient.map({});
|
|
27647
27647
|
const data2 = parsedOutput.body;
|
|
27648
27648
|
const doc = smithyClient.take(data2, {
|
|
@@ -27949,10 +27949,10 @@ function createAwsAuthSigv4HttpAuthOption2(authParameters) {
|
|
|
27949
27949
|
name: "sts",
|
|
27950
27950
|
region: authParameters.region
|
|
27951
27951
|
},
|
|
27952
|
-
propertiesExtractor: (config,
|
|
27952
|
+
propertiesExtractor: (config, context) => ({
|
|
27953
27953
|
signingProperties: {
|
|
27954
27954
|
config,
|
|
27955
|
-
context
|
|
27955
|
+
context
|
|
27956
27956
|
}
|
|
27957
27957
|
})
|
|
27958
27958
|
};
|
|
@@ -27968,9 +27968,9 @@ var init_httpAuthSchemeProvider2 = __esm({
|
|
|
27968
27968
|
init_dist_es2();
|
|
27969
27969
|
import_util_middleware7 = __toESM(require_dist_cjs7());
|
|
27970
27970
|
init_STSClient();
|
|
27971
|
-
defaultSTSHttpAuthSchemeParametersProvider = async (config,
|
|
27971
|
+
defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
27972
27972
|
return {
|
|
27973
|
-
operation: (0, import_util_middleware7.getSmithyContext)(
|
|
27973
|
+
operation: (0, import_util_middleware7.getSmithyContext)(context).operation,
|
|
27974
27974
|
region: await (0, import_util_middleware7.normalizeProvider)(config.region)() || (() => {
|
|
27975
27975
|
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
27976
27976
|
})()
|
|
@@ -28080,10 +28080,10 @@ var init_endpointResolver2 = __esm({
|
|
|
28080
28080
|
size: 50,
|
|
28081
28081
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
|
|
28082
28082
|
});
|
|
28083
|
-
defaultEndpointResolver2 = (endpointParams,
|
|
28083
|
+
defaultEndpointResolver2 = (endpointParams, context = {}) => {
|
|
28084
28084
|
return cache2.get(endpointParams, () => (0, import_util_endpoints4.resolveEndpoint)(ruleSet2, {
|
|
28085
28085
|
endpointParams,
|
|
28086
|
-
logger:
|
|
28086
|
+
logger: context.logger
|
|
28087
28087
|
}));
|
|
28088
28088
|
};
|
|
28089
28089
|
import_util_endpoints4.customEndpointFunctions.aws = import_util_endpoints3.awsEndpointFunctions;
|
|
@@ -28445,80 +28445,80 @@ var init_Aws_query = __esm({
|
|
|
28445
28445
|
import_smithy_client24 = __toESM(require_dist_cjs27());
|
|
28446
28446
|
init_models_02();
|
|
28447
28447
|
init_STSServiceException();
|
|
28448
|
-
se_AssumeRoleCommand = async (input,
|
|
28448
|
+
se_AssumeRoleCommand = async (input, context) => {
|
|
28449
28449
|
const headers = SHARED_HEADERS;
|
|
28450
28450
|
let body;
|
|
28451
28451
|
body = buildFormUrlencodedString({
|
|
28452
|
-
...se_AssumeRoleRequest(input,
|
|
28452
|
+
...se_AssumeRoleRequest(input, context),
|
|
28453
28453
|
[_A]: _AR,
|
|
28454
28454
|
[_V]: _
|
|
28455
28455
|
});
|
|
28456
|
-
return buildHttpRpcRequest(
|
|
28456
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
28457
28457
|
};
|
|
28458
|
-
se_AssumeRoleWithWebIdentityCommand = async (input,
|
|
28458
|
+
se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
|
|
28459
28459
|
const headers = SHARED_HEADERS;
|
|
28460
28460
|
let body;
|
|
28461
28461
|
body = buildFormUrlencodedString({
|
|
28462
|
-
...se_AssumeRoleWithWebIdentityRequest(input,
|
|
28462
|
+
...se_AssumeRoleWithWebIdentityRequest(input, context),
|
|
28463
28463
|
[_A]: _ARWWI,
|
|
28464
28464
|
[_V]: _
|
|
28465
28465
|
});
|
|
28466
|
-
return buildHttpRpcRequest(
|
|
28466
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
28467
28467
|
};
|
|
28468
|
-
de_AssumeRoleCommand = async (output,
|
|
28468
|
+
de_AssumeRoleCommand = async (output, context) => {
|
|
28469
28469
|
if (output.statusCode >= 300) {
|
|
28470
|
-
return de_CommandError2(output,
|
|
28470
|
+
return de_CommandError2(output, context);
|
|
28471
28471
|
}
|
|
28472
|
-
const data2 = await parseXmlBody(output.body,
|
|
28472
|
+
const data2 = await parseXmlBody(output.body, context);
|
|
28473
28473
|
let contents = {};
|
|
28474
|
-
contents = de_AssumeRoleResponse(data2.AssumeRoleResult,
|
|
28474
|
+
contents = de_AssumeRoleResponse(data2.AssumeRoleResult, context);
|
|
28475
28475
|
const response = {
|
|
28476
28476
|
$metadata: deserializeMetadata2(output),
|
|
28477
28477
|
...contents
|
|
28478
28478
|
};
|
|
28479
28479
|
return response;
|
|
28480
28480
|
};
|
|
28481
|
-
de_AssumeRoleWithWebIdentityCommand = async (output,
|
|
28481
|
+
de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
|
|
28482
28482
|
if (output.statusCode >= 300) {
|
|
28483
|
-
return de_CommandError2(output,
|
|
28483
|
+
return de_CommandError2(output, context);
|
|
28484
28484
|
}
|
|
28485
|
-
const data2 = await parseXmlBody(output.body,
|
|
28485
|
+
const data2 = await parseXmlBody(output.body, context);
|
|
28486
28486
|
let contents = {};
|
|
28487
|
-
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult,
|
|
28487
|
+
contents = de_AssumeRoleWithWebIdentityResponse(data2.AssumeRoleWithWebIdentityResult, context);
|
|
28488
28488
|
const response = {
|
|
28489
28489
|
$metadata: deserializeMetadata2(output),
|
|
28490
28490
|
...contents
|
|
28491
28491
|
};
|
|
28492
28492
|
return response;
|
|
28493
28493
|
};
|
|
28494
|
-
de_CommandError2 = async (output,
|
|
28494
|
+
de_CommandError2 = async (output, context) => {
|
|
28495
28495
|
const parsedOutput = {
|
|
28496
28496
|
...output,
|
|
28497
|
-
body: await parseXmlErrorBody(output.body,
|
|
28497
|
+
body: await parseXmlErrorBody(output.body, context)
|
|
28498
28498
|
};
|
|
28499
28499
|
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
28500
28500
|
switch (errorCode) {
|
|
28501
28501
|
case "ExpiredTokenException":
|
|
28502
28502
|
case "com.amazonaws.sts#ExpiredTokenException":
|
|
28503
|
-
throw await de_ExpiredTokenExceptionRes2(parsedOutput,
|
|
28503
|
+
throw await de_ExpiredTokenExceptionRes2(parsedOutput, context);
|
|
28504
28504
|
case "MalformedPolicyDocument":
|
|
28505
28505
|
case "com.amazonaws.sts#MalformedPolicyDocumentException":
|
|
28506
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput,
|
|
28506
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
28507
28507
|
case "PackedPolicyTooLarge":
|
|
28508
28508
|
case "com.amazonaws.sts#PackedPolicyTooLargeException":
|
|
28509
|
-
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput,
|
|
28509
|
+
throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);
|
|
28510
28510
|
case "RegionDisabledException":
|
|
28511
28511
|
case "com.amazonaws.sts#RegionDisabledException":
|
|
28512
|
-
throw await de_RegionDisabledExceptionRes(parsedOutput,
|
|
28512
|
+
throw await de_RegionDisabledExceptionRes(parsedOutput, context);
|
|
28513
28513
|
case "IDPCommunicationError":
|
|
28514
28514
|
case "com.amazonaws.sts#IDPCommunicationErrorException":
|
|
28515
|
-
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput,
|
|
28515
|
+
throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);
|
|
28516
28516
|
case "IDPRejectedClaim":
|
|
28517
28517
|
case "com.amazonaws.sts#IDPRejectedClaimException":
|
|
28518
|
-
throw await de_IDPRejectedClaimExceptionRes(parsedOutput,
|
|
28518
|
+
throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);
|
|
28519
28519
|
case "InvalidIdentityToken":
|
|
28520
28520
|
case "com.amazonaws.sts#InvalidIdentityTokenException":
|
|
28521
|
-
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput,
|
|
28521
|
+
throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);
|
|
28522
28522
|
default:
|
|
28523
28523
|
const parsedBody = parsedOutput.body;
|
|
28524
28524
|
return throwDefaultError2({
|
|
@@ -28528,70 +28528,70 @@ var init_Aws_query = __esm({
|
|
|
28528
28528
|
});
|
|
28529
28529
|
}
|
|
28530
28530
|
};
|
|
28531
|
-
de_ExpiredTokenExceptionRes2 = async (parsedOutput,
|
|
28531
|
+
de_ExpiredTokenExceptionRes2 = async (parsedOutput, context) => {
|
|
28532
28532
|
const body = parsedOutput.body;
|
|
28533
|
-
const deserialized = de_ExpiredTokenException(body.Error,
|
|
28533
|
+
const deserialized = de_ExpiredTokenException(body.Error, context);
|
|
28534
28534
|
const exception = new ExpiredTokenException2({
|
|
28535
28535
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28536
28536
|
...deserialized
|
|
28537
28537
|
});
|
|
28538
28538
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28539
28539
|
};
|
|
28540
|
-
de_IDPCommunicationErrorExceptionRes = async (parsedOutput,
|
|
28540
|
+
de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
|
|
28541
28541
|
const body = parsedOutput.body;
|
|
28542
|
-
const deserialized = de_IDPCommunicationErrorException(body.Error,
|
|
28542
|
+
const deserialized = de_IDPCommunicationErrorException(body.Error, context);
|
|
28543
28543
|
const exception = new IDPCommunicationErrorException({
|
|
28544
28544
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28545
28545
|
...deserialized
|
|
28546
28546
|
});
|
|
28547
28547
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28548
28548
|
};
|
|
28549
|
-
de_IDPRejectedClaimExceptionRes = async (parsedOutput,
|
|
28549
|
+
de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
|
|
28550
28550
|
const body = parsedOutput.body;
|
|
28551
|
-
const deserialized = de_IDPRejectedClaimException(body.Error,
|
|
28551
|
+
const deserialized = de_IDPRejectedClaimException(body.Error, context);
|
|
28552
28552
|
const exception = new IDPRejectedClaimException({
|
|
28553
28553
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28554
28554
|
...deserialized
|
|
28555
28555
|
});
|
|
28556
28556
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28557
28557
|
};
|
|
28558
|
-
de_InvalidIdentityTokenExceptionRes = async (parsedOutput,
|
|
28558
|
+
de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
|
|
28559
28559
|
const body = parsedOutput.body;
|
|
28560
|
-
const deserialized = de_InvalidIdentityTokenException(body.Error,
|
|
28560
|
+
const deserialized = de_InvalidIdentityTokenException(body.Error, context);
|
|
28561
28561
|
const exception = new InvalidIdentityTokenException({
|
|
28562
28562
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28563
28563
|
...deserialized
|
|
28564
28564
|
});
|
|
28565
28565
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28566
28566
|
};
|
|
28567
|
-
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput,
|
|
28567
|
+
de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
|
|
28568
28568
|
const body = parsedOutput.body;
|
|
28569
|
-
const deserialized = de_MalformedPolicyDocumentException(body.Error,
|
|
28569
|
+
const deserialized = de_MalformedPolicyDocumentException(body.Error, context);
|
|
28570
28570
|
const exception = new MalformedPolicyDocumentException({
|
|
28571
28571
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28572
28572
|
...deserialized
|
|
28573
28573
|
});
|
|
28574
28574
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28575
28575
|
};
|
|
28576
|
-
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput,
|
|
28576
|
+
de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
28577
28577
|
const body = parsedOutput.body;
|
|
28578
|
-
const deserialized = de_PackedPolicyTooLargeException(body.Error,
|
|
28578
|
+
const deserialized = de_PackedPolicyTooLargeException(body.Error, context);
|
|
28579
28579
|
const exception = new PackedPolicyTooLargeException({
|
|
28580
28580
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28581
28581
|
...deserialized
|
|
28582
28582
|
});
|
|
28583
28583
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28584
28584
|
};
|
|
28585
|
-
de_RegionDisabledExceptionRes = async (parsedOutput,
|
|
28585
|
+
de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
|
|
28586
28586
|
const body = parsedOutput.body;
|
|
28587
|
-
const deserialized = de_RegionDisabledException(body.Error,
|
|
28587
|
+
const deserialized = de_RegionDisabledException(body.Error, context);
|
|
28588
28588
|
const exception = new RegionDisabledException({
|
|
28589
28589
|
$metadata: deserializeMetadata2(parsedOutput),
|
|
28590
28590
|
...deserialized
|
|
28591
28591
|
});
|
|
28592
28592
|
return (0, import_smithy_client24.decorateServiceException)(exception, body);
|
|
28593
28593
|
};
|
|
28594
|
-
se_AssumeRoleRequest = (input,
|
|
28594
|
+
se_AssumeRoleRequest = (input, context) => {
|
|
28595
28595
|
const entries = {};
|
|
28596
28596
|
if (input[_RA] != null) {
|
|
28597
28597
|
entries[_RA] = input[_RA];
|
|
@@ -28600,7 +28600,7 @@ var init_Aws_query = __esm({
|
|
|
28600
28600
|
entries[_RSN] = input[_RSN];
|
|
28601
28601
|
}
|
|
28602
28602
|
if (input[_PA] != null) {
|
|
28603
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
28603
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
28604
28604
|
if (input[_PA]?.length === 0) {
|
|
28605
28605
|
entries.PolicyArns = [];
|
|
28606
28606
|
}
|
|
@@ -28616,7 +28616,7 @@ var init_Aws_query = __esm({
|
|
|
28616
28616
|
entries[_DS] = input[_DS];
|
|
28617
28617
|
}
|
|
28618
28618
|
if (input[_T] != null) {
|
|
28619
|
-
const memberEntries = se_tagListType(input[_T],
|
|
28619
|
+
const memberEntries = se_tagListType(input[_T], context);
|
|
28620
28620
|
if (input[_T]?.length === 0) {
|
|
28621
28621
|
entries.Tags = [];
|
|
28622
28622
|
}
|
|
@@ -28626,7 +28626,7 @@ var init_Aws_query = __esm({
|
|
|
28626
28626
|
});
|
|
28627
28627
|
}
|
|
28628
28628
|
if (input[_TTK] != null) {
|
|
28629
|
-
const memberEntries = se_tagKeyListType(input[_TTK],
|
|
28629
|
+
const memberEntries = se_tagKeyListType(input[_TTK], context);
|
|
28630
28630
|
if (input[_TTK]?.length === 0) {
|
|
28631
28631
|
entries.TransitiveTagKeys = [];
|
|
28632
28632
|
}
|
|
@@ -28648,7 +28648,7 @@ var init_Aws_query = __esm({
|
|
|
28648
28648
|
entries[_SI] = input[_SI];
|
|
28649
28649
|
}
|
|
28650
28650
|
if (input[_PC] != null) {
|
|
28651
|
-
const memberEntries = se_ProvidedContextsListType(input[_PC],
|
|
28651
|
+
const memberEntries = se_ProvidedContextsListType(input[_PC], context);
|
|
28652
28652
|
if (input[_PC]?.length === 0) {
|
|
28653
28653
|
entries.ProvidedContexts = [];
|
|
28654
28654
|
}
|
|
@@ -28659,7 +28659,7 @@ var init_Aws_query = __esm({
|
|
|
28659
28659
|
}
|
|
28660
28660
|
return entries;
|
|
28661
28661
|
};
|
|
28662
|
-
se_AssumeRoleWithWebIdentityRequest = (input,
|
|
28662
|
+
se_AssumeRoleWithWebIdentityRequest = (input, context) => {
|
|
28663
28663
|
const entries = {};
|
|
28664
28664
|
if (input[_RA] != null) {
|
|
28665
28665
|
entries[_RA] = input[_RA];
|
|
@@ -28674,7 +28674,7 @@ var init_Aws_query = __esm({
|
|
|
28674
28674
|
entries[_PI] = input[_PI];
|
|
28675
28675
|
}
|
|
28676
28676
|
if (input[_PA] != null) {
|
|
28677
|
-
const memberEntries = se_policyDescriptorListType(input[_PA],
|
|
28677
|
+
const memberEntries = se_policyDescriptorListType(input[_PA], context);
|
|
28678
28678
|
if (input[_PA]?.length === 0) {
|
|
28679
28679
|
entries.PolicyArns = [];
|
|
28680
28680
|
}
|
|
@@ -28691,14 +28691,14 @@ var init_Aws_query = __esm({
|
|
|
28691
28691
|
}
|
|
28692
28692
|
return entries;
|
|
28693
28693
|
};
|
|
28694
|
-
se_policyDescriptorListType = (input,
|
|
28694
|
+
se_policyDescriptorListType = (input, context) => {
|
|
28695
28695
|
const entries = {};
|
|
28696
28696
|
let counter = 1;
|
|
28697
28697
|
for (const entry of input) {
|
|
28698
28698
|
if (entry === null) {
|
|
28699
28699
|
continue;
|
|
28700
28700
|
}
|
|
28701
|
-
const memberEntries = se_PolicyDescriptorType(entry,
|
|
28701
|
+
const memberEntries = se_PolicyDescriptorType(entry, context);
|
|
28702
28702
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
28703
28703
|
entries[`member.${counter}.${key}`] = value;
|
|
28704
28704
|
});
|
|
@@ -28706,14 +28706,14 @@ var init_Aws_query = __esm({
|
|
|
28706
28706
|
}
|
|
28707
28707
|
return entries;
|
|
28708
28708
|
};
|
|
28709
|
-
se_PolicyDescriptorType = (input,
|
|
28709
|
+
se_PolicyDescriptorType = (input, context) => {
|
|
28710
28710
|
const entries = {};
|
|
28711
28711
|
if (input[_a15] != null) {
|
|
28712
28712
|
entries[_a15] = input[_a15];
|
|
28713
28713
|
}
|
|
28714
28714
|
return entries;
|
|
28715
28715
|
};
|
|
28716
|
-
se_ProvidedContext = (input,
|
|
28716
|
+
se_ProvidedContext = (input, context) => {
|
|
28717
28717
|
const entries = {};
|
|
28718
28718
|
if (input[_PAr] != null) {
|
|
28719
28719
|
entries[_PAr] = input[_PAr];
|
|
@@ -28723,14 +28723,14 @@ var init_Aws_query = __esm({
|
|
|
28723
28723
|
}
|
|
28724
28724
|
return entries;
|
|
28725
28725
|
};
|
|
28726
|
-
se_ProvidedContextsListType = (input,
|
|
28726
|
+
se_ProvidedContextsListType = (input, context) => {
|
|
28727
28727
|
const entries = {};
|
|
28728
28728
|
let counter = 1;
|
|
28729
28729
|
for (const entry of input) {
|
|
28730
28730
|
if (entry === null) {
|
|
28731
28731
|
continue;
|
|
28732
28732
|
}
|
|
28733
|
-
const memberEntries = se_ProvidedContext(entry,
|
|
28733
|
+
const memberEntries = se_ProvidedContext(entry, context);
|
|
28734
28734
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
28735
28735
|
entries[`member.${counter}.${key}`] = value;
|
|
28736
28736
|
});
|
|
@@ -28738,7 +28738,7 @@ var init_Aws_query = __esm({
|
|
|
28738
28738
|
}
|
|
28739
28739
|
return entries;
|
|
28740
28740
|
};
|
|
28741
|
-
se_Tag = (input,
|
|
28741
|
+
se_Tag = (input, context) => {
|
|
28742
28742
|
const entries = {};
|
|
28743
28743
|
if (input[_K] != null) {
|
|
28744
28744
|
entries[_K] = input[_K];
|
|
@@ -28748,7 +28748,7 @@ var init_Aws_query = __esm({
|
|
|
28748
28748
|
}
|
|
28749
28749
|
return entries;
|
|
28750
28750
|
};
|
|
28751
|
-
se_tagKeyListType = (input,
|
|
28751
|
+
se_tagKeyListType = (input, context) => {
|
|
28752
28752
|
const entries = {};
|
|
28753
28753
|
let counter = 1;
|
|
28754
28754
|
for (const entry of input) {
|
|
@@ -28760,14 +28760,14 @@ var init_Aws_query = __esm({
|
|
|
28760
28760
|
}
|
|
28761
28761
|
return entries;
|
|
28762
28762
|
};
|
|
28763
|
-
se_tagListType = (input,
|
|
28763
|
+
se_tagListType = (input, context) => {
|
|
28764
28764
|
const entries = {};
|
|
28765
28765
|
let counter = 1;
|
|
28766
28766
|
for (const entry of input) {
|
|
28767
28767
|
if (entry === null) {
|
|
28768
28768
|
continue;
|
|
28769
28769
|
}
|
|
28770
|
-
const memberEntries = se_Tag(entry,
|
|
28770
|
+
const memberEntries = se_Tag(entry, context);
|
|
28771
28771
|
Object.entries(memberEntries).forEach(([key, value]) => {
|
|
28772
28772
|
entries[`member.${counter}.${key}`] = value;
|
|
28773
28773
|
});
|
|
@@ -28775,7 +28775,7 @@ var init_Aws_query = __esm({
|
|
|
28775
28775
|
}
|
|
28776
28776
|
return entries;
|
|
28777
28777
|
};
|
|
28778
|
-
de_AssumedRoleUser = (output,
|
|
28778
|
+
de_AssumedRoleUser = (output, context) => {
|
|
28779
28779
|
const contents = {};
|
|
28780
28780
|
if (output[_ARI] != null) {
|
|
28781
28781
|
contents[_ARI] = (0, import_smithy_client24.expectString)(output[_ARI]);
|
|
@@ -28785,13 +28785,13 @@ var init_Aws_query = __esm({
|
|
|
28785
28785
|
}
|
|
28786
28786
|
return contents;
|
|
28787
28787
|
};
|
|
28788
|
-
de_AssumeRoleResponse = (output,
|
|
28788
|
+
de_AssumeRoleResponse = (output, context) => {
|
|
28789
28789
|
const contents = {};
|
|
28790
28790
|
if (output[_C] != null) {
|
|
28791
|
-
contents[_C] = de_Credentials(output[_C],
|
|
28791
|
+
contents[_C] = de_Credentials(output[_C], context);
|
|
28792
28792
|
}
|
|
28793
28793
|
if (output[_ARU] != null) {
|
|
28794
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
28794
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
28795
28795
|
}
|
|
28796
28796
|
if (output[_PPS] != null) {
|
|
28797
28797
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -28801,16 +28801,16 @@ var init_Aws_query = __esm({
|
|
|
28801
28801
|
}
|
|
28802
28802
|
return contents;
|
|
28803
28803
|
};
|
|
28804
|
-
de_AssumeRoleWithWebIdentityResponse = (output,
|
|
28804
|
+
de_AssumeRoleWithWebIdentityResponse = (output, context) => {
|
|
28805
28805
|
const contents = {};
|
|
28806
28806
|
if (output[_C] != null) {
|
|
28807
|
-
contents[_C] = de_Credentials(output[_C],
|
|
28807
|
+
contents[_C] = de_Credentials(output[_C], context);
|
|
28808
28808
|
}
|
|
28809
28809
|
if (output[_SFWIT] != null) {
|
|
28810
28810
|
contents[_SFWIT] = (0, import_smithy_client24.expectString)(output[_SFWIT]);
|
|
28811
28811
|
}
|
|
28812
28812
|
if (output[_ARU] != null) {
|
|
28813
|
-
contents[_ARU] = de_AssumedRoleUser(output[_ARU],
|
|
28813
|
+
contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);
|
|
28814
28814
|
}
|
|
28815
28815
|
if (output[_PPS] != null) {
|
|
28816
28816
|
contents[_PPS] = (0, import_smithy_client24.strictParseInt32)(output[_PPS]);
|
|
@@ -28826,7 +28826,7 @@ var init_Aws_query = __esm({
|
|
|
28826
28826
|
}
|
|
28827
28827
|
return contents;
|
|
28828
28828
|
};
|
|
28829
|
-
de_Credentials = (output,
|
|
28829
|
+
de_Credentials = (output, context) => {
|
|
28830
28830
|
const contents = {};
|
|
28831
28831
|
if (output[_AKI] != null) {
|
|
28832
28832
|
contents[_AKI] = (0, import_smithy_client24.expectString)(output[_AKI]);
|
|
@@ -28842,49 +28842,49 @@ var init_Aws_query = __esm({
|
|
|
28842
28842
|
}
|
|
28843
28843
|
return contents;
|
|
28844
28844
|
};
|
|
28845
|
-
de_ExpiredTokenException = (output,
|
|
28845
|
+
de_ExpiredTokenException = (output, context) => {
|
|
28846
28846
|
const contents = {};
|
|
28847
28847
|
if (output[_m] != null) {
|
|
28848
28848
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28849
28849
|
}
|
|
28850
28850
|
return contents;
|
|
28851
28851
|
};
|
|
28852
|
-
de_IDPCommunicationErrorException = (output,
|
|
28852
|
+
de_IDPCommunicationErrorException = (output, context) => {
|
|
28853
28853
|
const contents = {};
|
|
28854
28854
|
if (output[_m] != null) {
|
|
28855
28855
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28856
28856
|
}
|
|
28857
28857
|
return contents;
|
|
28858
28858
|
};
|
|
28859
|
-
de_IDPRejectedClaimException = (output,
|
|
28859
|
+
de_IDPRejectedClaimException = (output, context) => {
|
|
28860
28860
|
const contents = {};
|
|
28861
28861
|
if (output[_m] != null) {
|
|
28862
28862
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28863
28863
|
}
|
|
28864
28864
|
return contents;
|
|
28865
28865
|
};
|
|
28866
|
-
de_InvalidIdentityTokenException = (output,
|
|
28866
|
+
de_InvalidIdentityTokenException = (output, context) => {
|
|
28867
28867
|
const contents = {};
|
|
28868
28868
|
if (output[_m] != null) {
|
|
28869
28869
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28870
28870
|
}
|
|
28871
28871
|
return contents;
|
|
28872
28872
|
};
|
|
28873
|
-
de_MalformedPolicyDocumentException = (output,
|
|
28873
|
+
de_MalformedPolicyDocumentException = (output, context) => {
|
|
28874
28874
|
const contents = {};
|
|
28875
28875
|
if (output[_m] != null) {
|
|
28876
28876
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28877
28877
|
}
|
|
28878
28878
|
return contents;
|
|
28879
28879
|
};
|
|
28880
|
-
de_PackedPolicyTooLargeException = (output,
|
|
28880
|
+
de_PackedPolicyTooLargeException = (output, context) => {
|
|
28881
28881
|
const contents = {};
|
|
28882
28882
|
if (output[_m] != null) {
|
|
28883
28883
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
28884
28884
|
}
|
|
28885
28885
|
return contents;
|
|
28886
28886
|
};
|
|
28887
|
-
de_RegionDisabledException = (output,
|
|
28887
|
+
de_RegionDisabledException = (output, context) => {
|
|
28888
28888
|
const contents = {};
|
|
28889
28889
|
if (output[_m] != null) {
|
|
28890
28890
|
contents[_m] = (0, import_smithy_client24.expectString)(output[_m]);
|
|
@@ -28898,8 +28898,8 @@ var init_Aws_query = __esm({
|
|
|
28898
28898
|
cfId: output.headers["x-amz-cf-id"]
|
|
28899
28899
|
});
|
|
28900
28900
|
throwDefaultError2 = (0, import_smithy_client24.withBaseException)(STSServiceException);
|
|
28901
|
-
buildHttpRpcRequest = async (
|
|
28902
|
-
const { hostname, protocol = "https", port, path: basePath } = await
|
|
28901
|
+
buildHttpRpcRequest = async (context, headers, path7, resolvedHostname, body) => {
|
|
28902
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
28903
28903
|
const contents = {
|
|
28904
28904
|
protocol,
|
|
28905
28905
|
hostname,
|
|
@@ -29749,7 +29749,7 @@ var require_dist_cjs63 = __commonJS({
|
|
|
29749
29749
|
this.eventStreamCodec = new eventstreamCodec.EventStreamCodec(options.utf8Encoder, options.utf8Decoder);
|
|
29750
29750
|
this.systemClockOffsetProvider = async () => options.systemClockOffset ?? 0;
|
|
29751
29751
|
}
|
|
29752
|
-
async handle(next, args,
|
|
29752
|
+
async handle(next, args, context = {}) {
|
|
29753
29753
|
const request = args.request;
|
|
29754
29754
|
const { body: payload2, query: query2 } = request;
|
|
29755
29755
|
if (!(payload2 instanceof stream2.Readable)) {
|
|
@@ -29887,10 +29887,10 @@ var require_endpointResolver2 = __commonJS({
|
|
|
29887
29887
|
size: 50,
|
|
29888
29888
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
29889
29889
|
});
|
|
29890
|
-
var defaultEndpointResolver3 = (endpointParams,
|
|
29890
|
+
var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
29891
29891
|
return cache3.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
|
|
29892
29892
|
endpointParams,
|
|
29893
|
-
logger:
|
|
29893
|
+
logger: context.logger
|
|
29894
29894
|
}));
|
|
29895
29895
|
};
|
|
29896
29896
|
exports2.defaultEndpointResolver = defaultEndpointResolver3;
|
|
@@ -31298,8 +31298,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31298
31298
|
...obj,
|
|
31299
31299
|
...obj.input && { input: CountTokensInputFilterSensitiveLog(obj.input) }
|
|
31300
31300
|
});
|
|
31301
|
-
var se_ApplyGuardrailCommand = async (input,
|
|
31302
|
-
const b3 = core.requestBuilder(input,
|
|
31301
|
+
var se_ApplyGuardrailCommand = async (input, context) => {
|
|
31302
|
+
const b3 = core.requestBuilder(input, context);
|
|
31303
31303
|
const headers = {
|
|
31304
31304
|
"content-type": "application/json"
|
|
31305
31305
|
};
|
|
@@ -31308,15 +31308,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31308
31308
|
b3.p("guardrailVersion", () => input.guardrailVersion, "{guardrailVersion}", false);
|
|
31309
31309
|
let body;
|
|
31310
31310
|
body = JSON.stringify(smithyClient.take(input, {
|
|
31311
|
-
content: (_2) => se_GuardrailContentBlockList(_2,
|
|
31311
|
+
content: (_2) => se_GuardrailContentBlockList(_2, context),
|
|
31312
31312
|
outputScope: [],
|
|
31313
31313
|
source: []
|
|
31314
31314
|
}));
|
|
31315
31315
|
b3.m("POST").h(headers).b(body);
|
|
31316
31316
|
return b3.build();
|
|
31317
31317
|
};
|
|
31318
|
-
var se_ConverseCommand = async (input,
|
|
31319
|
-
const b3 = core.requestBuilder(input,
|
|
31318
|
+
var se_ConverseCommand = async (input, context) => {
|
|
31319
|
+
const b3 = core.requestBuilder(input, context);
|
|
31320
31320
|
const headers = {
|
|
31321
31321
|
"content-type": "application/json"
|
|
31322
31322
|
};
|
|
@@ -31328,18 +31328,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31328
31328
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
31329
31329
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
31330
31330
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
31331
|
-
messages: (_2) => se_Messages(_2,
|
|
31331
|
+
messages: (_2) => se_Messages(_2, context),
|
|
31332
31332
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
31333
31333
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
31334
31334
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
31335
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
31335
|
+
system: (_2) => se_SystemContentBlocks(_2, context),
|
|
31336
31336
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
31337
31337
|
}));
|
|
31338
31338
|
b3.m("POST").h(headers).b(body);
|
|
31339
31339
|
return b3.build();
|
|
31340
31340
|
};
|
|
31341
|
-
var se_ConverseStreamCommand = async (input,
|
|
31342
|
-
const b3 = core.requestBuilder(input,
|
|
31341
|
+
var se_ConverseStreamCommand = async (input, context) => {
|
|
31342
|
+
const b3 = core.requestBuilder(input, context);
|
|
31343
31343
|
const headers = {
|
|
31344
31344
|
"content-type": "application/json"
|
|
31345
31345
|
};
|
|
@@ -31351,18 +31351,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31351
31351
|
additionalModelResponseFieldPaths: (_2) => smithyClient._json(_2),
|
|
31352
31352
|
guardrailConfig: (_2) => smithyClient._json(_2),
|
|
31353
31353
|
inferenceConfig: (_2) => se_InferenceConfiguration(_2),
|
|
31354
|
-
messages: (_2) => se_Messages(_2,
|
|
31354
|
+
messages: (_2) => se_Messages(_2, context),
|
|
31355
31355
|
performanceConfig: (_2) => smithyClient._json(_2),
|
|
31356
31356
|
promptVariables: (_2) => smithyClient._json(_2),
|
|
31357
31357
|
requestMetadata: (_2) => smithyClient._json(_2),
|
|
31358
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
31358
|
+
system: (_2) => se_SystemContentBlocks(_2, context),
|
|
31359
31359
|
toolConfig: (_2) => se_ToolConfiguration(_2)
|
|
31360
31360
|
}));
|
|
31361
31361
|
b3.m("POST").h(headers).b(body);
|
|
31362
31362
|
return b3.build();
|
|
31363
31363
|
};
|
|
31364
|
-
var se_CountTokensCommand = async (input,
|
|
31365
|
-
const b3 = core.requestBuilder(input,
|
|
31364
|
+
var se_CountTokensCommand = async (input, context) => {
|
|
31365
|
+
const b3 = core.requestBuilder(input, context);
|
|
31366
31366
|
const headers = {
|
|
31367
31367
|
"content-type": "application/json"
|
|
31368
31368
|
};
|
|
@@ -31370,13 +31370,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31370
31370
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
31371
31371
|
let body;
|
|
31372
31372
|
body = JSON.stringify(smithyClient.take(input, {
|
|
31373
|
-
input: (_2) => se_CountTokensInput(_2,
|
|
31373
|
+
input: (_2) => se_CountTokensInput(_2, context)
|
|
31374
31374
|
}));
|
|
31375
31375
|
b3.m("POST").h(headers).b(body);
|
|
31376
31376
|
return b3.build();
|
|
31377
31377
|
};
|
|
31378
|
-
var se_GetAsyncInvokeCommand = async (input,
|
|
31379
|
-
const b3 = core.requestBuilder(input,
|
|
31378
|
+
var se_GetAsyncInvokeCommand = async (input, context) => {
|
|
31379
|
+
const b3 = core.requestBuilder(input, context);
|
|
31380
31380
|
const headers = {};
|
|
31381
31381
|
b3.bp("/async-invoke/{invocationArn}");
|
|
31382
31382
|
b3.p("invocationArn", () => input.invocationArn, "{invocationArn}", false);
|
|
@@ -31384,8 +31384,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31384
31384
|
b3.m("GET").h(headers).b(body);
|
|
31385
31385
|
return b3.build();
|
|
31386
31386
|
};
|
|
31387
|
-
var se_InvokeModelCommand = async (input,
|
|
31388
|
-
const b3 = core.requestBuilder(input,
|
|
31387
|
+
var se_InvokeModelCommand = async (input, context) => {
|
|
31388
|
+
const b3 = core.requestBuilder(input, context);
|
|
31389
31389
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
31390
31390
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
31391
31391
|
[_a16]: input[_a16],
|
|
@@ -31403,8 +31403,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31403
31403
|
b3.m("POST").h(headers).b(body);
|
|
31404
31404
|
return b3.build();
|
|
31405
31405
|
};
|
|
31406
|
-
var se_InvokeModelWithBidirectionalStreamCommand = async (input,
|
|
31407
|
-
const b3 = core.requestBuilder(input,
|
|
31406
|
+
var se_InvokeModelWithBidirectionalStreamCommand = async (input, context) => {
|
|
31407
|
+
const b3 = core.requestBuilder(input, context);
|
|
31408
31408
|
const headers = {
|
|
31409
31409
|
"content-type": "application/json"
|
|
31410
31410
|
};
|
|
@@ -31412,13 +31412,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31412
31412
|
b3.p("modelId", () => input.modelId, "{modelId}", false);
|
|
31413
31413
|
let body;
|
|
31414
31414
|
if (input.body !== void 0) {
|
|
31415
|
-
body = se_InvokeModelWithBidirectionalStreamInput(input.body,
|
|
31415
|
+
body = se_InvokeModelWithBidirectionalStreamInput(input.body, context);
|
|
31416
31416
|
}
|
|
31417
31417
|
b3.m("POST").h(headers).b(body);
|
|
31418
31418
|
return b3.build();
|
|
31419
31419
|
};
|
|
31420
|
-
var se_InvokeModelWithResponseStreamCommand = async (input,
|
|
31421
|
-
const b3 = core.requestBuilder(input,
|
|
31420
|
+
var se_InvokeModelWithResponseStreamCommand = async (input, context) => {
|
|
31421
|
+
const b3 = core.requestBuilder(input, context);
|
|
31422
31422
|
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
31423
31423
|
[_ct]: input[_cT] || "application/octet-stream",
|
|
31424
31424
|
[_xaba]: input[_a16],
|
|
@@ -31436,8 +31436,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31436
31436
|
b3.m("POST").h(headers).b(body);
|
|
31437
31437
|
return b3.build();
|
|
31438
31438
|
};
|
|
31439
|
-
var se_ListAsyncInvokesCommand = async (input,
|
|
31440
|
-
const b3 = core.requestBuilder(input,
|
|
31439
|
+
var se_ListAsyncInvokesCommand = async (input, context) => {
|
|
31440
|
+
const b3 = core.requestBuilder(input, context);
|
|
31441
31441
|
const headers = {};
|
|
31442
31442
|
b3.bp("/async-invoke");
|
|
31443
31443
|
const query2 = smithyClient.map({
|
|
@@ -31453,8 +31453,8 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31453
31453
|
b3.m("GET").h(headers).q(query2).b(body);
|
|
31454
31454
|
return b3.build();
|
|
31455
31455
|
};
|
|
31456
|
-
var se_StartAsyncInvokeCommand = async (input,
|
|
31457
|
-
const b3 = core.requestBuilder(input,
|
|
31456
|
+
var se_StartAsyncInvokeCommand = async (input, context) => {
|
|
31457
|
+
const b3 = core.requestBuilder(input, context);
|
|
31458
31458
|
const headers = {
|
|
31459
31459
|
"content-type": "application/json"
|
|
31460
31460
|
};
|
|
@@ -31470,14 +31470,14 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31470
31470
|
b3.m("POST").h(headers).b(body);
|
|
31471
31471
|
return b3.build();
|
|
31472
31472
|
};
|
|
31473
|
-
var de_ApplyGuardrailCommand = async (output,
|
|
31473
|
+
var de_ApplyGuardrailCommand = async (output, context) => {
|
|
31474
31474
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31475
|
-
return de_CommandError3(output,
|
|
31475
|
+
return de_CommandError3(output, context);
|
|
31476
31476
|
}
|
|
31477
31477
|
const contents = smithyClient.map({
|
|
31478
31478
|
$metadata: deserializeMetadata3(output)
|
|
31479
31479
|
});
|
|
31480
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31480
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31481
31481
|
const doc = smithyClient.take(data2, {
|
|
31482
31482
|
action: smithyClient.expectString,
|
|
31483
31483
|
actionReason: smithyClient.expectString,
|
|
@@ -31489,18 +31489,18 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31489
31489
|
Object.assign(contents, doc);
|
|
31490
31490
|
return contents;
|
|
31491
31491
|
};
|
|
31492
|
-
var de_ConverseCommand = async (output,
|
|
31492
|
+
var de_ConverseCommand = async (output, context) => {
|
|
31493
31493
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31494
|
-
return de_CommandError3(output,
|
|
31494
|
+
return de_CommandError3(output, context);
|
|
31495
31495
|
}
|
|
31496
31496
|
const contents = smithyClient.map({
|
|
31497
31497
|
$metadata: deserializeMetadata3(output)
|
|
31498
31498
|
});
|
|
31499
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31499
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31500
31500
|
const doc = smithyClient.take(data2, {
|
|
31501
31501
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
31502
31502
|
metrics: smithyClient._json,
|
|
31503
|
-
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2),
|
|
31503
|
+
output: (_2) => de_ConverseOutput(core$1.awsExpectUnion(_2), context),
|
|
31504
31504
|
performanceConfig: smithyClient._json,
|
|
31505
31505
|
stopReason: smithyClient.expectString,
|
|
31506
31506
|
trace: (_2) => de_ConverseTrace(_2),
|
|
@@ -31509,39 +31509,39 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31509
31509
|
Object.assign(contents, doc);
|
|
31510
31510
|
return contents;
|
|
31511
31511
|
};
|
|
31512
|
-
var de_ConverseStreamCommand = async (output,
|
|
31512
|
+
var de_ConverseStreamCommand = async (output, context) => {
|
|
31513
31513
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31514
|
-
return de_CommandError3(output,
|
|
31514
|
+
return de_CommandError3(output, context);
|
|
31515
31515
|
}
|
|
31516
31516
|
const contents = smithyClient.map({
|
|
31517
31517
|
$metadata: deserializeMetadata3(output)
|
|
31518
31518
|
});
|
|
31519
31519
|
const data2 = output.body;
|
|
31520
|
-
contents.stream = de_ConverseStreamOutput(data2,
|
|
31520
|
+
contents.stream = de_ConverseStreamOutput(data2, context);
|
|
31521
31521
|
return contents;
|
|
31522
31522
|
};
|
|
31523
|
-
var de_CountTokensCommand = async (output,
|
|
31523
|
+
var de_CountTokensCommand = async (output, context) => {
|
|
31524
31524
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31525
|
-
return de_CommandError3(output,
|
|
31525
|
+
return de_CommandError3(output, context);
|
|
31526
31526
|
}
|
|
31527
31527
|
const contents = smithyClient.map({
|
|
31528
31528
|
$metadata: deserializeMetadata3(output)
|
|
31529
31529
|
});
|
|
31530
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31530
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31531
31531
|
const doc = smithyClient.take(data2, {
|
|
31532
31532
|
inputTokens: smithyClient.expectInt32
|
|
31533
31533
|
});
|
|
31534
31534
|
Object.assign(contents, doc);
|
|
31535
31535
|
return contents;
|
|
31536
31536
|
};
|
|
31537
|
-
var de_GetAsyncInvokeCommand = async (output,
|
|
31537
|
+
var de_GetAsyncInvokeCommand = async (output, context) => {
|
|
31538
31538
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31539
|
-
return de_CommandError3(output,
|
|
31539
|
+
return de_CommandError3(output, context);
|
|
31540
31540
|
}
|
|
31541
31541
|
const contents = smithyClient.map({
|
|
31542
31542
|
$metadata: deserializeMetadata3(output)
|
|
31543
31543
|
});
|
|
31544
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31544
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31545
31545
|
const doc = smithyClient.take(data2, {
|
|
31546
31546
|
clientRequestToken: smithyClient.expectString,
|
|
31547
31547
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -31556,33 +31556,33 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31556
31556
|
Object.assign(contents, doc);
|
|
31557
31557
|
return contents;
|
|
31558
31558
|
};
|
|
31559
|
-
var de_InvokeModelCommand = async (output,
|
|
31559
|
+
var de_InvokeModelCommand = async (output, context) => {
|
|
31560
31560
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31561
|
-
return de_CommandError3(output,
|
|
31561
|
+
return de_CommandError3(output, context);
|
|
31562
31562
|
}
|
|
31563
31563
|
const contents = smithyClient.map({
|
|
31564
31564
|
$metadata: deserializeMetadata3(output),
|
|
31565
31565
|
[_cT]: [, output.headers[_ct]],
|
|
31566
31566
|
[_pCL]: [, output.headers[_xabpl]]
|
|
31567
31567
|
});
|
|
31568
|
-
const data2 = await smithyClient.collectBody(output.body,
|
|
31568
|
+
const data2 = await smithyClient.collectBody(output.body, context);
|
|
31569
31569
|
contents.body = data2;
|
|
31570
31570
|
return contents;
|
|
31571
31571
|
};
|
|
31572
|
-
var de_InvokeModelWithBidirectionalStreamCommand = async (output,
|
|
31572
|
+
var de_InvokeModelWithBidirectionalStreamCommand = async (output, context) => {
|
|
31573
31573
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31574
|
-
return de_CommandError3(output,
|
|
31574
|
+
return de_CommandError3(output, context);
|
|
31575
31575
|
}
|
|
31576
31576
|
const contents = smithyClient.map({
|
|
31577
31577
|
$metadata: deserializeMetadata3(output)
|
|
31578
31578
|
});
|
|
31579
31579
|
const data2 = output.body;
|
|
31580
|
-
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2,
|
|
31580
|
+
contents.body = de_InvokeModelWithBidirectionalStreamOutput(data2, context);
|
|
31581
31581
|
return contents;
|
|
31582
31582
|
};
|
|
31583
|
-
var de_InvokeModelWithResponseStreamCommand = async (output,
|
|
31583
|
+
var de_InvokeModelWithResponseStreamCommand = async (output, context) => {
|
|
31584
31584
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31585
|
-
return de_CommandError3(output,
|
|
31585
|
+
return de_CommandError3(output, context);
|
|
31586
31586
|
}
|
|
31587
31587
|
const contents = smithyClient.map({
|
|
31588
31588
|
$metadata: deserializeMetadata3(output),
|
|
@@ -31590,17 +31590,17 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31590
31590
|
[_pCL]: [, output.headers[_xabpl]]
|
|
31591
31591
|
});
|
|
31592
31592
|
const data2 = output.body;
|
|
31593
|
-
contents.body = de_ResponseStream(data2,
|
|
31593
|
+
contents.body = de_ResponseStream(data2, context);
|
|
31594
31594
|
return contents;
|
|
31595
31595
|
};
|
|
31596
|
-
var de_ListAsyncInvokesCommand = async (output,
|
|
31596
|
+
var de_ListAsyncInvokesCommand = async (output, context) => {
|
|
31597
31597
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31598
|
-
return de_CommandError3(output,
|
|
31598
|
+
return de_CommandError3(output, context);
|
|
31599
31599
|
}
|
|
31600
31600
|
const contents = smithyClient.map({
|
|
31601
31601
|
$metadata: deserializeMetadata3(output)
|
|
31602
31602
|
});
|
|
31603
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31603
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31604
31604
|
const doc = smithyClient.take(data2, {
|
|
31605
31605
|
asyncInvokeSummaries: (_2) => de_AsyncInvokeSummaries(_2),
|
|
31606
31606
|
nextToken: smithyClient.expectString
|
|
@@ -31608,24 +31608,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31608
31608
|
Object.assign(contents, doc);
|
|
31609
31609
|
return contents;
|
|
31610
31610
|
};
|
|
31611
|
-
var de_StartAsyncInvokeCommand = async (output,
|
|
31611
|
+
var de_StartAsyncInvokeCommand = async (output, context) => {
|
|
31612
31612
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
31613
|
-
return de_CommandError3(output,
|
|
31613
|
+
return de_CommandError3(output, context);
|
|
31614
31614
|
}
|
|
31615
31615
|
const contents = smithyClient.map({
|
|
31616
31616
|
$metadata: deserializeMetadata3(output)
|
|
31617
31617
|
});
|
|
31618
|
-
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body,
|
|
31618
|
+
const data2 = smithyClient.expectNonNull(smithyClient.expectObject(await core$1.parseJsonBody(output.body, context)), "body");
|
|
31619
31619
|
const doc = smithyClient.take(data2, {
|
|
31620
31620
|
invocationArn: smithyClient.expectString
|
|
31621
31621
|
});
|
|
31622
31622
|
Object.assign(contents, doc);
|
|
31623
31623
|
return contents;
|
|
31624
31624
|
};
|
|
31625
|
-
var de_CommandError3 = async (output,
|
|
31625
|
+
var de_CommandError3 = async (output, context) => {
|
|
31626
31626
|
const parsedOutput = {
|
|
31627
31627
|
...output,
|
|
31628
|
-
body: await core$1.parseJsonErrorBody(output.body,
|
|
31628
|
+
body: await core$1.parseJsonErrorBody(output.body, context)
|
|
31629
31629
|
};
|
|
31630
31630
|
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
31631
31631
|
switch (errorCode) {
|
|
@@ -31675,7 +31675,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31675
31675
|
}
|
|
31676
31676
|
};
|
|
31677
31677
|
var throwDefaultError3 = smithyClient.withBaseException(BedrockRuntimeServiceException);
|
|
31678
|
-
var de_AccessDeniedExceptionRes2 = async (parsedOutput,
|
|
31678
|
+
var de_AccessDeniedExceptionRes2 = async (parsedOutput, context) => {
|
|
31679
31679
|
const contents = smithyClient.map({});
|
|
31680
31680
|
const data2 = parsedOutput.body;
|
|
31681
31681
|
const doc = smithyClient.take(data2, {
|
|
@@ -31688,7 +31688,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31688
31688
|
});
|
|
31689
31689
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31690
31690
|
};
|
|
31691
|
-
var de_ConflictExceptionRes = async (parsedOutput,
|
|
31691
|
+
var de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
31692
31692
|
const contents = smithyClient.map({});
|
|
31693
31693
|
const data2 = parsedOutput.body;
|
|
31694
31694
|
const doc = smithyClient.take(data2, {
|
|
@@ -31701,7 +31701,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31701
31701
|
});
|
|
31702
31702
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31703
31703
|
};
|
|
31704
|
-
var de_InternalServerExceptionRes2 = async (parsedOutput,
|
|
31704
|
+
var de_InternalServerExceptionRes2 = async (parsedOutput, context) => {
|
|
31705
31705
|
const contents = smithyClient.map({});
|
|
31706
31706
|
const data2 = parsedOutput.body;
|
|
31707
31707
|
const doc = smithyClient.take(data2, {
|
|
@@ -31714,7 +31714,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31714
31714
|
});
|
|
31715
31715
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31716
31716
|
};
|
|
31717
|
-
var de_ModelErrorExceptionRes = async (parsedOutput,
|
|
31717
|
+
var de_ModelErrorExceptionRes = async (parsedOutput, context) => {
|
|
31718
31718
|
const contents = smithyClient.map({});
|
|
31719
31719
|
const data2 = parsedOutput.body;
|
|
31720
31720
|
const doc = smithyClient.take(data2, {
|
|
@@ -31729,7 +31729,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31729
31729
|
});
|
|
31730
31730
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31731
31731
|
};
|
|
31732
|
-
var de_ModelNotReadyExceptionRes = async (parsedOutput,
|
|
31732
|
+
var de_ModelNotReadyExceptionRes = async (parsedOutput, context) => {
|
|
31733
31733
|
const contents = smithyClient.map({});
|
|
31734
31734
|
const data2 = parsedOutput.body;
|
|
31735
31735
|
const doc = smithyClient.take(data2, {
|
|
@@ -31742,7 +31742,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31742
31742
|
});
|
|
31743
31743
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31744
31744
|
};
|
|
31745
|
-
var de_ModelStreamErrorExceptionRes = async (parsedOutput,
|
|
31745
|
+
var de_ModelStreamErrorExceptionRes = async (parsedOutput, context) => {
|
|
31746
31746
|
const contents = smithyClient.map({});
|
|
31747
31747
|
const data2 = parsedOutput.body;
|
|
31748
31748
|
const doc = smithyClient.take(data2, {
|
|
@@ -31757,7 +31757,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31757
31757
|
});
|
|
31758
31758
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31759
31759
|
};
|
|
31760
|
-
var de_ModelTimeoutExceptionRes = async (parsedOutput,
|
|
31760
|
+
var de_ModelTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
31761
31761
|
const contents = smithyClient.map({});
|
|
31762
31762
|
const data2 = parsedOutput.body;
|
|
31763
31763
|
const doc = smithyClient.take(data2, {
|
|
@@ -31770,7 +31770,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31770
31770
|
});
|
|
31771
31771
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31772
31772
|
};
|
|
31773
|
-
var de_ResourceNotFoundExceptionRes = async (parsedOutput,
|
|
31773
|
+
var de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
31774
31774
|
const contents = smithyClient.map({});
|
|
31775
31775
|
const data2 = parsedOutput.body;
|
|
31776
31776
|
const doc = smithyClient.take(data2, {
|
|
@@ -31783,7 +31783,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31783
31783
|
});
|
|
31784
31784
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31785
31785
|
};
|
|
31786
|
-
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput,
|
|
31786
|
+
var de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
31787
31787
|
const contents = smithyClient.map({});
|
|
31788
31788
|
const data2 = parsedOutput.body;
|
|
31789
31789
|
const doc = smithyClient.take(data2, {
|
|
@@ -31796,7 +31796,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31796
31796
|
});
|
|
31797
31797
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31798
31798
|
};
|
|
31799
|
-
var de_ServiceUnavailableExceptionRes = async (parsedOutput,
|
|
31799
|
+
var de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
31800
31800
|
const contents = smithyClient.map({});
|
|
31801
31801
|
const data2 = parsedOutput.body;
|
|
31802
31802
|
const doc = smithyClient.take(data2, {
|
|
@@ -31809,7 +31809,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31809
31809
|
});
|
|
31810
31810
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31811
31811
|
};
|
|
31812
|
-
var de_ThrottlingExceptionRes = async (parsedOutput,
|
|
31812
|
+
var de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
31813
31813
|
const contents = smithyClient.map({});
|
|
31814
31814
|
const data2 = parsedOutput.body;
|
|
31815
31815
|
const doc = smithyClient.take(data2, {
|
|
@@ -31822,7 +31822,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31822
31822
|
});
|
|
31823
31823
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31824
31824
|
};
|
|
31825
|
-
var de_ValidationExceptionRes = async (parsedOutput,
|
|
31825
|
+
var de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
31826
31826
|
const contents = smithyClient.map({});
|
|
31827
31827
|
const data2 = parsedOutput.body;
|
|
31828
31828
|
const doc = smithyClient.take(data2, {
|
|
@@ -31835,367 +31835,367 @@ var require_dist_cjs65 = __commonJS({
|
|
|
31835
31835
|
});
|
|
31836
31836
|
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
31837
31837
|
};
|
|
31838
|
-
var se_InvokeModelWithBidirectionalStreamInput = (input,
|
|
31838
|
+
var se_InvokeModelWithBidirectionalStreamInput = (input, context) => {
|
|
31839
31839
|
const eventMarshallingVisitor = (event) => exports2.InvokeModelWithBidirectionalStreamInput.visit(event, {
|
|
31840
|
-
chunk: (value) => se_BidirectionalInputPayloadPart_event(value,
|
|
31840
|
+
chunk: (value) => se_BidirectionalInputPayloadPart_event(value, context),
|
|
31841
31841
|
_: (value) => value
|
|
31842
31842
|
});
|
|
31843
|
-
return
|
|
31843
|
+
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
31844
31844
|
};
|
|
31845
|
-
var se_BidirectionalInputPayloadPart_event = (input,
|
|
31845
|
+
var se_BidirectionalInputPayloadPart_event = (input, context) => {
|
|
31846
31846
|
const headers = {
|
|
31847
31847
|
":event-type": { type: "string", value: "chunk" },
|
|
31848
31848
|
":message-type": { type: "string", value: "event" },
|
|
31849
31849
|
":content-type": { type: "string", value: "application/json" }
|
|
31850
31850
|
};
|
|
31851
31851
|
let body = new Uint8Array();
|
|
31852
|
-
body = se_BidirectionalInputPayloadPart(input,
|
|
31853
|
-
body =
|
|
31852
|
+
body = se_BidirectionalInputPayloadPart(input, context);
|
|
31853
|
+
body = context.utf8Decoder(JSON.stringify(body));
|
|
31854
31854
|
return { headers, body };
|
|
31855
31855
|
};
|
|
31856
|
-
var de_ConverseStreamOutput = (output,
|
|
31857
|
-
return
|
|
31856
|
+
var de_ConverseStreamOutput = (output, context) => {
|
|
31857
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
31858
31858
|
if (event["messageStart"] != null) {
|
|
31859
31859
|
return {
|
|
31860
|
-
messageStart: await de_MessageStartEvent_event(event["messageStart"],
|
|
31860
|
+
messageStart: await de_MessageStartEvent_event(event["messageStart"], context)
|
|
31861
31861
|
};
|
|
31862
31862
|
}
|
|
31863
31863
|
if (event["contentBlockStart"] != null) {
|
|
31864
31864
|
return {
|
|
31865
|
-
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"],
|
|
31865
|
+
contentBlockStart: await de_ContentBlockStartEvent_event(event["contentBlockStart"], context)
|
|
31866
31866
|
};
|
|
31867
31867
|
}
|
|
31868
31868
|
if (event["contentBlockDelta"] != null) {
|
|
31869
31869
|
return {
|
|
31870
|
-
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"],
|
|
31870
|
+
contentBlockDelta: await de_ContentBlockDeltaEvent_event(event["contentBlockDelta"], context)
|
|
31871
31871
|
};
|
|
31872
31872
|
}
|
|
31873
31873
|
if (event["contentBlockStop"] != null) {
|
|
31874
31874
|
return {
|
|
31875
|
-
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"],
|
|
31875
|
+
contentBlockStop: await de_ContentBlockStopEvent_event(event["contentBlockStop"], context)
|
|
31876
31876
|
};
|
|
31877
31877
|
}
|
|
31878
31878
|
if (event["messageStop"] != null) {
|
|
31879
31879
|
return {
|
|
31880
|
-
messageStop: await de_MessageStopEvent_event(event["messageStop"],
|
|
31880
|
+
messageStop: await de_MessageStopEvent_event(event["messageStop"], context)
|
|
31881
31881
|
};
|
|
31882
31882
|
}
|
|
31883
31883
|
if (event["metadata"] != null) {
|
|
31884
31884
|
return {
|
|
31885
|
-
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"],
|
|
31885
|
+
metadata: await de_ConverseStreamMetadataEvent_event(event["metadata"], context)
|
|
31886
31886
|
};
|
|
31887
31887
|
}
|
|
31888
31888
|
if (event["internalServerException"] != null) {
|
|
31889
31889
|
return {
|
|
31890
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
31890
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
31891
31891
|
};
|
|
31892
31892
|
}
|
|
31893
31893
|
if (event["modelStreamErrorException"] != null) {
|
|
31894
31894
|
return {
|
|
31895
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
31895
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
31896
31896
|
};
|
|
31897
31897
|
}
|
|
31898
31898
|
if (event["validationException"] != null) {
|
|
31899
31899
|
return {
|
|
31900
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
31900
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
31901
31901
|
};
|
|
31902
31902
|
}
|
|
31903
31903
|
if (event["throttlingException"] != null) {
|
|
31904
31904
|
return {
|
|
31905
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
31905
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
31906
31906
|
};
|
|
31907
31907
|
}
|
|
31908
31908
|
if (event["serviceUnavailableException"] != null) {
|
|
31909
31909
|
return {
|
|
31910
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
31910
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
31911
31911
|
};
|
|
31912
31912
|
}
|
|
31913
31913
|
return { $unknown: event };
|
|
31914
31914
|
});
|
|
31915
31915
|
};
|
|
31916
|
-
var de_InvokeModelWithBidirectionalStreamOutput = (output,
|
|
31917
|
-
return
|
|
31916
|
+
var de_InvokeModelWithBidirectionalStreamOutput = (output, context) => {
|
|
31917
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
31918
31918
|
if (event["chunk"] != null) {
|
|
31919
31919
|
return {
|
|
31920
|
-
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"],
|
|
31920
|
+
chunk: await de_BidirectionalOutputPayloadPart_event(event["chunk"], context)
|
|
31921
31921
|
};
|
|
31922
31922
|
}
|
|
31923
31923
|
if (event["internalServerException"] != null) {
|
|
31924
31924
|
return {
|
|
31925
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
31925
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
31926
31926
|
};
|
|
31927
31927
|
}
|
|
31928
31928
|
if (event["modelStreamErrorException"] != null) {
|
|
31929
31929
|
return {
|
|
31930
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
31930
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
31931
31931
|
};
|
|
31932
31932
|
}
|
|
31933
31933
|
if (event["validationException"] != null) {
|
|
31934
31934
|
return {
|
|
31935
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
31935
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
31936
31936
|
};
|
|
31937
31937
|
}
|
|
31938
31938
|
if (event["throttlingException"] != null) {
|
|
31939
31939
|
return {
|
|
31940
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
31940
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
31941
31941
|
};
|
|
31942
31942
|
}
|
|
31943
31943
|
if (event["modelTimeoutException"] != null) {
|
|
31944
31944
|
return {
|
|
31945
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
31945
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
|
|
31946
31946
|
};
|
|
31947
31947
|
}
|
|
31948
31948
|
if (event["serviceUnavailableException"] != null) {
|
|
31949
31949
|
return {
|
|
31950
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
31950
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
31951
31951
|
};
|
|
31952
31952
|
}
|
|
31953
31953
|
return { $unknown: event };
|
|
31954
31954
|
});
|
|
31955
31955
|
};
|
|
31956
|
-
var de_ResponseStream = (output,
|
|
31957
|
-
return
|
|
31956
|
+
var de_ResponseStream = (output, context) => {
|
|
31957
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
31958
31958
|
if (event["chunk"] != null) {
|
|
31959
31959
|
return {
|
|
31960
|
-
chunk: await de_PayloadPart_event(event["chunk"],
|
|
31960
|
+
chunk: await de_PayloadPart_event(event["chunk"], context)
|
|
31961
31961
|
};
|
|
31962
31962
|
}
|
|
31963
31963
|
if (event["internalServerException"] != null) {
|
|
31964
31964
|
return {
|
|
31965
|
-
internalServerException: await de_InternalServerException_event(event["internalServerException"],
|
|
31965
|
+
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
31966
31966
|
};
|
|
31967
31967
|
}
|
|
31968
31968
|
if (event["modelStreamErrorException"] != null) {
|
|
31969
31969
|
return {
|
|
31970
|
-
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"],
|
|
31970
|
+
modelStreamErrorException: await de_ModelStreamErrorException_event(event["modelStreamErrorException"], context)
|
|
31971
31971
|
};
|
|
31972
31972
|
}
|
|
31973
31973
|
if (event["validationException"] != null) {
|
|
31974
31974
|
return {
|
|
31975
|
-
validationException: await de_ValidationException_event(event["validationException"],
|
|
31975
|
+
validationException: await de_ValidationException_event(event["validationException"], context)
|
|
31976
31976
|
};
|
|
31977
31977
|
}
|
|
31978
31978
|
if (event["throttlingException"] != null) {
|
|
31979
31979
|
return {
|
|
31980
|
-
throttlingException: await de_ThrottlingException_event(event["throttlingException"],
|
|
31980
|
+
throttlingException: await de_ThrottlingException_event(event["throttlingException"], context)
|
|
31981
31981
|
};
|
|
31982
31982
|
}
|
|
31983
31983
|
if (event["modelTimeoutException"] != null) {
|
|
31984
31984
|
return {
|
|
31985
|
-
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"],
|
|
31985
|
+
modelTimeoutException: await de_ModelTimeoutException_event(event["modelTimeoutException"], context)
|
|
31986
31986
|
};
|
|
31987
31987
|
}
|
|
31988
31988
|
if (event["serviceUnavailableException"] != null) {
|
|
31989
31989
|
return {
|
|
31990
|
-
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"],
|
|
31990
|
+
serviceUnavailableException: await de_ServiceUnavailableException_event(event["serviceUnavailableException"], context)
|
|
31991
31991
|
};
|
|
31992
31992
|
}
|
|
31993
31993
|
return { $unknown: event };
|
|
31994
31994
|
});
|
|
31995
31995
|
};
|
|
31996
|
-
var de_BidirectionalOutputPayloadPart_event = async (output,
|
|
31996
|
+
var de_BidirectionalOutputPayloadPart_event = async (output, context) => {
|
|
31997
31997
|
const contents = {};
|
|
31998
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
31999
|
-
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2,
|
|
31998
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
31999
|
+
Object.assign(contents, de_BidirectionalOutputPayloadPart(data2, context));
|
|
32000
32000
|
return contents;
|
|
32001
32001
|
};
|
|
32002
|
-
var de_ContentBlockDeltaEvent_event = async (output,
|
|
32002
|
+
var de_ContentBlockDeltaEvent_event = async (output, context) => {
|
|
32003
32003
|
const contents = {};
|
|
32004
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32005
|
-
Object.assign(contents, de_ContentBlockDeltaEvent(data2,
|
|
32004
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32005
|
+
Object.assign(contents, de_ContentBlockDeltaEvent(data2, context));
|
|
32006
32006
|
return contents;
|
|
32007
32007
|
};
|
|
32008
|
-
var de_ContentBlockStartEvent_event = async (output,
|
|
32008
|
+
var de_ContentBlockStartEvent_event = async (output, context) => {
|
|
32009
32009
|
const contents = {};
|
|
32010
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32010
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32011
32011
|
Object.assign(contents, smithyClient._json(data2));
|
|
32012
32012
|
return contents;
|
|
32013
32013
|
};
|
|
32014
|
-
var de_ContentBlockStopEvent_event = async (output,
|
|
32014
|
+
var de_ContentBlockStopEvent_event = async (output, context) => {
|
|
32015
32015
|
const contents = {};
|
|
32016
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32016
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32017
32017
|
Object.assign(contents, smithyClient._json(data2));
|
|
32018
32018
|
return contents;
|
|
32019
32019
|
};
|
|
32020
|
-
var de_ConverseStreamMetadataEvent_event = async (output,
|
|
32020
|
+
var de_ConverseStreamMetadataEvent_event = async (output, context) => {
|
|
32021
32021
|
const contents = {};
|
|
32022
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32022
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32023
32023
|
Object.assign(contents, de_ConverseStreamMetadataEvent(data2));
|
|
32024
32024
|
return contents;
|
|
32025
32025
|
};
|
|
32026
|
-
var de_InternalServerException_event = async (output,
|
|
32026
|
+
var de_InternalServerException_event = async (output, context) => {
|
|
32027
32027
|
const parsedOutput = {
|
|
32028
32028
|
...output,
|
|
32029
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32029
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32030
32030
|
};
|
|
32031
32031
|
return de_InternalServerExceptionRes2(parsedOutput);
|
|
32032
32032
|
};
|
|
32033
|
-
var de_MessageStartEvent_event = async (output,
|
|
32033
|
+
var de_MessageStartEvent_event = async (output, context) => {
|
|
32034
32034
|
const contents = {};
|
|
32035
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32035
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32036
32036
|
Object.assign(contents, smithyClient._json(data2));
|
|
32037
32037
|
return contents;
|
|
32038
32038
|
};
|
|
32039
|
-
var de_MessageStopEvent_event = async (output,
|
|
32039
|
+
var de_MessageStopEvent_event = async (output, context) => {
|
|
32040
32040
|
const contents = {};
|
|
32041
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32041
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32042
32042
|
Object.assign(contents, de_MessageStopEvent(data2));
|
|
32043
32043
|
return contents;
|
|
32044
32044
|
};
|
|
32045
|
-
var de_ModelStreamErrorException_event = async (output,
|
|
32045
|
+
var de_ModelStreamErrorException_event = async (output, context) => {
|
|
32046
32046
|
const parsedOutput = {
|
|
32047
32047
|
...output,
|
|
32048
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32048
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32049
32049
|
};
|
|
32050
32050
|
return de_ModelStreamErrorExceptionRes(parsedOutput);
|
|
32051
32051
|
};
|
|
32052
|
-
var de_ModelTimeoutException_event = async (output,
|
|
32052
|
+
var de_ModelTimeoutException_event = async (output, context) => {
|
|
32053
32053
|
const parsedOutput = {
|
|
32054
32054
|
...output,
|
|
32055
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32055
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32056
32056
|
};
|
|
32057
32057
|
return de_ModelTimeoutExceptionRes(parsedOutput);
|
|
32058
32058
|
};
|
|
32059
|
-
var de_PayloadPart_event = async (output,
|
|
32059
|
+
var de_PayloadPart_event = async (output, context) => {
|
|
32060
32060
|
const contents = {};
|
|
32061
|
-
const data2 = await core$1.parseJsonBody(output.body,
|
|
32062
|
-
Object.assign(contents, de_PayloadPart(data2,
|
|
32061
|
+
const data2 = await core$1.parseJsonBody(output.body, context);
|
|
32062
|
+
Object.assign(contents, de_PayloadPart(data2, context));
|
|
32063
32063
|
return contents;
|
|
32064
32064
|
};
|
|
32065
|
-
var de_ServiceUnavailableException_event = async (output,
|
|
32065
|
+
var de_ServiceUnavailableException_event = async (output, context) => {
|
|
32066
32066
|
const parsedOutput = {
|
|
32067
32067
|
...output,
|
|
32068
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32068
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32069
32069
|
};
|
|
32070
32070
|
return de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
32071
32071
|
};
|
|
32072
|
-
var de_ThrottlingException_event = async (output,
|
|
32072
|
+
var de_ThrottlingException_event = async (output, context) => {
|
|
32073
32073
|
const parsedOutput = {
|
|
32074
32074
|
...output,
|
|
32075
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32075
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32076
32076
|
};
|
|
32077
32077
|
return de_ThrottlingExceptionRes(parsedOutput);
|
|
32078
32078
|
};
|
|
32079
|
-
var de_ValidationException_event = async (output,
|
|
32079
|
+
var de_ValidationException_event = async (output, context) => {
|
|
32080
32080
|
const parsedOutput = {
|
|
32081
32081
|
...output,
|
|
32082
|
-
body: await core$1.parseJsonBody(output.body,
|
|
32082
|
+
body: await core$1.parseJsonBody(output.body, context)
|
|
32083
32083
|
};
|
|
32084
32084
|
return de_ValidationExceptionRes(parsedOutput);
|
|
32085
32085
|
};
|
|
32086
|
-
var se_BidirectionalInputPayloadPart = (input,
|
|
32086
|
+
var se_BidirectionalInputPayloadPart = (input, context) => {
|
|
32087
32087
|
return smithyClient.take(input, {
|
|
32088
|
-
bytes:
|
|
32088
|
+
bytes: context.base64Encoder
|
|
32089
32089
|
});
|
|
32090
32090
|
};
|
|
32091
|
-
var se_ContentBlock = (input,
|
|
32091
|
+
var se_ContentBlock = (input, context) => {
|
|
32092
32092
|
return exports2.ContentBlock.visit(input, {
|
|
32093
32093
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
32094
32094
|
citationsContent: (value) => ({ citationsContent: smithyClient._json(value) }),
|
|
32095
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
32096
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
32097
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
32098
|
-
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value,
|
|
32095
|
+
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
32096
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
32097
|
+
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
32098
|
+
reasoningContent: (value) => ({ reasoningContent: se_ReasoningContentBlock(value, context) }),
|
|
32099
32099
|
text: (value) => ({ text: value }),
|
|
32100
|
-
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value,
|
|
32100
|
+
toolResult: (value) => ({ toolResult: se_ToolResultBlock(value, context) }),
|
|
32101
32101
|
toolUse: (value) => ({ toolUse: se_ToolUseBlock(value) }),
|
|
32102
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
32102
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
32103
32103
|
_: (name14, value) => ({ [name14]: value })
|
|
32104
32104
|
});
|
|
32105
32105
|
};
|
|
32106
|
-
var se_ContentBlocks = (input,
|
|
32106
|
+
var se_ContentBlocks = (input, context) => {
|
|
32107
32107
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32108
|
-
return se_ContentBlock(entry,
|
|
32108
|
+
return se_ContentBlock(entry, context);
|
|
32109
32109
|
});
|
|
32110
32110
|
};
|
|
32111
|
-
var se_ConverseTokensRequest = (input,
|
|
32111
|
+
var se_ConverseTokensRequest = (input, context) => {
|
|
32112
32112
|
return smithyClient.take(input, {
|
|
32113
|
-
messages: (_2) => se_Messages(_2,
|
|
32114
|
-
system: (_2) => se_SystemContentBlocks(_2,
|
|
32113
|
+
messages: (_2) => se_Messages(_2, context),
|
|
32114
|
+
system: (_2) => se_SystemContentBlocks(_2, context)
|
|
32115
32115
|
});
|
|
32116
32116
|
};
|
|
32117
|
-
var se_CountTokensInput = (input,
|
|
32117
|
+
var se_CountTokensInput = (input, context) => {
|
|
32118
32118
|
return exports2.CountTokensInput.visit(input, {
|
|
32119
|
-
converse: (value) => ({ converse: se_ConverseTokensRequest(value,
|
|
32120
|
-
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value,
|
|
32119
|
+
converse: (value) => ({ converse: se_ConverseTokensRequest(value, context) }),
|
|
32120
|
+
invokeModel: (value) => ({ invokeModel: se_InvokeModelTokensRequest(value, context) }),
|
|
32121
32121
|
_: (name14, value) => ({ [name14]: value })
|
|
32122
32122
|
});
|
|
32123
32123
|
};
|
|
32124
|
-
var se_DocumentBlock = (input,
|
|
32124
|
+
var se_DocumentBlock = (input, context) => {
|
|
32125
32125
|
return smithyClient.take(input, {
|
|
32126
32126
|
citations: smithyClient._json,
|
|
32127
32127
|
context: [],
|
|
32128
32128
|
format: [],
|
|
32129
32129
|
name: [],
|
|
32130
|
-
source: (_2) => se_DocumentSource(_2,
|
|
32130
|
+
source: (_2) => se_DocumentSource(_2, context)
|
|
32131
32131
|
});
|
|
32132
32132
|
};
|
|
32133
|
-
var se_DocumentSource = (input,
|
|
32133
|
+
var se_DocumentSource = (input, context) => {
|
|
32134
32134
|
return exports2.DocumentSource.visit(input, {
|
|
32135
|
-
bytes: (value) => ({ bytes:
|
|
32135
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
32136
32136
|
content: (value) => ({ content: smithyClient._json(value) }),
|
|
32137
32137
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
32138
32138
|
text: (value) => ({ text: value }),
|
|
32139
32139
|
_: (name14, value) => ({ [name14]: value })
|
|
32140
32140
|
});
|
|
32141
32141
|
};
|
|
32142
|
-
var se_GuardrailContentBlock = (input,
|
|
32142
|
+
var se_GuardrailContentBlock = (input, context) => {
|
|
32143
32143
|
return exports2.GuardrailContentBlock.visit(input, {
|
|
32144
|
-
image: (value) => ({ image: se_GuardrailImageBlock(value,
|
|
32144
|
+
image: (value) => ({ image: se_GuardrailImageBlock(value, context) }),
|
|
32145
32145
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
32146
32146
|
_: (name14, value) => ({ [name14]: value })
|
|
32147
32147
|
});
|
|
32148
32148
|
};
|
|
32149
|
-
var se_GuardrailContentBlockList = (input,
|
|
32149
|
+
var se_GuardrailContentBlockList = (input, context) => {
|
|
32150
32150
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32151
|
-
return se_GuardrailContentBlock(entry,
|
|
32151
|
+
return se_GuardrailContentBlock(entry, context);
|
|
32152
32152
|
});
|
|
32153
32153
|
};
|
|
32154
|
-
var se_GuardrailConverseContentBlock = (input,
|
|
32154
|
+
var se_GuardrailConverseContentBlock = (input, context) => {
|
|
32155
32155
|
return exports2.GuardrailConverseContentBlock.visit(input, {
|
|
32156
|
-
image: (value) => ({ image: se_GuardrailConverseImageBlock(value,
|
|
32156
|
+
image: (value) => ({ image: se_GuardrailConverseImageBlock(value, context) }),
|
|
32157
32157
|
text: (value) => ({ text: smithyClient._json(value) }),
|
|
32158
32158
|
_: (name14, value) => ({ [name14]: value })
|
|
32159
32159
|
});
|
|
32160
32160
|
};
|
|
32161
|
-
var se_GuardrailConverseImageBlock = (input,
|
|
32161
|
+
var se_GuardrailConverseImageBlock = (input, context) => {
|
|
32162
32162
|
return smithyClient.take(input, {
|
|
32163
32163
|
format: [],
|
|
32164
|
-
source: (_2) => se_GuardrailConverseImageSource(_2,
|
|
32164
|
+
source: (_2) => se_GuardrailConverseImageSource(_2, context)
|
|
32165
32165
|
});
|
|
32166
32166
|
};
|
|
32167
|
-
var se_GuardrailConverseImageSource = (input,
|
|
32167
|
+
var se_GuardrailConverseImageSource = (input, context) => {
|
|
32168
32168
|
return exports2.GuardrailConverseImageSource.visit(input, {
|
|
32169
|
-
bytes: (value) => ({ bytes:
|
|
32169
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
32170
32170
|
_: (name14, value) => ({ [name14]: value })
|
|
32171
32171
|
});
|
|
32172
32172
|
};
|
|
32173
|
-
var se_GuardrailImageBlock = (input,
|
|
32173
|
+
var se_GuardrailImageBlock = (input, context) => {
|
|
32174
32174
|
return smithyClient.take(input, {
|
|
32175
32175
|
format: [],
|
|
32176
|
-
source: (_2) => se_GuardrailImageSource(_2,
|
|
32176
|
+
source: (_2) => se_GuardrailImageSource(_2, context)
|
|
32177
32177
|
});
|
|
32178
32178
|
};
|
|
32179
|
-
var se_GuardrailImageSource = (input,
|
|
32179
|
+
var se_GuardrailImageSource = (input, context) => {
|
|
32180
32180
|
return exports2.GuardrailImageSource.visit(input, {
|
|
32181
|
-
bytes: (value) => ({ bytes:
|
|
32181
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
32182
32182
|
_: (name14, value) => ({ [name14]: value })
|
|
32183
32183
|
});
|
|
32184
32184
|
};
|
|
32185
|
-
var se_ImageBlock = (input,
|
|
32185
|
+
var se_ImageBlock = (input, context) => {
|
|
32186
32186
|
return smithyClient.take(input, {
|
|
32187
32187
|
format: [],
|
|
32188
|
-
source: (_2) => se_ImageSource(_2,
|
|
32188
|
+
source: (_2) => se_ImageSource(_2, context)
|
|
32189
32189
|
});
|
|
32190
32190
|
};
|
|
32191
|
-
var se_ImageSource = (input,
|
|
32191
|
+
var se_ImageSource = (input, context) => {
|
|
32192
32192
|
return exports2.ImageSource.visit(input, {
|
|
32193
|
-
bytes: (value) => ({ bytes:
|
|
32193
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
32194
32194
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
32195
32195
|
_: (name14, value) => ({ [name14]: value })
|
|
32196
32196
|
});
|
|
32197
32197
|
};
|
|
32198
|
-
var se_InferenceConfiguration = (input,
|
|
32198
|
+
var se_InferenceConfiguration = (input, context) => {
|
|
32199
32199
|
return smithyClient.take(input, {
|
|
32200
32200
|
maxTokens: [],
|
|
32201
32201
|
stopSequences: smithyClient._json,
|
|
@@ -32203,128 +32203,128 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32203
32203
|
topP: smithyClient.serializeFloat
|
|
32204
32204
|
});
|
|
32205
32205
|
};
|
|
32206
|
-
var se_InvokeModelTokensRequest = (input,
|
|
32206
|
+
var se_InvokeModelTokensRequest = (input, context) => {
|
|
32207
32207
|
return smithyClient.take(input, {
|
|
32208
|
-
body:
|
|
32208
|
+
body: context.base64Encoder
|
|
32209
32209
|
});
|
|
32210
32210
|
};
|
|
32211
|
-
var se_Message = (input,
|
|
32211
|
+
var se_Message = (input, context) => {
|
|
32212
32212
|
return smithyClient.take(input, {
|
|
32213
|
-
content: (_2) => se_ContentBlocks(_2,
|
|
32213
|
+
content: (_2) => se_ContentBlocks(_2, context),
|
|
32214
32214
|
role: []
|
|
32215
32215
|
});
|
|
32216
32216
|
};
|
|
32217
|
-
var se_Messages = (input,
|
|
32217
|
+
var se_Messages = (input, context) => {
|
|
32218
32218
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32219
|
-
return se_Message(entry,
|
|
32219
|
+
return se_Message(entry, context);
|
|
32220
32220
|
});
|
|
32221
32221
|
};
|
|
32222
|
-
var se_ModelInputPayload = (input,
|
|
32222
|
+
var se_ModelInputPayload = (input, context) => {
|
|
32223
32223
|
return input;
|
|
32224
32224
|
};
|
|
32225
|
-
var se_ReasoningContentBlock = (input,
|
|
32225
|
+
var se_ReasoningContentBlock = (input, context) => {
|
|
32226
32226
|
return exports2.ReasoningContentBlock.visit(input, {
|
|
32227
32227
|
reasoningText: (value) => ({ reasoningText: smithyClient._json(value) }),
|
|
32228
|
-
redactedContent: (value) => ({ redactedContent:
|
|
32228
|
+
redactedContent: (value) => ({ redactedContent: context.base64Encoder(value) }),
|
|
32229
32229
|
_: (name14, value) => ({ [name14]: value })
|
|
32230
32230
|
});
|
|
32231
32231
|
};
|
|
32232
|
-
var se_SystemContentBlock = (input,
|
|
32232
|
+
var se_SystemContentBlock = (input, context) => {
|
|
32233
32233
|
return exports2.SystemContentBlock.visit(input, {
|
|
32234
32234
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
32235
|
-
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value,
|
|
32235
|
+
guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
|
|
32236
32236
|
text: (value) => ({ text: value }),
|
|
32237
32237
|
_: (name14, value) => ({ [name14]: value })
|
|
32238
32238
|
});
|
|
32239
32239
|
};
|
|
32240
|
-
var se_SystemContentBlocks = (input,
|
|
32240
|
+
var se_SystemContentBlocks = (input, context) => {
|
|
32241
32241
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32242
|
-
return se_SystemContentBlock(entry,
|
|
32242
|
+
return se_SystemContentBlock(entry, context);
|
|
32243
32243
|
});
|
|
32244
32244
|
};
|
|
32245
|
-
var se_Tool = (input,
|
|
32245
|
+
var se_Tool = (input, context) => {
|
|
32246
32246
|
return exports2.Tool.visit(input, {
|
|
32247
32247
|
cachePoint: (value) => ({ cachePoint: smithyClient._json(value) }),
|
|
32248
32248
|
toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value) }),
|
|
32249
32249
|
_: (name14, value) => ({ [name14]: value })
|
|
32250
32250
|
});
|
|
32251
32251
|
};
|
|
32252
|
-
var se_ToolConfiguration = (input,
|
|
32252
|
+
var se_ToolConfiguration = (input, context) => {
|
|
32253
32253
|
return smithyClient.take(input, {
|
|
32254
32254
|
toolChoice: smithyClient._json,
|
|
32255
32255
|
tools: (_2) => se_Tools(_2)
|
|
32256
32256
|
});
|
|
32257
32257
|
};
|
|
32258
|
-
var se_ToolInputSchema = (input,
|
|
32258
|
+
var se_ToolInputSchema = (input, context) => {
|
|
32259
32259
|
return exports2.ToolInputSchema.visit(input, {
|
|
32260
32260
|
json: (value) => ({ json: se_Document(value) }),
|
|
32261
32261
|
_: (name14, value) => ({ [name14]: value })
|
|
32262
32262
|
});
|
|
32263
32263
|
};
|
|
32264
|
-
var se_ToolResultBlock = (input,
|
|
32264
|
+
var se_ToolResultBlock = (input, context) => {
|
|
32265
32265
|
return smithyClient.take(input, {
|
|
32266
|
-
content: (_2) => se_ToolResultContentBlocks(_2,
|
|
32266
|
+
content: (_2) => se_ToolResultContentBlocks(_2, context),
|
|
32267
32267
|
status: [],
|
|
32268
32268
|
toolUseId: []
|
|
32269
32269
|
});
|
|
32270
32270
|
};
|
|
32271
|
-
var se_ToolResultContentBlock = (input,
|
|
32271
|
+
var se_ToolResultContentBlock = (input, context) => {
|
|
32272
32272
|
return exports2.ToolResultContentBlock.visit(input, {
|
|
32273
|
-
document: (value) => ({ document: se_DocumentBlock(value,
|
|
32274
|
-
image: (value) => ({ image: se_ImageBlock(value,
|
|
32273
|
+
document: (value) => ({ document: se_DocumentBlock(value, context) }),
|
|
32274
|
+
image: (value) => ({ image: se_ImageBlock(value, context) }),
|
|
32275
32275
|
json: (value) => ({ json: se_Document(value) }),
|
|
32276
32276
|
text: (value) => ({ text: value }),
|
|
32277
|
-
video: (value) => ({ video: se_VideoBlock(value,
|
|
32277
|
+
video: (value) => ({ video: se_VideoBlock(value, context) }),
|
|
32278
32278
|
_: (name14, value) => ({ [name14]: value })
|
|
32279
32279
|
});
|
|
32280
32280
|
};
|
|
32281
|
-
var se_ToolResultContentBlocks = (input,
|
|
32281
|
+
var se_ToolResultContentBlocks = (input, context) => {
|
|
32282
32282
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32283
|
-
return se_ToolResultContentBlock(entry,
|
|
32283
|
+
return se_ToolResultContentBlock(entry, context);
|
|
32284
32284
|
});
|
|
32285
32285
|
};
|
|
32286
|
-
var se_Tools = (input,
|
|
32286
|
+
var se_Tools = (input, context) => {
|
|
32287
32287
|
return input.filter((e3) => e3 != null).map((entry) => {
|
|
32288
32288
|
return se_Tool(entry);
|
|
32289
32289
|
});
|
|
32290
32290
|
};
|
|
32291
|
-
var se_ToolSpecification = (input,
|
|
32291
|
+
var se_ToolSpecification = (input, context) => {
|
|
32292
32292
|
return smithyClient.take(input, {
|
|
32293
32293
|
description: [],
|
|
32294
32294
|
inputSchema: (_2) => se_ToolInputSchema(_2),
|
|
32295
32295
|
name: []
|
|
32296
32296
|
});
|
|
32297
32297
|
};
|
|
32298
|
-
var se_ToolUseBlock = (input,
|
|
32298
|
+
var se_ToolUseBlock = (input, context) => {
|
|
32299
32299
|
return smithyClient.take(input, {
|
|
32300
32300
|
input: (_2) => se_Document(_2),
|
|
32301
32301
|
name: [],
|
|
32302
32302
|
toolUseId: []
|
|
32303
32303
|
});
|
|
32304
32304
|
};
|
|
32305
|
-
var se_VideoBlock = (input,
|
|
32305
|
+
var se_VideoBlock = (input, context) => {
|
|
32306
32306
|
return smithyClient.take(input, {
|
|
32307
32307
|
format: [],
|
|
32308
|
-
source: (_2) => se_VideoSource(_2,
|
|
32308
|
+
source: (_2) => se_VideoSource(_2, context)
|
|
32309
32309
|
});
|
|
32310
32310
|
};
|
|
32311
|
-
var se_VideoSource = (input,
|
|
32311
|
+
var se_VideoSource = (input, context) => {
|
|
32312
32312
|
return exports2.VideoSource.visit(input, {
|
|
32313
|
-
bytes: (value) => ({ bytes:
|
|
32313
|
+
bytes: (value) => ({ bytes: context.base64Encoder(value) }),
|
|
32314
32314
|
s3Location: (value) => ({ s3Location: smithyClient._json(value) }),
|
|
32315
32315
|
_: (name14, value) => ({ [name14]: value })
|
|
32316
32316
|
});
|
|
32317
32317
|
};
|
|
32318
|
-
var se_Document = (input,
|
|
32318
|
+
var se_Document = (input, context) => {
|
|
32319
32319
|
return input;
|
|
32320
32320
|
};
|
|
32321
|
-
var de_AsyncInvokeSummaries = (output,
|
|
32321
|
+
var de_AsyncInvokeSummaries = (output, context) => {
|
|
32322
32322
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32323
32323
|
return de_AsyncInvokeSummary(entry);
|
|
32324
32324
|
});
|
|
32325
32325
|
return retVal;
|
|
32326
32326
|
};
|
|
32327
|
-
var de_AsyncInvokeSummary = (output,
|
|
32327
|
+
var de_AsyncInvokeSummary = (output, context) => {
|
|
32328
32328
|
return smithyClient.take(output, {
|
|
32329
32329
|
clientRequestToken: smithyClient.expectString,
|
|
32330
32330
|
endTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2)),
|
|
@@ -32337,12 +32337,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32337
32337
|
submitTime: (_2) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_2))
|
|
32338
32338
|
});
|
|
32339
32339
|
};
|
|
32340
|
-
var de_BidirectionalOutputPayloadPart = (output,
|
|
32340
|
+
var de_BidirectionalOutputPayloadPart = (output, context) => {
|
|
32341
32341
|
return smithyClient.take(output, {
|
|
32342
|
-
bytes:
|
|
32342
|
+
bytes: context.base64Decoder
|
|
32343
32343
|
});
|
|
32344
32344
|
};
|
|
32345
|
-
var de_ContentBlock = (output,
|
|
32345
|
+
var de_ContentBlock = (output, context) => {
|
|
32346
32346
|
if (output.cachePoint != null) {
|
|
32347
32347
|
return {
|
|
32348
32348
|
cachePoint: smithyClient._json(output.cachePoint)
|
|
@@ -32355,22 +32355,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32355
32355
|
}
|
|
32356
32356
|
if (output.document != null) {
|
|
32357
32357
|
return {
|
|
32358
|
-
document: de_DocumentBlock(output.document,
|
|
32358
|
+
document: de_DocumentBlock(output.document, context)
|
|
32359
32359
|
};
|
|
32360
32360
|
}
|
|
32361
32361
|
if (output.guardContent != null) {
|
|
32362
32362
|
return {
|
|
32363
|
-
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent),
|
|
32363
|
+
guardContent: de_GuardrailConverseContentBlock(core$1.awsExpectUnion(output.guardContent), context)
|
|
32364
32364
|
};
|
|
32365
32365
|
}
|
|
32366
32366
|
if (output.image != null) {
|
|
32367
32367
|
return {
|
|
32368
|
-
image: de_ImageBlock(output.image,
|
|
32368
|
+
image: de_ImageBlock(output.image, context)
|
|
32369
32369
|
};
|
|
32370
32370
|
}
|
|
32371
32371
|
if (output.reasoningContent != null) {
|
|
32372
32372
|
return {
|
|
32373
|
-
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent),
|
|
32373
|
+
reasoningContent: de_ReasoningContentBlock(core$1.awsExpectUnion(output.reasoningContent), context)
|
|
32374
32374
|
};
|
|
32375
32375
|
}
|
|
32376
32376
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -32378,7 +32378,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32378
32378
|
}
|
|
32379
32379
|
if (output.toolResult != null) {
|
|
32380
32380
|
return {
|
|
32381
|
-
toolResult: de_ToolResultBlock(output.toolResult,
|
|
32381
|
+
toolResult: de_ToolResultBlock(output.toolResult, context)
|
|
32382
32382
|
};
|
|
32383
32383
|
}
|
|
32384
32384
|
if (output.toolUse != null) {
|
|
@@ -32388,12 +32388,12 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32388
32388
|
}
|
|
32389
32389
|
if (output.video != null) {
|
|
32390
32390
|
return {
|
|
32391
|
-
video: de_VideoBlock(output.video,
|
|
32391
|
+
video: de_VideoBlock(output.video, context)
|
|
32392
32392
|
};
|
|
32393
32393
|
}
|
|
32394
32394
|
return { $unknown: Object.entries(output)[0] };
|
|
32395
32395
|
};
|
|
32396
|
-
var de_ContentBlockDelta = (output,
|
|
32396
|
+
var de_ContentBlockDelta = (output, context) => {
|
|
32397
32397
|
if (output.citation != null) {
|
|
32398
32398
|
return {
|
|
32399
32399
|
citation: smithyClient._json(output.citation)
|
|
@@ -32401,7 +32401,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32401
32401
|
}
|
|
32402
32402
|
if (output.reasoningContent != null) {
|
|
32403
32403
|
return {
|
|
32404
|
-
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent),
|
|
32404
|
+
reasoningContent: de_ReasoningContentBlockDelta(core$1.awsExpectUnion(output.reasoningContent), context)
|
|
32405
32405
|
};
|
|
32406
32406
|
}
|
|
32407
32407
|
if (smithyClient.expectString(output.text) !== void 0) {
|
|
@@ -32414,27 +32414,27 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32414
32414
|
}
|
|
32415
32415
|
return { $unknown: Object.entries(output)[0] };
|
|
32416
32416
|
};
|
|
32417
|
-
var de_ContentBlockDeltaEvent = (output,
|
|
32417
|
+
var de_ContentBlockDeltaEvent = (output, context) => {
|
|
32418
32418
|
return smithyClient.take(output, {
|
|
32419
32419
|
contentBlockIndex: smithyClient.expectInt32,
|
|
32420
|
-
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2),
|
|
32420
|
+
delta: (_2) => de_ContentBlockDelta(core$1.awsExpectUnion(_2), context)
|
|
32421
32421
|
});
|
|
32422
32422
|
};
|
|
32423
|
-
var de_ContentBlocks = (output,
|
|
32423
|
+
var de_ContentBlocks = (output, context) => {
|
|
32424
32424
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32425
|
-
return de_ContentBlock(core$1.awsExpectUnion(entry),
|
|
32425
|
+
return de_ContentBlock(core$1.awsExpectUnion(entry), context);
|
|
32426
32426
|
});
|
|
32427
32427
|
return retVal;
|
|
32428
32428
|
};
|
|
32429
|
-
var de_ConverseOutput = (output,
|
|
32429
|
+
var de_ConverseOutput = (output, context) => {
|
|
32430
32430
|
if (output.message != null) {
|
|
32431
32431
|
return {
|
|
32432
|
-
message: de_Message(output.message,
|
|
32432
|
+
message: de_Message(output.message, context)
|
|
32433
32433
|
};
|
|
32434
32434
|
}
|
|
32435
32435
|
return { $unknown: Object.entries(output)[0] };
|
|
32436
32436
|
};
|
|
32437
|
-
var de_ConverseStreamMetadataEvent = (output,
|
|
32437
|
+
var de_ConverseStreamMetadataEvent = (output, context) => {
|
|
32438
32438
|
return smithyClient.take(output, {
|
|
32439
32439
|
metrics: smithyClient._json,
|
|
32440
32440
|
performanceConfig: smithyClient._json,
|
|
@@ -32442,31 +32442,31 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32442
32442
|
usage: smithyClient._json
|
|
32443
32443
|
});
|
|
32444
32444
|
};
|
|
32445
|
-
var de_ConverseStreamTrace = (output,
|
|
32445
|
+
var de_ConverseStreamTrace = (output, context) => {
|
|
32446
32446
|
return smithyClient.take(output, {
|
|
32447
32447
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
32448
32448
|
promptRouter: smithyClient._json
|
|
32449
32449
|
});
|
|
32450
32450
|
};
|
|
32451
|
-
var de_ConverseTrace = (output,
|
|
32451
|
+
var de_ConverseTrace = (output, context) => {
|
|
32452
32452
|
return smithyClient.take(output, {
|
|
32453
32453
|
guardrail: (_2) => de_GuardrailTraceAssessment(_2),
|
|
32454
32454
|
promptRouter: smithyClient._json
|
|
32455
32455
|
});
|
|
32456
32456
|
};
|
|
32457
|
-
var de_DocumentBlock = (output,
|
|
32457
|
+
var de_DocumentBlock = (output, context) => {
|
|
32458
32458
|
return smithyClient.take(output, {
|
|
32459
32459
|
citations: smithyClient._json,
|
|
32460
32460
|
context: smithyClient.expectString,
|
|
32461
32461
|
format: smithyClient.expectString,
|
|
32462
32462
|
name: smithyClient.expectString,
|
|
32463
|
-
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2),
|
|
32463
|
+
source: (_2) => de_DocumentSource(core$1.awsExpectUnion(_2), context)
|
|
32464
32464
|
});
|
|
32465
32465
|
};
|
|
32466
|
-
var de_DocumentSource = (output,
|
|
32466
|
+
var de_DocumentSource = (output, context) => {
|
|
32467
32467
|
if (output.bytes != null) {
|
|
32468
32468
|
return {
|
|
32469
|
-
bytes:
|
|
32469
|
+
bytes: context.base64Decoder(output.bytes)
|
|
32470
32470
|
};
|
|
32471
32471
|
}
|
|
32472
32472
|
if (output.content != null) {
|
|
@@ -32484,7 +32484,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32484
32484
|
}
|
|
32485
32485
|
return { $unknown: Object.entries(output)[0] };
|
|
32486
32486
|
};
|
|
32487
|
-
var de_GuardrailAssessment = (output,
|
|
32487
|
+
var de_GuardrailAssessment = (output, context) => {
|
|
32488
32488
|
return smithyClient.take(output, {
|
|
32489
32489
|
automatedReasoningPolicy: (_2) => de_GuardrailAutomatedReasoningPolicyAssessment(_2),
|
|
32490
32490
|
contentPolicy: smithyClient._json,
|
|
@@ -32495,13 +32495,13 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32495
32495
|
wordPolicy: smithyClient._json
|
|
32496
32496
|
});
|
|
32497
32497
|
};
|
|
32498
|
-
var de_GuardrailAssessmentList = (output,
|
|
32498
|
+
var de_GuardrailAssessmentList = (output, context) => {
|
|
32499
32499
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32500
32500
|
return de_GuardrailAssessment(entry);
|
|
32501
32501
|
});
|
|
32502
32502
|
return retVal;
|
|
32503
32503
|
};
|
|
32504
|
-
var de_GuardrailAssessmentListMap = (output,
|
|
32504
|
+
var de_GuardrailAssessmentListMap = (output, context) => {
|
|
32505
32505
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
32506
32506
|
if (value === null) {
|
|
32507
32507
|
return acc;
|
|
@@ -32510,7 +32510,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32510
32510
|
return acc;
|
|
32511
32511
|
}, {});
|
|
32512
32512
|
};
|
|
32513
|
-
var de_GuardrailAssessmentMap = (output,
|
|
32513
|
+
var de_GuardrailAssessmentMap = (output, context) => {
|
|
32514
32514
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
32515
32515
|
if (value === null) {
|
|
32516
32516
|
return acc;
|
|
@@ -32519,7 +32519,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32519
32519
|
return acc;
|
|
32520
32520
|
}, {});
|
|
32521
32521
|
};
|
|
32522
|
-
var de_GuardrailAutomatedReasoningFinding = (output,
|
|
32522
|
+
var de_GuardrailAutomatedReasoningFinding = (output, context) => {
|
|
32523
32523
|
if (output.impossible != null) {
|
|
32524
32524
|
return {
|
|
32525
32525
|
impossible: de_GuardrailAutomatedReasoningImpossibleFinding(output.impossible)
|
|
@@ -32557,32 +32557,32 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32557
32557
|
}
|
|
32558
32558
|
return { $unknown: Object.entries(output)[0] };
|
|
32559
32559
|
};
|
|
32560
|
-
var de_GuardrailAutomatedReasoningFindingList = (output,
|
|
32560
|
+
var de_GuardrailAutomatedReasoningFindingList = (output, context) => {
|
|
32561
32561
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32562
32562
|
return de_GuardrailAutomatedReasoningFinding(core$1.awsExpectUnion(entry));
|
|
32563
32563
|
});
|
|
32564
32564
|
return retVal;
|
|
32565
32565
|
};
|
|
32566
|
-
var de_GuardrailAutomatedReasoningImpossibleFinding = (output,
|
|
32566
|
+
var de_GuardrailAutomatedReasoningImpossibleFinding = (output, context) => {
|
|
32567
32567
|
return smithyClient.take(output, {
|
|
32568
32568
|
contradictingRules: smithyClient._json,
|
|
32569
32569
|
logicWarning: smithyClient._json,
|
|
32570
32570
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
32571
32571
|
});
|
|
32572
32572
|
};
|
|
32573
|
-
var de_GuardrailAutomatedReasoningInvalidFinding = (output,
|
|
32573
|
+
var de_GuardrailAutomatedReasoningInvalidFinding = (output, context) => {
|
|
32574
32574
|
return smithyClient.take(output, {
|
|
32575
32575
|
contradictingRules: smithyClient._json,
|
|
32576
32576
|
logicWarning: smithyClient._json,
|
|
32577
32577
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
32578
32578
|
});
|
|
32579
32579
|
};
|
|
32580
|
-
var de_GuardrailAutomatedReasoningPolicyAssessment = (output,
|
|
32580
|
+
var de_GuardrailAutomatedReasoningPolicyAssessment = (output, context) => {
|
|
32581
32581
|
return smithyClient.take(output, {
|
|
32582
32582
|
findings: (_2) => de_GuardrailAutomatedReasoningFindingList(_2)
|
|
32583
32583
|
});
|
|
32584
32584
|
};
|
|
32585
|
-
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output,
|
|
32585
|
+
var de_GuardrailAutomatedReasoningSatisfiableFinding = (output, context) => {
|
|
32586
32586
|
return smithyClient.take(output, {
|
|
32587
32587
|
claimsFalseScenario: smithyClient._json,
|
|
32588
32588
|
claimsTrueScenario: smithyClient._json,
|
|
@@ -32590,7 +32590,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32590
32590
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
32591
32591
|
});
|
|
32592
32592
|
};
|
|
32593
|
-
var de_GuardrailAutomatedReasoningTranslation = (output,
|
|
32593
|
+
var de_GuardrailAutomatedReasoningTranslation = (output, context) => {
|
|
32594
32594
|
return smithyClient.take(output, {
|
|
32595
32595
|
claims: smithyClient._json,
|
|
32596
32596
|
confidence: smithyClient.limitedParseDouble,
|
|
@@ -32599,30 +32599,30 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32599
32599
|
untranslatedPremises: smithyClient._json
|
|
32600
32600
|
});
|
|
32601
32601
|
};
|
|
32602
|
-
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output,
|
|
32602
|
+
var de_GuardrailAutomatedReasoningTranslationAmbiguousFinding = (output, context) => {
|
|
32603
32603
|
return smithyClient.take(output, {
|
|
32604
32604
|
differenceScenarios: smithyClient._json,
|
|
32605
32605
|
options: (_2) => de_GuardrailAutomatedReasoningTranslationOptionList(_2)
|
|
32606
32606
|
});
|
|
32607
32607
|
};
|
|
32608
|
-
var de_GuardrailAutomatedReasoningTranslationList = (output,
|
|
32608
|
+
var de_GuardrailAutomatedReasoningTranslationList = (output, context) => {
|
|
32609
32609
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32610
32610
|
return de_GuardrailAutomatedReasoningTranslation(entry);
|
|
32611
32611
|
});
|
|
32612
32612
|
return retVal;
|
|
32613
32613
|
};
|
|
32614
|
-
var de_GuardrailAutomatedReasoningTranslationOption = (output,
|
|
32614
|
+
var de_GuardrailAutomatedReasoningTranslationOption = (output, context) => {
|
|
32615
32615
|
return smithyClient.take(output, {
|
|
32616
32616
|
translations: (_2) => de_GuardrailAutomatedReasoningTranslationList(_2)
|
|
32617
32617
|
});
|
|
32618
32618
|
};
|
|
32619
|
-
var de_GuardrailAutomatedReasoningTranslationOptionList = (output,
|
|
32619
|
+
var de_GuardrailAutomatedReasoningTranslationOptionList = (output, context) => {
|
|
32620
32620
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32621
32621
|
return de_GuardrailAutomatedReasoningTranslationOption(entry);
|
|
32622
32622
|
});
|
|
32623
32623
|
return retVal;
|
|
32624
32624
|
};
|
|
32625
|
-
var de_GuardrailAutomatedReasoningValidFinding = (output,
|
|
32625
|
+
var de_GuardrailAutomatedReasoningValidFinding = (output, context) => {
|
|
32626
32626
|
return smithyClient.take(output, {
|
|
32627
32627
|
claimsTrueScenario: smithyClient._json,
|
|
32628
32628
|
logicWarning: smithyClient._json,
|
|
@@ -32630,7 +32630,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32630
32630
|
translation: (_2) => de_GuardrailAutomatedReasoningTranslation(_2)
|
|
32631
32631
|
});
|
|
32632
32632
|
};
|
|
32633
|
-
var de_GuardrailContextualGroundingFilter = (output,
|
|
32633
|
+
var de_GuardrailContextualGroundingFilter = (output, context) => {
|
|
32634
32634
|
return smithyClient.take(output, {
|
|
32635
32635
|
action: smithyClient.expectString,
|
|
32636
32636
|
detected: smithyClient.expectBoolean,
|
|
@@ -32639,21 +32639,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32639
32639
|
type: smithyClient.expectString
|
|
32640
32640
|
});
|
|
32641
32641
|
};
|
|
32642
|
-
var de_GuardrailContextualGroundingFilters = (output,
|
|
32642
|
+
var de_GuardrailContextualGroundingFilters = (output, context) => {
|
|
32643
32643
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32644
32644
|
return de_GuardrailContextualGroundingFilter(entry);
|
|
32645
32645
|
});
|
|
32646
32646
|
return retVal;
|
|
32647
32647
|
};
|
|
32648
|
-
var de_GuardrailContextualGroundingPolicyAssessment = (output,
|
|
32648
|
+
var de_GuardrailContextualGroundingPolicyAssessment = (output, context) => {
|
|
32649
32649
|
return smithyClient.take(output, {
|
|
32650
32650
|
filters: (_2) => de_GuardrailContextualGroundingFilters(_2)
|
|
32651
32651
|
});
|
|
32652
32652
|
};
|
|
32653
|
-
var de_GuardrailConverseContentBlock = (output,
|
|
32653
|
+
var de_GuardrailConverseContentBlock = (output, context) => {
|
|
32654
32654
|
if (output.image != null) {
|
|
32655
32655
|
return {
|
|
32656
|
-
image: de_GuardrailConverseImageBlock(output.image,
|
|
32656
|
+
image: de_GuardrailConverseImageBlock(output.image, context)
|
|
32657
32657
|
};
|
|
32658
32658
|
}
|
|
32659
32659
|
if (output.text != null) {
|
|
@@ -32663,21 +32663,21 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32663
32663
|
}
|
|
32664
32664
|
return { $unknown: Object.entries(output)[0] };
|
|
32665
32665
|
};
|
|
32666
|
-
var de_GuardrailConverseImageBlock = (output,
|
|
32666
|
+
var de_GuardrailConverseImageBlock = (output, context) => {
|
|
32667
32667
|
return smithyClient.take(output, {
|
|
32668
32668
|
format: smithyClient.expectString,
|
|
32669
|
-
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2),
|
|
32669
|
+
source: (_2) => de_GuardrailConverseImageSource(core$1.awsExpectUnion(_2), context)
|
|
32670
32670
|
});
|
|
32671
32671
|
};
|
|
32672
|
-
var de_GuardrailConverseImageSource = (output,
|
|
32672
|
+
var de_GuardrailConverseImageSource = (output, context) => {
|
|
32673
32673
|
if (output.bytes != null) {
|
|
32674
32674
|
return {
|
|
32675
|
-
bytes:
|
|
32675
|
+
bytes: context.base64Decoder(output.bytes)
|
|
32676
32676
|
};
|
|
32677
32677
|
}
|
|
32678
32678
|
return { $unknown: Object.entries(output)[0] };
|
|
32679
32679
|
};
|
|
32680
|
-
var de_GuardrailTraceAssessment = (output,
|
|
32680
|
+
var de_GuardrailTraceAssessment = (output, context) => {
|
|
32681
32681
|
return smithyClient.take(output, {
|
|
32682
32682
|
actionReason: smithyClient.expectString,
|
|
32683
32683
|
inputAssessment: (_2) => de_GuardrailAssessmentMap(_2),
|
|
@@ -32685,16 +32685,16 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32685
32685
|
outputAssessments: (_2) => de_GuardrailAssessmentListMap(_2)
|
|
32686
32686
|
});
|
|
32687
32687
|
};
|
|
32688
|
-
var de_ImageBlock = (output,
|
|
32688
|
+
var de_ImageBlock = (output, context) => {
|
|
32689
32689
|
return smithyClient.take(output, {
|
|
32690
32690
|
format: smithyClient.expectString,
|
|
32691
|
-
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2),
|
|
32691
|
+
source: (_2) => de_ImageSource(core$1.awsExpectUnion(_2), context)
|
|
32692
32692
|
});
|
|
32693
32693
|
};
|
|
32694
|
-
var de_ImageSource = (output,
|
|
32694
|
+
var de_ImageSource = (output, context) => {
|
|
32695
32695
|
if (output.bytes != null) {
|
|
32696
32696
|
return {
|
|
32697
|
-
bytes:
|
|
32697
|
+
bytes: context.base64Decoder(output.bytes)
|
|
32698
32698
|
};
|
|
32699
32699
|
}
|
|
32700
32700
|
if (output.s3Location != null) {
|
|
@@ -32704,24 +32704,24 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32704
32704
|
}
|
|
32705
32705
|
return { $unknown: Object.entries(output)[0] };
|
|
32706
32706
|
};
|
|
32707
|
-
var de_Message = (output,
|
|
32707
|
+
var de_Message = (output, context) => {
|
|
32708
32708
|
return smithyClient.take(output, {
|
|
32709
|
-
content: (_2) => de_ContentBlocks(_2,
|
|
32709
|
+
content: (_2) => de_ContentBlocks(_2, context),
|
|
32710
32710
|
role: smithyClient.expectString
|
|
32711
32711
|
});
|
|
32712
32712
|
};
|
|
32713
|
-
var de_MessageStopEvent = (output,
|
|
32713
|
+
var de_MessageStopEvent = (output, context) => {
|
|
32714
32714
|
return smithyClient.take(output, {
|
|
32715
32715
|
additionalModelResponseFields: (_2) => de_Document(_2),
|
|
32716
32716
|
stopReason: smithyClient.expectString
|
|
32717
32717
|
});
|
|
32718
32718
|
};
|
|
32719
|
-
var de_PayloadPart = (output,
|
|
32719
|
+
var de_PayloadPart = (output, context) => {
|
|
32720
32720
|
return smithyClient.take(output, {
|
|
32721
|
-
bytes:
|
|
32721
|
+
bytes: context.base64Decoder
|
|
32722
32722
|
});
|
|
32723
32723
|
};
|
|
32724
|
-
var de_ReasoningContentBlock = (output,
|
|
32724
|
+
var de_ReasoningContentBlock = (output, context) => {
|
|
32725
32725
|
if (output.reasoningText != null) {
|
|
32726
32726
|
return {
|
|
32727
32727
|
reasoningText: smithyClient._json(output.reasoningText)
|
|
@@ -32729,15 +32729,15 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32729
32729
|
}
|
|
32730
32730
|
if (output.redactedContent != null) {
|
|
32731
32731
|
return {
|
|
32732
|
-
redactedContent:
|
|
32732
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
32733
32733
|
};
|
|
32734
32734
|
}
|
|
32735
32735
|
return { $unknown: Object.entries(output)[0] };
|
|
32736
32736
|
};
|
|
32737
|
-
var de_ReasoningContentBlockDelta = (output,
|
|
32737
|
+
var de_ReasoningContentBlockDelta = (output, context) => {
|
|
32738
32738
|
if (output.redactedContent != null) {
|
|
32739
32739
|
return {
|
|
32740
|
-
redactedContent:
|
|
32740
|
+
redactedContent: context.base64Decoder(output.redactedContent)
|
|
32741
32741
|
};
|
|
32742
32742
|
}
|
|
32743
32743
|
if (smithyClient.expectString(output.signature) !== void 0) {
|
|
@@ -32748,22 +32748,22 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32748
32748
|
}
|
|
32749
32749
|
return { $unknown: Object.entries(output)[0] };
|
|
32750
32750
|
};
|
|
32751
|
-
var de_ToolResultBlock = (output,
|
|
32751
|
+
var de_ToolResultBlock = (output, context) => {
|
|
32752
32752
|
return smithyClient.take(output, {
|
|
32753
|
-
content: (_2) => de_ToolResultContentBlocks(_2,
|
|
32753
|
+
content: (_2) => de_ToolResultContentBlocks(_2, context),
|
|
32754
32754
|
status: smithyClient.expectString,
|
|
32755
32755
|
toolUseId: smithyClient.expectString
|
|
32756
32756
|
});
|
|
32757
32757
|
};
|
|
32758
|
-
var de_ToolResultContentBlock = (output,
|
|
32758
|
+
var de_ToolResultContentBlock = (output, context) => {
|
|
32759
32759
|
if (output.document != null) {
|
|
32760
32760
|
return {
|
|
32761
|
-
document: de_DocumentBlock(output.document,
|
|
32761
|
+
document: de_DocumentBlock(output.document, context)
|
|
32762
32762
|
};
|
|
32763
32763
|
}
|
|
32764
32764
|
if (output.image != null) {
|
|
32765
32765
|
return {
|
|
32766
|
-
image: de_ImageBlock(output.image,
|
|
32766
|
+
image: de_ImageBlock(output.image, context)
|
|
32767
32767
|
};
|
|
32768
32768
|
}
|
|
32769
32769
|
if (output.json != null) {
|
|
@@ -32776,34 +32776,34 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32776
32776
|
}
|
|
32777
32777
|
if (output.video != null) {
|
|
32778
32778
|
return {
|
|
32779
|
-
video: de_VideoBlock(output.video,
|
|
32779
|
+
video: de_VideoBlock(output.video, context)
|
|
32780
32780
|
};
|
|
32781
32781
|
}
|
|
32782
32782
|
return { $unknown: Object.entries(output)[0] };
|
|
32783
32783
|
};
|
|
32784
|
-
var de_ToolResultContentBlocks = (output,
|
|
32784
|
+
var de_ToolResultContentBlocks = (output, context) => {
|
|
32785
32785
|
const retVal = (output || []).filter((e3) => e3 != null).map((entry) => {
|
|
32786
|
-
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry),
|
|
32786
|
+
return de_ToolResultContentBlock(core$1.awsExpectUnion(entry), context);
|
|
32787
32787
|
});
|
|
32788
32788
|
return retVal;
|
|
32789
32789
|
};
|
|
32790
|
-
var de_ToolUseBlock = (output,
|
|
32790
|
+
var de_ToolUseBlock = (output, context) => {
|
|
32791
32791
|
return smithyClient.take(output, {
|
|
32792
32792
|
input: (_2) => de_Document(_2),
|
|
32793
32793
|
name: smithyClient.expectString,
|
|
32794
32794
|
toolUseId: smithyClient.expectString
|
|
32795
32795
|
});
|
|
32796
32796
|
};
|
|
32797
|
-
var de_VideoBlock = (output,
|
|
32797
|
+
var de_VideoBlock = (output, context) => {
|
|
32798
32798
|
return smithyClient.take(output, {
|
|
32799
32799
|
format: smithyClient.expectString,
|
|
32800
|
-
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2),
|
|
32800
|
+
source: (_2) => de_VideoSource(core$1.awsExpectUnion(_2), context)
|
|
32801
32801
|
});
|
|
32802
32802
|
};
|
|
32803
|
-
var de_VideoSource = (output,
|
|
32803
|
+
var de_VideoSource = (output, context) => {
|
|
32804
32804
|
if (output.bytes != null) {
|
|
32805
32805
|
return {
|
|
32806
|
-
bytes:
|
|
32806
|
+
bytes: context.base64Decoder(output.bytes)
|
|
32807
32807
|
};
|
|
32808
32808
|
}
|
|
32809
32809
|
if (output.s3Location != null) {
|
|
@@ -32813,7 +32813,7 @@ var require_dist_cjs65 = __commonJS({
|
|
|
32813
32813
|
}
|
|
32814
32814
|
return { $unknown: Object.entries(output)[0] };
|
|
32815
32815
|
};
|
|
32816
|
-
var de_Document = (output,
|
|
32816
|
+
var de_Document = (output, context) => {
|
|
32817
32817
|
return output;
|
|
32818
32818
|
};
|
|
32819
32819
|
var deserializeMetadata3 = (output) => ({
|
|
@@ -37379,7 +37379,7 @@ var init_esm2 = __esm({
|
|
|
37379
37379
|
free: c3.#free,
|
|
37380
37380
|
// methods
|
|
37381
37381
|
isBackgroundFetch: (p3) => c3.#isBackgroundFetch(p3),
|
|
37382
|
-
backgroundFetch: (k3, index, options,
|
|
37382
|
+
backgroundFetch: (k3, index, options, context) => c3.#backgroundFetch(k3, index, options, context),
|
|
37383
37383
|
moveToTail: (index) => c3.#moveToTail(index),
|
|
37384
37384
|
indexes: (options) => c3.#indexes(options),
|
|
37385
37385
|
rindexes: (options) => c3.#rindexes(options),
|
|
@@ -38166,7 +38166,7 @@ var init_esm2 = __esm({
|
|
|
38166
38166
|
const v3 = this.#valList[index];
|
|
38167
38167
|
return this.#isBackgroundFetch(v3) ? v3.__staleWhileFetching : v3;
|
|
38168
38168
|
}
|
|
38169
|
-
#backgroundFetch(k3, index, options,
|
|
38169
|
+
#backgroundFetch(k3, index, options, context) {
|
|
38170
38170
|
const v3 = index === void 0 ? void 0 : this.#valList[index];
|
|
38171
38171
|
if (this.#isBackgroundFetch(v3)) {
|
|
38172
38172
|
return v3;
|
|
@@ -38179,7 +38179,7 @@ var init_esm2 = __esm({
|
|
|
38179
38179
|
const fetchOpts = {
|
|
38180
38180
|
signal: ac.signal,
|
|
38181
38181
|
options,
|
|
38182
|
-
context
|
|
38182
|
+
context
|
|
38183
38183
|
};
|
|
38184
38184
|
const cb = (v4, updateCache = false) => {
|
|
38185
38185
|
const { aborted } = ac.signal;
|
|
@@ -38296,7 +38296,7 @@ var init_esm2 = __esm({
|
|
|
38296
38296
|
allowStaleOnFetchRejection = this.allowStaleOnFetchRejection,
|
|
38297
38297
|
ignoreFetchAbort = this.ignoreFetchAbort,
|
|
38298
38298
|
allowStaleOnFetchAbort = this.allowStaleOnFetchAbort,
|
|
38299
|
-
context
|
|
38299
|
+
context,
|
|
38300
38300
|
forceRefresh = false,
|
|
38301
38301
|
status,
|
|
38302
38302
|
signal
|
|
@@ -38331,7 +38331,7 @@ var init_esm2 = __esm({
|
|
|
38331
38331
|
if (index === void 0) {
|
|
38332
38332
|
if (status)
|
|
38333
38333
|
status.fetch = "miss";
|
|
38334
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
38334
|
+
const p3 = this.#backgroundFetch(k3, index, options, context);
|
|
38335
38335
|
return p3.__returned = p3;
|
|
38336
38336
|
} else {
|
|
38337
38337
|
const v3 = this.#valList[index];
|
|
@@ -38356,7 +38356,7 @@ var init_esm2 = __esm({
|
|
|
38356
38356
|
this.#statusTTL(status, index);
|
|
38357
38357
|
return v3;
|
|
38358
38358
|
}
|
|
38359
|
-
const p3 = this.#backgroundFetch(k3, index, options,
|
|
38359
|
+
const p3 = this.#backgroundFetch(k3, index, options, context);
|
|
38360
38360
|
const hasStale = p3.__staleWhileFetching !== void 0;
|
|
38361
38361
|
const staleVal = hasStale && allowStale;
|
|
38362
38362
|
if (status) {
|
|
@@ -38378,13 +38378,13 @@ var init_esm2 = __esm({
|
|
|
38378
38378
|
if (!memoMethod) {
|
|
38379
38379
|
throw new Error("no memoMethod provided to constructor");
|
|
38380
38380
|
}
|
|
38381
|
-
const { context
|
|
38381
|
+
const { context, forceRefresh, ...options } = memoOptions;
|
|
38382
38382
|
const v3 = this.get(k3, options);
|
|
38383
38383
|
if (!forceRefresh && v3 !== void 0)
|
|
38384
38384
|
return v3;
|
|
38385
38385
|
const vv = memoMethod(k3, v3, {
|
|
38386
38386
|
options,
|
|
38387
|
-
context
|
|
38387
|
+
context
|
|
38388
38388
|
});
|
|
38389
38389
|
this.set(k3, vv, options);
|
|
38390
38390
|
return vv;
|
|
@@ -55651,8 +55651,8 @@ function mapFlowchartParserError(err, text) {
|
|
|
55651
55651
|
};
|
|
55652
55652
|
}
|
|
55653
55653
|
if (tokType === "QuotedString") {
|
|
55654
|
-
const
|
|
55655
|
-
const inLinkRule =
|
|
55654
|
+
const context = err?.context;
|
|
55655
|
+
const inLinkRule = context?.ruleStack?.includes("linkTextInline") || context?.ruleStack?.includes("link") || false;
|
|
55656
55656
|
const lineContent = allLines[Math.max(0, line - 1)] || "";
|
|
55657
55657
|
const beforeQuote = lineContent.slice(0, Math.max(0, column - 1));
|
|
55658
55658
|
const hasLinkBefore = beforeQuote.match(/--\s*$|==\s*$|-\.\s*$|-\.-\s*$|\[\s*$/);
|
|
@@ -76607,662 +76607,6 @@ var init_simpleTelemetry = __esm({
|
|
|
76607
76607
|
}
|
|
76608
76608
|
});
|
|
76609
76609
|
|
|
76610
|
-
// src/agent/fileSpanExporter.js
|
|
76611
|
-
var import_fs9, import_core17, FileSpanExporter;
|
|
76612
|
-
var init_fileSpanExporter = __esm({
|
|
76613
|
-
"src/agent/fileSpanExporter.js"() {
|
|
76614
|
-
"use strict";
|
|
76615
|
-
import_fs9 = require("fs");
|
|
76616
|
-
import_core17 = require("@opentelemetry/core");
|
|
76617
|
-
FileSpanExporter = class {
|
|
76618
|
-
constructor(filePath = "./traces.jsonl") {
|
|
76619
|
-
this.filePath = filePath;
|
|
76620
|
-
this.stream = (0, import_fs9.createWriteStream)(filePath, { flags: "a" });
|
|
76621
|
-
this.stream.on("error", (error2) => {
|
|
76622
|
-
console.error(`[FileSpanExporter] Stream error: ${error2.message}`);
|
|
76623
|
-
});
|
|
76624
|
-
}
|
|
76625
|
-
/**
|
|
76626
|
-
* Export spans to file
|
|
76627
|
-
* @param {ReadableSpan[]} spans - Array of spans to export
|
|
76628
|
-
* @param {function} resultCallback - Callback to call with the export result
|
|
76629
|
-
*/
|
|
76630
|
-
export(spans, resultCallback) {
|
|
76631
|
-
if (!spans || spans.length === 0) {
|
|
76632
|
-
resultCallback({ code: import_core17.ExportResultCode.SUCCESS });
|
|
76633
|
-
return;
|
|
76634
|
-
}
|
|
76635
|
-
try {
|
|
76636
|
-
const timestamp = Date.now();
|
|
76637
|
-
spans.forEach((span, index) => {
|
|
76638
|
-
let parentSpanId = void 0;
|
|
76639
|
-
if (span.parentSpanContext) {
|
|
76640
|
-
parentSpanId = span.parentSpanContext.spanId;
|
|
76641
|
-
} else if (span._parentSpanContext) {
|
|
76642
|
-
parentSpanId = span._parentSpanContext.spanId;
|
|
76643
|
-
} else if (span.parent) {
|
|
76644
|
-
parentSpanId = span.parent.spanId;
|
|
76645
|
-
} else if (span._parent) {
|
|
76646
|
-
parentSpanId = span._parent.spanId;
|
|
76647
|
-
} else if (span._parentId) {
|
|
76648
|
-
parentSpanId = span._parentId;
|
|
76649
|
-
} else if (span.parentSpanId) {
|
|
76650
|
-
parentSpanId = span.parentSpanId;
|
|
76651
|
-
}
|
|
76652
|
-
const spanData = {
|
|
76653
|
-
traceId: span.spanContext().traceId,
|
|
76654
|
-
spanId: span.spanContext().spanId,
|
|
76655
|
-
parentSpanId,
|
|
76656
|
-
name: span.name,
|
|
76657
|
-
kind: span.kind,
|
|
76658
|
-
startTimeUnixNano: span.startTime[0] * 1e9 + span.startTime[1],
|
|
76659
|
-
endTimeUnixNano: span.endTime[0] * 1e9 + span.endTime[1],
|
|
76660
|
-
attributes: this.convertAttributes(span.attributes),
|
|
76661
|
-
status: span.status,
|
|
76662
|
-
events: span.events?.map((event) => ({
|
|
76663
|
-
timeUnixNano: event.time[0] * 1e9 + event.time[1],
|
|
76664
|
-
name: event.name,
|
|
76665
|
-
attributes: this.convertAttributes(event.attributes)
|
|
76666
|
-
})) || [],
|
|
76667
|
-
links: span.links?.map((link) => ({
|
|
76668
|
-
traceId: link.context.traceId,
|
|
76669
|
-
spanId: link.context.spanId,
|
|
76670
|
-
attributes: this.convertAttributes(link.attributes)
|
|
76671
|
-
})) || [],
|
|
76672
|
-
resource: {
|
|
76673
|
-
attributes: this.convertAttributes(span.resource?.attributes || {})
|
|
76674
|
-
},
|
|
76675
|
-
instrumentationLibrary: {
|
|
76676
|
-
name: span.instrumentationLibrary?.name || "unknown",
|
|
76677
|
-
version: span.instrumentationLibrary?.version || "unknown"
|
|
76678
|
-
},
|
|
76679
|
-
timestamp
|
|
76680
|
-
};
|
|
76681
|
-
this.stream.write(JSON.stringify(spanData) + "\n");
|
|
76682
|
-
});
|
|
76683
|
-
resultCallback({ code: import_core17.ExportResultCode.SUCCESS });
|
|
76684
|
-
} catch (error2) {
|
|
76685
|
-
console.error(`[FileSpanExporter] Export error: ${error2.message}`);
|
|
76686
|
-
resultCallback({
|
|
76687
|
-
code: import_core17.ExportResultCode.FAILED,
|
|
76688
|
-
error: error2
|
|
76689
|
-
});
|
|
76690
|
-
}
|
|
76691
|
-
}
|
|
76692
|
-
/**
|
|
76693
|
-
* Convert OpenTelemetry attributes to plain object
|
|
76694
|
-
* @param {Object} attributes - OpenTelemetry attributes
|
|
76695
|
-
* @returns {Object} Plain object with string values
|
|
76696
|
-
*/
|
|
76697
|
-
convertAttributes(attributes) {
|
|
76698
|
-
if (!attributes) return {};
|
|
76699
|
-
const result = {};
|
|
76700
|
-
for (const [key, value] of Object.entries(attributes)) {
|
|
76701
|
-
if (typeof value === "object" && value !== null) {
|
|
76702
|
-
result[key] = JSON.stringify(value);
|
|
76703
|
-
} else {
|
|
76704
|
-
result[key] = String(value);
|
|
76705
|
-
}
|
|
76706
|
-
}
|
|
76707
|
-
return result;
|
|
76708
|
-
}
|
|
76709
|
-
/**
|
|
76710
|
-
* Shutdown the exporter
|
|
76711
|
-
* @returns {Promise<void>}
|
|
76712
|
-
*/
|
|
76713
|
-
async shutdown() {
|
|
76714
|
-
return new Promise((resolve4) => {
|
|
76715
|
-
if (this.stream) {
|
|
76716
|
-
this.stream.end(() => {
|
|
76717
|
-
console.log(`[FileSpanExporter] File stream closed: ${this.filePath}`);
|
|
76718
|
-
resolve4();
|
|
76719
|
-
});
|
|
76720
|
-
} else {
|
|
76721
|
-
resolve4();
|
|
76722
|
-
}
|
|
76723
|
-
});
|
|
76724
|
-
}
|
|
76725
|
-
/**
|
|
76726
|
-
* Force flush any pending spans
|
|
76727
|
-
* @returns {Promise<void>}
|
|
76728
|
-
*/
|
|
76729
|
-
async forceFlush() {
|
|
76730
|
-
return new Promise((resolve4, reject2) => {
|
|
76731
|
-
if (this.stream) {
|
|
76732
|
-
const flushTimeout = setTimeout(() => {
|
|
76733
|
-
console.warn("[FileSpanExporter] Flush timeout after 5 seconds");
|
|
76734
|
-
resolve4();
|
|
76735
|
-
}, 5e3);
|
|
76736
|
-
if (this.stream.writableCorked) {
|
|
76737
|
-
this.stream.uncork();
|
|
76738
|
-
}
|
|
76739
|
-
if (this.stream.writableNeedDrain) {
|
|
76740
|
-
this.stream.once("drain", () => {
|
|
76741
|
-
clearTimeout(flushTimeout);
|
|
76742
|
-
resolve4();
|
|
76743
|
-
});
|
|
76744
|
-
} else {
|
|
76745
|
-
setImmediate(() => {
|
|
76746
|
-
clearTimeout(flushTimeout);
|
|
76747
|
-
resolve4();
|
|
76748
|
-
});
|
|
76749
|
-
}
|
|
76750
|
-
} else {
|
|
76751
|
-
resolve4();
|
|
76752
|
-
}
|
|
76753
|
-
});
|
|
76754
|
-
}
|
|
76755
|
-
};
|
|
76756
|
-
}
|
|
76757
|
-
});
|
|
76758
|
-
|
|
76759
|
-
// src/agent/telemetry.js
|
|
76760
|
-
function initializeTelemetryFromOptions(options) {
|
|
76761
|
-
const config = new TelemetryConfig({
|
|
76762
|
-
serviceName: "probe-agent",
|
|
76763
|
-
serviceVersion: "1.0.0",
|
|
76764
|
-
enableFile: options.traceFile !== void 0,
|
|
76765
|
-
enableRemote: options.traceRemote !== void 0,
|
|
76766
|
-
enableConsole: options.traceConsole,
|
|
76767
|
-
filePath: options.traceFile || "./traces.jsonl",
|
|
76768
|
-
remoteEndpoint: options.traceRemote || "http://localhost:4318/v1/traces"
|
|
76769
|
-
});
|
|
76770
|
-
config.initialize();
|
|
76771
|
-
return config;
|
|
76772
|
-
}
|
|
76773
|
-
var import_sdk_node, import_resources, import_semantic_conventions, import_api, import_exporter_trace_otlp_http, import_sdk_trace_base, import_fs10, import_path11, TelemetryConfig;
|
|
76774
|
-
var init_telemetry = __esm({
|
|
76775
|
-
"src/agent/telemetry.js"() {
|
|
76776
|
-
"use strict";
|
|
76777
|
-
import_sdk_node = require("@opentelemetry/sdk-node");
|
|
76778
|
-
import_resources = require("@opentelemetry/resources");
|
|
76779
|
-
import_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
76780
|
-
import_api = require("@opentelemetry/api");
|
|
76781
|
-
import_exporter_trace_otlp_http = require("@opentelemetry/exporter-trace-otlp-http");
|
|
76782
|
-
import_sdk_trace_base = require("@opentelemetry/sdk-trace-base");
|
|
76783
|
-
import_fs10 = require("fs");
|
|
76784
|
-
import_path11 = require("path");
|
|
76785
|
-
init_fileSpanExporter();
|
|
76786
|
-
TelemetryConfig = class {
|
|
76787
|
-
constructor(options = {}) {
|
|
76788
|
-
this.serviceName = options.serviceName || "probe-agent";
|
|
76789
|
-
this.serviceVersion = options.serviceVersion || "1.0.0";
|
|
76790
|
-
this.enableFile = options.enableFile || false;
|
|
76791
|
-
this.enableRemote = options.enableRemote || false;
|
|
76792
|
-
this.enableConsole = options.enableConsole || false;
|
|
76793
|
-
this.filePath = options.filePath || "./traces.jsonl";
|
|
76794
|
-
this.remoteEndpoint = options.remoteEndpoint || "http://localhost:4318/v1/traces";
|
|
76795
|
-
this.sdk = null;
|
|
76796
|
-
this.tracer = null;
|
|
76797
|
-
}
|
|
76798
|
-
/**
|
|
76799
|
-
* Initialize OpenTelemetry SDK
|
|
76800
|
-
*/
|
|
76801
|
-
initialize() {
|
|
76802
|
-
if (this.sdk) {
|
|
76803
|
-
console.warn("Telemetry already initialized");
|
|
76804
|
-
return;
|
|
76805
|
-
}
|
|
76806
|
-
const resource = (0, import_resources.resourceFromAttributes)({
|
|
76807
|
-
[import_semantic_conventions.ATTR_SERVICE_NAME]: this.serviceName,
|
|
76808
|
-
[import_semantic_conventions.ATTR_SERVICE_VERSION]: this.serviceVersion
|
|
76809
|
-
});
|
|
76810
|
-
const spanProcessors = [];
|
|
76811
|
-
if (this.enableFile) {
|
|
76812
|
-
try {
|
|
76813
|
-
const dir = (0, import_path11.dirname)(this.filePath);
|
|
76814
|
-
if (!(0, import_fs10.existsSync)(dir)) {
|
|
76815
|
-
(0, import_fs10.mkdirSync)(dir, { recursive: true });
|
|
76816
|
-
}
|
|
76817
|
-
const fileExporter = new FileSpanExporter(this.filePath);
|
|
76818
|
-
spanProcessors.push(new import_sdk_trace_base.BatchSpanProcessor(fileExporter, {
|
|
76819
|
-
maxQueueSize: 2048,
|
|
76820
|
-
maxExportBatchSize: 512,
|
|
76821
|
-
scheduledDelayMillis: 500,
|
|
76822
|
-
exportTimeoutMillis: 3e4
|
|
76823
|
-
}));
|
|
76824
|
-
console.log(`[Telemetry] File exporter enabled, writing to: ${this.filePath}`);
|
|
76825
|
-
} catch (error2) {
|
|
76826
|
-
console.error(`[Telemetry] Failed to initialize file exporter: ${error2.message}`);
|
|
76827
|
-
}
|
|
76828
|
-
}
|
|
76829
|
-
if (this.enableRemote) {
|
|
76830
|
-
try {
|
|
76831
|
-
const remoteExporter = new import_exporter_trace_otlp_http.OTLPTraceExporter({
|
|
76832
|
-
url: this.remoteEndpoint
|
|
76833
|
-
});
|
|
76834
|
-
spanProcessors.push(new import_sdk_trace_base.BatchSpanProcessor(remoteExporter, {
|
|
76835
|
-
maxQueueSize: 2048,
|
|
76836
|
-
maxExportBatchSize: 512,
|
|
76837
|
-
scheduledDelayMillis: 500,
|
|
76838
|
-
exportTimeoutMillis: 3e4
|
|
76839
|
-
}));
|
|
76840
|
-
console.log(`[Telemetry] Remote exporter enabled, endpoint: ${this.remoteEndpoint}`);
|
|
76841
|
-
} catch (error2) {
|
|
76842
|
-
console.error(`[Telemetry] Failed to initialize remote exporter: ${error2.message}`);
|
|
76843
|
-
}
|
|
76844
|
-
}
|
|
76845
|
-
if (this.enableConsole) {
|
|
76846
|
-
const consoleExporter = new import_sdk_trace_base.ConsoleSpanExporter();
|
|
76847
|
-
spanProcessors.push(new import_sdk_trace_base.BatchSpanProcessor(consoleExporter, {
|
|
76848
|
-
maxQueueSize: 2048,
|
|
76849
|
-
maxExportBatchSize: 512,
|
|
76850
|
-
scheduledDelayMillis: 500,
|
|
76851
|
-
exportTimeoutMillis: 3e4
|
|
76852
|
-
}));
|
|
76853
|
-
console.log(`[Telemetry] Console exporter enabled`);
|
|
76854
|
-
}
|
|
76855
|
-
if (spanProcessors.length === 0) {
|
|
76856
|
-
console.log("[Telemetry] No exporters configured, telemetry will not be collected");
|
|
76857
|
-
return;
|
|
76858
|
-
}
|
|
76859
|
-
this.sdk = new import_sdk_node.NodeSDK({
|
|
76860
|
-
resource,
|
|
76861
|
-
spanProcessors
|
|
76862
|
-
});
|
|
76863
|
-
try {
|
|
76864
|
-
this.sdk.start();
|
|
76865
|
-
this.tracer = import_api.trace.getTracer(this.serviceName, this.serviceVersion);
|
|
76866
|
-
console.log(`[Telemetry] OpenTelemetry SDK initialized successfully`);
|
|
76867
|
-
} catch (error2) {
|
|
76868
|
-
console.error(`[Telemetry] Failed to start OpenTelemetry SDK: ${error2.message}`);
|
|
76869
|
-
}
|
|
76870
|
-
}
|
|
76871
|
-
/**
|
|
76872
|
-
* Get the tracer instance
|
|
76873
|
-
*/
|
|
76874
|
-
getTracer() {
|
|
76875
|
-
return this.tracer;
|
|
76876
|
-
}
|
|
76877
|
-
/**
|
|
76878
|
-
* Create a span with the given name and attributes
|
|
76879
|
-
*/
|
|
76880
|
-
createSpan(name14, attributes = {}) {
|
|
76881
|
-
if (!this.tracer) {
|
|
76882
|
-
return null;
|
|
76883
|
-
}
|
|
76884
|
-
return this.tracer.startSpan(name14, {
|
|
76885
|
-
attributes
|
|
76886
|
-
});
|
|
76887
|
-
}
|
|
76888
|
-
/**
|
|
76889
|
-
* Wrap a function to automatically create spans
|
|
76890
|
-
*/
|
|
76891
|
-
wrapFunction(name14, fn, attributes = {}) {
|
|
76892
|
-
if (!this.tracer) {
|
|
76893
|
-
return fn;
|
|
76894
|
-
}
|
|
76895
|
-
return async (...args) => {
|
|
76896
|
-
const span = this.createSpan(name14, attributes);
|
|
76897
|
-
if (!span) {
|
|
76898
|
-
return fn(...args);
|
|
76899
|
-
}
|
|
76900
|
-
try {
|
|
76901
|
-
const result = await import_api.context.with(import_api.trace.setSpan(import_api.context.active(), span), () => fn(...args));
|
|
76902
|
-
span.setStatus({ code: import_api.SpanStatusCode.OK });
|
|
76903
|
-
return result;
|
|
76904
|
-
} catch (error2) {
|
|
76905
|
-
span.setStatus({
|
|
76906
|
-
code: import_api.SpanStatusCode.ERROR,
|
|
76907
|
-
message: error2.message
|
|
76908
|
-
});
|
|
76909
|
-
span.recordException(error2);
|
|
76910
|
-
throw error2;
|
|
76911
|
-
} finally {
|
|
76912
|
-
span.end();
|
|
76913
|
-
}
|
|
76914
|
-
};
|
|
76915
|
-
}
|
|
76916
|
-
/**
|
|
76917
|
-
* Force flush all pending spans
|
|
76918
|
-
*/
|
|
76919
|
-
async forceFlush() {
|
|
76920
|
-
if (this.sdk) {
|
|
76921
|
-
try {
|
|
76922
|
-
const tracerProvider = import_api.trace.getTracerProvider();
|
|
76923
|
-
if (tracerProvider && typeof tracerProvider.forceFlush === "function") {
|
|
76924
|
-
await tracerProvider.forceFlush();
|
|
76925
|
-
}
|
|
76926
|
-
await new Promise((resolve4) => setTimeout(resolve4, 100));
|
|
76927
|
-
console.log("[Telemetry] OpenTelemetry spans flushed successfully");
|
|
76928
|
-
} catch (error2) {
|
|
76929
|
-
console.error(`[Telemetry] Failed to flush OpenTelemetry spans: ${error2.message}`);
|
|
76930
|
-
}
|
|
76931
|
-
}
|
|
76932
|
-
}
|
|
76933
|
-
/**
|
|
76934
|
-
* Shutdown telemetry
|
|
76935
|
-
*/
|
|
76936
|
-
async shutdown() {
|
|
76937
|
-
if (this.sdk) {
|
|
76938
|
-
try {
|
|
76939
|
-
await this.sdk.shutdown();
|
|
76940
|
-
console.log("[Telemetry] OpenTelemetry SDK shutdown successfully");
|
|
76941
|
-
} catch (error2) {
|
|
76942
|
-
console.error(`[Telemetry] Failed to shutdown OpenTelemetry SDK: ${error2.message}`);
|
|
76943
|
-
}
|
|
76944
|
-
}
|
|
76945
|
-
}
|
|
76946
|
-
};
|
|
76947
|
-
}
|
|
76948
|
-
});
|
|
76949
|
-
|
|
76950
|
-
// src/agent/appTracer.js
|
|
76951
|
-
var import_api2, AppTracer;
|
|
76952
|
-
var init_appTracer = __esm({
|
|
76953
|
-
"src/agent/appTracer.js"() {
|
|
76954
|
-
"use strict";
|
|
76955
|
-
import_api2 = require("@opentelemetry/api");
|
|
76956
|
-
AppTracer = class {
|
|
76957
|
-
constructor(telemetryConfig, sessionId = null) {
|
|
76958
|
-
this.telemetryConfig = telemetryConfig;
|
|
76959
|
-
this.tracer = telemetryConfig?.getTracer();
|
|
76960
|
-
this.sessionId = sessionId || this.generateSessionId();
|
|
76961
|
-
this.traceId = this.generateTraceId();
|
|
76962
|
-
}
|
|
76963
|
-
/**
|
|
76964
|
-
* Generate a unique session ID
|
|
76965
|
-
*/
|
|
76966
|
-
generateSessionId() {
|
|
76967
|
-
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
76968
|
-
}
|
|
76969
|
-
/**
|
|
76970
|
-
* Generate trace ID from session ID for consistent tracing
|
|
76971
|
-
*/
|
|
76972
|
-
generateTraceId() {
|
|
76973
|
-
if (!this.sessionId) return null;
|
|
76974
|
-
const hash = this.hashString(this.sessionId);
|
|
76975
|
-
return hash.padEnd(32, "0").substring(0, 32);
|
|
76976
|
-
}
|
|
76977
|
-
/**
|
|
76978
|
-
* Simple hash function for session ID
|
|
76979
|
-
*/
|
|
76980
|
-
hashString(str) {
|
|
76981
|
-
let hash = 0;
|
|
76982
|
-
for (let i3 = 0; i3 < str.length; i3++) {
|
|
76983
|
-
const char = str.charCodeAt(i3);
|
|
76984
|
-
hash = (hash << 5) - hash + char;
|
|
76985
|
-
hash = hash & hash;
|
|
76986
|
-
}
|
|
76987
|
-
return Math.abs(hash).toString(16);
|
|
76988
|
-
}
|
|
76989
|
-
/**
|
|
76990
|
-
* Check if tracing is enabled
|
|
76991
|
-
*/
|
|
76992
|
-
isEnabled() {
|
|
76993
|
-
return this.tracer !== null;
|
|
76994
|
-
}
|
|
76995
|
-
/**
|
|
76996
|
-
* Create a root span for the agent session
|
|
76997
|
-
*/
|
|
76998
|
-
createSessionSpan(attributes = {}) {
|
|
76999
|
-
if (!this.isEnabled()) return null;
|
|
77000
|
-
return this.tracer.startSpan("agent.session", {
|
|
77001
|
-
attributes: {
|
|
77002
|
-
"session.id": this.sessionId,
|
|
77003
|
-
"trace.id": this.traceId,
|
|
77004
|
-
...attributes
|
|
77005
|
-
}
|
|
77006
|
-
});
|
|
77007
|
-
}
|
|
77008
|
-
/**
|
|
77009
|
-
* Create a span for AI model requests
|
|
77010
|
-
*/
|
|
77011
|
-
createAISpan(modelName, provider, attributes = {}) {
|
|
77012
|
-
if (!this.isEnabled()) return null;
|
|
77013
|
-
return this.tracer.startSpan("ai.request", {
|
|
77014
|
-
attributes: {
|
|
77015
|
-
"ai.model": modelName,
|
|
77016
|
-
"ai.provider": provider,
|
|
77017
|
-
"session.id": this.sessionId,
|
|
77018
|
-
...attributes
|
|
77019
|
-
}
|
|
77020
|
-
});
|
|
77021
|
-
}
|
|
77022
|
-
/**
|
|
77023
|
-
* Create a span for tool calls
|
|
77024
|
-
*/
|
|
77025
|
-
createToolSpan(toolName, attributes = {}) {
|
|
77026
|
-
if (!this.isEnabled()) return null;
|
|
77027
|
-
return this.tracer.startSpan("tool.call", {
|
|
77028
|
-
attributes: {
|
|
77029
|
-
"tool.name": toolName,
|
|
77030
|
-
"session.id": this.sessionId,
|
|
77031
|
-
...attributes
|
|
77032
|
-
}
|
|
77033
|
-
});
|
|
77034
|
-
}
|
|
77035
|
-
/**
|
|
77036
|
-
* Create a span for code search operations
|
|
77037
|
-
*/
|
|
77038
|
-
createSearchSpan(query2, attributes = {}) {
|
|
77039
|
-
if (!this.isEnabled()) return null;
|
|
77040
|
-
return this.tracer.startSpan("search.query", {
|
|
77041
|
-
attributes: {
|
|
77042
|
-
"search.query": query2,
|
|
77043
|
-
"session.id": this.sessionId,
|
|
77044
|
-
...attributes
|
|
77045
|
-
}
|
|
77046
|
-
});
|
|
77047
|
-
}
|
|
77048
|
-
/**
|
|
77049
|
-
* Create a span for code extraction operations
|
|
77050
|
-
*/
|
|
77051
|
-
createExtractSpan(files, attributes = {}) {
|
|
77052
|
-
if (!this.isEnabled()) return null;
|
|
77053
|
-
return this.tracer.startSpan("extract.files", {
|
|
77054
|
-
attributes: {
|
|
77055
|
-
"extract.file_count": Array.isArray(files) ? files.length : 1,
|
|
77056
|
-
"extract.files": Array.isArray(files) ? files.join(",") : files,
|
|
77057
|
-
"session.id": this.sessionId,
|
|
77058
|
-
...attributes
|
|
77059
|
-
}
|
|
77060
|
-
});
|
|
77061
|
-
}
|
|
77062
|
-
/**
|
|
77063
|
-
* Create a span for agent iterations
|
|
77064
|
-
*/
|
|
77065
|
-
createIterationSpan(iteration, attributes = {}) {
|
|
77066
|
-
if (!this.isEnabled()) return null;
|
|
77067
|
-
return this.tracer.startSpan("agent.iteration", {
|
|
77068
|
-
attributes: {
|
|
77069
|
-
"iteration.number": iteration,
|
|
77070
|
-
"session.id": this.sessionId,
|
|
77071
|
-
...attributes
|
|
77072
|
-
}
|
|
77073
|
-
});
|
|
77074
|
-
}
|
|
77075
|
-
/**
|
|
77076
|
-
* Create a span for delegation operations
|
|
77077
|
-
*/
|
|
77078
|
-
createDelegationSpan(task, attributes = {}) {
|
|
77079
|
-
if (!this.isEnabled()) return null;
|
|
77080
|
-
return this.tracer.startSpan("agent.delegation", {
|
|
77081
|
-
attributes: {
|
|
77082
|
-
"delegation.task": task.substring(0, 200) + (task.length > 200 ? "..." : ""),
|
|
77083
|
-
"delegation.task_length": task.length,
|
|
77084
|
-
"session.id": this.sessionId,
|
|
77085
|
-
...attributes
|
|
77086
|
-
}
|
|
77087
|
-
});
|
|
77088
|
-
}
|
|
77089
|
-
/**
|
|
77090
|
-
* Create a span for JSON validation operations
|
|
77091
|
-
*/
|
|
77092
|
-
createJsonValidationSpan(responseLength, attributes = {}) {
|
|
77093
|
-
if (!this.isEnabled()) return null;
|
|
77094
|
-
return this.tracer.startSpan("validation.json", {
|
|
77095
|
-
attributes: {
|
|
77096
|
-
"validation.response_length": responseLength,
|
|
77097
|
-
"session.id": this.sessionId,
|
|
77098
|
-
...attributes
|
|
77099
|
-
}
|
|
77100
|
-
});
|
|
77101
|
-
}
|
|
77102
|
-
/**
|
|
77103
|
-
* Create a span for Mermaid validation operations
|
|
77104
|
-
*/
|
|
77105
|
-
createMermaidValidationSpan(diagramCount, attributes = {}) {
|
|
77106
|
-
if (!this.isEnabled()) return null;
|
|
77107
|
-
return this.tracer.startSpan("validation.mermaid", {
|
|
77108
|
-
attributes: {
|
|
77109
|
-
"validation.diagram_count": diagramCount,
|
|
77110
|
-
"session.id": this.sessionId,
|
|
77111
|
-
...attributes
|
|
77112
|
-
}
|
|
77113
|
-
});
|
|
77114
|
-
}
|
|
77115
|
-
/**
|
|
77116
|
-
* Create a span for schema processing operations
|
|
77117
|
-
*/
|
|
77118
|
-
createSchemaProcessingSpan(schemaType, attributes = {}) {
|
|
77119
|
-
if (!this.isEnabled()) return null;
|
|
77120
|
-
return this.tracer.startSpan("schema.processing", {
|
|
77121
|
-
attributes: {
|
|
77122
|
-
"schema.type": schemaType,
|
|
77123
|
-
"session.id": this.sessionId,
|
|
77124
|
-
...attributes
|
|
77125
|
-
}
|
|
77126
|
-
});
|
|
77127
|
-
}
|
|
77128
|
-
/**
|
|
77129
|
-
* Record delegation events
|
|
77130
|
-
*/
|
|
77131
|
-
recordDelegationEvent(eventType, data2 = {}) {
|
|
77132
|
-
if (!this.isEnabled()) return;
|
|
77133
|
-
this.addEvent(`delegation.${eventType}`, {
|
|
77134
|
-
"session.id": this.sessionId,
|
|
77135
|
-
...data2
|
|
77136
|
-
});
|
|
77137
|
-
}
|
|
77138
|
-
/**
|
|
77139
|
-
* Record JSON validation events
|
|
77140
|
-
*/
|
|
77141
|
-
recordJsonValidationEvent(eventType, data2 = {}) {
|
|
77142
|
-
if (!this.isEnabled()) return;
|
|
77143
|
-
this.addEvent(`json_validation.${eventType}`, {
|
|
77144
|
-
"session.id": this.sessionId,
|
|
77145
|
-
...data2
|
|
77146
|
-
});
|
|
77147
|
-
}
|
|
77148
|
-
/**
|
|
77149
|
-
* Record Mermaid validation events
|
|
77150
|
-
*/
|
|
77151
|
-
recordMermaidValidationEvent(eventType, data2 = {}) {
|
|
77152
|
-
if (!this.isEnabled()) return;
|
|
77153
|
-
this.addEvent(`mermaid_validation.${eventType}`, {
|
|
77154
|
-
"session.id": this.sessionId,
|
|
77155
|
-
...data2
|
|
77156
|
-
});
|
|
77157
|
-
}
|
|
77158
|
-
/**
|
|
77159
|
-
* Add an event to the current or most recent span
|
|
77160
|
-
*/
|
|
77161
|
-
addEvent(name14, attributes = {}) {
|
|
77162
|
-
if (!this.isEnabled()) return;
|
|
77163
|
-
const activeSpan = import_api2.trace.getActiveSpan();
|
|
77164
|
-
if (activeSpan) {
|
|
77165
|
-
activeSpan.addEvent(name14, {
|
|
77166
|
-
"session.id": this.sessionId,
|
|
77167
|
-
...attributes
|
|
77168
|
-
});
|
|
77169
|
-
} else {
|
|
77170
|
-
if (this.telemetryConfig?.enableConsole) {
|
|
77171
|
-
console.log(`[Event] ${name14}:`, attributes);
|
|
77172
|
-
}
|
|
77173
|
-
}
|
|
77174
|
-
}
|
|
77175
|
-
/**
|
|
77176
|
-
* Set attributes on the current span
|
|
77177
|
-
*/
|
|
77178
|
-
setAttributes(attributes) {
|
|
77179
|
-
if (!this.isEnabled()) return;
|
|
77180
|
-
const activeSpan = import_api2.trace.getActiveSpan();
|
|
77181
|
-
if (activeSpan) {
|
|
77182
|
-
activeSpan.setAttributes({
|
|
77183
|
-
"session.id": this.sessionId,
|
|
77184
|
-
...attributes
|
|
77185
|
-
});
|
|
77186
|
-
}
|
|
77187
|
-
}
|
|
77188
|
-
/**
|
|
77189
|
-
* Wrap a function with automatic span creation
|
|
77190
|
-
*/
|
|
77191
|
-
wrapFunction(spanName, fn, attributes = {}) {
|
|
77192
|
-
if (!this.isEnabled()) {
|
|
77193
|
-
return fn;
|
|
77194
|
-
}
|
|
77195
|
-
return async (...args) => {
|
|
77196
|
-
const span = this.tracer.startSpan(spanName, {
|
|
77197
|
-
attributes: {
|
|
77198
|
-
"session.id": this.sessionId,
|
|
77199
|
-
...attributes
|
|
77200
|
-
}
|
|
77201
|
-
});
|
|
77202
|
-
try {
|
|
77203
|
-
const result = await import_api2.context.with(import_api2.trace.setSpan(import_api2.context.active(), span), () => fn(...args));
|
|
77204
|
-
span.setStatus({ code: import_api2.SpanStatusCode.OK });
|
|
77205
|
-
return result;
|
|
77206
|
-
} catch (error2) {
|
|
77207
|
-
span.setStatus({
|
|
77208
|
-
code: import_api2.SpanStatusCode.ERROR,
|
|
77209
|
-
message: error2.message
|
|
77210
|
-
});
|
|
77211
|
-
span.recordException(error2);
|
|
77212
|
-
throw error2;
|
|
77213
|
-
} finally {
|
|
77214
|
-
span.end();
|
|
77215
|
-
}
|
|
77216
|
-
};
|
|
77217
|
-
}
|
|
77218
|
-
/**
|
|
77219
|
-
* Execute a function within a span context
|
|
77220
|
-
*/
|
|
77221
|
-
async withSpan(spanName, fn, attributes = {}) {
|
|
77222
|
-
if (!this.isEnabled()) {
|
|
77223
|
-
return fn();
|
|
77224
|
-
}
|
|
77225
|
-
const span = this.tracer.startSpan(spanName, {
|
|
77226
|
-
attributes: {
|
|
77227
|
-
"session.id": this.sessionId,
|
|
77228
|
-
...attributes
|
|
77229
|
-
}
|
|
77230
|
-
});
|
|
77231
|
-
try {
|
|
77232
|
-
const result = await import_api2.context.with(import_api2.trace.setSpan(import_api2.context.active(), span), () => fn());
|
|
77233
|
-
span.setStatus({ code: import_api2.SpanStatusCode.OK });
|
|
77234
|
-
return result;
|
|
77235
|
-
} catch (error2) {
|
|
77236
|
-
span.setStatus({
|
|
77237
|
-
code: import_api2.SpanStatusCode.ERROR,
|
|
77238
|
-
message: error2.message
|
|
77239
|
-
});
|
|
77240
|
-
span.recordException(error2);
|
|
77241
|
-
throw error2;
|
|
77242
|
-
} finally {
|
|
77243
|
-
span.end();
|
|
77244
|
-
}
|
|
77245
|
-
}
|
|
77246
|
-
/**
|
|
77247
|
-
* Force flush all pending spans
|
|
77248
|
-
*/
|
|
77249
|
-
async flush() {
|
|
77250
|
-
if (this.telemetryConfig) {
|
|
77251
|
-
await this.telemetryConfig.forceFlush();
|
|
77252
|
-
}
|
|
77253
|
-
}
|
|
77254
|
-
/**
|
|
77255
|
-
* Shutdown tracing
|
|
77256
|
-
*/
|
|
77257
|
-
async shutdown() {
|
|
77258
|
-
if (this.telemetryConfig) {
|
|
77259
|
-
await this.telemetryConfig.shutdown();
|
|
77260
|
-
}
|
|
77261
|
-
}
|
|
77262
|
-
};
|
|
77263
|
-
}
|
|
77264
|
-
});
|
|
77265
|
-
|
|
77266
76610
|
// src/agent/storage/index.js
|
|
77267
76611
|
var init_storage = __esm({
|
|
77268
76612
|
"src/agent/storage/index.js"() {
|
|
@@ -77283,7 +76627,6 @@ var init_hooks = __esm({
|
|
|
77283
76627
|
// src/index.js
|
|
77284
76628
|
var index_exports = {};
|
|
77285
76629
|
__export(index_exports, {
|
|
77286
|
-
AppTracer: () => AppTracer,
|
|
77287
76630
|
DEFAULT_SYSTEM_MESSAGE: () => DEFAULT_SYSTEM_MESSAGE,
|
|
77288
76631
|
HOOK_TYPES: () => HOOK_TYPES,
|
|
77289
76632
|
HookManager: () => HookManager,
|
|
@@ -77292,7 +76635,6 @@ __export(index_exports, {
|
|
|
77292
76635
|
SimpleAppTracer: () => SimpleAppTracer,
|
|
77293
76636
|
SimpleTelemetry: () => SimpleTelemetry,
|
|
77294
76637
|
StorageAdapter: () => StorageAdapter,
|
|
77295
|
-
TelemetryConfig: () => TelemetryConfig,
|
|
77296
76638
|
attemptCompletionSchema: () => attemptCompletionSchema,
|
|
77297
76639
|
attemptCompletionToolDefinition: () => attemptCompletionToolDefinition,
|
|
77298
76640
|
bashSchema: () => bashSchema,
|
|
@@ -77309,7 +76651,6 @@ __export(index_exports, {
|
|
|
77309
76651
|
getBinaryPath: () => getBinaryPath,
|
|
77310
76652
|
grep: () => grep,
|
|
77311
76653
|
initializeSimpleTelemetryFromOptions: () => initializeSimpleTelemetryFromOptions,
|
|
77312
|
-
initializeTelemetryFromOptions: () => initializeTelemetryFromOptions,
|
|
77313
76654
|
listFilesByLevel: () => listFilesByLevel,
|
|
77314
76655
|
listFilesToolInstance: () => listFilesToolInstance,
|
|
77315
76656
|
parseXmlToolCall: () => parseXmlToolCall,
|
|
@@ -77344,8 +76685,6 @@ var init_index = __esm({
|
|
|
77344
76685
|
init_bash();
|
|
77345
76686
|
init_ProbeAgent();
|
|
77346
76687
|
init_simpleTelemetry();
|
|
77347
|
-
init_telemetry();
|
|
77348
|
-
init_appTracer();
|
|
77349
76688
|
init_probeTool();
|
|
77350
76689
|
init_storage();
|
|
77351
76690
|
init_hooks();
|
|
@@ -77355,7 +76694,6 @@ var init_index = __esm({
|
|
|
77355
76694
|
init_index();
|
|
77356
76695
|
// Annotate the CommonJS export names for ESM import in node:
|
|
77357
76696
|
0 && (module.exports = {
|
|
77358
|
-
AppTracer,
|
|
77359
76697
|
DEFAULT_SYSTEM_MESSAGE,
|
|
77360
76698
|
HOOK_TYPES,
|
|
77361
76699
|
HookManager,
|
|
@@ -77364,7 +76702,6 @@ init_index();
|
|
|
77364
76702
|
SimpleAppTracer,
|
|
77365
76703
|
SimpleTelemetry,
|
|
77366
76704
|
StorageAdapter,
|
|
77367
|
-
TelemetryConfig,
|
|
77368
76705
|
attemptCompletionSchema,
|
|
77369
76706
|
attemptCompletionToolDefinition,
|
|
77370
76707
|
bashSchema,
|
|
@@ -77381,7 +76718,6 @@ init_index();
|
|
|
77381
76718
|
getBinaryPath,
|
|
77382
76719
|
grep,
|
|
77383
76720
|
initializeSimpleTelemetryFromOptions,
|
|
77384
|
-
initializeTelemetryFromOptions,
|
|
77385
76721
|
listFilesByLevel,
|
|
77386
76722
|
listFilesToolInstance,
|
|
77387
76723
|
parseXmlToolCall,
|