@lexq/cli 0.1.40 → 0.1.41
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/AGENTS.md +34 -32
- package/CONTEXT.md +41 -47
- package/README.md +8 -6
- package/dist/index.js +119 -385
- package/dist/mcp/register.js +86 -166
- package/package.json +1 -1
- package/skills/lexq-execution/SKILL.md +120 -65
- package/skills/lexq-groups/SKILL.md +78 -38
- package/skills/lexq-recipes/SKILL.md +97 -193
- package/skills/lexq-rules/SKILL.md +105 -35
- package/skills/lexq-shared/SKILL.md +48 -28
- package/skills/lexq-simulation/SKILL.md +33 -33
package/dist/mcp/register.js
CHANGED
|
@@ -13,6 +13,24 @@ function registerStatusTools(server, callApi) {
|
|
|
13
13
|
|
|
14
14
|
// src/mcp/tools/groups.ts
|
|
15
15
|
import { z } from "zod";
|
|
16
|
+
|
|
17
|
+
// src/types/enums.ts
|
|
18
|
+
var ConflictResolutionMode = ["NONE", "EXCLUSIVE", "MAX_N"];
|
|
19
|
+
var ConflictResolutionStrategy = ["HIGHEST_PRIORITY"];
|
|
20
|
+
var FailureStatus = ["PENDING", "RESOLVED", "IGNORED"];
|
|
21
|
+
var FailureAction = ["IGNORE", "RESOLVE"];
|
|
22
|
+
var TaskType = ["PLATFORM_WEBHOOK", "SCHEDULED_DEPLOYMENT"];
|
|
23
|
+
var PlatformEventType = [
|
|
24
|
+
"VERSION_PUBLISHED",
|
|
25
|
+
"DEPLOYED",
|
|
26
|
+
"ROLLED_BACK",
|
|
27
|
+
"UNDEPLOYED",
|
|
28
|
+
"DEPLOY_SCHEDULED",
|
|
29
|
+
"DEPLOY_SCHEDULE_CANCELED"
|
|
30
|
+
];
|
|
31
|
+
var WebhookPayloadFormat = ["GENERIC", "SLACK"];
|
|
32
|
+
|
|
33
|
+
// src/mcp/tools/groups.ts
|
|
16
34
|
function registerGroupTools(server, callApi) {
|
|
17
35
|
server.registerTool(
|
|
18
36
|
"lexq_groups_list",
|
|
@@ -42,8 +60,8 @@ function registerGroupTools(server, callApi) {
|
|
|
42
60
|
inputSchema: {
|
|
43
61
|
name: z.string().describe("Group name (unique among non-ARCHIVED)"),
|
|
44
62
|
description: z.string().optional().describe("Group description"),
|
|
45
|
-
activationMode: z.enum(
|
|
46
|
-
activationStrategy: z.enum(
|
|
63
|
+
activationMode: z.enum(ConflictResolutionMode).optional().describe("Conflict resolution mode"),
|
|
64
|
+
activationStrategy: z.enum(ConflictResolutionStrategy).optional().describe("Strategy when mode is EXCLUSIVE or MAX_N"),
|
|
47
65
|
executionLimit: z.number().int().min(1).optional().describe("Max rule executions (required when mode is MAX_N)"),
|
|
48
66
|
activationGroup: z.string().optional().describe("Activation group name")
|
|
49
67
|
}
|
|
@@ -71,8 +89,8 @@ function registerGroupTools(server, callApi) {
|
|
|
71
89
|
description: z.string().optional().describe("New description"),
|
|
72
90
|
status: z.enum(["ACTIVE", "DISABLED"]).optional().describe("Status (DISABLED = emergency stop)"),
|
|
73
91
|
activationGroup: z.string().optional().describe("Activation group (Execution Group) cluster key"),
|
|
74
|
-
activationMode: z.enum(
|
|
75
|
-
activationStrategy: z.enum(
|
|
92
|
+
activationMode: z.enum(ConflictResolutionMode).optional().describe("Conflict resolution mode"),
|
|
93
|
+
activationStrategy: z.enum(ConflictResolutionStrategy).optional().describe("Strategy"),
|
|
76
94
|
executionLimit: z.number().int().min(1).optional().describe("Max rule executions")
|
|
77
95
|
}
|
|
78
96
|
},
|
|
@@ -344,20 +362,33 @@ function registerRuleTools(server, callApi) {
|
|
|
344
362
|
Actions: [{ type, parameters }]
|
|
345
363
|
|
|
346
364
|
Action parameter schemas:
|
|
347
|
-
- MUTATE_FACT: {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
365
|
+
- MUTATE_FACT: { targetVar: string, operator: "ASSIGN"|"ADD"|"SUB"|"MUL"|"DIV", method: "PERCENTAGE"|"AMOUNT", operand: number, refVar?: string, rounding?: RoundingOption }
|
|
366
|
+
targetVar is the fact this action reads and writes. It must exist in facts at execution
|
|
367
|
+
time as a number — supplied as an input fact or written by a prior action in this rule.
|
|
368
|
+
A missing required fact throws (no 0 default).
|
|
369
|
+
operand is the arithmetic operand; the unit is dictated by method (percent when
|
|
370
|
+
PERCENTAGE, absolute amount when AMOUNT). Ranges are not constrained — negative values
|
|
371
|
+
and >100 percentages are valid (refunds, surcharges).
|
|
372
|
+
refVar is the base for percentage calculation and is OPTIONAL — omit it to use targetVar
|
|
373
|
+
itself. It is only meaningful in PERCENTAGE × {ASSIGN, ADD, SUB}; specifying it in any
|
|
374
|
+
other cell is an error. Use it when the base differs from the target, e.g.
|
|
375
|
+
"points += order_total × 5%" → { targetVar: "points", refVar: "order_total",
|
|
376
|
+
operator: "ADD", method: "PERCENTAGE", operand: 5 }.
|
|
377
|
+
operator × method matrix:
|
|
378
|
+
ASSIGN targetVar = operand | targetVar = refVar × operand/100
|
|
379
|
+
ADD targetVar += operand | targetVar += refVar × operand/100
|
|
380
|
+
SUB targetVar -= operand | targetVar -= refVar × operand/100
|
|
381
|
+
MUL targetVar *= operand | targetVar *= (operand/100 + 1)
|
|
382
|
+
DIV targetVar /= operand | invalid
|
|
383
|
+
Constraints: DIV + PERCENTAGE is invalid (use MUL with the inverse). DIV + AMOUNT
|
|
384
|
+
requires operand !== 0.
|
|
385
|
+
- SET_FACT: { targetVar: string, value: string|number|boolean } Creates the fact if absent
|
|
386
|
+
— this is the only action that does. MUTATE_FACT requires the target to already exist.
|
|
387
|
+
- BLOCK: { reason: string } Records a rejection decision. It does NOT halt rule execution —
|
|
388
|
+
subsequent actions and subsequent winning rules still run. Enforcement is the caller's
|
|
389
|
+
responsibility; the decision surfaces as the is_blocked fact.
|
|
390
|
+
|
|
391
|
+
RoundingOption (optional, MUTATE_FACT only): { scale: integer (0..16), mode?: "HALF_UP"|"HALF_DOWN"|"HALF_EVEN"|"FLOOR"|"CEILING"|"DOWN"|"UP" } mode defaults to HALF_UP. When omitted, calculator output is preserved at full precision (lossless).
|
|
361
392
|
`,
|
|
362
393
|
inputSchema: {
|
|
363
394
|
groupId: z3.string().uuid().describe("Policy group ID"),
|
|
@@ -520,7 +551,7 @@ function registerFactTools(server, callApi) {
|
|
|
520
551
|
"lexq_facts_action_metadata",
|
|
521
552
|
{
|
|
522
553
|
title: "Get Action Runtime Fact Metadata",
|
|
523
|
-
description: "Retrieve runtime fact requirements per Action type. For each Action, shows which input facts must be present in the execution payload
|
|
554
|
+
description: "Retrieve runtime fact requirements per Action type. For each Action, shows which input facts must be present in the execution payload \u2014 e.g. MUTATE_FACT always requires its targetVar fact, plus refVar when one is specified. The factRequired flag describes the FACT, not the parameter: refVar is an optional parameter, but if you specify it the named fact must exist. A required fact absent at runtime throws \u2014 the engine never defaults to 0. Facts are supplied as input or written by a prior action in the same rule; only SET_FACT creates a fact from nothing. Static data, safe to cache in-session.",
|
|
524
555
|
inputSchema: {}
|
|
525
556
|
},
|
|
526
557
|
async () => callApi("GET", "schema/action-metadata")
|
|
@@ -729,14 +760,13 @@ function registerAnalyticsTools(server, callApi) {
|
|
|
729
760
|
inputSchema: {
|
|
730
761
|
versionId: z6.string().uuid().describe("Policy version ID to test against"),
|
|
731
762
|
facts: z6.string().describe('JSON string of facts object, e.g. {"payment_amount":100000}'),
|
|
732
|
-
includeDebugInfo: z6.boolean().default(true).describe("Include execution and decision traces")
|
|
733
|
-
mockExternalCalls: z6.boolean().default(true).describe("Mock external integration calls")
|
|
763
|
+
includeDebugInfo: z6.boolean().default(true).describe("Include execution and decision traces")
|
|
734
764
|
}
|
|
735
765
|
},
|
|
736
|
-
async ({ versionId, facts, includeDebugInfo
|
|
766
|
+
async ({ versionId, facts, includeDebugInfo }) => {
|
|
737
767
|
const parsedFacts = JSON.parse(facts);
|
|
738
768
|
return callApi("POST", `analytics/dry-run/versions/${versionId}`, {
|
|
739
|
-
body: { facts: parsedFacts, includeDebugInfo
|
|
769
|
+
body: { facts: parsedFacts, includeDebugInfo }
|
|
740
770
|
});
|
|
741
771
|
}
|
|
742
772
|
);
|
|
@@ -1150,135 +1180,26 @@ function registerProvenanceTools(server, callApi) {
|
|
|
1150
1180
|
);
|
|
1151
1181
|
}
|
|
1152
1182
|
|
|
1153
|
-
// src/mcp/tools/integrations.ts
|
|
1154
|
-
import { z as z11 } from "zod";
|
|
1155
|
-
function registerIntegrationTools(server, callApi) {
|
|
1156
|
-
server.registerTool(
|
|
1157
|
-
"lexq_integrations_list",
|
|
1158
|
-
{
|
|
1159
|
-
title: "List Integrations",
|
|
1160
|
-
description: "List all external integrations (webhooks, CRM, notification, etc.).",
|
|
1161
|
-
inputSchema: {
|
|
1162
|
-
page: z11.number().int().min(0).default(0).describe("Page number"),
|
|
1163
|
-
size: z11.number().int().min(1).max(100).default(20).describe("Page size"),
|
|
1164
|
-
type: z11.enum(["COUPON", "POINT", "NOTIFICATION", "CRM", "MESSENGER", "WEBHOOK"]).optional().describe("Filter by integration type")
|
|
1165
|
-
}
|
|
1166
|
-
},
|
|
1167
|
-
async ({ page, size, type }) => {
|
|
1168
|
-
const params = paginationParams(page, size);
|
|
1169
|
-
if (type) params.type = type;
|
|
1170
|
-
return callApi("GET", "integrations", { params });
|
|
1171
|
-
}
|
|
1172
|
-
);
|
|
1173
|
-
server.registerTool(
|
|
1174
|
-
"lexq_integrations_get",
|
|
1175
|
-
{
|
|
1176
|
-
title: "Get Integration",
|
|
1177
|
-
description: "Get integration detail by ID.",
|
|
1178
|
-
inputSchema: {
|
|
1179
|
-
integrationId: z11.string().uuid().describe("Integration ID")
|
|
1180
|
-
}
|
|
1181
|
-
},
|
|
1182
|
-
async ({ integrationId }) => callApi("GET", `integrations/${integrationId}`)
|
|
1183
|
-
);
|
|
1184
|
-
server.registerTool(
|
|
1185
|
-
"lexq_integrations_save",
|
|
1186
|
-
{
|
|
1187
|
-
title: "Save Integration",
|
|
1188
|
-
description: "Create or update an integration. Provide id to update an existing one; omit id to create new. Types: COUPON, POINT, NOTIFICATION, CRM, MESSENGER, WEBHOOK.",
|
|
1189
|
-
inputSchema: {
|
|
1190
|
-
id: z11.string().uuid().optional().describe("Integration ID (omit to create, provide to update)"),
|
|
1191
|
-
type: z11.enum(["COUPON", "POINT", "NOTIFICATION", "CRM", "MESSENGER", "WEBHOOK"]).describe("Integration type"),
|
|
1192
|
-
name: z11.string().describe("Integration name"),
|
|
1193
|
-
baseUrl: z11.string().describe("Base URL of the external service"),
|
|
1194
|
-
credential: z11.string().optional().describe("API key or token for the service"),
|
|
1195
|
-
additionalConfig: z11.string().optional().describe("JSON string of additional config key-value pairs"),
|
|
1196
|
-
isActive: z11.boolean().default(true).describe("Whether the integration is active")
|
|
1197
|
-
}
|
|
1198
|
-
},
|
|
1199
|
-
async ({ additionalConfig, ...rest }) => {
|
|
1200
|
-
const body = { ...rest };
|
|
1201
|
-
if (additionalConfig) body.additionalConfig = JSON.parse(additionalConfig);
|
|
1202
|
-
return callApi("POST", "integrations", { body });
|
|
1203
|
-
}
|
|
1204
|
-
);
|
|
1205
|
-
server.registerTool(
|
|
1206
|
-
"lexq_integrations_delete",
|
|
1207
|
-
{
|
|
1208
|
-
title: "Delete Integration",
|
|
1209
|
-
description: "Delete an integration by ID.",
|
|
1210
|
-
inputSchema: {
|
|
1211
|
-
integrationId: z11.string().uuid().describe("Integration ID")
|
|
1212
|
-
}
|
|
1213
|
-
},
|
|
1214
|
-
async ({ integrationId }) => callApi("DELETE", `integrations/${integrationId}`)
|
|
1215
|
-
);
|
|
1216
|
-
server.registerTool(
|
|
1217
|
-
"lexq_integrations_config_spec",
|
|
1218
|
-
{
|
|
1219
|
-
title: "Integration Config Spec",
|
|
1220
|
-
description: "Show available integration types and their required configuration fields.",
|
|
1221
|
-
inputSchema: {}
|
|
1222
|
-
},
|
|
1223
|
-
async () => callApi("GET", "integrations/config-spec")
|
|
1224
|
-
);
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
// src/mcp/tools/logs.ts
|
|
1228
|
-
import { z as z12 } from "zod";
|
|
1229
|
-
|
|
1230
|
-
// src/types/enums.ts
|
|
1231
|
-
var FailureStatus = ["PENDING", "RESOLVED", "IGNORED"];
|
|
1232
|
-
var FailureAction = ["RETRY", "IGNORE", "RESOLVE"];
|
|
1233
|
-
var TaskCategory = ["INTEGRATION", "INTERNAL"];
|
|
1234
|
-
var TaskType = [
|
|
1235
|
-
// Integration
|
|
1236
|
-
"COUPON_ISSUE",
|
|
1237
|
-
"COUPON_CANCEL",
|
|
1238
|
-
"POINT_EARN",
|
|
1239
|
-
"POINT_USE",
|
|
1240
|
-
"POINT_REFUND",
|
|
1241
|
-
"NOTIFICATION_SEND",
|
|
1242
|
-
"CRM_SYNC_USER",
|
|
1243
|
-
"CRM_ADD_TAG",
|
|
1244
|
-
"WEBHOOK_EXECUTE",
|
|
1245
|
-
// Internal
|
|
1246
|
-
"IMAGE_PROCESSING",
|
|
1247
|
-
"DAILY_SETTLEMENT",
|
|
1248
|
-
"PLATFORM_WEBHOOK",
|
|
1249
|
-
"SCHEDULED_DEPLOYMENT"
|
|
1250
|
-
];
|
|
1251
|
-
var PlatformEventType = [
|
|
1252
|
-
"VERSION_PUBLISHED",
|
|
1253
|
-
"DEPLOYED",
|
|
1254
|
-
"ROLLED_BACK",
|
|
1255
|
-
"UNDEPLOYED",
|
|
1256
|
-
"DEPLOY_SCHEDULED",
|
|
1257
|
-
"DEPLOY_SCHEDULE_CANCELED"
|
|
1258
|
-
];
|
|
1259
|
-
var WebhookPayloadFormat = ["GENERIC", "SLACK"];
|
|
1260
|
-
|
|
1261
1183
|
// src/mcp/tools/logs.ts
|
|
1184
|
+
import { z as z11 } from "zod";
|
|
1262
1185
|
function registerLogTools(server, callApi) {
|
|
1263
1186
|
server.registerTool(
|
|
1264
1187
|
"lexq_logs_list",
|
|
1265
1188
|
{
|
|
1266
1189
|
title: "List Failure Logs",
|
|
1267
|
-
description: "List system failure logs from background tasks (
|
|
1190
|
+
description: "List system failure logs from background tasks (platform event webhooks, scheduled deployments).",
|
|
1268
1191
|
inputSchema: {
|
|
1269
|
-
page:
|
|
1270
|
-
size:
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
endDate: z12.string().optional().describe("End date (yyyy-MM-dd)")
|
|
1192
|
+
page: z11.number().int().min(0).default(0).describe("Page number"),
|
|
1193
|
+
size: z11.number().int().min(1).max(100).default(20).describe("Page size"),
|
|
1194
|
+
taskType: z11.enum(TaskType).optional().describe("Task type"),
|
|
1195
|
+
status: z11.enum(FailureStatus).optional().describe("Log status"),
|
|
1196
|
+
keyword: z11.string().optional().describe("Search in refId, refSubId, errorMessage"),
|
|
1197
|
+
startDate: z11.string().optional().describe("Start date (yyyy-MM-dd)"),
|
|
1198
|
+
endDate: z11.string().optional().describe("End date (yyyy-MM-dd)")
|
|
1277
1199
|
}
|
|
1278
1200
|
},
|
|
1279
|
-
async ({ page, size,
|
|
1201
|
+
async ({ page, size, taskType, status, keyword, startDate, endDate }) => {
|
|
1280
1202
|
const params = paginationParams(page, size);
|
|
1281
|
-
if (category) params.category = category;
|
|
1282
1203
|
if (taskType) params.taskType = taskType;
|
|
1283
1204
|
if (status) params.status = status;
|
|
1284
1205
|
if (keyword) params.keyword = keyword;
|
|
@@ -1293,7 +1214,7 @@ function registerLogTools(server, callApi) {
|
|
|
1293
1214
|
title: "Get Failure Log",
|
|
1294
1215
|
description: "Get failure log detail by ID.",
|
|
1295
1216
|
inputSchema: {
|
|
1296
|
-
logId:
|
|
1217
|
+
logId: z11.string().uuid().describe("Failure log ID")
|
|
1297
1218
|
}
|
|
1298
1219
|
},
|
|
1299
1220
|
async ({ logId }) => callApi("GET", `failure-logs/${logId}`)
|
|
@@ -1302,10 +1223,10 @@ function registerLogTools(server, callApi) {
|
|
|
1302
1223
|
"lexq_logs_action",
|
|
1303
1224
|
{
|
|
1304
1225
|
title: "Process Failure Log",
|
|
1305
|
-
description: "Process a single failure log:
|
|
1226
|
+
description: "Process a single failure log: RESOLVE (mark as manually fixed) or IGNORE (skip intentionally).",
|
|
1306
1227
|
inputSchema: {
|
|
1307
|
-
logId:
|
|
1308
|
-
action:
|
|
1228
|
+
logId: z11.string().uuid().describe("Failure log ID"),
|
|
1229
|
+
action: z11.enum(FailureAction).describe("Action to take")
|
|
1309
1230
|
}
|
|
1310
1231
|
},
|
|
1311
1232
|
async ({ logId, action }) => callApi("POST", `failure-logs/${logId}/actions`, {
|
|
@@ -1318,8 +1239,8 @@ function registerLogTools(server, callApi) {
|
|
|
1318
1239
|
title: "Bulk Process Failure Logs",
|
|
1319
1240
|
description: "Process multiple failure logs at once. Provide an array of log IDs and the action.",
|
|
1320
1241
|
inputSchema: {
|
|
1321
|
-
logIds:
|
|
1322
|
-
action:
|
|
1242
|
+
logIds: z11.array(z11.string().uuid()).describe("Array of failure log IDs"),
|
|
1243
|
+
action: z11.enum(FailureAction).describe("Action to apply to all logs")
|
|
1323
1244
|
}
|
|
1324
1245
|
},
|
|
1325
1246
|
async ({ logIds, action }) => callApi("POST", "failure-logs/bulk-actions", {
|
|
@@ -1329,7 +1250,7 @@ function registerLogTools(server, callApi) {
|
|
|
1329
1250
|
}
|
|
1330
1251
|
|
|
1331
1252
|
// src/mcp/tools/webhook-subscriptions.ts
|
|
1332
|
-
import { z as
|
|
1253
|
+
import { z as z12 } from "zod";
|
|
1333
1254
|
function registerWebhookSubscriptionTools(server, callApi) {
|
|
1334
1255
|
server.registerTool(
|
|
1335
1256
|
"lexq_webhook_subscriptions_list",
|
|
@@ -1337,8 +1258,8 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1337
1258
|
title: "List Webhook Subscriptions",
|
|
1338
1259
|
description: "List platform event webhook subscriptions. These receive deployment lifecycle notifications (publish, deploy, rollback, undeploy).",
|
|
1339
1260
|
inputSchema: {
|
|
1340
|
-
page:
|
|
1341
|
-
size:
|
|
1261
|
+
page: z12.number().int().min(0).default(0).describe("Page number"),
|
|
1262
|
+
size: z12.number().int().min(1).max(100).default(20).describe("Page size")
|
|
1342
1263
|
}
|
|
1343
1264
|
},
|
|
1344
1265
|
async ({ page, size }) => {
|
|
@@ -1352,7 +1273,7 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1352
1273
|
title: "Get Webhook Subscription",
|
|
1353
1274
|
description: "Get webhook subscription detail by ID.",
|
|
1354
1275
|
inputSchema: {
|
|
1355
|
-
id:
|
|
1276
|
+
id: z12.string().uuid().describe("Webhook subscription ID")
|
|
1356
1277
|
}
|
|
1357
1278
|
},
|
|
1358
1279
|
async ({ id }) => callApi("GET", `webhook-subscriptions/${id}`)
|
|
@@ -1363,13 +1284,13 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1363
1284
|
title: "Save Webhook Subscription",
|
|
1364
1285
|
description: 'Create or update a webhook subscription. Omit id to create, provide id to update. Events: VERSION_PUBLISHED, DEPLOYED, ROLLED_BACK, UNDEPLOYED. Formats: GENERIC (full JSON), SLACK ({"text": "..."}).',
|
|
1365
1286
|
inputSchema: {
|
|
1366
|
-
id:
|
|
1367
|
-
name:
|
|
1368
|
-
webhookUrl:
|
|
1369
|
-
subscribedEvents:
|
|
1370
|
-
payloadFormat:
|
|
1371
|
-
secret:
|
|
1372
|
-
isActive:
|
|
1287
|
+
id: z12.string().uuid().optional().describe("Subscription ID (omit to create, provide to update)"),
|
|
1288
|
+
name: z12.string().min(1).describe("Subscription name (unique per tenant)"),
|
|
1289
|
+
webhookUrl: z12.string().url().describe("Webhook endpoint URL"),
|
|
1290
|
+
subscribedEvents: z12.array(z12.enum(PlatformEventType)).min(1).describe("Events to subscribe to"),
|
|
1291
|
+
payloadFormat: z12.enum(WebhookPayloadFormat).optional().default("GENERIC").describe("Payload format"),
|
|
1292
|
+
secret: z12.string().optional().describe("HMAC-SHA256 signing secret"),
|
|
1293
|
+
isActive: z12.boolean().optional().default(true).describe("Whether the subscription is active")
|
|
1373
1294
|
}
|
|
1374
1295
|
},
|
|
1375
1296
|
async ({ ...body }) => callApi("POST", "webhook-subscriptions", { body })
|
|
@@ -1380,7 +1301,7 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1380
1301
|
title: "Delete Webhook Subscription",
|
|
1381
1302
|
description: "Delete a webhook subscription by ID.",
|
|
1382
1303
|
inputSchema: {
|
|
1383
|
-
id:
|
|
1304
|
+
id: z12.string().uuid().describe("Webhook subscription ID")
|
|
1384
1305
|
}
|
|
1385
1306
|
},
|
|
1386
1307
|
async ({ id }) => callApi("DELETE", `webhook-subscriptions/${id}`)
|
|
@@ -1391,7 +1312,7 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1391
1312
|
title: "Test Webhook Subscription",
|
|
1392
1313
|
description: "Send a test event to verify webhook connectivity. Returns the HTTP status code and success/failure message.",
|
|
1393
1314
|
inputSchema: {
|
|
1394
|
-
id:
|
|
1315
|
+
id: z12.string().uuid().describe("Webhook subscription ID")
|
|
1395
1316
|
}
|
|
1396
1317
|
},
|
|
1397
1318
|
async ({ id }) => callApi("POST", `webhook-subscriptions/${id}/test`)
|
|
@@ -1399,7 +1320,7 @@ function registerWebhookSubscriptionTools(server, callApi) {
|
|
|
1399
1320
|
}
|
|
1400
1321
|
|
|
1401
1322
|
// src/mcp/tools/domain-templates.ts
|
|
1402
|
-
import { z as
|
|
1323
|
+
import { z as z13 } from "zod";
|
|
1403
1324
|
function registerDomainTemplateTools(server, callApi) {
|
|
1404
1325
|
server.registerTool(
|
|
1405
1326
|
"lexq_domain_templates_list",
|
|
@@ -1416,7 +1337,7 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
1416
1337
|
title: "Preview Domain Template",
|
|
1417
1338
|
description: "Preview exactly what a domain template will provision before applying it: the fact definitions it registers, the sample rules it creates, and an apply plan. This is a read-only dry run \u2014 nothing is created. Only ACTIVE templates can be previewed.",
|
|
1418
1339
|
inputSchema: {
|
|
1419
|
-
template:
|
|
1340
|
+
template: z13.string().describe(
|
|
1420
1341
|
"Domain template key (e.g. ECOMMERCE). Use lexq_domain_templates_list to see available keys \u2014 currently only ECOMMERCE is ACTIVE."
|
|
1421
1342
|
)
|
|
1422
1343
|
}
|
|
@@ -1429,8 +1350,8 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
1429
1350
|
title: "Apply Domain Template",
|
|
1430
1351
|
description: "Apply a domain template to the current tenant. Creates the template's fact definitions and a new policy group pre-populated with its sample rules as a DRAFT version. Existing facts are skipped \u2014 apply is additive and never overwrites existing schema. Run lexq_domain_templates_preview first to review what will be created. Only ACTIVE templates can be applied.",
|
|
1431
1352
|
inputSchema: {
|
|
1432
|
-
template:
|
|
1433
|
-
customName:
|
|
1353
|
+
template: z13.string().describe("Domain template key to apply (e.g. ECOMMERCE)."),
|
|
1354
|
+
customName: z13.string().optional().describe(
|
|
1434
1355
|
"Optional custom name for the policy group that gets created. If omitted, the template's default name is used."
|
|
1435
1356
|
)
|
|
1436
1357
|
}
|
|
@@ -1456,7 +1377,6 @@ function registerAllTools(server, callApi) {
|
|
|
1456
1377
|
registerReplayTools(server, callApi);
|
|
1457
1378
|
registerHistoryTools(server, callApi);
|
|
1458
1379
|
registerProvenanceTools(server, callApi);
|
|
1459
|
-
registerIntegrationTools(server, callApi);
|
|
1460
1380
|
registerLogTools(server, callApi);
|
|
1461
1381
|
registerDomainTemplateTools(server, callApi);
|
|
1462
1382
|
registerWebhookSubscriptionTools(server, callApi);
|