Files
Agentsd/plugins/_sdk/agentsd_pb2_grpc.py
未知时光 3299468df6 Migrate test plugins to Rust and async-ify syscall modules
- Replace Python test plugins (echo, ai_test, claudecode) with Rust
  implementations driven by the plugin SDK
- Convert fs/network/process/timer syscall modules to async/await
- Change Network.OpenConn to return stream ConnEvent (conn_id handed
  to client in first "open" frame for Send/Close routing)
- Bind timer callbacks to plugin identity; stream_call subscriptions
  are identity-checked
- Update docs and regenerate Python SDK protobuf stubs

Verified: cargo build/test/clippy clean; echo + ai_test full syscall
suites pass; hermes & claudecode register and heartbeat; cross-plugin
bridge.call routing and auth denial verified end-to-end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 14:27:46 +08:00

2582 lines
90 KiB
Python

# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings
import agentsd_pb2 as agentsd__pb2
GRPC_GENERATED_VERSION = '1.81.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False
try:
from grpc._utilities import first_version_is_lower
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
_version_not_supported = True
if _version_not_supported:
raise RuntimeError(
f'The grpc package installed is at version {GRPC_VERSION},'
+ ' but the generated code in agentsd_pb2_grpc.py depends on'
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
)
class DisplayStub:
"""========== Display ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Text = channel.unary_unary(
'/agentsd.Display/Text',
request_serializer=agentsd__pb2.DisplayTextRequest.SerializeToString,
response_deserializer=agentsd__pb2.DisplayResponse.FromString,
_registered_method=True)
self.Rich = channel.unary_unary(
'/agentsd.Display/Rich',
request_serializer=agentsd__pb2.DisplayRichRequest.SerializeToString,
response_deserializer=agentsd__pb2.DisplayResponse.FromString,
_registered_method=True)
self.Image = channel.unary_unary(
'/agentsd.Display/Image',
request_serializer=agentsd__pb2.DisplayImageRequest.SerializeToString,
response_deserializer=agentsd__pb2.DisplayResponse.FromString,
_registered_method=True)
self.Clear = channel.unary_unary(
'/agentsd.Display/Clear',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.DisplayResponse.FromString,
_registered_method=True)
self.Notify = channel.unary_unary(
'/agentsd.Display/Notify',
request_serializer=agentsd__pb2.DisplayNotifyRequest.SerializeToString,
response_deserializer=agentsd__pb2.DisplayResponse.FromString,
_registered_method=True)
class DisplayServicer:
"""========== Display ==========
"""
def Text(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Rich(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Image(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Clear(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Notify(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_DisplayServicer_to_server(servicer, server):
rpc_method_handlers = {
'Text': grpc.unary_unary_rpc_method_handler(
servicer.Text,
request_deserializer=agentsd__pb2.DisplayTextRequest.FromString,
response_serializer=agentsd__pb2.DisplayResponse.SerializeToString,
),
'Rich': grpc.unary_unary_rpc_method_handler(
servicer.Rich,
request_deserializer=agentsd__pb2.DisplayRichRequest.FromString,
response_serializer=agentsd__pb2.DisplayResponse.SerializeToString,
),
'Image': grpc.unary_unary_rpc_method_handler(
servicer.Image,
request_deserializer=agentsd__pb2.DisplayImageRequest.FromString,
response_serializer=agentsd__pb2.DisplayResponse.SerializeToString,
),
'Clear': grpc.unary_unary_rpc_method_handler(
servicer.Clear,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.DisplayResponse.SerializeToString,
),
'Notify': grpc.unary_unary_rpc_method_handler(
servicer.Notify,
request_deserializer=agentsd__pb2.DisplayNotifyRequest.FromString,
response_serializer=agentsd__pb2.DisplayResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Display', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Display', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Display:
"""========== Display ==========
"""
@staticmethod
def Text(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Display/Text',
agentsd__pb2.DisplayTextRequest.SerializeToString,
agentsd__pb2.DisplayResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Rich(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Display/Rich',
agentsd__pb2.DisplayRichRequest.SerializeToString,
agentsd__pb2.DisplayResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Image(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Display/Image',
agentsd__pb2.DisplayImageRequest.SerializeToString,
agentsd__pb2.DisplayResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Clear(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Display/Clear',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.DisplayResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Notify(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Display/Notify',
agentsd__pb2.DisplayNotifyRequest.SerializeToString,
agentsd__pb2.DisplayResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class AudioStub:
"""========== Audio ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Play = channel.stream_unary(
'/agentsd.Audio/Play',
request_serializer=agentsd__pb2.AudioChunk.SerializeToString,
response_deserializer=agentsd__pb2.AudioResponse.FromString,
_registered_method=True)
self.Stop = channel.unary_unary(
'/agentsd.Audio/Stop',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.AudioResponse.FromString,
_registered_method=True)
self.Volume = channel.unary_unary(
'/agentsd.Audio/Volume',
request_serializer=agentsd__pb2.VolumeRequest.SerializeToString,
response_deserializer=agentsd__pb2.AudioResponse.FromString,
_registered_method=True)
self.RecordStart = channel.unary_unary(
'/agentsd.Audio/RecordStart',
request_serializer=agentsd__pb2.RecordStartRequest.SerializeToString,
response_deserializer=agentsd__pb2.AudioResponse.FromString,
_registered_method=True)
self.RecordStop = channel.unary_unary(
'/agentsd.Audio/RecordStop',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.AudioData.FromString,
_registered_method=True)
self.RecordStream = channel.unary_stream(
'/agentsd.Audio/RecordStream',
request_serializer=agentsd__pb2.RecordStartRequest.SerializeToString,
response_deserializer=agentsd__pb2.AudioChunk.FromString,
_registered_method=True)
class AudioServicer:
"""========== Audio ==========
"""
def Play(self, request_iterator, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Stop(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Volume(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RecordStart(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RecordStop(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def RecordStream(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_AudioServicer_to_server(servicer, server):
rpc_method_handlers = {
'Play': grpc.stream_unary_rpc_method_handler(
servicer.Play,
request_deserializer=agentsd__pb2.AudioChunk.FromString,
response_serializer=agentsd__pb2.AudioResponse.SerializeToString,
),
'Stop': grpc.unary_unary_rpc_method_handler(
servicer.Stop,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.AudioResponse.SerializeToString,
),
'Volume': grpc.unary_unary_rpc_method_handler(
servicer.Volume,
request_deserializer=agentsd__pb2.VolumeRequest.FromString,
response_serializer=agentsd__pb2.AudioResponse.SerializeToString,
),
'RecordStart': grpc.unary_unary_rpc_method_handler(
servicer.RecordStart,
request_deserializer=agentsd__pb2.RecordStartRequest.FromString,
response_serializer=agentsd__pb2.AudioResponse.SerializeToString,
),
'RecordStop': grpc.unary_unary_rpc_method_handler(
servicer.RecordStop,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.AudioData.SerializeToString,
),
'RecordStream': grpc.unary_stream_rpc_method_handler(
servicer.RecordStream,
request_deserializer=agentsd__pb2.RecordStartRequest.FromString,
response_serializer=agentsd__pb2.AudioChunk.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Audio', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Audio', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Audio:
"""========== Audio ==========
"""
@staticmethod
def Play(request_iterator,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.stream_unary(
request_iterator,
target,
'/agentsd.Audio/Play',
agentsd__pb2.AudioChunk.SerializeToString,
agentsd__pb2.AudioResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Stop(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Audio/Stop',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.AudioResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Volume(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Audio/Volume',
agentsd__pb2.VolumeRequest.SerializeToString,
agentsd__pb2.AudioResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def RecordStart(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Audio/RecordStart',
agentsd__pb2.RecordStartRequest.SerializeToString,
agentsd__pb2.AudioResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def RecordStop(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Audio/RecordStop',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.AudioData.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def RecordStream(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.Audio/RecordStream',
agentsd__pb2.RecordStartRequest.SerializeToString,
agentsd__pb2.AudioChunk.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class FSStub:
"""========== FS ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Read = channel.unary_unary(
'/agentsd.FS/Read',
request_serializer=agentsd__pb2.FsReadRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsReadResponse.FromString,
_registered_method=True)
self.Write = channel.unary_unary(
'/agentsd.FS/Write',
request_serializer=agentsd__pb2.FsWriteRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsResponse.FromString,
_registered_method=True)
self.Delete = channel.unary_unary(
'/agentsd.FS/Delete',
request_serializer=agentsd__pb2.FsPathRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsResponse.FromString,
_registered_method=True)
self.Rename = channel.unary_unary(
'/agentsd.FS/Rename',
request_serializer=agentsd__pb2.FsRenameRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsResponse.FromString,
_registered_method=True)
self.Stat = channel.unary_unary(
'/agentsd.FS/Stat',
request_serializer=agentsd__pb2.FsPathRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsStatResponse.FromString,
_registered_method=True)
self.List = channel.unary_unary(
'/agentsd.FS/List',
request_serializer=agentsd__pb2.FsPathRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsListResponse.FromString,
_registered_method=True)
self.Watch = channel.unary_stream(
'/agentsd.FS/Watch',
request_serializer=agentsd__pb2.FsPathRequest.SerializeToString,
response_deserializer=agentsd__pb2.FsWatchEvent.FromString,
_registered_method=True)
class FSServicer:
"""========== FS ==========
"""
def Read(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Write(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Delete(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Rename(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Stat(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def List(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Watch(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_FSServicer_to_server(servicer, server):
rpc_method_handlers = {
'Read': grpc.unary_unary_rpc_method_handler(
servicer.Read,
request_deserializer=agentsd__pb2.FsReadRequest.FromString,
response_serializer=agentsd__pb2.FsReadResponse.SerializeToString,
),
'Write': grpc.unary_unary_rpc_method_handler(
servicer.Write,
request_deserializer=agentsd__pb2.FsWriteRequest.FromString,
response_serializer=agentsd__pb2.FsResponse.SerializeToString,
),
'Delete': grpc.unary_unary_rpc_method_handler(
servicer.Delete,
request_deserializer=agentsd__pb2.FsPathRequest.FromString,
response_serializer=agentsd__pb2.FsResponse.SerializeToString,
),
'Rename': grpc.unary_unary_rpc_method_handler(
servicer.Rename,
request_deserializer=agentsd__pb2.FsRenameRequest.FromString,
response_serializer=agentsd__pb2.FsResponse.SerializeToString,
),
'Stat': grpc.unary_unary_rpc_method_handler(
servicer.Stat,
request_deserializer=agentsd__pb2.FsPathRequest.FromString,
response_serializer=agentsd__pb2.FsStatResponse.SerializeToString,
),
'List': grpc.unary_unary_rpc_method_handler(
servicer.List,
request_deserializer=agentsd__pb2.FsPathRequest.FromString,
response_serializer=agentsd__pb2.FsListResponse.SerializeToString,
),
'Watch': grpc.unary_stream_rpc_method_handler(
servicer.Watch,
request_deserializer=agentsd__pb2.FsPathRequest.FromString,
response_serializer=agentsd__pb2.FsWatchEvent.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.FS', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.FS', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class FS:
"""========== FS ==========
"""
@staticmethod
def Read(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/Read',
agentsd__pb2.FsReadRequest.SerializeToString,
agentsd__pb2.FsReadResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Write(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/Write',
agentsd__pb2.FsWriteRequest.SerializeToString,
agentsd__pb2.FsResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Delete(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/Delete',
agentsd__pb2.FsPathRequest.SerializeToString,
agentsd__pb2.FsResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Rename(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/Rename',
agentsd__pb2.FsRenameRequest.SerializeToString,
agentsd__pb2.FsResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Stat(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/Stat',
agentsd__pb2.FsPathRequest.SerializeToString,
agentsd__pb2.FsStatResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def List(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.FS/List',
agentsd__pb2.FsPathRequest.SerializeToString,
agentsd__pb2.FsListResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Watch(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.FS/Watch',
agentsd__pb2.FsPathRequest.SerializeToString,
agentsd__pb2.FsWatchEvent.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class MemoryStub:
"""========== Memory ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Read = channel.unary_unary(
'/agentsd.Memory/Read',
request_serializer=agentsd__pb2.MemoryReadRequest.SerializeToString,
response_deserializer=agentsd__pb2.MemoryReadResponse.FromString,
_registered_method=True)
self.Write = channel.unary_unary(
'/agentsd.Memory/Write',
request_serializer=agentsd__pb2.MemoryWriteRequest.SerializeToString,
response_deserializer=agentsd__pb2.MemoryResponse.FromString,
_registered_method=True)
self.Delete = channel.unary_unary(
'/agentsd.Memory/Delete',
request_serializer=agentsd__pb2.MemoryKeyRequest.SerializeToString,
response_deserializer=agentsd__pb2.MemoryResponse.FromString,
_registered_method=True)
self.List = channel.unary_unary(
'/agentsd.Memory/List',
request_serializer=agentsd__pb2.MemoryListRequest.SerializeToString,
response_deserializer=agentsd__pb2.MemoryListResponse.FromString,
_registered_method=True)
self.Search = channel.unary_unary(
'/agentsd.Memory/Search',
request_serializer=agentsd__pb2.MemorySearchRequest.SerializeToString,
response_deserializer=agentsd__pb2.MemorySearchResponse.FromString,
_registered_method=True)
class MemoryServicer:
"""========== Memory ==========
"""
def Read(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Write(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Delete(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def List(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Search(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_MemoryServicer_to_server(servicer, server):
rpc_method_handlers = {
'Read': grpc.unary_unary_rpc_method_handler(
servicer.Read,
request_deserializer=agentsd__pb2.MemoryReadRequest.FromString,
response_serializer=agentsd__pb2.MemoryReadResponse.SerializeToString,
),
'Write': grpc.unary_unary_rpc_method_handler(
servicer.Write,
request_deserializer=agentsd__pb2.MemoryWriteRequest.FromString,
response_serializer=agentsd__pb2.MemoryResponse.SerializeToString,
),
'Delete': grpc.unary_unary_rpc_method_handler(
servicer.Delete,
request_deserializer=agentsd__pb2.MemoryKeyRequest.FromString,
response_serializer=agentsd__pb2.MemoryResponse.SerializeToString,
),
'List': grpc.unary_unary_rpc_method_handler(
servicer.List,
request_deserializer=agentsd__pb2.MemoryListRequest.FromString,
response_serializer=agentsd__pb2.MemoryListResponse.SerializeToString,
),
'Search': grpc.unary_unary_rpc_method_handler(
servicer.Search,
request_deserializer=agentsd__pb2.MemorySearchRequest.FromString,
response_serializer=agentsd__pb2.MemorySearchResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Memory', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Memory', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Memory:
"""========== Memory ==========
"""
@staticmethod
def Read(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Memory/Read',
agentsd__pb2.MemoryReadRequest.SerializeToString,
agentsd__pb2.MemoryReadResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Write(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Memory/Write',
agentsd__pb2.MemoryWriteRequest.SerializeToString,
agentsd__pb2.MemoryResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Delete(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Memory/Delete',
agentsd__pb2.MemoryKeyRequest.SerializeToString,
agentsd__pb2.MemoryResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def List(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Memory/List',
agentsd__pb2.MemoryListRequest.SerializeToString,
agentsd__pb2.MemoryListResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Search(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Memory/Search',
agentsd__pb2.MemorySearchRequest.SerializeToString,
agentsd__pb2.MemorySearchResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class NetworkStub:
"""========== Network ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Request = channel.unary_unary(
'/agentsd.Network/Request',
request_serializer=agentsd__pb2.HttpRequest.SerializeToString,
response_deserializer=agentsd__pb2.HttpResponse.FromString,
_registered_method=True)
self.OpenConn = channel.unary_stream(
'/agentsd.Network/OpenConn',
request_serializer=agentsd__pb2.ConnectRequest.SerializeToString,
response_deserializer=agentsd__pb2.ConnEvent.FromString,
_registered_method=True)
self.Listen = channel.unary_stream(
'/agentsd.Network/Listen',
request_serializer=agentsd__pb2.ListenRequest.SerializeToString,
response_deserializer=agentsd__pb2.ConnEvent.FromString,
_registered_method=True)
self.Send = channel.unary_unary(
'/agentsd.Network/Send',
request_serializer=agentsd__pb2.SendRequest.SerializeToString,
response_deserializer=agentsd__pb2.NetResponse.FromString,
_registered_method=True)
self.Close = channel.unary_unary(
'/agentsd.Network/Close',
request_serializer=agentsd__pb2.CloseRequest.SerializeToString,
response_deserializer=agentsd__pb2.NetResponse.FromString,
_registered_method=True)
self.Available = channel.unary_unary(
'/agentsd.Network/Available',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.NetAvailableResponse.FromString,
_registered_method=True)
class NetworkServicer:
"""========== Network ==========
"""
def Request(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def OpenConn(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Listen(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Send(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Close(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Available(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_NetworkServicer_to_server(servicer, server):
rpc_method_handlers = {
'Request': grpc.unary_unary_rpc_method_handler(
servicer.Request,
request_deserializer=agentsd__pb2.HttpRequest.FromString,
response_serializer=agentsd__pb2.HttpResponse.SerializeToString,
),
'OpenConn': grpc.unary_stream_rpc_method_handler(
servicer.OpenConn,
request_deserializer=agentsd__pb2.ConnectRequest.FromString,
response_serializer=agentsd__pb2.ConnEvent.SerializeToString,
),
'Listen': grpc.unary_stream_rpc_method_handler(
servicer.Listen,
request_deserializer=agentsd__pb2.ListenRequest.FromString,
response_serializer=agentsd__pb2.ConnEvent.SerializeToString,
),
'Send': grpc.unary_unary_rpc_method_handler(
servicer.Send,
request_deserializer=agentsd__pb2.SendRequest.FromString,
response_serializer=agentsd__pb2.NetResponse.SerializeToString,
),
'Close': grpc.unary_unary_rpc_method_handler(
servicer.Close,
request_deserializer=agentsd__pb2.CloseRequest.FromString,
response_serializer=agentsd__pb2.NetResponse.SerializeToString,
),
'Available': grpc.unary_unary_rpc_method_handler(
servicer.Available,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.NetAvailableResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Network', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Network', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Network:
"""========== Network ==========
"""
@staticmethod
def Request(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Network/Request',
agentsd__pb2.HttpRequest.SerializeToString,
agentsd__pb2.HttpResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def OpenConn(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.Network/OpenConn',
agentsd__pb2.ConnectRequest.SerializeToString,
agentsd__pb2.ConnEvent.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Listen(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.Network/Listen',
agentsd__pb2.ListenRequest.SerializeToString,
agentsd__pb2.ConnEvent.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Send(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Network/Send',
agentsd__pb2.SendRequest.SerializeToString,
agentsd__pb2.NetResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Close(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Network/Close',
agentsd__pb2.CloseRequest.SerializeToString,
agentsd__pb2.NetResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Available(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Network/Available',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.NetAvailableResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class ProcessStub:
"""========== Process ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Spawn = channel.unary_unary(
'/agentsd.Process/Spawn',
request_serializer=agentsd__pb2.SpawnRequest.SerializeToString,
response_deserializer=agentsd__pb2.SpawnResponse.FromString,
_registered_method=True)
self.Kill = channel.unary_unary(
'/agentsd.Process/Kill',
request_serializer=agentsd__pb2.PidRequest.SerializeToString,
response_deserializer=agentsd__pb2.ProcResponse.FromString,
_registered_method=True)
self.Wait = channel.unary_unary(
'/agentsd.Process/Wait',
request_serializer=agentsd__pb2.PidRequest.SerializeToString,
response_deserializer=agentsd__pb2.WaitResponse.FromString,
_registered_method=True)
self.Stdin = channel.unary_unary(
'/agentsd.Process/Stdin',
request_serializer=agentsd__pb2.StdinRequest.SerializeToString,
response_deserializer=agentsd__pb2.ProcResponse.FromString,
_registered_method=True)
self.Stdout = channel.unary_stream(
'/agentsd.Process/Stdout',
request_serializer=agentsd__pb2.PidRequest.SerializeToString,
response_deserializer=agentsd__pb2.DataChunk.FromString,
_registered_method=True)
self.Signal = channel.unary_unary(
'/agentsd.Process/Signal',
request_serializer=agentsd__pb2.SignalRequest.SerializeToString,
response_deserializer=agentsd__pb2.ProcResponse.FromString,
_registered_method=True)
self.ListProc = channel.unary_unary(
'/agentsd.Process/ListProc',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.ProcListResponse.FromString,
_registered_method=True)
class ProcessServicer:
"""========== Process ==========
"""
def Spawn(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Kill(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Wait(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Stdin(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Stdout(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Signal(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ListProc(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_ProcessServicer_to_server(servicer, server):
rpc_method_handlers = {
'Spawn': grpc.unary_unary_rpc_method_handler(
servicer.Spawn,
request_deserializer=agentsd__pb2.SpawnRequest.FromString,
response_serializer=agentsd__pb2.SpawnResponse.SerializeToString,
),
'Kill': grpc.unary_unary_rpc_method_handler(
servicer.Kill,
request_deserializer=agentsd__pb2.PidRequest.FromString,
response_serializer=agentsd__pb2.ProcResponse.SerializeToString,
),
'Wait': grpc.unary_unary_rpc_method_handler(
servicer.Wait,
request_deserializer=agentsd__pb2.PidRequest.FromString,
response_serializer=agentsd__pb2.WaitResponse.SerializeToString,
),
'Stdin': grpc.unary_unary_rpc_method_handler(
servicer.Stdin,
request_deserializer=agentsd__pb2.StdinRequest.FromString,
response_serializer=agentsd__pb2.ProcResponse.SerializeToString,
),
'Stdout': grpc.unary_stream_rpc_method_handler(
servicer.Stdout,
request_deserializer=agentsd__pb2.PidRequest.FromString,
response_serializer=agentsd__pb2.DataChunk.SerializeToString,
),
'Signal': grpc.unary_unary_rpc_method_handler(
servicer.Signal,
request_deserializer=agentsd__pb2.SignalRequest.FromString,
response_serializer=agentsd__pb2.ProcResponse.SerializeToString,
),
'ListProc': grpc.unary_unary_rpc_method_handler(
servicer.ListProc,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.ProcListResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Process', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Process', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Process:
"""========== Process ==========
"""
@staticmethod
def Spawn(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/Spawn',
agentsd__pb2.SpawnRequest.SerializeToString,
agentsd__pb2.SpawnResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Kill(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/Kill',
agentsd__pb2.PidRequest.SerializeToString,
agentsd__pb2.ProcResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Wait(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/Wait',
agentsd__pb2.PidRequest.SerializeToString,
agentsd__pb2.WaitResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Stdin(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/Stdin',
agentsd__pb2.StdinRequest.SerializeToString,
agentsd__pb2.ProcResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Stdout(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.Process/Stdout',
agentsd__pb2.PidRequest.SerializeToString,
agentsd__pb2.DataChunk.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Signal(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/Signal',
agentsd__pb2.SignalRequest.SerializeToString,
agentsd__pb2.ProcResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def ListProc(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Process/ListProc',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.ProcListResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class TimerStub:
"""========== Timer ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Once = channel.unary_unary(
'/agentsd.Timer/Once',
request_serializer=agentsd__pb2.TimerOnceRequest.SerializeToString,
response_deserializer=agentsd__pb2.TimerResponse.FromString,
_registered_method=True)
self.Cron = channel.unary_unary(
'/agentsd.Timer/Cron',
request_serializer=agentsd__pb2.TimerCronRequest.SerializeToString,
response_deserializer=agentsd__pb2.TimerResponse.FromString,
_registered_method=True)
self.Cancel = channel.unary_unary(
'/agentsd.Timer/Cancel',
request_serializer=agentsd__pb2.TimerCancelRequest.SerializeToString,
response_deserializer=agentsd__pb2.TimerResponse.FromString,
_registered_method=True)
self.Now = channel.unary_unary(
'/agentsd.Timer/Now',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.TimerNowResponse.FromString,
_registered_method=True)
class TimerServicer:
"""========== Timer ==========
"""
def Once(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Cron(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Cancel(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Now(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_TimerServicer_to_server(servicer, server):
rpc_method_handlers = {
'Once': grpc.unary_unary_rpc_method_handler(
servicer.Once,
request_deserializer=agentsd__pb2.TimerOnceRequest.FromString,
response_serializer=agentsd__pb2.TimerResponse.SerializeToString,
),
'Cron': grpc.unary_unary_rpc_method_handler(
servicer.Cron,
request_deserializer=agentsd__pb2.TimerCronRequest.FromString,
response_serializer=agentsd__pb2.TimerResponse.SerializeToString,
),
'Cancel': grpc.unary_unary_rpc_method_handler(
servicer.Cancel,
request_deserializer=agentsd__pb2.TimerCancelRequest.FromString,
response_serializer=agentsd__pb2.TimerResponse.SerializeToString,
),
'Now': grpc.unary_unary_rpc_method_handler(
servicer.Now,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.TimerNowResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Timer', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Timer', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Timer:
"""========== Timer ==========
"""
@staticmethod
def Once(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Timer/Once',
agentsd__pb2.TimerOnceRequest.SerializeToString,
agentsd__pb2.TimerResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Cron(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Timer/Cron',
agentsd__pb2.TimerCronRequest.SerializeToString,
agentsd__pb2.TimerResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Cancel(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Timer/Cancel',
agentsd__pb2.TimerCancelRequest.SerializeToString,
agentsd__pb2.TimerResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Now(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Timer/Now',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.TimerNowResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class HIDStub:
"""========== HID ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Capture = channel.unary_unary(
'/agentsd.HID/Capture',
request_serializer=agentsd__pb2.CaptureRequest.SerializeToString,
response_deserializer=agentsd__pb2.CaptureResponse.FromString,
_registered_method=True)
self.Mouse = channel.unary_unary(
'/agentsd.HID/Mouse',
request_serializer=agentsd__pb2.MouseRequest.SerializeToString,
response_deserializer=agentsd__pb2.HidResponse.FromString,
_registered_method=True)
self.Keyboard = channel.unary_unary(
'/agentsd.HID/Keyboard',
request_serializer=agentsd__pb2.KeyboardRequest.SerializeToString,
response_deserializer=agentsd__pb2.HidResponse.FromString,
_registered_method=True)
self.Ocr = channel.unary_unary(
'/agentsd.HID/Ocr',
request_serializer=agentsd__pb2.CaptureRequest.SerializeToString,
response_deserializer=agentsd__pb2.OcrResponse.FromString,
_registered_method=True)
class HIDServicer:
"""========== HID ==========
"""
def Capture(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Mouse(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Keyboard(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Ocr(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_HIDServicer_to_server(servicer, server):
rpc_method_handlers = {
'Capture': grpc.unary_unary_rpc_method_handler(
servicer.Capture,
request_deserializer=agentsd__pb2.CaptureRequest.FromString,
response_serializer=agentsd__pb2.CaptureResponse.SerializeToString,
),
'Mouse': grpc.unary_unary_rpc_method_handler(
servicer.Mouse,
request_deserializer=agentsd__pb2.MouseRequest.FromString,
response_serializer=agentsd__pb2.HidResponse.SerializeToString,
),
'Keyboard': grpc.unary_unary_rpc_method_handler(
servicer.Keyboard,
request_deserializer=agentsd__pb2.KeyboardRequest.FromString,
response_serializer=agentsd__pb2.HidResponse.SerializeToString,
),
'Ocr': grpc.unary_unary_rpc_method_handler(
servicer.Ocr,
request_deserializer=agentsd__pb2.CaptureRequest.FromString,
response_serializer=agentsd__pb2.OcrResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.HID', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.HID', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class HID:
"""========== HID ==========
"""
@staticmethod
def Capture(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.HID/Capture',
agentsd__pb2.CaptureRequest.SerializeToString,
agentsd__pb2.CaptureResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Mouse(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.HID/Mouse',
agentsd__pb2.MouseRequest.SerializeToString,
agentsd__pb2.HidResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Keyboard(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.HID/Keyboard',
agentsd__pb2.KeyboardRequest.SerializeToString,
agentsd__pb2.HidResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Ocr(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.HID/Ocr',
agentsd__pb2.CaptureRequest.SerializeToString,
agentsd__pb2.OcrResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class InputStub:
"""========== Input ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Text = channel.unary_unary(
'/agentsd.Input/Text',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.InputTextResponse.FromString,
_registered_method=True)
self.Key = channel.unary_unary(
'/agentsd.Input/Key',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.InputKeyResponse.FromString,
_registered_method=True)
self.Clipboard = channel.unary_unary(
'/agentsd.Input/Clipboard',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.InputClipboardResponse.FromString,
_registered_method=True)
self.Events = channel.unary_stream(
'/agentsd.Input/Events',
request_serializer=agentsd__pb2.Empty.SerializeToString,
response_deserializer=agentsd__pb2.InputEvent.FromString,
_registered_method=True)
class InputServicer:
"""========== Input ==========
"""
def Text(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Key(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Clipboard(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Events(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_InputServicer_to_server(servicer, server):
rpc_method_handlers = {
'Text': grpc.unary_unary_rpc_method_handler(
servicer.Text,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.InputTextResponse.SerializeToString,
),
'Key': grpc.unary_unary_rpc_method_handler(
servicer.Key,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.InputKeyResponse.SerializeToString,
),
'Clipboard': grpc.unary_unary_rpc_method_handler(
servicer.Clipboard,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.InputClipboardResponse.SerializeToString,
),
'Events': grpc.unary_stream_rpc_method_handler(
servicer.Events,
request_deserializer=agentsd__pb2.Empty.FromString,
response_serializer=agentsd__pb2.InputEvent.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.Input', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.Input', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class Input:
"""========== Input ==========
"""
@staticmethod
def Text(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Input/Text',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.InputTextResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Key(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Input/Key',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.InputKeyResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Clipboard(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.Input/Clipboard',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.InputClipboardResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Events(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.Input/Events',
agentsd__pb2.Empty.SerializeToString,
agentsd__pb2.InputEvent.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
class PluginBridgeStub:
"""========== Plugin Bridge ==========
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Register = channel.unary_unary(
'/agentsd.PluginBridge/Register',
request_serializer=agentsd__pb2.PluginInfo.SerializeToString,
response_deserializer=agentsd__pb2.RegisterResponse.FromString,
_registered_method=True)
self.Call = channel.unary_unary(
'/agentsd.PluginBridge/Call',
request_serializer=agentsd__pb2.CallRequest.SerializeToString,
response_deserializer=agentsd__pb2.CallResponse.FromString,
_registered_method=True)
self.StreamCall = channel.unary_stream(
'/agentsd.PluginBridge/StreamCall',
request_serializer=agentsd__pb2.CallRequest.SerializeToString,
response_deserializer=agentsd__pb2.CallResponse.FromString,
_registered_method=True)
self.Heartbeat = channel.unary_unary(
'/agentsd.PluginBridge/Heartbeat',
request_serializer=agentsd__pb2.HeartbeatRequest.SerializeToString,
response_deserializer=agentsd__pb2.HeartbeatResponse.FromString,
_registered_method=True)
class PluginBridgeServicer:
"""========== Plugin Bridge ==========
"""
def Register(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Call(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def StreamCall(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Heartbeat(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_PluginBridgeServicer_to_server(servicer, server):
rpc_method_handlers = {
'Register': grpc.unary_unary_rpc_method_handler(
servicer.Register,
request_deserializer=agentsd__pb2.PluginInfo.FromString,
response_serializer=agentsd__pb2.RegisterResponse.SerializeToString,
),
'Call': grpc.unary_unary_rpc_method_handler(
servicer.Call,
request_deserializer=agentsd__pb2.CallRequest.FromString,
response_serializer=agentsd__pb2.CallResponse.SerializeToString,
),
'StreamCall': grpc.unary_stream_rpc_method_handler(
servicer.StreamCall,
request_deserializer=agentsd__pb2.CallRequest.FromString,
response_serializer=agentsd__pb2.CallResponse.SerializeToString,
),
'Heartbeat': grpc.unary_unary_rpc_method_handler(
servicer.Heartbeat,
request_deserializer=agentsd__pb2.HeartbeatRequest.FromString,
response_serializer=agentsd__pb2.HeartbeatResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'agentsd.PluginBridge', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
server.add_registered_method_handlers('agentsd.PluginBridge', rpc_method_handlers)
# This class is part of an EXPERIMENTAL API.
class PluginBridge:
"""========== Plugin Bridge ==========
"""
@staticmethod
def Register(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.PluginBridge/Register',
agentsd__pb2.PluginInfo.SerializeToString,
agentsd__pb2.RegisterResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Call(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.PluginBridge/Call',
agentsd__pb2.CallRequest.SerializeToString,
agentsd__pb2.CallResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def StreamCall(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_stream(
request,
target,
'/agentsd.PluginBridge/StreamCall',
agentsd__pb2.CallRequest.SerializeToString,
agentsd__pb2.CallResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)
@staticmethod
def Heartbeat(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(
request,
target,
'/agentsd.PluginBridge/Heartbeat',
agentsd__pb2.HeartbeatRequest.SerializeToString,
agentsd__pb2.HeartbeatResponse.FromString,
options,
channel_credentials,
insecure,
call_credentials,
compression,
wait_for_ready,
timeout,
metadata,
_registered_method=True)