@enfyra/mcp-server 0.0.113 → 0.0.116
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/package.json
CHANGED
package/src/lib/mcp-examples.js
CHANGED
|
@@ -1531,7 +1531,7 @@ ensure_page_extension({
|
|
|
1531
1531
|
name: "ReportsPage",
|
|
1532
1532
|
description: "Reports dashboard",
|
|
1533
1533
|
menuId: "<created-menu-id>",
|
|
1534
|
-
code: "<template><section class=\\"min-h-full w-full space-y-4\\"><div class=\\"grid gap-4 md:grid-cols-2 xl:grid-cols-3\\"><article class=\\"
|
|
1534
|
+
code: "<template><section class=\\"min-h-full w-full space-y-4\\"><div class=\\"grid gap-4 md:grid-cols-2 xl:grid-cols-3\\"><article class=\\"surface-card p-4\\"><div class=\\"flex items-start justify-between gap-3\\"><div><p class=\\"text-sm font-medium text-[var(--text-tertiary)]\\">Total</p><p class=\\"mt-2 text-2xl font-semibold text-[var(--text-primary)]\\">0</p></div><span class=\\"eapp-identity-soft rounded-[var(--radius-control)] p-2\\"><span class=\\"eapp-identity-text\\">◆</span></span></div><div class=\\"mt-3 h-1.5 overflow-hidden rounded-[var(--radius-pill)] bg-[var(--surface-muted)]\\"><div class=\\"eapp-identity-solid h-full w-1/2\\"></div></div></article><article class=\\"eapp-identity-surface rounded-[var(--radius-panel)] border p-4\\"><p class=\\"text-sm font-semibold text-[var(--text-primary)]\\">Selected report</p><p class=\\"mt-1 text-sm text-[var(--text-tertiary)]\\">Only selected/current identity blocks use identity surface.</p></article></div></section></template><script setup>const { registerPageHeader } = usePageHeaderRegistry(); const { register: registerHeaderActions } = useHeaderActionRegistry(); registerPageHeader({ title: 'Reports', description: 'Operational report overview.', leadingIcon: 'lucide:bar-chart-3', gradient: 'none', variant: 'minimal' }); registerHeaderActions([{ id: 'refresh-reports', label: 'Refresh', icon: 'lucide:refresh-cw', color: 'neutral', variant: 'outline', onClick: () => {}, order: 80 }])</script>",
|
|
1535
1535
|
isEnabled: true
|
|
1536
1536
|
})`,
|
|
1537
1537
|
notes: [
|
|
@@ -1547,7 +1547,10 @@ ensure_page_extension({
|
|
|
1547
1547
|
'Page extensions should be full-bleed by default and responsive from the first version.',
|
|
1548
1548
|
'The extension root is already inside Enfyra admin page main; do not add root-level page padding.',
|
|
1549
1549
|
'Use existing eApp theme variables for panels, rows, badges, borders, controls, radius, and text. Pair border/divide utilities with border-[var(--border-default)] or divide-[var(--border-default)] so light and dark themes stay consistent.',
|
|
1550
|
-
'Treat primary color as runtime-configurable by the app color picker. For Nuxt UI components, choose color="primary" by semantic intent
|
|
1550
|
+
'Treat primary color as runtime-configurable by the app color picker. For Nuxt UI components, choose color="primary" by semantic intent. For custom extension UI, decide whether each element is neutral surface, runtime-primary identity, or status: regular panels/KPI cards/list rows use surface-card/surface-muted or --card-* tokens, while selected/current identity blocks, primary tiles, progress fills, primary icons, and primary CTA fills use eapp-identity-surface, eapp-identity-soft, eapp-identity-solid, or eapp-identity-text so the color picker controls them.',
|
|
1551
|
+
'Decision cases: normal decorative accents, feature icons, non-state tiles, active tabs, progress fills, selected segments, and primary actions use runtime primary/identity classes; true semantic states use their matching status colors such as error, warning, success, or info; large ordinary surfaces stay neutral and carry only small badges/icons for status; selected/current entity blocks may use eapp-identity-surface.',
|
|
1552
|
+
'Pattern examples: KPI/metric cards should be surface-card with a small eapp-identity-soft icon tile; selected/current entity cards may use eapp-identity-surface; progress bars use bg-[var(--surface-muted)] tracks plus eapp-identity-solid fills; list rows use neutral surfaces/dividers and only small chips inside; primary scope actions use UButton color="primary" variant="solid"; secondary actions use neutral variants.',
|
|
1553
|
+
'Status colors belong only in UBadge/token-backed badges, small icons, or short status text. Do not color large panels, alert-like success blocks, KPI cards, list containers, or attention/reconciliation blocks green/yellow/red because of state; keep the block neutral and place the status badge/icon inside.',
|
|
1551
1554
|
'Use PageHeader gradient: "none" for generated operational pages unless the user explicitly asks for a decorative page accent; do not hardcode cyan/violet/purple/blue/green gradients.',
|
|
1552
1555
|
'For general card grids inside the shell, use md:grid-cols-2 xl:grid-cols-3 instead of lg:grid-cols-3 because the desktop sidebar leaves tablet-width content at 1024px.',
|
|
1553
1556
|
'Do not use Nuxt UI neutral semantic classes such as bg-default, text-muted, text-dimmed, border-default, or divide-default inside extension code; use eApp tokens/classes.',
|
|
@@ -302,9 +302,10 @@ function getExtensionThemeContract() {
|
|
|
302
302
|
],
|
|
303
303
|
theme: [
|
|
304
304
|
'Use existing eApp theme variables/classes, not hardcoded light or dark colors. The app theme source of truth is CSS variables, including --brand-*, --surface-*, --card-*, --control-*, --action-*, --badge-*, --radius-*, --border-*, and --text-*.',
|
|
305
|
-
'Primary color is runtime-configurable through the app color picker. For Nuxt UI components, choose color="primary" by semantic intent and let the app map it through the primary contract; do not choose a concrete palette. For custom extension
|
|
305
|
+
'Primary color is runtime-configurable through the app color picker and must affect extension identity UI. For Nuxt UI components, choose color="primary" by semantic intent and let the app map it through the primary contract; do not choose a concrete palette. For custom extension UI, first choose whether the element is neutral surface, runtime-primary identity, or status. Regular panels, KPI cards, list rows, and large content blocks should use surface-card/surface-muted or --card-* tokens. Entity identity, selected/current state, active progress, primary tiles, primary icons, and primary CTA fills should use eapp-identity-surface, eapp-identity-soft, eapp-identity-solid, eapp-identity-text, or UButton/UBadge color="primary" so the color picker controls them.',
|
|
306
|
+
'Use eapp-identity-surface only for larger entity/feature blocks, selected/current cards, tiles, or cards that should read like normal app cards with a very subtle active-primary tint; it is not a saturated selected-state fill and must not be applied broadly to every KPI/list wrapper. Add eapp-identity-surface-hover when that block is clickable. Use eapp-identity-soft for compact selected entity chips, pills, small icon tiles, and identity callouts; add eapp-identity-soft-hover when compact surfaces are clickable; use eapp-identity-solid only for primary identity fills; use eapp-identity-text for identity icons or inline text. The eapp-accent-* aliases are still available for the same runtime-primary intent, but eapp-identity-* is preferred when the UI element represents an entity or feature identity.',
|
|
306
307
|
'Nuxt UI secondary is still a valid semantic color when the product intentionally wants a secondary action or state. Do not use color="secondary", from-secondary-*, bg-secondary-*, text-secondary-*, or cyan/purple/green palette utilities merely to approximate an entity accent; use eapp-identity-* and let the app decide the color.',
|
|
307
|
-
'Do not make custom extension blocks with Tailwind palette utilities or raw primary utilities such as text-primary, bg-primary/10, border-primary, ring-primary/20, from-cyan-*, text-violet-*, bg-green-*, or dark:bg-zinc-950. The app owns how eapp-identity-* and eapp-accent-* map to the active color picker value.',
|
|
308
|
+
'Do not make custom extension blocks with Tailwind palette utilities or raw primary utilities such as text-primary, bg-primary/10, border-primary, ring-primary/20, from-cyan-*, text-violet-*, bg-green-*, bg-emerald-*, text-green-*, border-green-*, or dark:bg-zinc-950. The app owns how eapp-identity-* and eapp-accent-* map to the active color picker value.',
|
|
308
309
|
'Use UButton color="primary" only for the single main action for the current scope. Refresh, back, navigation, filters, and secondary actions should be neutral variants unless they are the main mutation.',
|
|
309
310
|
'PageHeader gradient must be "none" for generated operational extensions unless the user explicitly asks for a decorative page accent. Do not hardcode cyan, violet, purple, blue, or green PageHeader gradients to force color variety.',
|
|
310
311
|
'Do not inject global CSS, create theme guards, redefine the app palette, or solve one extension by overriding the whole app shell.',
|
|
@@ -312,9 +313,35 @@ function getExtensionThemeContract() {
|
|
|
312
313
|
'Never use Nuxt UI neutral semantic classes such as bg-default, bg-muted, border-default, divide-default, text-muted, text-dimmed, or hardcoded dark palettes such as dark:bg-zinc-950, bg-slate-*, text-gray-*, border-black, or black.',
|
|
313
314
|
'Never use bare border/divide-y for panels or rows: pair them with border-[var(--border-default)] or divide-[var(--border-default)].',
|
|
314
315
|
'Use radius tokens or mapped rounded utilities consistently: --radius-card for cards, --radius-panel for nested panels, --radius-control for buttons/inputs, --radius-subcontrol for compact inner controls, and --radius-pill for pills.',
|
|
315
|
-
'Status colors must remain readable in both themes. Use UBadge or badge tokens for non-primary statuses such as --badge-success-soft-*, --badge-warning-soft-*, --badge-danger-soft-*, --badge-info-soft-*, and --badge-neutral-soft-* instead of neon translucent colors.',
|
|
316
|
+
'Status colors must remain readable in both themes and must stay scoped to badges, small icons, or short status text. Use UBadge or badge tokens for non-primary statuses such as --badge-success-soft-*, --badge-warning-soft-*, --badge-danger-soft-*, --badge-info-soft-*, and --badge-neutral-soft-* instead of neon translucent colors. Do not color large panels, alert-like success blocks, KPI cards, list containers, or reconciliation/attention blocks green/yellow/red because the status is good/warning/error; use neutral app surfaces for the block and place a small status badge/icon inside.',
|
|
316
317
|
'Keep dark and light contrast comparable. Do not make dark mode more neon or lower-contrast than light mode; prefer muted soft backgrounds with clear text and visible borders.',
|
|
317
318
|
],
|
|
319
|
+
decisionCases: [
|
|
320
|
+
{
|
|
321
|
+
intent: 'Normal accent, decorative icon, feature icon, non-state tile, active tab fill, progress fill, selected segment, primary metric accent, or primary action.',
|
|
322
|
+
colorContract: 'Use runtime primary so the app color picker controls the color.',
|
|
323
|
+
use: 'UButton/UBadge color="primary", eapp-identity-soft, eapp-identity-solid, eapp-identity-text, or eapp-identity-surface when the whole block is selected/current identity.',
|
|
324
|
+
avoid: 'Do not pick cyan, purple, green, amber, secondary, or concrete Tailwind palettes just because they look good.',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
intent: 'True semantic state: error, danger, destructive, warning, pending attention, success, healthy, running, failed, info, or notice.',
|
|
328
|
+
colorContract: 'Use the matching state/status color because the color communicates meaning, not brand identity.',
|
|
329
|
+
use: 'UAlert/UBadge color="error|warning|success|info|neutral", state/badge tokens such as --badge-success-soft-*, or error/warning/info/success utilities that are already backed by app tokens.',
|
|
330
|
+
avoid: 'Do not force semantic state UI to primary; an error must stay error, a warning must stay warning, success can stay success when it is a badge/icon/short status.',
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
intent: 'Large ordinary surface: KPI card, list container, table panel, detail panel, summary block, empty state panel, reconciliation block, or attention block.',
|
|
334
|
+
colorContract: 'Use neutral app surfaces first; large surfaces should not become state-colored or arbitrary accent-colored.',
|
|
335
|
+
use: 'surface-card, surface-card-hover, surface-muted, bg-[var(--card-bg)], border-[var(--card-border)], divide-[var(--border-default)], and text tokens.',
|
|
336
|
+
avoid: 'Do not color large blocks green/yellow/red because their content says healthy/warning/error; place a status badge/icon inside the neutral block instead.',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
intent: 'Selected/current entity or user-selected option where the whole block is the active identity.',
|
|
340
|
+
colorContract: 'Use runtime primary identity surface, but subtly.',
|
|
341
|
+
use: 'eapp-identity-surface plus optional eapp-identity-surface-hover; eapp-identity-soft/text for the icon or chip inside.',
|
|
342
|
+
avoid: 'Do not use eapp-identity-surface for every card in a grid/list or as a broad page background.',
|
|
343
|
+
},
|
|
344
|
+
],
|
|
318
345
|
components: [
|
|
319
346
|
'Use Nuxt UI/eApp components for normal controls: UButton, UInput, UTextarea, USelectMenu/USelect, USwitch, UCheckbox, UTabs, UBadge, UModal, and CommonDrawer when available.',
|
|
320
347
|
'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.',
|
|
@@ -339,7 +366,39 @@ function getExtensionThemeContract() {
|
|
|
339
366
|
'UI checks are only guidance; handlers/hooks must independently enforce owner/root-admin authorization.',
|
|
340
367
|
'Use the most specific business route or MCP tool. Do not write directly to raw tables when a domain route exists.',
|
|
341
368
|
],
|
|
342
|
-
|
|
369
|
+
patternExamples: [
|
|
370
|
+
{
|
|
371
|
+
useWhen: 'Ordinary KPI, metric, or summary card where the whole card is not selected/current identity.',
|
|
372
|
+
use: 'Neutral card surface; put runtime-primary only on a small identity icon tile, progress fill, or main CTA inside the card.',
|
|
373
|
+
snippet: '<article class="surface-card p-4"><div class="flex items-start justify-between gap-3"><div><p class="text-sm text-[var(--text-tertiary)]">Metric</p><p class="mt-2 text-2xl font-semibold text-[var(--text-primary)]">{{ value }}</p></div><span class="eapp-identity-soft rounded-[var(--radius-control)] p-2"><UIcon name="lucide:square-stack" class="size-5 eapp-identity-text" /></span></div></article>',
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
useWhen: 'Selected/current entity, active plan, chosen package, or the single block that represents the active identity.',
|
|
377
|
+
use: 'eapp-identity-surface for the selected/current block, with eapp-identity-soft/text for compact icon parts.',
|
|
378
|
+
snippet: '<article class="eapp-identity-surface eapp-identity-surface-hover rounded-[var(--radius-panel)] border p-4"><div class="flex items-center gap-3"><span class="eapp-identity-soft rounded-[var(--radius-control)] p-2"><UIcon name="lucide:box" class="size-5 eapp-identity-text" /></span><div><p class="font-semibold text-[var(--text-primary)]">{{ name }}</p><p class="text-sm text-[var(--text-tertiary)]">Currently selected</p></div></div></article>',
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
useWhen: 'Progress, active tab indicator, selected segment fill, or primary visual meter.',
|
|
382
|
+
use: 'Neutral track plus eapp-identity-solid fill so the app color picker controls the fill.',
|
|
383
|
+
snippet: '<div class="h-1.5 overflow-hidden rounded-[var(--radius-pill)] bg-[var(--surface-muted)]"><div class="eapp-identity-solid h-full" :style="{ width: progressWidth }"></div></div>',
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
useWhen: 'Success, warning, error, info, healthy, running, failed, pending, or attention status.',
|
|
387
|
+
use: 'UBadge/status badge tokens and optionally a small icon only. Keep large alert/panel/card backgrounds neutral unless the whole block is an identity block.',
|
|
388
|
+
snippet: '<section class="surface-card p-4"><div class="flex items-center justify-between gap-3"><p class="font-semibold text-[var(--text-primary)]">Reconciliation</p><UBadge color="success" variant="soft">Healthy</UBadge></div><p class="mt-1 text-sm text-[var(--text-tertiary)]">Latest report found no mismatches.</p></section>',
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
useWhen: 'List rows, table-like records, history rows, and secondary navigation rows.',
|
|
392
|
+
use: 'Neutral row surface, tokenized dividers, hover surface-muted, with small status/identity chips inside.',
|
|
393
|
+
snippet: '<div class="surface-card divide-y divide-[var(--border-default)]"><button class="flex w-full items-center justify-between px-4 py-3 text-left hover:bg-[var(--surface-muted)]"><span class="text-sm font-medium text-[var(--text-primary)]">{{ row.name }}</span><UBadge color="neutral" variant="soft">{{ row.state }}</UBadge></button></div>',
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
useWhen: 'Primary action for the current scope, such as create/save/apply/open-current.',
|
|
397
|
+
use: 'UButton color="primary" variant="solid"; secondary actions stay neutral.',
|
|
398
|
+
snippet: '<div class="flex justify-end gap-2"><UButton color="neutral" variant="outline">Cancel</UButton><UButton color="primary" variant="solid" icon="lucide:save">Save</UButton></div>',
|
|
399
|
+
},
|
|
400
|
+
],
|
|
401
|
+
compactExample: '<template><section class="min-h-full w-full space-y-4"><article class="surface-card p-4"><div class="flex items-start justify-between gap-3"><div><p class="text-sm text-[var(--text-tertiary)]">Neutral KPI</p><p class="mt-2 text-2xl font-semibold text-[var(--text-primary)]">24</p></div><span class="eapp-identity-soft rounded-[var(--radius-control)] p-2"><UIcon name="lucide:square-stack" class="size-5 eapp-identity-text" /></span></div><div class="mt-3 h-1.5 overflow-hidden rounded-[var(--radius-pill)] bg-[var(--surface-muted)]"><div class="eapp-identity-solid h-full w-1/2"></div></div></article><section class="surface-card p-4"><div class="flex items-center justify-between gap-3"><p class="font-semibold text-[var(--text-primary)]">Status block stays neutral</p><UBadge color="success" variant="soft">Healthy</UBadge></div></section></section></template>',
|
|
343
402
|
};
|
|
344
403
|
}
|
|
345
404
|
|