@walkeros/mcp 4.3.1 → 4.3.2
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 +104 -1
- package/dist/index.js +654 -269
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +367 -15
- package/dist/stdio.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,71 @@ interface JourneysResult {
|
|
|
35
35
|
journeys: Journey[];
|
|
36
36
|
gaps: JourneyGap[];
|
|
37
37
|
}
|
|
38
|
+
/** Observation verbosity a session's container is provisioned with. */
|
|
39
|
+
type ObserveLevel = 'off' | 'standard' | 'trace';
|
|
40
|
+
/**
|
|
41
|
+
* The session's web part. Present once a preview arm is attached; null while
|
|
42
|
+
* the window has no web half. `credential` and the server `env` trio are
|
|
43
|
+
* connect secrets: the tool layer reads the part for arm presence and never
|
|
44
|
+
* surfaces them.
|
|
45
|
+
*/
|
|
46
|
+
interface ObserveSessionWebPart {
|
|
47
|
+
activationUrl: string | null;
|
|
48
|
+
credential: string;
|
|
49
|
+
previewEnabled: boolean;
|
|
50
|
+
bundleUrl: string;
|
|
51
|
+
/** Observer both arms post to, in the field name a `config.observe` declares. */
|
|
52
|
+
url?: string;
|
|
53
|
+
/** Project binding the collector cross-checks an arriving credential against. */
|
|
54
|
+
binding?: string;
|
|
55
|
+
}
|
|
56
|
+
/** The session's container part. Present once a container arm is provisioned. */
|
|
57
|
+
interface ObserveSessionServerPart {
|
|
58
|
+
endpoint: string | null;
|
|
59
|
+
env: {
|
|
60
|
+
WALKEROS_OBSERVER_URL: string;
|
|
61
|
+
WALKEROS_DEPLOYMENT_ID: string;
|
|
62
|
+
WALKEROS_INGEST_TOKEN: string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* One Observe session: a time-boxed window on a flow that runtimes attach to
|
|
67
|
+
* as arms. `observedFlowName`/`serverFlowName` name the settings each arm runs;
|
|
68
|
+
* `web`/`server` being non-null is what makes an arm attached. Mirrors the
|
|
69
|
+
* app's session envelope.
|
|
70
|
+
*/
|
|
71
|
+
interface ObserveSessionResult {
|
|
72
|
+
id: string;
|
|
73
|
+
projectId: string;
|
|
74
|
+
flowId: string;
|
|
75
|
+
status: string;
|
|
76
|
+
errorMessage: string | null;
|
|
77
|
+
observedFlowName: string | null;
|
|
78
|
+
serverFlowName: string | null;
|
|
79
|
+
web: ObserveSessionWebPart | null;
|
|
80
|
+
server: ObserveSessionServerPart | null;
|
|
81
|
+
expiresAt: string;
|
|
82
|
+
recordsReceived: number;
|
|
83
|
+
createdAt: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Start a session on one flow. `settingsName` is the single knob the window is
|
|
87
|
+
* opened on: the flow's topology under that name decides which arms the app
|
|
88
|
+
* provisions, so the tool layer translates its arms input into this one field.
|
|
89
|
+
*/
|
|
90
|
+
interface StartObserveSessionOptions {
|
|
91
|
+
projectId: string;
|
|
92
|
+
flowId: string;
|
|
93
|
+
settingsName: string;
|
|
94
|
+
origins?: string[];
|
|
95
|
+
level?: ObserveLevel;
|
|
96
|
+
replace?: boolean;
|
|
97
|
+
}
|
|
98
|
+
interface ObserveSessionRef {
|
|
99
|
+
projectId: string;
|
|
100
|
+
flowId: string;
|
|
101
|
+
sessionId: string;
|
|
102
|
+
}
|
|
38
103
|
/**
|
|
39
104
|
* Transport-agnostic client for network-reach MCP tools. The stdio build
|
|
40
105
|
* plugs in HttpToolClient (talks to the walkerOS app over HTTPS via the
|
|
@@ -129,6 +194,16 @@ interface ToolClient {
|
|
|
129
194
|
traceId?: string;
|
|
130
195
|
limit?: number;
|
|
131
196
|
}): Promise<JourneysResult>;
|
|
197
|
+
/**
|
|
198
|
+
* Observe session lifecycle. OPTIONAL as a trio: a client that cannot reach
|
|
199
|
+
* the session endpoints omits all three, and the `observe_session` handler
|
|
200
|
+
* guards on presence before calling. Reads stay with `listJourneys`, which
|
|
201
|
+
* doubles as the flow-to-live-window resolver (`observe_sessions.flow_id` is
|
|
202
|
+
* UNIQUE, so its `sessionId` IS the flow's live window).
|
|
203
|
+
*/
|
|
204
|
+
startObserveSession?(options: StartObserveSessionOptions): Promise<ObserveSessionResult>;
|
|
205
|
+
getObserveSession?(options: ObserveSessionRef): Promise<ObserveSessionResult>;
|
|
206
|
+
endObserveSession?(options: ObserveSessionRef): Promise<void>;
|
|
132
207
|
requestDeviceCode(): Promise<DeviceCodeResult>;
|
|
133
208
|
pollForToken(deviceCode: string, options?: {
|
|
134
209
|
timeoutMs?: number;
|
|
@@ -290,6 +365,15 @@ declare class HttpToolClient implements ToolClient {
|
|
|
290
365
|
traceId?: string;
|
|
291
366
|
limit?: number;
|
|
292
367
|
}): Promise<JourneysResult>;
|
|
368
|
+
/**
|
|
369
|
+
* Observe session lifecycle over the CLI's authenticated boundary. The trio
|
|
370
|
+
* routes through the same `apiFetch` as every other method here, so token
|
|
371
|
+
* resolution, base URL, and `ApiError` shaping (which `isAuthError` reads)
|
|
372
|
+
* stay identical to the rest of the client.
|
|
373
|
+
*/
|
|
374
|
+
startObserveSession(options: StartObserveSessionOptions): Promise<ObserveSessionResult>;
|
|
375
|
+
getObserveSession(options: ObserveSessionRef): Promise<ObserveSessionResult>;
|
|
376
|
+
endObserveSession(options: ObserveSessionRef): Promise<void>;
|
|
293
377
|
requestDeviceCode(): Promise<DeviceCodeResult>;
|
|
294
378
|
pollForToken(deviceCode: string, options?: {
|
|
295
379
|
timeoutMs?: number;
|
|
@@ -335,6 +419,25 @@ interface CreateStreamableHttpHandlerOptions extends WebStandardStreamableHTTPSe
|
|
|
335
419
|
*/
|
|
336
420
|
declare function createStreamableHttpHandler(server: McpServer, opts?: CreateStreamableHttpHandlerOptions): (request: Request) => Promise<Response>;
|
|
337
421
|
|
|
422
|
+
/**
|
|
423
|
+
* Exported so the hosted plane can assert parity against this exact string
|
|
424
|
+
* instead of retyping it.
|
|
425
|
+
*/
|
|
426
|
+
declare const DESCRIPTION: string;
|
|
427
|
+
/**
|
|
428
|
+
* Hints carry the verb ladder rather than the description. Module constants so
|
|
429
|
+
* the wording is one string per idea, quotable verbatim, and identical across
|
|
430
|
+
* planes. Exported so the hosted plane imports them instead of retyping them,
|
|
431
|
+
* which makes cross-plane parity a compiler concern.
|
|
432
|
+
*/
|
|
433
|
+
declare const HINT_SIMULATE_FIRST = "Simulate before preview: flow_simulate checks mapping with no browser.";
|
|
434
|
+
declare const HINT_PREVIEW_STREAMS = "Preview streams into this session: mint a link with flow_manage preview_regrant, then open it on your site.";
|
|
435
|
+
declare const HINT_READ = "Read with observe_journeys (flowId); it is the only read.";
|
|
436
|
+
declare const HINT_STOP = "End both arms with observe_session stop.";
|
|
437
|
+
declare const HINT_EMPTY_FEED = "recordsReceived is 0: nothing has reached the feed yet. Drive traffic on an attached arm.";
|
|
438
|
+
declare const HINT_ENDED = "Session ended and both arms detached. Start a new one with observe_session start.";
|
|
439
|
+
declare const HINT_NO_WINDOW = "No Observe session on this flow. Open one with observe_session start.";
|
|
440
|
+
|
|
338
441
|
/**
|
|
339
442
|
* Wraps a user-writable string in `<user_data>…</user_data>` so the chat
|
|
340
443
|
* assistant treats it as data, never as instructions. Inner `</user_data>`
|
|
@@ -418,4 +521,4 @@ declare module '@walkeros/core' {
|
|
|
418
521
|
*/
|
|
419
522
|
declare function createToolHandlers(client: ToolClient, packageVersion?: string): Record<string, ToolSpec>;
|
|
420
523
|
|
|
421
|
-
export { type CreateServerOptions, type CreateStreamableHttpHandlerOptions, type FlowCanvasPayload, type FlowCanvasToolResult, HttpToolClient, type JourneysResult, type Logger, type RedactOptions, type SuggestionTile, TOOL_DEFINITIONS, type ToolAnnotations, type ToolClient, type ToolDefinition, type ToolSpec, createStreamableHttpHandler, createToolHandlers, createWalkerOSMcpServer, flowCanvasResult, isFlowCanvasResult, redactNestedStrings, wrapUserData };
|
|
524
|
+
export { type CreateServerOptions, type CreateStreamableHttpHandlerOptions, type FlowCanvasPayload, type FlowCanvasToolResult, HINT_EMPTY_FEED, HINT_ENDED, HINT_NO_WINDOW, HINT_PREVIEW_STREAMS, HINT_READ, HINT_SIMULATE_FIRST, HINT_STOP, HttpToolClient, type JourneysResult, type Logger, DESCRIPTION as OBSERVE_SESSION_DESCRIPTION, type RedactOptions, type SuggestionTile, TOOL_DEFINITIONS, type ToolAnnotations, type ToolClient, type ToolDefinition, type ToolSpec, createStreamableHttpHandler, createToolHandlers, createWalkerOSMcpServer, flowCanvasResult, isFlowCanvasResult, redactNestedStrings, wrapUserData };
|