@aws-sdk/client-bedrock-agent-runtime 3.755.0 → 3.764.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.
Files changed (92) hide show
  1. package/README.md +119 -7
  2. package/dist-cjs/index.js +1035 -78
  3. package/dist-es/BedrockAgentRuntime.js +28 -0
  4. package/dist-es/commands/CreateInvocationCommand.js +22 -0
  5. package/dist-es/commands/CreateSessionCommand.js +22 -0
  6. package/dist-es/commands/DeleteSessionCommand.js +22 -0
  7. package/dist-es/commands/EndSessionCommand.js +22 -0
  8. package/dist-es/commands/GetInvocationStepCommand.js +23 -0
  9. package/dist-es/commands/GetSessionCommand.js +22 -0
  10. package/dist-es/commands/InvokeAgentCommand.js +2 -1
  11. package/dist-es/commands/InvokeInlineAgentCommand.js +2 -1
  12. package/dist-es/commands/ListInvocationStepsCommand.js +22 -0
  13. package/dist-es/commands/ListInvocationsCommand.js +22 -0
  14. package/dist-es/commands/ListSessionsCommand.js +22 -0
  15. package/dist-es/commands/ListTagsForResourceCommand.js +22 -0
  16. package/dist-es/commands/PutInvocationStepCommand.js +23 -0
  17. package/dist-es/commands/RetrieveAndGenerateCommand.js +2 -1
  18. package/dist-es/commands/RetrieveAndGenerateStreamCommand.js +2 -1
  19. package/dist-es/commands/RetrieveCommand.js +2 -1
  20. package/dist-es/commands/TagResourceCommand.js +22 -0
  21. package/dist-es/commands/UntagResourceCommand.js +22 -0
  22. package/dist-es/commands/UpdateSessionCommand.js +22 -0
  23. package/dist-es/commands/index.js +14 -0
  24. package/dist-es/models/index.js +1 -0
  25. package/dist-es/models/models_0.js +76 -156
  26. package/dist-es/models/models_1.js +181 -0
  27. package/dist-es/pagination/ListInvocationStepsPaginator.js +4 -0
  28. package/dist-es/pagination/ListInvocationsPaginator.js +4 -0
  29. package/dist-es/pagination/ListSessionsPaginator.js +4 -0
  30. package/dist-es/pagination/index.js +3 -0
  31. package/dist-es/protocols/Aws_restJson1.js +560 -8
  32. package/dist-types/BedrockAgentRuntime.d.ts +100 -0
  33. package/dist-types/BedrockAgentRuntimeClient.d.ts +16 -2
  34. package/dist-types/commands/CreateInvocationCommand.d.ts +115 -0
  35. package/dist-types/commands/CreateSessionCommand.d.ts +133 -0
  36. package/dist-types/commands/DeleteSessionCommand.d.ts +89 -0
  37. package/dist-types/commands/EndSessionCommand.d.ts +93 -0
  38. package/dist-types/commands/GetInvocationStepCommand.d.ts +109 -0
  39. package/dist-types/commands/GetSessionCommand.d.ts +94 -0
  40. package/dist-types/commands/InvokeAgentCommand.d.ts +3 -1
  41. package/dist-types/commands/InvokeInlineAgentCommand.d.ts +216 -64
  42. package/dist-types/commands/ListInvocationStepsCommand.d.ts +97 -0
  43. package/dist-types/commands/ListInvocationsCommand.d.ts +95 -0
  44. package/dist-types/commands/ListSessionsCommand.d.ts +93 -0
  45. package/dist-types/commands/ListTagsForResourceCommand.d.ts +88 -0
  46. package/dist-types/commands/PutInvocationStepCommand.d.ts +134 -0
  47. package/dist-types/commands/RetrieveAndGenerateCommand.d.ts +2 -1
  48. package/dist-types/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -1
  49. package/dist-types/commands/RetrieveCommand.d.ts +2 -1
  50. package/dist-types/commands/TagResourceCommand.d.ts +91 -0
  51. package/dist-types/commands/UntagResourceCommand.d.ts +87 -0
  52. package/dist-types/commands/UpdateSessionCommand.d.ts +96 -0
  53. package/dist-types/commands/index.d.ts +14 -0
  54. package/dist-types/models/index.d.ts +1 -0
  55. package/dist-types/models/models_0.d.ts +605 -684
  56. package/dist-types/models/models_1.d.ts +1055 -0
  57. package/dist-types/pagination/ListInvocationStepsPaginator.d.ts +7 -0
  58. package/dist-types/pagination/ListInvocationsPaginator.d.ts +7 -0
  59. package/dist-types/pagination/ListSessionsPaginator.d.ts +7 -0
  60. package/dist-types/pagination/index.d.ts +3 -0
  61. package/dist-types/protocols/Aws_restJson1.d.ts +126 -0
  62. package/dist-types/ts3.4/BedrockAgentRuntime.d.ts +240 -0
  63. package/dist-types/ts3.4/BedrockAgentRuntimeClient.d.ts +86 -2
  64. package/dist-types/ts3.4/commands/CreateInvocationCommand.d.ts +50 -0
  65. package/dist-types/ts3.4/commands/CreateSessionCommand.d.ts +50 -0
  66. package/dist-types/ts3.4/commands/DeleteSessionCommand.d.ts +50 -0
  67. package/dist-types/ts3.4/commands/EndSessionCommand.d.ts +47 -0
  68. package/dist-types/ts3.4/commands/GetInvocationStepCommand.d.ts +51 -0
  69. package/dist-types/ts3.4/commands/GetSessionCommand.d.ts +47 -0
  70. package/dist-types/ts3.4/commands/InvokeAgentCommand.d.ts +2 -1
  71. package/dist-types/ts3.4/commands/InvokeInlineAgentCommand.d.ts +2 -4
  72. package/dist-types/ts3.4/commands/ListInvocationStepsCommand.d.ts +51 -0
  73. package/dist-types/ts3.4/commands/ListInvocationsCommand.d.ts +50 -0
  74. package/dist-types/ts3.4/commands/ListSessionsCommand.d.ts +47 -0
  75. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +51 -0
  76. package/dist-types/ts3.4/commands/PutInvocationStepCommand.d.ts +51 -0
  77. package/dist-types/ts3.4/commands/RetrieveAndGenerateCommand.d.ts +2 -4
  78. package/dist-types/ts3.4/commands/RetrieveAndGenerateStreamCommand.d.ts +2 -4
  79. package/dist-types/ts3.4/commands/RetrieveCommand.d.ts +2 -1
  80. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +48 -0
  81. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +50 -0
  82. package/dist-types/ts3.4/commands/UpdateSessionCommand.d.ts +50 -0
  83. package/dist-types/ts3.4/commands/index.d.ts +14 -0
  84. package/dist-types/ts3.4/models/index.d.ts +1 -0
  85. package/dist-types/ts3.4/models/models_0.d.ts +250 -374
  86. package/dist-types/ts3.4/models/models_1.d.ts +441 -0
  87. package/dist-types/ts3.4/pagination/ListInvocationStepsPaginator.d.ts +11 -0
  88. package/dist-types/ts3.4/pagination/ListInvocationsPaginator.d.ts +11 -0
  89. package/dist-types/ts3.4/pagination/ListSessionsPaginator.d.ts +11 -0
  90. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  91. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +168 -0
  92. package/package.json +12 -12
@@ -1,8 +1,39 @@
1
1
  import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
2
2
  import { requestBuilder as rb } from "@smithy/core";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, isSerializableHeaderValue, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, serializeDateTime as __serializeDateTime, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { BedrockAgentRuntimeServiceException as __BaseException } from "../models/BedrockAgentRuntimeServiceException";
5
- import { AccessDeniedException, BadGatewayException, ConflictException, DependencyFailedException, FlowInputContent, InternalServerException, ModelNotReadyException, ResourceNotFoundException, RetrievalFilter, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
+ import { AccessDeniedException, BadGatewayException, BedrockSessionContentBlock, ConflictException, DependencyFailedException, FlowInputContent, ImageSource, InternalServerException, InvocationStepPayload, ModelNotReadyException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
6
+ import { RetrievalFilter, } from "../models/models_1";
7
+ export const se_CreateInvocationCommand = async (input, context) => {
8
+ const b = rb(input, context);
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ b.bp("/sessions/{sessionIdentifier}/invocations");
13
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
14
+ let body;
15
+ body = JSON.stringify(take(input, {
16
+ description: [],
17
+ invocationId: [],
18
+ }));
19
+ b.m("PUT").h(headers).b(body);
20
+ return b.build();
21
+ };
22
+ export const se_CreateSessionCommand = async (input, context) => {
23
+ const b = rb(input, context);
24
+ const headers = {
25
+ "content-type": "application/json",
26
+ };
27
+ b.bp("/sessions");
28
+ let body;
29
+ body = JSON.stringify(take(input, {
30
+ encryptionKeyArn: [],
31
+ sessionMetadata: (_) => _json(_),
32
+ tags: (_) => _json(_),
33
+ }));
34
+ b.m("PUT").h(headers).b(body);
35
+ return b.build();
36
+ };
6
37
  export const se_DeleteAgentMemoryCommand = async (input, context) => {
7
38
  const b = rb(input, context);
8
39
  const headers = {};
@@ -17,6 +48,24 @@ export const se_DeleteAgentMemoryCommand = async (input, context) => {
17
48
  b.m("DELETE").h(headers).q(query).b(body);
18
49
  return b.build();
19
50
  };
51
+ export const se_DeleteSessionCommand = async (input, context) => {
52
+ const b = rb(input, context);
53
+ const headers = {};
54
+ b.bp("/sessions/{sessionIdentifier}");
55
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
56
+ let body;
57
+ b.m("DELETE").h(headers).b(body);
58
+ return b.build();
59
+ };
60
+ export const se_EndSessionCommand = async (input, context) => {
61
+ const b = rb(input, context);
62
+ const headers = {};
63
+ b.bp("/sessions/{sessionIdentifier}");
64
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
65
+ let body;
66
+ b.m("PATCH").h(headers).b(body);
67
+ return b.build();
68
+ };
20
69
  export const se_GenerateQueryCommand = async (input, context) => {
21
70
  const b = rb(input, context);
22
71
  const headers = {
@@ -47,6 +96,30 @@ export const se_GetAgentMemoryCommand = async (input, context) => {
47
96
  b.m("GET").h(headers).q(query).b(body);
48
97
  return b.build();
49
98
  };
99
+ export const se_GetInvocationStepCommand = async (input, context) => {
100
+ const b = rb(input, context);
101
+ const headers = {
102
+ "content-type": "application/json",
103
+ };
104
+ b.bp("/sessions/{sessionIdentifier}/invocationSteps/{invocationStepId}");
105
+ b.p("invocationStepId", () => input.invocationStepId, "{invocationStepId}", false);
106
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
107
+ let body;
108
+ body = JSON.stringify(take(input, {
109
+ invocationIdentifier: [],
110
+ }));
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
113
+ };
114
+ export const se_GetSessionCommand = async (input, context) => {
115
+ const b = rb(input, context);
116
+ const headers = {};
117
+ b.bp("/sessions/{sessionIdentifier}");
118
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
119
+ let body;
120
+ b.m("GET").h(headers).b(body);
121
+ return b.build();
122
+ };
50
123
  export const se_InvokeAgentCommand = async (input, context) => {
51
124
  const b = rb(input, context);
52
125
  const headers = map({}, isSerializableHeaderValue, {
@@ -98,7 +171,10 @@ export const se_InvokeInlineAgentCommand = async (input, context) => {
98
171
  let body;
99
172
  body = JSON.stringify(take(input, {
100
173
  actionGroups: (_) => _json(_),
174
+ agentCollaboration: [],
101
175
  bedrockModelConfigurations: (_) => _json(_),
176
+ collaboratorConfigurations: (_) => _json(_),
177
+ collaborators: (_) => se_Collaborators(_, context),
102
178
  customerEncryptionKeyArn: [],
103
179
  enableTrace: [],
104
180
  endSession: [],
@@ -115,6 +191,58 @@ export const se_InvokeInlineAgentCommand = async (input, context) => {
115
191
  b.m("POST").h(headers).b(body);
116
192
  return b.build();
117
193
  };
194
+ export const se_ListInvocationsCommand = async (input, context) => {
195
+ const b = rb(input, context);
196
+ const headers = {};
197
+ b.bp("/sessions/{sessionIdentifier}/invocations");
198
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
199
+ const query = map({
200
+ [_nT]: [, input[_nT]],
201
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
202
+ });
203
+ let body;
204
+ b.m("POST").h(headers).q(query).b(body);
205
+ return b.build();
206
+ };
207
+ export const se_ListInvocationStepsCommand = async (input, context) => {
208
+ const b = rb(input, context);
209
+ const headers = {
210
+ "content-type": "application/json",
211
+ };
212
+ b.bp("/sessions/{sessionIdentifier}/invocationSteps");
213
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
214
+ const query = map({
215
+ [_nT]: [, input[_nT]],
216
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
217
+ });
218
+ let body;
219
+ body = JSON.stringify(take(input, {
220
+ invocationIdentifier: [],
221
+ }));
222
+ b.m("POST").h(headers).q(query).b(body);
223
+ return b.build();
224
+ };
225
+ export const se_ListSessionsCommand = async (input, context) => {
226
+ const b = rb(input, context);
227
+ const headers = {};
228
+ b.bp("/sessions");
229
+ const query = map({
230
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
231
+ [_nT]: [, input[_nT]],
232
+ });
233
+ let body;
234
+ b.m("POST").h(headers).q(query).b(body);
235
+ return b.build();
236
+ };
237
+ export const se_ListTagsForResourceCommand = async (input, context) => {
238
+ const b = rb(input, context);
239
+ const headers = {};
240
+ b.bp("/tags/{resourceArn}");
241
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
242
+ let body;
243
+ b.m("GET").h(headers).b(body);
244
+ return b.build();
245
+ };
118
246
  export const se_OptimizePromptCommand = async (input, context) => {
119
247
  const b = rb(input, context);
120
248
  const headers = {
@@ -129,6 +257,23 @@ export const se_OptimizePromptCommand = async (input, context) => {
129
257
  b.m("POST").h(headers).b(body);
130
258
  return b.build();
131
259
  };
260
+ export const se_PutInvocationStepCommand = async (input, context) => {
261
+ const b = rb(input, context);
262
+ const headers = {
263
+ "content-type": "application/json",
264
+ };
265
+ b.bp("/sessions/{sessionIdentifier}/invocationSteps");
266
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
267
+ let body;
268
+ body = JSON.stringify(take(input, {
269
+ invocationIdentifier: [],
270
+ invocationStepId: [],
271
+ invocationStepTime: (_) => __serializeDateTime(_),
272
+ payload: (_) => se_InvocationStepPayload(_, context),
273
+ }));
274
+ b.m("PUT").h(headers).b(body);
275
+ return b.build();
276
+ };
132
277
  export const se_RerankCommand = async (input, context) => {
133
278
  const b = rb(input, context);
134
279
  const headers = {
@@ -194,6 +339,79 @@ export const se_RetrieveAndGenerateStreamCommand = async (input, context) => {
194
339
  b.m("POST").h(headers).b(body);
195
340
  return b.build();
196
341
  };
342
+ export const se_TagResourceCommand = async (input, context) => {
343
+ const b = rb(input, context);
344
+ const headers = {
345
+ "content-type": "application/json",
346
+ };
347
+ b.bp("/tags/{resourceArn}");
348
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
349
+ let body;
350
+ body = JSON.stringify(take(input, {
351
+ tags: (_) => _json(_),
352
+ }));
353
+ b.m("POST").h(headers).b(body);
354
+ return b.build();
355
+ };
356
+ export const se_UntagResourceCommand = async (input, context) => {
357
+ const b = rb(input, context);
358
+ const headers = {};
359
+ b.bp("/tags/{resourceArn}");
360
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
361
+ const query = map({
362
+ [_tK]: [__expectNonNull(input.tagKeys, `tagKeys`) != null, () => input[_tK] || []],
363
+ });
364
+ let body;
365
+ b.m("DELETE").h(headers).q(query).b(body);
366
+ return b.build();
367
+ };
368
+ export const se_UpdateSessionCommand = async (input, context) => {
369
+ const b = rb(input, context);
370
+ const headers = {
371
+ "content-type": "application/json",
372
+ };
373
+ b.bp("/sessions/{sessionIdentifier}");
374
+ b.p("sessionIdentifier", () => input.sessionIdentifier, "{sessionIdentifier}", false);
375
+ let body;
376
+ body = JSON.stringify(take(input, {
377
+ sessionMetadata: (_) => _json(_),
378
+ }));
379
+ b.m("PUT").h(headers).b(body);
380
+ return b.build();
381
+ };
382
+ export const de_CreateInvocationCommand = async (output, context) => {
383
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
384
+ return de_CommandError(output, context);
385
+ }
386
+ const contents = map({
387
+ $metadata: deserializeMetadata(output),
388
+ });
389
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
390
+ const doc = take(data, {
391
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
392
+ invocationId: __expectString,
393
+ sessionId: __expectString,
394
+ });
395
+ Object.assign(contents, doc);
396
+ return contents;
397
+ };
398
+ export const de_CreateSessionCommand = async (output, context) => {
399
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
400
+ return de_CommandError(output, context);
401
+ }
402
+ const contents = map({
403
+ $metadata: deserializeMetadata(output),
404
+ });
405
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
406
+ const doc = take(data, {
407
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
408
+ sessionArn: __expectString,
409
+ sessionId: __expectString,
410
+ sessionStatus: __expectString,
411
+ });
412
+ Object.assign(contents, doc);
413
+ return contents;
414
+ };
197
415
  export const de_DeleteAgentMemoryCommand = async (output, context) => {
198
416
  if (output.statusCode !== 202 && output.statusCode >= 300) {
199
417
  return de_CommandError(output, context);
@@ -204,6 +422,32 @@ export const de_DeleteAgentMemoryCommand = async (output, context) => {
204
422
  await collectBody(output.body, context);
205
423
  return contents;
206
424
  };
425
+ export const de_DeleteSessionCommand = async (output, context) => {
426
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
427
+ return de_CommandError(output, context);
428
+ }
429
+ const contents = map({
430
+ $metadata: deserializeMetadata(output),
431
+ });
432
+ await collectBody(output.body, context);
433
+ return contents;
434
+ };
435
+ export const de_EndSessionCommand = async (output, context) => {
436
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
437
+ return de_CommandError(output, context);
438
+ }
439
+ const contents = map({
440
+ $metadata: deserializeMetadata(output),
441
+ });
442
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
443
+ const doc = take(data, {
444
+ sessionArn: __expectString,
445
+ sessionId: __expectString,
446
+ sessionStatus: __expectString,
447
+ });
448
+ Object.assign(contents, doc);
449
+ return contents;
450
+ };
207
451
  export const de_GenerateQueryCommand = async (output, context) => {
208
452
  if (output.statusCode !== 200 && output.statusCode >= 300) {
209
453
  return de_CommandError(output, context);
@@ -233,6 +477,40 @@ export const de_GetAgentMemoryCommand = async (output, context) => {
233
477
  Object.assign(contents, doc);
234
478
  return contents;
235
479
  };
480
+ export const de_GetInvocationStepCommand = async (output, context) => {
481
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
482
+ return de_CommandError(output, context);
483
+ }
484
+ const contents = map({
485
+ $metadata: deserializeMetadata(output),
486
+ });
487
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
488
+ const doc = take(data, {
489
+ invocationStep: (_) => de_InvocationStep(_, context),
490
+ });
491
+ Object.assign(contents, doc);
492
+ return contents;
493
+ };
494
+ export const de_GetSessionCommand = async (output, context) => {
495
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
496
+ return de_CommandError(output, context);
497
+ }
498
+ const contents = map({
499
+ $metadata: deserializeMetadata(output),
500
+ });
501
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
502
+ const doc = take(data, {
503
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
504
+ encryptionKeyArn: __expectString,
505
+ lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
506
+ sessionArn: __expectString,
507
+ sessionId: __expectString,
508
+ sessionMetadata: _json,
509
+ sessionStatus: __expectString,
510
+ });
511
+ Object.assign(contents, doc);
512
+ return contents;
513
+ };
236
514
  export const de_InvokeAgentCommand = async (output, context) => {
237
515
  if (output.statusCode !== 200 && output.statusCode >= 300) {
238
516
  return de_CommandError(output, context);
@@ -272,6 +550,65 @@ export const de_InvokeInlineAgentCommand = async (output, context) => {
272
550
  contents.completion = de_InlineAgentResponseStream(data, context);
273
551
  return contents;
274
552
  };
553
+ export const de_ListInvocationsCommand = async (output, context) => {
554
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
555
+ return de_CommandError(output, context);
556
+ }
557
+ const contents = map({
558
+ $metadata: deserializeMetadata(output),
559
+ });
560
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
561
+ const doc = take(data, {
562
+ invocationSummaries: (_) => de_InvocationSummaries(_, context),
563
+ nextToken: __expectString,
564
+ });
565
+ Object.assign(contents, doc);
566
+ return contents;
567
+ };
568
+ export const de_ListInvocationStepsCommand = async (output, context) => {
569
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
570
+ return de_CommandError(output, context);
571
+ }
572
+ const contents = map({
573
+ $metadata: deserializeMetadata(output),
574
+ });
575
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
576
+ const doc = take(data, {
577
+ invocationStepSummaries: (_) => de_InvocationStepSummaries(_, context),
578
+ nextToken: __expectString,
579
+ });
580
+ Object.assign(contents, doc);
581
+ return contents;
582
+ };
583
+ export const de_ListSessionsCommand = async (output, context) => {
584
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
585
+ return de_CommandError(output, context);
586
+ }
587
+ const contents = map({
588
+ $metadata: deserializeMetadata(output),
589
+ });
590
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
591
+ const doc = take(data, {
592
+ nextToken: __expectString,
593
+ sessionSummaries: (_) => de_SessionSummaries(_, context),
594
+ });
595
+ Object.assign(contents, doc);
596
+ return contents;
597
+ };
598
+ export const de_ListTagsForResourceCommand = async (output, context) => {
599
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
600
+ return de_CommandError(output, context);
601
+ }
602
+ const contents = map({
603
+ $metadata: deserializeMetadata(output),
604
+ });
605
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
606
+ const doc = take(data, {
607
+ tags: _json,
608
+ });
609
+ Object.assign(contents, doc);
610
+ return contents;
611
+ };
275
612
  export const de_OptimizePromptCommand = async (output, context) => {
276
613
  if (output.statusCode !== 200 && output.statusCode >= 300) {
277
614
  return de_CommandError(output, context);
@@ -283,6 +620,20 @@ export const de_OptimizePromptCommand = async (output, context) => {
283
620
  contents.optimizedPrompt = de_OptimizedPromptStream(data, context);
284
621
  return contents;
285
622
  };
623
+ export const de_PutInvocationStepCommand = async (output, context) => {
624
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
625
+ return de_CommandError(output, context);
626
+ }
627
+ const contents = map({
628
+ $metadata: deserializeMetadata(output),
629
+ });
630
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
631
+ const doc = take(data, {
632
+ invocationStepId: __expectString,
633
+ });
634
+ Object.assign(contents, doc);
635
+ return contents;
636
+ };
286
637
  export const de_RerankCommand = async (output, context) => {
287
638
  if (output.statusCode !== 200 && output.statusCode >= 300) {
288
639
  return de_CommandError(output, context);
@@ -343,6 +694,44 @@ export const de_RetrieveAndGenerateStreamCommand = async (output, context) => {
343
694
  contents.stream = de_RetrieveAndGenerateStreamResponseOutput(data, context);
344
695
  return contents;
345
696
  };
697
+ export const de_TagResourceCommand = async (output, context) => {
698
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
699
+ return de_CommandError(output, context);
700
+ }
701
+ const contents = map({
702
+ $metadata: deserializeMetadata(output),
703
+ });
704
+ await collectBody(output.body, context);
705
+ return contents;
706
+ };
707
+ export const de_UntagResourceCommand = async (output, context) => {
708
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
709
+ return de_CommandError(output, context);
710
+ }
711
+ const contents = map({
712
+ $metadata: deserializeMetadata(output),
713
+ });
714
+ await collectBody(output.body, context);
715
+ return contents;
716
+ };
717
+ export const de_UpdateSessionCommand = async (output, context) => {
718
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
719
+ return de_CommandError(output, context);
720
+ }
721
+ const contents = map({
722
+ $metadata: deserializeMetadata(output),
723
+ });
724
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
725
+ const doc = take(data, {
726
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
727
+ lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
728
+ sessionArn: __expectString,
729
+ sessionId: __expectString,
730
+ sessionStatus: __expectString,
731
+ });
732
+ Object.assign(contents, doc);
733
+ return contents;
734
+ };
346
735
  const de_CommandError = async (output, context) => {
347
736
  const parsedOutput = {
348
737
  ...output,
@@ -353,15 +742,9 @@ const de_CommandError = async (output, context) => {
353
742
  case "AccessDeniedException":
354
743
  case "com.amazonaws.bedrockagentruntime#AccessDeniedException":
355
744
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
356
- case "BadGatewayException":
357
- case "com.amazonaws.bedrockagentruntime#BadGatewayException":
358
- throw await de_BadGatewayExceptionRes(parsedOutput, context);
359
745
  case "ConflictException":
360
746
  case "com.amazonaws.bedrockagentruntime#ConflictException":
361
747
  throw await de_ConflictExceptionRes(parsedOutput, context);
362
- case "DependencyFailedException":
363
- case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
364
- throw await de_DependencyFailedExceptionRes(parsedOutput, context);
365
748
  case "InternalServerException":
366
749
  case "com.amazonaws.bedrockagentruntime#InternalServerException":
367
750
  throw await de_InternalServerExceptionRes(parsedOutput, context);
@@ -377,6 +760,12 @@ const de_CommandError = async (output, context) => {
377
760
  case "ValidationException":
378
761
  case "com.amazonaws.bedrockagentruntime#ValidationException":
379
762
  throw await de_ValidationExceptionRes(parsedOutput, context);
763
+ case "BadGatewayException":
764
+ case "com.amazonaws.bedrockagentruntime#BadGatewayException":
765
+ throw await de_BadGatewayExceptionRes(parsedOutput, context);
766
+ case "DependencyFailedException":
767
+ case "com.amazonaws.bedrockagentruntime#DependencyFailedException":
768
+ throw await de_DependencyFailedExceptionRes(parsedOutput, context);
380
769
  case "ModelNotReadyException":
381
770
  case "com.amazonaws.bedrockagentruntime#ModelNotReadyException":
382
771
  throw await de_ModelNotReadyExceptionRes(parsedOutput, context);
@@ -1044,6 +1433,20 @@ const se_BedrockRerankingModelConfiguration = (input, context) => {
1044
1433
  modelArn: [],
1045
1434
  });
1046
1435
  };
1436
+ const se_BedrockSessionContentBlock = (input, context) => {
1437
+ return BedrockSessionContentBlock.visit(input, {
1438
+ image: (value) => ({ image: se_ImageBlock(value, context) }),
1439
+ text: (value) => ({ text: value }),
1440
+ _: (name, value) => ({ [name]: value }),
1441
+ });
1442
+ };
1443
+ const se_BedrockSessionContentBlocks = (input, context) => {
1444
+ return input
1445
+ .filter((e) => e != null)
1446
+ .map((entry) => {
1447
+ return se_BedrockSessionContentBlock(entry, context);
1448
+ });
1449
+ };
1047
1450
  const se_ByteContentDoc = (input, context) => {
1048
1451
  return take(input, {
1049
1452
  contentType: [],
@@ -1057,6 +1460,28 @@ const se_ByteContentFile = (input, context) => {
1057
1460
  mediaType: [],
1058
1461
  });
1059
1462
  };
1463
+ const se_Collaborator = (input, context) => {
1464
+ return take(input, {
1465
+ actionGroups: _json,
1466
+ agentCollaboration: [],
1467
+ agentName: [],
1468
+ collaboratorConfigurations: _json,
1469
+ customerEncryptionKeyArn: [],
1470
+ foundationModel: [],
1471
+ guardrailConfiguration: _json,
1472
+ idleSessionTTLInSeconds: [],
1473
+ instruction: [],
1474
+ knowledgeBases: (_) => se_KnowledgeBases(_, context),
1475
+ promptOverrideConfiguration: (_) => se_PromptOverrideConfiguration(_, context),
1476
+ });
1477
+ };
1478
+ const se_Collaborators = (input, context) => {
1479
+ return input
1480
+ .filter((e) => e != null)
1481
+ .map((entry) => {
1482
+ return se_Collaborator(entry, context);
1483
+ });
1484
+ };
1060
1485
  const se_ExternalSource = (input, context) => {
1061
1486
  return take(input, {
1062
1487
  byteContent: (_) => se_ByteContentDoc(_, context),
@@ -1133,6 +1558,19 @@ const se_GenerationConfiguration = (input, context) => {
1133
1558
  promptTemplate: _json,
1134
1559
  });
1135
1560
  };
1561
+ const se_ImageBlock = (input, context) => {
1562
+ return take(input, {
1563
+ format: [],
1564
+ source: (_) => se_ImageSource(_, context),
1565
+ });
1566
+ };
1567
+ const se_ImageSource = (input, context) => {
1568
+ return ImageSource.visit(input, {
1569
+ bytes: (value) => ({ bytes: context.base64Encoder(value) }),
1570
+ s3Location: (value) => ({ s3Location: _json(value) }),
1571
+ _: (name, value) => ({ [name]: value }),
1572
+ });
1573
+ };
1136
1574
  const se_InferenceConfig = (input, context) => {
1137
1575
  return take(input, {
1138
1576
  textInferenceConfig: (_) => se_TextInferenceConfig(_, context),
@@ -1149,6 +1587,7 @@ const se_InferenceConfiguration = (input, context) => {
1149
1587
  };
1150
1588
  const se_InlineSessionState = (input, context) => {
1151
1589
  return take(input, {
1590
+ conversationHistory: _json,
1152
1591
  files: (_) => se_InputFiles(_, context),
1153
1592
  invocationId: [],
1154
1593
  promptSessionAttributes: _json,
@@ -1170,6 +1609,12 @@ const se_InputFiles = (input, context) => {
1170
1609
  return se_InputFile(entry, context);
1171
1610
  });
1172
1611
  };
1612
+ const se_InvocationStepPayload = (input, context) => {
1613
+ return InvocationStepPayload.visit(input, {
1614
+ contentBlocks: (value) => ({ contentBlocks: se_BedrockSessionContentBlocks(value, context) }),
1615
+ _: (name, value) => ({ [name]: value }),
1616
+ });
1617
+ };
1173
1618
  const se_KnowledgeBase = (input, context) => {
1174
1619
  return take(input, {
1175
1620
  description: [],
@@ -1233,6 +1678,7 @@ const se_PromptConfiguration = (input, context) => {
1233
1678
  return take(input, {
1234
1679
  additionalModelRequestFields: (_) => se_Document(_, context),
1235
1680
  basePromptTemplate: [],
1681
+ foundationModel: [],
1236
1682
  inferenceConfiguration: (_) => se_InferenceConfiguration(_, context),
1237
1683
  parserMode: [],
1238
1684
  promptCreationMode: [],
@@ -1364,6 +1810,25 @@ const de_Attribution = (output, context) => {
1364
1810
  citations: (_) => de_Citations(_, context),
1365
1811
  });
1366
1812
  };
1813
+ const de_BedrockSessionContentBlock = (output, context) => {
1814
+ if (output.image != null) {
1815
+ return {
1816
+ image: de_ImageBlock(output.image, context),
1817
+ };
1818
+ }
1819
+ if (__expectString(output.text) !== undefined) {
1820
+ return { text: __expectString(output.text) };
1821
+ }
1822
+ return { $unknown: Object.entries(output)[0] };
1823
+ };
1824
+ const de_BedrockSessionContentBlocks = (output, context) => {
1825
+ const retVal = (output || [])
1826
+ .filter((e) => e != null)
1827
+ .map((entry) => {
1828
+ return de_BedrockSessionContentBlock(__expectUnion(entry), context);
1829
+ });
1830
+ return retVal;
1831
+ };
1367
1832
  const de_Citation = (output, context) => {
1368
1833
  return take(output, {
1369
1834
  generatedResponsePart: _json,
@@ -1508,6 +1973,25 @@ const de_FlowTraceNodeOutputFields = (output, context) => {
1508
1973
  });
1509
1974
  return retVal;
1510
1975
  };
1976
+ const de_ImageBlock = (output, context) => {
1977
+ return take(output, {
1978
+ format: __expectString,
1979
+ source: (_) => de_ImageSource(__expectUnion(_), context),
1980
+ });
1981
+ };
1982
+ const de_ImageSource = (output, context) => {
1983
+ if (output.bytes != null) {
1984
+ return {
1985
+ bytes: context.base64Decoder(output.bytes),
1986
+ };
1987
+ }
1988
+ if (output.s3Location != null) {
1989
+ return {
1990
+ s3Location: _json(output.s3Location),
1991
+ };
1992
+ }
1993
+ return { $unknown: Object.entries(output)[0] };
1994
+ };
1511
1995
  const de_InferenceConfiguration = (output, context) => {
1512
1996
  return take(output, {
1513
1997
  maximumLength: __expectInt32,
@@ -1534,6 +2018,54 @@ const de_InlineAgentTracePart = (output, context) => {
1534
2018
  trace: (_) => de_Trace(__expectUnion(_), context),
1535
2019
  });
1536
2020
  };
2021
+ const de_InvocationStep = (output, context) => {
2022
+ return take(output, {
2023
+ invocationId: __expectString,
2024
+ invocationStepId: __expectString,
2025
+ invocationStepTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2026
+ payload: (_) => de_InvocationStepPayload(__expectUnion(_), context),
2027
+ sessionId: __expectString,
2028
+ });
2029
+ };
2030
+ const de_InvocationStepPayload = (output, context) => {
2031
+ if (output.contentBlocks != null) {
2032
+ return {
2033
+ contentBlocks: de_BedrockSessionContentBlocks(output.contentBlocks, context),
2034
+ };
2035
+ }
2036
+ return { $unknown: Object.entries(output)[0] };
2037
+ };
2038
+ const de_InvocationStepSummaries = (output, context) => {
2039
+ const retVal = (output || [])
2040
+ .filter((e) => e != null)
2041
+ .map((entry) => {
2042
+ return de_InvocationStepSummary(entry, context);
2043
+ });
2044
+ return retVal;
2045
+ };
2046
+ const de_InvocationStepSummary = (output, context) => {
2047
+ return take(output, {
2048
+ invocationId: __expectString,
2049
+ invocationStepId: __expectString,
2050
+ invocationStepTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2051
+ sessionId: __expectString,
2052
+ });
2053
+ };
2054
+ const de_InvocationSummaries = (output, context) => {
2055
+ const retVal = (output || [])
2056
+ .filter((e) => e != null)
2057
+ .map((entry) => {
2058
+ return de_InvocationSummary(entry, context);
2059
+ });
2060
+ return retVal;
2061
+ };
2062
+ const de_InvocationSummary = (output, context) => {
2063
+ return take(output, {
2064
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2065
+ invocationId: __expectString,
2066
+ sessionId: __expectString,
2067
+ });
2068
+ };
1537
2069
  const de_KnowledgeBaseLookupOutput = (output, context) => {
1538
2070
  return take(output, {
1539
2071
  retrievedReferences: (_) => de_RetrievedReferences(_, context),
@@ -1790,6 +2322,23 @@ const de_RoutingClassifierTrace = (output, context) => {
1790
2322
  }
1791
2323
  return { $unknown: Object.entries(output)[0] };
1792
2324
  };
2325
+ const de_SessionSummaries = (output, context) => {
2326
+ const retVal = (output || [])
2327
+ .filter((e) => e != null)
2328
+ .map((entry) => {
2329
+ return de_SessionSummary(entry, context);
2330
+ });
2331
+ return retVal;
2332
+ };
2333
+ const de_SessionSummary = (output, context) => {
2334
+ return take(output, {
2335
+ createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2336
+ lastUpdatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
2337
+ sessionArn: __expectString,
2338
+ sessionId: __expectString,
2339
+ sessionStatus: __expectString,
2340
+ });
2341
+ };
1793
2342
  const de_Trace = (output, context) => {
1794
2343
  if (output.customOrchestrationTrace != null) {
1795
2344
  return {
@@ -1835,6 +2384,7 @@ const de_TracePart = (output, context) => {
1835
2384
  agentVersion: __expectString,
1836
2385
  callerChain: _json,
1837
2386
  collaboratorName: __expectString,
2387
+ eventTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1838
2388
  sessionId: __expectString,
1839
2389
  trace: (_) => de_Trace(__expectUnion(_), context),
1840
2390
  });
@@ -1853,10 +2403,12 @@ const _cT = "contentType";
1853
2403
  const _eI = "executionId";
1854
2404
  const _mI = "memoryId";
1855
2405
  const _mIa = "maxItems";
2406
+ const _mR = "maxResults";
1856
2407
  const _mT = "memoryType";
1857
2408
  const _nT = "nextToken";
1858
2409
  const _sA = "sourceArn";
1859
2410
  const _sI = "sessionId";
2411
+ const _tK = "tagKeys";
1860
2412
  const _xabact = "x-amzn-bedrock-agent-content-type";
1861
2413
  const _xabami = "x-amz-bedrock-agent-memory-id";
1862
2414
  const _xabasi = "x-amz-bedrock-agent-session-id";