@aws-sdk/client-bedrock-agent 3.764.0 → 3.765.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
@@ -560,7 +560,10 @@ var FunctionSchema;
560
560
  })(FunctionSchema || (FunctionSchema = {}));
561
561
  var ActionGroupSignature = {
562
562
  AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter",
563
- AMAZON_USERINPUT: "AMAZON.UserInput"
563
+ AMAZON_USERINPUT: "AMAZON.UserInput",
564
+ ANTHROPIC_BASH: "ANTHROPIC.Bash",
565
+ ANTHROPIC_COMPUTER: "ANTHROPIC.Computer",
566
+ ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor"
564
567
  };
565
568
  var InternalServerException = class _InternalServerException extends BedrockAgentServiceException {
566
569
  static {
@@ -1624,7 +1627,8 @@ var se_CreateAgentActionGroupCommand = /* @__PURE__ */ __name(async (input, cont
1624
1627
  clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
1625
1628
  description: [],
1626
1629
  functionSchema: (_) => (0, import_smithy_client._json)(_),
1627
- parentActionGroupSignature: []
1630
+ parentActionGroupSignature: [],
1631
+ parentActionGroupSignatureParams: (_) => (0, import_smithy_client._json)(_)
1628
1632
  })
1629
1633
  );
1630
1634
  b.m("PUT").h(headers).b(body);
@@ -2469,7 +2473,8 @@ var se_UpdateAgentActionGroupCommand = /* @__PURE__ */ __name(async (input, cont
2469
2473
  apiSchema: (_) => (0, import_smithy_client._json)(_),
2470
2474
  description: [],
2471
2475
  functionSchema: (_) => (0, import_smithy_client._json)(_),
2472
- parentActionGroupSignature: []
2476
+ parentActionGroupSignature: [],
2477
+ parentActionGroupSignatureParams: (_) => (0, import_smithy_client._json)(_)
2473
2478
  })
2474
2479
  );
2475
2480
  b.m("PUT").h(headers).b(body);
@@ -4195,6 +4200,7 @@ var de_AgentActionGroup = /* @__PURE__ */ __name((output, context) => {
4195
4200
  createdAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_)),
4196
4201
  description: import_smithy_client.expectString,
4197
4202
  functionSchema: (_) => (0, import_smithy_client._json)((0, import_core2.awsExpectUnion)(_)),
4203
+ parentActionGroupSignatureParams: import_smithy_client._json,
4198
4204
  parentActionSignature: import_smithy_client.expectString,
4199
4205
  updatedAt: (_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(_))
4200
4206
  });
@@ -73,6 +73,9 @@ export var FunctionSchema;
73
73
  export const ActionGroupSignature = {
74
74
  AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter",
75
75
  AMAZON_USERINPUT: "AMAZON.UserInput",
76
+ ANTHROPIC_BASH: "ANTHROPIC.Bash",
77
+ ANTHROPIC_COMPUTER: "ANTHROPIC.Computer",
78
+ ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor",
76
79
  };
77
80
  export class InternalServerException extends __BaseException {
78
81
  name = "InternalServerException";
@@ -85,6 +85,7 @@ export const se_CreateAgentActionGroupCommand = async (input, context) => {
85
85
  description: [],
86
86
  functionSchema: (_) => _json(_),
87
87
  parentActionGroupSignature: [],
88
+ parentActionGroupSignatureParams: (_) => _json(_),
88
89
  }));
89
90
  b.m("PUT").h(headers).b(body);
90
91
  return b.build();
@@ -880,6 +881,7 @@ export const se_UpdateAgentActionGroupCommand = async (input, context) => {
880
881
  description: [],
881
882
  functionSchema: (_) => _json(_),
882
883
  parentActionGroupSignature: [],
884
+ parentActionGroupSignatureParams: (_) => _json(_),
883
885
  }));
884
886
  b.m("PUT").h(headers).b(body);
885
887
  return b.build();
@@ -2600,6 +2602,7 @@ const de_AgentActionGroup = (output, context) => {
2600
2602
  createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2601
2603
  description: __expectString,
2602
2604
  functionSchema: (_) => _json(__expectUnion(_)),
2605
+ parentActionGroupSignatureParams: _json,
2603
2606
  parentActionSignature: __expectString,
2604
2607
  updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2605
2608
  });
@@ -45,7 +45,10 @@ declare const CreateAgentActionGroupCommand_base: {
45
45
  * actionGroupName: "STRING_VALUE", // required
46
46
  * clientToken: "STRING_VALUE",
47
47
  * description: "STRING_VALUE",
48
- * parentActionGroupSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter",
48
+ * parentActionGroupSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter" || "ANTHROPIC.Computer" || "ANTHROPIC.Bash" || "ANTHROPIC.TextEditor",
49
+ * parentActionGroupSignatureParams: { // ActionGroupSignatureParams
50
+ * "<keys>": "STRING_VALUE",
51
+ * },
49
52
  * actionGroupExecutor: { // ActionGroupExecutor Union: only one key present
50
53
  * lambda: "STRING_VALUE",
51
54
  * customControl: "RETURN_CONTROL",
@@ -87,7 +90,10 @@ declare const CreateAgentActionGroupCommand_base: {
87
90
  * // description: "STRING_VALUE",
88
91
  * // createdAt: new Date("TIMESTAMP"), // required
89
92
  * // updatedAt: new Date("TIMESTAMP"), // required
90
- * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter",
93
+ * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter" || "ANTHROPIC.Computer" || "ANTHROPIC.Bash" || "ANTHROPIC.TextEditor",
94
+ * // parentActionGroupSignatureParams: { // ActionGroupSignatureParams
95
+ * // "<keys>": "STRING_VALUE",
96
+ * // },
91
97
  * // actionGroupExecutor: { // ActionGroupExecutor Union: only one key present
92
98
  * // lambda: "STRING_VALUE",
93
99
  * // customControl: "RETURN_CONTROL",
@@ -51,7 +51,10 @@ declare const GetAgentActionGroupCommand_base: {
51
51
  * // description: "STRING_VALUE",
52
52
  * // createdAt: new Date("TIMESTAMP"), // required
53
53
  * // updatedAt: new Date("TIMESTAMP"), // required
54
- * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter",
54
+ * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter" || "ANTHROPIC.Computer" || "ANTHROPIC.Bash" || "ANTHROPIC.TextEditor",
55
+ * // parentActionGroupSignatureParams: { // ActionGroupSignatureParams
56
+ * // "<keys>": "STRING_VALUE",
57
+ * // },
55
58
  * // actionGroupExecutor: { // ActionGroupExecutor Union: only one key present
56
59
  * // lambda: "STRING_VALUE",
57
60
  * // customControl: "RETURN_CONTROL",
@@ -40,7 +40,10 @@ declare const UpdateAgentActionGroupCommand_base: {
40
40
  * actionGroupId: "STRING_VALUE", // required
41
41
  * actionGroupName: "STRING_VALUE", // required
42
42
  * description: "STRING_VALUE",
43
- * parentActionGroupSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter",
43
+ * parentActionGroupSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter" || "ANTHROPIC.Computer" || "ANTHROPIC.Bash" || "ANTHROPIC.TextEditor",
44
+ * parentActionGroupSignatureParams: { // ActionGroupSignatureParams
45
+ * "<keys>": "STRING_VALUE",
46
+ * },
44
47
  * actionGroupExecutor: { // ActionGroupExecutor Union: only one key present
45
48
  * lambda: "STRING_VALUE",
46
49
  * customControl: "RETURN_CONTROL",
@@ -82,7 +85,10 @@ declare const UpdateAgentActionGroupCommand_base: {
82
85
  * // description: "STRING_VALUE",
83
86
  * // createdAt: new Date("TIMESTAMP"), // required
84
87
  * // updatedAt: new Date("TIMESTAMP"), // required
85
- * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter",
88
+ * // parentActionSignature: "AMAZON.UserInput" || "AMAZON.CodeInterpreter" || "ANTHROPIC.Computer" || "ANTHROPIC.Bash" || "ANTHROPIC.TextEditor",
89
+ * // parentActionGroupSignatureParams: { // ActionGroupSignatureParams
90
+ * // "<keys>": "STRING_VALUE",
91
+ * // },
86
92
  * // actionGroupExecutor: { // ActionGroupExecutor Union: only one key present
87
93
  * // lambda: "STRING_VALUE",
88
94
  * // customControl: "RETURN_CONTROL",
@@ -343,6 +343,9 @@ export declare namespace FunctionSchema {
343
343
  export declare const ActionGroupSignature: {
344
344
  readonly AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter";
345
345
  readonly AMAZON_USERINPUT: "AMAZON.UserInput";
346
+ readonly ANTHROPIC_BASH: "ANTHROPIC.Bash";
347
+ readonly ANTHROPIC_COMPUTER: "ANTHROPIC.Computer";
348
+ readonly ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor";
346
349
  };
347
350
  /**
348
351
  * @public
@@ -379,12 +382,54 @@ export interface CreateAgentActionGroupRequest {
379
382
  */
380
383
  description?: string | undefined;
381
384
  /**
382
- * <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group.</p>
383
- * <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>. You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group.</p>
384
- * <p>During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html">Observation</a> reprompting the user for more information.</p>
385
+ * <p>Specify a built-in or computer use action for this action group. If you specify a value, you must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields empty for this action group. </p>
386
+ * <ul>
387
+ * <li>
388
+ * <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. </p>
389
+ * </li>
390
+ * <li>
391
+ * <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>.</p>
392
+ * </li>
393
+ * <li>
394
+ * <p>To allow your agent to use an Anthropic computer use tool, specify one of the following values. </p>
395
+ * <important>
396
+ * <p>
397
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only.
398
+ * When operating computer use functionality, we recommend taking additional security precautions,
399
+ * such as executing computer actions in virtual environments with restricted data access and limited internet connectivity.
400
+ * For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
401
+ * </p>
402
+ * </important>
403
+ * <ul>
404
+ * <li>
405
+ * <p>
406
+ * <code>ANTHROPIC.Computer</code> - Gives the agent permission to use the mouse and keyboard and
407
+ * take screenshots.</p>
408
+ * </li>
409
+ * <li>
410
+ * <p>
411
+ * <code>ANTHROPIC.TextEditor</code> - Gives the agent permission to view, create and edit files.</p>
412
+ * </li>
413
+ * <li>
414
+ * <p>
415
+ * <code>ANTHROPIC.Bash</code> - Gives the agent permission to run commands in a bash shell.</p>
416
+ * </li>
417
+ * </ul>
418
+ * </li>
419
+ * </ul>
385
420
  * @public
386
421
  */
387
422
  parentActionGroupSignature?: ActionGroupSignature | undefined;
423
+ /**
424
+ * <p>The configuration settings for a computer use action.</p>
425
+ * <important>
426
+ * <p>
427
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
428
+ * </p>
429
+ * </important>
430
+ * @public
431
+ */
432
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
388
433
  /**
389
434
  * <p>The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.</p>
390
435
  * @public
@@ -458,6 +503,16 @@ export interface AgentActionGroup {
458
503
  * @public
459
504
  */
460
505
  parentActionSignature?: ActionGroupSignature | undefined;
506
+ /**
507
+ * <p>The configuration settings for a computer use action.</p>
508
+ * <important>
509
+ * <p>
510
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
511
+ * </p>
512
+ * </important>
513
+ * @public
514
+ */
515
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
461
516
  /**
462
517
  * <p>The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action or the custom control method for handling the information elicited from the user.</p>
463
518
  * @public
@@ -733,11 +788,55 @@ export interface UpdateAgentActionGroupRequest {
733
788
  */
734
789
  description?: string | undefined;
735
790
  /**
736
- * <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group.</p>
791
+ * <p>Update the built-in or computer use action for this action group. If you specify a value, you must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields empty for this action group. </p>
792
+ * <ul>
793
+ * <li>
794
+ * <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. </p>
795
+ * </li>
796
+ * <li>
797
+ * <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>.</p>
798
+ * </li>
799
+ * <li>
800
+ * <p>To allow your agent to use an Anthropic computer use tool, specify one of the following values. </p>
801
+ * <important>
802
+ * <p>
803
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only.
804
+ * When operating computer use functionality, we recommend taking additional security precautions,
805
+ * such as executing computer actions in virtual environments with restricted data access and limited internet connectivity.
806
+ * For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
807
+ * </p>
808
+ * </important>
809
+ * <ul>
810
+ * <li>
811
+ * <p>
812
+ * <code>ANTHROPIC.Computer</code> - Gives the agent permission to use the mouse and keyboard and
813
+ * take screenshots.</p>
814
+ * </li>
815
+ * <li>
816
+ * <p>
817
+ * <code>ANTHROPIC.TextEditor</code> - Gives the agent permission to view, create and edit files.</p>
818
+ * </li>
819
+ * <li>
820
+ * <p>
821
+ * <code>ANTHROPIC.Bash</code> - Gives the agent permission to run commands in a bash shell.</p>
822
+ * </li>
823
+ * </ul>
824
+ * </li>
825
+ * </ul>
737
826
  * <p>During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html">Observation</a> reprompting the user for more information.</p>
738
827
  * @public
739
828
  */
740
829
  parentActionGroupSignature?: ActionGroupSignature | undefined;
830
+ /**
831
+ * <p>The configuration settings for a computer use action.</p>
832
+ * <important>
833
+ * <p>
834
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
835
+ * </p>
836
+ * </important>
837
+ * @public
838
+ */
839
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
741
840
  /**
742
841
  * <p>The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.</p>
743
842
  * @public
@@ -1043,7 +1142,7 @@ export interface PromptConfiguration {
1043
1142
  */
1044
1143
  inferenceConfiguration?: InferenceConfiguration | undefined;
1045
1144
  /**
1046
- * <p>Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the <code>promptType</code>. If you set the field as <code>OVERRIDEN</code>, the <code>overrideLambda</code> field in the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html">PromptOverrideConfiguration</a> must be specified with the ARN of a Lambda function.</p>
1145
+ * <p>Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the <code>promptType</code>. If you set the field as <code>OVERRIDDEN</code>, the <code>overrideLambda</code> field in the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html">PromptOverrideConfiguration</a> must be specified with the ARN of a Lambda function.</p>
1047
1146
  * @public
1048
1147
  */
1049
1148
  parserMode?: CreationMode | undefined;
@@ -128,6 +128,9 @@ export declare namespace FunctionSchema {
128
128
  export declare const ActionGroupSignature: {
129
129
  readonly AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter";
130
130
  readonly AMAZON_USERINPUT: "AMAZON.UserInput";
131
+ readonly ANTHROPIC_BASH: "ANTHROPIC.Bash";
132
+ readonly ANTHROPIC_COMPUTER: "ANTHROPIC.Computer";
133
+ readonly ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor";
131
134
  };
132
135
  export type ActionGroupSignature =
133
136
  (typeof ActionGroupSignature)[keyof typeof ActionGroupSignature];
@@ -138,6 +141,7 @@ export interface CreateAgentActionGroupRequest {
138
141
  clientToken?: string | undefined;
139
142
  description?: string | undefined;
140
143
  parentActionGroupSignature?: ActionGroupSignature | undefined;
144
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
141
145
  actionGroupExecutor?: ActionGroupExecutor | undefined;
142
146
  apiSchema?: APISchema | undefined;
143
147
  actionGroupState?: ActionGroupState | undefined;
@@ -153,6 +157,7 @@ export interface AgentActionGroup {
153
157
  createdAt: Date | undefined;
154
158
  updatedAt: Date | undefined;
155
159
  parentActionSignature?: ActionGroupSignature | undefined;
160
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
156
161
  actionGroupExecutor?: ActionGroupExecutor | undefined;
157
162
  apiSchema?: APISchema | undefined;
158
163
  functionSchema?: FunctionSchema | undefined;
@@ -240,6 +245,7 @@ export interface UpdateAgentActionGroupRequest {
240
245
  actionGroupName: string | undefined;
241
246
  description?: string | undefined;
242
247
  parentActionGroupSignature?: ActionGroupSignature | undefined;
248
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
243
249
  actionGroupExecutor?: ActionGroupExecutor | undefined;
244
250
  actionGroupState?: ActionGroupState | undefined;
245
251
  apiSchema?: APISchema | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-agent",
3
3
  "description": "AWS SDK for JavaScript Bedrock Agent Client for Node.js, Browser and React Native",
4
- "version": "3.764.0",
4
+ "version": "3.765.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",