LlmCore.Executor.Control (llm_core v0.3.0)

Copy Markdown View Source

Minimal execution control registry used by CLI providers to support HALT semantics.

Consumers that need richer state management can override these functions or provide their own module via dependency injection, but the defaults keep track of active ports so they can be cleaned up when executions end.

Summary

Functions

Removes the active port registration for the given execution ID.

Looks up the active port for the given execution ID.

Registers a port as the active process for the given execution ID.

Functions

clear_active(execution_id)

@spec clear_active(String.t()) :: :ok

Removes the active port registration for the given execution ID.

lookup(execution_id)

@spec lookup(String.t()) :: {:ok, port()} | :error

Looks up the active port for the given execution ID.

Returns {:ok, port} if found, :error otherwise.

set_active_port(execution_id, port)

@spec set_active_port(String.t(), port()) :: :ok

Registers a port as the active process for the given execution ID.