From ccc0bd522e3efbe3ef9e7265ebe8e038c47c970d Mon Sep 17 00:00:00 2001
From: DavidG
Date: Wed, 18 Nov 2026 12:16:57 +0100
Subject: [PATCH 1/2] docs: record the demo again with lox run (#76)
The demo showed the approval in the lockmq console, from before
decisions moved to lockhub. It is now built from a recording of one
real run (lockmq v0.10.0, lox v0.12.1, RabbitMQ 4.4.0): the lox run
terminal captured at six moments, and the agent's calls and results.
scripts/brand/demo.py reads the recording in scripts/brand/demo/ and
types none of the terminals' text itself.
README and site: the 'recorded before lockhub' caption is gone, the
alt text lists the four steps.
Co-Authored-By: Claude Fable 5.2
---
README.md | 4 +-
docs/install.md | 5 +-
scripts/brand/demo.py | 377 +++++++++++-------
scripts/brand/demo/agent.json | 178 +++++++++
scripts/brand/demo/frames/1-password.ansi | 22 +
.../brand/demo/frames/2-password-typed.ansi | 22 +
scripts/brand/demo/frames/3-serving.ansi | 22 +
.../brand/demo/frames/4-connect-question.ansi | 22 +
scripts/brand/demo/frames/5-connected.ansi | 22 +
scripts/brand/demo/frames/6-read-auto.ansi | 22 +
site/assets/demo.svg | 242 +++++------
site/index.html | 4 +-
12 files changed, 675 insertions(+), 267 deletions(-)
create mode 100644 scripts/brand/demo/agent.json
create mode 100644 scripts/brand/demo/frames/1-password.ansi
create mode 100644 scripts/brand/demo/frames/2-password-typed.ansi
create mode 100644 scripts/brand/demo/frames/3-serving.ansi
create mode 100644 scripts/brand/demo/frames/4-connect-question.ansi
create mode 100644 scripts/brand/demo/frames/5-connected.ansi
create mode 100644 scripts/brand/demo/frames/6-read-auto.ansi
diff --git a/README.md b/README.md
index 5b2f17a..0ae0d64 100644
--- a/README.md
+++ b/README.md
@@ -16,9 +16,9 @@
connections and queue reads wait for you, and the agent never holds a password.
-
+
-
An agent (here Claude Code, left) and the lockmq console (right). Recorded before decisions moved to lockhub: today you answer in lox run, and stream reads pass on the default rules.
+
An agent (here Claude Code, left) and lox run (right), where you answer. Recorded from one run with lockmq v0.10.0 and lox v0.12.1.
Quick start ·
diff --git a/docs/install.md b/docs/install.md
index baa4b7b..078a119 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -114,7 +114,8 @@ Requires Go 1.26 or later.
The logo, the demo and the social images are in [`site/assets`](../site/assets).
The demo is generated by [`scripts/brand`](../scripts/brand):
-`python3 scripts/brand/demo.py > site/assets/demo.svg`, one frame of it
-rendered with [`render.mjs`](../scripts/brand/render.mjs). The logo, the
+`python3 scripts/brand/demo.py > site/assets/demo.svg`, from the recording of
+a real run kept in [`scripts/brand/demo`](../scripts/brand/demo); one frame
+of it is rendered with [`render.mjs`](../scripts/brand/render.mjs). The logo, the
README banners in [`docs/assets`](assets), `og.png` and
`apple-touch-icon.png` come from the Lock Family site kit.
diff --git a/scripts/brand/demo.py b/scripts/brand/demo.py
index 36d6626..bf6f7f1 100644
--- a/scripts/brand/demo.py
+++ b/scripts/brand/demo.py
@@ -1,22 +1,38 @@
#!/usr/bin/env python3
"""Generate site/assets/demo.svg: lockmq's value in one looping image.
-Claude Code (left, the agent's account) lists the queues of a vhost: a catalogue call, answered
-at once. It then asks to read the last messages of a stream: the lockmq console (right, its own
-account) shows the approval screen, the human types y, and the agent gets the messages back with
-the customer's email replaced by a reference. Pure SVG + CSS keyframes, so it plays on GitHub, on
-the site and in any browser. Every animation shares one clock of LOOP seconds.
+An agent (left) asks lockmq about a RabbitMQ broker; the human answers in `lox run` (right), in a
+terminal of their own. Pure SVG + CSS keyframes, so it plays on GitHub, on the site and in any
+browser. Every animation shares one clock of LOOP seconds.
-The console lines follow the real output of lockmq and lockkit (approval frame, screen body,
-PII line); keep them in step when those change.
+Nothing on the two terminals is typed here: it is read from a recording of one real run, kept in
+scripts/brand/demo/ (recorded 2026-11-18 with lockmq v0.10.0, lox v0.12.1 and RabbitMQ 4.4.0).
+
+ demo/frames/*.ansi the `lox run` terminal (106x22), captured with `tmux capture-pane -e` at six
+ moments of the run: the console's password question, the password typed,
+ the lock serving, the connect question, the connection approved, the
+ stream read approved by a rule.
+ demo/agent.json the agent's side of the same run (Claude Code, headless): its prompt, the
+ lockmq_queues and lockmq_read calls with their results as the MCP server
+ returned them, and its answer. "calls_not_shown" names the calls of the run
+ this image leaves out.
+
+What this script adds: the layout, the two window frames, the captions under them, the dots that
+mark a call as running or done, and the cuts ("…"). To record again, see the demo's pull request
+(lockmq#76) for the fixture; then
python3 scripts/brand/demo.py > site/assets/demo.svg
"""
+import json
+import pathlib
+import re
+import textwrap
-LOOP = 14.0
+HERE = pathlib.Path(__file__).parent / "demo"
+LOOP = 20.0
C = dict(bg="#1a1814", pane="#0e0d0a", bar="#24211b", border="#3a352c", text="#e2e8f0",
- dim="#64748b", sub="#94a3b8", orange="#fb923c", teal="#5eead4", violet="#a78bfa",
- red="#f87171", green="#4ade80", yellow="#facc15")
+ dim="#7c8799", sub="#94a3b8", orange="#fb923c", teal="#5eead4", violet="#a78bfa",
+ red="#f87171", green="#4ade80", yellow="#facc15", magenta="#f0abfc")
FONT = "'JetBrains Mono','SF Mono',Menlo,Consolas,'DejaVu Sans Mono',monospace"
SANS = "Inter,-apple-system,'Segoe UI',system-ui,Helvetica,Arial,'DejaVu Sans',sans-serif"
@@ -44,17 +60,14 @@ def anim(frames):
def show(t_in, t_out=END, fade=0.2):
"""Opacity window: hidden, visible from t_in to t_out."""
- return anim([(0, "opacity:0"), (t_in, "opacity:0"), (t_in + fade, "opacity:1"),
- (t_out, "opacity:1"), (t_out + fade, "opacity:0"), (LOOP, "opacity:0")])
-
-
-def move(t0, t1, x0, y0, x1, y1):
- return anim([(0, f"transform:translate({x0}px,{y0}px);opacity:0"),
- (t0, f"transform:translate({x0}px,{y0}px);opacity:0"),
- (t0 + 0.05, f"transform:translate({x0}px,{y0}px);opacity:1"),
- (t1, f"transform:translate({x1}px,{y1}px);opacity:1"),
- (t1 + 0.15, f"transform:translate({x1}px,{y1}px);opacity:0"),
- (LOOP, f"transform:translate({x1}px,{y1}px);opacity:0")])
+ frames = [(0, "opacity:0")]
+ if t_in > 0:
+ frames += [(t_in, "opacity:0")]
+ frames += [(t_in + fade, "opacity:1")]
+ else:
+ frames = [(0, "opacity:1")]
+ frames += [(t_out, "opacity:1"), (t_out + fade, "opacity:0"), (LOOP, "opacity:0")]
+ return anim(frames)
def esc(s):
@@ -86,136 +99,218 @@ def pane(x, y, w, h, title, account):
body.append(text(x + w - 14, y + 20, account, size=12, col=C["dim"], family=SANS, anchor="end"))
-W, H = 1200, 640
+# --- The recorded lox run terminal ----------------------------------------------------------
+SGR_FG = {30: "#0e0d0a", 31: C["red"], 32: C["green"], 33: C["yellow"], 36: C["teal"], 95: C["magenta"]}
+SGR_BG = {42: C["green"]}
+WIDE = {"\U0001F514"} # the bell takes two cells
+BOX = "─│┌┐└┘"
+
+
+def cells(line):
+ """One captured line as cells [(char, fg, bg, bold, dim, reverse)], one per terminal column."""
+ out = []
+ fg = bg = None
+ bold = dim = rev = False
+ pos = 0
+ for m in re.finditer(r"\x1b\[([0-9;]*)m", line):
+ for ch in line[pos:m.start()]:
+ out.append((ch, fg, bg, bold, dim, rev))
+ if ch in WIDE:
+ out.append(("", fg, bg, bold, dim, rev))
+ pos = m.end()
+ for code in (int(c) for c in (m.group(1) or "0").split(";")):
+ if code == 0:
+ fg = bg = None
+ bold = dim = rev = False
+ elif code == 1:
+ bold = True
+ elif code == 2:
+ dim = True
+ elif code == 7:
+ rev = True
+ elif code == 39:
+ fg = None
+ elif code == 49:
+ bg = None
+ elif code in SGR_FG:
+ fg = SGR_FG[code]
+ elif code in SGR_BG:
+ bg = SGR_BG[code]
+ else:
+ raise SystemExit(f"demo.py: SGR code {code} of the recording has no colour here")
+ for ch in line[pos:]:
+ out.append((ch, fg, bg, bold, dim, rev))
+ if ch in WIDE:
+ out.append(("", fg, bg, bold, dim, rev))
+ return out
+
+
+def terminal(path, x0, y0, cw, lh, size):
+ """A captured frame as SVG. Box-drawing characters become strokes and every run of text is
+ placed at its own column, so the frame keeps its grid whatever monospace font renders it."""
+ out = []
+ for row, line in enumerate(path.read_text().split("\n")):
+ cs = cells(line)
+ base = y0 + row * lh
+ mid = base - size * 0.32
+ col = 0
+ while col < len(cs):
+ ch, fg, bg, bold, dim, rev = cs[col]
+ end = col + 1
+ # a run: same style, and either all box-drawing of one kind, or plain text
+ while end < len(cs) and cs[end][1:] == cs[col][1:] and (
+ (ch == "─" and cs[end][0] == "─") or
+ (ch not in BOX and cs[end][0] not in BOX and ch != " " and cs[end][0] != " "
+ and ch.isascii() and cs[end][0].isascii()) or
+ (ch == " " and cs[end][0] == " ")):
+ end += 1
+ x = x0 + col * cw
+ w = (end - col) * cw
+ colour = fg or (C["sub"] if dim else C["text"])
+ if dim and fg:
+ op = ' fill-opacity=".75"'
+ else:
+ op = ""
+ if rev:
+ out.append(f'')
+ colour = C["pane"]
+ elif bg:
+ out.append(f'')
+ stroke = f'stroke="{colour}" stroke-width="1.2" fill="none"' + (' stroke-opacity=".55"' if dim else "")
+ cx = x + cw / 2
+ if ch == "─":
+ out.append(f'')
+ elif ch == "│":
+ out.append(f'')
+ elif ch in "┌┐└┘":
+ dx = cw / 2 if ch in "┌└" else -cw / 2
+ dy = lh / 2 if ch in "┌┐" else -lh / 2
+ out.append(f'')
+ elif ch.strip():
+ s = "".join(c[0] for c in cs[col:end])
+ wt = ' font-weight="700"' if bold else ""
+ out.append(f'{esc(s)}')
+ col = end
+ return "".join(out)
+
+
+W, H = 1200, 590
body.append(f'')
+PY, PH = 28, 444
+
+# Timeline (seconds).
+T_TYPED, T_SERVING = 1.3, 2.6 # lox run: the password typed, then the lock serving
+T_PROMPT, T_QUEUES = 3.2, 4.2 # agent: the prompt, the lockmq_queues call
+T_ASK, T_YES, T_CONNECTED = 4.7, 7.4, 7.8 # lox run: the connect question, y, connected
+T_QUEUES_OUT = 8.2
+T_READ, T_AUTO, T_READ_OUT = 9.6, 10.2, 10.8
+T_ANSWER = 13.2
+
+# --- Agent pane (left) ----------------------------------------------------------------------
+rec = json.loads((HERE / "agent.json").read_text())
+queues, read = rec["calls"]
+assert queues["tool"] == "lockmq_queues" and read["tool"] == "lockmq_read"
+AX, AW = 16, 448
+pane(AX, PY, AW, PH, "✻ Claude Code", "the agent's session")
+AS, LH = 11.5, 17
+ax, ay = AX + 14, PY + 54
+COLS = 60
+
+
+def args(d, keep):
+ return ", ".join(f"{k}: {json.dumps(d[k])}" for k in keep)
+
+
+row = 0
+
+
+def put(parts, cls):
+ global row
+ body.append(spans(ax, ay + row * LH, parts, cls=cls, size=AS))
+ row += 1
+
+
+def running(t0, t1):
+ """The dot of a tool call: dim while it runs, green once it answered."""
+ y = ay + row * LH
+ body.append(text(ax, y, "●", cls=show(t0, t1, fade=0.1), size=AS, col=C["dim"]))
+ body.append(text(ax, y, "●", cls=show(t1 + 0.1), size=AS, col=C["green"]))
+
+
+for i, s in enumerate(textwrap.wrap(rec["prompt"], COLS - 2)):
+ put([("> " if i == 0 else " ", C["dim"]), (s, C["text"])], show(T_PROMPT))
+row += 1
+running(T_QUEUES, T_QUEUES_OUT)
+put([(" ", C["text"]), (queues["tool"], C["text"]), ("(" + args(queues["input"], ["vhost", "sort"]) + ")", C["sub"])],
+ show(T_QUEUES))
+items = queues["result"]["data"]["items"]
+wn = max(len(q["name"]) for q in items)
+for i, q in enumerate(items):
+ line = (f'{q["name"]:<{wn}} {q["type"]:<7} messages_ready {q["messages_ready"]:<4} '
+ f'consumers {q["consumers"]}')
+ put([(" └ " if i == 0 else " ", C["dim"]), (line, C["sub"])], show(T_QUEUES_OUT))
+row += 1
+running(T_READ, T_READ_OUT)
+put([(" ", C["text"]), (read["tool"], C["text"]),
+ ("(" + args(read["input"], ["vhost", "name"]) + ",", C["sub"])], show(T_READ))
+put([(" " + args(read["input"], ["from", "count"]) + ", …)", C["sub"])], show(T_READ))
+msgs = read["result"]["data"]["messages"]
+first = json.dumps(msgs[0]["body"], separators=(",", ":"))
+lines = [""]
+for piece in re.findall(r'[^,]*,?', first): # wrapped after a comma, nothing else changed
+ if lines[-1] and len(lines[-1]) + len(piece) > COLS - 4:
+ lines.append("")
+ lines[-1] += piece
+assert "".join(lines) == first
+for i, s in enumerate(lines):
+ parts = [(" └ " if i == 0 else " ", C["dim"])]
+ for k, piece in enumerate(re.split(r'("")', s)):
+ if piece:
+ parts.append((piece, C["teal"] if k % 2 else C["text"]))
+ put(parts, show(T_READ_OUT))
+put([(" … +" + str(len(msgs) - 1) + " messages", C["dim"])], show(T_READ_OUT))
+row += 1
+for i, s in enumerate(textwrap.wrap(rec["answer"], COLS - 2)):
+ put([("● " if i == 0 else " ", C["text"]), (s, C["text"])], show(T_ANSWER))
-# --- Agent pane (left) --------------------------------------------------------------------
-AX, AY, AW, AH = 24, 32, 500, 516
-pane(AX, AY, AW, AH, "✻ Claude Code", "account alice")
-LH = 19
-ax, ay = AX + 16, AY + 58
-agent = [
- (0.3, [("> ", C["dim"]), ("which queues in orders have no consumer?", C["text"])]),
- (1.1, [("● ", C["green"]), ("lockmq_queues", C["text"]), ('(vhost: "orders")', C["sub"])]),
- (2.1, [(" └ ", C["dim"]), ("orders.failed quorum ready 1204 consumers 0", C["sub"])]),
- (2.1, [(" ", C["dim"]), ("orders.retry classic ready 0 consumers 1", C["sub"])]),
- (2.1, [(" ", C["dim"]), ("order-events stream consumers 2", C["sub"])]),
- (2.8, [("● ", C["text"]), ("orders.failed has no consumer: 1204 waiting.", C["text"])]),
- (2.8, [(" ", C["text"]), ("Reading the last order events to see why.", C["text"])]),
- (3.7, [("● ", C["green"]), ("lockmq_read", C["text"]),
- ('(name: "order-events", from: "last",', C["sub"])]),
- (3.7, [(" ", C["text"]), ("count: 3)", C["sub"])]),
-]
-for i, (t, parts) in enumerate(agent):
- body.append(spans(ax, ay + i * LH, parts, cls=show(t)))
-row = len(agent)
-body.append(spans(ax, ay + row * LH, [(" └ ", C["dim"]), ("waiting for approval in the lockmq console…",
- C["yellow"])], cls=show(4.0, 7.0)))
-reply = [
- (7.3, [(" └ ", C["dim"]), ("3 messages · untrusted data from the broker", C["sub"])]),
- (7.5, [(" ", C["dim"]), ('{"order_id": "A-1042", "status": "payment_failed",', C["text"])]),
- (7.5, [(" ", C["dim"]), (' "customer": {"email": ', C["text"]), ('""', C["teal"]),
- ("},", C["text"])]),
- (7.5, [(" ", C["dim"]), (' "reason": "card_declined"}', C["text"])]),
- (7.6, [(" ", C["dim"]), ("… 2 more, same reason", C["dim"])]),
- (8.6, [("● ", C["text"]), ("The last 3 orders failed on card_declined, and", C["text"])]),
- (8.6, [(" ", C["text"]), ("nothing consumes orders.failed. I never saw the", C["text"])]),
- (8.6, [(" ", C["text"]), ("customers' emails, only references.", C["text"])]),
-]
-for i, (t, parts) in enumerate(reply):
- body.append(spans(ax, ay + (row + i) * LH, parts, cls=show(t)))
-
-# --- Console pane (right) -----------------------------------------------------------------
-CX, CY, CW, CH = 548, 32, 628, 516
-pane(CX, CY, CW, CH, "lockmq console", "account lockmq · its own session")
-cx, cy = CX + 16, CY + 58
-con = [
- (0.0, [("$ ", C["dim"]), ("lockmq console --profile dev --project ~/shop", C["text"])]),
- (0.0, [("✓ ", C["green"]), ("profile ", C["text"]), ("dev", C["text"]),
- (" · mq.example.com:15671 ", C["text"]), ("(approved policy)", C["dim"])]),
- (0.0, [("", C["text"])]),
- (0.0, [("› ", C["orange"]), ("Listening on /run/lockmq/3f9a0c1d-dev.sock", C["text"])]),
-]
-CS = 12 # console font size; one character is 0.602 em wide
-CHW = CS * 0.602
-for i, (t, parts) in enumerate(con):
- body.append(spans(cx, cy + i * LH, parts, size=CS))
-V = C["violet"]
-screen = [
- [("╭─ ", V), ("DEV", V), (" · mq.example.com:15671 / orders · user lockmq-ro · tier read ", C["text"]),
- ("─────", V)],
- [("│ ", V), ('requested by uid 1000 (alice) · pid 48211 · process "lockmq" (self-reported name)', C["dim"])],
- [("│ ", V), ("agent: see why orders end in orders.failed", C["dim"])],
- [("│", V)],
- [("│ ", V), ("READ stream order-events from last max 3", C["text"])],
- [("│", V)],
- [("│ ", V), ("stream: first offset 0 · last 18342 · via stream protocol", C["text"])],
- [("│ ", V), ("no offset stored · no message removed", C["text"])],
- [("│ ", V), ("PII: masked (1 mask rules, 0 allow rules; body detect; detectors: card, email)",
- C["text"])],
-]
-srow = len(con) + 1
-g = [f'']
-for i, parts in enumerate(screen):
- g.append(spans(cx, cy + (srow + i) * LH, parts, size=CS))
-g.append("")
-body.append("".join(g))
-prow = srow + len(screen)
-body.append(spans(cx, cy + prow * LH, [("╰─ ", V), ("Approve? [y/N] ", C["text"])], cls=show(4.6), size=CS))
-# The human types y.
-body.append(text(cx + CHW * 18, cy + prow * LH, "y", cls=show(6.2, fade=0.05), size=CS,
- col=C["green"], weight=700))
-# Cursor before the answer.
-blink = anim([(0, "opacity:0"), (4.7, "opacity:0"), (4.71, "opacity:1"), (5.2, "opacity:1"),
- (5.21, "opacity:0"), (5.6, "opacity:0"), (5.61, "opacity:1"), (6.19, "opacity:1"),
- (6.2, "opacity:0"), (LOOP, "opacity:0")])
-body.append(f'')
-# Key hint, lit while the console waits.
-body.append(f''
- + text(CX + CW - 106, cy + prow * LH, "only you can answer", size=12, col=C["pane"],
- weight=700, family=SANS, anchor="middle") + "")
-
-# The broker, behind the console only.
-BX, BY = CX + 16, CY + CH - 74
-body.append(f'')
-body.append(text(BX + 16, BY + 25, "RabbitMQ", size=14, col=C["orange"], weight=700, family=SANS))
-body.append(text(BX + 16, BY + 44, "management API · stream protocol · AMQP 0-9-1", size=12,
- col=C["sub"], family=SANS))
-body.append(text(BX + CW - 48, BY + 35, "credentials stay here, in the console", size=12,
- col=C["sub"], family=SANS, anchor="end"))
-
-# The socket between the two accounts.
-SY = AY + AH / 2
-body.append(f'')
-body.append(text(AX + AW + 12, SY - 50, "socket", size=11, col=C["teal"], weight=700, family=SANS,
- anchor="middle"))
-pkt = 'r="6" cx="0" cy="0"'
-body.append(f'')
-body.append(f'')
-body.append(f'')
-body.append(f'')
-body.append(f'')
+# --- lox run pane (right) -------------------------------------------------------------------
+CX = AX + AW + 16
+CW = W - 16 - CX
+pane(CX, PY, CW, PH, "lox run", "your terminal, outside the agent")
+TS, TLH = 10.6, 17.6
+TCW = TS * 0.602
+tx, ty = CX + (CW - 106 * TCW) / 2, PY + 54
+shots = [("1-password", 0, T_TYPED), ("2-password-typed", T_TYPED, T_SERVING),
+ ("3-serving", T_SERVING, T_ASK), ("4-connect-question", T_ASK, T_CONNECTED),
+ ("5-connected", T_CONNECTED, T_AUTO), ("6-read-auto", T_AUTO, END)]
+for name, t0, t1 in shots:
+ body.append(f'{terminal(HERE / "frames" / (name + ".ansi"), tx, ty, TCW, TLH, TS)}')
+# The key the human presses on the connect question.
+body.append(f''
+ f''
+ + text(CX + CW - 91, ty + 15 * TLH, "you press y", size=12.5, col=C["pane"], weight=700,
+ family=SANS, anchor="middle") + "")
# Captions.
-caps = [(0.0, 3.6, "Your agent asks lockmq. It never holds a password."),
- (3.6, 6.4, "Every message read waits for you, in a console it can't touch."),
- (6.4, END, "It gets the messages back, masked.")]
+caps = [(0.0, T_PROMPT, "You type the broker password in lox run. The agent never holds it."),
+ (T_PROMPT, T_QUEUES_OUT + 0.9, "The first connection waits for your answer, in lox run."),
+ (T_QUEUES_OUT + 0.9, 12.4, "A stream read passes on the default rules, and shows in the feed."),
+ (12.4, END, "The messages come back with the customer's email masked.")]
for t0, t1, s in caps:
- body.append(text(W / 2, 600, s, cls=show(t0 + 0.05, t1 - 0.2), size=26, weight=650,
+ body.append(text(W / 2, PY + PH + 70, s, cls=show(t0 + 0.05, t1 - 0.2), size=25, weight=650,
family=SANS, anchor="middle"))
-label = ("lockmq: an agent (here Claude Code) lists RabbitMQ queues through lockmq, then asks to read a stream; "
- "the lockmq console, in its own account, asks the human to approve, and the agent gets "
- "the messages back with the customer's email masked.")
+label = ("lockmq demo, four steps. 1: in lox run, the human types the broker password the lock's console asks for. "
+ "2: an agent (here Claude Code) calls lockmq_queues; lox run shows the question \"connect on dev/dev\" "
+ "and the human presses y. 3: the agent gets the three queues of the vhost orders, then calls lockmq_read on "
+ "the stream order-events; lox run approves it by a rule and lists it in its feed as auto:action. "
+ "4: the agent gets the messages with the customer's email replaced by .")
print(f'")
diff --git a/scripts/brand/demo/agent.json b/scripts/brand/demo/agent.json
new file mode 100644
index 0000000..456429b
--- /dev/null
+++ b/scripts/brand/demo/agent.json
@@ -0,0 +1,178 @@
+{
+ "recorded": "2026-11-18",
+ "versions": {
+ "lockmq": "v0.10.0",
+ "lox": "v0.12.1 (lockhub)",
+ "rabbitmq": "4.4.0"
+ },
+ "agent": "Claude Code, headless (claude -p), lockmq MCP server as lockmq init wrote it",
+ "prompt": "Which queues in orders have no consumer? Read 3 messages of the stream order-events from its first offset to see why orders fail. Answer in English, in two short sentences.",
+ "calls": [
+ {
+ "tool": "lockmq_queues",
+ "input": {
+ "vhost": "orders",
+ "sort": "consumers"
+ },
+ "result": {
+ "data": {
+ "items": [
+ {
+ "arguments": {
+ "x-queue-type": "stream"
+ },
+ "consumers": 2,
+ "message_stats": {
+ "ack_details": {
+ "rate": 0
+ },
+ "deliver_get_details": {
+ "rate": 0
+ },
+ "publish_details": {
+ "rate": 0
+ },
+ "redeliver_details": {
+ "rate": 0
+ }
+ },
+ "messages": 3,
+ "messages_ready": 3,
+ "messages_unacknowledged": 0,
+ "name": "order-events",
+ "operator_policy": null,
+ "policy": null,
+ "state": "running",
+ "type": "stream",
+ "vhost": "orders"
+ },
+ {
+ "arguments": {
+ "x-queue-type": "classic"
+ },
+ "consumer_utilisation": 1,
+ "consumers": 1,
+ "idle_since": "2026-11-18T11:02:26.584+00:00",
+ "messages": 0,
+ "messages_ready": 0,
+ "messages_unacknowledged": 0,
+ "name": "orders.retry",
+ "operator_policy": null,
+ "policy": null,
+ "state": "running",
+ "type": "classic",
+ "vhost": "orders"
+ },
+ {
+ "arguments": {
+ "x-queue-type": "quorum"
+ },
+ "consumer_utilisation": 0,
+ "consumers": 0,
+ "message_stats": {
+ "publish_details": {
+ "rate": 0
+ }
+ },
+ "messages": 1204,
+ "messages_ready": 1204,
+ "messages_unacknowledged": 0,
+ "name": "orders.failed",
+ "operator_policy": null,
+ "policy": null,
+ "state": "running",
+ "type": "quorum",
+ "vhost": "orders"
+ }
+ ],
+ "page": 1,
+ "page_size": 100,
+ "total": 3
+ }
+ }
+ },
+ {
+ "tool": "lockmq_read",
+ "input": {
+ "vhost": "orders",
+ "name": "order-events",
+ "from": "first",
+ "count": 3,
+ "intent": "Lire 3 messages de order-events depuis le premier offset pour comprendre pourquoi les commandes échouent"
+ },
+ "result": {
+ "data": {
+ "from": "first",
+ "messages": [
+ {
+ "body": {
+ "customer": {
+ "email": ""
+ },
+ "order_id": "A-1041",
+ "reason": "card_declined",
+ "status": "payment_failed"
+ },
+ "headers": {
+ "x-stream-offset": 0
+ },
+ "properties": {
+ "content_type": "application/json",
+ "delivery_mode": 1
+ }
+ },
+ {
+ "body": {
+ "customer": {
+ "email": ""
+ },
+ "order_id": "A-1042",
+ "reason": "card_declined",
+ "status": "payment_failed"
+ },
+ "headers": {
+ "x-stream-offset": 1
+ },
+ "properties": {
+ "content_type": "application/json",
+ "delivery_mode": 1
+ }
+ },
+ {
+ "body": {
+ "customer": {
+ "email": ""
+ },
+ "order_id": "A-1043",
+ "reason": "card_declined",
+ "status": "payment_failed"
+ },
+ "headers": {
+ "x-stream-offset": 2
+ },
+ "properties": {
+ "content_type": "application/json",
+ "delivery_mode": 1
+ }
+ }
+ ],
+ "proposals": [
+ "queue=orders/order-events body=$.customer.email"
+ ],
+ "queue": "order-events",
+ "vhost": "orders",
+ "via": "AMQP 0-9-1"
+ }
+ }
+ }
+ ],
+ "calls_not_shown": [
+ "Skill",
+ "ToolSearch",
+ "lockmq_status",
+ "lockmq_stream",
+ "ToolSearch",
+ "lockmq_pii_add"
+ ],
+ "answer": "In vhost `orders`, only `orders.failed` (quorum, 1204 messages ready) has no consumer; `order-events` has 2 and `orders.retry` has 1. The 3 stream messages (offsets 0–2, orders A-1041 to A-1043) all show `status: payment_failed` with `reason: card_declined`, so orders fail because the card is declined."
+}
\ No newline at end of file
diff --git a/scripts/brand/demo/frames/1-password.ansi b/scripts/brand/demo/frames/1-password.ansi
new file mode 100644
index 0000000..700fed4
--- /dev/null
+++ b/scripts/brand/demo/frames/1-password.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · [0;1m[33m1 waiting[0;2m · 🔔[0m
+[2m connected none yet: a lock connects on its agent's first request[0m
+[2m locks [0m◇ dev [1m[33mwaiting for you: Password for lockmq-ro@host.docker.internal:[0m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0;1m[33m◆ question[0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0;1m[33m ┌ ◆ QUESTION [39mconsole on dev [33m───────────────────────────────────────────────────────────────────────────┐[0m
+[1m[33m │ [39mthe console of dev[0;2m asks at its terminal · ◇ lockmq[0m [1m[33m│[0m
+[1m[33m │ [0;2mwhy asked: the lock's console asks at its terminal; your answer goes there only, never through the h…[0;1m[33m│[0m
+[1m[33m │ [39mPassword for lockmq-ro@host.docker.internal: ▏[0m [1m[33m│[0m
+[1m[33m │ [39mEnter[0;2m confirm [0;1mEsc[0;2m cancel[0m [1m[33m│[0m
+[1m[33m └──────────────────────────────────────────────────────────────────────────────────────────────────────┘[0m
+
+
+
+
+
+
+
+
+ [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [1m[33m◆ asked[0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1my/n[0;2m answer[0m [1md[0;2m details[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/scripts/brand/demo/frames/2-password-typed.ansi b/scripts/brand/demo/frames/2-password-typed.ansi
new file mode 100644
index 0000000..6d8d0a6
--- /dev/null
+++ b/scripts/brand/demo/frames/2-password-typed.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · [0;1m[33m1 waiting[0;2m · 🔔[0m
+[2m connected none yet: a lock connects on its agent's first request[0m
+[2m locks [0m◇ dev [1m[33mwaiting for you: Password for lockmq-ro@host.docker.internal:[0m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0;1m[33m◆ question[0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0;1m[33m ┌ ◆ QUESTION [39mconsole on dev [33m───────────────────────────────────────────────────────────────────────────┐[0m
+[1m[33m │ [39mthe console of dev[0;2m asks at its terminal · ◇ lockmq[0m [1m[33m│[0m
+[1m[33m │ [0;2mwhy asked: the lock's console asks at its terminal; your answer goes there only, never through the h…[0;1m[33m│[0m
+[1m[33m │ [39mPassword for lockmq-ro@host.docker.internal: [0m•••••••••[1m▏[0m [1m[33m│[0m
+[1m[33m │ [39mEnter[0;2m confirm [0;1mEsc[0;2m cancel[0m [1m[33m│[0m
+[1m[33m └──────────────────────────────────────────────────────────────────────────────────────────────────────┘[0m
+
+
+
+
+
+
+
+
+ [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [1m[33m◆ asked[0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1my/n[0;2m answer[0m [1md[0;2m details[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/scripts/brand/demo/frames/3-serving.ansi b/scripts/brand/demo/frames/3-serving.ansi
new file mode 100644
index 0000000..870176b
--- /dev/null
+++ b/scripts/brand/demo/frames/3-serving.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · 🔔[0m
+[2m connected none yet: a lock connects on its agent's first request[0m
+[2m locks [0m◇ dev [32mserving[39m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[0m [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [32m✔ you[39m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/scripts/brand/demo/frames/4-connect-question.ansi b/scripts/brand/demo/frames/4-connect-question.ansi
new file mode 100644
index 0000000..31c0569
--- /dev/null
+++ b/scripts/brand/demo/frames/4-connect-question.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · [0;1m[33m1 waiting[0;2m · 🔔[0m
+[2m connected none yet: a lock connects on its agent's first request[0m
+[2m locks [0m◇ dev [32mserving[39m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0;1m[33m ┌ ◆ QUESTION [36mconnect[39m on dev/dev [33m───────────────────────────────────────────────────────────────────────┐[0m
+[1m[33m │ [95man agent[0;2m asks (unverified name) · ◇ lockmq · expires in 9m[0m [1m[33m│[0m
+[1m[33m │ [39mdev · connect[0m [1m[33m│[0m
+[1m[33m │ [0m endpoint: host.docker.internal:15676 [1m[33m│[0m
+[1m[33m │ [0m credentials: ask (typed on the lock's console) [1m[33m│[0m
+[1m[33m │ [0m rule: auto.connect=ask [1m[33m│[0m
+[1m[33m │ [0m asked of a human: the first connection under this approved policy (never_auto) [1m[33m│[0m
+[1m[33m │ [0;2mwhy asked: the lock wants a human for this connect: its profile's auto rule for it is not auto[0m [1m[33m│[0m
+[1m[33m │ [32my[0;2m approve [0;1m[31mn[0;2m deny [0;1md[0;2m details[0;1m x[0;2m forget profile[0m [1m[33m│[0m
+[1m[33m └──────────────────────────────────────────────────────────────────────────────────────────────────────┘[0m
+
+
+
+ [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [32m✔ you[39m
+ [2m12:13:04[0m [36m-[39m [2m◇ [0mdev [2mdev[0m [1m[36mconn[0m connect host.docker.internal:15676 (credenti… [1m[33m◆ ask:lock[0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1my/n[0;2m answer[0m [1md[0;2m details[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/scripts/brand/demo/frames/5-connected.ansi b/scripts/brand/demo/frames/5-connected.ansi
new file mode 100644
index 0000000..7191bd5
--- /dev/null
+++ b/scripts/brand/demo/frames/5-connected.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · 🔔[0m
+[2m connected [0mdev/dev[2m 0s[0m
+[2m locks [0m◇ dev [32mserving[39m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+
+
+
+
+
+
+
+
+
+
+
+
+
+[0m [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [32m✔ you[39m
+ [2m12:13:04[0m [36m-[39m [2m◇ [0mdev [2mdev[0m [1m[36mconn[0m connect host.docker.internal:15676 (credenti… [32m✔ you ✓[39m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/scripts/brand/demo/frames/6-read-auto.ansi b/scripts/brand/demo/frames/6-read-auto.ansi
new file mode 100644
index 0000000..d670095
--- /dev/null
+++ b/scripts/brand/demo/frames/6-read-auto.ansi
@@ -0,0 +1,22 @@
+[1m lox run [30m[42m AUTO [0;2m ~/shop[0m [32m● hub up[2m[39m · 1 lock · 🔔[0m
+[2m connected [0mdev/dev[2m 3s[0m
+[2m locks [0m◇ dev [32mserving[39m
+[2m tabs [0;1;7m 0 feed [0m [2m 1 dev [0m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+
+
+
+
+
+
+
+
+
+
+
+
+[0m [2m12:12:42[0m [36m-[39m [2m◇ [0mdev [2m-[0m prompt Password for lockmq-ro@host.docker.internal: [32m✔ you[39m
+ [2m12:13:04[0m [36m-[39m [2m◇ [0mdev [2mdev[0m [1m[36mconn[0m connect host.docker.internal:15676 (credenti… [32m✔ you ✓[39m
+ [2m12:13:12[0m [36m-[39m [2m◇ [0mdev [2mdev[0m [1m[33maction[0m [1m[36mREAD[0m stream order-events from first max 3 [2m[32mauto:action[0m[32m ✓[39m
+[2m──────────────────────────────────────────────────────────────────────────────────────────────────────────
+[0m [1m1-9[0;2m lock tabs[0m [1mShift+Tab[0;2m mode[0m [1ma[0;2m audit[0m [1m?[0;2m help[0m [1mq[0;2m quit[0m
diff --git a/site/assets/demo.svg b/site/assets/demo.svg
index a95464e..fe43b3b 100644
--- a/site/assets/demo.svg
+++ b/site/assets/demo.svg
@@ -1,122 +1,124 @@
-
-
+
An agent (here Claude Code, left) and lox run (right), where you answer. Recorded from one run with lockmq v0.10.0 and lox v0.12.1.
diff --git a/scripts/brand/demo.py b/scripts/brand/demo.py
index bf6f7f1..bffe3fe 100644
--- a/scripts/brand/demo.py
+++ b/scripts/brand/demo.py
@@ -5,8 +5,9 @@
terminal of their own. Pure SVG + CSS keyframes, so it plays on GitHub, on the site and in any
browser. Every animation shares one clock of LOOP seconds.
-Nothing on the two terminals is typed here: it is read from a recording of one real run, kept in
-scripts/brand/demo/ (recorded 2026-11-18 with lockmq v0.10.0, lox v0.12.1 and RabbitMQ 4.4.0).
+The text of the two terminals is read from a recording of one real run, kept in
+scripts/brand/demo/ (recorded 2026-11-18 with lockmq v0.10.0, lox v0.12.1 and RabbitMQ 4.4.0). The right
+terminal is the capture as it is; the left one is laid out here from the recorded values.
demo/frames/*.ansi the `lox run` terminal (106x22), captured with `tmux capture-pane -e` at six
moments of the run: the console's password question, the password typed,
@@ -17,8 +18,18 @@
returned them, and its answer. "calls_not_shown" names the calls of the run
this image leaves out.
-What this script adds: the layout, the two window frames, the captions under them, the dots that
-mark a call as running or done, and the cuts ("…"). To record again, see the demo's pull request
+What this script adds or composes:
+
+ - the layout, the two window frames and their titles, the captions under them, the "you press y"
+ label, the dots that mark a call as running or done, the connectors;
+ - the left terminal's lines: a call is written as tool(arguments) from the recorded input; each
+ queue row is composed from four fields of the returned item (name, type, messages_ready,
+ consumers); the message body is the returned JSON, wrapped after commas; the answer is wrapped;
+ - the cuts: "…" for the read's intent argument, "… +2 messages" for the other two messages.
+ agent.json lists what the run held and this image leaves out (run_order, calls_not_shown,
+ answer_cut), and marks the one value it holds in translation.
+
+To record again, see the demo's pull request
(lockmq#76) for the fixture; then
python3 scripts/brand/demo.py > site/assets/demo.svg
@@ -302,7 +313,7 @@ def running(t0, t1):
family=SANS, anchor="middle"))
label = ("lockmq demo, four steps. 1: in lox run, the human types the broker password the lock's console asks for. "
- "2: an agent (here Claude Code) calls lockmq_queues; lox run shows the question \"connect on dev/dev\" "
+ "2: an agent (here Claude Code) makes its first requests to the broker, lockmq_queues among them; lox run shows the question \"connect on dev/dev\" "
"and the human presses y. 3: the agent gets the three queues of the vhost orders, then calls lockmq_read on "
"the stream order-events; lox run approves it by a rule and lists it in its feed as auto:action. "
"4: the agent gets the messages with the customer's email replaced by .")
diff --git a/scripts/brand/demo/agent.json b/scripts/brand/demo/agent.json
index 456429b..cee8cdb 100644
--- a/scripts/brand/demo/agent.json
+++ b/scripts/brand/demo/agent.json
@@ -98,7 +98,7 @@
"name": "order-events",
"from": "first",
"count": 3,
- "intent": "Lire 3 messages de order-events depuis le premier offset pour comprendre pourquoi les commandes échouent"
+ "intent": "Read 3 messages of order-events from the first offset to understand why orders fail"
},
"result": {
"data": {
@@ -163,9 +163,22 @@
"vhost": "orders",
"via": "AMQP 0-9-1"
}
+ },
+ "translated": {
+ "input.intent": "recorded in French (the agent wrote it in its user's language); this is an English translation, the only value of this file that is not the recorded one"
}
}
],
+ "answer": "In vhost `orders`, only `orders.failed` (quorum, 1204 messages ready) has no consumer; `order-events` has 2 and `orders.retry` has 1. The 3 stream messages (offsets 0–2, orders A-1041 to A-1043) all show `status: payment_failed` with `reason: card_declined`, so orders fail because the card is declined.",
+ "run_order": [
+ "Skill (loads the lockmq skill that lockmq init wrote)",
+ "ToolSearch",
+ "lockmq_status (answered by the console at once, before any connection)",
+ "lockmq_queues and lockmq_stream, sent together: the first requests that need the broker, so the connect question in lox run comes from them",
+ "lockmq_read",
+ "ToolSearch",
+ "lockmq_pii_add (failed: read-only file system)"
+ ],
"calls_not_shown": [
"Skill",
"ToolSearch",
@@ -174,5 +187,5 @@
"ToolSearch",
"lockmq_pii_add"
],
- "answer": "In vhost `orders`, only `orders.failed` (quorum, 1204 messages ready) has no consumer; `order-events` has 2 and `orders.retry` has 1. The 3 stream messages (offsets 0–2, orders A-1041 to A-1043) all show `status: payment_failed` with `reason: card_declined`, so orders fail because the card is declined."
-}
\ No newline at end of file
+ "answer_cut": "\"answer\" is the first paragraph of the agent's final message. Cut: its second paragraph, a side note on the failed lockmq_pii_add call, and one sentence in French written before lockmq_read, announcing the read."
+}
diff --git a/site/assets/demo.svg b/site/assets/demo.svg
index fe43b3b..8ab62d1 100644
--- a/site/assets/demo.svg
+++ b/site/assets/demo.svg
@@ -1,4 +1,4 @@
-
+lockmq: your agent reads the queue, you hold the key