Skip to main content
Version: Next

discovery

File: core/src/utcp/plugins/discovery.py

Function register_auth(auth_type: str, serializer: Serializer[Auth], override: bool) -> bool​

Documentation

Register an authentication implementation.

Args

  • auth_type: The authentication type identifier.
  • serializer: The serializer for the authentication implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_variable_loader(loader_type: str, serializer: Serializer[VariableLoader], override: bool) -> bool​

Documentation

Register a variable loader implementation.

Args

  • loader_type: The variable loader type identifier.
  • serializer: The serializer for the variable loader implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_call_template(call_template_type: str, serializer: Serializer[CallTemplate], override: bool) -> bool​

Documentation

Register a call template implementation.

Args

  • call_template_type: The call template type identifier.
  • serializer: The serializer for the call template implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_communication_protocol(communication_protocol_type: str, communication_protocol: CommunicationProtocol, override: bool) -> bool​

Documentation

Register a communication protocol implementation.

Args

  • communication_protocol_type: The communication protocol type identifier.
  • communication_protocol: The communication protocol implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_communication_protocol_factory(communication_protocol_type: str, factory: Callable[[], CommunicationProtocol], override: bool) -> bool​

Documentation

Register a communication protocol as a factory, so that every UtcpClient gets its own instance of it.

Use this instead of register_communication_protocol for a protocol whose state must not be shared between clients: live sessions or connections keyed per manual, child processes — anything one client's use or close() would take away from another. (A credential cache is meant to be shared and stays an instance.) Each UtcpClient calls the factory once — at creation, or on first use if the factory is registered later — and that client's close() tears the instance down. A type registered as a factory wins over the same type registered as an instance.

Args

  • communication_protocol_type: The communication protocol type identifier.
  • factory: A callable returning a new communication protocol instance.
  • override: Whether to override an existing factory for this type.

Returns

True if the factory was registered, False otherwise.


Function register_tool_repository(tool_repository_type: str, tool_repository: Serializer[ConcurrentToolRepository], override: bool) -> bool​

Documentation

Register a tool repository implementation.

Args

  • tool_repository_type: The tool repository type identifier.
  • tool_repository: The tool repository implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_tool_search_strategy(strategy_type: str, strategy: Serializer[ToolSearchStrategy], override: bool) -> bool​

Documentation

Register a tool search strategy implementation.

Args

  • strategy_type: The tool search strategy type identifier.
  • strategy: The tool search strategy implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.


Function register_tool_post_processor(tool_post_processor_type: str, tool_post_processor: Serializer[ToolPostProcessor], override: bool) -> bool​

Documentation

Register a tool post processor implementation.

Args

  • tool_post_processor_type: The tool post processor type identifier.
  • tool_post_processor: The tool post processor implementation.
  • override: Whether to override an existing implementation.

Returns

True if the implementation was registered, False otherwise.