File tree Expand file tree Collapse file tree 3 files changed +69
-0
lines changed
Expand file tree Collapse file tree 3 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2026 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ proto_library (
16+ name = "exec_service_proto" ,
17+ srcs = ["exec_service.proto" ],
18+ )
Original file line number Diff line number Diff line change 1+ A service to execute commands.
2+
3+ Intended to be run inside a sandbox, with a socket exposed.
4+ Connected from a MCP or built-in integration of a coding agent.
Original file line number Diff line number Diff line change 1+ // Copyright 2026 Google LLC
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.
14+
15+ syntax = "proto3" ;
16+
17+ package exec_service ;
18+
19+ // A simple command execution service.
20+ service ExecService {
21+ // Executes a command and streams the output until completion.
22+ rpc RunCommand (StartCommandRequest ) returns (stream ServerEvent );
23+ }
24+
25+ message StartCommandRequest {
26+ // The raw shell command to execute.
27+ string command_line = 1 ;
28+
29+ // The directory to execute the command in.
30+ string working_dir = 2 ;
31+ }
32+
33+ message ServerEvent {
34+ oneof event {
35+ // Incremental stdout/stderr from the command.
36+ bytes output = 1 ;
37+
38+ // Sent exactly once when the command finishes.
39+ ExitInfo exited = 2 ;
40+ }
41+ }
42+
43+ message ExitInfo {
44+ int32 exit_code = 1 ;
45+ // Populated only if the system failed to execute the command at all.
46+ string error_message = 2 ;
47+ }
You can’t perform that action at this time.
0 commit comments