@aws-sdk/client-bedrock-agent-runtime 3.699.0 → 3.701.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 CHANGED
@@ -45,6 +45,8 @@ __export(src_exports, {
45
45
  ConflictException: () => ConflictException,
46
46
  CreationMode: () => CreationMode,
47
47
  CustomControlMethod: () => CustomControlMethod,
48
+ CustomOrchestrationTraceEventFilterSensitiveLog: () => CustomOrchestrationTraceEventFilterSensitiveLog,
49
+ CustomOrchestrationTraceFilterSensitiveLog: () => CustomOrchestrationTraceFilterSensitiveLog,
48
50
  DeleteAgentMemoryCommand: () => DeleteAgentMemoryCommand,
49
51
  DependencyFailedException: () => DependencyFailedException,
50
52
  ExecutionType: () => ExecutionType,
@@ -881,6 +883,8 @@ var Trace;
881
883
  return visitor.postProcessingTrace(value.postProcessingTrace);
882
884
  if (value.failureTrace !== void 0)
883
885
  return visitor.failureTrace(value.failureTrace);
886
+ if (value.customOrchestrationTrace !== void 0)
887
+ return visitor.customOrchestrationTrace(value.customOrchestrationTrace);
884
888
  return visitor._(value.$unknown[0], value.$unknown[1]);
885
889
  }, "visit");
886
890
  })(Trace || (Trace = {}));
@@ -1268,6 +1272,13 @@ var ReturnControlPayloadFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1268
1272
  invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item))
1269
1273
  }
1270
1274
  }), "ReturnControlPayloadFilterSensitiveLog");
1275
+ var CustomOrchestrationTraceEventFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1276
+ ...obj
1277
+ }), "CustomOrchestrationTraceEventFilterSensitiveLog");
1278
+ var CustomOrchestrationTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1279
+ ...obj,
1280
+ ...obj.event && { event: import_smithy_client.SENSITIVE_STRING }
1281
+ }), "CustomOrchestrationTraceFilterSensitiveLog");
1271
1282
  var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
1272
1283
  ...obj,
1273
1284
  ...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
@@ -1443,6 +1454,8 @@ var TraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
1443
1454
  return { postProcessingTrace: import_smithy_client.SENSITIVE_STRING };
1444
1455
  if (obj.failureTrace !== void 0)
1445
1456
  return { failureTrace: import_smithy_client.SENSITIVE_STRING };
1457
+ if (obj.customOrchestrationTrace !== void 0)
1458
+ return { customOrchestrationTrace: import_smithy_client.SENSITIVE_STRING };
1446
1459
  if (obj.$unknown !== void 0)
1447
1460
  return { [obj.$unknown[0]]: "UNKNOWN" };
1448
1461
  }, "TraceFilterSensitiveLog");
@@ -1833,7 +1846,8 @@ var se_InvokeAgentCommand = /* @__PURE__ */ __name(async (input, context) => {
1833
1846
  endSession: [],
1834
1847
  inputText: [],
1835
1848
  memoryId: [],
1836
- sessionState: (_) => se_SessionState(_, context)
1849
+ sessionState: (_) => se_SessionState(_, context),
1850
+ streamingConfigurations: (_) => (0, import_smithy_client._json)(_)
1837
1851
  })
1838
1852
  );
1839
1853
  b.m("POST").h(headers).b(body);
@@ -3189,6 +3203,11 @@ var de_RetrievedReferences = /* @__PURE__ */ __name((output, context) => {
3189
3203
  return retVal;
3190
3204
  }, "de_RetrievedReferences");
3191
3205
  var de_Trace = /* @__PURE__ */ __name((output, context) => {
3206
+ if (output.customOrchestrationTrace != null) {
3207
+ return {
3208
+ customOrchestrationTrace: (0, import_smithy_client._json)(output.customOrchestrationTrace)
3209
+ };
3210
+ }
3192
3211
  if (output.failureTrace != null) {
3193
3212
  return {
3194
3213
  failureTrace: (0, import_smithy_client._json)(output.failureTrace)
@@ -3529,6 +3548,8 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
3529
3548
  ApiInvocationInputFilterSensitiveLog,
3530
3549
  InvocationInputMemberFilterSensitiveLog,
3531
3550
  ReturnControlPayloadFilterSensitiveLog,
3551
+ CustomOrchestrationTraceEventFilterSensitiveLog,
3552
+ CustomOrchestrationTraceFilterSensitiveLog,
3532
3553
  FailureTraceFilterSensitiveLog,
3533
3554
  GuardrailContentFilterFilterSensitiveLog,
3534
3555
  GuardrailContentPolicyAssessmentFilterSensitiveLog,
@@ -446,6 +446,8 @@ export var Trace;
446
446
  return visitor.postProcessingTrace(value.postProcessingTrace);
447
447
  if (value.failureTrace !== undefined)
448
448
  return visitor.failureTrace(value.failureTrace);
449
+ if (value.customOrchestrationTrace !== undefined)
450
+ return visitor.customOrchestrationTrace(value.customOrchestrationTrace);
449
451
  return visitor._(value.$unknown[0], value.$unknown[1]);
450
452
  };
451
453
  })(Trace || (Trace = {}));
@@ -833,6 +835,13 @@ export const ReturnControlPayloadFilterSensitiveLog = (obj) => ({
833
835
  invocationInputs: obj.invocationInputs.map((item) => InvocationInputMemberFilterSensitiveLog(item)),
834
836
  }),
835
837
  });
838
+ export const CustomOrchestrationTraceEventFilterSensitiveLog = (obj) => ({
839
+ ...obj,
840
+ });
841
+ export const CustomOrchestrationTraceFilterSensitiveLog = (obj) => ({
842
+ ...obj,
843
+ ...(obj.event && { event: SENSITIVE_STRING }),
844
+ });
836
845
  export const FailureTraceFilterSensitiveLog = (obj) => ({
837
846
  ...obj,
838
847
  ...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
@@ -1008,6 +1017,8 @@ export const TraceFilterSensitiveLog = (obj) => {
1008
1017
  return { postProcessingTrace: SENSITIVE_STRING };
1009
1018
  if (obj.failureTrace !== undefined)
1010
1019
  return { failureTrace: SENSITIVE_STRING };
1020
+ if (obj.customOrchestrationTrace !== undefined)
1021
+ return { customOrchestrationTrace: SENSITIVE_STRING };
1011
1022
  if (obj.$unknown !== undefined)
1012
1023
  return { [obj.$unknown[0]]: "UNKNOWN" };
1013
1024
  };
@@ -48,6 +48,7 @@ export const se_InvokeAgentCommand = async (input, context) => {
48
48
  inputText: [],
49
49
  memoryId: [],
50
50
  sessionState: (_) => se_SessionState(_, context),
51
+ streamingConfigurations: (_) => _json(_),
51
52
  }));
52
53
  b.m("POST").h(headers).b(body);
53
54
  return b.build();
@@ -1390,6 +1391,11 @@ const de_RetrievedReferences = (output, context) => {
1390
1391
  return retVal;
1391
1392
  };
1392
1393
  const de_Trace = (output, context) => {
1394
+ if (output.customOrchestrationTrace != null) {
1395
+ return {
1396
+ customOrchestrationTrace: _json(output.customOrchestrationTrace),
1397
+ };
1398
+ }
1393
1399
  if (output.failureTrace != null) {
1394
1400
  return {
1395
1401
  failureTrace: _json(output.failureTrace),
@@ -190,6 +190,10 @@ declare const InvokeAgentCommand_base: {
190
190
  * enableTrace: true || false,
191
191
  * inputText: "STRING_VALUE",
192
192
  * memoryId: "STRING_VALUE",
193
+ * streamingConfigurations: { // StreamingConfigurations
194
+ * streamFinalResponse: true || false,
195
+ * applyGuardrailInterval: Number("int"),
196
+ * },
193
197
  * };
194
198
  * const command = new InvokeAgentCommand(input);
195
199
  * const response = await client.send(command);
@@ -556,6 +560,12 @@ declare const InvokeAgentCommand_base: {
556
560
  * // traceId: "STRING_VALUE",
557
561
  * // failureReason: "STRING_VALUE",
558
562
  * // },
563
+ * // customOrchestrationTrace: { // CustomOrchestrationTrace
564
+ * // traceId: "STRING_VALUE",
565
+ * // event: { // CustomOrchestrationTraceEvent
566
+ * // text: "STRING_VALUE",
567
+ * // },
568
+ * // },
559
569
  * // },
560
570
  * // agentId: "STRING_VALUE",
561
571
  * // agentAliasId: "STRING_VALUE",
@@ -610,6 +610,12 @@ declare const InvokeInlineAgentCommand_base: {
610
610
  * // traceId: "STRING_VALUE",
611
611
  * // failureReason: "STRING_VALUE",
612
612
  * // },
613
+ * // customOrchestrationTrace: { // CustomOrchestrationTrace
614
+ * // traceId: "STRING_VALUE",
615
+ * // event: { // CustomOrchestrationTraceEvent
616
+ * // text: "STRING_VALUE",
617
+ * // },
618
+ * // },
613
619
  * // },
614
620
  * // },
615
621
  * // returnControl: { // InlineAgentReturnControlPayload
@@ -1547,6 +1547,28 @@ export declare namespace InvocationResultMember {
1547
1547
  }
1548
1548
  const visit: <T>(value: InvocationResultMember, visitor: Visitor<T>) => T;
1549
1549
  }
1550
+ /**
1551
+ * <p>
1552
+ * Configurations for streaming.
1553
+ * </p>
1554
+ * @public
1555
+ */
1556
+ export interface StreamingConfigurations {
1557
+ /**
1558
+ * <p>
1559
+ * Specifies whether to enable streaming for the final response. This is set to <code>false</code> by default.
1560
+ * </p>
1561
+ * @public
1562
+ */
1563
+ streamFinalResponse?: boolean | undefined;
1564
+ /**
1565
+ * <p>
1566
+ * The guardrail interval to apply as response is generated.
1567
+ * </p>
1568
+ * @public
1569
+ */
1570
+ applyGuardrailInterval?: number | undefined;
1571
+ }
1550
1572
  /**
1551
1573
  * <p>Contains information about where the text with a citation begins and ends in the generated output.</p>
1552
1574
  * <p>This data type is used in the following API operations:</p>
@@ -2139,6 +2161,43 @@ export interface ReturnControlPayload {
2139
2161
  */
2140
2162
  invocationId?: string | undefined;
2141
2163
  }
2164
+ /**
2165
+ * <p>
2166
+ * The event in the custom orchestration sequence.
2167
+ * </p>
2168
+ * @public
2169
+ */
2170
+ export interface CustomOrchestrationTraceEvent {
2171
+ /**
2172
+ * <p>
2173
+ * The text that prompted the event at this step.
2174
+ * </p>
2175
+ * @public
2176
+ */
2177
+ text?: string | undefined;
2178
+ }
2179
+ /**
2180
+ * <p>
2181
+ * The trace behavior for the custom orchestration.
2182
+ * </p>
2183
+ * @public
2184
+ */
2185
+ export interface CustomOrchestrationTrace {
2186
+ /**
2187
+ * <p>
2188
+ * The unique identifier of the trace.
2189
+ * </p>
2190
+ * @public
2191
+ */
2192
+ traceId?: string | undefined;
2193
+ /**
2194
+ * <p>
2195
+ * The trace event details used with the custom orchestration.
2196
+ * </p>
2197
+ * @public
2198
+ */
2199
+ event?: CustomOrchestrationTraceEvent | undefined;
2200
+ }
2142
2201
  /**
2143
2202
  * <p>Contains information about the failure of the interaction.</p>
2144
2203
  * @public
@@ -3252,7 +3311,7 @@ export declare namespace PreProcessingTrace {
3252
3311
  * <p>Contains one part of the agent's reasoning process and results from calling API actions and querying knowledge bases. You can use the trace to understand how the agent arrived at the response it provided the customer. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-enablement">Trace enablement</a>.</p>
3253
3312
  * @public
3254
3313
  */
3255
- export type Trace = Trace.FailureTraceMember | Trace.GuardrailTraceMember | Trace.OrchestrationTraceMember | Trace.PostProcessingTraceMember | Trace.PreProcessingTraceMember | Trace.$UnknownMember;
3314
+ export type Trace = Trace.CustomOrchestrationTraceMember | Trace.FailureTraceMember | Trace.GuardrailTraceMember | Trace.OrchestrationTraceMember | Trace.PostProcessingTraceMember | Trace.PreProcessingTraceMember | Trace.$UnknownMember;
3256
3315
  /**
3257
3316
  * @public
3258
3317
  */
@@ -3267,6 +3326,7 @@ export declare namespace Trace {
3267
3326
  orchestrationTrace?: never;
3268
3327
  postProcessingTrace?: never;
3269
3328
  failureTrace?: never;
3329
+ customOrchestrationTrace?: never;
3270
3330
  $unknown?: never;
3271
3331
  }
3272
3332
  /**
@@ -3279,6 +3339,7 @@ export declare namespace Trace {
3279
3339
  orchestrationTrace?: never;
3280
3340
  postProcessingTrace?: never;
3281
3341
  failureTrace?: never;
3342
+ customOrchestrationTrace?: never;
3282
3343
  $unknown?: never;
3283
3344
  }
3284
3345
  /**
@@ -3291,6 +3352,7 @@ export declare namespace Trace {
3291
3352
  orchestrationTrace: OrchestrationTrace;
3292
3353
  postProcessingTrace?: never;
3293
3354
  failureTrace?: never;
3355
+ customOrchestrationTrace?: never;
3294
3356
  $unknown?: never;
3295
3357
  }
3296
3358
  /**
@@ -3303,6 +3365,7 @@ export declare namespace Trace {
3303
3365
  orchestrationTrace?: never;
3304
3366
  postProcessingTrace: PostProcessingTrace;
3305
3367
  failureTrace?: never;
3368
+ customOrchestrationTrace?: never;
3306
3369
  $unknown?: never;
3307
3370
  }
3308
3371
  /**
@@ -3315,6 +3378,22 @@ export declare namespace Trace {
3315
3378
  orchestrationTrace?: never;
3316
3379
  postProcessingTrace?: never;
3317
3380
  failureTrace: FailureTrace;
3381
+ customOrchestrationTrace?: never;
3382
+ $unknown?: never;
3383
+ }
3384
+ /**
3385
+ * <p>
3386
+ * Details about the custom orchestration step in which the agent determines the order in which actions are executed.
3387
+ * </p>
3388
+ * @public
3389
+ */
3390
+ interface CustomOrchestrationTraceMember {
3391
+ guardrailTrace?: never;
3392
+ preProcessingTrace?: never;
3393
+ orchestrationTrace?: never;
3394
+ postProcessingTrace?: never;
3395
+ failureTrace?: never;
3396
+ customOrchestrationTrace: CustomOrchestrationTrace;
3318
3397
  $unknown?: never;
3319
3398
  }
3320
3399
  /**
@@ -3326,6 +3405,7 @@ export declare namespace Trace {
3326
3405
  orchestrationTrace?: never;
3327
3406
  postProcessingTrace?: never;
3328
3407
  failureTrace?: never;
3408
+ customOrchestrationTrace?: never;
3329
3409
  $unknown: [string, any];
3330
3410
  }
3331
3411
  interface Visitor<T> {
@@ -3334,6 +3414,7 @@ export declare namespace Trace {
3334
3414
  orchestrationTrace: (value: OrchestrationTrace) => T;
3335
3415
  postProcessingTrace: (value: PostProcessingTrace) => T;
3336
3416
  failureTrace: (value: FailureTrace) => T;
3417
+ customOrchestrationTrace: (value: CustomOrchestrationTrace) => T;
3337
3418
  _: (name: string, value: any) => T;
3338
3419
  }
3339
3420
  const visit: <T>(value: Trace, visitor: Visitor<T>) => T;
@@ -5938,6 +6019,13 @@ export interface InvokeAgentRequest {
5938
6019
  * @public
5939
6020
  */
5940
6021
  memoryId?: string | undefined;
6022
+ /**
6023
+ * <p>
6024
+ * Specifies the configurations for streaming.
6025
+ * </p>
6026
+ * @public
6027
+ */
6028
+ streamingConfigurations?: StreamingConfigurations | undefined;
5941
6029
  }
5942
6030
  /**
5943
6031
  * @internal
@@ -6099,6 +6187,14 @@ export declare const InvocationInputMemberFilterSensitiveLog: (obj: InvocationIn
6099
6187
  * @internal
6100
6188
  */
6101
6189
  export declare const ReturnControlPayloadFilterSensitiveLog: (obj: ReturnControlPayload) => any;
6190
+ /**
6191
+ * @internal
6192
+ */
6193
+ export declare const CustomOrchestrationTraceEventFilterSensitiveLog: (obj: CustomOrchestrationTraceEvent) => any;
6194
+ /**
6195
+ * @internal
6196
+ */
6197
+ export declare const CustomOrchestrationTraceFilterSensitiveLog: (obj: CustomOrchestrationTrace) => any;
6102
6198
  /**
6103
6199
  * @internal
6104
6200
  */
@@ -714,6 +714,10 @@ export declare namespace InvocationResultMember {
714
714
  }
715
715
  const visit: <T>(value: InvocationResultMember, visitor: Visitor<T>) => T;
716
716
  }
717
+ export interface StreamingConfigurations {
718
+ streamFinalResponse?: boolean | undefined;
719
+ applyGuardrailInterval?: number | undefined;
720
+ }
717
721
  export interface Span {
718
722
  start?: number | undefined;
719
723
  end?: number | undefined;
@@ -845,6 +849,13 @@ export interface ReturnControlPayload {
845
849
  invocationInputs?: InvocationInputMember[] | undefined;
846
850
  invocationId?: string | undefined;
847
851
  }
852
+ export interface CustomOrchestrationTraceEvent {
853
+ text?: string | undefined;
854
+ }
855
+ export interface CustomOrchestrationTrace {
856
+ traceId?: string | undefined;
857
+ event?: CustomOrchestrationTraceEvent | undefined;
858
+ }
848
859
  export interface FailureTrace {
849
860
  traceId?: string | undefined;
850
861
  failureReason?: string | undefined;
@@ -1247,6 +1258,7 @@ export declare namespace PreProcessingTrace {
1247
1258
  const visit: <T>(value: PreProcessingTrace, visitor: Visitor<T>) => T;
1248
1259
  }
1249
1260
  export type Trace =
1261
+ | Trace.CustomOrchestrationTraceMember
1250
1262
  | Trace.FailureTraceMember
1251
1263
  | Trace.GuardrailTraceMember
1252
1264
  | Trace.OrchestrationTraceMember
@@ -1260,6 +1272,7 @@ export declare namespace Trace {
1260
1272
  orchestrationTrace?: never;
1261
1273
  postProcessingTrace?: never;
1262
1274
  failureTrace?: never;
1275
+ customOrchestrationTrace?: never;
1263
1276
  $unknown?: never;
1264
1277
  }
1265
1278
  interface PreProcessingTraceMember {
@@ -1268,6 +1281,7 @@ export declare namespace Trace {
1268
1281
  orchestrationTrace?: never;
1269
1282
  postProcessingTrace?: never;
1270
1283
  failureTrace?: never;
1284
+ customOrchestrationTrace?: never;
1271
1285
  $unknown?: never;
1272
1286
  }
1273
1287
  interface OrchestrationTraceMember {
@@ -1276,6 +1290,7 @@ export declare namespace Trace {
1276
1290
  orchestrationTrace: OrchestrationTrace;
1277
1291
  postProcessingTrace?: never;
1278
1292
  failureTrace?: never;
1293
+ customOrchestrationTrace?: never;
1279
1294
  $unknown?: never;
1280
1295
  }
1281
1296
  interface PostProcessingTraceMember {
@@ -1284,6 +1299,7 @@ export declare namespace Trace {
1284
1299
  orchestrationTrace?: never;
1285
1300
  postProcessingTrace: PostProcessingTrace;
1286
1301
  failureTrace?: never;
1302
+ customOrchestrationTrace?: never;
1287
1303
  $unknown?: never;
1288
1304
  }
1289
1305
  interface FailureTraceMember {
@@ -1292,6 +1308,16 @@ export declare namespace Trace {
1292
1308
  orchestrationTrace?: never;
1293
1309
  postProcessingTrace?: never;
1294
1310
  failureTrace: FailureTrace;
1311
+ customOrchestrationTrace?: never;
1312
+ $unknown?: never;
1313
+ }
1314
+ interface CustomOrchestrationTraceMember {
1315
+ guardrailTrace?: never;
1316
+ preProcessingTrace?: never;
1317
+ orchestrationTrace?: never;
1318
+ postProcessingTrace?: never;
1319
+ failureTrace?: never;
1320
+ customOrchestrationTrace: CustomOrchestrationTrace;
1295
1321
  $unknown?: never;
1296
1322
  }
1297
1323
  interface $UnknownMember {
@@ -1300,6 +1326,7 @@ export declare namespace Trace {
1300
1326
  orchestrationTrace?: never;
1301
1327
  postProcessingTrace?: never;
1302
1328
  failureTrace?: never;
1329
+ customOrchestrationTrace?: never;
1303
1330
  $unknown: [string, any];
1304
1331
  }
1305
1332
  interface Visitor<T> {
@@ -1308,6 +1335,7 @@ export declare namespace Trace {
1308
1335
  orchestrationTrace: (value: OrchestrationTrace) => T;
1309
1336
  postProcessingTrace: (value: PostProcessingTrace) => T;
1310
1337
  failureTrace: (value: FailureTrace) => T;
1338
+ customOrchestrationTrace: (value: CustomOrchestrationTrace) => T;
1311
1339
  _: (name: string, value: any) => T;
1312
1340
  }
1313
1341
  const visit: <T>(value: Trace, visitor: Visitor<T>) => T;
@@ -2554,6 +2582,7 @@ export interface InvokeAgentRequest {
2554
2582
  enableTrace?: boolean | undefined;
2555
2583
  inputText?: string | undefined;
2556
2584
  memoryId?: string | undefined;
2585
+ streamingConfigurations?: StreamingConfigurations | undefined;
2557
2586
  }
2558
2587
  export declare const ActionGroupInvocationInputFilterSensitiveLog: (
2559
2588
  obj: ActionGroupInvocationInput
@@ -2653,6 +2682,12 @@ export declare const InvocationInputMemberFilterSensitiveLog: (
2653
2682
  export declare const ReturnControlPayloadFilterSensitiveLog: (
2654
2683
  obj: ReturnControlPayload
2655
2684
  ) => any;
2685
+ export declare const CustomOrchestrationTraceEventFilterSensitiveLog: (
2686
+ obj: CustomOrchestrationTraceEvent
2687
+ ) => any;
2688
+ export declare const CustomOrchestrationTraceFilterSensitiveLog: (
2689
+ obj: CustomOrchestrationTrace
2690
+ ) => any;
2656
2691
  export declare const FailureTraceFilterSensitiveLog: (obj: FailureTrace) => any;
2657
2692
  export declare const GuardrailContentFilterFilterSensitiveLog: (
2658
2693
  obj: GuardrailContentFilter
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-agent-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.699.0",
4
+ "version": "3.701.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",