INNER CODE UNIT · Python
operation
WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:516
def operation(self, key):
identity = tuple(key or ())
operation = self.operations.get(identity)
if operation is None:
shown = " / ".join(identity) if identity else "<missing identity>"
raise DirectContractError(
f"{shown}: no generated direct operation; refusing legacy payload"
)
return operation
def bindings(self, key):
return self.operation(key)["directBindings"]
def launch_allows_handoff(self, key):
policy = self.operation(key)["executionPolicy"]["launchHandoffPolicy"]
if not policy["launch"]:
raise DirectContractError(
"the generated operation is not declared as a launcher")