@enfyra/mcp-server 0.1.41 → 0.1.43
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/lib/mcp-examples.js +3 -1
- package/dist/lib/mcp-examples.js.map +1 -1
- package/dist/lib/mcp-instructions.js +1 -1
- package/dist/lib/mcp-instructions.js.map +1 -1
- package/dist/lib/platform-operation-tools.d.ts +28 -0
- package/dist/lib/platform-operation-tools.js +276 -2
- package/dist/lib/platform-operation-tools.js.map +1 -1
- package/dist/lib/required-knowledge.js +4 -2
- package/dist/lib/required-knowledge.js.map +1 -1
- package/dist/lib/tool-routing.js +5 -4
- package/dist/lib/tool-routing.js.map +1 -1
- package/dist/lib/toolset-filter.js +3 -0
- package/dist/lib/toolset-filter.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/mcp-examples.js
CHANGED
|
@@ -2172,7 +2172,7 @@ onMounted(() => fetchOrders())
|
|
|
2172
2172
|
</template>
|
|
2173
2173
|
|
|
2174
2174
|
<template #body>
|
|
2175
|
-
<UInput v-model="version" />
|
|
2175
|
+
<UInput v-model="version" class="w-full" />
|
|
2176
2176
|
<UButton
|
|
2177
2177
|
type="button"
|
|
2178
2178
|
icon="i-lucide-refresh-cw"
|
|
@@ -2184,6 +2184,8 @@ onMounted(() => fetchOrders())
|
|
|
2184
2184
|
</template>`,
|
|
2185
2185
|
notes: [
|
|
2186
2186
|
'For action-only footers, use CommonModal/CommonDrawer footer props: cancelAction, primaryAction, dangerAction, leadingActions, and footerHint.',
|
|
2187
|
+
'Editing drawers must wire Save/Create through primaryAction; destructive edit drawers should wire Delete through dangerAction.',
|
|
2188
|
+
'Form controls inside CommonModal/CommonDrawer body slots should use class="w-full" unless intentionally inline or compact.',
|
|
2187
2189
|
'cancelAction defaults to neutral outline. Use dangerAction for irreversible destructive work and tone: "primary" for Keep editing in discard dialogs.',
|
|
2188
2190
|
'Every trigger/body action button inside CommonModal, CommonDrawer, or UModal should use type="button" unless it intentionally submits a form.',
|
|
2189
2191
|
'Use @click.stop.prevent on body action buttons so clicks do not bubble to row/page triggers.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-examples.js","sourceRoot":"","sources":["../../src/lib/mcp-examples.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gNAAgN;IAChN,mLAAmL;IACnL,oJAAoJ;IACpJ,uOAAuO;IACvO,iPAAiP;CAClP,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc,EAAE;QACd,KAAK,EAAE,+CAA+C;QACtD,OAAO,EAAE,uNAAuN;QAChO,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,wCAAwC;gBAC9C,IAAI,EAAE;;;;;;;;;;;;GAYX;gBACK,KAAK,EAAE;oBACL,oFAAoF;oBACpF,wEAAwE;oBACxE,2DAA2D;iBAC5D;aACF;YACD;gBACE,IAAI,EAAE,sCAAsC;gBAC5C,IAAI,EAAE;;;;;;;;;;;;;;;0BAeY;gBAClB,KAAK,EAAE;oBACL,mCAAmC;oBACnC,2JAA2J;iBAC5J;aACF;YACD;gBACE,IAAI,EAAE,0CAA0C;gBAChD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BZ;gBACM,KAAK,EAAE;oBACL,0FAA0F;oBAC1F,iFAAiF;oBACjF,8HAA8H;oBAC9H,kDAAkD;iBACnD;aACF;YACD;gBACE,IAAI,EAAE,uCAAuC;gBAC7C,IAAI,EAAE;;;;;;;;;6CAS+B;gBACrC,KAAK,EAAE;oBACL,4DAA4D;oBAC5D,uEAAuE;iBACxE;aACF;YACD;gBACE,IAAI,EAAE,+CAA+C;gBACrD,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EX;gBACK,KAAK,EAAE;oBACL,gIAAgI;oBAChI,gHA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C,EAAE,EAAE,CAAC,CAAC;QAC/D,GAAG;QACH,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO;KACvB,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAQ;IAClC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO;YACL,cAAc,EAAE,uBAAuB;YACvC,UAAU,EAAE,qBAAqB,EAAE;YACnC,IAAI,EAAE,6FAA6F;SACpG,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC3C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;YACL,KAAK,EAAE,6BAA6B,QAAQ,GAAG;YAC/C,UAAU,EAAE,qBAAqB,EAAE;SACpC,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ;QACR,cAAc,EAAE,uBAAuB;QACvC,GAAG,KAAK;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -22,7 +22,7 @@ export function buildMcpServerInstructions(apiBaseUrl, options = {}) {
|
|
|
22
22
|
'- For target sanity checks, call `get_enfyra_api_context`; do not load broad metadata only to confirm the API base.',
|
|
23
23
|
'- When the goal is clear but the tool path is not, call `discover_enfyra_workflows` with intent/risk/surface. Use `detail: "plan"` before writes, follow `primaryPath`, and treat `avoidTools` as hard negative-routing boundaries.',
|
|
24
24
|
'- Discover before deciding, then inspect narrowly. Use `inspect_table`, `inspect_route`, `inspect_feature`, `search_admin_extensions`, or `search_runtime_zone` for the exact table/route/feature/runtime artifact. Run broad discovery tools sequentially, not in parallel.',
|
|
25
|
-
'- Load examples only when needed with `get_enfyra_examples`. For OAuth use `get_enfyra_examples({ category: "oauth-setup" })`. For extension UI, call `get_extension_theme_contract` before writing or reviewing UI and `get_theme_class_reference` only when exact classes are needed.',
|
|
25
|
+
'- Load examples only when needed with `get_enfyra_examples`. For OAuth use `get_enfyra_examples({ category: "oauth-setup" })`. For extension UI, call `get_extension_theme_contract` before writing or reviewing UI, use `build_extension_drawer`/`build_extension_modal` for drawer/modal snippets, and call `get_theme_class_reference` only when exact classes are needed.',
|
|
26
26
|
'- Prefer the most specific business operation tool over raw metadata CRUD.',
|
|
27
27
|
'- Before any write, call `get_enfyra_required_knowledge({ scope })` with the right scope and pass returned ack keys into write tools. Choose scope by task domain:',
|
|
28
28
|
' • `schema` — table, column, relation, record CRUD, route permission, guard, field permission, column rule, cache reload, GraphQL enablement, log debug.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-instructions.js","sourceRoot":"","sources":["../../src/lib/mcp-instructions.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,MAAM,UAAU,gBAAgB,CAAC,UAAU;IACzC,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzD,OAAO;QACL,cAAc,EAAE,GAAG,IAAI,UAAU;QACjC,gBAAgB,EAAE,GAAG,IAAI,iBAAiB;KAC3C,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAAC,UAAU,EAAE,UAAiC,EAAE;IACxF,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACzD,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC1E,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,IAAI,CAAC;IAEvD,OAAO;QACL,eAAe;QACf,EAAE;QACF,gCAAgC,IAAI,KAAK;QACzC,wBAAwB,cAAc,YAAY,gBAAgB,KAAK;QACvE,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,EAAE;QACF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BAA0B;QAC1B,uHAAuH;QACvH,sLAAsL;QACtL,gLAAgL;QAChL,iLAAiL;QACjL,yLAAyL;QACzL,kKAAkK;QAClK,0HAA0H;QAC1H,4LAA4L;QAC5L,EAAE;QACF,+BAA+B;QAC/B,4HAA4H;QAC5H,4GAA4G;QAC5G,mIAAmI;QACnI,kJAAkJ;QAClJ,oNAAoN;QACpN,iKAAiK;QACjK,gIAAgI;QAChI,EAAE;QACF,+BAA+B;QAC/B,iIAAiI;QACjI,uJAAuJ;QACvJ,yOAAyO;QACzO,+JAA+J;QAC/J,iMAAiM;QACjM,wSAAwS;QACxS,qLAAqL;QACrL,kPAAkP;QAClP,+PAA+P;QAC/P,EAAE;QACF,4BAA4B;QAC5B,0MAA0M;QAC1M,oHAAoH;QACpH,kIAAkI;QAClI,8MAA8M;QAC9M,kNAAkN;QAClN,wLAAwL;QACxL,EAAE;QACF,uIAAuI;KACxI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
export declare function buildExtensionDrawerSnippet(input: any): {
|
|
2
|
+
action: string;
|
|
3
|
+
component: string;
|
|
4
|
+
snippet: string;
|
|
5
|
+
normalizedBodyChanges: string[];
|
|
6
|
+
warnings: string[];
|
|
7
|
+
contract: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function buildExtensionModalSnippet(input: any): {
|
|
10
|
+
action: string;
|
|
11
|
+
component: string;
|
|
12
|
+
snippet: string;
|
|
13
|
+
normalizedBodyChanges: string[];
|
|
14
|
+
warnings: string[];
|
|
15
|
+
contract: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare function reviewExtensionUiContract(code: any): {
|
|
18
|
+
action: string;
|
|
19
|
+
valid: boolean;
|
|
20
|
+
issueCount: number;
|
|
21
|
+
issues: {
|
|
22
|
+
severity: "error" | "warning";
|
|
23
|
+
rule: string;
|
|
24
|
+
message: string;
|
|
25
|
+
suggestion: string;
|
|
26
|
+
}[];
|
|
27
|
+
nextSteps: string[];
|
|
28
|
+
};
|
|
1
29
|
export declare function validateExtensionCodeLocally(code: any): {
|
|
2
30
|
componentCasing: string;
|
|
3
31
|
};
|
|
@@ -299,6 +299,225 @@ async function findHandler(apiUrl, routeId, methodId) {
|
|
|
299
299
|
function jsonText(payload) {
|
|
300
300
|
return { content: [{ type: 'text', text: JSON.stringify(payload, null, 2) }] };
|
|
301
301
|
}
|
|
302
|
+
function escapeSingleQuoted(value) {
|
|
303
|
+
return String(value ?? '').replace(/\\/g, '\\\\').replace(/'/g, "\\'");
|
|
304
|
+
}
|
|
305
|
+
function quoteJsString(value) {
|
|
306
|
+
return `'${escapeSingleQuoted(value)}'`;
|
|
307
|
+
}
|
|
308
|
+
function normalizeVueBodySnippet(body) {
|
|
309
|
+
let code = String(body || '').trim();
|
|
310
|
+
const changes = [];
|
|
311
|
+
code = code.replace(/<(UInput|UTextarea|USelectMenu|USelect)(\s[^<>]*?)(\/?)>/g, (full, tag, attrs, slash) => {
|
|
312
|
+
if (/\bclass=/.test(attrs)) {
|
|
313
|
+
const nextAttrs = attrs.replace(/class="([^"]*)"/, (classMatch, classes) => {
|
|
314
|
+
if (String(classes).split(/\s+/).includes('w-full'))
|
|
315
|
+
return classMatch;
|
|
316
|
+
changes.push(`Added w-full to ${tag}.`);
|
|
317
|
+
return `class="${classes} w-full"`;
|
|
318
|
+
});
|
|
319
|
+
if (nextAttrs !== attrs)
|
|
320
|
+
return `<${tag}${nextAttrs}${slash}>`;
|
|
321
|
+
return full;
|
|
322
|
+
}
|
|
323
|
+
changes.push(`Added class="w-full" to ${tag}.`);
|
|
324
|
+
return `<${tag} class="w-full"${attrs}${slash}>`;
|
|
325
|
+
});
|
|
326
|
+
code = code.replace(/<button(\s[^>]*)?>/g, (full, attrs = '') => {
|
|
327
|
+
if (/\btype=/.test(attrs))
|
|
328
|
+
return full;
|
|
329
|
+
changes.push('Added type="button" to a native button.');
|
|
330
|
+
return `<button type="button"${attrs}>`;
|
|
331
|
+
});
|
|
332
|
+
return { code, changes: Array.from(new Set(changes)) };
|
|
333
|
+
}
|
|
334
|
+
function indentLines(code, spaces = 2) {
|
|
335
|
+
const pad = ' '.repeat(spaces);
|
|
336
|
+
return String(code || '')
|
|
337
|
+
.split('\n')
|
|
338
|
+
.map((line) => (line.trim() ? `${pad}${line}` : line))
|
|
339
|
+
.join('\n');
|
|
340
|
+
}
|
|
341
|
+
function buildFooterActionObject(action) {
|
|
342
|
+
if (!action)
|
|
343
|
+
return null;
|
|
344
|
+
if (typeof action === 'string')
|
|
345
|
+
return action;
|
|
346
|
+
const entries = [];
|
|
347
|
+
if (action.labelExpression)
|
|
348
|
+
entries.push(`label: ${action.labelExpression}`);
|
|
349
|
+
else if (action.label)
|
|
350
|
+
entries.push(`label: ${quoteJsString(action.label)}`);
|
|
351
|
+
if (action.icon)
|
|
352
|
+
entries.push(`icon: ${quoteJsString(action.icon)}`);
|
|
353
|
+
if (action.loading)
|
|
354
|
+
entries.push(`loading: ${action.loading}`);
|
|
355
|
+
if (action.disabled)
|
|
356
|
+
entries.push(`disabled: ${action.disabled}`);
|
|
357
|
+
if (action.color)
|
|
358
|
+
entries.push(`color: ${quoteJsString(action.color)}`);
|
|
359
|
+
if (action.variant)
|
|
360
|
+
entries.push(`variant: ${quoteJsString(action.variant)}`);
|
|
361
|
+
if (action.tone)
|
|
362
|
+
entries.push(`tone: ${quoteJsString(action.tone)}`);
|
|
363
|
+
if (action.onClick)
|
|
364
|
+
entries.push(`onClick: ${action.onClick}`);
|
|
365
|
+
return `{ ${entries.join(', ')} }`;
|
|
366
|
+
}
|
|
367
|
+
function titleMarkup(title, titleExpression) {
|
|
368
|
+
if (titleExpression)
|
|
369
|
+
return `{{ ${titleExpression} }}`;
|
|
370
|
+
return String(title || 'Untitled');
|
|
371
|
+
}
|
|
372
|
+
export function buildExtensionDrawerSnippet(input) {
|
|
373
|
+
const normalized = normalizeVueBodySnippet(input.body || '');
|
|
374
|
+
const titleContent = titleMarkup(input.title, input.titleExpression);
|
|
375
|
+
const model = input.model || 'drawerOpen';
|
|
376
|
+
const attrs = [
|
|
377
|
+
`v-model="${model}"`,
|
|
378
|
+
`direction="${input.direction || 'right'}"`,
|
|
379
|
+
];
|
|
380
|
+
if (input.nested)
|
|
381
|
+
attrs.push('nested');
|
|
382
|
+
if (input.handleOnly)
|
|
383
|
+
attrs.push('handle-only');
|
|
384
|
+
const cancelAction = input.cancelAction === false
|
|
385
|
+
? null
|
|
386
|
+
: buildFooterActionObject(input.cancelAction || { label: 'Cancel', onClick: `() => (${model} = false)` });
|
|
387
|
+
const primaryAction = buildFooterActionObject(input.primaryAction);
|
|
388
|
+
const dangerAction = buildFooterActionObject(input.dangerAction);
|
|
389
|
+
if (cancelAction)
|
|
390
|
+
attrs.push(`:cancel-action="${cancelAction}"`);
|
|
391
|
+
if (primaryAction)
|
|
392
|
+
attrs.push(`:primary-action="${primaryAction}"`);
|
|
393
|
+
if (dangerAction)
|
|
394
|
+
attrs.push(`:danger-action="${dangerAction}"`);
|
|
395
|
+
if (input.footerHint)
|
|
396
|
+
attrs.push(`footer-hint="${escapeSingleQuoted(input.footerHint).replace(/"/g, '"')}"`);
|
|
397
|
+
const snippet = [
|
|
398
|
+
'<CommonDrawer',
|
|
399
|
+
...attrs.map((attr) => ` ${attr}`),
|
|
400
|
+
'>',
|
|
401
|
+
' <template #header>',
|
|
402
|
+
` <h2 class="text-lg font-semibold eapp-text-primary">${titleContent}</h2>`,
|
|
403
|
+
' </template>',
|
|
404
|
+
'',
|
|
405
|
+
' <template #body>',
|
|
406
|
+
indentLines(normalized.code, 4),
|
|
407
|
+
' </template>',
|
|
408
|
+
'</CommonDrawer>',
|
|
409
|
+
].join('\n');
|
|
410
|
+
const warnings = [];
|
|
411
|
+
if (!primaryAction)
|
|
412
|
+
warnings.push('Editing/create drawers usually need primaryAction for Save/Create.');
|
|
413
|
+
return {
|
|
414
|
+
action: 'extension_drawer_built',
|
|
415
|
+
component: 'CommonDrawer',
|
|
416
|
+
snippet,
|
|
417
|
+
normalizedBodyChanges: normalized.changes,
|
|
418
|
+
warnings,
|
|
419
|
+
contract: [
|
|
420
|
+
'Use #header and #body slots; do not use a title prop.',
|
|
421
|
+
'Use primaryAction for Save/Create and dangerAction for destructive edit actions.',
|
|
422
|
+
'Body form controls are normalized to class="w-full" unless intentionally compact.',
|
|
423
|
+
'Native buttons in the body are normalized to type="button".',
|
|
424
|
+
],
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
export function buildExtensionModalSnippet(input) {
|
|
428
|
+
const normalized = normalizeVueBodySnippet(input.body || '');
|
|
429
|
+
const titleContent = titleMarkup(input.title, input.titleExpression);
|
|
430
|
+
const model = input.model || 'modalOpen';
|
|
431
|
+
const tag = input.alias === 'UModal' ? 'UModal' : 'CommonModal';
|
|
432
|
+
const attrs = [`v-model:open="${model}"`];
|
|
433
|
+
const cancelAction = input.cancelAction === false
|
|
434
|
+
? null
|
|
435
|
+
: buildFooterActionObject(input.cancelAction || { label: 'Cancel', onClick: `() => (${model} = false)` });
|
|
436
|
+
const primaryAction = buildFooterActionObject(input.primaryAction);
|
|
437
|
+
const dangerAction = buildFooterActionObject(input.dangerAction);
|
|
438
|
+
if (cancelAction)
|
|
439
|
+
attrs.push(`:cancel-action="${cancelAction}"`);
|
|
440
|
+
if (primaryAction)
|
|
441
|
+
attrs.push(`:primary-action="${primaryAction}"`);
|
|
442
|
+
if (dangerAction)
|
|
443
|
+
attrs.push(`:danger-action="${dangerAction}"`);
|
|
444
|
+
if (input.footerHint)
|
|
445
|
+
attrs.push(`footer-hint="${escapeSingleQuoted(input.footerHint).replace(/"/g, '"')}"`);
|
|
446
|
+
const snippet = [
|
|
447
|
+
`<${tag}`,
|
|
448
|
+
...attrs.map((attr) => ` ${attr}`),
|
|
449
|
+
'>',
|
|
450
|
+
' <template #header>',
|
|
451
|
+
` <h2 class="text-lg font-semibold eapp-text-primary">${titleContent}</h2>`,
|
|
452
|
+
' </template>',
|
|
453
|
+
'',
|
|
454
|
+
' <template #body>',
|
|
455
|
+
indentLines(normalized.code, 4),
|
|
456
|
+
' </template>',
|
|
457
|
+
`</${tag}>`,
|
|
458
|
+
].join('\n');
|
|
459
|
+
const warnings = [];
|
|
460
|
+
if (!primaryAction && !dangerAction)
|
|
461
|
+
warnings.push('Mutation or confirmation modals usually need primaryAction or dangerAction for the final action.');
|
|
462
|
+
return {
|
|
463
|
+
action: 'extension_modal_built',
|
|
464
|
+
component: tag,
|
|
465
|
+
snippet,
|
|
466
|
+
normalizedBodyChanges: normalized.changes,
|
|
467
|
+
warnings,
|
|
468
|
+
contract: [
|
|
469
|
+
'Use v-model:open and #header/#body slots; do not use a title prop.',
|
|
470
|
+
'Use primaryAction for ordinary final actions and dangerAction for destructive confirmation.',
|
|
471
|
+
'Body form controls are normalized to class="w-full" unless intentionally compact.',
|
|
472
|
+
'Native buttons in the body are normalized to type="button".',
|
|
473
|
+
],
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
export function reviewExtensionUiContract(code) {
|
|
477
|
+
const source = String(code || '');
|
|
478
|
+
const issues = [];
|
|
479
|
+
const push = (severity, rule, message, suggestion) => issues.push({ severity, rule, message, suggestion });
|
|
480
|
+
if (/<CommonDrawer\b[^>]*(?:\s:title=|\stitle=)/.test(source)) {
|
|
481
|
+
push('error', 'common-drawer-slots', 'CommonDrawer should not use title/:title props in generated extensions.', 'Use #header with a heading, and #body for content.');
|
|
482
|
+
}
|
|
483
|
+
if (/<(?:CommonModal|UModal)\b[^>]*(?:\s:title=|\stitle=)/.test(source)) {
|
|
484
|
+
push('error', 'common-modal-slots', 'CommonModal/UModal should not use title/:title props in generated extensions.', 'Use #header with a heading, and #body for content.');
|
|
485
|
+
}
|
|
486
|
+
if (/<CommonDrawer\b/.test(source) && !/primary-action=/.test(source)) {
|
|
487
|
+
push('warning', 'drawer-primary-action', 'CommonDrawer has no primaryAction.', 'Editing/create drawers should wire Save/Create through primaryAction.');
|
|
488
|
+
}
|
|
489
|
+
if (/<CommonDrawer\b/.test(source) && !/cancel-action=/.test(source)) {
|
|
490
|
+
push('warning', 'drawer-cancel-action', 'CommonDrawer has no cancelAction.', 'Use cancelAction for the ordinary Cancel footer button unless the workflow intentionally has no cancel.');
|
|
491
|
+
}
|
|
492
|
+
if (/<(?:CommonModal|UModal)\b/.test(source) && /delete|remove|confirm|cannot be undone/i.test(source) && !/danger-action=/.test(source)) {
|
|
493
|
+
push('warning', 'modal-danger-action', 'Destructive/confirmation modal has no dangerAction.', 'Wire the final destructive action through dangerAction.');
|
|
494
|
+
}
|
|
495
|
+
const fieldPattern = /<(UInput|UTextarea|USelectMenu|USelect)(\s[^<>]*?)\/?>/g;
|
|
496
|
+
let fieldMatch;
|
|
497
|
+
while ((fieldMatch = fieldPattern.exec(source))) {
|
|
498
|
+
const [, tag, attrs] = fieldMatch;
|
|
499
|
+
const classMatch = attrs.match(/\bclass="([^"]*)"/);
|
|
500
|
+
if (!classMatch || !classMatch[1].split(/\s+/).includes('w-full')) {
|
|
501
|
+
push('warning', 'modal-drawer-field-width', `${tag} is missing class="w-full".`, 'Use class="w-full" for form controls inside modal/drawer body forms unless intentionally inline.');
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
const buttonPattern = /<button(\s[^>]*)?>/g;
|
|
505
|
+
let buttonMatch;
|
|
506
|
+
while ((buttonMatch = buttonPattern.exec(source))) {
|
|
507
|
+
if (!/\btype=/.test(buttonMatch[1] || '')) {
|
|
508
|
+
push('warning', 'native-button-type', 'Native button is missing type="button".', 'Add type="button" unless the button intentionally submits a form.');
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
return {
|
|
512
|
+
action: 'extension_ui_contract_reviewed',
|
|
513
|
+
valid: issues.every((issue) => issue.severity !== 'error'),
|
|
514
|
+
issueCount: issues.length,
|
|
515
|
+
issues,
|
|
516
|
+
nextSteps: issues.length
|
|
517
|
+
? ['Use build_extension_drawer or build_extension_modal for replacement snippets, then apply with patch_extension_code/update_extension_code.']
|
|
518
|
+
: ['Snippet matches the checked modal/drawer contract rules. Still validate the final SFC before saving.'],
|
|
519
|
+
};
|
|
520
|
+
}
|
|
302
521
|
function getExtensionThemeContract() {
|
|
303
522
|
return {
|
|
304
523
|
action: 'extension_theme_contract',
|
|
@@ -363,6 +582,7 @@ function getExtensionThemeContract() {
|
|
|
363
582
|
'Use auto-injected components directly in the template with PascalCase names. Do not call resolveComponent() to manually resolve Nuxt UI/eApp components inside extension SFCs; it can compile but render unresolved lowercase DOM tags such as <ubutton>.',
|
|
364
583
|
'Buttons should have stable geometry: hover may change color, border, or shadow but must not move the button or resize its content. Disabled buttons keep disabled cursor/visual state.',
|
|
365
584
|
'Inputs and textareas should not add hover movement or decorative hover states; focus, invalid, disabled, and loading states must be explicit.',
|
|
585
|
+
'Inside CommonDrawer/CommonModal body forms, UInput, UTextarea, USelect, USelectMenu, and similar field controls must use class="w-full" unless the control is intentionally inline or compact.',
|
|
366
586
|
'Dynamic extensions resolve UModal to the app CommonModal. Do not pass ui.content: "eapp-surface-card" or "surface-card" to UModal/CommonModal; modal content uses the app modal surface and caller ui.content should only append z-index, width, or max-width classes.',
|
|
367
587
|
'CommonModal and CommonDrawer own action-only footers through cancelAction, primaryAction, dangerAction, leadingActions, and footerHint. Pass footer button intent through those props instead of custom footer slots. cancelAction defaults to neutral outline; use dangerAction for irreversible destructive work and tone: "primary" for Keep editing in discard dialogs.',
|
|
368
588
|
'Use custom #footer content only when the footer contains real custom layout or non-button content. Every modal/drawer button should use type="button" unless it intentionally submits a form.',
|
|
@@ -383,13 +603,15 @@ function getExtensionThemeContract() {
|
|
|
383
603
|
shellComponentContracts: {
|
|
384
604
|
CommonDrawer: [
|
|
385
605
|
'Use <CommonDrawer v-model="open" direction="right"> with named slots #header, #body, and optionally #footer.',
|
|
386
|
-
'For action-only footers,
|
|
606
|
+
'For action-only footers, pass cancelAction/primaryAction/dangerAction/leadingActions/footerHint props. Editing drawers must wire Save/Create through primaryAction; destructive edit drawers should wire Delete through dangerAction.',
|
|
607
|
+
'Drawer body form controls such as UInput, UTextarea, USelect, and USelectMenu must use class="w-full" unless they are intentionally inline/compact.',
|
|
387
608
|
'Pass nested when rendering a drawer inside another modal/drawer. Open the drawer immediately, then render loading/error/content inside #body.',
|
|
388
609
|
],
|
|
389
610
|
CommonModal: [
|
|
390
611
|
'Use <CommonModal v-model:open="open"> with named slots #header, #body, and optionally #footer.',
|
|
391
612
|
'UModal tags in dynamic extensions resolve to CommonModal; modal ui.content should only append z-index/width/max-width classes, never surface-card/eapp-surface-card.',
|
|
392
|
-
'Use managed footer props for ordinary Cancel/Save/Delete actions;
|
|
613
|
+
'Use managed footer props for ordinary Cancel/Save/Delete actions; mutation/confirmation modals must wire the final action through primaryAction or dangerAction. Use #footer only for custom layout or non-button content.',
|
|
614
|
+
'Modal body form controls such as UInput, UTextarea, USelect, and USelectMenu must use class="w-full" unless they are intentionally inline/compact.',
|
|
393
615
|
],
|
|
394
616
|
PermissionGate: [
|
|
395
617
|
'Use <PermissionGate :condition="{ or: [{ route: \'/route\', methods: [\'GET\'] }] }"> around sensitive UI.',
|
|
@@ -1831,7 +2053,9 @@ async function runExtensionWorkflow(apiUrl, opts) {
|
|
|
1831
2053
|
'useApi returns refs { data, error, pending, status } plus execute/refresh; it does not auto-run. Pass query/body/filter/deep/aggregate as objects or computed objects, not JSON strings.',
|
|
1832
2054
|
'useNotify exposes success/error/warning/info(title, description?) async helpers; do not pass Nuxt toast object payloads to it.',
|
|
1833
2055
|
'CommonDrawer uses v-model plus #header, #body, optional #footer, and managed footer props cancelAction/primaryAction/dangerAction/leadingActions/footerHint.',
|
|
2056
|
+
'Editing drawers must wire Save/Create through primaryAction, and destructive edit drawers should wire Delete through dangerAction. Confirmation modals must wire their final action through primaryAction or dangerAction.',
|
|
1834
2057
|
'CommonModal uses v-model:open plus #header, #body, optional #footer; UModal resolves to CommonModal in dynamic extensions.',
|
|
2058
|
+
'Form controls inside CommonDrawer/CommonModal bodies must use class="w-full" unless intentionally inline/compact.',
|
|
1835
2059
|
'PermissionGate renders the permitted slot directly and is UX-only; backend permissions and owner checks remain authoritative.',
|
|
1836
2060
|
'For menu/account-panel notifications, use counts only when the signal source already owns an exact count; otherwise use a dot/chip for new attention.',
|
|
1837
2061
|
'Do not fetch destination domain lists solely to decorate the shell; destination pages own domain fetching after click.',
|
|
@@ -1840,6 +2064,17 @@ async function runExtensionWorkflow(apiUrl, opts) {
|
|
|
1840
2064
|
};
|
|
1841
2065
|
}
|
|
1842
2066
|
export function registerPlatformOperationTools(server, ENFYRA_API_URL) {
|
|
2067
|
+
const extensionFooterActionSchema = z.object({
|
|
2068
|
+
label: z.string().optional().describe('Static action label. Use labelExpression instead for dynamic labels.'),
|
|
2069
|
+
labelExpression: z.string().optional().describe('Raw Vue expression for a dynamic label, e.g. mode === "create" ? "Create" : "Save".'),
|
|
2070
|
+
icon: z.string().optional().describe('Optional icon name such as lucide:save or lucide:trash-2.'),
|
|
2071
|
+
loading: z.string().optional().describe('Raw Vue expression/ref name for loading state, e.g. saving.'),
|
|
2072
|
+
disabled: z.string().optional().describe('Raw Vue expression/ref name for disabled state, e.g. saving || !canSubmit.'),
|
|
2073
|
+
color: z.string().optional().describe('Optional component-supported color. Usually omit and let the managed action choose intent.'),
|
|
2074
|
+
variant: z.string().optional().describe('Optional component-supported variant. Usually omit and let the managed action choose intent.'),
|
|
2075
|
+
tone: z.string().optional().describe('Optional action tone when supported by the shell component.'),
|
|
2076
|
+
onClick: z.string().describe('Raw Vue expression or function reference for the click handler, e.g. saveNote or () => (open = false).'),
|
|
2077
|
+
});
|
|
1843
2078
|
server.tool('validate_dynamic_script', [
|
|
1844
2079
|
'Validate Enfyra dynamic script code before saving it to any script-backed metadata record.',
|
|
1845
2080
|
'Use this before create/update of handlers, hooks, flow steps, websocket scripts, GraphQL scripts, or bootstrap scripts when the user is iterating on code.',
|
|
@@ -1913,6 +2148,45 @@ export function registerPlatformOperationTools(server, ENFYRA_API_URL) {
|
|
|
1913
2148
|
'Call this whenever you need the exact eapp-* class name or the Nuxt UI color mapping for shell, system page, or dynamic extension UI.',
|
|
1914
2149
|
'Source of truth: documents/app/theme-color-contract.md.',
|
|
1915
2150
|
].join(' '), {}, async () => jsonText(getThemeClassReference()));
|
|
2151
|
+
server.tool('build_extension_drawer', [
|
|
2152
|
+
'Generate a contract-safe CommonDrawer Vue snippet for Enfyra admin extensions.',
|
|
2153
|
+
'Use this before writing or patching drawer/editing workflows so the model does not have to remember CommonDrawer slots, footer action props, full-width fields, or button type rules.',
|
|
2154
|
+
'The tool returns code only; apply it with patch_extension_code or update_extension_code and then validate/save normally.',
|
|
2155
|
+
].join(' '), {
|
|
2156
|
+
model: z.string().optional().default('drawerOpen').describe('Vue state variable used with v-model.'),
|
|
2157
|
+
title: z.string().optional().describe('Static drawer title.'),
|
|
2158
|
+
titleExpression: z.string().optional().describe('Raw Vue expression for a dynamic title.'),
|
|
2159
|
+
direction: z.enum(['right', 'left', 'top', 'bottom']).optional().default('right').describe('Drawer direction.'),
|
|
2160
|
+
nested: z.boolean().optional().default(false).describe('Set true when rendering a drawer inside another modal/drawer.'),
|
|
2161
|
+
handleOnly: z.boolean().optional().default(false).describe('Set true only when the drawer should use handle-only behavior.'),
|
|
2162
|
+
body: z.string().describe('Vue template body content for #body. UInput/UTextarea/select controls are normalized to w-full; native buttons get type="button".'),
|
|
2163
|
+
cancelAction: z.union([extensionFooterActionSchema, z.literal(false)]).optional().describe('Cancel action object. Omit for a default Cancel that closes the model; false disables cancelAction.'),
|
|
2164
|
+
primaryAction: extensionFooterActionSchema.optional().describe('Primary action. Editing/create drawers should wire Save/Create here.'),
|
|
2165
|
+
dangerAction: extensionFooterActionSchema.optional().describe('Danger action. Destructive edit drawers should wire Delete here.'),
|
|
2166
|
+
footerHint: z.string().optional().describe('Optional footer hint text when supported by CommonDrawer.'),
|
|
2167
|
+
}, async (input) => jsonText(buildExtensionDrawerSnippet(input)));
|
|
2168
|
+
server.tool('build_extension_modal', [
|
|
2169
|
+
'Generate a contract-safe CommonModal/UModal Vue snippet for Enfyra admin extensions.',
|
|
2170
|
+
'Use this before writing or patching confirmation/edit modals so the model does not have to remember v-model:open, slots, final action props, full-width fields, or button type rules.',
|
|
2171
|
+
'The tool returns code only; apply it with patch_extension_code or update_extension_code and then validate/save normally.',
|
|
2172
|
+
].join(' '), {
|
|
2173
|
+
model: z.string().optional().default('modalOpen').describe('Vue state variable used with v-model:open.'),
|
|
2174
|
+
title: z.string().optional().describe('Static modal title.'),
|
|
2175
|
+
titleExpression: z.string().optional().describe('Raw Vue expression for a dynamic title.'),
|
|
2176
|
+
alias: z.enum(['CommonModal', 'UModal']).optional().default('CommonModal').describe('Use UModal only when preserving an existing UModal tag is useful; dynamic extensions resolve it to CommonModal.'),
|
|
2177
|
+
body: z.string().describe('Vue template body content for #body. UInput/UTextarea/select controls are normalized to w-full; native buttons get type="button".'),
|
|
2178
|
+
cancelAction: z.union([extensionFooterActionSchema, z.literal(false)]).optional().describe('Cancel action object. Omit for a default Cancel that closes the model; false disables cancelAction.'),
|
|
2179
|
+
primaryAction: extensionFooterActionSchema.optional().describe('Primary final action for non-destructive submit/confirm flows.'),
|
|
2180
|
+
dangerAction: extensionFooterActionSchema.optional().describe('Danger final action for destructive confirmation flows.'),
|
|
2181
|
+
footerHint: z.string().optional().describe('Optional footer hint text when supported by CommonModal.'),
|
|
2182
|
+
}, async (input) => jsonText(buildExtensionModalSnippet(input)));
|
|
2183
|
+
server.tool('review_extension_ui_contract', [
|
|
2184
|
+
'Review an Enfyra extension Vue snippet for common modal/drawer contract mistakes.',
|
|
2185
|
+
'Use this before patching or saving generated extension UI when CommonDrawer, CommonModal, UModal, UInput, UTextarea, USelect, or native buttons are involved.',
|
|
2186
|
+
'This is a static contract review, not a compiler validation; still validate the final SFC before saving.',
|
|
2187
|
+
].join(' '), {
|
|
2188
|
+
code: z.string().describe('Vue SFC or template snippet to review.'),
|
|
2189
|
+
}, async ({ code }) => jsonText(reviewExtensionUiContract(code)));
|
|
1916
2190
|
server.tool('extension_workflow', [
|
|
1917
2191
|
'Step-by-step workflow for creating or updating Enfyra admin page, global, or widget extensions.',
|
|
1918
2192
|
'Use this when an LLM is building extension UI, menu shell notifications, account panel entries, or page/menu wiring and should follow live nextSteps instead of guessing raw enfyra_extension mutations.',
|