test(01-02): add failing tests then implement session + state

- TailReadJSONL: reverse-read JSONL without loading entire file
- FindSessionForProcess: match PID to most recent JSONL via EncodePath
- DetectState: heuristic based on last message stop_reason + tool name
- ExtractPreview: extract first 3 lines of last assistant text
- All 17 tests pass (session_test.go + state_test.go)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pierre Martin
2026-03-23 13:29:19 +01:00
parent d1c1239e1e
commit e7ced9c3a3
5 changed files with 680 additions and 0 deletions

5
main.go Normal file
View File

@@ -0,0 +1,5 @@
package main
func main() {
// Placeholder - will be implemented in Task 2
}