feat(contract): add render() to UI provider contract #9

Closed
opened 2026-06-02 07:09:36 +02:00 by michael · 0 comments
Owner

Goal

Define render() as a required operation in the berhtjan-core UI provider
contract. All UI providers (berhtjan-cli, berhtjan-web, berhtjan-api,
berhtjan-desktop) must implement this operation.

Background

adapters/ui (DAW/fragjan#90) translates domain schemas to ui_types/v1
and passes records to all active UI providers via render().
berhtjan-core must define the contract so all providers are validated
consistently.

Required changes

init.lua

  • Add render to _contracts:
    render = "bool_or_err"
  • Add render to required_ops():
    { "dispatch", "build_usage", "render" }

Contract

mod.render(data, cfg) -> true, nil | nil, err
data = { schema = "ui_types/v1", records = { ... }, fields = { ... } }

Output format is provider-specific -- berhtjan-core defines the
interface only, never the output.

Note

Implementation issues per provider:

  • berhtjan-cli: DAW/daw-modul-berhtjan-cli (see companion issue)
## Goal Define render() as a required operation in the berhtjan-core UI provider contract. All UI providers (berhtjan-cli, berhtjan-web, berhtjan-api, berhtjan-desktop) must implement this operation. ## Background adapters/ui (DAW/fragjan#90) translates domain schemas to ui_types/v1 and passes records to all active UI providers via render(). berhtjan-core must define the contract so all providers are validated consistently. ## Required changes **init.lua** - Add render to _contracts: render = "bool_or_err" - Add render to required_ops(): { "dispatch", "build_usage", "render" } ## Contract mod.render(data, cfg) -> true, nil | nil, err data = { schema = "ui_types/v1", records = { ... }, fields = { ... } } Output format is provider-specific -- berhtjan-core defines the interface only, never the output. ## Note Implementation issues per provider: - berhtjan-cli: DAW/daw-modul-berhtjan-cli (see companion issue)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-modul-berhtjan-core#9
No description provided.