cdk-local 0.151.1 → 0.153.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { C as sanitizeServiceExceptionMessage, S as isAwsServiceException, _ as resolveAssemblyPath, a as isDockerClientEnvKey, b as describeCredentialLoadFailure, c as runDockerStreaming, d as absoluteAssemblyPathEscape, f as assemblyPathEscape, g as renderAssemblyPathEscape, h as namesTheSameDirectory, i as getDockerCmd, l as spawnStreaming, m as isPasteableCommandArg, n as finchSecretArgvRefusal, o as isMalformedEnvKey, p as displayUntrustedValue, r as formatDockerLoginError, s as runDockerForeground, u as warnFinchArgvExposure, v as clampErrorName, w as stringifyThrown, x as flattenToOneLine, y as describeAwsFailureForWarn } from "./docker-cmd-GME6jkl9.js";
2
- import { a as setEmbedConfig, r as getEmbedConfig, t as getLogger } from "./logger-CGhtqHg0.js";
1
+ import { C as sanitizeServiceExceptionMessage, S as isAwsServiceException, _ as resolveAssemblyPath, a as isDockerClientEnvKey, b as describeCredentialLoadFailure, c as runDockerStreaming, d as absoluteAssemblyPathEscape, f as assemblyPathEscape, g as renderAssemblyPathEscape, h as namesTheSameDirectory, i as getDockerCmd, l as spawnStreaming, m as isPasteableCommandArg, n as finchSecretArgvRefusal, o as isMalformedEnvKey, p as displayUntrustedValue, r as formatDockerLoginError, s as runDockerForeground, u as warnFinchArgvExposure, v as clampErrorName, w as stringifyThrown, x as flattenToOneLine, y as describeAwsFailureForWarn } from "./docker-cmd-BSdu45mc.js";
2
+ import { a as setEmbedConfig, r as getEmbedConfig, t as getLogger } from "./logger-CwFXOD1w.js";
3
3
  import { chmodSync, cpSync, createWriteStream, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { homedir, tmpdir } from "node:os";
5
5
  import * as path$1 from "node:path";
@@ -358,6 +358,145 @@ function buildStsClientConfig(args) {
358
358
  };
359
359
  }
360
360
 
361
+ //#endregion
362
+ //#region src/utils/workload-identity.ts
363
+ function copyCredentials(c) {
364
+ return c ? {
365
+ accessKeyId: c.accessKeyId,
366
+ secretAccessKey: c.secretAccessKey,
367
+ ...c.sessionToken ? { sessionToken: c.sessionToken } : {}
368
+ } : void 0;
369
+ }
370
+ let record;
371
+ let stripWarned = false;
372
+ const SECOND_ASSUME_MESSAGE = "A role was already assumed in this process; refusing to assume a second one. Pass --role-arn once.";
373
+ function recordAssumedRole(caller, role) {
374
+ if (record !== void 0) throw new Error(SECOND_ASSUME_MESSAGE);
375
+ record = {
376
+ caller: copyCredentials(caller),
377
+ role: copyCredentials(role)
378
+ };
379
+ }
380
+ function assumedRoleRecorded() {
381
+ return record !== void 0;
382
+ }
383
+ function readEnvCallerCredentials(env = process.env) {
384
+ const accessKeyId = env["AWS_ACCESS_KEY_ID"];
385
+ const secretAccessKey = env["AWS_SECRET_ACCESS_KEY"];
386
+ if (!accessKeyId || !secretAccessKey) return void 0;
387
+ const sessionToken = env["AWS_SESSION_TOKEN"];
388
+ return {
389
+ accessKeyId,
390
+ secretAccessKey,
391
+ ...sessionToken ? { sessionToken } : {}
392
+ };
393
+ }
394
+ function resetWorkloadIdentity() {
395
+ record = void 0;
396
+ stripWarned = false;
397
+ }
398
+ function callerRecord() {
399
+ return getEmbedConfig().workloadIdentity === "caller" ? record : void 0;
400
+ }
401
+ const MULTIPLE_CREDENTIAL_SOURCES_WARNING = "Multiple credential sources detected";
402
+ const chainLogger = {
403
+ debug: () => {},
404
+ info: () => {},
405
+ warn: (...args) => {
406
+ const text = args.map(String).join(" ");
407
+ if (text.includes(MULTIPLE_CREDENTIAL_SOURCES_WARNING)) return;
408
+ getLogger().warn(text);
409
+ },
410
+ error: (...args) => {
411
+ getLogger().error(args.map(String).join(" "));
412
+ }
413
+ };
414
+ function callerChainWithoutEnv(proxied) {
415
+ let chain;
416
+ return async (identityProperties) => {
417
+ chain ??= (async () => {
418
+ const { defaultProvider } = await import("@aws-sdk/credential-provider-node");
419
+ return defaultProvider({
420
+ profile: "default",
421
+ logger: chainLogger,
422
+ ...proxied ? { clientConfig: { requestHandler: buildProxyRequestHandler() } } : {}
423
+ });
424
+ })().catch((err) => {
425
+ chain = void 0;
426
+ throw err;
427
+ });
428
+ return (await chain)(identityProperties);
429
+ };
430
+ }
431
+ function workloadClientConfig(opts = {}) {
432
+ const base = buildProxyClientConfig({ profile: opts.profile });
433
+ const rec = callerRecord();
434
+ if (!rec) return base;
435
+ if (opts.profile || process.env["AWS_PROFILE"]) return base;
436
+ if (rec.caller) {
437
+ const caller = rec.caller;
438
+ const credentials = async () => ({
439
+ accessKeyId: caller.accessKeyId,
440
+ secretAccessKey: caller.secretAccessKey,
441
+ ...caller.sessionToken ? { sessionToken: caller.sessionToken } : {}
442
+ });
443
+ return {
444
+ ...base,
445
+ credentials
446
+ };
447
+ }
448
+ return {
449
+ ...base,
450
+ credentials: callerChainWithoutEnv(base.requestHandler !== void 0)
451
+ };
452
+ }
453
+ function workloadStsClientConfig(args) {
454
+ return {
455
+ ...workloadClientConfig({ profile: args.profile }),
456
+ ...args.region && { region: args.region },
457
+ ...args.profile && { profile: args.profile }
458
+ };
459
+ }
460
+ function deployAccountStsClientConfig(args) {
461
+ const role = callerRecord()?.role;
462
+ if (!role) return {
463
+ ...buildProxyClientConfig({ profile: args.profile }),
464
+ ...args.region && { region: args.region },
465
+ ...args.profile && { profile: args.profile }
466
+ };
467
+ const credentials = async () => ({
468
+ accessKeyId: role.accessKeyId,
469
+ secretAccessKey: role.secretAccessKey,
470
+ ...role.sessionToken ? { sessionToken: role.sessionToken } : {}
471
+ });
472
+ return {
473
+ ...buildProxyClientConfig(),
474
+ ...args.region && { region: args.region },
475
+ ...args.profile && { profile: args.profile },
476
+ credentials
477
+ };
478
+ }
479
+ function applyWorkloadEnvCredentials(env) {
480
+ const rec = callerRecord();
481
+ if (!rec) return "unchanged";
482
+ if (rec.caller) {
483
+ env["AWS_ACCESS_KEY_ID"] = rec.caller.accessKeyId;
484
+ env["AWS_SECRET_ACCESS_KEY"] = rec.caller.secretAccessKey;
485
+ if (rec.caller.sessionToken) env["AWS_SESSION_TOKEN"] = rec.caller.sessionToken;
486
+ else delete env["AWS_SESSION_TOKEN"];
487
+ return "restored";
488
+ }
489
+ delete env["AWS_ACCESS_KEY_ID"];
490
+ delete env["AWS_SECRET_ACCESS_KEY"];
491
+ delete env["AWS_SESSION_TOKEN"];
492
+ return "stripped";
493
+ }
494
+ function warnWorkloadCredentialsStripped() {
495
+ if (stripWarned) return;
496
+ stripWarned = true;
497
+ getLogger().warn("The --role-arn role is not handed to the emulated workload, and your shell had no static AWS credentials to hand it instead, so the container receives none. Pass --profile <name>, or export static credentials, to give it an identity.");
498
+ }
499
+
361
500
  //#endregion
362
501
  //#region src/utils/role-arn.ts
363
502
  const IAM_ROLE_ARN_MAX_LENGTH = 2048;
@@ -391,7 +530,7 @@ async function assumeRoleCredentials(opts) {
391
530
  const message = refusedRoleArnMessage(opts.roleArn);
392
531
  throw opts.makeError ? opts.makeError(message) : new AssumeRoleFailure(message, detail);
393
532
  }
394
- const sts = new STSClient(buildStsClientConfig({
533
+ const sts = new STSClient(workloadStsClientConfig({
395
534
  region: opts.region,
396
535
  profile: opts.profile
397
536
  }));
@@ -425,6 +564,7 @@ async function applyRoleArnIfSet(opts) {
425
564
  const roleArn = opts.roleArn || process.env[`${getEmbedConfig().envPrefix}_ROLE_ARN`];
426
565
  if (!roleArn) return;
427
566
  if (!isIamRoleArn(roleArn)) throw new Error(refusedRoleArnMessage(roleArn));
567
+ if (assumedRoleRecorded() && getEmbedConfig().workloadIdentity === "caller") throw new Error(SECOND_ASSUME_MESSAGE);
428
568
  const logger = getLogger().child("role-arn");
429
569
  const shownArn = flattenToOneLine(roleArn);
430
570
  logger.debug(`Assuming role ${shownArn}...`);
@@ -447,6 +587,11 @@ async function applyRoleArnIfSet(opts) {
447
587
  if (!response.Credentials) throw new Error(`AssumeRole returned no credentials for role ${shownArn}`);
448
588
  const { AccessKeyId, SecretAccessKey, SessionToken, Expiration } = response.Credentials;
449
589
  if (!AccessKeyId || !SecretAccessKey || !SessionToken) throw new Error(`AssumeRole response missing credentials fields for role ${shownArn}`);
590
+ if (!assumedRoleRecorded()) recordAssumedRole(readEnvCallerCredentials(), {
591
+ accessKeyId: AccessKeyId,
592
+ secretAccessKey: SecretAccessKey,
593
+ sessionToken: SessionToken
594
+ });
450
595
  process.env["AWS_ACCESS_KEY_ID"] = AccessKeyId;
451
596
  process.env["AWS_SECRET_ACCESS_KEY"] = SecretAccessKey;
452
597
  process.env["AWS_SESSION_TOKEN"] = SessionToken;
@@ -751,7 +896,7 @@ var DynamicReferenceResolver = class {
751
896
  let c = this.smClients.get(key);
752
897
  if (!c) {
753
898
  c = this.options.secretsManagerClientFactory?.(region) ?? new SecretsManagerClient({
754
- ...buildProxyClientConfig({ profile: this.options.profile }),
899
+ ...workloadClientConfig({ profile: this.options.profile }),
755
900
  ...region && { region },
756
901
  ...this.options.profile && { profile: this.options.profile }
757
902
  });
@@ -764,7 +909,7 @@ var DynamicReferenceResolver = class {
764
909
  let c = this.ssmClients.get(key);
765
910
  if (!c) {
766
911
  c = this.options.ssmClientFactory?.(region) ?? new SSMClient({
767
- ...buildProxyClientConfig({ profile: this.options.profile }),
912
+ ...workloadClientConfig({ profile: this.options.profile }),
768
913
  ...region && { region },
769
914
  ...this.options.profile && { profile: this.options.profile }
770
915
  });
@@ -2082,37 +2227,37 @@ async function getClient(service, region) {
2082
2227
  switch (service) {
2083
2228
  case "sqs":
2084
2229
  client = new (await (import("@aws-sdk/client-sqs"))).SQSClient({
2085
- ...buildProxyClientConfig(),
2230
+ ...workloadClientConfig(),
2086
2231
  region
2087
2232
  });
2088
2233
  break;
2089
2234
  case "sns":
2090
2235
  client = new (await (import("@aws-sdk/client-sns"))).SNSClient({
2091
- ...buildProxyClientConfig(),
2236
+ ...workloadClientConfig(),
2092
2237
  region
2093
2238
  });
2094
2239
  break;
2095
2240
  case "eventbridge":
2096
2241
  client = new (await (import("@aws-sdk/client-eventbridge"))).EventBridgeClient({
2097
- ...buildProxyClientConfig(),
2242
+ ...workloadClientConfig(),
2098
2243
  region
2099
2244
  });
2100
2245
  break;
2101
2246
  case "kinesis":
2102
2247
  client = new (await (import("@aws-sdk/client-kinesis"))).KinesisClient({
2103
- ...buildProxyClientConfig(),
2248
+ ...workloadClientConfig(),
2104
2249
  region
2105
2250
  });
2106
2251
  break;
2107
2252
  case "sfn":
2108
2253
  client = new (await (import("@aws-sdk/client-sfn"))).SFNClient({
2109
- ...buildProxyClientConfig(),
2254
+ ...workloadClientConfig(),
2110
2255
  region
2111
2256
  });
2112
2257
  break;
2113
2258
  case "ssm":
2114
2259
  client = new (await (import("@aws-sdk/client-ssm"))).SSMClient({
2115
- ...buildProxyClientConfig(),
2260
+ ...workloadClientConfig(),
2116
2261
  region
2117
2262
  });
2118
2263
  break;
@@ -3392,7 +3537,7 @@ async function resolveMultiTarget(provided, params) {
3392
3537
  async function loadSynthDeps() {
3393
3538
  const [toolkitLib, { CdklIoHost }, { AssetManifestArtifact }] = await Promise.all([
3394
3539
  import("@aws-cdk/toolkit-lib"),
3395
- import("./cdkl-io-host-9lPKscRA.js"),
3540
+ import("./cdkl-io-host-CDXI-7cC.js"),
3396
3541
  import("@aws-cdk/cloud-assembly-api")
3397
3542
  ]);
3398
3543
  return {
@@ -3672,7 +3817,7 @@ var CfnLocalStateProvider = class {
3672
3817
  getClient() {
3673
3818
  if (this.disposed) throw new Error("CfnLocalStateProvider used after dispose()");
3674
3819
  if (!this.client) this.client = new CloudFormationClient({
3675
- ...buildProxyClientConfig({ profile: this.clientOptions.profile }),
3820
+ ...workloadClientConfig({ profile: this.clientOptions.profile }),
3676
3821
  region: this.region,
3677
3822
  ...this.clientOptions.profile !== void 0 && { profile: this.clientOptions.profile }
3678
3823
  });
@@ -3681,7 +3826,7 @@ var CfnLocalStateProvider = class {
3681
3826
  getLambdaClient() {
3682
3827
  if (this.disposed) throw new Error("CfnLocalStateProvider used after dispose()");
3683
3828
  if (!this.lambdaClient) this.lambdaClient = new LambdaClient({
3684
- ...buildProxyClientConfig({ profile: this.clientOptions.profile }),
3829
+ ...workloadClientConfig({ profile: this.clientOptions.profile }),
3685
3830
  region: this.region,
3686
3831
  ...this.clientOptions.profile !== void 0 && { profile: this.clientOptions.profile }
3687
3832
  });
@@ -3690,7 +3835,7 @@ var CfnLocalStateProvider = class {
3690
3835
  getAgentCoreControlClient() {
3691
3836
  if (this.disposed) throw new Error("CfnLocalStateProvider used after dispose()");
3692
3837
  if (!this.agentCoreControlClient) this.agentCoreControlClient = new BedrockAgentCoreControlClient({
3693
- ...buildProxyClientConfig({ profile: this.clientOptions.profile }),
3838
+ ...workloadClientConfig({ profile: this.clientOptions.profile }),
3694
3839
  region: this.region,
3695
3840
  ...this.clientOptions.profile !== void 0 && { profile: this.clientOptions.profile }
3696
3841
  });
@@ -3699,7 +3844,7 @@ var CfnLocalStateProvider = class {
3699
3844
  getSsmClient() {
3700
3845
  if (this.disposed) throw new Error("CfnLocalStateProvider used after dispose()");
3701
3846
  if (!this.ssmClient) this.ssmClient = new SSMClient({
3702
- ...buildProxyClientConfig({ profile: this.clientOptions.profile }),
3847
+ ...workloadClientConfig({ profile: this.clientOptions.profile }),
3703
3848
  region: this.region,
3704
3849
  ...this.clientOptions.profile !== void 0 && { profile: this.clientOptions.profile }
3705
3850
  });
@@ -6053,7 +6198,7 @@ async function pullEcrImage(imageUri, options) {
6053
6198
  async function assumeRoleForEcr(roleArn, callerRegion, profile, logger) {
6054
6199
  if (!isIamRoleArn(roleArn)) throw new LocalInvokeBuildError(refusedRoleArnMessage(roleArn));
6055
6200
  logger.debug(`Assuming role ${roleArn} for ECR pull...`);
6056
- const sts = new STSClient(buildStsClientConfig({
6201
+ const sts = new STSClient(workloadStsClientConfig({
6057
6202
  region: callerRegion,
6058
6203
  profile
6059
6204
  }));
@@ -10272,7 +10417,7 @@ function defaultCredentialsLoader() {
10272
10417
  if (cached) return cached;
10273
10418
  cached = (async () => {
10274
10419
  const { STSClient } = await import("@aws-sdk/client-sts");
10275
- const client = new STSClient({ ...buildProxyClientConfig() });
10420
+ const client = new STSClient({ ...workloadClientConfig() });
10276
10421
  const creds = await client.config.credentials();
10277
10422
  client.destroy();
10278
10423
  return {
@@ -11640,7 +11785,7 @@ async function assumeRoleForLayer(roleArn, region, options) {
11640
11785
  async function defaultLambdaClientFactory() {
11641
11786
  const { LambdaClient } = await import("@aws-sdk/client-lambda");
11642
11787
  return (region, credentials) => new LambdaClient({
11643
- ...buildProxyClientConfig(),
11788
+ ...workloadClientConfig(),
11644
11789
  region,
11645
11790
  ...credentials && { credentials: {
11646
11791
  accessKeyId: credentials.accessKeyId,
@@ -11652,7 +11797,7 @@ async function defaultLambdaClientFactory() {
11652
11797
  async function defaultStsClientFactory() {
11653
11798
  const { STSClient } = await import("@aws-sdk/client-sts");
11654
11799
  return (region) => new STSClient({
11655
- ...buildProxyClientConfig(),
11800
+ ...workloadClientConfig(),
11656
11801
  region
11657
11802
  });
11658
11803
  }
@@ -12718,13 +12863,14 @@ async function buildContainerSpec(args) {
12718
12863
  dockerEnv["AWS_SESSION_TOKEN"] = creds.sessionToken;
12719
12864
  if (stsRegion) dockerEnv["AWS_REGION"] = stsRegion;
12720
12865
  } else {
12721
- forwardAwsEnv$3(dockerEnv);
12866
+ const forwarded = forwardAwsEnv$3(dockerEnv);
12722
12867
  if (profileCredentials) {
12723
12868
  dockerEnv["AWS_ACCESS_KEY_ID"] = profileCredentials.accessKeyId;
12724
12869
  dockerEnv["AWS_SECRET_ACCESS_KEY"] = profileCredentials.secretAccessKey;
12725
12870
  if (profileCredentials.sessionToken) dockerEnv["AWS_SESSION_TOKEN"] = profileCredentials.sessionToken;
12726
12871
  else delete dockerEnv["AWS_SESSION_TOKEN"];
12727
12872
  }
12873
+ if (forwarded === "stripped" && !dockerEnv["AWS_ACCESS_KEY_ID"]) warnWorkloadCredentialsStripped();
12728
12874
  if (profileCredsFile) {
12729
12875
  dockerEnv["AWS_SHARED_CREDENTIALS_FILE"] = profileCredsFile.containerPath;
12730
12876
  dockerEnv["AWS_PROFILE"] = profileCredsFile.profileName;
@@ -13011,6 +13157,7 @@ function forwardAwsEnv$3(env) {
13011
13157
  const value = process.env[key];
13012
13158
  if (value !== void 0) env[key] = value;
13013
13159
  }
13160
+ return applyWorkloadEnvCredentials(env);
13014
13161
  }
13015
13162
  function resolveContainerFallbackRegion(args) {
13016
13163
  return args.stackRegionOverride ?? args.synthRegion ?? args.profileRegion;
@@ -13199,7 +13346,7 @@ async function resolvePseudoParametersForStartApi(stateRegion, options) {
13199
13346
  let accountId;
13200
13347
  try {
13201
13348
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
13202
- const sts = new STSClient(buildStsClientConfig({
13349
+ const sts = new STSClient(deployAccountStsClientConfig({
13203
13350
  region,
13204
13351
  profile: options.profile
13205
13352
  }));
@@ -13584,7 +13731,7 @@ async function resolvePseudoParametersForInvoke(stackRegion, options) {
13584
13731
  let accountId;
13585
13732
  try {
13586
13733
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
13587
- const sts = new STSClient(buildStsClientConfig({
13734
+ const sts = new STSClient(deployAccountStsClientConfig({
13588
13735
  region,
13589
13736
  profile: options.profile
13590
13737
  }));
@@ -13660,6 +13807,7 @@ function forwardAwsEnv$2(env) {
13660
13807
  const value = process.env[key];
13661
13808
  if (value !== void 0) env[key] = value;
13662
13809
  }
13810
+ return applyWorkloadEnvCredentials(env);
13663
13811
  }
13664
13812
  function applyProfileCredentialsOverlay(env, profileCreds, assumeRoleActive) {
13665
13813
  if (!profileCreds) return;
@@ -13804,8 +13952,9 @@ async function resolveLambdaContainerEnvWith(lambda, options, profileCredentials
13804
13952
  }
13805
13953
  }
13806
13954
  if (!assumeSucceeded) {
13807
- forwardAwsEnv$2(dockerEnv);
13955
+ const forwarded = forwardAwsEnv$2(dockerEnv);
13808
13956
  applyProfileCredentialsOverlay(dockerEnv, profileCredentials, false);
13957
+ if (forwarded === "stripped" && !dockerEnv["AWS_ACCESS_KEY_ID"]) warnWorkloadCredentialsStripped();
13809
13958
  }
13810
13959
  if (!dockerEnv["AWS_REGION"] && !dockerEnv["AWS_DEFAULT_REGION"]) {
13811
13960
  const fallbackRegion = resolveContainerFallbackRegion({
@@ -15030,10 +15179,16 @@ async function resolveHostCredentialsForSigV4(options, resolved, loaded, region,
15030
15179
  ...creds.sessionToken && { sessionToken: creds.sessionToken }
15031
15180
  };
15032
15181
  }
15033
- const accessKeyId = process.env["AWS_ACCESS_KEY_ID"];
15034
- const secretAccessKey = process.env["AWS_SECRET_ACCESS_KEY"];
15182
+ const hostEnv = {
15183
+ AWS_ACCESS_KEY_ID: process.env["AWS_ACCESS_KEY_ID"],
15184
+ AWS_SECRET_ACCESS_KEY: process.env["AWS_SECRET_ACCESS_KEY"],
15185
+ AWS_SESSION_TOKEN: process.env["AWS_SESSION_TOKEN"]
15186
+ };
15187
+ applyWorkloadEnvCredentials(hostEnv);
15188
+ const accessKeyId = hostEnv["AWS_ACCESS_KEY_ID"];
15189
+ const secretAccessKey = hostEnv["AWS_SECRET_ACCESS_KEY"];
15035
15190
  if (accessKeyId && secretAccessKey) {
15036
- const sessionToken = process.env["AWS_SESSION_TOKEN"];
15191
+ const sessionToken = hostEnv["AWS_SESSION_TOKEN"];
15037
15192
  return {
15038
15193
  accessKeyId,
15039
15194
  secretAccessKey,
@@ -15260,7 +15415,7 @@ async function buildAgentCoreImageContext(candidate, stateProvider, options) {
15260
15415
  }
15261
15416
  async function resolveCallerAccountId$2(region, profile) {
15262
15417
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
15263
- const sts = new STSClient(buildStsClientConfig({
15418
+ const sts = new STSClient(deployAccountStsClientConfig({
15264
15419
  region,
15265
15420
  profile
15266
15421
  }));
@@ -15288,8 +15443,9 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
15288
15443
  }
15289
15444
  }
15290
15445
  if (!assumeSucceeded) {
15291
- forwardAwsEnv$1(dockerEnv);
15446
+ const forwarded = forwardAwsEnv$1(dockerEnv);
15292
15447
  applyProfileCredentialsOverlay(dockerEnv, args.profileCredentials, false);
15448
+ if (forwarded === "stripped" && !dockerEnv["AWS_ACCESS_KEY_ID"]) warnWorkloadCredentialsStripped();
15293
15449
  if (args.profileCredsFile) {
15294
15450
  dockerEnv["AWS_SHARED_CREDENTIALS_FILE"] = args.profileCredsFile.containerPath;
15295
15451
  dockerEnv["AWS_PROFILE"] = args.profileCredsFile.profileName;
@@ -15402,11 +15558,12 @@ function forwardAwsEnv$1(env) {
15402
15558
  const value = process.env[key];
15403
15559
  if (value !== void 0) env[key] = value;
15404
15560
  }
15561
+ return applyWorkloadEnvCredentials(env);
15405
15562
  }
15406
15563
  async function assumeAgentCoreExecutionRole(roleArn, region, profile) {
15407
15564
  if (!isIamRoleArn(roleArn)) throw new AssumeRoleFailure(refusedRoleArnMessage(roleArn), `the role ARN is not well-formed: ${describeRejectedRoleArn(roleArn)}`);
15408
15565
  const { STSClient, AssumeRoleCommand } = await import("@aws-sdk/client-sts");
15409
- const sts = new STSClient(buildStsClientConfig({
15566
+ const sts = new STSClient(workloadStsClientConfig({
15410
15567
  region,
15411
15568
  profile
15412
15569
  }));
@@ -16009,12 +16166,12 @@ async function resolveEcsSecrets(entries, options = {}) {
16009
16166
  if (entries.length === 0) return [];
16010
16167
  const logger = getLogger().child("ecs-secrets");
16011
16168
  const secretsClient = options.secretsManagerClient ?? new SecretsManagerClient({
16012
- ...buildProxyClientConfig({ profile: options.profile }),
16169
+ ...workloadClientConfig({ profile: options.profile }),
16013
16170
  ...options.region && { region: options.region },
16014
16171
  ...options.profile && { profile: options.profile }
16015
16172
  });
16016
16173
  const ssmClient = options.ssmClient ?? new SSMClient({
16017
- ...buildProxyClientConfig({ profile: options.profile }),
16174
+ ...workloadClientConfig({ profile: options.profile }),
16018
16175
  ...options.region && { region: options.region },
16019
16176
  ...options.profile && { profile: options.profile }
16020
16177
  });
@@ -17381,7 +17538,7 @@ async function softReloadReplica(args) {
17381
17538
  const defaultDockerInspectWorkdirImpl = async (containerId) => {
17382
17539
  const { execFile } = await import("node:child_process");
17383
17540
  const { promisify } = await import("node:util");
17384
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17541
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17385
17542
  const { stdout } = await promisify(execFile)(getDockerCmd(), [
17386
17543
  "inspect",
17387
17544
  "--format",
@@ -17394,7 +17551,7 @@ let dockerInspectWorkdirImpl = defaultDockerInspectWorkdirImpl;
17394
17551
  const defaultDockerCpImpl = async (src, dst) => {
17395
17552
  const { execFile } = await import("node:child_process");
17396
17553
  const { promisify } = await import("node:util");
17397
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17554
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17398
17555
  await promisify(execFile)(getDockerCmd(), [
17399
17556
  "cp",
17400
17557
  src,
@@ -17405,7 +17562,7 @@ let dockerCpImpl = defaultDockerCpImpl;
17405
17562
  const defaultDockerRestartImpl = async (containerId) => {
17406
17563
  const { execFile } = await import("node:child_process");
17407
17564
  const { promisify } = await import("node:util");
17408
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17565
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17409
17566
  await promisify(execFile)(getDockerCmd(), ["restart", containerId]);
17410
17567
  };
17411
17568
  let dockerRestartImpl = defaultDockerRestartImpl;
@@ -17423,7 +17580,7 @@ async function disconnectOldFromSharedNetwork(oldInstance) {
17423
17580
  const defaultDockerNetworkDisconnectImpl = async (networkName, containerId) => {
17424
17581
  const { execFile } = await import("node:child_process");
17425
17582
  const { promisify } = await import("node:util");
17426
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17583
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17427
17584
  await promisify(execFile)(getDockerCmd(), [
17428
17585
  "network",
17429
17586
  "disconnect",
@@ -17563,7 +17720,7 @@ function pickEssentialContainerId(instance, service) {
17563
17720
  const defaultWaitForExitImpl = async (containerId) => {
17564
17721
  const { execFile } = await import("node:child_process");
17565
17722
  const { promisify } = await import("node:util");
17566
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17723
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17567
17724
  const { stdout } = await promisify(execFile)(getDockerCmd(), ["wait", containerId], { maxBuffer: 1024 * 1024 });
17568
17725
  const code = parseInt(stdout.trim(), 10);
17569
17726
  return Number.isFinite(code) ? code : -1;
@@ -17573,7 +17730,7 @@ const EXIT_LOG_TAIL_LINES = 50;
17573
17730
  const defaultReadContainerLogsImpl = async (containerId) => {
17574
17731
  const { execFile } = await import("node:child_process");
17575
17732
  const { promisify } = await import("node:util");
17576
- const { getDockerCmd } = await import("./docker-cmd-GME6jkl9.js").then((n) => n.t);
17733
+ const { getDockerCmd } = await import("./docker-cmd-BSdu45mc.js").then((n) => n.t);
17577
17734
  const { stdout, stderr } = await promisify(execFile)(getDockerCmd(), [
17578
17735
  "logs",
17579
17736
  "--tail",
@@ -18916,6 +19073,7 @@ function forwardAwsEnv() {
18916
19073
  const value = process.env[key];
18917
19074
  if (value !== void 0) env[key] = value;
18918
19075
  }
19076
+ if (applyWorkloadEnvCredentials(env) === "stripped" && !env["AWS_ACCESS_KEY_ID"]) warnWorkloadCredentialsStripped();
18919
19077
  return env;
18920
19078
  }
18921
19079
  function materializeInlineCode(handler, source, fileExtension) {
@@ -20363,7 +20521,7 @@ function describeForwardTargetForSummary(t) {
20363
20521
  async function resolvePlaceholderAccount$1(arn, region, profile) {
20364
20522
  if (!arn.includes("${AWS::AccountId}")) return arn;
20365
20523
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
20366
- const sts = new STSClient(buildStsClientConfig({
20524
+ const sts = new STSClient(deployAccountStsClientConfig({
20367
20525
  region,
20368
20526
  profile
20369
20527
  }));
@@ -20444,7 +20602,7 @@ function pickCandidateStack$1(stackPattern, stacks) {
20444
20602
  }
20445
20603
  async function resolveCallerAccountId$1(region, profile) {
20446
20604
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
20447
- const sts = new STSClient(buildStsClientConfig({
20605
+ const sts = new STSClient(deployAccountStsClientConfig({
20448
20606
  region,
20449
20607
  profile
20450
20608
  }));
@@ -20789,7 +20947,7 @@ var PlaceholderAccountError = class PlaceholderAccountError extends Error {
20789
20947
  async function resolvePlaceholderAccount(arn, region, profile) {
20790
20948
  if (!arn.includes("${AWS::AccountId}")) return arn;
20791
20949
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
20792
- const sts = new STSClient(buildStsClientConfig({
20950
+ const sts = new STSClient(deployAccountStsClientConfig({
20793
20951
  region,
20794
20952
  profile
20795
20953
  }));
@@ -20867,7 +21025,7 @@ function pickCandidateStack(stackPattern, stacks) {
20867
21025
  }
20868
21026
  async function resolveCallerAccountId(region, profile) {
20869
21027
  const { STSClient, GetCallerIdentityCommand } = await import("@aws-sdk/client-sts");
20870
- const sts = new STSClient(buildStsClientConfig({
21028
+ const sts = new STSClient(deployAccountStsClientConfig({
20871
21029
  region,
20872
21030
  profile
20873
21031
  }));
@@ -23130,7 +23288,7 @@ function defaultFetchObject(bucketName, options) {
23130
23288
  const { S3Client, GetObjectCommand } = await import("@aws-sdk/client-s3");
23131
23289
  return {
23132
23290
  client: new S3Client({
23133
- ...buildProxyClientConfig(),
23291
+ ...workloadClientConfig(),
23134
23292
  ...options.region && { region: options.region },
23135
23293
  ...options.credentials && { credentials: {
23136
23294
  accessKeyId: options.credentials.accessKeyId,
@@ -23197,7 +23355,7 @@ async function resolveDeployedOriginBucket(options) {
23197
23355
  async function defaultGetOrigins(options) {
23198
23356
  const { CloudFrontClient, GetDistributionConfigCommand } = await import("@aws-sdk/client-cloudfront");
23199
23357
  const client = new CloudFrontClient({
23200
- ...buildProxyClientConfig(),
23358
+ ...workloadClientConfig(),
23201
23359
  region: "us-east-1",
23202
23360
  ...options.credentials && { credentials: {
23203
23361
  accessKeyId: options.credentials.accessKeyId,
@@ -23216,7 +23374,7 @@ async function defaultGetOrigins(options) {
23216
23374
  //#region src/local/cloudfront-kvs-client.ts
23217
23375
  function createDeployedKvsDataSource(options) {
23218
23376
  const client = new CloudFrontKeyValueStoreClient({
23219
- ...buildProxyClientConfig(),
23377
+ ...workloadClientConfig(),
23220
23378
  region: options.region ?? "us-east-1",
23221
23379
  ...options.credentials !== void 0 && { credentials: options.credentials }
23222
23380
  });
@@ -23238,7 +23396,7 @@ function createDeployedKvsDataSource(options) {
23238
23396
  }
23239
23397
  async function resolveDeployedKvsArnByName(name, options = {}) {
23240
23398
  const client = new CloudFrontClient({
23241
- ...buildProxyClientConfig(),
23399
+ ...workloadClientConfig(),
23242
23400
  region: options.region ?? "us-east-1",
23243
23401
  ...options.credentials !== void 0 && { credentials: options.credentials }
23244
23402
  });
@@ -23449,7 +23607,7 @@ async function bootLambdaUrlOrigins(distribution, stacks, opts) {
23449
23607
  for (const functionLogicalId of functionLogicalIds) {
23450
23608
  let runner;
23451
23609
  try {
23452
- const lambda = resolveLambdaTarget(functionLogicalId, stacks);
23610
+ const lambda = resolveLambdaTarget(`${distribution.stackName}:${functionLogicalId}`, stacks);
23453
23611
  const containerEnv = await resolveLambdaContainerEnv(lambda, opts.envOptions, opts.profileCredentials, opts.extraStateProviders);
23454
23612
  runner = createFrontDoorLambdaRunner(lambda, {
23455
23613
  containerHost: opts.containerHost,
@@ -23488,7 +23646,7 @@ async function bootLambdaEdgeFunctions(distribution, stacks, opts) {
23488
23646
  ]) if (assoc) functionLogicalIds.add(assoc.functionLogicalId);
23489
23647
  }
23490
23648
  for (const functionLogicalId of functionLogicalIds) try {
23491
- const lambda = resolveLambdaTarget(functionLogicalId, stacks);
23649
+ const lambda = resolveLambdaTarget(`${distribution.stackName}:${functionLogicalId}`, stacks);
23492
23650
  const containerEnv = await resolveLambdaContainerEnv(lambda, opts.envOptions, opts.profileCredentials, opts.extraStateProviders);
23493
23651
  const runner = createFrontDoorLambdaRunner(lambda, {
23494
23652
  containerHost: opts.containerHost,
@@ -29707,5 +29865,5 @@ function addStudioSpecificOptions(cmd) {
29707
29865
  }
29708
29866
 
29709
29867
  //#endregion
29710
- export { applyEdgeResponseResult as $, buildJwksUrlFromIssuer as $n, resolveCfnStackName as $r, buildCloudMapIndex as $t, startAgentCoreHttpServer as A, DynamicReferenceResolver as Ai, classifySourceChange as An, ConnectionRegistry as Ar, addRunTaskSpecificOptions as At, idFromArn as B, resolveProfileCredentials as Bi, buildStageMap as Bn, resolveRuntimeFileExtension as Br, resolveEcsAssumeRoleOption as Bt, addListSpecificOptions as C, resolveAgentCoreTarget as Ci, waitForAgentCorePing as Cn, tryParseStatus as Cr, parseLbPortOverrides as Ct, createLocalStartAgentCoreCommand as D, tryResolveImageFnJoin as Di, computeCodeImageTag as Dn, probeHostGatewaySupport as Dr, addStartServiceSpecificOptions as Dt, addStartAgentCoreSpecificOptions as E, substituteImagePlaceholders as Ei, buildAgentCoreCodeImage as En, HOST_GATEWAY_MIN_VERSION as Er, resolveAlbFrontDoor as Et, createLocalStartCloudFrontCommand as F, keysOverriddenBy as Fi, createWatchPredicates as Fn, buildDisconnectEvent as Fr, addImageOverrideOptions as Ft, classifyS3Error as G, filterRoutesByApiIdentifiers as Gn, substituteEnvVarsFromState as Gr, enforceImageOverrideOrphans as Gt, createDeployedKvsDataSource as H, isProxyEnvConfigured as Hi, resolveEnvVars$1 as Hn, EcsTaskResolutionError as Hr, runEcsServiceEmulator as Ht, normalizeKvsFileKeys as I, parseDynamicReference as Ii, resolveApiTargetSubset as In, buildMessageEvent as Ir, buildEcsImageResolutionContext$1 as It, startCloudFrontServer as J, startApiServer as Jn, createLocalStateProvider as Jr, resolveImageOverrides as Jt, createS3OriginReader as K, groupRoutesByServer as Kn, substituteEnvVarsFromStateAsync as Kr, mergeForService as Kt, parseKvsFileOverrides as L, resolveDynamicReferencesInEnv as Li, createAuthorizerCache as Ln, architectureToPlatform as Lr, ecsClusterOption as Lt, startAgentCoreWsBridge as M, deployedFillMayBeSecret as Mi, createLocalInvokeCommand as Mn, handleConnectionsRequest as Mr, MAX_TASKS_SUBNET_RANGE_CAP as Mt, LocalStartCloudFrontError as N, firstUsableRegion as Ni, addStartApiSpecificOptions as Nn, parseConnectionsPath as Nr, addCommonEcsServiceOptions as Nt, buildAgentCoreServeAuthCheck as O, LocalInvokeBuildError as Oi, renderCodeDockerfile as On, resolveHostGatewayExtraHosts as Or, createLocalStartServiceCommand as Ot, addStartCloudFrontSpecificOptions as P, keysNotFromTemplate as Pi, createLocalStartApiCommand as Pn, buildConnectEvent as Pr, addEcsAssumeRoleOptions as Pt, applyEdgeRequestResult as Q, buildCognitoJwksUrl as Qn, resolveCfnRegion as Qr, listPinnedTargets as Qt, parseOriginOverrides as R, withoutKeys as Ri, createFileWatcher as Rn, buildContainerImage as Rr, parseMaxTasks as Rt, StudioEventBus as S, pickAgentCoreCandidateStack as Si, waitForAgentCoreHttpReady as Sn, selectIntegrationResponse as Sr, createLocalStartAlbCommand as St, formatTargetListing as T, formatStateRemedy as Ti, SUPPORTED_CODE_RUNTIMES as Tn, HOST_DOCKER_INTERNAL_GATEWAY as Tr, isApplicationLoadBalancer as Tt, resolveDeployedKvsArnByName as U, availableApiIdentifiers as Un, substituteAgainstState as Ur, ImageOverrideError as Ut, resolveKvsModulesForDistribution as V, buildProxyClientConfig as Vi, materializeLayerFromArn as Vn, resolveRuntimeImage as Vr, resolveSharedSidecarCredentials as Vt, resolveDeployedOriginBucket as W, filterRoutesByApiIdentifier as Wn, substituteAgainstStateAsync as Wr, buildImageOverrideTag as Wt, serveFromStaticOrigin as X, resolveServiceIntegrationParameters as Xn, rejectExplicitCfnStackWithMultipleStacks as Xr, describePinnedImageUri as Xt, resolveErrorResponseCandidates as Y, resolveSelectionExpression as Yn, isCfnFlagPresent as Yr, runImageOverrideBuilds as Yt, serveLambdaUrlOrigin as Z, defaultCredentialsLoader as Zn, resolveCfnFallbackRegion as Zr, isLocalCdkAssetImage as Zt, filterStudioTargetGroups as _, AGENTCORE_AGUI_PROTOCOL as _i, parseSseForJsonRpc as _n, applyAuthorizerOverlay as _r, createCloudFrontModule as _t, createLocalStudioCommand as a, countTargets as ai, attachContainerLogStreamer as an, computeRequestIdentityHash as ar, describeS3OriginDomain as at, renderStudioHtml as b, AGENTCORE_RUNTIME_TYPE as bi, AGENTCORE_SESSION_ID_HEADER as bn, evaluateResponseParameters as br, addAlbSpecificOptions as bt, startStudioProxy as c, discoverWebSocketApis as ci, bridgeAgentCoreWs as cn, invokeTokenAuthorizer as cr, pickFunctionUrlLogicalIdFromOrigin as ct, createStudioDispatcher as d, parseSelectionExpressionPath as di, A2A_PATH as dn, buildCorsConfigByApiId as dr, pickTargetFunctionLogicalId as dt, CfnLocalStateProvider as ei, CloudMapRegistry as en, createJwksCache as er, buildEdgeRequestEvent as et, filterStudioCustomResources as f, webSocketApiMatchesIdentifier as fi, a2aInvokeOnce as fn, buildCorsConfigFromCloudFrontChain as fr, resolveCloudFrontDistribution as ft, annotatePinnedEcsTargets as g, AGENTCORE_A2A_PROTOCOL as gi, mcpInvokeOnce as gn, translateLambdaResponse as gr, stripCloudFrontImport as gt, annotateEcsTaskPinnedTargets as h, resolveLambdaArnIntrinsic as hi, MCP_PROTOCOL_VERSION as hn, matchRoute as hr, runViewerResponse as ht, coerceStopRequest as i, resolveSingleTarget as ii, getContainerNetworkIp as in, buildMethodArn as ir, CLOUDFRONT_DISTRIBUTION_TYPE as it, attachAgentCoreWsBridge as j, containsDynamicReference as ji, addInvokeSpecificOptions as jn, buildMgmtEndpointEnvUrl as jr, createLocalRunTaskCommand as jt, selectServeInboundAuth as k, DynamicReferenceResolutionError as ki, toCmdArgv as kn, bufferToBody as kr, serviceStrategy as kt, relayServeRequest as l, discoverWebSocketApisOrThrow as li, invokeAgentCoreWs as ln, attachAuthorizers as lr, pickKvsLogicalIdFromArn as lt, annotateAlbPinnedBackingServices as m, pickRefLogicalId as mi, MCP_PATH as mn, matchPreflight as mr, runViewerRequest as mt, coerceRunRequest as n, resolveSsmParameters as ni, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as nn, verifyJwtAuthorizer as nr, edgeHeadersToHttp as nt, resolveServeBaseUrl as o, listTargets as oi, addInvokeAgentCoreSpecificOptions as on, evaluateCachedLambdaPolicy as or, extractKvsAssociations as ot, isCustomResourceLambdaTarget as p, discoverRoutes as pi, MCP_CONTAINER_PORT as pn, isFunctionUrlOacFronted as pr, compileCloudFrontFunction as pt, matchBehavior as q, readMtlsMaterialsFromDisk as qn, LocalStateSourceError as qr, parseImageOverrideFlags as qt, coerceServeRequest as r, resolveWatchConfig as ri, setShadowReadyTimeoutMs as rn, verifyJwtViaDiscovery as rr, httpHeadersToEdge as rt, createStudioServeManager as s, availableWebSocketApiIdentifiers as si, createLocalInvokeAgentCoreCommand as sn, invokeRequestAuthorizer as sr, isCloudFrontDistribution as st, addStudioSpecificOptions as t, collectSsmParameterRefs as ti, DEFAULT_SHADOW_READY_TIMEOUT_MS as tn, verifyCognitoJwt as tr, buildEdgeResponseEvent as tt, reinvoke as u, filterWebSocketApisByIdentifiers as ui, A2A_CONTAINER_PORT as un, applyCorsResponseHeaders as ur, pickLambdaEdgeFunctionLogicalId as ut, startStudioServer as v, AGENTCORE_HTTP_PROTOCOL as vi, AGENTCORE_SIGV4_SERVICE as vn, buildHttpApiV2Event as vr, createLocalFileKvsDataSource as vt, createLocalListCommand as w, derivePseudoParametersFromRegion as wi, downloadAndExtractS3Bundle as wn, VtlEvaluationError as wr, resolveAlbTarget as wt, createStudioStore as x, AgentCoreResolutionError as xi, invokeAgentCore as xn, pickResponseTemplate as xr, albStrategy as xt, toStudioTargetGroups as y, AGENTCORE_MCP_PROTOCOL as yi, signAgentCoreInvocation as yn, buildRestV1Event as yr, createUnboundCloudFrontModule as yt, resolveCloudFrontTarget as z, buildStsClientConfig as zi, attachStageContext as zn, resolveRuntimeCodeMountPath as zr, parseRestartPolicy as zt };
29711
- //# sourceMappingURL=local-studio-a7HMFLOC.js.map
29868
+ export { applyEdgeResponseResult as $, buildJwksUrlFromIssuer as $n, resolveCfnStackName as $r, buildCloudMapIndex as $t, startAgentCoreHttpServer as A, DynamicReferenceResolver as Ai, classifySourceChange as An, ConnectionRegistry as Ar, addRunTaskSpecificOptions as At, idFromArn as B, assumedRoleRecorded as Bi, buildStageMap as Bn, resolveRuntimeFileExtension as Br, resolveEcsAssumeRoleOption as Bt, addListSpecificOptions as C, resolveAgentCoreTarget as Ci, waitForAgentCorePing as Cn, tryParseStatus as Cr, parseLbPortOverrides as Ct, createLocalStartAgentCoreCommand as D, tryResolveImageFnJoin as Di, computeCodeImageTag as Dn, probeHostGatewaySupport as Dr, addStartServiceSpecificOptions as Dt, addStartAgentCoreSpecificOptions as E, substituteImagePlaceholders as Ei, buildAgentCoreCodeImage as En, HOST_GATEWAY_MIN_VERSION as Er, resolveAlbFrontDoor as Et, createLocalStartCloudFrontCommand as F, keysOverriddenBy as Fi, createWatchPredicates as Fn, buildDisconnectEvent as Fr, addImageOverrideOptions as Ft, classifyS3Error as G, workloadClientConfig as Gi, filterRoutesByApiIdentifiers as Gn, substituteEnvVarsFromState as Gr, enforceImageOverrideOrphans as Gt, createDeployedKvsDataSource as H, readEnvCallerCredentials as Hi, resolveEnvVars$1 as Hn, EcsTaskResolutionError as Hr, runEcsServiceEmulator as Ht, normalizeKvsFileKeys as I, parseDynamicReference as Ii, resolveApiTargetSubset as In, buildMessageEvent as Ir, buildEcsImageResolutionContext$1 as It, startCloudFrontServer as J, resolveProfileCredentials as Ji, startApiServer as Jn, createLocalStateProvider as Jr, resolveImageOverrides as Jt, createS3OriginReader as K, workloadStsClientConfig as Ki, groupRoutesByServer as Kn, substituteEnvVarsFromStateAsync as Kr, mergeForService as Kt, parseKvsFileOverrides as L, resolveDynamicReferencesInEnv as Li, createAuthorizerCache as Ln, architectureToPlatform as Lr, ecsClusterOption as Lt, startAgentCoreWsBridge as M, deployedFillMayBeSecret as Mi, createLocalInvokeCommand as Mn, handleConnectionsRequest as Mr, MAX_TASKS_SUBNET_RANGE_CAP as Mt, LocalStartCloudFrontError as N, firstUsableRegion as Ni, addStartApiSpecificOptions as Nn, parseConnectionsPath as Nr, addCommonEcsServiceOptions as Nt, buildAgentCoreServeAuthCheck as O, LocalInvokeBuildError as Oi, renderCodeDockerfile as On, resolveHostGatewayExtraHosts as Or, createLocalStartServiceCommand as Ot, addStartCloudFrontSpecificOptions as P, keysNotFromTemplate as Pi, createLocalStartApiCommand as Pn, buildConnectEvent as Pr, addEcsAssumeRoleOptions as Pt, applyEdgeRequestResult as Q, buildCognitoJwksUrl as Qn, resolveCfnRegion as Qr, listPinnedTargets as Qt, parseOriginOverrides as R, withoutKeys as Ri, createFileWatcher as Rn, buildContainerImage as Rr, parseMaxTasks as Rt, StudioEventBus as S, pickAgentCoreCandidateStack as Si, waitForAgentCoreHttpReady as Sn, selectIntegrationResponse as Sr, createLocalStartAlbCommand as St, formatTargetListing as T, formatStateRemedy as Ti, SUPPORTED_CODE_RUNTIMES as Tn, HOST_DOCKER_INTERNAL_GATEWAY as Tr, isApplicationLoadBalancer as Tt, resolveDeployedKvsArnByName as U, recordAssumedRole as Ui, availableApiIdentifiers as Un, substituteAgainstState as Ur, ImageOverrideError as Ut, resolveKvsModulesForDistribution as V, deployAccountStsClientConfig as Vi, materializeLayerFromArn as Vn, resolveRuntimeImage as Vr, resolveSharedSidecarCredentials as Vt, resolveDeployedOriginBucket as W, resetWorkloadIdentity as Wi, filterRoutesByApiIdentifier as Wn, substituteAgainstStateAsync as Wr, buildImageOverrideTag as Wt, serveFromStaticOrigin as X, isProxyEnvConfigured as Xi, resolveServiceIntegrationParameters as Xn, rejectExplicitCfnStackWithMultipleStacks as Xr, describePinnedImageUri as Xt, resolveErrorResponseCandidates as Y, buildProxyClientConfig as Yi, resolveSelectionExpression as Yn, isCfnFlagPresent as Yr, runImageOverrideBuilds as Yt, serveLambdaUrlOrigin as Z, defaultCredentialsLoader as Zn, resolveCfnFallbackRegion as Zr, isLocalCdkAssetImage as Zt, filterStudioTargetGroups as _, AGENTCORE_AGUI_PROTOCOL as _i, parseSseForJsonRpc as _n, applyAuthorizerOverlay as _r, createCloudFrontModule as _t, createLocalStudioCommand as a, countTargets as ai, attachContainerLogStreamer as an, computeRequestIdentityHash as ar, describeS3OriginDomain as at, renderStudioHtml as b, AGENTCORE_RUNTIME_TYPE as bi, AGENTCORE_SESSION_ID_HEADER as bn, evaluateResponseParameters as br, addAlbSpecificOptions as bt, startStudioProxy as c, discoverWebSocketApis as ci, bridgeAgentCoreWs as cn, invokeTokenAuthorizer as cr, pickFunctionUrlLogicalIdFromOrigin as ct, createStudioDispatcher as d, parseSelectionExpressionPath as di, A2A_PATH as dn, buildCorsConfigByApiId as dr, pickTargetFunctionLogicalId as dt, CfnLocalStateProvider as ei, CloudMapRegistry as en, createJwksCache as er, buildEdgeRequestEvent as et, filterStudioCustomResources as f, webSocketApiMatchesIdentifier as fi, a2aInvokeOnce as fn, buildCorsConfigFromCloudFrontChain as fr, resolveCloudFrontDistribution as ft, annotatePinnedEcsTargets as g, AGENTCORE_A2A_PROTOCOL as gi, mcpInvokeOnce as gn, translateLambdaResponse as gr, stripCloudFrontImport as gt, annotateEcsTaskPinnedTargets as h, resolveLambdaArnIntrinsic as hi, MCP_PROTOCOL_VERSION as hn, matchRoute as hr, runViewerResponse as ht, coerceStopRequest as i, resolveSingleTarget as ii, getContainerNetworkIp as in, buildMethodArn as ir, CLOUDFRONT_DISTRIBUTION_TYPE as it, attachAgentCoreWsBridge as j, containsDynamicReference as ji, addInvokeSpecificOptions as jn, buildMgmtEndpointEnvUrl as jr, createLocalRunTaskCommand as jt, selectServeInboundAuth as k, DynamicReferenceResolutionError as ki, toCmdArgv as kn, bufferToBody as kr, serviceStrategy as kt, relayServeRequest as l, discoverWebSocketApisOrThrow as li, invokeAgentCoreWs as ln, attachAuthorizers as lr, pickKvsLogicalIdFromArn as lt, annotateAlbPinnedBackingServices as m, pickRefLogicalId as mi, MCP_PATH as mn, matchPreflight as mr, runViewerRequest as mt, coerceRunRequest as n, resolveSsmParameters as ni, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as nn, verifyJwtAuthorizer as nr, edgeHeadersToHttp as nt, resolveServeBaseUrl as o, listTargets as oi, addInvokeAgentCoreSpecificOptions as on, evaluateCachedLambdaPolicy as or, extractKvsAssociations as ot, isCustomResourceLambdaTarget as p, discoverRoutes as pi, MCP_CONTAINER_PORT as pn, isFunctionUrlOacFronted as pr, compileCloudFrontFunction as pt, matchBehavior as q, buildStsClientConfig as qi, readMtlsMaterialsFromDisk as qn, LocalStateSourceError as qr, parseImageOverrideFlags as qt, coerceServeRequest as r, resolveWatchConfig as ri, setShadowReadyTimeoutMs as rn, verifyJwtViaDiscovery as rr, httpHeadersToEdge as rt, createStudioServeManager as s, availableWebSocketApiIdentifiers as si, createLocalInvokeAgentCoreCommand as sn, invokeRequestAuthorizer as sr, isCloudFrontDistribution as st, addStudioSpecificOptions as t, collectSsmParameterRefs as ti, DEFAULT_SHADOW_READY_TIMEOUT_MS as tn, verifyCognitoJwt as tr, buildEdgeResponseEvent as tt, reinvoke as u, filterWebSocketApisByIdentifiers as ui, A2A_CONTAINER_PORT as un, applyCorsResponseHeaders as ur, pickLambdaEdgeFunctionLogicalId as ut, startStudioServer as v, AGENTCORE_HTTP_PROTOCOL as vi, AGENTCORE_SIGV4_SERVICE as vn, buildHttpApiV2Event as vr, createLocalFileKvsDataSource as vt, createLocalListCommand as w, derivePseudoParametersFromRegion as wi, downloadAndExtractS3Bundle as wn, VtlEvaluationError as wr, resolveAlbTarget as wt, createStudioStore as x, AgentCoreResolutionError as xi, invokeAgentCore as xn, pickResponseTemplate as xr, albStrategy as xt, toStudioTargetGroups as y, AGENTCORE_MCP_PROTOCOL as yi, signAgentCoreInvocation as yn, buildRestV1Event as yr, createUnboundCloudFrontModule as yt, resolveCloudFrontTarget as z, SECOND_ASSUME_MESSAGE as zi, attachStageContext as zn, resolveRuntimeCodeMountPath as zr, parseRestartPolicy as zt };
29869
+ //# sourceMappingURL=local-studio-DIB4WEk6.js.map