INNER CODE UNIT · Python

DirectOperations

WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:380

class DirectOperations:
    """Validated mapping from registry identity to direct executable plans."""

    def __init__(self, path=None, linux_executables=LINUX_EXECUTABLES):
        self.path, self.document, operations, cells = _read_contract(path)
        self.operations = {}
        operation_ids = set()
        for operation in operations:
            if not isinstance(operation, dict):
                raise DirectContractError("command-window operation is not an object")
            category = operation.get("category")
            label = operation.get("label")
            if not isinstance(category, str) or not isinstance(label, str):
                raise DirectContractError("command-window operation has no identity")
            key = (category, label)
            if key in self.operations:
                raise DirectContractError(f"duplicate command-window operation {key!r}")
            operation_id = operation.get("id")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…