Log inGet started
What it does

channels

A cross-component command bus for the editor shell. One component publishes an imperative interface — a small table of functions — under a name when it mounts and clears it when it tears down; another component looks the interface up by name and drives it. This is how the top bar opens dock panels, how the viewport camera asks whether its panel is open, and how the Window menu toggles the agent chat screen.

The registry is a module upvalue. A module loads once per VM, so the registry lives for the VM's whole lifetime and is shared by every script that requires this module — it survives hot-reload and edit↔play mode flips exactly as a published handle must. Nothing is written to _G, so the sealed global table stays untouched.

Exports

  • M.publish(name: string, iface: table) — publish an imperative interface under a name. A later publish with the same name replaces the prior one (hot-reload friendly).
  • M.clear(name: string) -> boolean — remove a published channel; consumers' get returns nil afterward. Returns true if a channel was removed.
  • M.get(name: string) -> table? — look up a published channel's interface by name, or nil if nothing is published under that name.

Usage

local Channels = require("@builtin::modules.api.editor.channels")

-- Publisher, at mount:
Channels.publish("editor_dock", { open = fn, close = fn })

-- Publisher, at destroy:
Channels.clear("editor_dock")

-- Consumer:
local dock = Channels.get("editor_dock")
if dock and type(dock.open) == "function" then dock.open("scene") end

Notes

  • A cleared channel's get returns nil rather than a handle into a dead component — consumers must tolerate nil on every lookup.
  • publish requires a non-empty string name and a table interface; both raise on a bad argument.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.