@aws-sdk/client-bedrock-agentcore 3.1034.0 → 3.1036.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/README.md +7 -0
- package/dist-cjs/index.js +64 -0
- package/dist-cjs/schemas/schemas_0.js +383 -22
- package/dist-es/BedrockAgentCore.js +2 -0
- package/dist-es/commands/InvokeHarnessCommand.js +20 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/enums.js +40 -0
- package/dist-es/schemas/schemas_0.js +378 -18
- package/dist-types/BedrockAgentCore.d.ts +7 -0
- package/dist-types/BedrockAgentCoreClient.d.ts +3 -2
- package/dist-types/commands/InvokeHarnessCommand.d.ts +280 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/enums.d.ts +88 -0
- package/dist-types/models/models_0.d.ts +1412 -1
- package/dist-types/schemas/schemas_0.d.ts +41 -0
- package/dist-types/ts3.4/BedrockAgentCore.d.ts +17 -0
- package/dist-types/ts3.4/BedrockAgentCoreClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/InvokeHarnessCommand.d.ts +50 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/enums.d.ts +52 -0
- package/dist-types/ts3.4/models/models_0.d.ts +701 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +41 -0
- package/package.json +15 -15
|
@@ -22,6 +22,7 @@ import { type InvokeAgentRuntimeCommandInput, type InvokeAgentRuntimeCommandOutp
|
|
|
22
22
|
import { type InvokeAgentRuntimeCommandCommandInput, type InvokeAgentRuntimeCommandCommandOutput } from "./commands/InvokeAgentRuntimeCommandCommand";
|
|
23
23
|
import { type InvokeBrowserCommandInput, type InvokeBrowserCommandOutput } from "./commands/InvokeBrowserCommand";
|
|
24
24
|
import { type InvokeCodeInterpreterCommandInput, type InvokeCodeInterpreterCommandOutput } from "./commands/InvokeCodeInterpreterCommand";
|
|
25
|
+
import { type InvokeHarnessCommandInput, type InvokeHarnessCommandOutput } from "./commands/InvokeHarnessCommand";
|
|
25
26
|
import { type ListActorsCommandInput, type ListActorsCommandOutput } from "./commands/ListActorsCommand";
|
|
26
27
|
import { type ListBrowserSessionsCommandInput, type ListBrowserSessionsCommandOutput } from "./commands/ListBrowserSessionsCommand";
|
|
27
28
|
import { type ListCodeInterpreterSessionsCommandInput, type ListCodeInterpreterSessionsCommandOutput } from "./commands/ListCodeInterpreterSessionsCommand";
|
|
@@ -172,6 +173,12 @@ export interface BedrockAgentCore {
|
|
|
172
173
|
invokeCodeInterpreter(args: InvokeCodeInterpreterCommandInput, options?: __HttpHandlerOptions): Promise<InvokeCodeInterpreterCommandOutput>;
|
|
173
174
|
invokeCodeInterpreter(args: InvokeCodeInterpreterCommandInput, cb: (err: any, data?: InvokeCodeInterpreterCommandOutput) => void): void;
|
|
174
175
|
invokeCodeInterpreter(args: InvokeCodeInterpreterCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeCodeInterpreterCommandOutput) => void): void;
|
|
176
|
+
/**
|
|
177
|
+
* @see {@link InvokeHarnessCommand}
|
|
178
|
+
*/
|
|
179
|
+
invokeHarness(args: InvokeHarnessCommandInput, options?: __HttpHandlerOptions): Promise<InvokeHarnessCommandOutput>;
|
|
180
|
+
invokeHarness(args: InvokeHarnessCommandInput, cb: (err: any, data?: InvokeHarnessCommandOutput) => void): void;
|
|
181
|
+
invokeHarness(args: InvokeHarnessCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeHarnessCommandOutput) => void): void;
|
|
175
182
|
/**
|
|
176
183
|
* @see {@link ListActorsCommand}
|
|
177
184
|
*/
|
|
@@ -30,6 +30,7 @@ import type { InvokeAgentRuntimeCommandInput, InvokeAgentRuntimeCommandOutput }
|
|
|
30
30
|
import type { InvokeAgentRuntimeCommandCommandInput, InvokeAgentRuntimeCommandCommandOutput } from "./commands/InvokeAgentRuntimeCommandCommand";
|
|
31
31
|
import type { InvokeBrowserCommandInput, InvokeBrowserCommandOutput } from "./commands/InvokeBrowserCommand";
|
|
32
32
|
import type { InvokeCodeInterpreterCommandInput, InvokeCodeInterpreterCommandOutput } from "./commands/InvokeCodeInterpreterCommand";
|
|
33
|
+
import type { InvokeHarnessCommandInput, InvokeHarnessCommandOutput } from "./commands/InvokeHarnessCommand";
|
|
33
34
|
import type { ListActorsCommandInput, ListActorsCommandOutput } from "./commands/ListActorsCommand";
|
|
34
35
|
import type { ListBrowserSessionsCommandInput, ListBrowserSessionsCommandOutput } from "./commands/ListBrowserSessionsCommand";
|
|
35
36
|
import type { ListCodeInterpreterSessionsCommandInput, ListCodeInterpreterSessionsCommandOutput } from "./commands/ListCodeInterpreterSessionsCommand";
|
|
@@ -53,11 +54,11 @@ export { __Client };
|
|
|
53
54
|
/**
|
|
54
55
|
* @public
|
|
55
56
|
*/
|
|
56
|
-
export type ServiceInputTypes = BatchCreateMemoryRecordsCommandInput | BatchDeleteMemoryRecordsCommandInput | BatchUpdateMemoryRecordsCommandInput | CompleteResourceTokenAuthCommandInput | CreateEventCommandInput | DeleteEventCommandInput | DeleteMemoryRecordCommandInput | EvaluateCommandInput | GetAgentCardCommandInput | GetBrowserSessionCommandInput | GetCodeInterpreterSessionCommandInput | GetEventCommandInput | GetMemoryRecordCommandInput | GetResourceApiKeyCommandInput | GetResourceOauth2TokenCommandInput | GetWorkloadAccessTokenCommandInput | GetWorkloadAccessTokenForJWTCommandInput | GetWorkloadAccessTokenForUserIdCommandInput | InvokeAgentRuntimeCommandCommandInput | InvokeAgentRuntimeCommandInput | InvokeBrowserCommandInput | InvokeCodeInterpreterCommandInput | ListActorsCommandInput | ListBrowserSessionsCommandInput | ListCodeInterpreterSessionsCommandInput | ListEventsCommandInput | ListMemoryExtractionJobsCommandInput | ListMemoryRecordsCommandInput | ListSessionsCommandInput | RetrieveMemoryRecordsCommandInput | SaveBrowserSessionProfileCommandInput | SearchRegistryRecordsCommandInput | StartBrowserSessionCommandInput | StartCodeInterpreterSessionCommandInput | StartMemoryExtractionJobCommandInput | StopBrowserSessionCommandInput | StopCodeInterpreterSessionCommandInput | StopRuntimeSessionCommandInput | UpdateBrowserStreamCommandInput;
|
|
57
|
+
export type ServiceInputTypes = BatchCreateMemoryRecordsCommandInput | BatchDeleteMemoryRecordsCommandInput | BatchUpdateMemoryRecordsCommandInput | CompleteResourceTokenAuthCommandInput | CreateEventCommandInput | DeleteEventCommandInput | DeleteMemoryRecordCommandInput | EvaluateCommandInput | GetAgentCardCommandInput | GetBrowserSessionCommandInput | GetCodeInterpreterSessionCommandInput | GetEventCommandInput | GetMemoryRecordCommandInput | GetResourceApiKeyCommandInput | GetResourceOauth2TokenCommandInput | GetWorkloadAccessTokenCommandInput | GetWorkloadAccessTokenForJWTCommandInput | GetWorkloadAccessTokenForUserIdCommandInput | InvokeAgentRuntimeCommandCommandInput | InvokeAgentRuntimeCommandInput | InvokeBrowserCommandInput | InvokeCodeInterpreterCommandInput | InvokeHarnessCommandInput | ListActorsCommandInput | ListBrowserSessionsCommandInput | ListCodeInterpreterSessionsCommandInput | ListEventsCommandInput | ListMemoryExtractionJobsCommandInput | ListMemoryRecordsCommandInput | ListSessionsCommandInput | RetrieveMemoryRecordsCommandInput | SaveBrowserSessionProfileCommandInput | SearchRegistryRecordsCommandInput | StartBrowserSessionCommandInput | StartCodeInterpreterSessionCommandInput | StartMemoryExtractionJobCommandInput | StopBrowserSessionCommandInput | StopCodeInterpreterSessionCommandInput | StopRuntimeSessionCommandInput | UpdateBrowserStreamCommandInput;
|
|
57
58
|
/**
|
|
58
59
|
* @public
|
|
59
60
|
*/
|
|
60
|
-
export type ServiceOutputTypes = BatchCreateMemoryRecordsCommandOutput | BatchDeleteMemoryRecordsCommandOutput | BatchUpdateMemoryRecordsCommandOutput | CompleteResourceTokenAuthCommandOutput | CreateEventCommandOutput | DeleteEventCommandOutput | DeleteMemoryRecordCommandOutput | EvaluateCommandOutput | GetAgentCardCommandOutput | GetBrowserSessionCommandOutput | GetCodeInterpreterSessionCommandOutput | GetEventCommandOutput | GetMemoryRecordCommandOutput | GetResourceApiKeyCommandOutput | GetResourceOauth2TokenCommandOutput | GetWorkloadAccessTokenCommandOutput | GetWorkloadAccessTokenForJWTCommandOutput | GetWorkloadAccessTokenForUserIdCommandOutput | InvokeAgentRuntimeCommandCommandOutput | InvokeAgentRuntimeCommandOutput | InvokeBrowserCommandOutput | InvokeCodeInterpreterCommandOutput | ListActorsCommandOutput | ListBrowserSessionsCommandOutput | ListCodeInterpreterSessionsCommandOutput | ListEventsCommandOutput | ListMemoryExtractionJobsCommandOutput | ListMemoryRecordsCommandOutput | ListSessionsCommandOutput | RetrieveMemoryRecordsCommandOutput | SaveBrowserSessionProfileCommandOutput | SearchRegistryRecordsCommandOutput | StartBrowserSessionCommandOutput | StartCodeInterpreterSessionCommandOutput | StartMemoryExtractionJobCommandOutput | StopBrowserSessionCommandOutput | StopCodeInterpreterSessionCommandOutput | StopRuntimeSessionCommandOutput | UpdateBrowserStreamCommandOutput;
|
|
61
|
+
export type ServiceOutputTypes = BatchCreateMemoryRecordsCommandOutput | BatchDeleteMemoryRecordsCommandOutput | BatchUpdateMemoryRecordsCommandOutput | CompleteResourceTokenAuthCommandOutput | CreateEventCommandOutput | DeleteEventCommandOutput | DeleteMemoryRecordCommandOutput | EvaluateCommandOutput | GetAgentCardCommandOutput | GetBrowserSessionCommandOutput | GetCodeInterpreterSessionCommandOutput | GetEventCommandOutput | GetMemoryRecordCommandOutput | GetResourceApiKeyCommandOutput | GetResourceOauth2TokenCommandOutput | GetWorkloadAccessTokenCommandOutput | GetWorkloadAccessTokenForJWTCommandOutput | GetWorkloadAccessTokenForUserIdCommandOutput | InvokeAgentRuntimeCommandCommandOutput | InvokeAgentRuntimeCommandOutput | InvokeBrowserCommandOutput | InvokeCodeInterpreterCommandOutput | InvokeHarnessCommandOutput | ListActorsCommandOutput | ListBrowserSessionsCommandOutput | ListCodeInterpreterSessionsCommandOutput | ListEventsCommandOutput | ListMemoryExtractionJobsCommandOutput | ListMemoryRecordsCommandOutput | ListSessionsCommandOutput | RetrieveMemoryRecordsCommandOutput | SaveBrowserSessionProfileCommandOutput | SearchRegistryRecordsCommandOutput | StartBrowserSessionCommandOutput | StartCodeInterpreterSessionCommandOutput | StartMemoryExtractionJobCommandOutput | StopBrowserSessionCommandOutput | StopCodeInterpreterSessionCommandOutput | StopRuntimeSessionCommandOutput | UpdateBrowserStreamCommandOutput;
|
|
61
62
|
/**
|
|
62
63
|
* @public
|
|
63
64
|
*/
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentCoreClient";
|
|
4
|
+
import type { InvokeHarnessRequest, InvokeHarnessResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link InvokeHarnessCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface InvokeHarnessCommandInput extends InvokeHarnessRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link InvokeHarnessCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface InvokeHarnessCommandOutput extends InvokeHarnessResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const InvokeHarnessCommand_base: {
|
|
25
|
+
new (input: InvokeHarnessCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeHarnessCommandInput, InvokeHarnessCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: InvokeHarnessCommandInput): import("@smithy/smithy-client").CommandImpl<InvokeHarnessCommandInput, InvokeHarnessCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Operation to invoke a Harness.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { BedrockAgentCoreClient, InvokeHarnessCommand } from "@aws-sdk/client-bedrock-agentcore"; // ES Modules import
|
|
35
|
+
* // const { BedrockAgentCoreClient, InvokeHarnessCommand } = require("@aws-sdk/client-bedrock-agentcore"); // CommonJS import
|
|
36
|
+
* // import type { BedrockAgentCoreClientConfig } from "@aws-sdk/client-bedrock-agentcore";
|
|
37
|
+
* const config = {}; // type is BedrockAgentCoreClientConfig
|
|
38
|
+
* const client = new BedrockAgentCoreClient(config);
|
|
39
|
+
* const input = { // InvokeHarnessRequest
|
|
40
|
+
* harnessArn: "STRING_VALUE", // required
|
|
41
|
+
* runtimeSessionId: "STRING_VALUE", // required
|
|
42
|
+
* messages: [ // HarnessMessages // required
|
|
43
|
+
* { // HarnessMessage
|
|
44
|
+
* role: "user" || "assistant", // required
|
|
45
|
+
* content: [ // HarnessContentBlocks // required
|
|
46
|
+
* { // HarnessContentBlock Union: only one key present
|
|
47
|
+
* text: "STRING_VALUE",
|
|
48
|
+
* toolUse: { // HarnessToolUseBlock
|
|
49
|
+
* name: "STRING_VALUE", // required
|
|
50
|
+
* toolUseId: "STRING_VALUE", // required
|
|
51
|
+
* input: "DOCUMENT_VALUE", // required
|
|
52
|
+
* type: "tool_use" || "server_tool_use" || "mcp_tool_use",
|
|
53
|
+
* serverName: "STRING_VALUE",
|
|
54
|
+
* },
|
|
55
|
+
* toolResult: { // HarnessToolResultBlock
|
|
56
|
+
* toolUseId: "STRING_VALUE", // required
|
|
57
|
+
* content: [ // HarnessToolResultContentBlocks // required
|
|
58
|
+
* { // HarnessToolResultContentBlock Union: only one key present
|
|
59
|
+
* text: "STRING_VALUE",
|
|
60
|
+
* json: "DOCUMENT_VALUE",
|
|
61
|
+
* },
|
|
62
|
+
* ],
|
|
63
|
+
* status: "success" || "error",
|
|
64
|
+
* type: "tool_use" || "server_tool_use" || "mcp_tool_use",
|
|
65
|
+
* },
|
|
66
|
+
* reasoningContent: { // HarnessReasoningContentBlock Union: only one key present
|
|
67
|
+
* reasoningText: { // HarnessReasoningTextBlock
|
|
68
|
+
* text: "STRING_VALUE", // required
|
|
69
|
+
* signature: "STRING_VALUE",
|
|
70
|
+
* },
|
|
71
|
+
* redactedContent: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
72
|
+
* },
|
|
73
|
+
* },
|
|
74
|
+
* ],
|
|
75
|
+
* },
|
|
76
|
+
* ],
|
|
77
|
+
* model: { // HarnessModelConfiguration Union: only one key present
|
|
78
|
+
* bedrockModelConfig: { // HarnessBedrockModelConfig
|
|
79
|
+
* modelId: "STRING_VALUE", // required
|
|
80
|
+
* maxTokens: Number("int"),
|
|
81
|
+
* temperature: Number("float"),
|
|
82
|
+
* topP: Number("float"),
|
|
83
|
+
* },
|
|
84
|
+
* openAiModelConfig: { // HarnessOpenAiModelConfig
|
|
85
|
+
* modelId: "STRING_VALUE", // required
|
|
86
|
+
* apiKeyArn: "STRING_VALUE", // required
|
|
87
|
+
* maxTokens: Number("int"),
|
|
88
|
+
* temperature: Number("float"),
|
|
89
|
+
* topP: Number("float"),
|
|
90
|
+
* },
|
|
91
|
+
* geminiModelConfig: { // HarnessGeminiModelConfig
|
|
92
|
+
* modelId: "STRING_VALUE", // required
|
|
93
|
+
* apiKeyArn: "STRING_VALUE", // required
|
|
94
|
+
* maxTokens: Number("int"),
|
|
95
|
+
* temperature: Number("float"),
|
|
96
|
+
* topP: Number("float"),
|
|
97
|
+
* topK: Number("int"),
|
|
98
|
+
* },
|
|
99
|
+
* },
|
|
100
|
+
* systemPrompt: [ // HarnessSystemPrompt
|
|
101
|
+
* { // HarnessSystemContentBlock Union: only one key present
|
|
102
|
+
* text: "STRING_VALUE",
|
|
103
|
+
* },
|
|
104
|
+
* ],
|
|
105
|
+
* tools: [ // HarnessTools
|
|
106
|
+
* { // HarnessTool
|
|
107
|
+
* type: "remote_mcp" || "agentcore_browser" || "agentcore_gateway" || "inline_function" || "agentcore_code_interpreter", // required
|
|
108
|
+
* name: "STRING_VALUE",
|
|
109
|
+
* config: { // HarnessToolConfiguration Union: only one key present
|
|
110
|
+
* remoteMcp: { // HarnessRemoteMcpConfig
|
|
111
|
+
* url: "STRING_VALUE", // required
|
|
112
|
+
* headers: { // HttpHeadersMap
|
|
113
|
+
* "<keys>": "STRING_VALUE",
|
|
114
|
+
* },
|
|
115
|
+
* },
|
|
116
|
+
* agentCoreBrowser: { // HarnessAgentCoreBrowserConfig
|
|
117
|
+
* browserArn: "STRING_VALUE",
|
|
118
|
+
* },
|
|
119
|
+
* agentCoreGateway: { // HarnessAgentCoreGatewayConfig
|
|
120
|
+
* gatewayArn: "STRING_VALUE", // required
|
|
121
|
+
* outboundAuth: { // HarnessGatewayOutboundAuth Union: only one key present
|
|
122
|
+
* awsIam: {},
|
|
123
|
+
* none: {},
|
|
124
|
+
* oauth: { // OAuthCredentialProvider
|
|
125
|
+
* providerArn: "STRING_VALUE", // required
|
|
126
|
+
* scopes: [ // OAuthScopes // required
|
|
127
|
+
* "STRING_VALUE",
|
|
128
|
+
* ],
|
|
129
|
+
* customParameters: { // OAuthCustomParameters
|
|
130
|
+
* "<keys>": "STRING_VALUE",
|
|
131
|
+
* },
|
|
132
|
+
* grantType: "CLIENT_CREDENTIALS" || "AUTHORIZATION_CODE",
|
|
133
|
+
* defaultReturnUrl: "STRING_VALUE",
|
|
134
|
+
* },
|
|
135
|
+
* },
|
|
136
|
+
* },
|
|
137
|
+
* inlineFunction: { // HarnessInlineFunctionConfig
|
|
138
|
+
* description: "STRING_VALUE", // required
|
|
139
|
+
* inputSchema: "DOCUMENT_VALUE", // required
|
|
140
|
+
* },
|
|
141
|
+
* agentCoreCodeInterpreter: { // HarnessAgentCoreCodeInterpreterConfig
|
|
142
|
+
* codeInterpreterArn: "STRING_VALUE",
|
|
143
|
+
* },
|
|
144
|
+
* },
|
|
145
|
+
* },
|
|
146
|
+
* ],
|
|
147
|
+
* skills: [ // HarnessSkills
|
|
148
|
+
* { // HarnessSkill Union: only one key present
|
|
149
|
+
* path: "STRING_VALUE",
|
|
150
|
+
* },
|
|
151
|
+
* ],
|
|
152
|
+
* allowedTools: [ // HarnessAllowedTools
|
|
153
|
+
* "STRING_VALUE",
|
|
154
|
+
* ],
|
|
155
|
+
* maxIterations: Number("int"),
|
|
156
|
+
* maxTokens: Number("int"),
|
|
157
|
+
* timeoutSeconds: Number("int"),
|
|
158
|
+
* actorId: "STRING_VALUE",
|
|
159
|
+
* };
|
|
160
|
+
* const command = new InvokeHarnessCommand(input);
|
|
161
|
+
* const response = await client.send(command);
|
|
162
|
+
* // { // InvokeHarnessResponse
|
|
163
|
+
* // stream: { // InvokeHarnessStreamOutput Union: only one key present
|
|
164
|
+
* // messageStart: { // HarnessMessageStartEvent
|
|
165
|
+
* // role: "user" || "assistant", // required
|
|
166
|
+
* // },
|
|
167
|
+
* // contentBlockStart: { // HarnessContentBlockStartEvent
|
|
168
|
+
* // contentBlockIndex: Number("int"), // required
|
|
169
|
+
* // start: { // HarnessContentBlockStart Union: only one key present
|
|
170
|
+
* // toolUse: { // HarnessToolUseBlockStart
|
|
171
|
+
* // toolUseId: "STRING_VALUE", // required
|
|
172
|
+
* // name: "STRING_VALUE", // required
|
|
173
|
+
* // type: "tool_use" || "server_tool_use" || "mcp_tool_use",
|
|
174
|
+
* // serverName: "STRING_VALUE",
|
|
175
|
+
* // },
|
|
176
|
+
* // toolResult: { // HarnessToolResultBlockStart
|
|
177
|
+
* // toolUseId: "STRING_VALUE", // required
|
|
178
|
+
* // status: "success" || "error",
|
|
179
|
+
* // },
|
|
180
|
+
* // },
|
|
181
|
+
* // },
|
|
182
|
+
* // contentBlockDelta: { // HarnessContentBlockDeltaEvent
|
|
183
|
+
* // contentBlockIndex: Number("int"), // required
|
|
184
|
+
* // delta: { // HarnessContentBlockDelta Union: only one key present
|
|
185
|
+
* // text: "STRING_VALUE",
|
|
186
|
+
* // toolUse: { // HarnessToolUseBlockDelta
|
|
187
|
+
* // input: "STRING_VALUE", // required
|
|
188
|
+
* // },
|
|
189
|
+
* // toolResult: [ // HarnessToolResultBlocksDelta
|
|
190
|
+
* // { // HarnessToolResultBlockDelta Union: only one key present
|
|
191
|
+
* // text: "STRING_VALUE",
|
|
192
|
+
* // json: "DOCUMENT_VALUE",
|
|
193
|
+
* // },
|
|
194
|
+
* // ],
|
|
195
|
+
* // reasoningContent: { // HarnessReasoningContentBlockDelta Union: only one key present
|
|
196
|
+
* // text: "STRING_VALUE",
|
|
197
|
+
* // redactedContent: new Uint8Array(),
|
|
198
|
+
* // signature: "STRING_VALUE",
|
|
199
|
+
* // },
|
|
200
|
+
* // },
|
|
201
|
+
* // },
|
|
202
|
+
* // contentBlockStop: { // HarnessContentBlockStopEvent
|
|
203
|
+
* // contentBlockIndex: Number("int"), // required
|
|
204
|
+
* // },
|
|
205
|
+
* // messageStop: { // HarnessMessageStopEvent
|
|
206
|
+
* // stopReason: "end_turn" || "tool_use" || "tool_result" || "max_tokens" || "stop_sequence" || "content_filtered" || "malformed_model_output" || "malformed_tool_use" || "interrupted" || "partial_turn" || "model_context_window_exceeded" || "max_iterations_exceeded" || "max_output_tokens_exceeded" || "timeout_exceeded", // required
|
|
207
|
+
* // },
|
|
208
|
+
* // metadata: { // HarnessMetadataEvent
|
|
209
|
+
* // usage: { // HarnessTokenUsage
|
|
210
|
+
* // inputTokens: Number("int"), // required
|
|
211
|
+
* // outputTokens: Number("int"), // required
|
|
212
|
+
* // totalTokens: Number("int"), // required
|
|
213
|
+
* // cacheReadInputTokens: Number("int"),
|
|
214
|
+
* // cacheWriteInputTokens: Number("int"),
|
|
215
|
+
* // },
|
|
216
|
+
* // metrics: { // HarnessStreamMetrics
|
|
217
|
+
* // latencyMs: Number("long"), // required
|
|
218
|
+
* // },
|
|
219
|
+
* // },
|
|
220
|
+
* // internalServerException: { // InternalServerException
|
|
221
|
+
* // message: "STRING_VALUE",
|
|
222
|
+
* // },
|
|
223
|
+
* // validationException: { // ValidationException
|
|
224
|
+
* // message: "STRING_VALUE", // required
|
|
225
|
+
* // reason: "CannotParse" || "FieldValidationFailed" || "IdempotentParameterMismatchException" || "EventInOtherSession" || "ResourceConflict", // required
|
|
226
|
+
* // fieldList: [ // ValidationExceptionFieldList
|
|
227
|
+
* // { // ValidationExceptionField
|
|
228
|
+
* // name: "STRING_VALUE", // required
|
|
229
|
+
* // message: "STRING_VALUE", // required
|
|
230
|
+
* // },
|
|
231
|
+
* // ],
|
|
232
|
+
* // },
|
|
233
|
+
* // runtimeClientError: { // RuntimeClientError
|
|
234
|
+
* // message: "STRING_VALUE",
|
|
235
|
+
* // },
|
|
236
|
+
* // },
|
|
237
|
+
* // };
|
|
238
|
+
*
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* @param InvokeHarnessCommandInput - {@link InvokeHarnessCommandInput}
|
|
242
|
+
* @returns {@link InvokeHarnessCommandOutput}
|
|
243
|
+
* @see {@link InvokeHarnessCommandInput} for command's `input` shape.
|
|
244
|
+
* @see {@link InvokeHarnessCommandOutput} for command's `response` shape.
|
|
245
|
+
* @see {@link BedrockAgentCoreClientResolvedConfig | config} for BedrockAgentCoreClient's `config` shape.
|
|
246
|
+
*
|
|
247
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
248
|
+
* <p>The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.</p>
|
|
249
|
+
*
|
|
250
|
+
* @throws {@link InternalServerException} (server fault)
|
|
251
|
+
* <p>The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.</p>
|
|
252
|
+
*
|
|
253
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
254
|
+
* <p>The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.</p>
|
|
255
|
+
*
|
|
256
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
257
|
+
* <p>The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.</p>
|
|
258
|
+
*
|
|
259
|
+
* @throws {@link ValidationException} (client fault)
|
|
260
|
+
* <p>The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.</p>
|
|
261
|
+
*
|
|
262
|
+
* @throws {@link BedrockAgentCoreServiceException}
|
|
263
|
+
* <p>Base exception class for all service exceptions from BedrockAgentCore service.</p>
|
|
264
|
+
*
|
|
265
|
+
*
|
|
266
|
+
* @public
|
|
267
|
+
*/
|
|
268
|
+
export declare class InvokeHarnessCommand extends InvokeHarnessCommand_base {
|
|
269
|
+
/** @internal type navigation helper, not in runtime. */
|
|
270
|
+
protected static __types: {
|
|
271
|
+
api: {
|
|
272
|
+
input: InvokeHarnessRequest;
|
|
273
|
+
output: InvokeHarnessResponse;
|
|
274
|
+
};
|
|
275
|
+
sdk: {
|
|
276
|
+
input: InvokeHarnessCommandInput;
|
|
277
|
+
output: InvokeHarnessCommandOutput;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./InvokeAgentRuntimeCommand";
|
|
|
20
20
|
export * from "./InvokeAgentRuntimeCommandCommand";
|
|
21
21
|
export * from "./InvokeBrowserCommand";
|
|
22
22
|
export * from "./InvokeCodeInterpreterCommand";
|
|
23
|
+
export * from "./InvokeHarnessCommand";
|
|
23
24
|
export * from "./ListActorsCommand";
|
|
24
25
|
export * from "./ListBrowserSessionsCommand";
|
|
25
26
|
export * from "./ListCodeInterpreterSessionsCommand";
|
|
@@ -219,6 +219,94 @@ export declare const TaskStatus: {
|
|
|
219
219
|
* @public
|
|
220
220
|
*/
|
|
221
221
|
export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus];
|
|
222
|
+
/**
|
|
223
|
+
* @public
|
|
224
|
+
* @enum
|
|
225
|
+
*/
|
|
226
|
+
export declare const HarnessToolUseStatus: {
|
|
227
|
+
readonly ERROR: "error";
|
|
228
|
+
readonly SUCCESS: "success";
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* @public
|
|
232
|
+
*/
|
|
233
|
+
export type HarnessToolUseStatus = (typeof HarnessToolUseStatus)[keyof typeof HarnessToolUseStatus];
|
|
234
|
+
/**
|
|
235
|
+
* @public
|
|
236
|
+
* @enum
|
|
237
|
+
*/
|
|
238
|
+
export declare const HarnessToolUseType: {
|
|
239
|
+
readonly MCP_TOOL_USE: "mcp_tool_use";
|
|
240
|
+
readonly SERVER_TOOL_USE: "server_tool_use";
|
|
241
|
+
readonly TOOL_USE: "tool_use";
|
|
242
|
+
};
|
|
243
|
+
/**
|
|
244
|
+
* @public
|
|
245
|
+
*/
|
|
246
|
+
export type HarnessToolUseType = (typeof HarnessToolUseType)[keyof typeof HarnessToolUseType];
|
|
247
|
+
/**
|
|
248
|
+
* @public
|
|
249
|
+
* @enum
|
|
250
|
+
*/
|
|
251
|
+
export declare const HarnessConversationRole: {
|
|
252
|
+
readonly ASSISTANT: "assistant";
|
|
253
|
+
readonly USER: "user";
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* @public
|
|
257
|
+
*/
|
|
258
|
+
export type HarnessConversationRole = (typeof HarnessConversationRole)[keyof typeof HarnessConversationRole];
|
|
259
|
+
/**
|
|
260
|
+
* @public
|
|
261
|
+
* @enum
|
|
262
|
+
*/
|
|
263
|
+
export declare const OAuthGrantType: {
|
|
264
|
+
readonly AUTHORIZATION_CODE: "AUTHORIZATION_CODE";
|
|
265
|
+
readonly CLIENT_CREDENTIALS: "CLIENT_CREDENTIALS";
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* @public
|
|
269
|
+
*/
|
|
270
|
+
export type OAuthGrantType = (typeof OAuthGrantType)[keyof typeof OAuthGrantType];
|
|
271
|
+
/**
|
|
272
|
+
* @public
|
|
273
|
+
* @enum
|
|
274
|
+
*/
|
|
275
|
+
export declare const HarnessToolType: {
|
|
276
|
+
readonly AGENTCORE_BROWSER: "agentcore_browser";
|
|
277
|
+
readonly AGENTCORE_CODE_INTERPRETER: "agentcore_code_interpreter";
|
|
278
|
+
readonly AGENTCORE_GATEWAY: "agentcore_gateway";
|
|
279
|
+
readonly INLINE_FUNCTION: "inline_function";
|
|
280
|
+
readonly REMOTE_MCP: "remote_mcp";
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* @public
|
|
284
|
+
*/
|
|
285
|
+
export type HarnessToolType = (typeof HarnessToolType)[keyof typeof HarnessToolType];
|
|
286
|
+
/**
|
|
287
|
+
* @public
|
|
288
|
+
* @enum
|
|
289
|
+
*/
|
|
290
|
+
export declare const HarnessStopReason: {
|
|
291
|
+
readonly CONTENT_FILTERED: "content_filtered";
|
|
292
|
+
readonly END_TURN: "end_turn";
|
|
293
|
+
readonly INTERRUPTED: "interrupted";
|
|
294
|
+
readonly MALFORMED_MODEL_OUTPUT: "malformed_model_output";
|
|
295
|
+
readonly MALFORMED_TOOL_USE: "malformed_tool_use";
|
|
296
|
+
readonly MAX_ITERATIONS_EXCEEDED: "max_iterations_exceeded";
|
|
297
|
+
readonly MAX_OUTPUT_TOKENS_EXCEEDED: "max_output_tokens_exceeded";
|
|
298
|
+
readonly MAX_TOKENS: "max_tokens";
|
|
299
|
+
readonly MODEL_CONTEXT_WINDOW_EXCEEDED: "model_context_window_exceeded";
|
|
300
|
+
readonly PARTIAL_TURN: "partial_turn";
|
|
301
|
+
readonly STOP_SEQUENCE: "stop_sequence";
|
|
302
|
+
readonly TIMEOUT_EXCEEDED: "timeout_exceeded";
|
|
303
|
+
readonly TOOL_RESULT: "tool_result";
|
|
304
|
+
readonly TOOL_USE: "tool_use";
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* @public
|
|
308
|
+
*/
|
|
309
|
+
export type HarnessStopReason = (typeof HarnessStopReason)[keyof typeof HarnessStopReason];
|
|
222
310
|
/**
|
|
223
311
|
* @public
|
|
224
312
|
* @enum
|