agent: move TokenUsage and SkillEvent to the leaf types package

Commit

Soph3mo ago

The checkpoint contract DTOs embed TokenUsage and SkillEvent, but both lived in the heavy agent package — so any package referencing the checkpoint metadata types transitively pulled in agent (and its TUI/launch/review dependencies). That blocks relocating the contract to a standalone api/checkpoint package.

Move the type definitions into the existing leaf agent/types package (which has no imports) and leave transparent aliases in agent:

type TokenUsage = types.TokenUsage type SkillEvent = types.SkillEvent (+ the four Skill* sub-types)

All ~34 existing agent.TokenUsage / agent.SkillEvent references keep compiling unchanged via the aliases; the constants and SkillEventExtractor interface stay in agent. checkpoint.go now references types.* and no longer imports agent — the prerequisite for the api/checkpoint relocation (next in the stack).

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 1170c7943a20

Checkpoints

can you look at this branch / pr also in the context of https://github.com/entireio/cli/issues/1433 and especially https://github.com/entireio/cli/issues/1433#issuecomment-4722283362

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1