Skip to content

Implement the Live Interactivity (Lumens) extension — omadia-canvas-protocol/1.1 #34

Description

@iret77

Summary

This issue asks the maintainers to implement the Live Interactivity (Lumens) extension — the Omadia, on-canvas answer to sandbox-style "live artifacts", deliberately re-aimed to be both more capable and structurally safer.

The concept and a full normative definition have been written and are ready for implementation (PR #31). This issue tracks turning those specs into code.

Thesis: most of what arbitrary-code sandboxes block is blocked by missing capabilities, not missing compute. So Lumens constrain computation (a declarative, bounded, deterministic, interpreted behaviour model — no arbitrary code; the whitelist parser/CSP default-src 'self' model extends to it) and open capabilities (real data, write-back, allowlisted network, generated assets) mediated through the existing Tier-2/3 orchestration and effect classification.

This unblocks the target use cases: small games (build/play/share), interactive data workflows, unusual visualisations (defrag-style), live maps, kiosk/iPad surfaces — all generated by the agent, run Tier-1-fast (60 fps, no server round-trip per frame), and safe to share with selected users or save as a preset.

Specs to implement (all on claude/omadia-ui-interactivity-concept-wu7isw, PR #31)

What a Lumen is

Declarative data, not code: state + transitions + view + events + capabilities, plus a new scene primitive (declarative draw surface), declarative ports/wires for cross-element interaction, per-region render cadence, and a preset library so the agent authors once and reuses constantly.

Key guarantees the implementation must preserve:

  • No arbitrary code — LX is a validated JSON-AST walked by a shipped interpreter (no eval, CSP unchanged).
  • Bounded & total — gas + frame ceiling + bounded iteration + state cap → a Lumen can never hang the host (halts with surface_error).
  • Deterministic — host-seeded random/now/tick → replay, undo, safe sharing, v2 multiplayer.
  • Default-deny, brokered capabilities — reuse local/internal/external-effect + confirmation modal; nothing reaches the outside directly.
  • Content-addressed assetsid = kind-sha256(content) ⇒ never-stale cache; generated material comes from omadia-core LLM connectors, the Lumen only requests + renders.
  • Additive — rides existing surface_* grammar, DataRef/HMAC scoping, authority split, shared-canvas hooks; 1.0-only clients ignore unknown types.

Proposed workstream (smallest mergeable units first — see implementation-plan §10)

  • L0 — JSON Schemas: Lumen behavior section, LX-AST, scene, ports/wires, capability manifest + accept/reject fixtures (docs/protocol/schema/) → protocol 1.1
  • L1 — Tier-1 LX interpreter: deterministic AST evaluator, gas + frame ceiling, bounded iteration, seeded random/now; extended whitelist validator
  • L2scene primitive: draw-list rasteriser (canvas2d → WebGL), token-only styling, buffer-native hit-testing → TargetRef
  • L3 — cadence & animation: per-region static/reactive/{tick} dirty-tracking + rAF scheduling; declarative animate on the Lume effect vocabulary; reduced-motion
  • L4 — events & touch: tap/longPress/drag/pinch/swipe/key/tick; 44 pt hit-targets; host gesture arbitration; input-modality handshake fields
  • L5 — capabilities broker (Tier 2): persist/loadData/writeData/tiles/fetch/generateAsset/clipboard; effect-classified brokering + confirmation gate; surface_capability_* events; asset transport + content-addressed cache (generateAsset ↔ omadia-core connectors)
  • L6 — ports & wires: typed ports, Tier-1 wire resolution, shared viewState.selection cross-element
  • L7 — lifecycle & presets: author-once/patch; lumen-presets/** + lumen-state/** stores; resolve-then-generate lookup; fork+patch; behaviour-idiom library in the UI Skill
  • L8 — sharing: canvasOwnership group extension + channel fan-out + import consent
  • L9 — reference Lumens: an arcade game · interactive workflow · defrag-viz · map, traced end-to-end + conformance fixtures

Riskiest items (mirror concept §13)

LLM reliability emitting valid LX (likely a strong-model authoring job + fast-model patching); gas/scene-perf calibration on the reference Lumens; capability-consent UX.


Specs are ready for review on PR #31. Requesting maintainer review of the approach and prioritisation of the workstream above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions