Skip to content

host

FieldValue
Prefixhost
Namespace constantHostNamespace
Subjects constantHostSubjects
Kindbus
Schema recordHostSchemas
Tierframework
Package@makaio/contracts
Defined inpackages/contracts/src/host/namespace.ts
KeyWireTypeSchema
app.focushost.app.focusrpcschemas.ts
tray.activatehost.tray.activaterpcschemas.ts
window.closedhost.window.closedeventschemas.ts
window.createhost.window.createrpcschemas.ts
window.focushost.window.focusrpcschemas.ts
window.labelChangedhost.window.labelChangedeventschemas.ts
window.listhost.window.listrpcschemas.ts
window.openDashboardhost.window.openDashboardrpcschemas.ts
window.openedhost.window.openedeventschemas.ts

Focus the application: bring an existing window to front, or open the default shell window if none are open.

Used by: second-instance detection (Electrobun health-probe), makaio open CLI command, Electron second-instance event.

Subject: host.app.focus Type: Request (RPC)

Request:

Empty object.

Response:

FieldTypeRequired
focusedbooleanyes
windowIdnumber | nullyes

Activate the tray popover panel. Fired when the user left-clicks the tray icon.

The response tells whether the host handled the click. When handled is true, suppress the native menu. This is true for both showing and dismissing the popover (toggle).

Subject: host.tray.activate Type: Request (RPC)

Request:

Empty object.

Response:

FieldTypeRequired
handledbooleanyes

Emitted when a desktop window is closed.

Subject: host.window.closed Type: Event

FieldTypeRequired
paramsRecord<string, string> | undefinedno
registrationIdstringyes
windowIdnumberyes

Create a new desktop window identified by its registry registration ID.

Subject: host.window.create Type: Request (RPC)

Request:

FieldTypeRequired
paramsRecord<string, string> | undefinedno
registrationIdstringyes

Response:

FieldTypeRequired
windowIdnumberyes

Focus an existing window. If no windowId is provided, focuses the most recently active window.

Subject: host.window.focus Type: Request (RPC)

Request:

FieldTypeRequired
windowIdnumber | undefinedno

Response:

FieldTypeRequired
successbooleanyes

Emitted by the web UI when a window’s display label changes — for example, when a project name becomes available or when the first message of a chat session is typed.

The host main process listens for this event and calls WindowManager.updateLabel so the internal registry stays current. Because the event is on the shared bus, the tray handler can also react to it (e.g. to update the tray menu item label) without any additional wiring.

Subject: host.window.labelChanged Type: Event

FieldTypeRequired
labelstringyes
windowIdnumberyes

List all currently open desktop windows with their current state.

Subject: host.window.list Type: Request (RPC)

Request:

Empty object.

Response:

FieldTypeRequired
windows{ windowId: number; registrationId: string; visible: boolean; focused: boolean; params?: Record<string, string> | undefined; label?: string | undefined; }[]yes

Open (or focus) the primary dashboard window managed by the host shell.

Request: empty — the handler knows the dashboard registration ID. Response: windowId — the host-assigned window ID, or null when no window could be created or focused.

Subject: host.window.openDashboard Type: Request (RPC)

Request:

Empty object.

Response:

FieldTypeRequired
windowIdnumber | nullyes

Emitted when a new desktop window is opened.

Subject: host.window.opened Type: Event

FieldTypeRequired
focusedbooleanyes
labelstring | undefinedno
paramsRecord<string, string> | undefinedno
registrationIdstringyes
visiblebooleanyes
windowIdnumberyes

Auto-generated by yarn docs:bus. Do not edit manually.