Internal packages for the Confab CLI. Each package has its own README with extension guides, invariants, and design decisions.
| Package | Purpose | Change this when... |
|---|---|---|
| config | Confab config + Claude Code hook management | Adding config fields, new hook types |
| daemon | Background sync daemon lifecycle | Changing sync behavior, shutdown logic |
| discovery | Session scanning, metadata extraction, agent IDs | Adding metadata fields, new ID formats |
| git | Git repo info extraction | Adding new git fields to sync |
| http | HTTP client with compression + retries | Adding error types, changing retry logic |
| logger | Singleton file logger with rotation | Changing log format, adding levels |
| redactor | JSON-aware sensitive data redaction | Adding pattern types (patterns themselves live in config) |
| sync | Sync engine, API client, file tracking | Adding API endpoints, changing chunking |
| types | Shared type definitions | Adding cross-package types |
| utils | Small shared utilities and constants | Rarely — prefer package-local helpers |
cmd/ (uses all packages)
│
├── daemon ──── sync ──┬── http ──── config, logger
│ ├── redactor ── config
│ ├── discovery ── config, logger
│ ├── git
│ └── config
│
├── config
├── discovery
├── sync
├── http
├── redactor
├── git
└── logger
Leaf packages (no confab dependencies):
types, utils, logger, git
Claude Code writes transcript
│
▼
~/.claude/projects/<path>/<session-id>.jsonl
│
▼
daemon (pkg/daemon) watches file
│
▼
tracker (pkg/sync) reads new lines, seeks by byte offset
│
▼
discovery (pkg/discovery) extracts agent IDs + metadata
│
▼
redactor (pkg/redactor) redacts sensitive data
│
▼
client (pkg/sync) uploads chunk via HTTP
│
▼
http (pkg/http) compresses with zstd, sends to backend
types,utils,logger,gitare leaf packages — no confab imports. Any package can depend on them.loggeris accessed as a singleton — no need to pass it around.- Mid-level packages (
config,http,redactor,discovery) depend on leaves and each other but not ondaemonorsync. syncdepends on mid-level packages.daemondepends onsync.cmd/depends on everything. It's the only package that importsdaemon.- Dependencies flow downward only. If you need to add an upward dependency, you have a design problem — use an interface or move the shared type to
types.