Implements ADR-0044 «Heartbeat session lifecycle» (SOL-1629). - SessionCompactionPolicy gains maxCachedInputTokens (T1), rotateOnZeroOpenIssues (T3) and rotateOnNewIssueWake (T4). - claude_local adapter ships with T1=500_000, T2=6h, T3+T4 enabled by default. Per-agent overrides (CEO/CoS/Analyst T1=1M / T2=12h) continue to flow through runtimeConfig.heartbeat.sessionCompaction. - evaluateSessionCompaction now considers cache_read_input_tokens (the actual cost signal under Anthropic prompt caching) and the state-triggered rotations described in ADR-0044. - Extracted a pure decideSessionCompactionTrigger helper so the decision rule is unit-testable without a database. - usageJson now records freshSessionTriggeredBy for retrospective tuning per ADR-0044 §Acceptance criteria. - countOpenIssuesForAgent helper added inline in heartbeat service. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-Authored-By: Paperclip <noreply@paperclip.ing> |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| CHANGELOG.md | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||