cdk-local 0.76.0 → 0.77.1

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.
@@ -18554,7 +18554,7 @@ function isTransientNetworkError(err) {
18554
18554
  *
18555
18555
  * Connect to `ws://host:8080/ws`, send the `--event` as the first frame, and
18556
18556
  * stream every received frame to the sink. When a {@link
18557
- * InvokeAgentCoreWsOptions.frameSource} is supplied (the `--ws-interactive`
18557
+ * InvokeAgentCoreWsOptions.frameSource} is supplied (the auto-detected TTY
18558
18558
  * REPL path), additional frames from that async iterable are sent after the
18559
18559
  * initial event, and the client closes the stream when the iterable is
18560
18560
  * exhausted (or when the server closes first — whichever happens first). The
@@ -18750,13 +18750,12 @@ async function localInvokeAgentCoreCommand(target, options, extraStateProviders)
18750
18750
  const isA2a = resolved.protocol === "A2A";
18751
18751
  if (resolved.protocol === "AGUI") logger.info("AGUI runtime: routing through the HTTP /invocations + /ws path (AG-UI wire is SSE / WebSocket on port 8080).");
18752
18752
  if ((isMcp || isA2a) && options.ws) logger.warn(`--ws applies only to the HTTP / AGUI protocols; ignoring it for this ${resolved.protocol} runtime.`);
18753
- if (options.wsInteractive && !options.ws) logger.warn("--ws-interactive is meaningful only with --ws; ignoring.");
18754
18753
  if (options.sigv4 && (isMcp || isA2a || options.ws)) logger.warn("--sigv4 signs the HTTP /invocations request only; ignoring it for the " + (isMcp ? "MCP" : isA2a ? "A2A" : "/ws WebSocket") + " path.");
18755
18754
  const watchEligible = options.ws === true && !isMcp && !isA2a;
18756
18755
  const watchActive = options.watch === true && watchEligible;
18757
18756
  if (options.watch === true && !watchEligible) {
18758
18757
  const ignoredFor = isMcp ? "MCP" : isA2a ? "A2A" : "single-shot HTTP POST /invocations";
18759
- logger.warn(`--watch is meaningful only with the long-running --ws / --ws-interactive session paths; ignoring it for the ${ignoredFor} path (single-shot invocations run once and exit).`);
18758
+ logger.warn(`--watch is meaningful only with the long-running --ws session path; ignoring it for the ${ignoredFor} path (single-shot invocations run once and exit).`);
18760
18759
  }
18761
18760
  const sessionId = options.sessionId ?? randomUUID();
18762
18761
  const event = await readEvent(options);
@@ -18805,84 +18804,86 @@ async function localInvokeAgentCoreCommand(target, options, extraStateProviders)
18805
18804
  const a2a = await a2aInvokeOnce(containerHost, hostPort, a2aRequest, { requestTimeoutMs: options.timeout });
18806
18805
  await new Promise((r) => setTimeout(r, 250));
18807
18806
  emitA2aResult(a2a);
18808
- } else if (options.ws) if (watchActive) await runAgentCoreWatchLoop({
18809
- containerHost,
18810
- hostPort,
18811
- event,
18812
- sessionId,
18813
- timeoutMs: options.timeout,
18814
- wsInteractive: options.wsInteractive === true,
18815
- options,
18816
- resolvedTarget,
18817
- resolved,
18818
- synthesizer,
18819
- synthOpts,
18820
- stacks,
18821
- ...authorization && { authorization },
18822
- rebuild: async () => {
18823
- if (stopLogs) {
18824
- try {
18825
- stopLogs();
18826
- } catch {}
18827
- stopLogs = void 0;
18828
- }
18829
- if (containerId) {
18830
- await removeContainer(containerId);
18831
- containerId = void 0;
18832
- }
18833
- const { stacks: newStacks } = await synthesizer.synthesize(synthOpts);
18834
- const newCandidate = pickAgentCoreCandidateStack(resolvedTarget, newStacks);
18835
- const { context: newImageContext, loaded: newLoaded } = stateProvider && newCandidate ? await buildAgentCoreImageContext(newCandidate, stateProvider, options) : {
18836
- context: void 0,
18837
- loaded: void 0
18838
- };
18839
- const newResolved = resolveAgentCoreTarget(resolvedTarget, newStacks, newImageContext);
18840
- await resolveFromS3BucketIntrinsic(newResolved, stateProvider, newLoaded, newImageContext);
18841
- const newImage = await resolveAgentCoreImage(newResolved, options, newLoaded, stateProvider);
18842
- const { env: newEnv, sensitiveEnvKeys: newSensitive } = await buildContainerEnv(newResolved, options, profileCredentials, profileCredsFile, stateProvider, newLoaded, newImageContext);
18843
- const newHostPort = await pickFreePort();
18844
- const newName = `${getEmbedConfig().resourceNamePrefix}-agentcore-${process.pid}-${Math.random().toString(36).slice(2, 8)}`;
18845
- logger.info(`Reload: starting agent container (image=${newImage}, port=${newHostPort} -> 8080)...`);
18846
- containerId = await runDetached({
18847
- image: newImage,
18848
- mounts: [],
18849
- env: newEnv,
18850
- cmd: [],
18851
- hostPort: newHostPort,
18852
- host: containerHost,
18853
- platform: options.platform,
18854
- name: newName,
18855
- ...newSensitive.size > 0 && { sensitiveEnvKeys: newSensitive }
18856
- });
18857
- stopLogs = streamLogs(containerId);
18858
- return {
18859
- containerId,
18860
- hostPort: newHostPort,
18861
- stacks: newStacks
18862
- };
18863
- },
18864
- softReload: async (newSourceDir) => {
18865
- if (!containerId) throw new CdkLocalError("softReload: no live container to docker cp / docker restart into.", "LOCAL_INVOKE_AGENTCORE_WATCH_NO_CONTAINER");
18866
- await softReloadAgentContainer(containerId, newSourceDir);
18867
- const { stacks: newStacks } = await synthesizer.synthesize(synthOpts);
18868
- return { stacks: newStacks };
18869
- }
18870
- });
18871
- else {
18872
- await waitForAgentCorePing(containerHost, hostPort);
18873
- const frameSource = options.wsInteractive ? readStdinLines() : void 0;
18874
- logger.info(options.wsInteractive ? "Opening the agent /ws WebSocket (interactive — stdin lines = follow-up frames; Ctrl-D to end)..." : "Opening the agent /ws WebSocket and streaming frames...");
18875
- const wsResult = await invokeAgentCoreWs(containerHost, hostPort, event, {
18807
+ } else if (options.ws) {
18808
+ const interactive = process.stdin.isTTY === true;
18809
+ if (watchActive) await runAgentCoreWatchLoop({
18810
+ containerHost,
18811
+ hostPort,
18812
+ event,
18876
18813
  sessionId,
18877
18814
  timeoutMs: options.timeout,
18878
- onMessage: (text) => process.stdout.write(text),
18815
+ interactive,
18816
+ options,
18817
+ resolvedTarget,
18818
+ resolved,
18819
+ synthesizer,
18820
+ synthOpts,
18821
+ stacks,
18879
18822
  ...authorization && { authorization },
18880
- ...frameSource && { frameSource }
18823
+ rebuild: async () => {
18824
+ if (stopLogs) {
18825
+ try {
18826
+ stopLogs();
18827
+ } catch {}
18828
+ stopLogs = void 0;
18829
+ }
18830
+ if (containerId) {
18831
+ await removeContainer(containerId);
18832
+ containerId = void 0;
18833
+ }
18834
+ const { stacks: newStacks } = await synthesizer.synthesize(synthOpts);
18835
+ const newCandidate = pickAgentCoreCandidateStack(resolvedTarget, newStacks);
18836
+ const { context: newImageContext, loaded: newLoaded } = stateProvider && newCandidate ? await buildAgentCoreImageContext(newCandidate, stateProvider, options) : {
18837
+ context: void 0,
18838
+ loaded: void 0
18839
+ };
18840
+ const newResolved = resolveAgentCoreTarget(resolvedTarget, newStacks, newImageContext);
18841
+ await resolveFromS3BucketIntrinsic(newResolved, stateProvider, newLoaded, newImageContext);
18842
+ const newImage = await resolveAgentCoreImage(newResolved, options, newLoaded, stateProvider);
18843
+ const { env: newEnv, sensitiveEnvKeys: newSensitive } = await buildContainerEnv(newResolved, options, profileCredentials, profileCredsFile, stateProvider, newLoaded, newImageContext);
18844
+ const newHostPort = await pickFreePort();
18845
+ const newName = `${getEmbedConfig().resourceNamePrefix}-agentcore-${process.pid}-${Math.random().toString(36).slice(2, 8)}`;
18846
+ logger.info(`Reload: starting agent container (image=${newImage}, port=${newHostPort} -> 8080)...`);
18847
+ containerId = await runDetached({
18848
+ image: newImage,
18849
+ mounts: [],
18850
+ env: newEnv,
18851
+ cmd: [],
18852
+ hostPort: newHostPort,
18853
+ host: containerHost,
18854
+ platform: options.platform,
18855
+ name: newName,
18856
+ ...newSensitive.size > 0 && { sensitiveEnvKeys: newSensitive }
18857
+ });
18858
+ stopLogs = streamLogs(containerId);
18859
+ return {
18860
+ containerId,
18861
+ hostPort: newHostPort,
18862
+ stacks: newStacks
18863
+ };
18864
+ },
18865
+ softReload: async (newSourceDir) => {
18866
+ if (!containerId) throw new CdkLocalError("softReload: no live container to docker cp / docker restart into.", "LOCAL_INVOKE_AGENTCORE_WATCH_NO_CONTAINER");
18867
+ await softReloadAgentContainer(containerId, newSourceDir);
18868
+ const { stacks: newStacks } = await synthesizer.synthesize(synthOpts);
18869
+ return { stacks: newStacks };
18870
+ }
18881
18871
  });
18882
- await new Promise((r) => setTimeout(r, 250));
18883
- emitWsResult(wsResult);
18884
- }
18885
- else {
18872
+ else {
18873
+ await waitForAgentCorePing(containerHost, hostPort);
18874
+ const frameSource = interactive ? readStdinLines() : void 0;
18875
+ logger.info(interactive ? "Opening the agent /ws WebSocket (interactive — stdin lines = follow-up frames; Ctrl-D to end)..." : "Opening the agent /ws WebSocket and streaming frames...");
18876
+ const wsResult = await invokeAgentCoreWs(containerHost, hostPort, event, {
18877
+ sessionId,
18878
+ timeoutMs: options.timeout,
18879
+ onMessage: wrapWsOnMessage((text) => process.stdout.write(text), interactive),
18880
+ ...authorization && { authorization },
18881
+ ...frameSource && { frameSource }
18882
+ });
18883
+ await new Promise((r) => setTimeout(r, 250));
18884
+ emitWsResult(wsResult);
18885
+ }
18886
+ } else {
18886
18887
  await waitForAgentCorePing(containerHost, hostPort);
18887
18888
  const additionalHeaders = await buildSigV4HeadersIfRequested(options, resolved, loadedState, containerHost, hostPort, event, sessionId, stateProvider);
18888
18889
  const result = await invokeAgentCore(containerHost, hostPort, event, {
@@ -19518,11 +19519,42 @@ async function* readStdinLines() {
19518
19519
  crlfDelay: Infinity
19519
19520
  });
19520
19521
  try {
19521
- for await (const line of rl) yield line;
19522
+ for await (const line of rl) {
19523
+ if (line.length === 0) continue;
19524
+ yield line;
19525
+ }
19522
19526
  } finally {
19523
19527
  rl.close();
19524
19528
  }
19525
19529
  }
19530
+ /**
19531
+ * Issue #276 — REPL prompt indicator for the auto-detected TTY mode.
19532
+ * Written to stdout (no trailing newline) after each received agent frame,
19533
+ * so the user has a clear visual signal that the REPL is waiting for input.
19534
+ */
19535
+ const WS_REPL_PROMPT = "> ";
19536
+ /**
19537
+ * Issue #276 — wrap `onMessage` so each agent WS text frame lands on its
19538
+ * own line when the auto-REPL is active AND a `>` prompt indicator
19539
+ * follows. WS frames carry no trailing `\n` by protocol (each frame is a
19540
+ * discrete message); the cloud `/ws` endpoint behaves the same. That's
19541
+ * correct on the wire but visually run-on in an interactive terminal —
19542
+ * the user's next keystroke concatenates onto the last frame's tail char
19543
+ * and they have no signal that the REPL is waiting for input. In
19544
+ * interactive mode we append `\n` (unless already present) and then write
19545
+ * a `>` prompt, so each agent message is presented as its own line and
19546
+ * the next input prompt is visible.
19547
+ *
19548
+ * Non-interactive (piped / CI) is unchanged — the raw stdout shape is
19549
+ * what scripts rely on, and the WS-protocol-faithful pass-through stays.
19550
+ */
19551
+ function wrapWsOnMessage(sink, interactive) {
19552
+ if (!interactive) return sink;
19553
+ return (text) => {
19554
+ sink(text.endsWith("\n") ? text : `${text}\n`);
19555
+ sink("> ");
19556
+ };
19557
+ }
19526
19558
  function readEnvOverridesFile$2(filePath) {
19527
19559
  if (!filePath) return void 0;
19528
19560
  let raw;
@@ -19555,8 +19587,8 @@ function readEnvOverridesFile$2(filePath) {
19555
19587
  * classifier picks `'rebuild'` vs `'soft-reload'` and the
19556
19588
  * corresponding container-swap helper runs. After the swap, the
19557
19589
  * loop re-opens the WS against the new / restarted container with
19558
- * the same `--event` first frame + a fresh stdin reader (for
19559
- * `--ws-interactive`).
19590
+ * the same `--event` first frame + a fresh stdin reader (when
19591
+ * `interactive` mode is active — see `args.interactive`).
19560
19592
  *
19561
19593
  * Active `/ws` socket handling: the AgentCore `/ws` protocol does not
19562
19594
  * define mid-session container handoff, so the only honest local-dev
@@ -19665,18 +19697,18 @@ async function runAgentCoreWatchLoop(args) {
19665
19697
  if (reloadFailed) break;
19666
19698
  await waitForPing(args.containerHost, currentHostPort);
19667
19699
  if (firstIteration) {
19668
- logger.info(args.wsInteractive ? "Opening the agent /ws WebSocket (interactive — stdin lines = follow-up frames; Ctrl-D to end)..." : "Opening the agent /ws WebSocket and streaming frames...");
19700
+ logger.info(args.interactive ? "Opening the agent /ws WebSocket (interactive — stdin lines = follow-up frames; Ctrl-D to end)..." : "Opening the agent /ws WebSocket and streaming frames...");
19669
19701
  firstIteration = false;
19670
- } else logger.info(args.wsInteractive ? "Re-opening the agent /ws WebSocket (interactive) against the rebuilt container..." : "Re-opening the agent /ws WebSocket against the rebuilt container...");
19702
+ } else logger.info(args.interactive ? "Re-opening the agent /ws WebSocket (interactive) against the rebuilt container..." : "Re-opening the agent /ws WebSocket against the rebuilt container...");
19671
19703
  const abort = new AbortController();
19672
19704
  currentAbort = abort;
19673
19705
  pendingReload = false;
19674
- const frameSource = args.wsInteractive ? readStdinLines() : void 0;
19706
+ const frameSource = args.interactive ? readStdinLines() : void 0;
19675
19707
  try {
19676
19708
  const result = await wsInvoker(args.containerHost, currentHostPort, args.event, {
19677
19709
  sessionId: args.sessionId,
19678
19710
  timeoutMs: args.timeoutMs,
19679
- onMessage: (text) => process.stdout.write(text),
19711
+ onMessage: wrapWsOnMessage((text) => process.stdout.write(text), args.interactive),
19680
19712
  abortSignal: abort.signal,
19681
19713
  ...args.authorization && { authorization: args.authorization },
19682
19714
  ...frameSource && { frameSource }
@@ -19873,7 +19905,7 @@ function createLocalInvokeAgentCoreCommand(opts = {}) {
19873
19905
  * in three `--help` clusters. Chainable: returns `cmd`.
19874
19906
  */
19875
19907
  function addInvokeAgentCoreSpecificOptions(cmd) {
19876
- return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--session-id <id>", "AgentCore runtime session id header value (default: a random UUID)")).addOption(new Option("--ws", "Stream over the HTTP-protocol agent's bidirectional /ws WebSocket endpoint (on 8080) instead of POST /invocations: send --event as the first frame and print every received frame to stdout until the agent closes. Ignored for an MCP runtime.").default(false)).addOption(new Option("--ws-interactive", "REPL mode for --ws: after the initial --event frame, read additional frames from stdin (one frame per line, trailing newline stripped) and send each as a text frame until stdin EOFs (Ctrl-D) or the agent closes. Only meaningful with --ws.").default(false)).addOption(new Option("--bearer-token <jwt>", "Bearer JWT this command SUPPLIES (the supplier role) when the runtime declares a customJwtAuthorizer — `cdkl invoke-agentcore` is the local-dev client making the outbound call, so it always presents this token to its own invocation. Verified against the runtime's OIDC discovery URL (signature / issuer / expiry / audience) before the container starts, then forwarded to /invocations as Authorization: Bearer <jwt>. Contrast with `cdkl start-alb --bearer-token`, where the role is reversed — the ALB front-door RECEIVES inbound requests and injects this token only as a default when an inbound request has none (default-when-missing).")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign the /invocations POST with AWS SigV4 (service bedrock-agentcore) using the resolved credentials, matching the cloud default when the runtime declares no customJwtAuthorizer. Opt-in: default unsigned. Mutually exclusive with --bearer-token; ignored on a JWT-protected runtime.").default(false)).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64. Override to linux/amd64 only when iterating against an amd64 dev container locally; note the image will not run on the cloud runtime as-is.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the agent port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Per-request timeout in milliseconds. Applied to POST /invocations, POST /mcp, and the /ws open-to-close window. Raise this for long-running agent calls that exceed the default.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container so the agent runs with the deployed role. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's RoleArn when it is a literal ARN; (3) `--no-assume-role` opts out. Off by default — the developer's shell credentials are forwarded unchanged.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name; pass an explicit value when the CFn stack name differs.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--watch", "Re-synth and reload the agent container on CDK source changes. Only meaningful with the long-running /ws session paths (--ws / --ws-interactive); single-shot POST /invocations, MCP, and A2A invocations run once and exit, so --watch is logged as a no-op WARN for them and the single shot proceeds. The active /ws socket is closed cleanly on every reload firing so the next session connects to the rebuilt container — the honest local-dev semantic.").default(false));
19908
+ return cmd.addOption(new Option("-e, --event <file>", "JSON event payload file (default: {})")).addOption(new Option("--event-stdin", "Read event JSON from stdin").default(false)).addOption(new Option("--env-vars <file>", "JSON env-var overrides (SAM-compatible: {\"LogicalId\":{\"KEY\":\"VALUE\"}, \"Parameters\": {...}})")).addOption(new Option("--session-id <id>", "AgentCore runtime session id header value (default: a random UUID)")).addOption(new Option("--ws", "Stream over the HTTP-protocol agent's bidirectional /ws WebSocket endpoint (on 8080) instead of POST /invocations: send --event as the first frame and print every received frame to stdout until the agent closes. When stdin is a TTY, additionally reads stdin lines as follow-up text frames (multi-turn REPL; Ctrl-D to end). When stdin is piped / redirected / non-TTY (CI), only the initial --event frame is sent (one-shot). Force one-shot in a TTY with `cdkl ... --ws </dev/null`. Ignored for an MCP runtime.").default(false)).addOption(new Option("--bearer-token <jwt>", "Bearer JWT this command SUPPLIES (the supplier role) when the runtime declares a customJwtAuthorizer — `cdkl invoke-agentcore` is the local-dev client making the outbound call, so it always presents this token to its own invocation. Verified against the runtime's OIDC discovery URL (signature / issuer / expiry / audience) before the container starts, then forwarded to /invocations as Authorization: Bearer <jwt>. Contrast with `cdkl start-alb --bearer-token`, where the role is reversed — the ALB front-door RECEIVES inbound requests and injects this token only as a default when an inbound request has none (default-when-missing).")).addOption(new Option("--no-verify-auth", "Skip inbound JWT verification even when the runtime declares a customJwtAuthorizer (local-dev escape hatch). A --bearer-token, if given, is still forwarded.")).addOption(new Option("--sigv4", "Sign the /invocations POST with AWS SigV4 (service bedrock-agentcore) using the resolved credentials, matching the cloud default when the runtime declares no customJwtAuthorizer. Opt-in: default unsigned. Mutually exclusive with --bearer-token; ignored on a JWT-protected runtime.").default(false)).addOption(new Option("--platform <platform>", "docker --platform for the agent container (linux/amd64 or linux/arm64). Defaults to linux/arm64 because the cloud AgentCore Runtime requires arm64. Override to linux/amd64 only when iterating against an amd64 dev container locally; note the image will not run on the cloud runtime as-is.").choices(["linux/amd64", "linux/arm64"]).default("linux/arm64")).addOption(new Option("--no-pull", "Skip docker pull (use cached image) — no-op for the local-build path")).addOption(new Option("--no-build", "Skip docker build on the local-asset path (use the previously-built tag). No-op for the ECR / registry pull paths.")).addOption(new Option("--container-host <host>", "Host IP the host uses to bind the agent port to. Must be a numeric IP (Docker rejects hostnames here). Defaults to 127.0.0.1.").default("127.0.0.1")).addOption(new Option("--timeout <ms>", "Per-request timeout in milliseconds. Applied to POST /invocations, POST /mcp, and the /ws open-to-close window. Raise this for long-running agent calls that exceed the default.").default(12e4).argParser(parseTimeoutMs)).addOption(new Option("--assume-role [arn]", "Assume the runtime's execution role and forward STS-issued temp credentials to the container so the agent runs with the deployed role. Three forms: (1) `--assume-role <arn>` assumes the explicit ARN; (2) `--assume-role` (bare) uses the runtime's RoleArn when it is a literal ARN; (3) `--no-assume-role` opts out. Off by default — the developer's shell credentials are forwarded unchanged.")).addOption(new Option("--ecr-role-arn <arn>", "Role ARN to assume before authenticating against ECR for cross-account / centralized registries. Same-account / same-region pulls do not need this flag.")).addOption(new Option("--from-cfn-stack [cfn-stack-name]", "Read a deployed CloudFormation stack via ListStackResources and substitute Ref / Fn::ImportValue in env vars with the deployed physical IDs / exports. Bare form uses the resolved stack name; pass an explicit value when the CFn stack name differs.")).addOption(new Option("--stack-region <region>", "Region of the state record to read. Used with --from-cfn-stack as the CFn client region.")).addOption(new Option("--watch", "Re-synth and reload the agent container on CDK source changes. Only meaningful with the long-running --ws session path; single-shot POST /invocations, MCP, and A2A invocations run once and exit, so --watch is logged as a no-op WARN for them and the single shot proceeds. The active /ws socket is closed cleanly on every reload firing so the next session connects to the rebuilt container — the honest local-dev semantic.").default(false));
19877
19909
  }
19878
19910
 
19879
19911
  //#endregion
@@ -27824,4 +27856,4 @@ function addListSpecificOptions(cmd) {
27824
27856
 
27825
27857
  //#endregion
27826
27858
  export { mcpInvokeOnce as $, pickAgentCoreCandidateStack as $n, applyAuthorizerOverlay as $t, mergeForService as A, rejectExplicitCfnStackWithMultipleStacks as An, startApiServer as At, SOFT_RELOAD_COMPLETION_LOG_SUFFIX as B, listTargets as Bn, buildMethodArn as Bt, parseRestartPolicy as C, substituteAgainstState as Cn, materializeLayerFromArn as Ct, ImageOverrideError as D, LocalStateSourceError as Dn, filterRoutesByApiIdentifiers as Dt, runEcsServiceEmulator as E, substituteEnvVarsFromStateAsync as En, filterRoutesByApiIdentifier as Et, isLocalCdkAssetImage as F, collectSsmParameterRefs as Fn, buildJwksUrlFromIssuer as Ft, createLocalInvokeAgentCoreCommand as G, pickRefLogicalId as Gn, attachAuthorizers as Gt, getContainerNetworkIp as H, discoverWebSocketApisOrThrow as Hn, evaluateCachedLambdaPolicy as Ht, listPinnedTargets as I, resolveSsmParameters as In, createJwksCache as It, A2A_PATH as J, AGENTCORE_AGUI_PROTOCOL as Jn, buildCorsConfigFromCloudFrontChain as Jt, invokeAgentCoreWs as K, resolveLambdaArnIntrinsic as Kn, applyCorsResponseHeaders as Kt, buildCloudMapIndex as L, resolveWatchConfig as Ln, verifyCognitoJwt as Lt, resolveImageOverrides as M, resolveCfnRegion as Mn, resolveServiceIntegrationParameters as Mt, runImageOverrideBuilds as N, resolveCfnStackName as Nn, defaultCredentialsLoader as Nt, buildImageOverrideTag as O, createLocalStateProvider as On, groupRoutesByServer as Ot, describePinnedImageUri as P, CfnLocalStateProvider as Pn, buildCognitoJwksUrl as Pt, MCP_PROTOCOL_VERSION as Q, AgentCoreResolutionError as Qn, translateLambdaResponse as Qt, CloudMapRegistry as R, resolveSingleTarget as Rn, verifyJwtAuthorizer as Rt, parseMaxTasks as S, EcsTaskResolutionError as Sn, buildStageMap as St, resolveSharedSidecarCredentials as T, substituteEnvVarsFromState as Tn, availableApiIdentifiers as Tt, attachContainerLogStreamer as U, parseSelectionExpressionPath as Un, invokeRequestAuthorizer as Ut, setShadowReadyTimeoutMs as V, discoverWebSocketApis as Vn, computeRequestIdentityHash as Vt, addInvokeAgentCoreSpecificOptions as W, discoverRoutes as Wn, invokeTokenAuthorizer as Wt, MCP_CONTAINER_PORT as X, AGENTCORE_MCP_PROTOCOL as Xn, matchPreflight as Xt, a2aInvokeOnce as Y, AGENTCORE_HTTP_PROTOCOL as Yn, isFunctionUrlOacFronted as Yt, MCP_PATH as Z, AGENTCORE_RUNTIME_TYPE as Zn, matchRoute as Zt, addCommonEcsServiceOptions as _, architectureToPlatform as _n, createWatchPredicates as _t, albStrategy as a, tryParseStatus as an, LocalInvokeBuildError as ar, waitForAgentCorePing as at, buildEcsImageResolutionContext$1 as b, resolveRuntimeFileExtension as bn, createFileWatcher as bt, resolveAlbTarget as c, probeHostGatewaySupport as cn, buildAgentCoreCodeImage as ct, addStartServiceSpecificOptions as d, buildMgmtEndpointEnvUrl as dn, toCmdArgv as dt, buildHttpApiV2Event as en, resolveAgentCoreTarget as er, parseSseForJsonRpc as et, createLocalStartServiceCommand as f, handleConnectionsRequest as fn, classifySourceChange as ft, MAX_TASKS_SUBNET_RANGE_CAP as g, buildMessageEvent as gn, createLocalStartApiCommand as gt, createLocalRunTaskCommand as h, buildDisconnectEvent as hn, addStartApiSpecificOptions as ht, addAlbSpecificOptions as i, selectIntegrationResponse as in, tryResolveImageFnJoin as ir, invokeAgentCore as it, parseImageOverrideFlags as j, resolveCfnFallbackRegion as jn, resolveSelectionExpression as jt, enforceImageOverrideOrphans as k, isCfnFlagPresent as kn, readMtlsMaterialsFromDisk as kt, isApplicationLoadBalancer as l, bufferToBody as ln, computeCodeImageTag as lt, addRunTaskSpecificOptions as m, buildConnectEvent as mn, createLocalInvokeCommand as mt, createLocalListCommand as n, evaluateResponseParameters as nn, formatStateRemedy as nr, signAgentCoreInvocation as nt, createLocalStartAlbCommand as o, VtlEvaluationError as on, buildStsClientConfig as or, downloadAndExtractS3Bundle as ot, serviceStrategy as p, parseConnectionsPath as pn, addInvokeSpecificOptions as pt, A2A_CONTAINER_PORT as q, AGENTCORE_A2A_PROTOCOL as qn, buildCorsConfigByApiId as qt, formatTargetListing as r, pickResponseTemplate as rn, substituteImagePlaceholders as rr, AGENTCORE_SESSION_ID_HEADER as rt, parseLbPortOverrides as s, HOST_GATEWAY_MIN_VERSION as sn, resolveProfileCredentials as sr, SUPPORTED_CODE_RUNTIMES as st, addListSpecificOptions as t, buildRestV1Event as tn, derivePseudoParametersFromRegion as tr, AGENTCORE_SIGV4_SERVICE as tt, resolveAlbFrontDoor as u, ConnectionRegistry as un, renderCodeDockerfile as ut, addEcsAssumeRoleOptions as v, buildContainerImage as vn, resolveApiTargetSubset as vt, resolveEcsAssumeRoleOption as w, substituteAgainstStateAsync as wn, resolveEnvVars as wt, ecsClusterOption as x, resolveRuntimeImage as xn, attachStageContext as xt, addImageOverrideOptions as y, resolveRuntimeCodeMountPath as yn, createAuthorizerCache as yt, DEFAULT_SHADOW_READY_TIMEOUT_MS as z, countTargets as zn, verifyJwtViaDiscovery as zt };
27827
- //# sourceMappingURL=local-list-Dh6xjxGf.js.map
27859
+ //# sourceMappingURL=local-list-DVCeG_hc.js.map