Skip to content

feat: v4 agent observability + SSH remote deploy#80

Merged
itscooleric merged 8 commits intodevfrom
feat/v4-observability
Mar 16, 2026
Merged

feat: v4 agent observability + SSH remote deploy#80
itscooleric merged 8 commits intodevfrom
feat/v4-observability

Conversation

@itscooleric
Copy link
Copy Markdown
Owner

@itscooleric itscooleric commented Mar 15, 2026

Summary

  • Session logging: structured JSON event logs with secret scrubbing and automatic retention (scripts/session-logger.sh, docs/schema/session-events-v1.md)
  • Push notifications: ntfy-based alerts when agents need attention (scripts/notify.sh)
  • Claude native installer: switched from npm to self-updating native installer
  • SSH + rsync: added openssh-client and rsync to enable remote build/deploy to forge-edge VPS (Add openssh-client to Dockerfile for remote build/deploy #79)
  • tmux/ttyd polish: auto-reconnect, mouse support, credential scrubbing from logs
  • LAN CA cert: runtime install via CLIDE_CA_URL for internal TLS

Commits (19)

Full v4 observability feature set plus the SSH tooling needed for cloperator's remote deploy workflow.

Test plan

  • Rebuild container with --no-cache and verify ssh, ssh-keygen, rsync are available
  • Verify session logging writes to /workspace/.clide/sessions/
  • Verify ntfy notifications fire on agent tool-use events
  • Verify ttyd auto-reconnects and credentials are scrubbed from docker logs

🤖 Generated with Claude Code

itscooleric and others added 8 commits March 15, 2026 04:13
Enables SSH-based remote build/deploy workflow from clide to forge-edge
VPS. Previous session added these to the Dockerfile but never committed,
so rebuilds used the stale committed version without these packages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The `script` command captures raw VT100 byte streams which are
unreadable for TUI apps like Claude Code (29K+ ANSI escapes,
15K+ carriage returns, character-by-character cursor positioning).

Instead, harvest Claude Code's native JSONL conversation logs from
~/.claude/projects/<project>/<uuid>.jsonl after session end. These
contain structured user messages, assistant responses (with thinking
blocks), tool_use calls, and tool_results — actually useful data.

Changes:
- Snapshot Claude session files before run, diff after to find new ones
- Symlink conversation.jsonl into clide session directory
- Demote raw script capture to opt-in (CLIDE_RAW_TRANSCRIPT=1)
- Rename transcript.txt → transcript.raw (signals it's not readable)
- session_end event now includes claude_session_id and has_conversation

Addresses #42 (transcript capture) and #41 (structured logging spike).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bake branch@hash (date) into the Docker image via BUILD_VERSION arg,
show it in the CLI splash banner and web entrypoint logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The session-logger cleanup code (conversation harvesting, session_end
event, transcript compression) was unreachable when the agent was
killed rather than exiting cleanly. This caused events.jsonl to only
contain session_start, conversation.jsonl to never be linked, and
raw transcripts to remain uncompressed.

Move all cleanup into a trap handler for EXIT/INT/TERM/HUP so it
runs regardless of how the session ends. Also show the splash banner
in .bashrc so it appears in the ttyd web terminal on connect.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of waiting until session cleanup to discover and symlink the
Claude Code conversation JSONL, spawn a lightweight background watcher
that polls for up to 60s until the file appears, then links it
immediately. Since Claude Code writes to this file continuously, the
conversation log is readable live throughout the entire session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Symlinks pointed to paths inside the clide container that don't exist
on the host or in other containers (e.g. Clem file explorer). Now:
- Background watcher copies the file and re-syncs every 30s
- Cleanup does a final copy instead of symlink
- Source path stored in .conv_source for cleanup to find

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Code creates its JSONL session files with 600 permissions.
When session-logger.sh copies them, the restrictive permissions are
preserved, causing CLEM's file explorer to get 403 Forbidden.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant