@aws-sdk/client-bedrock-agent-runtime 3.687.0 → 3.688.0
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/dist-cjs/index.js +195 -0
- package/dist-es/models/models_0.js +75 -0
- package/dist-es/protocols/Aws_restJson1.js +100 -0
- package/dist-types/commands/InvokeAgentCommand.d.ts +6 -6
- package/dist-types/commands/InvokeFlowCommand.d.ts +38 -0
- package/dist-types/models/models_0.d.ts +314 -56
- package/dist-types/ts3.4/models/models_0.d.ts +159 -1
- package/package.json +1 -1
package/dist-cjs/index.js
CHANGED
|
@@ -60,6 +60,18 @@ __export(src_exports, {
|
|
|
60
60
|
FlowOutputEventFilterSensitiveLog: () => FlowOutputEventFilterSensitiveLog,
|
|
61
61
|
FlowResponseStream: () => FlowResponseStream,
|
|
62
62
|
FlowResponseStreamFilterSensitiveLog: () => FlowResponseStreamFilterSensitiveLog,
|
|
63
|
+
FlowTrace: () => FlowTrace,
|
|
64
|
+
FlowTraceConditionFilterSensitiveLog: () => FlowTraceConditionFilterSensitiveLog,
|
|
65
|
+
FlowTraceConditionNodeResultEventFilterSensitiveLog: () => FlowTraceConditionNodeResultEventFilterSensitiveLog,
|
|
66
|
+
FlowTraceEventFilterSensitiveLog: () => FlowTraceEventFilterSensitiveLog,
|
|
67
|
+
FlowTraceFilterSensitiveLog: () => FlowTraceFilterSensitiveLog,
|
|
68
|
+
FlowTraceNodeInputContent: () => FlowTraceNodeInputContent,
|
|
69
|
+
FlowTraceNodeInputContentFilterSensitiveLog: () => FlowTraceNodeInputContentFilterSensitiveLog,
|
|
70
|
+
FlowTraceNodeInputEventFilterSensitiveLog: () => FlowTraceNodeInputEventFilterSensitiveLog,
|
|
71
|
+
FlowTraceNodeInputFieldFilterSensitiveLog: () => FlowTraceNodeInputFieldFilterSensitiveLog,
|
|
72
|
+
FlowTraceNodeOutputContent: () => FlowTraceNodeOutputContent,
|
|
73
|
+
FlowTraceNodeOutputEventFilterSensitiveLog: () => FlowTraceNodeOutputEventFilterSensitiveLog,
|
|
74
|
+
FlowTraceNodeOutputFieldFilterSensitiveLog: () => FlowTraceNodeOutputFieldFilterSensitiveLog,
|
|
63
75
|
GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
|
|
64
76
|
GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
|
|
65
77
|
GetAgentMemoryCommand: () => GetAgentMemoryCommand,
|
|
@@ -465,6 +477,34 @@ var NodeType = {
|
|
|
465
477
|
LEX_NODE: "LexNode",
|
|
466
478
|
PROMPT_NODE: "PromptNode"
|
|
467
479
|
};
|
|
480
|
+
var FlowTraceNodeInputContent;
|
|
481
|
+
((FlowTraceNodeInputContent3) => {
|
|
482
|
+
FlowTraceNodeInputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
483
|
+
if (value.document !== void 0)
|
|
484
|
+
return visitor.document(value.document);
|
|
485
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
486
|
+
}, "visit");
|
|
487
|
+
})(FlowTraceNodeInputContent || (FlowTraceNodeInputContent = {}));
|
|
488
|
+
var FlowTraceNodeOutputContent;
|
|
489
|
+
((FlowTraceNodeOutputContent3) => {
|
|
490
|
+
FlowTraceNodeOutputContent3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
491
|
+
if (value.document !== void 0)
|
|
492
|
+
return visitor.document(value.document);
|
|
493
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
494
|
+
}, "visit");
|
|
495
|
+
})(FlowTraceNodeOutputContent || (FlowTraceNodeOutputContent = {}));
|
|
496
|
+
var FlowTrace;
|
|
497
|
+
((FlowTrace3) => {
|
|
498
|
+
FlowTrace3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
499
|
+
if (value.nodeInputTrace !== void 0)
|
|
500
|
+
return visitor.nodeInputTrace(value.nodeInputTrace);
|
|
501
|
+
if (value.nodeOutputTrace !== void 0)
|
|
502
|
+
return visitor.nodeOutputTrace(value.nodeOutputTrace);
|
|
503
|
+
if (value.conditionNodeResultTrace !== void 0)
|
|
504
|
+
return visitor.conditionNodeResultTrace(value.conditionNodeResultTrace);
|
|
505
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
506
|
+
}, "visit");
|
|
507
|
+
})(FlowTrace || (FlowTrace = {}));
|
|
468
508
|
var _ResourceNotFoundException = class _ResourceNotFoundException extends BedrockAgentRuntimeServiceException {
|
|
469
509
|
/**
|
|
470
510
|
* @internal
|
|
@@ -540,6 +580,8 @@ var FlowResponseStream;
|
|
|
540
580
|
return visitor.flowOutputEvent(value.flowOutputEvent);
|
|
541
581
|
if (value.flowCompletionEvent !== void 0)
|
|
542
582
|
return visitor.flowCompletionEvent(value.flowCompletionEvent);
|
|
583
|
+
if (value.flowTraceEvent !== void 0)
|
|
584
|
+
return visitor.flowTraceEvent(value.flowTraceEvent);
|
|
543
585
|
if (value.internalServerException !== void 0)
|
|
544
586
|
return visitor.internalServerException(value.internalServerException);
|
|
545
587
|
if (value.validationException !== void 0)
|
|
@@ -880,11 +922,56 @@ var FlowOutputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
|
880
922
|
...obj,
|
|
881
923
|
...obj.content && { content: obj.content }
|
|
882
924
|
}), "FlowOutputEventFilterSensitiveLog");
|
|
925
|
+
var FlowTraceConditionFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
926
|
+
...obj
|
|
927
|
+
}), "FlowTraceConditionFilterSensitiveLog");
|
|
928
|
+
var FlowTraceConditionNodeResultEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
929
|
+
...obj,
|
|
930
|
+
...obj.satisfiedConditions && { satisfiedConditions: import_smithy_client.SENSITIVE_STRING }
|
|
931
|
+
}), "FlowTraceConditionNodeResultEventFilterSensitiveLog");
|
|
932
|
+
var FlowTraceNodeInputContentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
933
|
+
if (obj.document !== void 0)
|
|
934
|
+
return { document: obj.document };
|
|
935
|
+
if (obj.$unknown !== void 0)
|
|
936
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
937
|
+
}, "FlowTraceNodeInputContentFilterSensitiveLog");
|
|
938
|
+
var FlowTraceNodeInputFieldFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
939
|
+
...obj,
|
|
940
|
+
...obj.content && { content: import_smithy_client.SENSITIVE_STRING }
|
|
941
|
+
}), "FlowTraceNodeInputFieldFilterSensitiveLog");
|
|
942
|
+
var FlowTraceNodeInputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
943
|
+
...obj,
|
|
944
|
+
...obj.fields && { fields: import_smithy_client.SENSITIVE_STRING }
|
|
945
|
+
}), "FlowTraceNodeInputEventFilterSensitiveLog");
|
|
946
|
+
var FlowTraceNodeOutputFieldFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
947
|
+
...obj,
|
|
948
|
+
...obj.content && { content: obj.content }
|
|
949
|
+
}), "FlowTraceNodeOutputFieldFilterSensitiveLog");
|
|
950
|
+
var FlowTraceNodeOutputEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
951
|
+
...obj,
|
|
952
|
+
...obj.fields && { fields: import_smithy_client.SENSITIVE_STRING }
|
|
953
|
+
}), "FlowTraceNodeOutputEventFilterSensitiveLog");
|
|
954
|
+
var FlowTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
955
|
+
if (obj.nodeInputTrace !== void 0)
|
|
956
|
+
return { nodeInputTrace: import_smithy_client.SENSITIVE_STRING };
|
|
957
|
+
if (obj.nodeOutputTrace !== void 0)
|
|
958
|
+
return { nodeOutputTrace: import_smithy_client.SENSITIVE_STRING };
|
|
959
|
+
if (obj.conditionNodeResultTrace !== void 0)
|
|
960
|
+
return { conditionNodeResultTrace: import_smithy_client.SENSITIVE_STRING };
|
|
961
|
+
if (obj.$unknown !== void 0)
|
|
962
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
963
|
+
}, "FlowTraceFilterSensitiveLog");
|
|
964
|
+
var FlowTraceEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
965
|
+
...obj,
|
|
966
|
+
...obj.trace && { trace: import_smithy_client.SENSITIVE_STRING }
|
|
967
|
+
}), "FlowTraceEventFilterSensitiveLog");
|
|
883
968
|
var FlowResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
884
969
|
if (obj.flowOutputEvent !== void 0)
|
|
885
970
|
return { flowOutputEvent: import_smithy_client.SENSITIVE_STRING };
|
|
886
971
|
if (obj.flowCompletionEvent !== void 0)
|
|
887
972
|
return { flowCompletionEvent: import_smithy_client.SENSITIVE_STRING };
|
|
973
|
+
if (obj.flowTraceEvent !== void 0)
|
|
974
|
+
return { flowTraceEvent: FlowTraceEventFilterSensitiveLog(obj.flowTraceEvent) };
|
|
888
975
|
if (obj.internalServerException !== void 0)
|
|
889
976
|
return { internalServerException: obj.internalServerException };
|
|
890
977
|
if (obj.validationException !== void 0)
|
|
@@ -1439,6 +1526,7 @@ var se_InvokeFlowCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
|
1439
1526
|
let body;
|
|
1440
1527
|
body = JSON.stringify(
|
|
1441
1528
|
(0, import_smithy_client.take)(input, {
|
|
1529
|
+
enableTrace: [],
|
|
1442
1530
|
inputs: (_) => se_FlowInputs(_, context)
|
|
1443
1531
|
})
|
|
1444
1532
|
);
|
|
@@ -1738,6 +1826,11 @@ var de_FlowResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
|
1738
1826
|
flowCompletionEvent: await de_FlowCompletionEvent_event(event["flowCompletionEvent"], context)
|
|
1739
1827
|
};
|
|
1740
1828
|
}
|
|
1829
|
+
if (event["flowTraceEvent"] != null) {
|
|
1830
|
+
return {
|
|
1831
|
+
flowTraceEvent: await de_FlowTraceEvent_event(event["flowTraceEvent"], context)
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1741
1834
|
if (event["internalServerException"] != null) {
|
|
1742
1835
|
return {
|
|
1743
1836
|
internalServerException: await de_InternalServerException_event(event["internalServerException"], context)
|
|
@@ -1920,6 +2013,12 @@ var de_FlowOutputEvent_event = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
1920
2013
|
Object.assign(contents, de_FlowOutputEvent(data, context));
|
|
1921
2014
|
return contents;
|
|
1922
2015
|
}, "de_FlowOutputEvent_event");
|
|
2016
|
+
var de_FlowTraceEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
2017
|
+
const contents = {};
|
|
2018
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
2019
|
+
Object.assign(contents, de_FlowTraceEvent(data, context));
|
|
2020
|
+
return contents;
|
|
2021
|
+
}, "de_FlowTraceEvent_event");
|
|
1923
2022
|
var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
1924
2023
|
const parsedOutput = {
|
|
1925
2024
|
...output,
|
|
@@ -2212,6 +2311,90 @@ var de_FlowOutputEvent = /* @__PURE__ */ __name((output, context) => {
|
|
|
2212
2311
|
nodeType: import_smithy_client.expectString
|
|
2213
2312
|
});
|
|
2214
2313
|
}, "de_FlowOutputEvent");
|
|
2314
|
+
var de_FlowTrace = /* @__PURE__ */ __name((output, context) => {
|
|
2315
|
+
if (output.conditionNodeResultTrace != null) {
|
|
2316
|
+
return {
|
|
2317
|
+
conditionNodeResultTrace: de_FlowTraceConditionNodeResultEvent(output.conditionNodeResultTrace, context)
|
|
2318
|
+
};
|
|
2319
|
+
}
|
|
2320
|
+
if (output.nodeInputTrace != null) {
|
|
2321
|
+
return {
|
|
2322
|
+
nodeInputTrace: de_FlowTraceNodeInputEvent(output.nodeInputTrace, context)
|
|
2323
|
+
};
|
|
2324
|
+
}
|
|
2325
|
+
if (output.nodeOutputTrace != null) {
|
|
2326
|
+
return {
|
|
2327
|
+
nodeOutputTrace: de_FlowTraceNodeOutputEvent(output.nodeOutputTrace, context)
|
|
2328
|
+
};
|
|
2329
|
+
}
|
|
2330
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2331
|
+
}, "de_FlowTrace");
|
|
2332
|
+
var de_FlowTraceConditionNodeResultEvent = /* @__PURE__ */ __name((output, context) => {
|
|
2333
|
+
return (0, import_smithy_client.take)(output, {
|
|
2334
|
+
nodeName: import_smithy_client.expectString,
|
|
2335
|
+
satisfiedConditions: import_smithy_client._json,
|
|
2336
|
+
timestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
|
|
2337
|
+
});
|
|
2338
|
+
}, "de_FlowTraceConditionNodeResultEvent");
|
|
2339
|
+
var de_FlowTraceEvent = /* @__PURE__ */ __name((output, context) => {
|
|
2340
|
+
return (0, import_smithy_client.take)(output, {
|
|
2341
|
+
trace: (_) => de_FlowTrace((0, import_core2.awsExpectUnion)(_), context)
|
|
2342
|
+
});
|
|
2343
|
+
}, "de_FlowTraceEvent");
|
|
2344
|
+
var de_FlowTraceNodeInputContent = /* @__PURE__ */ __name((output, context) => {
|
|
2345
|
+
if (output.document != null) {
|
|
2346
|
+
return {
|
|
2347
|
+
document: de_Document(output.document, context)
|
|
2348
|
+
};
|
|
2349
|
+
}
|
|
2350
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2351
|
+
}, "de_FlowTraceNodeInputContent");
|
|
2352
|
+
var de_FlowTraceNodeInputEvent = /* @__PURE__ */ __name((output, context) => {
|
|
2353
|
+
return (0, import_smithy_client.take)(output, {
|
|
2354
|
+
fields: (_) => de_FlowTraceNodeInputFields(_, context),
|
|
2355
|
+
nodeName: import_smithy_client.expectString,
|
|
2356
|
+
timestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
|
|
2357
|
+
});
|
|
2358
|
+
}, "de_FlowTraceNodeInputEvent");
|
|
2359
|
+
var de_FlowTraceNodeInputField = /* @__PURE__ */ __name((output, context) => {
|
|
2360
|
+
return (0, import_smithy_client.take)(output, {
|
|
2361
|
+
content: (_) => de_FlowTraceNodeInputContent((0, import_core2.awsExpectUnion)(_), context),
|
|
2362
|
+
nodeInputName: import_smithy_client.expectString
|
|
2363
|
+
});
|
|
2364
|
+
}, "de_FlowTraceNodeInputField");
|
|
2365
|
+
var de_FlowTraceNodeInputFields = /* @__PURE__ */ __name((output, context) => {
|
|
2366
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2367
|
+
return de_FlowTraceNodeInputField(entry, context);
|
|
2368
|
+
});
|
|
2369
|
+
return retVal;
|
|
2370
|
+
}, "de_FlowTraceNodeInputFields");
|
|
2371
|
+
var de_FlowTraceNodeOutputContent = /* @__PURE__ */ __name((output, context) => {
|
|
2372
|
+
if (output.document != null) {
|
|
2373
|
+
return {
|
|
2374
|
+
document: de_Document(output.document, context)
|
|
2375
|
+
};
|
|
2376
|
+
}
|
|
2377
|
+
return { $unknown: Object.entries(output)[0] };
|
|
2378
|
+
}, "de_FlowTraceNodeOutputContent");
|
|
2379
|
+
var de_FlowTraceNodeOutputEvent = /* @__PURE__ */ __name((output, context) => {
|
|
2380
|
+
return (0, import_smithy_client.take)(output, {
|
|
2381
|
+
fields: (_) => de_FlowTraceNodeOutputFields(_, context),
|
|
2382
|
+
nodeName: import_smithy_client.expectString,
|
|
2383
|
+
timestamp: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
|
|
2384
|
+
});
|
|
2385
|
+
}, "de_FlowTraceNodeOutputEvent");
|
|
2386
|
+
var de_FlowTraceNodeOutputField = /* @__PURE__ */ __name((output, context) => {
|
|
2387
|
+
return (0, import_smithy_client.take)(output, {
|
|
2388
|
+
content: (_) => de_FlowTraceNodeOutputContent((0, import_core2.awsExpectUnion)(_), context),
|
|
2389
|
+
nodeOutputName: import_smithy_client.expectString
|
|
2390
|
+
});
|
|
2391
|
+
}, "de_FlowTraceNodeOutputField");
|
|
2392
|
+
var de_FlowTraceNodeOutputFields = /* @__PURE__ */ __name((output, context) => {
|
|
2393
|
+
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
2394
|
+
return de_FlowTraceNodeOutputField(entry, context);
|
|
2395
|
+
});
|
|
2396
|
+
return retVal;
|
|
2397
|
+
}, "de_FlowTraceNodeOutputFields");
|
|
2215
2398
|
var de_InferenceConfiguration = /* @__PURE__ */ __name((output, context) => {
|
|
2216
2399
|
return (0, import_smithy_client.take)(output, {
|
|
2217
2400
|
maximumLength: import_smithy_client.expectInt32,
|
|
@@ -2583,6 +2766,9 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
2583
2766
|
FlowCompletionReason,
|
|
2584
2767
|
FlowOutputContent,
|
|
2585
2768
|
NodeType,
|
|
2769
|
+
FlowTraceNodeInputContent,
|
|
2770
|
+
FlowTraceNodeOutputContent,
|
|
2771
|
+
FlowTrace,
|
|
2586
2772
|
ResourceNotFoundException,
|
|
2587
2773
|
ServiceQuotaExceededException,
|
|
2588
2774
|
ThrottlingException,
|
|
@@ -2630,6 +2816,15 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
|
|
|
2630
2816
|
InvokeFlowRequestFilterSensitiveLog,
|
|
2631
2817
|
FlowCompletionEventFilterSensitiveLog,
|
|
2632
2818
|
FlowOutputEventFilterSensitiveLog,
|
|
2819
|
+
FlowTraceConditionFilterSensitiveLog,
|
|
2820
|
+
FlowTraceConditionNodeResultEventFilterSensitiveLog,
|
|
2821
|
+
FlowTraceNodeInputContentFilterSensitiveLog,
|
|
2822
|
+
FlowTraceNodeInputFieldFilterSensitiveLog,
|
|
2823
|
+
FlowTraceNodeInputEventFilterSensitiveLog,
|
|
2824
|
+
FlowTraceNodeOutputFieldFilterSensitiveLog,
|
|
2825
|
+
FlowTraceNodeOutputEventFilterSensitiveLog,
|
|
2826
|
+
FlowTraceFilterSensitiveLog,
|
|
2827
|
+
FlowTraceEventFilterSensitiveLog,
|
|
2633
2828
|
FlowResponseStreamFilterSensitiveLog,
|
|
2634
2829
|
InvokeFlowResponseFilterSensitiveLog,
|
|
2635
2830
|
ByteContentFileFilterSensitiveLog,
|
|
@@ -99,6 +99,34 @@ export const NodeType = {
|
|
|
99
99
|
LEX_NODE: "LexNode",
|
|
100
100
|
PROMPT_NODE: "PromptNode",
|
|
101
101
|
};
|
|
102
|
+
export var FlowTraceNodeInputContent;
|
|
103
|
+
(function (FlowTraceNodeInputContent) {
|
|
104
|
+
FlowTraceNodeInputContent.visit = (value, visitor) => {
|
|
105
|
+
if (value.document !== undefined)
|
|
106
|
+
return visitor.document(value.document);
|
|
107
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
108
|
+
};
|
|
109
|
+
})(FlowTraceNodeInputContent || (FlowTraceNodeInputContent = {}));
|
|
110
|
+
export var FlowTraceNodeOutputContent;
|
|
111
|
+
(function (FlowTraceNodeOutputContent) {
|
|
112
|
+
FlowTraceNodeOutputContent.visit = (value, visitor) => {
|
|
113
|
+
if (value.document !== undefined)
|
|
114
|
+
return visitor.document(value.document);
|
|
115
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
116
|
+
};
|
|
117
|
+
})(FlowTraceNodeOutputContent || (FlowTraceNodeOutputContent = {}));
|
|
118
|
+
export var FlowTrace;
|
|
119
|
+
(function (FlowTrace) {
|
|
120
|
+
FlowTrace.visit = (value, visitor) => {
|
|
121
|
+
if (value.nodeInputTrace !== undefined)
|
|
122
|
+
return visitor.nodeInputTrace(value.nodeInputTrace);
|
|
123
|
+
if (value.nodeOutputTrace !== undefined)
|
|
124
|
+
return visitor.nodeOutputTrace(value.nodeOutputTrace);
|
|
125
|
+
if (value.conditionNodeResultTrace !== undefined)
|
|
126
|
+
return visitor.conditionNodeResultTrace(value.conditionNodeResultTrace);
|
|
127
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
128
|
+
};
|
|
129
|
+
})(FlowTrace || (FlowTrace = {}));
|
|
102
130
|
export class ResourceNotFoundException extends __BaseException {
|
|
103
131
|
constructor(opts) {
|
|
104
132
|
super({
|
|
@@ -154,6 +182,8 @@ export var FlowResponseStream;
|
|
|
154
182
|
return visitor.flowOutputEvent(value.flowOutputEvent);
|
|
155
183
|
if (value.flowCompletionEvent !== undefined)
|
|
156
184
|
return visitor.flowCompletionEvent(value.flowCompletionEvent);
|
|
185
|
+
if (value.flowTraceEvent !== undefined)
|
|
186
|
+
return visitor.flowTraceEvent(value.flowTraceEvent);
|
|
157
187
|
if (value.internalServerException !== undefined)
|
|
158
188
|
return visitor.internalServerException(value.internalServerException);
|
|
159
189
|
if (value.validationException !== undefined)
|
|
@@ -494,11 +524,56 @@ export const FlowOutputEventFilterSensitiveLog = (obj) => ({
|
|
|
494
524
|
...obj,
|
|
495
525
|
...(obj.content && { content: obj.content }),
|
|
496
526
|
});
|
|
527
|
+
export const FlowTraceConditionFilterSensitiveLog = (obj) => ({
|
|
528
|
+
...obj,
|
|
529
|
+
});
|
|
530
|
+
export const FlowTraceConditionNodeResultEventFilterSensitiveLog = (obj) => ({
|
|
531
|
+
...obj,
|
|
532
|
+
...(obj.satisfiedConditions && { satisfiedConditions: SENSITIVE_STRING }),
|
|
533
|
+
});
|
|
534
|
+
export const FlowTraceNodeInputContentFilterSensitiveLog = (obj) => {
|
|
535
|
+
if (obj.document !== undefined)
|
|
536
|
+
return { document: obj.document };
|
|
537
|
+
if (obj.$unknown !== undefined)
|
|
538
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
539
|
+
};
|
|
540
|
+
export const FlowTraceNodeInputFieldFilterSensitiveLog = (obj) => ({
|
|
541
|
+
...obj,
|
|
542
|
+
...(obj.content && { content: SENSITIVE_STRING }),
|
|
543
|
+
});
|
|
544
|
+
export const FlowTraceNodeInputEventFilterSensitiveLog = (obj) => ({
|
|
545
|
+
...obj,
|
|
546
|
+
...(obj.fields && { fields: SENSITIVE_STRING }),
|
|
547
|
+
});
|
|
548
|
+
export const FlowTraceNodeOutputFieldFilterSensitiveLog = (obj) => ({
|
|
549
|
+
...obj,
|
|
550
|
+
...(obj.content && { content: obj.content }),
|
|
551
|
+
});
|
|
552
|
+
export const FlowTraceNodeOutputEventFilterSensitiveLog = (obj) => ({
|
|
553
|
+
...obj,
|
|
554
|
+
...(obj.fields && { fields: SENSITIVE_STRING }),
|
|
555
|
+
});
|
|
556
|
+
export const FlowTraceFilterSensitiveLog = (obj) => {
|
|
557
|
+
if (obj.nodeInputTrace !== undefined)
|
|
558
|
+
return { nodeInputTrace: SENSITIVE_STRING };
|
|
559
|
+
if (obj.nodeOutputTrace !== undefined)
|
|
560
|
+
return { nodeOutputTrace: SENSITIVE_STRING };
|
|
561
|
+
if (obj.conditionNodeResultTrace !== undefined)
|
|
562
|
+
return { conditionNodeResultTrace: SENSITIVE_STRING };
|
|
563
|
+
if (obj.$unknown !== undefined)
|
|
564
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
565
|
+
};
|
|
566
|
+
export const FlowTraceEventFilterSensitiveLog = (obj) => ({
|
|
567
|
+
...obj,
|
|
568
|
+
...(obj.trace && { trace: SENSITIVE_STRING }),
|
|
569
|
+
});
|
|
497
570
|
export const FlowResponseStreamFilterSensitiveLog = (obj) => {
|
|
498
571
|
if (obj.flowOutputEvent !== undefined)
|
|
499
572
|
return { flowOutputEvent: SENSITIVE_STRING };
|
|
500
573
|
if (obj.flowCompletionEvent !== undefined)
|
|
501
574
|
return { flowCompletionEvent: SENSITIVE_STRING };
|
|
575
|
+
if (obj.flowTraceEvent !== undefined)
|
|
576
|
+
return { flowTraceEvent: FlowTraceEventFilterSensitiveLog(obj.flowTraceEvent) };
|
|
502
577
|
if (obj.internalServerException !== undefined)
|
|
503
578
|
return { internalServerException: obj.internalServerException };
|
|
504
579
|
if (obj.validationException !== undefined)
|
|
@@ -62,6 +62,7 @@ export const se_InvokeFlowCommand = async (input, context) => {
|
|
|
62
62
|
b.p("flowAliasIdentifier", () => input.flowAliasIdentifier, "{flowAliasIdentifier}", false);
|
|
63
63
|
let body;
|
|
64
64
|
body = JSON.stringify(take(input, {
|
|
65
|
+
enableTrace: [],
|
|
65
66
|
inputs: (_) => se_FlowInputs(_, context),
|
|
66
67
|
}));
|
|
67
68
|
b.m("POST").h(headers).b(body);
|
|
@@ -356,6 +357,11 @@ const de_FlowResponseStream = (output, context) => {
|
|
|
356
357
|
flowCompletionEvent: await de_FlowCompletionEvent_event(event["flowCompletionEvent"], context),
|
|
357
358
|
};
|
|
358
359
|
}
|
|
360
|
+
if (event["flowTraceEvent"] != null) {
|
|
361
|
+
return {
|
|
362
|
+
flowTraceEvent: await de_FlowTraceEvent_event(event["flowTraceEvent"], context),
|
|
363
|
+
};
|
|
364
|
+
}
|
|
359
365
|
if (event["internalServerException"] != null) {
|
|
360
366
|
return {
|
|
361
367
|
internalServerException: await de_InternalServerException_event(event["internalServerException"], context),
|
|
@@ -520,6 +526,12 @@ const de_FlowOutputEvent_event = async (output, context) => {
|
|
|
520
526
|
Object.assign(contents, de_FlowOutputEvent(data, context));
|
|
521
527
|
return contents;
|
|
522
528
|
};
|
|
529
|
+
const de_FlowTraceEvent_event = async (output, context) => {
|
|
530
|
+
const contents = {};
|
|
531
|
+
const data = await parseBody(output.body, context);
|
|
532
|
+
Object.assign(contents, de_FlowTraceEvent(data, context));
|
|
533
|
+
return contents;
|
|
534
|
+
};
|
|
523
535
|
const de_InternalServerException_event = async (output, context) => {
|
|
524
536
|
const parsedOutput = {
|
|
525
537
|
...output,
|
|
@@ -824,6 +836,94 @@ const de_FlowOutputEvent = (output, context) => {
|
|
|
824
836
|
nodeType: __expectString,
|
|
825
837
|
});
|
|
826
838
|
};
|
|
839
|
+
const de_FlowTrace = (output, context) => {
|
|
840
|
+
if (output.conditionNodeResultTrace != null) {
|
|
841
|
+
return {
|
|
842
|
+
conditionNodeResultTrace: de_FlowTraceConditionNodeResultEvent(output.conditionNodeResultTrace, context),
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
if (output.nodeInputTrace != null) {
|
|
846
|
+
return {
|
|
847
|
+
nodeInputTrace: de_FlowTraceNodeInputEvent(output.nodeInputTrace, context),
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
if (output.nodeOutputTrace != null) {
|
|
851
|
+
return {
|
|
852
|
+
nodeOutputTrace: de_FlowTraceNodeOutputEvent(output.nodeOutputTrace, context),
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
return { $unknown: Object.entries(output)[0] };
|
|
856
|
+
};
|
|
857
|
+
const de_FlowTraceConditionNodeResultEvent = (output, context) => {
|
|
858
|
+
return take(output, {
|
|
859
|
+
nodeName: __expectString,
|
|
860
|
+
satisfiedConditions: _json,
|
|
861
|
+
timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
862
|
+
});
|
|
863
|
+
};
|
|
864
|
+
const de_FlowTraceEvent = (output, context) => {
|
|
865
|
+
return take(output, {
|
|
866
|
+
trace: (_) => de_FlowTrace(__expectUnion(_), context),
|
|
867
|
+
});
|
|
868
|
+
};
|
|
869
|
+
const de_FlowTraceNodeInputContent = (output, context) => {
|
|
870
|
+
if (output.document != null) {
|
|
871
|
+
return {
|
|
872
|
+
document: de_Document(output.document, context),
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
return { $unknown: Object.entries(output)[0] };
|
|
876
|
+
};
|
|
877
|
+
const de_FlowTraceNodeInputEvent = (output, context) => {
|
|
878
|
+
return take(output, {
|
|
879
|
+
fields: (_) => de_FlowTraceNodeInputFields(_, context),
|
|
880
|
+
nodeName: __expectString,
|
|
881
|
+
timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
882
|
+
});
|
|
883
|
+
};
|
|
884
|
+
const de_FlowTraceNodeInputField = (output, context) => {
|
|
885
|
+
return take(output, {
|
|
886
|
+
content: (_) => de_FlowTraceNodeInputContent(__expectUnion(_), context),
|
|
887
|
+
nodeInputName: __expectString,
|
|
888
|
+
});
|
|
889
|
+
};
|
|
890
|
+
const de_FlowTraceNodeInputFields = (output, context) => {
|
|
891
|
+
const retVal = (output || [])
|
|
892
|
+
.filter((e) => e != null)
|
|
893
|
+
.map((entry) => {
|
|
894
|
+
return de_FlowTraceNodeInputField(entry, context);
|
|
895
|
+
});
|
|
896
|
+
return retVal;
|
|
897
|
+
};
|
|
898
|
+
const de_FlowTraceNodeOutputContent = (output, context) => {
|
|
899
|
+
if (output.document != null) {
|
|
900
|
+
return {
|
|
901
|
+
document: de_Document(output.document, context),
|
|
902
|
+
};
|
|
903
|
+
}
|
|
904
|
+
return { $unknown: Object.entries(output)[0] };
|
|
905
|
+
};
|
|
906
|
+
const de_FlowTraceNodeOutputEvent = (output, context) => {
|
|
907
|
+
return take(output, {
|
|
908
|
+
fields: (_) => de_FlowTraceNodeOutputFields(_, context),
|
|
909
|
+
nodeName: __expectString,
|
|
910
|
+
timestamp: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
911
|
+
});
|
|
912
|
+
};
|
|
913
|
+
const de_FlowTraceNodeOutputField = (output, context) => {
|
|
914
|
+
return take(output, {
|
|
915
|
+
content: (_) => de_FlowTraceNodeOutputContent(__expectUnion(_), context),
|
|
916
|
+
nodeOutputName: __expectString,
|
|
917
|
+
});
|
|
918
|
+
};
|
|
919
|
+
const de_FlowTraceNodeOutputFields = (output, context) => {
|
|
920
|
+
const retVal = (output || [])
|
|
921
|
+
.filter((e) => e != null)
|
|
922
|
+
.map((entry) => {
|
|
923
|
+
return de_FlowTraceNodeOutputField(entry, context);
|
|
924
|
+
});
|
|
925
|
+
return retVal;
|
|
926
|
+
};
|
|
827
927
|
const de_InferenceConfiguration = (output, context) => {
|
|
828
928
|
return take(output, {
|
|
829
929
|
maximumLength: __expectInt32,
|
|
@@ -364,6 +364,8 @@ declare const InvokeAgentCommand_base: {
|
|
|
364
364
|
* // traceId: "STRING_VALUE",
|
|
365
365
|
* // text: "STRING_VALUE",
|
|
366
366
|
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
|
|
367
|
+
* // overrideLambda: "STRING_VALUE",
|
|
368
|
+
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
367
369
|
* // inferenceConfiguration: { // InferenceConfiguration
|
|
368
370
|
* // temperature: Number("float"),
|
|
369
371
|
* // topP: Number("float"),
|
|
@@ -373,8 +375,6 @@ declare const InvokeAgentCommand_base: {
|
|
|
373
375
|
* // "STRING_VALUE",
|
|
374
376
|
* // ],
|
|
375
377
|
* // },
|
|
376
|
-
* // overrideLambda: "STRING_VALUE",
|
|
377
|
-
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
378
378
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
379
379
|
* // },
|
|
380
380
|
* // modelInvocationOutput: { // PreProcessingModelInvocationOutput
|
|
@@ -495,6 +495,8 @@ declare const InvokeAgentCommand_base: {
|
|
|
495
495
|
* // traceId: "STRING_VALUE",
|
|
496
496
|
* // text: "STRING_VALUE",
|
|
497
497
|
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
|
|
498
|
+
* // overrideLambda: "STRING_VALUE",
|
|
499
|
+
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
498
500
|
* // inferenceConfiguration: {
|
|
499
501
|
* // temperature: Number("float"),
|
|
500
502
|
* // topP: Number("float"),
|
|
@@ -504,8 +506,6 @@ declare const InvokeAgentCommand_base: {
|
|
|
504
506
|
* // "STRING_VALUE",
|
|
505
507
|
* // ],
|
|
506
508
|
* // },
|
|
507
|
-
* // overrideLambda: "STRING_VALUE",
|
|
508
|
-
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
509
509
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
510
510
|
* // },
|
|
511
511
|
* // modelInvocationOutput: { // OrchestrationModelInvocationOutput
|
|
@@ -526,6 +526,8 @@ declare const InvokeAgentCommand_base: {
|
|
|
526
526
|
* // traceId: "STRING_VALUE",
|
|
527
527
|
* // text: "STRING_VALUE",
|
|
528
528
|
* // type: "PRE_PROCESSING" || "ORCHESTRATION" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "POST_PROCESSING",
|
|
529
|
+
* // overrideLambda: "STRING_VALUE",
|
|
530
|
+
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
529
531
|
* // inferenceConfiguration: {
|
|
530
532
|
* // temperature: Number("float"),
|
|
531
533
|
* // topP: Number("float"),
|
|
@@ -535,8 +537,6 @@ declare const InvokeAgentCommand_base: {
|
|
|
535
537
|
* // "STRING_VALUE",
|
|
536
538
|
* // ],
|
|
537
539
|
* // },
|
|
538
|
-
* // overrideLambda: "STRING_VALUE",
|
|
539
|
-
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
|
|
540
540
|
* // parserMode: "DEFAULT" || "OVERRIDDEN",
|
|
541
541
|
* // },
|
|
542
542
|
* // modelInvocationOutput: { // PostProcessingModelInvocationOutput
|
|
@@ -49,6 +49,7 @@ declare const InvokeFlowCommand_base: {
|
|
|
49
49
|
* },
|
|
50
50
|
* },
|
|
51
51
|
* ],
|
|
52
|
+
* enableTrace: true || false,
|
|
52
53
|
* };
|
|
53
54
|
* const command = new InvokeFlowCommand(input);
|
|
54
55
|
* const response = await client.send(command);
|
|
@@ -64,6 +65,43 @@ declare const InvokeFlowCommand_base: {
|
|
|
64
65
|
* // flowCompletionEvent: { // FlowCompletionEvent
|
|
65
66
|
* // completionReason: "SUCCESS", // required
|
|
66
67
|
* // },
|
|
68
|
+
* // flowTraceEvent: { // FlowTraceEvent
|
|
69
|
+
* // trace: { // FlowTrace Union: only one key present
|
|
70
|
+
* // nodeInputTrace: { // FlowTraceNodeInputEvent
|
|
71
|
+
* // nodeName: "STRING_VALUE", // required
|
|
72
|
+
* // timestamp: new Date("TIMESTAMP"), // required
|
|
73
|
+
* // fields: [ // FlowTraceNodeInputFields // required
|
|
74
|
+
* // { // FlowTraceNodeInputField
|
|
75
|
+
* // nodeInputName: "STRING_VALUE", // required
|
|
76
|
+
* // content: { // FlowTraceNodeInputContent Union: only one key present
|
|
77
|
+
* // document: "DOCUMENT_VALUE",
|
|
78
|
+
* // },
|
|
79
|
+
* // },
|
|
80
|
+
* // ],
|
|
81
|
+
* // },
|
|
82
|
+
* // nodeOutputTrace: { // FlowTraceNodeOutputEvent
|
|
83
|
+
* // nodeName: "STRING_VALUE", // required
|
|
84
|
+
* // timestamp: new Date("TIMESTAMP"), // required
|
|
85
|
+
* // fields: [ // FlowTraceNodeOutputFields // required
|
|
86
|
+
* // { // FlowTraceNodeOutputField
|
|
87
|
+
* // nodeOutputName: "STRING_VALUE", // required
|
|
88
|
+
* // content: { // FlowTraceNodeOutputContent Union: only one key present
|
|
89
|
+
* // document: "DOCUMENT_VALUE",
|
|
90
|
+
* // },
|
|
91
|
+
* // },
|
|
92
|
+
* // ],
|
|
93
|
+
* // },
|
|
94
|
+
* // conditionNodeResultTrace: { // FlowTraceConditionNodeResultEvent
|
|
95
|
+
* // nodeName: "STRING_VALUE", // required
|
|
96
|
+
* // timestamp: new Date("TIMESTAMP"), // required
|
|
97
|
+
* // satisfiedConditions: [ // FlowTraceConditions // required
|
|
98
|
+
* // { // FlowTraceCondition
|
|
99
|
+
* // conditionName: "STRING_VALUE", // required
|
|
100
|
+
* // },
|
|
101
|
+
* // ],
|
|
102
|
+
* // },
|
|
103
|
+
* // },
|
|
104
|
+
* // },
|
|
67
105
|
* // internalServerException: { // InternalServerException
|
|
68
106
|
* // message: "STRING_VALUE",
|
|
69
107
|
* // },
|