@walkeros/mcp 4.7.0 → 4.7.1

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/README.md CHANGED
@@ -95,17 +95,17 @@ The server registers 19 tools.
95
95
 
96
96
  ### Local, no account
97
97
 
98
- | Tool | Description |
99
- | ---------------- | ---------------------------------------------------------------------------------- |
100
- | `flow_load` | Load a flow from a file path, URL, inline JSON, or flow ID, or create an empty one |
101
- | `flow_validate` | Validate an event, flow config, mapping rule, or data contract |
102
- | `flow_simulate` | Run an event through a flow with mocked vendor calls and inspect each step |
103
- | `flow_bundle` | Compile a flow into a tree-shaken, deployable JavaScript bundle |
104
- | `flow_push` | Push a real event through a flow to real destinations, making real API calls |
105
- | `flow_examples` | List the step examples in a flow, the fixtures simulation can replay |
106
- | `package_search` | Find packages by name, type, or platform. The entry point for package discovery |
107
- | `package_get` | Read one package's schemas, configuration hints, and examples by exact name |
108
- | `diagnostics` | Report MCP and CLI versions, app URL, backend, and whether the app is reachable |
98
+ | Tool | Description |
99
+ | ---------------- | ------------------------------------------------------------------------------------ |
100
+ | `flow_load` | Load a flow from a file path, URL, inline JSON, or flow ID, or create an empty one |
101
+ | `flow_validate` | Validate an event, flow config, mapping rule, or data contract |
102
+ | `flow_simulate` | Run an event through a flow with mocked vendor calls and inspect each step |
103
+ | `flow_bundle` | Compile a flow into a tree-shaken, deployable JavaScript bundle |
104
+ | `flow_push` | Push a real event through a flow to real destinations, making real API calls |
105
+ | `flow_examples` | List the step examples in a flow, the fixtures simulation can replay |
106
+ | `package_search` | Find packages by name, type, or platform. The entry point for package discovery |
107
+ | `package_get` | Read one package's schemas, configuration hints, and examples by exact name |
108
+ | `diagnostics` | Report MCP and CLI versions, app URL, app reachability, and the API contract verdict |
109
109
 
110
110
  ### walkerOS cloud
111
111
 
@@ -132,7 +132,7 @@ The server registers 19 tools.
132
132
  | `walkeros://reference/consent` | The consent model at destination, rule, and field level |
133
133
  | `walkeros://reference/variables` | Variable patterns: `$var`, `$env`, `$secret`, `$code`, `$store` |
134
134
  | `walkeros://reference/contract` | Event schemas, wildcards, and inheritance |
135
- | `walkeros://reference/openapi` | OpenAPI 3.1 specification for the walkerOS API |
135
+ | `walkeros://reference/openapi` | The live OpenAPI 3.1 document of the app this server talks to |
136
136
  | `walkeros://reference/packages` | The full package catalog |
137
137
  | `walkeros://schema/{packageName}` | JSON schema for one package |
138
138
 
@@ -193,6 +193,12 @@ AI SDK, call `createToolHandlers(client, version, runtime)` or import
193
193
  `TOOL_DEFINITIONS` and supply your own `ToolClient`. The stdio binary stays
194
194
  available as `@walkeros/mcp/stdio` and the `walkeros-mcp` bin entry.
195
195
 
196
+ A `ToolClient` may implement `checkContract()` and `openapiDocument()`. The
197
+ `diagnostics` tool reports the first as its contract verdict, `unknown` when it
198
+ is absent; the `walkeros://reference/openapi` resource serves the second.
199
+ `HttpToolClient` implements both against the app it talks to. The tool roster
200
+ ships as `@walkeros/mcp/surface.json`.
201
+
196
202
  ## Documentation
197
203
 
198
204
  Full parameter tables, workflows, and examples live in the docs:
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ListFlowsOptions, ListPreviewsOptions, GetPreviewOptions, CreatePreviewOptions, DeletePreviewOptions, ListSecretsOptions, CreateSecretOptions, UpdateSecretOptions, DeleteSecretOptions, DeployOptions, ListDeploymentsOptions, DeviceAuthorization, DeviceLoginResult, FeedbackOptions, BundleStats, PushResult } from '@walkeros/cli';
1
+ import { ListFlowsOptions, ListPreviewsOptions, GetPreviewOptions, CreatePreviewOptions, DeletePreviewOptions, ListSecretsOptions, CreateSecretOptions, UpdateSecretOptions, DeleteSecretOptions, DeployOptions, ListDeploymentsOptions, DeviceAuthorization, DeviceLoginResult, ContractComparison, FeedbackOptions, BundleStats, PushResult } from '@walkeros/cli';
2
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';
@@ -81,12 +81,18 @@ interface ObserveSessionResult {
81
81
  flowId: string;
82
82
  status: string;
83
83
  errorMessage: string | null;
84
+ /** The flow config the session was opened on, as the app snapshotted it. */
85
+ configSnapshot: Record<string, unknown>;
84
86
  observedFlowName: string | null;
85
87
  serverFlowName: string | null;
88
+ /** Legacy mirror of `server.endpoint`, kept for published readers; read `server.endpoint`. */
89
+ serverEndpoint: string | null;
86
90
  web: ObserveSessionWebPart | null;
87
91
  server: ObserveSessionServerPart | null;
88
92
  expiresAt: string;
89
93
  recordsReceived: number;
94
+ /** Id of the user who opened the session. */
95
+ createdBy: string;
90
96
  createdAt: string;
91
97
  }
92
98
  /**
@@ -545,7 +551,21 @@ interface ToolClient {
545
551
  reachable: boolean;
546
552
  status?: string;
547
553
  version?: string;
554
+ error?: string;
548
555
  }>;
556
+ /**
557
+ * The API contract verdict for this door against the app it talks to
558
+ * (`appBaseUrl()`). A door that calls the app over HTTP compares per
559
+ * operation; a door served inside the app answers `in-process`. Optional:
560
+ * without it, diagnostics reports `unknown`.
561
+ */
562
+ checkContract?(): Promise<ContractComparison>;
563
+ /**
564
+ * The live OpenAPI document of the app this door talks to, served as the
565
+ * `walkeros://reference/openapi` resource. Rejects when it cannot be read.
566
+ * Optional: without it, the resource states that it is unavailable.
567
+ */
568
+ openapiDocument?(): Promise<unknown>;
549
569
  submitFeedback(text: string, options?: FeedbackOptions): Promise<void>;
550
570
  getFeedbackPreference(): boolean | undefined;
551
571
  setFeedbackPreference(anonymous: boolean): void;
@@ -898,16 +918,24 @@ declare class HttpToolClient implements ToolClient {
898
918
  */
899
919
  appBaseUrl(): string;
900
920
  /**
901
- * Unauthenticated reachability probe of the app's PUBLIC `/api/health`
902
- * route. Uses a plain `fetch` (no `createApiClient`, whose every request
903
- * rejects without a credential) so diagnostics works logged-out. Resolves
904
- * `{ reachable: false }` only on a real network/timeout failure.
921
+ * Unauthenticated reachability probe of the app's PUBLIC health route
922
+ * (`GET /api/health`) at `appBaseUrl()`, through the CLI's `fetchHealth`.
923
+ * Sends no credential, so diagnostics works logged-out. Resolves
924
+ * `{ reachable: false, error }` only on a real network/timeout failure.
905
925
  */
906
926
  checkHealth(): Promise<{
907
927
  reachable: boolean;
908
928
  status?: string;
909
929
  version?: string;
930
+ error?: string;
910
931
  }>;
932
+ /**
933
+ * The contract verdict for this MCP against `appBaseUrl()`, per operation,
934
+ * naming `@walkeros/mcp` as the client.
935
+ */
936
+ checkContract(): Promise<ContractComparison>;
937
+ /** The live public OpenAPI document of `appBaseUrl()`, without a credential. */
938
+ openapiDocument(): Promise<unknown>;
911
939
  submitFeedback(text: string, options?: FeedbackOptions): Promise<void>;
912
940
  getFeedbackPreference(): boolean | undefined;
913
941
  setFeedbackPreference(anonymous: boolean): void;