@aws/lsp-codewhisperer 0.0.97 → 0.0.98
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/CHANGELOG.md +28 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/README.md +259 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/QDeveloperStreamingClient.js +14 -11
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/GenerateCodeFromCommandsCommand.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/commands/SendMessageCommand.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoint/endpointResolver.js +19 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoint/ruleset.js +61 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/models/models_0.js +148 -64
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/protocols/Aws_json1_0.js +92 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/runtimeConfig.shared.js +2 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/QDeveloperStreamingClient.js +16 -13
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/GenerateCodeFromCommandsCommand.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/commands/SendMessageCommand.js +4 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoint/EndpointParameters.js +11 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoint/endpointResolver.js +15 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoint/ruleset.js +58 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/models/models_0.js +138 -57
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/protocols/Aws_json1_0.js +94 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/runtimeConfig.shared.js +2 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/QDeveloperStreamingClient.d.ts +6 -9
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/GenerateCodeFromCommandsCommand.d.ts +6 -6
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/commands/SendMessageCommand.d.ts +68 -11
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoint/EndpointParameters.d.ts +28 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoint/ruleset.d.ts +2 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/index.d.ts +1 -0
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/models/models_0.d.ts +472 -87
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.browser.d.ts +5 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.d.ts +5 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.native.d.ts +5 -2
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/runtimeConfig.shared.d.ts +3 -1
- package/node_modules/@amzn/amazon-q-developer-streaming-client/package.json +3 -0
- package/node_modules/@amzn/codewhisperer-streaming/README.md +266 -7
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/CodeWhispererStreaming.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/commands/InvokeMCPCommand.js +22 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/commands/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/models/models_0.js +172 -58
- package/node_modules/@amzn/codewhisperer-streaming/dist-cjs/protocols/Aws_restJson1.js +164 -3
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/CodeWhispererStreaming.js +2 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/commands/InvokeMCPCommand.js +18 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/commands/index.js +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/models/models_0.js +159 -51
- package/node_modules/@amzn/codewhisperer-streaming/dist-es/protocols/Aws_restJson1.js +163 -4
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreaming.d.ts +7 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/CodeWhispererStreamingClient.d.ts +3 -2
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/ExportResultArchiveCommand.d.ts +5 -5
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateAssistantResponseCommand.d.ts +68 -3
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/GenerateTaskAssistPlanCommand.d.ts +63 -6
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/InvokeMCPCommand.d.ts +93 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/SendMessageCommand.d.ts +68 -11
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/commands/index.d.ts +1 -0
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/models/models_0.d.ts +585 -80
- package/node_modules/@amzn/codewhisperer-streaming/dist-types/protocols/Aws_restJson1.d.ts +9 -0
- package/out/language-server/agenticChat/agenticChatController.js +17 -5
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js +21 -13
- package/out/language-server/agenticChat/tools/mcp/mcpEventHandler.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +12 -4
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js +192 -37
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpRegistryService.js +42 -20
- package/out/language-server/agenticChat/tools/mcp/mcpRegistryService.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/profileStatusMonitor.js +4 -0
- package/out/language-server/agenticChat/tools/mcp/profileStatusMonitor.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolServer.js +57 -12
- package/out/language-server/agenticChat/tools/toolServer.js.map +1 -1
- package/out/language-server/agenticChat/utils/tokenLimitsCalculator.d.ts +3 -3
- package/out/language-server/agenticChat/utils/tokenLimitsCalculator.js +4 -4
- package/out/language-server/agenticChat/utils/tokenLimitsCalculator.js.map +1 -1
- package/out/language-server/netTransform/utils.js +2 -4
- package/out/language-server/netTransform/utils.js.map +1 -1
- package/out/shared/codeWhispererService.js +1 -0
- package/out/shared/codeWhispererService.js.map +1 -1
- package/out/shared/telemetry/telemetryService.js +2 -1
- package/out/shared/telemetry/telemetryService.js.map +1 -1
- package/out/shared/utils.js +6 -4
- package/out/shared/utils.js.map +1 -1
- package/package.json +5 -4
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-cjs/endpoints.js +0 -211
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-es/endpoints.js +0 -207
- package/node_modules/@amzn/amazon-q-developer-streaming-client/dist-types/endpoints.d.ts +0 -2
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CodeWhispererStreamingServiceException as __BaseException } from "./CodeWhispererStreamingServiceException";
|
|
2
2
|
import { SENSITIVE_STRING, } from "@smithy/smithy-client";
|
|
3
3
|
export const AccessDeniedExceptionReason = {
|
|
4
|
+
FEATURE_NOT_SUPPORTED: "FEATURE_NOT_SUPPORTED",
|
|
5
|
+
TEMPORARILY_SUSPENDED: "TEMPORARILY_SUSPENDED",
|
|
4
6
|
UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS: "UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS",
|
|
5
7
|
UNAUTHORIZED_WORKSPACE_CONTEXT_FEATURE_ACCESS: "UNAUTHORIZED_WORKSPACE_CONTEXT_FEATURE_ACCESS",
|
|
6
8
|
};
|
|
@@ -18,15 +20,25 @@ export class AccessDeniedException extends __BaseException {
|
|
|
18
20
|
this.reason = opts.reason;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
export const ConflictExceptionReason = {
|
|
24
|
+
CUSTOMER_KMS_KEY_DISABLED: "CUSTOMER_KMS_KEY_DISABLED",
|
|
25
|
+
CUSTOMER_KMS_KEY_INVALID_KEY_POLICY: "CUSTOMER_KMS_KEY_INVALID_KEY_POLICY",
|
|
26
|
+
MISMATCHED_KMS_KEY: "MISMATCHED_KMS_KEY",
|
|
27
|
+
};
|
|
28
|
+
export class ConflictException extends __BaseException {
|
|
29
|
+
name = "ConflictException";
|
|
30
|
+
$fault = "client";
|
|
31
|
+
reason;
|
|
32
|
+
constructor(opts) {
|
|
33
|
+
super({
|
|
34
|
+
name: "ConflictException",
|
|
35
|
+
$fault: "client",
|
|
36
|
+
...opts
|
|
37
|
+
});
|
|
38
|
+
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
39
|
+
this.reason = opts.reason;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
30
42
|
export const InternalServerExceptionReason = {
|
|
31
43
|
MODEL_TEMPORARILY_UNAVAILABLE: "MODEL_TEMPORARILY_UNAVAILABLE",
|
|
32
44
|
};
|
|
@@ -45,19 +57,9 @@ export class InternalServerException extends __BaseException {
|
|
|
45
57
|
this.reason = opts.reason;
|
|
46
58
|
}
|
|
47
59
|
}
|
|
48
|
-
export class ResourceNotFoundException extends __BaseException {
|
|
49
|
-
name = "ResourceNotFoundException";
|
|
50
|
-
$fault = "client";
|
|
51
|
-
constructor(opts) {
|
|
52
|
-
super({
|
|
53
|
-
name: "ResourceNotFoundException",
|
|
54
|
-
$fault: "client",
|
|
55
|
-
...opts
|
|
56
|
-
});
|
|
57
|
-
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
60
|
export const ThrottlingExceptionReason = {
|
|
61
|
+
DAILY_REQUEST_COUNT: "DAILY_REQUEST_COUNT",
|
|
62
|
+
INSUFFICIENT_MODEL_CAPACITY: "INSUFFICIENT_MODEL_CAPACITY",
|
|
61
63
|
MONTHLY_REQUEST_COUNT: "MONTHLY_REQUEST_COUNT",
|
|
62
64
|
};
|
|
63
65
|
export class ThrottlingException extends __BaseException {
|
|
@@ -81,6 +83,7 @@ export const ValidationExceptionReason = {
|
|
|
81
83
|
CONTENT_LENGTH_EXCEEDS_THRESHOLD: "CONTENT_LENGTH_EXCEEDS_THRESHOLD",
|
|
82
84
|
INVALID_CONVERSATION_ID: "INVALID_CONVERSATION_ID",
|
|
83
85
|
INVALID_KMS_GRANT: "INVALID_KMS_GRANT",
|
|
86
|
+
INVALID_MODEL_ID: "INVALID_MODEL_ID",
|
|
84
87
|
};
|
|
85
88
|
export class ValidationException extends __BaseException {
|
|
86
89
|
name = "ValidationException";
|
|
@@ -96,6 +99,50 @@ export class ValidationException extends __BaseException {
|
|
|
96
99
|
this.reason = opts.reason;
|
|
97
100
|
}
|
|
98
101
|
}
|
|
102
|
+
export class ResourceNotFoundException extends __BaseException {
|
|
103
|
+
name = "ResourceNotFoundException";
|
|
104
|
+
$fault = "client";
|
|
105
|
+
constructor(opts) {
|
|
106
|
+
super({
|
|
107
|
+
name: "ResourceNotFoundException",
|
|
108
|
+
$fault: "client",
|
|
109
|
+
...opts
|
|
110
|
+
});
|
|
111
|
+
Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export const ServiceQuotaExceededExceptionReason = {
|
|
115
|
+
CONVERSATION_LIMIT_EXCEEDED: "CONVERSATION_LIMIT_EXCEEDED",
|
|
116
|
+
MONTHLY_REQUEST_COUNT: "MONTHLY_REQUEST_COUNT",
|
|
117
|
+
OVERAGE_REQUEST_LIMIT_EXCEEDED: "OVERAGE_REQUEST_LIMIT_EXCEEDED",
|
|
118
|
+
};
|
|
119
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
120
|
+
name = "ServiceQuotaExceededException";
|
|
121
|
+
$fault = "client";
|
|
122
|
+
reason;
|
|
123
|
+
constructor(opts) {
|
|
124
|
+
super({
|
|
125
|
+
name: "ServiceQuotaExceededException",
|
|
126
|
+
$fault: "client",
|
|
127
|
+
...opts
|
|
128
|
+
});
|
|
129
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
130
|
+
this.reason = opts.reason;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
export const AdditionalContentEntryFilterSensitiveLog = (obj) => ({
|
|
134
|
+
...obj,
|
|
135
|
+
...(obj.name && { name: SENSITIVE_STRING
|
|
136
|
+
}),
|
|
137
|
+
...(obj.description && { description: SENSITIVE_STRING
|
|
138
|
+
}),
|
|
139
|
+
...(obj.innerContext && { innerContext: SENSITIVE_STRING
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
export const AgentTaskType = {
|
|
143
|
+
SPEC_TASK: "spectask",
|
|
144
|
+
VIBE: "vibe",
|
|
145
|
+
};
|
|
99
146
|
export const AppStudioStateFilterSensitiveLog = (obj) => ({
|
|
100
147
|
...obj,
|
|
101
148
|
...(obj.namespace && { namespace: SENSITIVE_STRING
|
|
@@ -112,6 +159,9 @@ export const AssistantResponseEventFilterSensitiveLog = (obj) => ({
|
|
|
112
159
|
...(obj.content && { content: SENSITIVE_STRING
|
|
113
160
|
}),
|
|
114
161
|
});
|
|
162
|
+
export const CachePointType = {
|
|
163
|
+
DEFAULT: "default",
|
|
164
|
+
};
|
|
115
165
|
export const UserIntent = {
|
|
116
166
|
APPLY_COMMON_BEST_PRACTICES: "APPLY_COMMON_BEST_PRACTICES",
|
|
117
167
|
CITE_SOURCES: "CITE_SOURCES",
|
|
@@ -129,6 +179,33 @@ export const FollowupPromptFilterSensitiveLog = (obj) => ({
|
|
|
129
179
|
...(obj.content && { content: SENSITIVE_STRING
|
|
130
180
|
}),
|
|
131
181
|
});
|
|
182
|
+
export const ReasoningTextFilterSensitiveLog = (obj) => ({
|
|
183
|
+
...obj,
|
|
184
|
+
...(obj.text && { text: SENSITIVE_STRING
|
|
185
|
+
}),
|
|
186
|
+
...(obj.signature && { signature: SENSITIVE_STRING
|
|
187
|
+
}),
|
|
188
|
+
});
|
|
189
|
+
export var ReasoningContent;
|
|
190
|
+
(function (ReasoningContent) {
|
|
191
|
+
ReasoningContent.visit = (value, visitor) => {
|
|
192
|
+
if (value.reasoningText !== undefined)
|
|
193
|
+
return visitor.reasoningText(value.reasoningText);
|
|
194
|
+
if (value.redactedContent !== undefined)
|
|
195
|
+
return visitor.redactedContent(value.redactedContent);
|
|
196
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
197
|
+
};
|
|
198
|
+
})(ReasoningContent || (ReasoningContent = {}));
|
|
199
|
+
export const ReasoningContentFilterSensitiveLog = (obj) => {
|
|
200
|
+
if (obj.reasoningText !== undefined)
|
|
201
|
+
return { reasoningText: SENSITIVE_STRING
|
|
202
|
+
};
|
|
203
|
+
if (obj.redactedContent !== undefined)
|
|
204
|
+
return { redactedContent: obj.redactedContent
|
|
205
|
+
};
|
|
206
|
+
if (obj.$unknown !== undefined)
|
|
207
|
+
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
208
|
+
};
|
|
132
209
|
export const SupplementaryWebLinkFilterSensitiveLog = (obj) => ({
|
|
133
210
|
...obj,
|
|
134
211
|
...(obj.url && { url: SENSITIVE_STRING
|
|
@@ -155,26 +232,9 @@ export const AssistantResponseMessageFilterSensitiveLog = (obj) => ({
|
|
|
155
232
|
}),
|
|
156
233
|
...(obj.toolUses && { toolUses: obj.toolUses.map(item => ToolUseFilterSensitiveLog(item))
|
|
157
234
|
}),
|
|
235
|
+
...(obj.reasoningContent && { reasoningContent: SENSITIVE_STRING
|
|
236
|
+
}),
|
|
158
237
|
});
|
|
159
|
-
export const ConflictExceptionReason = {
|
|
160
|
-
CUSTOMER_KMS_KEY_DISABLED: "CUSTOMER_KMS_KEY_DISABLED",
|
|
161
|
-
CUSTOMER_KMS_KEY_INVALID_KEY_POLICY: "CUSTOMER_KMS_KEY_INVALID_KEY_POLICY",
|
|
162
|
-
MISMATCHED_KMS_KEY: "MISMATCHED_KMS_KEY",
|
|
163
|
-
};
|
|
164
|
-
export class ConflictException extends __BaseException {
|
|
165
|
-
name = "ConflictException";
|
|
166
|
-
$fault = "client";
|
|
167
|
-
reason;
|
|
168
|
-
constructor(opts) {
|
|
169
|
-
super({
|
|
170
|
-
name: "ConflictException",
|
|
171
|
-
$fault: "client",
|
|
172
|
-
...opts
|
|
173
|
-
});
|
|
174
|
-
Object.setPrototypeOf(this, ConflictException.prototype);
|
|
175
|
-
this.reason = opts.reason;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
238
|
export const ContentChecksumType = {
|
|
179
239
|
SHA_256: "SHA_256",
|
|
180
240
|
};
|
|
@@ -220,14 +280,18 @@ export const Origin = {
|
|
|
220
280
|
DOCUMENTATION: "DOCUMENTATION",
|
|
221
281
|
GITLAB: "GITLAB",
|
|
222
282
|
IDE: "IDE",
|
|
283
|
+
INLINE_CHAT: "INLINE_CHAT",
|
|
284
|
+
KIRO_CLI: "KIRO_CLI",
|
|
223
285
|
MARKETING: "MARKETING",
|
|
224
286
|
MD: "MD",
|
|
287
|
+
MD_CE: "MD_CE",
|
|
225
288
|
MD_IDE: "MD_IDE",
|
|
226
289
|
MOBILE: "MOBILE",
|
|
227
290
|
OPENSEARCH_DASHBOARD: "OPENSEARCH_DASHBOARD",
|
|
228
291
|
Q_DEV_BEXT: "Q_DEV_BEXT",
|
|
229
292
|
SAGE_MAKER: "SAGE_MAKER",
|
|
230
293
|
SERVICE_INTERNAL: "SERVICE_INTERNAL",
|
|
294
|
+
SM_AI_STUDIO_IDE: "SM_AI_STUDIO_IDE",
|
|
231
295
|
UNIFIED_SEARCH: "UNIFIED_SEARCH",
|
|
232
296
|
UNKNOWN: "UNKNOWN",
|
|
233
297
|
};
|
|
@@ -437,6 +501,8 @@ export var Tool;
|
|
|
437
501
|
Tool.visit = (value, visitor) => {
|
|
438
502
|
if (value.toolSpecification !== undefined)
|
|
439
503
|
return visitor.toolSpecification(value.toolSpecification);
|
|
504
|
+
if (value.cachePoint !== undefined)
|
|
505
|
+
return visitor.cachePoint(value.cachePoint);
|
|
440
506
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
441
507
|
};
|
|
442
508
|
})(Tool || (Tool = {}));
|
|
@@ -444,6 +510,9 @@ export const ToolFilterSensitiveLog = (obj) => {
|
|
|
444
510
|
if (obj.toolSpecification !== undefined)
|
|
445
511
|
return { toolSpecification: ToolSpecificationFilterSensitiveLog(obj.toolSpecification)
|
|
446
512
|
};
|
|
513
|
+
if (obj.cachePoint !== undefined)
|
|
514
|
+
return { cachePoint: obj.cachePoint
|
|
515
|
+
};
|
|
447
516
|
if (obj.$unknown !== undefined)
|
|
448
517
|
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
449
518
|
};
|
|
@@ -529,6 +598,7 @@ export const FollowupPromptEventFilterSensitiveLog = (obj) => ({
|
|
|
529
598
|
}),
|
|
530
599
|
});
|
|
531
600
|
export const IntentType = {
|
|
601
|
+
ARTIFACT: "ARTIFACT",
|
|
532
602
|
DEEPLINKS: "DEEPLINKS",
|
|
533
603
|
GLUE_SENSEI: "GLUE_SENSEI",
|
|
534
604
|
RESOURCE_DATA: "RESOURCE_DATA",
|
|
@@ -780,6 +850,13 @@ export const InteractionComponentsEventFilterSensitiveLog = (obj) => ({
|
|
|
780
850
|
export const InvalidStateReason = {
|
|
781
851
|
INVALID_TASK_ASSIST_PLAN: "INVALID_TASK_ASSIST_PLAN",
|
|
782
852
|
};
|
|
853
|
+
export const ReasoningContentEventFilterSensitiveLog = (obj) => ({
|
|
854
|
+
...obj,
|
|
855
|
+
...(obj.text && { text: SENSITIVE_STRING
|
|
856
|
+
}),
|
|
857
|
+
...(obj.signature && { signature: SENSITIVE_STRING
|
|
858
|
+
}),
|
|
859
|
+
});
|
|
783
860
|
export const SupplementaryWebLinksEventFilterSensitiveLog = (obj) => ({
|
|
784
861
|
...obj,
|
|
785
862
|
...(obj.supplementaryWebLinks && { supplementaryWebLinks: obj.supplementaryWebLinks.map(item => SupplementaryWebLinkFilterSensitiveLog(item))
|
|
@@ -804,6 +881,8 @@ export var ChatResponseStream;
|
|
|
804
881
|
return visitor.messageMetadataEvent(value.messageMetadataEvent);
|
|
805
882
|
if (value.assistantResponseEvent !== undefined)
|
|
806
883
|
return visitor.assistantResponseEvent(value.assistantResponseEvent);
|
|
884
|
+
if (value.reasoningContentEvent !== undefined)
|
|
885
|
+
return visitor.reasoningContentEvent(value.reasoningContentEvent);
|
|
807
886
|
if (value.dryRunSucceedEvent !== undefined)
|
|
808
887
|
return visitor.dryRunSucceedEvent(value.dryRunSucceedEvent);
|
|
809
888
|
if (value.codeReferenceEvent !== undefined)
|
|
@@ -822,6 +901,12 @@ export var ChatResponseStream;
|
|
|
822
901
|
return visitor.toolUseEvent(value.toolUseEvent);
|
|
823
902
|
if (value.toolResultEvent !== undefined)
|
|
824
903
|
return visitor.toolResultEvent(value.toolResultEvent);
|
|
904
|
+
if (value.metadataEvent !== undefined)
|
|
905
|
+
return visitor.metadataEvent(value.metadataEvent);
|
|
906
|
+
if (value.meteringEvent !== undefined)
|
|
907
|
+
return visitor.meteringEvent(value.meteringEvent);
|
|
908
|
+
if (value.contextUsageEvent !== undefined)
|
|
909
|
+
return visitor.contextUsageEvent(value.contextUsageEvent);
|
|
825
910
|
if (value.citationEvent !== undefined)
|
|
826
911
|
return visitor.citationEvent(value.citationEvent);
|
|
827
912
|
if (value.invalidStateEvent !== undefined)
|
|
@@ -838,6 +923,9 @@ export const ChatResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
838
923
|
if (obj.assistantResponseEvent !== undefined)
|
|
839
924
|
return { assistantResponseEvent: AssistantResponseEventFilterSensitiveLog(obj.assistantResponseEvent)
|
|
840
925
|
};
|
|
926
|
+
if (obj.reasoningContentEvent !== undefined)
|
|
927
|
+
return { reasoningContentEvent: SENSITIVE_STRING
|
|
928
|
+
};
|
|
841
929
|
if (obj.dryRunSucceedEvent !== undefined)
|
|
842
930
|
return { dryRunSucceedEvent: obj.dryRunSucceedEvent
|
|
843
931
|
};
|
|
@@ -865,6 +953,15 @@ export const ChatResponseStreamFilterSensitiveLog = (obj) => {
|
|
|
865
953
|
if (obj.toolResultEvent !== undefined)
|
|
866
954
|
return { toolResultEvent: ToolResultEventFilterSensitiveLog(obj.toolResultEvent)
|
|
867
955
|
};
|
|
956
|
+
if (obj.metadataEvent !== undefined)
|
|
957
|
+
return { metadataEvent: obj.metadataEvent
|
|
958
|
+
};
|
|
959
|
+
if (obj.meteringEvent !== undefined)
|
|
960
|
+
return { meteringEvent: obj.meteringEvent
|
|
961
|
+
};
|
|
962
|
+
if (obj.contextUsageEvent !== undefined)
|
|
963
|
+
return { contextUsageEvent: obj.contextUsageEvent
|
|
964
|
+
};
|
|
868
965
|
if (obj.citationEvent !== undefined)
|
|
869
966
|
return { citationEvent: CitationEventFilterSensitiveLog(obj.citationEvent)
|
|
870
967
|
};
|
|
@@ -952,21 +1049,16 @@ export const ResultArchiveStreamFilterSensitiveLog = (obj) => {
|
|
|
952
1049
|
if (obj.$unknown !== undefined)
|
|
953
1050
|
return { [obj.$unknown[0]]: 'UNKNOWN' };
|
|
954
1051
|
};
|
|
955
|
-
export
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
export class ServiceQuotaExceededException extends __BaseException {
|
|
959
|
-
name = "ServiceQuotaExceededException";
|
|
960
|
-
$fault = "client";
|
|
961
|
-
reason;
|
|
1052
|
+
export class ServiceUnavailableException extends __BaseException {
|
|
1053
|
+
name = "ServiceUnavailableException";
|
|
1054
|
+
$fault = "server";
|
|
962
1055
|
constructor(opts) {
|
|
963
1056
|
super({
|
|
964
|
-
name: "
|
|
965
|
-
$fault: "
|
|
1057
|
+
name: "ServiceUnavailableException",
|
|
1058
|
+
$fault: "server",
|
|
966
1059
|
...opts
|
|
967
1060
|
});
|
|
968
|
-
Object.setPrototypeOf(this,
|
|
969
|
-
this.reason = opts.reason;
|
|
1061
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
970
1062
|
}
|
|
971
1063
|
}
|
|
972
1064
|
export const GenerateAssistantResponseRequestFilterSensitiveLog = (obj) => ({
|
|
@@ -984,6 +1076,22 @@ export const ExportResultArchiveResponseFilterSensitiveLog = (obj) => ({
|
|
|
984
1076
|
...(obj.body && { body: 'STREAMING_CONTENT'
|
|
985
1077
|
}),
|
|
986
1078
|
});
|
|
1079
|
+
export const MCPMethod = {
|
|
1080
|
+
INITIALIZE: "initialize",
|
|
1081
|
+
NOTIFICATIONS_INITIALIZED: "notifications/initialized",
|
|
1082
|
+
TOOLS_CALL: "tools/call",
|
|
1083
|
+
TOOLS_LIST: "tools/list",
|
|
1084
|
+
};
|
|
1085
|
+
export const InvokeMCPRequestFilterSensitiveLog = (obj) => ({
|
|
1086
|
+
...obj,
|
|
1087
|
+
...(obj.params && { params: SENSITIVE_STRING
|
|
1088
|
+
}),
|
|
1089
|
+
});
|
|
1090
|
+
export const InvokeMCPResponseFilterSensitiveLog = (obj) => ({
|
|
1091
|
+
...obj,
|
|
1092
|
+
...(obj.result && { result: SENSITIVE_STRING
|
|
1093
|
+
}),
|
|
1094
|
+
});
|
|
987
1095
|
export const SendMessageRequestFilterSensitiveLog = (obj) => ({
|
|
988
1096
|
...obj,
|
|
989
1097
|
...(obj.conversationState && { conversationState: ConversationStateFilterSensitiveLog(obj.conversationState)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CodeWhispererStreamingServiceException as __BaseException } from "../models/CodeWhispererStreamingServiceException";
|
|
2
|
-
import { AccessDeniedException, ChatMessage, ConflictException, DryRunOperationException, ImageSource, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, Tool, ToolResultContentBlock, ValidationException, } from "../models/models_0";
|
|
2
|
+
import { AccessDeniedException, ChatMessage, ConflictException, DryRunOperationException, ImageSource, InternalServerException, ReasoningContent, ResourceNotFoundException, ServiceQuotaExceededException, ServiceUnavailableException, ThrottlingException, Tool, ToolResultContentBlock, ValidationException, } from "../models/models_0";
|
|
3
3
|
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
4
4
|
import { requestBuilder as rb } from "@smithy/core";
|
|
5
|
-
import { decorateServiceException as __decorateServiceException, expectString as __expectString, _json, collectBody, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
5
|
+
import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, _json, collectBody, isSerializableHeaderValue, map, take, withBaseException, } from "@smithy/smithy-client";
|
|
6
6
|
export const se_ExportResultArchiveCommand = async (input, context) => {
|
|
7
7
|
const b = rb(input, context);
|
|
8
8
|
const headers = {
|
|
@@ -23,9 +23,10 @@ export const se_ExportResultArchiveCommand = async (input, context) => {
|
|
|
23
23
|
};
|
|
24
24
|
export const se_GenerateAssistantResponseCommand = async (input, context) => {
|
|
25
25
|
const b = rb(input, context);
|
|
26
|
-
const headers = {
|
|
26
|
+
const headers = map({}, isSerializableHeaderValue, {
|
|
27
27
|
'content-type': 'application/json',
|
|
28
|
-
|
|
28
|
+
[_xakam]: input[_aM],
|
|
29
|
+
});
|
|
29
30
|
b.bp("/generateAssistantResponse");
|
|
30
31
|
let body;
|
|
31
32
|
body = JSON.stringify(take(input, {
|
|
@@ -54,6 +55,24 @@ export const se_GenerateTaskAssistPlanCommand = async (input, context) => {
|
|
|
54
55
|
.b(body);
|
|
55
56
|
return b.build();
|
|
56
57
|
};
|
|
58
|
+
export const se_InvokeMCPCommand = async (input, context) => {
|
|
59
|
+
const b = rb(input, context);
|
|
60
|
+
const headers = {
|
|
61
|
+
'content-type': 'application/json',
|
|
62
|
+
};
|
|
63
|
+
b.bp("/mcp");
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(take(input, {
|
|
66
|
+
'id': _ => se_Document(_, context),
|
|
67
|
+
'jsonrpc': [],
|
|
68
|
+
'method': [],
|
|
69
|
+
'params': _ => se_SensitiveDocument(_, context),
|
|
70
|
+
}));
|
|
71
|
+
b.m("POST")
|
|
72
|
+
.h(headers)
|
|
73
|
+
.b(body);
|
|
74
|
+
return b.build();
|
|
75
|
+
};
|
|
57
76
|
export const se_SendMessageCommand = async (input, context) => {
|
|
58
77
|
const b = rb(input, context);
|
|
59
78
|
const headers = {
|
|
@@ -106,6 +125,23 @@ export const de_GenerateTaskAssistPlanCommand = async (output, context) => {
|
|
|
106
125
|
contents.planningResponseStream = de_ChatResponseStream(data, context);
|
|
107
126
|
return contents;
|
|
108
127
|
};
|
|
128
|
+
export const de_InvokeMCPCommand = async (output, context) => {
|
|
129
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
130
|
+
return de_CommandError(output, context);
|
|
131
|
+
}
|
|
132
|
+
const contents = map({
|
|
133
|
+
$metadata: deserializeMetadata(output),
|
|
134
|
+
});
|
|
135
|
+
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
136
|
+
const doc = take(data, {
|
|
137
|
+
'error': _ => de_JsonRpcError(_, context),
|
|
138
|
+
'id': _ => de_Document(_, context),
|
|
139
|
+
'jsonrpc': __expectString,
|
|
140
|
+
'result': _ => de_SensitiveDocument(_, context),
|
|
141
|
+
});
|
|
142
|
+
Object.assign(contents, doc);
|
|
143
|
+
return contents;
|
|
144
|
+
};
|
|
109
145
|
export const de_SendMessageCommand = async (output, context) => {
|
|
110
146
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
111
147
|
return de_CommandError(output, context);
|
|
@@ -145,6 +181,9 @@ const de_CommandError = async (output, context) => {
|
|
|
145
181
|
case "ServiceQuotaExceededException":
|
|
146
182
|
case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
|
|
147
183
|
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
184
|
+
case "ServiceUnavailableException":
|
|
185
|
+
case "com.amazon.aws.codewhisperer#ServiceUnavailableException":
|
|
186
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
148
187
|
case "DryRunOperationException":
|
|
149
188
|
case "com.amazon.aws.codewhisperer#DryRunOperationException":
|
|
150
189
|
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
@@ -240,6 +279,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
240
279
|
});
|
|
241
280
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
242
281
|
};
|
|
282
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
283
|
+
const contents = map({});
|
|
284
|
+
const data = parsedOutput.body;
|
|
285
|
+
const doc = take(data, {
|
|
286
|
+
'message': __expectString,
|
|
287
|
+
});
|
|
288
|
+
Object.assign(contents, doc);
|
|
289
|
+
const exception = new ServiceUnavailableException({
|
|
290
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
291
|
+
...contents
|
|
292
|
+
});
|
|
293
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
294
|
+
};
|
|
243
295
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
244
296
|
const contents = map({});
|
|
245
297
|
const data = parsedOutput.body;
|
|
@@ -280,6 +332,11 @@ const de_ChatResponseStream = (output, context) => {
|
|
|
280
332
|
assistantResponseEvent: await de_AssistantResponseEvent_event(event["assistantResponseEvent"], context),
|
|
281
333
|
};
|
|
282
334
|
}
|
|
335
|
+
if (event["reasoningContentEvent"] != null) {
|
|
336
|
+
return {
|
|
337
|
+
reasoningContentEvent: await de_ReasoningContentEvent_event(event["reasoningContentEvent"], context),
|
|
338
|
+
};
|
|
339
|
+
}
|
|
283
340
|
if (event["dryRunSucceedEvent"] != null) {
|
|
284
341
|
return {
|
|
285
342
|
dryRunSucceedEvent: await de_DryRunSucceedEvent_event(event["dryRunSucceedEvent"], context),
|
|
@@ -325,6 +382,21 @@ const de_ChatResponseStream = (output, context) => {
|
|
|
325
382
|
toolResultEvent: await de_ToolResultEvent_event(event["toolResultEvent"], context),
|
|
326
383
|
};
|
|
327
384
|
}
|
|
385
|
+
if (event["metadataEvent"] != null) {
|
|
386
|
+
return {
|
|
387
|
+
metadataEvent: await de_MetadataEvent_event(event["metadataEvent"], context),
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
if (event["meteringEvent"] != null) {
|
|
391
|
+
return {
|
|
392
|
+
meteringEvent: await de_MeteringEvent_event(event["meteringEvent"], context),
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
if (event["contextUsageEvent"] != null) {
|
|
396
|
+
return {
|
|
397
|
+
contextUsageEvent: await de_ContextUsageEvent_event(event["contextUsageEvent"], context),
|
|
398
|
+
};
|
|
399
|
+
}
|
|
328
400
|
if (event["citationEvent"] != null) {
|
|
329
401
|
return {
|
|
330
402
|
citationEvent: await de_CitationEvent_event(event["citationEvent"], context),
|
|
@@ -399,6 +471,12 @@ const de_CodeReferenceEvent_event = async (output, context) => {
|
|
|
399
471
|
Object.assign(contents, _json(data));
|
|
400
472
|
return contents;
|
|
401
473
|
};
|
|
474
|
+
const de_ContextUsageEvent_event = async (output, context) => {
|
|
475
|
+
const contents = {};
|
|
476
|
+
const data = await parseBody(output.body, context);
|
|
477
|
+
Object.assign(contents, de_ContextUsageEvent(data, context));
|
|
478
|
+
return contents;
|
|
479
|
+
};
|
|
402
480
|
const de_DryRunSucceedEvent_event = async (output, context) => {
|
|
403
481
|
const contents = {};
|
|
404
482
|
const data = await parseBody(output.body, context);
|
|
@@ -436,6 +514,24 @@ const de_MessageMetadataEvent_event = async (output, context) => {
|
|
|
436
514
|
Object.assign(contents, _json(data));
|
|
437
515
|
return contents;
|
|
438
516
|
};
|
|
517
|
+
const de_MetadataEvent_event = async (output, context) => {
|
|
518
|
+
const contents = {};
|
|
519
|
+
const data = await parseBody(output.body, context);
|
|
520
|
+
Object.assign(contents, de_MetadataEvent(data, context));
|
|
521
|
+
return contents;
|
|
522
|
+
};
|
|
523
|
+
const de_MeteringEvent_event = async (output, context) => {
|
|
524
|
+
const contents = {};
|
|
525
|
+
const data = await parseBody(output.body, context);
|
|
526
|
+
Object.assign(contents, de_MeteringEvent(data, context));
|
|
527
|
+
return contents;
|
|
528
|
+
};
|
|
529
|
+
const de_ReasoningContentEvent_event = async (output, context) => {
|
|
530
|
+
const contents = {};
|
|
531
|
+
const data = await parseBody(output.body, context);
|
|
532
|
+
Object.assign(contents, de_ReasoningContentEvent(data, context));
|
|
533
|
+
return contents;
|
|
534
|
+
};
|
|
439
535
|
const de_SupplementaryWebLinksEvent_event = async (output, context) => {
|
|
440
536
|
const contents = {};
|
|
441
537
|
const data = await parseBody(output.body, context);
|
|
@@ -462,9 +558,11 @@ const de_InteractionComponentsEvent_event = async (output, context) => {
|
|
|
462
558
|
};
|
|
463
559
|
const se_AssistantResponseMessage = (input, context) => {
|
|
464
560
|
return take(input, {
|
|
561
|
+
'cachePoint': _json,
|
|
465
562
|
'content': [],
|
|
466
563
|
'followupPrompt': _json,
|
|
467
564
|
'messageId': [],
|
|
565
|
+
'reasoningContent': _ => se_ReasoningContent(_, context),
|
|
468
566
|
'references': _json,
|
|
469
567
|
'supplementaryWebLinks': _json,
|
|
470
568
|
'toolUses': _ => se_ToolUses(_, context),
|
|
@@ -484,6 +582,8 @@ const se_ChatMessage = (input, context) => {
|
|
|
484
582
|
};
|
|
485
583
|
const se_ConversationState = (input, context) => {
|
|
486
584
|
return take(input, {
|
|
585
|
+
'agentContinuationId': [],
|
|
586
|
+
'agentTaskType': [],
|
|
487
587
|
'chatTriggerType': [],
|
|
488
588
|
'conversationId': [],
|
|
489
589
|
'currentMessage': _ => se_ChatMessage(_, context),
|
|
@@ -509,11 +609,19 @@ const se_ImageSource = (input, context) => {
|
|
|
509
609
|
_: (name, value) => ({ name: value })
|
|
510
610
|
});
|
|
511
611
|
};
|
|
612
|
+
const se_ReasoningContent = (input, context) => {
|
|
613
|
+
return ReasoningContent.visit(input, {
|
|
614
|
+
reasoningText: value => ({ "reasoningText": _json(value) }),
|
|
615
|
+
redactedContent: value => ({ "redactedContent": context.base64Encoder(value) }),
|
|
616
|
+
_: (name, value) => ({ name: value })
|
|
617
|
+
});
|
|
618
|
+
};
|
|
512
619
|
const se_SensitiveDocument = (input, context) => {
|
|
513
620
|
return input;
|
|
514
621
|
};
|
|
515
622
|
const se_Tool = (input, context) => {
|
|
516
623
|
return Tool.visit(input, {
|
|
624
|
+
cachePoint: value => ({ "cachePoint": _json(value) }),
|
|
517
625
|
toolSpecification: value => ({ "toolSpecification": se_ToolSpecification(value, context) }),
|
|
518
626
|
_: (name, value) => ({ name: value })
|
|
519
627
|
});
|
|
@@ -573,6 +681,8 @@ const se_ToolUses = (input, context) => {
|
|
|
573
681
|
};
|
|
574
682
|
const se_UserInputMessage = (input, context) => {
|
|
575
683
|
return take(input, {
|
|
684
|
+
'cachePoint': _json,
|
|
685
|
+
'clientCacheConfig': _json,
|
|
576
686
|
'content': [],
|
|
577
687
|
'images': _ => se_ImageBlocks(_, context),
|
|
578
688
|
'modelId': [],
|
|
@@ -596,11 +706,38 @@ const se_UserInputMessageContext = (input, context) => {
|
|
|
596
706
|
'userSettings': _json,
|
|
597
707
|
});
|
|
598
708
|
};
|
|
709
|
+
const se_Document = (input, context) => {
|
|
710
|
+
return input;
|
|
711
|
+
};
|
|
599
712
|
const de_BinaryPayloadEvent = (output, context) => {
|
|
600
713
|
return take(output, {
|
|
601
714
|
'bytes': context.base64Decoder,
|
|
602
715
|
});
|
|
603
716
|
};
|
|
717
|
+
const de_ContextUsageEvent = (output, context) => {
|
|
718
|
+
return take(output, {
|
|
719
|
+
'contextUsagePercentage': __limitedParseFloat32,
|
|
720
|
+
});
|
|
721
|
+
};
|
|
722
|
+
const de_MetadataEvent = (output, context) => {
|
|
723
|
+
return take(output, {
|
|
724
|
+
'tokenUsage': (_) => de_TokenUsage(_, context),
|
|
725
|
+
});
|
|
726
|
+
};
|
|
727
|
+
const de_MeteringEvent = (output, context) => {
|
|
728
|
+
return take(output, {
|
|
729
|
+
'unit': __expectString,
|
|
730
|
+
'unitPlural': __expectString,
|
|
731
|
+
'usage': __limitedParseDouble,
|
|
732
|
+
});
|
|
733
|
+
};
|
|
734
|
+
const de_ReasoningContentEvent = (output, context) => {
|
|
735
|
+
return take(output, {
|
|
736
|
+
'redactedContent': context.base64Decoder,
|
|
737
|
+
'signature': __expectString,
|
|
738
|
+
'text': __expectString,
|
|
739
|
+
});
|
|
740
|
+
};
|
|
604
741
|
const de_SensitiveDocument = (output, context) => {
|
|
605
742
|
return output;
|
|
606
743
|
};
|
|
@@ -633,6 +770,23 @@ const de_ToolResultEvent = (output, context) => {
|
|
|
633
770
|
'toolResult': (_) => de_ToolResult(_, context),
|
|
634
771
|
});
|
|
635
772
|
};
|
|
773
|
+
const de_TokenUsage = (output, context) => {
|
|
774
|
+
return take(output, {
|
|
775
|
+
'cacheReadInputTokens': __expectInt32,
|
|
776
|
+
'cacheWriteInputTokens': __expectInt32,
|
|
777
|
+
'contextUsagePercentage': __limitedParseFloat32,
|
|
778
|
+
'outputTokens': __expectInt32,
|
|
779
|
+
'totalTokens': __expectInt32,
|
|
780
|
+
'uncachedInputTokens': __expectInt32,
|
|
781
|
+
});
|
|
782
|
+
};
|
|
783
|
+
const de_JsonRpcError = (output, context) => {
|
|
784
|
+
return take(output, {
|
|
785
|
+
'code': __expectInt32,
|
|
786
|
+
'data': (_) => de_Document(_, context),
|
|
787
|
+
'message': __expectString,
|
|
788
|
+
});
|
|
789
|
+
};
|
|
636
790
|
const de_InteractionComponentsEvent = (output, context) => {
|
|
637
791
|
return take(output, {
|
|
638
792
|
'interactionComponentEntries': (_) => de_InteractionComponentEntryList(_, context),
|
|
@@ -666,6 +820,9 @@ const de_InteractionComponentEntryList = (output, context) => {
|
|
|
666
820
|
});
|
|
667
821
|
return retVal;
|
|
668
822
|
};
|
|
823
|
+
const de_Document = (output, context) => {
|
|
824
|
+
return output;
|
|
825
|
+
};
|
|
669
826
|
const deserializeMetadata = (output) => ({
|
|
670
827
|
httpStatusCode: output.statusCode,
|
|
671
828
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -673,5 +830,7 @@ const deserializeMetadata = (output) => ({
|
|
|
673
830
|
cfId: output.headers["x-amz-cf-id"],
|
|
674
831
|
});
|
|
675
832
|
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then(body => context.utf8Encoder(body));
|
|
833
|
+
const _aM = "agentMode";
|
|
676
834
|
const _cI = "conversationId";
|
|
677
835
|
const _xacci = "x-amzn-codewhisperer-conversation-id";
|
|
836
|
+
const _xakam = "x-amzn-kiro-agent-mode";
|
|
@@ -2,6 +2,7 @@ import { CodeWhispererStreamingClient } from "./CodeWhispererStreamingClient";
|
|
|
2
2
|
import { ExportResultArchiveCommandInput, ExportResultArchiveCommandOutput } from "./commands/ExportResultArchiveCommand";
|
|
3
3
|
import { GenerateAssistantResponseCommandInput, GenerateAssistantResponseCommandOutput } from "./commands/GenerateAssistantResponseCommand";
|
|
4
4
|
import { GenerateTaskAssistPlanCommandInput, GenerateTaskAssistPlanCommandOutput } from "./commands/GenerateTaskAssistPlanCommand";
|
|
5
|
+
import { InvokeMCPCommandInput, InvokeMCPCommandOutput } from "./commands/InvokeMCPCommand";
|
|
5
6
|
import { SendMessageCommandInput, SendMessageCommandOutput } from "./commands/SendMessageCommand";
|
|
6
7
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
7
8
|
export interface CodeWhispererStreaming {
|
|
@@ -23,6 +24,12 @@ export interface CodeWhispererStreaming {
|
|
|
23
24
|
generateTaskAssistPlan(args: GenerateTaskAssistPlanCommandInput, options?: __HttpHandlerOptions): Promise<GenerateTaskAssistPlanCommandOutput>;
|
|
24
25
|
generateTaskAssistPlan(args: GenerateTaskAssistPlanCommandInput, cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void): void;
|
|
25
26
|
generateTaskAssistPlan(args: GenerateTaskAssistPlanCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GenerateTaskAssistPlanCommandOutput) => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* @see {@link InvokeMCPCommand}
|
|
29
|
+
*/
|
|
30
|
+
invokeMCP(args: InvokeMCPCommandInput, options?: __HttpHandlerOptions): Promise<InvokeMCPCommandOutput>;
|
|
31
|
+
invokeMCP(args: InvokeMCPCommandInput, cb: (err: any, data?: InvokeMCPCommandOutput) => void): void;
|
|
32
|
+
invokeMCP(args: InvokeMCPCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: InvokeMCPCommandOutput) => void): void;
|
|
26
33
|
/**
|
|
27
34
|
* @see {@link SendMessageCommand}
|
|
28
35
|
*/
|