cdk-local 0.45.0 → 0.47.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.
@@ -0,0 +1,1132 @@
1
+ import { Command, Option } from "commander";
2
+ import { SSMClient } from "@aws-sdk/client-ssm";
3
+ import { WebSocket } from "ws";
4
+ import { IncomingMessage, Server, ServerResponse } from "node:http";
5
+
6
+ //#region src/types/resource.d.ts
7
+ interface CloudFormationTemplate {
8
+ AWSTemplateFormatVersion?: string;
9
+ Description?: string;
10
+ Parameters?: Record<string, TemplateParameter>;
11
+ Resources: Record<string, TemplateResource>;
12
+ Outputs?: Record<string, TemplateOutput>;
13
+ Conditions?: Record<string, unknown>;
14
+ Mappings?: Record<string, unknown>;
15
+ Transform?: unknown;
16
+ Rules?: Record<string, unknown>;
17
+ }
18
+ interface TemplateParameter {
19
+ Type: string;
20
+ Default?: unknown;
21
+ Description?: string;
22
+ AllowedValues?: unknown[];
23
+ AllowedPattern?: string;
24
+ ConstraintDescription?: string;
25
+ }
26
+ interface TemplateResource {
27
+ Type: string;
28
+ Properties?: Record<string, unknown>;
29
+ DependsOn?: string | readonly string[];
30
+ Condition?: string;
31
+ Metadata?: Record<string, unknown>;
32
+ CreationPolicy?: Record<string, unknown>;
33
+ UpdatePolicy?: Record<string, unknown>;
34
+ DeletionPolicy?: 'Delete' | 'Retain' | 'Snapshot';
35
+ UpdateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot';
36
+ }
37
+ interface TemplateOutput {
38
+ Value: unknown;
39
+ Description?: string;
40
+ Export?: {
41
+ Name: string;
42
+ };
43
+ }
44
+ //#endregion
45
+ //#region src/types/state.d.ts
46
+ interface ResourceState {
47
+ physicalId: string;
48
+ resourceType: string;
49
+ properties: Record<string, unknown>;
50
+ observedProperties?: Record<string, unknown>;
51
+ attributes?: Record<string, unknown>;
52
+ dependencies?: string[];
53
+ metadata?: Record<string, unknown>;
54
+ deletionPolicy?: 'Delete' | 'Retain' | 'Snapshot' | 'RetainExceptOnCreate' | undefined;
55
+ updateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot' | 'RetainExceptOnCreate' | undefined;
56
+ provisionedBy?: 'sdk' | 'cc-api' | undefined;
57
+ }
58
+ //#endregion
59
+ //#region src/local/state-resolver.d.ts
60
+ type StateSubstitutionResult = {
61
+ kind: 'literal';
62
+ value: string | number | boolean;
63
+ } | {
64
+ kind: 'unresolved';
65
+ reason: string;
66
+ };
67
+ interface PseudoParameters {
68
+ accountId?: string;
69
+ region?: string;
70
+ partition?: string;
71
+ urlSuffix?: string;
72
+ }
73
+ interface CrossStackResolver {
74
+ resolveImport(exportName: string): Promise<string | undefined>;
75
+ resolveGetStackOutput(producerStack: string, producerRegion: string, outputName: string): Promise<string | undefined>;
76
+ }
77
+ interface SubstitutionContext {
78
+ resources: Record<string, ResourceState>;
79
+ parameters?: Record<string, string>;
80
+ sensitiveParameters?: ReadonlySet<string>;
81
+ onSensitiveParameterConsumed?: (logicalId: string) => void;
82
+ pseudoParameters?: PseudoParameters;
83
+ crossStackResolver?: CrossStackResolver;
84
+ consumerRegion?: string;
85
+ }
86
+ declare function substituteAgainstState(value: unknown, contextOrResources: SubstitutionContext | Record<string, ResourceState>): StateSubstitutionResult;
87
+ declare function substituteAgainstStateAsync(value: unknown, contextOrResources: SubstitutionContext | Record<string, ResourceState>): Promise<StateSubstitutionResult>;
88
+ interface StateEnvSubstitutionAudit {
89
+ resolvedKeys: string[];
90
+ unresolved: Array<{
91
+ key: string;
92
+ reason: string;
93
+ }>;
94
+ sensitiveKeys: string[];
95
+ }
96
+ declare function substituteEnvVarsFromState(templateEnv: Record<string, unknown> | undefined, contextOrResources: SubstitutionContext | Record<string, ResourceState>): {
97
+ env: Record<string, unknown>;
98
+ audit: StateEnvSubstitutionAudit;
99
+ };
100
+ declare function substituteEnvVarsFromStateAsync(templateEnv: Record<string, unknown> | undefined, contextOrResources: SubstitutionContext | Record<string, ResourceState>): Promise<{
101
+ env: Record<string, unknown>;
102
+ audit: StateEnvSubstitutionAudit;
103
+ }>;
104
+ //#endregion
105
+ //#region src/local/ssm-parameter-resolver.d.ts
106
+ interface SsmParameterRef {
107
+ logicalId: string;
108
+ ssmName: string;
109
+ isList: boolean;
110
+ }
111
+ interface ResolvedSsmParameters {
112
+ values: Record<string, string>;
113
+ secureStringLogicalIds: string[];
114
+ }
115
+ declare function collectSsmParameterRefs(template: Pick<CloudFormationTemplate, 'Parameters'> | undefined): SsmParameterRef[];
116
+ declare function resolveSsmParameters(client: SSMClient, refs: readonly SsmParameterRef[], label: string): Promise<ResolvedSsmParameters>;
117
+ //#endregion
118
+ //#region src/local/local-state-provider.d.ts
119
+ interface LocalStateRecord {
120
+ resources: Record<string, ResourceState>;
121
+ outputs: Record<string, string>;
122
+ region: string;
123
+ }
124
+ interface LocalStateProvider {
125
+ readonly label: string;
126
+ load(stackName: string, synthRegion: string | undefined): Promise<LocalStateRecord | undefined>;
127
+ buildCrossStackResolver(consumerRegion: string): Promise<CrossStackResolver | undefined>;
128
+ resolveDeployedFunctionEnv?(functionPhysicalId: string): Promise<Record<string, string> | undefined>;
129
+ resolveTemplateSsmParameters?(template: CloudFormationTemplate): Promise<ResolvedSsmParameters>;
130
+ dispose(): void;
131
+ }
132
+ //#endregion
133
+ //#region src/cli/commands/local-state-source.d.ts
134
+ interface LocalStateSourceOptions {
135
+ fromCfnStack?: string | boolean;
136
+ region?: string;
137
+ profile?: string;
138
+ stackRegion?: string;
139
+ [key: string]: unknown;
140
+ }
141
+ type LocalStateProviderFactory = (options: LocalStateSourceOptions) => LocalStateProvider;
142
+ type ExtraStateProviders = Record<string, LocalStateProviderFactory>;
143
+ declare function resolveCfnStackName(fromCfnStack: string | boolean, stackName: string): string;
144
+ declare function isCfnFlagPresent(opts: Pick<LocalStateSourceOptions, 'fromCfnStack'>): boolean;
145
+ declare function resolveCfnRegion(options: Pick<LocalStateSourceOptions, 'stackRegion' | 'region'>, synthRegion: string | undefined): string;
146
+ declare function resolveCfnFallbackRegion(options: Pick<LocalStateSourceOptions, 'fromCfnStack' | 'profile'>, synthRegion: string | undefined): Promise<string | undefined>;
147
+ declare class LocalStateSourceError extends Error {
148
+ constructor(message: string);
149
+ }
150
+ declare function rejectExplicitCfnStackWithMultipleStacks(options: Pick<LocalStateSourceOptions, 'fromCfnStack'>, routedStackCount: number): void;
151
+ declare function createLocalStateProvider(options: LocalStateSourceOptions, stackName: string, synthRegion: string | undefined, extraStateProviders?: ExtraStateProviders): LocalStateProvider | undefined;
152
+ //#endregion
153
+ //#region src/local/embed-config.d.ts
154
+ interface CdkLocalEmbedConfig {
155
+ cliName?: string;
156
+ binaryName?: string;
157
+ productName?: string;
158
+ resourceNamePrefix?: string;
159
+ awsBindMountPath?: string;
160
+ envPrefix?: string;
161
+ sigV4StrictByDefault?: boolean;
162
+ sigV4OptFlag?: string;
163
+ }
164
+ interface ResolvedEmbedConfig {
165
+ cliName: string;
166
+ binaryName: string;
167
+ productName: string;
168
+ resourceNamePrefix: string;
169
+ awsBindMountPath: string;
170
+ envPrefix: string;
171
+ sigV4StrictByDefault: boolean;
172
+ sigV4OptFlag: string;
173
+ }
174
+ declare function setEmbedConfig(config?: CdkLocalEmbedConfig): void;
175
+ declare function getEmbedConfig(): ResolvedEmbedConfig;
176
+ declare function resetEmbedConfig(): void;
177
+ //#endregion
178
+ //#region src/synthesis/assembly-reader.d.ts
179
+ interface StackInfo {
180
+ stackName: string;
181
+ displayName: string;
182
+ artifactId: string;
183
+ template: CloudFormationTemplate;
184
+ assetManifestPath?: string | undefined;
185
+ dependencyNames: string[];
186
+ region?: string | undefined;
187
+ account?: string | undefined;
188
+ terminationProtection?: boolean | undefined;
189
+ nestedTemplates?: Record<string, string> | undefined;
190
+ }
191
+ //#endregion
192
+ //#region src/local/lambda-resolver.d.ts
193
+ interface ResolvedArnLambdaLayer {
194
+ kind: 'arn';
195
+ logicalId: string;
196
+ arn: string;
197
+ region: string;
198
+ accountId: string;
199
+ name: string;
200
+ version: string;
201
+ }
202
+ //#endregion
203
+ //#region src/local/intrinsic-image.d.ts
204
+ interface ImageResolutionContext {
205
+ pseudoParameters?: {
206
+ accountId?: string;
207
+ region?: string;
208
+ partition?: string;
209
+ urlSuffix?: string;
210
+ };
211
+ stateResources?: Record<string, ResourceState>;
212
+ stateParameters?: Record<string, string>;
213
+ stateSensitiveParameters?: readonly string[];
214
+ }
215
+ declare function derivePseudoParametersFromRegion(region: string | undefined, accountId?: string): {
216
+ accountId?: string;
217
+ region: string;
218
+ partition: string;
219
+ urlSuffix: string;
220
+ } | undefined;
221
+ type FnJoinResolveOutcome = {
222
+ kind: 'not-applicable';
223
+ } | {
224
+ kind: 'resolved';
225
+ uri: string;
226
+ } | {
227
+ kind: 'needs-state';
228
+ repoLogicalId: string;
229
+ } | {
230
+ kind: 'unsupported-join';
231
+ reason: string;
232
+ };
233
+ declare function tryResolveImageFnJoin(raw: unknown, resources: Record<string, TemplateResource>, context: ImageResolutionContext | undefined): FnJoinResolveOutcome;
234
+ declare function substituteImagePlaceholders(flat: string, resources: Record<string, TemplateResource>, context: ImageResolutionContext | undefined): string;
235
+ //#endregion
236
+ //#region src/local/agentcore-resolver.d.ts
237
+ declare const AGENTCORE_RUNTIME_TYPE = "AWS::BedrockAgentCore::Runtime";
238
+ declare const AGENTCORE_HTTP_PROTOCOL = "HTTP";
239
+ declare const AGENTCORE_MCP_PROTOCOL = "MCP";
240
+ interface ResolvedAgentCoreRuntime {
241
+ stack: StackInfo;
242
+ logicalId: string;
243
+ resource: TemplateResource;
244
+ containerUri?: string;
245
+ codeArtifact?: AgentCoreCodeArtifact;
246
+ environmentVariables: Record<string, unknown>;
247
+ roleArn?: string;
248
+ protocol: string;
249
+ jwtAuthorizer?: AgentCoreJwtAuthorizer;
250
+ }
251
+ interface AgentCoreJwtAuthorizer {
252
+ discoveryUrl: string;
253
+ allowedAudience?: string[];
254
+ allowedClients?: string[];
255
+ }
256
+ interface AgentCoreCodeArtifact {
257
+ runtime: string;
258
+ entryPoint: string[];
259
+ codeAssetHash: string;
260
+ }
261
+ declare class AgentCoreResolutionError extends Error {
262
+ constructor(message: string);
263
+ }
264
+ declare function resolveAgentCoreTarget(target: string, stacks: StackInfo[], imageContext?: ImageResolutionContext): ResolvedAgentCoreRuntime;
265
+ //#endregion
266
+ //#region src/local/agentcore-client.d.ts
267
+ declare const AGENTCORE_SESSION_ID_HEADER = "X-Amzn-Bedrock-AgentCore-Runtime-Session-Id";
268
+ interface AgentCoreInvokeResult {
269
+ status: number;
270
+ contentType: string | null;
271
+ raw: string;
272
+ streamed: boolean;
273
+ }
274
+ declare function waitForAgentCorePing(host: string, port: number, timeoutMs?: number): Promise<void>;
275
+ interface InvokeAgentCoreOptions {
276
+ sessionId: string;
277
+ timeoutMs: number;
278
+ authorization?: string;
279
+ onChunk?: (text: string) => void;
280
+ }
281
+ declare function invokeAgentCore(host: string, port: number, event: unknown, options: InvokeAgentCoreOptions): Promise<AgentCoreInvokeResult>;
282
+ //#endregion
283
+ //#region src/local/agentcore-mcp-client.d.ts
284
+ declare const MCP_CONTAINER_PORT = 8000;
285
+ declare const MCP_PATH = "/mcp";
286
+ declare const MCP_PROTOCOL_VERSION = "2025-06-18";
287
+ interface McpJsonRpcRequest {
288
+ method: string;
289
+ params?: unknown;
290
+ }
291
+ interface McpInvokeResult {
292
+ ok: boolean;
293
+ raw: string;
294
+ }
295
+ interface McpInvokeOptions {
296
+ readyTimeoutMs?: number;
297
+ requestTimeoutMs?: number;
298
+ fetchImpl?: typeof fetch;
299
+ }
300
+ declare function mcpInvokeOnce(host: string, port: number, request: McpJsonRpcRequest, options?: McpInvokeOptions): Promise<McpInvokeResult>;
301
+ declare function parseSseForJsonRpc(text: string, id: number): unknown;
302
+ //#endregion
303
+ //#region src/local/agentcore-ws-client.d.ts
304
+ interface InvokeAgentCoreWsOptions {
305
+ sessionId: string;
306
+ onMessage: (text: string) => void;
307
+ timeoutMs: number;
308
+ authorization?: string;
309
+ webSocketImpl?: typeof WebSocket;
310
+ }
311
+ interface AgentCoreWsResult {
312
+ frames: number;
313
+ }
314
+ declare function invokeAgentCoreWs(host: string, port: number, event: unknown, options: InvokeAgentCoreWsOptions): Promise<AgentCoreWsResult>;
315
+ //#endregion
316
+ //#region src/local/env-resolver.d.ts
317
+ interface EnvResolutionResult {
318
+ resolved: Record<string, string>;
319
+ unresolved: string[];
320
+ }
321
+ interface EnvOverrideFile {
322
+ Parameters?: Record<string, string | null>;
323
+ [logicalIdOrDisplayPath: string]: Record<string, string | null> | undefined;
324
+ }
325
+ declare function resolveEnvVars(logicalId: string, displayPath: string | undefined, templateEnv: Record<string, unknown> | undefined, overrides?: EnvOverrideFile): EnvResolutionResult;
326
+ //#endregion
327
+ //#region src/cli/config-loader.d.ts
328
+ interface CdkWatchConfig {
329
+ include: string[];
330
+ exclude: string[];
331
+ }
332
+ declare function resolveWatchConfig(): CdkWatchConfig;
333
+ //#endregion
334
+ //#region src/local/httpv2-service-integration.d.ts
335
+ type SupportedSubtype = 'EventBridge-PutEvents' | 'SQS-SendMessage' | 'SQS-ReceiveMessage' | 'SQS-DeleteMessage' | 'SQS-PurgeQueue' | 'Kinesis-PutRecord' | 'StepFunctions-StartExecution' | 'StepFunctions-StartSyncExecution' | 'StepFunctions-StopExecution' | 'AppConfig-GetConfiguration';
336
+ //#endregion
337
+ //#region src/local/container-pool.d.ts
338
+ interface ContainerHandle {
339
+ logicalId: string;
340
+ containerId: string;
341
+ containerName: string;
342
+ hostPort: number;
343
+ containerHost: string;
344
+ stopLogStream: () => void;
345
+ }
346
+ interface ContainerPool {
347
+ acquire(logicalId: string): Promise<ContainerHandle>;
348
+ release(handle: ContainerHandle): void;
349
+ dispose(): Promise<void>;
350
+ }
351
+ //#endregion
352
+ //#region src/local/vtl-engine.d.ts
353
+ declare class VtlEvaluationError extends Error {
354
+ constructor(message: string);
355
+ }
356
+ //#endregion
357
+ //#region src/local/integration-response-selector.d.ts
358
+ interface IntegrationResponseEntry {
359
+ StatusCode: string;
360
+ SelectionPattern?: string;
361
+ ResponseParameters?: Record<string, string>;
362
+ ResponseTemplates?: Record<string, string>;
363
+ ContentHandling?: string;
364
+ }
365
+ interface SelectedIntegrationResponse {
366
+ entry: IntegrationResponseEntry | null;
367
+ statusCode: number;
368
+ }
369
+ declare function selectIntegrationResponse(entries: IntegrationResponseEntry[] | undefined, matchTarget: string, fallbackStatusCode?: number): SelectedIntegrationResponse;
370
+ declare function tryParseStatus(raw: unknown): number | undefined;
371
+ declare function evaluateResponseParameters(responseParameters: Record<string, string> | undefined, opts?: {
372
+ onUnsupported?: (key: string, value: string, reason: string) => void;
373
+ }): Record<string, string>;
374
+ declare function pickResponseTemplate(responseTemplates: Record<string, string> | undefined, accept: string | undefined): {
375
+ template: string;
376
+ contentType: string;
377
+ } | undefined;
378
+ //#endregion
379
+ //#region src/local/rest-v1-integrations.d.ts
380
+ interface MockIntegrationConfig {
381
+ kind: 'mock';
382
+ requestTemplate: string | undefined;
383
+ responses: IntegrationResponseEntry[];
384
+ }
385
+ interface HttpProxyIntegrationConfig {
386
+ kind: 'http-proxy';
387
+ uri: string;
388
+ integrationHttpMethod?: string;
389
+ requestParameters?: Record<string, string>;
390
+ responses: IntegrationResponseEntry[];
391
+ }
392
+ interface HttpIntegrationConfig {
393
+ kind: 'http';
394
+ uri: string;
395
+ integrationHttpMethod?: string;
396
+ requestParameters?: Record<string, string>;
397
+ requestTemplates?: Record<string, string>;
398
+ responses: IntegrationResponseEntry[];
399
+ }
400
+ interface AwsLambdaIntegrationConfig {
401
+ kind: 'aws-lambda';
402
+ lambdaLogicalId: string;
403
+ requestTemplates?: Record<string, string>;
404
+ responses: IntegrationResponseEntry[];
405
+ }
406
+ //#endregion
407
+ //#region src/local/route-discovery.d.ts
408
+ type RestV1IntegrationConfig = MockIntegrationConfig | HttpProxyIntegrationConfig | HttpIntegrationConfig | AwsLambdaIntegrationConfig;
409
+ interface DiscoveredRoute {
410
+ method: string;
411
+ pathPattern: string;
412
+ lambdaLogicalId: string;
413
+ source: 'http-api' | 'rest-v1' | 'function-url';
414
+ apiVersion: 'v1' | 'v2';
415
+ stage: string;
416
+ apiLogicalId?: string;
417
+ apiStackName?: string;
418
+ apiCdkPath?: string;
419
+ stageVariables?: Record<string, string> | null;
420
+ invokeMode?: 'BUFFERED' | 'RESPONSE_STREAM';
421
+ unsupported?: {
422
+ reason: string;
423
+ };
424
+ mockCors?: {
425
+ statusCode: number;
426
+ headers: Record<string, string>;
427
+ };
428
+ serviceIntegration?: {
429
+ subtype: SupportedSubtype;
430
+ requestParameters: Readonly<Record<string, unknown>>;
431
+ responseParameters?: Readonly<Record<string, Readonly<Record<string, string>>>>;
432
+ };
433
+ restV1Integration?: RestV1IntegrationConfig;
434
+ declaredAt: string;
435
+ }
436
+ declare function discoverRoutes(stacks: readonly StackInfo[]): DiscoveredRoute[];
437
+ //#endregion
438
+ //#region src/local/cors-handler.d.ts
439
+ interface CorsConfig {
440
+ AllowOrigins: string[];
441
+ AllowMethods: string[];
442
+ AllowHeaders: string[];
443
+ ExposeHeaders: string[];
444
+ MaxAge?: number;
445
+ AllowCredentials?: boolean;
446
+ }
447
+ declare function buildCorsConfigByApiId(template: CloudFormationTemplate): Map<string, CorsConfig>;
448
+ declare function buildCorsConfigFromCloudFrontChain(template: CloudFormationTemplate): Map<string, CorsConfig>;
449
+ declare function isFunctionUrlOacFronted(template: CloudFormationTemplate, fnUrlLogicalId: string): boolean;
450
+ interface PreflightResponse {
451
+ statusCode: number;
452
+ headers: Record<string, string>;
453
+ }
454
+ declare function matchPreflight(req: {
455
+ method: string;
456
+ headers: Record<string, string[]>;
457
+ }, config: CorsConfig): PreflightResponse | null;
458
+ declare function applyCorsResponseHeaders(res: ServerResponse, apiLogicalId: string | undefined, corsConfigByApiId: Map<string, CorsConfig>, requestOrigin: string | undefined): void;
459
+ //#endregion
460
+ //#region src/local/authorizer-resolver.d.ts
461
+ interface LambdaTokenAuthorizer {
462
+ kind: 'lambda-token';
463
+ logicalId: string;
464
+ lambdaLogicalId: string;
465
+ tokenHeader: string;
466
+ resultTtlSeconds: number;
467
+ declaredAt: string;
468
+ }
469
+ interface LambdaRequestAuthorizer {
470
+ kind: 'lambda-request';
471
+ logicalId: string;
472
+ lambdaLogicalId: string;
473
+ identitySources: ReadonlyArray<IdentitySourceSelector>;
474
+ resultTtlSeconds: number;
475
+ apiVersion: 'v1' | 'v2';
476
+ declaredAt: string;
477
+ }
478
+ interface CognitoPoolRef {
479
+ userPoolArn: string;
480
+ region: string;
481
+ userPoolId: string;
482
+ }
483
+ interface CognitoUserPoolAuthorizer {
484
+ kind: 'cognito';
485
+ logicalId: string;
486
+ pools: ReadonlyArray<CognitoPoolRef>;
487
+ userPoolArn: string;
488
+ region: string;
489
+ userPoolId: string;
490
+ declaredAt: string;
491
+ }
492
+ interface JwtAuthorizer {
493
+ kind: 'jwt';
494
+ logicalId: string;
495
+ issuer: string;
496
+ audience: ReadonlyArray<string>;
497
+ region?: string;
498
+ userPoolId?: string;
499
+ declaredAt: string;
500
+ }
501
+ interface IamAuthorizer {
502
+ kind: 'iam';
503
+ logicalId: 'AWS_IAM';
504
+ declaredAt: string;
505
+ oacFronted?: boolean;
506
+ }
507
+ type AuthorizerInfo = LambdaTokenAuthorizer | LambdaRequestAuthorizer | CognitoUserPoolAuthorizer | JwtAuthorizer | IamAuthorizer;
508
+ type IdentitySourceSelector = {
509
+ kind: 'header';
510
+ name: string;
511
+ } | {
512
+ kind: 'query';
513
+ name: string;
514
+ } | {
515
+ kind: 'context';
516
+ name: string;
517
+ } | {
518
+ kind: 'stage-variable';
519
+ name: string;
520
+ };
521
+ interface RouteWithAuth {
522
+ route: DiscoveredRoute;
523
+ authorizer?: AuthorizerInfo;
524
+ }
525
+ declare function attachAuthorizers(stacks: readonly StackInfo[], routes: readonly DiscoveredRoute[]): RouteWithAuth[];
526
+ //#endregion
527
+ //#region src/local/authorizer-cache.d.ts
528
+ interface CachedAuthorizerResult {
529
+ allow: boolean;
530
+ principalId?: string;
531
+ context?: Record<string, unknown>;
532
+ policy?: unknown;
533
+ }
534
+ interface AuthorizerCache {
535
+ get(authorizerLogicalId: string, identityHash: string): CachedAuthorizerResult | undefined;
536
+ set(authorizerLogicalId: string, identityHash: string, ttlSeconds: number, result: CachedAuthorizerResult): void;
537
+ clear(): void;
538
+ size(): number;
539
+ }
540
+ declare function createAuthorizerCache(opts?: {
541
+ now?: () => number;
542
+ }): AuthorizerCache;
543
+ //#endregion
544
+ //#region src/local/cognito-jwt.d.ts
545
+ interface JwksKey {
546
+ kid: string;
547
+ n: string;
548
+ e: string;
549
+ alg?: string;
550
+ kty: string;
551
+ use?: string;
552
+ }
553
+ interface JwksCacheEntry {
554
+ byKid: Map<string, JwksKey>;
555
+ expiresAt: number;
556
+ passThrough: boolean;
557
+ }
558
+ interface JwksCache {
559
+ fetchAndCache(jwksUrl: string): Promise<JwksCacheEntry>;
560
+ peek(jwksUrl: string): JwksCacheEntry | undefined;
561
+ clear(): void;
562
+ }
563
+ declare function createJwksCache(opts?: {
564
+ fetchImpl?: (url: string) => Promise<{
565
+ ok: boolean;
566
+ status: number;
567
+ text: () => Promise<string>;
568
+ }>;
569
+ now?: () => number;
570
+ ttlMs?: number;
571
+ failureTtlMs?: number;
572
+ }): JwksCache;
573
+ declare function buildCognitoJwksUrl(region: string, userPoolId: string): string;
574
+ declare function buildJwksUrlFromIssuer(issuer: string): string;
575
+ declare function verifyCognitoJwt(authorizer: CognitoUserPoolAuthorizer, authorizationHeader: string | undefined, jwksCache: JwksCache, opts?: {
576
+ now?: () => number;
577
+ warned?: Set<string>;
578
+ }): Promise<CachedAuthorizerResult & {
579
+ identityHash: string | undefined;
580
+ ttlSeconds: number;
581
+ }>;
582
+ declare function verifyJwtAuthorizer(authorizer: JwtAuthorizer, authorizationHeader: string | undefined, jwksCache: JwksCache, opts?: {
583
+ now?: () => number;
584
+ warned?: Set<string>;
585
+ }): Promise<CachedAuthorizerResult & {
586
+ identityHash: string | undefined;
587
+ ttlSeconds: number;
588
+ }>;
589
+ interface DiscoveryJwtAuthorizer {
590
+ discoveryUrl: string;
591
+ allowedAudience?: readonly string[];
592
+ allowedClients?: readonly string[];
593
+ }
594
+ declare function verifyJwtViaDiscovery(authorizer: DiscoveryJwtAuthorizer, authorizationHeader: string | undefined, jwksCache: JwksCache, opts?: {
595
+ now?: () => number;
596
+ warned?: Set<string>;
597
+ fetchImpl?: (url: string) => Promise<{
598
+ ok: boolean;
599
+ status: number;
600
+ text: () => Promise<string>;
601
+ }>;
602
+ }): Promise<CachedAuthorizerResult & {
603
+ identityHash: string | undefined;
604
+ ttlSeconds: number;
605
+ }>;
606
+ //#endregion
607
+ //#region src/local/sigv4-verify.d.ts
608
+ interface ResolvedCredentials {
609
+ accessKeyId: string;
610
+ secretAccessKey: string;
611
+ sessionToken?: string | undefined;
612
+ }
613
+ type CredentialsLoader = () => Promise<ResolvedCredentials>;
614
+ declare function defaultCredentialsLoader(): CredentialsLoader;
615
+ //#endregion
616
+ //#region src/local/http-server.d.ts
617
+ interface ServerState {
618
+ routes: readonly RouteWithAuth[];
619
+ pool: ContainerPool;
620
+ corsConfigByApiId: Map<string, CorsConfig>;
621
+ }
622
+ interface StartApiServerOptions {
623
+ state: ServerState;
624
+ rieTimeoutMs: number;
625
+ host: string;
626
+ port: number;
627
+ authorizerCache?: AuthorizerCache;
628
+ jwksCache?: JwksCache;
629
+ jwksWarnedUrls?: Set<string>;
630
+ mtls?: MtlsServerConfig;
631
+ sigV4CredentialsLoader?: CredentialsLoader;
632
+ sigV4WarnedForeignIds?: Set<string>;
633
+ sigV4Strict?: boolean;
634
+ defaultRegion?: string;
635
+ preDispatch?: (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
636
+ }
637
+ interface MtlsServerConfig {
638
+ caPem: Buffer;
639
+ certPem: Buffer;
640
+ keyPem: Buffer;
641
+ }
642
+ interface StartedApiServer {
643
+ port: number;
644
+ host: string;
645
+ scheme: 'http' | 'https';
646
+ server: Server;
647
+ close: () => Promise<void>;
648
+ setServerState: (next: ServerState) => ServerState;
649
+ getServerState: () => ServerState;
650
+ }
651
+ declare function startApiServer(opts: StartApiServerOptions): Promise<StartedApiServer>;
652
+ declare function readMtlsMaterialsFromDisk(opts: {
653
+ truststorePath: string;
654
+ certPath: string;
655
+ keyPath: string;
656
+ }): MtlsServerConfig;
657
+ //#endregion
658
+ //#region src/cli/commands/local-start-api.d.ts
659
+ interface CreateLocalStartApiCommandOptions {
660
+ extraStateProviders?: ExtraStateProviders;
661
+ embedConfig?: CdkLocalEmbedConfig;
662
+ }
663
+ interface WatchPredicates {
664
+ ignored: (absPath: string) => boolean;
665
+ shouldTrigger: (absPath: string) => boolean;
666
+ excludePatterns: string[];
667
+ }
668
+ declare function createWatchPredicates(args: {
669
+ watchRoot: string;
670
+ output: string;
671
+ watchConfig: CdkWatchConfig;
672
+ }): WatchPredicates;
673
+ interface ApiTargetSubset {
674
+ readonly filtered: RouteWithAuth[];
675
+ readonly unmatched: string[];
676
+ }
677
+ declare function resolveApiTargetSubset(routes: readonly RouteWithAuth[], identifiers: readonly string[], stackNames: readonly string[]): ApiTargetSubset;
678
+ declare function createLocalStartApiCommand(opts?: CreateLocalStartApiCommandOptions): Command;
679
+ //#endregion
680
+ //#region src/local/ecs-task-resolver.d.ts
681
+ declare class EcsTaskResolutionError extends Error {
682
+ constructor(message: string);
683
+ }
684
+ //#endregion
685
+ //#region src/utils/error-handler.d.ts
686
+ declare class CdkLocalError extends Error {
687
+ readonly code: string;
688
+ readonly cause: Error | undefined;
689
+ constructor(message: string, code: string, cause?: Error);
690
+ }
691
+ declare class LocalInvokeBuildError extends CdkLocalError {
692
+ constructor(message: string, cause?: Error);
693
+ }
694
+ //#endregion
695
+ //#region src/local/intrinsic-utils.d.ts
696
+ declare function pickRefLogicalId(value: unknown): string | null;
697
+ //#endregion
698
+ //#region src/local/intrinsic-lambda-arn.d.ts
699
+ type LambdaArnResolveOutcome = {
700
+ kind: 'resolved';
701
+ logicalId: string;
702
+ } | {
703
+ kind: 'unsupported';
704
+ detail: string;
705
+ };
706
+ declare function resolveLambdaArnIntrinsic(value: unknown): LambdaArnResolveOutcome;
707
+ //#endregion
708
+ //#region src/local/parameter-mapping.d.ts
709
+ interface RequestParameterContext {
710
+ headers: Readonly<Record<string, string>>;
711
+ queryString: Readonly<Record<string, string>>;
712
+ pathParameters: Readonly<Record<string, string>>;
713
+ requestPath: string;
714
+ body: string;
715
+ context: Readonly<Record<string, string>>;
716
+ stageVariables: Readonly<Record<string, string>>;
717
+ authorizer?: Readonly<Record<string, unknown>>;
718
+ }
719
+ type ResolveParametersOutcome = {
720
+ kind: 'ok';
721
+ resolved: Record<string, string>;
722
+ } | {
723
+ kind: 'error';
724
+ reason: string;
725
+ };
726
+ declare function resolveServiceIntegrationParameters(parameters: Readonly<Record<string, unknown>>, ctx: RequestParameterContext): ResolveParametersOutcome;
727
+ declare function resolveSelectionExpression(input: string, ctx: RequestParameterContext): string;
728
+ //#endregion
729
+ //#region src/local/api-gateway-response.d.ts
730
+ interface TranslatedHttpResponse {
731
+ statusCode: number;
732
+ headers: Record<string, string>;
733
+ cookies: string[];
734
+ body: Buffer;
735
+ }
736
+ declare function translateLambdaResponse(payload: unknown, version: 'v1' | 'v2'): TranslatedHttpResponse;
737
+ //#endregion
738
+ //#region src/local/docker-inspect.d.ts
739
+ declare function getContainerNetworkIp(containerId: string, networkName: string): Promise<string | undefined>;
740
+ //#endregion
741
+ //#region src/local/route-matcher.d.ts
742
+ interface RouteMatchResult {
743
+ route: DiscoveredRoute;
744
+ pathParameters: Record<string, string>;
745
+ }
746
+ declare function matchRoute(method: string, requestPath: string, routes: readonly DiscoveredRoute[]): RouteMatchResult | null;
747
+ //#endregion
748
+ //#region src/local/api-gateway-event.d.ts
749
+ interface HttpRequestSnapshot {
750
+ method: string;
751
+ rawUrl: string;
752
+ headers: Record<string, string[]>;
753
+ body: Buffer;
754
+ sourceIp?: string;
755
+ clientCert?: Record<string, unknown>;
756
+ }
757
+ interface MatchedRouteContext {
758
+ route: DiscoveredRoute;
759
+ pathParameters: Record<string, string>;
760
+ matchedPath: string;
761
+ }
762
+ declare function buildHttpApiV2Event(req: HttpRequestSnapshot, ctx: MatchedRouteContext, opts?: {
763
+ now?: () => Date;
764
+ }): Record<string, unknown>;
765
+ declare function buildRestV1Event(req: HttpRequestSnapshot, ctx: MatchedRouteContext, opts?: {
766
+ now?: () => Date;
767
+ }): Record<string, unknown>;
768
+ type AuthorizerEventOverlay = {
769
+ kind: 'lambda-rest-v1';
770
+ principalId?: string;
771
+ context?: Record<string, unknown>;
772
+ } | {
773
+ kind: 'lambda-http-v2';
774
+ principalId?: string;
775
+ context?: Record<string, unknown>;
776
+ } | {
777
+ kind: 'cognito-rest-v1';
778
+ claims: Record<string, unknown>;
779
+ } | {
780
+ kind: 'jwt-http-v2';
781
+ claims: Record<string, unknown>;
782
+ scopes?: string[];
783
+ };
784
+ declare function applyAuthorizerOverlay(event: Record<string, unknown>, overlay: AuthorizerEventOverlay): Record<string, unknown>;
785
+ //#endregion
786
+ //#region src/local/websocket-route-discovery.d.ts
787
+ interface DiscoveredWebSocketApi {
788
+ apiLogicalId: string;
789
+ apiStackName: string;
790
+ declaredAt: string;
791
+ apiCdkPath?: string;
792
+ routeSelectionExpression: string;
793
+ stage: string;
794
+ routes: WebSocketRouteEntry[];
795
+ unsupported?: {
796
+ reason: string;
797
+ };
798
+ }
799
+ interface WebSocketRouteEntry {
800
+ routeKey: string;
801
+ targetLambdaLogicalId: string;
802
+ lambdaStackName: string;
803
+ declaredAt: string;
804
+ }
805
+ declare function discoverWebSocketApis(stacks: readonly StackInfo[]): {
806
+ apis: DiscoveredWebSocketApi[];
807
+ errors: string[];
808
+ };
809
+ declare function discoverWebSocketApisOrThrow(stacks: readonly StackInfo[]): DiscoveredWebSocketApi[];
810
+ declare function parseSelectionExpressionPath(expr: string): string[];
811
+ //#endregion
812
+ //#region src/local/lambda-authorizer.d.ts
813
+ interface RequestSnapshotForAuthorizer {
814
+ method: string;
815
+ headers: Record<string, string>;
816
+ queryStringParameters: Record<string, string>;
817
+ pathParameters: Record<string, string>;
818
+ sourceIp: string;
819
+ matchedPath: string;
820
+ stage: string;
821
+ }
822
+ interface AuthorizerInvocationContext {
823
+ pool: ContainerPool;
824
+ rieTimeoutMs: number;
825
+ methodArn: string;
826
+ mockAccountId: string;
827
+ mockApiId: string;
828
+ }
829
+ declare function buildMethodArn(opts: {
830
+ apiId: string;
831
+ accountId: string;
832
+ region?: string;
833
+ stage: string;
834
+ method: string;
835
+ path: string;
836
+ }): string;
837
+ declare function invokeTokenAuthorizer(authorizer: LambdaTokenAuthorizer, request: RequestSnapshotForAuthorizer, ctx: AuthorizerInvocationContext): Promise<CachedAuthorizerResult & {
838
+ identityHash: string | undefined;
839
+ }>;
840
+ declare function invokeRequestAuthorizer(authorizer: LambdaRequestAuthorizer, request: RequestSnapshotForAuthorizer, ctx: AuthorizerInvocationContext): Promise<CachedAuthorizerResult & {
841
+ identityHash: string | undefined;
842
+ }>;
843
+ declare function computeRequestIdentityHash(authorizer: LambdaRequestAuthorizer, request: RequestSnapshotForAuthorizer): {
844
+ identityHash: string;
845
+ missing: boolean;
846
+ };
847
+ declare function evaluateCachedLambdaPolicy(cached: CachedAuthorizerResult, methodArn: string): CachedAuthorizerResult;
848
+ //#endregion
849
+ //#region src/local/stage-resolver.d.ts
850
+ interface ResolvedStage {
851
+ stageLogicalId: string;
852
+ stageName: string;
853
+ apiVersion: 'v1' | 'v2';
854
+ variables: Record<string, string> | null;
855
+ }
856
+ declare function buildStageMap(template: CloudFormationTemplate, stageOverride?: string): Map<string, ResolvedStage>;
857
+ declare function attachStageContext(routes: DiscoveredRoute[], stageMap: Map<string, ResolvedStage>): void;
858
+ //#endregion
859
+ //#region src/local/cloud-map-registry.d.ts
860
+ interface RegisteredEndpoint {
861
+ ip: string;
862
+ port: number;
863
+ ownerKey: string;
864
+ }
865
+ interface RegistrationHandle {
866
+ readonly fqdn: string;
867
+ readonly ownerKey: string;
868
+ }
869
+ interface RegistryListing {
870
+ namespace: string;
871
+ discoveryName: string;
872
+ endpoints: ReadonlyArray<RegisteredEndpoint>;
873
+ isAlias: boolean;
874
+ }
875
+ declare class CloudMapRegistry {
876
+ private readonly byFqdn;
877
+ private readonly aliasIndex;
878
+ register(namespace: string, discoveryName: string, endpoint: RegisteredEndpoint): RegistrationHandle;
879
+ registerAlias(alias: string, targetFqdn: string): void;
880
+ unregister(handle: RegistrationHandle): boolean;
881
+ unregisterByOwner(ownerKeyPrefix: string): number;
882
+ lookup(namespace: string, discoveryName: string): ReadonlyArray<RegisteredEndpoint> | undefined;
883
+ lookupAlias(alias: string): ReadonlyArray<RegisteredEndpoint> | undefined;
884
+ buildAddHostFlags(excludeOwnerKeyPrefix?: string): string[];
885
+ list(): ReadonlyArray<RegistryListing>;
886
+ isEmpty(): boolean;
887
+ }
888
+ //#endregion
889
+ //#region src/local/runtime-image.d.ts
890
+ declare function resolveRuntimeImage(runtime: string): string;
891
+ declare function resolveRuntimeFileExtension(runtime: string): string;
892
+ declare function resolveRuntimeCodeMountPath(runtime: string): string;
893
+ //#endregion
894
+ //#region src/local/websocket-event.d.ts
895
+ interface WebSocketHandshakeSnapshot {
896
+ headers: Record<string, string[]>;
897
+ rawQueryString: string;
898
+ queryStringParameters?: Record<string, string>;
899
+ multiValueQueryStringParameters?: Record<string, string[]>;
900
+ sourceIp?: string;
901
+ userAgent?: string;
902
+ }
903
+ interface WebSocketRequestContextBase {
904
+ routeKey: string;
905
+ eventType: 'CONNECT' | 'MESSAGE' | 'DISCONNECT';
906
+ connectionId: string;
907
+ extendedRequestId: string;
908
+ requestTime: string;
909
+ requestTimeEpoch: number;
910
+ messageDirection: 'IN';
911
+ stage: string;
912
+ connectedAt: number;
913
+ requestId: string;
914
+ domainName: string;
915
+ apiId: string;
916
+ authorizer: null;
917
+ identity: {
918
+ accountId: string;
919
+ sourceIp: string;
920
+ userAgent: string;
921
+ };
922
+ }
923
+ interface WebSocketLambdaEvent {
924
+ headers?: Record<string, string>;
925
+ multiValueHeaders?: Record<string, string[]>;
926
+ queryStringParameters?: Record<string, string> | null;
927
+ multiValueQueryStringParameters?: Record<string, string[]> | null;
928
+ requestContext: WebSocketRequestContextBase & Record<string, unknown>;
929
+ isBase64Encoded: boolean;
930
+ body: string;
931
+ }
932
+ declare function buildConnectEvent(opts: {
933
+ connectionId: string;
934
+ connectedAt: number;
935
+ stage: string;
936
+ snapshot: WebSocketHandshakeSnapshot;
937
+ }): WebSocketLambdaEvent;
938
+ declare function buildMessageEvent(opts: {
939
+ connectionId: string;
940
+ connectedAt: number;
941
+ stage: string;
942
+ snapshot: WebSocketHandshakeSnapshot;
943
+ routeKey: string;
944
+ body: string;
945
+ isBase64Encoded: boolean;
946
+ }): WebSocketLambdaEvent;
947
+ declare function buildDisconnectEvent(opts: {
948
+ connectionId: string;
949
+ connectedAt: number;
950
+ stage: string;
951
+ snapshot: WebSocketHandshakeSnapshot;
952
+ disconnectStatusCode?: number;
953
+ disconnectReason?: string;
954
+ }): WebSocketLambdaEvent;
955
+ //#endregion
956
+ //#region src/local/websocket-mgmt-api.d.ts
957
+ interface ConnectionRegistryEntry {
958
+ connectionId: string;
959
+ socket: WebSocket;
960
+ connectedAt: number;
961
+ apiLogicalId: string;
962
+ stage: string;
963
+ }
964
+ declare class ConnectionRegistry {
965
+ private readonly entries;
966
+ register(entry: ConnectionRegistryEntry): void;
967
+ unregister(connectionId: string): ConnectionRegistryEntry | undefined;
968
+ get(connectionId: string): ConnectionRegistryEntry | undefined;
969
+ size(): number;
970
+ list(): ConnectionRegistryEntry[];
971
+ clear(): void;
972
+ }
973
+ declare function parseConnectionsPath(url: string): {
974
+ connectionId: string;
975
+ } | null;
976
+ declare function buildMgmtEndpointEnvUrl(host: string, port: number, stage: string): string;
977
+ declare function handleConnectionsRequest(opts: {
978
+ req: IncomingMessage;
979
+ res: ServerResponse;
980
+ registry: ConnectionRegistry;
981
+ }): Promise<void>;
982
+ //#endregion
983
+ //#region src/local/websocket-body.d.ts
984
+ declare function bufferToBody(raw: Buffer | ArrayBuffer | Buffer[], isBinary: boolean): {
985
+ body: string;
986
+ isBase64Encoded: boolean;
987
+ };
988
+ //#endregion
989
+ //#region src/local/docker-version.d.ts
990
+ declare const HOST_GATEWAY_MIN_VERSION: ParsedDockerVersion;
991
+ interface ParsedDockerVersion {
992
+ major: number;
993
+ minor: number;
994
+ patch: number;
995
+ }
996
+ interface HostGatewayProbeResult {
997
+ rawVersion: string;
998
+ parsed: ParsedDockerVersion | null;
999
+ supported: boolean;
1000
+ }
1001
+ declare function probeHostGatewaySupport(): Promise<HostGatewayProbeResult>;
1002
+ //#endregion
1003
+ //#region src/local/api-server-grouping.d.ts
1004
+ interface ApiServerGroup {
1005
+ readonly serverKey: string;
1006
+ readonly displayName: string;
1007
+ readonly kind: 'rest-v1' | 'http-api' | 'function-url' | 'websocket';
1008
+ readonly identifier: string;
1009
+ readonly routes: readonly RouteWithAuth[];
1010
+ }
1011
+ declare function groupRoutesByServer(routes: readonly RouteWithAuth[]): ApiServerGroup[];
1012
+ declare function filterRoutesByApiIdentifier(routes: readonly RouteWithAuth[], identifier: string): RouteWithAuth[];
1013
+ declare function filterRoutesByApiIdentifiers(routes: readonly RouteWithAuth[], identifiers: readonly string[]): RouteWithAuth[];
1014
+ declare function availableApiIdentifiers(routes: readonly RouteWithAuth[]): string[];
1015
+ //#endregion
1016
+ //#region src/local/layer-arn-materializer.d.ts
1017
+ interface MaterializeLayerOptions {
1018
+ roleArn?: string;
1019
+ lambdaClientFactory?: (region: string, credentials?: AwsCredentials) => LambdaSendClient;
1020
+ stsClientFactory?: (region: string) => StsSendClient;
1021
+ fetchZip?: (presignedUrl: string) => Promise<Uint8Array>;
1022
+ }
1023
+ interface AwsCredentials {
1024
+ accessKeyId: string;
1025
+ secretAccessKey: string;
1026
+ sessionToken?: string;
1027
+ }
1028
+ interface LambdaSendClient {
1029
+ send(command: any): Promise<{
1030
+ Content?: {
1031
+ Location?: string;
1032
+ };
1033
+ }>;
1034
+ destroy?: () => void;
1035
+ }
1036
+ interface StsSendClient {
1037
+ send(command: any): Promise<{
1038
+ Credentials?: {
1039
+ AccessKeyId?: string;
1040
+ SecretAccessKey?: string;
1041
+ SessionToken?: string;
1042
+ };
1043
+ }>;
1044
+ destroy?: () => void;
1045
+ }
1046
+ declare function materializeLayerFromArn(layer: ResolvedArnLambdaLayer, options?: MaterializeLayerOptions): Promise<string>;
1047
+ //#endregion
1048
+ //#region src/local/cloud-map-resolver.d.ts
1049
+ interface ResolvedCloudMapNamespace {
1050
+ logicalId: string;
1051
+ name: string;
1052
+ }
1053
+ interface ResolvedCloudMapService {
1054
+ logicalId: string;
1055
+ namespaceLogicalId: string;
1056
+ namespaceName: string;
1057
+ name: string;
1058
+ dnsRecords: ReadonlyArray<{
1059
+ type: 'A' | 'SRV';
1060
+ ttlSeconds: number;
1061
+ }>;
1062
+ }
1063
+ interface CloudMapIndex {
1064
+ namespacesByLogicalId: Map<string, ResolvedCloudMapNamespace>;
1065
+ namespacesByName: Map<string, ResolvedCloudMapNamespace>;
1066
+ servicesByLogicalId: Map<string, ResolvedCloudMapService>;
1067
+ warnings: string[];
1068
+ }
1069
+ declare function buildCloudMapIndex(stack: StackInfo): CloudMapIndex;
1070
+ //#endregion
1071
+ //#region src/local/agentcore-code-build.d.ts
1072
+ declare const SUPPORTED_CODE_RUNTIMES: string[];
1073
+ interface BuildAgentCoreCodeImageOptions {
1074
+ sourceDir: string;
1075
+ runtime: string;
1076
+ entryPoint: string[];
1077
+ architecture: 'x86_64' | 'arm64';
1078
+ noBuild?: boolean;
1079
+ }
1080
+ declare function buildAgentCoreCodeImage(options: BuildAgentCoreCodeImageOptions): Promise<string>;
1081
+ declare function renderCodeDockerfile(base: string, entryPoint: string[], isNode: boolean): string;
1082
+ declare function toCmdArgv(entryPoint: string[], isNode: boolean): string[];
1083
+ declare function computeCodeImageTag(sourceDir: string, runtime: string, entryPoint: string[], dockerfile: string): string;
1084
+ //#endregion
1085
+ //#region src/types/assets.d.ts
1086
+ interface DockerImageAssetSource {
1087
+ directory?: string;
1088
+ executable?: string[];
1089
+ dockerFile?: string;
1090
+ dockerBuildTarget?: string;
1091
+ dockerBuildArgs?: Record<string, string>;
1092
+ dockerBuildContexts?: Record<string, string>;
1093
+ dockerBuildSsh?: string;
1094
+ dockerBuildSecrets?: Record<string, string>;
1095
+ networkMode?: string;
1096
+ platform?: string;
1097
+ dockerOutputs?: string[];
1098
+ cacheFrom?: DockerCacheOption[];
1099
+ cacheTo?: DockerCacheOption;
1100
+ cacheDisabled?: boolean;
1101
+ }
1102
+ interface DockerCacheOption {
1103
+ type: string;
1104
+ params?: Record<string, string>;
1105
+ }
1106
+ //#endregion
1107
+ //#region src/local/docker-image-builder.d.ts
1108
+ interface BuildContainerImageOptions {
1109
+ architecture: 'x86_64' | 'arm64';
1110
+ noBuild?: boolean;
1111
+ }
1112
+ declare function buildContainerImage(asset: {
1113
+ source: DockerImageAssetSource;
1114
+ }, cdkOutDir: string, options: BuildContainerImageOptions): Promise<string>;
1115
+ declare function architectureToPlatform(architecture: 'x86_64' | 'arm64'): string;
1116
+ //#endregion
1117
+ //#region src/local/file-watcher.d.ts
1118
+ interface FileWatcher {
1119
+ close(): Promise<void>;
1120
+ }
1121
+ interface FileWatcherOptions {
1122
+ paths: readonly string[];
1123
+ onChange: () => void;
1124
+ debounceMs?: number;
1125
+ ignoreInitial?: boolean;
1126
+ ignored?: (path: string) => boolean;
1127
+ shouldTrigger?: (path: string) => boolean;
1128
+ }
1129
+ declare function createFileWatcher(options: FileWatcherOptions): FileWatcher;
1130
+ //#endregion
1131
+ export { HttpRequestSnapshot as $, LocalStateProvider as $n, discoverRoutes as $t, WebSocketLambdaEvent as A, AgentCoreJwtAuthorizer as An, defaultCredentialsLoader as At, attachStageContext as B, getEmbedConfig as Bn, CachedAuthorizerResult as Bt, bufferToBody as C, InvokeAgentCoreOptions as Cn, resolveApiTargetSubset as Ct, handleConnectionsRequest as D, AGENTCORE_MCP_PROTOCOL as Dn, readMtlsMaterialsFromDisk as Dt, buildMgmtEndpointEnvUrl as E, AGENTCORE_HTTP_PROTOCOL as En, StartedApiServer as Et, resolveRuntimeFileExtension as F, derivePseudoParametersFromRegion as Fn, createJwksCache as Ft, invokeRequestAuthorizer as G, LocalStateSourceError as Gn, CorsConfig as Gt, buildMethodArn as H, setEmbedConfig as Hn, AuthorizerInfo as Ht, resolveRuntimeImage as I, substituteImagePlaceholders as In, verifyCognitoJwt as It, WebSocketRouteEntry as J, isCfnFlagPresent as Jn, buildCorsConfigFromCloudFrontChain as Jt, invokeTokenAuthorizer as K, LocalStateSourceOptions as Kn, applyCorsResponseHeaders as Kt, CloudMapRegistry as L, tryResolveImageFnJoin as Ln, verifyJwtAuthorizer as Lt, buildDisconnectEvent as M, ResolvedAgentCoreRuntime as Mn, JwksCache as Mt, buildMessageEvent as N, resolveAgentCoreTarget as Nn, buildCognitoJwksUrl as Nt, parseConnectionsPath as O, AGENTCORE_RUNTIME_TYPE as On, startApiServer as Ot, resolveRuntimeCodeMountPath as P, ImageResolutionContext as Pn, buildJwksUrlFromIssuer as Pt, AuthorizerEventOverlay as Q, resolveCfnStackName as Qn, RestV1IntegrationConfig as Qt, RegistrationHandle as R, StackInfo as Rn, verifyJwtViaDiscovery as Rt, probeHostGatewaySupport as S, AgentCoreInvokeResult as Sn, createWatchPredicates as St, ConnectionRegistryEntry as T, waitForAgentCorePing as Tn, ServerState as Tt, computeRequestIdentityHash as U, ExtraStateProviders as Un, RouteWithAuth as Ut, buildStageMap as V, resetEmbedConfig as Vn, createAuthorizerCache as Vt, evaluateCachedLambdaPolicy as W, LocalStateProviderFactory as Wn, attachAuthorizers as Wt, discoverWebSocketApisOrThrow as X, resolveCfnFallbackRegion as Xn, matchPreflight as Xt, discoverWebSocketApis as Y, rejectExplicitCfnStackWithMultipleStacks as Yn, isFunctionUrlOacFronted as Yt, parseSelectionExpressionPath as Z, resolveCfnRegion as Zn, DiscoveredRoute as Zt, availableApiIdentifiers as _, McpInvokeResult as _n, EcsTaskResolutionError as _t, architectureToPlatform as a, VtlEvaluationError as an, CrossStackResolver as ar, matchRoute as at, groupRoutesByServer as b, parseSseForJsonRpc as bn, WatchPredicates as bt, SUPPORTED_CODE_RUNTIMES as c, EnvOverrideFile as cn, SubstitutionContext as cr, translateLambdaResponse as ct, renderCodeDockerfile as d, InvokeAgentCoreWsOptions as dn, substituteEnvVarsFromState as dr, resolveSelectionExpression as dt, IntegrationResponseEntry as en, LocalStateRecord as er, MatchedRouteContext as et, toCmdArgv as f, invokeAgentCoreWs as fn, substituteEnvVarsFromStateAsync as fr, resolveServiceIntegrationParameters as ft, ApiServerGroup as g, McpInvokeOptions as gn, LocalInvokeBuildError as gt, materializeLayerFromArn as h, MCP_PROTOCOL_VERSION as hn, pickRefLogicalId as ht, BuildContainerImageOptions as i, tryParseStatus as in, resolveSsmParameters as ir, RouteMatchResult as it, buildConnectEvent as j, AgentCoreResolutionError as jn, DiscoveryJwtAuthorizer as jt, WebSocketHandshakeSnapshot as k, AgentCoreCodeArtifact as kn, CredentialsLoader as kt, buildAgentCoreCodeImage as l, resolveEnvVars as ln, substituteAgainstState as lr, RequestParameterContext as lt, buildCloudMapIndex as m, MCP_PATH as mn, resolveLambdaArnIntrinsic as mt, FileWatcherOptions as n, pickResponseTemplate as nn, SsmParameterRef as nr, buildHttpApiV2Event as nt, buildContainerImage as o, CdkWatchConfig as on, PseudoParameters as or, getContainerNetworkIp as ot, CloudMapIndex as p, MCP_CONTAINER_PORT as pn, CloudFormationTemplate as pr, LambdaArnResolveOutcome as pt, DiscoveredWebSocketApi as q, createLocalStateProvider as qn, buildCorsConfigByApiId as qt, createFileWatcher as r, selectIntegrationResponse as rn, collectSsmParameterRefs as rr, buildRestV1Event as rt, BuildAgentCoreCodeImageOptions as s, resolveWatchConfig as sn, StateEnvSubstitutionAudit as sr, TranslatedHttpResponse as st, FileWatcher as t, evaluateResponseParameters as tn, ResolvedSsmParameters as tr, applyAuthorizerOverlay as tt, computeCodeImageTag as u, AgentCoreWsResult as un, substituteAgainstStateAsync as ur, ResolveParametersOutcome as ut, filterRoutesByApiIdentifier as v, McpJsonRpcRequest as vn, ApiTargetSubset as vt, ConnectionRegistry as w, invokeAgentCore as wn, MtlsServerConfig as wt, HOST_GATEWAY_MIN_VERSION as x, AGENTCORE_SESSION_ID_HEADER as xn, createLocalStartApiCommand as xt, filterRoutesByApiIdentifiers as y, mcpInvokeOnce as yn, CreateLocalStartApiCommandOptions as yt, ResolvedStage as z, CdkLocalEmbedConfig as zn, AuthorizerCache as zt };
1132
+ //# sourceMappingURL=internal-CPdFiC6i.d.ts.map