Clients

The operator decisions, ownership boundaries, state rules, and packaging contract behind Oko Desktop.

Migrated from oko-desktop/docs/DESIGN.md

Oko Desktop interface design

Oko Desktop is the decision surface over Oko's merged transcript catalogue, rebuildable search projection, and the PTY sessions Oko started itself. Raw vendor transcripts remain owned by their runtimes, while Transcript Lake owns the masked canonical store. The interface names that boundary wherever an operator could otherwise delete or trust the wrong thing.

Destinations

GroupDestinationDecision
WorkPostureDecide whether the catalogue, projection, broker, or router needs attention.
WorkCatalogueFind a session in the merged catalogue by content or recency.
WorkSessionsInspect, steer, end, or stop sharing a PTY session Oko started.
WorkRequestsAnswer interaction and approval requests blocking a run.
EvidenceProjectionVerify transcript-root coverage and rebuild the search projection.
EvidenceActivityRead prompts, tokens, and measured frustration for the stated scan window.
EvidenceGoalsInspect transcript-derived goals together with provenance.
SystemSyncDecide whether LAN mirrors and object storage are current.
SystemRoutingConfirm the loopback proxy is the only model route.
SystemSettingsSee every path Oko reads and writes and the boundary it never crosses.

Every destination states the operator journey it serves. Surfaces that cannot name a real source or decision do not ship; an engaged-time and cost screen was removed because that measurement was not exposed by OkoKit.

Rules the client may not break

  1. Every screen uses the shared Wisent design system; the repository carries no second local card, badge, panel, or button language.
  2. A failed read retains the last known value and adds the backend's exact error and reproduction command. It never turns a broken SQLite read into an empty catalogue.
  3. Not configured is neutral. A missing measurement is a dash, not a fabricated zero.
  4. Every number states its scope. Activity scans a bounded set of files; Projection counts indexed rows. Neither may call its value a total when it is not one.
  5. Secrets are presence booleans. Bearers, agent secrets, object API tokens, and capabilities never reach a view, log, or pasteboard.
  6. Destructive writes are confirmed and scoped. Projection pruning computes against every indexed session id and never rewrites the merged catalogue.

Refresh and cost

Independent reads execute concurrently. Transcript statistics are the slow path because they open source files, so Activity shows a named loading state while the rest of the window remains usable. A stale response never clears already-rendered content.

Window and packaging contract

The app creates a usable window when macOS restoration points at view types from an older release and returns no window. The Swift package product is OkoWorkspace even though the installed bundle and executable remain Oko.app and Oko; this prevents SwiftPM from resolving the dependency's older executable product with the same name.

WisentAuth gates the window and threads the signed-in user id into OkoModel.ownerId. That identity scopes shared-session publications, so a registry Oko could not reach reports not read rather than zero.