What toAgentConfig accepts: every serializable AgentConfig
field (mode excepted — it is derived, never supplied) plus the host-only
fields the deny-list strips. AgentDef is assignable to this by
construction; the explicit | undefined on the host-only members keeps
spread call sites ({...agent, stt: maybeUndefined}) legal under
exactOptionalPropertyTypes.
What toAgentConfig accepts: every serializable AgentConfig field (
modeexcepted — it is derived, never supplied) plus the host-only fields the deny-list strips.AgentDefis assignable to this by construction; the explicit| undefinedon the host-only members keeps spread call sites ({...agent, stt: maybeUndefined}) legal underexactOptionalPropertyTypes.