@walkeros/mcp 4.8.0-next-1791441510508 → 4.8.0
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.js +29 -24
- package/dist/index.js.map +1 -1
- package/dist/stdio.js +30 -25
- package/dist/stdio.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -211,8 +211,9 @@ import { mcpError } from "@walkeros/core";
|
|
|
211
211
|
function inputIssuesMessage(error) {
|
|
212
212
|
return error.issues.map((issue) => `${issue.path.join(".") || "input"}: ${issue.message}`).join("; ");
|
|
213
213
|
}
|
|
214
|
-
function parseToolInput(shape, raw) {
|
|
215
|
-
const
|
|
214
|
+
function parseToolInput(shape, raw, options = {}) {
|
|
215
|
+
const schema = options.strict ? z.strictObject(shape) : z.object(shape);
|
|
216
|
+
const parsed = schema.safeParse(raw ?? {});
|
|
216
217
|
if (!parsed.success) {
|
|
217
218
|
return {
|
|
218
219
|
ok: false,
|
|
@@ -445,7 +446,7 @@ var FLOW_MANAGE_REQUIREMENTS = {
|
|
|
445
446
|
preview_get: { required: ["flowId", "previewId"] },
|
|
446
447
|
preview_create: {
|
|
447
448
|
required: ["flowId"],
|
|
448
|
-
oneOf: [["
|
|
449
|
+
oneOf: [["settingsName", "flowSettingsId"]]
|
|
449
450
|
},
|
|
450
451
|
preview_delete: { required: ["flowId", "previewId"] },
|
|
451
452
|
preview_regrant: { required: ["flowId", "previewId"] }
|
|
@@ -837,11 +838,11 @@ var inputSchema3 = {
|
|
|
837
838
|
previewId: z4.string().optional().describe(
|
|
838
839
|
"Preview ID (prv_...). Required for preview_get, preview_delete, and preview_regrant (all also require flowId)."
|
|
839
840
|
),
|
|
840
|
-
|
|
841
|
-
"Used by preview_create
|
|
841
|
+
settingsName: z4.string().optional().describe(
|
|
842
|
+
"Settings name of a multi-settings flow (the `settings[].name` from flow_manage list). Used by preview_create: provide one of settingsName or flowSettingsId (preview_create also requires flowId)."
|
|
842
843
|
),
|
|
843
844
|
flowSettingsId: z4.string().optional().describe(
|
|
844
|
-
"Used by preview_create
|
|
845
|
+
"Used by preview_create: provide one of settingsName or flowSettingsId (preview_create also requires flowId)."
|
|
845
846
|
),
|
|
846
847
|
source: z4.discriminatedUnion("kind", [
|
|
847
848
|
z4.object({ kind: z4.literal("draft") }),
|
|
@@ -922,7 +923,7 @@ function createFlowManageToolSpec(client) {
|
|
|
922
923
|
};
|
|
923
924
|
}
|
|
924
925
|
async function flowManageHandlerBody(client, input) {
|
|
925
|
-
const parsed = parseToolInput(inputSchema3, input);
|
|
926
|
+
const parsed = parseToolInput(inputSchema3, input, { strict: true });
|
|
926
927
|
if (!parsed.ok) return parsed.error;
|
|
927
928
|
const {
|
|
928
929
|
action,
|
|
@@ -938,7 +939,7 @@ async function flowManageHandlerBody(client, input) {
|
|
|
938
939
|
cursor,
|
|
939
940
|
limit,
|
|
940
941
|
previewId,
|
|
941
|
-
|
|
942
|
+
settingsName,
|
|
942
943
|
flowSettingsId,
|
|
943
944
|
source,
|
|
944
945
|
siteUrl,
|
|
@@ -948,7 +949,7 @@ async function flowManageHandlerBody(client, input) {
|
|
|
948
949
|
const validationError = validateActionInput(
|
|
949
950
|
"flow_manage",
|
|
950
951
|
action ?? "",
|
|
951
|
-
{ flowId, projectId, name, previewId,
|
|
952
|
+
{ flowId, projectId, name, previewId, settingsName, flowSettingsId },
|
|
952
953
|
FLOW_MANAGE_REQUIREMENTS
|
|
953
954
|
);
|
|
954
955
|
if (validationError) return mcpError4(new Error(validationError));
|
|
@@ -1144,7 +1145,7 @@ async function flowManageHandlerBody(client, input) {
|
|
|
1144
1145
|
const preview = await client.createPreview({
|
|
1145
1146
|
projectId: resolvedProjectId,
|
|
1146
1147
|
flowId,
|
|
1147
|
-
flowName,
|
|
1148
|
+
flowName: settingsName,
|
|
1148
1149
|
flowSettingsId,
|
|
1149
1150
|
...source ? { source } : {},
|
|
1150
1151
|
...siteUrl ? { siteUrl } : {}
|
|
@@ -1217,7 +1218,9 @@ function registerFlowManageTool(server, client) {
|
|
|
1217
1218
|
{
|
|
1218
1219
|
title: spec.title,
|
|
1219
1220
|
description: spec.description,
|
|
1220
|
-
|
|
1221
|
+
// Strict, so a key the tool does not take is an input error naming that
|
|
1222
|
+
// key rather than a key dropped without a word.
|
|
1223
|
+
inputSchema: z4.strictObject(spec.inputSchema),
|
|
1221
1224
|
annotations: spec.annotations
|
|
1222
1225
|
},
|
|
1223
1226
|
(args) => flowManageHandlerBody(client, args)
|
|
@@ -1280,7 +1283,7 @@ async function resolveDeploymentSlug(args) {
|
|
|
1280
1283
|
|
|
1281
1284
|
// src/tools/deploy-manage.ts
|
|
1282
1285
|
var TITLE4 = "Deploy Management";
|
|
1283
|
-
var DESCRIPTION4 = "Deploy walkerOS flows and manage deployments. deploy waits for the deployment to reach a terminal status by default (wait=true),
|
|
1286
|
+
var DESCRIPTION4 = "Deploy walkerOS flows and manage deployments. deploy waits for the deployment to reach a terminal status by default (wait=true), up to 12 minutes on the local door and up to 10 minutes on the hosted door; pass wait=false to return immediately with the deployment id. A finished deployment carries its status and, on failure, an errorMessage with the user-facing reason; use the get action to re-read it. list supports cursor and limit for pagination. delete removes an active deployment. For get and delete pass flowId (required) plus optional slug to disambiguate when a flow has multiple active deployments. If a flow has >=2 active deployments and no slug is supplied, the tool returns a MULTIPLE_DEPLOYMENTS error with a details[] list showing each deployment's slug, type, status, and updatedAt.";
|
|
1284
1287
|
var DEPLOYMENT_STATUSES = {
|
|
1285
1288
|
idle: true,
|
|
1286
1289
|
deploying: true,
|
|
@@ -1308,10 +1311,10 @@ var inputSchema4 = {
|
|
|
1308
1311
|
type: z5.enum(membersOf(DEPLOYMENT_TYPES)).optional().describe("Deployment type filter for list."),
|
|
1309
1312
|
status: z5.enum(membersOf(DEPLOYMENT_STATUSES)).optional().describe("Status filter for list."),
|
|
1310
1313
|
wait: z5.boolean().optional().describe(
|
|
1311
|
-
"Wait for the deployment to reach a terminal status (default true)
|
|
1314
|
+
"Wait for the deployment to reach a terminal status (default true): up to 12 minutes on the local door, up to 10 minutes on the hosted door. Set false to return the deployment id immediately. Only used with deploy action."
|
|
1312
1315
|
),
|
|
1313
|
-
|
|
1314
|
-
"
|
|
1316
|
+
settingsName: z5.string().optional().describe(
|
|
1317
|
+
"Settings name of a multi-settings flow (the `settings[].name` from flow_manage list). Only used with deploy action."
|
|
1315
1318
|
),
|
|
1316
1319
|
cursor: z5.string().optional().describe(
|
|
1317
1320
|
"Pagination cursor from a previous list response. Only used with the list action."
|
|
@@ -1380,7 +1383,7 @@ function createDeployManageToolSpec(client) {
|
|
|
1380
1383
|
};
|
|
1381
1384
|
}
|
|
1382
1385
|
async function deployManageHandlerBody(client, input) {
|
|
1383
|
-
const parsed = parseToolInput(inputSchema4, input);
|
|
1386
|
+
const parsed = parseToolInput(inputSchema4, input, { strict: true });
|
|
1384
1387
|
if (!parsed.ok) return parsed.error;
|
|
1385
1388
|
const {
|
|
1386
1389
|
action,
|
|
@@ -1390,7 +1393,7 @@ async function deployManageHandlerBody(client, input) {
|
|
|
1390
1393
|
type,
|
|
1391
1394
|
status,
|
|
1392
1395
|
wait,
|
|
1393
|
-
|
|
1396
|
+
settingsName,
|
|
1394
1397
|
cursor,
|
|
1395
1398
|
limit
|
|
1396
1399
|
} = parsed.data;
|
|
@@ -1409,7 +1412,7 @@ async function deployManageHandlerBody(client, input) {
|
|
|
1409
1412
|
flowId,
|
|
1410
1413
|
projectId,
|
|
1411
1414
|
wait: wait ?? true,
|
|
1412
|
-
flowName
|
|
1415
|
+
flowName: settingsName
|
|
1413
1416
|
});
|
|
1414
1417
|
const appUrl = deploymentUrl(client, projectId, result);
|
|
1415
1418
|
return mcpResult4(withAppUrl(redactDisplayNames(result), appUrl), {
|
|
@@ -1482,7 +1485,9 @@ function registerDeployTool(server, client) {
|
|
|
1482
1485
|
{
|
|
1483
1486
|
title: spec.title,
|
|
1484
1487
|
description: spec.description,
|
|
1485
|
-
|
|
1488
|
+
// Strict, so a key the tool does not take is an input error naming that
|
|
1489
|
+
// key: a dropped settings key would deploy as if no settings were named.
|
|
1490
|
+
inputSchema: z5.strictObject(spec.inputSchema),
|
|
1486
1491
|
annotations: spec.annotations
|
|
1487
1492
|
},
|
|
1488
1493
|
(args) => deployManageHandlerBody(client, args)
|
|
@@ -2964,7 +2969,7 @@ async function feedbackHandlerBody(client, input) {
|
|
|
2964
2969
|
const isAnonymous = explicitAnonymous ?? anonymous ?? true;
|
|
2965
2970
|
await client.submitFeedback(text, {
|
|
2966
2971
|
anonymous: isAnonymous,
|
|
2967
|
-
version: "4.8.0
|
|
2972
|
+
version: "4.8.0"
|
|
2968
2973
|
});
|
|
2969
2974
|
return mcpResult10({ ok: true });
|
|
2970
2975
|
} catch (error) {
|
|
@@ -3756,7 +3761,7 @@ var NPM_SEARCH_URL = "https://registry.npmjs.org/-/v1/search";
|
|
|
3756
3761
|
var JSDELIVR_BASE = "https://cdn.jsdelivr.net/npm";
|
|
3757
3762
|
var WALKEROS_JSON_PATH = "dist/walkerOS.json";
|
|
3758
3763
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
3759
|
-
var CLIENT_HEADER = "walkeros-mcp/4.8.0
|
|
3764
|
+
var CLIENT_HEADER = "walkeros-mcp/4.8.0";
|
|
3760
3765
|
function getPackageBaseUrl() {
|
|
3761
3766
|
return process.env.WALKEROS_APP_URL || void 0;
|
|
3762
3767
|
}
|
|
@@ -5434,7 +5439,7 @@ var HttpToolClient = class {
|
|
|
5434
5439
|
async checkContract() {
|
|
5435
5440
|
return compareContract({
|
|
5436
5441
|
baseUrl: this.appBaseUrl(),
|
|
5437
|
-
client: { type: "mcp", version: "4.8.0
|
|
5442
|
+
client: { type: "mcp", version: "4.8.0" }
|
|
5438
5443
|
});
|
|
5439
5444
|
}
|
|
5440
5445
|
/** The live public OpenAPI document of `appBaseUrl()`, without a credential. */
|
|
@@ -5734,7 +5739,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5734
5739
|
order: z21.enum(["asc", "desc"]).optional(),
|
|
5735
5740
|
includeDeleted: z21.boolean().optional(),
|
|
5736
5741
|
previewId: z21.string().optional(),
|
|
5737
|
-
|
|
5742
|
+
settingsName: z21.string().optional(),
|
|
5738
5743
|
flowSettingsId: z21.string().optional(),
|
|
5739
5744
|
siteUrl: z21.string().optional()
|
|
5740
5745
|
},
|
|
@@ -5757,7 +5762,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5757
5762
|
type: z21.enum(["web", "server"]).optional(),
|
|
5758
5763
|
status: z21.string().optional(),
|
|
5759
5764
|
wait: z21.boolean().optional(),
|
|
5760
|
-
|
|
5765
|
+
settingsName: z21.string().optional()
|
|
5761
5766
|
},
|
|
5762
5767
|
annotations: {
|
|
5763
5768
|
readOnlyHint: false,
|