zara-context: event-driven active-context provider #4

Closed
opened 2026-08-31 18:42:07 +00:00 by lost-rob0t · 0 comments
lost-rob0t commented 2026-08-31 18:42:07 +00:00 (Migrated from github.com)

Plugin

zara-context

Goal

Expose what the user is currently doing as structured, short-lived context so Zara can resolve references like “this”, “that file”, “this repo”, and “the thing I just copied” without shoving raw desktop state into every prompt.

Context model

Provide normalized context for at least:

  • active application/window;
  • active workspace;
  • active repository/project;
  • active file/document;
  • selected text when explicitly available;
  • clipboard metadata/content according to policy;
  • recent commands/actions;
  • current media/call state where adapters exist.

Context should carry timestamps, provenance/source and confidence/freshness where applicable.

Integration

Consume structured events from zara-desktop when available and expose a stable query/event API to plugins such as zara-coding, zara-files, zara-browser and zara-memory.

Prefer event-driven updates. Polling should be an adapter fallback, not the core model.

Privacy / safety

  • short-lived context is not automatically persistent memory;
  • sensitive content must not be logged by default;
  • plugins request only the context categories they need;
  • stale context must be marked stale rather than silently reused;
  • selected/clipboard contents must have bounded sizes.

Plugin shape

Service plugin under plugins/zara-context/ with a small structured context schema and fake event sources for tests.

Acceptance criteria

  • active app/window/workspace context can be queried
  • repo/file/project context can be attached when resolvable
  • every context item has source and timestamp/freshness semantics
  • event updates replace blind high-frequency polling where supported
  • persistent memory is opt-in and external to this plugin
  • stale and unavailable context fail explicitly
  • deterministic network/GUI-free tests cover updates and expiry
  • README documents context categories and privacy boundaries
  • registry validation, plugin tests and nix flake check pass
## Plugin `zara-context` ## Goal Expose what the user is currently doing as structured, short-lived context so Zara can resolve references like “this”, “that file”, “this repo”, and “the thing I just copied” without shoving raw desktop state into every prompt. ## Context model Provide normalized context for at least: - active application/window; - active workspace; - active repository/project; - active file/document; - selected text when explicitly available; - clipboard metadata/content according to policy; - recent commands/actions; - current media/call state where adapters exist. Context should carry timestamps, provenance/source and confidence/freshness where applicable. ## Integration Consume structured events from `zara-desktop` when available and expose a stable query/event API to plugins such as `zara-coding`, `zara-files`, `zara-browser` and `zara-memory`. Prefer event-driven updates. Polling should be an adapter fallback, not the core model. ## Privacy / safety - short-lived context is not automatically persistent memory; - sensitive content must not be logged by default; - plugins request only the context categories they need; - stale context must be marked stale rather than silently reused; - selected/clipboard contents must have bounded sizes. ## Plugin shape Service plugin under `plugins/zara-context/` with a small structured context schema and fake event sources for tests. ## Acceptance criteria - [ ] active app/window/workspace context can be queried - [ ] repo/file/project context can be attached when resolvable - [ ] every context item has source and timestamp/freshness semantics - [ ] event updates replace blind high-frequency polling where supported - [ ] persistent memory is opt-in and external to this plugin - [ ] stale and unavailable context fail explicitly - [ ] deterministic network/GUI-free tests cover updates and expiry - [ ] README documents context categories and privacy boundaries - [ ] registry validation, plugin tests and `nix flake check` pass
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nsaspy/zara-plugins#4
No description provided.