Logging overhaul: per-task log files, daemon.log drill-down

Switch from jobkit-daemon crate to jobkit with daemon feature.
Wire up per-task log files for all daemon-spawned agent tasks.

Changes:
- Use jobkit::daemon:: instead of jobkit_daemon::
- All agent tasks get .log_dir() set to $data_dir/logs/
- Task log path shown in daemon status and TUI
- New CLI: poc-memory agent daemon log --task NAME
  Finds the task's log path from status or daemon.log, tails the file
- LLM backend selection logged to daemon.log via log_event
- Targeted agent job names include the target key for debuggability
- Logging architecture documented in doc/logging.md

Two-level logging, no duplication:
- daemon.log: lifecycle events with task log path for drill-down
- per-task logs: full agent output via ctx.log_line()

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kent Overstreet 2026-03-19 11:17:07 -04:00
parent f2c2c02a22
commit 49f72cdac3
7 changed files with 192 additions and 54 deletions

19
Cargo.lock generated
View file

@ -1805,25 +1805,13 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "jobkit"
version = "0.1.0"
source = "git+https://evilpiepirate.org/git/jobkit.git/#2cdf0d5c3dd55f3d1783c40211a7eb96707d1ab6"
dependencies = [
"crossbeam-deque",
"log",
"profiling",
"serde",
"serde_json",
]
[[package]]
name = "jobkit-daemon"
version = "0.4.0"
source = "git+https://evilpiepirate.org/git/jobkit-daemon.git/#6faa0a06e3b2d69ea22fc691b4e8e4760b0772f7"
version = "0.2.0"
dependencies = [
"chrono",
"jobkit",
"crossbeam-deque",
"libc",
"log",
"profiling",
"serde",
"serde_json",
]
@ -2655,7 +2643,6 @@ dependencies = [
"crossterm 0.28.1",
"faer",
"jobkit",
"jobkit-daemon",
"libc",
"log",
"memmap2",