Skip to content

Interface: BarHostOptions

Defined in: core.ts:23

@habemus-papadum/aiui-remote-bar — the command bar as its own channel (aiui-pencil plan, decision D5). The mode engine of a host page, projected over its own websocket, mounted as a channel sidecar at its own URL, with a Solid client that renders the projected bar and dispatches taps back.

This barrel is the browser/isomorphic surface — the wire, the socket-free cores, the host binding, and the client component. The node relay is a separate import so this entry never drags ws/express into a browser bundle:

import { createBarBackend } from "@habemus-papadum/aiui-remote-bar/server"; import { barSidecar } from "@habemus-papadum/aiui-remote-bar/sidecar";

Layers:

  • protocol.ts — the pure wire (bar down / command up), the WireCap↔CapView drift guard, framing.
  • core.ts — the two endpoint cores, socket-free (a send in, a receive out).
  • solid.ts — the host binding: a solidModeEngine-shaped source → the wire.
  • ui/ — the remote's reactive client (behind a transport seam) + the RemoteBar Solid component.

Properties

filter?

optional filter?: (cap) => boolean

Defined in: core.ts:32

App-level filter over the projected rows — D5's "the remote may see only a subset". Applied inside BarHost.publishBar; a cap the predicate rejects never reaches the wire, so it can be neither seen nor tapped. Absent = the whole bar is projected.

Parameters

cap

WireCap

Returns

boolean


onClientJoined?

optional onClientJoined?: (client) => void

Defined in: core.ts:39

A remote joined this host's room (relay lifecycle) — e.g. to re-publish.

Parameters

client

string

Returns

void


onClientLeft?

optional onClientLeft?: (client) => void

Defined in: core.ts:41

A remote left this host's room.

Parameters

client

string

Returns

void


onCommand?

optional onCommand?: (command, payload?) => void

Defined in: core.ts:37

A command arrived from a remote (a bar tap) — dispatch it into the mode engine. The host owns the engine; this is the ONLY inbound verb.

Parameters

command

string

payload?

unknown

Returns

void


send

send: (message) => void

Defined in: core.ts:25

Put a message on the wire.

Parameters

message

HostToRelay

Returns

void