feat: observer CLI — canonicalization, boundaries, hooks, setup - #816
Open
davidmiuraactualai wants to merge 10 commits into
Open
feat: observer CLI — canonicalization, boundaries, hooks, setup#816davidmiuraactualai wants to merge 10 commits into
davidmiuraactualai wants to merge 10 commits into
Conversation
Introduces an ephemeral OAuth flow that authenticates without storing a refresh token, then calls POST /repos/onboard-public to queue a public repository for architecture analysis. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…es 1C, 4A, 4C) Phase 1C: `actual observe` subcommand with 8 hook types (session-start, prompt, pre-tool, post-tool, post-tool-failure, stop, session-end, pre-compact). Deterministic canonicalization, JSONL session journal, typed hook payloads. Phase 4A: Evaluation boundary detection — PreToolUse(Edit|Write), PostToolUseFailure, Stop are boundaries. Hook output builder for silent/inform/warn/block dispositions with Claude Code hook contract. Phase 4C: `actual observe setup` installs 8 hooks into .claude/settings.json additively (preserves existing hooks, idempotent). `actual observe status` reports hook installation state. 50 tests across boundary, canonicalize, hook_output, journal, types, and setup modules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude Code validates hooks as {matcher, hooks: [{type, command}]},
not flat {type, command} entries. Fixes settings validation error
on session start.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
At evaluation boundaries (file edits, tool failures, session stops), the observer now loads stored credentials, reads journal events, and POSTs to the advisor intervention API. Non-boundary hooks remain zero-latency. Any error degrades silently to empty hook output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a JSONL line fails to parse, print a warning to stderr with the line number and error before skipping, so users know an event was lost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The advisor intervention endpoint requires the observe:events scope, but the CLI login flow only requested adr:query and adr:review. Without this scope, observer boundary evaluations get 403 from the API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add app_url parameter to loopback server success page - Thread base_url from config to both login_with and login_ephemeral - Show styled "Open web app" button on the signed-in callback page - Add reset command stub and CLAUDE.md updates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The API only accepts HTTPS URLs, but users naturally pass SSH URLs (git@github.com:owner/repo.git). Convert at the CLI boundary so both formats work seamlessly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The API's onboard-public endpoint now handles SSH URLs directly, so the CLI passes the user's URL as-is. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Checks service ports (Supabase, Temporal, Redis, API, Next.js), env files, .next cache health, Python venv, and key env vars. Outputs numbered copy-paste fix commands for any failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
actual observesubcommand with 8 hook types, deterministic canonicalization via AEWO event codes, JSONL session journal at~/.actualai/actual/sessions/, typed hook payloads{}, inform/warn/block→hookSpecificOutput.additionalContext)actual observe setup— additive hook installation into.claude/settings.json(preserves existing hooks, idempotent, atomic writes).actual observe statusfor hook state reportingTest plan
cargo testall greencargo clippyclean🤖 Generated with Claude Code