Files
ak47 573d15d7b4 Add Remote session foundations and feasibility checks
Add opt-in Tentacle protocol 1.1, explicit remote grants, lifecycle IPC and expiring core leases in both SDKs. Revoke access before update preparation, including failed updates.

Add transient secret entries, shared Braille cell export and isolated Xorg recovery experiments with focused tests and documented limitations. Production consent, desktop services and live interoperability remain pending.
2026-11-03 22:33:26 -05:00

34 lines
914 B
Python

# Copyright (c) 2026 Storm Dragon
# SPDX-License-Identifier: GPL-3.0-or-later
import pathlib
import sys
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[3] / 'sdk' / 'python'))
from cthulhu_tentacle import Command, SessionClient, SessionError, serve
client = SessionClient()
def request(cancelled, arguments):
try:
return {'value': client.call(arguments['method'], arguments['params'])}
except SessionError as error:
return {'code': error.code}
def event(cancelled, arguments):
return client.next_event()
def wait(cancelled, arguments):
cancelled.wait()
return None
try:
serve([Command('request', 'Request', '', request), Command('event', 'Event', '', event),
Command('wait', 'Wait', '', wait),
Command('large', 'Large', '', lambda cancelled, args: 'x' * (48 * 1024))], session_client=client)
except Exception:
sys.exit(1)