@lexq/cli 1.1.4 → 1.1.5
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 +10 -8
- package/dist/mcp/register.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5012,7 +5012,7 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
5012
5012
|
{
|
|
5013
5013
|
title: "List Domain Templates",
|
|
5014
5014
|
annotations: { readOnlyHint: true },
|
|
5015
|
-
description: "List all domain templates. A domain template is a
|
|
5015
|
+
description: "List all domain templates. A domain template is a starter pack of fact definitions and sample rules for a common decision, such as checkout pricing (ECOMMERCE) or transfer approval (FINTECH). Each entry reports its key, whether it can be applied (isAvailable), and how many facts and sample rules it provisions. Call this before preview or apply to see which templates exist.",
|
|
5016
5016
|
inputSchema: z14.object({})
|
|
5017
5017
|
},
|
|
5018
5018
|
async () => callApi("GET", "domain-templates")
|
|
@@ -5022,10 +5022,10 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
5022
5022
|
{
|
|
5023
5023
|
title: "Preview Domain Template",
|
|
5024
5024
|
annotations: { readOnlyHint: true },
|
|
5025
|
-
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
|
|
5025
|
+
description: "Preview exactly what a domain template will provision before applying it: the fact definitions it registers (an input with a constraint carries its allowed values or range), the sample rules it creates with a description of each, and an apply plan. This is a read-only dry run; nothing is created. factConflicts lists keys this tenant already has with a different type, or with different allowed values or a different range on an input fact. While it is not empty, apply fails with P-061 and creates nothing: delete those facts or change them to match the template, then apply. plan is null for a template that cannot be applied yet.",
|
|
5026
5026
|
inputSchema: z14.object({
|
|
5027
5027
|
template: z14.string().describe(
|
|
5028
|
-
"Domain template key (e.g. ECOMMERCE). Use lexq_domain_templates_list to see
|
|
5028
|
+
"Domain template key (e.g. ECOMMERCE). Use lexq_domain_templates_list to see the keys."
|
|
5029
5029
|
)
|
|
5030
5030
|
})
|
|
5031
5031
|
},
|
|
@@ -5036,7 +5036,7 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
5036
5036
|
{
|
|
5037
5037
|
title: "Apply Domain Template",
|
|
5038
5038
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
5039
|
-
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.
|
|
5039
|
+
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. Apply never overwrites existing schema: a key that already exists with the same definition is kept as it is. Run lexq_domain_templates_preview first. If its factConflicts is not empty, apply fails with P-061 and creates nothing until those facts are deleted or changed to match the template. A template whose isAvailable is false cannot be applied.",
|
|
5040
5040
|
inputSchema: z14.object({
|
|
5041
5041
|
template: z14.string().describe("Domain template key to apply (e.g. ECOMMERCE)."),
|
|
5042
5042
|
customName: z14.string().optional().describe(
|
|
@@ -5153,7 +5153,7 @@ function registerDomainTemplateCommands(program) {
|
|
|
5153
5153
|
apply Apply a template to the current tenant
|
|
5154
5154
|
|
|
5155
5155
|
Workflow: list → preview → apply
|
|
5156
|
-
|
|
5156
|
+
Run "list" to see every template and whether it can be applied.
|
|
5157
5157
|
`
|
|
5158
5158
|
);
|
|
5159
5159
|
templates.command("list").description("List available domain templates").action(async () => {
|
|
@@ -5220,10 +5220,12 @@ function registerDomainTemplateCommands(program) {
|
|
|
5220
5220
|
dedent18`
|
|
5221
5221
|
|
|
5222
5222
|
Creates the template's fact definitions and a new DRAFT policy group
|
|
5223
|
-
populated with its sample rules.
|
|
5224
|
-
|
|
5223
|
+
populated with its sample rules. A fact that already exists with the
|
|
5224
|
+
same definition is kept as it is, so apply never overwrites your schema.
|
|
5225
5225
|
|
|
5226
|
-
Run "preview" first to review what will be created.
|
|
5226
|
+
Run "preview" first to review what will be created. If it lists
|
|
5227
|
+
factConflicts, apply fails with P-061 and creates nothing: delete those
|
|
5228
|
+
facts or change them to match the template first.
|
|
5227
5229
|
|
|
5228
5230
|
Example:
|
|
5229
5231
|
$ lexq domain-templates apply --template ECOMMERCE
|
package/dist/mcp/register.js
CHANGED
|
@@ -1558,7 +1558,7 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
1558
1558
|
{
|
|
1559
1559
|
title: "List Domain Templates",
|
|
1560
1560
|
annotations: { readOnlyHint: true },
|
|
1561
|
-
description: "List all domain templates. A domain template is a
|
|
1561
|
+
description: "List all domain templates. A domain template is a starter pack of fact definitions and sample rules for a common decision, such as checkout pricing (ECOMMERCE) or transfer approval (FINTECH). Each entry reports its key, whether it can be applied (isAvailable), and how many facts and sample rules it provisions. Call this before preview or apply to see which templates exist.",
|
|
1562
1562
|
inputSchema: z14.object({})
|
|
1563
1563
|
},
|
|
1564
1564
|
async () => callApi("GET", "domain-templates")
|
|
@@ -1568,10 +1568,10 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
1568
1568
|
{
|
|
1569
1569
|
title: "Preview Domain Template",
|
|
1570
1570
|
annotations: { readOnlyHint: true },
|
|
1571
|
-
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
|
|
1571
|
+
description: "Preview exactly what a domain template will provision before applying it: the fact definitions it registers (an input with a constraint carries its allowed values or range), the sample rules it creates with a description of each, and an apply plan. This is a read-only dry run; nothing is created. factConflicts lists keys this tenant already has with a different type, or with different allowed values or a different range on an input fact. While it is not empty, apply fails with P-061 and creates nothing: delete those facts or change them to match the template, then apply. plan is null for a template that cannot be applied yet.",
|
|
1572
1572
|
inputSchema: z14.object({
|
|
1573
1573
|
template: z14.string().describe(
|
|
1574
|
-
"Domain template key (e.g. ECOMMERCE). Use lexq_domain_templates_list to see
|
|
1574
|
+
"Domain template key (e.g. ECOMMERCE). Use lexq_domain_templates_list to see the keys."
|
|
1575
1575
|
)
|
|
1576
1576
|
})
|
|
1577
1577
|
},
|
|
@@ -1582,7 +1582,7 @@ function registerDomainTemplateTools(server, callApi) {
|
|
|
1582
1582
|
{
|
|
1583
1583
|
title: "Apply Domain Template",
|
|
1584
1584
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
1585
|
-
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.
|
|
1585
|
+
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. Apply never overwrites existing schema: a key that already exists with the same definition is kept as it is. Run lexq_domain_templates_preview first. If its factConflicts is not empty, apply fails with P-061 and creates nothing until those facts are deleted or changed to match the template. A template whose isAvailable is false cannot be applied.",
|
|
1586
1586
|
inputSchema: z14.object({
|
|
1587
1587
|
template: z14.string().describe("Domain template key to apply (e.g. ECOMMERCE)."),
|
|
1588
1588
|
customName: z14.string().optional().describe(
|
package/package.json
CHANGED