Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
signed, sandboxed plugins answer, and the agent only ever gets 1s and 0s.</b></p>

<p align="center">
<img alt="Demo: an agent (here Claude Code, left) asks three yes/no questions about an invoice. The plan is approved, signed plugins run sandboxed on the file, and only their answers, 1, 1 and 1, reach the agent." src="site/assets/demo.svg" width="900">
<img alt="Demo, step by step. 1: an agent (here Claude Code, left) runs lockfile plan with three yes/no plugins on an invoice and is told the plan is pending human approval. 2: the plan shows as a question in lox run (top right), the email address in its key masked. 3: you open the details, read each plugin's question, and press y to approve. 4: the agent runs the ticket; the lockfile console (bottom right) fetches the file and runs the three signed plugins in the sandbox. 5: only their answers, 1, 1 and 1, reach the agent." src="site/assets/demo.svg" width="900">
</p>
<p align="center"><sub>An agent (here Claude Code, left) and the lockfile console (right). Drawn before approvals moved to lockhub: today you approve the plan in <code>lox run</code>.</sub></p>

<p align="center">
<a href="#quick-start">Quick start</a> ·
Expand Down
143 changes: 143 additions & 0 deletions scripts/demo-lox-run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
{
"note": "Frames written by lockhub's lox run renderer (internal/loxrun at commit 4d94ef1, with lockkit v0.20.0): a Session on a 92x25 colour terminal in that package's test harness (hub queue in memory), fed one signed version-1 read_pii ticket of lock lockfile, instance files, agent dev-1, carrying the screen lockfile's internal/backend (planScreen, hubScreens) makes of the demo's plan. Keys sent: d, then y; then the hub state consumed. Not a live session: the harness follows no lock console, so the header lacks the 'locks ... serving' line and the tabs line a real lox run serving a lockfile console draws, and the ticket was built for the capture, not sent by a running console. Each segment is [SGR parameters, text].",
"ticket": "01M7Q59FPPNANCVCD3M316B421",
"cols": 92,
"rows": 25,
"frames": {
"idle": [
[["1", " lox run "], ["1;30;42", " AUTO "], ["2", " ~/Documents/billing"], ["", " "], ["32", "● hub up"], ["2", " · 1 lock"]],
[["2", " connected "], ["2", "none yet: a lock connects on its agent's first request"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[["2", " no ticket yet: every ticket and decision of the hub shows here, masked by its lock"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["", " "], ["1", "Shift+Tab"], ["2", " mode"], ["", " "], ["1", "a"], ["2", " audit"], ["", " "], ["1", "?"], ["2", " help"], ["", " "], ["1", "q"], ["2", " quit"]]
],
"question": [
[["1", " lox run "], ["1;30;42", " AUTO "], ["2", " ~/Documents/billing"], ["", " "], ["32", "● hub up"], ["2", " · 1 lock"], ["2", " · "], ["1;33", "1 waiting"]],
[["2", " connected "], ["2", "none yet: a lock connects on its agent's first request"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["1;33", " ┌"], ["1;33", " ◆ QUESTION "], ["1", "read"], ["1", " on files "], ["1;33", "──────────────────────────────────────────────────────────────"], ["1;33", "┐"]],
[["1;33", " │ "], ["94;1", "dev-1"], ["2", " asks (unverified name)"], ["2", " · ▤ lockfile"], ["2", " · expires in 59m"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["1", "file plan · 3 answers"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["", " key invoices/"], ["2;3", "‹j***(20)›"], ["", "/2026-10.pdf "], ["1;33", "│"]],
[["1;33", " │ "], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["", " file.non-empty@1.0.0 (official) "], ["1;33", "│"]],
[["1;33", " │ "], ["", " ? Does the file contain at least one byte? 1 = size > 0 0 = the file is empty "], ["1;33", "│"]],
[["1;33", " │ "], ["2", " … 7 more lines: d for details"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["2;3", "personal data touched: email (masked)"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["2", "why asked: this lock's ticket does not name its kind (version 1): asked"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["32;1", "y"], ["2", " approve "], ["31;1", "n"], ["2", " deny "], ["1", "d"], ["2", " details"], ["1", " x"], ["2", " forget profile"], ["", " "], ["1;33", "│"]],
[["1;33", " └────────────────────────────────────────────────────────────────────────────────────────┘"]],
[],
[],
[],
[],
[],
[],
[],
[["", " "], ["2", "12:04:53"], ["", " "], ["94", "dev-1"], ["", " "], ["2", "▤ "], ["", "files "], ["2", "-"], ["", " read key invoices/"], ["2;3", "‹j***(20)›"], ["", "/202… "], ["1;33", "◆ ask:v1"], ["", " "]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["", " "], ["1", "Shift+Tab"], ["2", " mode"], ["", " "], ["1", "y/n"], ["2", " answer"], ["", " "], ["1", "d"], ["2", " details"], ["", " "], ["1", "a"], ["2", " audit"], ["", " "], ["1", "?"], ["2", " help"], ["", " "], ["1", "q"], ["2", " quit"]]
],
"details": [
[["1", " lox run "], ["1;30;42", " AUTO "], ["2", " ~/Documents/billing"], ["", " "], ["32", "● hub up"], ["2", " · 1 lock"], ["2", " · "], ["1;33", "1 waiting"]],
[["2", " connected "], ["2", "none yet: a lock connects on its agent's first request"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["1;33", " ┌"], ["1;33", " ◆ QUESTION "], ["1", "read"], ["1", " on files "], ["1;33", "──────────────────────────────────────────────────────────────"], ["1;33", "┐"]],
[["1;33", " │ "], ["94;1", "dev-1"], ["2", " asks (unverified name)"], ["2", " · ▤ lockfile"], ["2", " · expires in 59m"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["1", "file plan · 3 answers"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["", " key invoices/"], ["2;3", "‹j***(20)›"], ["", "/2026-10.pdf "], ["1;33", "│"]],
[["1;33", " │ "], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["", " file.non-empty@1.0.0 (official) "], ["1;33", "│"]],
[["1;33", " │ "], ["", " ? Does the file contain at least one byte? 1 = size > 0 0 = the file is empty "], ["1;33", "│"]],
[["1;33", " │ "], ["", " pdf.parses@1.0.0 (official) "], ["1;33", "│"]],
[["1;33", " │ "], ["", " ? Does the file parse as a PDF without errors? 1 = pdfcpu reads and validates it…"], ["1;33", "│"]],
[["1;33", " │ "], ["", " pdf.has-blank-page@1.0.0 (official) "], ["1;33", "│"]],
[["1;33", " │ "], ["", " ? Does the PDF have at least one page that paints nothing visible? 1 = at least …"], ["1;33", "│"]],
[["1;33", " │ "], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["", " this plan reveals at most 3 answers about the file "], ["1;33", "│"]],
[["1;33", " │ "], ["", " sha256 6e3f0f55981e42acf8bc1d01ab98fcc9744cc0e8bb06cc9f6f7be104e9e8d071 · 686 bytes "], ["1;33", "│"]],
[["1;33", " │ "], ["2", "note (the agent's, untrusted): "], ["2", "invoice reported as blank"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["2;3", "personal data touched: email (masked)"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["2", "why asked: this lock's ticket does not name its kind (version 1): asked"], ["", " "], ["1;33", "│"]],
[["1;33", " │ "], ["32;1", "y"], ["2", " approve "], ["31;1", "n"], ["2", " deny "], ["1", "d"], ["2", " less"], ["1", " x"], ["2", " forget profile"], ["", " "], ["1;33", "│"]],
[["1;33", " └────────────────────────────────────────────────────────────────────────────────────────┘"]],
[["", " "], ["2", "12:04:53"], ["", " "], ["94", "dev-1"], ["", " "], ["2", "▤ "], ["", "files "], ["2", "-"], ["", " read key invoices/"], ["2;3", "‹j***(20)›"], ["", "/202… "], ["1;33", "◆ ask:v1"], ["", " "]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["", " "], ["1", "Shift+Tab"], ["2", " mode"], ["", " "], ["1", "y/n"], ["2", " answer"], ["", " "], ["1", "d"], ["2", " details"], ["", " "], ["1", "a"], ["2", " audit"], ["", " "], ["1", "?"], ["2", " help"], ["", " "], ["1", "q"], ["2", " quit"]]
],
"approved": [
[["1", " lox run "], ["1;30;42", " AUTO "], ["2", " ~/Documents/billing"], ["", " "], ["32", "● hub up"], ["2", " · 1 lock"]],
[["2", " connected "], ["2", "none yet: a lock connects on its agent's first request"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[["", " "], ["2", "12:04:53"], ["", " "], ["94", "dev-1"], ["", " "], ["2", "▤ "], ["", "files "], ["2", "-"], ["", " read key invoices/"], ["2;3", "‹j***(20)›"], ["", "/202… "], ["32", "✔ you"], ["", " "]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["", " "], ["1", "Shift+Tab"], ["2", " mode"], ["", " "], ["1", "a"], ["2", " audit"], ["", " "], ["1", "?"], ["2", " help"], ["", " "], ["1", "q"], ["2", " quit"]]
],
"ran": [
[["1", " lox run "], ["1;30;42", " AUTO "], ["2", " ~/Documents/billing"], ["", " "], ["32", "● hub up"], ["2", " · 1 lock"]],
[["2", " connected "], ["2", "none yet: a lock connects on its agent's first request"]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[["", " "], ["2", "12:04:53"], ["", " "], ["94", "dev-1"], ["", " "], ["2", "▤ "], ["", "files "], ["2", "-"], ["", " read key invoices/"], ["2;3", "‹j***(20)›"], ["", "/202… "], ["32", "✔ you"], ["32", " ✓"], ["", " "]],
[["2", "────────────────────────────────────────────────────────────────────────────────────────────"]],
[["", " "], ["1", "Shift+Tab"], ["2", " mode"], ["", " "], ["1", "a"], ["2", " audit"], ["", " "], ["1", "?"], ["2", " help"], ["", " "], ["1", "q"], ["2", " quit"]]
]
}
}
Loading
Loading