@aws/lsp-codewhisperer 0.0.96 → 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 +40 -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.d.ts +3 -1
- package/out/language-server/agenticChat/agenticChatController.js +55 -22
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/constants/constants.d.ts +0 -3
- package/out/language-server/agenticChat/constants/constants.js +1 -7
- package/out/language-server/agenticChat/constants/constants.js.map +1 -1
- package/out/language-server/agenticChat/constants/modelSelection.d.ts +1 -0
- package/out/language-server/agenticChat/constants/modelSelection.js +5 -1
- package/out/language-server/agenticChat/constants/modelSelection.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/mcpOauthClient.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 +48 -0
- package/out/language-server/agenticChat/utils/tokenLimitsCalculator.js +48 -0
- package/out/language-server/agenticChat/utils/tokenLimitsCalculator.js.map +1 -0
- package/out/language-server/chat/chatSessionService.d.ts +17 -1
- package/out/language-server/chat/chatSessionService.js +28 -1
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/configuration/transformConfigurationServer.d.ts +0 -13
- package/out/language-server/configuration/transformConfigurationServer.js +4 -112
- package/out/language-server/configuration/transformConfigurationServer.js.map +1 -1
- package/out/language-server/netTransform/atxTransformHandler.d.ts +2 -33
- package/out/language-server/netTransform/atxTransformHandler.js +130 -428
- package/out/language-server/netTransform/atxTransformHandler.js.map +1 -1
- package/out/language-server/netTransform/transformHandler.d.ts +0 -4
- package/out/language-server/netTransform/transformHandler.js +11 -39
- package/out/language-server/netTransform/transformHandler.js.map +1 -1
- package/out/language-server/netTransform/utils.d.ts +49 -0
- package/out/language-server/netTransform/utils.js +185 -0
- package/out/language-server/netTransform/utils.js.map +1 -0
- package/out/shared/amazonQServiceManager/AtxTokenServiceManager.d.ts +0 -1
- package/out/shared/amazonQServiceManager/AtxTokenServiceManager.js +14 -38
- package/out/shared/amazonQServiceManager/AtxTokenServiceManager.js.map +1 -1
- package/out/shared/codeWhispererService.js +2 -1
- 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,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_SendMessageCommand = exports.de_GenerateTaskAssistPlanCommand = exports.de_GenerateAssistantResponseCommand = exports.de_ExportResultArchiveCommand = exports.se_SendMessageCommand = exports.se_GenerateTaskAssistPlanCommand = exports.se_GenerateAssistantResponseCommand = exports.se_ExportResultArchiveCommand = void 0;
|
|
3
|
+
exports.de_SendMessageCommand = exports.de_InvokeMCPCommand = exports.de_GenerateTaskAssistPlanCommand = exports.de_GenerateAssistantResponseCommand = exports.de_ExportResultArchiveCommand = exports.se_SendMessageCommand = exports.se_InvokeMCPCommand = exports.se_GenerateTaskAssistPlanCommand = exports.se_GenerateAssistantResponseCommand = exports.se_ExportResultArchiveCommand = void 0;
|
|
4
4
|
const CodeWhispererStreamingServiceException_1 = require("../models/CodeWhispererStreamingServiceException");
|
|
5
5
|
const models_0_1 = require("../models/models_0");
|
|
6
6
|
const core_1 = require("@aws-sdk/core");
|
|
@@ -27,9 +27,10 @@ const se_ExportResultArchiveCommand = async (input, context) => {
|
|
|
27
27
|
exports.se_ExportResultArchiveCommand = se_ExportResultArchiveCommand;
|
|
28
28
|
const se_GenerateAssistantResponseCommand = async (input, context) => {
|
|
29
29
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
30
|
-
const headers = {
|
|
30
|
+
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
31
31
|
'content-type': 'application/json',
|
|
32
|
-
|
|
32
|
+
[_xakam]: input[_aM],
|
|
33
|
+
});
|
|
33
34
|
b.bp("/generateAssistantResponse");
|
|
34
35
|
let body;
|
|
35
36
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
@@ -60,6 +61,25 @@ const se_GenerateTaskAssistPlanCommand = async (input, context) => {
|
|
|
60
61
|
return b.build();
|
|
61
62
|
};
|
|
62
63
|
exports.se_GenerateTaskAssistPlanCommand = se_GenerateTaskAssistPlanCommand;
|
|
64
|
+
const se_InvokeMCPCommand = async (input, context) => {
|
|
65
|
+
const b = (0, core_2.requestBuilder)(input, context);
|
|
66
|
+
const headers = {
|
|
67
|
+
'content-type': 'application/json',
|
|
68
|
+
};
|
|
69
|
+
b.bp("/mcp");
|
|
70
|
+
let body;
|
|
71
|
+
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
72
|
+
'id': _ => se_Document(_, context),
|
|
73
|
+
'jsonrpc': [],
|
|
74
|
+
'method': [],
|
|
75
|
+
'params': _ => se_SensitiveDocument(_, context),
|
|
76
|
+
}));
|
|
77
|
+
b.m("POST")
|
|
78
|
+
.h(headers)
|
|
79
|
+
.b(body);
|
|
80
|
+
return b.build();
|
|
81
|
+
};
|
|
82
|
+
exports.se_InvokeMCPCommand = se_InvokeMCPCommand;
|
|
63
83
|
const se_SendMessageCommand = async (input, context) => {
|
|
64
84
|
const b = (0, core_2.requestBuilder)(input, context);
|
|
65
85
|
const headers = {
|
|
@@ -116,6 +136,24 @@ const de_GenerateTaskAssistPlanCommand = async (output, context) => {
|
|
|
116
136
|
return contents;
|
|
117
137
|
};
|
|
118
138
|
exports.de_GenerateTaskAssistPlanCommand = de_GenerateTaskAssistPlanCommand;
|
|
139
|
+
const de_InvokeMCPCommand = async (output, context) => {
|
|
140
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
141
|
+
return de_CommandError(output, context);
|
|
142
|
+
}
|
|
143
|
+
const contents = (0, smithy_client_1.map)({
|
|
144
|
+
$metadata: deserializeMetadata(output),
|
|
145
|
+
});
|
|
146
|
+
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
147
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
148
|
+
'error': _ => de_JsonRpcError(_, context),
|
|
149
|
+
'id': _ => de_Document(_, context),
|
|
150
|
+
'jsonrpc': smithy_client_1.expectString,
|
|
151
|
+
'result': _ => de_SensitiveDocument(_, context),
|
|
152
|
+
});
|
|
153
|
+
Object.assign(contents, doc);
|
|
154
|
+
return contents;
|
|
155
|
+
};
|
|
156
|
+
exports.de_InvokeMCPCommand = de_InvokeMCPCommand;
|
|
119
157
|
const de_SendMessageCommand = async (output, context) => {
|
|
120
158
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
121
159
|
return de_CommandError(output, context);
|
|
@@ -156,6 +194,9 @@ const de_CommandError = async (output, context) => {
|
|
|
156
194
|
case "ServiceQuotaExceededException":
|
|
157
195
|
case "com.amazon.aws.codewhisperer#ServiceQuotaExceededException":
|
|
158
196
|
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
197
|
+
case "ServiceUnavailableException":
|
|
198
|
+
case "com.amazon.aws.codewhisperer#ServiceUnavailableException":
|
|
199
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
159
200
|
case "DryRunOperationException":
|
|
160
201
|
case "com.amazon.aws.codewhisperer#DryRunOperationException":
|
|
161
202
|
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
@@ -251,6 +292,19 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
251
292
|
});
|
|
252
293
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
253
294
|
};
|
|
295
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
296
|
+
const contents = (0, smithy_client_1.map)({});
|
|
297
|
+
const data = parsedOutput.body;
|
|
298
|
+
const doc = (0, smithy_client_1.take)(data, {
|
|
299
|
+
'message': smithy_client_1.expectString,
|
|
300
|
+
});
|
|
301
|
+
Object.assign(contents, doc);
|
|
302
|
+
const exception = new models_0_1.ServiceUnavailableException({
|
|
303
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
304
|
+
...contents
|
|
305
|
+
});
|
|
306
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
307
|
+
};
|
|
254
308
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
255
309
|
const contents = (0, smithy_client_1.map)({});
|
|
256
310
|
const data = parsedOutput.body;
|
|
@@ -291,6 +345,11 @@ const de_ChatResponseStream = (output, context) => {
|
|
|
291
345
|
assistantResponseEvent: await de_AssistantResponseEvent_event(event["assistantResponseEvent"], context),
|
|
292
346
|
};
|
|
293
347
|
}
|
|
348
|
+
if (event["reasoningContentEvent"] != null) {
|
|
349
|
+
return {
|
|
350
|
+
reasoningContentEvent: await de_ReasoningContentEvent_event(event["reasoningContentEvent"], context),
|
|
351
|
+
};
|
|
352
|
+
}
|
|
294
353
|
if (event["dryRunSucceedEvent"] != null) {
|
|
295
354
|
return {
|
|
296
355
|
dryRunSucceedEvent: await de_DryRunSucceedEvent_event(event["dryRunSucceedEvent"], context),
|
|
@@ -336,6 +395,21 @@ const de_ChatResponseStream = (output, context) => {
|
|
|
336
395
|
toolResultEvent: await de_ToolResultEvent_event(event["toolResultEvent"], context),
|
|
337
396
|
};
|
|
338
397
|
}
|
|
398
|
+
if (event["metadataEvent"] != null) {
|
|
399
|
+
return {
|
|
400
|
+
metadataEvent: await de_MetadataEvent_event(event["metadataEvent"], context),
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
if (event["meteringEvent"] != null) {
|
|
404
|
+
return {
|
|
405
|
+
meteringEvent: await de_MeteringEvent_event(event["meteringEvent"], context),
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
if (event["contextUsageEvent"] != null) {
|
|
409
|
+
return {
|
|
410
|
+
contextUsageEvent: await de_ContextUsageEvent_event(event["contextUsageEvent"], context),
|
|
411
|
+
};
|
|
412
|
+
}
|
|
339
413
|
if (event["citationEvent"] != null) {
|
|
340
414
|
return {
|
|
341
415
|
citationEvent: await de_CitationEvent_event(event["citationEvent"], context),
|
|
@@ -410,6 +484,12 @@ const de_CodeReferenceEvent_event = async (output, context) => {
|
|
|
410
484
|
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
411
485
|
return contents;
|
|
412
486
|
};
|
|
487
|
+
const de_ContextUsageEvent_event = async (output, context) => {
|
|
488
|
+
const contents = {};
|
|
489
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
490
|
+
Object.assign(contents, de_ContextUsageEvent(data, context));
|
|
491
|
+
return contents;
|
|
492
|
+
};
|
|
413
493
|
const de_DryRunSucceedEvent_event = async (output, context) => {
|
|
414
494
|
const contents = {};
|
|
415
495
|
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
@@ -447,6 +527,24 @@ const de_MessageMetadataEvent_event = async (output, context) => {
|
|
|
447
527
|
Object.assign(contents, (0, smithy_client_1._json)(data));
|
|
448
528
|
return contents;
|
|
449
529
|
};
|
|
530
|
+
const de_MetadataEvent_event = async (output, context) => {
|
|
531
|
+
const contents = {};
|
|
532
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
533
|
+
Object.assign(contents, de_MetadataEvent(data, context));
|
|
534
|
+
return contents;
|
|
535
|
+
};
|
|
536
|
+
const de_MeteringEvent_event = async (output, context) => {
|
|
537
|
+
const contents = {};
|
|
538
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
539
|
+
Object.assign(contents, de_MeteringEvent(data, context));
|
|
540
|
+
return contents;
|
|
541
|
+
};
|
|
542
|
+
const de_ReasoningContentEvent_event = async (output, context) => {
|
|
543
|
+
const contents = {};
|
|
544
|
+
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
545
|
+
Object.assign(contents, de_ReasoningContentEvent(data, context));
|
|
546
|
+
return contents;
|
|
547
|
+
};
|
|
450
548
|
const de_SupplementaryWebLinksEvent_event = async (output, context) => {
|
|
451
549
|
const contents = {};
|
|
452
550
|
const data = await (0, core_1.parseJsonBody)(output.body, context);
|
|
@@ -473,9 +571,11 @@ const de_InteractionComponentsEvent_event = async (output, context) => {
|
|
|
473
571
|
};
|
|
474
572
|
const se_AssistantResponseMessage = (input, context) => {
|
|
475
573
|
return (0, smithy_client_1.take)(input, {
|
|
574
|
+
'cachePoint': smithy_client_1._json,
|
|
476
575
|
'content': [],
|
|
477
576
|
'followupPrompt': smithy_client_1._json,
|
|
478
577
|
'messageId': [],
|
|
578
|
+
'reasoningContent': _ => se_ReasoningContent(_, context),
|
|
479
579
|
'references': smithy_client_1._json,
|
|
480
580
|
'supplementaryWebLinks': smithy_client_1._json,
|
|
481
581
|
'toolUses': _ => se_ToolUses(_, context),
|
|
@@ -495,6 +595,8 @@ const se_ChatMessage = (input, context) => {
|
|
|
495
595
|
};
|
|
496
596
|
const se_ConversationState = (input, context) => {
|
|
497
597
|
return (0, smithy_client_1.take)(input, {
|
|
598
|
+
'agentContinuationId': [],
|
|
599
|
+
'agentTaskType': [],
|
|
498
600
|
'chatTriggerType': [],
|
|
499
601
|
'conversationId': [],
|
|
500
602
|
'currentMessage': _ => se_ChatMessage(_, context),
|
|
@@ -520,11 +622,19 @@ const se_ImageSource = (input, context) => {
|
|
|
520
622
|
_: (name, value) => ({ name: value })
|
|
521
623
|
});
|
|
522
624
|
};
|
|
625
|
+
const se_ReasoningContent = (input, context) => {
|
|
626
|
+
return models_0_1.ReasoningContent.visit(input, {
|
|
627
|
+
reasoningText: value => ({ "reasoningText": (0, smithy_client_1._json)(value) }),
|
|
628
|
+
redactedContent: value => ({ "redactedContent": context.base64Encoder(value) }),
|
|
629
|
+
_: (name, value) => ({ name: value })
|
|
630
|
+
});
|
|
631
|
+
};
|
|
523
632
|
const se_SensitiveDocument = (input, context) => {
|
|
524
633
|
return input;
|
|
525
634
|
};
|
|
526
635
|
const se_Tool = (input, context) => {
|
|
527
636
|
return models_0_1.Tool.visit(input, {
|
|
637
|
+
cachePoint: value => ({ "cachePoint": (0, smithy_client_1._json)(value) }),
|
|
528
638
|
toolSpecification: value => ({ "toolSpecification": se_ToolSpecification(value, context) }),
|
|
529
639
|
_: (name, value) => ({ name: value })
|
|
530
640
|
});
|
|
@@ -584,6 +694,8 @@ const se_ToolUses = (input, context) => {
|
|
|
584
694
|
};
|
|
585
695
|
const se_UserInputMessage = (input, context) => {
|
|
586
696
|
return (0, smithy_client_1.take)(input, {
|
|
697
|
+
'cachePoint': smithy_client_1._json,
|
|
698
|
+
'clientCacheConfig': smithy_client_1._json,
|
|
587
699
|
'content': [],
|
|
588
700
|
'images': _ => se_ImageBlocks(_, context),
|
|
589
701
|
'modelId': [],
|
|
@@ -607,11 +719,38 @@ const se_UserInputMessageContext = (input, context) => {
|
|
|
607
719
|
'userSettings': smithy_client_1._json,
|
|
608
720
|
});
|
|
609
721
|
};
|
|
722
|
+
const se_Document = (input, context) => {
|
|
723
|
+
return input;
|
|
724
|
+
};
|
|
610
725
|
const de_BinaryPayloadEvent = (output, context) => {
|
|
611
726
|
return (0, smithy_client_1.take)(output, {
|
|
612
727
|
'bytes': context.base64Decoder,
|
|
613
728
|
});
|
|
614
729
|
};
|
|
730
|
+
const de_ContextUsageEvent = (output, context) => {
|
|
731
|
+
return (0, smithy_client_1.take)(output, {
|
|
732
|
+
'contextUsagePercentage': smithy_client_1.limitedParseFloat32,
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
const de_MetadataEvent = (output, context) => {
|
|
736
|
+
return (0, smithy_client_1.take)(output, {
|
|
737
|
+
'tokenUsage': (_) => de_TokenUsage(_, context),
|
|
738
|
+
});
|
|
739
|
+
};
|
|
740
|
+
const de_MeteringEvent = (output, context) => {
|
|
741
|
+
return (0, smithy_client_1.take)(output, {
|
|
742
|
+
'unit': smithy_client_1.expectString,
|
|
743
|
+
'unitPlural': smithy_client_1.expectString,
|
|
744
|
+
'usage': smithy_client_1.limitedParseDouble,
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
const de_ReasoningContentEvent = (output, context) => {
|
|
748
|
+
return (0, smithy_client_1.take)(output, {
|
|
749
|
+
'redactedContent': context.base64Decoder,
|
|
750
|
+
'signature': smithy_client_1.expectString,
|
|
751
|
+
'text': smithy_client_1.expectString,
|
|
752
|
+
});
|
|
753
|
+
};
|
|
615
754
|
const de_SensitiveDocument = (output, context) => {
|
|
616
755
|
return output;
|
|
617
756
|
};
|
|
@@ -644,6 +783,23 @@ const de_ToolResultEvent = (output, context) => {
|
|
|
644
783
|
'toolResult': (_) => de_ToolResult(_, context),
|
|
645
784
|
});
|
|
646
785
|
};
|
|
786
|
+
const de_TokenUsage = (output, context) => {
|
|
787
|
+
return (0, smithy_client_1.take)(output, {
|
|
788
|
+
'cacheReadInputTokens': smithy_client_1.expectInt32,
|
|
789
|
+
'cacheWriteInputTokens': smithy_client_1.expectInt32,
|
|
790
|
+
'contextUsagePercentage': smithy_client_1.limitedParseFloat32,
|
|
791
|
+
'outputTokens': smithy_client_1.expectInt32,
|
|
792
|
+
'totalTokens': smithy_client_1.expectInt32,
|
|
793
|
+
'uncachedInputTokens': smithy_client_1.expectInt32,
|
|
794
|
+
});
|
|
795
|
+
};
|
|
796
|
+
const de_JsonRpcError = (output, context) => {
|
|
797
|
+
return (0, smithy_client_1.take)(output, {
|
|
798
|
+
'code': smithy_client_1.expectInt32,
|
|
799
|
+
'data': (_) => de_Document(_, context),
|
|
800
|
+
'message': smithy_client_1.expectString,
|
|
801
|
+
});
|
|
802
|
+
};
|
|
647
803
|
const de_InteractionComponentsEvent = (output, context) => {
|
|
648
804
|
return (0, smithy_client_1.take)(output, {
|
|
649
805
|
'interactionComponentEntries': (_) => de_InteractionComponentEntryList(_, context),
|
|
@@ -677,6 +833,9 @@ const de_InteractionComponentEntryList = (output, context) => {
|
|
|
677
833
|
});
|
|
678
834
|
return retVal;
|
|
679
835
|
};
|
|
836
|
+
const de_Document = (output, context) => {
|
|
837
|
+
return output;
|
|
838
|
+
};
|
|
680
839
|
const deserializeMetadata = (output) => ({
|
|
681
840
|
httpStatusCode: output.statusCode,
|
|
682
841
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
@@ -684,5 +843,7 @@ const deserializeMetadata = (output) => ({
|
|
|
684
843
|
cfId: output.headers["x-amz-cf-id"],
|
|
685
844
|
});
|
|
686
845
|
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
|
|
846
|
+
const _aM = "agentMode";
|
|
687
847
|
const _cI = "conversationId";
|
|
688
848
|
const _xacci = "x-amzn-codewhisperer-conversation-id";
|
|
849
|
+
const _xakam = "x-amzn-kiro-agent-mode";
|
|
@@ -2,12 +2,14 @@ import { CodeWhispererStreamingClient, } from "./CodeWhispererStreamingClient";
|
|
|
2
2
|
import { ExportResultArchiveCommand, } from "./commands/ExportResultArchiveCommand";
|
|
3
3
|
import { GenerateAssistantResponseCommand, } from "./commands/GenerateAssistantResponseCommand";
|
|
4
4
|
import { GenerateTaskAssistPlanCommand, } from "./commands/GenerateTaskAssistPlanCommand";
|
|
5
|
+
import { InvokeMCPCommand, } from "./commands/InvokeMCPCommand";
|
|
5
6
|
import { SendMessageCommand, } from "./commands/SendMessageCommand";
|
|
6
7
|
import { createAggregatedClient } from "@smithy/smithy-client";
|
|
7
8
|
const commands = {
|
|
8
9
|
ExportResultArchiveCommand,
|
|
9
10
|
GenerateAssistantResponseCommand,
|
|
10
11
|
GenerateTaskAssistPlanCommand,
|
|
12
|
+
InvokeMCPCommand,
|
|
11
13
|
SendMessageCommand,
|
|
12
14
|
};
|
|
13
15
|
export class CodeWhispererStreaming extends CodeWhispererStreamingClient {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InvokeMCPRequestFilterSensitiveLog, InvokeMCPResponseFilterSensitiveLog, } from "../models/models_0";
|
|
2
|
+
import { de_InvokeMCPCommand, se_InvokeMCPCommand, } from "../protocols/Aws_restJson1";
|
|
3
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
4
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
5
|
+
export { $Command };
|
|
6
|
+
export class InvokeMCPCommand extends $Command.classBuilder()
|
|
7
|
+
.m(function (Command, cs, config, o) {
|
|
8
|
+
return [
|
|
9
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
10
|
+
];
|
|
11
|
+
})
|
|
12
|
+
.s("AmazonCodeWhispererStreamingService", "InvokeMCP", {})
|
|
13
|
+
.n("CodeWhispererStreamingClient", "InvokeMCPCommand")
|
|
14
|
+
.f(InvokeMCPRequestFilterSensitiveLog, InvokeMCPResponseFilterSensitiveLog)
|
|
15
|
+
.ser(se_InvokeMCPCommand)
|
|
16
|
+
.de(de_InvokeMCPCommand)
|
|
17
|
+
.build() {
|
|
18
|
+
}
|