Architecture documentation for the ModeState type/interface in types.ts from the claude-code codebase.