@aws-sdk/client-bedrock-agent-runtime 3.577.0 → 3.580.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,28 @@ __export(src_exports, {
45
45
  GeneratedResponsePartFilterSensitiveLog: () => GeneratedResponsePartFilterSensitiveLog,
46
46
  GenerationConfigurationFilterSensitiveLog: () => GenerationConfigurationFilterSensitiveLog,
47
47
  GuadrailAction: () => GuadrailAction,
48
+ GuardrailAction: () => GuardrailAction,
49
+ GuardrailAssessmentFilterSensitiveLog: () => GuardrailAssessmentFilterSensitiveLog,
50
+ GuardrailContentFilterConfidence: () => GuardrailContentFilterConfidence,
51
+ GuardrailContentFilterFilterSensitiveLog: () => GuardrailContentFilterFilterSensitiveLog,
52
+ GuardrailContentFilterType: () => GuardrailContentFilterType,
53
+ GuardrailContentPolicyAction: () => GuardrailContentPolicyAction,
54
+ GuardrailContentPolicyAssessmentFilterSensitiveLog: () => GuardrailContentPolicyAssessmentFilterSensitiveLog,
55
+ GuardrailCustomWordFilterSensitiveLog: () => GuardrailCustomWordFilterSensitiveLog,
56
+ GuardrailManagedWordFilterSensitiveLog: () => GuardrailManagedWordFilterSensitiveLog,
57
+ GuardrailManagedWordType: () => GuardrailManagedWordType,
58
+ GuardrailPiiEntityFilterFilterSensitiveLog: () => GuardrailPiiEntityFilterFilterSensitiveLog,
59
+ GuardrailPiiEntityType: () => GuardrailPiiEntityType,
60
+ GuardrailRegexFilterFilterSensitiveLog: () => GuardrailRegexFilterFilterSensitiveLog,
61
+ GuardrailSensitiveInformationPolicyAction: () => GuardrailSensitiveInformationPolicyAction,
62
+ GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog: () => GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog,
63
+ GuardrailTopicFilterSensitiveLog: () => GuardrailTopicFilterSensitiveLog,
64
+ GuardrailTopicPolicyAction: () => GuardrailTopicPolicyAction,
65
+ GuardrailTopicPolicyAssessmentFilterSensitiveLog: () => GuardrailTopicPolicyAssessmentFilterSensitiveLog,
66
+ GuardrailTopicType: () => GuardrailTopicType,
67
+ GuardrailTraceFilterSensitiveLog: () => GuardrailTraceFilterSensitiveLog,
68
+ GuardrailWordPolicyAction: () => GuardrailWordPolicyAction,
69
+ GuardrailWordPolicyAssessmentFilterSensitiveLog: () => GuardrailWordPolicyAssessmentFilterSensitiveLog,
48
70
  InternalServerException: () => InternalServerException,
49
71
  InvocationInputFilterSensitiveLog: () => InvocationInputFilterSensitiveLog,
50
72
  InvocationInputMember: () => InvocationInputMember,
@@ -453,6 +475,76 @@ var _ThrottlingException = class _ThrottlingException extends BedrockAgentRuntim
453
475
  };
454
476
  __name(_ThrottlingException, "ThrottlingException");
455
477
  var ThrottlingException = _ThrottlingException;
478
+ var GuardrailAction = {
479
+ INTERVENED: "INTERVENED",
480
+ NONE: "NONE"
481
+ };
482
+ var GuardrailContentPolicyAction = {
483
+ BLOCKED: "BLOCKED"
484
+ };
485
+ var GuardrailContentFilterConfidence = {
486
+ HIGH: "HIGH",
487
+ LOW: "LOW",
488
+ MEDIUM: "MEDIUM",
489
+ NONE: "NONE"
490
+ };
491
+ var GuardrailContentFilterType = {
492
+ HATE: "HATE",
493
+ INSULTS: "INSULTS",
494
+ MISCONDUCT: "MISCONDUCT",
495
+ PROMPT_ATTACK: "PROMPT_ATTACK",
496
+ SEXUAL: "SEXUAL",
497
+ VIOLENCE: "VIOLENCE"
498
+ };
499
+ var GuardrailSensitiveInformationPolicyAction = {
500
+ ANONYMIZED: "ANONYMIZED",
501
+ BLOCKED: "BLOCKED"
502
+ };
503
+ var GuardrailPiiEntityType = {
504
+ ADDRESS: "ADDRESS",
505
+ AGE: "AGE",
506
+ AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
507
+ AWS_SECRET_KEY: "AWS_SECRET_KEY",
508
+ CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
509
+ CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
510
+ CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
511
+ CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
512
+ CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
513
+ DRIVER_ID: "DRIVER_ID",
514
+ EMAIL: "EMAIL",
515
+ INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
516
+ IP_ADDRESS: "IP_ADDRESS",
517
+ LICENSE_PLATE: "LICENSE_PLATE",
518
+ MAC_ADDRESS: "MAC_ADDRESS",
519
+ NAME: "NAME",
520
+ PASSWORD: "PASSWORD",
521
+ PHONE: "PHONE",
522
+ PIN: "PIN",
523
+ SWIFT_CODE: "SWIFT_CODE",
524
+ UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
525
+ UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
526
+ UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
527
+ URL: "URL",
528
+ USERNAME: "USERNAME",
529
+ US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
530
+ US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
531
+ US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
532
+ US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
533
+ US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
534
+ VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER"
535
+ };
536
+ var GuardrailTopicPolicyAction = {
537
+ BLOCKED: "BLOCKED"
538
+ };
539
+ var GuardrailTopicType = {
540
+ DENY: "DENY"
541
+ };
542
+ var GuardrailWordPolicyAction = {
543
+ BLOCKED: "BLOCKED"
544
+ };
545
+ var GuardrailManagedWordType = {
546
+ PROFANITY: "PROFANITY"
547
+ };
456
548
  var InvocationType = {
457
549
  ACTION_GROUP: "ACTION_GROUP",
458
550
  FINISH: "FINISH",
@@ -517,6 +609,8 @@ var PreProcessingTrace;
517
609
  var Trace;
518
610
  ((Trace3) => {
519
611
  Trace3.visit = /* @__PURE__ */ __name((value, visitor) => {
612
+ if (value.guardrailTrace !== void 0)
613
+ return visitor.guardrailTrace(value.guardrailTrace);
520
614
  if (value.preProcessingTrace !== void 0)
521
615
  return visitor.preProcessingTrace(value.preProcessingTrace);
522
616
  if (value.orchestrationTrace !== void 0)
@@ -718,6 +812,54 @@ var FailureTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
718
812
  ...obj,
719
813
  ...obj.failureReason && { failureReason: import_smithy_client.SENSITIVE_STRING }
720
814
  }), "FailureTraceFilterSensitiveLog");
815
+ var GuardrailContentFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
816
+ ...obj
817
+ }), "GuardrailContentFilterFilterSensitiveLog");
818
+ var GuardrailContentPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
819
+ ...obj,
820
+ ...obj.filters && { filters: import_smithy_client.SENSITIVE_STRING }
821
+ }), "GuardrailContentPolicyAssessmentFilterSensitiveLog");
822
+ var GuardrailPiiEntityFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
823
+ ...obj
824
+ }), "GuardrailPiiEntityFilterFilterSensitiveLog");
825
+ var GuardrailRegexFilterFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
826
+ ...obj
827
+ }), "GuardrailRegexFilterFilterSensitiveLog");
828
+ var GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
829
+ ...obj,
830
+ ...obj.piiEntities && { piiEntities: import_smithy_client.SENSITIVE_STRING },
831
+ ...obj.regexes && { regexes: import_smithy_client.SENSITIVE_STRING }
832
+ }), "GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog");
833
+ var GuardrailTopicFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
834
+ ...obj
835
+ }), "GuardrailTopicFilterSensitiveLog");
836
+ var GuardrailTopicPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
837
+ ...obj,
838
+ ...obj.topics && { topics: import_smithy_client.SENSITIVE_STRING }
839
+ }), "GuardrailTopicPolicyAssessmentFilterSensitiveLog");
840
+ var GuardrailCustomWordFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
841
+ ...obj
842
+ }), "GuardrailCustomWordFilterSensitiveLog");
843
+ var GuardrailManagedWordFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
844
+ ...obj
845
+ }), "GuardrailManagedWordFilterSensitiveLog");
846
+ var GuardrailWordPolicyAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
847
+ ...obj,
848
+ ...obj.customWords && { customWords: import_smithy_client.SENSITIVE_STRING },
849
+ ...obj.managedWordLists && { managedWordLists: import_smithy_client.SENSITIVE_STRING }
850
+ }), "GuardrailWordPolicyAssessmentFilterSensitiveLog");
851
+ var GuardrailAssessmentFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
852
+ ...obj,
853
+ ...obj.topicPolicy && { topicPolicy: import_smithy_client.SENSITIVE_STRING },
854
+ ...obj.contentPolicy && { contentPolicy: import_smithy_client.SENSITIVE_STRING },
855
+ ...obj.wordPolicy && { wordPolicy: import_smithy_client.SENSITIVE_STRING },
856
+ ...obj.sensitiveInformationPolicy && { sensitiveInformationPolicy: import_smithy_client.SENSITIVE_STRING }
857
+ }), "GuardrailAssessmentFilterSensitiveLog");
858
+ var GuardrailTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
859
+ ...obj,
860
+ ...obj.inputAssessments && { inputAssessments: import_smithy_client.SENSITIVE_STRING },
861
+ ...obj.outputAssessments && { outputAssessments: import_smithy_client.SENSITIVE_STRING }
862
+ }), "GuardrailTraceFilterSensitiveLog");
721
863
  var KnowledgeBaseLookupInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
722
864
  ...obj,
723
865
  ...obj.text && { text: import_smithy_client.SENSITIVE_STRING },
@@ -810,6 +952,8 @@ var PreProcessingTraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
810
952
  return { [obj.$unknown[0]]: "UNKNOWN" };
811
953
  }, "PreProcessingTraceFilterSensitiveLog");
812
954
  var TraceFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
955
+ if (obj.guardrailTrace !== void 0)
956
+ return { guardrailTrace: import_smithy_client.SENSITIVE_STRING };
813
957
  if (obj.preProcessingTrace !== void 0)
814
958
  return { preProcessingTrace: import_smithy_client.SENSITIVE_STRING };
815
959
  if (obj.orchestrationTrace !== void 0)
@@ -1690,6 +1834,11 @@ var de_Trace = /* @__PURE__ */ __name((output, context) => {
1690
1834
  failureTrace: (0, import_smithy_client._json)(output.failureTrace)
1691
1835
  };
1692
1836
  }
1837
+ if (output.guardrailTrace != null) {
1838
+ return {
1839
+ guardrailTrace: (0, import_smithy_client._json)(output.guardrailTrace)
1840
+ };
1841
+ }
1693
1842
  if (output.orchestrationTrace != null) {
1694
1843
  return {
1695
1844
  orchestrationTrace: de_OrchestrationTrace((0, import_core2.awsExpectUnion)(output.orchestrationTrace), context)
@@ -1820,6 +1969,16 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
1820
1969
  InvocationInputMember,
1821
1970
  ServiceQuotaExceededException,
1822
1971
  ThrottlingException,
1972
+ GuardrailAction,
1973
+ GuardrailContentPolicyAction,
1974
+ GuardrailContentFilterConfidence,
1975
+ GuardrailContentFilterType,
1976
+ GuardrailSensitiveInformationPolicyAction,
1977
+ GuardrailPiiEntityType,
1978
+ GuardrailTopicPolicyAction,
1979
+ GuardrailTopicType,
1980
+ GuardrailWordPolicyAction,
1981
+ GuardrailManagedWordType,
1823
1982
  InvocationType,
1824
1983
  CreationMode,
1825
1984
  PromptType,
@@ -1854,6 +2013,18 @@ var paginateRetrieve = (0, import_core.createPaginator)(BedrockAgentRuntimeClien
1854
2013
  InvocationInputMemberFilterSensitiveLog,
1855
2014
  ReturnControlPayloadFilterSensitiveLog,
1856
2015
  FailureTraceFilterSensitiveLog,
2016
+ GuardrailContentFilterFilterSensitiveLog,
2017
+ GuardrailContentPolicyAssessmentFilterSensitiveLog,
2018
+ GuardrailPiiEntityFilterFilterSensitiveLog,
2019
+ GuardrailRegexFilterFilterSensitiveLog,
2020
+ GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog,
2021
+ GuardrailTopicFilterSensitiveLog,
2022
+ GuardrailTopicPolicyAssessmentFilterSensitiveLog,
2023
+ GuardrailCustomWordFilterSensitiveLog,
2024
+ GuardrailManagedWordFilterSensitiveLog,
2025
+ GuardrailWordPolicyAssessmentFilterSensitiveLog,
2026
+ GuardrailAssessmentFilterSensitiveLog,
2027
+ GuardrailTraceFilterSensitiveLog,
1857
2028
  KnowledgeBaseLookupInputFilterSensitiveLog,
1858
2029
  InvocationInputFilterSensitiveLog,
1859
2030
  ModelInvocationInputFilterSensitiveLog,
@@ -125,6 +125,76 @@ export class ThrottlingException extends __BaseException {
125
125
  Object.setPrototypeOf(this, ThrottlingException.prototype);
126
126
  }
127
127
  }
128
+ export const GuardrailAction = {
129
+ INTERVENED: "INTERVENED",
130
+ NONE: "NONE",
131
+ };
132
+ export const GuardrailContentPolicyAction = {
133
+ BLOCKED: "BLOCKED",
134
+ };
135
+ export const GuardrailContentFilterConfidence = {
136
+ HIGH: "HIGH",
137
+ LOW: "LOW",
138
+ MEDIUM: "MEDIUM",
139
+ NONE: "NONE",
140
+ };
141
+ export const GuardrailContentFilterType = {
142
+ HATE: "HATE",
143
+ INSULTS: "INSULTS",
144
+ MISCONDUCT: "MISCONDUCT",
145
+ PROMPT_ATTACK: "PROMPT_ATTACK",
146
+ SEXUAL: "SEXUAL",
147
+ VIOLENCE: "VIOLENCE",
148
+ };
149
+ export const GuardrailSensitiveInformationPolicyAction = {
150
+ ANONYMIZED: "ANONYMIZED",
151
+ BLOCKED: "BLOCKED",
152
+ };
153
+ export const GuardrailPiiEntityType = {
154
+ ADDRESS: "ADDRESS",
155
+ AGE: "AGE",
156
+ AWS_ACCESS_KEY: "AWS_ACCESS_KEY",
157
+ AWS_SECRET_KEY: "AWS_SECRET_KEY",
158
+ CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER",
159
+ CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER",
160
+ CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV",
161
+ CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY",
162
+ CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER",
163
+ DRIVER_ID: "DRIVER_ID",
164
+ EMAIL: "EMAIL",
165
+ INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
166
+ IP_ADDRESS: "IP_ADDRESS",
167
+ LICENSE_PLATE: "LICENSE_PLATE",
168
+ MAC_ADDRESS: "MAC_ADDRESS",
169
+ NAME: "NAME",
170
+ PASSWORD: "PASSWORD",
171
+ PHONE: "PHONE",
172
+ PIN: "PIN",
173
+ SWIFT_CODE: "SWIFT_CODE",
174
+ UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
175
+ UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER",
176
+ UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
177
+ URL: "URL",
178
+ USERNAME: "USERNAME",
179
+ US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER",
180
+ US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER",
181
+ US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
182
+ US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER",
183
+ US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER",
184
+ VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER",
185
+ };
186
+ export const GuardrailTopicPolicyAction = {
187
+ BLOCKED: "BLOCKED",
188
+ };
189
+ export const GuardrailTopicType = {
190
+ DENY: "DENY",
191
+ };
192
+ export const GuardrailWordPolicyAction = {
193
+ BLOCKED: "BLOCKED",
194
+ };
195
+ export const GuardrailManagedWordType = {
196
+ PROFANITY: "PROFANITY",
197
+ };
128
198
  export const InvocationType = {
129
199
  ACTION_GROUP: "ACTION_GROUP",
130
200
  FINISH: "FINISH",
@@ -189,6 +259,8 @@ export var PreProcessingTrace;
189
259
  export var Trace;
190
260
  (function (Trace) {
191
261
  Trace.visit = (value, visitor) => {
262
+ if (value.guardrailTrace !== undefined)
263
+ return visitor.guardrailTrace(value.guardrailTrace);
192
264
  if (value.preProcessingTrace !== undefined)
193
265
  return visitor.preProcessingTrace(value.preProcessingTrace);
194
266
  if (value.orchestrationTrace !== undefined)
@@ -383,6 +455,54 @@ export const FailureTraceFilterSensitiveLog = (obj) => ({
383
455
  ...obj,
384
456
  ...(obj.failureReason && { failureReason: SENSITIVE_STRING }),
385
457
  });
458
+ export const GuardrailContentFilterFilterSensitiveLog = (obj) => ({
459
+ ...obj,
460
+ });
461
+ export const GuardrailContentPolicyAssessmentFilterSensitiveLog = (obj) => ({
462
+ ...obj,
463
+ ...(obj.filters && { filters: SENSITIVE_STRING }),
464
+ });
465
+ export const GuardrailPiiEntityFilterFilterSensitiveLog = (obj) => ({
466
+ ...obj,
467
+ });
468
+ export const GuardrailRegexFilterFilterSensitiveLog = (obj) => ({
469
+ ...obj,
470
+ });
471
+ export const GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog = (obj) => ({
472
+ ...obj,
473
+ ...(obj.piiEntities && { piiEntities: SENSITIVE_STRING }),
474
+ ...(obj.regexes && { regexes: SENSITIVE_STRING }),
475
+ });
476
+ export const GuardrailTopicFilterSensitiveLog = (obj) => ({
477
+ ...obj,
478
+ });
479
+ export const GuardrailTopicPolicyAssessmentFilterSensitiveLog = (obj) => ({
480
+ ...obj,
481
+ ...(obj.topics && { topics: SENSITIVE_STRING }),
482
+ });
483
+ export const GuardrailCustomWordFilterSensitiveLog = (obj) => ({
484
+ ...obj,
485
+ });
486
+ export const GuardrailManagedWordFilterSensitiveLog = (obj) => ({
487
+ ...obj,
488
+ });
489
+ export const GuardrailWordPolicyAssessmentFilterSensitiveLog = (obj) => ({
490
+ ...obj,
491
+ ...(obj.customWords && { customWords: SENSITIVE_STRING }),
492
+ ...(obj.managedWordLists && { managedWordLists: SENSITIVE_STRING }),
493
+ });
494
+ export const GuardrailAssessmentFilterSensitiveLog = (obj) => ({
495
+ ...obj,
496
+ ...(obj.topicPolicy && { topicPolicy: SENSITIVE_STRING }),
497
+ ...(obj.contentPolicy && { contentPolicy: SENSITIVE_STRING }),
498
+ ...(obj.wordPolicy && { wordPolicy: SENSITIVE_STRING }),
499
+ ...(obj.sensitiveInformationPolicy && { sensitiveInformationPolicy: SENSITIVE_STRING }),
500
+ });
501
+ export const GuardrailTraceFilterSensitiveLog = (obj) => ({
502
+ ...obj,
503
+ ...(obj.inputAssessments && { inputAssessments: SENSITIVE_STRING }),
504
+ ...(obj.outputAssessments && { outputAssessments: SENSITIVE_STRING }),
505
+ });
386
506
  export const KnowledgeBaseLookupInputFilterSensitiveLog = (obj) => ({
387
507
  ...obj,
388
508
  ...(obj.text && { text: SENSITIVE_STRING }),
@@ -475,6 +595,8 @@ export const PreProcessingTraceFilterSensitiveLog = (obj) => {
475
595
  return { [obj.$unknown[0]]: "UNKNOWN" };
476
596
  };
477
597
  export const TraceFilterSensitiveLog = (obj) => {
598
+ if (obj.guardrailTrace !== undefined)
599
+ return { guardrailTrace: SENSITIVE_STRING };
478
600
  if (obj.preProcessingTrace !== undefined)
479
601
  return { preProcessingTrace: SENSITIVE_STRING };
480
602
  if (obj.orchestrationTrace !== undefined)
@@ -696,6 +696,11 @@ const de_Trace = (output, context) => {
696
696
  failureTrace: _json(output.failureTrace),
697
697
  };
698
698
  }
699
+ if (output.guardrailTrace != null) {
700
+ return {
701
+ guardrailTrace: _json(output.guardrailTrace),
702
+ };
703
+ }
699
704
  if (output.orchestrationTrace != null) {
700
705
  return {
701
706
  orchestrationTrace: de_OrchestrationTrace(__expectUnion(output.orchestrationTrace), context),
@@ -152,6 +152,118 @@ declare const InvokeAgentCommand_base: {
152
152
  * // sessionId: "STRING_VALUE",
153
153
  * // agentVersion: "STRING_VALUE",
154
154
  * // trace: { // Trace Union: only one key present
155
+ * // guardrailTrace: { // GuardrailTrace
156
+ * // action: "INTERVENED" || "NONE",
157
+ * // traceId: "STRING_VALUE",
158
+ * // inputAssessments: [ // GuardrailAssessmentList
159
+ * // { // GuardrailAssessment
160
+ * // topicPolicy: { // GuardrailTopicPolicyAssessment
161
+ * // topics: [ // GuardrailTopicList
162
+ * // { // GuardrailTopic
163
+ * // name: "STRING_VALUE",
164
+ * // type: "DENY",
165
+ * // action: "BLOCKED",
166
+ * // },
167
+ * // ],
168
+ * // },
169
+ * // contentPolicy: { // GuardrailContentPolicyAssessment
170
+ * // filters: [ // GuardrailContentFilterList
171
+ * // { // GuardrailContentFilter
172
+ * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK",
173
+ * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH",
174
+ * // action: "BLOCKED",
175
+ * // },
176
+ * // ],
177
+ * // },
178
+ * // wordPolicy: { // GuardrailWordPolicyAssessment
179
+ * // customWords: [ // GuardrailCustomWordList
180
+ * // { // GuardrailCustomWord
181
+ * // match: "STRING_VALUE",
182
+ * // action: "BLOCKED",
183
+ * // },
184
+ * // ],
185
+ * // managedWordLists: [ // GuardrailManagedWordList
186
+ * // { // GuardrailManagedWord
187
+ * // match: "STRING_VALUE",
188
+ * // type: "PROFANITY",
189
+ * // action: "BLOCKED",
190
+ * // },
191
+ * // ],
192
+ * // },
193
+ * // sensitiveInformationPolicy: { // GuardrailSensitiveInformationPolicyAssessment
194
+ * // piiEntities: [ // GuardrailPiiEntityFilterList
195
+ * // { // GuardrailPiiEntityFilter
196
+ * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER",
197
+ * // match: "STRING_VALUE",
198
+ * // action: "BLOCKED" || "ANONYMIZED",
199
+ * // },
200
+ * // ],
201
+ * // regexes: [ // GuardrailRegexFilterList
202
+ * // { // GuardrailRegexFilter
203
+ * // name: "STRING_VALUE",
204
+ * // regex: "STRING_VALUE",
205
+ * // match: "STRING_VALUE",
206
+ * // action: "BLOCKED" || "ANONYMIZED",
207
+ * // },
208
+ * // ],
209
+ * // },
210
+ * // },
211
+ * // ],
212
+ * // outputAssessments: [
213
+ * // {
214
+ * // topicPolicy: {
215
+ * // topics: [
216
+ * // {
217
+ * // name: "STRING_VALUE",
218
+ * // type: "DENY",
219
+ * // action: "BLOCKED",
220
+ * // },
221
+ * // ],
222
+ * // },
223
+ * // contentPolicy: {
224
+ * // filters: [
225
+ * // {
226
+ * // type: "INSULTS" || "HATE" || "SEXUAL" || "VIOLENCE" || "MISCONDUCT" || "PROMPT_ATTACK",
227
+ * // confidence: "NONE" || "LOW" || "MEDIUM" || "HIGH",
228
+ * // action: "BLOCKED",
229
+ * // },
230
+ * // ],
231
+ * // },
232
+ * // wordPolicy: {
233
+ * // customWords: [
234
+ * // {
235
+ * // match: "STRING_VALUE",
236
+ * // action: "BLOCKED",
237
+ * // },
238
+ * // ],
239
+ * // managedWordLists: [
240
+ * // {
241
+ * // match: "STRING_VALUE",
242
+ * // type: "PROFANITY",
243
+ * // action: "BLOCKED",
244
+ * // },
245
+ * // ],
246
+ * // },
247
+ * // sensitiveInformationPolicy: {
248
+ * // piiEntities: [
249
+ * // {
250
+ * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER",
251
+ * // match: "STRING_VALUE",
252
+ * // action: "BLOCKED" || "ANONYMIZED",
253
+ * // },
254
+ * // ],
255
+ * // regexes: [
256
+ * // {
257
+ * // name: "STRING_VALUE",
258
+ * // regex: "STRING_VALUE",
259
+ * // match: "STRING_VALUE",
260
+ * // action: "BLOCKED" || "ANONYMIZED",
261
+ * // },
262
+ * // ],
263
+ * // },
264
+ * // },
265
+ * // ],
266
+ * // },
155
267
  * // preProcessingTrace: { // PreProcessingTrace Union: only one key present
156
268
  * // modelInvocationInput: { // ModelInvocationInput
157
269
  * // traceId: "STRING_VALUE",
@@ -915,6 +915,388 @@ export interface FailureTrace {
915
915
  */
916
916
  failureReason?: string;
917
917
  }
918
+ /**
919
+ * @public
920
+ * @enum
921
+ */
922
+ export declare const GuardrailAction: {
923
+ readonly INTERVENED: "INTERVENED";
924
+ readonly NONE: "NONE";
925
+ };
926
+ /**
927
+ * @public
928
+ */
929
+ export type GuardrailAction = (typeof GuardrailAction)[keyof typeof GuardrailAction];
930
+ /**
931
+ * @public
932
+ * @enum
933
+ */
934
+ export declare const GuardrailContentPolicyAction: {
935
+ readonly BLOCKED: "BLOCKED";
936
+ };
937
+ /**
938
+ * @public
939
+ */
940
+ export type GuardrailContentPolicyAction = (typeof GuardrailContentPolicyAction)[keyof typeof GuardrailContentPolicyAction];
941
+ /**
942
+ * @public
943
+ * @enum
944
+ */
945
+ export declare const GuardrailContentFilterConfidence: {
946
+ readonly HIGH: "HIGH";
947
+ readonly LOW: "LOW";
948
+ readonly MEDIUM: "MEDIUM";
949
+ readonly NONE: "NONE";
950
+ };
951
+ /**
952
+ * @public
953
+ */
954
+ export type GuardrailContentFilterConfidence = (typeof GuardrailContentFilterConfidence)[keyof typeof GuardrailContentFilterConfidence];
955
+ /**
956
+ * @public
957
+ * @enum
958
+ */
959
+ export declare const GuardrailContentFilterType: {
960
+ readonly HATE: "HATE";
961
+ readonly INSULTS: "INSULTS";
962
+ readonly MISCONDUCT: "MISCONDUCT";
963
+ readonly PROMPT_ATTACK: "PROMPT_ATTACK";
964
+ readonly SEXUAL: "SEXUAL";
965
+ readonly VIOLENCE: "VIOLENCE";
966
+ };
967
+ /**
968
+ * @public
969
+ */
970
+ export type GuardrailContentFilterType = (typeof GuardrailContentFilterType)[keyof typeof GuardrailContentFilterType];
971
+ /**
972
+ * <p>Details of the content filter used in the Guardrail.</p>
973
+ * @public
974
+ */
975
+ export interface GuardrailContentFilter {
976
+ /**
977
+ * <p>The type of content detected in the filter by the Guardrail.</p>
978
+ * @public
979
+ */
980
+ type?: GuardrailContentFilterType;
981
+ /**
982
+ * <p>The confidence level regarding the content detected in the filter by the Guardrail.</p>
983
+ * @public
984
+ */
985
+ confidence?: GuardrailContentFilterConfidence;
986
+ /**
987
+ * <p>The action placed on the content by the Guardrail filter.</p>
988
+ * @public
989
+ */
990
+ action?: GuardrailContentPolicyAction;
991
+ }
992
+ /**
993
+ * <p>The details of the policy assessment in the Guardrails filter.</p>
994
+ * @public
995
+ */
996
+ export interface GuardrailContentPolicyAssessment {
997
+ /**
998
+ * <p>The filter details of the policy assessment used in the Guardrails filter.</p>
999
+ * @public
1000
+ */
1001
+ filters?: GuardrailContentFilter[];
1002
+ }
1003
+ /**
1004
+ * @public
1005
+ * @enum
1006
+ */
1007
+ export declare const GuardrailSensitiveInformationPolicyAction: {
1008
+ readonly ANONYMIZED: "ANONYMIZED";
1009
+ readonly BLOCKED: "BLOCKED";
1010
+ };
1011
+ /**
1012
+ * @public
1013
+ */
1014
+ export type GuardrailSensitiveInformationPolicyAction = (typeof GuardrailSensitiveInformationPolicyAction)[keyof typeof GuardrailSensitiveInformationPolicyAction];
1015
+ /**
1016
+ * @public
1017
+ * @enum
1018
+ */
1019
+ export declare const GuardrailPiiEntityType: {
1020
+ readonly ADDRESS: "ADDRESS";
1021
+ readonly AGE: "AGE";
1022
+ readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY";
1023
+ readonly AWS_SECRET_KEY: "AWS_SECRET_KEY";
1024
+ readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER";
1025
+ readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER";
1026
+ readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV";
1027
+ readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY";
1028
+ readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER";
1029
+ readonly DRIVER_ID: "DRIVER_ID";
1030
+ readonly EMAIL: "EMAIL";
1031
+ readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER";
1032
+ readonly IP_ADDRESS: "IP_ADDRESS";
1033
+ readonly LICENSE_PLATE: "LICENSE_PLATE";
1034
+ readonly MAC_ADDRESS: "MAC_ADDRESS";
1035
+ readonly NAME: "NAME";
1036
+ readonly PASSWORD: "PASSWORD";
1037
+ readonly PHONE: "PHONE";
1038
+ readonly PIN: "PIN";
1039
+ readonly SWIFT_CODE: "SWIFT_CODE";
1040
+ readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER";
1041
+ readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER";
1042
+ readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER";
1043
+ readonly URL: "URL";
1044
+ readonly USERNAME: "USERNAME";
1045
+ readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER";
1046
+ readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER";
1047
+ readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER";
1048
+ readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER";
1049
+ readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER";
1050
+ readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER";
1051
+ };
1052
+ /**
1053
+ * @public
1054
+ */
1055
+ export type GuardrailPiiEntityType = (typeof GuardrailPiiEntityType)[keyof typeof GuardrailPiiEntityType];
1056
+ /**
1057
+ * <p>The Guardrail filter to identify and remove personally identifiable information (PII).</p>
1058
+ * @public
1059
+ */
1060
+ export interface GuardrailPiiEntityFilter {
1061
+ /**
1062
+ * <p>The type of PII the Guardrail filter has identified and removed.</p>
1063
+ * @public
1064
+ */
1065
+ type?: GuardrailPiiEntityType;
1066
+ /**
1067
+ * <p>The match to settings in the Guardrail filter to identify and remove PII.</p>
1068
+ * @public
1069
+ */
1070
+ match?: string;
1071
+ /**
1072
+ * <p>The action of the Guardrail filter to identify and remove PII.</p>
1073
+ * @public
1074
+ */
1075
+ action?: GuardrailSensitiveInformationPolicyAction;
1076
+ }
1077
+ /**
1078
+ * <p>The details for the regex filter used in the Guardrail.</p>
1079
+ * @public
1080
+ */
1081
+ export interface GuardrailRegexFilter {
1082
+ /**
1083
+ * <p>The name details for the regex filter used in the Guardrail.</p>
1084
+ * @public
1085
+ */
1086
+ name?: string;
1087
+ /**
1088
+ * <p>The regex details for the regex filter used in the Guardrail.</p>
1089
+ * @public
1090
+ */
1091
+ regex?: string;
1092
+ /**
1093
+ * <p>The match details for the regex filter used in the Guardrail.</p>
1094
+ * @public
1095
+ */
1096
+ match?: string;
1097
+ /**
1098
+ * <p>The action details for the regex filter used in the Guardrail.</p>
1099
+ * @public
1100
+ */
1101
+ action?: GuardrailSensitiveInformationPolicyAction;
1102
+ }
1103
+ /**
1104
+ * <p>The details of the sensitive policy assessment used in the Guardrail.</p>
1105
+ * @public
1106
+ */
1107
+ export interface GuardrailSensitiveInformationPolicyAssessment {
1108
+ /**
1109
+ * <p>The details of the PII entities used in the sensitive policy assessment for the Guardrail.</p>
1110
+ * @public
1111
+ */
1112
+ piiEntities?: GuardrailPiiEntityFilter[];
1113
+ /**
1114
+ * <p>The details of the regexes used in the sensitive policy assessment for the Guardrail.</p>
1115
+ * @public
1116
+ */
1117
+ regexes?: GuardrailRegexFilter[];
1118
+ }
1119
+ /**
1120
+ * @public
1121
+ * @enum
1122
+ */
1123
+ export declare const GuardrailTopicPolicyAction: {
1124
+ readonly BLOCKED: "BLOCKED";
1125
+ };
1126
+ /**
1127
+ * @public
1128
+ */
1129
+ export type GuardrailTopicPolicyAction = (typeof GuardrailTopicPolicyAction)[keyof typeof GuardrailTopicPolicyAction];
1130
+ /**
1131
+ * @public
1132
+ * @enum
1133
+ */
1134
+ export declare const GuardrailTopicType: {
1135
+ readonly DENY: "DENY";
1136
+ };
1137
+ /**
1138
+ * @public
1139
+ */
1140
+ export type GuardrailTopicType = (typeof GuardrailTopicType)[keyof typeof GuardrailTopicType];
1141
+ /**
1142
+ * <p>The details for a specific topic defined in the Guardrail.</p>
1143
+ * @public
1144
+ */
1145
+ export interface GuardrailTopic {
1146
+ /**
1147
+ * <p>The name details on a specific topic in the Guardrail.</p>
1148
+ * @public
1149
+ */
1150
+ name?: string;
1151
+ /**
1152
+ * <p>The type details on a specific topic in the Guardrail.</p>
1153
+ * @public
1154
+ */
1155
+ type?: GuardrailTopicType;
1156
+ /**
1157
+ * <p>The action details on a specific topic in the Guardrail.</p>
1158
+ * @public
1159
+ */
1160
+ action?: GuardrailTopicPolicyAction;
1161
+ }
1162
+ /**
1163
+ * <p>The details of the policy assessment used in the Guardrail.</p>
1164
+ * @public
1165
+ */
1166
+ export interface GuardrailTopicPolicyAssessment {
1167
+ /**
1168
+ * <p>The topic details of the policy assessment used in the Guardrail.</p>
1169
+ * @public
1170
+ */
1171
+ topics?: GuardrailTopic[];
1172
+ }
1173
+ /**
1174
+ * @public
1175
+ * @enum
1176
+ */
1177
+ export declare const GuardrailWordPolicyAction: {
1178
+ readonly BLOCKED: "BLOCKED";
1179
+ };
1180
+ /**
1181
+ * @public
1182
+ */
1183
+ export type GuardrailWordPolicyAction = (typeof GuardrailWordPolicyAction)[keyof typeof GuardrailWordPolicyAction];
1184
+ /**
1185
+ * <p>The custom word details for the filter in the Guardrail.</p>
1186
+ * @public
1187
+ */
1188
+ export interface GuardrailCustomWord {
1189
+ /**
1190
+ * <p>The match details for the custom word filter in the Guardrail.</p>
1191
+ * @public
1192
+ */
1193
+ match?: string;
1194
+ /**
1195
+ * <p>The action details for the custom word filter in the Guardrail.</p>
1196
+ * @public
1197
+ */
1198
+ action?: GuardrailWordPolicyAction;
1199
+ }
1200
+ /**
1201
+ * @public
1202
+ * @enum
1203
+ */
1204
+ export declare const GuardrailManagedWordType: {
1205
+ readonly PROFANITY: "PROFANITY";
1206
+ };
1207
+ /**
1208
+ * @public
1209
+ */
1210
+ export type GuardrailManagedWordType = (typeof GuardrailManagedWordType)[keyof typeof GuardrailManagedWordType];
1211
+ /**
1212
+ * <p>The managed word details for the filter in the Guardrail.</p>
1213
+ * @public
1214
+ */
1215
+ export interface GuardrailManagedWord {
1216
+ /**
1217
+ * <p>The match details for the managed word filter in the Guardrail.</p>
1218
+ * @public
1219
+ */
1220
+ match?: string;
1221
+ /**
1222
+ * <p>The type details for the managed word filter in the Guardrail.</p>
1223
+ * @public
1224
+ */
1225
+ type?: GuardrailManagedWordType;
1226
+ /**
1227
+ * <p>The action details for the managed word filter in the Guardrail.</p>
1228
+ * @public
1229
+ */
1230
+ action?: GuardrailWordPolicyAction;
1231
+ }
1232
+ /**
1233
+ * <p>The assessment details for words defined in the Guardrail filter.</p>
1234
+ * @public
1235
+ */
1236
+ export interface GuardrailWordPolicyAssessment {
1237
+ /**
1238
+ * <p>The custom word details for words defined in the Guardrail filter.</p>
1239
+ * @public
1240
+ */
1241
+ customWords?: GuardrailCustomWord[];
1242
+ /**
1243
+ * <p>The managed word lists for words defined in the Guardrail filter.</p>
1244
+ * @public
1245
+ */
1246
+ managedWordLists?: GuardrailManagedWord[];
1247
+ }
1248
+ /**
1249
+ * <p>Assessment details of the content analyzed by Guardrails.</p>
1250
+ * @public
1251
+ */
1252
+ export interface GuardrailAssessment {
1253
+ /**
1254
+ * <p>Topic policy details of the Guardrail.</p>
1255
+ * @public
1256
+ */
1257
+ topicPolicy?: GuardrailTopicPolicyAssessment;
1258
+ /**
1259
+ * <p>Content policy details of the Guardrail.</p>
1260
+ * @public
1261
+ */
1262
+ contentPolicy?: GuardrailContentPolicyAssessment;
1263
+ /**
1264
+ * <p>Word policy details of the Guardrail.</p>
1265
+ * @public
1266
+ */
1267
+ wordPolicy?: GuardrailWordPolicyAssessment;
1268
+ /**
1269
+ * <p>Sensitive Information policy details of Guardrail.</p>
1270
+ * @public
1271
+ */
1272
+ sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment;
1273
+ }
1274
+ /**
1275
+ * <p>The trace details used in the Guardrail.</p>
1276
+ * @public
1277
+ */
1278
+ export interface GuardrailTrace {
1279
+ /**
1280
+ * <p>The trace action details used with the Guardrail.</p>
1281
+ * @public
1282
+ */
1283
+ action?: GuardrailAction;
1284
+ /**
1285
+ * <p>The details of the trace Id used in the Guardrail Trace.</p>
1286
+ * @public
1287
+ */
1288
+ traceId?: string;
1289
+ /**
1290
+ * <p>The details of the input assessments used in the Guardrail Trace.</p>
1291
+ * @public
1292
+ */
1293
+ inputAssessments?: GuardrailAssessment[];
1294
+ /**
1295
+ * <p>The details of the output assessments used in the Guardrail Trace.</p>
1296
+ * @public
1297
+ */
1298
+ outputAssessments?: GuardrailAssessment[];
1299
+ }
918
1300
  /**
919
1301
  * @public
920
1302
  * @enum
@@ -1471,16 +1853,29 @@ export declare namespace PreProcessingTrace {
1471
1853
  * <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>
1472
1854
  * @public
1473
1855
  */
1474
- export type Trace = Trace.FailureTraceMember | Trace.OrchestrationTraceMember | Trace.PostProcessingTraceMember | Trace.PreProcessingTraceMember | Trace.$UnknownMember;
1856
+ export type Trace = Trace.FailureTraceMember | Trace.GuardrailTraceMember | Trace.OrchestrationTraceMember | Trace.PostProcessingTraceMember | Trace.PreProcessingTraceMember | Trace.$UnknownMember;
1475
1857
  /**
1476
1858
  * @public
1477
1859
  */
1478
1860
  export declare namespace Trace {
1861
+ /**
1862
+ * <p>The trace details for a trace defined in the Guardrail filter.</p>
1863
+ * @public
1864
+ */
1865
+ interface GuardrailTraceMember {
1866
+ guardrailTrace: GuardrailTrace;
1867
+ preProcessingTrace?: never;
1868
+ orchestrationTrace?: never;
1869
+ postProcessingTrace?: never;
1870
+ failureTrace?: never;
1871
+ $unknown?: never;
1872
+ }
1479
1873
  /**
1480
1874
  * <p>Details about the pre-processing step, in which the agent contextualizes and categorizes user inputs.</p>
1481
1875
  * @public
1482
1876
  */
1483
1877
  interface PreProcessingTraceMember {
1878
+ guardrailTrace?: never;
1484
1879
  preProcessingTrace: PreProcessingTrace;
1485
1880
  orchestrationTrace?: never;
1486
1881
  postProcessingTrace?: never;
@@ -1492,6 +1887,7 @@ export declare namespace Trace {
1492
1887
  * @public
1493
1888
  */
1494
1889
  interface OrchestrationTraceMember {
1890
+ guardrailTrace?: never;
1495
1891
  preProcessingTrace?: never;
1496
1892
  orchestrationTrace: OrchestrationTrace;
1497
1893
  postProcessingTrace?: never;
@@ -1503,6 +1899,7 @@ export declare namespace Trace {
1503
1899
  * @public
1504
1900
  */
1505
1901
  interface PostProcessingTraceMember {
1902
+ guardrailTrace?: never;
1506
1903
  preProcessingTrace?: never;
1507
1904
  orchestrationTrace?: never;
1508
1905
  postProcessingTrace: PostProcessingTrace;
@@ -1514,6 +1911,7 @@ export declare namespace Trace {
1514
1911
  * @public
1515
1912
  */
1516
1913
  interface FailureTraceMember {
1914
+ guardrailTrace?: never;
1517
1915
  preProcessingTrace?: never;
1518
1916
  orchestrationTrace?: never;
1519
1917
  postProcessingTrace?: never;
@@ -1524,6 +1922,7 @@ export declare namespace Trace {
1524
1922
  * @public
1525
1923
  */
1526
1924
  interface $UnknownMember {
1925
+ guardrailTrace?: never;
1527
1926
  preProcessingTrace?: never;
1528
1927
  orchestrationTrace?: never;
1529
1928
  postProcessingTrace?: never;
@@ -1531,6 +1930,7 @@ export declare namespace Trace {
1531
1930
  $unknown: [string, any];
1532
1931
  }
1533
1932
  interface Visitor<T> {
1933
+ guardrailTrace: (value: GuardrailTrace) => T;
1534
1934
  preProcessingTrace: (value: PreProcessingTrace) => T;
1535
1935
  orchestrationTrace: (value: OrchestrationTrace) => T;
1536
1936
  postProcessingTrace: (value: PostProcessingTrace) => T;
@@ -2934,6 +3334,54 @@ export declare const ReturnControlPayloadFilterSensitiveLog: (obj: ReturnControl
2934
3334
  * @internal
2935
3335
  */
2936
3336
  export declare const FailureTraceFilterSensitiveLog: (obj: FailureTrace) => any;
3337
+ /**
3338
+ * @internal
3339
+ */
3340
+ export declare const GuardrailContentFilterFilterSensitiveLog: (obj: GuardrailContentFilter) => any;
3341
+ /**
3342
+ * @internal
3343
+ */
3344
+ export declare const GuardrailContentPolicyAssessmentFilterSensitiveLog: (obj: GuardrailContentPolicyAssessment) => any;
3345
+ /**
3346
+ * @internal
3347
+ */
3348
+ export declare const GuardrailPiiEntityFilterFilterSensitiveLog: (obj: GuardrailPiiEntityFilter) => any;
3349
+ /**
3350
+ * @internal
3351
+ */
3352
+ export declare const GuardrailRegexFilterFilterSensitiveLog: (obj: GuardrailRegexFilter) => any;
3353
+ /**
3354
+ * @internal
3355
+ */
3356
+ export declare const GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog: (obj: GuardrailSensitiveInformationPolicyAssessment) => any;
3357
+ /**
3358
+ * @internal
3359
+ */
3360
+ export declare const GuardrailTopicFilterSensitiveLog: (obj: GuardrailTopic) => any;
3361
+ /**
3362
+ * @internal
3363
+ */
3364
+ export declare const GuardrailTopicPolicyAssessmentFilterSensitiveLog: (obj: GuardrailTopicPolicyAssessment) => any;
3365
+ /**
3366
+ * @internal
3367
+ */
3368
+ export declare const GuardrailCustomWordFilterSensitiveLog: (obj: GuardrailCustomWord) => any;
3369
+ /**
3370
+ * @internal
3371
+ */
3372
+ export declare const GuardrailManagedWordFilterSensitiveLog: (obj: GuardrailManagedWord) => any;
3373
+ /**
3374
+ * @internal
3375
+ */
3376
+ export declare const GuardrailWordPolicyAssessmentFilterSensitiveLog: (obj: GuardrailWordPolicyAssessment) => any;
3377
+ /**
3378
+ * @internal
3379
+ */
3380
+ export declare const GuardrailAssessmentFilterSensitiveLog: (obj: GuardrailAssessment) => any;
3381
+ /**
3382
+ * @internal
3383
+ */
3384
+ export declare const GuardrailTraceFilterSensitiveLog: (obj: GuardrailTrace) => any;
2937
3385
  /**
2938
3386
  * @internal
2939
3387
  */
@@ -245,6 +245,152 @@ export interface FailureTrace {
245
245
  traceId?: string;
246
246
  failureReason?: string;
247
247
  }
248
+ export declare const GuardrailAction: {
249
+ readonly INTERVENED: "INTERVENED";
250
+ readonly NONE: "NONE";
251
+ };
252
+ export type GuardrailAction =
253
+ (typeof GuardrailAction)[keyof typeof GuardrailAction];
254
+ export declare const GuardrailContentPolicyAction: {
255
+ readonly BLOCKED: "BLOCKED";
256
+ };
257
+ export type GuardrailContentPolicyAction =
258
+ (typeof GuardrailContentPolicyAction)[keyof typeof GuardrailContentPolicyAction];
259
+ export declare const GuardrailContentFilterConfidence: {
260
+ readonly HIGH: "HIGH";
261
+ readonly LOW: "LOW";
262
+ readonly MEDIUM: "MEDIUM";
263
+ readonly NONE: "NONE";
264
+ };
265
+ export type GuardrailContentFilterConfidence =
266
+ (typeof GuardrailContentFilterConfidence)[keyof typeof GuardrailContentFilterConfidence];
267
+ export declare const GuardrailContentFilterType: {
268
+ readonly HATE: "HATE";
269
+ readonly INSULTS: "INSULTS";
270
+ readonly MISCONDUCT: "MISCONDUCT";
271
+ readonly PROMPT_ATTACK: "PROMPT_ATTACK";
272
+ readonly SEXUAL: "SEXUAL";
273
+ readonly VIOLENCE: "VIOLENCE";
274
+ };
275
+ export type GuardrailContentFilterType =
276
+ (typeof GuardrailContentFilterType)[keyof typeof GuardrailContentFilterType];
277
+ export interface GuardrailContentFilter {
278
+ type?: GuardrailContentFilterType;
279
+ confidence?: GuardrailContentFilterConfidence;
280
+ action?: GuardrailContentPolicyAction;
281
+ }
282
+ export interface GuardrailContentPolicyAssessment {
283
+ filters?: GuardrailContentFilter[];
284
+ }
285
+ export declare const GuardrailSensitiveInformationPolicyAction: {
286
+ readonly ANONYMIZED: "ANONYMIZED";
287
+ readonly BLOCKED: "BLOCKED";
288
+ };
289
+ export type GuardrailSensitiveInformationPolicyAction =
290
+ (typeof GuardrailSensitiveInformationPolicyAction)[keyof typeof GuardrailSensitiveInformationPolicyAction];
291
+ export declare const GuardrailPiiEntityType: {
292
+ readonly ADDRESS: "ADDRESS";
293
+ readonly AGE: "AGE";
294
+ readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY";
295
+ readonly AWS_SECRET_KEY: "AWS_SECRET_KEY";
296
+ readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER";
297
+ readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER";
298
+ readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV";
299
+ readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY";
300
+ readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER";
301
+ readonly DRIVER_ID: "DRIVER_ID";
302
+ readonly EMAIL: "EMAIL";
303
+ readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER";
304
+ readonly IP_ADDRESS: "IP_ADDRESS";
305
+ readonly LICENSE_PLATE: "LICENSE_PLATE";
306
+ readonly MAC_ADDRESS: "MAC_ADDRESS";
307
+ readonly NAME: "NAME";
308
+ readonly PASSWORD: "PASSWORD";
309
+ readonly PHONE: "PHONE";
310
+ readonly PIN: "PIN";
311
+ readonly SWIFT_CODE: "SWIFT_CODE";
312
+ readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER";
313
+ readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER";
314
+ readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER";
315
+ readonly URL: "URL";
316
+ readonly USERNAME: "USERNAME";
317
+ readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER";
318
+ readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER";
319
+ readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER";
320
+ readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER";
321
+ readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER";
322
+ readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER";
323
+ };
324
+ export type GuardrailPiiEntityType =
325
+ (typeof GuardrailPiiEntityType)[keyof typeof GuardrailPiiEntityType];
326
+ export interface GuardrailPiiEntityFilter {
327
+ type?: GuardrailPiiEntityType;
328
+ match?: string;
329
+ action?: GuardrailSensitiveInformationPolicyAction;
330
+ }
331
+ export interface GuardrailRegexFilter {
332
+ name?: string;
333
+ regex?: string;
334
+ match?: string;
335
+ action?: GuardrailSensitiveInformationPolicyAction;
336
+ }
337
+ export interface GuardrailSensitiveInformationPolicyAssessment {
338
+ piiEntities?: GuardrailPiiEntityFilter[];
339
+ regexes?: GuardrailRegexFilter[];
340
+ }
341
+ export declare const GuardrailTopicPolicyAction: {
342
+ readonly BLOCKED: "BLOCKED";
343
+ };
344
+ export type GuardrailTopicPolicyAction =
345
+ (typeof GuardrailTopicPolicyAction)[keyof typeof GuardrailTopicPolicyAction];
346
+ export declare const GuardrailTopicType: {
347
+ readonly DENY: "DENY";
348
+ };
349
+ export type GuardrailTopicType =
350
+ (typeof GuardrailTopicType)[keyof typeof GuardrailTopicType];
351
+ export interface GuardrailTopic {
352
+ name?: string;
353
+ type?: GuardrailTopicType;
354
+ action?: GuardrailTopicPolicyAction;
355
+ }
356
+ export interface GuardrailTopicPolicyAssessment {
357
+ topics?: GuardrailTopic[];
358
+ }
359
+ export declare const GuardrailWordPolicyAction: {
360
+ readonly BLOCKED: "BLOCKED";
361
+ };
362
+ export type GuardrailWordPolicyAction =
363
+ (typeof GuardrailWordPolicyAction)[keyof typeof GuardrailWordPolicyAction];
364
+ export interface GuardrailCustomWord {
365
+ match?: string;
366
+ action?: GuardrailWordPolicyAction;
367
+ }
368
+ export declare const GuardrailManagedWordType: {
369
+ readonly PROFANITY: "PROFANITY";
370
+ };
371
+ export type GuardrailManagedWordType =
372
+ (typeof GuardrailManagedWordType)[keyof typeof GuardrailManagedWordType];
373
+ export interface GuardrailManagedWord {
374
+ match?: string;
375
+ type?: GuardrailManagedWordType;
376
+ action?: GuardrailWordPolicyAction;
377
+ }
378
+ export interface GuardrailWordPolicyAssessment {
379
+ customWords?: GuardrailCustomWord[];
380
+ managedWordLists?: GuardrailManagedWord[];
381
+ }
382
+ export interface GuardrailAssessment {
383
+ topicPolicy?: GuardrailTopicPolicyAssessment;
384
+ contentPolicy?: GuardrailContentPolicyAssessment;
385
+ wordPolicy?: GuardrailWordPolicyAssessment;
386
+ sensitiveInformationPolicy?: GuardrailSensitiveInformationPolicyAssessment;
387
+ }
388
+ export interface GuardrailTrace {
389
+ action?: GuardrailAction;
390
+ traceId?: string;
391
+ inputAssessments?: GuardrailAssessment[];
392
+ outputAssessments?: GuardrailAssessment[];
393
+ }
248
394
  export declare const InvocationType: {
249
395
  readonly ACTION_GROUP: "ACTION_GROUP";
250
396
  readonly FINISH: "FINISH";
@@ -448,12 +594,22 @@ export declare namespace PreProcessingTrace {
448
594
  }
449
595
  export type Trace =
450
596
  | Trace.FailureTraceMember
597
+ | Trace.GuardrailTraceMember
451
598
  | Trace.OrchestrationTraceMember
452
599
  | Trace.PostProcessingTraceMember
453
600
  | Trace.PreProcessingTraceMember
454
601
  | Trace.$UnknownMember;
455
602
  export declare namespace Trace {
603
+ interface GuardrailTraceMember {
604
+ guardrailTrace: GuardrailTrace;
605
+ preProcessingTrace?: never;
606
+ orchestrationTrace?: never;
607
+ postProcessingTrace?: never;
608
+ failureTrace?: never;
609
+ $unknown?: never;
610
+ }
456
611
  interface PreProcessingTraceMember {
612
+ guardrailTrace?: never;
457
613
  preProcessingTrace: PreProcessingTrace;
458
614
  orchestrationTrace?: never;
459
615
  postProcessingTrace?: never;
@@ -461,6 +617,7 @@ export declare namespace Trace {
461
617
  $unknown?: never;
462
618
  }
463
619
  interface OrchestrationTraceMember {
620
+ guardrailTrace?: never;
464
621
  preProcessingTrace?: never;
465
622
  orchestrationTrace: OrchestrationTrace;
466
623
  postProcessingTrace?: never;
@@ -468,6 +625,7 @@ export declare namespace Trace {
468
625
  $unknown?: never;
469
626
  }
470
627
  interface PostProcessingTraceMember {
628
+ guardrailTrace?: never;
471
629
  preProcessingTrace?: never;
472
630
  orchestrationTrace?: never;
473
631
  postProcessingTrace: PostProcessingTrace;
@@ -475,6 +633,7 @@ export declare namespace Trace {
475
633
  $unknown?: never;
476
634
  }
477
635
  interface FailureTraceMember {
636
+ guardrailTrace?: never;
478
637
  preProcessingTrace?: never;
479
638
  orchestrationTrace?: never;
480
639
  postProcessingTrace?: never;
@@ -482,6 +641,7 @@ export declare namespace Trace {
482
641
  $unknown?: never;
483
642
  }
484
643
  interface $UnknownMember {
644
+ guardrailTrace?: never;
485
645
  preProcessingTrace?: never;
486
646
  orchestrationTrace?: never;
487
647
  postProcessingTrace?: never;
@@ -489,6 +649,7 @@ export declare namespace Trace {
489
649
  $unknown: [string, any];
490
650
  }
491
651
  interface Visitor<T> {
652
+ guardrailTrace: (value: GuardrailTrace) => T;
492
653
  preProcessingTrace: (value: PreProcessingTrace) => T;
493
654
  orchestrationTrace: (value: OrchestrationTrace) => T;
494
655
  postProcessingTrace: (value: PostProcessingTrace) => T;
@@ -1175,6 +1336,42 @@ export declare const ReturnControlPayloadFilterSensitiveLog: (
1175
1336
  obj: ReturnControlPayload
1176
1337
  ) => any;
1177
1338
  export declare const FailureTraceFilterSensitiveLog: (obj: FailureTrace) => any;
1339
+ export declare const GuardrailContentFilterFilterSensitiveLog: (
1340
+ obj: GuardrailContentFilter
1341
+ ) => any;
1342
+ export declare const GuardrailContentPolicyAssessmentFilterSensitiveLog: (
1343
+ obj: GuardrailContentPolicyAssessment
1344
+ ) => any;
1345
+ export declare const GuardrailPiiEntityFilterFilterSensitiveLog: (
1346
+ obj: GuardrailPiiEntityFilter
1347
+ ) => any;
1348
+ export declare const GuardrailRegexFilterFilterSensitiveLog: (
1349
+ obj: GuardrailRegexFilter
1350
+ ) => any;
1351
+ export declare const GuardrailSensitiveInformationPolicyAssessmentFilterSensitiveLog: (
1352
+ obj: GuardrailSensitiveInformationPolicyAssessment
1353
+ ) => any;
1354
+ export declare const GuardrailTopicFilterSensitiveLog: (
1355
+ obj: GuardrailTopic
1356
+ ) => any;
1357
+ export declare const GuardrailTopicPolicyAssessmentFilterSensitiveLog: (
1358
+ obj: GuardrailTopicPolicyAssessment
1359
+ ) => any;
1360
+ export declare const GuardrailCustomWordFilterSensitiveLog: (
1361
+ obj: GuardrailCustomWord
1362
+ ) => any;
1363
+ export declare const GuardrailManagedWordFilterSensitiveLog: (
1364
+ obj: GuardrailManagedWord
1365
+ ) => any;
1366
+ export declare const GuardrailWordPolicyAssessmentFilterSensitiveLog: (
1367
+ obj: GuardrailWordPolicyAssessment
1368
+ ) => any;
1369
+ export declare const GuardrailAssessmentFilterSensitiveLog: (
1370
+ obj: GuardrailAssessment
1371
+ ) => any;
1372
+ export declare const GuardrailTraceFilterSensitiveLog: (
1373
+ obj: GuardrailTrace
1374
+ ) => any;
1178
1375
  export declare const KnowledgeBaseLookupInputFilterSensitiveLog: (
1179
1376
  obj: KnowledgeBaseLookupInput
1180
1377
  ) => any;
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.577.0",
4
+ "version": "3.580.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",