Function Registration and the Default UI
Status: Target -- this page describes the next-version product path. Function registration only submits the capability contract; default pages are generated by the Server.
In One Sentence
Service developers register function capabilities; the platform generates default pages from those capabilities; operators can publish a default page directly and only edit business configuration in Page Studio when unsatisfied.
FunctionContract
-> CapabilitySemantics
-> PageProposal
-> PageDraft / PublishedPageSpec
-> ProComponents pageFunction registrants do not design menus, columns, button placement, tables, page layouts, or React schemas.
Registration Information
| Field | Purpose | Page UI? |
|---|---|---|
id, version | Stable function identity and change tracking | No |
summary, description, tags | Function catalog, search, diagnostics | No |
inputSchema, outputSchema | Form fields, validation, candidate columns and detail fields | No |
resource, operation | Business resource and action ownership | No |
capability | collection_query/item_query/create/update/delete/action/task/report | No |
execution, approval, risk, permission | Scheduling, approval, and governance; approval composes with sync/async | No |
| Category, title, columns, action placement, mapping, page type | PageProposal/PageSpec | Yes, not registrable |
Example:
client.registerFunction(
{
id: "player.update",
version: "1.0.0",
resource: "player",
operation: "update",
capability: "update",
risk: "warning",
inputSchema: PlayerUpdateSchema,
outputSchema: PlayerSchema,
},
updatePlayer,
);capability is capability semantics, not UI: it only says that player.update can join the update lifecycle of the player resource, not whether it renders as a row button, a detail modal, or a standalone page. Those come from the PageProposal and are then finalized in Page Studio.
What JSON Schema Can Automate
JSON Schema is the foundation of the automated UI, but not a complete page definition:
| JSON Schema information | What the platform can auto-generate |
|---|---|
| Input fields, required, enum, format, defaults | SchemaFormRenderer fields and validation; Modal/Drawer as containers only |
| Output object fields | Detail fields, result field candidates |
| Output collection item schema | ProTable column candidates |
| REST path + method + path parameter | High-confidence CRUD capability and identity suggestions |
JSON Schema cannot decide on its own:
- Whether
playerIdcomes from a manual form, the selected row, or a detail context. - Whether an array is a table, a dropdown data source, or chart data.
- Whether a function should be a row action, batch operation, toolbar action, or standalone page.
- The business semantics of pagination, task events, or report metrics.
These are handled by CapabilitySemantics; it is the platform's versioned, auditable capability-semantics layer, not page configuration inside the SDK.
Default Page Generation
CRUD Resource
When the platform identifies the collection query and identity of the same resource, it generates a ResourcePage Proposal; write capabilities are optional, so read-only resources can be published directly too:
GET /players -> collection_query -> ProTable
GET /players/{playerId} -> item_query -> ProDescriptions
POST /players -> create -> Modal/Drawer + SchemaFormRenderer
PATCH /players/{playerId} -> update -> Modal/Drawer + SchemaFormRenderer
DELETE /players/{playerId} -> delete -> Popconfirm
POST /players/{playerId}/ban -> action -> row action candidateStandard OpenAPI REST shapes are recognized automatically; SDK functions gain the same semantics through a controlled capability or an administrator's supplement in the Resource Catalog. The platform does not guess from function names like player.list.
Non-CRUD Functions
| Function | Default Proposal | Conditions for direct publishing |
|---|---|---|
mail.send | OperationPage | Executable binding, input form, risk/permission, and navigation defaults present |
player.ban | Resource action or OperationPage | A resource action when identity/context is clear, otherwise a standalone operation page |
reward.batchGrant | TaskPage | Real task status, events, and result semantics complete |
analytics.retention | ReportPage | dataset, dimensions, metrics, and chart/table semantics complete |
Page quality:
ready: complete and type-verifiable; can be accepted and published directly.basic: a safe synchronous OperationPage; can be accepted and published directly.needs_review: missing semantics or configuration that cannot be auto-determined; confirm in Page Studio first.
When a function is not executable, violates its contract, or is unsafe under governance, no Proposal is generated — instead a BlockedProposalIssue (diagnostics and fix guidance only, no page definition); blocked is not a page quality.
Successful registration does not mean automatic launch. ready/basic still require the user's explicit "accept and publish"; the system never exposes menus in the Runtime Console on its own.
Boundary Between Forms and Pages
Function input forms use:
JSON Schema + FormPresentationSpec -> JSON Schema form adapterForm presentation only handles the fields, validation, and display of a single query, create, edit, or action invocation. Pages compose lists, details, CRUD, actions, tasks, and reports. PageSpec stores no React component tree; @rjsf/antd and ProComponents are both just renderer implementation details.
Contract Changes
After a function contract or capability semantics change:
- The Server stores the new summary and generates a new PageProposal.
- Published pages are marked stale, and dangerous bindings immediately refuse execution.
- Page Studio shows the diff between the Proposal, the current Draft, and the PublishedPageSpec.
- The user accepts the automatic safe merge or resolves conflicts, then publishes a new snapshot.
A published page never changes silently because of a function registration update.
Registration Boundaries
- The SDK/OpenAPI submits no UI schema, component tree, page protocol, or menu information.
- Table columns, pagination bindings, typed selectors, chart configuration, task event bindings, menus, page titles, categories, and button placement are all decided in PageProposal/PageSpec.
- The platform does not guess fields, object IDs, CRUD, or page placement from function names.
- The user's normal publishing path is accept Proposal, semantic editing, validate, and publish; raw JSON is only for import/export and controlled diagnostics.
See the Dashboard Resource/Page Model and OpenAPI / SDK Descriptor v2.
