How jj-sleeps/jj1 works
JJ1 fetches web pages for agents and presents a compact, safer representation: readable Markdown, numbered controls, and action results. The main workflow is URL access through the CLI or MCP tools, guarded networking, HTML distillation, then snapshots, lookup, citations, and confirmed actions. A second product surface is the human-facing WebView browser with Agent view and Deuri. The graph preserves documented audit, sign-in, model setup, DevTools, and extensions; links among unsampled subsystems are omitted or marked unverified.
Main entry points: src/lib.rs Tabs and sessions · browser.rs Windowed browser · src/lib.rs HTML distiller · src/lib.rs HTTP and redirects
Components 27
Page processing
- HTML distiller
crates/jj1-distill/src/lib.rs - Markdown extraction
crates/jj1-distill/src/markdown.rs - Controls and forms
crates/jj1-distill/src/actions.rs - Visible DOM helpers
crates/jj1-distill/src/dom.rs - Injection scan
crates/jj1-distill/src/scan.rs - Readiness audit
crates/jj1-distill/src/audit.rs - Quote citations
crates/jj1-distill/src/cite.rs
Safety and network
- Policy gate
crates/jj1-core/src/guard.rs - Policy configuration
crates/jj1-core/src/config.rs - Saved sign-ins
crates/jj1-core/src/vault.rs - HTTP and redirects
crates/jj1-net/src/lib.rs - Signed requests
crates/jj1-net/src/botauth.rs - Robots rules
crates/jj1-net/src/robots.rs
Browser and assistant
- Windowed browser
crates/jj1-engine-view/src/bin/browser.rs - Browser Agent view
crates/jj1-engine-view/src/browserdata.rs - Live WebView tier
crates/jj1-engine-view/src/bin/view.rs - Deuri assistant
crates/jj1-engine-view/src/deuri.rs - Hardware model fit
crates/jj1-engine-view/src/modelfit.rs - Docked DevTools
crates/jj1-engine-view/src/devtools.rs - Browser extensions
crates/jj1-engine-view/src/extensions.rs
Shared runtime
- Tabs and sessions
crates/jj1-core/src/lib.rs - Action and diffs
crates/jj1-core/src/lib.rs
Other components
- User or agent
- LM Studio
- Web pages
Connections 28
- User or agent → JJ1 CLI: uses
README.md - User or agent → MCP tools: uses
README.md - User or agent → Windowed browser: uses
README.md - JJ1 CLI → Tabs and sessions: dispatches
- MCP tools → Tabs and sessions: dispatches
- Tabs and sessions → HTTP and redirects: fetches through
crates/jj1-core/src/lib.rs - Tabs and sessions → Policy gate: checks URLs
crates/jj1-core/src/lib.rs - Tabs and sessions → HTML distiller: distills pages
- Tabs and sessions → Saved sign-ins: uses sign-ins
crates/jj1-core/src/lib.rs - Tabs and sessions → Action and diffs: serves actions
crates/jj1-core/src/lib.rs - HTML distiller → Markdown extraction: extracts text
crates/jj1-distill/src/lib.rs - HTML distiller → Controls and forms: extracts controls
crates/jj1-distill/src/lib.rs - HTML distiller → Injection scan: scans content
crates/jj1-distill/src/lib.rs - Markdown extraction → Visible DOM helpers: uses helpers
crates/jj1-distill/src/markdown.rs - Controls and forms → Visible DOM helpers: uses helpers
crates/jj1-distill/src/actions.rs - Readiness audit → Visible DOM helpers: uses helpers
crates/jj1-distill/src/audit.rs - Tabs and sessions → Quote citations: provides citations
- Policy configuration → Policy gate: configures
- HTTP and redirects → Robots rules: checks rules
crates/jj1-net/src/lib.rs - HTTP and redirects → Signed requests: signs requests
crates/jj1-net/src/lib.rs - HTTP and redirects → Web pages: requests pages
crates/jj1-net/src/lib.rs - Windowed browser → Browser Agent view: shows
- Windowed browser → Deuri assistant: hosts
- Windowed browser → Live WebView tier: opens pages
- Windowed browser → Docked DevTools: hosts
- Windowed browser → Browser extensions: loads
- Deuri assistant → LM Studio: calls API
crates/jj1-engine-view/src/deuri.rs - Hardware model fit → Windowed browser: supports setup