internal-joseph/agent-journal-archived
- JavaScript 96.6%
- Shell 1.9%
- VBScript 1.5%
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. |
||
|---|---|---|
| docs | ||
| joseph | ||
| .gitignore | ||
| agent-journal-converter.mjs | ||
| README.md | ||
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