1c814eb9fd
Core & Protocols: - Native AWS SSM support added (aws ssm start-session). - Improved Pexpect logic for ssm, kubectl, and docker. - Cleaned connection success messages (omitting ports for non-IP protocols). gRPC Layer: - Migrated gRPC modules to 'connpy/grpc_layer/'. - Implemented dynamic node naming (e.g. ssm-i-xxxx@aws) for accurate server-side logging. - Added automatic sys.path resolution for gRPC generated modules. - Enhanced InteractNode response with initial connection status. Printer & Concurrency: - Implemented ThreadLocalStream for isolated thread-safe output. - Self-healing Console objects to prevent 'closed file' errors in test/async environments. - Capture clean plugin output in remote executions. AI & Services: - Improved tool registration and debug visualization. - Restored native dictionary returns for AI tools to fix Web UI rendering. - Increased backup retention to 100 copies in SyncService. - Silenced noisy auto-sync CLI messages. Quality & Docs: - Total tests: 267 (all passing). - New test suites for gRPC layer and printer concurrency. - Updated .gitignore to exclude internal planning docs. - Full technical documentation regenerated with pdoc.
141 lines
5.2 KiB
Python
141 lines
5.2 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
|
|
|
|
from . import remote_plugin_pb2 as remote__plugin__pb2
|
|
|
|
GRPC_GENERATED_VERSION = '1.80.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 remote_plugin_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 RemotePluginServiceStub(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def __init__(self, channel):
|
|
"""Constructor.
|
|
|
|
Args:
|
|
channel: A grpc.Channel.
|
|
"""
|
|
self.get_plugin_source = channel.unary_unary(
|
|
'/connpy_remote.RemotePluginService/get_plugin_source',
|
|
request_serializer=remote__plugin__pb2.IdRequest.SerializeToString,
|
|
response_deserializer=remote__plugin__pb2.StringResponse.FromString,
|
|
_registered_method=True)
|
|
self.invoke_plugin = channel.unary_stream(
|
|
'/connpy_remote.RemotePluginService/invoke_plugin',
|
|
request_serializer=remote__plugin__pb2.PluginInvokeRequest.SerializeToString,
|
|
response_deserializer=remote__plugin__pb2.OutputChunk.FromString,
|
|
_registered_method=True)
|
|
|
|
|
|
class RemotePluginServiceServicer(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
def get_plugin_source(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 invoke_plugin(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_RemotePluginServiceServicer_to_server(servicer, server):
|
|
rpc_method_handlers = {
|
|
'get_plugin_source': grpc.unary_unary_rpc_method_handler(
|
|
servicer.get_plugin_source,
|
|
request_deserializer=remote__plugin__pb2.IdRequest.FromString,
|
|
response_serializer=remote__plugin__pb2.StringResponse.SerializeToString,
|
|
),
|
|
'invoke_plugin': grpc.unary_stream_rpc_method_handler(
|
|
servicer.invoke_plugin,
|
|
request_deserializer=remote__plugin__pb2.PluginInvokeRequest.FromString,
|
|
response_serializer=remote__plugin__pb2.OutputChunk.SerializeToString,
|
|
),
|
|
}
|
|
generic_handler = grpc.method_handlers_generic_handler(
|
|
'connpy_remote.RemotePluginService', rpc_method_handlers)
|
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
server.add_registered_method_handlers('connpy_remote.RemotePluginService', rpc_method_handlers)
|
|
|
|
|
|
# This class is part of an EXPERIMENTAL API.
|
|
class RemotePluginService(object):
|
|
"""Missing associated documentation comment in .proto file."""
|
|
|
|
@staticmethod
|
|
def get_plugin_source(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,
|
|
'/connpy_remote.RemotePluginService/get_plugin_source',
|
|
remote__plugin__pb2.IdRequest.SerializeToString,
|
|
remote__plugin__pb2.StringResponse.FromString,
|
|
options,
|
|
channel_credentials,
|
|
insecure,
|
|
call_credentials,
|
|
compression,
|
|
wait_for_ready,
|
|
timeout,
|
|
metadata,
|
|
_registered_method=True)
|
|
|
|
@staticmethod
|
|
def invoke_plugin(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,
|
|
'/connpy_remote.RemotePluginService/invoke_plugin',
|
|
remote__plugin__pb2.PluginInvokeRequest.SerializeToString,
|
|
remote__plugin__pb2.OutputChunk.FromString,
|
|
options,
|
|
channel_credentials,
|
|
insecure,
|
|
call_credentials,
|
|
compression,
|
|
wait_for_ready,
|
|
timeout,
|
|
metadata,
|
|
_registered_method=True)
|