fayzfayz sdk
PTEN

Plugin manifest — reference

The complete PluginManifest reference — every field a plugin can declare and what the runtime does with it. For the conceptual introduction, see Plugin manifest.

The canonical type lives in @fayz-ai/core (PluginManifest). A plugin — official or app-local — is always a factory that returns this object.

Identity fields

FieldTypeRequiredDescription
idstringyesUnique plugin identifier.
namestringyesDisplay name.
iconstringyesIcon name.
versionstringyesPlugin version (semver).
apiVersionnumbernoPlugin contract version. The runtime refuses a plugin built for a newer contract than it supports. Omit = legacy/compatible.
descriptionstringnoShort description.
scopePluginScopenocore · vertical · universal · addon · tenant.
verticalIdVerticalIdnobeauty · food · health · services · retail · education · (custom).
scaffoldsScaffoldType[]noScaffolds the plugin supports. Omit = universal.
defaultEnabledbooleannoWhether it ships turned on.
dependenciesstring[]noIds of other plugins it depends on.
tenantIdstringnoBinds the plugin to a specific tenant (per-tenant instances).
schemastringnoDatabase schema the plugin's tables live in.

UI and navigation

FieldTypeRequiredDescription
navigationPluginNavigationEntry[]yesMenu items. Each one: section (main/secondary/settings), position, label, route, icon?, badge?, permission?.
routesPluginRouteDefinition[]yesRoutes. Each one: path, component or componentId, guard? (authenticated/role/public/share-token), roles?, permission?, fullBleed?.
settingsPluginSettingsTab[]noTabs on the settings screen. id, label, component/componentId, order?, permission?.
widgetsPluginWidgetDefinition[]noComponents injected into shell zones. id, zone (WidgetZone), component/componentId, order?, visibility?.
dashboardWidgetsDashboardWidgetDef[]noKPIs/charts/tables contributed to the dashboard. id, title, kind (kpi/chart/table/onboarding/custom), span?, surfaces?.
onboardingPluginOnboardingnoFirst-run flow. component/componentId, title?, description?.

Component by value or by id: everywhere (routes, tabs, widgets) you supply either component (the React component directly) or componentId (an id resolved by the registry) — exactly one.

Behavior and integration

FieldTypeDescription
eventsPluginEventDefinition[]Events the plugin emits on the bus. Namespaced name (agenda.booking.confirmed), description?, payloadSchema?.
capabilitiesPluginCapability[]Declared capabilities. id, label, kind? (page/widget/data/integration).
aiToolsPluginAITool[]Tools for an AI agent. id, name, description, mode (read/persist), parameters?, permission?, suggestions?.
connectorsConnectorDefinition[]Connectors for external providers (the plugin as an addon to a host). See the Integrations catalog.
registriesPluginRegistryDef[]Entities registered with seedData/mockData and a display (table/cards/tree).

Data, permissions and diagnostics

FieldTypeDescription
entitiesstring[]Data entities the plugin registers.
permissionsstring[]Permissions the plugin uses.
declaredFeaturesFeatureDeclaration[]Features declared for access control.
migrationsPluginMigration[]The SQL for the plugin's tables. Each one: id, version, sql, description?.
diagnosticsPluginDiagnostic[]Backend prerequisites checked by fayz doctor. requires (rpcs/views/tables/migrations/env), level? (error/warn/info).
localesRecord<string, Record<string, string>>Translations per language.

Minimal example

The plugin the incubator generates — the smallest manifest that's both valid and useful:

import type { PluginManifest } from '@fayz-ai/core'

export function createLoyaltyPlugin(): PluginManifest {
  const Page = () => /* ... */ null
  return {
    id: 'loyalty',
    name: 'Loyalty',
    icon: 'Puzzle',
    version: '0.1.0',
    navigation: [
      { section: 'main', position: 50, label: 'Loyalty', route: '/loyalty', icon: 'Puzzle' },
    ],
    routes: [{ path: '/loyalty', component: Page }],
  }
}

Example with seams

The same plugin declaring data, permissions and a diagnostic:

return {
  id: 'loyalty',
  name: 'Loyalty',
  icon: 'Puzzle',
  version: '0.1.0',
  apiVersion: 1,
  navigation: [{ section: 'main', position: 50, label: 'Loyalty', route: '/loyalty', icon: 'Award' }],
  routes: [{ path: '/loyalty', component: Page }],
  permissions: ['loyalty:read', 'loyalty:write'],
  migrations: [{ id: 'loyalty-0001', version: '0.1.0', sql: 'create table loyalty_points (...)' }],
  diagnostics: [
    { id: 'loyalty-tables', requires: { tables: ['loyalty_points'] }, level: 'warn' },
  ],
  locales: {
    'pt-BR': { 'loyalty.title': 'Fidelidade' },
    en: { 'loyalty.title': 'Loyalty' },
  },
}

Next: the tool that validates all of this, in CLI.