@aws/nx-plugin-mcp 1.0.0-rc.56 → 1.0.0-rc.58

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/bin/aws-nx-mcp.js CHANGED
@@ -34,7 +34,7 @@ var __copyProps = (to, from, except, desc) => {
34
34
  }
35
35
  return to;
36
36
  };
37
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
38
38
  value: mod,
39
39
  enumerable: true
40
40
  }) : target, mod));
@@ -3164,7 +3164,8 @@ var ZodPromise = class extends ZodType$1 {
3164
3164
  });
3165
3165
  return INVALID;
3166
3166
  }
3167
- return OK((ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data)).then((data) => {
3167
+ const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
3168
+ return OK(promisified.then((data) => {
3168
3169
  return this._def.type.parseAsync(data, {
3169
3170
  path: ctx.path,
3170
3171
  errorMap: ctx.common.contextualErrorMap
@@ -7266,7 +7267,7 @@ function object$1(shape, params) {
7266
7267
  return new ZodMiniObject(def);
7267
7268
  }
7268
7269
  //#endregion
7269
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
7270
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
7270
7271
  function isZ4Schema(s) {
7271
7272
  return !!s._zod;
7272
7273
  }
@@ -7320,17 +7321,25 @@ function normalizeObjectSchema(schema) {
7320
7321
  if (def && (def.type === "object" || def.shape !== void 0)) return schema;
7321
7322
  } else if (schema.shape !== void 0) return schema;
7322
7323
  }
7324
+ function getDotPath(path) {
7325
+ if (path.length === 0) return "object root";
7326
+ return path.reduce((acc, seg, index) => {
7327
+ if (index === 0) return String(seg);
7328
+ if (typeof seg === "number") return `${acc}[${seg}]`;
7329
+ return `${acc}.${seg}`;
7330
+ }, "");
7331
+ }
7323
7332
  /**
7324
7333
  * Safely extracts an error message from a parse result error.
7325
7334
  * Zod errors can have different structures, so we handle various cases.
7326
7335
  */
7327
7336
  function getParseErrorMessage(error) {
7328
7337
  if (error && typeof error === "object") {
7338
+ if ("issues" in error && Array.isArray(error.issues) && error.issues.length > 0) return error.issues.map((i) => {
7339
+ if (!i.path?.length) return i.message;
7340
+ return `${i.message} at ${getDotPath(i.path)}`;
7341
+ }).join("\n");
7329
7342
  if ("message" in error && typeof error.message === "string") return error.message;
7330
- if ("issues" in error && Array.isArray(error.issues) && error.issues.length > 0) {
7331
- const firstIssue = error.issues[0];
7332
- if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) return String(firstIssue.message);
7333
- }
7334
7343
  try {
7335
7344
  return JSON.stringify(error);
7336
7345
  } catch {
@@ -8284,7 +8293,7 @@ function preprocess$1(fn, schema) {
8284
8293
  });
8285
8294
  }
8286
8295
  //#endregion
8287
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
8296
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
8288
8297
  const LATEST_PROTOCOL_VERSION = "2025-11-25";
8289
8298
  const SUPPORTED_PROTOCOL_VERSIONS = [
8290
8299
  LATEST_PROTOCOL_VERSION,
@@ -10185,7 +10194,7 @@ var UrlElicitationRequiredError = class extends McpError {
10185
10194
  }
10186
10195
  };
10187
10196
  //#endregion
10188
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
10197
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
10189
10198
  /**
10190
10199
  * Experimental task interfaces for MCP SDK.
10191
10200
  * WARNING: These APIs are experimental and may change without notice.
@@ -10333,9 +10342,7 @@ function parseBigintDef(def, refs) {
10333
10342
  setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
10334
10343
  }
10335
10344
  break;
10336
- case "multipleOf":
10337
- setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
10338
- break;
10345
+ case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
10339
10346
  }
10340
10347
  return res;
10341
10348
  }
@@ -10382,9 +10389,7 @@ const integerDateParser = (def, refs) => {
10382
10389
  case "min":
10383
10390
  setResponseValueAndErrors(res, "minimum", check.value, check.message, refs);
10384
10391
  break;
10385
- case "max":
10386
- setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
10387
- break;
10392
+ case "max": setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
10388
10393
  }
10389
10394
  return res;
10390
10395
  };
@@ -10536,9 +10541,7 @@ function parseStringDef(def, refs) {
10536
10541
  case "format:idn-email":
10537
10542
  addFormat(res, "idn-email", check.message, refs);
10538
10543
  break;
10539
- case "pattern:zod":
10540
- addPattern(res, zodPatterns.email, check.message, refs);
10541
- break;
10544
+ case "pattern:zod": addPattern(res, zodPatterns.email, check.message, refs);
10542
10545
  }
10543
10546
  break;
10544
10547
  case "url":
@@ -10609,16 +10612,10 @@ function parseStringDef(def, refs) {
10609
10612
  case "contentEncoding:base64":
10610
10613
  setResponseValueAndErrors(res, "contentEncoding", "base64", check.message, refs);
10611
10614
  break;
10612
- case "pattern:zod":
10613
- addPattern(res, zodPatterns.base64, check.message, refs);
10614
- break;
10615
+ case "pattern:zod": addPattern(res, zodPatterns.base64, check.message, refs);
10615
10616
  }
10616
10617
  break;
10617
10618
  case "nanoid": addPattern(res, zodPatterns.nanoid, check.message, refs);
10618
- case "toLowerCase":
10619
- case "toUpperCase":
10620
- case "trim": break;
10621
- default:
10622
10619
  }
10623
10620
  return res;
10624
10621
  }
@@ -10965,9 +10962,7 @@ function parseNumberDef(def, refs) {
10965
10962
  setResponseValueAndErrors(res, "maximum", check.value, check.message, refs);
10966
10963
  }
10967
10964
  break;
10968
- case "multipleOf":
10969
- setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
10970
- break;
10965
+ case "multipleOf": setResponseValueAndErrors(res, "multipleOf", check.value, check.message, refs);
10971
10966
  }
10972
10967
  return res;
10973
10968
  }
@@ -11290,7 +11285,7 @@ const zodToJsonSchema = (schema, options) => {
11290
11285
  return combined;
11291
11286
  };
11292
11287
  //#endregion
11293
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
11288
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
11294
11289
  function mapMiniTarget(t) {
11295
11290
  if (!t) return "draft-7";
11296
11291
  if (t === "jsonSchema7" || t === "draft-7") return "draft-7";
@@ -18236,7 +18231,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports, module) => {
18236
18231
  exports.default = formatsPlugin;
18237
18232
  }));
18238
18233
  //#endregion
18239
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
18234
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
18240
18235
  var import_ajv = /* @__PURE__ */ __toESM(require_ajv(), 1);
18241
18236
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
18242
18237
  function createDefaultAjvInstance() {
@@ -18312,7 +18307,7 @@ var AjvJsonSchemaValidator = class {
18312
18307
  }
18313
18308
  };
18314
18309
  //#endregion
18315
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
18310
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
18316
18311
  /**
18317
18312
  * Experimental server task features for MCP SDK.
18318
18313
  * WARNING: These APIs are experimental and may change without notice.
@@ -18469,9 +18464,7 @@ var ExperimentalServerTasks = class {
18469
18464
  case "url":
18470
18465
  if (!clientCapabilities?.elicitation?.url) throw new Error("Client does not support url elicitation.");
18471
18466
  break;
18472
- case "form":
18473
- if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
18474
- break;
18467
+ case "form": if (!clientCapabilities?.elicitation?.form) throw new Error("Client does not support form elicitation.");
18475
18468
  }
18476
18469
  const normalizedParams = mode === "form" && params.mode === void 0 ? {
18477
18470
  ...params,
@@ -18532,7 +18525,7 @@ var ExperimentalServerTasks = class {
18532
18525
  }
18533
18526
  };
18534
18527
  //#endregion
18535
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
18528
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
18536
18529
  /**
18537
18530
  * Experimental task capability assertion helpers.
18538
18531
  * WARNING: These APIs are experimental and may change without notice.
@@ -18553,10 +18546,7 @@ var ExperimentalServerTasks = class {
18553
18546
  function assertToolsCallTaskCapability(requests, method, entityName) {
18554
18547
  if (!requests) throw new Error(`${entityName} does not support task creation (required for ${method})`);
18555
18548
  switch (method) {
18556
- case "tools/call":
18557
- if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
18558
- break;
18559
- default: break;
18549
+ case "tools/call": if (!requests.tools?.call) throw new Error(`${entityName} does not support task creation for tools/call (required for ${method})`);
18560
18550
  }
18561
18551
  }
18562
18552
  /**
@@ -18576,14 +18566,11 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
18576
18566
  case "sampling/createMessage":
18577
18567
  if (!requests.sampling?.createMessage) throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);
18578
18568
  break;
18579
- case "elicitation/create":
18580
- if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
18581
- break;
18582
- default: break;
18569
+ case "elicitation/create": if (!requests.elicitation?.create) throw new Error(`${entityName} does not support task creation for elicitation/create (required for ${method})`);
18583
18570
  }
18584
18571
  }
18585
18572
  //#endregion
18586
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
18573
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
18587
18574
  /**
18588
18575
  * An MCP server on top of a pluggable transport.
18589
18576
  *
@@ -18662,14 +18649,7 @@ var Server = class extends Protocol {
18662
18649
  setRequestHandler(requestSchema, handler) {
18663
18650
  const methodSchema = getObjectShape(requestSchema)?.method;
18664
18651
  if (!methodSchema) throw new Error("Schema is missing a method literal");
18665
- let methodValue;
18666
- if (isZ4Schema(methodSchema)) {
18667
- const v4Schema = methodSchema;
18668
- methodValue = (v4Schema._zod?.def)?.value ?? v4Schema.value;
18669
- } else {
18670
- const v3Schema = methodSchema;
18671
- methodValue = v3Schema._def?.value ?? v3Schema.value;
18672
- }
18652
+ const methodValue = getLiteralValue(methodSchema);
18673
18653
  if (typeof methodValue !== "string") throw new Error("Schema method literal must be a string");
18674
18654
  if (methodValue === "tools/call") {
18675
18655
  const wrappedHandler = async (request, extra) => {
@@ -18707,10 +18687,7 @@ var Server = class extends Protocol {
18707
18687
  case "elicitation/create":
18708
18688
  if (!this._clientCapabilities?.elicitation) throw new Error(`Client does not support elicitation (required for ${method})`);
18709
18689
  break;
18710
- case "roots/list":
18711
- if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
18712
- break;
18713
- case "ping": break;
18690
+ case "roots/list": if (!this._clientCapabilities?.roots) throw new Error(`Client does not support listing roots (required for ${method})`);
18714
18691
  }
18715
18692
  }
18716
18693
  assertNotificationCapability(method) {
@@ -18728,11 +18705,7 @@ var Server = class extends Protocol {
18728
18705
  case "notifications/prompts/list_changed":
18729
18706
  if (!this._capabilities.prompts) throw new Error(`Server does not support notifying of prompt list changes (required for ${method})`);
18730
18707
  break;
18731
- case "notifications/elicitation/complete":
18732
- if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
18733
- break;
18734
- case "notifications/cancelled": break;
18735
- case "notifications/progress": break;
18708
+ case "notifications/elicitation/complete": if (!this._clientCapabilities?.elicitation?.url) throw new Error(`Client does not support URL elicitation (required for ${method})`);
18736
18709
  }
18737
18710
  }
18738
18711
  assertRequestHandlerCapability(method) {
@@ -18760,11 +18733,7 @@ var Server = class extends Protocol {
18760
18733
  case "tasks/get":
18761
18734
  case "tasks/list":
18762
18735
  case "tasks/result":
18763
- case "tasks/cancel":
18764
- if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
18765
- break;
18766
- case "ping":
18767
- case "initialize": break;
18736
+ case "tasks/cancel": if (!this._capabilities.tasks) throw new Error(`Server does not support tasks capability (required for ${method})`);
18768
18737
  }
18769
18738
  }
18770
18739
  assertTaskCapability(method) {
@@ -18924,7 +18893,7 @@ var Server = class extends Protocol {
18924
18893
  }
18925
18894
  };
18926
18895
  //#endregion
18927
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
18896
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
18928
18897
  const COMPLETABLE_SYMBOL = Symbol.for("mcp.completable");
18929
18898
  /**
18930
18899
  * Checks if a schema is completable (has completion metadata).
@@ -18943,7 +18912,7 @@ var McpZodTypeKind;
18943
18912
  McpZodTypeKind["Completable"] = "McpCompletable";
18944
18913
  })(McpZodTypeKind || (McpZodTypeKind = {}));
18945
18914
  //#endregion
18946
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
18915
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
18947
18916
  /**
18948
18917
  * Tool name validation utilities according to SEP: Specify Format for Tool Names
18949
18918
  *
@@ -19014,7 +18983,7 @@ function validateAndWarnToolName(name) {
19014
18983
  return result.isValid;
19015
18984
  }
19016
18985
  //#endregion
19017
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
18986
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
19018
18987
  /**
19019
18988
  * Experimental McpServer task features for MCP SDK.
19020
18989
  * WARNING: These APIs are experimental and may change without notice.
@@ -19045,7 +19014,7 @@ var ExperimentalMcpServerTasks = class {
19045
19014
  }
19046
19015
  };
19047
19016
  //#endregion
19048
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
19017
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
19049
19018
  /**
19050
19019
  * High-level MCP server that provides a simpler API for working with resources, tools, and prompts.
19051
19020
  * For advanced usage (like sending notifications or setting custom request handlers), use the underlying
@@ -19670,13 +19639,18 @@ const EMPTY_COMPLETION_RESULT = { completion: {
19670
19639
  values: [],
19671
19640
  hasMore: false
19672
19641
  } };
19673
- //#endregion
19674
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
19675
19642
  /**
19676
19643
  * Buffers a continuous stdio stream into discrete JSON-RPC messages.
19677
19644
  */
19678
19645
  var ReadBuffer = class {
19646
+ constructor(options) {
19647
+ this._maxBufferSize = options?.maxBufferSize ?? 10485760;
19648
+ }
19679
19649
  append(chunk) {
19650
+ if ((this._buffer?.length ?? 0) + chunk.length > this._maxBufferSize) {
19651
+ this.clear();
19652
+ throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
19653
+ }
19680
19654
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
19681
19655
  }
19682
19656
  readMessage() {
@@ -19698,25 +19672,30 @@ function serializeMessage(message) {
19698
19672
  return JSON.stringify(message) + "\n";
19699
19673
  }
19700
19674
  //#endregion
19701
- //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
19675
+ //#region ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.30.0_supports-color@7.2.0_zod@4.4.3/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
19702
19676
  /**
19703
19677
  * Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
19704
19678
  *
19705
19679
  * This transport is only available in Node.js environments.
19706
19680
  */
19707
19681
  var StdioServerTransport = class {
19708
- constructor(_stdin = node_process.default.stdin, _stdout = node_process.default.stdout) {
19682
+ constructor(_stdin = node_process.default.stdin, _stdout = node_process.default.stdout, options) {
19709
19683
  this._stdin = _stdin;
19710
19684
  this._stdout = _stdout;
19711
- this._readBuffer = new ReadBuffer();
19712
19685
  this._started = false;
19713
19686
  this._ondata = (chunk) => {
19714
- this._readBuffer.append(chunk);
19715
- this.processReadBuffer();
19687
+ try {
19688
+ this._readBuffer.append(chunk);
19689
+ this.processReadBuffer();
19690
+ } catch (error) {
19691
+ this.onerror?.(error);
19692
+ this.close().catch(() => {});
19693
+ }
19716
19694
  };
19717
19695
  this._onerror = (error) => {
19718
19696
  this.onerror?.(error);
19719
19697
  };
19698
+ this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
19720
19699
  }
19721
19700
  /**
19722
19701
  * Starts listening for messages on stdin.
@@ -20786,19 +20765,19 @@ const kebabCase = (str) => {
20786
20765
  const NX_VERSION = {
20787
20766
  "@a2a-js/sdk": "0.3.14",
20788
20767
  "@aws/aws-distro-opentelemetry-node-autoinstrumentation": "0.12.0",
20789
- "@opentelemetry/propagator-jaeger": "2.9.0",
20790
- minimatch: "10.2.5",
20791
- "@aws-sdk/client-dynamodb": "3.1090.0",
20792
- "@aws-sdk/client-api-gateway": "3.1090.0",
20793
- "@aws-sdk/client-iam": "3.1090.0",
20794
- "@aws-sdk/client-bedrock-agentcore": "3.1090.0",
20795
- "@aws-sdk/client-bedrock-runtime": "3.1090.0",
20796
- "@aws-sdk/client-s3": "3.1090.0",
20797
- "@aws-sdk/client-sts": "3.1090.0",
20798
- "@aws-sdk/credential-providers": "3.1090.0",
20799
- "@aws-sdk/credential-provider-cognito-identity": "3.972.58",
20800
- "@aws-sdk/client-secrets-manager": "3.1090.0",
20801
- "@aws-sdk/rds-signer": "3.1090.0",
20768
+ "@opentelemetry/propagator-jaeger": "2.10.0",
20769
+ minimatch: "10.2.6",
20770
+ "@aws-sdk/client-dynamodb": "3.1101.0",
20771
+ "@aws-sdk/client-api-gateway": "3.1101.0",
20772
+ "@aws-sdk/client-iam": "3.1101.0",
20773
+ "@aws-sdk/client-bedrock-agentcore": "3.1101.0",
20774
+ "@aws-sdk/client-bedrock-runtime": "3.1101.0",
20775
+ "@aws-sdk/client-s3": "3.1101.0",
20776
+ "@aws-sdk/client-sts": "3.1101.0",
20777
+ "@aws-sdk/credential-providers": "3.1101.0",
20778
+ "@aws-sdk/credential-provider-cognito-identity": "3.972.64",
20779
+ "@aws-sdk/client-secrets-manager": "3.1101.0",
20780
+ "@aws-sdk/rds-signer": "3.1101.0",
20802
20781
  "@aws-smithy/server-apigateway": "1.0.0-alpha.10",
20803
20782
  "@aws-smithy/server-node": "1.0.0-alpha.10",
20804
20783
  "@aws-lambda-powertools/logger": "2.34.0",
@@ -20806,21 +20785,21 @@ const NX_VERSION = {
20806
20785
  "@aws-lambda-powertools/parameters": "2.34.0",
20807
20786
  "@aws-lambda-powertools/tracer": "2.34.0",
20808
20787
  "@aws-lambda-powertools/parser": "2.34.0",
20809
- "@aws-sdk/client-appconfigdata": "3.1090.0",
20810
- "@middy/core": "7.7.0",
20788
+ "@aws-sdk/client-appconfigdata": "3.1101.0",
20789
+ "@middy/core": "7.7.2",
20811
20790
  "@nxlv/python": "22.2.2",
20812
20791
  "@nx-extend/terraform": "10.3.0",
20813
- nx: "23.1.0",
20814
- "@nx/devkit": "23.1.0",
20815
- "@nx/js": "23.1.0",
20816
- "@nx/react": "23.1.0",
20817
- "@nx/vite": "23.1.0",
20818
- "@nx/vitest": "23.1.0",
20819
- "@nx/workspace": "23.1.0",
20820
- "create-nx-workspace": "23.1.0",
20792
+ nx: "23.1.1",
20793
+ "@nx/devkit": "23.1.1",
20794
+ "@nx/js": "23.1.1",
20795
+ "@nx/react": "23.1.1",
20796
+ "@nx/vite": "23.1.1",
20797
+ "@nx/vitest": "23.1.1",
20798
+ "@nx/workspace": "23.1.1",
20799
+ "create-nx-workspace": "23.1.1",
20821
20800
  "@swc-node/register": "1.12.1",
20822
- "@swc/core": "1.15.43",
20823
- "@modelcontextprotocol/sdk": "1.29.0",
20801
+ "@swc/core": "1.15.47",
20802
+ "@modelcontextprotocol/sdk": "1.30.0",
20824
20803
  "@modelcontextprotocol/inspector": "0.22.0",
20825
20804
  "@ag-ui/a2ui-toolkit": "0.0.4",
20826
20805
  "@ag-ui/aws-strands": "0.2.3",
@@ -20828,43 +20807,43 @@ const NX_VERSION = {
20828
20807
  "@ag-ui/core": "0.0.57",
20829
20808
  "@ag-ui/encoder": "0.0.57",
20830
20809
  "agent-chat-cli": "0.3.0",
20831
- "@copilotkit/react-core": "1.63.1",
20810
+ "@copilotkit/react-core": "1.65.0",
20832
20811
  rxjs: "7.8.2",
20833
- "@strands-agents/sdk": "1.10.0",
20812
+ "@strands-agents/sdk": "1.11.2",
20834
20813
  "@tanstack/react-router": "1.170.18",
20835
- "@tanstack/router-plugin": "1.168.22",
20814
+ "@tanstack/router-plugin": "1.168.23",
20836
20815
  "@tanstack/router-generator": "1.167.21",
20837
20816
  "@tanstack/virtual-file-routes": "1.162.0",
20838
20817
  "@tanstack/router-utils": "1.162.2",
20839
- "@cloudscape-design/board-components": "3.0.205",
20840
- "@cloudscape-design/chat-components": "1.0.151",
20841
- "@cloudscape-design/components": "3.0.1330",
20842
- "@cloudscape-design/global-styles": "1.0.62",
20843
- "@tanstack/react-query": "5.101.2",
20844
- "@tanstack/react-query-devtools": "5.101.2",
20818
+ "@cloudscape-design/board-components": "3.0.212",
20819
+ "@cloudscape-design/chat-components": "1.0.156",
20820
+ "@cloudscape-design/components": "3.0.1340",
20821
+ "@cloudscape-design/global-styles": "1.0.65",
20822
+ "@tanstack/react-query": "5.101.4",
20823
+ "@tanstack/react-query-devtools": "5.101.4",
20845
20824
  "@trpc/tanstack-react-query": "11.18.0",
20846
20825
  "@trpc/client": "11.18.0",
20847
20826
  "@trpc/server": "11.18.0",
20848
- "@types/node": "26.1.1",
20827
+ "@types/node": "26.1.2",
20849
20828
  "@types/aws-lambda": "8.10.162",
20850
20829
  "@types/cors": "2.8.19",
20851
- "@types/pg": "8.20.0",
20830
+ "@types/pg": "8.20.3",
20852
20831
  "@types/ws": "8.18.1",
20853
20832
  "@types/express": "5.0.6",
20854
- "@smithy/config-resolver": "4.6.10",
20855
- "@smithy/node-config-provider": "4.5.10",
20856
- "@smithy/node-http-handler": "4.9.7",
20833
+ "@smithy/config-resolver": "4.6.16",
20834
+ "@smithy/node-config-provider": "4.5.16",
20835
+ "@smithy/node-http-handler": "4.9.13",
20857
20836
  "@smithy/types": "4.16.1",
20858
20837
  "@vitest/coverage-v8": "4.1.10",
20859
20838
  "@vitest/ui": "4.1.10",
20860
- "@astrojs/react": "6.0.1",
20839
+ "@astrojs/react": "6.0.2",
20861
20840
  "@astrojs/starlight": "0.41.3",
20862
20841
  astro: "7.1.1",
20863
20842
  aws4fetch: "1.0.20",
20864
- "aws-cdk": "2.1132.0",
20865
- "aws-cdk-lib": "2.261.0",
20843
+ "aws-cdk": "2.1135.0",
20844
+ "aws-cdk-lib": "2.263.0",
20866
20845
  "aws-xray-sdk-core": "3.12.0",
20867
- constructs: "10.7.0",
20846
+ constructs: "10.8.0",
20868
20847
  cors: "2.8.6",
20869
20848
  chalk: "5.6.2",
20870
20849
  "class-variance-authority": "0.7.1",
@@ -20874,42 +20853,44 @@ const NX_VERSION = {
20874
20853
  esbuild: "0.28.1",
20875
20854
  "event-source-polyfill": "1.0.31",
20876
20855
  "@types/event-source-polyfill": "1.0.5",
20877
- "@biomejs/biome": "2.5.4",
20878
- "@prisma/adapter-mariadb": "7.8.0",
20879
- "@prisma/adapter-pg": "7.8.0",
20880
- "@prisma/client": "7.8.0",
20856
+ "@biomejs/biome": "2.5.6",
20857
+ "@prisma/adapter-mariadb": "7.9.1",
20858
+ "@prisma/adapter-pg": "7.9.1",
20859
+ "@prisma/client": "7.9.1",
20881
20860
  ejs: "6.0.1",
20882
20861
  "@types/ejs": "3.1.5",
20883
20862
  express: "5.2.1",
20884
20863
  "fast-glob": "3.3.3",
20885
20864
  husky: "9.1.7",
20886
- "fs-extra": "11.3.6",
20865
+ "fs-extra": "11.4.0",
20887
20866
  "@types/fs-extra": "11.0.4",
20888
20867
  "make-dir-cli": "4.0.0",
20889
20868
  mariadb: "3.5.3",
20890
20869
  ncp: "2.0.0",
20891
- npm: "12.0.1",
20870
+ npm: "12.0.2",
20892
20871
  "npm-check-updates": "22.2.9",
20893
20872
  "oidc-client-ts": "3.5.0",
20894
20873
  pg: "8.22.0",
20895
- prisma: "7.8.0",
20874
+ prisma: "7.9.1",
20896
20875
  "react-oidc-context": "3.3.1",
20897
- react: "19.2.7",
20898
- "react-dom": "19.2.7",
20876
+ react: "19.2.8",
20877
+ "react-dom": "19.2.8",
20899
20878
  rimraf: "6.1.3",
20900
- rolldown: "1.2.0",
20879
+ rolldown: "1.2.2",
20880
+ "rolldown-plugin-dts": "0.28.0",
20881
+ "@rollup/plugin-esm-shim": "0.1.8",
20901
20882
  "simple-git": "3.36.0",
20902
20883
  "source-map-support": "0.5.21",
20903
20884
  "starlight-blog": "0.28.0",
20904
20885
  tailwindcss: "4.3.3",
20905
20886
  "@tailwindcss/vite": "4.3.3",
20906
- tsx: "4.23.1",
20907
- "lucide-react": "1.25.0",
20908
- "radix-ui": "1.6.2",
20909
- shadcn: "4.13.1",
20887
+ tsx: "4.23.5",
20888
+ "lucide-react": "1.28.0",
20889
+ "radix-ui": "1.6.7",
20890
+ shadcn: "4.16.1",
20910
20891
  "tw-animate-css": "1.4.0",
20911
20892
  "tailwind-merge": "3.6.0",
20912
- vite: "8.1.5",
20893
+ vite: "8.2.0",
20913
20894
  typescript: "6.0.3",
20914
20895
  vitest: "4.1.10",
20915
20896
  zod: "4.4.3",
@@ -21057,7 +21038,7 @@ const renderGeneratorCommand = (generatorId, schema, packageManager) => {
21057
21038
  return `\`\`\`bash\n${buildNxCommand(`g @aws/nx-plugin:${generatorId} --no-interactive ${args}`, packageManager)}\n\`\`\``;
21058
21039
  };
21059
21040
  //#endregion
21060
- //#region ../../node_modules/.pnpm/js-yaml@4.3.0/node_modules/js-yaml/dist/js-yaml.mjs
21041
+ //#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/dist/js-yaml.mjs
21061
21042
  function getDefaultExportFromCjs(x) {
21062
21043
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
21063
21044
  }
@@ -21820,7 +21801,7 @@ function requireOmap() {
21820
21801
  const _toString = Object.prototype.toString;
21821
21802
  function resolveYamlOmap(data) {
21822
21803
  if (data === null) return true;
21823
- const objectKeys = [];
21804
+ const objectKeys = {};
21824
21805
  const object = data;
21825
21806
  for (let index = 0, length = object.length; index < length; index += 1) {
21826
21807
  const pair = object[index];
@@ -21830,8 +21811,8 @@ function requireOmap() {
21830
21811
  for (pairKey in pair) if (_hasOwnProperty.call(pair, pairKey)) if (!pairHasKey) pairHasKey = true;
21831
21812
  else return false;
21832
21813
  if (!pairHasKey) return false;
21833
- if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);
21834
- else return false;
21814
+ if (_hasOwnProperty.call(objectKeys, pairKey)) return false;
21815
+ Object.defineProperty(objectKeys, pairKey, { value: true });
21835
21816
  }
21836
21817
  return true;
21837
21818
  }
@@ -24762,7 +24743,7 @@ var init_callable_instance = __esmMin((() => {
24762
24743
  * @param {string | symbol} property
24763
24744
  * @returns {(...parameters: Array<unknown>) => unknown}
24764
24745
  */
24765
- function(property) {
24746
+ function(property) {
24766
24747
  const proto = this.constructor.prototype;
24767
24748
  const value = proto[property];
24768
24749
  /** @type {(...parameters: Array<unknown>) => unknown} */
@@ -30645,7 +30626,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
30645
30626
  * @type {State}
30646
30627
  */
30647
30628
  function atBreak(code) {
30648
- if (size > 999 || code === null || code === 91 || code === 93 && !seen || code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
30629
+ if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
30630
+ /* c8 ignore next 3 */
30631
+ code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
30649
30632
  if (code === 93) {
30650
30633
  effects.exit(stringType);
30651
30634
  effects.enter(markerType);
@@ -42034,9 +42017,7 @@ var init_acorn = __esmMin((() => {
42034
42017
  case 10:
42035
42018
  out += "\n";
42036
42019
  break;
42037
- default:
42038
- out += String.fromCharCode(ch);
42039
- break;
42020
+ default: out += String.fromCharCode(ch);
42040
42021
  }
42041
42022
  if (this.options.locations) {
42042
42023
  ++this.curLine;
@@ -42059,7 +42040,6 @@ var init_acorn = __esmMin((() => {
42059
42040
  case "\u2029":
42060
42041
  ++this.curLine;
42061
42042
  this.lineStart = this.pos + 1;
42062
- break;
42063
42043
  }
42064
42044
  this.raise(this.start, "Unterminated template");
42065
42045
  };
@@ -47379,9 +47359,7 @@ var require_acorn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
47379
47359
  case 10:
47380
47360
  out += "\n";
47381
47361
  break;
47382
- default:
47383
- out += String.fromCharCode(ch);
47384
- break;
47362
+ default: out += String.fromCharCode(ch);
47385
47363
  }
47386
47364
  if (this.options.locations) {
47387
47365
  ++this.curLine;
@@ -47404,7 +47382,6 @@ var require_acorn = /* @__PURE__ */ __commonJSMin(((exports, module) => {
47404
47382
  case "\u2029":
47405
47383
  ++this.curLine;
47406
47384
  this.lineStart = this.pos + 1;
47407
- break;
47408
47385
  }
47409
47386
  this.raise(this.start, "Unterminated template");
47410
47387
  };
@@ -48542,8 +48519,9 @@ function mdxExpressionParse(acorn, acornOptions, chunkType, eventStart, pointSta
48542
48519
  throw error;
48543
48520
  }
48544
48521
  if (head.expression.properties[1]) {
48522
+ const place = positionFromEstree(head.expression.properties[1]);
48545
48523
  const error = new VFileMessage("Unexpected extra content in spread: only a single spread is supported", {
48546
- place: positionFromEstree(head.expression.properties[1]).start,
48524
+ place: place.start,
48547
48525
  ruleId: "spread-extra",
48548
48526
  source: "micromark-extension-mdx-expression"
48549
48527
  });
@@ -50590,7 +50568,7 @@ var init_lib$7 = __esmMin((() => {
50590
50568
  * @param {Test} [test]
50591
50569
  * @returns {Check}
50592
50570
  */
50593
- function(test) {
50571
+ function(test) {
50594
50572
  if (test === null || test === void 0) return ok;
50595
50573
  if (typeof test === "function") return castFactory(test);
50596
50574
  if (typeof test === "object") return Array.isArray(test) ? anyFactory(test) : propertiesFactory(test);
@@ -52475,9 +52453,7 @@ var require_format = /* @__PURE__ */ __commonJSMin(((exports, module) => {
52475
52453
  case "X":
52476
52454
  result += "0x" + parseInt(nextArg(), 10).toString(16).toUpperCase();
52477
52455
  break;
52478
- default:
52479
- result += c;
52480
- break;
52456
+ default: result += c;
52481
52457
  }
52482
52458
  } else if (c === "%") escaped = true;
52483
52459
  else result += c;
@@ -53521,7 +53497,8 @@ ${renderGeneratorCommand(info.id, schema, packageManager)}
53521
53497
  */
53522
53498
  const loadFilterableOptionsFromSchema = (info) => {
53523
53499
  try {
53524
- return filterableOptionsFromSchema(JSON.parse(fs.default.readFileSync(info.resolvedSchemaPath, "utf-8")));
53500
+ const schema = JSON.parse(fs.default.readFileSync(info.resolvedSchemaPath, "utf-8"));
53501
+ return filterableOptionsFromSchema(schema);
53525
53502
  } catch {
53526
53503
  return [];
53527
53504
  }
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Graph Builder
3
+ description: Design your workspace visually, then copy the commands that scaffold it.
4
+ # The builder needs the full content width, which the table of contents column
5
+ # would otherwise take.
6
+ tableOfContents: false
7
+ ---
8
+ import Link from '@components/link.astro';
9
+ import GraphBuilder from '@components/graph-builder.astro';
10
+
11
+ Sketch the projects your workspace needs and the connections between them, and the builder generates the commands that scaffold exactly what you drew. Copy them, run them, and you have a working workspace.
12
+
13
+ Drag components from the palette onto the canvas, drag from a component's right edge to another to connect them, and edit each component's properties on the right. The generated commands at the bottom update with every change — hit **Copy** to take the whole script.
14
+
15
+ <GraphBuilder />
16
+
17
+ ## How it works
18
+
19
+ Each component on the canvas maps to a generator, and each connection to the <Link path="guides/connection">connection generator</Link>. The commands are emitted in dependency order: the workspace first, then the projects, then the components they host, then the connections wiring them together.
20
+
21
+ An `infra` project is added at the end — <Link path="guides/typescript-infrastructure">`ts#infra`</Link> or <Link path="guides/terraform-project">`terraform#project`</Link>, matching your IaC choice. Every generated project vends constructs for it to instantiate, so this is what you deploy. Because it owns that name, no component on the canvas can be called `infra`.
22
+
23
+ Drag the canvas background to pan around, and drag a component to reposition it. Shift-click to select several components and move them as a group. Click a connection to select it, then press <kbd>Delete</kbd> to remove it (or use the ✕ on the connection itself).
24
+
25
+ The palette lists every project and component type that can take part in a connection, and you can only draw the connections the plugin supports — so a graph that validates is a graph that scaffolds.
26
+
27
+ Two rules are worth knowing:
28
+
29
+ - **Components share a host project.** An agent and an MCP server are added _to_ a project rather than being projects of their own. Give them the same host project name to put them in one project, or different names for one project each.
30
+ - **Some connections constrain their endpoints.** Connecting an agent to another agent requires the target to use the `a2a` protocol, for instance. Where a property setting would break a connection you have drawn, the builder says so against the component and the connection.
31
+
32
+ :::tip[Prefer to build with AI?]
33
+ The plugin ships an MCP server, so your coding agent can scaffold and connect projects for you. See <Link path="get_started/building-with-ai">Building with AI</Link>.
34
+ :::
@@ -11,6 +11,10 @@ import GeneratorParameters from '@components/generator-parameters.astro';
11
11
 
12
12
  This generator is used to connect projects together, such as websites calling APIs. Simply select the source project (for example the project that will call your API) and target project (for example your API project), and this generator will handle integrating the two.
13
13
 
14
+ :::tip[Sketch it visually]
15
+ Prefer to design your workspace first? The <Link path="get_started/graph-builder">Graph Builder</Link> lets you drag out projects and draw the connections between them, then gives you the commands to scaffold the lot.
16
+ :::
17
+
14
18
  ## Usage
15
19
 
16
20
  ### Run the Generator
@@ -60,6 +60,7 @@ The generator will add the following files to your existing TypeScript project.
60
60
  - init.ts tRPC initialization
61
61
  - router.ts tRPC router with agent procedures
62
62
  - agent.ts Main agent definition with sample tools
63
+ - session.ts Resolves the SessionManager used to persist conversation state
63
64
  - client.ts Vended client for invoking your agent
64
65
  - agent-core-trpc-client.ts Client factory for connecting to agents on AgentCore Runtime
65
66
  - Dockerfile Entry point for hosting your agent (excluded when `infra` is set to `None`)
@@ -79,6 +80,7 @@ The entry point uses the [Strands A2A Express Server](https://strandsagents.com/
79
80
  - agent/ (or custom name if specified)
80
81
  - index.ts A2A Express server entry point
81
82
  - agent.ts Main agent definition with sample tools
83
+ - session.ts Resolves the SessionManager used to persist conversation state
82
84
  - Dockerfile Entry point for hosting your agent (excluded when `infra` is set to `None`)
83
85
  - package.json Updated with Strands and Express dependencies
84
86
  - project.json Updated with agent serve targets
@@ -96,6 +98,7 @@ The entry point uses [`@ag-ui/aws-strands`](https://www.npmjs.com/package/@ag-ui
96
98
  - agent/ (or custom name if specified)
97
99
  - index.ts AG-UI server entry point (Express + SSE)
98
100
  - agent.ts Main agent definition with sample tools
101
+ - session.ts Resolves the SessionManager used to persist conversation state
99
102
  - Dockerfile Entry point for hosting your agent (excluded when `infra` is set to `None`)
100
103
  - package.json Updated with Strands and AG-UI dependencies
101
104
  - project.json Updated with agent serve targets
@@ -185,7 +188,7 @@ const letterCounter = tool({
185
188
  });
186
189
 
187
190
  // Add tools to your agent
188
- export const getAgent = async (sessionId: string) => {
191
+ export const getAgent = async () => {
189
192
  return new Agent({
190
193
  systemPrompt: 'You are a helpful assistant with access to various tools.',
191
194
  tools: [letterCounter],
@@ -347,6 +350,29 @@ Your agent is automatically configured with observability using the [AWS Distro
347
350
  You can find traces in the CloudWatch AWS Console, by selecting "GenAI Observability" in the menu. Note that for traces to be populated you will need to enable [Transaction Search](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Transaction-Search.html).
348
351
 
349
352
  For more details, refer to the [AgentCore documentation on observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability-configure.html).
353
+
354
+ ### Session Management
355
+
356
+ The `session` option controls how your agent persists conversation state (message history, tool state, etc.) across invocations, using the Strands SDK's [SessionManager](https://strandsagents.com/docs/user-guide/concepts/agents/session-management/):
357
+
358
+ - **`s3`** (default): The CDK/Terraform infrastructure provisions a dedicated S3 bucket for session data, encrypted with a dedicated KMS key and with all public access blocked; server access logs are delivered to a CloudWatch Logs log group via the same key. The agent's IAM role is granted read/write/list/delete access to the bucket and decrypt/generate-data-key access to the key, and the bucket name is registered alongside the agent's ARN in AppConfig runtime configuration.
359
+ - **`in-memory`**: No bucket is provisioned. Conversation state is kept in memory only for the lifetime of the running process and does not survive restarts or scale-in.
360
+
361
+ This is implemented in the generated `session.ts`, which exports a `getSessionManager()` function resolving a `SessionManager` for the current session.
362
+
363
+ <OptionFilter when={{ protocol: 'ag-ui' }} description="AG-UI session wiring">
364
+ Since AG-UI clones a template agent per conversation thread, `getSessionManager` is wired in as a `sessionManagerProvider` on the `StrandsAgent` config in `index.ts`, so a fresh `SessionManager` is resolved for each thread rather than baked into the shared template agent.
365
+ </OptionFilter>
366
+
367
+ <OptionFilter when={{ protocol: ['http', 'a2a'] }} description="HTTP/A2A session wiring">
368
+ Since `withSessionId` already caches one `Agent` instance per session, `getSessionManager` is called directly inside `getAgent`'s `new Agent({ sessionManager: await getSessionManager() })` call in `agent.ts`.
369
+ </OptionFilter>
370
+
371
+ The session ID itself comes from the AgentCore Runtime session (propagated via the `x-amzn-bedrock-agentcore-runtime-session-id` header for A2A/AG-UI, or the WebSocket connection context for HTTP/tRPC) and is bound to an [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage)-based context so `getCurrentSessionId()` can resolve it anywhere in the request — including in any downstream MCP or A2A clients wired up via the <Link path="/guides/connection">`connection` generator</Link>, so the whole call chain shares a consistent session.
372
+
373
+ :::note[Local Development]
374
+ When running locally (`LOCAL_DEV=true`, set automatically by the `-dev` target), session data is always stored on disk under `tmp/agents/strands/<agent-name>` at the workspace root, regardless of the configured `session` option, for convenience.
375
+ :::
350
376
  </OptionFilter>
351
377
 
352
378
  ## Invoking your Agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin-mcp",
3
- "version": "1.0.0-rc.56",
3
+ "version": "1.0.0-rc.58",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "agentcore-gateway",
4
4
  "title": "agentcore-gateway",
5
+ "x-label": "AgentCore Gateway",
5
6
  "description": "Generate an AgentCore Gateway project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "py#agent",
4
4
  "title": "py#agent",
5
+ "x-label": "Agent",
5
6
  "description": "Add an AI Agent to a Python project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -60,6 +61,14 @@
60
61
  "default": "agentcore",
61
62
  "x-priority": "important"
62
63
  },
64
+ "session": {
65
+ "type": "string",
66
+ "description": "The storage used to persist session for your Agent. Only 'in-memory' is currently supported for Python agents.",
67
+ "x-prompt": "How would you like to persist session for your Agent?",
68
+ "enum": ["in-memory"],
69
+ "default": "in-memory",
70
+ "x-priority": "important"
71
+ },
63
72
  "preferInstallDependencies": {
64
73
  "type": "boolean",
65
74
  "description": "Whether to prefer installing dependencies after the generator runs. Set to false to defer installing when batching multiple generators (an install still runs if needed so subsequent generators can compute the Nx project graph); install once at the end.",
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "py#dynamodb",
4
4
  "title": "py#dynamodb",
5
+ "x-label": "DynamoDB",
5
6
  "description": "Create a Python DynamoDB project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "PyFastApi",
4
4
  "title": "Create a Python FastAPI project",
5
+ "x-label": "FastAPI",
5
6
  "description": "Create a Python FastAPI project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "py#mcp-server",
4
4
  "title": "py#mcp-server",
5
+ "x-label": "MCP Server",
5
6
  "description": "Generate a Python Model Context Protocol (MCP) server for providing context to Large Language Models",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "py#rdb",
4
4
  "title": "py#rdb",
5
+ "x-label": "Relational Database",
5
6
  "description": "Create a Python relational database project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "ts#smithy-api",
4
4
  "title": "ts#smithy-api",
5
+ "x-label": "Smithy API",
5
6
  "description": "Create an API using Smithy and the Smithy TypeScript Server SDK",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "TrpcBackend",
4
4
  "title": "",
5
+ "x-label": "tRPC API",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "name": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "ts#agent",
4
4
  "title": "ts#agent",
5
+ "x-label": "Agent",
5
6
  "description": "Add an AI Agent to a TypeScript project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -60,6 +61,14 @@
60
61
  "default": "agentcore",
61
62
  "x-priority": "important"
62
63
  },
64
+ "session": {
65
+ "type": "string",
66
+ "description": "The storage used to persist session for your Agent.",
67
+ "x-prompt": "How would you like to persist session for your Agent?",
68
+ "enum": ["s3", "in-memory"],
69
+ "default": "s3",
70
+ "x-priority": "important"
71
+ },
63
72
  "preferInstallDependencies": {
64
73
  "type": "boolean",
65
74
  "description": "Whether to prefer installing dependencies after the generator runs. Set to false to defer installing when batching multiple generators (an install still runs if needed so subsequent generators can compute the Nx project graph); install once at the end.",
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "ts#dynamodb",
4
4
  "title": "ts#dynamodb",
5
+ "x-label": "DynamoDB",
5
6
  "description": "Create a TypeScript DynamoDB project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "ts#mcp-server",
4
4
  "title": "ts#mcp-server",
5
+ "x-label": "MCP Server",
5
6
  "description": "Add a Model Context Protocol (MCP) server to an existing TypeScript project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/schema",
3
3
  "$id": "ts#rdb",
4
4
  "title": "ts#rdb",
5
+ "x-label": "Relational Database",
5
6
  "description": "Create a relational database project",
6
7
  "type": "object",
7
8
  "properties": {
@@ -3,6 +3,7 @@
3
3
  "cli": "nx",
4
4
  "$id": "React website",
5
5
  "title": "Create a React website",
6
+ "x-label": "React Website",
6
7
  "description": "Create a React website application for Nx.",
7
8
  "examples": [
8
9
  {