You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a Python application developer,
I want a supported escape hatch to the generated gateway gRPC client and wire types,
so that I can use newly added OpenShell capabilities without waiting for every RPC to receive a curated Python wrapper.
Problem Statement
The Python SDK currently exposes curated sandbox, workspace, and inference-route operations, but keeps its generated OpenShellStub and protobuf modules under private attributes and the private openshell._proto package. Gateway operations such as Provider CRUD and credential rotation are therefore present in the installed wheel but do not have a supported public Python API.
This also causes API drift: adding an RPC to proto/openshell.proto does not make that operation publicly reachable in Python, while the TypeScript SDK already guarantees full gateway coverage through client.raw.
Impact / Why This Matters
Without this capability, Python applications must import private modules and access client._stub, shell out to the CLI, or wait for a curated wrapper. Private imports can break without notice and duplicate the SDK transport and authentication setup. Provider credential updates are one concrete blocked workflow, but the gap applies to every uncurated gateway RPC.
Proposed Design
Provide a documented advanced Python escape hatch equivalent in intent to the TypeScript SDK:
A public raw client on the authenticated SandboxClient that exposes every method generated for the OpenShell gateway service.
A public module containing the generated request and response modules needed to call it.
Preserve the curated SDK as the preferred interface; the raw layer returns protobuf messages verbatim and does not promise ergonomic wrappers.
Keep transport, TLS, and bearer-token handling shared with the existing client.
Acceptance Criteria
Every RPC in the generated OpenShell gateway service is callable through a supported public Python API.
Public imports provide the generated request and response types needed by those calls.
Raw calls reuse the existing client channel and its TLS/OIDC configuration.
A test detects if the public raw client drifts behind the service descriptor.
Documentation includes an uncurated Provider update example and explains timeout and lifecycle behavior.
Adding typed wrappers for all RPCs at once would create a large API-design and maintenance burden, particularly for internal supervisor and callback operations. Continuing to use _stub and _proto exposes private implementation details. A small public raw floor provides immediate parity while allowing curated clients to evolve deliberately.
Agent Investigation
Compared proto/openshell.proto with python/openshell/sandbox.py: the generated service contains substantially more RPCs than the curated Python client exposes.
Confirmed that generated protobuf and gRPC files are already packaged in the Python wheel under openshell._proto.
Confirmed the TypeScript SDK already documents and tests client.raw plus its public raw wire-type export.
User Story
As a Python application developer,
I want a supported escape hatch to the generated gateway gRPC client and wire types,
so that I can use newly added OpenShell capabilities without waiting for every RPC to receive a curated Python wrapper.
Problem Statement
The Python SDK currently exposes curated sandbox, workspace, and inference-route operations, but keeps its generated
OpenShellStuband protobuf modules under private attributes and the privateopenshell._protopackage. Gateway operations such as Provider CRUD and credential rotation are therefore present in the installed wheel but do not have a supported public Python API.This also causes API drift: adding an RPC to
proto/openshell.protodoes not make that operation publicly reachable in Python, while the TypeScript SDK already guarantees full gateway coverage throughclient.raw.Impact / Why This Matters
Without this capability, Python applications must import private modules and access
client._stub, shell out to the CLI, or wait for a curated wrapper. Private imports can break without notice and duplicate the SDK transport and authentication setup. Provider credential updates are one concrete blocked workflow, but the gap applies to every uncurated gateway RPC.Proposed Design
Provide a documented advanced Python escape hatch equivalent in intent to the TypeScript SDK:
SandboxClientthat exposes every method generated for the OpenShell gateway service.Acceptance Criteria
Alternatives Considered
Adding typed wrappers for all RPCs at once would create a large API-design and maintenance burden, particularly for internal supervisor and callback operations. Continuing to use
_stuband_protoexposes private implementation details. A small public raw floor provides immediate parity while allowing curated clients to evolve deliberately.Agent Investigation
proto/openshell.protowithpython/openshell/sandbox.py: the generated service contains substantially more RPCs than the curated Python client exposes.openshell._proto.client.rawplus its publicrawwire-type export.I am available to contribute a focused implementation of this design.
Checklist