Skip to content

feat: A2UI cards become data, not code #84

Description

@Lancetnik

Is your feature request related to a problem?

An A2UI card is code. Its declaration is a Python dict inside src/assistant/a2ui.py — one
843-line file holding ~25 components (WeatherPanel, MarketBoard, TaskPlan, InboxBrief,
AgendaCard, DecisionMatrix, …) — and its look is a bespoke Svelte component wired in by name
in A2UISurface.svelte. Nothing about a card is addressable from outside the repo: you cannot
add one without editing the source and shipping a release, you cannot edit or turn one off, and a
plugin (#75) has no way to carry one.

The rendered card is no better off. An A2UISurface is never persisted — it is rebuilt from the
chat's message log by durable_surfaces_from_messages(), and its data updates
(A2UISurfaceDataUpdated) are events on that one chat's stream. The card is bound to the thread
that produced it and dies with it, so nothing can revisit or update it from another chat or from
a scheduled task.

Describe the solution you'd like

Cards stop being code and become data:

  • A card definition is a file, laid out in the same three layers skills already use — Bundled
    / Global / Profile — so the user can drop one in, a plugin can install one, and either can be
    disabled or suppressed per profile.
  • A card instance is a file too, living under the profile's file space rather than inside a
    thread, so a card the agent made on Monday is still there on Friday and can be updated by a
    task run.

This is the umbrella. The work is tracked in the sub-issues:

Additional context

  • src/assistant/a2ui.py — the catalog to move to disk
  • src/assistant/gateway/core.py (_emit_a2ui_surfaces) — where surfaces are recovered from
    message history today
  • web/src/components/items/A2UISurface.svelte, BasicA2UIComponent.svelte — the renderer split
    between bespoke and generic
  • ADR 0016 (user-managed skills: layers + per-profile suppression) — the model the card directory
    mirrors
  • ADR 0001 (single root directory), ADR 0012 (file references resolve by path)

Direction, not in scope here: a Live Artifacts tab in the spirit of Claude Cowork — one
surface showing every live card outside of chats. Until then, a saved card is reached through
Files.

See also: #75 (plugins should be able to carry cards), #67 (skills as editable files), #68
(tasks as editable files).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions