Development

Build SPA + Rust binary, local gates, site, and architecture map.

Build & run

just release
# or
cd web && npm install && npm run build
cargo build --release
./target/release/mzp --no-open
TargetPurpose
just installUI + cargo install to ~/.cargo/bin + mcp install
just uiRebuild SPA into crates/mizpah/static
just buildUI + debug binary
just testRust unit tests
just web-devVite (proxies API/WS to :3149)
just lint-rustcargo fmt --check + clippy (incl. curated pedantic)
just lint-depscargo deny check + cargo machete
just lint-webeslint + tsc
just checklint-rust + test + lint-web (matches PR CI core)
just site-dev / site-buildDocs site (site/, base /mizpah/)

CI: .github/workflows/ci.yml (fmt, clippy, test, cargo-deny, machete, miri, audit). Pages: .github/workflows/pages.ymlethira-dev.github.io/mizpah.

Hub trust model

By default the hub is unauthenticated: anyone who can reach the bind address can ingest, query, investigate, and update. Binding defaults to 127.0.0.1.

POST /api/update remains loopback-only even when OIDC is enabled.

Disk vs network: persist segments and the self-update spill are encrypted at rest with a zero-config OS keychain DEK (see Storage security). That protects files on disk from other local users; it does not replace bind policy or OIDC for the HTTP API.

Full setup guide (IdP app, config.toml, TLS, ingest/API tokens, troubleshooting): Custom auth (OIDC).

Architecture

stdin ──► try bind :3149
            ├─ success → hub (Axum + ring buffer + UI + hub-{port}.pid)
            └─ AddrInUse → attach (POST /api/ingest)

mzp attach shell   ──► shell hooks ──► tee ──► POST /api/ingest/batch
mzp attach browser ──► CDP ──► console/network ──► POST /api/ingest/batch
mzp attach cursor  ──► ~/.cursor/hooks.json ──► __hook-forward ──► POST /api/ingest
mzp attach claude  ──► ~/.claude/settings.json ──► __hook-forward ──► POST /api/ingest
mzp mcp            ──► stdio MCP ──► HubClient ──► GET /api/logs|properties|stats|…
mzp open           ──► browser → http://127.0.0.1:3149

Rust modules under crates/mizpah/src/:

AreaModules
Hub lifecyclehub/ (probe, spawn, start/stop, PID file), defaults
Shared helpersutil/ (config dir, atomic write, PATH/which, shell quote), ingest_forward
Store / APIstore/{ingest,query,activity}, api/{routes,ws,static_files}, models, error
Attachshell_attach/, browser_attach/, agent_hooks/, shell_forward
Agents / MCPmcp/, investigate, filter, properties
CLIcli (clap + dispatch), main (pipe mode + run_hub)

Web UI under web/ (hooks/use-mizpah + mizpah-connection, lib/{api,types,log-format}). Marketing/docs under site/. Wire-shape fixtures: crates/mizpah/tests/fixtures/ (Rust) and web/src/lib/api-contract.ts (TS).

License

MIT. See the repository.