Skip to content

Variable: EmbedMessage

ts
const EmbedMessage: object;

Every message name, namespaced ridge: so it can't collide with the host's own traffic.

Grouped by direction because the two ends care about opposite halves: a host sends the first group and listens for the second.

Type Declaration

error

ts
readonly error: "ridge:error" = "ridge:error";

embed → host: a write was rejected and did not take effect.

Its own message rather than a field on a setState reply, because setState has no reply: it is a fire-and-forget merge over many ids, and a rejection concerns one of them. Sent per rejected id, so a partially-accepted write reports exactly the ids that failed and stays silent about the ones that landed.

getState

ts
readonly getState: "ridge:getState" = "ridge:getState";

host → embed: ask for the current state.

getStateSchema

ts
readonly getStateSchema: "ridge:getStateSchema" = "ridge:getStateSchema";

host → embed: ask for the complete component-owned state schema.

ready

ts
readonly ready: "ridge:ready" = "ridge:ready";

embed → host: mounted and addressable, with the complete registered state schema.

setState

ts
readonly setState: "ridge:setState" = "ridge:setState";

host → embed: merge this state, per id and per key. null clears a key.

state

ts
readonly state: "ridge:state" = "ridge:state";

embed → host: reply to getState.

stateChange

ts
readonly stateChange: "ridge:stateChange" = "ridge:stateChange";

embed → host: state changed through a user edit or a non-silent setState.

stateSchema

ts
readonly stateSchema: "ridge:stateSchema" = "ridge:stateSchema";

embed → host: reply to getStateSchema.

Ridge AI