@walkeros/mcp 4.7.2 → 4.8.0-next-1791441510508
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 +9 -2
- package/dist/index.js +41 -18
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +43 -20
- package/dist/stdio.js.map +1 -1
- package/package.json +4 -4
- package/src/surface.json +8 -3
package/dist/index.d.ts
CHANGED
|
@@ -326,7 +326,7 @@ interface FrameLeanWire {
|
|
|
326
326
|
extends: string | null;
|
|
327
327
|
source: FrameSourceWire | null;
|
|
328
328
|
origin: 'drawn' | 'imported' | 'observed';
|
|
329
|
-
flowId: string
|
|
329
|
+
flowId: string;
|
|
330
330
|
screenshot: FrameScreenshotWire | null;
|
|
331
331
|
version: number;
|
|
332
332
|
createdAt: string;
|
|
@@ -507,13 +507,16 @@ interface ToolClient {
|
|
|
507
507
|
}): Promise<ListKnowledgeWire>;
|
|
508
508
|
listFrames(options: {
|
|
509
509
|
projectId: string;
|
|
510
|
+
flowId: string;
|
|
510
511
|
}): Promise<FrameLeanListWire>;
|
|
511
512
|
listPageFrames(options: {
|
|
512
513
|
projectId: string;
|
|
514
|
+
flowId: string;
|
|
513
515
|
pageKey: string;
|
|
514
516
|
}): Promise<FrameListWire>;
|
|
515
517
|
getFrame(options: {
|
|
516
518
|
projectId: string;
|
|
519
|
+
flowId: string;
|
|
517
520
|
frameId: string;
|
|
518
521
|
}): Promise<FrameWire>;
|
|
519
522
|
requestDeviceCode(): Promise<DeviceAuthorization>;
|
|
@@ -909,13 +912,16 @@ declare class HttpToolClient implements ToolClient {
|
|
|
909
912
|
}): Promise<ListKnowledgeWire>;
|
|
910
913
|
listFrames(options: {
|
|
911
914
|
projectId: string;
|
|
915
|
+
flowId: string;
|
|
912
916
|
}): Promise<FrameLeanListWire>;
|
|
913
917
|
listPageFrames(options: {
|
|
914
918
|
projectId: string;
|
|
919
|
+
flowId: string;
|
|
915
920
|
pageKey: string;
|
|
916
921
|
}): Promise<FrameListWire>;
|
|
917
922
|
getFrame(options: {
|
|
918
923
|
projectId: string;
|
|
924
|
+
flowId: string;
|
|
919
925
|
frameId: string;
|
|
920
926
|
}): Promise<FrameWire>;
|
|
921
927
|
requestDeviceCode(): Promise<DeviceAuthorization>;
|
|
@@ -1132,6 +1138,7 @@ declare const FRAME_MANAGE_INPUT_SCHEMA: {
|
|
|
1132
1138
|
list: "list";
|
|
1133
1139
|
}>;
|
|
1134
1140
|
projectId: z.ZodOptional<z.ZodString>;
|
|
1141
|
+
flowId: z.ZodOptional<z.ZodString>;
|
|
1135
1142
|
pageKey: z.ZodOptional<z.ZodString>;
|
|
1136
1143
|
frameId: z.ZodOptional<z.ZodString>;
|
|
1137
1144
|
};
|
|
@@ -1142,7 +1149,7 @@ declare const FRAME_MANAGE_INPUT_SCHEMA: {
|
|
|
1142
1149
|
*/
|
|
1143
1150
|
declare const FRAME_HINT_OPEN_PAGE_OR_GET = "Use action \"page\" with a pageKey (a frame\u2019s source.key) to read a page with marks, or action \"get\" with a frameId.";
|
|
1144
1151
|
declare const FRAME_HINT_NAMES_ARE_DOCUMENTATION = "Frame names are documentation; the marks inside a frame carry the meaning.";
|
|
1145
|
-
declare const FRAME_HINT_NONE_YET = "This
|
|
1152
|
+
declare const FRAME_HINT_NONE_YET = "This flow has no frames yet. Frames are drawn in Tag Mode or the app, not through this tool.";
|
|
1146
1153
|
declare const FRAME_HINT_MARK_SPACE = "Tag geometry is fractional: a rect is 0..1 of its frame, and an at is 0..1 of its parent tag\u2019s box, or of the frame for a root tag; a child frame sits inside its parent through placements[].rect.";
|
|
1147
1154
|
declare const FRAME_HINT_READ_KNOWLEDGE = "Use hub_manage action \"knowledge\" with frameId (and markId) to read what people wrote here. A markId is a tag id from these marks, and a tag\u2019s threadRef is the id of its thread entry there.";
|
|
1148
1155
|
declare const FRAME_HINT_NONE_ON_PAGE = "No frames on this page. Check the pageKey against the source.key values from action \"list\".";
|
package/dist/index.js
CHANGED
|
@@ -502,13 +502,17 @@ var PROJECT_MANAGE_REQUIREMENTS = {
|
|
|
502
502
|
create: { required: ["name"] }
|
|
503
503
|
};
|
|
504
504
|
var FRAME_MANAGE_REQUIREMENTS = {
|
|
505
|
+
list: {
|
|
506
|
+
required: ["flowId"],
|
|
507
|
+
hint: 'Use flow_manage action "list" to find the flow the frames belong to.'
|
|
508
|
+
},
|
|
505
509
|
page: {
|
|
506
|
-
required: ["pageKey"],
|
|
507
|
-
hint: 'Use action "list" to see the source keys of
|
|
510
|
+
required: ["flowId", "pageKey"],
|
|
511
|
+
hint: 'Use flow_manage action "list" to find the flow, and action "list" to see the source keys of its frames.'
|
|
508
512
|
},
|
|
509
513
|
get: {
|
|
510
|
-
required: ["frameId"],
|
|
511
|
-
hint: 'Use action "list" or "page" to find a frameId.'
|
|
514
|
+
required: ["flowId", "frameId"],
|
|
515
|
+
hint: 'Use flow_manage action "list" to find the flow, and action "list" or "page" to find a frameId.'
|
|
512
516
|
}
|
|
513
517
|
};
|
|
514
518
|
|
|
@@ -794,7 +798,7 @@ function safeDetail(flow) {
|
|
|
794
798
|
};
|
|
795
799
|
}
|
|
796
800
|
var TITLE3 = "Flow Management";
|
|
797
|
-
var DESCRIPTION3 = "Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows, or create/inspect/delete preview bundles and mint activation grants (preview_regrant) for testing flow changes on live sites.";
|
|
801
|
+
var DESCRIPTION3 = "Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows (deleting a flow deletes its frames too), or create/inspect/delete preview bundles and mint activation grants (preview_regrant) for testing flow changes on live sites.";
|
|
798
802
|
var inputSchema3 = {
|
|
799
803
|
action: z4.enum([
|
|
800
804
|
"list",
|
|
@@ -2680,14 +2684,17 @@ import { mcpResult as mcpResult9, mcpError as mcpError10 } from "@walkeros/core"
|
|
|
2680
2684
|
var FRAME_ID_PATTERN2 = /^frm_[A-Za-z0-9_-]{21}$/;
|
|
2681
2685
|
var MAX_PAGE_KEY_CHARS = 1024;
|
|
2682
2686
|
var TITLE9 = "Frames";
|
|
2683
|
-
var FRAME_MANAGE_DESCRIPTION = 'Read the frames of a measurement plan: named rectangles with marks inside them, drawn in Tag Mode or in the app. Actions: list (every frame of the
|
|
2687
|
+
var FRAME_MANAGE_DESCRIPTION = 'Read the frames of a measurement plan: named rectangles with marks inside them, drawn in Tag Mode or in the app. Frames belong to a flow: every action takes the flowId of the flow they live in; use flow_manage action "list" to find one. Actions: list (every frame of the flow, without marks), page (the flow\u2019s frames on one page at any depth, with marks), get (one frame with its marks). Read-only: frames are drawn and edited in Tag Mode or the app, never here. A frame name is documentation; the marks inside it carry the meaning. A frame that extends another stores only what it adds, so its tags may carry only the fields they change. Marks are { tags, note }: tags is one flat list of tags, each with an id, a kind such as entity, property or action, a name, and a parentId naming the tag it sits under; note is the frame\u2019s own description and thread. Use hub_manage action "knowledge" with a frameId or markId to read what people wrote on a frame. A markId is a tag id: a tag\u2019s id, parentId and threadRef come back literal when they have the shape the app mints, so they can be passed straight back; every other string value in the marks is wrapped as data, and so is an object key that is not a plain identifier.';
|
|
2684
2688
|
var FRAME_MANAGE_INPUT_SCHEMA = {
|
|
2685
2689
|
action: z10.enum(["list", "page", "get"]).describe(
|
|
2686
|
-
"list the
|
|
2690
|
+
"list the flow\u2019s frames, read one page with marks, or read one frame"
|
|
2687
2691
|
),
|
|
2688
2692
|
projectId: z10.string().optional().describe(
|
|
2689
2693
|
"Project ID. Optional: falls back to the default project when omitted."
|
|
2690
2694
|
),
|
|
2695
|
+
flowId: z10.string().optional().describe(
|
|
2696
|
+
'Flow ID (flow_...). Required for list, page and get: frames belong to a flow. Use flow_manage action "list" to find one.'
|
|
2697
|
+
),
|
|
2691
2698
|
pageKey: z10.string().min(1).max(MAX_PAGE_KEY_CHARS).optional().describe(
|
|
2692
2699
|
"The page as its frames address it (the `source.key` of a page frame, usually the page URL without query). Required for page."
|
|
2693
2700
|
),
|
|
@@ -2703,12 +2710,23 @@ var annotations9 = {
|
|
|
2703
2710
|
};
|
|
2704
2711
|
var FRAME_HINT_OPEN_PAGE_OR_GET = 'Use action "page" with a pageKey (a frame\u2019s source.key) to read a page with marks, or action "get" with a frameId.';
|
|
2705
2712
|
var FRAME_HINT_NAMES_ARE_DOCUMENTATION = "Frame names are documentation; the marks inside a frame carry the meaning.";
|
|
2706
|
-
var FRAME_HINT_NONE_YET = "This
|
|
2713
|
+
var FRAME_HINT_NONE_YET = "This flow has no frames yet. Frames are drawn in Tag Mode or the app, not through this tool.";
|
|
2707
2714
|
var FRAME_HINT_MARK_SPACE = "Tag geometry is fractional: a rect is 0..1 of its frame, and an at is 0..1 of its parent tag\u2019s box, or of the frame for a root tag; a child frame sits inside its parent through placements[].rect.";
|
|
2708
2715
|
var FRAME_HINT_READ_KNOWLEDGE = 'Use hub_manage action "knowledge" with frameId (and markId) to read what people wrote here. A markId is a tag id from these marks, and a tag\u2019s threadRef is the id of its thread entry there.';
|
|
2709
2716
|
var FRAME_HINT_NONE_ON_PAGE = 'No frames on this page. Check the pageKey against the source.key values from action "list".';
|
|
2710
2717
|
var FRAME_HINT_EXTENDS_BASE = "This frame extends another and stores only what it adds; read the base frame (extends) for the rest.";
|
|
2711
2718
|
var FRAME_NOT_FOUND_HINT = 'Use action "list" or "page" to find frame ids.';
|
|
2719
|
+
var FRAME_FLOW_NOT_FOUND_HINT = 'Use flow_manage action "list" to find a live flow of the project.';
|
|
2720
|
+
function frameRefusalHint(error) {
|
|
2721
|
+
switch (codeOf(error)) {
|
|
2722
|
+
case "FLOW_NOT_FOUND":
|
|
2723
|
+
return FRAME_FLOW_NOT_FOUND_HINT;
|
|
2724
|
+
case "FRAME_NOT_FOUND":
|
|
2725
|
+
return FRAME_NOT_FOUND_HINT;
|
|
2726
|
+
default:
|
|
2727
|
+
return errorHint(error, "frames", FRAME_NOT_FOUND_HINT);
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2712
2730
|
var keepSourceAddress = (key) => key === "kind" || key === "key";
|
|
2713
2731
|
function serializeLean(frame) {
|
|
2714
2732
|
return {
|
|
@@ -2718,7 +2736,6 @@ function serializeLean(frame) {
|
|
|
2718
2736
|
extends: frame.extends,
|
|
2719
2737
|
source: redactNestedStrings(frame.source, { skip: keepSourceAddress }),
|
|
2720
2738
|
origin: frame.origin,
|
|
2721
|
-
flowId: frame.flowId,
|
|
2722
2739
|
placements: frame.placements.map((placement) => ({
|
|
2723
2740
|
id: placement.id,
|
|
2724
2741
|
rect: placement.rect
|
|
@@ -2807,11 +2824,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
2807
2824
|
if (!parsed.success) {
|
|
2808
2825
|
return mcpError10(new Error(inputIssuesMessage(parsed.error)));
|
|
2809
2826
|
}
|
|
2810
|
-
const { action, projectId, pageKey, frameId } = parsed.data;
|
|
2827
|
+
const { action, projectId, flowId, pageKey, frameId } = parsed.data;
|
|
2811
2828
|
const validationError = validateActionInput(
|
|
2812
2829
|
"frame_manage",
|
|
2813
2830
|
action,
|
|
2814
|
-
{ pageKey, frameId },
|
|
2831
|
+
{ flowId, pageKey, frameId },
|
|
2815
2832
|
FRAME_MANAGE_REQUIREMENTS
|
|
2816
2833
|
);
|
|
2817
2834
|
if (validationError) return mcpError10(new Error(validationError));
|
|
@@ -2822,8 +2839,10 @@ async function frameManageHandler(client, rawInput) {
|
|
|
2822
2839
|
}
|
|
2823
2840
|
switch (action) {
|
|
2824
2841
|
case "list": {
|
|
2842
|
+
assertParam(flowId, "flowId", "list");
|
|
2825
2843
|
const { frames } = await client.listFrames({
|
|
2826
|
-
projectId: resolvedProjectId
|
|
2844
|
+
projectId: resolvedProjectId,
|
|
2845
|
+
flowId
|
|
2827
2846
|
});
|
|
2828
2847
|
return mcpResult9(
|
|
2829
2848
|
{ frames: frames.map(serializeLean) },
|
|
@@ -2836,9 +2855,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
2836
2855
|
);
|
|
2837
2856
|
}
|
|
2838
2857
|
case "page": {
|
|
2858
|
+
assertParam(flowId, "flowId", "page");
|
|
2839
2859
|
assertParam(pageKey, "pageKey", "page");
|
|
2840
2860
|
const { frames } = await client.listPageFrames({
|
|
2841
2861
|
projectId: resolvedProjectId,
|
|
2862
|
+
flowId,
|
|
2842
2863
|
pageKey
|
|
2843
2864
|
});
|
|
2844
2865
|
return mcpResult9(
|
|
@@ -2849,9 +2870,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
2849
2870
|
);
|
|
2850
2871
|
}
|
|
2851
2872
|
case "get": {
|
|
2873
|
+
assertParam(flowId, "flowId", "get");
|
|
2852
2874
|
assertParam(frameId, "frameId", "get");
|
|
2853
2875
|
const frame = await client.getFrame({
|
|
2854
2876
|
projectId: resolvedProjectId,
|
|
2877
|
+
flowId,
|
|
2855
2878
|
frameId
|
|
2856
2879
|
});
|
|
2857
2880
|
return mcpResult9(
|
|
@@ -2863,7 +2886,7 @@ async function frameManageHandler(client, rawInput) {
|
|
|
2863
2886
|
}
|
|
2864
2887
|
}
|
|
2865
2888
|
} catch (error) {
|
|
2866
|
-
return mcpError10(error,
|
|
2889
|
+
return mcpError10(error, frameRefusalHint(error));
|
|
2867
2890
|
}
|
|
2868
2891
|
}
|
|
2869
2892
|
function createFrameManageToolSpec(client) {
|
|
@@ -2941,7 +2964,7 @@ async function feedbackHandlerBody(client, input) {
|
|
|
2941
2964
|
const isAnonymous = explicitAnonymous ?? anonymous ?? true;
|
|
2942
2965
|
await client.submitFeedback(text, {
|
|
2943
2966
|
anonymous: isAnonymous,
|
|
2944
|
-
version: "4.
|
|
2967
|
+
version: "4.8.0-next-1791441510508"
|
|
2945
2968
|
});
|
|
2946
2969
|
return mcpResult10({ ok: true });
|
|
2947
2970
|
} catch (error) {
|
|
@@ -3733,7 +3756,7 @@ var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
|
|
|
3733
3756
|
var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
|
|
3734
3757
|
var WALKEROS_JSON_PATH = "dist/walkerOS.json";
|
|
3735
3758
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
3736
|
-
var CLIENT_HEADER = "walkeros-mcp/4.
|
|
3759
|
+
var CLIENT_HEADER = "walkeros-mcp/4.8.0-next-1791441510508";
|
|
3737
3760
|
function getPackageBaseUrl() {
|
|
3738
3761
|
return process.env.WALKEROS_APP_URL || void 0;
|
|
3739
3762
|
}
|
|
@@ -4991,7 +5014,7 @@ var SERVER_INSTRUCTIONS = `walkerOS is an open-source, privacy-first event data
|
|
|
4991
5014
|
14. \`flow_manage({ action: "preview_regrant", flowId: "...", previewId: "...", origins: [...] })\` - mint an activation link; minted while the flow is observed, it pairs with that Observe session automatically, so the previewed page streams into the same feed
|
|
4992
5015
|
15. \`observe_journeys({ flowId: "..." })\` - read what arrived; it is the only read, and it never judges whether events are correct
|
|
4993
5016
|
16. \`hub_manage({ action: "releases", flowId: "..." })\` - read what changed across releases and why; \`release_get\` carries a server-computed diff, \`rationale_set\` records why
|
|
4994
|
-
17. \`frame_manage({ action: "page", pageKey: "..." })\` - read the frames of a page with their marks; read-only, edited in Tag Mode or the app
|
|
5017
|
+
17. \`frame_manage({ action: "page", flowId: "...", pageKey: "..." })\` - read the frames of a flow on one page with their marks; read-only, edited in Tag Mode or the app
|
|
4995
5018
|
|
|
4996
5019
|
## Architecture: Source \u2192 Collector \u2192 Destination(s)
|
|
4997
5020
|
|
|
@@ -5411,7 +5434,7 @@ var HttpToolClient = class {
|
|
|
5411
5434
|
async checkContract() {
|
|
5412
5435
|
return compareContract({
|
|
5413
5436
|
baseUrl: this.appBaseUrl(),
|
|
5414
|
-
client: { type: "mcp", version: "4.
|
|
5437
|
+
client: { type: "mcp", version: "4.8.0-next-1791441510508" }
|
|
5415
5438
|
});
|
|
5416
5439
|
}
|
|
5417
5440
|
/** The live public OpenAPI document of `appBaseUrl()`, without a credential. */
|
|
@@ -5687,7 +5710,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5687
5710
|
{
|
|
5688
5711
|
name: "flow_manage",
|
|
5689
5712
|
title: "Flow Management",
|
|
5690
|
-
description: "Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows, or create/inspect/delete preview bundles for testing flow changes on live sites.",
|
|
5713
|
+
description: "Manage walkerOS flows and their previews. List/get/create/update/delete/duplicate flows (deleting a flow deletes its frames too), or create/inspect/delete preview bundles for testing flow changes on live sites.",
|
|
5691
5714
|
inputSchema: {
|
|
5692
5715
|
action: z21.enum([
|
|
5693
5716
|
"list",
|