@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.
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  unavailableOperation,
17
17
  wrapListedRecord,
18
18
  wrapUserData
19
- } from "./chunk-4K6NNGYC.js";
19
+ } from "./chunk-SSQ4MFHN.js";
20
20
 
21
21
  // src/server.ts
22
22
  import {
package/dist/specs.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Flow, Ingest, WalkerOS, Simulation } from '@walkeros/core';
1
+ import { StepKind, Flow, Ingest, WalkerOS, Simulation } from '@walkeros/core';
2
2
  import { BundleStats, PushResult } from '@walkeros/cli';
3
3
  import { ZodOptional, ZodString, ZodRawShape } from 'zod';
4
4
  import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
@@ -108,7 +108,8 @@ interface BundleOptions {
108
108
  stats?: boolean;
109
109
  output?: string;
110
110
  }
111
- type SimulateStepType = 'source' | 'transformer' | 'collector' | 'destination';
111
+ /** The step kinds a simulation runs: every kind but a store. */
112
+ type SimulateStepType = Exclude<StepKind, 'store'>;
112
113
  interface SimulateOptions {
113
114
  stepType: SimulateStepType;
114
115
  stepId: string;
package/dist/specs.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  redactNestedStrings,
10
10
  wrapListedRecord,
11
11
  wrapUserData
12
- } from "./chunk-4K6NNGYC.js";
12
+ } from "./chunk-SSQ4MFHN.js";
13
13
  export {
14
14
  KNOWLEDGE_RESOURCES,
15
15
  PROMPTS,
package/dist/stdio.js CHANGED
@@ -120,6 +120,9 @@ var ExamplesListOutputShape = {
120
120
  source: z.enum(["inline", "package"]).describe(
121
121
  'Where the example came from: "inline" (defined in the flow step) or "package" (shipped by the referenced package)'
122
122
  ),
123
+ version: z.string().optional().describe(
124
+ "The package version the example was read from; package examples only"
125
+ ),
123
126
  title: z.string().optional().describe("Human-readable title if set"),
124
127
  description: z.string().optional().describe("Short human-readable description"),
125
128
  public: z.boolean().optional().describe(
@@ -260,15 +263,25 @@ async function flowValidateHandlerBody(runtime, input) {
260
263
 
261
264
  // src/tools/examples.ts
262
265
  import { z as z3 } from "zod";
263
- import { fetchPackage, mcpResult as mcpResult2, mcpError as mcpError3 } from "@walkeros/core";
264
- import { resolveExportName, selectDevExamples } from "@walkeros/cli/dev";
266
+ import {
267
+ createLogger,
268
+ getErrorMessage,
269
+ mcpResult as mcpResult2,
270
+ mcpError as mcpError3
271
+ } from "@walkeros/core";
272
+ import {
273
+ readStepPackageInfo,
274
+ resolveExportName,
275
+ resolveStepPackage,
276
+ selectDevExamples
277
+ } from "@walkeros/cli/dev";
265
278
 
266
279
  // src/catalog.ts
267
280
  var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
268
281
  var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
269
282
  var WALKEROS_JSON_PATH = "dist/walkerOS.json";
270
283
  var CACHE_TTL = 5 * 60 * 1e3;
271
- var CLIENT_HEADER = "walkeros-mcp/4.8.2";
284
+ var CLIENT_HEADER = "walkeros-mcp/4.8.3-next-1793115089237";
272
285
  var cached;
273
286
  function normalizePlatform(platform) {
274
287
  if (platform == null) return [];
@@ -410,8 +423,9 @@ function stepExamplesOf(value) {
410
423
 
411
424
  // src/tools/examples.ts
412
425
  var MAX_PACKAGE_LOOKUPS = 25;
426
+ var LOGGER = createLogger();
413
427
  var TITLE2 = "Flow Examples";
414
- 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.';
428
+ 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.';
415
429
  var inputSchema2 = {
416
430
  configPath: z3.string().min(1).describe(
417
431
  "A flow configuration: inline JSON, or a reference this server can read (locally a file path or an http(s) URL)."
@@ -463,7 +477,7 @@ async function flowExamplesHandlerBody(runtime, input) {
463
477
  throw new Error(`Flow "${flowName}" not found`);
464
478
  }
465
479
  const examples = [];
466
- const toItems = (stepExamples, type, name, source) => {
480
+ const toItems = (stepExamples, type, name, source, version) => {
467
481
  const items = [];
468
482
  for (const [exName, ex] of Object.entries(stepExamples)) {
469
483
  if (!includeHidden && ex.public === false) continue;
@@ -473,6 +487,7 @@ async function flowExamplesHandlerBody(runtime, input) {
473
487
  stepName: name,
474
488
  exampleName: exName,
475
489
  source,
490
+ ...version ? { version } : {},
476
491
  title: ex.title,
477
492
  description: ex.description,
478
493
  public: ex.public,
@@ -490,26 +505,30 @@ async function flowExamplesHandlerBody(runtime, input) {
490
505
  }
491
506
  return items;
492
507
  };
493
- const loadPackage = async (packageName) => {
494
- try {
495
- return await fetchPackage(packageName, { client: CLIENT_HEADER });
496
- } catch {
497
- }
498
- return void 0;
499
- };
500
- const packageLookups = /* @__PURE__ */ new Map();
508
+ const configDir = runtime.baseDir?.(configPath);
509
+ const packageReads = /* @__PURE__ */ new Map();
501
510
  let skippedPackages = false;
502
511
  const skippedExamples = [];
503
- const packageFor = (packageName) => {
504
- const existing = packageLookups.get(packageName);
512
+ const unreadable = [];
513
+ const packageFor = (resolved) => {
514
+ const existing = packageReads.get(resolved.packageName);
505
515
  if (existing) return existing;
506
- if (packageLookups.size >= MAX_PACKAGE_LOOKUPS) {
516
+ if (packageReads.size >= MAX_PACKAGE_LOOKUPS) {
507
517
  skippedPackages = true;
508
- return Promise.resolve(void 0);
518
+ return void 0;
509
519
  }
510
- const lookup = loadPackage(packageName);
511
- packageLookups.set(packageName, lookup);
512
- return lookup;
520
+ const read = readStepPackageInfo(resolved, {
521
+ configDir,
522
+ client: CLIENT_HEADER
523
+ }).then(
524
+ (info) => ({ ok: true, info }),
525
+ (error) => ({
526
+ ok: false,
527
+ reason: getErrorMessage(error)
528
+ })
529
+ );
530
+ packageReads.set(resolved.packageName, read);
531
+ return read;
513
532
  };
514
533
  const stepExamplesFor = (info, exportName) => {
515
534
  const selected = selectDevExamples(
@@ -532,13 +551,37 @@ async function flowExamplesHandlerBody(runtime, input) {
532
551
  continue;
533
552
  }
534
553
  if (!ref.package) continue;
535
- const info = await packageFor(ref.package);
536
- if (!info) continue;
537
- const { exportName } = resolveExportName(flowSettings, type, name);
538
- const packageExamples = stepExamplesFor(info, exportName);
554
+ let resolved;
555
+ try {
556
+ resolved = resolveStepPackage(flowSettings, type, name, LOGGER);
557
+ } catch (error) {
558
+ unreadable.push(`${type}.${name}: ${getErrorMessage(error)}`);
559
+ continue;
560
+ }
561
+ const read = packageFor(resolved);
562
+ if (!read) continue;
563
+ const outcome = await read;
564
+ if (!outcome.ok) {
565
+ unreadable.push(
566
+ `${type}.${name} (${resolved.label}): ${outcome.reason}`
567
+ );
568
+ continue;
569
+ }
570
+ const { exportName } = resolveExportName(
571
+ resolved.normalizedFlow,
572
+ type,
573
+ name
574
+ );
575
+ const packageExamples = stepExamplesFor(outcome.info, exportName);
539
576
  if (!packageExamples) continue;
540
577
  examples.push(
541
- ...toItems(packageExamples.examples, type, name, "package")
578
+ ...toItems(
579
+ packageExamples.examples,
580
+ type,
581
+ name,
582
+ "package",
583
+ outcome.info.version
584
+ )
542
585
  );
543
586
  for (const exampleName of packageExamples.skipped)
544
587
  skippedExamples.push(`${type}.${name}.${exampleName}`);
@@ -560,6 +603,12 @@ async function flowExamplesHandlerBody(runtime, input) {
560
603
  `Skipped ${skippedExamples.length} package example(s) that do not match the step example schema: ${skippedExamples.join(", ")}.`
561
604
  );
562
605
  }
606
+ if (unreadable.length > 0) {
607
+ const list = unreadable.join("; ");
608
+ warnings.push(
609
+ `Could not read the package of ${unreadable.length} step(s), so their package examples are missing: ${list}${list.endsWith(".") ? "" : "."}`
610
+ );
611
+ }
563
612
  if (skippedPackages) {
564
613
  warnings.push(
565
614
  `Package examples were looked up for the first ${MAX_PACKAGE_LOOKUPS} packages only. Use step to narrow the result.`
@@ -714,7 +763,7 @@ async function flowLoadHandlerBody(runtime, input) {
714
763
 
715
764
  // src/tools/package.ts
716
765
  import { z as z5 } from "zod";
717
- import { fetchPackage as fetchPackage2, mcpResult as mcpResult4, mcpError as mcpError5 } from "@walkeros/core";
766
+ import { fetchPackage, mcpResult as mcpResult4, mcpError as mcpError5 } from "@walkeros/core";
718
767
  import { mergeConfigSchema } from "@walkeros/core/dev";
719
768
  var SEARCH_TITLE = "Search Package";
720
769
  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.";
@@ -757,7 +806,7 @@ async function packageSearchHandlerBody(input) {
757
806
  });
758
807
  }
759
808
  try {
760
- const info = await fetchPackage2(packageName, {
809
+ const info = await fetchPackage(packageName, {
761
810
  version,
762
811
  client: CLIENT_HEADER
763
812
  });
@@ -838,7 +887,7 @@ async function packageGetHandlerBody(input) {
838
887
  if (!parsed.ok) return parsed.error;
839
888
  const { package: packageName, version, section } = parsed.data;
840
889
  try {
841
- const info = await fetchPackage2(packageName, {
890
+ const info = await fetchPackage(packageName, {
842
891
  version,
843
892
  client: CLIENT_HEADER
844
893
  });
@@ -1131,25 +1180,25 @@ var flow_complete_default = {
1131
1180
  bundle: {
1132
1181
  packages: {
1133
1182
  "@walkeros/collector": {
1134
- version: "4.8.2"
1183
+ version: "4.8.3-next-1793115089237"
1135
1184
  },
1136
1185
  "@walkeros/web-source-cmp-usercentrics": {
1137
- version: "4.8.2"
1186
+ version: "4.8.3-next-1793115089237"
1138
1187
  },
1139
1188
  "@walkeros/web-source-session": {
1140
- version: "4.8.2"
1189
+ version: "4.8.3-next-1793115089237"
1141
1190
  },
1142
1191
  "@walkeros/web-source-datalayer": {
1143
- version: "4.8.2"
1192
+ version: "4.8.3-next-1793115089237"
1144
1193
  },
1145
1194
  "@walkeros/web-source-browser": {
1146
- version: "4.8.2"
1195
+ version: "4.8.3-next-1793115089237"
1147
1196
  },
1148
1197
  "@walkeros/web-destination-gtag": {
1149
- version: "4.8.2"
1198
+ version: "4.8.3-next-1793115089237"
1150
1199
  },
1151
1200
  "@walkeros/web-destination-api": {
1152
- version: "4.8.2"
1201
+ version: "4.8.3-next-1793115089237"
1153
1202
  }
1154
1203
  },
1155
1204
  env: {
@@ -1195,7 +1244,7 @@ var flow_complete_default = {
1195
1244
  examples: {
1196
1245
  explicitDecision: {
1197
1246
  title: "Explicit decision",
1198
- 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.",
1247
+ 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.",
1199
1248
  public: true,
1200
1249
  trigger: {
1201
1250
  type: "consent",
@@ -1821,7 +1870,14 @@ var flow_complete_default = {
1821
1870
  ga4: {
1822
1871
  measurementId: "$env.GA4_MEASUREMENT_ID:G-MAINSITE"
1823
1872
  },
1824
- como: true
1873
+ como: {
1874
+ marketing: [
1875
+ "ad_storage",
1876
+ "ad_user_data",
1877
+ "ad_personalization"
1878
+ ],
1879
+ functional: "analytics_storage"
1880
+ }
1825
1881
  },
1826
1882
  mapping: {
1827
1883
  product: {
@@ -2309,6 +2365,14 @@ var flow_complete_default = {
2309
2365
  settings: {
2310
2366
  gtm: {
2311
2367
  containerId: "$env.GTM_ID:GTM-SHOP01"
2368
+ },
2369
+ como: {
2370
+ marketing: [
2371
+ "ad_storage",
2372
+ "ad_user_data",
2373
+ "ad_personalization"
2374
+ ],
2375
+ functional: "analytics_storage"
2312
2376
  }
2313
2377
  },
2314
2378
  mapping: {
@@ -2653,40 +2717,40 @@ var flow_complete_default = {
2653
2717
  bundle: {
2654
2718
  packages: {
2655
2719
  "@walkeros/collector": {
2656
- version: "4.8.2"
2720
+ version: "4.8.3-next-1793115089237"
2657
2721
  },
2658
2722
  "@walkeros/server-source-express": {
2659
- version: "4.8.2"
2723
+ version: "4.8.3-next-1793115089237"
2660
2724
  },
2661
2725
  "@walkeros/transformer-ga4": {
2662
- version: "4.8.2"
2726
+ version: "4.8.3-next-1793115089237"
2663
2727
  },
2664
2728
  "@walkeros/transformer-validate": {
2665
- version: "4.8.2"
2729
+ version: "4.8.3-next-1793115089237"
2666
2730
  },
2667
2731
  "@walkeros/server-transformer-bot": {
2668
- version: "4.8.2"
2732
+ version: "4.8.3-next-1793115089237"
2669
2733
  },
2670
2734
  "@walkeros/server-transformer-fingerprint": {
2671
- version: "4.8.2"
2735
+ version: "4.8.3-next-1793115089237"
2672
2736
  },
2673
2737
  "@walkeros/server-transformer-file": {
2674
- version: "4.8.2"
2738
+ version: "4.8.3-next-1793115089237"
2675
2739
  },
2676
2740
  "@walkeros/server-store-fs": {
2677
- version: "4.8.2"
2741
+ version: "4.8.3-next-1793115089237"
2678
2742
  },
2679
2743
  "@walkeros/server-destination-gcp": {
2680
- version: "4.8.2"
2744
+ version: "4.8.3-next-1793115089237"
2681
2745
  },
2682
2746
  "@walkeros/server-destination-meta": {
2683
- version: "4.8.2"
2747
+ version: "4.8.3-next-1793115089237"
2684
2748
  },
2685
2749
  "@walkeros/server-destination-piwikpro": {
2686
- version: "4.8.2"
2750
+ version: "4.8.3-next-1793115089237"
2687
2751
  },
2688
2752
  "@walkeros/server-destination-datamanager": {
2689
- version: "4.8.2"
2753
+ version: "4.8.3-next-1793115089237"
2690
2754
  }
2691
2755
  }
2692
2756
  }
@@ -2772,7 +2836,7 @@ var flow_complete_default = {
2772
2836
  },
2773
2837
  ingest: {
2774
2838
  map: {
2775
- ip: "ip",
2839
+ ip: "headers.x-client-ip",
2776
2840
  path: "path",
2777
2841
  method: "method",
2778
2842
  url: "url",
@@ -5727,13 +5791,13 @@ var flow_complete_default = {
5727
5791
  bundle: {
5728
5792
  packages: {
5729
5793
  "@walkeros/collector": {
5730
- version: "4.8.2"
5794
+ version: "4.8.3-next-1793115089237"
5731
5795
  },
5732
5796
  "@walkeros/server-source-gcp": {
5733
- version: "4.8.2"
5797
+ version: "4.8.3-next-1793115089237"
5734
5798
  },
5735
5799
  "@walkeros/server-destination-gcp": {
5736
- version: "4.8.2"
5800
+ version: "4.8.3-next-1793115089237"
5737
5801
  }
5738
5802
  }
5739
5803
  }
@@ -7173,7 +7237,7 @@ process.on("unhandledRejection", (reason) => {
7173
7237
  });
7174
7238
  async function main() {
7175
7239
  const server = createWalkerOSMcpServer({
7176
- version: "4.8.2",
7240
+ version: "4.8.3-next-1793115089237",
7177
7241
  runtime: createLocalRuntime()
7178
7242
  });
7179
7243
  const transport = new StdioServerTransport();
@@ -7184,7 +7248,7 @@ main().catch(async (error) => {
7184
7248
  try {
7185
7249
  const emitter = await createMcpEmitter({
7186
7250
  clientInfo: void 0,
7187
- packageVersion: "4.8.2"
7251
+ packageVersion: "4.8.3-next-1793115089237"
7188
7252
  });
7189
7253
  await emitter.emitError("startup");
7190
7254
  } catch {