internal-joseph/agent-journal-archived
  • JavaScript 96.6%
  • Shell 1.9%
  • VBScript 1.5%
Find a file
Joseph 41ca6f2549 feat(converter): add secret redaction + fix sync host
Adds a redactSecrets() pass before HTML escape that catches:
- context-prefixed secrets (client_secret, api_key, password, etc.)
- Bearer tokens (skips literal 'lemonade' placeholder)
- standalone 64-char hex (openssl rand -hex 32 output)

Users can extend via ~/.agent-journal/redact-extra.txt (one regex per
line). Replacement marker is [REDACTED-SECRET].

Also fixes joseph/.env: AJ_SSH_HOST was pointed at pve1, but VMID 121
(PCT-FILES-PROD-21) lives on pve2. The sync has been silently broken
since the container migration. Switched to pve2.

Triggered by an incident where a Dex OIDC client secret leaked into a
session jsonl file via the proxmox-monitoring-stack skill, then got
rendered into the published joseph-journal HTML. Re-running with this
patch produces redacted HTML.
2026-04-07 14:01:29 -05:00
docs docs: add incident journal entry 2026-03-12 2026-03-12 14:27:15 -05:00
joseph feat(converter): add secret redaction + fix sync host 2026-04-07 14:01:29 -05:00
.gitignore chore: ignore refresh-server.log 2026-03-11 11:48:01 -05:00
agent-journal-converter.mjs feat(converter): add secret redaction + fix sync host 2026-04-07 14:01:29 -05:00
README.md fix: externalize remote config, add template + docs, update README 2026-03-12 14:25:11 -05:00

agent-journal

Converts Claude Code and OMP session JSONL files into self-contained HTML with sidebar navigation, minimap, message timeline, and bot filtering. Each user gets their own subdomain served from VMID 121.

Architecture

Your machine                     PCT infra
──────────────                   ──────────────────────────────
JSONL sessions                   VMID 121 (PCT-FILES-PROD-21)
  └─ converter ──scp──────────►  /opt/<username>-journal/
       │                              └─ CopyParty :3080
       └─ refresh-server :3999             └─ [/<username>-journal]
                                                    │
                                          VMID 110 Caddy
                                          Cloudflare Tunnel
                                                    │
                                    https://<username>-journal.pctbin.com

Output is pushed directly to the container via scp + pct push — no dependency on OneDrive or SharePoint sync.

Quick Start

# Run converter (incremental — new sessions only)
bash joseph/run.sh

# Full rebuild including LLM title regeneration
bash joseph/run.sh --force

# Rebuild HTML only (skip LLM, use after code changes)
bash joseph/run.sh --regen-html

# Rename a session title permanently
bash joseph/run.sh --rename <fileId> New Title Here

# Remove HTML for filtered/bot sessions
bash joseph/run.sh --purge

Per-User Directory Layout

agent-journal/
├── agent-journal-converter.mjs   shared core — no user config
├── docs/
│   └── setup-new-user.md         infra setup guide for adding users
└── <username>/
    ├── .env                      personal config (gitignored values stay local)
    ├── template.env              reference for all available variables
    ├── run.sh                    runs converter + syncs to VMID 121
    ├── refresh-server.mjs        HTTP server, auto-runs every 2h
    └── start-hidden.vbs          launches refresh server hidden at logon

Environment Variables

See joseph/template.env for the full reference. Key vars:

Variable Description
AJ_OUTPUT_DIR Local output path (also kept as a local backup copy)
AJ_USERNAME Display name shown in the journal UI
AJ_LITELLM_URL LLM endpoint for session title generation
AJ_SSH_HOST SSH host for Proxmox (default: pctadmin)
AJ_VMID LXC container ID (default: 121)
AJ_REMOTE_PATH Path inside container (e.g. /opt/joseph-journal)

Adding a New User

See docs/setup-new-user.md for the full infra setup walkthrough (CopyParty vhost, Caddy vhost, Cloudflare tunnel, Task Scheduler).

Sources

  • Claude Code: ~/.claude/projects/*/*.jsonl
  • OMP: ~/.omp/agent/sessions/**/*.jsonl

Features

  • Self-contained HTML per session (no external deps)
  • Sidebar: session list with search, bot toggle, message outline
  • LLM-generated titles via localinf (cached in .manifest.json)
  • Inline session rename (localStorage, survives --force)
  • Dark/light theme (PCT brand palette)
  • VSCode-style canvas minimap for long sessions