Repository navigation
Description
Context
The current configuration model routes output paths through defaults.output_dirs.* with six individually configured directories, while provider exports live in a separate exports.* section. The NixOS module mirrors this complexity: a 230-line generator reads automation_targets.json to produce per-target oneshot services with systemd timers, but every real deployment just calls polylogue sync X --watch in a long-running service. The result is a config surface that's hard to initialize from scratch and a module that's hard to audit.
Meanwhile, attachment files (PDFs, images, text) sit in per-conversation attachments/ directories on disk but are completely opaque to polylogue search. Users who want to find "which conversation had that PDF about X" have to grep the filesystem manually.
Motivation
- Config simplification: a new user should be able to run
polylogue config initand get a two-key config (input_root,output_root) instead of manually populating sixoutput_dirsentries plusexportspaths. Provider subdirectories should derive automatically. - NixOS module parity: the module should express what people actually run — persistent watchers, not timer-triggered oneshots that approximate the same thing with
OnUnitActiveSec. - Attachment searchability:
polylogue search --in-attachments "quarterly report"should work against text extracted at import time, including PDFs and optionally OCR'd images. - Non-TTY safety: several CLI paths currently block on
input()when stdin isn't a TTY, which breaks cron, systemd, and CI environments.
Scope
- Rewrite
config.jsonschema topaths/ui/indexstructure - Simplify provider directory naming (
gemini-sync→gemini, etc.) - Replace NixOS timer machinery with watch-service generator
- Add attachment text extraction service with PDF and optional OCR support
- Extend SQLite schema to v3 with
attachments+attachments_ftstables - Wire attachment search into the existing
searchcommand - Audit every
input()call for non-TTY safety - Add disk-space preflight and failure recording
Acceptance criteria
polylogue config initproduces a valid two-key config that round-trips throughconfig show --jsonpolylogue search --in-attachments "term"returns hits from attachment text content- NixOS module creates watch services (not timer+oneshot pairs) and starts cleanly
- Plain-mode CLI never blocks on stdin when
sys.stdin.isatty()is False --max-disk 0.001aborts early on any non-trivial operation
Activity