@companyhelm/protos 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,15 +6,15 @@ import "buf/validate/validate.proto";
6
6
 
7
7
  // Transport contract between backend control plane and runner clients.
8
8
  // RegisterRunner performs a capability handshake; CommandChannel carries
9
- // asynchronous commands and updates correlated by command_id.
9
+ // asynchronous requests and updates correlated by request_id.
10
10
  service AgentRunnerControlService {
11
11
  // Called once when a runner connects so the server can decide whether this
12
- // runner instance is allowed to participate in command processing.
12
+ // runner instance is allowed to participate in request processing.
13
13
  rpc RegisterRunner(RegisterRunnerRequest) returns (RegisterRunnerResponse);
14
14
  // Bidirectional stream used for the lifecycle of a connected runner.
15
15
  // Server pushes work; runner pushes updates/results.
16
16
  // Client initiated requests should have their own rpc call.
17
- rpc CommandChannel(stream ClientMessage) returns (stream ServerMessage);
17
+ rpc ControlChannel(stream ClientMessage) returns (stream ServerMessage);
18
18
  // Runner-scoped list of GitHub App installations already associated with it.
19
19
  rpc ListGithubInstallationsForRunner(ListGithubInstallationsForRunnerRequest) returns (ListGithubInstallationsForRunnerResponse);
20
20
  // Mints a short-lived token for one installation so the runner can call
@@ -55,213 +55,169 @@ message RegisterRunnerResponse {
55
55
  }
56
56
 
57
57
  /************************************************/
58
- /* COMMAND PROTOCOL */
58
+ /* CONTROL CHANNEL PROTOCOL */
59
59
  /************************************************/
60
60
 
61
- // Messages sent from runner to server over CommandChannel.
61
+ // This is a response to a server request.
62
62
  message ClientMessage {
63
- // Correlates this update/result with the originating ServerMessage command.
64
- string command_id = 1 [(buf.validate.field).string.min_len = 1];
63
+ // not included for client generated updates
64
+ optional string request_id = 1;
65
65
  oneof payload {
66
- AgentCreatedUpdate agent_created_update = 2;
67
- AgentDeletedUpdate agent_deleted_update = 3;
68
- ThreadCreatedUpdate thread_created_update = 4;
69
- TurnStartedUpdate turn_started_update = 5;
70
- TurnCompletedUpdate turn_completed_update = 6;
71
- TurnSteeredUpdate turn_steered_update = 7;
72
- SkillMpInstalledUpdate skill_mp_installed_update = 8;
73
- CommandError command_error = 9;
66
+ RequestError request_error = 2;
67
+ AgentUpdate agent_update = 3;
68
+ ThreadUpdate thread_update = 4;
69
+ TurnUpdate turn_update = 5;
70
+ ItemUpdate item_update = 6;
71
+ SkillMpUpdate skill_mp_update = 7;
74
72
  }
75
73
  }
76
74
 
77
- // Messages sent from server to runner over CommandChannel.
78
- message ServerMessage {
79
- // Correlation key echoed by ClientMessage.command_id in runner responses.
80
- string command_id = 1 [(buf.validate.field).string.min_len = 1];
81
- oneof command {
82
- CreateAgentCommand create_agent_command = 2;
83
- DeleteAgentCommand delete_agent_command = 3;
84
- CreateThreadCommand create_thread_command = 4;
85
- CreateTurnCommand create_turn_command = 5;
86
- SteerTurnCommand steer_turn_command = 6;
87
- InstallSkillsMpCommand install_skillsmp_command = 7;
88
- }
75
+ message RequestError {
76
+ string error_message = 1 [(buf.validate.field).string.min_len = 1];
89
77
  }
90
78
 
91
- message CommandError {
92
- // Error message
93
- string message = 1 [(buf.validate.field).string.min_len = 1];
79
+ enum AgentStatus {
80
+ AGENT_STATUS_UNKNOWN = 0;
81
+ AGENT_STATUS_READY = 1;
82
+ AGENT_STATUS_DELETED = 2;
94
83
  }
95
84
 
96
- message CreateAgentCommand {
97
- // Agent identifier to create
85
+ message AgentUpdate {
98
86
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
99
- // SDK executor to use (for example codex/openai), chosen by control plane.
100
- string agent_sdk = 2 [(buf.validate.field).string.min_len = 1];
87
+ AgentStatus status = 2;
101
88
  }
102
89
 
103
- message AgentCreatedUpdate {
104
- AgentCreatedUpdateStatus status = 1;
105
- // Error message if the agent initialization failed
106
- optional string failure_message = 2;
90
+ enum ThreadStatus {
91
+ THREAD_STATUS_UNKNOWN = 0;
92
+ THREAD_STATUS_READY = 1;
93
+ THREAD_STATUS_DELETED = 2;
107
94
  }
108
95
 
109
- enum AgentCreatedUpdateStatus {
110
- AGENT_CREATED_UPDATE_STATUS_UNKNOWN = 0;
111
- AGENT_CREATED_UPDATE_STATUS_SUCCESS = 1;
112
- AGENT_CREATED_UPDATE_STATUS_FAILED = 2;
96
+ message ThreadUpdate {
97
+ string thread_id = 1 [(buf.validate.field).string.min_len = 1];
98
+ ThreadStatus status = 2;
113
99
  }
114
100
 
115
- message DeleteAgentCommand {
116
- // Agent identifier to delete
117
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
101
+ enum TurnStatus {
102
+ TURN_STATUS_UNKNOWN = 0;
103
+ TURN_STATUS_RUNNING = 1;
104
+ TURN_STATUS_COMPLETED = 2;
118
105
  }
119
106
 
120
- message AgentDeletedUpdate {
121
- // Agent identifier that was deleted
122
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
123
- // Status of the agent deletion
124
- AgentDeletedUpdateStatus status = 2;
125
- // Error message if the agent deletion failed
126
- optional string failure_message = 3;
107
+ message TurnUpdate {
108
+ string sdk_turn_id = 1 [(buf.validate.field).string.min_len = 1];
109
+ TurnStatus status = 2;
127
110
  }
128
111
 
129
- enum AgentDeletedUpdateStatus {
130
- AGENT_DELETED_UPDATE_STATUS_UNKNOWN = 0;
131
- AGENT_DELETED_UPDATE_STATUS_SUCCESS = 1;
132
- AGENT_DELETED_UPDATE_STATUS_FAILED = 2;
112
+ enum ItemStatus {
113
+ ITEM_STATUS_UNKNOWN = 0;
114
+ ITEM_STATUS_RUNNING = 1;
115
+ ITEM_STATUS_COMPLETED = 2;
133
116
  }
134
117
 
135
- message CreateThreadCommand {
136
- // Agent identifier to create the thread for
137
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
138
- // LLM model to use for the thread
139
- string model = 2 [(buf.validate.field).string.min_len = 1];
140
- // Optional, reasoning level to use for the thread
141
- optional string reasoning_level = 3;
118
+ message ItemUpdate {
119
+ string sdk_item_id = 1 [(buf.validate.field).string.min_len = 1];
120
+ ItemStatus status = 2;
121
+ // Item type that was started
122
+ ItemType item_type = 5;
123
+ // text of the itme
124
+ optional string text = 6;
125
+ // Command execution item, if type is COMMAND_EXECUTION
126
+ optional CommandExecutionItem command_execution_item = 7;
142
127
  }
143
128
 
144
- message ThreadCreatedUpdate {
145
- // Agent identifier that the thread was created for
146
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
147
- // Thread identifier that was created provider specific
148
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
129
+ message CommandExecutionItem {
130
+ string command = 1 [(buf.validate.field).string.min_len = 1];
131
+ string cwd = 2 [(buf.validate.field).string.min_len = 1];
132
+ string process_id = 3 [(buf.validate.field).string.min_len = 1];
133
+ optional string output = 4;
149
134
  }
150
135
 
151
- message CreateTurnCommand {
152
- // Agent identifier that the turn was created for
153
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
154
- // Thread identifier that the turn was created for provider specific
155
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
156
- // Text to send to the turn
157
- string text = 3 [(buf.validate.field).string.min_len = 1];
158
- // Model identifier passed to the selected SDK for message execution.
159
- string model = 4 [(buf.validate.field).string.min_len = 1];
160
- // Reasoning profile consumed by SDK-specific adapters when supported.
161
- optional string model_reasoning_level = 5;
136
+ enum ItemType {
137
+ ITEM_TYPE_UNKNOWN = 0;
138
+ USER_MESSAGE = 1;
139
+ AGENT_MESSAGE = 2;
140
+ REASONING = 4;
141
+ COMMAND_EXECUTION = 5;
162
142
  }
163
143
 
164
- message TurnStartedUpdate {
165
- // Agent identifier that the turn was created for
166
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
167
- // Thread identifier that the turn was created for
168
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
169
- // Turn identifier that was created
170
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
144
+ enum SkillMpStatus {
145
+ SKILL_MP_STATUS_UNKNOWN = 0;
146
+ SKILL_MP_STATUS_INSTALLED = 1;
147
+ SKILL_MP_STATUS_DELETED = 2;
171
148
  }
172
149
 
173
- message TurnCompletedUpdate {
174
- // Agent identifier that the turn was completed for
150
+ message SkillMpUpdate {
151
+ // Agent receiving the installation result.
175
152
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
176
- // Thread identifier that the turn was completed for
177
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
178
- // Turn identifier that was completed
179
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
153
+ SkillMpStatus status = 2;
154
+ // Skill identifier this update belongs to.
155
+ string package_name = 3 [(buf.validate.field).string.min_len = 1];
180
156
  }
181
157
 
182
- message SteerTurnCommand {
183
- // Agent identifier that the turn was created for
184
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
185
- // Thread identifier that the turn was created for
186
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
187
- // Turn identifier that was created
188
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
189
- // Message to send to the turn
190
- string message = 4 [(buf.validate.field).string.min_len = 1];
158
+ // Messages sent from server to runner over ControlChannel.
159
+ message ServerMessage {
160
+ oneof request {
161
+ CreateAgentRequest create_agent_request = 2;
162
+ DeleteAgentRequest delete_agent_request = 3;
163
+ CreateThreadRequest create_thread_request = 4;
164
+ DeleteThreadRequest delete_thread_request = 5;
165
+ CreateUserMessageRequest create_user_message_request = 6;
166
+ InstallSkillsMpRequest install_skills_mp_request = 7;
167
+ }
191
168
  }
192
169
 
193
- message TurnSteeredUpdate {
194
- // Agent identifier that the turn was created for
170
+ message CreateAgentRequest {
171
+ // Agent identifier to create
195
172
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
196
- // Thread identifier that the turn was created for
197
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
198
- // Turn identifier that was created
199
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
173
+ // SDK executor to use (for example codex/openai), chosen by control plane.
174
+ string agent_sdk = 2 [(buf.validate.field).string.min_len = 1];
200
175
  }
201
176
 
202
- message ItemStartedUpdate {
203
- // Agent identifier that the item was started for
177
+ message DeleteAgentRequest {
178
+ // Agent identifier to delete
204
179
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
205
- // Thread identifier that the item was started for
206
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
207
- // Turn identifier that the item was started for
208
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
209
- // Item identifier that was started
210
- string provider_item_id = 4 [(buf.validate.field).string.min_len = 1];
211
- // Item type that was started
212
- ItemType item_type = 5;
213
- // message that was started
214
- optional string text = 6;
215
- // Command execution item that was started, if type is COMMAND_EXECUTION
216
- optional CommandExecutionItem command_execution_item = 7;
217
180
  }
218
181
 
219
- message ItemCompletedUpdate {
220
- // Agent identifier that the item was completed for
182
+ message CreateThreadRequest {
183
+ // Agent identifier to create the thread for
221
184
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
222
- // Thread identifier that the item was completed for
223
- string provider_thread_id = 2 [(buf.validate.field).string.min_len = 1];
224
- // Turn identifier that the item was completed for
225
- string provider_turn_id = 3 [(buf.validate.field).string.min_len = 1];
226
- // Item identifier that was completed
227
- string provider_item_id = 4 [(buf.validate.field).string.min_len = 1];
228
- // Item type that was completed
229
- ItemType item_type = 5;
230
- // message that was completed
231
- optional string text = 6;
232
- // Command execution item that was completed, if type is COMMAND_EXECUTION
233
- optional CommandExecutionItem command_execution_item = 7;
185
+ // LLM model to use for the thread
186
+ string model = 2 [(buf.validate.field).string.min_len = 1];
187
+ // Optional, reasoning level to use for the thread
188
+ optional string reasoning_level = 3;
234
189
  }
235
190
 
236
- message CommandExecutionItem {
237
- string command = 1 [(buf.validate.field).string.min_len = 1];
238
- string cwd = 2 [(buf.validate.field).string.min_len = 1];
239
- string process_id = 3 [(buf.validate.field).string.min_len = 1];
240
- optional string output = 4;
191
+ message DeleteThreadRequest {
192
+ string agent_id = 1 [(buf.validate.field).string.min_len = 1];
193
+ // Thread identifier to delete
194
+ string thread_id = 2 [(buf.validate.field).string.min_len = 1];
241
195
  }
242
196
 
243
- enum ItemType {
244
- ITEM_TYPE_UNKNOWN = 0;
245
- USER_MESSAGE = 1;
246
- AGENT_MESSAGE = 2;
247
- REASONING = 4;
248
- COMMAND_EXECUTION = 5;
197
+ message CreateUserMessageRequest {
198
+ // Agent identifier that the turn was created for
199
+ string agent_id = 1 [(buf.validate.field).string.min_len = 1];
200
+ // Thread identifier
201
+ string thread_id = 2 [(buf.validate.field).string.min_len = 1];
202
+ // Text to send to the turn
203
+ string text = 3 [(buf.validate.field).string.min_len = 1];
204
+ // Whether to allow the current running turn to be steered
205
+ // If there are is a running turn and allows_steer is false the request will be rejected.
206
+ bool allow_steer = 6;
207
+ // Model identifier passed to the selected SDK for message execution.
208
+ optional string model = 4;
209
+ // Reasoning profile consumed by SDK-specific adapters when supported.
210
+ optional string model_reasoning_level = 5;
249
211
  }
250
212
 
251
- message InstallSkillsMpCommand {
213
+
214
+ message InstallSkillsMpRequest {
252
215
  // Agent receiving the new skill package.
253
216
  string agent_id = 1 [(buf.validate.field).string.min_len = 1];
254
217
  // Package coordinate the runner installer resolves/downloads.
255
218
  string package_name = 2 [(buf.validate.field).string.min_len = 1];
256
219
  }
257
220
 
258
- message SkillMpInstalledUpdate {
259
- // Agent receiving the installation result.
260
- string agent_id = 1 [(buf.validate.field).string.min_len = 1];
261
- // Skill identifier this update belongs to.
262
- string package_name = 2 [(buf.validate.field).string.min_len = 1];
263
- }
264
-
265
221
  /************************************************/
266
222
  /* GITHUB INSTALLATION PROTOCOL */
267
223
  /************************************************/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companyhelm/protos",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Buf-generated JavaScript bindings for CompanyHelm protobuf definitions.",
5
5
  "repository": {
6
6
  "type": "git",