feat: Phase 1 — Native gRPC integration replacing CLI scraping#3
Draft
mafueee wants to merge 10 commits intofeat/multi-claw-managementfrom
Draft
feat: Phase 1 — Native gRPC integration replacing CLI scraping#3mafueee wants to merge 10 commits intofeat/multi-claw-managementfrom
mafueee wants to merge 10 commits intofeat/multi-claw-managementfrom
Conversation
…ssion gRPC wrappers\n\nExtend grpcClient.js with missing gRPC wrapper functions needed\nfor the full CLI-to-gRPC migration.
… runCli(), parseSandboxList(), listGateways() and all\nexecSync/child_process usage with gRPC-only operations via\ngrpcClient.js. getGateways() now uses checkConnection().
…PC\n\nSandbox creation uses createProvider -> setClusterInference -> createSandbox\n-> watchSandbox SSE streaming. Deletion uses deleteSandbox. Log streaming\nuses watchSandbox(followLogs). All child_process imports removed.\n\nAlso update grpc-client tests to cover new wrapper function exports.
Replace ALL execSync/spawn subprocess calls with native gRPC:
- Sandbox CRUD: gRPC only, no CLI fallback
- Log streaming: WatchSandbox replaces spawn('openshell logs')
- Chat: ExecSandbox replaces spawn('openshell sandbox connect')
- Onboard: createProvider + setClusterInference + createSandbox + watchSandbox
- Inference: getClusterInference/setClusterInference
- Providers: full CRUD routes
- Policy: updateConfig/getSandboxConfig
- Preflight: gRPC health + listProviders
- WebSocket: gRPC-only polling
…dpoints - Architecture section now emphasizes zero CLI subprocess calls - Native API Integration table lists all gRPC RPCs by operation - Dashboard Backend Components lists key server modules - Onboard Wizard, Agent Chat, and Log Viewer descriptions updated - Provider CRUD API endpoints added to Claw API table
- Server now explicitly binds to 0.0.0.0 instead of implicit localhost - Adds draft policy routes, image builder routes, and Docker gateway service - Adds DenialDashboard, CustomImageBuilder, and RoutingPanel components - Adds inference routing transparency endpoint - Updates PolicyEditor with YAML editor and OPA validation tabs - Updates client API with new endpoint types and interfaces - Updates App.tsx with new route entries for images and denials - Updates README with new API documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1: Native gRPC Integration
Replaces CLI-scraping (
execSync+ ANSI parsing) with direct gRPC/HTTP API calls to the OpenShell gateway. All API routes now use gRPC as the primary transport with automatic CLI fallback.New Modules
gui/server/lib/grpcClient.js— Core gRPC client with mTLS credential loading, connection pooling, and async methods for all gateway operations (sandbox CRUD, watch streams, providers, inference, policies, logs)gui/server/lib/gatewayHealth.js— Health monitoring via gRPC Health RPC and HTTP/readyzendpointRefactored Files
gui/server/services/clawManager.js—getLiveSandboxes(),getSandboxDetail(),listClaws(),getClaw(),syncWithOpenShell()are now async with gRPC-first queriesgui/server/routes/claws.js— All 8 route handlers updated to async/await, sandbox deletion uses gRPCDeleteSandbox, log streaming tries gRPCWatchSandboxbefore CLI fallbackgui/server/index.js—GET /api/sandboxes,GET /api/sandboxes/:name/status,GET /api/gateway/statusmigrated to gRPC; WebSocket polling loop upgraded to gRPC-firstProto Files
gui/server/proto/openshell.protogui/server/proto/datamodel.protogui/server/proto/inference.protogui/server/proto/sandbox.protoTests
test/grpc-client.test.js— 10 tests formapPhaseToStatus()andsandboxToDto()test/gateway-health.test.js— 5 tests forisGatewayConfigured()Architecture
~/.config/openshell/clusters/<name>/mtls/@grpc/proto-loader(dynamic loading, no codegen step)