ZSTATION-CORE // ENGINEERING REPORT

// module map · command surface · host shim · test status

Home Source
0.1.1version
3crate-types (rlib · staticlib · cdylib)
52engine commands
32in-source unit tests

zstation-core is in active development. The figures on this page are derived from the crate source as it stands today (Cargo.toml, src/lib.rs): version, crate-types, the dotted commands matched in Engine::invoke, and the in-source unit tests. The "planned" column lists work that is not yet implemented — it is a roadmap, not a claim of coverage.

Module map

modulerole todayplanned
lib (Engine)one dotted command surface via Engine::invoke; JSON in / JSON out; board persistencemore dispatch coverage as the board model grows
modelservice · tile · board types (position, size, z-order, partition/session)tile groups, per-tile settings, richer layout
catalogthe built-in service catalog (Slack, Gmail, Discord, Notion, Linear, Claude, … + custom URL tiles)editable/user-supplied catalog, favicons
storeboard load/save to the profile directory (dirs)multiple named boards, import/export
errorengine Result + Error with stable machine tags for a {error:{tag,message}} envelopemore granular tags
tauri_plugin (feature tauri)Tauri v2 glue: exposes the engine as the ordinary app command zst_invoke for GUI hostsevent stream if the board moves from pull- to push-driven

Command surface

cmdargsreturns
version{ name, version }
service.catalog[Service]
service.get{ id }Service
board.getBoard
board.jsonBoard (raw JSON)
board.resetempty Board
tile.add{ service?, url?, title?, partition?, x?, y?, w?, h? }Tile
tile.remove{ id }{ ok }
tile.update{ id, patch }Tile
tile.bring_front{ id }Tile
layout.save{ tiles:[{ id,x,y,w,h,z }] }{ ok }
layout.arrange{ mode?, viewport?:{ w,h,gap?,pad? }, cols? }Board (auto-tiled: grid|columns|master|attention)
wiring.add{ rule:{ source, transform, sink } }WiringRule
wiring.processTap { tile, event, selector, text, fields }{ actions:[ResolvedAction] }
convoy.set{ convoy:{ name?, members:[{ tile, template? }] } }Convoy (upsert)
convoy.go{ id, path }{ convoy, navs:[{ tile, url }] }
trail.set{ trail:{ name?, stops:[{ tile, url?, label? }] } }Trail (upsert; ordered cross-session walkthrough)
trail.step{ id, dir?:next|prev|first|last|goto, index? }{ trail, cursor, total, at_start, at_end, stop, nav } — persistent, resumable cursor

The host shim

Real per-service session isolation cannot use iframes: Slack/Gmail/etc. send X-Frame-Options / CSP frame-ancestors that forbid framing, and iframes share the page's cookie jar anyway. It requires native, separately-partitioned webviews. Positioning one is a host concern, so the engine stays host-agnostic and the mountable view calls a small shim the host provides — window.__stationHost — with open, setBounds, setVisible, reload, navigate, close and clearSession. In zstation this shim is backed by Tauri v2 WebviewWindow::add_child plus per-webview data_store_identifier / data_directory. With no shim present (plain browser preview) the view falls back to a best-effort iframe so the UI still renders for frontend dev.

Build surfaces

The crate declares crate-type = ["rlib", "staticlib", "cdylib"]. The rlib links natively into Rust/Tauri hosts. Dependencies are foundational and vendorable — serde, serde_json, thiserror, dirs — with no network, TLS or UI stack, so the default build compiles in headless CI. The optional tauri feature adds the Tauri v2 app-command layer.

Verification

The crate carries in-source unit tests over the engine command surface (version reporting, the service catalog, tile add/remove/update, board reset and layout persistence) plus a headless Node test suite for the mountable view (frontend/zstation.test.cjs). The pure core runs without network access and is intended to pass identically in a headless Linux CI.