@walkeros/mcp 4.1.0 → 4.1.1-next-1779822275564
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 +12 -2
- package/dist/index.js +79 -42
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +82 -45
- package/dist/stdio.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ import { WebStandardStreamableHTTPServerTransportOptions } from '@modelcontextpr
|
|
|
11
11
|
* in a direct client that calls database helpers without HTTP overhead.
|
|
12
12
|
*/
|
|
13
13
|
interface ToolClient {
|
|
14
|
-
listProjects(
|
|
14
|
+
listProjects(options?: {
|
|
15
|
+
cursor?: string;
|
|
16
|
+
limit?: number;
|
|
17
|
+
}): Promise<unknown>;
|
|
15
18
|
getProject(options: {
|
|
16
19
|
projectId?: string;
|
|
17
20
|
}): Promise<unknown>;
|
|
@@ -31,6 +34,8 @@ interface ToolClient {
|
|
|
31
34
|
sort?: string;
|
|
32
35
|
order?: 'asc' | 'desc';
|
|
33
36
|
includeDeleted?: boolean;
|
|
37
|
+
cursor?: string;
|
|
38
|
+
limit?: number;
|
|
34
39
|
}): Promise<unknown>;
|
|
35
40
|
listFlows(options: ListFlowsOptions): Promise<unknown>;
|
|
36
41
|
getFlow(options: {
|
|
@@ -149,7 +154,10 @@ declare function createWalkerOSMcpServer(opts: CreateServerOptions): McpServer;
|
|
|
149
154
|
* (WALKEROS_TOKEN, WALKEROS_APP_URL), so no constructor args are required.
|
|
150
155
|
*/
|
|
151
156
|
declare class HttpToolClient implements ToolClient {
|
|
152
|
-
listProjects(
|
|
157
|
+
listProjects(options?: {
|
|
158
|
+
cursor?: string;
|
|
159
|
+
limit?: number;
|
|
160
|
+
}): Promise<unknown>;
|
|
153
161
|
getProject(options: {
|
|
154
162
|
projectId?: string;
|
|
155
163
|
}): Promise<unknown>;
|
|
@@ -169,6 +177,8 @@ declare class HttpToolClient implements ToolClient {
|
|
|
169
177
|
sort?: string;
|
|
170
178
|
order?: 'asc' | 'desc';
|
|
171
179
|
includeDeleted?: boolean;
|
|
180
|
+
cursor?: string;
|
|
181
|
+
limit?: number;
|
|
172
182
|
}): Promise<unknown>;
|
|
173
183
|
listFlows(options: ListFlowsOptions): Promise<unknown>;
|
|
174
184
|
getFlow(options: {
|
package/dist/index.js
CHANGED
|
@@ -182,7 +182,11 @@ var inputSchema2 = {
|
|
|
182
182
|
),
|
|
183
183
|
name: z2.string().optional().describe(
|
|
184
184
|
"Project name. Required for create. Optional for update (to rename)."
|
|
185
|
-
)
|
|
185
|
+
),
|
|
186
|
+
cursor: z2.string().optional().describe(
|
|
187
|
+
"Pagination cursor from a previous list response. Only used with the list action."
|
|
188
|
+
),
|
|
189
|
+
limit: z2.number().int().min(1).max(100).optional().describe("Max items per page (1-100). Only used with the list action.")
|
|
186
190
|
};
|
|
187
191
|
var annotations2 = {
|
|
188
192
|
readOnlyHint: false,
|
|
@@ -201,11 +205,11 @@ function createProjectManageToolSpec(client) {
|
|
|
201
205
|
};
|
|
202
206
|
}
|
|
203
207
|
async function projectManageHandlerBody(client, input) {
|
|
204
|
-
const { action, projectId, name } = input ?? {};
|
|
208
|
+
const { action, projectId, name, cursor, limit } = input ?? {};
|
|
205
209
|
try {
|
|
206
210
|
switch (action) {
|
|
207
211
|
case "list": {
|
|
208
|
-
const projects = await client.listProjects();
|
|
212
|
+
const projects = await client.listProjects({ cursor, limit });
|
|
209
213
|
const items = Array.isArray(projects) ? projects : projects?.projects || [];
|
|
210
214
|
if (items.length === 0) {
|
|
211
215
|
return mcpResult2(
|
|
@@ -408,6 +412,10 @@ var inputSchema3 = {
|
|
|
408
412
|
sort: z3.enum(["name", "updated_at", "created_at"]).optional().describe("Sort field for list."),
|
|
409
413
|
order: z3.enum(["asc", "desc"]).optional().describe("Sort order for list."),
|
|
410
414
|
includeDeleted: z3.boolean().optional().describe("Include soft-deleted flows in list results."),
|
|
415
|
+
cursor: z3.string().optional().describe(
|
|
416
|
+
"Pagination cursor from a previous list response. Only used with the list action."
|
|
417
|
+
),
|
|
418
|
+
limit: z3.number().int().min(1).max(100).optional().describe("Max items per page (1-100). Only used with the list action."),
|
|
411
419
|
previewId: z3.string().optional().describe(
|
|
412
420
|
"Preview ID (prv_...). Required for preview_get and preview_delete."
|
|
413
421
|
),
|
|
@@ -449,6 +457,8 @@ async function flowManageHandlerBody(client, input) {
|
|
|
449
457
|
sort,
|
|
450
458
|
order,
|
|
451
459
|
includeDeleted,
|
|
460
|
+
cursor,
|
|
461
|
+
limit,
|
|
452
462
|
previewId,
|
|
453
463
|
flowName,
|
|
454
464
|
flowSettingsId,
|
|
@@ -462,7 +472,9 @@ async function flowManageHandlerBody(client, input) {
|
|
|
462
472
|
projectId,
|
|
463
473
|
sort,
|
|
464
474
|
order,
|
|
465
|
-
includeDeleted
|
|
475
|
+
includeDeleted,
|
|
476
|
+
cursor,
|
|
477
|
+
limit
|
|
466
478
|
});
|
|
467
479
|
const dataObj = data2;
|
|
468
480
|
const flows = dataObj.flows;
|
|
@@ -472,7 +484,9 @@ async function flowManageHandlerBody(client, input) {
|
|
|
472
484
|
const data = await client.listAllFlows({
|
|
473
485
|
sort,
|
|
474
486
|
order,
|
|
475
|
-
includeDeleted
|
|
487
|
+
includeDeleted,
|
|
488
|
+
cursor,
|
|
489
|
+
limit
|
|
476
490
|
});
|
|
477
491
|
const safe = Array.isArray(data) ? data.map(safeSummary) : data;
|
|
478
492
|
return mcpResult3(
|
|
@@ -784,7 +798,11 @@ var inputSchema4 = {
|
|
|
784
798
|
),
|
|
785
799
|
flowName: z4.string().optional().describe(
|
|
786
800
|
"Flow name for multi-settings flows. Only used with deploy action."
|
|
787
|
-
)
|
|
801
|
+
),
|
|
802
|
+
cursor: z4.string().optional().describe(
|
|
803
|
+
"Pagination cursor from a previous list response. Only used with the list action."
|
|
804
|
+
),
|
|
805
|
+
limit: z4.number().int().min(1).max(100).optional().describe("Max items per page (1-100). Only used with the list action.")
|
|
788
806
|
};
|
|
789
807
|
var annotations4 = {
|
|
790
808
|
readOnlyHint: false,
|
|
@@ -812,7 +830,18 @@ function createDeployManageToolSpec(client) {
|
|
|
812
830
|
};
|
|
813
831
|
}
|
|
814
832
|
async function deployManageHandlerBody(client, input) {
|
|
815
|
-
const {
|
|
833
|
+
const {
|
|
834
|
+
action,
|
|
835
|
+
projectId,
|
|
836
|
+
flowId,
|
|
837
|
+
slug,
|
|
838
|
+
type,
|
|
839
|
+
status,
|
|
840
|
+
wait,
|
|
841
|
+
flowName,
|
|
842
|
+
cursor,
|
|
843
|
+
limit
|
|
844
|
+
} = input ?? {};
|
|
816
845
|
try {
|
|
817
846
|
switch (action) {
|
|
818
847
|
case "deploy": {
|
|
@@ -839,7 +868,9 @@ async function deployManageHandlerBody(client, input) {
|
|
|
839
868
|
projectId,
|
|
840
869
|
flowId,
|
|
841
870
|
type,
|
|
842
|
-
status
|
|
871
|
+
status,
|
|
872
|
+
cursor,
|
|
873
|
+
limit
|
|
843
874
|
});
|
|
844
875
|
return mcpResult4(data);
|
|
845
876
|
}
|
|
@@ -960,7 +991,7 @@ async function feedbackHandlerBody(client, input) {
|
|
|
960
991
|
const isAnonymous = explicitAnonymous ?? anonymous ?? true;
|
|
961
992
|
await client.submitFeedback(text, {
|
|
962
993
|
anonymous: isAnonymous,
|
|
963
|
-
version: "4.1.
|
|
994
|
+
version: "4.1.1-next-1779822275564"
|
|
964
995
|
});
|
|
965
996
|
return mcpResult5({ ok: true });
|
|
966
997
|
} catch (error) {
|
|
@@ -1381,15 +1412,17 @@ async function flowSimulateHandlerBody(input) {
|
|
|
1381
1412
|
`Unknown step type "${stepType}". Use "source", "transformer", or "destination".`
|
|
1382
1413
|
);
|
|
1383
1414
|
}
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1415
|
+
const success = !result.error;
|
|
1416
|
+
const errorMessage = result.error?.message;
|
|
1417
|
+
if (result.step === "source") {
|
|
1418
|
+
const eventCount = result.events.length;
|
|
1419
|
+
const summary = `Source captured ${eventCount} event${eventCount !== 1 ? "s" : ""}`;
|
|
1387
1420
|
return mcpResult8(
|
|
1388
1421
|
{
|
|
1389
|
-
success
|
|
1390
|
-
error:
|
|
1391
|
-
summary
|
|
1392
|
-
capturedEvents: result.
|
|
1422
|
+
success,
|
|
1423
|
+
error: errorMessage,
|
|
1424
|
+
summary,
|
|
1425
|
+
capturedEvents: result.events,
|
|
1393
1426
|
duration: result.duration
|
|
1394
1427
|
},
|
|
1395
1428
|
{
|
|
@@ -1401,41 +1434,45 @@ async function flowSimulateHandlerBody(input) {
|
|
|
1401
1434
|
}
|
|
1402
1435
|
);
|
|
1403
1436
|
}
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
calls: calls.length
|
|
1416
|
-
};
|
|
1417
|
-
if (verbose && calls.length > 0) {
|
|
1418
|
-
summary2.payload = calls;
|
|
1437
|
+
if (result.step === "transformer") {
|
|
1438
|
+
return mcpResult8(
|
|
1439
|
+
{
|
|
1440
|
+
success,
|
|
1441
|
+
error: errorMessage,
|
|
1442
|
+
summary: `Transformer processed event`,
|
|
1443
|
+
capturedEvents: result.events,
|
|
1444
|
+
duration: result.duration
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
next: ["Use flow_bundle to build for production"]
|
|
1419
1448
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1449
|
+
);
|
|
1450
|
+
}
|
|
1451
|
+
const destinations = {};
|
|
1452
|
+
const callCount = result.calls.length;
|
|
1453
|
+
const destSummary = {
|
|
1454
|
+
received: callCount > 0,
|
|
1455
|
+
calls: callCount
|
|
1456
|
+
};
|
|
1457
|
+
if (verbose && callCount > 0) {
|
|
1458
|
+
destSummary.payload = result.calls;
|
|
1422
1459
|
}
|
|
1460
|
+
destinations[result.name] = destSummary;
|
|
1423
1461
|
const destCount = Object.keys(destinations).length;
|
|
1424
1462
|
const receivedCount = Object.values(destinations).filter(
|
|
1425
1463
|
(d) => d.received
|
|
1426
1464
|
).length;
|
|
1427
1465
|
const warnings = [];
|
|
1428
|
-
if (
|
|
1466
|
+
if (receivedCount === 0) {
|
|
1429
1467
|
warnings.push(
|
|
1430
1468
|
'Destination did not receive the event. Common causes: (1) destination config has consent: { marketing: true } but event lacks matching consent, (2) mapping rules do not match the event name, (3) policy redacted required fields. Add consent to the event: { name: "...", data: {...}, consent: { marketing: true } }.'
|
|
1431
1469
|
);
|
|
1432
1470
|
}
|
|
1433
|
-
const summary = stepType === "transformer" ? `Transformer processed event` : `${receivedCount}/${destCount} destinations received the event`;
|
|
1434
1471
|
const resultObj = {
|
|
1435
|
-
success
|
|
1436
|
-
error:
|
|
1437
|
-
summary
|
|
1438
|
-
destinations
|
|
1472
|
+
success,
|
|
1473
|
+
error: errorMessage,
|
|
1474
|
+
summary: `${receivedCount}/${destCount} destinations received the event`,
|
|
1475
|
+
destinations,
|
|
1439
1476
|
duration: result.duration
|
|
1440
1477
|
};
|
|
1441
1478
|
return mcpResult8(resultObj, {
|
|
@@ -1784,7 +1821,7 @@ var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
|
|
|
1784
1821
|
var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
|
|
1785
1822
|
var WALKEROS_JSON_PATH = "dist/walkerOS.json";
|
|
1786
1823
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
1787
|
-
var CLIENT_HEADER = "walkeros-mcp/4.1.
|
|
1824
|
+
var CLIENT_HEADER = "walkeros-mcp/4.1.1-next-1779822275564";
|
|
1788
1825
|
var cache;
|
|
1789
1826
|
function normalizePlatform(platform) {
|
|
1790
1827
|
if (platform == null) return [];
|
|
@@ -2708,8 +2745,8 @@ import {
|
|
|
2708
2745
|
setFeedbackPreference
|
|
2709
2746
|
} from "@walkeros/cli";
|
|
2710
2747
|
var HttpToolClient = class {
|
|
2711
|
-
async listProjects() {
|
|
2712
|
-
return listProjects();
|
|
2748
|
+
async listProjects(options) {
|
|
2749
|
+
return listProjects(options);
|
|
2713
2750
|
}
|
|
2714
2751
|
async getProject(options) {
|
|
2715
2752
|
return getProject(options);
|