ObjectStackObjectStack

App

App protocol schemas

Base Navigation Item Schema

Shared properties for all navigation types.

NAMING CONVENTION:

Navigation item IDs are used in URLs and configuration and must be lowercase snake_case.

@example Good IDs

  • 'menu_accounts'

  • 'page_dashboard'

  • 'nav_settings'

@example Bad IDs (will be rejected)

  • 'MenuAccounts' (PascalCase)

  • 'Page Dashboard' (spaces)

Source: packages/spec/src/ui/app.zod.ts

TypeScript Usage

import { ActionNavItem, App, AppBranding, AppContextSelector, ComponentNavItem, DashboardNavItem, GroupNavItem, NavigationArea, NavigationContribution, NavigationItem, ObjectNavItem, PageNavItem, ReportNavItem, UrlNavItem } from '@objectstack/spec/ui';
import type { ActionNavItem, App, AppBranding, AppContextSelector, ComponentNavItem, DashboardNavItem, GroupNavItem, NavigationArea, NavigationContribution, NavigationItem, ObjectNavItem, PageNavItem, ReportNavItem, UrlNavItem } from '@objectstack/spec/ui';

// Validate data
const result = ActionNavItem.parse(data);

ActionNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
actionDefObjectAction definition to execute when clicked

App

Properties

PropertyTypeRequiredDescription
namestringApp unique machine name (lowercase snake_case)
labelstringApp display label
versionstringoptionalApp version
descriptionstringoptionalApp description
iconstringoptionalApp icon used in the App Launcher
brandingObjectoptionalApp-specific branding
activebooleanoptionalWhether the app is enabled
isDefaultbooleanoptionalIs default app
hiddenbooleanoptionalHide from the App Switcher; the shell surfaces hidden apps via the avatar menu instead
navigation[__schema0](./__schema0)[]optionalFull navigation tree for the app sidebar
areasObject[]optionalNavigation areas for partitioning navigation by business domain
contextSelectorsObject[]optionalApp-level scope dropdowns whose value is injected into nav items as {<id>} template vars
homePageIdstringoptionalID of the navigation item to serve as landing page
requiredPermissionsstring[]optionalPermissions required to access this app
objectsany[]optionalObjects belonging to this app
apisany[]optionalCustom APIs belonging to this app
sharingObjectoptionalPublic sharing configuration
embedObjectoptionalIframe embedding configuration
mobileNavigationObjectoptionalMobile-specific navigation configuration
defaultAgentstringoptionalName of the default AI agent for this app (used by the ambient chat endpoint)
ariaObjectoptionalARIA accessibility attributes for the application
protectionObjectoptionalPackage author protection block — lock policy for this app.
_lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>optionalItem-level lock — controls overlay & delete (ADR-0010).
_lockReasonstringoptionalHuman-readable reason shown when a write is refused by _lock.
_lockSourceEnum<'artifact' | 'package' | 'env-forced'>optionalLayer that set _lock (artifact | package | env-forced).
_provenanceEnum<'package' | 'org' | 'env-forced'>optionalOrigin of the item (package | org | env-forced).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.

AppBranding

Properties

PropertyTypeRequiredDescription
primaryColorstringoptionalPrimary theme color hex code
logostringoptionalCustom logo URL for this app
faviconstringoptionalCustom favicon URL for this app

AppContextSelector

Properties

PropertyTypeRequiredDescription
idstringSelector id; selected value is exposed as the nav template var {<id>}
labelstringDropdown label
iconstringoptionalIcon name
optionsSourceObjectOption data source
includeAllbooleanPrepend an "All" option that clears the scope
allValuestringTemplate value when "All" is selected (empty = no filter)
persistEnum<'query' | 'session' | 'none'>Persist selection via URL query, sessionStorage, or not at all
placementEnum<'sidebar_header' | 'topbar'>Render location in the app chrome

ComponentNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
componentRefstringComponent registry key (e.g. "metadata:directory")
paramsRecord<string, any>optionalProps passed to the component

DashboardNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
dashboardNamestringTarget dashboard name

GroupNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
expandedbooleanoptionalDefault expansion state in sidebar

Properties

PropertyTypeRequiredDescription
idstringUnique area identifier (lowercase snake_case)
labelstringArea display label
iconstringoptionalArea icon name
ordernumberoptionalSort order among areas (lower = first)
descriptionstringoptionalArea description
visiblestring | ObjectoptionalVisibility predicate (CEL) for this area.
requiredPermissionsstring[]optionalPermissions required to access this area
navigation[__schema0](./__schema0)[]Navigation items within this area

A navigation contribution: a package injecting nav items into an app it does not own (ADR-0029 D7)

Properties

PropertyTypeRequiredDescription
appstringTarget app name to contribute navigation into (e.g. "setup")
groupstringoptionalTarget group nav-item id to append into (e.g. "group_integrations"); omit to append at the app top level
priorityintegeroptionalMerge priority within the target group — lower applied first (matches object extender priority)
items[__schema0](./__schema0)[]Navigation items contributed into the target app/group

Union Options

This schema accepts one of the following structures:

Option 1

Type: object

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
objectNamestringTarget object name
viewNamestringoptionalDefault list view to open. Defaults to "all". Ignored when recordId is set.
recordIdstringoptionalNavigate directly to this record id instead of the list view. Supports template vars: {current_user_id}, {current_org_id}.
recordModeEnum<'view' | 'edit'>optionalOpen the record in view (default) or edit mode. Only meaningful when recordId is set.
filtersRecord<string, string>optionalURL filter conditions — targets the /:objectName/data bare surface via filter[<field>]=<value> params instead of a saved view. Values support template vars {current_user_id}, {current_org_id}. Mutually exclusive with recordId/viewName.
children[#](./#)[]optionalChild navigation items (e.g. specific views)

Option 2

Type: dashboard

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
dashboardNamestringTarget dashboard name

Option 3

Type: page

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
pageNamestringTarget custom page component name
paramsRecord<string, any>optionalParameters passed to the page context

Option 4

Type: url

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
urlstringTarget external URL
targetEnum<'_self' | '_blank'>optionalLink target window

Option 5

Type: report

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
reportNamestringTarget report name

Option 6

Type: action

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
actionDefObjectAction definition to execute when clicked

Option 7

Type: component

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
componentRefstringComponent registry key (e.g. "metadata:directory")
paramsRecord<string, any>optionalProps passed to the component

Option 8

Type: group

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
expandedbooleanoptionalDefault expansion state in sidebar
children[#](./#)[]Child navigation items


ObjectNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
objectNamestringTarget object name
viewNamestringoptionalDefault list view to open. Defaults to "all". Ignored when recordId is set.
recordIdstringoptionalNavigate directly to this record id instead of the list view. Supports template vars: {current_user_id}, {current_org_id}.
recordModeEnum<'view' | 'edit'>optionalOpen the record in view (default) or edit mode. Only meaningful when recordId is set.
filtersRecord<string, string>optionalURL filter conditions — targets the /:objectName/data bare surface via filter[<field>]=<value> params instead of a saved view. Values support template vars {current_user_id}, {current_org_id}. Mutually exclusive with recordId/viewName.

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
pageNamestringTarget custom page component name
paramsRecord<string, any>optionalParameters passed to the page context

ReportNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
reportNamestringTarget report name

UrlNavItem

Properties

PropertyTypeRequiredDescription
idstringUnique identifier for this navigation item (lowercase snake_case)
labelstringDisplay proper label
iconstringoptionalIcon name
ordernumberoptionalSort order within the same level (lower = first)
badgestring | numberoptionalBadge text or count displayed on the item
visiblestring | ObjectoptionalVisibility predicate (CEL). e.g. P'org_admin' in current_user.positions
requiredPermissionsstring[]optionalPermissions required to access this item
requiresObjectstringoptionalHide/disable this entry unless the named object is registered in the runtime
requiresServicestringoptionalHide/disable this entry unless the named kernel service is registered
typestring
urlstringTarget external URL
targetEnum<'_self' | '_blank'>optionalLink target window

On this page