@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.
@@ -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(["NONE", "EXCLUSIVE", "MAX_N"]).optional().describe("Conflict resolution mode"),
46
- activationStrategy: z.enum(["FIRST_MATCH", "HIGHEST_PRIORITY", "MAX_BENEFIT"]).optional().describe("Strategy when mode is EXCLUSIVE or MAX_N"),
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(["NONE", "EXCLUSIVE", "MAX_N"]).optional().describe("Conflict resolution mode"),
75
- activationStrategy: z.enum(["FIRST_MATCH", "HIGHEST_PRIORITY", "MAX_BENEFIT"]).optional().describe("Strategy"),
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: { refVar: string, operator: "ASSIGN"|"ADD"|"SUB"|"MUL"|"DIV", method: "PERCENTAGE"|"AMOUNT", rate?: number (when PERCENTAGE), value?: number (when AMOUNT), rounding?: RoundingOption } Constraints: DIV + PERCENTAGE is invalid (use MUL with rate/100 inverse). DIV + AMOUNT requires value !== 0.
348
- - INCREMENT_FACT: { targetVar: string, method: "PERCENTAGE"|"AMOUNT", refVar?: string (required when PERCENTAGE), rate?: number (when PERCENTAGE), value?: number (when AMOUNT), rounding?: RoundingOption } targetVar (accumulation target) must exist at execution; refVar (PERCENTAGE source) must exist when method is PERCENTAGE. Each is supplied as an input fact or written by a prior action in this rule — a missing required fact throws (no 0 default). Note: external system call (e.g. point system sync) is NOT a primitive responsibility. Compose [INCREMENT_FACT, EMIT_EVENT] chain instead.
349
- - EMIT_EVENT: { integrationId: uuid, eventPayload: object (Map<string,unknown>, ≥1 entry) } eventPayload is passed through to the integration provider as-is. Domain-specific keys (couponId, ticketId, etc.) are routed by the provider, not validated by the engine.
350
- - BLOCK: { reason: string }
351
- - EMIT_NOTIFICATION: { integrationId: uuid, targetVar: string, notificationPayload: object (Map<string,unknown>, ≥1 entry) } targetVar identifies the recipient fact (e.g. phone_number / email / device_token) and is REQUIRED — the named fact must be present in the request or the action throws. (Contrast with ADD_TAG, where targetVar is an optional write target that is created if absent.)
352
- - EMIT_WEBHOOK: { url: string, method: "POST", payloadTemplate?: object } payloadTemplate is optional. Without it, all facts are sent as-is. With it, the object is sent as the HTTP body with {{variables}} replaced at execution time. Variables: {{fact.xxx}}, {{output.xxx}}, {{timestamp}}, {{ruleName}}, {{groupName}}, {{versionNo}}, {{xxx}} (shorthand).
353
- Platform examples:
354
- Slack: { "text": "Rule {{ruleName}} fired{{fact.customer_tier}}" }
355
- Discord: { "content": "Rule {{ruleName}} fired {{fact.customer_tier}}" }
356
- Generic: { "event": "rule_matched", "rule": "{{ruleName}}", "amount": "{{output.payment_amount}}" }
357
- - SET_FACT: { key: string, value: string|number|boolean }
358
- - ADD_TAG: { tag: string, targetVar?: string (defaults to "user_tags") } Appends tag to a LIST_STRING fact, creating it if absent. Adding an existing tag is a no-op (idempotent). Read tags back with HAS_ANY / HAS_ALL / HAS_NONE.
359
-
360
- RoundingOption (optional, MUTATE_FACT / INCREMENT_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).
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 (e.g. MUTATE_FACT requires its refVar fact; INCREMENT_FACT always requires targetVar, plus refVar when method is PERCENTAGE). 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; Actions never create a fact from nothing. Static data, safe to cache in-session.",
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, mockExternalCalls }) => {
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, mockExternalCalls }
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 (webhook calls, coupon issuance, etc.).",
1190
+ description: "List system failure logs from background tasks (platform event webhooks, scheduled deployments).",
1268
1191
  inputSchema: {
1269
- page: z12.number().int().min(0).default(0).describe("Page number"),
1270
- size: z12.number().int().min(1).max(100).default(20).describe("Page size"),
1271
- category: z12.enum(TaskCategory).optional().describe("Task category"),
1272
- taskType: z12.enum(TaskType).optional().describe("Task type"),
1273
- status: z12.enum(FailureStatus).optional().describe("Log status"),
1274
- keyword: z12.string().optional().describe("Search in refId, refSubId, errorMessage"),
1275
- startDate: z12.string().optional().describe("Start date (yyyy-MM-dd)"),
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, category, taskType, status, keyword, startDate, endDate }) => {
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: z12.string().uuid().describe("Failure log ID")
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: RETRY (re-execute with original payload), RESOLVE (mark as manually fixed), or IGNORE (skip intentionally).",
1226
+ description: "Process a single failure log: RESOLVE (mark as manually fixed) or IGNORE (skip intentionally).",
1306
1227
  inputSchema: {
1307
- logId: z12.string().uuid().describe("Failure log ID"),
1308
- action: z12.enum(FailureAction).describe("Action to take")
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: z12.array(z12.string().uuid()).describe("Array of failure log IDs"),
1322
- action: z12.enum(FailureAction).describe("Action to apply to all logs")
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 z13 } from "zod";
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: z13.number().int().min(0).default(0).describe("Page number"),
1341
- size: z13.number().int().min(1).max(100).default(20).describe("Page 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: z13.string().uuid().describe("Webhook subscription 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: z13.string().uuid().optional().describe("Subscription ID (omit to create, provide to update)"),
1367
- name: z13.string().min(1).describe("Subscription name (unique per tenant)"),
1368
- webhookUrl: z13.string().url().describe("Webhook endpoint URL"),
1369
- subscribedEvents: z13.array(z13.enum(PlatformEventType)).min(1).describe("Events to subscribe to"),
1370
- payloadFormat: z13.enum(WebhookPayloadFormat).optional().default("GENERIC").describe("Payload format"),
1371
- secret: z13.string().optional().describe("HMAC-SHA256 signing secret"),
1372
- isActive: z13.boolean().optional().default(true).describe("Whether the subscription is active")
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: z13.string().uuid().describe("Webhook subscription 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: z13.string().uuid().describe("Webhook subscription 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 z14 } from "zod";
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: z14.string().describe(
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: z14.string().describe("Domain template key to apply (e.g. ECOMMERCE)."),
1433
- customName: z14.string().optional().describe(
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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lexq/cli",
3
- "version": "0.1.40",
3
+ "version": "0.1.41",
4
4
  "description": "LexQ CLI — manage policies, simulate rules, and deploy from the terminal. Built for humans and AI agents.",
5
5
  "type": "module",
6
6
  "bin": {