primus.command_worker.executors.primus_cli module
Execute an explicit Primus CLI argv through the portable worker contract.
- class primus.command_worker.executors.primus_cli.PrimusCliExecutor(invoke_cli: Callable[[], None] | None = None)
Bases:
objectRun a typed CLI request and publish its progress through
ExecutionContext.The transport contract deliberately accepts an argv array rather than a shell command string. This keeps dispatch data unambiguous and prevents command parsing from becoming an execution boundary.
task_idis optional and is exposed only as the established CLI environment binding for task-aware commands.- __init__(invoke_cli: Callable[[], None] | None = None) None
- execute(envelope: CommandEnvelope, context: ExecutionContext) str | int | float | bool | None | Mapping[str, JSONValue] | tuple[JSONValue, ...]
- primus.command_worker.executors.primus_cli.create_executor() PrimusCliExecutor
Runtime plugin factory for the portable command-worker entrypoint.