@aws/nx-plugin-mcp 1.4.1 → 1.6.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.
package/bin/aws-nx-mcp.js CHANGED
@@ -25651,7 +25651,7 @@ function trough() {
25651
25651
  }
25652
25652
  while (++index < values.length) if (output[index] === null || output[index] === void 0) output[index] = values[index];
25653
25653
  values = output;
25654
- if (fn) wrap(fn, next)(...output);
25654
+ if (fn) wrap$1(fn, next)(...output);
25655
25655
  else callback(null, ...output);
25656
25656
  }
25657
25657
  }
@@ -25694,7 +25694,7 @@ function trough() {
25694
25694
  * @returns {Run}
25695
25695
  * Wrapped middleware.
25696
25696
  */
25697
- function wrap(middleware, callback) {
25697
+ function wrap$1(middleware, callback) {
25698
25698
  /** @type {boolean} */
25699
25699
  let called;
25700
25700
  return wrapped;
@@ -52394,23 +52394,30 @@ var init_lib$7 = __esmMin((() => {
52394
52394
  var init_unist_util_is = __esmMin((() => {
52395
52395
  init_lib$7();
52396
52396
  }));
52397
- // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/color.node.js
52397
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.1.0/node_modules/unist-util-visit-parents/lib/color.node.js
52398
52398
  /**
52399
+ * Color a string.
52400
+ *
52399
52401
  * @param {string} d
52402
+ * Value.
52400
52403
  * @returns {string}
52404
+ * Colored value.
52401
52405
  */
52402
52406
  function color(d) {
52403
52407
  return "\x1B[33m" + d + "\x1B[39m";
52404
52408
  }
52405
- // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/lib/index.js
52409
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.1.0/node_modules/unist-util-visit-parents/lib/index.js
52406
52410
  /**
52407
52411
  * Visit nodes, with ancestral information.
52408
52412
  *
52409
52413
  * This algorithm performs *depth-first* *tree traversal* in *preorder*
52410
- * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
52414
+ * (**NLR**) or if `reverse` is given,
52415
+ * in *reverse preorder* (**NRL**).
52416
+ * An `exit` visitor is called in *postorder* (**LRN**)
52417
+ * or if `reverse` is given, in *reverse postorder* (**RLN**).
52411
52418
  *
52412
- * You can choose for which nodes `visitor` is called by passing a `test`.
52413
- * For complex tests, you should test yourself in `visitor`, as it will be
52419
+ * You can choose which nodes are visited by passing a `test`.
52420
+ * For complex tests, you should test yourself in a visitor, as it will be
52414
52421
  * faster and will have improved type information.
52415
52422
  *
52416
52423
  * Walking the tree is an intensive task.
@@ -52419,29 +52426,72 @@ function color(d) {
52419
52426
  * to check if a node matches, and then perform different operations.
52420
52427
  *
52421
52428
  * You can change the tree.
52422
- * See `Visitor` for more info.
52429
+ * Changes inside a node made when entering it are walked,
52430
+ * changes made when exiting it are not.
52431
+ * See `Visitor` and `VisitorExit` for more info.
52423
52432
  *
52424
52433
  * @overload
52425
52434
  * @param {Tree} tree
52435
+ * Tree to traverse.
52426
52436
  * @param {Check} check
52427
- * @param {BuildVisitor<Tree, Check>} visitor
52437
+ * `unist-util-is`-compatible test.
52438
+ * @param {BuildVisitor<Tree, Check>} enter
52439
+ * Handle each node when entering it.
52428
52440
  * @param {boolean | null | undefined} [reverse]
52441
+ * Walk children from last to first;
52442
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52443
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52429
52444
  * @returns {undefined}
52445
+ * Nothing.
52430
52446
  *
52431
52447
  * @overload
52432
52448
  * @param {Tree} tree
52433
- * @param {BuildVisitor<Tree>} visitor
52449
+ * Tree to traverse.
52450
+ * @param {Check} check
52451
+ * `unist-util-is`-compatible test.
52452
+ * @param {BuildVisitors<Tree, Check>} visitors
52453
+ * Handle each node when exiting it, and optionally when entering it.
52434
52454
  * @param {boolean | null | undefined} [reverse]
52455
+ * Walk children from last to first;
52456
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52457
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52435
52458
  * @returns {undefined}
52459
+ * Nothing.
52460
+ *
52461
+ * @overload
52462
+ * @param {Tree} tree
52463
+ * Tree to traverse.
52464
+ * @param {BuildVisitor<Tree>} enter
52465
+ * Handle each node when entering it.
52466
+ * @param {boolean | null | undefined} [reverse]
52467
+ * Walk children from last to first;
52468
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52469
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52470
+ * @returns {undefined}
52471
+ * Nothing.
52472
+ *
52473
+ * @overload
52474
+ * @param {Tree} tree
52475
+ * Tree to traverse.
52476
+ * @param {BuildVisitors<Tree>} visitors
52477
+ * Handle each node when exiting it, and optionally when entering it.
52478
+ * @param {boolean | null | undefined} [reverse]
52479
+ * Walk children from last to first;
52480
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52481
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52482
+ * @returns {undefined}
52483
+ * Nothing.
52436
52484
  *
52437
52485
  * @param {UnistNode} tree
52438
52486
  * Tree to traverse.
52439
- * @param {Visitor | Test} test
52440
- * `unist-util-is`-compatible test
52441
- * @param {Visitor | boolean | null | undefined} [visitor]
52442
- * Handle each node.
52487
+ * @param {Visitor | Visitors | Test} testOrEnterOrVisitors
52488
+ * `unist-util-is`-compatible test, `enter`, or `visitors`.
52489
+ * @param {Visitor | Visitors | boolean | null | undefined} [enterOrVisitorsOrReverse]
52490
+ * `enter`, `visitors`, or `reverse` after a test.
52443
52491
  * @param {boolean | null | undefined} [reverse]
52444
- * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
52492
+ * Walk children from last to first;
52493
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52494
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52445
52495
  * @returns {undefined}
52446
52496
  * Nothing.
52447
52497
  *
@@ -52450,20 +52500,46 @@ function color(d) {
52450
52500
  * @template {Test} Check
52451
52501
  * `unist-util-is`-compatible test.
52452
52502
  */
52453
- function visitParents(tree, test, visitor, reverse) {
52503
+ function visitParents(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, reverse) {
52504
+ if (!tree || typeof tree !== "object") throw new Error("Unexpected value `" + tree + "` for `tree`, expected node");
52505
+ let preorder = true;
52454
52506
  /** @type {Test} */
52455
52507
  let check;
52456
- if (typeof test === "function" && typeof visitor !== "function") {
52457
- reverse = visitor;
52458
- visitor = test;
52459
- } else check = test;
52508
+ /** @type {Visitors | Visitor} */
52509
+ let visitors;
52510
+ /** @type {Visitor | null | undefined} */
52511
+ let enter;
52512
+ /** @type {VisitorExit | null | undefined} */
52513
+ let exit;
52514
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
52515
+ check = testOrEnterOrVisitors;
52516
+ visitors = enterOrVisitorsOrReverse;
52517
+ if (reverse) preorder = false;
52518
+ } else {
52519
+ visitors = testOrEnterOrVisitors;
52520
+ if (enterOrVisitorsOrReverse) preorder = false;
52521
+ }
52522
+ if (typeof visitors === "function") enter = visitors;
52523
+ else if (visitors && typeof visitors === "object") {
52524
+ if (visitors.enter === null || visitors.enter === void 0) {} else if (typeof visitors.enter === "function") enter = visitors.enter;
52525
+ else throw new Error("Unexpected value `" + visitors.enter + "` for `visitors.enter`, expected optional visitor");
52526
+ if (typeof visitors.exit === "function") exit = visitors.exit;
52527
+ else throw new Error("Unexpected value `" + visitors.exit + "` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)");
52528
+ } else throw new Error("Unexpected value `" + visitors + "` for `enter` or `visitors`, expected visitor or object with visitors");
52460
52529
  const is = convert(check);
52461
- const step = reverse ? -1 : 1;
52530
+ const step = preorder ? 1 : -1;
52462
52531
  factory(tree, void 0, [])();
52463
52532
  /**
52533
+ * Create a function to visit a node.
52534
+ *
52464
52535
  * @param {UnistNode} node
52536
+ * Node to visit.
52465
52537
  * @param {number | undefined} index
52538
+ * Index of `node` in its parent.
52466
52539
  * @param {Array<UnistParent>} parents
52540
+ * Ancestors of `node`.
52541
+ * @returns {() => Readonly<ActionTuple>}
52542
+ * Visit `node`.
52467
52543
  */
52468
52544
  function factory(node, index, parents) {
52469
52545
  const value = node && typeof node === "object" ? node : {};
@@ -52473,31 +52549,31 @@ function visitParents(tree, test, visitor, reverse) {
52473
52549
  }
52474
52550
  return visit;
52475
52551
  function visit() {
52552
+ const matches = !check || is(node, index, parents[parents.length - 1] || void 0);
52476
52553
  /** @type {Readonly<ActionTuple>} */
52477
52554
  let result = empty;
52478
- /** @type {Readonly<ActionTuple>} */
52479
- let subresult;
52480
- /** @type {number} */
52481
- let offset;
52482
- /** @type {Array<UnistParent>} */
52483
- let grandparents;
52484
- if (!test || is(node, index, parents[parents.length - 1] || void 0)) {
52485
- result = toResult(visitor(node, parents));
52555
+ if (enter && matches) {
52556
+ result = toResult(enter(node, parents, index));
52486
52557
  if (result[0] === false) return result;
52487
52558
  }
52488
52559
  if ("children" in node && node.children) {
52489
52560
  const nodeAsParent = node;
52490
52561
  if (nodeAsParent.children && result[0] !== "skip") {
52491
- offset = (reverse ? nodeAsParent.children.length : -1) + step;
52492
- grandparents = parents.concat(nodeAsParent);
52562
+ let offset = (preorder ? -1 : nodeAsParent.children.length) + step;
52563
+ const grandparents = [...parents, nodeAsParent];
52493
52564
  while (offset > -1 && offset < nodeAsParent.children.length) {
52494
52565
  const child = nodeAsParent.children[offset];
52495
- subresult = factory(child, offset, grandparents)();
52566
+ const subresult = factory(child, offset, grandparents)();
52496
52567
  if (subresult[0] === false) return subresult;
52497
52568
  offset = typeof subresult[1] === "number" ? subresult[1] : offset + step;
52498
52569
  }
52499
52570
  }
52500
52571
  }
52572
+ if (exit && matches) {
52573
+ const exitResult = toResult(exit(node, parents, index));
52574
+ if (exitResult[0] === "skip") throw new Error("Unexpected value `" + exitResult[0] + "` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");
52575
+ if (exitResult[0] === false || typeof exitResult[1] === "number") return exitResult;
52576
+ }
52501
52577
  return result;
52502
52578
  }
52503
52579
  }
@@ -52520,19 +52596,22 @@ var init_lib$6 = __esmMin((() => {
52520
52596
  init_unist_util_is();
52521
52597
  empty = [];
52522
52598
  }));
52523
- // ../../node_modules/.pnpm/unist-util-visit-parents@6.0.2/node_modules/unist-util-visit-parents/index.js
52599
+ // ../../node_modules/.pnpm/unist-util-visit-parents@6.1.0/node_modules/unist-util-visit-parents/index.js
52524
52600
  var init_unist_util_visit_parents = __esmMin((() => {
52525
52601
  init_lib$6();
52526
52602
  }));
52527
- // ../../node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/lib/index.js
52603
+ // ../../node_modules/.pnpm/unist-util-visit@5.2.0/node_modules/unist-util-visit/lib/index.js
52528
52604
  /**
52529
52605
  * Visit nodes.
52530
52606
  *
52531
52607
  * This algorithm performs *depth-first* *tree traversal* in *preorder*
52532
- * (**NLR**) or if `reverse` is given, in *reverse preorder* (**NRL**).
52608
+ * (**NLR**) or if `reverse` is given,
52609
+ * in *reverse preorder* (**NRL**).
52610
+ * An `exit` visitor is called in *postorder* (**LRN**)
52611
+ * or if `reverse` is given, in *reverse postorder* (**RLN**).
52533
52612
  *
52534
- * You can choose for which nodes `visitor` is called by passing a `test`.
52535
- * For complex tests, you should test yourself in `visitor`, as it will be
52613
+ * You can choose which nodes are visited by passing a `test`.
52614
+ * For complex tests, you should test yourself in a visitor, as it will be
52536
52615
  * faster and will have improved type information.
52537
52616
  *
52538
52617
  * Walking the tree is an intensive task.
@@ -52541,29 +52620,48 @@ var init_unist_util_visit_parents = __esmMin((() => {
52541
52620
  * to check if a node matches, and then perform different operations.
52542
52621
  *
52543
52622
  * You can change the tree.
52544
- * See `Visitor` for more info.
52623
+ * Changes inside a node made when entering it are walked,
52624
+ * changes made when exiting it are not.
52625
+ * See `Visitor` and `VisitorExit` for more info.
52545
52626
  *
52546
52627
  * @overload
52547
52628
  * @param {Tree} tree
52629
+ * Tree to traverse.
52548
52630
  * @param {Check} check
52549
- * @param {BuildVisitor<Tree, Check>} visitor
52631
+ * `unist-util-is`-compatible test.
52632
+ * @param {BuildVisitor<Tree, Check> | BuildVisitors<Tree, Check>} visitors
52633
+ * Handle each node when entering it,
52634
+ * or `{enter, exit}` to also handle it when exiting it.
52550
52635
  * @param {boolean | null | undefined} [reverse]
52636
+ * Walk children from last to first;
52637
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52638
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52551
52639
  * @returns {undefined}
52640
+ * Nothing.
52552
52641
  *
52553
52642
  * @overload
52554
52643
  * @param {Tree} tree
52555
- * @param {BuildVisitor<Tree>} visitor
52644
+ * Tree to traverse.
52645
+ * @param {BuildVisitor<Tree> | BuildVisitors<Tree>} visitors
52646
+ * Handle each node when entering it,
52647
+ * or `{enter, exit}` to also handle it when exiting it.
52556
52648
  * @param {boolean | null | undefined} [reverse]
52649
+ * Walk children from last to first;
52650
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52651
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52557
52652
  * @returns {undefined}
52653
+ * Nothing.
52558
52654
  *
52559
52655
  * @param {UnistNode} tree
52560
52656
  * Tree to traverse.
52561
- * @param {Visitor | Test} testOrVisitor
52562
- * `unist-util-is`-compatible test (optional, omit to pass a visitor).
52563
- * @param {Visitor | boolean | null | undefined} [visitorOrReverse]
52564
- * Handle each node (when test is omitted, pass `reverse`).
52565
- * @param {boolean | null | undefined} [maybeReverse=false]
52566
- * Traverse in reverse preorder (NRL) instead of the default preorder (NLR).
52657
+ * @param {Visitor | Visitors | Test} testOrEnterOrVisitors
52658
+ * `unist-util-is`-compatible test, `enter`, or `visitors`.
52659
+ * @param {Visitor | Visitors | boolean | null | undefined} [enterOrVisitorsOrReverse]
52660
+ * `enter`, `visitors`, or `reverse` after a test.
52661
+ * @param {boolean | null | undefined} [maybeReverse]
52662
+ * Walk children from last to first;
52663
+ * for `enter`, reverse preorder (NRL) instead of preorder (NLR);
52664
+ * for `exit`, reverse postorder (RLN) instead of postorder (LRN).
52567
52665
  * @returns {undefined}
52568
52666
  * Nothing.
52569
52667
  *
@@ -52572,37 +52670,71 @@ var init_unist_util_visit_parents = __esmMin((() => {
52572
52670
  * @template {Test} Check
52573
52671
  * `unist-util-is`-compatible test.
52574
52672
  */
52575
- function visit(tree, testOrVisitor, visitorOrReverse, maybeReverse) {
52673
+ function visit(tree, testOrEnterOrVisitors, enterOrVisitorsOrReverse, maybeReverse) {
52674
+ /** @type {Test} */
52675
+ let check;
52676
+ /** @type {Visitor | Visitors} */
52677
+ let visitors;
52576
52678
  /** @type {boolean | null | undefined} */
52577
52679
  let reverse;
52578
- /** @type {Test} */
52579
- let test;
52580
- /** @type {Visitor} */
52581
- let visitor;
52582
- if (typeof testOrVisitor === "function" && typeof visitorOrReverse !== "function") {
52583
- test = void 0;
52584
- visitor = testOrVisitor;
52585
- reverse = visitorOrReverse;
52586
- } else {
52587
- test = testOrVisitor;
52588
- visitor = visitorOrReverse;
52680
+ if (typeof enterOrVisitorsOrReverse === "function" || enterOrVisitorsOrReverse && typeof enterOrVisitorsOrReverse === "object") {
52681
+ check = testOrEnterOrVisitors;
52682
+ visitors = enterOrVisitorsOrReverse;
52589
52683
  reverse = maybeReverse;
52684
+ } else {
52685
+ visitors = testOrEnterOrVisitors;
52686
+ reverse = enterOrVisitorsOrReverse;
52590
52687
  }
52591
- visitParents(tree, test, overload, reverse);
52688
+ if (typeof visitors === "function") visitParents(tree, check, wrap(visitors), reverse);
52689
+ else visitParents(tree, check, wrapVisitors(visitors), reverse);
52690
+ }
52691
+ /**
52692
+ * Turn `visit` visitors into `visitParents` visitors.
52693
+ *
52694
+ * @param {Visitors} visitors
52695
+ * Visitors for `visit`.
52696
+ * @returns {ParentsVisitors}
52697
+ * Visitors for `visitParents`.
52698
+ */
52699
+ function wrapVisitors(visitors) {
52700
+ if (!visitors || typeof visitors !== "object") return visitors;
52701
+ return {
52702
+ enter: typeof visitors.enter === "function" ? wrap(visitors.enter) : visitors.enter,
52703
+ exit: typeof visitors.exit === "function" ? wrap(visitors.exit) : visitors.exit
52704
+ };
52705
+ }
52706
+ /**
52707
+ * Turn a `visit` visitor into a `visitParents` one.
52708
+ *
52709
+ * @template {VisitorResult} Result
52710
+ * Result type.
52711
+ * @param {(node: UnistNode, index: number | undefined, parent: UnistParent | undefined) => Result} visitor
52712
+ * Visitor for `visit`.
52713
+ * @returns {(node: UnistNode, parents: Array<UnistParent>, index: number | undefined) => Result}
52714
+ * Visitor for `visitParents`.
52715
+ */
52716
+ function wrap(visitor) {
52717
+ return overload;
52592
52718
  /**
52719
+ * Call `visitor` with `index` and `parent` instead of `parents`.
52720
+ *
52593
52721
  * @param {UnistNode} node
52722
+ * Visited node.
52594
52723
  * @param {Array<UnistParent>} parents
52724
+ * Ancestors of `node`.
52725
+ * @param {number | undefined} index
52726
+ * Index of `node` in its parent.
52727
+ * @returns {Result}
52728
+ * What to do next.
52595
52729
  */
52596
- function overload(node, parents) {
52597
- const parent = parents[parents.length - 1];
52598
- const index = parent ? parent.children.indexOf(node) : void 0;
52599
- return visitor(node, index, parent);
52730
+ function overload(node, parents, index) {
52731
+ return visitor(node, index, parents[parents.length - 1]);
52600
52732
  }
52601
52733
  }
52602
52734
  var init_lib$5 = __esmMin((() => {
52603
52735
  init_unist_util_visit_parents();
52604
52736
  }));
52605
- // ../../node_modules/.pnpm/unist-util-visit@5.1.0/node_modules/unist-util-visit/index.js
52737
+ // ../../node_modules/.pnpm/unist-util-visit@5.2.0/node_modules/unist-util-visit/index.js
52606
52738
  var init_unist_util_visit = __esmMin((() => {
52607
52739
  init_lib$5();
52608
52740
  }));
@@ -55829,6 +55961,14 @@ const generatorsJsonEntries = {
55829
55961
  "guidePages": ["agentcore-harness"],
55830
55962
  "experimental": true
55831
55963
  },
55964
+ "observability#langfuse": {
55965
+ "factory": "./src/observability/langfuse/generator",
55966
+ "schema": "./src/observability/langfuse/schema.json",
55967
+ "description": "Configure Langfuse trace export for an existing Python Strands agent",
55968
+ "metric": "g79",
55969
+ "experimental": true,
55970
+ "guidePages": ["observability-langfuse"]
55971
+ },
55832
55972
  "connection": {
55833
55973
  "factory": "./src/connection/generator",
55834
55974
  "schema": "./src/connection/schema.json",
@@ -56104,7 +56244,7 @@ const generatorsJsonEntries = {
56104
56244
  "schema": "./src/ts/website/auth/schema.json",
56105
56245
  "description": "Adds auth to an existing website",
56106
56246
  "metric": "g44",
56107
- "guidePages": ["react-website-auth"]
56247
+ "guidePages": ["react-website-auth", "react-website-auth-idp"]
56108
56248
  },
56109
56249
  "ts#react-website": {
56110
56250
  "factory": "./src/ts/react-website/app/generator",
@@ -170,4 +170,8 @@ Each website has a `load-runtime-config` target that downloads the deployed `run
170
170
 
171
171
  This flexibility lets you test exactly the slice you're working on, against whichever components — local or deployed — make sense.
172
172
 
173
- Congratulations. You have built, tested, and deployed your Agentic Dungeon Adventure Game! 🎉🎉🎉
173
+ You have built, tested, and deployed your Agentic Dungeon Adventure Game.
174
+ Continue with <Link path="get_started/tutorials/dungeon-game/greengrass-dice">optional Greengrass dice rolls</Link>
175
+ to let the Story Agent request a roll from an edge device, or go to
176
+ <Link path="get_started/tutorials/dungeon-game/wrap-up">Wrap up</Link> to finish
177
+ and remove your resources.