Manifest reference
Every key app.exs accepts, what it does, and where it is covered.
app.exs needs five keys: name, version, modules, roles and fixtures. Every other key is optional and defaults to [] (folded_modules and sidebars to %{}, frontend and assignment_pool to nil, priority to 0). An unknown key fails the build.
All keys
| Key | What it holds | More |
|---|---|---|
name | The app's name, an atom such as :crm | App layout |
version | A semantic version, such as 1.2.0 | Publishing |
modules | Module names its RecTypes may use | App layout |
roles | Roles the app declares. Two apps may not declare the same role | Permissions |
fixtures | RecTypes whose records the app ships, in install order | Fixtures and patches |
requires | Cardinal's version range and the apps it needs | App layout |
priority | Orders apps that no requirement orders, lower first | App layout |
scheduler | {frequency, worker} pairs | Jobs and scheduler |
rec_events | Hooks on other apps' RecTypes | Controllers |
create | Entries in a form's Create menu | Platform modules |
connections | Groups on a record's Connections panel | Form and list options |
global_search | RecTypes in search priority order | Form and list options |
pages, widgets | Desk pages and workspace widgets a plugin renders | Workspaces and dashboards |
apps_screen, sidebars, folded_modules | Tiles on /desk and module panels | App layout |
route_rules, redirects | Website routing | Web pages |
frontend | The app's own single-page app | Desk plugins |
cli | cardinal <app>:<command> commands | CLI commands |
env | Environment variables the app reads | App layout |
api_routes | Modules answering /api/<app>/<path> | API routes |
automation_steps | Step types for the automation builder | Automation steps |
principal_sets | Named user sets for row rules | Role rules and sets |
grants, widenable, user_invitation | What other users may hand out | Role rules and sets |
assignment_pool | Narrows an Assignment Rule's users | Below |
ignore_links_on_delete | RecTypes whose Links never block a delete | Below |
log_retention | How long log rows live | Below |
naming_series_variables | Custom parts in a naming series | Below |
ignore_links_on_delete
A Link from these RecTypes does not stop the linked record's delete. Eden's AI Calls never keep a conversation alive:
ignore_links_on_delete: ["AI Call", "MCP Event"]log_retention
{rectype, days} pairs. The daily prune deletes older rows. A later app may list a RecType again to change its period, and a site overrides it in Log Settings.
log_retention: [{"AI Call", 7}, {"MCP OAuth State", 1}, {"MCP Event", 30}]naming_series_variables
{part, module} pairs. The module exports naming_series_variable(part, rec, ctx) and returns the text the part puts in a name, so a series such as INV-.FY.-.#### can use FY. A later app's entry for the same part replaces an earlier one.
assignment_pool
A module exporting assignment_pool(rule, users, rec, ctx). Before a Round Robin, Load Balancing or Weighted Distribution pick, each installed app's module returns the users the rule may pick. Each app narrows the previous app's list. A user a module adds is ignored, and an empty list leaves the rule without a user.
CRM prefers users whose availability is Active:
defmodule Crm.AssignmentPool do
@rectypes ["CRM Lead", "CRM Deal"]
def assignment_pool(%{"document_type" => rectype}, users, _rec, ctx)
when rectype in @rectypes and users != [] do
category = categories(ctx, users)
active = Enum.filter(users, &(category[&1] == "Active"))
reachable = Enum.filter(users, &(category[&1] in ["Active", "Away"]))
cond do
active != [] -> active
reachable != [] -> reachable
true -> users
end
end
def assignment_pool(_rule, users, _rec, _ctx), do: users
endassignment_pool: Crm.AssignmentPoolThe ctx is a system ctx inside the record's transaction.