Skip to content

Commit 4d696f3

Browse files
Garothhugelung
andauthored
PROTOBUS: gRPC over vscode message passing (RooCodeInc#2830)
* initial protobuf setup & rough domains * delete old protos for now * phase 1 * initial working demo * simplify call a bit more * remomve some comments * use common.proto * remove redundant browser-service layer, clean up naming * delete mcp proto for now * better client layout & easier service imports * a reflection-based way to create grpc services automatically * better code layout for grpc implementations * switch to auto-generating the method registration via bash * hook protobufs into package.json scripts * make service implementations more generic * warn user that they must install protoc deps * delete old message passing for getBrowserConnectionInfo * format fix * format fix * rewrite build-protos in node & update package.json * don't protoc during package * change how imports work based on feedback * package lock seems necessary now --------- Co-authored-by: Andrei Edell <[email protected]>
1 parent dd84bda commit 4d696f3

File tree

21 files changed

+1116
-120
lines changed

21 files changed

+1116
-120
lines changed

.changeset/late-mice-double.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": patch
3+
---
4+
5+
gRPC over vscode message bus to make messaging better

package-lock.json

Lines changed: 164 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@
290290
"watch:esbuild:test": "IS_TEST=true node esbuild.js --watch",
291291
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
292292
"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
293+
"protos": "node proto/build-proto.js && prettier src/shared/proto --write && prettier src/core/controller --write",
293294
"package:test": "IS_TEST=true npm run build:webview:test && npm run check-types && npm run lint && IS_TEST=true node esbuild.js --production",
294295
"build:webview:test": "cd webview-ui && IS_TEST=true npm run build",
295296
"watch:test": "IS_TEST=true npm-run-all -p watch:tsc watch:esbuild:test",
@@ -334,24 +335,29 @@
334335
"@vscode/test-cli": "^0.0.9",
335336
"@vscode/test-electron": "^2.4.0",
336337
"chai": "^4.3.10",
338+
"chalk": "^5.3.0",
337339
"esbuild": "^0.25.0",
338340
"eslint": "^8.57.0",
339341
"husky": "^9.1.7",
340342
"npm-run-all": "^4.1.5",
341343
"prettier": "^3.3.3",
344+
"protoc-gen-ts": "^0.8.7",
342345
"proxyquire": "^2.1.3",
343346
"should": "^13.2.3",
344347
"sinon": "^19.0.2",
345348
"ts-node": "^10.9.2",
349+
"ts-proto": "^2.6.1",
346350
"typescript": "^5.4.5"
347351
},
348352
"dependencies": {
349353
"@anthropic-ai/bedrock-sdk": "^0.12.4",
350354
"@anthropic-ai/sdk": "^0.37.0",
351355
"@anthropic-ai/vertex-sdk": "^0.6.4",
352356
"@aws-sdk/client-bedrock-runtime": "^3.758.0",
357+
"@bufbuild/protobuf": "^2.2.5",
353358
"@google-cloud/vertexai": "^1.9.3",
354359
"@google/generative-ai": "^0.18.0",
360+
"@grpc/grpc-js": "^1.9.15",
355361
"@mistralai/mistralai": "^1.5.0",
356362
"@modelcontextprotocol/sdk": "^1.7.0",
357363
"@opentelemetry/api": "^1.4.1",

proto/browser.proto

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
syntax = "proto3";
2+
3+
package cline;
4+
5+
import "common.proto";
6+
7+
service BrowserService {
8+
rpc getBrowserConnectionInfo(EmptyRequest) returns (BrowserConnectionInfo);
9+
}
10+
11+
message BrowserConnectionInfo {
12+
bool is_connected = 1;
13+
bool is_remote = 2;
14+
string host = 3; // Optional, may be empty
15+
}

0 commit comments

Comments
 (0)