Skip to content

Latest commit

 

History

48 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purview

Expose a multi-window desktop GUI to AI agents over MCP: an agent reads every window's structured state and operates the ones it is allowed to — while your users keep clicking buttons, in sync, on the same projection.

Documentation · Guide · Protocol specification

The site publishes from website/ once GitHub Pages is enabled (Settings → Pages → Source: GitHub Actions); until then, read the sources there or run cd website && npm run dev.

Layout

Path What
purview/ The core crate. Framework-agnostic: it links no GUI toolkit.
purview-gpui/ gpui integration — one-call setup, entity handlers, Cx = App aliases.
examples/ Runnable gpui examples, in their own workspace.
website/ The VitePress documentation site (en / zh-CN / zh-HK).
docs/code-style.md Conventions for this codebase.

Quick look

// A counter a human and an agent can both drive. `bump()` is the only writer,
// so the two can never disagree.
let papp = Bridge::new()
    .instructions_append("A counter. Use increment/decrement.")
    .http()
    .bind("127.0.0.1:8931")
    .expect("bind the MCP port")
    .install(cx);

let win = papp.open("Counter");
let field = win.blocks().fields([("Count", 0)]);

win.actions().add("increment", "Increment").on(on_entity(&counter, |c, cx| {
    c.bump(1, cx);
    Ok::<_, ActionError>(Outcome::message(format!("count = {}", c.count)))
}));

Development

cargo build --workspace        # purview + purview-gpui
cargo test -p purview
(cd examples && cargo build)   # the examples workspace (pulls in gpui)
(cd website && npm run dev)    # the docs site

Examples and the website live in separate workspaces so that building or testing Purview itself never compiles a GUI toolkit.

Releases

Packages

Contributors

Languages