ObjectStackObjectStack

Action schema — UI Protocol property reference

Action protocol schemas — ActionSchema, the action metadata type, and the parts it is built from.

Action protocol schemas — ActionSchema, the action metadata type, and the parts it is built from.

An action is a command a user or an AI agent runs: a button on a record header, a list row or a list toolbar, or on a page. Its type names the dispatch route — a script body or handler, a url, a flow, an api endpoint, a modal or a form — and locations names the surfaces that draw it. Declare one with defineAction.

Beside ActionSchema: ActionParamSchema (one input of the param dialog), ActionLocationSchema (the surfaces), ActionAiSchema (how an agent is offered the action), ActionRefusalSchema (one entry of the refusals catalogue a script body refuses through) and InlineActionSchema (an action declared inline on a page element instead of registered by name).

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

TypeScript Usage

import { ActionSchema, ActionAiSchema, ActionLocationSchema, ActionParamSchema, ActionRefusalSchema, ActionTextSchema, ActionType, InlineActionSchema } from '@objectstack/spec/ui';
import type { Action, ActionAi, ActionLocation, ActionParam, ActionRefusal, ActionText, ActionType, InlineAction } from '@objectstack/spec/ui';

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

Action

Properties

PropertyTypeRequiredDescription
namestring✅Machine name (lowercase snake_case)
labelstring | Record<string, string>✅Display label
descriptionstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalExplanatory line shown under the title in the action's param dialog. Carries the confirm question for an action that collects params (one dialog, not two). Not the LLM-facing ai.description. It is a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against (the clicked row on a list, else the page's record); the values the dialog collects are not bound, since the line shows before they exist. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Choose the new role for {{ record.name }}.'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence.
objectNamestringoptionalTarget object this action belongs to. When set, the action is auto-merged into the object's actions array by defineStack().
iconstringoptionalIcon name
locationsEnum<'list' | 'record' | 'record_page' | 'record_row' | 'record_related' | 'record_section'>[]optionalLocations where this action is visible. record_section is drawn only by an authored record page block that renders it; the standard record page (on a phone, in the side preview, and for an object with no authored page) does not draw it, so an action that must reach every surface adds record_page as well, with component: 'action:menu' to sit in the record page's ⋯ menu rather than be a header button. list acts on no record (the list page toolbar); record acts on one record, on the record page and on each list row; record_page and record_row are one of those two only.
componentEnum<'action:button' | 'action:icon' | 'action:menu' | 'action:group'>optionalVisual component override
typeEnum<'script' | 'url' | 'modal' | 'flow' | 'api' | 'form'>optional (default: "script")Action functionality type — the dispatch route. The declarative single-record field write is not a type: it is operation: 'update' + patch on the default script route.
targetstringoptionalURL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation. For type:'url': an http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (a console route; a record is /apps/APP/OBJECT/record/ID, APP being the app's route segment — see onSuccess.navigate) — every other scheme and a protocol-relative //host are refused.
openInEnum<'self' | 'new-tab'>optionalFor type:'url' — where to open target. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of params (which is user-input-collection only).
body{ language: 'expression'; source: string } | { language: 'js'; source: string; capabilities?: Enum<'api.read' | 'api.write' | 'api.transaction' | 'crypto.uuid' | 'log' | …>[]; timeoutMs?: integer; … }optionalAction body — expression (L1) or sandboxed JS (L2). Only used when type is script. An action body runs as system, and its update, transfer, delete, purge or restore of an object declared managedBy: 'append-only' is refused with PERMISSION_DENIED; an insert is not judged by this rule. Its system elevation does not lift the organization wall: the body has its reads and writes judged by the invoking user's organization wall. A write whose own data names an organization outside it, or empties a record's organization, is refused with PERMISSION_DENIED. Where the wall denies the user (no active organization under isolated, no membership under group), its reads of an organization's records return none, its deletes remove none, and its other writes are refused with PERMISSION_DENIED.
refusalsRecord<string, { message: string; status?: integer; reasons?: Record<string, object>; params?: string[] }>optionalRefusal catalogue keyed by the SCREAMING_SNAKE code the action's js body throws: { message, status?, reasons?, params? }. The body refuses by code only, optionally with a declared reason and params; the runtime answers with the declared message (translated through objects.<object>._actions.<action>.refusals.<CODE>.message, or globalActions.<action>.refusals.<CODE>.message for an object-less action, ….reasons.<REASON>.message for a reason, in the caller's locale, holes filled from params) and status. A code not declared here, or a reason a code with reasons does not declare, is refused loudly — at save when the body throws it literally, otherwise at run time. Only a type: 'script' action with a js body declares one
textsRecord<string, { message: string; params?: string[] }>optionalTexts the action's js body writes into records, keyed by the snake_case key it asks for with ctx.text(KEY, params): { message, params? }. ctx.text answers the sentence in the organization's language (the Localization setting when somebody set it, else the app's i18n.defaultLocale), translated through objects.<object>._actions.<action>.texts.<key>.message (globalActions.<action>.texts.<key>.message for an object-less action) with the declared message as the fallback, its holes filled from params. A key not declared here is refused — at save when the body asks for it literally, otherwise at run time. Only a type: 'script' action with a js body declares one
operationEnum<'update'>optionalThe declarative single-record field write, mirroring a list view's bulkActionDefs: 'update' applies patch (merged under the collected params) to the current record on the data plane AS THE CALLER — never system-elevated — so the caller's permissions, the object's hooks and its validations fire as for a user edit. type stays at its default 'script' (the platform action route the write is performed on); target/body/method/bodyExtra are refused beside it. 'delete' and 'custom' have no row-level form.
patchRecord<string, any>optionalFor operation: 'update' — static field values written to the current record, merged UNDER the user-supplied params so a fixed value can be declared without exposing it in the dialog. Written on the data plane as the caller: object permissions, hooks and validations fire as for a user edit. Refused on an action without operation: 'update' (it would be silently dropped).
executionEnum<'perRecord' | 'aggregate'>optionalThe bulk dispatch contract this action's BODY is written for, in bulkActionDefs' own vocabulary: 'perRecord' = one dispatch per selected row carrying that row's recordId (the view's bulkActions: ['<name>'] bare-string form); 'aggregate' = ONE dispatch for the whole selection carrying every id in params._selectedIds (a bulkActionDefs entry with execution: 'aggregate'). Optional with NO default — omit it only when the body genuinely serves both. A list view wiring a declared action under the other contract is refused by @objectstack/lint (action-dispatch-contract-mismatch).
params{ name?: string; field?: string; objectOverride?: string; label?: string | Record<string, string>; … }[]optionalInput parameters required from user — an ActionParam[] DEFINITION array, never a payload map (a static request body goes in bodyExtra). A param name (its name, or the field a field-backed param reads) may repeat only for per-gate variants of ONE input (declarations that differ in visible / requiresFeature, e.g. one optional and one required); the params check treats the name as required only when EVERY declaration of it requires it, and judges its value by the FIRST declaration's shape (type, multiple, options), so keep that shape identical across them.
submitTextstring | Record<string, string>optionalLabel of the submit button in the action's param dialog, the verb the button performs (e.g. "Send", "Log Call"), in place of the default "Confirm" — the default-language string, or an inline locale map; translated at objects.OBJECT._actions.ACTION.submitText (globalActions.ACTION.submitText for an object-less action). Only on an action with a non-empty params: without one no param dialog opens, so it is refused. Not confirmText, which is the message of a param-less action's confirm dialog. A blank label is refused.
cancelTextstring | Record<string, string>optionalLabel of the dismiss button on the dialog the action opens before it runs — the confirm dialog of a param-less action that declares confirmText, or the param dialog of an action with a non-empty params — in place of the default "Cancel". Name what dismissing keeps where the action's own verb is "Cancel …" or "Close …" (e.g. "Keep invitation" beside "Cancel Invitation"). The default-language string, or an inline locale map; translated at objects.OBJECT._actions.ACTION.cancelText (globalActions.ACTION.cancelText for an object-less action). Only on an action that opens one of those dialogs: with neither confirmText nor a non-empty params no dialog opens, so it is refused. The dismiss twin of submitText, as on object-form. A blank label is refused.
variantEnum<'primary' | 'secondary' | 'danger' | 'ghost' | 'link'>optionalButton visual variant for styling (primary = highlighted, danger = destructive, ghost = transparent)
ordernumberoptionalSort order within a location group (lower = higher). Promotes/demotes an action toward the record page header's primary button; stable, so actions without order keep their registration order.
confirmTextstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalConfirmation message before execution — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against (the clicked row on a list, else the page's record), and — only when the action's params is an object of static values — params ({{ params.tier }}); an input list binds nothing, since its values are collected after the confirmation. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Delete {{ record.name }}?'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence. Pairing this with a non-empty params is refused — that opens a second dialog for one decision; put the question on description instead. Correct on a param-LESS action, where the confirm is the only dialog there is.
successMessagestring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalSuccess message shown after the action succeeds — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over result, the payload the action's handler answered ({{ result.email }}; for an api or script action the server response), and record, the record the action ran against. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Invitation sent to {{ result.email }}'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence. On a registered action that declares outcomeMessages, the entry named by the response's outcome is shown instead, and this message is the fallback.
outcomeMessagesRecord<string, string | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>>optionalSuccess copy per handler outcome, for type:'api' and type:'script' actions: keys are the snake_case outcome values the handler returns in its success payload (e.g. archived, already_archived), values the message shown for that outcome. Each message is a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over result, the payload the action's handler answered ({{ result.email }}), and record, the record the action ran against — the roots successMessage reads. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Invitation resent to {{ result.email }}'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence. An outcome with no entry here falls back to successMessage, then to the default text. Not allowed beside resultDialog (which suppresses the success toast) or operation: 'update' (no handler, so no outcome).
errorMessagestring | Record<string, string>optionalError message to show when the action fails (overrides the raw error).
refreshAfterbooleanoptional (default: false)Refresh view after execution
undoablebooleanoptionalOffer an Undo affordance after this single-record update action succeeds. operation: 'update' is the one declared operation and the declared form of that action: what the undo captures is the prior value of EVERY field the action writes — the merged write bag, patch UNDER the collected params, not patch alone. An action with no operation declares no write set here, but type: 'api' is fulfilled by the console, which builds the undo envelope from undoable alone. Those two shapes — operation: 'update' and type: 'api' — are the whole fulfillable set; on a registered action undoable beside any other shape is refused, because nothing would anchor the capture.
resultDialog{ title?: string | Record<string, string>; description?: string | Record<string, string>; acknowledge?: string | Record<string, string>; format?: Enum<'qrcode' | 'code-list' | 'secret' | 'text' | 'json'>; … }optionalRender API response in a one-shot reveal dialog (suppresses successMessage when set).
preflight{ read: object; path?: string; fields?: object[]; seed?: object[] }optionalPreflight read for the action's param dialog: { read: { url }, path?, fields?, seed? } sends one same-origin GET (holes ${param.NAME}, ${ctx.recordId}, ${ctx.record.FIELD}) before submit, shows the selected answer above the params and fills the seed params from it. Only on an action with a non-empty params, and not beside execution: 'aggregate'. UX, not authorization: the action's endpoint still judges what it receives.
visibleboolean | string | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalVisibility predicate — true/false literal, CEL string, or {dialect, source} envelope. The action is offered when it evaluates TRUE. Omit = always visible.
requiresFeatureEnum<'twoFactor' | 'organization' | 'multiOrgEnabled' | 'degradedTenancy' | 'oidcProvider' | 'sso' | 'ssoEnforced' | 'directSignIn' | 'deviceAuthorization' | 'admin' | … +5 more>optionalPublic auth feature flag gating this action; lowered into visible at parse time.
requiresMembershipReachEnum<'invite_member' | 'cancel_invitation' | 'update_member_role' | 'transfer_ownership' | 'remove_member' | 'create_team' | 'update_team' | 'remove_team' | … +4 more>optionalOrganization endpoint (a MEMBERSHIP_REACH row) whose membership-grade gate this action follows; lowered into visible over current_user.positions at parse time.
disabledboolean | string | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalDisabled predicate — true/false literal, CEL string, or {dialect, source} envelope. The action is shown but refused when it evaluates TRUE. Omit = never disabled.
disabledReasonstring | Record<string, string>optionalDisplay-only reason a greyed action shows (its hover title and accessible description, or a menu item's second line) while disabled evaluates TRUE — the default-language string, or an inline locale map; translated at objects.OBJECT._actions.ACTION.disabledReason (globalActions.ACTION.disabledReason for an object-less action). Not a gate: the server refuses a call on its own rules (hooks, requiredPermissions), and nothing reads this as a condition. Omit = the default reason, "Not available for this record". A blank reason is refused.
pressedstring | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalPressed-state predicate (CEL string or {dialect, source} envelope) over the same scope as visible: the action surface draws the button as already pressed for this reader (a toggle face, aria-pressed) while it evaluates TRUE. Display only — it never gates, greys or routes the action. A per-reader fact (e.g. the reader's own vote) is read from a block the object declares under attachedOnRead, as has(record.viewer) && record.viewer.vote == 'helpful'. A boolean literal is refused: a constant is a style, not a reader's state. Omit = never drawn pressed.
requiredPermissionsstring[]optional[ADR-0066 D4] Capabilities required to invoke this action. Enforced with 403 on every call the platform action door (POST /actions/:object/:action and MCP run_action) dispatches, and mirrored as a UI hide. ADR-0066 D4, as amended 2026-10-29, brings a type: api action whose declared target is a same-origin platform path (exactly one leading /, followed by neither / nor a backslash, with a path after it) under that door; its target endpoint stays directly reachable, so it MUST still enforce this capability itself, the door's gate being the added check. A type: api action with an off-origin target is browser-only and not gated server-side.
ai{ exposed?: boolean; description?: string; category?: Enum<'data' | 'action' | 'flow' | 'integration' | 'vector_search' | 'analytics' | 'utility'>; paramHints?: Record<string, object>; … }optionalAI exposure (opt-in). Set ai.exposed=true + ai.description to make this callable by agents.
recordIdParamstringoptionalBody key to inject the row id into when running from a list row (record_row / record).
recordIdFieldstringoptionalRow field whose value seeds recordIdParam. Defaults to "id".
bodyShape'flat' | { wrap: string }optionalBody wrapping: flat (default) or { wrap: key } to nest user-collected params under a key.
methodEnum<'POST' | 'PATCH' | 'PUT' | 'DELETE'>optionalHTTP method for type:"api" actions. Defaults to POST.
bodyExtraRecord<string, any>optionalStatic request-body fields for a type:"api" action, merged last (overrides user params). {{page.<var>}} tokens are resolved by the runtime. This — not params — is where a payload goes.
modeEnum<'create' | 'edit' | 'delete' | 'custom'>optionalSemantic mode of the action.
opensInNewTabbooleanoptionalOpen the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler's redirectUrl.
newTabUrlstringoptionalNew-tab path template on this backend, starting with / ({recordId} placeholder). When set with opensInNewTab, the renderer navigates the pre-opened tab to the backend origin + this path immediately — no action POST. The endpoint must enforce auth itself. An absolute URL is refused; an external page is a type:'url' action with openIn: 'new-tab'.
onSuccess{ navigate: string; openIn?: Enum<'self' | 'newTab'> }optionalPost-success navigation for type:'api', type:'script' and type:'flow' actions. navigate is a route/URL template interpolating ${param.*}, ${ctx.*} and ${result.*} (the server response; for a flow, the completed run's answer); openIn defaults 'self'. A flow run that pauses at a screen or ends refused performs no navigation. The handler-return convention ({ redirectUrl } without openIn) keeps its 17.0.0 new-tab behavior.
arianeveroptional[REMOVED] action.aria was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — no action surface ever applied it: the button, icon, menu, group and bar renderers, the row and bulk action menus and the record quick-actions toolbar all take the accessible name from the action's label and never read this block, so ARIA attributes declared here parsed and then silently did not reach the DOM. Delete the key. The accessible name that IS applied is the action's required label — the visible button or menu-item text, and the aria-label of an icon-only action — so write the name you meant there. To name the region that PLACES the actions, author ariaLabel / ariaDescribedBy / role in the aria block of the placing node: page.components[].aria (the component that renders the actions) or the list view aria. Run os migrate meta --from 17 to list the mechanical edits for existing sources; --write applies the ones it can prove, and you apply the rest by hand.
_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' | 'platform'>optionalOrigin of the item (package | org | env-forced | platform).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.
overrides{ package: string; basedOn: string }optionalOverride declaration (ADR-0146 D2): { package, basedOn } — this item of "<base>.custom" replaces the base package's same-named item whole. basedOn is recorded and never gates; a base's upgrade plan reads it only as advice.

Allowed Values: Action.requiresFeature

  • twoFactor
  • organization
  • multiOrgEnabled
  • degradedTenancy
  • oidcProvider
  • sso
  • ssoEnforced
  • directSignIn
  • deviceAuthorization
  • admin
  • phoneNumber
  • cloudManaged
  • phoneNumberOtp
  • emailDelivery
  • developerEditionCreate

Allowed Values: Action.requiresMembershipReach

  • invite_member
  • cancel_invitation
  • update_member_role
  • transfer_ownership
  • remove_member
  • create_team
  • update_team
  • remove_team
  • add_team_member
  • remove_team_member
  • update_organization
  • delete_organization

Nested Shape: Action.body[language='expression']

L1 expression body — pure formula, no IO

PropertyTypeRequiredDescription
language'expression'✅
sourcestring✅Formula expression source

Nested Shape: Action.body[language='js']

L2 sandboxed JS body — runs inside an isolated VM with declared capabilities

PropertyTypeRequiredDescription
language'js'✅
sourcestring✅Function body source
capabilitiesEnum<'api.read' | 'api.write' | 'api.transaction' | 'crypto.uuid' | 'log' | …>[]optional (default: [])Granted capability tokens
timeoutMsintegeroptionalPer-invocation timeout (ms)
memoryMbintegeroptionalPer-invocation memory cap (MB)

Nested Shape: Action.refusals[string]

PropertyTypeRequiredDescription
messagestring✅The sentence the user reads when the action throws this code — in the source locale, translated whole through objects.<object>._actions.<action>.refusals.<CODE>.message (globalActions.<action>.… for an object-less action) in the caller's locale. With no params every {{ }} hole is refused; with params a hole is a path over one of them with an optional known formatter, and a hole over another name, a hole holding logic, an unknown formatter, an empty hole and a currency formatter with no code are refused
statusintegeroptionalHTTP status the refusal is answered with (4xx; a refusal is never a fault). Absent: 400. A status the body itself sets on the throw is not read — the catalogue decides
reasonsRecord<string, { message: string }>optionalFurther sentences under this same code, keyed by the snake_case reason the action throws beside the code ({ code, reason }): { message }. The wire code and status stay this entry's. A reason not declared here is refused loudly. Absent: the code has the one sentence, and a thrown reason is not read
paramsstring[]optionalThe names this entry's sentences may fill: a {{ NAME }} or {{ NAME | formatter }} hole renders the value the action throws in params ({ code, params: { NAME: value } }). A hole over any other name, logic, an unknown formatter, an empty hole and a currency formatter with no code are refused. Absent: the sentences are plain text and a {{ }} hole is refused

Nested Shape: Action.texts[string]

PropertyTypeRequiredDescription
messagestring✅The sentence the action's body writes into a record — in the source locale, translated whole through objects.<object>._actions.<action>.texts.<key>.message (globalActions.<action>.texts.<key>.message for an object-less action) in the organization's language when the body asks for it (ctx.text). With no params every {{ }} hole is refused; with params a hole is a path over one of them with an optional known formatter
paramsstring[]optionalThe names this text may fill: a {{ NAME }} or {{ NAME | formatter }} hole renders the value the action's body passes in ctx.text(KEY, { NAME: value }). A hole over any other name is refused at parse; a hole holding logic, an unknown formatter, an empty hole and a currency formatter with no code are refused where the text is compiled (os validate, compile, the publish gate). Absent: the sentence is plain text and a {{ }} hole is refused

Nested Shape: Action.params[number]

PropertyTypeRequiredDescription
namestringoptional
fieldstringoptionalSnake case identifier (lowercase with underscores only)
objectOverridestringoptionalSnake case identifier (lowercase with underscores only)
labelstring | Record<string, string>optionalDisplay label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
typeEnum<'text' | 'textarea' | 'email' | 'url' | 'phone' | 'password' | 'secret' | …>optional
widgetstringoptionalWidget override for this param — names a registered field component (resolved as field:<widget>) to draw it instead of the type default; same key and vocabulary as FieldSchema.widget, and type stays the value's type. e.g. "permission-ref" on a text param picks a permission set by name (ADR-0131 D4). Degrades to the type renderer when unregistered.
requiredbooleanoptional (default: false)
options{ label: string | Record<string, string>; value: string; visibleWhen?: string | object }[]optional
placeholderstringoptional
helpTextstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalHint shown under this input in the action's param dialog — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against; the dialog's own values are not bound. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Why {{ record.name }} is paused'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save.
defaultValueanyoptional
multiplebooleanoptionalAllow multiple values (array value shape); mirrors FieldSchema.multiple.
acceptstring[]optionalAccepted upload types (MIME types / extensions) for file/image params.
maxSizeintegeroptionalMax upload size in bytes for file/image params.
referencestringoptionalReference target object for inline lookup/master_detail params; mirrors FieldSchema.reference.
defaultFromRowbooleanoptional
carryOverbooleanoptionalCarry-over param: seed the value from the current row (requires defaultFromRow: true), render it as a non-editable summary in the dialog, and submit it verbatim in the request body. Unlike visible: false (which omits the param from the submission entirely), a carry-over param is always sent.
visiblestring | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalParam visibility predicate (CEL); omits the param when false.
requiresFeatureEnum<'twoFactor' | 'organization' | 'multiOrgEnabled' | 'degradedTenancy' | …>optionalPublic auth feature flag gating this param; lowered into visible at parse time.

Nested Shape: Action.resultDialog

PropertyTypeRequiredDescription
titlestring | Record<string, string>optionalDisplay label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
descriptionstring | Record<string, string>optionalDisplay label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
acknowledgestring | Record<string, string>optionalAcknowledge button label, e.g. "I have saved this"
formatEnum<'qrcode' | 'code-list' | 'secret' | 'text' | 'json'>optionalDefault format for fields without their own format: any field format but table, which needs the field's own columns. Defaults to json when omitted.
fields{ path: string; label?: string | Record<string, string>; format?: Enum<'qrcode' | 'code-list' | 'secret' | 'text' | 'json' | 'table'>; columns?: object[] }[]optionalWhich fields from result.data to render. Omit to dump full JSON. A field with format: 'table' draws an array of objects as rows, one cell per entry of its columns, in order; the columns are never guessed from the elements' keys.

Nested Shape: Action.preflight

PropertyTypeRequiredDescription
read{ url: string; method?: 'GET' }✅The read request — the same-origin endpoint the preflight reads
pathstringoptionalDotted path selecting the sub-tree of the answer the preflight shows and seeds from, e.g. data in a { success, data } envelope; omitted, the whole answer
fields{ path: string; label?: string | Record<string, string>; format?: Enum<'qrcode' | 'code-list' | 'secret' | 'text' | 'json' | 'table'>; columns?: object[] }[]optionalWhich values of the selected answer the panel shows, in resultDialog.fields' row and format set — table and its columns included, drawn by the same renderer contract. Omit to show the selected answer as JSON.
seed{ param: string; path: string }[]optionalAnswer-to-param seeding: each entry writes the value at path in the selected answer into the named param, which the dialog draws read-only and submits as shown. Each param is seeded once.

Nested Shape: Action.ai

PropertyTypeRequiredDescription
exposedbooleanoptional (default: false)Expose this action to AI agents. Requires description when true.
descriptionstringoptionalLLM-facing description (≥40 chars). Required when exposed.
categoryEnum<'data' | 'action' | 'flow' | 'integration' | 'vector_search' | 'analytics' | 'utility'>optionalTool category override (defaults to "action").
paramHintsRecord<string, { description?: string; enum?: (string | number)[]; examples?: any[] }>optionalPer-parameter AI hints keyed by param name.
outputSchemaRecord<string, any>optionalJSON Schema for the action return value. An untyped subschema that carries a type-scoped keyword (properties, items, pattern, minimum, …) is refused at its path, because the AI runtime's schema reader does not check it; declare its "type".
requiresConfirmationbooleanoptionalOverride HITL confirmation for AI invocations.

Nested Shape: Action.onSuccess

PropertyTypeRequiredDescription
navigatestring✅Route/URL template navigated to after the action succeeds. Interpolates ${param.*} (params-dialog values), ${ctx.*} (origin/apiBase/user/org/recordId/selection) and ${result.*} (the action's server response payload — NEW with this key, e.g. ${result.id}; on a type:'flow' action the completed run's answer, whose output carries the flow's isOutput variables, e.g. ${result.output.renewal.id}). An http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (an SPA route hop); a template that opens with ${ is judged after interpolation. Every other scheme and a protocol-relative //host are refused. An in-app path is a console route, written without the console's mount prefix; a record is /apps/APP/OBJECT/record/ID, where APP is the app's route segment (its package id; its name also resolves). No app-relative form is declared and no ${ctx.*} member names the current app, so write the app segment. Renderers MUST encodeURIComponent values in query positions.
openInEnum<'self' | 'newTab'>optional (default: "self")Where to perform the post-success navigation: 'self' (default — in-place SPA navigation, immune to popup blocking) or 'newTab'. Closed enum — no general navigation DSL.

Nested Shape: Action.overrides

PropertyTypeRequiredDescription
packagestring✅The base package id whose same-named item this item replaces whole (e.g. "com.acme.crm"). Only an item of the base's paired "<base>.custom" package declares an override.
basedOnstring✅Recorded, never a gate: the base package's manifest.version this override was taken from (e.g. "3.2.0"), not a history version of the item. Nothing is refused, merged or rebased on it; it tells a person re-basing the override where it started. One reader, as advice: a base's upgrade plan lists an override whose basedOn is not the installed base version as stale, beside each override whose base item the upgrade changes (ADR-0146 D2, as amended).

ActionAi

Properties

PropertyTypeRequiredDescription
exposedbooleanoptional (default: false)Expose this action to AI agents. Requires description when true.
descriptionstringoptionalLLM-facing description (≥40 chars). Required when exposed.
categoryEnum<'data' | 'action' | 'flow' | 'integration' | 'vector_search' | 'analytics' | 'utility'>optionalTool category override (defaults to "action").
paramHintsRecord<string, { description?: string; enum?: (string | number)[]; examples?: any[] }>optionalPer-parameter AI hints keyed by param name.
outputSchemaRecord<string, any>optionalJSON Schema for the action return value. An untyped subschema that carries a type-scoped keyword (properties, items, pattern, minimum, …) is refused at its path, because the AI runtime's schema reader does not check it; declare its "type".
requiresConfirmationbooleanoptionalOverride HITL confirmation for AI invocations.

ActionLocation

Allowed Values

  • list
  • record
  • record_page
  • record_row
  • record_related
  • record_section

ActionParam

Properties

PropertyTypeRequiredDescription
namestringoptional
fieldstringoptionalSnake case identifier (lowercase with underscores only)
objectOverridestringoptionalSnake case identifier (lowercase with underscores only)
labelstring | Record<string, string>optionalDisplay label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
typeEnum<'text' | 'textarea' | 'email' | 'url' | 'phone' | 'password' | 'secret' | 'markdown' | 'html' | 'richtext' | 'number' | 'currency' | 'percent' | 'date' | … +35 more>optional
widgetstringoptionalWidget override for this param — names a registered field component (resolved as field:<widget>) to draw it instead of the type default; same key and vocabulary as FieldSchema.widget, and type stays the value's type. e.g. "permission-ref" on a text param picks a permission set by name (ADR-0131 D4). Degrades to the type renderer when unregistered.
requiredbooleanoptional (default: false)
options{ label: string | Record<string, string>; value: string; visibleWhen?: string | object }[]optional
placeholderstringoptional
helpTextstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalHint shown under this input in the action's param dialog — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against; the dialog's own values are not bound. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Why {{ record.name }} is paused'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save.
defaultValueanyoptional
multiplebooleanoptionalAllow multiple values (array value shape); mirrors FieldSchema.multiple.
acceptstring[]optionalAccepted upload types (MIME types / extensions) for file/image params.
maxSizeintegeroptionalMax upload size in bytes for file/image params.
referencestringoptionalReference target object for inline lookup/master_detail params; mirrors FieldSchema.reference.
defaultFromRowbooleanoptional
carryOverbooleanoptionalCarry-over param: seed the value from the current row (requires defaultFromRow: true), render it as a non-editable summary in the dialog, and submit it verbatim in the request body. Unlike visible: false (which omits the param from the submission entirely), a carry-over param is always sent.
visiblestring | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalParam visibility predicate (CEL); omits the param when false.
requiresFeatureEnum<'twoFactor' | 'organization' | 'multiOrgEnabled' | 'degradedTenancy' | 'oidcProvider' | 'sso' | 'ssoEnforced' | 'directSignIn' | 'deviceAuthorization' | 'admin' | … +5 more>optionalPublic auth feature flag gating this param; lowered into visible at parse time.

Allowed Values: ActionParam.type

  • text
  • textarea
  • email
  • url
  • phone
  • password
  • secret
  • markdown
  • html
  • richtext
  • number
  • currency
  • percent
  • date
  • datetime
  • time
  • boolean
  • toggle
  • select
  • multiselect
  • radio
  • checkboxes
  • lookup
  • master_detail
  • tree
  • user
  • image
  • file
  • avatar
  • video
  • audio
  • formula
  • summary
  • autonumber
  • composite
  • repeater
  • record
  • location
  • address
  • code
  • json
  • color
  • rating
  • slider
  • signature
  • qrcode
  • progress
  • tags
  • vector

Allowed Values: ActionParam.requiresFeature

  • twoFactor
  • organization
  • multiOrgEnabled
  • degradedTenancy
  • oidcProvider
  • sso
  • ssoEnforced
  • directSignIn
  • deviceAuthorization
  • admin
  • phoneNumber
  • cloudManaged
  • phoneNumberOtp
  • emailDelivery
  • developerEditionCreate

Nested Shape: ActionParam.options[number]

PropertyTypeRequiredDescription
labelstring | Record<string, string>✅Display label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
valuestring✅
visibleWhenstring | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalPer-option visibility predicate (CEL) — option is offered only when TRUE (else omitted). Same env as the field-level per-option visibleWhen (record + current_user). e.g. Precord.tier == 'gold'

ActionRefusal

Properties

PropertyTypeRequiredDescription
messagestring✅The sentence the user reads when the action throws this code — in the source locale, translated whole through objects.<object>._actions.<action>.refusals.<CODE>.message (globalActions.<action>.… for an object-less action) in the caller's locale. With no params every {{ }} hole is refused; with params a hole is a path over one of them with an optional known formatter, and a hole over another name, a hole holding logic, an unknown formatter, an empty hole and a currency formatter with no code are refused
statusintegeroptionalHTTP status the refusal is answered with (4xx; a refusal is never a fault). Absent: 400. A status the body itself sets on the throw is not read — the catalogue decides
reasonsRecord<string, { message: string }>optionalFurther sentences under this same code, keyed by the snake_case reason the action throws beside the code ({ code, reason }): { message }. The wire code and status stay this entry's. A reason not declared here is refused loudly. Absent: the code has the one sentence, and a thrown reason is not read
paramsstring[]optionalThe names this entry's sentences may fill: a {{ NAME }} or {{ NAME | formatter }} hole renders the value the action throws in params ({ code, params: { NAME: value } }). A hole over any other name, logic, an unknown formatter, an empty hole and a currency formatter with no code are refused. Absent: the sentences are plain text and a {{ }} hole is refused

Nested Shape: ActionRefusal.reasons[string]

PropertyTypeRequiredDescription
messagestring✅The sentence the user reads when the action throws this reason under its code — in the source locale, translated through objects.<object>._actions.<action>.refusals.<CODE>.reasons.<REASON>.message (globalActions.<action>.… for an object-less action) in the caller's locale; its {{ }} holes follow the entry's message rule

ActionText

Properties

PropertyTypeRequiredDescription
messagestring✅The sentence the action's body writes into a record — in the source locale, translated whole through objects.<object>._actions.<action>.texts.<key>.message (globalActions.<action>.texts.<key>.message for an object-less action) in the organization's language when the body asks for it (ctx.text). With no params every {{ }} hole is refused; with params a hole is a path over one of them with an optional known formatter
paramsstring[]optionalThe names this text may fill: a {{ NAME }} or {{ NAME | formatter }} hole renders the value the action's body passes in ctx.text(KEY, { NAME: value }). A hole over any other name is refused at parse; a hole holding logic, an unknown formatter, an empty hole and a currency formatter with no code are refused where the text is compiled (os validate, compile, the publish gate). Absent: the sentence is plain text and a {{ }} hole is refused

ActionType

Allowed Values

  • script
  • url
  • modal
  • flow
  • api
  • form

InlineAction

Properties

PropertyTypeRequiredDescription
typeEnum<'script' | 'url' | 'modal' | 'flow' | 'api' | 'form'>optional (default: "script")Action functionality type — the dispatch route. The declarative single-record field write is not a type: it is operation: 'update' + patch on the default script route.
namestringoptionalMachine name (lowercase snake_case)
labelstring | Record<string, string>optionalDisplay label
targetstringoptionalURL, Script Name, Flow ID, or API Endpoint. Supports ${param.X} and ${ctx.X} interpolation. For type:'url': an http:// or https:// URL, a mailto: address, or an in-app path starting with / or ./ (a console route; a record is /apps/APP/OBJECT/record/ID, APP being the app's route segment — see onSuccess.navigate) — every other scheme and a protocol-relative //host are refused.
openInEnum<'self' | 'new-tab'>optionalFor type:'url' — where to open target. 'new-tab' opens a new browser tab; 'self' navigates in place. When omitted, external/absolute URLs open in a new tab and relative URLs navigate in place. Static execution option — keep it OUT of params (which is user-input-collection only).
methodEnum<'POST' | 'PATCH' | 'PUT' | 'DELETE'>optionalHTTP method for type:"api" actions. Defaults to POST.
params{ name?: string; field?: string; objectOverride?: string; label?: string | Record<string, string>; … }[]optionalInput parameters required from user — an ActionParam[] DEFINITION array, never a payload map (a static request body goes in bodyExtra). A param name (its name, or the field a field-backed param reads) may repeat only for per-gate variants of ONE input (declarations that differ in visible / requiresFeature, e.g. one optional and one required); the params check treats the name as required only when EVERY declaration of it requires it, and judges its value by the FIRST declaration's shape (type, multiple, options), so keep that shape identical across them.
bodyExtraRecord<string, any>optionalStatic request-body fields for a type:"api" action, merged last (overrides user params). {{page.<var>}} tokens are resolved by the runtime. This — not params — is where a payload goes.
descriptionstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalExplanatory line shown under the title in the action's param dialog. Carries the confirm question for an action that collects params (one dialog, not two). Not the LLM-facing ai.description. It is a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against (the clicked row on a list, else the page's record); the values the dialog collects are not bound, since the line shows before they exist. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Choose the new role for {{ record.name }}.'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence.
confirmTextstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalConfirmation message before execution — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against (the clicked row on a list, else the page's record), and — only when the action's params is an object of static values — params ({{ params.tier }}); an input list binds nothing, since its values are collected after the confirmation. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Delete {{ record.name }}?'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence. Pairing this with a non-empty params is refused — that opens a second dialog for one decision; put the question on description instead. Correct on a param-LESS action, where the confirm is the only dialog there is.
successMessagestring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalSuccess message shown after the action succeeds — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over result, the payload the action's handler answered ({{ result.email }}; for an api or script action the server response), and record, the record the action ran against. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Invitation sent to {{ result.email }}'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save. An inline locale map ({ en, "zh-CN" }) is accepted too, each value such a sentence. On a registered action that declares outcomeMessages, the entry named by the response's outcome is shown instead, and this message is the fallback.
errorMessagestring | Record<string, string>optionalError message to show when the action fails (overrides the raw error).
refreshAfterbooleanoptional (default: false)Refresh view after execution
opensInNewTabbooleanoptionalOpen the action result in a new tab. The renderer pre-opens the tab synchronously on click (popup-blocker-safe) and navigates it to the handler's redirectUrl.

Nested Shape: InlineAction.params[number]

PropertyTypeRequiredDescription
namestringoptional
fieldstringoptionalSnake case identifier (lowercase with underscores only)
objectOverridestringoptionalSnake case identifier (lowercase with underscores only)
labelstring | Record<string, string>optionalDisplay label — the default-language string, or an inline locale map ({ en, "zh-CN" }) resolved at render time
typeEnum<'text' | 'textarea' | 'email' | 'url' | 'phone' | 'password' | 'secret' | …>optional
widgetstringoptionalWidget override for this param — names a registered field component (resolved as field:<widget>) to draw it instead of the type default; same key and vocabulary as FieldSchema.widget, and type stays the value's type. e.g. "permission-ref" on a text param picks a permission set by name (ADR-0131 D4). Degrades to the type renderer when unregistered.
requiredbooleanoptional (default: false)
options{ label: string | Record<string, string>; value: string; visibleWhen?: string | object }[]optional
placeholderstringoptional
helpTextstring | { dialect: 'template'; source?: string; ast?: any; meta?: object } | string | Record<string, string>optionalHint shown under this input in the action's param dialog — a template slot (ADR-0032): a bare string is shorthand for { dialect: 'template', source }, and text with no hole is shown as written. Holes are {{ path }} or {{ path | formatter[:arg] }} over record, the record the action runs against; the dialog's own values are not bound. Formatters come from the template engine's whitelist (TEMPLATE_FORMATTERS, @objectstack/formula); a hole holds no logic (no CEL, no arithmetic). Example: 'Why {{ record.name }} is paused'. A hole over any other root, a ${…} or single-brace {x} token (each named with its {{ }} spelling), a hole holding logic or an unknown formatter, and a blank sentence are named and refused at objectstack validate, compile and the publish gate; the text still parses, so a stored one loads until its next save.
defaultValueanyoptional
multiplebooleanoptionalAllow multiple values (array value shape); mirrors FieldSchema.multiple.
acceptstring[]optionalAccepted upload types (MIME types / extensions) for file/image params.
maxSizeintegeroptionalMax upload size in bytes for file/image params.
referencestringoptionalReference target object for inline lookup/master_detail params; mirrors FieldSchema.reference.
defaultFromRowbooleanoptional
carryOverbooleanoptionalCarry-over param: seed the value from the current row (requires defaultFromRow: true), render it as a non-editable summary in the dialog, and submit it verbatim in the request body. Unlike visible: false (which omits the param from the submission entirely), a carry-over param is always sent.
visiblestring | { dialect: Enum<'cel' | 'cron' | 'template'>; source: string; ast?: any; meta?: object }optionalParam visibility predicate (CEL); omits the param when false.
requiresFeatureEnum<'twoFactor' | 'organization' | 'multiOrgEnabled' | 'degradedTenancy' | …>optionalPublic auth feature flag gating this param; lowered into visible at parse time.

On this page