@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/stdio.js
CHANGED
|
@@ -826,7 +826,7 @@ var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
|
|
|
826
826
|
var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
|
|
827
827
|
var WALKEROS_JSON_PATH = "dist/walkerOS.json";
|
|
828
828
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
829
|
-
var CLIENT_HEADER = "walkeros-mcp/4.
|
|
829
|
+
var CLIENT_HEADER = "walkeros-mcp/4.8.0-next-1791441510508";
|
|
830
830
|
function getPackageBaseUrl() {
|
|
831
831
|
return process.env.WALKEROS_APP_URL || void 0;
|
|
832
832
|
}
|
|
@@ -1680,7 +1680,7 @@ async function feedbackHandlerBody(client, input) {
|
|
|
1680
1680
|
const isAnonymous = explicitAnonymous ?? anonymous ?? true;
|
|
1681
1681
|
await client.submitFeedback(text, {
|
|
1682
1682
|
anonymous: isAnonymous,
|
|
1683
|
-
version: "4.
|
|
1683
|
+
version: "4.8.0-next-1791441510508"
|
|
1684
1684
|
});
|
|
1685
1685
|
return mcpResult8({ ok: true });
|
|
1686
1686
|
} catch (error) {
|
|
@@ -2094,13 +2094,17 @@ var PROJECT_MANAGE_REQUIREMENTS = {
|
|
|
2094
2094
|
create: { required: ["name"] }
|
|
2095
2095
|
};
|
|
2096
2096
|
var FRAME_MANAGE_REQUIREMENTS = {
|
|
2097
|
+
list: {
|
|
2098
|
+
required: ["flowId"],
|
|
2099
|
+
hint: 'Use flow_manage action "list" to find the flow the frames belong to.'
|
|
2100
|
+
},
|
|
2097
2101
|
page: {
|
|
2098
|
-
required: ["pageKey"],
|
|
2099
|
-
hint: 'Use action "list" to see the source keys of
|
|
2102
|
+
required: ["flowId", "pageKey"],
|
|
2103
|
+
hint: 'Use flow_manage action "list" to find the flow, and action "list" to see the source keys of its frames.'
|
|
2100
2104
|
},
|
|
2101
2105
|
get: {
|
|
2102
|
-
required: ["frameId"],
|
|
2103
|
-
hint: 'Use action "list" or "page" to find a frameId.'
|
|
2106
|
+
required: ["flowId", "frameId"],
|
|
2107
|
+
hint: 'Use flow_manage action "list" to find the flow, and action "list" or "page" to find a frameId.'
|
|
2104
2108
|
}
|
|
2105
2109
|
};
|
|
2106
2110
|
|
|
@@ -2377,7 +2381,7 @@ function safeDetail(flow) {
|
|
|
2377
2381
|
};
|
|
2378
2382
|
}
|
|
2379
2383
|
var TITLE11 = "Flow Management";
|
|
2380
|
-
var DESCRIPTION10 = "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.";
|
|
2384
|
+
var DESCRIPTION10 = "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.";
|
|
2381
2385
|
var inputSchema11 = {
|
|
2382
2386
|
action: z11.enum([
|
|
2383
2387
|
"list",
|
|
@@ -4263,14 +4267,17 @@ import { mcpResult as mcpResult18, mcpError as mcpError19 } from "@walkeros/core
|
|
|
4263
4267
|
var FRAME_ID_PATTERN2 = /^frm_[A-Za-z0-9_-]{21}$/;
|
|
4264
4268
|
var MAX_PAGE_KEY_CHARS = 1024;
|
|
4265
4269
|
var TITLE17 = "Frames";
|
|
4266
|
-
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
|
|
4270
|
+
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.';
|
|
4267
4271
|
var FRAME_MANAGE_INPUT_SCHEMA = {
|
|
4268
4272
|
action: z17.enum(["list", "page", "get"]).describe(
|
|
4269
|
-
"list the
|
|
4273
|
+
"list the flow\u2019s frames, read one page with marks, or read one frame"
|
|
4270
4274
|
),
|
|
4271
4275
|
projectId: z17.string().optional().describe(
|
|
4272
4276
|
"Project ID. Optional: falls back to the default project when omitted."
|
|
4273
4277
|
),
|
|
4278
|
+
flowId: z17.string().optional().describe(
|
|
4279
|
+
'Flow ID (flow_...). Required for list, page and get: frames belong to a flow. Use flow_manage action "list" to find one.'
|
|
4280
|
+
),
|
|
4274
4281
|
pageKey: z17.string().min(1).max(MAX_PAGE_KEY_CHARS).optional().describe(
|
|
4275
4282
|
"The page as its frames address it (the `source.key` of a page frame, usually the page URL without query). Required for page."
|
|
4276
4283
|
),
|
|
@@ -4286,12 +4293,23 @@ var annotations17 = {
|
|
|
4286
4293
|
};
|
|
4287
4294
|
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.';
|
|
4288
4295
|
var FRAME_HINT_NAMES_ARE_DOCUMENTATION = "Frame names are documentation; the marks inside a frame carry the meaning.";
|
|
4289
|
-
var FRAME_HINT_NONE_YET = "This
|
|
4296
|
+
var FRAME_HINT_NONE_YET = "This flow has no frames yet. Frames are drawn in Tag Mode or the app, not through this tool.";
|
|
4290
4297
|
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.";
|
|
4291
4298
|
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.';
|
|
4292
4299
|
var FRAME_HINT_NONE_ON_PAGE = 'No frames on this page. Check the pageKey against the source.key values from action "list".';
|
|
4293
4300
|
var FRAME_HINT_EXTENDS_BASE = "This frame extends another and stores only what it adds; read the base frame (extends) for the rest.";
|
|
4294
4301
|
var FRAME_NOT_FOUND_HINT = 'Use action "list" or "page" to find frame ids.';
|
|
4302
|
+
var FRAME_FLOW_NOT_FOUND_HINT = 'Use flow_manage action "list" to find a live flow of the project.';
|
|
4303
|
+
function frameRefusalHint(error) {
|
|
4304
|
+
switch (codeOf(error)) {
|
|
4305
|
+
case "FLOW_NOT_FOUND":
|
|
4306
|
+
return FRAME_FLOW_NOT_FOUND_HINT;
|
|
4307
|
+
case "FRAME_NOT_FOUND":
|
|
4308
|
+
return FRAME_NOT_FOUND_HINT;
|
|
4309
|
+
default:
|
|
4310
|
+
return errorHint(error, "frames", FRAME_NOT_FOUND_HINT);
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4295
4313
|
var keepSourceAddress = (key) => key === "kind" || key === "key";
|
|
4296
4314
|
function serializeLean(frame) {
|
|
4297
4315
|
return {
|
|
@@ -4301,7 +4319,6 @@ function serializeLean(frame) {
|
|
|
4301
4319
|
extends: frame.extends,
|
|
4302
4320
|
source: redactNestedStrings(frame.source, { skip: keepSourceAddress }),
|
|
4303
4321
|
origin: frame.origin,
|
|
4304
|
-
flowId: frame.flowId,
|
|
4305
4322
|
placements: frame.placements.map((placement) => ({
|
|
4306
4323
|
id: placement.id,
|
|
4307
4324
|
rect: placement.rect
|
|
@@ -4390,11 +4407,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
4390
4407
|
if (!parsed.success) {
|
|
4391
4408
|
return mcpError19(new Error(inputIssuesMessage(parsed.error)));
|
|
4392
4409
|
}
|
|
4393
|
-
const { action, projectId, pageKey, frameId } = parsed.data;
|
|
4410
|
+
const { action, projectId, flowId, pageKey, frameId } = parsed.data;
|
|
4394
4411
|
const validationError = validateActionInput(
|
|
4395
4412
|
"frame_manage",
|
|
4396
4413
|
action,
|
|
4397
|
-
{ pageKey, frameId },
|
|
4414
|
+
{ flowId, pageKey, frameId },
|
|
4398
4415
|
FRAME_MANAGE_REQUIREMENTS
|
|
4399
4416
|
);
|
|
4400
4417
|
if (validationError) return mcpError19(new Error(validationError));
|
|
@@ -4405,8 +4422,10 @@ async function frameManageHandler(client, rawInput) {
|
|
|
4405
4422
|
}
|
|
4406
4423
|
switch (action) {
|
|
4407
4424
|
case "list": {
|
|
4425
|
+
assertParam(flowId, "flowId", "list");
|
|
4408
4426
|
const { frames } = await client.listFrames({
|
|
4409
|
-
projectId: resolvedProjectId
|
|
4427
|
+
projectId: resolvedProjectId,
|
|
4428
|
+
flowId
|
|
4410
4429
|
});
|
|
4411
4430
|
return mcpResult18(
|
|
4412
4431
|
{ frames: frames.map(serializeLean) },
|
|
@@ -4419,9 +4438,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
4419
4438
|
);
|
|
4420
4439
|
}
|
|
4421
4440
|
case "page": {
|
|
4441
|
+
assertParam(flowId, "flowId", "page");
|
|
4422
4442
|
assertParam(pageKey, "pageKey", "page");
|
|
4423
4443
|
const { frames } = await client.listPageFrames({
|
|
4424
4444
|
projectId: resolvedProjectId,
|
|
4445
|
+
flowId,
|
|
4425
4446
|
pageKey
|
|
4426
4447
|
});
|
|
4427
4448
|
return mcpResult18(
|
|
@@ -4432,9 +4453,11 @@ async function frameManageHandler(client, rawInput) {
|
|
|
4432
4453
|
);
|
|
4433
4454
|
}
|
|
4434
4455
|
case "get": {
|
|
4456
|
+
assertParam(flowId, "flowId", "get");
|
|
4435
4457
|
assertParam(frameId, "frameId", "get");
|
|
4436
4458
|
const frame = await client.getFrame({
|
|
4437
4459
|
projectId: resolvedProjectId,
|
|
4460
|
+
flowId,
|
|
4438
4461
|
frameId
|
|
4439
4462
|
});
|
|
4440
4463
|
return mcpResult18(
|
|
@@ -4446,7 +4469,7 @@ async function frameManageHandler(client, rawInput) {
|
|
|
4446
4469
|
}
|
|
4447
4470
|
}
|
|
4448
4471
|
} catch (error) {
|
|
4449
|
-
return mcpError19(error,
|
|
4472
|
+
return mcpError19(error, frameRefusalHint(error));
|
|
4450
4473
|
}
|
|
4451
4474
|
}
|
|
4452
4475
|
function createFrameManageToolSpec(client) {
|
|
@@ -4930,7 +4953,7 @@ var SERVER_INSTRUCTIONS = `walkerOS is an open-source, privacy-first event data
|
|
|
4930
4953
|
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
|
|
4931
4954
|
15. \`observe_journeys({ flowId: "..." })\` - read what arrived; it is the only read, and it never judges whether events are correct
|
|
4932
4955
|
16. \`hub_manage({ action: "releases", flowId: "..." })\` - read what changed across releases and why; \`release_get\` carries a server-computed diff, \`rationale_set\` records why
|
|
4933
|
-
17. \`frame_manage({ action: "page", pageKey: "..." })\` - read the frames of a page with their marks; read-only, edited in Tag Mode or the app
|
|
4956
|
+
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
|
|
4934
4957
|
|
|
4935
4958
|
## Architecture: Source \u2192 Collector \u2192 Destination(s)
|
|
4936
4959
|
|
|
@@ -5417,7 +5440,7 @@ var HttpToolClient = class {
|
|
|
5417
5440
|
async checkContract() {
|
|
5418
5441
|
return compareContract({
|
|
5419
5442
|
baseUrl: this.appBaseUrl(),
|
|
5420
|
-
client: { type: "mcp", version: "4.
|
|
5443
|
+
client: { type: "mcp", version: "4.8.0-next-1791441510508" }
|
|
5421
5444
|
});
|
|
5422
5445
|
}
|
|
5423
5446
|
/** The live public OpenAPI document of `appBaseUrl()`, without a credential. */
|
|
@@ -5628,7 +5651,7 @@ function parseJson(content) {
|
|
|
5628
5651
|
}
|
|
5629
5652
|
|
|
5630
5653
|
// src/stdio.ts
|
|
5631
|
-
setClientContext({ type: "mcp", version: "4.
|
|
5654
|
+
setClientContext({ type: "mcp", version: "4.8.0-next-1791441510508" });
|
|
5632
5655
|
process.on("uncaughtException", (err) => {
|
|
5633
5656
|
const emitter = getMcpEmitterSingleton();
|
|
5634
5657
|
if (emitter) {
|
|
@@ -5648,7 +5671,7 @@ process.on("unhandledRejection", (reason) => {
|
|
|
5648
5671
|
async function main() {
|
|
5649
5672
|
const server = createWalkerOSMcpServer({
|
|
5650
5673
|
client: new HttpToolClient(),
|
|
5651
|
-
version: "4.
|
|
5674
|
+
version: "4.8.0-next-1791441510508",
|
|
5652
5675
|
runtime: createLocalRuntime()
|
|
5653
5676
|
});
|
|
5654
5677
|
const transport = new StdioServerTransport();
|
|
@@ -5659,7 +5682,7 @@ main().catch(async (error) => {
|
|
|
5659
5682
|
try {
|
|
5660
5683
|
const emitter = await createMcpEmitter({
|
|
5661
5684
|
clientInfo: void 0,
|
|
5662
|
-
packageVersion: "4.
|
|
5685
|
+
packageVersion: "4.8.0-next-1791441510508"
|
|
5663
5686
|
});
|
|
5664
5687
|
await emitter.emitError("startup");
|
|
5665
5688
|
} catch {
|