Beroun gives every app the same small set of ways to reach the owner and the hardware: a modal dialog, a sound, a vibration, a notification and a second screen. They are called the same way by an app's page, by a service, and by Caroline, so a person and the assistant always see the same thing.
An app's page (known by its address) or a service of a manifest (header X-IntelliCat-Service-Id). Nobody else. In system dialogs only the cursor, A and B have a job.
MessageBox
A modal message drawn over the frontend in the shared window. One shows at a time and the next waits in a queue. A box with no page to show it waits for the next page that connects, so closing an app never loses it.
/api/msgbox{title, text, kind | buttons, icon, default, timeout, wait}/api/msgbox/result?id=&wait=the answer, or {id, pending: true}/api/msgbox/cancel{id}kind:ok,okcancel,yesno,yesnocancel, orbuttons(1–4 texts, each up to 24 characters).timeoutin seconds: 0 waits until answered, default 120, maximum 3600. Title up to 60 characters, text up to 400.- The answer is
{id, index, button, reason}withreasonone ofbutton,cancel,timeout,cancelled.
System sounds
Eight tunes, generated once and played by the system: notify, message, ok, warning, error, click, alarm, ring. Do not disturb silences all of them except the priority sounds alarm and ring; force: true overrides it.
/api/sound/list/api/sound/play{name, force}Vibration
A pattern is a name or a list of whole milliseconds, on/off/on…
| Name | Pattern |
|---|---|
tap | 30 ms |
short | 80 ms |
long | 400 ms |
double, alarm, ring | Predefined rhythms |
| A list | Up to 20 steps, 2 s each, 10 s in total: [100, 50, 100] |
/api/vibraenabled, patterns, max_ms/api/vibra/pulse{pattern, strength 0–100, force}/api/vibra/stopThe system setting vibration turns the motor off for everyone. Do not disturb silences it except for alarm and ring.
Notifications
One call raises a notification in the status bar and the panel (see Notifications).
The external display
An app with an external section has a big page for a second screen: an extended desktop with one fullscreen window. The app's own page becomes the remote control. Apps that opened a big page form a stack. The top one is shown; an empty stack shows the cat splash. When the top one closes, the one below returns at its saved place.
With a monitor attached the left stick is the mouse, the right stick is the wheel, and X/Y are the mouse buttons, while the focus is on the external screen. A game ("external": {"input": "game"}) keeps every button as the gamepad's while it is on top. Audio stays on the device's speaker.
| HTTP | Meaning |
|---|---|
GET /api/display | Status |
POST /api/display/open|close|send | open answers 409 without a screen and 404 for an app without external |
GET /api/display/launch | For the big page: {arg, resume} |
POST /api/display/focus {to} | Move input focus between screens |
A big page is the app's page with ?ext=1, and its /appws channel is ?screen=big. Plugging and unplugging the monitor and its resolution come from the platform (Targets).
Caroline and the system API
She has a tool for every route (beroun_*), reached as the owner: files, settings, the clock, network, power, sleep, services, notifications, MessageBox (beroun_message_box, which waits for the button), sounds, vibration, her own updates, the external display and the store. Caroline in the system →
