cdk-local 0.147.7 → 0.147.9

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/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { D as createLocalStartAgentCoreCommand, F as createLocalStartCloudFrontCommand, Mn as createLocalInvokeCommand, Ot as createLocalStartServiceCommand, Pn as createLocalStartApiCommand, St as createLocalStartAlbCommand, a as createLocalStudioCommand, jt as createLocalRunTaskCommand, sn as createLocalInvokeAgentCoreCommand, w as createLocalListCommand } from "./local-studio-BBtUAVNy.js";
2
+ import { D as createLocalStartAgentCoreCommand, F as createLocalStartCloudFrontCommand, Mn as createLocalInvokeCommand, Ot as createLocalStartServiceCommand, Pn as createLocalStartApiCommand, St as createLocalStartAlbCommand, a as createLocalStudioCommand, jt as createLocalRunTaskCommand, sn as createLocalInvokeAgentCoreCommand, w as createLocalListCommand } from "./local-studio-xigfWo5b.js";
3
3
  import { Command } from "commander";
4
4
 
5
5
  //#region src/cli/index.ts
6
6
  const program = new Command();
7
- program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.147.7");
7
+ program.name("cdkl").description("Run AWS CDK stacks locally with Docker.").version("0.147.9");
8
8
  program.addCommand(createLocalInvokeCommand());
9
9
  program.addCommand(createLocalInvokeAgentCoreCommand());
10
10
  program.addCommand(createLocalStartApiCommand());
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { d as setEmbedConfig, l as getEmbedConfig, u as resetEmbedConfig } from "./docker-cmd-DLX1TqVw.js";
2
- import { $r as resolveCfnStackName, D as createLocalStartAgentCoreCommand, F as createLocalStartCloudFrontCommand, Gr as substituteEnvVarsFromState, Jr as createLocalStateProvider, Kr as substituteEnvVarsFromStateAsync, Mn as createLocalInvokeCommand, Ot as createLocalStartServiceCommand, Pn as createLocalStartApiCommand, Qr as resolveCfnRegion, St as createLocalStartAlbCommand, T as formatTargetListing, Ur as substituteAgainstState, Wr as substituteAgainstStateAsync, Xr as rejectExplicitCfnStackWithMultipleStacks, Yr as isCfnFlagPresent, Zr as resolveCfnFallbackRegion, a as createLocalStudioCommand, ai as countTargets, ei as CfnLocalStateProvider, jt as createLocalRunTaskCommand, ni as resolveSsmParameters, oi as listTargets, qr as LocalStateSourceError, sn as createLocalInvokeAgentCoreCommand, ti as collectSsmParameterRefs, w as createLocalListCommand } from "./local-studio-BBtUAVNy.js";
2
+ import { $r as resolveCfnStackName, D as createLocalStartAgentCoreCommand, F as createLocalStartCloudFrontCommand, Gr as substituteEnvVarsFromState, Jr as createLocalStateProvider, Kr as substituteEnvVarsFromStateAsync, Mn as createLocalInvokeCommand, Ot as createLocalStartServiceCommand, Pn as createLocalStartApiCommand, Qr as resolveCfnRegion, St as createLocalStartAlbCommand, T as formatTargetListing, Ur as substituteAgainstState, Wr as substituteAgainstStateAsync, Xr as rejectExplicitCfnStackWithMultipleStacks, Yr as isCfnFlagPresent, Zr as resolveCfnFallbackRegion, a as createLocalStudioCommand, ai as countTargets, ei as CfnLocalStateProvider, jt as createLocalRunTaskCommand, ni as resolveSsmParameters, oi as listTargets, qr as LocalStateSourceError, sn as createLocalInvokeAgentCoreCommand, ti as collectSsmParameterRefs, w as createLocalListCommand } from "./local-studio-xigfWo5b.js";
3
3
 
4
4
  export { CfnLocalStateProvider, LocalStateSourceError, collectSsmParameterRefs, countTargets, createLocalInvokeAgentCoreCommand, createLocalInvokeCommand, createLocalListCommand, createLocalRunTaskCommand, createLocalStartAgentCoreCommand, createLocalStartAlbCommand, createLocalStartApiCommand, createLocalStartCloudFrontCommand, createLocalStartServiceCommand, createLocalStateProvider, createLocalStudioCommand, formatTargetListing, getEmbedConfig, isCfnFlagPresent, listTargets, rejectExplicitCfnStackWithMultipleStacks, resetEmbedConfig, resolveCfnFallbackRegion, resolveCfnRegion, resolveCfnStackName, resolveSsmParameters, setEmbedConfig, substituteAgainstState, substituteAgainstStateAsync, substituteEnvVarsFromState, substituteEnvVarsFromStateAsync };
package/dist/internal.js CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as applyEdgeResponseResult, $n as buildJwksUrlFromIssuer, $t as buildCloudMapIndex, A as startAgentCoreHttpServer, Ai as resolveProfileCredentials, An as classifySourceChange, Ar as ConnectionRegistry, At as addRunTaskSpecificOptions, B as idFromArn, Bn as buildStageMap, Br as resolveRuntimeFileExtension, Bt as resolveEcsAssumeRoleOption, C as addListSpecificOptions, Ci as resolveAgentCoreTarget, Cn as waitForAgentCorePing, Cr as tryParseStatus, Ct as parseLbPortOverrides, Di as tryResolveImageFnJoin, Dn as computeCodeImageTag, Dr as probeHostGatewaySupport, Dt as addStartServiceSpecificOptions, E as addStartAgentCoreSpecificOptions, Ei as substituteImagePlaceholders, En as buildAgentCoreCodeImage, Er as HOST_GATEWAY_MIN_VERSION, Et as resolveAlbFrontDoor, Fn as createWatchPredicates, Fr as buildDisconnectEvent, Ft as addImageOverrideOptions, G as classifyS3Error, Gn as filterRoutesByApiIdentifiers, Gt as enforceImageOverrideOrphans, H as createDeployedKvsDataSource, Hn as resolveEnvVars, Hr as EcsTaskResolutionError, Ht as runEcsServiceEmulator, I as normalizeKvsFileKeys, In as resolveApiTargetSubset, Ir as buildMessageEvent, It as buildEcsImageResolutionContext, J as startCloudFrontServer, Jn as startApiServer, Jt as resolveImageOverrides, K as createS3OriginReader, Kn as groupRoutesByServer, Kt as mergeForService, L as parseKvsFileOverrides, Ln as createAuthorizerCache, Lr as architectureToPlatform, Lt as ecsClusterOption, M as startAgentCoreWsBridge, Mr as handleConnectionsRequest, Mt as MAX_TASKS_SUBNET_RANGE_CAP, N as LocalStartCloudFrontError, Nn as addStartApiSpecificOptions, Nr as parseConnectionsPath, Nt as addCommonEcsServiceOptions, O as buildAgentCoreServeAuthCheck, Oi as LocalInvokeBuildError, On as renderCodeDockerfile, Or as resolveHostGatewayExtraHosts, P as addStartCloudFrontSpecificOptions, Pr as buildConnectEvent, Pt as addEcsAssumeRoleOptions, Q as applyEdgeRequestResult, Qn as buildCognitoJwksUrl, Qt as listPinnedTargets, R as parseOriginOverrides, Rn as createFileWatcher, Rr as buildContainerImage, Rt as parseMaxTasks, S as StudioEventBus, Si as pickAgentCoreCandidateStack, Sn as waitForAgentCoreHttpReady, Sr as selectIntegrationResponse, Ti as formatStateRemedy, Tn as SUPPORTED_CODE_RUNTIMES, Tr as HOST_DOCKER_INTERNAL_GATEWAY, Tt as isApplicationLoadBalancer, U as resolveDeployedKvsArnByName, Un as availableApiIdentifiers, Ut as ImageOverrideError, V as resolveKvsModulesForDistribution, Vn as materializeLayerFromArn, Vr as resolveRuntimeImage, Vt as resolveSharedSidecarCredentials, W as resolveDeployedOriginBucket, Wn as filterRoutesByApiIdentifier, Wt as buildImageOverrideTag, X as serveFromStaticOrigin, Xn as resolveServiceIntegrationParameters, Xt as describePinnedImageUri, Y as resolveErrorResponseCandidates, Yn as resolveSelectionExpression, Yt as runImageOverrideBuilds, Z as serveLambdaUrlOrigin, Zn as defaultCredentialsLoader, Zt as isLocalCdkAssetImage, _ as filterStudioTargetGroups, _i as AGENTCORE_AGUI_PROTOCOL, _n as parseSseForJsonRpc, _r as applyAuthorizerOverlay, _t as createCloudFrontModule, an as attachContainerLogStreamer, ar as computeRequestIdentityHash, at as describeS3OriginDomain, b as renderStudioHtml, bi as AGENTCORE_RUNTIME_TYPE, bn as AGENTCORE_SESSION_ID_HEADER, br as evaluateResponseParameters, bt as addAlbSpecificOptions, c as startStudioProxy, ci as discoverWebSocketApis, cn as bridgeAgentCoreWs, cr as invokeTokenAuthorizer, ct as pickFunctionUrlLogicalIdFromOrigin, d as createStudioDispatcher, di as parseSelectionExpressionPath, dn as A2A_PATH, dr as buildCorsConfigByApiId, dt as pickTargetFunctionLogicalId, en as CloudMapRegistry, er as createJwksCache, et as buildEdgeRequestEvent, f as filterStudioCustomResources, fi as webSocketApiMatchesIdentifier, fn as a2aInvokeOnce, fr as buildCorsConfigFromCloudFrontChain, ft as resolveCloudFrontDistribution, g as annotatePinnedEcsTargets, gi as AGENTCORE_A2A_PROTOCOL, gn as mcpInvokeOnce, gr as translateLambdaResponse, gt as stripCloudFrontImport, h as annotateEcsTaskPinnedTargets, hi as resolveLambdaArnIntrinsic, hn as MCP_PROTOCOL_VERSION, hr as matchRoute, ht as runViewerResponse, i as coerceStopRequest, ii as resolveSingleTarget, in as getContainerNetworkIp, ir as buildMethodArn, it as CLOUDFRONT_DISTRIBUTION_TYPE, j as attachAgentCoreWsBridge, jn as addInvokeSpecificOptions, jr as buildMgmtEndpointEnvUrl, k as selectServeInboundAuth, ki as buildStsClientConfig, kn as toCmdArgv, kr as bufferToBody, kt as serviceStrategy, l as relayServeRequest, li as discoverWebSocketApisOrThrow, ln as invokeAgentCoreWs, lr as attachAuthorizers, lt as pickKvsLogicalIdFromArn, m as annotateAlbPinnedBackingServices, mi as pickRefLogicalId, mn as MCP_PATH, mr as matchPreflight, mt as runViewerRequest, n as coerceRunRequest, nn as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, nr as verifyJwtAuthorizer, nt as edgeHeadersToHttp, o as resolveServeBaseUrl, on as addInvokeAgentCoreSpecificOptions, or as evaluateCachedLambdaPolicy, ot as extractKvsAssociations, p as isCustomResourceLambdaTarget, pi as discoverRoutes, pn as MCP_CONTAINER_PORT, pr as isFunctionUrlOacFronted, pt as compileCloudFrontFunction, q as matchBehavior, qn as readMtlsMaterialsFromDisk, qt as parseImageOverrideFlags, r as coerceServeRequest, ri as resolveWatchConfig, rn as setShadowReadyTimeoutMs, rr as verifyJwtViaDiscovery, rt as httpHeadersToEdge, s as createStudioServeManager, si as availableWebSocketApiIdentifiers, sr as invokeRequestAuthorizer, st as isCloudFrontDistribution, t as addStudioSpecificOptions, tn as DEFAULT_SHADOW_READY_TIMEOUT_MS, tr as verifyCognitoJwt, tt as buildEdgeResponseEvent, u as reinvoke, ui as filterWebSocketApisByIdentifiers, un as A2A_CONTAINER_PORT, ur as applyCorsResponseHeaders, ut as pickLambdaEdgeFunctionLogicalId, v as startStudioServer, vi as AGENTCORE_HTTP_PROTOCOL, vn as AGENTCORE_SIGV4_SERVICE, vr as buildHttpApiV2Event, vt as createLocalFileKvsDataSource, wi as derivePseudoParametersFromRegion, wn as downloadAndExtractS3Bundle, wr as VtlEvaluationError, wt as resolveAlbTarget, x as createStudioStore, xi as AgentCoreResolutionError, xn as invokeAgentCore, xr as pickResponseTemplate, xt as albStrategy, y as toStudioTargetGroups, yi as AGENTCORE_MCP_PROTOCOL, yn as signAgentCoreInvocation, yr as buildRestV1Event, yt as createUnboundCloudFrontModule, z as resolveCloudFrontTarget, zn as attachStageContext, zr as resolveRuntimeCodeMountPath, zt as parseRestartPolicy } from "./local-studio-BBtUAVNy.js";
1
+ import { $ as applyEdgeResponseResult, $n as buildJwksUrlFromIssuer, $t as buildCloudMapIndex, A as startAgentCoreHttpServer, Ai as resolveProfileCredentials, An as classifySourceChange, Ar as ConnectionRegistry, At as addRunTaskSpecificOptions, B as idFromArn, Bn as buildStageMap, Br as resolveRuntimeFileExtension, Bt as resolveEcsAssumeRoleOption, C as addListSpecificOptions, Ci as resolveAgentCoreTarget, Cn as waitForAgentCorePing, Cr as tryParseStatus, Ct as parseLbPortOverrides, Di as tryResolveImageFnJoin, Dn as computeCodeImageTag, Dr as probeHostGatewaySupport, Dt as addStartServiceSpecificOptions, E as addStartAgentCoreSpecificOptions, Ei as substituteImagePlaceholders, En as buildAgentCoreCodeImage, Er as HOST_GATEWAY_MIN_VERSION, Et as resolveAlbFrontDoor, Fn as createWatchPredicates, Fr as buildDisconnectEvent, Ft as addImageOverrideOptions, G as classifyS3Error, Gn as filterRoutesByApiIdentifiers, Gt as enforceImageOverrideOrphans, H as createDeployedKvsDataSource, Hn as resolveEnvVars, Hr as EcsTaskResolutionError, Ht as runEcsServiceEmulator, I as normalizeKvsFileKeys, In as resolveApiTargetSubset, Ir as buildMessageEvent, It as buildEcsImageResolutionContext, J as startCloudFrontServer, Jn as startApiServer, Jt as resolveImageOverrides, K as createS3OriginReader, Kn as groupRoutesByServer, Kt as mergeForService, L as parseKvsFileOverrides, Ln as createAuthorizerCache, Lr as architectureToPlatform, Lt as ecsClusterOption, M as startAgentCoreWsBridge, Mr as handleConnectionsRequest, Mt as MAX_TASKS_SUBNET_RANGE_CAP, N as LocalStartCloudFrontError, Nn as addStartApiSpecificOptions, Nr as parseConnectionsPath, Nt as addCommonEcsServiceOptions, O as buildAgentCoreServeAuthCheck, Oi as LocalInvokeBuildError, On as renderCodeDockerfile, Or as resolveHostGatewayExtraHosts, P as addStartCloudFrontSpecificOptions, Pr as buildConnectEvent, Pt as addEcsAssumeRoleOptions, Q as applyEdgeRequestResult, Qn as buildCognitoJwksUrl, Qt as listPinnedTargets, R as parseOriginOverrides, Rn as createFileWatcher, Rr as buildContainerImage, Rt as parseMaxTasks, S as StudioEventBus, Si as pickAgentCoreCandidateStack, Sn as waitForAgentCoreHttpReady, Sr as selectIntegrationResponse, Ti as formatStateRemedy, Tn as SUPPORTED_CODE_RUNTIMES, Tr as HOST_DOCKER_INTERNAL_GATEWAY, Tt as isApplicationLoadBalancer, U as resolveDeployedKvsArnByName, Un as availableApiIdentifiers, Ut as ImageOverrideError, V as resolveKvsModulesForDistribution, Vn as materializeLayerFromArn, Vr as resolveRuntimeImage, Vt as resolveSharedSidecarCredentials, W as resolveDeployedOriginBucket, Wn as filterRoutesByApiIdentifier, Wt as buildImageOverrideTag, X as serveFromStaticOrigin, Xn as resolveServiceIntegrationParameters, Xt as describePinnedImageUri, Y as resolveErrorResponseCandidates, Yn as resolveSelectionExpression, Yt as runImageOverrideBuilds, Z as serveLambdaUrlOrigin, Zn as defaultCredentialsLoader, Zt as isLocalCdkAssetImage, _ as filterStudioTargetGroups, _i as AGENTCORE_AGUI_PROTOCOL, _n as parseSseForJsonRpc, _r as applyAuthorizerOverlay, _t as createCloudFrontModule, an as attachContainerLogStreamer, ar as computeRequestIdentityHash, at as describeS3OriginDomain, b as renderStudioHtml, bi as AGENTCORE_RUNTIME_TYPE, bn as AGENTCORE_SESSION_ID_HEADER, br as evaluateResponseParameters, bt as addAlbSpecificOptions, c as startStudioProxy, ci as discoverWebSocketApis, cn as bridgeAgentCoreWs, cr as invokeTokenAuthorizer, ct as pickFunctionUrlLogicalIdFromOrigin, d as createStudioDispatcher, di as parseSelectionExpressionPath, dn as A2A_PATH, dr as buildCorsConfigByApiId, dt as pickTargetFunctionLogicalId, en as CloudMapRegistry, er as createJwksCache, et as buildEdgeRequestEvent, f as filterStudioCustomResources, fi as webSocketApiMatchesIdentifier, fn as a2aInvokeOnce, fr as buildCorsConfigFromCloudFrontChain, ft as resolveCloudFrontDistribution, g as annotatePinnedEcsTargets, gi as AGENTCORE_A2A_PROTOCOL, gn as mcpInvokeOnce, gr as translateLambdaResponse, gt as stripCloudFrontImport, h as annotateEcsTaskPinnedTargets, hi as resolveLambdaArnIntrinsic, hn as MCP_PROTOCOL_VERSION, hr as matchRoute, ht as runViewerResponse, i as coerceStopRequest, ii as resolveSingleTarget, in as getContainerNetworkIp, ir as buildMethodArn, it as CLOUDFRONT_DISTRIBUTION_TYPE, j as attachAgentCoreWsBridge, jn as addInvokeSpecificOptions, jr as buildMgmtEndpointEnvUrl, k as selectServeInboundAuth, ki as buildStsClientConfig, kn as toCmdArgv, kr as bufferToBody, kt as serviceStrategy, l as relayServeRequest, li as discoverWebSocketApisOrThrow, ln as invokeAgentCoreWs, lr as attachAuthorizers, lt as pickKvsLogicalIdFromArn, m as annotateAlbPinnedBackingServices, mi as pickRefLogicalId, mn as MCP_PATH, mr as matchPreflight, mt as runViewerRequest, n as coerceRunRequest, nn as SOFT_RELOAD_COMPLETION_LOG_SUFFIX, nr as verifyJwtAuthorizer, nt as edgeHeadersToHttp, o as resolveServeBaseUrl, on as addInvokeAgentCoreSpecificOptions, or as evaluateCachedLambdaPolicy, ot as extractKvsAssociations, p as isCustomResourceLambdaTarget, pi as discoverRoutes, pn as MCP_CONTAINER_PORT, pr as isFunctionUrlOacFronted, pt as compileCloudFrontFunction, q as matchBehavior, qn as readMtlsMaterialsFromDisk, qt as parseImageOverrideFlags, r as coerceServeRequest, ri as resolveWatchConfig, rn as setShadowReadyTimeoutMs, rr as verifyJwtViaDiscovery, rt as httpHeadersToEdge, s as createStudioServeManager, si as availableWebSocketApiIdentifiers, sr as invokeRequestAuthorizer, st as isCloudFrontDistribution, t as addStudioSpecificOptions, tn as DEFAULT_SHADOW_READY_TIMEOUT_MS, tr as verifyCognitoJwt, tt as buildEdgeResponseEvent, u as reinvoke, ui as filterWebSocketApisByIdentifiers, un as A2A_CONTAINER_PORT, ur as applyCorsResponseHeaders, ut as pickLambdaEdgeFunctionLogicalId, v as startStudioServer, vi as AGENTCORE_HTTP_PROTOCOL, vn as AGENTCORE_SIGV4_SERVICE, vr as buildHttpApiV2Event, vt as createLocalFileKvsDataSource, wi as derivePseudoParametersFromRegion, wn as downloadAndExtractS3Bundle, wr as VtlEvaluationError, wt as resolveAlbTarget, x as createStudioStore, xi as AgentCoreResolutionError, xn as invokeAgentCore, xr as pickResponseTemplate, xt as albStrategy, y as toStudioTargetGroups, yi as AGENTCORE_MCP_PROTOCOL, yn as signAgentCoreInvocation, yr as buildRestV1Event, yt as createUnboundCloudFrontModule, z as resolveCloudFrontTarget, zn as attachStageContext, zr as resolveRuntimeCodeMountPath, zt as parseRestartPolicy } from "./local-studio-xigfWo5b.js";
2
2
 
3
3
  export { A2A_CONTAINER_PORT, A2A_PATH, AGENTCORE_A2A_PROTOCOL, AGENTCORE_AGUI_PROTOCOL, AGENTCORE_HTTP_PROTOCOL, AGENTCORE_MCP_PROTOCOL, AGENTCORE_RUNTIME_TYPE, AGENTCORE_SESSION_ID_HEADER, AGENTCORE_SIGV4_SERVICE, AgentCoreResolutionError, CLOUDFRONT_DISTRIBUTION_TYPE, CloudMapRegistry, ConnectionRegistry, DEFAULT_SHADOW_READY_TIMEOUT_MS, EcsTaskResolutionError, HOST_DOCKER_INTERNAL_GATEWAY, HOST_GATEWAY_MIN_VERSION, ImageOverrideError, LocalInvokeBuildError, LocalStartCloudFrontError, MAX_TASKS_SUBNET_RANGE_CAP, MCP_CONTAINER_PORT, MCP_PATH, MCP_PROTOCOL_VERSION, SOFT_RELOAD_COMPLETION_LOG_SUFFIX, SUPPORTED_CODE_RUNTIMES, StudioEventBus, VtlEvaluationError, a2aInvokeOnce, addAlbSpecificOptions, addCommonEcsServiceOptions, addEcsAssumeRoleOptions, addImageOverrideOptions, addInvokeAgentCoreSpecificOptions, addInvokeSpecificOptions, addListSpecificOptions, addRunTaskSpecificOptions, addStartAgentCoreSpecificOptions, addStartApiSpecificOptions, addStartCloudFrontSpecificOptions, addStartServiceSpecificOptions, addStudioSpecificOptions, albStrategy, annotateAlbPinnedBackingServices, annotateEcsTaskPinnedTargets, annotatePinnedEcsTargets, applyAuthorizerOverlay, applyCorsResponseHeaders, applyEdgeRequestResult, applyEdgeResponseResult, architectureToPlatform, attachAgentCoreWsBridge, attachAuthorizers, attachContainerLogStreamer, attachStageContext, availableApiIdentifiers, availableWebSocketApiIdentifiers, bridgeAgentCoreWs, bufferToBody, buildAgentCoreCodeImage, buildAgentCoreServeAuthCheck, buildCloudMapIndex, buildCognitoJwksUrl, buildConnectEvent, buildContainerImage, buildCorsConfigByApiId, buildCorsConfigFromCloudFrontChain, buildDisconnectEvent, buildEcsImageResolutionContext, buildEdgeRequestEvent, buildEdgeResponseEvent, buildHttpApiV2Event, buildImageOverrideTag, buildJwksUrlFromIssuer, buildMessageEvent, buildMethodArn, buildMgmtEndpointEnvUrl, buildRestV1Event, buildStageMap, buildStsClientConfig, classifyS3Error, classifySourceChange, coerceRunRequest, coerceServeRequest, coerceStopRequest, compileCloudFrontFunction, computeCodeImageTag, computeRequestIdentityHash, createAuthorizerCache, createCloudFrontModule, createDeployedKvsDataSource, createFileWatcher, createJwksCache, createLocalFileKvsDataSource, createS3OriginReader, createStudioDispatcher, createStudioServeManager, createStudioStore, createUnboundCloudFrontModule, createWatchPredicates, defaultCredentialsLoader, derivePseudoParametersFromRegion, describePinnedImageUri, describeS3OriginDomain, discoverRoutes, discoverWebSocketApis, discoverWebSocketApisOrThrow, downloadAndExtractS3Bundle, ecsClusterOption, edgeHeadersToHttp, enforceImageOverrideOrphans, evaluateCachedLambdaPolicy, evaluateResponseParameters, extractKvsAssociations, filterRoutesByApiIdentifier, filterRoutesByApiIdentifiers, filterStudioCustomResources, filterStudioTargetGroups, filterWebSocketApisByIdentifiers, formatStateRemedy, getContainerNetworkIp, groupRoutesByServer, handleConnectionsRequest, httpHeadersToEdge, idFromArn, invokeAgentCore, invokeAgentCoreWs, invokeRequestAuthorizer, invokeTokenAuthorizer, isApplicationLoadBalancer, isCloudFrontDistribution, isCustomResourceLambdaTarget, isFunctionUrlOacFronted, isLocalCdkAssetImage, listPinnedTargets, matchBehavior, matchPreflight, matchRoute, materializeLayerFromArn, mcpInvokeOnce, mergeForService, normalizeKvsFileKeys, parseConnectionsPath, parseImageOverrideFlags, parseKvsFileOverrides, parseLbPortOverrides, parseMaxTasks, parseOriginOverrides, parseRestartPolicy, parseSelectionExpressionPath, parseSseForJsonRpc, pickAgentCoreCandidateStack, pickFunctionUrlLogicalIdFromOrigin, pickKvsLogicalIdFromArn, pickLambdaEdgeFunctionLogicalId, pickRefLogicalId, pickResponseTemplate, pickTargetFunctionLogicalId, probeHostGatewaySupport, readMtlsMaterialsFromDisk, reinvoke, relayServeRequest, renderCodeDockerfile, renderStudioHtml, resolveAgentCoreTarget, resolveAlbFrontDoor, resolveAlbTarget, resolveApiTargetSubset, resolveCloudFrontDistribution, resolveCloudFrontTarget, resolveDeployedKvsArnByName, resolveDeployedOriginBucket, resolveEcsAssumeRoleOption, resolveEnvVars, resolveErrorResponseCandidates, resolveHostGatewayExtraHosts, resolveImageOverrides, resolveKvsModulesForDistribution, resolveLambdaArnIntrinsic, resolveProfileCredentials, resolveRuntimeCodeMountPath, resolveRuntimeFileExtension, resolveRuntimeImage, resolveSelectionExpression, resolveServeBaseUrl, resolveServiceIntegrationParameters, resolveSharedSidecarCredentials, resolveSingleTarget, resolveWatchConfig, runEcsServiceEmulator, runImageOverrideBuilds, runViewerRequest, runViewerResponse, selectIntegrationResponse, selectServeInboundAuth, serveFromStaticOrigin, serveLambdaUrlOrigin, serviceStrategy, setShadowReadyTimeoutMs, signAgentCoreInvocation, startAgentCoreHttpServer, startAgentCoreWsBridge, startApiServer, startCloudFrontServer, startStudioProxy, startStudioServer, stripCloudFrontImport, substituteImagePlaceholders, toCmdArgv, toStudioTargetGroups, translateLambdaResponse, tryParseStatus, tryResolveImageFnJoin, verifyCognitoJwt, verifyJwtAuthorizer, verifyJwtViaDiscovery, waitForAgentCoreHttpReady, waitForAgentCorePing, webSocketApiMatchesIdentifier };
@@ -9785,6 +9785,32 @@ function buildVtlInput(body, headers, querystring, pathParams) {
9785
9785
  * Minimal JSONPath evaluator. Supports `$`, `$.field`, `$.field.sub`,
9786
9786
  * `$.array[index]`. Unsupported syntax throws so the user sees a clear
9787
9787
  * pointer to the gap.
9788
+ *
9789
+ * The five throws below quote the offending expression, and `vtlFailure` in
9790
+ * `rest-v1-integrations.ts` copies that message into the 502 response body.
9791
+ * Issue #555 reviewed that and DELIBERATELY LEFT it — do not re-raise it as
9792
+ * an echo of caller request data. Two reasons, and the second is the one
9793
+ * that settles it:
9794
+ *
9795
+ * 1. `expr` is normally the developer's own template text — the literal
9796
+ * inside `$input.json('$.foo')`. It becomes caller-controllable only
9797
+ * when a template deliberately routes a request value into the
9798
+ * expression, e.g. `$input.json($input.params('p'))`.
9799
+ * 2. Even then, the 502 goes back to the CALLER WHO SUPPLIED that value,
9800
+ * so it discloses nothing that caller did not already send. (Note the
9801
+ * `template` field `vtlFailure` puts beside `reason` is the template
9802
+ * SOURCE, not its render — so in that case this message is the one
9803
+ * place the value appears, and the argument has to rest on the
9804
+ * recipient rather than on the value being present anyway.)
9805
+ * Withholding it would cost the developer the only pointer they have
9806
+ * to the unsupported syntax.
9807
+ *
9808
+ * The difference from `$util.parseJson`'s catch above is the SIZE of what
9809
+ * would be echoed, not its provenance: there the withheld material is the
9810
+ * whole request body, which on a login endpoint is the caller's password,
9811
+ * while here it is one path expression out of the developer's template.
9812
+ * Both are the caller's own data returned to the caller; only one of them
9813
+ * is worth withholding.
9788
9814
  */
9789
9815
  function applyJsonPath(root, expr) {
9790
9816
  const trimmed = expr.trim();
@@ -13355,14 +13381,14 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13355
13381
  };
13356
13382
  }
13357
13383
  if (parsed.algorithm !== "AWS4-HMAC-SHA256") {
13358
- logger.info(`AWS_IAM authorizer: rejecting request — unsupported Authorization algorithm '${parsed.algorithm}'. Expected 'AWS4-HMAC-SHA256'.`);
13384
+ logger.info(`AWS_IAM authorizer: rejecting request — unsupported Authorization algorithm '${redactAuthorizationSegment(parsed.algorithm)}'. Expected 'AWS4-HMAC-SHA256'.`);
13359
13385
  return {
13360
13386
  allow: false,
13361
13387
  identityHash: void 0
13362
13388
  };
13363
13389
  }
13364
13390
  if (parsed.credentialTerminator !== "aws4_request") {
13365
- logger.info(`AWS_IAM authorizer: rejecting request — invalid credential-scope terminator '${parsed.credentialTerminator}'. Expected 'aws4_request' (the last '/' segment of the Credential= value).`);
13391
+ logger.info(`AWS_IAM authorizer: rejecting request — invalid credential-scope terminator '${redactAuthorizationSegment(parsed.credentialTerminator)}'. Expected 'aws4_request' (the last '/' segment of the Credential= value).`);
13366
13392
  return {
13367
13393
  allow: false,
13368
13394
  identityHash: void 0
@@ -13377,7 +13403,7 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13377
13403
  };
13378
13404
  }
13379
13405
  if (!validateAmzDateMatchesCredentialDate(amzDate, parsed.credentialDate)) {
13380
- logger.info(`AWS_IAM authorizer: rejecting request — x-amz-date '${amzDate}' does not match credential-scope date '${parsed.credentialDate}'. The 'YYYYMMDD' prefix of x-amz-date must equal the date segment of Credential=<AKID>/<YYYYMMDD>/...`);
13406
+ logger.info(`AWS_IAM authorizer: rejecting request — x-amz-date / date '${boundTimestampHeader(amzDate)}' does not match credential-scope date '${parsed.credentialDate}'. The 'YYYYMMDD' prefix of x-amz-date must equal the date segment of Credential=<AKID>/<YYYYMMDD>/...`);
13381
13407
  return {
13382
13408
  allow: false,
13383
13409
  identityHash: void 0
@@ -13385,7 +13411,7 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13385
13411
  }
13386
13412
  const now = (opts.now ?? (() => /* @__PURE__ */ new Date()))();
13387
13413
  if (amzDateOutsideSkew(amzDate, now)) {
13388
- logger.info(`AWS_IAM authorizer: rejecting request — x-amz-date '${amzDate}' is outside the 15-minute clock-skew window (local now=${now.toISOString()}). Re-sign the request with the current time or sync the local clock.`);
13414
+ logger.info(`AWS_IAM authorizer: rejecting request — x-amz-date / date '${boundTimestampHeader(amzDate)}' is outside the 15-minute clock-skew window (local now=${now.toISOString()}). Re-sign the request with the current time or sync the local clock.`);
13389
13415
  return {
13390
13416
  allow: false,
13391
13417
  identityHash: void 0
@@ -13395,7 +13421,8 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13395
13421
  try {
13396
13422
  local = await loadCredentials();
13397
13423
  } catch (err) {
13398
- const reason = err instanceof Error ? err.message : String(err);
13424
+ logger.debug(`AWS_IAM authorizer: the AWS credential chain's own failure message was: ${stringifyCredentialLoadFailure(err)}`);
13425
+ const reason = describeCredentialLoadFailure(err);
13399
13426
  const { sigV4StrictByDefault, sigV4OptFlag: optFlag } = getEmbedConfig();
13400
13427
  if (opts.strict && !opts.oacFronted) {
13401
13428
  logger.warn(sigV4StrictByDefault ? `AWS_IAM authorizer: could not resolve local AWS credentials (${reason}), so the request's SigV4 signature cannot be verified. cdk-local denies unverifiable IAM requests by default; pass ${optFlag} to warn-and-pass, or configure AWS credentials cdk-local can read.` : `AWS_IAM authorizer: could not resolve local AWS credentials (${reason}), so the request's SigV4 signature cannot be verified. ${optFlag} is set, so cdk-local denies unverifiable IAM requests; remove ${optFlag} to warn-and-pass (the default), or configure AWS credentials cdk-local can read.`);
@@ -13413,12 +13440,12 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13413
13440
  }
13414
13441
  if (local.accessKeyId.toLowerCase() !== parsed.credentialAccessKeyId.toLowerCase()) {
13415
13442
  const warned = opts.warnedForeignIds;
13416
- const dedupKey = parsed.credentialAccessKeyId.toLowerCase();
13443
+ const dedupKey = createHash("sha256").update(parsed.credentialAccessKeyId.toLowerCase()).digest("hex");
13417
13444
  const { sigV4StrictByDefault, sigV4OptFlag: optFlag } = getEmbedConfig();
13418
13445
  if (opts.strict && !opts.oacFronted) {
13419
13446
  if (!warned || !warned.has(dedupKey)) {
13420
- logger.warn(sigV4StrictByDefault ? `AWS_IAM authorizer: request signed with access-key-id '${parsed.credentialAccessKeyId}', which differs from the AWS credentials cdk-local resolved locally — SigV4 (HMAC / shared-secret) can only be verified with the signer's own credentials, never a federated / Cognito Identity Pool / cross-account signer's. cdk-local denies it by default; pass ${optFlag} to warn-and-pass, or sign the request with the same credentials cdk-local resolves locally.` : `AWS_IAM authorizer: request signed with access-key-id '${parsed.credentialAccessKeyId}', which differs from the AWS credentials cdk-local resolved locally — SigV4 (HMAC / shared-secret) can only be verified with the signer's own credentials, never a federated / Cognito Identity Pool / cross-account signer's. ${optFlag} is set, so cdk-local denies it; remove ${optFlag} to warn-and-pass (the default), or sign the request with the same credentials cdk-local resolves locally.`);
13421
- warned?.add(dedupKey);
13447
+ logger.warn(sigV4StrictByDefault ? `AWS_IAM authorizer: request signed with access-key-id '${redactAuthorizationSegment(parsed.credentialAccessKeyId)}', which differs from the AWS credentials cdk-local resolved locally — SigV4 (HMAC / shared-secret) can only be verified with the signer's own credentials, never a federated / Cognito Identity Pool / cross-account signer's. cdk-local denies it by default; pass ${optFlag} to warn-and-pass, or sign the request with the same credentials cdk-local resolves locally.` : `AWS_IAM authorizer: request signed with access-key-id '${redactAuthorizationSegment(parsed.credentialAccessKeyId)}', which differs from the AWS credentials cdk-local resolved locally — SigV4 (HMAC / shared-secret) can only be verified with the signer's own credentials, never a federated / Cognito Identity Pool / cross-account signer's. ${optFlag} is set, so cdk-local denies it; remove ${optFlag} to warn-and-pass (the default), or sign the request with the same credentials cdk-local resolves locally.`);
13448
+ rememberWarnedForeignId(warned, dedupKey);
13422
13449
  }
13423
13450
  return {
13424
13451
  allow: false,
@@ -13426,8 +13453,8 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13426
13453
  };
13427
13454
  }
13428
13455
  if (!warned || !warned.has(dedupKey)) {
13429
- logger.warn(opts.oacFronted ? `AWS_IAM authorizer: Function URL is fronted by CloudFront OAC — in production CloudFront re-signs the origin request, so the local client's signature (access-key-id '${parsed.credentialAccessKeyId}') cannot be verified. Passing through with unverified principalId 'unverified-foreign-identity'. Do NOT trust event.requestContext.authorizer.principalId in handler code.` : sigV4StrictByDefault ? `AWS_IAM authorizer: request signed with access-key-id '${parsed.credentialAccessKeyId}', a federated / Cognito Identity Pool / cross-account signer cdk-local cannot verify locally (SigV4 is an HMAC shared-secret signature; the deployed API Gateway verifies it because AWS holds the secret). ${optFlag} is set; passing through with unverified principalId 'unverified-foreign-identity'. Do NOT trust event.requestContext.authorizer.principalId in handler code.` : `AWS_IAM authorizer: request signed with access-key-id '${parsed.credentialAccessKeyId}', a federated / Cognito Identity Pool / cross-account signer cdk-local cannot verify locally (SigV4 is an HMAC shared-secret signature; the deployed API Gateway verifies it because AWS holds the secret). Passing through with unverified principalId 'unverified-foreign-identity' — cdk-local's default for unverifiable IAM requests; pass ${optFlag} to deny instead. Do NOT trust event.requestContext.authorizer.principalId in handler code.`);
13430
- warned?.add(dedupKey);
13456
+ logger.warn(opts.oacFronted ? `AWS_IAM authorizer: Function URL is fronted by CloudFront OAC — in production CloudFront re-signs the origin request, so the local client's signature (access-key-id '${redactAuthorizationSegment(parsed.credentialAccessKeyId)}') cannot be verified. Passing through with unverified principalId 'unverified-foreign-identity'. Do NOT trust event.requestContext.authorizer.principalId in handler code.` : sigV4StrictByDefault ? `AWS_IAM authorizer: request signed with access-key-id '${redactAuthorizationSegment(parsed.credentialAccessKeyId)}', a federated / Cognito Identity Pool / cross-account signer cdk-local cannot verify locally (SigV4 is an HMAC shared-secret signature; the deployed API Gateway verifies it because AWS holds the secret). ${optFlag} is set; passing through with unverified principalId 'unverified-foreign-identity'. Do NOT trust event.requestContext.authorizer.principalId in handler code.` : `AWS_IAM authorizer: request signed with access-key-id '${redactAuthorizationSegment(parsed.credentialAccessKeyId)}', a federated / Cognito Identity Pool / cross-account signer cdk-local cannot verify locally (SigV4 is an HMAC shared-secret signature; the deployed API Gateway verifies it because AWS holds the secret). Passing through with unverified principalId 'unverified-foreign-identity' — cdk-local's default for unverifiable IAM requests; pass ${optFlag} to deny instead. Do NOT trust event.requestContext.authorizer.principalId in handler code.`);
13457
+ rememberWarnedForeignId(warned, dedupKey);
13431
13458
  }
13432
13459
  return {
13433
13460
  allow: true,
@@ -13435,9 +13462,8 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13435
13462
  identityHash: buildIdentityHash([parsed.signature])
13436
13463
  };
13437
13464
  }
13438
- const recomputed = computeSignature(req, parsed, local.secretAccessKey, amzDate);
13439
- if (!constantTimeEqual(recomputed, parsed.signature)) {
13440
- logger.info(`AWS_IAM authorizer: rejecting request — Signature= mismatch (recomputed '${recomputed}', got '${parsed.signature}'). The request was signed with the expected access-key-id but the HMAC does not verify — check the SignedHeaders list, request body, and canonical-request normalization on the signer side.`);
13465
+ if (!constantTimeEqual(computeSignature(req, parsed, local.secretAccessKey, amzDate), parsed.signature)) {
13466
+ logger.info(`AWS_IAM authorizer: rejecting request — Signature= mismatch (got '${redactSignature(parsed.signature)}'; the recomputed signature is withheld, because it is a valid signature for this request under your local credentials). The request was signed with the expected access-key-id but the HMAC does not verify — check the SignedHeaders list, request body, and canonical-request normalization on the signer side.`);
13441
13467
  return {
13442
13468
  allow: false,
13443
13469
  identityHash: void 0
@@ -13450,6 +13476,215 @@ async function verifySigV4(req, loadCredentials, opts = {}) {
13450
13476
  };
13451
13477
  }
13452
13478
  /**
13479
+ * Upper bound on how much of an `Authorization`-header segment a rejection
13480
+ * message may quote.
13481
+ *
13482
+ * 32 clears every value these messages legitimately name, with room to
13483
+ * spare: `AWS4-HMAC-SHA256` is 16 characters, the longest real algorithm
13484
+ * spelling this parser rejects (`AWS4-ECDSA-P256-SHA256-PAYLOAD`) is 30,
13485
+ * `aws4_request` is 12, a `YYYYMMDD` date is 8, and an access-key id is 20.
13486
+ * The ceiling is what fixes it at 32 rather than higher: an AWS SECRET
13487
+ * access key is 40 characters, and pasting one into `AWS_ACCESS_KEY_ID` is
13488
+ * the one way a developer's own secret reaches this header — so the bound
13489
+ * has to sit below 40 for that paste to be withheld rather than quoted.
13490
+ */
13491
+ const AUTH_SEGMENT_QUOTE_MAX = 32;
13492
+ /**
13493
+ * Quote one caller-supplied `Authorization`-header segment for a rejection
13494
+ * message, or withhold it when it cannot be a segment.
13495
+ *
13496
+ * Issue #555. These messages are `info` and `warn`, not `debug`, so they
13497
+ * print on a plain `cdkl start-api` run rather than only under `--verbose`
13498
+ * — a different population from a verbose-gated diagnostic, and the reason
13499
+ * the auth-header sites were the ones worth changing. What each names is a
13500
+ * POSITION in the header, and a position holds only its own short token
13501
+ * while the header's delimiters sit where the parser expects them. Drop a
13502
+ * single comma —
13503
+ * `Credential=AKID/20260101/us-east-1/execute-api/aws4_request Signature=<hex>, SignedHeaders=host, Signature=abcd`
13504
+ * — and `Credential=`'s value absorbs the parameter that should have
13505
+ * followed it, so the credential-scope split hands its LAST segment the
13506
+ * `Signature=` component and the terminator message prints it at default
13507
+ * level. (A header delimited by spaces throughout never reaches that
13508
+ * message: it yields a single parameter, so the parse throws `missing
13509
+ * SignedHeaders` first.)
13510
+ *
13511
+ * So a quote is allowed only for input that could still BE one segment: no
13512
+ * whitespace, no `=`, no longer than {@link AUTH_SEGMENT_QUOTE_MAX}. Any of
13513
+ * those failing means the parse boundary was elsewhere and the value is
13514
+ * unrelated header material of unknown extent, reported by shape instead.
13515
+ * Every genuine typo (`aws3_request`, `AWS4-HMAC-SHA512`) stays quoted in
13516
+ * full — the actionability issue #246 added these messages for — while the
13517
+ * sweep-in case degrades to a character count.
13518
+ *
13519
+ * The offered `Signature=` value has its own predicate,
13520
+ * {@link redactSignature}: a real signature is 64 characters, so this bound
13521
+ * would withhold every legitimate one.
13522
+ */
13523
+ function redactAuthorizationSegment(segment) {
13524
+ if (segment.length > AUTH_SEGMENT_QUOTE_MAX || /[\s=]/.test(segment)) return `<withheld: ${segment.length} characters of unparsed header material>`;
13525
+ return segment;
13526
+ }
13527
+ /**
13528
+ * Bound on the `x-amz-date` / `date` echo. Every legal spelling is far
13529
+ * below it. Measured on Node 24: RFC 1123 `Mon, 02 Jan 2006 15:04:05 GMT`
13530
+ * is 29 characters; `new Date().toString()` runs 45 to 76 depending on the
13531
+ * zone name (55 on the machine this was written on, 76 for
13532
+ * `Australia/Eucla`) across all 418 zones `Intl.supportedValuesOf` lists;
13533
+ * and the longest spelling `Date` was observed to PARSE,
13534
+ * `Wednesday, December 31, 2025 00:00:00 GMT+0000 (Coordinated Universal
13535
+ * Time)`, is 75. So nothing actionable is ever withheld.
13536
+ */
13537
+ const TIMESTAMP_HEADER_QUOTE_MAX = 200;
13538
+ /**
13539
+ * Bound the `x-amz-date` / `date` echo by LENGTH ONLY.
13540
+ *
13541
+ * Issue #555 reviewed this site and deliberately did NOT route it through
13542
+ * {@link redactAuthorizationSegment}. It is not an `Authorization` segment:
13543
+ * `pickHeader` reads the whole header, so no delimiter mistake can sweep a
13544
+ * `Signature=` component into it, and what lands here is whatever the
13545
+ * CALLER put in their own timestamp header. More to the point, a SHAPE
13546
+ * bound would withhold exactly the case the message exists for — the value
13547
+ * reaching the mismatch branch is usually a perfectly valid timestamp that
13548
+ * simply disagrees with the credential scope, and the legal spellings carry
13549
+ * spaces and run long (see {@link TIMESTAMP_HEADER_QUOTE_MAX}). A
13550
+ * whitespace clause or a 32-character cap withholds all of them.
13551
+ *
13552
+ * "No shape bound" is not "no bound", though. The value is unbounded caller
13553
+ * input printed at `info`, and `cdkl studio` mirrors these lines into a log
13554
+ * ring it serves over HTTP, so a length cap costs nothing and ends the
13555
+ * flood. Do not tighten it into a shape check.
13556
+ */
13557
+ function boundTimestampHeader(value) {
13558
+ if (value.length > TIMESTAMP_HEADER_QUOTE_MAX) return `<withheld: ${value.length} characters, too long to be a timestamp>`;
13559
+ return value;
13560
+ }
13561
+ /**
13562
+ * Quote the caller's OFFERED `Signature=` value, or withhold it when that
13563
+ * field swept in material which is not a signature.
13564
+ *
13565
+ * `Signature=` is the LAST parameter of the header, which makes it a sweep
13566
+ * position exactly like the credential-scope terminator: a header ending
13567
+ * `..., Signature=<hex> X-Anything=foo` parses to a `signature` of
13568
+ * `<hex> x-anything=foo`. A real SigV4 signature is lowercase hex and
13569
+ * EXACTLY 64 characters; the predicate accepts 1 to 64 rather than exactly
13570
+ * 64 only so that a short but otherwise plausible value still shows (a
13571
+ * truncated paste is worth seeing). Either way it quotes every legitimate
13572
+ * value — the one issue #246 needs the user to compare — and withholds
13573
+ * anything a mis-delimited split swept in.
13574
+ *
13575
+ * This covers the OFFERED signature only. The RECOMPUTED one is never
13576
+ * printed; the mismatch message in {@link verifySigV4} says why.
13577
+ */
13578
+ function redactSignature(signature) {
13579
+ if (!/^[0-9a-f]{1,64}$/.test(signature)) return `<withheld: ${signature.length} characters that are not a signature>`;
13580
+ return signature;
13581
+ }
13582
+ /**
13583
+ * Describe a credential-chain failure for a default-level log line WITHOUT
13584
+ * relaying the chain's own message (issue #564).
13585
+ *
13586
+ * The message is withheld because of what a credential-chain error CAN
13587
+ * carry: `@aws-sdk/credential-provider-process` copies the rejection of
13588
+ * `promisify(child_process.exec)` — Node's
13589
+ * `Command failed: <command line>\n<stderr>` — into the error it throws, so
13590
+ * a passphrase on a `credential_process` command line is already inside a
13591
+ * chain error object. On the SDK versions this repo resolves today that
13592
+ * object does not actually reach the caller (the chain swallows it and ends
13593
+ * on a generic message), which makes this defense in depth rather than a
13594
+ * live disclosure. The measurement, and the full reasoning for withholding
13595
+ * at `warn` while keeping the text at `debug`, are at the call site in
13596
+ * {@link verifySigV4}.
13597
+ *
13598
+ * What is reported instead is input-INDEPENDENT: `err.name` is set by the
13599
+ * throwing class rather than derived from anything the loader read, which is
13600
+ * the property that makes quoting it safe, and is the same discriminator
13601
+ * `ecs-secrets-resolver.ts` reports for the JSON parse failure it must not
13602
+ * echo. `'unknown'` rather than a guessed class name for a non-`Error`
13603
+ * throw, so the field never names a class the throw was not -- and the same
13604
+ * `'unknown'` for a `name` that is not a bare identifier, so the guarantee
13605
+ * does not rest on every provider following the convention.
13606
+ *
13607
+ * The LENGTH is reported, unlike in `ecs-secrets-resolver.ts`, and the
13608
+ * difference is deliberate: there the user already knows which secret it is
13609
+ * and can read the value at its source, so a character count would be
13610
+ * disclosure buying nothing. Here the user cannot see the withheld message
13611
+ * at all, and the count is what separates a one-line
13612
+ * `Could not load credentials from any providers` from a multi-hundred-
13613
+ * character `Command failed:` dump — which is what tells them whether their
13614
+ * `credential_process` even ran. It is the same choice
13615
+ * {@link redactAuthorizationSegment} makes when it withholds.
13616
+ *
13617
+ * The count is a side channel, and a narrow one: against a KNOWN
13618
+ * `credential_process` template the number is `constant + len(passphrase)`,
13619
+ * so it yields the passphrase's LENGTH. That is accepted rather than
13620
+ * overlooked. It buys the one thing the user cannot otherwise see, the
13621
+ * `Command failed:` dump is not reachable today anyway (see the call site),
13622
+ * and bucketing the number would blur exactly the boilerplate-vs-dump
13623
+ * distinction the field exists for.
13624
+ */
13625
+ function stringifyCredentialLoadFailure(err) {
13626
+ try {
13627
+ return err instanceof Error ? String(err.message) : String(err);
13628
+ } catch {
13629
+ return "[unstringifiable throw]";
13630
+ }
13631
+ }
13632
+ function describeCredentialLoadFailure(err) {
13633
+ const rawKind = err instanceof Error ? err.name : "unknown";
13634
+ return `${/^[A-Za-z0-9_.-]{1,64}$/.test(rawKind) ? rawKind : "unknown"}; ${stringifyCredentialLoadFailure(err).length}-character message withheld, logged at debug level under --verbose`;
13635
+ }
13636
+ /**
13637
+ * How many distinct foreign access-key-ids {@link verifySigV4}'s warn-dedup
13638
+ * set retains (issue #561).
13639
+ *
13640
+ * The legitimate population is tiny — a session sees one federated / Cognito
13641
+ * Identity Pool / cross-account signer, occasionally a handful — so 256
13642
+ * leaves two orders of magnitude of headroom over any real use while holding
13643
+ * the set at 256 entries of exactly 64 hex characters whatever a caller
13644
+ * sends, because {@link verifySigV4} hashes the id before it becomes a key.
13645
+ *
13646
+ * `docs/local-emulation.md` states this number to users ("the 256 most
13647
+ * recently warned ids"); change both together.
13648
+ */
13649
+ const FOREIGN_ID_DEDUP_MAX = 256;
13650
+ /**
13651
+ * Record that the foreign-access-key-id warning has been emitted for
13652
+ * `dedupKey`, evicting oldest-first so the set cannot grow without bound
13653
+ * (issue #561).
13654
+ *
13655
+ * # Why eviction, and not "stop warning past the cap"
13656
+ *
13657
+ * The set's only power is SUPPRESSION — an entry present means the warning
13658
+ * is skipped — so the two candidate policies differ in the DIRECTION they
13659
+ * fail. Evicting an entry can only ever cause a REPEAT warning, which is
13660
+ * precisely the un-deduped behaviour this code had before the dedup existed:
13661
+ * noisier, never quieter. Capping by refusing to warn once the set is full
13662
+ * would instead silence the (cap+1)-th distinct signer, and that signer is
13663
+ * every bit as likely to be the real federated identity the developer needs
13664
+ * told about as it is to be a prober's next value. A warning that never
13665
+ * arrives is a worse failure than a set that grows, so the bound is put
13666
+ * where it cannot suppress anything.
13667
+ *
13668
+ * `Set` iterates in insertion order, so `values().next()` is the oldest
13669
+ * entry and this is FIFO. It is a loop rather than a single `delete` so a
13670
+ * set handed in already over the cap is brought back under it.
13671
+ *
13672
+ * What this does NOT fix: a client looping over DISTINCT ids still draws one
13673
+ * warn line per probe. Distinct ids defeat the dedup whether or not the set
13674
+ * is bounded, and closing that half would need suppression — the direction
13675
+ * ruled out above. The bound here is on memory only.
13676
+ */
13677
+ function rememberWarnedForeignId(warned, dedupKey) {
13678
+ if (!warned) return;
13679
+ if (warned.has(dedupKey)) return;
13680
+ while (warned.size >= FOREIGN_ID_DEDUP_MAX) {
13681
+ const oldest = warned.values().next();
13682
+ if (oldest.done === true) break;
13683
+ warned.delete(oldest.value);
13684
+ }
13685
+ warned.add(dedupKey);
13686
+ }
13687
+ /**
13453
13688
  * Parse `AWS4-HMAC-SHA256 Credential=..., SignedHeaders=..., Signature=...`.
13454
13689
  * Rejects every other shape (including legacy `AWS4-HMAC-SHA256-...`
13455
13690
  * variants and HTTP/1.0-style multi-line values).
@@ -13460,9 +13695,12 @@ function parseAuthorizationHeader(value) {
13460
13695
  const algorithm = value.slice(0, spaceIdx).trim();
13461
13696
  const parts = value.slice(spaceIdx + 1).trim().split(",").map((s) => s.trim());
13462
13697
  const fields = {};
13463
- for (const part of parts) {
13698
+ for (const [i, part] of parts.entries()) {
13464
13699
  const eq = part.indexOf("=");
13465
- if (eq < 0) throw new Error(`malformed parameter '${part}'`);
13700
+ if (eq < 0) {
13701
+ const detail = part.length === 0 ? "empty, stray comma?" : `${part.length} characters, no '='`;
13702
+ throw new Error(`malformed parameter ${i + 1} of ${parts.length} (${detail})`);
13703
+ }
13466
13704
  const key = part.slice(0, eq).trim();
13467
13705
  fields[key] = part.slice(eq + 1).trim();
13468
13706
  }
@@ -13473,9 +13711,9 @@ function parseAuthorizationHeader(value) {
13473
13711
  if (!signedHeaders) throw new Error("missing SignedHeaders");
13474
13712
  if (!signature) throw new Error("missing Signature");
13475
13713
  const credParts = credential.split("/");
13476
- if (credParts.length !== 5) throw new Error(`malformed Credential '${credential}' (expected 5 slash-separated segments)`);
13714
+ if (credParts.length !== 5) throw new Error(`malformed Credential: expected 5 slash-separated segments, got ${credParts.length}`);
13477
13715
  const [accessKeyId, date, region, service, terminator] = credParts;
13478
- if (!/^[0-9]{8}$/.test(date)) throw new Error(`malformed credential date '${date}' (expected YYYYMMDD)`);
13716
+ if (!/^[0-9]{8}$/.test(date)) throw new Error(`malformed credential date '${redactAuthorizationSegment(date)}' (expected YYYYMMDD)`);
13479
13717
  return {
13480
13718
  algorithm,
13481
13719
  credentialAccessKeyId: accessKeyId,
@@ -37822,4 +38060,4 @@ function addStudioSpecificOptions(cmd) {
37822
38060
 
37823
38061
  //#endregion
37824
38062
  export { applyEdgeResponseResult as $, buildJwksUrlFromIssuer as $n, resolveCfnStackName as $r, buildCloudMapIndex as $t, startAgentCoreHttpServer as A, resolveProfileCredentials as Ai, classifySourceChange as An, ConnectionRegistry as Ar, addRunTaskSpecificOptions as At, idFromArn as B, 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, createWatchPredicates as Fn, buildDisconnectEvent as Fr, addImageOverrideOptions as Ft, classifyS3Error as G, filterRoutesByApiIdentifiers as Gn, substituteEnvVarsFromState as Gr, enforceImageOverrideOrphans as Gt, createDeployedKvsDataSource as H, resolveEnvVars$1 as Hn, EcsTaskResolutionError as Hr, runEcsServiceEmulator as Ht, normalizeKvsFileKeys as I, 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, createAuthorizerCache as Ln, architectureToPlatform as Lr, ecsClusterOption as Lt, startAgentCoreWsBridge as M, createLocalInvokeCommand as Mn, handleConnectionsRequest as Mr, MAX_TASKS_SUBNET_RANGE_CAP as Mt, LocalStartCloudFrontError as N, 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, createLocalStartApiCommand as Pn, buildConnectEvent as Pr, addEcsAssumeRoleOptions as Pt, applyEdgeRequestResult as Q, buildCognitoJwksUrl as Qn, resolveCfnRegion as Qr, listPinnedTargets as Qt, parseOriginOverrides as R, 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, 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, addInvokeSpecificOptions as jn, buildMgmtEndpointEnvUrl as jr, createLocalRunTaskCommand as jt, selectServeInboundAuth as k, buildStsClientConfig 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, attachStageContext as zn, resolveRuntimeCodeMountPath as zr, parseRestartPolicy as zt };
37825
- //# sourceMappingURL=local-studio-BBtUAVNy.js.map
38063
+ //# sourceMappingURL=local-studio-xigfWo5b.js.map