@hasna/skills 0.10.75 → 0.10.77

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/dist/sdk/index.js CHANGED
@@ -16765,7 +16765,7 @@ var require_client2 = __commonJS((exports) => {
16765
16765
  var { HttpRequest, parseUrl } = require_protocols();
16766
16766
  var { InvokeStore } = require_invoke_store();
16767
16767
  var { normalizeProvider } = require_dist_cjs2();
16768
- var { platform, release } = __require("os");
16768
+ var { platform, release: release2 } = __require("os");
16769
16769
  var { versions, env } = __require("process");
16770
16770
  var { isValidHostLabel, isIpAddress, customEndpointFunctions } = require_endpoints();
16771
16771
  var { EndpointError, resolveEndpoint } = require_endpoints();
@@ -17485,7 +17485,7 @@ More information can be found at: https://a.co/c895JFp`);
17485
17485
  const sections = [
17486
17486
  ["aws-sdk-js", clientVersion],
17487
17487
  ["ua", "2.1"],
17488
- [`os/${platform()}`, release()],
17488
+ [`os/${platform()}`, release2()],
17489
17489
  ["lang/js"],
17490
17490
  runtimeUserAgentPair
17491
17491
  ];
@@ -24586,7 +24586,7 @@ var require_httpAuthSchemes = __commonJS((exports) => {
24586
24586
  });
24587
24587
 
24588
24588
  // node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js
24589
- var import_client8, import_config9, ENV_KEY = "AWS_ACCESS_KEY_ID", ENV_SECRET = "AWS_SECRET_ACCESS_KEY", ENV_SESSION = "AWS_SESSION_TOKEN", ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION", ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE", ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID", fromEnv = (init) => async () => {
24589
+ var import_client9, import_config10, ENV_KEY = "AWS_ACCESS_KEY_ID", ENV_SECRET = "AWS_SECRET_ACCESS_KEY", ENV_SESSION = "AWS_SESSION_TOKEN", ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION", ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE", ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID", fromEnv = (init) => async () => {
24590
24590
  init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");
24591
24591
  const accessKeyId = process.env[ENV_KEY];
24592
24592
  const secretAccessKey = process.env[ENV_SECRET];
@@ -24603,14 +24603,14 @@ var import_client8, import_config9, ENV_KEY = "AWS_ACCESS_KEY_ID", ENV_SECRET =
24603
24603
  ...credentialScope && { credentialScope },
24604
24604
  ...accountId && { accountId }
24605
24605
  };
24606
- import_client8.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
24606
+ import_client9.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS", "g");
24607
24607
  return credentials;
24608
24608
  }
24609
- throw new import_config9.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
24609
+ throw new import_config10.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger });
24610
24610
  };
24611
24611
  var init_fromEnv = __esm(() => {
24612
- import_client8 = __toESM(require_client2(), 1);
24613
- import_config9 = __toESM(require_config(), 1);
24612
+ import_client9 = __toESM(require_client2(), 1);
24613
+ import_config10 = __toESM(require_config(), 1);
24614
24614
  });
24615
24615
 
24616
24616
  // node_modules/@aws-sdk/credential-provider-env/dist-es/index.js
@@ -24653,17 +24653,17 @@ function httpRequest(options) {
24653
24653
  hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1")
24654
24654
  });
24655
24655
  req.on("error", (err) => {
24656
- reject(Object.assign(new import_config10.ProviderError("Unable to connect to instance metadata service"), err));
24656
+ reject(Object.assign(new import_config11.ProviderError("Unable to connect to instance metadata service"), err));
24657
24657
  req.destroy();
24658
24658
  });
24659
24659
  req.on("timeout", () => {
24660
- reject(new import_config10.ProviderError("TimeoutError from instance metadata service"));
24660
+ reject(new import_config11.ProviderError("TimeoutError from instance metadata service"));
24661
24661
  req.destroy();
24662
24662
  });
24663
24663
  req.on("response", (res) => {
24664
24664
  const { statusCode = 400 } = res;
24665
24665
  if (statusCode < 200 || 300 <= statusCode) {
24666
- reject(Object.assign(new import_config10.ProviderError("Error response received from instance metadata service"), { statusCode }));
24666
+ reject(Object.assign(new import_config11.ProviderError("Error response received from instance metadata service"), { statusCode }));
24667
24667
  req.destroy();
24668
24668
  }
24669
24669
  const chunks = [];
@@ -24678,10 +24678,10 @@ function httpRequest(options) {
24678
24678
  req.end();
24679
24679
  });
24680
24680
  }
24681
- var import_config10;
24681
+ var import_config11;
24682
24682
  var init_httpRequest = __esm(() => {
24683
24683
  init_node_http();
24684
- import_config10 = __toESM(require_config(), 1);
24684
+ import_config11 = __toESM(require_config(), 1);
24685
24685
  });
24686
24686
 
24687
24687
  // node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/retry.js
@@ -24694,13 +24694,13 @@ var retry = (toRetry, maxRetries) => {
24694
24694
  };
24695
24695
 
24696
24696
  // node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js
24697
- var import_config11, ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromContainerMetadata = (init = {}) => {
24697
+ var import_config12, ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromContainerMetadata = (init = {}) => {
24698
24698
  const { timeout: timeout2, maxRetries } = providerConfigFromInit(init);
24699
24699
  return () => retry(async () => {
24700
24700
  const requestOptions = await getCmdsUri({ logger: init.logger });
24701
24701
  const credsResponse = JSON.parse(await requestFromEcsImds(timeout2, requestOptions));
24702
24702
  if (!isImdsCredentials(credsResponse)) {
24703
- throw new import_config11.CredentialsProviderError("Invalid response received from instance metadata service.", {
24703
+ throw new import_config12.CredentialsProviderError("Invalid response received from instance metadata service.", {
24704
24704
  logger: init.logger
24705
24705
  });
24706
24706
  }
@@ -24730,16 +24730,16 @@ var import_config11, ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", E
24730
24730
  try {
24731
24731
  parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
24732
24732
  } catch {
24733
- throw new import_config11.CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
24733
+ throw new import_config12.CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
24734
24734
  }
24735
24735
  if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
24736
- throw new import_config11.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
24736
+ throw new import_config12.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
24737
24737
  tryNextLink: false,
24738
24738
  logger
24739
24739
  });
24740
24740
  }
24741
24741
  if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
24742
- throw new import_config11.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
24742
+ throw new import_config12.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
24743
24743
  tryNextLink: false,
24744
24744
  logger
24745
24745
  });
@@ -24751,23 +24751,23 @@ var import_config11, ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", E
24751
24751
  port: parsed.port ? parseInt(parsed.port, 10) : undefined
24752
24752
  };
24753
24753
  }
24754
- throw new import_config11.CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", {
24754
+ throw new import_config12.CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` + " variable is set", {
24755
24755
  tryNextLink: false,
24756
24756
  logger
24757
24757
  });
24758
24758
  };
24759
24759
  var init_fromContainerMetadata = __esm(() => {
24760
24760
  init_httpRequest();
24761
- import_config11 = __toESM(require_config(), 1);
24761
+ import_config12 = __toESM(require_config(), 1);
24762
24762
  GREENGRASS_HOSTS = new Set(["localhost", "127.0.0.1"]);
24763
24763
  GREENGRASS_PROTOCOLS = new Set(["http:", "https:"]);
24764
24764
  });
24765
24765
 
24766
24766
  // node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js
24767
- var import_config12, InstanceMetadataV1FallbackError;
24767
+ var import_config13, InstanceMetadataV1FallbackError;
24768
24768
  var init_InstanceMetadataV1FallbackError = __esm(() => {
24769
- import_config12 = __toESM(require_config(), 1);
24770
- InstanceMetadataV1FallbackError = class InstanceMetadataV1FallbackError extends import_config12.CredentialsProviderError {
24769
+ import_config13 = __toESM(require_config(), 1);
24770
+ InstanceMetadataV1FallbackError = class InstanceMetadataV1FallbackError extends import_config13.CredentialsProviderError {
24771
24771
  tryNextLink;
24772
24772
  name = "InstanceMetadataV1FallbackError";
24773
24773
  constructor(message, tryNextLink = true) {
@@ -24818,8 +24818,8 @@ var init_EndpointModeConfigOptions = __esm(() => {
24818
24818
  });
24819
24819
 
24820
24820
  // node_modules/@smithy/credential-provider-imds/dist-es/utils/getInstanceMetadataEndpoint.js
24821
- var import_config13, import_protocols, getInstanceMetadataEndpoint = async () => import_protocols.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()), getFromEndpointConfig = async () => import_config13.loadConfig(ENDPOINT_CONFIG_OPTIONS)(), getFromEndpointModeConfig = async () => {
24822
- const endpointMode = await import_config13.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
24821
+ var import_config14, import_protocols, getInstanceMetadataEndpoint = async () => import_protocols.parseUrl(await getFromEndpointConfig() || await getFromEndpointModeConfig()), getFromEndpointConfig = async () => import_config14.loadConfig(ENDPOINT_CONFIG_OPTIONS)(), getFromEndpointModeConfig = async () => {
24822
+ const endpointMode = await import_config14.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
24823
24823
  switch (endpointMode) {
24824
24824
  case EndpointMode.IPv4:
24825
24825
  return Endpoint.IPv4;
@@ -24834,7 +24834,7 @@ var init_getInstanceMetadataEndpoint = __esm(() => {
24834
24834
  init_EndpointConfigOptions();
24835
24835
  init_EndpointMode();
24836
24836
  init_EndpointModeConfigOptions();
24837
- import_config13 = __toESM(require_config(), 1);
24837
+ import_config14 = __toESM(require_config(), 1);
24838
24838
  import_protocols = __toESM(require_protocols(), 1);
24839
24839
  });
24840
24840
 
@@ -24884,7 +24884,7 @@ var init_staticStabilityProvider = __esm(() => {
24884
24884
  });
24885
24885
 
24886
24886
  // node_modules/@smithy/credential-provider-imds/dist-es/fromInstanceMetadata.js
24887
- var import_config14, IMDS_PATH = "/latest/meta-data/iam/security-credentials/", IMDS_TOKEN_PATH = "/latest/api/token", AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED", PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled", X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token", fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), getInstanceMetadataProvider = (init = {}) => {
24887
+ var import_config15, IMDS_PATH = "/latest/meta-data/iam/security-credentials/", IMDS_TOKEN_PATH = "/latest/api/token", AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED", PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled", X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token", fromInstanceMetadata = (init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), getInstanceMetadataProvider = (init = {}) => {
24888
24888
  let disableFetchToken = false;
24889
24889
  const { logger, profile } = init;
24890
24890
  const { timeout: timeout2, maxRetries } = providerConfigFromInit(init);
@@ -24893,12 +24893,12 @@ var import_config14, IMDS_PATH = "/latest/meta-data/iam/security-credentials/",
24893
24893
  if (isImdsV1Fallback) {
24894
24894
  let fallbackBlockedFromProfile = false;
24895
24895
  let fallbackBlockedFromProcessEnv = false;
24896
- const configValue = await import_config14.loadConfig({
24896
+ const configValue = await import_config15.loadConfig({
24897
24897
  environmentVariableSelector: (env) => {
24898
24898
  const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
24899
24899
  fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
24900
24900
  if (envValue === undefined) {
24901
- throw new import_config14.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
24901
+ throw new import_config15.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
24902
24902
  }
24903
24903
  return fallbackBlockedFromProcessEnv;
24904
24904
  },
@@ -24989,7 +24989,7 @@ var import_config14, IMDS_PATH = "/latest/meta-data/iam/security-credentials/",
24989
24989
  path: IMDS_PATH + profile
24990
24990
  })).toString());
24991
24991
  if (!isImdsCredentials(credentialsResponse)) {
24992
- throw new import_config14.CredentialsProviderError("Invalid response received from instance metadata service.", {
24992
+ throw new import_config15.CredentialsProviderError("Invalid response received from instance metadata service.", {
24993
24993
  logger: init.logger
24994
24994
  });
24995
24995
  }
@@ -25000,7 +25000,7 @@ var init_fromInstanceMetadata = __esm(() => {
25000
25000
  init_httpRequest();
25001
25001
  init_getInstanceMetadataEndpoint();
25002
25002
  init_staticStabilityProvider();
25003
- import_config14 = __toESM(require_config(), 1);
25003
+ import_config15 = __toESM(require_config(), 1);
25004
25004
  });
25005
25005
 
25006
25006
  // node_modules/@smithy/credential-provider-imds/dist-es/index.js
@@ -25853,7 +25853,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
25853
25853
  });
25854
25854
 
25855
25855
  // node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/checkUrl.js
25856
- var import_config15, ECS_CONTAINER_HOST = "169.254.170.2", EKS_CONTAINER_HOST_IPv4 = "169.254.170.23", EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]", checkUrl = (url, logger) => {
25856
+ var import_config16, ECS_CONTAINER_HOST = "169.254.170.2", EKS_CONTAINER_HOST_IPv4 = "169.254.170.23", EKS_CONTAINER_HOST_IPv6 = "[fd00:ec2::23]", checkUrl = (url, logger) => {
25857
25857
  if (url.protocol === "https:") {
25858
25858
  return;
25859
25859
  }
@@ -25877,13 +25877,13 @@ var import_config15, ECS_CONTAINER_HOST = "169.254.170.2", EKS_CONTAINER_HOST_IP
25877
25877
  return;
25878
25878
  }
25879
25879
  }
25880
- throw new import_config15.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
25880
+ throw new import_config16.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
25881
25881
  - loopback CIDR 127.0.0.0/8 or [::1/128]
25882
25882
  - ECS container host 169.254.170.2
25883
25883
  - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });
25884
25884
  };
25885
25885
  var init_checkUrl = __esm(() => {
25886
- import_config15 = __toESM(require_config(), 1);
25886
+ import_config16 = __toESM(require_config(), 1);
25887
25887
  });
25888
25888
 
25889
25889
  // node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/requestHelpers.js
@@ -25906,7 +25906,7 @@ async function getCredentials(response, logger) {
25906
25906
  if (response.statusCode === 200) {
25907
25907
  const parsed = JSON.parse(str);
25908
25908
  if (typeof parsed.AccessKeyId !== "string" || typeof parsed.SecretAccessKey !== "string" || typeof parsed.Token !== "string" || typeof parsed.Expiration !== "string") {
25909
- throw new import_config16.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
25909
+ throw new import_config17.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: " + "{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }", { logger });
25910
25910
  }
25911
25911
  return {
25912
25912
  accessKeyId: parsed.AccessKeyId,
@@ -25920,16 +25920,16 @@ async function getCredentials(response, logger) {
25920
25920
  try {
25921
25921
  parsedBody = JSON.parse(str);
25922
25922
  } catch (e3) {}
25923
- throw Object.assign(new import_config16.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
25923
+ throw Object.assign(new import_config17.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {
25924
25924
  Code: parsedBody.Code,
25925
25925
  Message: parsedBody.Message
25926
25926
  });
25927
25927
  }
25928
- throw new import_config16.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
25928
+ throw new import_config17.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });
25929
25929
  }
25930
- var import_config16, import_protocols2, import_serde, import_serde2;
25930
+ var import_config17, import_protocols2, import_serde, import_serde2;
25931
25931
  var init_requestHelpers = __esm(() => {
25932
- import_config16 = __toESM(require_config(), 1);
25932
+ import_config17 = __toESM(require_config(), 1);
25933
25933
  import_protocols2 = __toESM(require_protocols(), 1);
25934
25934
  import_serde = __toESM(require_serde(), 1);
25935
25935
  import_serde2 = __toESM(require_serde(), 1);
@@ -25951,7 +25951,7 @@ var retryWrapper = (toRetry, maxRetries, delayMs) => {
25951
25951
 
25952
25952
  // node_modules/@aws-sdk/credential-provider-http/dist-es/fromHttp/fromHttp.js
25953
25953
  import fs from "fs/promises";
25954
- var import_client9, import_config17, import_node_http_handler, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2", AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE", AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromHttp = (options = {}) => {
25954
+ var import_client10, import_config18, import_node_http_handler, AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI", DEFAULT_LINK_LOCAL_HOST = "http://169.254.170.2", AWS_CONTAINER_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI", AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE", AWS_CONTAINER_AUTHORIZATION_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN", fromHttp = (options = {}) => {
25955
25955
  options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
25956
25956
  let host;
25957
25957
  const relative12 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
@@ -25972,7 +25972,7 @@ var import_client9, import_config17, import_node_http_handler, AWS_CONTAINER_CRE
25972
25972
  } else if (full) {
25973
25973
  host = full;
25974
25974
  } else {
25975
- throw new import_config17.CredentialsProviderError(`No HTTP credential provider host provided.
25975
+ throw new import_config18.CredentialsProviderError(`No HTTP credential provider host provided.
25976
25976
  Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
25977
25977
  }
25978
25978
  const url = new URL(host);
@@ -25988,9 +25988,9 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
25988
25988
  }
25989
25989
  try {
25990
25990
  const result = await requestHandler.handle(request2, { requestTimeout });
25991
- return getCredentials(result.response).then((creds) => import_client9.setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
25991
+ return getCredentials(result.response).then((creds) => import_client10.setCredentialFeature(creds, "CREDENTIALS_HTTP", "z"));
25992
25992
  } catch (e3) {
25993
- throw new import_config17.CredentialsProviderError(String(e3), { logger: options.logger });
25993
+ throw new import_config18.CredentialsProviderError(String(e3), { logger: options.logger });
25994
25994
  }
25995
25995
  }, options.maxRetries ?? 3, options.timeout ?? 1000);
25996
25996
  return async () => {
@@ -26003,15 +26003,15 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
26003
26003
  }, validateToken = (token) => {
26004
26004
  if (token.includes(`\r
26005
26005
  `)) {
26006
- throw new import_config17.CredentialsProviderError("Authorization token contains invalid \\r\\n sequence.");
26006
+ throw new import_config18.CredentialsProviderError("Authorization token contains invalid \\r\\n sequence.");
26007
26007
  }
26008
26008
  return token;
26009
26009
  };
26010
26010
  var init_fromHttp = __esm(() => {
26011
26011
  init_checkUrl();
26012
26012
  init_requestHelpers();
26013
- import_client9 = __toESM(require_client2(), 1);
26014
- import_config17 = __toESM(require_config(), 1);
26013
+ import_client10 = __toESM(require_client2(), 1);
26014
+ import_config18 = __toESM(require_config(), 1);
26015
26015
  import_node_http_handler = __toESM(require_dist_cjs6(), 1);
26016
26016
  });
26017
26017
 
@@ -26814,70 +26814,70 @@ var getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConf
26814
26814
  var init_getNewSsoOidcToken = () => {};
26815
26815
 
26816
26816
  // node_modules/@aws-sdk/token-providers/dist-es/validateTokenExpiry.js
26817
- var import_config19, validateTokenExpiry = (token) => {
26817
+ var import_config20, validateTokenExpiry = (token) => {
26818
26818
  if (token.expiration && token.expiration.getTime() < Date.now()) {
26819
- throw new import_config19.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
26819
+ throw new import_config20.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);
26820
26820
  }
26821
26821
  };
26822
26822
  var init_validateTokenExpiry = __esm(() => {
26823
26823
  init_constants();
26824
- import_config19 = __toESM(require_config(), 1);
26824
+ import_config20 = __toESM(require_config(), 1);
26825
26825
  });
26826
26826
 
26827
26827
  // node_modules/@aws-sdk/token-providers/dist-es/validateTokenKey.js
26828
- var import_config20, validateTokenKey = (key2, value, forRefresh = false) => {
26828
+ var import_config21, validateTokenKey = (key2, value, forRefresh = false) => {
26829
26829
  if (typeof value === "undefined") {
26830
- throw new import_config20.TokenProviderError(`Value not present for '${key2}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
26830
+ throw new import_config21.TokenProviderError(`Value not present for '${key2}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
26831
26831
  }
26832
26832
  };
26833
26833
  var init_validateTokenKey = __esm(() => {
26834
26834
  init_constants();
26835
- import_config20 = __toESM(require_config(), 1);
26835
+ import_config21 = __toESM(require_config(), 1);
26836
26836
  });
26837
26837
 
26838
26838
  // node_modules/@aws-sdk/token-providers/dist-es/writeSSOTokenToFile.js
26839
26839
  import { promises as fsPromises } from "fs";
26840
- var import_config21, writeFile, writeSSOTokenToFile = (id2, ssoToken) => {
26841
- const tokenFilepath = import_config21.getSSOTokenFilepath(id2);
26840
+ var import_config22, writeFile, writeSSOTokenToFile = (id2, ssoToken) => {
26841
+ const tokenFilepath = import_config22.getSSOTokenFilepath(id2);
26842
26842
  const tokenString = JSON.stringify(ssoToken, null, 2);
26843
26843
  return writeFile(tokenFilepath, tokenString);
26844
26844
  };
26845
26845
  var init_writeSSOTokenToFile = __esm(() => {
26846
- import_config21 = __toESM(require_config(), 1);
26846
+ import_config22 = __toESM(require_config(), 1);
26847
26847
  ({ writeFile } = fsPromises);
26848
26848
  });
26849
26849
 
26850
26850
  // node_modules/@aws-sdk/token-providers/dist-es/fromSso.js
26851
- var import_config22, lastRefreshAttemptTimes, fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
26851
+ var import_config23, lastRefreshAttemptTimes, fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
26852
26852
  init.logger?.debug("@aws-sdk/token-providers - fromSso");
26853
- const profiles = await import_config22.parseKnownFiles(init);
26854
- const profileName = import_config22.getProfileName({
26853
+ const profiles = await import_config23.parseKnownFiles(init);
26854
+ const profileName = import_config23.getProfileName({
26855
26855
  profile: init.profile ?? callerClientConfig?.profile
26856
26856
  });
26857
26857
  const profile = profiles[profileName];
26858
26858
  if (!profile) {
26859
- throw new import_config22.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
26859
+ throw new import_config23.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);
26860
26860
  } else if (!profile["sso_session"]) {
26861
- throw new import_config22.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
26861
+ throw new import_config23.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
26862
26862
  }
26863
26863
  const ssoSessionName = profile["sso_session"];
26864
- const ssoSessions = await import_config22.loadSsoSessionData(init);
26864
+ const ssoSessions = await import_config23.loadSsoSessionData(init);
26865
26865
  const ssoSession = ssoSessions[ssoSessionName];
26866
26866
  if (!ssoSession) {
26867
- throw new import_config22.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
26867
+ throw new import_config23.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false);
26868
26868
  }
26869
26869
  for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) {
26870
26870
  if (!ssoSession[ssoSessionRequiredKey]) {
26871
- throw new import_config22.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
26871
+ throw new import_config23.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false);
26872
26872
  }
26873
26873
  }
26874
26874
  const ssoStartUrl = ssoSession["sso_start_url"];
26875
26875
  const ssoRegion = ssoSession["sso_region"];
26876
26876
  let ssoToken;
26877
26877
  try {
26878
- ssoToken = await import_config22.getSSOTokenFromFile(ssoSessionName);
26878
+ ssoToken = await import_config23.getSSOTokenFromFile(ssoSessionName);
26879
26879
  } catch (e3) {
26880
- throw new import_config22.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
26880
+ throw new import_config23.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`, false);
26881
26881
  }
26882
26882
  validateTokenKey("accessToken", ssoToken.accessToken);
26883
26883
  validateTokenKey("expiresAt", ssoToken.expiresAt);
@@ -26926,7 +26926,7 @@ var init_fromSso = __esm(() => {
26926
26926
  init_validateTokenExpiry();
26927
26927
  init_validateTokenKey();
26928
26928
  init_writeSSOTokenToFile();
26929
- import_config22 = __toESM(require_config(), 1);
26929
+ import_config23 = __toESM(require_config(), 1);
26930
26930
  lastRefreshAttemptTimes = new Map;
26931
26931
  });
26932
26932
 
@@ -27394,7 +27394,7 @@ var init_loadSso = __esm(() => {
27394
27394
  });
27395
27395
 
27396
27396
  // node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js
27397
- var import_client10, import_config23, SHOULD_FAIL_CREDENTIAL_CHAIN = false, resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
27397
+ var import_client11, import_config24, SHOULD_FAIL_CREDENTIAL_CHAIN = false, resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger }) => {
27398
27398
  let token;
27399
27399
  const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;
27400
27400
  if (ssoSession) {
@@ -27413,23 +27413,23 @@ var import_client10, import_config23, SHOULD_FAIL_CREDENTIAL_CHAIN = false, reso
27413
27413
  expiresAt: new Date(_token.expiration).toISOString()
27414
27414
  };
27415
27415
  } catch (e4) {
27416
- throw new import_config23.CredentialsProviderError(e4.message, {
27416
+ throw new import_config24.CredentialsProviderError(e4.message, {
27417
27417
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
27418
27418
  logger
27419
27419
  });
27420
27420
  }
27421
27421
  } else {
27422
27422
  try {
27423
- token = await import_config23.getSSOTokenFromFile(ssoStartUrl);
27423
+ token = await import_config24.getSSOTokenFromFile(ssoStartUrl);
27424
27424
  } catch (e4) {
27425
- throw new import_config23.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
27425
+ throw new import_config24.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {
27426
27426
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
27427
27427
  logger
27428
27428
  });
27429
27429
  }
27430
27430
  }
27431
27431
  if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {
27432
- throw new import_config23.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
27432
+ throw new import_config24.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {
27433
27433
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
27434
27434
  logger
27435
27435
  });
@@ -27449,14 +27449,14 @@ var import_client10, import_config23, SHOULD_FAIL_CREDENTIAL_CHAIN = false, reso
27449
27449
  accessToken
27450
27450
  }));
27451
27451
  } catch (e4) {
27452
- throw new import_config23.CredentialsProviderError(e4, {
27452
+ throw new import_config24.CredentialsProviderError(e4, {
27453
27453
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
27454
27454
  logger
27455
27455
  });
27456
27456
  }
27457
27457
  const { roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {} } = ssoResp;
27458
27458
  if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {
27459
- throw new import_config23.CredentialsProviderError("SSO returns an invalid temporary credential.", {
27459
+ throw new import_config24.CredentialsProviderError("SSO returns an invalid temporary credential.", {
27460
27460
  tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,
27461
27461
  logger
27462
27462
  });
@@ -27470,62 +27470,62 @@ var import_client10, import_config23, SHOULD_FAIL_CREDENTIAL_CHAIN = false, reso
27470
27470
  ...accountId && { accountId }
27471
27471
  };
27472
27472
  if (ssoSession) {
27473
- import_client10.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
27473
+ import_client11.setCredentialFeature(credentials, "CREDENTIALS_SSO", "s");
27474
27474
  } else {
27475
- import_client10.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
27475
+ import_client11.setCredentialFeature(credentials, "CREDENTIALS_SSO_LEGACY", "u");
27476
27476
  }
27477
27477
  return credentials;
27478
27478
  };
27479
27479
  var init_resolveSSOCredentials = __esm(() => {
27480
27480
  init_dist_es4();
27481
- import_client10 = __toESM(require_client2(), 1);
27482
- import_config23 = __toESM(require_config(), 1);
27481
+ import_client11 = __toESM(require_client2(), 1);
27482
+ import_config24 = __toESM(require_config(), 1);
27483
27483
  });
27484
27484
 
27485
27485
  // node_modules/@aws-sdk/credential-provider-sso/dist-es/validateSsoProfile.js
27486
- var import_config24, validateSsoProfile = (profile, logger) => {
27486
+ var import_config25, validateSsoProfile = (profile, logger) => {
27487
27487
  const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;
27488
27488
  if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {
27489
- throw new import_config24.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
27489
+ throw new import_config25.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}
27490
27490
  Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, { tryNextLink: false, logger });
27491
27491
  }
27492
27492
  return profile;
27493
27493
  };
27494
27494
  var init_validateSsoProfile = __esm(() => {
27495
- import_config24 = __toESM(require_config(), 1);
27495
+ import_config25 = __toESM(require_config(), 1);
27496
27496
  });
27497
27497
 
27498
27498
  // node_modules/@aws-sdk/credential-provider-sso/dist-es/fromSSO.js
27499
- var import_config25, fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
27499
+ var import_config26, fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => {
27500
27500
  init.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");
27501
27501
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
27502
27502
  const { ssoClient } = init;
27503
- const profileName = import_config25.getProfileName({
27503
+ const profileName = import_config26.getProfileName({
27504
27504
  profile: init.profile ?? callerClientConfig?.profile
27505
27505
  });
27506
27506
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
27507
- const profiles = await import_config25.parseKnownFiles(init);
27507
+ const profiles = await import_config26.parseKnownFiles(init);
27508
27508
  const profile = profiles[profileName];
27509
27509
  if (!profile) {
27510
- throw new import_config25.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
27510
+ throw new import_config26.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });
27511
27511
  }
27512
27512
  if (!isSsoProfile(profile)) {
27513
- throw new import_config25.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
27513
+ throw new import_config26.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {
27514
27514
  logger: init.logger
27515
27515
  });
27516
27516
  }
27517
27517
  if (profile?.sso_session) {
27518
- const ssoSessions = await import_config25.loadSsoSessionData(init);
27518
+ const ssoSessions = await import_config26.loadSsoSessionData(init);
27519
27519
  const session = ssoSessions[profile.sso_session];
27520
27520
  const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;
27521
27521
  if (ssoRegion && ssoRegion !== session.sso_region) {
27522
- throw new import_config25.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
27522
+ throw new import_config26.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {
27523
27523
  tryNextLink: false,
27524
27524
  logger: init.logger
27525
27525
  });
27526
27526
  }
27527
27527
  if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {
27528
- throw new import_config25.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
27528
+ throw new import_config26.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {
27529
27529
  tryNextLink: false,
27530
27530
  logger: init.logger
27531
27531
  });
@@ -27551,7 +27551,7 @@ var import_config25, fromSSO = (init = {}) => async ({ callerClientConfig } = {}
27551
27551
  logger: init.logger
27552
27552
  });
27553
27553
  } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {
27554
- throw new import_config25.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
27554
+ throw new import_config26.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"', { tryNextLink: false, logger: init.logger });
27555
27555
  } else {
27556
27556
  return resolveSSOCredentials({
27557
27557
  ssoStartUrl,
@@ -27574,7 +27574,7 @@ var import_config25, fromSSO = (init = {}) => async ({ callerClientConfig } = {}
27574
27574
  var init_fromSSO = __esm(() => {
27575
27575
  init_resolveSSOCredentials();
27576
27576
  init_validateSsoProfile();
27577
- import_config25 = __toESM(require_config(), 1);
27577
+ import_config26 = __toESM(require_config(), 1);
27578
27578
  });
27579
27579
 
27580
27580
  // node_modules/@aws-sdk/credential-provider-sso/dist-es/index.js
@@ -27590,13 +27590,13 @@ var init_dist_es5 = __esm(() => {
27590
27590
  });
27591
27591
 
27592
27592
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
27593
- var import_client11, import_config26, resolveCredentialSource = (credentialSource, profileName, logger) => {
27593
+ var import_client12, import_config27, resolveCredentialSource = (credentialSource, profileName, logger) => {
27594
27594
  const sourceProvidersMap = {
27595
27595
  EcsContainer: async (options) => {
27596
27596
  const { fromHttp: fromHttp2 } = await Promise.resolve().then(() => (init_dist_es3(), exports_dist_es3));
27597
27597
  const { fromContainerMetadata: fromContainerMetadata2 } = await Promise.resolve().then(() => (init_dist_es2(), exports_dist_es2));
27598
27598
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
27599
- return async () => import_config26.chain(fromHttp2(options ?? {}), fromContainerMetadata2(options))().then(setNamedProvider);
27599
+ return async () => import_config27.chain(fromHttp2(options ?? {}), fromContainerMetadata2(options))().then(setNamedProvider);
27600
27600
  },
27601
27601
  Ec2InstanceMetadata: async (options) => {
27602
27602
  logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
@@ -27612,12 +27612,12 @@ var import_client11, import_config26, resolveCredentialSource = (credentialSourc
27612
27612
  if (credentialSource in sourceProvidersMap) {
27613
27613
  return sourceProvidersMap[credentialSource];
27614
27614
  } else {
27615
- throw new import_config26.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
27615
+ throw new import_config27.CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
27616
27616
  }
27617
- }, setNamedProvider = (creds) => import_client11.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
27617
+ }, setNamedProvider = (creds) => import_client12.setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
27618
27618
  var init_resolveCredentialSource = __esm(() => {
27619
- import_client11 = __toESM(require_client2(), 1);
27620
- import_config26 = __toESM(require_config(), 1);
27619
+ import_client12 = __toESM(require_client2(), 1);
27620
+ import_config27 = __toESM(require_config(), 1);
27621
27621
  });
27622
27622
 
27623
27623
  // node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
@@ -28643,7 +28643,7 @@ var require_sts = __commonJS((exports) => {
28643
28643
  });
28644
28644
 
28645
28645
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
28646
- var import_client12, import_config27, isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
28646
+ var import_client13, import_config28, isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
28647
28647
  return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
28648
28648
  }, isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
28649
28649
  const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
@@ -28674,7 +28674,7 @@ var import_client12, import_config27, isAssumeRoleProfile = (arg, { profile = "d
28674
28674
  }, options.clientPlugins);
28675
28675
  }
28676
28676
  if (source_profile && source_profile in visitedProfiles) {
28677
- throw new import_config27.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${import_config27.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
28677
+ throw new import_config28.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${import_config28.getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
28678
28678
  }
28679
28679
  options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
28680
28680
  const sourceCredsProvider = source_profile ? resolveProfileData(source_profile, profiles, options, callerClientConfig, {
@@ -28682,7 +28682,7 @@ var import_client12, import_config27, isAssumeRoleProfile = (arg, { profile = "d
28682
28682
  [source_profile]: true
28683
28683
  }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
28684
28684
  if (isCredentialSourceWithoutRoleArn(profileData)) {
28685
- return sourceCredsProvider.then((creds) => import_client12.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
28685
+ return sourceCredsProvider.then((creds) => import_client13.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
28686
28686
  } else {
28687
28687
  const params = {
28688
28688
  RoleArn: profileData.role_arn,
@@ -28693,21 +28693,21 @@ var import_client12, import_config27, isAssumeRoleProfile = (arg, { profile = "d
28693
28693
  const { mfa_serial } = profileData;
28694
28694
  if (mfa_serial) {
28695
28695
  if (!options.mfaCodeProvider) {
28696
- throw new import_config27.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
28696
+ throw new import_config28.CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
28697
28697
  }
28698
28698
  params.SerialNumber = mfa_serial;
28699
28699
  params.TokenCode = await options.mfaCodeProvider(mfa_serial);
28700
28700
  }
28701
28701
  const sourceCreds = await sourceCredsProvider;
28702
- return options.roleAssumer(sourceCreds, params).then((creds) => import_client12.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
28702
+ return options.roleAssumer(sourceCreds, params).then((creds) => import_client13.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
28703
28703
  }
28704
28704
  }, isCredentialSourceWithoutRoleArn = (section) => {
28705
28705
  return !section.role_arn && !!section.credential_source;
28706
28706
  };
28707
28707
  var init_resolveAssumeRoleCredentials = __esm(() => {
28708
28708
  init_resolveCredentialSource();
28709
- import_client12 = __toESM(require_client2(), 1);
28710
- import_config27 = __toESM(require_config(), 1);
28709
+ import_client13 = __toESM(require_client2(), 1);
28710
+ import_config28 = __toESM(require_config(), 1);
28711
28711
  });
28712
28712
 
28713
28713
  // node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js
@@ -29447,9 +29447,9 @@ import { createHash as createHash33, createPrivateKey, createPublicKey, sign } f
29447
29447
  import { promises as fs2 } from "fs";
29448
29448
  import { homedir as homedir7 } from "os";
29449
29449
  import { dirname as dirname30, join as join44 } from "path";
29450
- var import_config28, import_protocols3, LoginCredentialsFetcher;
29450
+ var import_config29, import_protocols3, LoginCredentialsFetcher;
29451
29451
  var init_LoginCredentialsFetcher = __esm(() => {
29452
- import_config28 = __toESM(require_config(), 1);
29452
+ import_config29 = __toESM(require_config(), 1);
29453
29453
  import_protocols3 = __toESM(require_protocols(), 1);
29454
29454
  LoginCredentialsFetcher = class LoginCredentialsFetcher {
29455
29455
  profileData;
@@ -29464,7 +29464,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
29464
29464
  async loadCredentials() {
29465
29465
  const token = await this.loadToken();
29466
29466
  if (!token) {
29467
- throw new import_config28.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
29467
+ throw new import_config29.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
29468
29468
  }
29469
29469
  const accessToken = token.accessToken;
29470
29470
  const now = Date.now();
@@ -29531,7 +29531,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
29531
29531
  const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
29532
29532
  const { refreshToken, expiresIn } = response.tokenOutput ?? {};
29533
29533
  if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
29534
- throw new import_config28.CredentialsProviderError("Token refresh response missing required fields", {
29534
+ throw new import_config29.CredentialsProviderError("Token refresh response missing required fields", {
29535
29535
  logger: this.logger,
29536
29536
  tryNextLink: false
29537
29537
  });
@@ -29568,7 +29568,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
29568
29568
  default:
29569
29569
  message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
29570
29570
  }
29571
- throw new import_config28.CredentialsProviderError(message, {
29571
+ throw new import_config29.CredentialsProviderError(message, {
29572
29572
  logger: this.logger,
29573
29573
  tryNextLink: false
29574
29574
  });
@@ -29578,7 +29578,7 @@ var init_LoginCredentialsFetcher = __esm(() => {
29578
29578
  this.logger?.warn?.(`Failed to refresh token: ${String(error)}. Using existing token until expiry.`);
29579
29579
  return this.toCredentials(freshToken.accessToken);
29580
29580
  }
29581
- throw new import_config28.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
29581
+ throw new import_config29.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
29582
29582
  }
29583
29583
  }
29584
29584
  async loadToken() {
@@ -29591,14 +29591,14 @@ var init_LoginCredentialsFetcher = __esm(() => {
29591
29591
  missingFields.push("accountId");
29592
29592
  }
29593
29593
  if (missingFields.length > 0) {
29594
- throw new import_config28.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
29594
+ throw new import_config29.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
29595
29595
  logger: this.logger,
29596
29596
  tryNextLink: false
29597
29597
  });
29598
29598
  }
29599
29599
  return token;
29600
29600
  } catch (error) {
29601
- throw new import_config28.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
29601
+ throw new import_config29.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
29602
29602
  logger: this.logger,
29603
29603
  tryNextLink: false
29604
29604
  });
@@ -29700,34 +29700,34 @@ var init_LoginCredentialsFetcher = __esm(() => {
29700
29700
  const signatureB64 = rawSignature.toString("base64url");
29701
29701
  return `${message}.${signatureB64}`;
29702
29702
  } catch (error) {
29703
- throw new import_config28.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
29703
+ throw new import_config29.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
29704
29704
  }
29705
29705
  }
29706
29706
  };
29707
29707
  });
29708
29708
 
29709
29709
  // node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js
29710
- var import_client13, import_config29, fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
29710
+ var import_client14, import_config30, fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
29711
29711
  init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
29712
- const profiles = await import_config29.parseKnownFiles(init || {});
29713
- const profileName = import_config29.getProfileName({
29712
+ const profiles = await import_config30.parseKnownFiles(init || {});
29713
+ const profileName = import_config30.getProfileName({
29714
29714
  profile: init?.profile ?? callerClientConfig?.profile
29715
29715
  });
29716
29716
  const profile = profiles[profileName];
29717
29717
  if (!profile?.login_session) {
29718
- throw new import_config29.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
29718
+ throw new import_config30.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
29719
29719
  tryNextLink: true,
29720
29720
  logger: init?.logger
29721
29721
  });
29722
29722
  }
29723
29723
  const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
29724
29724
  const credentials = await fetcher.loadCredentials();
29725
- return import_client13.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
29725
+ return import_client14.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
29726
29726
  };
29727
29727
  var init_fromLoginCredentials = __esm(() => {
29728
29728
  init_LoginCredentialsFetcher();
29729
- import_client13 = __toESM(require_client2(), 1);
29730
- import_config29 = __toESM(require_config(), 1);
29729
+ import_client14 = __toESM(require_client2(), 1);
29730
+ import_config30 = __toESM(require_config(), 1);
29731
29731
  });
29732
29732
 
29733
29733
  // node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/credential-provider-login/dist-es/index.js
@@ -29740,7 +29740,7 @@ var init_dist_es6 = __esm(() => {
29740
29740
  });
29741
29741
 
29742
29742
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
29743
- var import_client14, isLoginProfile = (data) => {
29743
+ var import_client15, isLoginProfile = (data) => {
29744
29744
  return Boolean(data && data.login_session);
29745
29745
  }, resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
29746
29746
  const { fromLoginCredentials: fromLoginCredentials2 } = await Promise.resolve().then(() => (init_dist_es6(), exports_dist_es5));
@@ -29748,14 +29748,14 @@ var import_client14, isLoginProfile = (data) => {
29748
29748
  ...options,
29749
29749
  profile: profileName
29750
29750
  })({ callerClientConfig });
29751
- return import_client14.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
29751
+ return import_client15.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
29752
29752
  };
29753
29753
  var init_resolveLoginCredentials = __esm(() => {
29754
- import_client14 = __toESM(require_client2(), 1);
29754
+ import_client15 = __toESM(require_client2(), 1);
29755
29755
  });
29756
29756
 
29757
29757
  // node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
29758
- var import_client15, getValidatedProcessCredentials = (profileName, data, profiles) => {
29758
+ var import_client16, getValidatedProcessCredentials = (profileName, data, profiles) => {
29759
29759
  if (data.Version !== 1) {
29760
29760
  throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
29761
29761
  }
@@ -29781,22 +29781,22 @@ var import_client15, getValidatedProcessCredentials = (profileName, data, profil
29781
29781
  ...data.CredentialScope && { credentialScope: data.CredentialScope },
29782
29782
  ...accountId && { accountId }
29783
29783
  };
29784
- import_client15.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
29784
+ import_client16.setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
29785
29785
  return credentials;
29786
29786
  };
29787
29787
  var init_getValidatedProcessCredentials = __esm(() => {
29788
- import_client15 = __toESM(require_client2(), 1);
29788
+ import_client16 = __toESM(require_client2(), 1);
29789
29789
  });
29790
29790
 
29791
29791
  // node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
29792
29792
  import { exec } from "child_process";
29793
29793
  import { promisify as promisify2 } from "util";
29794
- var import_config30, resolveProcessCredentials = async (profileName, profiles, logger) => {
29794
+ var import_config31, resolveProcessCredentials = async (profileName, profiles, logger) => {
29795
29795
  const profile = profiles[profileName];
29796
29796
  if (profiles[profileName]) {
29797
29797
  const credentialProcess = profile["credential_process"];
29798
29798
  if (credentialProcess !== undefined) {
29799
- const execPromise = promisify2(import_config30.externalDataInterceptor?.getTokenRecord?.().exec ?? exec);
29799
+ const execPromise = promisify2(import_config31.externalDataInterceptor?.getTokenRecord?.().exec ?? exec);
29800
29800
  try {
29801
29801
  const { stdout } = await execPromise(credentialProcess);
29802
29802
  let data;
@@ -29807,33 +29807,33 @@ var import_config30, resolveProcessCredentials = async (profileName, profiles, l
29807
29807
  }
29808
29808
  return getValidatedProcessCredentials(profileName, data, profiles);
29809
29809
  } catch (error) {
29810
- throw new import_config30.CredentialsProviderError(error.message, { logger });
29810
+ throw new import_config31.CredentialsProviderError(error.message, { logger });
29811
29811
  }
29812
29812
  } else {
29813
- throw new import_config30.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
29813
+ throw new import_config31.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
29814
29814
  }
29815
29815
  } else {
29816
- throw new import_config30.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
29816
+ throw new import_config31.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
29817
29817
  logger
29818
29818
  });
29819
29819
  }
29820
29820
  };
29821
29821
  var init_resolveProcessCredentials = __esm(() => {
29822
29822
  init_getValidatedProcessCredentials();
29823
- import_config30 = __toESM(require_config(), 1);
29823
+ import_config31 = __toESM(require_config(), 1);
29824
29824
  });
29825
29825
 
29826
29826
  // node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
29827
- var import_config31, fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
29827
+ var import_config32, fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
29828
29828
  init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
29829
- const profiles = await import_config31.parseKnownFiles(init);
29830
- return resolveProcessCredentials(import_config31.getProfileName({
29829
+ const profiles = await import_config32.parseKnownFiles(init);
29830
+ return resolveProcessCredentials(import_config32.getProfileName({
29831
29831
  profile: init.profile ?? callerClientConfig?.profile
29832
29832
  }), profiles, init.logger);
29833
29833
  };
29834
29834
  var init_fromProcess = __esm(() => {
29835
29835
  init_resolveProcessCredentials();
29836
- import_config31 = __toESM(require_config(), 1);
29836
+ import_config32 = __toESM(require_config(), 1);
29837
29837
  });
29838
29838
 
29839
29839
  // node_modules/@aws-sdk/credential-provider-process/dist-es/index.js
@@ -29846,20 +29846,20 @@ var init_dist_es7 = __esm(() => {
29846
29846
  });
29847
29847
 
29848
29848
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
29849
- var import_client16, isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", resolveProcessCredentials2 = async (options, profile) => {
29849
+ var import_client17, isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string", resolveProcessCredentials2 = async (options, profile) => {
29850
29850
  const { fromProcess: fromProcess2 } = await Promise.resolve().then(() => (init_dist_es7(), exports_dist_es6));
29851
29851
  const credentials = await fromProcess2({
29852
29852
  ...options,
29853
29853
  profile
29854
29854
  })();
29855
- return import_client16.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
29855
+ return import_client17.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
29856
29856
  };
29857
29857
  var init_resolveProcessCredentials2 = __esm(() => {
29858
- import_client16 = __toESM(require_client2(), 1);
29858
+ import_client17 = __toESM(require_client2(), 1);
29859
29859
  });
29860
29860
 
29861
29861
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
29862
- var import_client17, resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
29862
+ var import_client18, resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
29863
29863
  const { fromSSO: fromSSO2 } = await Promise.resolve().then(() => (init_dist_es5(), exports_dist_es4));
29864
29864
  return fromSSO2({
29865
29865
  profile,
@@ -29870,18 +29870,18 @@ var import_client17, resolveSsoCredentials = async (profile, profileData, option
29870
29870
  callerClientConfig
29871
29871
  }).then((creds) => {
29872
29872
  if (profileData.sso_session) {
29873
- return import_client17.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
29873
+ return import_client18.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
29874
29874
  } else {
29875
- return import_client17.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
29875
+ return import_client18.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
29876
29876
  }
29877
29877
  });
29878
29878
  }, isSsoProfile2 = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
29879
29879
  var init_resolveSsoCredentials = __esm(() => {
29880
- import_client17 = __toESM(require_client2(), 1);
29880
+ import_client18 = __toESM(require_client2(), 1);
29881
29881
  });
29882
29882
 
29883
29883
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
29884
- var import_client18, isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, resolveStaticCredentials = async (profile, options) => {
29884
+ var import_client19, isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1, resolveStaticCredentials = async (profile, options) => {
29885
29885
  options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
29886
29886
  const credentials = {
29887
29887
  accessKeyId: profile.aws_access_key_id,
@@ -29890,10 +29890,10 @@ var import_client18, isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg
29890
29890
  ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
29891
29891
  ...profile.aws_account_id && { accountId: profile.aws_account_id }
29892
29892
  };
29893
- return import_client18.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
29893
+ return import_client19.setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
29894
29894
  };
29895
29895
  var init_resolveStaticCredentials = __esm(() => {
29896
- import_client18 = __toESM(require_client2(), 1);
29896
+ import_client19 = __toESM(require_client2(), 1);
29897
29897
  });
29898
29898
 
29899
29899
  // node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
@@ -30947,30 +30947,30 @@ var fromWebToken = (init) => async (awsIdentityProperties) => {
30947
30947
 
30948
30948
  // node_modules/@aws-sdk/credential-provider-web-identity/dist-es/fromTokenFile.js
30949
30949
  import { readFileSync as readFileSync29 } from "fs";
30950
- var import_client19, import_config32, ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE", ENV_ROLE_ARN = "AWS_ROLE_ARN", ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME", fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
30950
+ var import_client20, import_config33, ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE", ENV_ROLE_ARN = "AWS_ROLE_ARN", ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME", fromTokenFile = (init = {}) => async (awsIdentityProperties) => {
30951
30951
  init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");
30952
30952
  const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];
30953
30953
  const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];
30954
30954
  const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];
30955
30955
  if (!webIdentityTokenFile || !roleArn) {
30956
- throw new import_config32.CredentialsProviderError("Web identity configuration not specified", {
30956
+ throw new import_config33.CredentialsProviderError("Web identity configuration not specified", {
30957
30957
  logger: init.logger
30958
30958
  });
30959
30959
  }
30960
30960
  const credentials = await fromWebToken({
30961
30961
  ...init,
30962
- webIdentityToken: import_config32.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync29(webIdentityTokenFile, { encoding: "ascii" }),
30962
+ webIdentityToken: import_config33.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync29(webIdentityTokenFile, { encoding: "ascii" }),
30963
30963
  roleArn,
30964
30964
  roleSessionName
30965
30965
  })(awsIdentityProperties);
30966
30966
  if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {
30967
- import_client19.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
30967
+ import_client20.setCredentialFeature(credentials, "CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN", "h");
30968
30968
  }
30969
30969
  return credentials;
30970
30970
  };
30971
30971
  var init_fromTokenFile = __esm(() => {
30972
- import_client19 = __toESM(require_client2(), 1);
30973
- import_config32 = __toESM(require_config(), 1);
30972
+ import_client20 = __toESM(require_client2(), 1);
30973
+ import_config33 = __toESM(require_config(), 1);
30974
30974
  });
30975
30975
 
30976
30976
  // node_modules/@aws-sdk/credential-provider-web-identity/dist-es/index.js
@@ -30984,7 +30984,7 @@ var init_dist_es8 = __esm(() => {
30984
30984
  });
30985
30985
 
30986
30986
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
30987
- var import_client20, isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
30987
+ var import_client21, isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1, resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
30988
30988
  const { fromTokenFile: fromTokenFile2 } = await Promise.resolve().then(() => (init_dist_es8(), exports_dist_es7));
30989
30989
  const credentials = await fromTokenFile2({
30990
30990
  webIdentityTokenFile: profile.web_identity_token_file,
@@ -30996,14 +30996,14 @@ var import_client20, isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg
30996
30996
  })({
30997
30997
  callerClientConfig
30998
30998
  });
30999
- return import_client20.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
30999
+ return import_client21.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
31000
31000
  };
31001
31001
  var init_resolveWebIdentityCredentials = __esm(() => {
31002
- import_client20 = __toESM(require_client2(), 1);
31002
+ import_client21 = __toESM(require_client2(), 1);
31003
31003
  });
31004
31004
 
31005
31005
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
31006
- var import_config33, resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
31006
+ var import_config34, resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
31007
31007
  const data = profiles[profileName];
31008
31008
  if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
31009
31009
  return resolveStaticCredentials(data, options);
@@ -31026,7 +31026,7 @@ var import_config33, resolveProfileData = async (profileName, profiles, options,
31026
31026
  if (isLoginProfile(data)) {
31027
31027
  return resolveLoginCredentials(profileName, options, callerClientConfig);
31028
31028
  }
31029
- throw new import_config33.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
31029
+ throw new import_config34.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
31030
31030
  };
31031
31031
  var init_resolveProfileData = __esm(() => {
31032
31032
  init_resolveAssumeRoleCredentials();
@@ -31035,20 +31035,20 @@ var init_resolveProfileData = __esm(() => {
31035
31035
  init_resolveSsoCredentials();
31036
31036
  init_resolveStaticCredentials();
31037
31037
  init_resolveWebIdentityCredentials();
31038
- import_config33 = __toESM(require_config(), 1);
31038
+ import_config34 = __toESM(require_config(), 1);
31039
31039
  });
31040
31040
 
31041
31041
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
31042
- var import_config34, fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
31042
+ var import_config35, fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
31043
31043
  init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
31044
- const profiles = await import_config34.parseKnownFiles(init);
31045
- return resolveProfileData(import_config34.getProfileName({
31044
+ const profiles = await import_config35.parseKnownFiles(init);
31045
+ return resolveProfileData(import_config35.getProfileName({
31046
31046
  profile: init.profile ?? callerClientConfig?.profile
31047
31047
  }), profiles, init, callerClientConfig);
31048
31048
  };
31049
31049
  var init_fromIni = __esm(() => {
31050
31050
  init_resolveProfileData();
31051
- import_config34 = __toESM(require_config(), 1);
31051
+ import_config35 = __toESM(require_config(), 1);
31052
31052
  });
31053
31053
 
31054
31054
  // node_modules/@aws-sdk/credential-provider-ini/dist-es/index.js
@@ -32371,7 +32371,7 @@ var init_event_sink = __esm(() => {
32371
32371
  init_dist();
32372
32372
  });
32373
32373
  // package.json
32374
- var version = "0.10.75";
32374
+ var version = "0.10.77";
32375
32375
  var package_default = {
32376
32376
  name: "@hasna/skills",
32377
32377
  version,
@@ -33526,6 +33526,9 @@ function selectsSkillsLocalMode(env = process.env) {
33526
33526
  return !hasSkillsEnvAuthorityIntent(env) && isSkillsLocalOptIn(env);
33527
33527
  }
33528
33528
 
33529
+ // src/lib/credential-profile-command.ts
33530
+ var urlKeys = clientTransportEnvKeys("skills").apiUrlKeys;
33531
+
33529
33532
  // src/lib/fleet-credentials.ts
33530
33533
  var SKILLS_APP = "skills";
33531
33534
  var ENV_KEYS = clientTransportEnvKeys(SKILLS_APP);
@@ -37622,7 +37625,7 @@ function applySessionReconciliation(snapshot, target, planned, record2, verified
37622
37625
  // src/lib/selected-run.ts
37623
37626
  import { createHash as createHash32 } from "crypto";
37624
37627
  import { spawn as spawn3 } from "child_process";
37625
- import { mkdirSync as mkdirSync12, mkdtempSync as mkdtempSync3, writeFileSync as writeFileSync10, realpathSync as realpathSync17 } from "fs";
37628
+ import { mkdirSync as mkdirSync13, mkdtempSync as mkdtempSync4, writeFileSync as writeFileSync10, realpathSync as realpathSync17 } from "fs";
37626
37629
  import { dirname as dirname29, join as join43, resolve as resolve30 } from "path";
37627
37630
  import { tmpdir, hostname as stationHostname2 } from "os";
37628
37631
 
@@ -38169,14 +38172,35 @@ class KernelLock {
38169
38172
  }
38170
38173
 
38171
38174
  // src/lib/codex-corpus-write.ts
38172
- import { execFileSync } from "child_process";
38175
+ import { AsyncLocalStorage } from "async_hooks";
38176
+ import { execFileSync, spawnSync as spawnSync5 } from "child_process";
38173
38177
  import { createHash as createHash6 } from "crypto";
38174
- import { accessSync, constants as constants7, lstatSync as lstatSync7, readFileSync as readFileSync10, realpathSync as realpathSync4, statSync as statSync4 } from "fs";
38178
+ import { accessSync, constants as constants7, lstatSync as lstatSync7, mkdirSync as mkdirSync4, mkdtempSync, readdirSync as readdirSync3, readFileSync as readFileSync10, realpathSync as realpathSync4, rmSync, statSync as statSync4 } from "fs";
38175
38179
  import { basename as basename2, delimiter, dirname as dirname5, isAbsolute as isAbsolute4, join as join11, relative as relative4, resolve as resolve4, sep as sep3 } from "path";
38176
38180
  var KEY = ".native-corpus-admission";
38177
- var fail = () => {
38178
- throw new Error("CODEX_CORPUS_ADMISSION_REQUIRED: verified native admission and its existing shared lock are required");
38181
+ var fail = (reason) => {
38182
+ throw new Error(`CODEX_CORPUS_ADMISSION_REQUIRED: verified native admission and its existing shared lock are required${reason ? ` (${reason})` : ""}`);
38179
38183
  };
38184
+ function codexAdmissionRecord(options) {
38185
+ const record2 = options.onCodexAdmission;
38186
+ const invalid3 = () => {
38187
+ throw new Error("CODEX_CORPUS_ADMISSION_RECORD_INVALID: onCodexAdmission must be a synchronous function");
38188
+ };
38189
+ if (record2 !== undefined && typeof record2 !== "function")
38190
+ invalid3();
38191
+ return { policy: { fallback: typeof record2 === "function" }, deliver(admission) {
38192
+ if (!admission || typeof record2 !== "function")
38193
+ return;
38194
+ const result = record2(admission);
38195
+ if (result !== null && (typeof result === "object" || typeof result === "function") && typeof result.then === "function") {
38196
+ Promise.resolve(result).catch(() => {});
38197
+ invalid3();
38198
+ }
38199
+ } };
38200
+ }
38201
+ function codexAdmissionReceipt(admission) {
38202
+ return admission?.nativeAdmission === "unavailable" && admission.probe ? { nativeAdmission: "unavailable", nativeAdmissionProbe: { ...admission.probe } } : {};
38203
+ }
38180
38204
  function physicalTarget(path) {
38181
38205
  const suffix = [];
38182
38206
  for (let cursor = path;; cursor = dirname5(cursor)) {
@@ -38258,13 +38282,246 @@ function executable(options) {
38258
38282
  const digest2 = hash2();
38259
38283
  if (options.codexSha256 && digest2 !== options.codexSha256)
38260
38284
  return fail();
38261
- return { path, assertCurrent() {
38285
+ return { path, sha256: digest2, size: Number(initial.size), assertCurrent() {
38262
38286
  const current = statSync4(path, { bigint: true });
38263
38287
  if (realpathSync4(found) !== path || ["dev", "ino", "size", "mtimeNs", "ctimeNs", "mode"].some((key) => initial[key] !== current[key]) || hash2() !== digest2)
38264
38288
  fail();
38265
38289
  } };
38266
38290
  }
38267
- function acquireCodexCorpusWrite(roots, options) {
38291
+ var PROBE = { timeout: 5000, maxBuffer: 4096, killSignal: "SIGKILL", encoding: "utf8" };
38292
+ var UNRECOGNIZED = /^error: unrecognized subcommand 'corpus-admission-inspect'(?:\r?\n|$)/;
38293
+ var VERSION = /^codex-cli (?:0|[1-9][0-9]{0,5})\.(?:0|[1-9][0-9]{0,5})\.(?:0|[1-9][0-9]{0,5})(?:-[0-9A-Za-z-]{1,32}(?:\.[0-9A-Za-z-]{1,32}){0,7})?$/;
38294
+ var LOCK_DIRECTORY = "codex-corpus-locks";
38295
+ var PROBE_PARENT = "codex-probe-homes";
38296
+ var retain = (hold) => {
38297
+ hold.refs++;
38298
+ return { hold, released: false };
38299
+ };
38300
+ var release = (ref) => {
38301
+ if (ref.released)
38302
+ return;
38303
+ ref.released = true;
38304
+ if (--ref.hold.refs === 0)
38305
+ ref.hold.lock.close();
38306
+ };
38307
+ var enclosing = new AsyncLocalStorage;
38308
+ var leaseHolds = new WeakMap;
38309
+ var contains = (base, path) => {
38310
+ const distance = relative4(base, path);
38311
+ return distance === "" || !distance.startsWith(`..${sep3}`) && distance !== ".." && !isAbsolute4(distance);
38312
+ };
38313
+ function nativeLockAbsent(root) {
38314
+ for (const name of [`${KEY}.flock-v1`, `${KEY}.lock`]) {
38315
+ try {
38316
+ lstatSync7(join11(root, name));
38317
+ return false;
38318
+ } catch (error) {
38319
+ if (error.code !== "ENOENT")
38320
+ throw error;
38321
+ }
38322
+ }
38323
+ return true;
38324
+ }
38325
+ function skillsState(root, leaf, roots) {
38326
+ const chain = [realpathSync4(dirname5(root))];
38327
+ for (const part of [".hasna", "skills", leaf])
38328
+ chain.push(join11(chain.at(-1), part));
38329
+ const path = chain.at(-1);
38330
+ const uid = process.getuid();
38331
+ const verify = () => {
38332
+ if (roots.some((item) => contains(item, path)) || codexCorpusRootForPath(path) !== undefined)
38333
+ fail();
38334
+ for (let ancestor = dirname5(chain[0]);; ancestor = dirname5(ancestor)) {
38335
+ const stat = lstatSync7(ancestor), sticky = stat.uid === 0 && (stat.mode & 512) !== 0;
38336
+ if (!stat.isDirectory() || stat.uid !== uid && stat.uid !== 0 || (stat.mode & 18) !== 0 && !sticky)
38337
+ fail();
38338
+ if (dirname5(ancestor) === ancestor)
38339
+ break;
38340
+ }
38341
+ for (const component of chain) {
38342
+ const stat = lstatSync7(component, { throwIfNoEntry: false });
38343
+ if (!stat)
38344
+ return;
38345
+ if (!stat.isDirectory() || stat.uid !== uid && stat.uid !== 0 || (stat.mode & 18) !== 0 || component === path && stat.uid !== uid)
38346
+ fail();
38347
+ }
38348
+ };
38349
+ verify();
38350
+ return { path, ensure() {
38351
+ verify();
38352
+ for (const component of chain.slice(1)) {
38353
+ try {
38354
+ mkdirSync4(component, { mode: 448 });
38355
+ } catch (error) {
38356
+ if (error.code !== "EEXIST")
38357
+ throw error;
38358
+ }
38359
+ }
38360
+ verify();
38361
+ if (realpathSync4(path) !== path)
38362
+ fail();
38363
+ return path;
38364
+ } };
38365
+ }
38366
+ function probeParent(roots) {
38367
+ const dataRoot = resolve4(getDataDirReadOnly()), path = join11(dataRoot, PROBE_PARENT), uid = process.getuid();
38368
+ const chain = [];
38369
+ for (let component = path;; component = dirname5(component)) {
38370
+ chain.unshift(component);
38371
+ if (dirname5(component) === component)
38372
+ break;
38373
+ }
38374
+ const verify = () => {
38375
+ if (roots.some((item) => contains(item, path)) || codexCorpusRootForPath(path) !== undefined)
38376
+ fail();
38377
+ for (const component of chain) {
38378
+ const stat = lstatSync7(component, { throwIfNoEntry: false });
38379
+ if (!stat)
38380
+ return;
38381
+ const skills = contains(dataRoot, component), sticky = !skills && stat.uid === 0 && (stat.mode & 512) !== 0;
38382
+ if (!stat.isDirectory() || stat.uid !== uid && (skills || stat.uid !== 0) || (stat.mode & 18) !== 0 && !sticky)
38383
+ fail();
38384
+ }
38385
+ };
38386
+ verify();
38387
+ for (const component of chain) {
38388
+ if (lstatSync7(component, { throwIfNoEntry: false }))
38389
+ continue;
38390
+ try {
38391
+ mkdirSync4(component, { mode: 448 });
38392
+ } catch (error) {
38393
+ if (error.code !== "EEXIST")
38394
+ throw error;
38395
+ }
38396
+ }
38397
+ verify();
38398
+ if (realpathSync4(path) !== path)
38399
+ fail();
38400
+ return path;
38401
+ }
38402
+ function probeHomeIntact(home, empty) {
38403
+ const stat = lstatSync7(home.path, { bigint: true, throwIfNoEntry: false });
38404
+ return !!stat && stat.isDirectory() && stat.dev === home.dev && stat.ino === home.ino && stat.uid === BigInt(process.getuid()) && (stat.mode & 0o777n) === 0o700n && realpathSync4(home.path) === home.path && (!empty || readdirSync3(home.path).length === 0);
38405
+ }
38406
+ function removeProbeHome(home) {
38407
+ try {
38408
+ const stat = lstatSync7(home.path, { bigint: true });
38409
+ if (stat.isDirectory() && stat.dev === home.dev && stat.ino === home.ino)
38410
+ rmSync(home.path, { recursive: true, force: true });
38411
+ } catch {}
38412
+ }
38413
+ function probe(path, args, parent, stdio) {
38414
+ const created = mkdtempSync(join11(parent, "probe-")), stat = lstatSync7(created, { bigint: true });
38415
+ const home = { path: created, dev: stat.dev, ino: stat.ino };
38416
+ try {
38417
+ if (!probeHomeIntact(home, true))
38418
+ return;
38419
+ const env = { CODEX_HOME: home.path };
38420
+ for (const key of ["PATH", "HOME"])
38421
+ if (process.env[key] !== undefined)
38422
+ env[key] = process.env[key];
38423
+ const result = spawnSync5(path, args, { ...PROBE, cwd: home.path, env, stdio: ["ignore", stdio, stdio] });
38424
+ return probeHomeIntact(home, false) ? result : undefined;
38425
+ } finally {
38426
+ removeProbeHome(home);
38427
+ }
38428
+ }
38429
+ function probeAdmissionCommand(path, parent) {
38430
+ const help = probe(path, ["help", "corpus-admission-inspect"], parent, "pipe");
38431
+ if (!help || help.error || help.signal !== null)
38432
+ return "inconclusive";
38433
+ if (help.status === 0)
38434
+ return "present";
38435
+ if (help.status !== 2 || help.stdout !== "" || typeof help.stderr !== "string" || !UNRECOGNIZED.test(help.stderr))
38436
+ return "inconclusive";
38437
+ const control = probe(path, ["help", "exec"], parent, "ignore");
38438
+ return control && !control.error && control.signal === null && control.status === 0 ? "absent" : "inconclusive";
38439
+ }
38440
+ function strictVersion(path, parent) {
38441
+ const result = probe(path, ["--version"], parent, "pipe");
38442
+ if (!result || result.error || result.signal !== null || result.status !== 0 || typeof result.stdout !== "string")
38443
+ return;
38444
+ const line = result.stdout.replace(/\r?\n$/, "");
38445
+ return VERSION.test(line) ? line : undefined;
38446
+ }
38447
+ function rootLockKey(root, id2) {
38448
+ return `codex-corpus-${createHash6("sha256").update(`${root}\x00${id2.device}\x00${id2.inode}`).digest("hex")}`;
38449
+ }
38450
+ function acquireFallback(inputs, options) {
38451
+ let reason = "executable-unverified";
38452
+ const refs = new Map, held = [];
38453
+ const close = () => {
38454
+ for (const ref of [...refs.values()].reverse())
38455
+ release(ref);
38456
+ };
38457
+ try {
38458
+ const native = executable(options);
38459
+ reason = "skills-lock-unavailable";
38460
+ const roots = inputs.map((item) => item.root);
38461
+ const locks = new Map(roots.map((root) => [root, skillsState(root, LOCK_DIRECTORY, roots)]));
38462
+ const parent = probeParent(roots);
38463
+ reason = "probe-inconclusive";
38464
+ const state = probeAdmissionCommand(native.path, parent);
38465
+ if (state === "present")
38466
+ reason = "command-present";
38467
+ if (state !== "absent")
38468
+ fail();
38469
+ const version2 = strictVersion(native.path, parent);
38470
+ if (version2 === undefined)
38471
+ fail();
38472
+ reason = "executable-unverified";
38473
+ native.assertCurrent();
38474
+ reason = "skills-lock-unavailable";
38475
+ for (const { input, root } of inputs) {
38476
+ const id2 = identity(root), key = rootLockKey(root, id2);
38477
+ if (!refs.has(key)) {
38478
+ const owner = enclosing.getStore()?.get(key);
38479
+ if (owner && !owner.released)
38480
+ refs.set(key, retain(owner.hold));
38481
+ else {
38482
+ const lock = new KernelLock(locks.get(root).ensure(), key, { mode: "exclusive" });
38483
+ refs.set(key, retain({ lock, refs: 0 }));
38484
+ if (!lock.trySync(1000)) {
38485
+ reason = "writer-busy";
38486
+ fail();
38487
+ }
38488
+ }
38489
+ }
38490
+ held.push({ input, root, id: id2, ref: refs.get(key) });
38491
+ }
38492
+ const assertCurrent = () => {
38493
+ try {
38494
+ for (const item of held) {
38495
+ if (item.ref.released)
38496
+ fail();
38497
+ item.ref.hold.lock.assertUnchanged();
38498
+ if (realpathSync4(item.input) !== item.root || !sameIdentity(identity(item.root), item.id) || !nativeLockAbsent(item.root))
38499
+ fail();
38500
+ }
38501
+ native.assertCurrent();
38502
+ } catch {
38503
+ fail("lease-changed");
38504
+ }
38505
+ };
38506
+ reason = "lease-changed";
38507
+ assertCurrent();
38508
+ const lease = { assertCurrent, close, admission: { nativeAdmission: "unavailable", probe: {
38509
+ kind: "help-unrecognized-subcommand",
38510
+ executable: native.path,
38511
+ sha256: native.sha256,
38512
+ size: native.size,
38513
+ version: version2,
38514
+ probeExitCode: 2,
38515
+ controlExitCode: 0
38516
+ } } };
38517
+ leaseHolds.set(lease, refs);
38518
+ return lease;
38519
+ } catch {
38520
+ close();
38521
+ return fail(reason);
38522
+ }
38523
+ }
38524
+ function acquireCodexCorpusWrite(roots, options, policy = {}) {
38268
38525
  const held = [];
38269
38526
  const close = () => {
38270
38527
  for (const item of held.reverse())
@@ -38277,10 +38534,20 @@ function acquireCodexCorpusWrite(roots, options) {
38277
38534
  fail();
38278
38535
  }
38279
38536
  };
38537
+ let fallback = false, refusal;
38280
38538
  try {
38281
38539
  if (roots.some((root) => typeof root !== "string" || !isAbsolute4(root) || root.includes("\x00")))
38282
38540
  fail();
38283
38541
  const inputs = [...new Set(roots)].map((input) => ({ input, root: realpathSync4(input) })).sort((a, b) => a.root.localeCompare(b.root));
38542
+ const absent = inputs.filter(({ root }) => nativeLockAbsent(root));
38543
+ if (absent.length && absent.length !== inputs.length) {
38544
+ refusal = "native-lock-present";
38545
+ fail();
38546
+ }
38547
+ if (absent.length && policy.fallback !== false) {
38548
+ fallback = true;
38549
+ return acquireFallback(inputs, options);
38550
+ }
38284
38551
  for (const { input, root } of inputs) {
38285
38552
  const lock = new KernelLock(root, KEY, { mode: "shared", existingOnly: true });
38286
38553
  held.push({ input, root, lock });
@@ -38308,19 +38575,25 @@ function acquireCodexCorpusWrite(roots, options) {
38308
38575
  if (Object.keys(row).sort().join(",") !== "lock,root,schema,state" || row.schema !== "codex-corpus-admission-status/v1" || row.state !== "committed-v1" && row.state !== "committed-v2" || !sameIdentity(row.root, rootIdentity) || !sameIdentity(row.lock, lockIdentity))
38309
38576
  fail();
38310
38577
  }
38311
- return { assertCurrent, close };
38312
- } catch {
38578
+ return { assertCurrent, close, admission: { nativeAdmission: "verified" } };
38579
+ } catch (error) {
38580
+ if (fallback)
38581
+ throw error;
38313
38582
  close();
38314
- return fail();
38583
+ return fail(refusal);
38315
38584
  }
38316
38585
  }
38317
- function withCodexCorpusWrite(roots, run, options = {}) {
38586
+ function scoped(lease, run) {
38587
+ const holds = leaseHolds.get(lease);
38588
+ return holds?.size ? enclosing.run(new Map([...enclosing.getStore() ?? [], ...holds]), run) : run();
38589
+ }
38590
+ function withCodexCorpusWrite(roots, run, options = {}, policy = {}) {
38318
38591
  if (!roots.length)
38319
38592
  return run(() => {});
38320
- const lease = acquireCodexCorpusWrite(roots, options);
38593
+ const lease = acquireCodexCorpusWrite(roots, options, policy);
38321
38594
  try {
38322
38595
  lease.assertCurrent();
38323
- const result = run(lease.assertCurrent);
38596
+ const result = scoped(lease, () => run(lease.assertCurrent, lease.admission));
38324
38597
  lease.assertCurrent();
38325
38598
  return result;
38326
38599
  } finally {
@@ -38329,7 +38602,7 @@ function withCodexCorpusWrite(roots, run, options = {}) {
38329
38602
  }
38330
38603
 
38331
38604
  // src/lib/installer.ts
38332
- import { existsSync as existsSync14, readFileSync as readFileSync27, rmSync as rmSync4 } from "fs";
38605
+ import { existsSync as existsSync14, readFileSync as readFileSync27, rmSync as rmSync5 } from "fs";
38333
38606
  import { join as join41 } from "path";
38334
38607
  import { homedir as homedir6 } from "os";
38335
38608
 
@@ -38338,12 +38611,12 @@ import {
38338
38611
  cpSync as cpSync2,
38339
38612
  existsSync as existsSync11,
38340
38613
  lstatSync as lstatSync33,
38341
- mkdirSync as mkdirSync10,
38342
- mkdtempSync as mkdtempSync2,
38614
+ mkdirSync as mkdirSync11,
38615
+ mkdtempSync as mkdtempSync3,
38343
38616
  readFileSync as readFileSync24,
38344
- readdirSync as readdirSync13,
38617
+ readdirSync as readdirSync14,
38345
38618
  renameSync as renameSync6,
38346
- rmSync as rmSync3,
38619
+ rmSync as rmSync4,
38347
38620
  statSync as statSync13,
38348
38621
  writeFileSync as writeFileSync8
38349
38622
  } from "fs";
@@ -38812,7 +39085,7 @@ function isCodexLocalStdioMcpServer(name, server) {
38812
39085
 
38813
39086
  // src/lib/codex-plugin-skill-controls.ts
38814
39087
  import { basename as basename4, dirname as dirname7, join as join13, relative as relative5, resolve as resolve6, sep as sep4 } from "path";
38815
- import { lstatSync as lstatSync9, readdirSync as readdirSync3, readFileSync as readFileSync11, readlinkSync as readlinkSync2, realpathSync as realpathSync7 } from "fs";
39088
+ import { lstatSync as lstatSync9, readdirSync as readdirSync4, readFileSync as readFileSync11, readlinkSync as readlinkSync2, realpathSync as realpathSync7 } from "fs";
38816
39089
 
38817
39090
  // src/lib/codex-native-compatibility.ts
38818
39091
  var MEASURED_CODEX_CAPABILITIES = {
@@ -38954,6 +39227,7 @@ async function connectCodexHookRpc(options) {
38954
39227
  const rpc = {
38955
39228
  version: version2,
38956
39229
  processId: child.pid,
39230
+ admission: corpusLease.admission,
38957
39231
  request(method, params) {
38958
39232
  if (stopped)
38959
39233
  return Promise.reject(new Error(configInvalid ? CODEX_CONFIG_INVALID : "CODEX_HOOK_TRUST_NATIVE_RPC_CLOSED"));
@@ -39407,7 +39681,7 @@ function reviewedRetiredCodexRoot(cache, root, controls, rules, read, allowAbsen
39407
39681
  if (!enrolled.some((control) => control.namespace === parsed.namespace && control.manifestSha256 === parsed.manifestSha256 && !parsed.appSha256 && !parsed.mcpSha256))
39408
39682
  return false;
39409
39683
  let entries = 0;
39410
- const emptySkills = (directory, depth) => depth <= 64 && readdirSync3(directory).every((name) => {
39684
+ const emptySkills = (directory, depth) => depth <= 64 && readdirSync4(directory).every((name) => {
39411
39685
  if (++entries > 4096 || name === "SKILL.md")
39412
39686
  return false;
39413
39687
  const path = join13(directory, name), stat = lstatSync9(path);
@@ -39432,7 +39706,7 @@ function reviewedCodexPluginCapabilitiesUnchanged(cache, controls, read, rules)
39432
39706
  if (control.remotePluginId !== undefined && !remoteInstallationMatches(parent, control.remotePluginId, read))
39433
39707
  return false;
39434
39708
  }
39435
- const names = readdirSync3(parent);
39709
+ const names = readdirSync4(parent);
39436
39710
  entries += names.length;
39437
39711
  if (entries > 4096)
39438
39712
  return false;
@@ -39622,7 +39896,7 @@ enabled = false
39622
39896
 
39623
39897
  // src/lib/codex-native-skill-policy.ts
39624
39898
  import { createHash as createHash10, randomUUID as randomUUID2 } from "crypto";
39625
- import { closeSync as closeSync12, constants as constants9, fstatSync as fstatSync12, fsyncSync as fsyncSync2, lstatSync as lstatSync10, mkdirSync as mkdirSync4, openSync as openSync12, readFileSync as readFileSync12, readSync as readSync5, readlinkSync as readlinkSync3, realpathSync as realpathSync8, renameSync as renameSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync3 } from "fs";
39899
+ import { closeSync as closeSync12, constants as constants9, fstatSync as fstatSync12, fsyncSync as fsyncSync2, lstatSync as lstatSync10, mkdirSync as mkdirSync5, openSync as openSync12, readFileSync as readFileSync12, readSync as readSync5, readlinkSync as readlinkSync3, realpathSync as realpathSync8, renameSync as renameSync2, unlinkSync as unlinkSync3, writeFileSync as writeFileSync3 } from "fs";
39626
39900
  import { dirname as dirname8, isAbsolute as isAbsolute8, join as join14, resolve as resolve7 } from "path";
39627
39901
  import { isDeepStrictEqual as isDeepStrictEqual3 } from "util";
39628
39902
  var CODEX_NATIVE_POLICY_CAPABILITY = "host-path-allowlist-v1";
@@ -39891,7 +40165,7 @@ function writeExecutableCache(dataDir2, entries) {
39891
40165
  return;
39892
40166
  const existing = lstatSync10(directory, { throwIfNoEntry: false });
39893
40167
  if (!existing)
39894
- mkdirSync4(directory, { mode: 448 });
40168
+ mkdirSync5(directory, { mode: 448 });
39895
40169
  else if (existing.isSymbolicLink() || !existing.isDirectory())
39896
40170
  return;
39897
40171
  const holder = lstatSync10(directory, { throwIfNoEntry: false, bigint: true });
@@ -40186,7 +40460,7 @@ function recordCodexNativePolicyAcceptance(dataDir2, verification, accepted) {
40186
40460
  ...verification.attestation ? { attestation: { schema: verification.attestation.schema, peerProcessId: verification.attestation.peerProcessId } } : {}
40187
40461
  };
40188
40462
  try {
40189
- mkdirSync4(directory, { recursive: true, mode: 448 });
40463
+ mkdirSync5(directory, { recursive: true, mode: 448 });
40190
40464
  const stat = lstatSync10(directory);
40191
40465
  if (stat.isSymbolicLink() || !stat.isDirectory())
40192
40466
  throw new Error(`the receipt directory is not a real directory: ${directory}`);
@@ -41090,6 +41364,37 @@ function hashRawDiscoveryFile(path, budget2, changes) {
41090
41364
  }
41091
41365
  }
41092
41366
 
41367
+ // src/lib/codex-plugin-capability-paths.ts
41368
+ var CODEX_PLUGIN_MANIFEST_LOCATIONS = Object.freeze([
41369
+ "plugin.json",
41370
+ ".codex-plugin/plugin.json",
41371
+ ".claude-plugin/plugin.json",
41372
+ ".cursor-plugin/plugin.json"
41373
+ ]);
41374
+ var CODEX_PLUGIN_MANIFEST_DIRECTORIES = Object.freeze([".codex-plugin", ".claude-plugin", ".cursor-plugin"]);
41375
+ var CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES = Object.freeze([
41376
+ "plugin.json",
41377
+ ".codex-plugin",
41378
+ ".claude-plugin",
41379
+ ".cursor-plugin",
41380
+ "hooks",
41381
+ "hooks.json",
41382
+ ".mcp.json",
41383
+ ".app.json",
41384
+ "commands",
41385
+ "agents"
41386
+ ]);
41387
+ function foldCodexPluginEntryName(name) {
41388
+ return name.toUpperCase().toLowerCase();
41389
+ }
41390
+ function codexPluginRootCapabilityEntry(name) {
41391
+ const folded = foldCodexPluginEntryName(name);
41392
+ return CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.includes(folded) ? folded : null;
41393
+ }
41394
+ function isCodexSkillDocumentName(name) {
41395
+ return foldCodexPluginEntryName(name) === "skill.md";
41396
+ }
41397
+
41093
41398
  // src/lib/codex-hook-mcp-dependencies.ts
41094
41399
  var need5 = (value) => {
41095
41400
  if (!value)
@@ -41239,15 +41544,13 @@ function captureCodexHookMcpDependencies(configPath, reviewed, configText, chang
41239
41544
  }
41240
41545
  };
41241
41546
  const root = join17(cacheRoot, identity3, selectCodexPluginVersion(versions, selectionBudget));
41242
- const agent = read(join17(root, "plugin.json"));
41547
+ const [agentPluginManifest, ...legacyManifests] = CODEX_PLUGIN_MANIFEST_LOCATIONS;
41548
+ const agent = read(join17(root, agentPluginManifest));
41243
41549
  if (agent !== null) {
41244
41550
  const schema = JSON.parse(agent).$schema;
41245
41551
  need5(typeof schema !== "string" || !schema.startsWith("https://agent-plugins.org/schemas/"));
41246
41552
  }
41247
- const codex = read(join17(root, ".codex-plugin/plugin.json"));
41248
- const claude = read(join17(root, ".claude-plugin/plugin.json"));
41249
- const cursor = read(join17(root, ".cursor-plugin/plugin.json"));
41250
- const text2 = codex ?? claude ?? cursor;
41553
+ const text2 = legacyManifests.map((location) => read(join17(root, location))).find((value) => value !== null) ?? null;
41251
41554
  if (text2 === null)
41252
41555
  continue;
41253
41556
  const manifest = JSON.parse(text2);
@@ -41941,9 +42244,10 @@ function captureCodexSettingsV6(path, reviewedSources, budget2 = { remaining: 25
41941
42244
 
41942
42245
  // src/lib/codex-semantic-cache-witness.ts
41943
42246
  import { createHash as createHash18 } from "crypto";
41944
- import { constants as constants12, closeSync as closeSync15, fstatSync as fstatSync15, lstatSync as lstatSync14, openSync as openSync15, readSync as readSync8, readdirSync as readdirSync4, realpathSync as realpathSync9 } from "fs";
42247
+ import { constants as constants12, closeSync as closeSync15, fstatSync as fstatSync15, lstatSync as lstatSync14, openSync as openSync15, readSync as readSync8, readdirSync as readdirSync5, realpathSync as realpathSync9 } from "fs";
41945
42248
  import { basename as basename9, dirname as dirname14, isAbsolute as isAbsolute15, join as join18, relative as relative6, resolve as resolve14, sep as sep8 } from "path";
41946
42249
  var CODEX_SEMANTIC_CACHE_WITNESS_SCHEMA = "hasna.codex-semantic-cache-witness.v1";
42250
+ var SEMANTIC_BOUND_ROOT_ENTRIES = Object.freeze([".codex-plugin", ".app.json", ".mcp.json", "hooks"]);
41947
42251
  var identifier5 = (value) => typeof value === "string" && /^[A-Za-z0-9_-]{1,64}$/.test(value);
41948
42252
  var digest2 = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
41949
42253
  var refuse5 = () => {
@@ -42106,7 +42410,7 @@ function assertCanonicalDirectory(path) {
42106
42410
  function walkSafeTree(path, state, depth = 0, root = path) {
42107
42411
  if (depth > 64 || ++state.entries > 16384)
42108
42412
  refuse5();
42109
- const names = readdirSync4(path).sort();
42413
+ const names = readdirSync5(path).sort();
42110
42414
  const files = [];
42111
42415
  for (const name of names) {
42112
42416
  if (!name || name === "." || name === ".." || name.includes(sep8) || ++state.entries > 16384)
@@ -42252,7 +42556,7 @@ function appOnlyParentProjection(cacheRoot, parents2, read) {
42252
42556
  } catch {
42253
42557
  refuse5();
42254
42558
  }
42255
- const versions = readdirSync4(parent.pluginParent).filter((name) => name !== ".codex-remote-plugin-install.json");
42559
+ const versions = readdirSync5(parent.pluginParent).filter((name) => name !== ".codex-remote-plugin-install.json");
42256
42560
  if (!versions.length || versions.length > 4096)
42257
42561
  refuse5();
42258
42562
  const materializations = versions.map((version2) => {
@@ -42397,7 +42701,7 @@ function reviewedHookParentProjection(cacheRoot, parents2, read) {
42397
42701
  if (createHash18("sha256").update(marketplaceText).digest("hex") !== parent.marketplaceSha256 || !codexLocalMarketplaceMapsPlugin(marketplaceText, parts[0], parent.namespace))
42398
42702
  refuse5();
42399
42703
  }
42400
- const materializations = readdirSync4(parent.pluginParent).filter((name) => name !== ".codex-remote-plugin-install.json").map((version2) => {
42704
+ const materializations = readdirSync5(parent.pluginParent).filter((name) => name !== ".codex-remote-plugin-install.json").map((version2) => {
42401
42705
  if (!/^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/.test(version2))
42402
42706
  refuse5();
42403
42707
  const root = join18(parent.pluginParent, version2), stat = lstatSync14(root, { throwIfNoEntry: false });
@@ -42431,14 +42735,14 @@ function assertParents(cacheRoot, controls, appOnlyParents, hookParents, files,
42431
42735
  refuse5();
42432
42736
  actual.add(join18(cacheRoot, parts[0], parts[1]));
42433
42737
  }
42434
- const actualMarkets = readdirSync4(cacheRoot);
42738
+ const actualMarkets = readdirSync5(cacheRoot);
42435
42739
  if (actualMarkets.length !== expectedMarkets.size || actualMarkets.some((market) => !expectedMarkets.has(market)))
42436
42740
  refuse5();
42437
42741
  for (const market of actualMarkets) {
42438
42742
  const marketPath = join18(cacheRoot, market), marketStat = lstatSync14(marketPath);
42439
42743
  if (!identifier5(market) || !marketStat.isDirectory() || marketStat.isSymbolicLink())
42440
42744
  refuse5();
42441
- for (const plugin of readdirSync4(marketPath)) {
42745
+ for (const plugin of readdirSync5(marketPath)) {
42442
42746
  const parent = join18(marketPath, plugin), stat = lstatSync14(parent);
42443
42747
  if (!identifier5(plugin) || !stat.isDirectory() || stat.isSymbolicLink())
42444
42748
  refuse5();
@@ -42453,14 +42757,23 @@ function assertParents(cacheRoot, controls, appOnlyParents, hookParents, files,
42453
42757
  continue;
42454
42758
  const parent = join18(cacheRoot, parts[0], parts[1]);
42455
42759
  const root = join18(parent, parts[2]);
42456
- const base = parts[parts.length - 1];
42457
- if (parts.includes(".codex-plugin") && (parts.length < 4 || parts[3] !== ".codex-plugin" || (parts.length === 4 ? base !== ".codex-plugin" : parts.length !== 5 || base !== "plugin.json")))
42760
+ const base = parts[parts.length - 1], folded = foldCodexPluginEntryName(base);
42761
+ if (parts.length === 3 && (codexPluginRootCapabilityEntry(base) !== null || isCodexSkillDocumentName(base)))
42762
+ refuse5();
42763
+ const rootEntry = parts.length >= 4 ? codexPluginRootCapabilityEntry(parts[3]) : null;
42764
+ if (rootEntry !== null && rootEntry !== parts[3])
42765
+ refuse5();
42766
+ if (rootEntry !== null && !SEMANTIC_BOUND_ROOT_ENTRIES.includes(rootEntry))
42767
+ refuse5();
42768
+ if (isCodexSkillDocumentName(base) && base !== "SKILL.md")
42458
42769
  refuse5();
42459
- if ([".app.json", ".mcp.json"].includes(base) && (parts.length !== 4 || dirname14(member) !== root))
42770
+ if (parts.some((part) => CODEX_PLUGIN_MANIFEST_DIRECTORIES.includes(foldCodexPluginEntryName(part))) && (parts.length < 4 || parts[3] !== ".codex-plugin" || (parts.length === 4 ? base !== ".codex-plugin" : parts.length !== 5 || base !== "plugin.json")))
42460
42771
  refuse5();
42461
- if ([".app.json", ".mcp.json"].includes(base) && hookParents.some((reviewed) => reviewed.pluginParent === parent))
42772
+ if ([".app.json", ".mcp.json"].includes(folded) && (parts.length !== 4 || dirname14(member) !== root))
42462
42773
  refuse5();
42463
- if ((parts[3] === "hooks" || base === "hooks.json") && (![4, 5].includes(parts.length) || parts[3] !== "hooks" || (parts.length === 4 ? base !== "hooks" : base !== "hooks.json") || !hookParents.some((reviewed) => reviewed.pluginParent === join18(cacheRoot, parts[0], parts[1]))))
42774
+ if ([".app.json", ".mcp.json"].includes(folded) && hookParents.some((reviewed) => reviewed.pluginParent === parent))
42775
+ refuse5();
42776
+ if ((rootEntry === "hooks" || folded === "hooks.json") && (![4, 5].includes(parts.length) || parts[3] !== "hooks" || (parts.length === 4 ? base !== "hooks" : base !== "hooks.json") || !hookParents.some((reviewed) => reviewed.pluginParent === join18(cacheRoot, parts[0], parts[1]))))
42464
42777
  refuse5();
42465
42778
  }
42466
42779
  }
@@ -42490,7 +42803,7 @@ function assertSkillMaterializations(cacheRoot, controls, files, read) {
42490
42803
  const expectedNames = new Set(rows.map((row) => row.name));
42491
42804
  if (expectedNames.size !== rows.length)
42492
42805
  refuse5();
42493
- const entries = readdirSync4(parent);
42806
+ const entries = readdirSync5(parent);
42494
42807
  let roots = 0;
42495
42808
  for (const entry of entries) {
42496
42809
  if (entry === ".codex-remote-plugin-install.json")
@@ -42705,7 +43018,7 @@ var NATIVE_SKILL_ROOTS = [
42705
43018
  ];
42706
43019
 
42707
43020
  // src/lib/codex-vendor-refresh.ts
42708
- import { lstatSync as lstatSync15, readdirSync as readdirSync5, readFileSync as readFileSync13 } from "fs";
43021
+ import { lstatSync as lstatSync15, readdirSync as readdirSync6, readFileSync as readFileSync13 } from "fs";
42709
43022
  import { isAbsolute as isAbsolute16, join as join19, relative as relative7, resolve as resolve15, sep as sep9 } from "path";
42710
43023
  import { isDeepStrictEqual as isDeepStrictEqual7 } from "util";
42711
43024
  var CODEX_VENDOR_MARKETPLACES = Object.freeze(["openai-bundled", "openai-curated", "openai-curated-remote"]);
@@ -42727,20 +43040,20 @@ function codexVendorMarketplace(cache, path) {
42727
43040
  return null;
42728
43041
  return CODEX_VENDOR_MARKETPLACES.includes(parts[0]) ? parts[0] : null;
42729
43042
  }
42730
- var OTHER_PLUGIN_CONTROLS = Object.freeze(["plugin.json", ".claude-plugin", ".cursor-plugin", "hooks", "hooks.json", ".mcp.json", "commands", "agents"]);
43043
+ var OTHER_PLUGIN_CONTROLS = Object.freeze(CODEX_PLUGIN_ROOT_CAPABILITY_ENTRIES.filter((entry) => entry !== ".codex-plugin" && entry !== ".app.json"));
42731
43044
  var VENDOR_MANIFEST_KEYS = Object.freeze(["name", "version", "description", "author", "homepage", "repository", "license", "keywords", "interface", "skills", "apps"]);
42732
43045
  var DEFAULT_SKILLS_PATHS = Object.freeze(["./skills", "./skills/"]);
42733
43046
  var VENDOR_APP_DECLARATION = "./.app.json";
42734
43047
  var MAX_SUBTREE_ENTRIES = 20000;
42735
43048
  var MAX_SUBTREE_DEPTH = 32;
42736
43049
  var hiddenName = (name) => name.startsWith(".") || name === "node_modules";
42737
- var isSkillDocument = (name) => name.toLowerCase() === "skill.md";
43050
+ var isSkillDocument = isCodexSkillDocumentName;
42738
43051
  var present = (path) => lstatSync15(path, { throwIfNoEntry: false }) !== undefined;
42739
- var holdsOtherControl = (path) => readdirSync5(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(name.toLowerCase()));
43052
+ var holdsOtherControl = (path) => readdirSync6(path).some((name) => OTHER_PLUGIN_CONTROLS.includes(codexPluginRootCapabilityEntry(name) ?? ""));
42740
43053
  function pluginTreeVisible(path, hidden, insideSkill, depth, budget2) {
42741
43054
  if (depth > MAX_SUBTREE_DEPTH)
42742
43055
  return false;
42743
- const names = readdirSync5(path);
43056
+ const names = readdirSync6(path);
42744
43057
  const skill = names.some(isSkillDocument);
42745
43058
  if (skill && (hidden || insideSkill))
42746
43059
  return false;
@@ -42764,7 +43077,7 @@ function codexVendorPluginRootRefreshSafe(root, budget2 = { remaining: MAX_SUBTR
42764
43077
  return false;
42765
43078
  if (!directory(join19(root, ".codex-plugin")))
42766
43079
  return false;
42767
- const controls = readdirSync5(join19(root, ".codex-plugin"));
43080
+ const controls = readdirSync6(join19(root, ".codex-plugin"));
42768
43081
  if (controls.length !== 1 || controls[0] !== "plugin.json")
42769
43082
  return false;
42770
43083
  const manifest = join19(root, ".codex-plugin", "plugin.json"), stat = lstatSync15(manifest, { throwIfNoEntry: false });
@@ -42787,7 +43100,7 @@ function codexVendorPluginRootRefreshSafe(root, budget2 = { remaining: MAX_SUBTR
42787
43100
  }
42788
43101
  function vendorMembers(path, budget2) {
42789
43102
  const directories = [];
42790
- for (const name of readdirSync5(path)) {
43103
+ for (const name of readdirSync6(path)) {
42791
43104
  if (--budget2.remaining < 0)
42792
43105
  return null;
42793
43106
  const stat = lstatSync15(join19(path, name));
@@ -42980,7 +43293,7 @@ function codexPluginCacheSkillTree(path, depth) {
42980
43293
  // src/lib/agent-integration.ts
42981
43294
  import { createHash as createHash30, randomUUID as randomUUID4 } from "crypto";
42982
43295
  import { isDeepStrictEqual as isDeepStrictEqual10 } from "util";
42983
- import { existsSync as existsSync7, lstatSync as lstatSync30, statSync as statSync9, mkdirSync as mkdirSync7, readFileSync as readFileSync21, readdirSync as readdirSync10, opendirSync as opendirSync5, readlinkSync as readlinkSync7, realpathSync as realpathSync13, renameSync as renameSync4, rmdirSync as rmdirSync3, writeFileSync as writeFileSync5, unlinkSync as unlinkSync5, chmodSync, openSync as openSync23, closeSync as closeSync23, fsyncSync as fsyncSync7, fstatSync as fstatSync23, readSync as readSync15, constants as constants21, linkSync as linkSync3 } from "fs";
43296
+ import { existsSync as existsSync7, lstatSync as lstatSync30, statSync as statSync9, mkdirSync as mkdirSync8, readFileSync as readFileSync21, readdirSync as readdirSync11, opendirSync as opendirSync5, readlinkSync as readlinkSync7, realpathSync as realpathSync13, renameSync as renameSync4, rmdirSync as rmdirSync3, writeFileSync as writeFileSync5, unlinkSync as unlinkSync5, chmodSync, openSync as openSync23, closeSync as closeSync23, fsyncSync as fsyncSync7, fstatSync as fstatSync23, readSync as readSync15, constants as constants21, linkSync as linkSync3 } from "fs";
42984
43297
  import { basename as basename13, dirname as dirname24, join as join33, resolve as resolve27, relative as relative9, isAbsolute as isAbsolute29, sep as sep14 } from "path";
42985
43298
  import { homedir as homedir3 } from "os";
42986
43299
 
@@ -43066,7 +43379,7 @@ function requiresCliSkillLoading(dataDir2 = getDataDirReadOnly()) {
43066
43379
 
43067
43380
  // src/lib/agent-bridge.ts
43068
43381
  import { createHash as createHash19 } from "crypto";
43069
- import { lstatSync as lstatSync18, readFileSync as readFileSync15, readdirSync as readdirSync6 } from "fs";
43382
+ import { lstatSync as lstatSync18, readFileSync as readFileSync15, readdirSync as readdirSync7 } from "fs";
43070
43383
  import { join as join22 } from "path";
43071
43384
  var CLI_BRIDGE_NAME = "skills-cli";
43072
43385
  var CLI_BRIDGE_VERSION = 1;
@@ -43096,7 +43409,7 @@ function isOwnedCliBridge(path, expectedPaths) {
43096
43409
  try {
43097
43410
  if (!lstatSync18(path).isDirectory())
43098
43411
  return false;
43099
- if (JSON.stringify(readdirSync6(path).sort()) !== JSON.stringify(Object.keys(CLI_BRIDGE_FILES).sort()))
43412
+ if (JSON.stringify(readdirSync7(path).sort()) !== JSON.stringify(Object.keys(CLI_BRIDGE_FILES).sort()))
43100
43413
  return false;
43101
43414
  return Object.entries(CLI_BRIDGE_FILES).every(([name, content]) => {
43102
43415
  const file = join22(path, name), stat = lstatSync18(file);
@@ -43109,7 +43422,7 @@ function isOwnedCliBridge(path, expectedPaths) {
43109
43422
 
43110
43423
  // src/lib/agent-discovery.ts
43111
43424
  import { createHash as createHash28 } from "crypto";
43112
- import { lstatSync as lstatSync28, readFileSync as readFileSync19, readdirSync as readdirSync9, realpathSync as realpathSync11 } from "fs";
43425
+ import { lstatSync as lstatSync28, readFileSync as readFileSync19, readdirSync as readdirSync10, realpathSync as realpathSync11 } from "fs";
43113
43426
  import { basename as basename12, dirname as dirname23, isAbsolute as isAbsolute27, join as join32, relative as relative8, resolve as resolve26, sep as sep13 } from "path";
43114
43427
  import { isDeepStrictEqual as isDeepStrictEqual8 } from "util";
43115
43428
 
@@ -43368,7 +43681,7 @@ if (failed) process.exitCode = 2;
43368
43681
 
43369
43682
  // src/lib/plugin-projection-store.ts
43370
43683
  import { createHash as createHash21, randomUUID as randomUUID3 } from "crypto";
43371
- import { constants as constants14, closeSync as closeSync17, fchmodSync, fstatSync as fstatSync17, fsyncSync as fsyncSync3, linkSync as linkSync2, lstatSync as lstatSync20, mkdirSync as mkdirSync5, openSync as openSync17, opendirSync as opendirSync3, readSync as readSync10, renameSync as renameSync3, rmdirSync as rmdirSync2, rmSync, unlinkSync as unlinkSync4, writeSync as writeSync2 } from "fs";
43684
+ import { constants as constants14, closeSync as closeSync17, fchmodSync, fstatSync as fstatSync17, fsyncSync as fsyncSync3, linkSync as linkSync2, lstatSync as lstatSync20, mkdirSync as mkdirSync6, openSync as openSync17, opendirSync as opendirSync3, readSync as readSync10, renameSync as renameSync3, rmdirSync as rmdirSync2, rmSync as rmSync2, unlinkSync as unlinkSync4, writeSync as writeSync2 } from "fs";
43372
43685
  import { dirname as dirname17, isAbsolute as isAbsolute18, join as join24, parse as parse5, resolve as resolve18 } from "path";
43373
43686
 
43374
43687
  // src/lib/plugin-projection.ts
@@ -43604,7 +43917,7 @@ function ancestors(path, create = false) {
43604
43917
  let currentStat = stat(current);
43605
43918
  if (!currentStat && create) {
43606
43919
  try {
43607
- mkdirSync5(current, { mode: 448 });
43920
+ mkdirSync6(current, { mode: 448 });
43608
43921
  } catch (error) {
43609
43922
  if (!(error && typeof error === "object" && ("code" in error) && error.code === "EEXIST"))
43610
43923
  pluginRefusal("Cannot create private plugin storage directory");
@@ -43817,7 +44130,7 @@ function materializePluginTree(root, entries) {
43817
44130
  let locked, staged;
43818
44131
  try {
43819
44132
  try {
43820
- mkdirSync5(lock, { mode: 448 });
44133
+ mkdirSync6(lock, { mode: 448 });
43821
44134
  locked = stat(lock);
43822
44135
  } catch {
43823
44136
  pluginRefusal("Plugin projection publication is already locked");
@@ -43827,7 +44140,7 @@ function materializePluginTree(root, entries) {
43827
44140
  verifyPluginTree(root, witnesses);
43828
44141
  return;
43829
44142
  }
43830
- mkdirSync5(staging, { mode: 448 });
44143
+ mkdirSync6(staging, { mode: 448 });
43831
44144
  staged = stat(staging);
43832
44145
  for (const entry of entries) {
43833
44146
  const path = join24(staging, entry.path);
@@ -43846,7 +44159,7 @@ function materializePluginTree(root, entries) {
43846
44159
  } finally {
43847
44160
  if (staged) {
43848
44161
  same4(staged, stat(staging), true);
43849
- rmSync(staging, { recursive: true });
44162
+ rmSync2(staging, { recursive: true });
43850
44163
  }
43851
44164
  if (locked) {
43852
44165
  same4(locked, stat(lock), true);
@@ -44191,11 +44504,11 @@ import { homedir as homedir2 } from "os";
44191
44504
  import { isAbsolute as isAbsolute21, join as join28, resolve as resolve20 } from "path";
44192
44505
 
44193
44506
  // src/lib/skill-validation.ts
44194
- import { existsSync as existsSync5, lstatSync as lstatSync22, readFileSync as readFileSync18, readdirSync as readdirSync8, statSync as statSync7 } from "fs";
44507
+ import { existsSync as existsSync5, lstatSync as lstatSync22, readFileSync as readFileSync18, readdirSync as readdirSync9, statSync as statSync7 } from "fs";
44195
44508
  import { isAbsolute as isAbsolute20, join as join27, normalize as normalize3 } from "path";
44196
44509
 
44197
44510
  // src/lib/hosted-skill-set.ts
44198
- import { existsSync as existsSync4, readFileSync as readFileSync17, readdirSync as readdirSync7, statSync as statSync6 } from "fs";
44511
+ import { existsSync as existsSync4, readFileSync as readFileSync17, readdirSync as readdirSync8, statSync as statSync6 } from "fs";
44199
44512
  import { join as join26 } from "path";
44200
44513
  var HOSTED_RUNTIMES = new Set(["hosted"]);
44201
44514
  var HOSTED_SOURCES = new Set(["remote", "private-hosted"]);
@@ -44424,7 +44737,7 @@ function validateSkillDirectory(name, skillPath, registryMeta) {
44424
44737
  if (!VALID_BIN_COMMAND.test(bareName)) {
44425
44738
  add(issues, "skill.name_invalid", `Skill name '${bareName}' must use lowercase letters, numbers, dots, underscores, or hyphens`);
44426
44739
  }
44427
- for (const entry of readdirSync8(skillPath).sort()) {
44740
+ for (const entry of readdirSync9(skillPath).sort()) {
44428
44741
  const entryPath = join27(skillPath, entry);
44429
44742
  if (RESERVED_SKILL_ENTRIES.has(entry)) {
44430
44743
  add(issues, "skill.reserved_file", `Reserved file '${entry}' is not allowed in skill packages`);
@@ -44610,7 +44923,7 @@ function validateRegistryConsistency(registry, skillsDir) {
44610
44923
  seen.add(name);
44611
44924
  return false;
44612
44925
  })));
44613
- const skillDirs = existsSync5(skillsDir) ? readdirSync8(skillsDir).filter((entry) => {
44926
+ const skillDirs = existsSync5(skillsDir) ? readdirSync9(skillsDir).filter((entry) => {
44614
44927
  const fullPath = join27(skillsDir, entry);
44615
44928
  return !entry.startsWith(".") && entry !== "_common" && statSync7(fullPath).isDirectory();
44616
44929
  }) : [];
@@ -45442,7 +45755,7 @@ function verifiesCodexHookDiscoverySource(binding, source, currentDigest, witnes
45442
45755
  }
45443
45756
 
45444
45757
  // src/lib/agent-sumi.ts
45445
- import { spawnSync as spawnSync5 } from "child_process";
45758
+ import { spawnSync as spawnSync6 } from "child_process";
45446
45759
  import { accessSync as accessSync2, constants as constants18, existsSync as existsSync6, lstatSync as lstatSync26, realpathSync as realpathSync10, statSync as statSync8 } from "fs";
45447
45760
  import { delimiter as delimiter2, isAbsolute as isAbsolute25, join as join30, resolve as resolve24 } from "path";
45448
45761
 
@@ -45600,7 +45913,7 @@ function sumiPathPlan(home, cwd = process.cwd(), env = process.env) {
45600
45913
  childEnv[key2] = env[key2];
45601
45914
  let child2;
45602
45915
  try {
45603
- child2 = spawnSync5(executable2, ["--json", "--home", resolve24(home), "--cwd", resolve24(cwd)], {
45916
+ child2 = spawnSync6(executable2, ["--json", "--home", resolve24(home), "--cwd", resolve24(cwd)], {
45604
45917
  cwd: resolve24(cwd),
45605
45918
  env: childEnv,
45606
45919
  encoding: "buffer",
@@ -45761,7 +46074,7 @@ var SUMI_SKILL_PERMISSIONS = [
45761
46074
 
45762
46075
  // src/lib/retained-review-artifacts.ts
45763
46076
  import { createHash as createHash27 } from "crypto";
45764
- import { constants as constants19, closeSync as closeSync21, fstatSync as fstatSync21, fsyncSync as fsyncSync5, lstatSync as lstatSync27, mkdirSync as mkdirSync6, openSync as openSync21, readSync as readSync14, writeSync as writeSync3 } from "fs";
46077
+ import { constants as constants19, closeSync as closeSync21, fstatSync as fstatSync21, fsyncSync as fsyncSync5, lstatSync as lstatSync27, mkdirSync as mkdirSync7, openSync as openSync21, readSync as readSync14, writeSync as writeSync3 } from "fs";
45765
46078
  import { dirname as dirname22, isAbsolute as isAbsolute26, join as join31, resolve as resolve25, sep as sep12 } from "path";
45766
46079
  var sha4 = (bytes) => createHash27("sha256").update(bytes).digest("hex");
45767
46080
  var hex = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
@@ -45891,7 +46204,7 @@ function writeReviewArtifactExclusive(change) {
45891
46204
  for (let parent = dirname22(change.path);!lstatSync27(parent, { throwIfNoEntry: false }); parent = dirname22(parent))
45892
46205
  missing2.push(parent);
45893
46206
  for (const parent of missing2.reverse())
45894
- mkdirSync6(parent, { mode: 448 });
46207
+ mkdirSync7(parent, { mode: 448 });
45895
46208
  safe5(change.path);
45896
46209
  privateStore(change.artifact.storeRoot);
45897
46210
  for (let parent = dirname22(change.path);parent !== change.artifact.storeRoot; parent = dirname22(parent)) {
@@ -46656,13 +46969,13 @@ function assertProjectDiscovery(agent, directories, home, canonical9 = resolve26
46656
46969
  for (const name of ["plugin", "plugins"]) {
46657
46970
  const path = canonical9(join32(directory2, ".sumi", name));
46658
46971
  safe6(path);
46659
- if (lstatSync28(path, { throwIfNoEntry: false })?.isDirectory() && readdirSync9(path).length)
46972
+ if (lstatSync28(path, { throwIfNoEntry: false })?.isDirectory() && readdirSync10(path).length)
46660
46973
  throw new Error(`NATIVE_SKILL_DRIFT: project Sumi plugins require a dedicated discovery review: ${path}`);
46661
46974
  }
46662
46975
  if (agent === "claude") {
46663
46976
  const commands = canonical9(join32(directory2, ".claude/commands"));
46664
46977
  safe6(commands);
46665
- if (lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync9(commands).length)
46978
+ if (lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync10(commands).length)
46666
46979
  throw new Error("NATIVE_SKILL_DRIFT: legacy project command discovery requires a dedicated format adapter");
46667
46980
  }
46668
46981
  }
@@ -46811,7 +47124,7 @@ function resolveAgentDiscovery(options) {
46811
47124
  for (const path of plugins) {
46812
47125
  safe6(path);
46813
47126
  if (lstatSync28(path, { throwIfNoEntry: false })?.isDirectory())
46814
- for (const name of readdirSync9(path).sort()) {
47127
+ for (const name of readdirSync10(path).sort()) {
46815
47128
  if (name === "skills-cli.js" && path === plugins[1])
46816
47129
  continue;
46817
47130
  const target = join32(path, name);
@@ -46822,7 +47135,7 @@ function resolveAgentDiscovery(options) {
46822
47135
  }
46823
47136
  for (const root2 of roots) {
46824
47137
  safe6(root2);
46825
- if (lstatSync28(root2, { throwIfNoEntry: false })?.isDirectory() && readdirSync9(root2).some((name) => name.endsWith(".md")))
47138
+ if (lstatSync28(root2, { throwIfNoEntry: false })?.isDirectory() && readdirSync10(root2).some((name) => name.endsWith(".md")))
46826
47139
  unresolved("flat markdown skills require a dedicated native migration adapter");
46827
47140
  }
46828
47141
  }
@@ -46866,7 +47179,7 @@ function resolveAgentDiscovery(options) {
46866
47179
  safe6(builtinRoot);
46867
47180
  if (!lstatSync28(builtinRoot, { throwIfNoEntry: false })?.isDirectory())
46868
47181
  unresolved("installed Gemini builtin root is missing");
46869
- for (const name of readdirSync9(builtinRoot).sort()) {
47182
+ for (const name of readdirSync10(builtinRoot).sort()) {
46870
47183
  const text2 = witness(join32(builtinRoot, name, "SKILL.md"));
46871
47184
  const match = text2?.match(/^---\r?\n[\s\S]*?^name:\s*([a-z0-9][a-z0-9-]*)\s*$/m);
46872
47185
  if (!match?.[1] || builtinNames.includes(match[1]))
@@ -46964,7 +47277,7 @@ function resolveAgentDiscovery(options) {
46964
47277
  unresolved("plugin hooks require a separate no-skill-injection review");
46965
47278
  const commands = join32(root2, "commands");
46966
47279
  safe6(commands);
46967
- if (agent === "claude" && (manifest.commands !== undefined || lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync9(commands).length))
47280
+ if (agent === "claude" && (manifest.commands !== undefined || lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync10(commands).length))
46968
47281
  unresolved("legacy command discovery requires retirement or a dedicated format adapter");
46969
47282
  const rootSkill = witness(join32(root2, "SKILL.md"));
46970
47283
  if (rootSkill !== null)
@@ -46986,7 +47299,7 @@ function resolveAgentDiscovery(options) {
46986
47299
  const installed = registrations === null ? {} : parseConfig(registrations, join32(home, ".claude/plugins/installed_plugins.json")).plugins;
46987
47300
  const commands = canonical9(join32(home, ".claude/commands"));
46988
47301
  safe6(commands);
46989
- if (lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync9(commands).length)
47302
+ if (lstatSync28(commands, { throwIfNoEntry: false })?.isDirectory() && readdirSync10(commands).length)
46990
47303
  unresolved("legacy home command discovery requires a dedicated format adapter");
46991
47304
  for (const [id2, enabled] of Object.entries(config.enabledPlugins ?? {})) {
46992
47305
  if (enabled === false)
@@ -47028,7 +47341,7 @@ function resolveAgentDiscovery(options) {
47028
47341
  }
47029
47342
  const localPlugins = join32(home, ".config/opencode/plugins");
47030
47343
  safe6(localPlugins);
47031
- if (lstatSync28(localPlugins, { throwIfNoEntry: false }) && readdirSync9(localPlugins).some((name) => name !== "skills-cli.js"))
47344
+ if (lstatSync28(localPlugins, { throwIfNoEntry: false }) && readdirSync10(localPlugins).some((name) => name !== "skills-cli.js"))
47032
47345
  unresolved("additional local plugin hooks require review");
47033
47346
  } else if (agent === "sumi") {
47034
47347
  if ((config.plugin?.length ?? 0) > 0 || (config.plugins?.length ?? 0) > 0 || sources.some((source) => source.path !== canonical9(configPath) && source.path !== canonical9(join32(sumiConfigDirectory(home), "sumi.jsonc")) && source.sha256 !== null))
@@ -47047,7 +47360,7 @@ function resolveAgentDiscovery(options) {
47047
47360
  const directory2 = join32(home, ".gemini/extensions");
47048
47361
  safe6(directory2);
47049
47362
  if (lstatSync28(directory2, { throwIfNoEntry: false }))
47050
- for (const name of readdirSync9(directory2)) {
47363
+ for (const name of readdirSync10(directory2)) {
47051
47364
  const root2 = join32(directory2, name);
47052
47365
  safe6(root2);
47053
47366
  if (!lstatSync28(root2)?.isDirectory())
@@ -47861,7 +48174,7 @@ function treeHash(root2) {
47861
48174
  const rel = relative9(root2, path);
47862
48175
  if (stat2.isDirectory()) {
47863
48176
  hash3.update(`d\x00${rel}\x00`);
47864
- for (const name of readdirSync10(path).sort())
48177
+ for (const name of readdirSync11(path).sort())
47865
48178
  visit2(join33(path, name));
47866
48179
  return;
47867
48180
  }
@@ -48756,7 +49069,7 @@ function planClaudeHookEventsUpdate(options) {
48756
49069
  }
48757
49070
  function atomicWrite2(path, content) {
48758
49071
  assertSafePath(path);
48759
- mkdirSync7(dirname24(path), { recursive: true, mode: 448 });
49072
+ mkdirSync8(dirname24(path), { recursive: true, mode: 448 });
48760
49073
  const temporary = `${path}.skills-${randomUUID4()}`;
48761
49074
  try {
48762
49075
  writeFileSync5(temporary, content, { mode: 384, flag: "wx" });
@@ -48924,7 +49237,7 @@ function planCodexSemanticCacheWitnessUpgrade(options) {
48924
49237
  throw new Error("Local marketplace hook parent is not enabled in the unchanged Codex settings");
48925
49238
  identity5 = { role: "reviewed-hook", pluginId: pluginId2, namespace: parts[1], pluginParent: parent, installation: "local-marketplace", marketplaceSourcePath: source.path, marketplaceSha256: source.sha256 };
48926
49239
  }
48927
- const versions = readdirSync10(parent).filter((name) => name !== ".codex-remote-plugin-install.json");
49240
+ const versions = readdirSync11(parent).filter((name) => name !== ".codex-remote-plugin-install.json");
48928
49241
  if (!versions.length || versions.length > 4096)
48929
49242
  throw new Error("Reviewed native-hook parent has no bounded materializations");
48930
49243
  for (const version2 of versions) {
@@ -49018,9 +49331,10 @@ function applyAgentIntegration(plan, options = {}) {
49018
49331
  const alias = plan.rootAliases?.find((item) => item.agent === "codex" && (change.path === item.target || change.path.startsWith(item.target + "/")));
49019
49332
  return lexical ? [lexical] : alias ? [alias.alias] : [];
49020
49333
  });
49021
- return withCodexCorpusWrite(roots, (assertCurrent) => applyAgentIntegrationUnlocked(plan, options, assertCurrent), options);
49334
+ return withCodexCorpusWrite(roots, (assertCurrent, admission) => applyAgentIntegrationUnlocked(plan, options, assertCurrent, admission), options);
49022
49335
  }
49023
- function applyAgentIntegrationUnlocked(plan, options = {}, assertCurrent) {
49336
+ function applyAgentIntegrationUnlocked(plan, options = {}, assertCurrent, admission) {
49337
+ const fallback = codexAdmissionReceipt(admission);
49024
49338
  for (const source of plan.reviewArtifactSources ?? [])
49025
49339
  verifyReviewArtifactOriginal(source.path, source.sha256);
49026
49340
  for (const source of plan.observedNativeSources ?? [])
@@ -49084,10 +49398,10 @@ function applyAgentIntegrationUnlocked(plan, options = {}, assertCurrent) {
49084
49398
  recheckRootAliases(aliases);
49085
49399
  for (const agent of plan.retainedReviewChecks?.agents ?? [])
49086
49400
  assertManagedAgentBridge(agent, { ...plan.retainedReviewChecks, dataDir: plan.dataDir });
49087
- return { changed: [], backups, ...aliases.length ? { rootAliases: aliases } : {} };
49401
+ return { changed: [], backups, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback };
49088
49402
  }
49089
49403
  assertSafePath(backupRoot);
49090
- mkdirSync7(backupRoot, { recursive: true, mode: 448 });
49404
+ mkdirSync8(backupRoot, { recursive: true, mode: 448 });
49091
49405
  chmodSync(backupRoot, 448);
49092
49406
  for (const [index, change] of plan.changes.entries())
49093
49407
  if (change.before !== null) {
@@ -49135,7 +49449,7 @@ function applyAgentIntegrationUnlocked(plan, options = {}, assertCurrent) {
49135
49449
  assertManagedAgentBridge(agent, { home: plan.managedAgentChecks.home, dataDir: plan.dataDir, projectDir: plan.managedAgentChecks.projectDir ?? plan.managedAgentChecks.home });
49136
49450
  for (const agent of plan.retainedReviewChecks?.agents ?? [])
49137
49451
  assertManagedAgentBridge(agent, { ...plan.retainedReviewChecks, dataDir: plan.dataDir });
49138
- atomicWrite2(join33(backupRoot, "receipt.json"), JSON.stringify({ version: 1, changes: written.map((change) => ({ path: change.path, beforeHash: change.before === null ? null : sha5(change.before), afterHash: sha5(change.after) })), backups, ...plan.cacheWitnessUpgrade ? { cacheWitnessUpgrade: plan.cacheWitnessUpgrade } : {}, ...plan.retainedReviewArtifacts?.length ? { retainedReviewArtifacts: plan.retainedReviewArtifacts.map((item) => ({ path: item.path, ...item.artifact })) } : {}, ...aliases.length ? { rootAliases: aliases } : {} }) + `
49452
+ atomicWrite2(join33(backupRoot, "receipt.json"), JSON.stringify({ version: 1, changes: written.map((change) => ({ path: change.path, beforeHash: change.before === null ? null : sha5(change.before), afterHash: sha5(change.after) })), backups, ...plan.cacheWitnessUpgrade ? { cacheWitnessUpgrade: plan.cacheWitnessUpgrade } : {}, ...plan.retainedReviewArtifacts?.length ? { retainedReviewArtifacts: plan.retainedReviewArtifacts.map((item) => ({ path: item.path, ...item.artifact })) } : {}, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback }) + `
49139
49453
  `);
49140
49454
  } catch (error) {
49141
49455
  assertCurrent();
@@ -49163,7 +49477,7 @@ function applyAgentIntegrationUnlocked(plan, options = {}, assertCurrent) {
49163
49477
  }
49164
49478
  throw error;
49165
49479
  }
49166
- return { changed: plan.changes.map((change) => change.path), backups, ...aliases.length ? { rootAliases: aliases } : {} };
49480
+ return { changed: plan.changes.map((change) => change.path), backups, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback };
49167
49481
  }
49168
49482
  function syncArchiveDirectory(path) {
49169
49483
  assertSafePath(path);
@@ -49203,9 +49517,10 @@ function archiveNativeSkills(inventory, options) {
49203
49517
  throw new Error("CODEX_CORPUS_ROOT_UNVERIFIED");
49204
49518
  return [...new Set([root2, owner2].filter((value) => value !== undefined))];
49205
49519
  });
49206
- return withCodexCorpusWrite(roots, (assertCurrent) => archiveNativeSkillsUnlocked(inventory, options, assertCurrent), options);
49520
+ return withCodexCorpusWrite(roots, (assertCurrent, admission) => archiveNativeSkillsUnlocked(inventory, options, assertCurrent, admission), options);
49207
49521
  }
49208
- function archiveNativeSkillsUnlocked(inventory, options, assertCurrent) {
49522
+ function archiveNativeSkillsUnlocked(inventory, options, assertCurrent, admission) {
49523
+ const fallback = codexAdmissionReceipt(admission);
49209
49524
  const aliases = [...new Map(inventory.filter((entry) => entry.rootAlias).map((entry) => [entry.rootAlias.alias, entry.rootAlias])).values()];
49210
49525
  if (aliases.length && !options.allowRootAliases)
49211
49526
  throw new Error("Native migration requires explicit allowRootAliases for agent root aliases");
@@ -49223,7 +49538,7 @@ function archiveNativeSkillsUnlocked(inventory, options, assertCurrent) {
49223
49538
  throw new Error(`Native skill changed after planning: ${entry.path}`);
49224
49539
  const targetManifest = options.targetManifest ? { schema: options.targetManifest.schema, digest: options.targetManifest.digest, targetCount: options.targetManifest.targets.length } : undefined;
49225
49540
  if (!selected.length)
49226
- return { entries: [], ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {} };
49541
+ return { entries: [], ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback };
49227
49542
  const operationId = randomUUID4(), archiveRoot = join33(options.dataDir ?? getDataDir(), "migration", operationId, "native"), receiptPath = join33(archiveRoot, "receipt.json");
49228
49543
  const entries = selected.map((entry, index) => ({
49229
49544
  source: entry.vendor ? join33(entry.path, "SKILL.md") : entry.path,
@@ -49232,7 +49547,7 @@ function archiveNativeSkillsUnlocked(inventory, options, assertCurrent) {
49232
49547
  ...entry.vendor ? { discoveryOnly: true } : {},
49233
49548
  status: "planned"
49234
49549
  }));
49235
- const journal = { version: 2, operationId, status: "planned", entries, ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {} };
49550
+ const journal = { version: 2, operationId, status: "planned", entries, ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback };
49236
49551
  const moved = [];
49237
49552
  const verifyArchive = (entry) => {
49238
49553
  assertSafePath(entry.archive);
@@ -49246,7 +49561,7 @@ function archiveNativeSkillsUnlocked(inventory, options, assertCurrent) {
49246
49561
  const created = [];
49247
49562
  for (let path = archiveRoot;!existsSync7(path); path = dirname24(path))
49248
49563
  created.push(path);
49249
- mkdirSync7(archiveRoot, { recursive: true, mode: 448 });
49564
+ mkdirSync8(archiveRoot, { recursive: true, mode: 448 });
49250
49565
  try {
49251
49566
  for (const directory2 of created)
49252
49567
  syncArchiveDirectory(directory2);
@@ -49329,7 +49644,7 @@ function archiveNativeSkillsUnlocked(inventory, options, assertCurrent) {
49329
49644
  } catch {}
49330
49645
  throw new Error(`Native archive failed; inspect the recovery journal at ${receiptPath} before retrying.`, { cause: error });
49331
49646
  }
49332
- return { entries: entries.map(({ status, conflict, ...entry }) => entry), receiptPath, ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {} };
49647
+ return { entries: entries.map(({ status, conflict, ...entry }) => entry), receiptPath, ...targetManifest ? { targetManifest } : {}, ...aliases.length ? { rootAliases: aliases } : {}, ...fallback };
49333
49648
  }
49334
49649
  function classifiedCodexPluginCacheCopy(entry, cache, read3, admit) {
49335
49650
  try {
@@ -49671,12 +49986,12 @@ function assertNativeExportAllowed(dataDir2 = getDataDirReadOnly()) {
49671
49986
  // src/lib/portable-skills.ts
49672
49987
  import {
49673
49988
  existsSync as existsSync10,
49674
- mkdirSync as mkdirSync9,
49675
- mkdtempSync,
49676
- readdirSync as readdirSync12,
49989
+ mkdirSync as mkdirSync10,
49990
+ mkdtempSync as mkdtempSync2,
49991
+ readdirSync as readdirSync13,
49677
49992
  realpathSync as realpathSync16,
49678
49993
  renameSync as renameSync5,
49679
- rmSync as rmSync2,
49994
+ rmSync as rmSync3,
49680
49995
  statSync as statSync12,
49681
49996
  writeFileSync as writeFileSync7
49682
49997
  } from "fs";
@@ -49687,7 +50002,7 @@ var SKILLS = [];
49687
50002
 
49688
50003
  // src/lib/skill-hash.ts
49689
50004
  import { createHash as createHash31 } from "crypto";
49690
- import { existsSync as existsSync8, readdirSync as readdirSync11, readFileSync as readFileSync22, statSync as statSync10 } from "fs";
50005
+ import { existsSync as existsSync8, readdirSync as readdirSync12, readFileSync as readFileSync22, statSync as statSync10 } from "fs";
49691
50006
  import { join as join34, sep as sep15 } from "path";
49692
50007
  var CONTENT_HASH_ALGORITHM = "sha256";
49693
50008
  var HASH_EXCLUDE_DIRS = new Set([".git", "node_modules", "dist", "build", ".turbo"]);
@@ -49761,7 +50076,7 @@ function collectBundleFiles(skillPath) {
49761
50076
  return files.sort((a, b) => a.rel < b.rel ? -1 : a.rel > b.rel ? 1 : 0);
49762
50077
  }
49763
50078
  function collectDirectory(files, dir, rel) {
49764
- for (const entry of readdirSync11(dir).sort()) {
50079
+ for (const entry of readdirSync12(dir).sort()) {
49765
50080
  if (entry.startsWith("."))
49766
50081
  continue;
49767
50082
  const absolute = join34(dir, entry);
@@ -50200,7 +50515,7 @@ import {
50200
50515
  cpSync,
50201
50516
  existsSync as existsSync9,
50202
50517
  lstatSync as lstatSync31,
50203
- mkdirSync as mkdirSync8,
50518
+ mkdirSync as mkdirSync9,
50204
50519
  readFileSync as readFileSync23,
50205
50520
  realpathSync as realpathSync14,
50206
50521
  writeFileSync as writeFileSync6
@@ -50321,7 +50636,7 @@ function createInstructionManifest(name, options) {
50321
50636
  };
50322
50637
  }
50323
50638
  function writeInstructionSkillTemplate(skillPath, manifest) {
50324
- mkdirSync8(skillPath, { recursive: true });
50639
+ mkdirSync9(skillPath, { recursive: true });
50325
50640
  writeFileSync6(join35(skillPath, "SKILL.md"), renderInstructionSkillMd(manifest));
50326
50641
  writeSkillJsonWithHash(skillPath, manifest);
50327
50642
  }
@@ -50372,7 +50687,7 @@ function createPortableManifest(name, options) {
50372
50687
  };
50373
50688
  }
50374
50689
  function writePortableSkillTemplate(skillPath, manifest) {
50375
- mkdirSync8(join35(skillPath, "src"), { recursive: true });
50690
+ mkdirSync9(join35(skillPath, "src"), { recursive: true });
50376
50691
  writeFileSync6(join35(skillPath, "SKILL.md"), renderSkillMd(manifest));
50377
50692
  writeFileSync6(join35(skillPath, "AGENTS.md"), renderAgentsMd(manifest));
50378
50693
  writeFileSync6(join35(skillPath, "package.json"), renderPackageJson(manifest));
@@ -50452,7 +50767,7 @@ function ensurePortableSkillFiles(skillPath, manifest) {
50452
50767
  };
50453
50768
  const entry = next.commands[0]?.entry ?? "src/index.ts";
50454
50769
  if (entry && !existsSync9(join35(skillPath, entry))) {
50455
- mkdirSync8(dirname25(join35(skillPath, entry)), { recursive: true });
50770
+ mkdirSync9(dirname25(join35(skillPath, entry)), { recursive: true });
50456
50771
  writeFileSync6(join35(skillPath, entry), renderEntrypoint(next));
50457
50772
  }
50458
50773
  if (!existsSync9(join35(skillPath, "SKILL.md")))
@@ -50558,7 +50873,7 @@ function renameInstructionFrontmatter(content, name) {
50558
50873
  }
50559
50874
  function copySkillDirectory(source, destination) {
50560
50875
  const resolvedSource = lstatSync31(source).isSymbolicLink() ? realpathSync14(source) : source;
50561
- mkdirSync8(destination, { recursive: true });
50876
+ mkdirSync9(destination, { recursive: true });
50562
50877
  cpSync(resolvedSource, destination, {
50563
50878
  recursive: true,
50564
50879
  filter: (src) => {
@@ -50879,7 +51194,7 @@ function physicalPath(path) {
50879
51194
  }
50880
51195
  return resolve28(realpathSync15(cursor), ...suffix);
50881
51196
  }
50882
- function contains(root2, path) {
51197
+ function contains2(root2, path) {
50883
51198
  return path === root2 || path.startsWith(root2 + sep16);
50884
51199
  }
50885
51200
  function configuredRoots(home, explicitHome) {
@@ -50932,14 +51247,14 @@ function assertPortableAuthoringPath(path, options = {}) {
50932
51247
  const defaults = NATIVE_DISCOVERY_ROOTS.map((parts) => join36(home, ...parts));
50933
51248
  defaults.push(join36(home, ".codex/plugins/cache"), join36(home, ".claude/plugins/cache"), join36(home, ".claude/plugins/synced"), join36(home, ".gemini/extensions"));
50934
51249
  for (const root2 of defaults) {
50935
- if (candidates.some((candidate2) => contains(resolve28(root2), candidate2) || contains(physicalPath(root2), candidate2)))
51250
+ if (candidates.some((candidate2) => contains2(resolve28(root2), candidate2) || contains2(physicalPath(root2), candidate2)))
50936
51251
  native ??= root2;
50937
51252
  }
50938
51253
  if (native) {
50939
51254
  throw new Error(`Refusing portable Skills authoring below native discovery root '${native}': ${lexical}. Set HASNA_SKILLS_DIR to a private authoring corpus outside native roots.`);
50940
51255
  }
50941
51256
  for (const root2 of configuredRoots(home, options.homeDir !== undefined)) {
50942
- if (candidates.some((candidate2) => contains(resolve28(root2), candidate2) || contains(physicalPath(root2), candidate2))) {
51257
+ if (candidates.some((candidate2) => contains2(resolve28(root2), candidate2) || contains2(physicalPath(root2), candidate2))) {
50943
51258
  throw new Error(`Refusing portable Skills authoring below configured native discovery root: ${lexical}`);
50944
51259
  }
50945
51260
  }
@@ -50982,7 +51297,7 @@ function listPortableSkills(options = {}) {
50982
51297
  if (!safeIsDirectory(root2))
50983
51298
  return [];
50984
51299
  const skills = [];
50985
- for (const entry of readdirSync12(root2).sort()) {
51300
+ for (const entry of readdirSync13(root2).sort()) {
50986
51301
  if (entry.startsWith("."))
50987
51302
  continue;
50988
51303
  const path = join37(root2, entry);
@@ -51026,7 +51341,7 @@ function scaffoldPortableSkill(name, options = {}) {
51026
51341
  if (existsSync10(skillPath)) {
51027
51342
  if (!options.overwrite)
51028
51343
  throw new Error(`Skill '${skillName}' already exists at ${skillPath}`);
51029
- rmSync2(skillPath, { recursive: true, force: true });
51344
+ rmSync3(skillPath, { recursive: true, force: true });
51030
51345
  }
51031
51346
  const kind = options.kind ?? "executable";
51032
51347
  const description = options.description ?? `${displayName(skillName)} skill`;
@@ -51053,7 +51368,7 @@ function portPortableSkillDirectory(sourceDir, options = {}) {
51053
51368
  };
51054
51369
  const imported = [];
51055
51370
  const skipped = [];
51056
- const entries = readdirSync12(absoluteSource, { withFileTypes: true }).map((entry) => entry.name).filter((entryName) => !entryName.startsWith(".")).sort();
51371
+ const entries = readdirSync13(absoluteSource, { withFileTypes: true }).map((entry) => entry.name).filter((entryName) => !entryName.startsWith(".")).sort();
51057
51372
  for (const entryName of entries) {
51058
51373
  const childPath = join37(absoluteSource, entryName);
51059
51374
  if (!safeIsDirectory(childPath))
@@ -51098,11 +51413,11 @@ function physicalImportPath(path) {
51098
51413
  function assertDisjointImportPaths(source, destination) {
51099
51414
  const sourcePath = realpathSync16(source);
51100
51415
  const destinationPath = physicalImportPath(destination);
51101
- const contains2 = (parent, child2) => {
51416
+ const contains3 = (parent, child2) => {
51102
51417
  const path = relative11(parent, child2);
51103
51418
  return path === "" || !isAbsolute30(path) && path !== ".." && !path.startsWith(`..${sep17}`);
51104
51419
  };
51105
- if (contains2(sourcePath, destinationPath) || contains2(destinationPath, sourcePath)) {
51420
+ if (contains3(sourcePath, destinationPath) || contains3(destinationPath, sourcePath)) {
51106
51421
  throw new Error("Source and destination skill directories must not overlap");
51107
51422
  }
51108
51423
  }
@@ -51129,9 +51444,9 @@ function portPortableSkill(sourcePath, options = {}) {
51129
51444
  if (existsSync10(destination)) {
51130
51445
  if (!options.overwrite)
51131
51446
  throw new Error(`Skill '${skillName}' already exists at ${destination}`);
51132
- rmSync2(destination, { recursive: true, force: true });
51447
+ rmSync3(destination, { recursive: true, force: true });
51133
51448
  }
51134
- mkdirSync9(dirname27(destination), { recursive: true });
51449
+ mkdirSync10(dirname27(destination), { recursive: true });
51135
51450
  copySkillDirectory(absoluteSource, destination);
51136
51451
  const base = {
51137
51452
  ...inferred,
@@ -51173,7 +51488,7 @@ function writeCorpusSkill(input, options = {}) {
51173
51488
  const skillPath = join37(root2, name);
51174
51489
  assertPortableAuthoringPath(skillPath, options);
51175
51490
  const created = !existsSync10(skillPath);
51176
- mkdirSync9(skillPath, { recursive: true });
51491
+ mkdirSync10(skillPath, { recursive: true });
51177
51492
  writeFileSync7(join37(skillPath, "SKILL.md"), input.skillMd);
51178
51493
  const manifest = buildCorpusManifest(input, name);
51179
51494
  writeSkillJsonWithHash(skillPath, manifest);
@@ -51187,8 +51502,8 @@ function installCorpusSkillAtomically(input, options = {}) {
51187
51502
  const target = join37(root2, name);
51188
51503
  assertPortableAuthoringPath(target, options);
51189
51504
  const created = !existsSync10(target);
51190
- mkdirSync9(root2, { recursive: true });
51191
- const staging = mkdtempSync(join37(root2, `.pull-${name}-`));
51505
+ mkdirSync10(root2, { recursive: true });
51506
+ const staging = mkdtempSync2(join37(root2, `.pull-${name}-`));
51192
51507
  let moved = false;
51193
51508
  let backup = null;
51194
51509
  try {
@@ -51196,16 +51511,16 @@ function installCorpusSkillAtomically(input, options = {}) {
51196
51511
  const manifest = buildCorpusManifest(input, name);
51197
51512
  writeSkillJsonWithHash(staging, manifest);
51198
51513
  if (existsSync10(target)) {
51199
- backup = mkdtempSync(join37(root2, `.pull-backup-${name}-`));
51514
+ backup = mkdtempSync2(join37(root2, `.pull-backup-${name}-`));
51200
51515
  renameSync5(target, join37(backup, name));
51201
51516
  moved = true;
51202
51517
  }
51203
51518
  renameSync5(staging, target);
51204
51519
  if (moved && backup)
51205
- rmSync2(backup, { recursive: true, force: true });
51520
+ rmSync3(backup, { recursive: true, force: true });
51206
51521
  return { name, path: target, manifest, created };
51207
51522
  } catch (error) {
51208
- rmSync2(staging, { recursive: true, force: true });
51523
+ rmSync3(staging, { recursive: true, force: true });
51209
51524
  if (moved && backup && existsSync10(join37(backup, name))) {
51210
51525
  try {
51211
51526
  renameSync5(join37(backup, name), target);
@@ -51502,7 +51817,7 @@ function packageSourceRoots(source) {
51502
51817
  function containsSkillDirectories(path) {
51503
51818
  let entries;
51504
51819
  try {
51505
- entries = readdirSync13(path);
51820
+ entries = readdirSync14(path);
51506
51821
  } catch {
51507
51822
  return false;
51508
51823
  }
@@ -51597,12 +51912,16 @@ function writeManagedAgentSkill(params) {
51597
51912
  agent: params.agent,
51598
51913
  path: result.path,
51599
51914
  action: result.action,
51600
- ...result.reason ? { reason: result.reason } : {}
51915
+ ...result.reason ? { reason: result.reason } : {},
51916
+ ...result.nativeAdmission ? { nativeAdmission: result.nativeAdmission, nativeAdmissionProbe: result.nativeAdmissionProbe } : {}
51601
51917
  };
51602
51918
  }
51603
51919
  function writeManagedSkillDir(dir, skillMd, options) {
51604
51920
  const root2 = options.dryRun ? undefined : codexCorpusRootForPath(dir);
51605
- return withCodexCorpusWrite(root2 ? [root2] : [], (assertCurrent) => writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent), options);
51921
+ return withCodexCorpusWrite(root2 ? [root2] : [], (assertCurrent, admission) => {
51922
+ const result = writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent);
51923
+ return { ...result, ...codexAdmissionReceipt(admission) };
51924
+ }, options);
51606
51925
  }
51607
51926
  function writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent) {
51608
51927
  const skillMdPath = join38(dir, "SKILL.md");
@@ -51643,8 +51962,8 @@ function writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent) {
51643
51962
  if (options.dryRun)
51644
51963
  return { action, path: skillMdPath };
51645
51964
  const parentDir = dirname28(dir);
51646
- mkdirSync10(parentDir, { recursive: true });
51647
- const transactionDir = mkdtempSync2(join38(parentDir, `.hasna-skills-write-${basename17(dir)}-`));
51965
+ mkdirSync11(parentDir, { recursive: true });
51966
+ const transactionDir = mkdtempSync3(join38(parentDir, `.hasna-skills-write-${basename17(dir)}-`));
51648
51967
  const candidateDir = join38(transactionDir, "candidate");
51649
51968
  const backupDir = join38(transactionDir, "backup");
51650
51969
  const candidateSkillMdPath = join38(candidateDir, "SKILL.md");
@@ -51662,7 +51981,7 @@ function writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent) {
51662
51981
  if (options.resourceDir) {
51663
51982
  cpSync2(options.resourceDir, candidateDir, { recursive: true, force: true });
51664
51983
  } else {
51665
- mkdirSync10(candidateDir, { recursive: true });
51984
+ mkdirSync11(candidateDir, { recursive: true });
51666
51985
  }
51667
51986
  writeFileSync8(candidateSkillMdPath, skillMd.endsWith(`
51668
51987
  `) ? skillMd : `${skillMd}
@@ -51686,7 +52005,7 @@ function writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent) {
51686
52005
  try {
51687
52006
  assertCurrent();
51688
52007
  if (existsSync11(dir))
51689
- rmSync3(dir, { recursive: true, force: true });
52008
+ rmSync4(dir, { recursive: true, force: true });
51690
52009
  renameDirectory(backupDir, dir);
51691
52010
  originalMoved = false;
51692
52011
  } catch (rollbackError) {
@@ -51699,22 +52018,26 @@ function writeManagedSkillDirUnlocked(dir, skillMd, options, assertCurrent) {
51699
52018
  if (!preserveTransaction) {
51700
52019
  try {
51701
52020
  assertCurrent();
51702
- rmSync3(transactionDir, { recursive: true, force: true });
52021
+ rmSync4(transactionDir, { recursive: true, force: true });
51703
52022
  } catch {}
51704
52023
  }
51705
52024
  }
51706
52025
  return { action, path: skillMdPath };
51707
52026
  }
51708
52027
  function removeManagedAgentSkill(skill, agent, homeDir3 = homedir5(), options = {}) {
52028
+ const record6 = codexAdmissionRecord(options);
51709
52029
  const dir = join38(agentGlobalSkillsDir(agent, homeDir3), skill);
51710
52030
  const root2 = codexCorpusRootForPath(dir);
51711
- return withCodexCorpusWrite(root2 ? [root2] : [], () => removeManagedAgentSkillUnlocked(skill, agent, homeDir3, options), options);
52031
+ return withCodexCorpusWrite(root2 ? [root2] : [], (_assertCurrent, admission) => {
52032
+ record6.deliver(admission);
52033
+ return removeManagedAgentSkillUnlocked(skill, agent, homeDir3, options);
52034
+ }, options, record6.policy);
51712
52035
  }
51713
52036
  function removeManagedAgentSkillUnlocked(skill, agent, homeDir3 = homedir5(), options = {}) {
51714
52037
  const dir = join38(agentGlobalSkillsDir(agent, homeDir3), skill);
51715
52038
  if (!hasSkillsOwnershipMarker(dir))
51716
52039
  return false;
51717
- rmSync3(dir, { recursive: true, force: true });
52040
+ rmSync4(dir, { recursive: true, force: true });
51718
52041
  return true;
51719
52042
  }
51720
52043
  function sourceSkillMd(skillPath, name, description, kind, preferBundledDocs = false) {
@@ -51751,7 +52074,7 @@ function normalizeSkillName(name) {
51751
52074
  }
51752
52075
 
51753
52076
  // src/lib/registry.ts
51754
- import { existsSync as existsSync12, readFileSync as readFileSync25, readdirSync as readdirSync14 } from "fs";
52077
+ import { existsSync as existsSync12, readFileSync as readFileSync25, readdirSync as readdirSync15 } from "fs";
51755
52078
  import { join as join39 } from "path";
51756
52079
 
51757
52080
  // src/lib/registry-merge.ts
@@ -51981,7 +52304,7 @@ function discoverSkillsInDir(dir, source = "custom") {
51981
52304
  return [];
51982
52305
  const result = [];
51983
52306
  try {
51984
- const entries = readdirSync14(dir, { withFileTypes: true });
52307
+ const entries = readdirSync15(dir, { withFileTypes: true });
51985
52308
  for (const entry of entries) {
51986
52309
  if (!entry.isDirectory())
51987
52310
  continue;
@@ -52017,7 +52340,7 @@ function findExtensionSkillPath(name) {
52017
52340
  if (!config.extensionsDir || !existsSync12(config.extensionsDir))
52018
52341
  return null;
52019
52342
  try {
52020
- const entries = readdirSync14(config.extensionsDir, { withFileTypes: true });
52343
+ const entries = readdirSync15(config.extensionsDir, { withFileTypes: true });
52021
52344
  for (const entry of entries) {
52022
52345
  if (!entry.isDirectory())
52023
52346
  continue;
@@ -52092,7 +52415,7 @@ function getAllTags(catalog) {
52092
52415
  }
52093
52416
 
52094
52417
  // src/lib/project-state.ts
52095
- import { existsSync as existsSync13, mkdirSync as mkdirSync11, readFileSync as readFileSync26, writeFileSync as writeFileSync9 } from "fs";
52418
+ import { existsSync as existsSync13, mkdirSync as mkdirSync12, readFileSync as readFileSync26, writeFileSync as writeFileSync9 } from "fs";
52096
52419
  import { join as join40 } from "path";
52097
52420
  var VALID_PIN_SOURCES = [
52098
52421
  "official",
@@ -52139,7 +52462,7 @@ function ensureProjectConfig(targetDir = process.cwd()) {
52139
52462
  }
52140
52463
  function saveProjectConfig(config, targetDir = process.cwd()) {
52141
52464
  const dir = getProjectStateDir(targetDir);
52142
- mkdirSync11(dir, { recursive: true });
52465
+ mkdirSync12(dir, { recursive: true });
52143
52466
  const normalized2 = normalizeProjectConfig({ ...config, updatedAt: new Date().toISOString() });
52144
52467
  writeFileSync9(getProjectConfigPath(targetDir), JSON.stringify(normalized2, null, 2) + `
52145
52468
  `);
@@ -52408,15 +52731,20 @@ function installSkillForAgent(name, options, generateSkillMd) {
52408
52731
  codexCommand: options.codexCommand,
52409
52732
  codexSha256: options.codexSha256
52410
52733
  });
52734
+ const fallback = result.nativeAdmission ? { nativeAdmission: result.nativeAdmission, nativeAdmissionProbe: result.nativeAdmissionProbe } : {};
52411
52735
  if (result.action === "skip") {
52412
- return { skill: canonicalName, success: false, error: result.reason ?? "skipped", path: result.path };
52736
+ return { skill: canonicalName, success: false, error: result.reason ?? "skipped", path: result.path, ...fallback };
52413
52737
  }
52414
- return { skill: canonicalName, success: true, path: result.path };
52738
+ return { skill: canonicalName, success: true, path: result.path, ...fallback };
52415
52739
  }
52416
52740
  function removeSkillForAgent(name, options) {
52741
+ const record6 = codexAdmissionRecord(options);
52417
52742
  const dir = getAgentSkillPath(name, options.agent, options.scope ?? "global", options.projectDir);
52418
52743
  const root2 = codexCorpusRootForPath(dir);
52419
- return withCodexCorpusWrite(root2 ? [root2] : [], () => removeSkillForAgentUnlocked(name, options), options);
52744
+ return withCodexCorpusWrite(root2 ? [root2] : [], (_assertCurrent, admission) => {
52745
+ record6.deliver(admission);
52746
+ return removeSkillForAgentUnlocked(name, options);
52747
+ }, options, record6.policy);
52420
52748
  }
52421
52749
  function removeSkillForAgentUnlocked(name, options) {
52422
52750
  const canonicalName = getCanonicalSkillName(name);
@@ -52424,7 +52752,7 @@ function removeSkillForAgentUnlocked(name, options) {
52424
52752
  const dir = getAgentSkillPath(canonicalName, options.agent, scope, options.projectDir);
52425
52753
  if (!hasSkillsOwnershipMarker(dir))
52426
52754
  return false;
52427
- rmSync4(dir, { recursive: true, force: true });
52755
+ rmSync5(dir, { recursive: true, force: true });
52428
52756
  return true;
52429
52757
  }
52430
52758
  function resolveAgentSkillMd(name, generateSkillMd) {
@@ -53108,7 +53436,7 @@ async function executeSelectedLocal(selected, options = {}) {
53108
53436
  throw new SkillSelectionError("INVALID_SECRET_BINDINGS", "Explicit environment values must be bounded strings without NUL bytes.");
53109
53437
  secretEnv[name] = value;
53110
53438
  }
53111
- const runDirectory = mkdtempSync3(join43(tmpdir(), "skills-execution-"));
53439
+ const runDirectory = mkdtempSync4(join43(tmpdir(), "skills-execution-"));
53112
53440
  const paths = new SkillEntryPaths;
53113
53441
  for (const entry of entries) {
53114
53442
  paths.add(entry.path, 100, () => {
@@ -53117,7 +53445,7 @@ async function executeSelectedLocal(selected, options = {}) {
53117
53445
  throw new SkillSelectionError("INVALID_BUNDLE_PATH", "The execution bundle path exceeds its limit.");
53118
53446
  });
53119
53447
  const destination = join43(runDirectory, entry.path);
53120
- mkdirSync12(dirname29(destination), { recursive: true, mode: 448 });
53448
+ mkdirSync13(dirname29(destination), { recursive: true, mode: 448 });
53121
53449
  writeFileSync10(destination, entry.bytes, { flag: "wx", mode: entry.mode & 511 });
53122
53450
  }
53123
53451
  env.SKILLS_INPUT_JSON = input;
@@ -53667,7 +53995,7 @@ var $getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin;
53667
53995
  var $resolveFlexibleChecksumsConfig = resolveFlexibleChecksumsConfig;
53668
53996
 
53669
53997
  // node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
53670
- var import_client26 = __toESM(require_client2(), 1);
53998
+ var import_client27 = __toESM(require_client2(), 1);
53671
53999
 
53672
54000
  // node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js
53673
54001
  var { NoOpLogger, getSmithyContext } = require_client();
@@ -54276,8 +54604,8 @@ var $resolveS3Config = resolveS3Config;
54276
54604
 
54277
54605
  // node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
54278
54606
  var import_core = __toESM(require_dist_cjs2(), 1);
54279
- var import_client27 = __toESM(require_client(), 1);
54280
- var import_config37 = __toESM(require_config(), 1);
54607
+ var import_client28 = __toESM(require_client(), 1);
54608
+ var import_config38 = __toESM(require_config(), 1);
54281
54609
  var import_endpoints5 = __toESM(require_endpoints(), 1);
54282
54610
  var import_event_streams2 = __toESM(require_event_streams(), 1);
54283
54611
  var import_protocols6 = __toESM(require_protocols(), 1);
@@ -54287,11 +54615,11 @@ var import_schema2 = __toESM(require_schema4(), 1);
54287
54615
  // node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js
54288
54616
  var import_httpAuthSchemes = __toESM(require_httpAuthSchemes(), 1);
54289
54617
  var import_signature_v4_multi_region = __toESM(require_dist_cjs4(), 1);
54290
- var import_client5 = __toESM(require_client(), 1);
54618
+ var import_client6 = __toESM(require_client(), 1);
54291
54619
  var import_endpoints3 = __toESM(require_endpoints(), 1);
54292
54620
 
54293
54621
  // node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js
54294
- var import_client4 = __toESM(require_client2(), 1);
54622
+ var import_client5 = __toESM(require_client2(), 1);
54295
54623
  var import_endpoints2 = __toESM(require_endpoints(), 1);
54296
54624
 
54297
54625
  // node_modules/@aws-sdk/client-s3/dist-es/endpoint/bdd.js
@@ -56264,7 +56592,7 @@ var defaultEndpointResolver = (endpointParams, context = {}) => {
56264
56592
  logger: context.logger
56265
56593
  }));
56266
56594
  };
56267
- import_endpoints2.customEndpointFunctions.aws = import_client4.awsEndpointFunctions;
56595
+ import_endpoints2.customEndpointFunctions.aws = import_client5.awsEndpointFunctions;
56268
56596
 
56269
56597
  // node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthSchemeProvider.js
56270
56598
  var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
@@ -56272,7 +56600,7 @@ var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSche
56272
56600
  throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
56273
56601
  }
56274
56602
  const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
56275
- const instructionsFn = import_client5.getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
56603
+ const instructionsFn = import_client6.getSmithyContext(context)?.commandInstance?.constructor?.getEndpointParameterInstructions;
56276
56604
  if (!instructionsFn) {
56277
56605
  throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
56278
56606
  }
@@ -56281,8 +56609,8 @@ var createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSche
56281
56609
  };
56282
56610
  var _defaultS3HttpAuthSchemeParametersProvider = async (config, context, input) => {
56283
56611
  return {
56284
- operation: import_client5.getSmithyContext(context).operation,
56285
- region: await import_client5.normalizeProvider(config.region)() || (() => {
56612
+ operation: import_client6.getSmithyContext(context).operation,
56613
+ region: await import_client6.normalizeProvider(config.region)() || (() => {
56286
56614
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
56287
56615
  })()
56288
56616
  };
@@ -56378,12 +56706,12 @@ var resolveHttpAuthSchemeConfig = (config) => {
56378
56706
  const config_0 = import_httpAuthSchemes.resolveAwsSdkSigV4Config(config);
56379
56707
  const config_1 = import_httpAuthSchemes.resolveAwsSdkSigV4AConfig(config_0);
56380
56708
  return Object.assign(config_1, {
56381
- authSchemePreference: import_client5.normalizeProvider(config.authSchemePreference ?? [])
56709
+ authSchemePreference: import_client6.normalizeProvider(config.authSchemePreference ?? [])
56382
56710
  });
56383
56711
  };
56384
56712
 
56385
56713
  // node_modules/@aws-sdk/client-s3/dist-es/commandBuilder.js
56386
- var import_client6 = __toESM(require_client(), 1);
56714
+ var import_client7 = __toESM(require_client(), 1);
56387
56715
  var import_endpoints4 = __toESM(require_endpoints(), 1);
56388
56716
 
56389
56717
  // node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js
@@ -56413,7 +56741,7 @@ var commonParams = {
56413
56741
  };
56414
56742
 
56415
56743
  // node_modules/@aws-sdk/client-s3/dist-es/commandBuilder.js
56416
- var command = import_client6.makeBuilder(commonParams, "AmazonS3", "S3Client", import_endpoints4.getEndpointPlugin);
56744
+ var command = import_client7.makeBuilder(commonParams, "AmazonS3", "S3Client", import_endpoints4.getEndpointPlugin);
56417
56745
  var _ep0 = {
56418
56746
  Bucket: { type: "contextParams", name: "Bucket" },
56419
56747
  Key: { type: "contextParams", name: "Key" }
@@ -56448,8 +56776,8 @@ var _mw11 = (Command, cs, config, o3) => [
56448
56776
  var import_schema = __toESM(require_schema4(), 1);
56449
56777
 
56450
56778
  // node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js
56451
- var import_client7 = __toESM(require_client(), 1);
56452
- class S3ServiceException extends import_client7.ServiceException {
56779
+ var import_client8 = __toESM(require_client(), 1);
56780
+ class S3ServiceException extends import_client8.ServiceException {
56453
56781
  constructor(options) {
56454
56782
  super(options);
56455
56783
  Object.setPrototypeOf(this, S3ServiceException.prototype);
@@ -62275,26 +62603,26 @@ var package_default2 = {
62275
62603
  };
62276
62604
 
62277
62605
  // node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
62278
- var import_client22 = __toESM(require_client2(), 1);
62606
+ var import_client23 = __toESM(require_client2(), 1);
62279
62607
  var import_httpAuthSchemes3 = __toESM(require_httpAuthSchemes(), 1);
62280
62608
 
62281
62609
  // node_modules/@aws-sdk/credential-provider-node/dist-es/defaultProvider.js
62282
62610
  init_dist_es();
62283
- var import_config35 = __toESM(require_config(), 1);
62611
+ var import_config36 = __toESM(require_config(), 1);
62284
62612
 
62285
62613
  // node_modules/@aws-sdk/credential-provider-node/dist-es/remoteProvider.js
62286
- var import_config18 = __toESM(require_config(), 1);
62614
+ var import_config19 = __toESM(require_config(), 1);
62287
62615
  var ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
62288
62616
  var remoteProvider = async (init) => {
62289
62617
  const { ENV_CMDS_FULL_URI: ENV_CMDS_FULL_URI2, ENV_CMDS_RELATIVE_URI: ENV_CMDS_RELATIVE_URI2, fromContainerMetadata: fromContainerMetadata2, fromInstanceMetadata: fromInstanceMetadata2 } = await Promise.resolve().then(() => (init_dist_es2(), exports_dist_es2));
62290
62618
  if (process.env[ENV_CMDS_RELATIVE_URI2] || process.env[ENV_CMDS_FULL_URI2]) {
62291
62619
  init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");
62292
62620
  const { fromHttp: fromHttp2 } = await Promise.resolve().then(() => (init_dist_es3(), exports_dist_es3));
62293
- return import_config18.chain(fromHttp2(init), fromContainerMetadata2(init));
62621
+ return import_config19.chain(fromHttp2(init), fromContainerMetadata2(init));
62294
62622
  }
62295
62623
  if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== "false") {
62296
62624
  return async () => {
62297
- throw new import_config18.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
62625
+ throw new import_config19.CredentialsProviderError("EC2 Instance Metadata Service access disabled", { logger: init.logger });
62298
62626
  };
62299
62627
  }
62300
62628
  init.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata");
@@ -62369,7 +62697,7 @@ var internalCreateChain = (providers) => async (awsIdentityProperties) => {
62369
62697
  var multipleCredentialSourceWarningEmitted = false;
62370
62698
  var defaultProvider = (init = {}) => memoizeChain([
62371
62699
  async () => {
62372
- const profile = init.profile ?? process.env[import_config35.ENV_PROFILE];
62700
+ const profile = init.profile ?? process.env[import_config36.ENV_PROFILE];
62373
62701
  if (profile) {
62374
62702
  const envStaticCredentialsAreSet = process.env[ENV_KEY] && process.env[ENV_SECRET];
62375
62703
  if (envStaticCredentialsAreSet) {
@@ -62387,7 +62715,7 @@ var defaultProvider = (init = {}) => memoizeChain([
62387
62715
  multipleCredentialSourceWarningEmitted = true;
62388
62716
  }
62389
62717
  }
62390
- throw new import_config35.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
62718
+ throw new import_config36.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.", {
62391
62719
  logger: init.logger,
62392
62720
  tryNextLink: true
62393
62721
  });
@@ -62399,7 +62727,7 @@ var defaultProvider = (init = {}) => memoizeChain([
62399
62727
  init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");
62400
62728
  const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;
62401
62729
  if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {
62402
- throw new import_config35.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
62730
+ throw new import_config36.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).", { logger: init.logger });
62403
62731
  }
62404
62732
  const { fromSSO: fromSSO2 } = await Promise.resolve().then(() => (init_dist_es5(), exports_dist_es4));
62405
62733
  return fromSSO2(init)(awsIdentityProperties);
@@ -62424,7 +62752,7 @@ var defaultProvider = (init = {}) => memoizeChain([
62424
62752
  return (await remoteProvider(init))();
62425
62753
  },
62426
62754
  async () => {
62427
- throw new import_config35.CredentialsProviderError("Could not load credentials from any providers", {
62755
+ throw new import_config36.CredentialsProviderError("Could not load credentials from any providers", {
62428
62756
  tryNextLink: false,
62429
62757
  logger: init.logger
62430
62758
  });
@@ -62433,8 +62761,8 @@ var defaultProvider = (init = {}) => memoizeChain([
62433
62761
  var credentialsTreatedAsExpired = (credentials) => credentials?.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000;
62434
62762
  // node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
62435
62763
  var import_checksum2 = __toESM(require_checksum(), 1);
62436
- var import_client23 = __toESM(require_client(), 1);
62437
- var import_config36 = __toESM(require_config(), 1);
62764
+ var import_client24 = __toESM(require_client(), 1);
62765
+ var import_config37 = __toESM(require_config(), 1);
62438
62766
  var import_event_streams = __toESM(require_event_streams(), 1);
62439
62767
  var import_retry3 = __toESM(require_retry(), 1);
62440
62768
  var import_serde4 = __toESM(require_serde(), 1);
@@ -62673,7 +63001,7 @@ var $Sha1 = Sha1Node;
62673
63001
  var import_httpAuthSchemes2 = __toESM(require_httpAuthSchemes(), 1);
62674
63002
  var import_signature_v4_multi_region2 = __toESM(require_dist_cjs4(), 1);
62675
63003
  var import_checksum = __toESM(require_checksum(), 1);
62676
- var import_client21 = __toESM(require_client(), 1);
63004
+ var import_client22 = __toESM(require_client(), 1);
62677
63005
  var import_protocols4 = __toESM(require_protocols(), 1);
62678
63006
  var import_serde3 = __toESM(require_serde(), 1);
62679
63007
  var getRuntimeConfig2 = (config) => {
@@ -62698,7 +63026,7 @@ var getRuntimeConfig2 = (config) => {
62698
63026
  signer: new import_httpAuthSchemes2.AwsSdkSigV4ASigner
62699
63027
  }
62700
63028
  ],
62701
- logger: config?.logger ?? new import_client21.NoOpLogger,
63029
+ logger: config?.logger ?? new import_client22.NoOpLogger,
62702
63030
  md5: config?.md5 ?? import_checksum.Md5,
62703
63031
  protocol: config?.protocol ?? $S3RestXmlProtocol,
62704
63032
  protocolSettings: config?.protocolSettings ?? {
@@ -62723,11 +63051,11 @@ var getRuntimeConfig2 = (config) => {
62723
63051
 
62724
63052
  // node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js
62725
63053
  var getRuntimeConfig3 = (config) => {
62726
- import_client23.emitWarningIfUnsupportedVersion(process.version);
62727
- const defaultsMode = import_config36.resolveDefaultsModeConfig(config);
62728
- const defaultConfigProvider = () => defaultsMode().then(import_client23.loadConfigsForDefaultMode);
63054
+ import_client24.emitWarningIfUnsupportedVersion(process.version);
63055
+ const defaultsMode = import_config37.resolveDefaultsModeConfig(config);
63056
+ const defaultConfigProvider = () => defaultsMode().then(import_client24.loadConfigsForDefaultMode);
62729
63057
  const clientSharedValues = getRuntimeConfig2(config);
62730
- import_client22.emitWarningIfUnsupportedVersion(process.version);
63058
+ import_client23.emitWarningIfUnsupportedVersion(process.version);
62731
63059
  const loaderConfig = {
62732
63060
  profile: config?.profile,
62733
63061
  logger: clientSharedValues.logger
@@ -62737,34 +63065,34 @@ var getRuntimeConfig3 = (config) => {
62737
63065
  ...config,
62738
63066
  runtime: "node",
62739
63067
  defaultsMode,
62740
- authSchemePreference: config?.authSchemePreference ?? import_config36.loadConfig(import_httpAuthSchemes3.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
63068
+ authSchemePreference: config?.authSchemePreference ?? import_config37.loadConfig(import_httpAuthSchemes3.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
62741
63069
  bodyLengthChecker: config?.bodyLengthChecker ?? import_serde4.calculateBodyLength,
62742
63070
  credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
62743
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? import_client22.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default2.version }),
62744
- disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? import_config36.loadConfig($NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig),
63071
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? import_client23.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default2.version }),
63072
+ disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? import_config37.loadConfig($NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS, loaderConfig),
62745
63073
  eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? import_event_streams.eventStreamSerdeProvider,
62746
- maxAttempts: config?.maxAttempts ?? import_config36.loadConfig(import_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
62747
- region: config?.region ?? import_config36.loadConfig(import_config36.NODE_REGION_CONFIG_OPTIONS, { ...import_config36.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
62748
- requestChecksumCalculation: config?.requestChecksumCalculation ?? import_config36.loadConfig($NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig),
63074
+ maxAttempts: config?.maxAttempts ?? import_config37.loadConfig(import_retry3.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
63075
+ region: config?.region ?? import_config37.loadConfig(import_config37.NODE_REGION_CONFIG_OPTIONS, { ...import_config37.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
63076
+ requestChecksumCalculation: config?.requestChecksumCalculation ?? import_config37.loadConfig($NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS, loaderConfig),
62749
63077
  requestHandler: import_node_http_handler2.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
62750
- responseChecksumValidation: config?.responseChecksumValidation ?? import_config36.loadConfig($NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig),
62751
- retryMode: config?.retryMode ?? import_config36.loadConfig({
63078
+ responseChecksumValidation: config?.responseChecksumValidation ?? import_config37.loadConfig($NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS, loaderConfig),
63079
+ retryMode: config?.retryMode ?? import_config37.loadConfig({
62752
63080
  ...import_retry3.NODE_RETRY_MODE_CONFIG_OPTIONS,
62753
63081
  default: async () => (await defaultConfigProvider()).retryMode || import_retry3.DEFAULT_RETRY_MODE
62754
63082
  }, config),
62755
- sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? import_config36.loadConfig(import_httpAuthSchemes3.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
63083
+ sigv4aSigningRegionSet: config?.sigv4aSigningRegionSet ?? import_config37.loadConfig(import_httpAuthSchemes3.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
62756
63084
  streamCollector: config?.streamCollector ?? import_node_http_handler2.streamCollector,
62757
63085
  streamHasher: config?.streamHasher ?? import_checksum2.readableStreamHasher,
62758
- useArnRegion: config?.useArnRegion ?? import_config36.loadConfig($NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
62759
- useDualstackEndpoint: config?.useDualstackEndpoint ?? import_config36.loadConfig(import_config36.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
62760
- useFipsEndpoint: config?.useFipsEndpoint ?? import_config36.loadConfig(import_config36.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
62761
- userAgentAppId: config?.userAgentAppId ?? import_config36.loadConfig(import_client22.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
63086
+ useArnRegion: config?.useArnRegion ?? import_config37.loadConfig($NODE_USE_ARN_REGION_CONFIG_OPTIONS, loaderConfig),
63087
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? import_config37.loadConfig(import_config37.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
63088
+ useFipsEndpoint: config?.useFipsEndpoint ?? import_config37.loadConfig(import_config37.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
63089
+ userAgentAppId: config?.userAgentAppId ?? import_config37.loadConfig(import_client23.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
62762
63090
  };
62763
63091
  };
62764
63092
 
62765
63093
  // node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js
62766
- var import_client24 = __toESM(require_client2(), 1);
62767
- var import_client25 = __toESM(require_client(), 1);
63094
+ var import_client25 = __toESM(require_client2(), 1);
63095
+ var import_client26 = __toESM(require_client(), 1);
62768
63096
  var import_protocols5 = __toESM(require_protocols(), 1);
62769
63097
 
62770
63098
  // node_modules/@aws-sdk/client-s3/dist-es/auth/httpAuthExtensionConfiguration.js
@@ -62808,24 +63136,24 @@ var resolveHttpAuthRuntimeConfig2 = (config) => {
62808
63136
 
62809
63137
  // node_modules/@aws-sdk/client-s3/dist-es/runtimeExtensions.js
62810
63138
  var resolveRuntimeExtensions2 = (runtimeConfig, extensions) => {
62811
- const extensionConfiguration = Object.assign(import_client24.getAwsRegionExtensionConfiguration(runtimeConfig), import_client25.getDefaultExtensionConfiguration(runtimeConfig), import_protocols5.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
63139
+ const extensionConfiguration = Object.assign(import_client25.getAwsRegionExtensionConfiguration(runtimeConfig), import_client26.getDefaultExtensionConfiguration(runtimeConfig), import_protocols5.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration2(runtimeConfig));
62812
63140
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
62813
- return Object.assign(runtimeConfig, import_client24.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client25.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols5.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration));
63141
+ return Object.assign(runtimeConfig, import_client25.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client26.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols5.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig2(extensionConfiguration));
62814
63142
  };
62815
63143
 
62816
63144
  // node_modules/@aws-sdk/client-s3/dist-es/S3Client.js
62817
- class S3Client extends import_client27.Client {
63145
+ class S3Client extends import_client28.Client {
62818
63146
  config;
62819
63147
  constructor(...[configuration]) {
62820
63148
  const _config_0 = getRuntimeConfig3(configuration || {});
62821
63149
  super(_config_0);
62822
63150
  this.initConfig = _config_0;
62823
63151
  const _config_1 = resolveClientEndpointParameters(_config_0);
62824
- const _config_2 = import_client26.resolveUserAgentConfig(_config_1);
63152
+ const _config_2 = import_client27.resolveUserAgentConfig(_config_1);
62825
63153
  const _config_3 = $resolveFlexibleChecksumsConfig(_config_2);
62826
63154
  const _config_4 = import_retry4.resolveRetryConfig(_config_3);
62827
- const _config_5 = import_config37.resolveRegionConfig(_config_4);
62828
- const _config_6 = import_client26.resolveHostHeaderConfig(_config_5);
63155
+ const _config_5 = import_config38.resolveRegionConfig(_config_4);
63156
+ const _config_6 = import_client27.resolveHostHeaderConfig(_config_5);
62829
63157
  const _config_7 = import_endpoints5.resolveEndpointConfig(_config_6);
62830
63158
  const _config_8 = import_event_streams2.resolveEventStreamSerdeConfig(_config_7);
62831
63159
  const _config_9 = resolveHttpAuthSchemeConfig(_config_8);
@@ -62833,12 +63161,12 @@ class S3Client extends import_client27.Client {
62833
63161
  const _config_11 = resolveRuntimeExtensions2(_config_10, configuration?.extensions || []);
62834
63162
  this.config = _config_11;
62835
63163
  this.middlewareStack.use(import_schema2.getSchemaSerdePlugin(this.config));
62836
- this.middlewareStack.use(import_client26.getUserAgentPlugin(this.config));
63164
+ this.middlewareStack.use(import_client27.getUserAgentPlugin(this.config));
62837
63165
  this.middlewareStack.use(import_retry4.getRetryPlugin(this.config));
62838
63166
  this.middlewareStack.use(import_protocols6.getContentLengthPlugin(this.config));
62839
- this.middlewareStack.use(import_client26.getHostHeaderPlugin(this.config));
62840
- this.middlewareStack.use(import_client26.getLoggerPlugin(this.config));
62841
- this.middlewareStack.use(import_client26.getRecursionDetectionPlugin(this.config));
63167
+ this.middlewareStack.use(import_client27.getHostHeaderPlugin(this.config));
63168
+ this.middlewareStack.use(import_client27.getLoggerPlugin(this.config));
63169
+ this.middlewareStack.use(import_client27.getRecursionDetectionPlugin(this.config));
62842
63170
  this.middlewareStack.use(import_core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
62843
63171
  httpAuthSchemeParametersProvider: defaultS3HttpAuthSchemeParametersProvider,
62844
63172
  identityProviderConfigProvider: async (config) => new import_core.DefaultIdentityProviderConfig({
@@ -63219,7 +63547,7 @@ function assertReservationCents(value, field3) {
63219
63547
  // src/sdk/governance-store.ts
63220
63548
  import { Database as Database2 } from "bun:sqlite";
63221
63549
  import { randomUUID as randomUUID9 } from "crypto";
63222
- import { mkdirSync as mkdirSync14 } from "fs";
63550
+ import { mkdirSync as mkdirSync15 } from "fs";
63223
63551
  import { dirname as dirname33 } from "path";
63224
63552
 
63225
63553
  // src/server/database-url.ts
@@ -63515,7 +63843,7 @@ class PostgresSkillSelectionStore {
63515
63843
 
63516
63844
  // src/server/sqlite-store.ts
63517
63845
  import { randomUUID as randomUUID8 } from "crypto";
63518
- import { mkdirSync as mkdirSync13, readFileSync as readFileSync30, readdirSync as readdirSync15 } from "fs";
63846
+ import { mkdirSync as mkdirSync14, readFileSync as readFileSync30, readdirSync as readdirSync16 } from "fs";
63519
63847
  import { dirname as dirname32, join as join47 } from "path";
63520
63848
 
63521
63849
  // src/server/auth.ts
@@ -63892,7 +64220,7 @@ class SqliteSkillsStore {
63892
64220
  constructor(path = SQLITE_MEMORY_PATH, options = {}) {
63893
64221
  const inMemory = path === SQLITE_MEMORY_PATH;
63894
64222
  if (!inMemory)
63895
- mkdirSync13(dirname32(path), { recursive: true });
64223
+ mkdirSync14(dirname32(path), { recursive: true });
63896
64224
  this.db = openDatabase(path);
63897
64225
  this.db.exec(`PRAGMA busy_timeout = ${Math.max(0, options.busyTimeoutMs ?? 5000)}`);
63898
64226
  if (!inMemory)
@@ -64564,7 +64892,7 @@ function applySqliteMigrations(db, migrationsDir = resolveMigrationsDir("sqlite"
64564
64892
  version text PRIMARY KEY,
64565
64893
  applied_at text NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
64566
64894
  )`);
64567
- const files = readdirSync15(migrationsDir).filter((name) => name.endsWith(".sql")).sort();
64895
+ const files = readdirSync16(migrationsDir).filter((name) => name.endsWith(".sql")).sort();
64568
64896
  if (files.length === 0) {
64569
64897
  throw new Error(`no .sql migrations found in ${migrationsDir}`);
64570
64898
  }
@@ -64718,7 +65046,7 @@ class SqliteGovernanceStore {
64718
65046
  closed = false;
64719
65047
  constructor(path = SQLITE_MEMORY_PATH, options = {}) {
64720
65048
  if (path !== SQLITE_MEMORY_PATH)
64721
- mkdirSync14(dirname33(path), { recursive: true });
65049
+ mkdirSync15(dirname33(path), { recursive: true });
64722
65050
  this.db = new Database2(path, { create: true, readwrite: true });
64723
65051
  this.db.exec("PRAGMA busy_timeout = 5000");
64724
65052
  this.db.exec("PRAGMA foreign_keys = ON");
@@ -65823,7 +66151,7 @@ async function handleProfileApi(store, principal, request2, parts, config) {
65823
66151
 
65824
66152
  // src/server/runtime-store.ts
65825
66153
  import { Database as Database3 } from "bun:sqlite";
65826
- import { mkdirSync as mkdirSync15 } from "fs";
66154
+ import { mkdirSync as mkdirSync16 } from "fs";
65827
66155
  import { dirname as dirname34 } from "path";
65828
66156
 
65829
66157
  // src/sdk/execution/types.ts
@@ -65880,7 +66208,7 @@ class RuntimeExecutionStore {
65880
66208
  }
65881
66209
  const path = target.kind === "sqlite" ? target.path : ":memory:";
65882
66210
  if (path !== ":memory:")
65883
- mkdirSync15(dirname34(path), { recursive: true });
66211
+ mkdirSync16(dirname34(path), { recursive: true });
65884
66212
  const db = new Database3(path);
65885
66213
  db.run("PRAGMA busy_timeout=5000");
65886
66214
  db.run("PRAGMA journal_mode=WAL");
@@ -66901,10 +67229,10 @@ function createReceiptService(store) {
66901
67229
  }
66902
67230
 
66903
67231
  // node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
66904
- var import_client36 = __toESM(require_client2(), 1);
67232
+ var import_client37 = __toESM(require_client2(), 1);
66905
67233
  var import_core2 = __toESM(require_dist_cjs2(), 1);
66906
- var import_client37 = __toESM(require_client(), 1);
66907
- var import_config40 = __toESM(require_config(), 1);
67234
+ var import_client38 = __toESM(require_client(), 1);
67235
+ var import_config41 = __toESM(require_config(), 1);
66908
67236
  var import_endpoints8 = __toESM(require_endpoints(), 1);
66909
67237
  var import_protocols10 = __toESM(require_protocols(), 1);
66910
67238
  var import_retry6 = __toESM(require_retry(), 1);
@@ -66912,11 +67240,11 @@ var import_schema4 = __toESM(require_schema4(), 1);
66912
67240
 
66913
67241
  // node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthSchemeProvider.js
66914
67242
  var import_httpAuthSchemes4 = __toESM(require_httpAuthSchemes(), 1);
66915
- var import_client28 = __toESM(require_client(), 1);
67243
+ var import_client29 = __toESM(require_client(), 1);
66916
67244
  var defaultECSHttpAuthSchemeParametersProvider = async (config, context, input) => {
66917
67245
  return {
66918
- operation: import_client28.getSmithyContext(context).operation,
66919
- region: await import_client28.normalizeProvider(config.region)() || (() => {
67246
+ operation: import_client29.getSmithyContext(context).operation,
67247
+ region: await import_client29.normalizeProvider(config.region)() || (() => {
66920
67248
  throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
66921
67249
  })()
66922
67250
  };
@@ -66948,7 +67276,7 @@ var defaultECSHttpAuthSchemeProvider = (authParameters) => {
66948
67276
  var resolveHttpAuthSchemeConfig3 = (config) => {
66949
67277
  const config_0 = import_httpAuthSchemes4.resolveAwsSdkSigV4Config(config);
66950
67278
  return Object.assign(config_0, {
66951
- authSchemePreference: import_client28.normalizeProvider(config.authSchemePreference ?? [])
67279
+ authSchemePreference: import_client29.normalizeProvider(config.authSchemePreference ?? [])
66952
67280
  });
66953
67281
  };
66954
67282
 
@@ -67040,10 +67368,10 @@ var package_default3 = {
67040
67368
  };
67041
67369
 
67042
67370
  // node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
67043
- var import_client32 = __toESM(require_client2(), 1);
67371
+ var import_client33 = __toESM(require_client2(), 1);
67044
67372
  var import_httpAuthSchemes6 = __toESM(require_httpAuthSchemes(), 1);
67045
- var import_client33 = __toESM(require_client(), 1);
67046
- var import_config39 = __toESM(require_config(), 1);
67373
+ var import_client34 = __toESM(require_client(), 1);
67374
+ var import_config40 = __toESM(require_config(), 1);
67047
67375
  var import_retry5 = __toESM(require_retry(), 1);
67048
67376
  var import_serde6 = __toESM(require_serde(), 1);
67049
67377
  var import_node_http_handler3 = __toESM(require_dist_cjs6(), 1);
@@ -67052,12 +67380,12 @@ var import_node_http_handler3 = __toESM(require_dist_cjs6(), 1);
67052
67380
  var import_httpAuthSchemes5 = __toESM(require_httpAuthSchemes(), 1);
67053
67381
  var import_protocols7 = __toESM(require_protocols2(), 1);
67054
67382
  var import_checksum3 = __toESM(require_checksum(), 1);
67055
- var import_client31 = __toESM(require_client(), 1);
67383
+ var import_client32 = __toESM(require_client(), 1);
67056
67384
  var import_protocols8 = __toESM(require_protocols(), 1);
67057
67385
  var import_serde5 = __toESM(require_serde(), 1);
67058
67386
 
67059
67387
  // node_modules/@aws-sdk/client-ecs/dist-es/endpoint/endpointResolver.js
67060
- var import_client29 = __toESM(require_client2(), 1);
67388
+ var import_client30 = __toESM(require_client2(), 1);
67061
67389
  var import_endpoints7 = __toESM(require_endpoints(), 1);
67062
67390
 
67063
67391
  // node_modules/@aws-sdk/client-ecs/dist-es/endpoint/bdd.js
@@ -67154,14 +67482,14 @@ var defaultEndpointResolver3 = (endpointParams, context = {}) => {
67154
67482
  logger: context.logger
67155
67483
  }));
67156
67484
  };
67157
- import_endpoints7.customEndpointFunctions.aws = import_client29.awsEndpointFunctions;
67485
+ import_endpoints7.customEndpointFunctions.aws = import_client30.awsEndpointFunctions;
67158
67486
 
67159
67487
  // node_modules/@aws-sdk/client-ecs/dist-es/schemas/schemas_0.js
67160
67488
  var import_schema3 = __toESM(require_schema4(), 1);
67161
67489
 
67162
67490
  // node_modules/@aws-sdk/client-ecs/dist-es/models/ECSServiceException.js
67163
- var import_client30 = __toESM(require_client(), 1);
67164
- class ECSServiceException extends import_client30.ServiceException {
67491
+ var import_client31 = __toESM(require_client(), 1);
67492
+ class ECSServiceException extends import_client31.ServiceException {
67165
67493
  constructor(options) {
67166
67494
  super(options);
67167
67495
  Object.setPrototypeOf(this, ECSServiceException.prototype);
@@ -69965,7 +70293,7 @@ var getRuntimeConfig4 = (config) => {
69965
70293
  signer: new import_httpAuthSchemes5.AwsSdkSigV4Signer
69966
70294
  }
69967
70295
  ],
69968
- logger: config?.logger ?? new import_client31.NoOpLogger,
70296
+ logger: config?.logger ?? new import_client32.NoOpLogger,
69969
70297
  protocol: config?.protocol ?? import_protocols7.AwsJson1_1Protocol,
69970
70298
  protocolSettings: config?.protocolSettings ?? {
69971
70299
  defaultNamespace: "com.amazonaws.ecs",
@@ -69984,11 +70312,11 @@ var getRuntimeConfig4 = (config) => {
69984
70312
 
69985
70313
  // node_modules/@aws-sdk/client-ecs/dist-es/runtimeConfig.js
69986
70314
  var getRuntimeConfig5 = (config) => {
69987
- import_client33.emitWarningIfUnsupportedVersion(process.version);
69988
- const defaultsMode = import_config39.resolveDefaultsModeConfig(config);
69989
- const defaultConfigProvider = () => defaultsMode().then(import_client33.loadConfigsForDefaultMode);
70315
+ import_client34.emitWarningIfUnsupportedVersion(process.version);
70316
+ const defaultsMode = import_config40.resolveDefaultsModeConfig(config);
70317
+ const defaultConfigProvider = () => defaultsMode().then(import_client34.loadConfigsForDefaultMode);
69990
70318
  const clientSharedValues = getRuntimeConfig4(config);
69991
- import_client32.emitWarningIfUnsupportedVersion(process.version);
70319
+ import_client33.emitWarningIfUnsupportedVersion(process.version);
69992
70320
  const loaderConfig = {
69993
70321
  profile: config?.profile,
69994
70322
  logger: clientSharedValues.logger
@@ -69998,27 +70326,27 @@ var getRuntimeConfig5 = (config) => {
69998
70326
  ...config,
69999
70327
  runtime: "node",
70000
70328
  defaultsMode,
70001
- authSchemePreference: config?.authSchemePreference ?? import_config39.loadConfig(import_httpAuthSchemes6.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
70329
+ authSchemePreference: config?.authSchemePreference ?? import_config40.loadConfig(import_httpAuthSchemes6.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
70002
70330
  bodyLengthChecker: config?.bodyLengthChecker ?? import_serde6.calculateBodyLength,
70003
70331
  credentialDefaultProvider: config?.credentialDefaultProvider ?? defaultProvider,
70004
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? import_client32.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default3.version }),
70005
- maxAttempts: config?.maxAttempts ?? import_config39.loadConfig(import_retry5.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
70006
- region: config?.region ?? import_config39.loadConfig(import_config39.NODE_REGION_CONFIG_OPTIONS, { ...import_config39.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
70332
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? import_client33.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default3.version }),
70333
+ maxAttempts: config?.maxAttempts ?? import_config40.loadConfig(import_retry5.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
70334
+ region: config?.region ?? import_config40.loadConfig(import_config40.NODE_REGION_CONFIG_OPTIONS, { ...import_config40.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
70007
70335
  requestHandler: import_node_http_handler3.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
70008
- retryMode: config?.retryMode ?? import_config39.loadConfig({
70336
+ retryMode: config?.retryMode ?? import_config40.loadConfig({
70009
70337
  ...import_retry5.NODE_RETRY_MODE_CONFIG_OPTIONS,
70010
70338
  default: async () => (await defaultConfigProvider()).retryMode || import_retry5.DEFAULT_RETRY_MODE
70011
70339
  }, config),
70012
70340
  streamCollector: config?.streamCollector ?? import_node_http_handler3.streamCollector,
70013
- useDualstackEndpoint: config?.useDualstackEndpoint ?? import_config39.loadConfig(import_config39.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
70014
- useFipsEndpoint: config?.useFipsEndpoint ?? import_config39.loadConfig(import_config39.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
70015
- userAgentAppId: config?.userAgentAppId ?? import_config39.loadConfig(import_client32.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
70341
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? import_config40.loadConfig(import_config40.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
70342
+ useFipsEndpoint: config?.useFipsEndpoint ?? import_config40.loadConfig(import_config40.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
70343
+ userAgentAppId: config?.userAgentAppId ?? import_config40.loadConfig(import_client33.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
70016
70344
  };
70017
70345
  };
70018
70346
 
70019
70347
  // node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
70020
- var import_client34 = __toESM(require_client2(), 1);
70021
- var import_client35 = __toESM(require_client(), 1);
70348
+ var import_client35 = __toESM(require_client2(), 1);
70349
+ var import_client36 = __toESM(require_client(), 1);
70022
70350
  var import_protocols9 = __toESM(require_protocols(), 1);
70023
70351
 
70024
70352
  // node_modules/@aws-sdk/client-ecs/dist-es/auth/httpAuthExtensionConfiguration.js
@@ -70062,34 +70390,34 @@ var resolveHttpAuthRuntimeConfig3 = (config) => {
70062
70390
 
70063
70391
  // node_modules/@aws-sdk/client-ecs/dist-es/runtimeExtensions.js
70064
70392
  var resolveRuntimeExtensions3 = (runtimeConfig, extensions) => {
70065
- const extensionConfiguration = Object.assign(import_client34.getAwsRegionExtensionConfiguration(runtimeConfig), import_client35.getDefaultExtensionConfiguration(runtimeConfig), import_protocols9.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
70393
+ const extensionConfiguration = Object.assign(import_client35.getAwsRegionExtensionConfiguration(runtimeConfig), import_client36.getDefaultExtensionConfiguration(runtimeConfig), import_protocols9.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration3(runtimeConfig));
70066
70394
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
70067
- return Object.assign(runtimeConfig, import_client34.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client35.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols9.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
70395
+ return Object.assign(runtimeConfig, import_client35.resolveAwsRegionExtensionConfiguration(extensionConfiguration), import_client36.resolveDefaultRuntimeConfig(extensionConfiguration), import_protocols9.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig3(extensionConfiguration));
70068
70396
  };
70069
70397
 
70070
70398
  // node_modules/@aws-sdk/client-ecs/dist-es/ECSClient.js
70071
- class ECSClient extends import_client37.Client {
70399
+ class ECSClient extends import_client38.Client {
70072
70400
  config;
70073
70401
  constructor(...[configuration]) {
70074
70402
  const _config_0 = getRuntimeConfig5(configuration || {});
70075
70403
  super(_config_0);
70076
70404
  this.initConfig = _config_0;
70077
70405
  const _config_1 = resolveClientEndpointParameters3(_config_0);
70078
- const _config_2 = import_client36.resolveUserAgentConfig(_config_1);
70406
+ const _config_2 = import_client37.resolveUserAgentConfig(_config_1);
70079
70407
  const _config_3 = import_retry6.resolveRetryConfig(_config_2);
70080
- const _config_4 = import_config40.resolveRegionConfig(_config_3);
70081
- const _config_5 = import_client36.resolveHostHeaderConfig(_config_4);
70408
+ const _config_4 = import_config41.resolveRegionConfig(_config_3);
70409
+ const _config_5 = import_client37.resolveHostHeaderConfig(_config_4);
70082
70410
  const _config_6 = import_endpoints8.resolveEndpointConfig(_config_5);
70083
70411
  const _config_7 = resolveHttpAuthSchemeConfig3(_config_6);
70084
70412
  const _config_8 = resolveRuntimeExtensions3(_config_7, configuration?.extensions || []);
70085
70413
  this.config = _config_8;
70086
70414
  this.middlewareStack.use(import_schema4.getSchemaSerdePlugin(this.config));
70087
- this.middlewareStack.use(import_client36.getUserAgentPlugin(this.config));
70415
+ this.middlewareStack.use(import_client37.getUserAgentPlugin(this.config));
70088
70416
  this.middlewareStack.use(import_retry6.getRetryPlugin(this.config));
70089
70417
  this.middlewareStack.use(import_protocols10.getContentLengthPlugin(this.config));
70090
- this.middlewareStack.use(import_client36.getHostHeaderPlugin(this.config));
70091
- this.middlewareStack.use(import_client36.getLoggerPlugin(this.config));
70092
- this.middlewareStack.use(import_client36.getRecursionDetectionPlugin(this.config));
70418
+ this.middlewareStack.use(import_client37.getHostHeaderPlugin(this.config));
70419
+ this.middlewareStack.use(import_client37.getLoggerPlugin(this.config));
70420
+ this.middlewareStack.use(import_client37.getRecursionDetectionPlugin(this.config));
70093
70421
  this.middlewareStack.use(import_core2.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
70094
70422
  httpAuthSchemeParametersProvider: defaultECSHttpAuthSchemeParametersProvider,
70095
70423
  identityProviderConfigProvider: async (config) => new import_core2.DefaultIdentityProviderConfig({
@@ -70104,9 +70432,9 @@ class ECSClient extends import_client37.Client {
70104
70432
  }
70105
70433
 
70106
70434
  // node_modules/@aws-sdk/client-ecs/dist-es/commandBuilder.js
70107
- var import_client38 = __toESM(require_client(), 1);
70435
+ var import_client39 = __toESM(require_client(), 1);
70108
70436
  var import_endpoints9 = __toESM(require_endpoints(), 1);
70109
- var command3 = import_client38.makeBuilder(commonParams3, "AmazonEC2ContainerServiceV20141113", "ECSClient", import_endpoints9.getEndpointPlugin);
70437
+ var command3 = import_client39.makeBuilder(commonParams3, "AmazonEC2ContainerServiceV20141113", "ECSClient", import_endpoints9.getEndpointPlugin);
70110
70438
  var _ep03 = {};
70111
70439
  var _mw03 = (Command, cs, config, o3) => [];
70112
70440
 
@@ -98571,7 +98899,7 @@ class RemoteSkillsAuthClient {
98571
98899
  }
98572
98900
  }
98573
98901
  // src/lib/private-publication-recovery.ts
98574
- import { constants as constants22, closeSync as closeSync24, fsyncSync as fsyncSync8, fstatSync as fstatSync24, lstatSync as lstatSync34, mkdirSync as mkdirSync16, openSync as openSync24, readSync as readSync16, realpathSync as realpathSync18, renameSync as renameSync7, unlinkSync as unlinkSync6, writeFileSync as writeFileSync11 } from "fs";
98902
+ import { constants as constants22, closeSync as closeSync24, fsyncSync as fsyncSync8, fstatSync as fstatSync24, lstatSync as lstatSync34, mkdirSync as mkdirSync17, openSync as openSync24, readSync as readSync16, realpathSync as realpathSync18, renameSync as renameSync7, unlinkSync as unlinkSync6, writeFileSync as writeFileSync11 } from "fs";
98575
98903
  import { dirname as dirname35, isAbsolute as isAbsolute32, join as join49, resolve as resolve32 } from "path";
98576
98904
  import { randomUUID as randomUUID12 } from "crypto";
98577
98905
  var fail2 = () => {
@@ -98718,7 +99046,7 @@ async function preparePrivatePublication(client2, sourceDirectory, recoveryDirec
98718
99046
  };
98719
99047
  if (!isAbsolute32(recoveryDirectory) || resolve32(recoveryDirectory) !== recoveryDirectory || realpathSync18(dirname35(recoveryDirectory)) !== dirname35(recoveryDirectory))
98720
99048
  return fail2();
98721
- mkdirSync16(recoveryDirectory, { mode: 448 });
99049
+ mkdirSync17(recoveryDirectory, { mode: 448 });
98722
99050
  safeDirectory(recoveryDirectory);
98723
99051
  const parent = openSync24(dirname35(recoveryDirectory), constants22.O_RDONLY | constants22.O_NOFOLLOW);
98724
99052
  try {