@aws-sdk/client-agent-registry 3.1172.0 → 3.1173.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 (39) hide show
  1. package/dist-cjs/index.js +79 -8
  2. package/dist-es/AgentRegistry.js +2 -0
  3. package/dist-es/AgentRegistryClient.js +1 -0
  4. package/dist-es/auth/httpAuthExtensionConfiguration.js +8 -0
  5. package/dist-es/auth/httpAuthSchemeProvider.js +17 -0
  6. package/dist-es/models/enums.js +8 -0
  7. package/dist-es/pagination/SearchDiscoverableRegistryRecordsPaginator.js +4 -0
  8. package/dist-es/pagination/index.js +1 -0
  9. package/dist-es/runtimeConfig.js +17 -1
  10. package/dist-es/runtimeConfig.shared.js +6 -0
  11. package/dist-es/schemas/schemas_0.js +18 -6
  12. package/dist-types/AgentRegistry.d.ts +7 -0
  13. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +4 -1
  14. package/dist-types/auth/httpAuthSchemeProvider.d.ts +9 -1
  15. package/dist-types/commands/BatchGetDiscoverableRegistryRecordCommand.d.ts +6 -2
  16. package/dist-types/commands/ListDiscoverableRegistryRecordsCommand.d.ts +1 -1
  17. package/dist-types/commands/SearchDiscoverableRegistryRecordsCommand.d.ts +10 -2
  18. package/dist-types/models/enums.d.ts +25 -0
  19. package/dist-types/models/models_0.d.ts +46 -5
  20. package/dist-types/pagination/SearchDiscoverableRegistryRecordsPaginator.d.ts +7 -0
  21. package/dist-types/pagination/index.d.ts +1 -0
  22. package/dist-types/runtimeConfig.browser.d.ts +10 -1
  23. package/dist-types/runtimeConfig.d.ts +13 -1
  24. package/dist-types/runtimeConfig.native.d.ts +10 -1
  25. package/dist-types/runtimeConfig.shared.d.ts +12 -1
  26. package/dist-types/schemas/schemas_0.d.ts +1 -0
  27. package/dist-types/ts3.4/AgentRegistry.d.ts +7 -0
  28. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +5 -0
  29. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +4 -0
  30. package/dist-types/ts3.4/models/enums.d.ts +9 -0
  31. package/dist-types/ts3.4/models/models_0.d.ts +10 -0
  32. package/dist-types/ts3.4/pagination/SearchDiscoverableRegistryRecordsPaginator.d.ts +11 -0
  33. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  34. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +17 -1
  35. package/dist-types/ts3.4/runtimeConfig.d.ts +24 -1
  36. package/dist-types/ts3.4/runtimeConfig.native.d.ts +17 -1
  37. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +19 -1
  38. package/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
  39. package/package.json +2 -1
package/dist-cjs/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, getDefaultSocketTimeout, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
2
- const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
2
+ const { memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh, HttpBearerAuthSigner, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
3
3
  const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require("@smithy/core/client");
4
4
  const { Command: $Command } = require("@smithy/core/client");
5
5
  exports.$Command = $Command;
@@ -11,6 +11,7 @@ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CON
11
11
  const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
12
12
  const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
13
13
  const { defaultProvider } = require("@aws-sdk/credential-provider-node");
14
+ const { nodeProvider } = require("@aws-sdk/token-providers");
14
15
  const { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
15
16
  const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
16
17
  const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
@@ -39,19 +40,35 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
39
40
  }),
40
41
  };
41
42
  }
43
+ function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
44
+ return {
45
+ schemeId: "smithy.api#httpBearerAuth",
46
+ propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache, }, context) => ({
47
+ identityProperties: {
48
+ profile,
49
+ filepath,
50
+ configFilepath,
51
+ ignoreCache,
52
+ },
53
+ }),
54
+ };
55
+ }
42
56
  const defaultAgentRegistryHttpAuthSchemeProvider = (authParameters) => {
43
57
  const options = [];
44
58
  switch (authParameters.operation) {
45
59
  default: {
46
60
  options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
61
+ options.push(createSmithyApiHttpBearerAuthHttpAuthOption());
47
62
  }
48
63
  }
49
64
  return options;
50
65
  };
51
66
  const resolveHttpAuthSchemeConfig = (config) => {
67
+ const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
52
68
  const config_0 = resolveAwsSdkSigV4Config(config);
53
69
  return Object.assign(config_0, {
54
70
  authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
71
+ token,
55
72
  });
56
73
  };
57
74
 
@@ -65,7 +82,7 @@ const commonParams = {
65
82
  Region: { type: "builtInParams", name: "region" },
66
83
  };
67
84
 
68
- var version = "3.1171.0";
85
+ var version = "3.1172.0";
69
86
  var packageInfo = {
70
87
  version: version};
71
88
 
@@ -223,7 +240,9 @@ const _MFE = "MetadataFilterExpression";
223
240
  const _MSAD = "McpServerAdditionalData";
224
241
  const _MSD = "McpServerDescriptor";
225
242
  const _MTD = "McpToolsDescriptor";
243
+ const _PDU = "PresignedDownloadUrl";
226
244
  const _RNFE = "ResourceNotFoundException";
245
+ const _RRAD = "RegistryRecordArtifactDownload";
227
246
  const _RRE = "RegistryRecordsEntry";
228
247
  const _RREL = "RegistryRecordsEntryList";
229
248
  const _RRF = "RegistryRecordFilter";
@@ -243,6 +262,7 @@ const _a = "agui";
243
262
  const _aAC = "a2aAgentCard";
244
263
  const _aD = "additionalData";
245
264
  const _aSD = "agentSkillsDefinition";
265
+ const _ar = "artifact";
246
266
  const _c = "client";
247
267
  const _cA = "createdAt";
248
268
  const _cM = "customMetadata";
@@ -251,6 +271,7 @@ const _d = "data";
251
271
  const _dN = "displayName";
252
272
  const _dSV = "dataSchemaVersion";
253
273
  const _dT = "descriptorTypes";
274
+ const _dU = "downloadUrl";
254
275
  const _de = "description";
255
276
  const _des = "descriptors";
256
277
  const _e = "error";
@@ -280,7 +301,9 @@ const _rV = "recordVersion";
280
301
  const _s = "smithy.ts.sdk.synthetic.com.amazonaws.agentregistry";
281
302
  const _sM = "skillMd";
282
303
  const _sQ = "searchQuery";
304
+ const _sT = "searchType";
283
305
  const _se = "server";
306
+ const _sh = "sha256";
284
307
  const _so = "source";
285
308
  const _st = "status";
286
309
  const _t = "tools";
@@ -336,6 +359,7 @@ var CustomMetadataDocument = [0, n0, _CMD, 8, 15];
336
359
  var Description = [0, n0, _D, 8, 0];
337
360
  var DescriptorData = [0, n0, _DD, 8, 0];
338
361
  var MetadataFilterExpression = [0, n0, _MFE, 8, 15];
362
+ var PresignedDownloadUrl = [0, n0, _PDU, 8, 0];
339
363
  var SearchQuery = [0, n0, _SQ, 8, 0];
340
364
  var A2aAgentCardDescriptor$ = [3, n0, _AACD,
341
365
  0,
@@ -432,6 +456,11 @@ var McpToolsDescriptor$ = [3, n0, _MTD,
432
456
  [_d, _dSV],
433
457
  [[() => DescriptorData, 0], 0]
434
458
  ];
459
+ var RegistryRecordArtifactDownload$ = [3, n0, _RRAD,
460
+ 0,
461
+ [_sh, _dU],
462
+ [0, [() => PresignedDownloadUrl, 0]]
463
+ ];
435
464
  var RegistryRecordFilter$ = [3, n0, _RRF,
436
465
  0,
437
466
  [_n, _v],
@@ -444,18 +473,18 @@ var RegistryRecordsEntry$ = [3, n0, _RRE,
444
473
  ];
445
474
  var RegistryRecordSummary$ = [3, n0, _RRS,
446
475
  0,
447
- [_rA, _rAe, _rIe, _n, _rT, _des, _rV, _st, _cA, _uA, _de, _dN, _cM],
448
- [0, 0, 0, 0, 0, [() => Descriptors$, 0], 0, 0, 5, 5, [() => Description, 0], 0, [() => CustomMetadataDocument, 0]], 10
476
+ [_rA, _rAe, _rIe, _n, _rT, _des, _rV, _st, _cA, _uA, _de, _dN, _cM, _ar],
477
+ [0, 0, 0, 0, 0, [() => Descriptors$, 0], 0, 0, 5, 5, [() => Description, 0], 0, [() => CustomMetadataDocument, 0], [() => RegistryRecordArtifactDownload$, 0]], 10
449
478
  ];
450
479
  var SearchDiscoverableRegistryRecordsRequest$ = [3, n0, _SDRRR,
451
480
  0,
452
- [_sQ, _rIeg, _mR, _f],
453
- [[() => SearchQuery, 0], 64 | 0, 1, [() => MetadataFilterExpression, 0]], 2
481
+ [_sQ, _rIeg, _mR, _f, _sT, _nT],
482
+ [[() => SearchQuery, 0], 64 | 0, 1, [() => MetadataFilterExpression, 0], 0, 0], 2
454
483
  ];
455
484
  var SearchDiscoverableRegistryRecordsResponse$ = [3, n0, _SDRRRe,
456
485
  0,
457
- [_rR],
458
- [[() => RegistryRecordSummaryList, 0]], 1
486
+ [_rR, _sT, _nT],
487
+ [[() => RegistryRecordSummaryList, 0], 0, 0], 1
459
488
  ];
460
489
  var ValidationExceptionField$ = [3, n0, _VEF,
461
490
  0,
@@ -507,6 +536,11 @@ const getRuntimeConfig$1 = (config) => {
507
536
  identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
508
537
  signer: new AwsSdkSigV4Signer(),
509
538
  },
539
+ {
540
+ schemeId: "smithy.api#httpBearerAuth",
541
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
542
+ signer: new HttpBearerAuthSigner(),
543
+ },
510
544
  ],
511
545
  logger: config?.logger ?? new NoOpLogger(),
512
546
  protocol: config?.protocol ?? AwsRestJsonProtocol,
@@ -544,6 +578,20 @@ const getRuntimeConfig = (config) => {
544
578
  credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
545
579
  defaultSocketTimeout: getDefaultSocketTimeout(config?.requestHandler, 300_000),
546
580
  defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
581
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
582
+ {
583
+ schemeId: "aws.auth#sigv4",
584
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
585
+ signer: new AwsSdkSigV4Signer(),
586
+ },
587
+ {
588
+ schemeId: "smithy.api#httpBearerAuth",
589
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => {
590
+ return await nodeProvider(idProps)(idProps);
591
+ }),
592
+ signer: new HttpBearerAuthSigner(),
593
+ },
594
+ ],
547
595
  maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
548
596
  region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
549
597
  requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -563,6 +611,7 @@ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
563
611
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
564
612
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
565
613
  let _credentials = runtimeConfig.credentials;
614
+ let _token = runtimeConfig.token;
566
615
  return {
567
616
  setHttpAuthScheme(httpAuthScheme) {
568
617
  const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
@@ -588,6 +637,12 @@ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
588
637
  credentials() {
589
638
  return _credentials;
590
639
  },
640
+ setToken(token) {
641
+ _token = token;
642
+ },
643
+ token() {
644
+ return _token;
645
+ },
591
646
  };
592
647
  };
593
648
  const resolveHttpAuthRuntimeConfig = (config) => {
@@ -595,6 +650,7 @@ const resolveHttpAuthRuntimeConfig = (config) => {
595
650
  httpAuthSchemes: config.httpAuthSchemes(),
596
651
  httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
597
652
  credentials: config.credentials(),
653
+ token: config.token(),
598
654
  };
599
655
  };
600
656
 
@@ -630,6 +686,7 @@ class AgentRegistryClient extends Client {
630
686
  httpAuthSchemeParametersProvider: defaultAgentRegistryHttpAuthSchemeParametersProvider,
631
687
  identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
632
688
  "aws.auth#sigv4": config.credentials,
689
+ "smithy.api#httpBearerAuth": config.token,
633
690
  }),
634
691
  }));
635
692
  this.middlewareStack.use(getHttpSigningPlugin(this.config));
@@ -654,6 +711,8 @@ class SearchDiscoverableRegistryRecordsCommand extends command(_ep0, _mw0, "Sear
654
711
 
655
712
  const paginateListDiscoverableRegistryRecords = createPaginator(AgentRegistryClient, ListDiscoverableRegistryRecordsCommand, "nextToken", "nextToken", "maxResults");
656
713
 
714
+ const paginateSearchDiscoverableRegistryRecords = createPaginator(AgentRegistryClient, SearchDiscoverableRegistryRecordsCommand, "nextToken", "nextToken", "maxResults");
715
+
657
716
  const commands = {
658
717
  BatchGetDiscoverableRegistryRecordCommand,
659
718
  ListDiscoverableRegistryRecordsCommand,
@@ -661,6 +720,7 @@ const commands = {
661
720
  };
662
721
  const paginators = {
663
722
  paginateListDiscoverableRegistryRecords,
723
+ paginateSearchDiscoverableRegistryRecords,
664
724
  };
665
725
  class AgentRegistry extends AgentRegistryClient {
666
726
  }
@@ -681,12 +741,14 @@ const RecordType = {
681
741
  const RegistryRecordStatus = {
682
742
  APPROVED: "APPROVED",
683
743
  CREATE_FAILED: "CREATE_FAILED",
744
+ CREATE_PENDING_AUTH: "CREATE_PENDING_AUTH",
684
745
  CREATING: "CREATING",
685
746
  DEPRECATED: "DEPRECATED",
686
747
  DRAFT: "DRAFT",
687
748
  PENDING_APPROVAL: "PENDING_APPROVAL",
688
749
  REJECTED: "REJECTED",
689
750
  UPDATE_FAILED: "UPDATE_FAILED",
751
+ UPDATE_PENDING_AUTH: "UPDATE_PENDING_AUTH",
690
752
  UPDATING: "UPDATING",
691
753
  };
692
754
  const ValidationExceptionReason = {
@@ -695,11 +757,17 @@ const ValidationExceptionReason = {
695
757
  IDEMPOTENT_PARAMETER_MISMATCH_EXCEPTION: "IdempotentParameterMismatchException",
696
758
  RESOURCE_CONFLICT: "ResourceConflict",
697
759
  ROOT_EVENT_IN_OTHER_SESSION: "EventInOtherSession",
760
+ UNSUPPORTED_IN_REGION: "UnsupportedInRegion",
698
761
  };
699
762
  const RegistryRecordFilterName = {
700
763
  DESCRIPTOR_TYPE: "descriptorType",
701
764
  RECORD_TYPE: "recordType",
702
765
  };
766
+ const SearchType = {
767
+ HYBRID: "HYBRID",
768
+ KEYWORD: "KEYWORD",
769
+ SEMANTIC: "SEMANTIC",
770
+ };
703
771
 
704
772
  exports.A2aAgentCardDescriptor$ = A2aAgentCardDescriptor$;
705
773
  exports.AccessDeniedException = AccessDeniedException;
@@ -734,6 +802,7 @@ exports.McpServerAdditionalData$ = McpServerAdditionalData$;
734
802
  exports.McpServerDescriptor$ = McpServerDescriptor$;
735
803
  exports.McpToolsDescriptor$ = McpToolsDescriptor$;
736
804
  exports.RecordType = RecordType;
805
+ exports.RegistryRecordArtifactDownload$ = RegistryRecordArtifactDownload$;
737
806
  exports.RegistryRecordFilter$ = RegistryRecordFilter$;
738
807
  exports.RegistryRecordFilterName = RegistryRecordFilterName;
739
808
  exports.RegistryRecordStatus = RegistryRecordStatus;
@@ -745,6 +814,7 @@ exports.SearchDiscoverableRegistryRecords$ = SearchDiscoverableRegistryRecords$;
745
814
  exports.SearchDiscoverableRegistryRecordsCommand = SearchDiscoverableRegistryRecordsCommand;
746
815
  exports.SearchDiscoverableRegistryRecordsRequest$ = SearchDiscoverableRegistryRecordsRequest$;
747
816
  exports.SearchDiscoverableRegistryRecordsResponse$ = SearchDiscoverableRegistryRecordsResponse$;
817
+ exports.SearchType = SearchType;
748
818
  exports.ThrottlingException = ThrottlingException;
749
819
  exports.ThrottlingException$ = ThrottlingException$;
750
820
  exports.UnauthorizedException = UnauthorizedException;
@@ -755,3 +825,4 @@ exports.ValidationExceptionField$ = ValidationExceptionField$;
755
825
  exports.ValidationExceptionReason = ValidationExceptionReason;
756
826
  exports.errorTypeRegistries = errorTypeRegistries;
757
827
  exports.paginateListDiscoverableRegistryRecords = paginateListDiscoverableRegistryRecords;
828
+ exports.paginateSearchDiscoverableRegistryRecords = paginateSearchDiscoverableRegistryRecords;
@@ -4,6 +4,7 @@ import { BatchGetDiscoverableRegistryRecordCommand, } from "./commands/BatchGetD
4
4
  import { ListDiscoverableRegistryRecordsCommand, } from "./commands/ListDiscoverableRegistryRecordsCommand";
5
5
  import { SearchDiscoverableRegistryRecordsCommand, } from "./commands/SearchDiscoverableRegistryRecordsCommand";
6
6
  import { paginateListDiscoverableRegistryRecords } from "./pagination/ListDiscoverableRegistryRecordsPaginator";
7
+ import { paginateSearchDiscoverableRegistryRecords } from "./pagination/SearchDiscoverableRegistryRecordsPaginator";
7
8
  const commands = {
8
9
  BatchGetDiscoverableRegistryRecordCommand,
9
10
  ListDiscoverableRegistryRecordsCommand,
@@ -11,6 +12,7 @@ const commands = {
11
12
  };
12
13
  const paginators = {
13
14
  paginateListDiscoverableRegistryRecords,
15
+ paginateSearchDiscoverableRegistryRecords,
14
16
  };
15
17
  export class AgentRegistry extends AgentRegistryClient {
16
18
  }
@@ -37,6 +37,7 @@ export class AgentRegistryClient extends __Client {
37
37
  httpAuthSchemeParametersProvider: defaultAgentRegistryHttpAuthSchemeParametersProvider,
38
38
  identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
39
39
  "aws.auth#sigv4": config.credentials,
40
+ "smithy.api#httpBearerAuth": config.token,
40
41
  }),
41
42
  }));
42
43
  this.middlewareStack.use(getHttpSigningPlugin(this.config));
@@ -2,6 +2,7 @@ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
2
  const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
3
  let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
4
  let _credentials = runtimeConfig.credentials;
5
+ let _token = runtimeConfig.token;
5
6
  return {
6
7
  setHttpAuthScheme(httpAuthScheme) {
7
8
  const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
@@ -27,6 +28,12 @@ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
27
28
  credentials() {
28
29
  return _credentials;
29
30
  },
31
+ setToken(token) {
32
+ _token = token;
33
+ },
34
+ token() {
35
+ return _token;
36
+ },
30
37
  };
31
38
  };
32
39
  export const resolveHttpAuthRuntimeConfig = (config) => {
@@ -34,5 +41,6 @@ export const resolveHttpAuthRuntimeConfig = (config) => {
34
41
  httpAuthSchemes: config.httpAuthSchemes(),
35
42
  httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
43
  credentials: config.credentials(),
44
+ token: config.token(),
37
45
  };
38
46
  };
@@ -1,4 +1,5 @@
1
1
  import { resolveAwsSdkSigV4Config, } from "@aws-sdk/core/httpAuthSchemes";
2
+ import { doesIdentityRequireRefresh, isIdentityExpired, memoizeIdentityProvider } from "@smithy/core";
2
3
  import { getSmithyContext, normalizeProvider } from "@smithy/core/client";
3
4
  export const defaultAgentRegistryHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
5
  return {
@@ -23,18 +24,34 @@ function createAwsAuthSigv4HttpAuthOption(authParameters) {
23
24
  }),
24
25
  };
25
26
  }
27
+ function createSmithyApiHttpBearerAuthHttpAuthOption(authParameters) {
28
+ return {
29
+ schemeId: "smithy.api#httpBearerAuth",
30
+ propertiesExtractor: ({ profile, filepath, configFilepath, ignoreCache, }, context) => ({
31
+ identityProperties: {
32
+ profile,
33
+ filepath,
34
+ configFilepath,
35
+ ignoreCache,
36
+ },
37
+ }),
38
+ };
39
+ }
26
40
  export const defaultAgentRegistryHttpAuthSchemeProvider = (authParameters) => {
27
41
  const options = [];
28
42
  switch (authParameters.operation) {
29
43
  default: {
30
44
  options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
45
+ options.push(createSmithyApiHttpBearerAuthHttpAuthOption(authParameters));
31
46
  }
32
47
  }
33
48
  return options;
34
49
  };
35
50
  export const resolveHttpAuthSchemeConfig = (config) => {
51
+ const token = memoizeIdentityProvider(config.token, isIdentityExpired, doesIdentityRequireRefresh);
36
52
  const config_0 = resolveAwsSdkSigV4Config(config);
37
53
  return Object.assign(config_0, {
38
54
  authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
55
+ token,
39
56
  });
40
57
  };
@@ -13,12 +13,14 @@ export const RecordType = {
13
13
  export const RegistryRecordStatus = {
14
14
  APPROVED: "APPROVED",
15
15
  CREATE_FAILED: "CREATE_FAILED",
16
+ CREATE_PENDING_AUTH: "CREATE_PENDING_AUTH",
16
17
  CREATING: "CREATING",
17
18
  DEPRECATED: "DEPRECATED",
18
19
  DRAFT: "DRAFT",
19
20
  PENDING_APPROVAL: "PENDING_APPROVAL",
20
21
  REJECTED: "REJECTED",
21
22
  UPDATE_FAILED: "UPDATE_FAILED",
23
+ UPDATE_PENDING_AUTH: "UPDATE_PENDING_AUTH",
22
24
  UPDATING: "UPDATING",
23
25
  };
24
26
  export const ValidationExceptionReason = {
@@ -27,8 +29,14 @@ export const ValidationExceptionReason = {
27
29
  IDEMPOTENT_PARAMETER_MISMATCH_EXCEPTION: "IdempotentParameterMismatchException",
28
30
  RESOURCE_CONFLICT: "ResourceConflict",
29
31
  ROOT_EVENT_IN_OTHER_SESSION: "EventInOtherSession",
32
+ UNSUPPORTED_IN_REGION: "UnsupportedInRegion",
30
33
  };
31
34
  export const RegistryRecordFilterName = {
32
35
  DESCRIPTOR_TYPE: "descriptorType",
33
36
  RECORD_TYPE: "recordType",
34
37
  };
38
+ export const SearchType = {
39
+ HYBRID: "HYBRID",
40
+ KEYWORD: "KEYWORD",
41
+ SEMANTIC: "SEMANTIC",
42
+ };
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { AgentRegistryClient } from "../AgentRegistryClient";
3
+ import { SearchDiscoverableRegistryRecordsCommand, } from "../commands/SearchDiscoverableRegistryRecordsCommand";
4
+ export const paginateSearchDiscoverableRegistryRecords = createPaginator(AgentRegistryClient, SearchDiscoverableRegistryRecordsCommand, "nextToken", "nextToken", "maxResults");
@@ -1,2 +1,3 @@
1
1
  export * from "./Interfaces";
2
2
  export * from "./ListDiscoverableRegistryRecordsPaginator";
3
+ export * from "./SearchDiscoverableRegistryRecordsPaginator";
@@ -1,7 +1,9 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, getDefaultSocketTimeout, NODE_APP_ID_CONFIG_OPTIONS, } from "@aws-sdk/core/client";
3
- import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
3
+ import { AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
4
4
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
5
+ import { nodeProvider } from "@aws-sdk/token-providers";
6
+ import { HttpBearerAuthSigner } from "@smithy/core";
5
7
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
6
8
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
7
9
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
@@ -28,6 +30,20 @@ export const getRuntimeConfig = (config) => {
28
30
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
31
  defaultSocketTimeout: getDefaultSocketTimeout(config?.requestHandler, 300_000),
30
32
  defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
34
+ {
35
+ schemeId: "aws.auth#sigv4",
36
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
37
+ signer: new AwsSdkSigV4Signer(),
38
+ },
39
+ {
40
+ schemeId: "smithy.api#httpBearerAuth",
41
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth") || (async (idProps) => {
42
+ return await nodeProvider(idProps)(idProps);
43
+ }),
44
+ signer: new HttpBearerAuthSigner(),
45
+ },
46
+ ],
31
47
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
32
48
  region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
33
49
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
3
+ import { HttpBearerAuthSigner } from "@smithy/core";
3
4
  import { Sha256 } from "@smithy/core/checksum";
4
5
  import { NoOpLogger } from "@smithy/core/client";
5
6
  import { parseUrl } from "@smithy/core/protocols";
@@ -22,6 +23,11 @@ export const getRuntimeConfig = (config) => {
22
23
  identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
23
24
  signer: new AwsSdkSigV4Signer(),
24
25
  },
26
+ {
27
+ schemeId: "smithy.api#httpBearerAuth",
28
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#httpBearerAuth"),
29
+ signer: new HttpBearerAuthSigner(),
30
+ },
25
31
  ],
26
32
  logger: config?.logger ?? new NoOpLogger(),
27
33
  protocol: config?.protocol ?? AwsRestJsonProtocol,
@@ -27,7 +27,9 @@ const _MFE = "MetadataFilterExpression";
27
27
  const _MSAD = "McpServerAdditionalData";
28
28
  const _MSD = "McpServerDescriptor";
29
29
  const _MTD = "McpToolsDescriptor";
30
+ const _PDU = "PresignedDownloadUrl";
30
31
  const _RNFE = "ResourceNotFoundException";
32
+ const _RRAD = "RegistryRecordArtifactDownload";
31
33
  const _RRE = "RegistryRecordsEntry";
32
34
  const _RREL = "RegistryRecordsEntryList";
33
35
  const _RRF = "RegistryRecordFilter";
@@ -47,6 +49,7 @@ const _a = "agui";
47
49
  const _aAC = "a2aAgentCard";
48
50
  const _aD = "additionalData";
49
51
  const _aSD = "agentSkillsDefinition";
52
+ const _ar = "artifact";
50
53
  const _c = "client";
51
54
  const _cA = "createdAt";
52
55
  const _cM = "customMetadata";
@@ -55,6 +58,7 @@ const _d = "data";
55
58
  const _dN = "displayName";
56
59
  const _dSV = "dataSchemaVersion";
57
60
  const _dT = "descriptorTypes";
61
+ const _dU = "downloadUrl";
58
62
  const _de = "description";
59
63
  const _des = "descriptors";
60
64
  const _e = "error";
@@ -84,7 +88,9 @@ const _rV = "recordVersion";
84
88
  const _s = "smithy.ts.sdk.synthetic.com.amazonaws.agentregistry";
85
89
  const _sM = "skillMd";
86
90
  const _sQ = "searchQuery";
91
+ const _sT = "searchType";
87
92
  const _se = "server";
93
+ const _sh = "sha256";
88
94
  const _so = "source";
89
95
  const _st = "status";
90
96
  const _t = "tools";
@@ -143,6 +149,7 @@ var CustomMetadataDocument = [0, n0, _CMD, 8, 15];
143
149
  var Description = [0, n0, _D, 8, 0];
144
150
  var DescriptorData = [0, n0, _DD, 8, 0];
145
151
  var MetadataFilterExpression = [0, n0, _MFE, 8, 15];
152
+ var PresignedDownloadUrl = [0, n0, _PDU, 8, 0];
146
153
  var SearchQuery = [0, n0, _SQ, 8, 0];
147
154
  export var A2aAgentCardDescriptor$ = [3, n0, _AACD,
148
155
  0,
@@ -239,6 +246,11 @@ export var McpToolsDescriptor$ = [3, n0, _MTD,
239
246
  [_d, _dSV],
240
247
  [[() => DescriptorData, 0], 0]
241
248
  ];
249
+ export var RegistryRecordArtifactDownload$ = [3, n0, _RRAD,
250
+ 0,
251
+ [_sh, _dU],
252
+ [0, [() => PresignedDownloadUrl, 0]]
253
+ ];
242
254
  export var RegistryRecordFilter$ = [3, n0, _RRF,
243
255
  0,
244
256
  [_n, _v],
@@ -251,18 +263,18 @@ export var RegistryRecordsEntry$ = [3, n0, _RRE,
251
263
  ];
252
264
  export var RegistryRecordSummary$ = [3, n0, _RRS,
253
265
  0,
254
- [_rA, _rAe, _rIe, _n, _rT, _des, _rV, _st, _cA, _uA, _de, _dN, _cM],
255
- [0, 0, 0, 0, 0, [() => Descriptors$, 0], 0, 0, 5, 5, [() => Description, 0], 0, [() => CustomMetadataDocument, 0]], 10
266
+ [_rA, _rAe, _rIe, _n, _rT, _des, _rV, _st, _cA, _uA, _de, _dN, _cM, _ar],
267
+ [0, 0, 0, 0, 0, [() => Descriptors$, 0], 0, 0, 5, 5, [() => Description, 0], 0, [() => CustomMetadataDocument, 0], [() => RegistryRecordArtifactDownload$, 0]], 10
256
268
  ];
257
269
  export var SearchDiscoverableRegistryRecordsRequest$ = [3, n0, _SDRRR,
258
270
  0,
259
- [_sQ, _rIeg, _mR, _f],
260
- [[() => SearchQuery, 0], 64 | 0, 1, [() => MetadataFilterExpression, 0]], 2
271
+ [_sQ, _rIeg, _mR, _f, _sT, _nT],
272
+ [[() => SearchQuery, 0], 64 | 0, 1, [() => MetadataFilterExpression, 0], 0, 0], 2
261
273
  ];
262
274
  export var SearchDiscoverableRegistryRecordsResponse$ = [3, n0, _SDRRRe,
263
275
  0,
264
- [_rR],
265
- [[() => RegistryRecordSummaryList, 0]], 1
276
+ [_rR, _sT, _nT],
277
+ [[() => RegistryRecordSummaryList, 0], 0, 0], 1
266
278
  ];
267
279
  export var ValidationExceptionField$ = [3, n0, _VEF,
268
280
  0,
@@ -35,6 +35,13 @@ export interface AgentRegistry {
35
35
  * @returns AsyncIterable of {@link ListDiscoverableRegistryRecordsCommandOutput}.
36
36
  */
37
37
  paginateListDiscoverableRegistryRecords(args: ListDiscoverableRegistryRecordsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<ListDiscoverableRegistryRecordsCommandOutput>;
38
+ /**
39
+ * @see {@link SearchDiscoverableRegistryRecordsCommand}
40
+ * @param args - command input.
41
+ * @param paginationConfig - optional pagination config.
42
+ * @returns AsyncIterable of {@link SearchDiscoverableRegistryRecordsCommandOutput}.
43
+ */
44
+ paginateSearchDiscoverableRegistryRecords(args: SearchDiscoverableRegistryRecordsCommandInput, paginationConfig?: Omit<PaginationConfiguration, "client">): Paginator<SearchDiscoverableRegistryRecordsCommandOutput>;
38
45
  }
39
46
  /**
40
47
  * Agent Registry lets callers discover, list, and retrieve approved records published to a registry.
@@ -1,4 +1,4 @@
1
- import type { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
1
+ import { type AwsCredentialIdentity, type AwsCredentialIdentityProvider, type HttpAuthScheme, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
2
2
  import type { AgentRegistryHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
3
3
  /**
4
4
  * @internal
@@ -10,6 +10,8 @@ export interface HttpAuthExtensionConfiguration {
10
10
  httpAuthSchemeProvider(): AgentRegistryHttpAuthSchemeProvider;
11
11
  setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
12
12
  credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
13
+ setToken(token: TokenIdentity | TokenIdentityProvider): void;
14
+ token(): TokenIdentity | TokenIdentityProvider | undefined;
13
15
  }
14
16
  /**
15
17
  * @internal
@@ -18,6 +20,7 @@ export type HttpAuthRuntimeConfig = Partial<{
18
20
  httpAuthSchemes: HttpAuthScheme[];
19
21
  httpAuthSchemeProvider: AgentRegistryHttpAuthSchemeProvider;
20
22
  credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
23
+ token: TokenIdentity | TokenIdentityProvider;
21
24
  }>;
22
25
  /**
23
26
  * @internal
@@ -1,5 +1,5 @@
1
1
  import { AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4PreviouslyResolved } from "@aws-sdk/core/httpAuthSchemes";
2
- import type { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider, Provider } from "@smithy/types";
2
+ import { type HandlerExecutionContext, type HttpAuthScheme, type HttpAuthSchemeParameters, type HttpAuthSchemeParametersProvider, type HttpAuthSchemeProvider, type Provider, TokenIdentity, TokenIdentityProvider } from "@smithy/types";
3
3
  import { type AgentRegistryClientResolvedConfig } from "../AgentRegistryClient";
4
4
  /**
5
5
  * @internal
@@ -46,6 +46,10 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
46
46
  * @internal
47
47
  */
48
48
  httpAuthSchemeProvider?: AgentRegistryHttpAuthSchemeProvider;
49
+ /**
50
+ * The token used to authenticate requests.
51
+ */
52
+ token?: TokenIdentity | TokenIdentityProvider;
49
53
  }
50
54
  /**
51
55
  * @internal
@@ -68,6 +72,10 @@ export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedCon
68
72
  * @internal
69
73
  */
70
74
  readonly httpAuthSchemeProvider: AgentRegistryHttpAuthSchemeProvider;
75
+ /**
76
+ * The token used to authenticate requests.
77
+ */
78
+ readonly token?: TokenIdentityProvider;
71
79
  }
72
80
  /**
73
81
  * @internal
@@ -24,7 +24,7 @@ declare const BatchGetDiscoverableRegistryRecordCommand_base: {
24
24
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
25
25
  };
26
26
  /**
27
- * <p> Retrieves multiple discoverable registry records by ID from a single registry. Records that cannot be retrieved are reported individually in the <code>errors</code> list rather than failing the entire request.</p>
27
+ * <p> Retrieves multiple discoverable registry records by ID from a single registry. Records that cannot be retrieved are reported individually in the <code>errors</code> list rather than failing the entire request. For each skill record that has a skill package, the operation also returns <code>artifact</code>. It contains a short-lived download URL and a SHA-256 checksum for the package of the record's latest approved revision. If the registry can't create a download URL for a package, the whole request fails.</p>
28
28
  * @example
29
29
  * Use a bare-bones client and the command you need to make an API call.
30
30
  * ```javascript
@@ -114,10 +114,14 @@ declare const BatchGetDiscoverableRegistryRecordCommand_base: {
114
114
  * // },
115
115
  * // },
116
116
  * // recordVersion: "STRING_VALUE", // required
117
- * // status: "DRAFT" || "PENDING_APPROVAL" || "APPROVED" || "REJECTED" || "DEPRECATED" || "CREATING" || "UPDATING" || "CREATE_FAILED" || "UPDATE_FAILED", // required
117
+ * // status: "DRAFT" || "PENDING_APPROVAL" || "APPROVED" || "REJECTED" || "DEPRECATED" || "CREATING" || "UPDATING" || "CREATE_FAILED" || "UPDATE_FAILED" || "CREATE_PENDING_AUTH" || "UPDATE_PENDING_AUTH", // required
118
118
  * // createdAt: new Date("TIMESTAMP"), // required
119
119
  * // updatedAt: new Date("TIMESTAMP"), // required
120
120
  * // customMetadata: "DOCUMENT_VALUE",
121
+ * // artifact: { // RegistryRecordArtifactDownload
122
+ * // sha256: "STRING_VALUE",
123
+ * // downloadUrl: "STRING_VALUE",
124
+ * // },
121
125
  * // },
122
126
  * // ],
123
127
  * // errors: [ // BatchGetDiscoverableRegistryRecordErrorList // required
@@ -59,7 +59,7 @@ declare const ListDiscoverableRegistryRecordsCommand_base: {
59
59
  * // displayName: "STRING_VALUE",
60
60
  * // recordType: "MCP" || "AGENT" || "CUSTOM" || "SKILL" || "GATEWAY", // required
61
61
  * // recordVersion: "STRING_VALUE", // required
62
- * // status: "DRAFT" || "PENDING_APPROVAL" || "APPROVED" || "REJECTED" || "DEPRECATED" || "CREATING" || "UPDATING" || "CREATE_FAILED" || "UPDATE_FAILED", // required
62
+ * // status: "DRAFT" || "PENDING_APPROVAL" || "APPROVED" || "REJECTED" || "DEPRECATED" || "CREATING" || "UPDATING" || "CREATE_FAILED" || "UPDATE_FAILED" || "CREATE_PENDING_AUTH" || "UPDATE_PENDING_AUTH", // required
63
63
  * // createdAt: new Date("TIMESTAMP"), // required
64
64
  * // updatedAt: new Date("TIMESTAMP"), // required
65
65
  * // descriptorTypes: [ // DescriptorTypeList