Files
hermes-agent/agent/transports
teknium1 0f3d32ec58 refactor(transports): one registry read per api_mode gate; drop the stream-delta hook
Trim the salvaged fix to the shape main wants:

* Every gate asks ``agent.transports.registered_api_modes()`` directly. The three helper
  spellings (``_has_registered_transport``, ``_registry_knows``, ``is_registered_api_mode``)
  and the ``sys.modules`` peek are gone: no transport module imports ``providers`` or
  ``hermes_cli`` at module level, so a plain import cannot re-enter provider discovery.
* ``hermes_cli/auth.py`` late-registration pass dropped — main already re-syncs plugin
  profiles into ``PROVIDER_REGISTRY`` on every registry miss
  (``auth_plugin_providers.registry_lookup`` / ``sync_plugin_provider_registry``, #102123);
  the probe shows a profile registered after the import-time mirror resolves and reaches
  the wire on base.
* ``ProviderTransport.normalize_stream_delta`` and the streaming-assembler hook dropped —
  legacy ``delta.function_call`` translation is a separate concern from api_mode
  propagation and has no in-tree consumer.
* Tests: 15 gate-by-gate unit tests replaced by two invariants that install a REAL plugin
  under a temp HERMES_HOME and walk profile → determine_api_mode → resolve_runtime_provider
  → agent ladder → delegation resolver (positive: red on origin/main; negative: an
  unregistered mode still degrades to chat_completions).
2026-09-20 10:11:40 -07:00
..
…