Expand description
Dejavu — a local output-reduction proxy for coding agents.
Dejavu intercepts common shell commands via PATH shims, runs the real
command, and returns a compact/diffed view to the agent while preserving the
exact exit code. It reduces what the agent reads, never what the shell
executes.
Modules§
- agent
dejavu start— launch a coding agent with output reduction active.- cli
- CLI dispatch and the shared application context.
- commands
- Read-only / management CLI command handlers.
- config
- Effective configuration (spec §18): defaults ← global
config.toml← project.dejavu.toml. Each layer supplies only the keys it overrides. - env
DEJAVU_*environment variable names and the ambient session view.- error
- Typed error enums for the library. Binaries convert these at the boundary
with
anyhow. - exec
- Execution core: shim generation, PATH handling, anti-recursion real-binary resolution, process spawning, and classification/passthrough policy.
- paths
- Cache/config path resolution and the per-repo cache layout.
- reduce
- Output reduction. The
reduce()facade normalizes, hashes, finds a comparable prior run, classifies, and builds the compact output the agent sees — without writing anything (the runtime persists logs + the record). - repo
- Repo root detection and git-state metadata capture.
- runtime
- The
dejavu runpipeline: resolve → classify → exec → reduce → emit, with the absolute exit-code guard. - state
- Per-repo enable/disable state, stored in the cache (spec §17.9) — never in
the repo. Precedence:
DEJAVU_DISABLEDenv > this state >config.enabled. - store
- Local SQLite storage: schema, row models, and the connection facade.
- util
- Small shared helpers.