primus.command_worker.runtime.entrypoint module

Configure and run the portable command worker in a container process.

class primus.command_worker.runtime.entrypoint.CommandWorkerRuntimeConfig(region: str, api_url: str, queue_url: str, queue_name: str, executor_factory: str, lease_duration: timedelta, heartbeat_interval: timedelta, visibility_timeout: timedelta, task_name: str, log_level: str)

Bases: object

Validated runtime bindings supplied by the deployment environment.

__init__(region: str, api_url: str, queue_url: str, queue_name: str, executor_factory: str, lease_duration: timedelta, heartbeat_interval: timedelta, visibility_timeout: timedelta, task_name: str, log_level: str) → None
api_url: str
executor_factory: str
classmethod from_environment(environment: Mapping[str, str] | None = None) → CommandWorkerRuntimeConfig
heartbeat_interval: timedelta
lease_duration: timedelta
log_level: str
queue_name: str
queue_url: str
region: str
task_name: str
visibility_timeout: timedelta
class primus.command_worker.runtime.entrypoint.UtcClock

Bases: object

now() → datetime
primus.command_worker.runtime.entrypoint.build_celery_app(config: CommandWorkerRuntimeConfig, *, executor: Executor | None = None, clock: Clock | None = None) → Celery

Build the Celery app and register the portable command task.

primus.command_worker.runtime.entrypoint.configure_runtime_filesystem() → None

Set one writable runtime contract for every command implementation.

Command workers execute Primus, LangGraph, Tactus, and third-party score implementations in the same non-root container. Standard runtime locations prevent individual node types from falling back to the read-only application directory for caches, tokenizer resources, or plotting configuration.

primus.command_worker.runtime.entrypoint.load_executor(factory_reference: str) → Executor

Load an integration-owned executor factory without importing its package eagerly.

primus.command_worker.runtime.entrypoint.main() → None

Run the named command queue until the container is stopped by ECS.