Agent Surfaces: the Desktop Tray

The desktop tray is the web home in a desktop window plus a tray icon (spec 3.3 §5.5). The icon carries the decisions badge; its panel shows whether your agents are running, what was spent against the daily limit, the decisions waiting, what is working now and next, a quick message box, Open home and Stop all.

Note: the tray is Experimental. It is an unpublished app in its own Cargo workspace, adk-surface/desktop/, built from source; there is no desktop feature on adk-surface and no installer. It reaches a kernel on the same computer only.

LightDark
The tray panel over scripted_trayThe tray panel over scripted_tray, dark

What the tray may decide

The tray says yes once or no to everyday calls, and no to any call; approving anything else opens the home at the decision (spec 3.3 §7.2).

Allow onceAlways allowEditDenyHigh risk
YesNo (opens the home)NoYesNo (opens the home)
CardWhat the tray showsWhat it offers
Low or medium risk, shown in full"Finance · since 18:00 · Medium risk", the engine's plain words when it has them ("Your agents suggest this. Once you say yes, it runs right away."), the exact call in mono, whether it can be taken backAllow once and Deny, in the engine's words ("Do it", "Not now" on a suggestion)
High risk, money, a call shown cut short, or an answer that needs you to confirm it is you"Code · High risk · open to decide"Deny when the engine offers it, since saying no is always safe; approving opens the home at /ui/decisions/<id> from the heading or the chevron
Answered here or elsewhereOne line: a check, the heading, then "You said yes from the tray at 07:40" or "You said yes in Telegram at 07:31". A long heading stops at two lines; who answered is never cut. A click, Enter or Space opens it to show the exact call againNothing: opening the line answers nothing

Every card's heading opens the home at that decision, where Always allow, Edit and Confirm it's you and approve are answered. Ids and versions are never shown. An answered card's line leaves the panel five minutes after the answer, or as soon as a new decision arrives; at most three stay. A call that needs more than one approver stays a decision after your answer, and becomes a line once it is decided.

The panel fills its window and never scrolls as a page: its header, Open home and Stop all stay put, and the decisions and what comes next scroll between them. The home window opened from Open home or a card's heading does the same at any size: the header stays put and each pane scrolls inside itself.

RuleOn the tray
Esc never decides (§7.4 rule 1)Enter and Esc on a focused answer, hiding the panel by clicking away, and Quit decide nothing
Typing while a decision is open is queued (§7.4 rule 2)A message to an agent whose card is open shows "Sent after this card is answered" and runs once the card is answered
Stopping is one action; resuming happens only in the home (S-I10)Stop all in the panel and the icon's menu; no Resume all. When Stop all from the menu does not go through, the panel opens and says why
Every answer is recorded with where it came from (§11)The record and every other surface say "from the tray"

Running it

  1. Start your agents on this computer:

    adk-rust up
  2. Build the shell's bundled pages, then run the shell:

    npm ci --prefix adk-surface/desktop/probe
    npm run build --prefix adk-surface/desktop/probe
    cargo run --manifest-path adk-surface/desktop/app/Cargo.toml --bin adk-desktop -- \
        --server http://127.0.0.1:8080
FlagEnvironmentWhat it does
--serverADK_DESKTOP_SERVERThe kernel. Without it, [kernel] bind in <config dir>/adk-rust/harness.toml, else http://127.0.0.1:8080. An unspecified bind (0.0.0.0, ::) is reached on loopback; any other host is refused
--tokenADK_SERVE_TOKENThe token of a kernel started with --auth-token
--probeADK_DESKTOP_PROBE=1Opens the bundled WebKitGTK probe in place of the home
ADK_DESKTOP_LOGAlso writes the shell's log to this file

With a token, the shell puts it in each window's tab storage before the page's own scripts run, on the kernel's origin only, so the home and the panel are signed in. It never writes the token to disk or to its log. Without the token, the panel says "Start the tray with --token".

PlatformOpening the panel
macOS, WindowsA click on the tray icon; the panel opens at the icon, inside the screen's work area. Another click on the icon closes it
LinuxShow decisions in the icon's menu: Linux tray icons report no clicks. The panel opens at the top right of the screen. The icon needs a StatusNotifier host: KDE Plasma, or GNOME with its AppIndicator extension

The icon's menu has Show decisions, Open home, Stop all and Quit. Open home shows the home window as you left it. Closing the home window hides it; the tray keeps running until Quit. Where no tray icon can bring the home back — the icon could not be built, or a Linux desktop has no StatusNotifier host to draw it — closing the home quits the shell. Both windows take the page's light or dark background before it paints, so a dark desktop never flashes white.

The badge

StateIconAlso
Running, nothing waitsThe brand dot
One to nine decisionsA filled badge with the countThe count beside the icon on macOS; the dock badge on macOS; the launcher badge on Linux; a taskbar overlay on Windows
More than nine9+The exact count on the dock and launcher badge; 9+ beside the icon on macOS; a taskbar overlay on Windows
All agents stoppedA stop square
The kernel cannot be reachedA dashBoth windows show "Can't reach your agents" and adk-rust up, and come back by themselves once the kernel answers. A status read that fails or is slow while the kernel answers changes nothing: the last badge and the kernel's pages stay
The kernel needs its tokenA padlock

The shell reads GET /api/surface/status?surface=tray when it starts, on every frame of GET /api/kernel/events, as soon as that stream ends and every 5 seconds, so the icon changes within one kernel event. It logs each change as badge.count.

The windows show only the kernel's own pages and the shell's bundled ones. No page the kernel serves can call into the shell: no capability names a remote page.

LinkGoes to
The kernel's /ui/trayThe panel
The kernel's other /ui/ pagesThe home window, shown and focused: /ui/ itself as you left it, a page inside it (a decision) loaded there. While the kernel is away, the window keeps "Can't reach your agents"
Any other http or https pageThe system browser
Anything else (file:, javascript:, data:)Nowhere

window.open and target="_blank" never open a new window.

Platform support

Linux (WebKitGTK)macOSWindows
Checked bydesktop.yml: the shell driven through tauri-driver under Xvfb — the home and a decision allowed once from it, the probe, the panel end to end, and the store gate on SQLite and PostgreSQLBuilt and run against scripted_trayCompiled by desktop.yml
Opening the panelShow decisions in the menuA click on the iconA click on the icon
The count beside the iconNoYes (the icon's title)No; the tooltip says it
Dock, launcher or taskbar badgeThe launcher badge of adk-desktop.desktop, shown only where a desktop entry of that name is installedThe dock badgeA taskbar overlay icon

Each desktop.yml run writes the WebKitGTK version and the probe's results — the terminal on the DOM and WebGL renderers, the local echo, lines drawn per second, the 3,000-line diff scrolling and selecting, fonts, color-mix() and dvh — to its summary.

Linux graphics

Some GPU drivers draw WebKitGTK windows blank. Set these only when a window stays blank, never by default:

VariableWhen
WEBKIT_DISABLE_DMABUF_RENDERER=1Blank or flickering windows on some Mesa and NVIDIA setups
__NV_DISABLE_EXPLICIT_SYNC=1Blank windows on NVIDIA drivers with explicit sync under Wayland

Testing

TestWhat it checksWhere
Component testsAnswers per card, keys and hiding never decide, the badge, Stop all without Resume all, the Ask box, the spend bar, theme and refresh; lines for cards answered here, elsewhere and by a quorumadk-surface/web/tests/tray.test.tsx, adk-surface/web/tests/decided.test.tsx
Playwright, the app shellThe panel fills its window; a decided line never cuts off who answeredadk-surface/web/e2e/shell.spec.ts (npx playwright test --project shell)
Playwright, ChromiumThe panel end to end over scripted_tray --code-turn: the badge, yes once from the tray, the home at a high-risk decision, a queued message, Stop alladk-surface/web/e2e/tray.spec.ts (npx playwright test --project tray)
adk-desktop-coreWhich kernel, the badge, where links go, where the panel opens and when a click closes it, the command line, the token script, a failed Stop all for the panel; property testscargo test --manifest-path adk-surface/desktop/Cargo.toml -p adk-desktop-core
WebKitGTKThe shell itself through tauri-driveradk-surface/desktop/app/tests/webkitgtk.rs, run by .github/workflows/desktop.yml
cargo run -p adk-surface --features web --example scripted_tray -- 8792 /tmp/adk-tray-ws --code-turn

Limits

  • Loopback only. Device tokens open no /api/surface route yet, so a tray for a kernel on another machine waits for tray-kind devices.
  • High risk. A high-risk decision opened from the tray is answered in the home with Confirm it's you and approve, which needs the home's passkey confirmation.
  • No installer. Unsigned builds from source until the tray leaves Experimental.