@walkeros/mcp 4.8.2 → 4.8.3-next-1793115089237

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.
@@ -108,6 +108,9 @@ var ExamplesListOutputShape = {
108
108
  source: z.enum(["inline", "package"]).describe(
109
109
  'Where the example came from: "inline" (defined in the flow step) or "package" (shipped by the referenced package)'
110
110
  ),
111
+ version: z.string().optional().describe(
112
+ "The package version the example was read from; package examples only"
113
+ ),
111
114
  title: z.string().optional().describe("Human-readable title if set"),
112
115
  description: z.string().optional().describe("Short human-readable description"),
113
116
  public: z.boolean().optional().describe(
@@ -248,15 +251,25 @@ async function flowValidateHandlerBody(runtime, input) {
248
251
 
249
252
  // src/tools/examples.ts
250
253
  import { z as z3 } from "zod";
251
- import { fetchPackage, mcpResult as mcpResult2, mcpError as mcpError3 } from "@walkeros/core";
252
- import { resolveExportName, selectDevExamples } from "@walkeros/cli/dev";
254
+ import {
255
+ createLogger,
256
+ getErrorMessage,
257
+ mcpResult as mcpResult2,
258
+ mcpError as mcpError3
259
+ } from "@walkeros/core";
260
+ import {
261
+ readStepPackageInfo,
262
+ resolveExportName,
263
+ resolveStepPackage,
264
+ selectDevExamples
265
+ } from "@walkeros/cli/dev";
253
266
 
254
267
  // src/catalog.ts
255
268
  var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
256
269
  var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
257
270
  var WALKEROS_JSON_PATH = "dist/walkerOS.json";
258
271
  var CACHE_TTL = 5 * 60 * 1e3;
259
- var CLIENT_HEADER = "walkeros-mcp/4.8.2";
272
+ var CLIENT_HEADER = "walkeros-mcp/4.8.3-next-1793115089237";
260
273
  var cached;
261
274
  function normalizePlatform(platform) {
262
275
  if (platform == null) return [];
@@ -398,8 +411,9 @@ function stepExamplesOf(value) {
398
411
 
399
412
  // src/tools/examples.ts
400
413
  var MAX_PACKAGE_LOOKUPS = 25;
414
+ var LOGGER = createLogger();
401
415
  var TITLE2 = "Flow Examples";
402
- var DESCRIPTION2 = 'List all step examples in a walkerOS flow configuration. Shows example names, step locations, and in/out shapes. Inline examples on a step take precedence; steps without inline examples fall back to the examples shipped by their referenced package. Each result is tagged with its source ("inline" or "package"). configPath: inline JSON, or a reference this server can read (locally a file path or an http(s) URL). Use this to discover available test fixtures and simulation data.';
416
+ var DESCRIPTION2 = 'List all step examples in a walkerOS flow configuration. Shows example names, step locations, and in/out shapes. Inline examples on a step take precedence; steps without inline examples fall back to the examples shipped by their referenced package. Package examples are read at the version or local path the flow pins, and carry the version read. Each result is tagged with its source ("inline" or "package"). configPath: inline JSON, or a reference this server can read (locally a file path or an http(s) URL). Use this to discover available test fixtures and simulation data.';
403
417
  var inputSchema2 = {
404
418
  configPath: z3.string().min(1).describe(
405
419
  "A flow configuration: inline JSON, or a reference this server can read (locally a file path or an http(s) URL)."
@@ -451,7 +465,7 @@ async function flowExamplesHandlerBody(runtime, input) {
451
465
  throw new Error(`Flow "${flowName}" not found`);
452
466
  }
453
467
  const examples = [];
454
- const toItems = (stepExamples, type, name, source) => {
468
+ const toItems = (stepExamples, type, name, source, version) => {
455
469
  const items = [];
456
470
  for (const [exName, ex] of Object.entries(stepExamples)) {
457
471
  if (!includeHidden && ex.public === false) continue;
@@ -461,6 +475,7 @@ async function flowExamplesHandlerBody(runtime, input) {
461
475
  stepName: name,
462
476
  exampleName: exName,
463
477
  source,
478
+ ...version ? { version } : {},
464
479
  title: ex.title,
465
480
  description: ex.description,
466
481
  public: ex.public,
@@ -478,26 +493,30 @@ async function flowExamplesHandlerBody(runtime, input) {
478
493
  }
479
494
  return items;
480
495
  };
481
- const loadPackage = async (packageName) => {
482
- try {
483
- return await fetchPackage(packageName, { client: CLIENT_HEADER });
484
- } catch {
485
- }
486
- return void 0;
487
- };
488
- const packageLookups = /* @__PURE__ */ new Map();
496
+ const configDir = runtime.baseDir?.(configPath);
497
+ const packageReads = /* @__PURE__ */ new Map();
489
498
  let skippedPackages = false;
490
499
  const skippedExamples = [];
491
- const packageFor = (packageName) => {
492
- const existing = packageLookups.get(packageName);
500
+ const unreadable = [];
501
+ const packageFor = (resolved) => {
502
+ const existing = packageReads.get(resolved.packageName);
493
503
  if (existing) return existing;
494
- if (packageLookups.size >= MAX_PACKAGE_LOOKUPS) {
504
+ if (packageReads.size >= MAX_PACKAGE_LOOKUPS) {
495
505
  skippedPackages = true;
496
- return Promise.resolve(void 0);
506
+ return void 0;
497
507
  }
498
- const lookup = loadPackage(packageName);
499
- packageLookups.set(packageName, lookup);
500
- return lookup;
508
+ const read = readStepPackageInfo(resolved, {
509
+ configDir,
510
+ client: CLIENT_HEADER
511
+ }).then(
512
+ (info) => ({ ok: true, info }),
513
+ (error) => ({
514
+ ok: false,
515
+ reason: getErrorMessage(error)
516
+ })
517
+ );
518
+ packageReads.set(resolved.packageName, read);
519
+ return read;
501
520
  };
502
521
  const stepExamplesFor = (info, exportName) => {
503
522
  const selected = selectDevExamples(
@@ -520,13 +539,37 @@ async function flowExamplesHandlerBody(runtime, input) {
520
539
  continue;
521
540
  }
522
541
  if (!ref.package) continue;
523
- const info = await packageFor(ref.package);
524
- if (!info) continue;
525
- const { exportName } = resolveExportName(flowSettings, type, name);
526
- const packageExamples = stepExamplesFor(info, exportName);
542
+ let resolved;
543
+ try {
544
+ resolved = resolveStepPackage(flowSettings, type, name, LOGGER);
545
+ } catch (error) {
546
+ unreadable.push(`${type}.${name}: ${getErrorMessage(error)}`);
547
+ continue;
548
+ }
549
+ const read = packageFor(resolved);
550
+ if (!read) continue;
551
+ const outcome = await read;
552
+ if (!outcome.ok) {
553
+ unreadable.push(
554
+ `${type}.${name} (${resolved.label}): ${outcome.reason}`
555
+ );
556
+ continue;
557
+ }
558
+ const { exportName } = resolveExportName(
559
+ resolved.normalizedFlow,
560
+ type,
561
+ name
562
+ );
563
+ const packageExamples = stepExamplesFor(outcome.info, exportName);
527
564
  if (!packageExamples) continue;
528
565
  examples.push(
529
- ...toItems(packageExamples.examples, type, name, "package")
566
+ ...toItems(
567
+ packageExamples.examples,
568
+ type,
569
+ name,
570
+ "package",
571
+ outcome.info.version
572
+ )
530
573
  );
531
574
  for (const exampleName of packageExamples.skipped)
532
575
  skippedExamples.push(`${type}.${name}.${exampleName}`);
@@ -548,6 +591,12 @@ async function flowExamplesHandlerBody(runtime, input) {
548
591
  `Skipped ${skippedExamples.length} package example(s) that do not match the step example schema: ${skippedExamples.join(", ")}.`
549
592
  );
550
593
  }
594
+ if (unreadable.length > 0) {
595
+ const list = unreadable.join("; ");
596
+ warnings.push(
597
+ `Could not read the package of ${unreadable.length} step(s), so their package examples are missing: ${list}${list.endsWith(".") ? "" : "."}`
598
+ );
599
+ }
551
600
  if (skippedPackages) {
552
601
  warnings.push(
553
602
  `Package examples were looked up for the first ${MAX_PACKAGE_LOOKUPS} packages only. Use step to narrow the result.`
@@ -735,7 +784,7 @@ async function flowLoadHandlerBody(runtime, input) {
735
784
 
736
785
  // src/tools/package.ts
737
786
  import { z as z5 } from "zod";
738
- import { fetchPackage as fetchPackage2, mcpResult as mcpResult4, mcpError as mcpError5 } from "@walkeros/core";
787
+ import { fetchPackage, mcpResult as mcpResult4, mcpError as mcpError5 } from "@walkeros/core";
739
788
  import { mergeConfigSchema } from "@walkeros/core/dev";
740
789
  var SEARCH_TITLE = "Search Package";
741
790
  var SEARCH_DESCRIPTION = "Start here for package discovery. Never guess package names: use this tool first to find exact names. Without package name: returns catalog filtered by type/platform. With package name: returns metadata, hint keys, and example summaries.";
@@ -778,7 +827,7 @@ async function packageSearchHandlerBody(input) {
778
827
  });
779
828
  }
780
829
  try {
781
- const info = await fetchPackage2(packageName, {
830
+ const info = await fetchPackage(packageName, {
782
831
  version,
783
832
  client: CLIENT_HEADER
784
833
  });
@@ -859,7 +908,7 @@ async function packageGetHandlerBody(input) {
859
908
  if (!parsed.ok) return parsed.error;
860
909
  const { package: packageName, version, section } = parsed.data;
861
910
  try {
862
- const info = await fetchPackage2(packageName, {
911
+ const info = await fetchPackage(packageName, {
863
912
  version,
864
913
  client: CLIENT_HEADER
865
914
  });
@@ -1152,25 +1201,25 @@ var flow_complete_default = {
1152
1201
  bundle: {
1153
1202
  packages: {
1154
1203
  "@walkeros/collector": {
1155
- version: "4.8.2"
1204
+ version: "4.8.3-next-1793115089237"
1156
1205
  },
1157
1206
  "@walkeros/web-source-cmp-usercentrics": {
1158
- version: "4.8.2"
1207
+ version: "4.8.3-next-1793115089237"
1159
1208
  },
1160
1209
  "@walkeros/web-source-session": {
1161
- version: "4.8.2"
1210
+ version: "4.8.3-next-1793115089237"
1162
1211
  },
1163
1212
  "@walkeros/web-source-datalayer": {
1164
- version: "4.8.2"
1213
+ version: "4.8.3-next-1793115089237"
1165
1214
  },
1166
1215
  "@walkeros/web-source-browser": {
1167
- version: "4.8.2"
1216
+ version: "4.8.3-next-1793115089237"
1168
1217
  },
1169
1218
  "@walkeros/web-destination-gtag": {
1170
- version: "4.8.2"
1219
+ version: "4.8.3-next-1793115089237"
1171
1220
  },
1172
1221
  "@walkeros/web-destination-api": {
1173
- version: "4.8.2"
1222
+ version: "4.8.3-next-1793115089237"
1174
1223
  }
1175
1224
  },
1176
1225
  env: {
@@ -1216,7 +1265,7 @@ var flow_complete_default = {
1216
1265
  examples: {
1217
1266
  explicitDecision: {
1218
1267
  title: "Explicit decision",
1219
- description: "The user accepts every category in the banner. categoryMap turns essential and functional into functional, so the collector receives exactly the consent keys the contract names.",
1268
+ description: "The user accepts every category in the banner. categoryMap folds essential into functional so the collector receives exactly the consent keys the contract names; because any deny denies, functional still follows the functional category, and essential never grants it alone.",
1220
1269
  public: true,
1221
1270
  trigger: {
1222
1271
  type: "consent",
@@ -1842,7 +1891,14 @@ var flow_complete_default = {
1842
1891
  ga4: {
1843
1892
  measurementId: "$env.GA4_MEASUREMENT_ID:G-MAINSITE"
1844
1893
  },
1845
- como: true
1894
+ como: {
1895
+ marketing: [
1896
+ "ad_storage",
1897
+ "ad_user_data",
1898
+ "ad_personalization"
1899
+ ],
1900
+ functional: "analytics_storage"
1901
+ }
1846
1902
  },
1847
1903
  mapping: {
1848
1904
  product: {
@@ -2330,6 +2386,14 @@ var flow_complete_default = {
2330
2386
  settings: {
2331
2387
  gtm: {
2332
2388
  containerId: "$env.GTM_ID:GTM-SHOP01"
2389
+ },
2390
+ como: {
2391
+ marketing: [
2392
+ "ad_storage",
2393
+ "ad_user_data",
2394
+ "ad_personalization"
2395
+ ],
2396
+ functional: "analytics_storage"
2333
2397
  }
2334
2398
  },
2335
2399
  mapping: {
@@ -2674,40 +2738,40 @@ var flow_complete_default = {
2674
2738
  bundle: {
2675
2739
  packages: {
2676
2740
  "@walkeros/collector": {
2677
- version: "4.8.2"
2741
+ version: "4.8.3-next-1793115089237"
2678
2742
  },
2679
2743
  "@walkeros/server-source-express": {
2680
- version: "4.8.2"
2744
+ version: "4.8.3-next-1793115089237"
2681
2745
  },
2682
2746
  "@walkeros/transformer-ga4": {
2683
- version: "4.8.2"
2747
+ version: "4.8.3-next-1793115089237"
2684
2748
  },
2685
2749
  "@walkeros/transformer-validate": {
2686
- version: "4.8.2"
2750
+ version: "4.8.3-next-1793115089237"
2687
2751
  },
2688
2752
  "@walkeros/server-transformer-bot": {
2689
- version: "4.8.2"
2753
+ version: "4.8.3-next-1793115089237"
2690
2754
  },
2691
2755
  "@walkeros/server-transformer-fingerprint": {
2692
- version: "4.8.2"
2756
+ version: "4.8.3-next-1793115089237"
2693
2757
  },
2694
2758
  "@walkeros/server-transformer-file": {
2695
- version: "4.8.2"
2759
+ version: "4.8.3-next-1793115089237"
2696
2760
  },
2697
2761
  "@walkeros/server-store-fs": {
2698
- version: "4.8.2"
2762
+ version: "4.8.3-next-1793115089237"
2699
2763
  },
2700
2764
  "@walkeros/server-destination-gcp": {
2701
- version: "4.8.2"
2765
+ version: "4.8.3-next-1793115089237"
2702
2766
  },
2703
2767
  "@walkeros/server-destination-meta": {
2704
- version: "4.8.2"
2768
+ version: "4.8.3-next-1793115089237"
2705
2769
  },
2706
2770
  "@walkeros/server-destination-piwikpro": {
2707
- version: "4.8.2"
2771
+ version: "4.8.3-next-1793115089237"
2708
2772
  },
2709
2773
  "@walkeros/server-destination-datamanager": {
2710
- version: "4.8.2"
2774
+ version: "4.8.3-next-1793115089237"
2711
2775
  }
2712
2776
  }
2713
2777
  }
@@ -2793,7 +2857,7 @@ var flow_complete_default = {
2793
2857
  },
2794
2858
  ingest: {
2795
2859
  map: {
2796
- ip: "ip",
2860
+ ip: "headers.x-client-ip",
2797
2861
  path: "path",
2798
2862
  method: "method",
2799
2863
  url: "url",
@@ -5748,13 +5812,13 @@ var flow_complete_default = {
5748
5812
  bundle: {
5749
5813
  packages: {
5750
5814
  "@walkeros/collector": {
5751
- version: "4.8.2"
5815
+ version: "4.8.3-next-1793115089237"
5752
5816
  },
5753
5817
  "@walkeros/server-source-gcp": {
5754
- version: "4.8.2"
5818
+ version: "4.8.3-next-1793115089237"
5755
5819
  },
5756
5820
  "@walkeros/server-destination-gcp": {
5757
- version: "4.8.2"
5821
+ version: "4.8.3-next-1793115089237"
5758
5822
  }
5759
5823
  }
5760
5824
  }
@@ -6309,4 +6373,4 @@ export {
6309
6373
  KNOWLEDGE_RESOURCES,
6310
6374
  PROMPTS
6311
6375
  };
6312
- //# sourceMappingURL=chunk-4K6NNGYC.js.map
6376
+ //# sourceMappingURL=chunk-SSQ4MFHN.js.map