Skip to content

fontlab_aidus_agentus.plugin.transport.ACPTransport · declarations 001

Back to fontlab_aidus_agentus.plugin.transport.ACPTransport

__init__

__init__(python_exe=None, boot_script=None, timeout_seconds=None, working_dir=None, environment=None)

Initialize the transport.

Args: python_exe: Path to Python executable (validated in start()). boot_script: Path to boot.py script (validated in start()). timeout_seconds: Timeout for heartbeat detection (E3.16). working_dir: Working directory for the spawned process.

disable_debug

disable_debug()

Disable debug logging.

enable_debug

enable_debug(callback=None)

Enable debug logging.

Args: callback: Optional callable for debug messages. If None, uses print.

is_connected

is_connected()

Check if transport is in connected state.

Returns: bool: True if connected.

messageReceived class-attribute instance-attribute

messageReceived

processError class-attribute instance-attribute

processError

processFinished class-attribute instance-attribute

processFinished

request_reconnect

request_reconnect()

Request a reconnection attempt with exponential backoff (E3.13, E8.14).

The actual reconnection is performed asynchronously after a delay. Delay: 1s, 2s, 4s for attempts 1, 2, 3.

reset_reconnect_count

reset_reconnect_count()

Reset the reconnect counter (call after successful stable connection).

send

send(message)

Send a JSON message to the server (E3.8).

Args: message: Dictionary to send as JSON.

Returns: bool: True if message was sent successfully.

set_paths

set_paths(python_exe, boot_script)

Set Python executable and boot script paths.

Args: python_exe: Path to Python executable. boot_script: Path to boot.py script.

start

start(extra_args=None)

Start the AgentPool server process (E3.1).

Args: extra_args: Optional list of additional command-line arguments.

Returns: tuple: (success, error_message or None)

state

state()

Get the current transport state.

Returns: str: One of TransportState values.

stderrReceived class-attribute instance-attribute

stderrReceived

stop

stop(graceful=True, timeout_ms=5000)

Stop the server process; return False if termination remains unknown.

Args: graceful: If True, try terminate() before kill(). timeout_ms: Timeout in milliseconds to wait for graceful shutdown.