Text this: Learning CLI Agents with Structured Action Credit under Selective Observation