@walkeros/mcp 4.7.0-next-1790722899482 → 4.7.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ListFlowsOptions, ListPreviewsOptions, GetPreviewOptions, CreatePreviewOptions, DeletePreviewOptions, ListSecretsOptions, CreateSecretOptions, UpdateSecretOptions, DeleteSecretOptions, DeployOptions, ListDeploymentsOptions, DeviceAuthorization, DeviceLoginResult, FeedbackOptions, BundleStats, PushResult } from '@walkeros/cli';
2
- import { Journey, JourneyGap, JourneyUnattributed, Ingest, WalkerOS, Flow, Simulation } from '@walkeros/core';
2
+ import { Journey, JourneyGap, JourneyUnattributed, Flow, Ingest, WalkerOS, Simulation } from '@walkeros/core';
3
3
  import { ZodRawShape, z } from 'zod';
4
4
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
5
5
  export { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
@@ -614,15 +614,28 @@ interface FlowRuntime {
614
614
  * path or URL is refused with a `RuntimeRefusal`.
615
615
  */
616
616
  load(input: string): Promise<unknown>;
617
+ /**
618
+ * The directory local `path` packages of a loaded input resolve against:
619
+ * the input file's directory. Absent on a runtime without a filesystem,
620
+ * where such packages stay a reported skip.
621
+ */
622
+ baseDir?(input: string): string | undefined;
617
623
  /** Compile a flow. Absent on a runtime that must not build in its process. */
618
624
  bundle?(input: string, opts: BundleOptions): Promise<BundleStats | void>;
619
625
  /** Build and run one step of a flow. Absent where that must not happen. */
620
626
  simulate?(input: string, opts: SimulateOptions): Promise<Simulation.Result>;
621
627
  /**
622
628
  * The values of the secrets a flow config references (`$secret.NAME`),
623
- * masked wherever a simulation result egresses. Absent with `simulate`.
629
+ * masked wherever a simulation or push result egresses. Read by the tools
630
+ * only on a runtime without `loadRun`; a read that fails stops the run.
624
631
  */
625
632
  knownSecrets?(input: string): Promise<string[]>;
633
+ /**
634
+ * Read a push or simulate input once: the config and the values of the
635
+ * secrets it references. A prebuilt bundle yields no config. A read that
636
+ * fails rejects. Absent with `simulate` and `push`.
637
+ */
638
+ loadRun?(input: string): Promise<LoadedRun>;
626
639
  /** Build and run a flow against real destinations. Absent where forbidden. */
627
640
  push?(input: string, event: Record<string, unknown>, opts: PushOptions): Promise<PushResult>;
628
641
  }
@@ -637,6 +650,8 @@ interface SimulateOptions {
637
650
  stepId: string;
638
651
  event: unknown;
639
652
  flow?: string;
653
+ /** The config from `loadRun`: the runtime does not read the input again. */
654
+ config?: Flow.Json;
640
655
  /**
641
656
  * Transformer, collector and destination steps: pipeline context the step
642
657
  * reads via `ctx.ingest`. Source steps ignore it.
@@ -659,9 +674,16 @@ interface SimulateOptions {
659
674
  */
660
675
  command?: Flow.StepCommand;
661
676
  }
677
+ /** A push or simulate input as read once by `loadRun`. */
678
+ interface LoadedRun {
679
+ config?: Flow.Json;
680
+ knownSecrets: string[];
681
+ }
662
682
  interface PushOptions {
663
683
  flow?: string;
664
684
  platform?: 'web' | 'server';
685
+ /** The config from `loadRun`: the runtime does not read the input again. */
686
+ config?: Flow.Json;
665
687
  }
666
688
  /**
667
689
  * Thrown by a runtime when it refuses an input on principle rather than on a