diff --git a/media/.review-log.md b/media/.review-log.md index 86c6cdb..355ff7a 100644 --- a/media/.review-log.md +++ b/media/.review-log.md @@ -11,7 +11,7 @@ covered separately by the automatic `scripts/preflight_public_scan.py` text gate | `media/engine/hero-receipt-loop.gif` | Codex (agent) | 2026-06-15 | pass | keyed render 18.48s / 340 KB / ffprobe 25fps (tape requests 15fps); frames reviewed — sanitized `demo$` prompt, fixture commit identity, no host/path/token leaks; late frame shows semantic recall with `(degraded=False)`. OCR pass returned no text/hits. | | `media/engine/index-recovery.gif` | Codex (agent) | 2026-06-15 | pass | keyed render 18.56s / 255 KB / ffprobe 25fps (tape requests 15fps); frames reviewed — markdown survives index deletion, rebuild is visible, restored recall output appears with `(degraded=False)`; no host/path/token leaks. OCR pass returned no text/hits. | | `media/engine/benchmark-longmemeval.svg` | Claude (agent) | 2026-06-15 | pass | text/XML asset, auto-scanned by preflight; rendered + verified: 7 numbers match BENCHMARKS.md, reader·judge labeled, GPT-4.1-judge rows walled off (AE3); no leaks | -| `media/engine/claude-code-client.gif` | — | — | pending | **manual GUI capture** — screen-record Claude Code vs the loopback master; sanitize per the checklist (see connector-montage/README.md). Not `.tape`-scriptable. | +| `media/engine/claude-code-client.gif` | — | — | pending (render) | **Re-scoped manual → scripted (LS-1778).** Now scripted in `media/engine/claude-code-client.tape` (VHS drives the real Claude Code TUI vs the loopback master; `claude mcp add --transport http` + `Wait+Screen`). Hidden setup smoke-tested; **render blocked on `claude login`** (a standalone `claude` returns 401 — the agent session's auth isn't reusable by a subprocess). After `claude login`: `vhs media/engine/claude-code-client.tape`, re-render until clean, frame-review, sign off. | | `media/engine/connector-montage/one-endpoint-many-clients.png` | Claude (agent) | 2026-06-15 | pass | rendered from committed SVG; placeholder URLs only (`.ts.net`, `127.0.0.1`); reviewed — no real host/path/token | | `media/engine/carousel-hn/*` (3) | Claude (agent) | 2026-06-15 | pass | hero-loop frames (write, commit, recall); OCR-swept — no username, owner, home path, host, or token | | `media/engine/carousel-localllama/*` (3) | Claude (agent) | 2026-06-15 | pass | montage + hero frames; placeholder URLs only; OCR-swept clean | diff --git a/media/engine/claude-code-client.tape b/media/engine/claude-code-client.tape new file mode 100644 index 0000000..7a6be18 --- /dev/null +++ b/media/engine/claude-code-client.tape @@ -0,0 +1,86 @@ +# claude-code-client.tape (U7) — "same endpoint, a real client": Claude Code drives the live MCP. +# +# Renders media/engine/claude-code-client.gif: the Claude Code TUI, pointed at the SAME loopback +# master via streamable-HTTP MCP, calling the real read/write tools (search -> think -> a real +# commit_note). This was originally flagged "manual GUI capture / not .tape-scriptable"; the +# LS-1778 research corrected that — VHS runs real commands in a real shell, so it drives a live +# Claude Code -> loopback-MCP session, and `Wait+Screen` makes it latency-tolerant (R10 recovered). +# +# ┌──────────────────────────────────────────────────────────────────────────────────────────┐ +# │ STATUS: SETUP VALIDATED · VISIBLE TUI SECTION RENDER-PENDING. │ +# │ The hidden setup (materialize → init → serve → `claude mcp add --transport http`) is │ +# │ smoke-tested working. The visible Claude Code TUI section could NOT be render-validated in │ +# │ the build env because a standalone `claude` invocation returns 401 (the agent session's │ +# │ Anthropic auth is a harness-managed OAuth token bound to a custom ANTHROPIC_BASE_URL; a │ +# │ fresh subprocess can't use it, and ~/.claude/.credentials.json is stale). │ +# │ TO RENDER: run `claude login` first, then `vhs media/engine/claude-code-client.tape`. │ +# │ Model wording is non-deterministic — re-render until clean; the `Wait+Screen` patterns below │ +# │ may need timing tweaks on first real render. Then frame-review + sign off media/.review-log. │ +# └──────────────────────────────────────────────────────────────────────────────────────────┘ +# +# REQUIRES: vhs + ffmpeg + ttyd; `hypermnesic` importable; the `claude` CLI authenticated +# (`claude login`); OPENAI_API_KEY in the environment (read at record time, never +# written into this tape) so the hidden `hypermnesic init` can build the index. +# SAFETY: loopback master only (127.0.0.1, no auth → no OAuth issuer/consent on screen); +# fixture identity via materialize-demo-vault; sanitized `demo$` prompt; the MCP +# endpoint shows only 127.0.0.1. The Claude Code TUI must show NO account badge/avatar +# and NO window-title path bar — use a clean profile/crop. Review EVERY frame against +# docs/guides/demo-asset-frame-review-checklist.md before publishing. + +Require git + +Output media/engine/claude-code-client.gif + +Set Shell "bash" +Set FontSize 18 +Set Width 1200 +Set Height 720 +Set Padding 24 +Set Theme "TokyoNight" +Set Framerate 15 +Set TypingSpeed 22ms +Set PlaybackSpeed 1.0 + +# ---- hidden setup: disposable vault + loopback write-enabled master + Claude Code MCP registration ---- +# (Same VHS discipline as the other tapes: await each slow step; clear via ANSI printf, not the +# `clear` command, which is a no-op in VHS's headless terminal — see hero-receipt-loop.tape.) +Hide +Type "REPO=$PWD" Enter +Type "source $REPO/.venv/bin/activate 2>/dev/null || true" Enter +Type "export PS1='demo$ '" Enter +Type "rm -rf /tmp/hypermnesic-cc" Enter +Type "$REPO/media/engine/materialize-demo-vault /tmp/hypermnesic-cc >/dev/null" Enter +Sleep 1500ms +Type "cd /tmp/hypermnesic-cc" Enter +Type "hypermnesic init . >/dev/null 2>&1" Enter +Sleep 5s +Type "hypermnesic serve --enable-write --host 127.0.0.1 --port 8765 --index-db .hypermnesic/index.db --repo . >/tmp/cc-serve.log 2>&1 &" Enter +Sleep 3s +Type "claude mcp add --transport http --scope local hypermnesic http://127.0.0.1:8765/mcp >/dev/null 2>&1" Enter +Sleep 2s +Type "printf '\033[3J\033[2J\033[H'" Enter +Sleep 600ms +Show + +# ---- the multi-client proof (visible): Claude Code calls the same MCP endpoint ---- +Type "# Claude Code, pointed at the same hypermnesic MCP endpoint (127.0.0.1:8765/mcp):" Enter +Sleep 900ms +# Start the TUI with an initial prompt that exercises search -> think -> a real commit_note. +Type "claude --dangerously-skip-permissions 'Use the hypermnesic search tool to find the sqlite-vec decision, use think to reflect, then commit_note a short note at decisions/ship-receipts-first.md that links [[decisions/use-sqlite-vec]].'" Enter +# Block until the write tool is actually invoked, then until it lands — tolerant of model latency. +Wait+Screen /commit_note/ +Sleep 1500ms +Wait+Screen /committed|wrote|✓/ +Sleep 3500ms +# Leave the TUI cleanly. +Ctrl+C +Sleep 400ms +Ctrl+C +Sleep 800ms + +# ---- hidden teardown ---- +Hide +Type "claude mcp remove --scope local hypermnesic >/dev/null 2>&1" Enter +Type "kill %1 2>/dev/null" Enter +Type "cd $REPO" Enter +Show diff --git a/media/engine/connector-montage/README.md b/media/engine/connector-montage/README.md index 1dd701d..ace4e99 100644 --- a/media/engine/connector-montage/README.md +++ b/media/engine/connector-montage/README.md @@ -11,17 +11,27 @@ Built from the copy-paste configs in [`connectors.md`](connectors.md) + are config stills with placeholder URLs only (origin R5: "no live hosted-client recording"). -## 2. The Claude Code client GIF — `../claude-code-client.gif` ⏳ manual GUI capture +## 2. The Claude Code client GIF — `../claude-code-client.gif` ⏳ scripted (render-pending auth) -This is a **GUI screen recording** of Claude Code calling the live MCP read/write tools -against a loopback master, and is **not `.tape`-scriptable**. It is flagged for manual -capture (do not fabricate frames). To record it: +This shows the Claude Code TUI calling the live MCP read/write tools against a loopback +master. Originally flagged "manual / not `.tape`-scriptable"; the LS-1778 research corrected +that — **Claude Code is a TUI in a real terminal, so VHS drives it** like any other shell +program. It is now scripted in [`../claude-code-client.tape`](../claude-code-client.tape) +(do not fabricate frames): -1. Start the loopback master over the demo vault (same as the hero): - `hypermnesic serve --enable-write --host 127.0.0.1 --port 8765 --index-db .hypermnesic/index.db --repo .` -2. Point Claude Code at it with [`claude-code.mcp.json`](claude-code.mcp.json) - (`url` → `http://127.0.0.1:8765/mcp` for the local capture). -3. Screen-record Claude Code calling `search` / `think` and a real `commit_note`. -4. **Sanitize** per [`docs/guides/demo-asset-frame-review-checklist.md`](../../../docs/guides/demo-asset-frame-review-checklist.md): - no account badge/avatar, no window-title path bar, no real hostname; use a clean - profile or crop. Then sign off the GIF's row in [`media/.review-log.md`](../../.review-log.md). +- The tape starts the loopback master, registers it with + `claude mcp add --transport http --scope local hypermnesic http://127.0.0.1:8765/mcp` + (the `127.0.0.1` write⇒auth exemption means no auth/consent on screen), launches the + Claude Code TUI with a prompt that calls `search` → `think` → a real `commit_note`, and + uses `Wait+Screen /commit_note/` then `Wait+Screen /committed|wrote/` so it is tolerant of + model latency rather than racing fixed `Sleep`s. +- **To render:** `claude login` first (a standalone `claude` invocation needs its own + Anthropic auth — the agent session's token is not reusable by a subprocess), then + `vhs media/engine/claude-code-client.tape`. Model wording is non-deterministic, so + re-render until clean (the committed `.tape` keeps it re-runnable → R10). +- **Sanitize** per [`docs/guides/demo-asset-frame-review-checklist.md`](../../../docs/guides/demo-asset-frame-review-checklist.md): + no account badge/avatar, no window-title path bar, no real hostname; use a clean + profile or crop. Then sign off the GIF's row in [`media/.review-log.md`](../../.review-log.md). + +The static config still [`claude-code.mcp.json`](claude-code.mcp.json) remains the +placeholder-URL reference for the montage still (§1).