pyvider 2025-01-18
Major rpcplugin API rename from `GRPC*` to `RPC*` prefix across all classes and
45 files · 8,585+ · 562-

GRPC -> RPC Class Rename

36 files changed
  • __init__.py Updated __init__.py (+12/-8 lines)
  • client.py Updated client.py (+126/-156 lines)
  • interface.go Updated interface.go (+2/-2 lines)
  • main.go Updated main.go (+1/-1 lines)
  • main.go Updated main.go (+1/-1 lines)
  • py-client.py Added py-client.py (+153 lines)
  • grpc.go Updated grpc.go (+2/-2 lines)
  • interface.go Updated interface.go (+4/-4 lines)
  • exception.py Updated exception.py (+5/-5 lines)
  • protocol.py Updated protocol.py (+2/-2 lines)
  • server.py Updated server.py (+14/-7 lines)
  • test_server.py Updated test_server.py (+14/-13 lines)
  • run_server.py Updated run_server.py (+6/-6 lines)
  • run_tcp_server.py Updated run_tcp_server.py (+4/-4 lines)
  • run_unix_server.py Updated run_unix_server.py (+4/-4 lines)
  • test_client.py Updated test_client.py (+16/-33 lines)
  • log.md Added log.md (+11 lines)
  • bundle-go-cty-docs.txt Added bundle-go-cty-docs.txt (+1653 lines)
  • bundle-go-plugin-2025-01-18.txt Added bundle-go-plugin-2025-01-18.txt (+5779 lines)
  • README.md Updated README.md (+14/-1 lines)
  • 2025-01-18-1207-chatgpt-rpcplugin.txt Added 2025-01-18-1207-chatgpt-rpcplugin.txt (+114 lines)
  • 2025-01-19-1108-claude.md Added 2025-01-19-1108-claude.md (+18 lines)
  • basic Updated basic (+0/-0 lines)
  • counter Updated counter (+0/-0 lines)
  • counter-go-grpc Updated counter-go-grpc (+0/-0 lines)
  • handshake.py Updated handshake.py (+4/-3 lines)
  • go-client-get.txt Added go-client-get.txt (+137 lines)
  • go-client-put.txt Added go-client-put.txt (+136 lines)
  • rpcplugin.sublime-project Added rpcplugin.sublime-project (+8 lines)
  • conftest.py Updated conftest.py (+9/-113 lines)
  • create_test_certs.sh Updated create_test_certs.sh (+2/-2 lines)
  • test_client_grpc.py Updated test_client_grpc.py (+3/-3 lines)
  • test_handshake_magic_cookie.py Updated test_handshake_magic_cookie.py (+1/-1 lines)
  • x_test_minimal.py Updated x_test_minimal.py (+4/-4 lines)
  • tcp.py Updated tcp.py (+6/-6 lines)
  • unix.py Updated unix.py (+5/-5 lines)
  • Renamed GRPCPluginClient to RPCPluginClient in client.py decouple internal
    3 files
    • client.py
    • py-client.py
    • test_client.py
  • Renamed GRPCPluginServer to RPCPluginServer in server.py decouple internal
    5 files
    • server.py
    • test_server.py
    • run_server.py
    • run_tcp_server.py
    • run_unix_server.py
  • Renamed GRPCPluginError to RPCPluginError in exception.py along with all subclasses inheriting from it decouple internal
    1 file
    • exception.py
  • Renamed PluginProtocol to RPCPluginProtocol in protocol.py decouple internal
    1 file
    • protocol.py
  • Updated __init__.py exports to use new RPC* names and added RPCPluginConfig interface internal
    1 file
    • __init__.py
  • Updated all Go example files (plugin-go-client/main.go, plugin-go-server/main.go, shared/interface.go) to reference KVRPCPlugin instead of KVGRPCPlugin interface internal
    4 files
    • interface.go
    • main.go
    • main.go
    • interface.go

RPCPluginConfig

1 file changed
  • config.py Added config.py (+85 lines)
  • Added new config.py module with RPCPluginConfig class for centralized environment variable validation baseline internal
    1 file
    • config.py
  • Validates required env vars: PLUGIN_MAGIC_COOKIE_KEY, PLUGIN_MAGIC_COOKIE, PLUGIN_PROTOCOL_VERSIONS, PLUGIN_TRANSPORTS, PLUGIN_AUTO_MTLS baseline internal
    42 files
    • __init__.py
    • client.py
    • config.py
    • README.md
    • 2025-01-18-1207-chatgpt-rpcplugin.txt
    • 2025-01-19-1108-claude.md
    • basic
    • counter
    • counter-go-grpc
    • interface.go
    • main.go
    • comments.md
    • env.sh
    • go-kv-example-log.txt
    • main.go
    • main.go
    • py-client.py
    • grpc.go
    • interface.go
    • test_basic.py
    • test_kv_impl_1638.py
    • test_kv_integration.py
    • exception.py
    • handshake.py
    • go-client-get.txt
    • go-client-put.txt
    • protocol.py
    • rpcplugin.sublime-project
    • security.py
    • server.py
    • test_server.py
    • conftest.py
    • create_test_certs.sh
    • run_server.py
    • run_tcp_server.py
    • run_unix_server.py
    • test_client.py
    • test_client_grpc.py
    • test_handshake_magic_cookie.py
    • x_test_minimal.py
    • tcp.py
    • unix.py
  • Includes parsing logic for protocol versions (comma-separated integers) and transport types interface internal
    42 files
    • __init__.py
    • client.py
    • config.py
    • README.md
    • 2025-01-18-1207-chatgpt-rpcplugin.txt
    • 2025-01-19-1108-claude.md
    • basic
    • counter
    • counter-go-grpc
    • interface.go
    • main.go
    • comments.md
    • env.sh
    • go-kv-example-log.txt
    • main.go
    • main.go
    • py-client.py
    • grpc.go
    • interface.go
    • test_basic.py
    • test_kv_impl_1638.py
    • test_kv_integration.py
    • exception.py
    • handshake.py
    • go-client-get.txt
    • go-client-put.txt
    • protocol.py
    • rpcplugin.sublime-project
    • security.py
    • server.py
    • test_server.py
    • conftest.py
    • create_test_certs.sh
    • run_server.py
    • run_tcp_server.py
    • run_unix_server.py
    • test_client.py
    • test_client_grpc.py
    • test_handshake_magic_cookie.py
    • x_test_minimal.py
    • tcp.py
    • unix.py

Client STDERR Relay and Channel Creation

1 file changed
  • grpc.ssl_channel_credentials Updated grpc.ssl_channel_credentials
  • Replaced async _relay_stderr with a synchronous threading-based approach using threading.Thread(daemon=True) to read plugin STDERR interface internal
    1 file
    • client.py
  • Simplified _create_grpc_channel to use grpc.ssl_channel_credentials directly with server cert as root, removing the old SSLContext-based approach and multiple dead code variants (X1843_create_grpc_channel, X1823_create_grpc_channel) deprecate internal
    1 file
    • grpc.ssl_channel_credentials
  • Added Unix socket endpoint formatting (unix: prefix) and channel options for hostname override interface errata
    1 file
    • client.py
  • Changed error handling to raise HandshakeError instead of generic exceptions throughout client lifecycle methods remediate internal
    2 files
    • README.md
    • priming.md

Security Module Reorganization

1 file changed
  • security.py Updated security.py (+211/-158 lines)
  • Moved generate_rsa_keypair, create_self_signed_x509_certificate, and create_ssl_server_credentials to the bottom of security.py for better organization decouple internal
    1 file
    • security.py
  • Removed duplicate imports (base64, x509, serialization) decouple internal
    1 file
    • security.py
  • Added normalize_pem to client imports for PEM certificate normalization during handshake harden internal
    1 file
    • security.py

Handshake and Logging

1 file changed
  • logger.debug Updated logger.debug
  • Changed verbose logger.debug calls to logger.trace(999, ...) for handshake response content (effectively silencing them) decouple behavioral
    1 file
    • logger.debug
  • Updated log messages to use more descriptive emoji prefixes (e.g., transport-related logs use train emoji) decouple behavioral
    2 files
    • log.md
    • handshake.py

Python Client Example

7 files changed
  • main.go Updated main.go (+1/-1 lines)
  • comments.md Updated comments.md (+1/-1 lines)
  • env.sh Updated env.sh (+1/-1 lines)
  • go-kv-example-log.txt Added go-kv-example-log.txt (+1 lines)
  • test_basic.py Updated test_basic.py (+5/-5 lines)
  • test_kv_impl_1638.py Updated test_kv_impl_1638.py (+6/-6 lines)
  • test_kv_integration.py Updated test_kv_integration.py (+4/-4 lines)
  • Added src/pyvider/rpcplugin/examples/grpc/py-client.py (148 lines) as a Python-based gRPC client example interface internal
    1 file
    • py-client.py