monarchic-agent-protocol 0.1.15 → 0.1.17
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.
- checksums.yaml +4 -4
- data/README.md +374 -51
- data/schemas/v1/agent_role.json +4 -1
- data/schemas/v1/artifact.json +18 -0
- data/schemas/v1/dataset_ref.json +2 -13
- data/schemas/v1/eval_result.json +1 -5
- data/schemas/v1/event.json +15 -42
- data/schemas/v1/execution_receipt.json +69 -0
- data/schemas/v1/experiment_spec.json +3 -16
- data/schemas/v1/failure_class.json +46 -0
- data/schemas/v1/failure_detail.json +33 -0
- data/schemas/v1/gate_result.json +16 -16
- data/schemas/v1/google.protobuf.Struct.schema.json +7 -0
- data/schemas/v1/monarchic.agent_protocol.v1.DatasetRef.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.EvalResult.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.ExperimentSpec.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.ObjectiveSpec.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.RunContext.schema.json +9 -0
- data/schemas/v1/monarchic_agent_protocol.proto +1205 -16
- data/schemas/v1/objective_spec.json +4 -15
- data/schemas/v1/plan.json +55 -0
- data/schemas/v1/plan_provenance.json +25 -0
- data/schemas/v1/plan_status.json +17 -0
- data/schemas/v1/plan_step.json +31 -0
- data/schemas/v1/provenance.json +1 -8
- data/schemas/v1/role_provenance.json +22 -0
- data/schemas/v1/schema.json +54 -6
- data/schemas/v1/task.json +42 -27
- data/src/ruby/monarchic_agent_protocol_pb.rb +116 -2
- metadata +16 -3
- data/schemas/v1/delivery_contract.json +0 -78
|
@@ -22,6 +22,9 @@ enum AgentRole {
|
|
|
22
22
|
REVIEWER = 5;
|
|
23
23
|
SECURITY = 6;
|
|
24
24
|
OPS = 7;
|
|
25
|
+
PUBLISHER = 8;
|
|
26
|
+
RESEARCHER = 9;
|
|
27
|
+
VERIFICATION = 10;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
enum OutcomeDecision {
|
|
@@ -65,20 +68,6 @@ message ExperimentSpec {
|
|
|
65
68
|
google.protobuf.Struct extensions = 9;
|
|
66
69
|
}
|
|
67
70
|
|
|
68
|
-
message DeliveryContract {
|
|
69
|
-
string objective = 1;
|
|
70
|
-
repeated string definition_of_done = 2;
|
|
71
|
-
repeated string required_checks = 3;
|
|
72
|
-
string risk_tier = 4;
|
|
73
|
-
optional uint32 max_cycle_minutes = 5;
|
|
74
|
-
optional uint32 max_agent_turns = 6;
|
|
75
|
-
optional string pr_strategy = 7;
|
|
76
|
-
optional string review_policy = 8;
|
|
77
|
-
optional string rollback_strategy = 9;
|
|
78
|
-
optional string notes = 10;
|
|
79
|
-
google.protobuf.Struct extensions = 11;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
71
|
message ObjectiveSpec {
|
|
83
72
|
string metric_key = 1;
|
|
84
73
|
string direction = 2;
|
|
@@ -104,6 +93,17 @@ message EvalResult {
|
|
|
104
93
|
google.protobuf.Struct extensions = 9;
|
|
105
94
|
}
|
|
106
95
|
|
|
96
|
+
message FailureClass {
|
|
97
|
+
string category = 1;
|
|
98
|
+
string code = 2;
|
|
99
|
+
bool retryable = 3;
|
|
100
|
+
optional string detail = 4;
|
|
101
|
+
optional string scope = 5;
|
|
102
|
+
optional string source = 6;
|
|
103
|
+
optional string next_action = 7;
|
|
104
|
+
google.protobuf.Struct extensions = 8;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
107
|
message Provenance {
|
|
108
108
|
string prompt_sha256 = 1;
|
|
109
109
|
string code_sha256 = 2;
|
|
@@ -121,9 +121,624 @@ message Provenance {
|
|
|
121
121
|
google.protobuf.Struct extensions = 14;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
+
enum IntentClass {
|
|
125
|
+
INTENT_CLASS_UNSPECIFIED = 0;
|
|
126
|
+
INTENT_CLASS_INSPECT = 1;
|
|
127
|
+
INTENT_CLASS_VALIDATE = 2;
|
|
128
|
+
INTENT_CLASS_EXECUTE = 3;
|
|
129
|
+
INTENT_CLASS_VERIFY = 4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
message Intent {
|
|
133
|
+
string intent_id = 1;
|
|
134
|
+
uint64 submitted_at = 2;
|
|
135
|
+
string submitter = 3;
|
|
136
|
+
string policy_version = 4;
|
|
137
|
+
string target_repo = 5;
|
|
138
|
+
string target_ref = 6;
|
|
139
|
+
string goal = 7;
|
|
140
|
+
google.protobuf.Struct constraints = 8;
|
|
141
|
+
string context_digest = 9;
|
|
142
|
+
IntentClass intent_class = 10;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message BootstrapIntent {
|
|
146
|
+
string contract_version = 1;
|
|
147
|
+
string bootstrap_intent_id = 2;
|
|
148
|
+
string project_key = 3;
|
|
149
|
+
repeated string target_repos = 4;
|
|
150
|
+
optional string pipeline_template_id = 5;
|
|
151
|
+
string campaign_goal = 6;
|
|
152
|
+
optional string notes = 7;
|
|
153
|
+
string priority_profile = 8;
|
|
154
|
+
uint64 created_at_ms = 9;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
message AgentRunnerPreference {
|
|
158
|
+
string runner_id = 1;
|
|
159
|
+
optional string model = 2;
|
|
160
|
+
optional string provider = 3;
|
|
161
|
+
optional string reasoning_effort = 4;
|
|
162
|
+
repeated string required_capabilities = 5;
|
|
163
|
+
repeated string labels = 6;
|
|
164
|
+
google.protobuf.Struct extensions = 7;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
message AgentRunnerPolicy {
|
|
168
|
+
string runner_policy_id = 1;
|
|
169
|
+
string display_name = 2;
|
|
170
|
+
optional string description = 3;
|
|
171
|
+
repeated AgentRunnerPreference runner_preferences = 4;
|
|
172
|
+
repeated string role_ids = 5;
|
|
173
|
+
google.protobuf.Struct extensions = 6;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
message AgentProfile {
|
|
177
|
+
string agent_id = 1;
|
|
178
|
+
string role_id = 2;
|
|
179
|
+
string display_name = 3;
|
|
180
|
+
optional string description = 4;
|
|
181
|
+
repeated AgentRunnerPreference runner_preferences = 5;
|
|
182
|
+
repeated string allowed_network_modes = 6;
|
|
183
|
+
bool requires_human_review = 7;
|
|
184
|
+
repeated string required_skill_ids = 8;
|
|
185
|
+
repeated string required_mcp_ids = 9;
|
|
186
|
+
google.protobuf.Struct extensions = 10;
|
|
187
|
+
optional string runner_policy_id = 11;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
message ResolvedAgentRunner {
|
|
191
|
+
string runner_id = 1;
|
|
192
|
+
optional string model = 2;
|
|
193
|
+
optional string provider = 3;
|
|
194
|
+
optional string reasoning_effort = 4;
|
|
195
|
+
uint32 preference_index = 5;
|
|
196
|
+
optional string selection_reason = 6;
|
|
197
|
+
google.protobuf.Struct extensions = 7;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
message BootstrapPlanTask {
|
|
201
|
+
string task_id = 1;
|
|
202
|
+
string display_name = 2;
|
|
203
|
+
string role_id = 3;
|
|
204
|
+
string task_milestone = 4;
|
|
205
|
+
repeated string depends_on = 5;
|
|
206
|
+
optional string target_repo = 6;
|
|
207
|
+
repeated string required_skill_ids = 7;
|
|
208
|
+
repeated string required_mcp_ids = 8;
|
|
209
|
+
optional string interaction_mode = 9;
|
|
210
|
+
optional string network_mode = 10;
|
|
211
|
+
optional bool requires_human_review = 11;
|
|
212
|
+
google.protobuf.Struct filesystem_policy = 12;
|
|
213
|
+
optional string template_slot_id = 13;
|
|
214
|
+
optional string notes = 14;
|
|
215
|
+
optional string agent_id = 15;
|
|
216
|
+
optional string injected_by_role_id = 16;
|
|
217
|
+
repeated AgentRunnerPreference runner_preferences = 17;
|
|
218
|
+
optional ResolvedAgentRunner resolved_runner = 18;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
enum BootstrapPlanningMode {
|
|
222
|
+
BOOTSTRAP_PLANNING_MODE_UNSPECIFIED = 0;
|
|
223
|
+
BOOTSTRAP_PLANNING_MODE_DIRECT_TEMPLATE_FILL = 1;
|
|
224
|
+
BOOTSTRAP_PLANNING_MODE_BOUNDED_RESEARCH_REPLAN = 2;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
message BootstrapPlan {
|
|
228
|
+
string contract_version = 1;
|
|
229
|
+
string bootstrap_plan_id = 2;
|
|
230
|
+
string bootstrap_intent_id = 3;
|
|
231
|
+
string project_key = 4;
|
|
232
|
+
BootstrapPlanningMode planning_mode = 5;
|
|
233
|
+
optional string pipeline_template_id = 6;
|
|
234
|
+
string campaign_goal = 7;
|
|
235
|
+
uint64 created_at_ms = 8;
|
|
236
|
+
repeated BootstrapPlanTask tasks = 9;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
message BootstrapFilesystemPolicy {
|
|
240
|
+
repeated string read = 1;
|
|
241
|
+
repeated string write = 2;
|
|
242
|
+
repeated string execute = 3;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
message BootstrapSkillBinding {
|
|
246
|
+
string id = 1;
|
|
247
|
+
bool required = 2;
|
|
248
|
+
string purpose = 3;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
message BootstrapTemplateSlotContext {
|
|
252
|
+
string slot_id = 1;
|
|
253
|
+
string display_name = 2;
|
|
254
|
+
string role = 3;
|
|
255
|
+
string interaction_mode = 4;
|
|
256
|
+
string network_mode = 5;
|
|
257
|
+
bool requires_human_review = 6;
|
|
258
|
+
BootstrapFilesystemPolicy filesystem_policy = 7;
|
|
259
|
+
repeated BootstrapSkillBinding required_skills = 8;
|
|
260
|
+
repeated string required_mcps = 9;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
message BootstrapTemplateConnectionContext {
|
|
264
|
+
string from_slot_id = 1;
|
|
265
|
+
string to_slot_id = 2;
|
|
266
|
+
string kind = 3;
|
|
267
|
+
bool required = 4;
|
|
268
|
+
optional string description = 5;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
message BootstrapTemplateLaneContext {
|
|
272
|
+
string lane_id = 1;
|
|
273
|
+
string display_name = 2;
|
|
274
|
+
string from_slot_id = 3;
|
|
275
|
+
string to_slot_id = 4;
|
|
276
|
+
repeated string slot_ids = 5;
|
|
277
|
+
bool repeat_per_task_group = 6;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
message BootstrapTemplateContext {
|
|
281
|
+
string template_id = 1;
|
|
282
|
+
string display_name = 2;
|
|
283
|
+
repeated BootstrapTemplateSlotContext slots = 3;
|
|
284
|
+
repeated BootstrapTemplateConnectionContext connections = 4;
|
|
285
|
+
repeated BootstrapTemplateLaneContext lanes = 5;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
message AgentCommand {
|
|
289
|
+
string runner_id = 1;
|
|
290
|
+
repeated string argv = 2;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
message BootstrapPlanningContext {
|
|
294
|
+
string contract_version = 1;
|
|
295
|
+
string project_key = 2;
|
|
296
|
+
string target_repo = 3;
|
|
297
|
+
repeated string target_repos = 4;
|
|
298
|
+
string campaign_goal = 5;
|
|
299
|
+
optional string notes = 6;
|
|
300
|
+
string priority_profile = 7;
|
|
301
|
+
repeated string codex_cmd = 8 [deprecated = true];
|
|
302
|
+
repeated string available_skill_ids = 9;
|
|
303
|
+
optional BootstrapTemplateContext selected_template = 10;
|
|
304
|
+
BootstrapPlanningMode planning_mode = 11;
|
|
305
|
+
repeated string enabled_role_ids = 12;
|
|
306
|
+
repeated AgentCommand agent_cmds = 13;
|
|
307
|
+
repeated string default_agent_cmd = 14;
|
|
308
|
+
repeated AgentProfile agent_profiles = 15;
|
|
309
|
+
repeated RunnerCapabilities available_runners = 16;
|
|
310
|
+
repeated AgentRunnerPolicy runner_policies = 17;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
enum CampaignPipelineConnectionKind {
|
|
314
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_UNSPECIFIED = 0;
|
|
315
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_DEPENDS_ON = 1;
|
|
316
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_HANDOFF = 2;
|
|
317
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_REVIEW = 3;
|
|
318
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_MESSAGE_ROUTE = 4;
|
|
319
|
+
CAMPAIGN_PIPELINE_CONNECTION_KIND_ARTIFACT_FLOW = 5;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
message CampaignPipelineTaskRef {
|
|
323
|
+
string task_id = 1;
|
|
324
|
+
string task_artifact = 2;
|
|
325
|
+
optional string role_id = 3;
|
|
326
|
+
optional string task_milestone = 4;
|
|
327
|
+
optional string task_format = 5;
|
|
328
|
+
repeated string depends_on = 6;
|
|
329
|
+
repeated string runner_args = 7;
|
|
330
|
+
optional string interaction_mode = 8;
|
|
331
|
+
optional string network_mode = 9;
|
|
332
|
+
bool requires_human_review = 10;
|
|
333
|
+
BootstrapFilesystemPolicy filesystem_policy = 11;
|
|
334
|
+
repeated BootstrapSkillBinding required_skills = 12;
|
|
335
|
+
repeated string required_mcp_ids = 13;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
message CampaignPipelineConnection {
|
|
339
|
+
string from_task_id = 1;
|
|
340
|
+
string to_task_id = 2;
|
|
341
|
+
CampaignPipelineConnectionKind kind = 3;
|
|
342
|
+
bool required = 4;
|
|
343
|
+
optional string description = 5;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
message CampaignPipelineGate {
|
|
347
|
+
string name = 1;
|
|
348
|
+
repeated string command = 2;
|
|
349
|
+
optional string workdir = 3;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
message CampaignPipelineGatePolicy {
|
|
353
|
+
bool require_standard = 1;
|
|
354
|
+
repeated CampaignPipelineGate required_gates = 2;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
message CampaignPipelineSpec {
|
|
358
|
+
string contract_version = 1;
|
|
359
|
+
string pipeline_id = 2;
|
|
360
|
+
string version = 3;
|
|
361
|
+
optional string objective = 4;
|
|
362
|
+
optional string project_key = 5;
|
|
363
|
+
bool continue_on_error = 6;
|
|
364
|
+
optional CampaignPipelineGatePolicy gate_policy = 7;
|
|
365
|
+
google.protobuf.Struct metadata = 8;
|
|
366
|
+
repeated CampaignPipelineConnection connections = 9;
|
|
367
|
+
repeated CampaignPipelineTaskRef tasks = 10;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
enum PlanStatus {
|
|
371
|
+
PLAN_STATUS_UNSPECIFIED = 0;
|
|
372
|
+
DRAFT = 1;
|
|
373
|
+
PLANNED = 2;
|
|
374
|
+
EXECUTING = 3;
|
|
375
|
+
COMPLETE = 4;
|
|
376
|
+
BOUNDED = 5;
|
|
377
|
+
FAILED = 6;
|
|
378
|
+
CANCELLED = 7;
|
|
379
|
+
UNKNOWN = 8;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
message RoleProvenance {
|
|
383
|
+
string role_name = 1;
|
|
384
|
+
string template_hash = 2;
|
|
385
|
+
string render_hash = 3;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
message PlanProvenance {
|
|
389
|
+
string generated_by = 1;
|
|
390
|
+
optional string policy_profile = 2;
|
|
391
|
+
uint64 generated_at_ms = 3;
|
|
392
|
+
optional RoleProvenance role = 4;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
message FailureDetail {
|
|
396
|
+
string class = 1;
|
|
397
|
+
string code = 2;
|
|
398
|
+
string message = 3;
|
|
399
|
+
google.protobuf.Struct details = 4;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
enum ArtifactKind {
|
|
403
|
+
ARTIFACT_KIND_UNSPECIFIED = 0;
|
|
404
|
+
ARTIFACT_KIND_PLAN = 1;
|
|
405
|
+
ARTIFACT_KIND_EXECUTION_RECEIPT = 2;
|
|
406
|
+
ARTIFACT_KIND_VERIFICATION_RECEIPT = 3;
|
|
407
|
+
ARTIFACT_KIND_EVENT_LOG = 4;
|
|
408
|
+
ARTIFACT_KIND_DIGEST_MANIFEST = 5;
|
|
409
|
+
ARTIFACT_KIND_PROOF_MANIFEST = 6;
|
|
410
|
+
ARTIFACT_KIND_PATCH = 7;
|
|
411
|
+
ARTIFACT_KIND_TEST_REPORT = 8;
|
|
412
|
+
ARTIFACT_KIND_BUILD_LOG = 9;
|
|
413
|
+
ARTIFACT_KIND_BUNDLE = 10;
|
|
414
|
+
ARTIFACT_KIND_CUSTOM = 11;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
message ArtifactDescriptor {
|
|
418
|
+
string artifact_id = 1;
|
|
419
|
+
ArtifactKind kind = 2;
|
|
420
|
+
string digest = 3;
|
|
421
|
+
string media_type = 4;
|
|
422
|
+
string logical_name = 5;
|
|
423
|
+
string producer = 6;
|
|
424
|
+
string contract_version = 7;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
message DigestManifest {
|
|
428
|
+
string contract_version = 1;
|
|
429
|
+
string manifest_id = 2;
|
|
430
|
+
string run_id = 3;
|
|
431
|
+
string plan_id = 4;
|
|
432
|
+
uint64 created_at = 5;
|
|
433
|
+
string combined_digest = 6;
|
|
434
|
+
string event_digest = 7;
|
|
435
|
+
repeated ArtifactDescriptor artifact_descriptors = 8;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
message PrincipalRef {
|
|
439
|
+
string principal_id = 1;
|
|
440
|
+
string provider = 2;
|
|
441
|
+
optional string display_name = 3;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
message TenantRef {
|
|
445
|
+
string tenant_id = 1;
|
|
446
|
+
optional string display_name = 2;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
enum AuthMechanism {
|
|
450
|
+
AUTH_MECHANISM_UNSPECIFIED = 0;
|
|
451
|
+
AUTH_MECHANISM_SHARED_SECRET = 1;
|
|
452
|
+
AUTH_MECHANISM_BEARER_TOKEN = 2;
|
|
453
|
+
AUTH_MECHANISM_SIGNED_TOKEN = 3;
|
|
454
|
+
AUTH_MECHANISM_MUTUAL_TLS = 4;
|
|
455
|
+
AUTH_MECHANISM_CUSTOM = 5;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
message AuthContext {
|
|
459
|
+
string contract_version = 1;
|
|
460
|
+
string auth_context_id = 2;
|
|
461
|
+
PrincipalRef principal = 3;
|
|
462
|
+
TenantRef tenant = 4;
|
|
463
|
+
AuthMechanism mechanism = 5;
|
|
464
|
+
string credential_id = 6;
|
|
465
|
+
repeated string scopes = 7;
|
|
466
|
+
uint64 issued_at = 8;
|
|
467
|
+
optional uint64 expires_at = 9;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
enum UsageCategory {
|
|
471
|
+
USAGE_CATEGORY_UNSPECIFIED = 0;
|
|
472
|
+
USAGE_CATEGORY_CONTROL_PLANE = 1;
|
|
473
|
+
USAGE_CATEGORY_EXECUTION = 2;
|
|
474
|
+
USAGE_CATEGORY_VERIFICATION = 3;
|
|
475
|
+
USAGE_CATEGORY_AUDIT_EXPORT = 4;
|
|
476
|
+
USAGE_CATEGORY_CUSTOM = 5;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
enum UsageUnit {
|
|
480
|
+
USAGE_UNIT_UNSPECIFIED = 0;
|
|
481
|
+
USAGE_UNIT_REQUESTS = 1;
|
|
482
|
+
USAGE_UNIT_MILLISECONDS = 2;
|
|
483
|
+
USAGE_UNIT_BYTES = 3;
|
|
484
|
+
USAGE_UNIT_TOKENS = 4;
|
|
485
|
+
USAGE_UNIT_RUNS = 5;
|
|
486
|
+
USAGE_UNIT_CUSTOM = 6;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
message UsageRecord {
|
|
490
|
+
string contract_version = 1;
|
|
491
|
+
string usage_id = 2;
|
|
492
|
+
PrincipalRef principal = 3;
|
|
493
|
+
TenantRef tenant = 4;
|
|
494
|
+
optional string run_id = 5;
|
|
495
|
+
optional string plan_id = 6;
|
|
496
|
+
UsageCategory category = 7;
|
|
497
|
+
string metric_name = 8;
|
|
498
|
+
uint64 quantity = 9;
|
|
499
|
+
UsageUnit unit = 10;
|
|
500
|
+
uint64 recorded_at = 11;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
message AuditExportManifest {
|
|
504
|
+
string contract_version = 1;
|
|
505
|
+
string export_id = 2;
|
|
506
|
+
PrincipalRef principal = 3;
|
|
507
|
+
TenantRef tenant = 4;
|
|
508
|
+
string run_id = 5;
|
|
509
|
+
string plan_id = 6;
|
|
510
|
+
uint64 exported_at = 7;
|
|
511
|
+
string combined_digest = 8;
|
|
512
|
+
repeated ArtifactDescriptor artifact_descriptors = 9;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
enum PlanStepKind {
|
|
516
|
+
PLAN_STEP_KIND_UNSPECIFIED = 0;
|
|
517
|
+
PLAN_STEP_KIND_ANALYSIS = 1;
|
|
518
|
+
PLAN_STEP_KIND_EXECUTION = 2;
|
|
519
|
+
PLAN_STEP_KIND_VERIFICATION = 3;
|
|
520
|
+
PLAN_STEP_KIND_REVIEW = 4;
|
|
521
|
+
PLAN_STEP_KIND_MERGE = 5;
|
|
522
|
+
PLAN_STEP_KIND_RELEASE = 6;
|
|
523
|
+
PLAN_STEP_KIND_CUSTOM = 7;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
enum ReplanStrategy {
|
|
527
|
+
REPLAN_STRATEGY_UNSPECIFIED = 0;
|
|
528
|
+
REPLAN_STRATEGY_RETRY = 1;
|
|
529
|
+
REPLAN_STRATEGY_REPAIR = 2;
|
|
530
|
+
REPLAN_STRATEGY_ESCALATE = 3;
|
|
531
|
+
REPLAN_STRATEGY_BLOCK = 4;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
message ReplanPolicy {
|
|
535
|
+
ReplanStrategy strategy = 1;
|
|
536
|
+
uint32 max_attempts = 2;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
message StepOutputExpectation {
|
|
540
|
+
ArtifactKind kind = 1;
|
|
541
|
+
string logical_name = 2;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
message PlanStep {
|
|
545
|
+
string step_id = 1;
|
|
546
|
+
string description = 2;
|
|
547
|
+
repeated string depends_on = 3;
|
|
548
|
+
google.protobuf.Struct task_template = 4;
|
|
549
|
+
optional FailureDetail failure = 5;
|
|
550
|
+
optional string task_id = 6;
|
|
551
|
+
PlanStepKind kind = 7;
|
|
552
|
+
google.protobuf.Struct inputs = 8;
|
|
553
|
+
repeated StepOutputExpectation expected_outputs = 9;
|
|
554
|
+
repeated string policy_tags = 10;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
message Plan {
|
|
558
|
+
string contract_version = 1;
|
|
559
|
+
string plan_id = 2;
|
|
560
|
+
optional string run_id = 3;
|
|
561
|
+
string objective = 4;
|
|
562
|
+
PlanStatus status = 5;
|
|
563
|
+
uint64 created_at_ms = 6;
|
|
564
|
+
uint64 updated_at_ms = 7;
|
|
565
|
+
PlanProvenance provenance = 8;
|
|
566
|
+
repeated PlanStep steps = 9;
|
|
567
|
+
optional string intent_id = 10;
|
|
568
|
+
optional string plan_version = 11;
|
|
569
|
+
optional string planner_version = 12;
|
|
570
|
+
ReplanPolicy replan_policy = 13;
|
|
571
|
+
optional string input_digest = 14;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
message ExecutionReceipt {
|
|
575
|
+
string contract_version = 1;
|
|
576
|
+
string run_id = 2;
|
|
577
|
+
string plan_id = 3;
|
|
578
|
+
string plan_hash = 4;
|
|
579
|
+
repeated string task_hashes = 5;
|
|
580
|
+
repeated string artifact_hashes = 6;
|
|
581
|
+
string outcome_hash = 7;
|
|
582
|
+
PlanStatus status = 8;
|
|
583
|
+
optional FailureDetail failure = 9;
|
|
584
|
+
uint64 generated_at_ms = 10;
|
|
585
|
+
optional ResolvedAgentRunner resolved_runner = 11;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
enum VerificationStatus {
|
|
589
|
+
VERIFICATION_STATUS_UNSPECIFIED = 0;
|
|
590
|
+
VERIFICATION_STATUS_PENDING = 1;
|
|
591
|
+
VERIFICATION_STATUS_PASSED = 2;
|
|
592
|
+
VERIFICATION_STATUS_FAILED = 3;
|
|
593
|
+
VERIFICATION_STATUS_BLOCKED = 4;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
enum VerificationCheckStatus {
|
|
597
|
+
VERIFICATION_CHECK_STATUS_UNSPECIFIED = 0;
|
|
598
|
+
VERIFICATION_CHECK_STATUS_PASSED = 1;
|
|
599
|
+
VERIFICATION_CHECK_STATUS_FAILED = 2;
|
|
600
|
+
VERIFICATION_CHECK_STATUS_BLOCKED = 3;
|
|
601
|
+
VERIFICATION_CHECK_STATUS_SKIPPED = 4;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
enum BlockedOutcomeScope {
|
|
605
|
+
BLOCKED_OUTCOME_SCOPE_UNSPECIFIED = 0;
|
|
606
|
+
BLOCKED_OUTCOME_SCOPE_INTENT = 1;
|
|
607
|
+
BLOCKED_OUTCOME_SCOPE_PLAN = 2;
|
|
608
|
+
BLOCKED_OUTCOME_SCOPE_STEP = 3;
|
|
609
|
+
BLOCKED_OUTCOME_SCOPE_RUN = 4;
|
|
610
|
+
BLOCKED_OUTCOME_SCOPE_VERIFICATION = 5;
|
|
611
|
+
BLOCKED_OUTCOME_SCOPE_MERGE = 6;
|
|
612
|
+
BLOCKED_OUTCOME_SCOPE_RELEASE = 7;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
message VerificationCheck {
|
|
616
|
+
string check_id = 1;
|
|
617
|
+
string name = 2;
|
|
618
|
+
VerificationCheckStatus status = 3;
|
|
619
|
+
string message = 4;
|
|
620
|
+
repeated string artifact_ids = 5;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
message BlockedOutcome {
|
|
624
|
+
string code = 1;
|
|
625
|
+
BlockedOutcomeScope scope = 2;
|
|
626
|
+
string message = 3;
|
|
627
|
+
google.protobuf.Struct details = 4;
|
|
628
|
+
repeated ArtifactDescriptor blocking_artifacts = 5;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
message VerificationReceipt {
|
|
632
|
+
string contract_version = 1;
|
|
633
|
+
string verification_id = 2;
|
|
634
|
+
string plan_id = 3;
|
|
635
|
+
repeated string execution_receipt_ids = 4;
|
|
636
|
+
string verification_policy_version = 5;
|
|
637
|
+
VerificationStatus status = 6;
|
|
638
|
+
repeated VerificationCheck checks = 7;
|
|
639
|
+
repeated BlockedOutcome blocked_outcomes = 8;
|
|
640
|
+
repeated string artifact_digest_set = 9;
|
|
641
|
+
uint64 verified_at_ms = 10;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
enum ReviewDecisionScope {
|
|
645
|
+
REVIEW_DECISION_SCOPE_UNSPECIFIED = 0;
|
|
646
|
+
REVIEW_DECISION_SCOPE_PLAN = 1;
|
|
647
|
+
REVIEW_DECISION_SCOPE_STEP = 2;
|
|
648
|
+
REVIEW_DECISION_SCOPE_PULL_REQUEST = 3;
|
|
649
|
+
REVIEW_DECISION_SCOPE_VERIFICATION = 4;
|
|
650
|
+
REVIEW_DECISION_SCOPE_RELEASE = 5;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
enum ReviewDisposition {
|
|
654
|
+
REVIEW_DISPOSITION_UNSPECIFIED = 0;
|
|
655
|
+
REVIEW_DISPOSITION_APPROVE = 1;
|
|
656
|
+
REVIEW_DISPOSITION_REQUEST_CHANGES = 2;
|
|
657
|
+
REVIEW_DISPOSITION_REJECT = 3;
|
|
658
|
+
REVIEW_DISPOSITION_DEFER = 4;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
message ReviewDecision {
|
|
662
|
+
string decision_id = 1;
|
|
663
|
+
string plan_id = 2;
|
|
664
|
+
ReviewDecisionScope scope = 3;
|
|
665
|
+
string actor = 4;
|
|
666
|
+
ReviewDisposition decision = 5;
|
|
667
|
+
string reason = 6;
|
|
668
|
+
uint64 created_at = 7;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
enum RerunTrigger {
|
|
672
|
+
RERUN_TRIGGER_UNSPECIFIED = 0;
|
|
673
|
+
RERUN_TRIGGER_REVIEW_DECISION = 1;
|
|
674
|
+
RERUN_TRIGGER_MANUAL = 2;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
message RerunScope {
|
|
678
|
+
string scope_id = 1;
|
|
679
|
+
string plan_id = 2;
|
|
680
|
+
RerunTrigger trigger = 3;
|
|
681
|
+
string reason = 4;
|
|
682
|
+
optional string source_decision_id = 5;
|
|
683
|
+
repeated string task_ids = 6;
|
|
684
|
+
repeated string step_ids = 7;
|
|
685
|
+
repeated string paths = 8;
|
|
686
|
+
uint64 created_at = 9;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
enum RerunSelectionStrategy {
|
|
690
|
+
RERUN_SELECTION_STRATEGY_UNSPECIFIED = 0;
|
|
691
|
+
RERUN_SELECTION_STRATEGY_TASK_IDS = 1;
|
|
692
|
+
RERUN_SELECTION_STRATEGY_STEP_IDS = 2;
|
|
693
|
+
RERUN_SELECTION_STRATEGY_PATHS = 3;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
enum RerunExecutionStatus {
|
|
697
|
+
RERUN_EXECUTION_STATUS_UNSPECIFIED = 0;
|
|
698
|
+
RERUN_EXECUTION_STATUS_PENDING = 1;
|
|
699
|
+
RERUN_EXECUTION_STATUS_SUCCEEDED = 2;
|
|
700
|
+
RERUN_EXECUTION_STATUS_FAILED = 3;
|
|
701
|
+
RERUN_EXECUTION_STATUS_PARTIAL = 4;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
message RerunExecutionResult {
|
|
705
|
+
string result_id = 1;
|
|
706
|
+
string plan_id = 2;
|
|
707
|
+
string rerun_scope_id = 3;
|
|
708
|
+
optional string source_decision_id = 4;
|
|
709
|
+
RerunTrigger trigger = 5;
|
|
710
|
+
RerunSelectionStrategy matched_strategy = 6;
|
|
711
|
+
repeated string root_tasks = 7;
|
|
712
|
+
repeated string selected_tasks = 8;
|
|
713
|
+
repeated string matched_paths = 9;
|
|
714
|
+
string reason = 10;
|
|
715
|
+
RerunExecutionStatus status = 11;
|
|
716
|
+
repeated string completed_tasks = 12;
|
|
717
|
+
repeated string failed_tasks = 13;
|
|
718
|
+
repeated string skipped_tasks = 14;
|
|
719
|
+
uint64 created_at = 15;
|
|
720
|
+
uint64 updated_at = 16;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
message PrLifecycleState {
|
|
724
|
+
string state_id = 1;
|
|
725
|
+
string plan_id = 2;
|
|
726
|
+
optional uint64 pr_number = 3;
|
|
727
|
+
optional string pr_url = 4;
|
|
728
|
+
optional ReviewDecision review_decision = 5;
|
|
729
|
+
optional RerunScope rerun_scope = 6;
|
|
730
|
+
optional RerunExecutionResult rerun_result = 7;
|
|
731
|
+
optional VerificationReceipt verification_receipt = 8;
|
|
732
|
+
bool merge_ready = 9;
|
|
733
|
+
bool release_ready = 10;
|
|
734
|
+
repeated BlockedOutcome blocked_outcomes = 11;
|
|
735
|
+
uint64 updated_at = 12;
|
|
736
|
+
}
|
|
737
|
+
|
|
124
738
|
message Task {
|
|
125
739
|
string version = 1;
|
|
126
740
|
string task_id = 2;
|
|
741
|
+
// Legacy enum role. Prefer role_id for new producers and consumers.
|
|
127
742
|
AgentRole role = 3;
|
|
128
743
|
string goal = 4;
|
|
129
744
|
google.protobuf.Struct inputs = 5;
|
|
@@ -132,8 +747,10 @@ message Task {
|
|
|
132
747
|
RunContext run_context = 8;
|
|
133
748
|
google.protobuf.Struct extensions = 9;
|
|
134
749
|
ExperimentSpec experiment_spec = 10;
|
|
135
|
-
|
|
136
|
-
|
|
750
|
+
ObjectiveSpec objective_spec = 11;
|
|
751
|
+
// Canonical open-ended role identifier. This allows built-in and custom
|
|
752
|
+
// roles without requiring protocol enum changes.
|
|
753
|
+
string role_id = 12;
|
|
137
754
|
}
|
|
138
755
|
|
|
139
756
|
message Artifact {
|
|
@@ -160,6 +777,68 @@ message Event {
|
|
|
160
777
|
google.protobuf.Struct extensions = 7;
|
|
161
778
|
Provenance provenance = 8;
|
|
162
779
|
repeated EvalResult eval_results = 9;
|
|
780
|
+
FailureClass failure_class = 10;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
enum RunEventStream {
|
|
784
|
+
RUN_EVENT_STREAM_UNSPECIFIED = 0;
|
|
785
|
+
RUN_EVENT_STREAM_EXECUTION = 1;
|
|
786
|
+
RUN_EVENT_STREAM_RECOVERY = 2;
|
|
787
|
+
RUN_EVENT_STREAM_REVIEW = 3;
|
|
788
|
+
RUN_EVENT_STREAM_VERIFICATION = 4;
|
|
789
|
+
RUN_EVENT_STREAM_LIFECYCLE = 5;
|
|
790
|
+
RUN_EVENT_STREAM_CUSTOM = 6;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
message RunEventRecord {
|
|
794
|
+
string contract_version = 1;
|
|
795
|
+
string event_id = 2;
|
|
796
|
+
string run_id = 3;
|
|
797
|
+
string plan_id = 4;
|
|
798
|
+
uint64 sequence = 5;
|
|
799
|
+
RunEventStream stream = 6;
|
|
800
|
+
uint64 recorded_at = 7;
|
|
801
|
+
optional string step_id = 8;
|
|
802
|
+
optional string task_id = 9;
|
|
803
|
+
string event_type = 10;
|
|
804
|
+
string status = 11;
|
|
805
|
+
optional string message = 12;
|
|
806
|
+
repeated string artifact_ids = 13;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
enum TaskMessageKind {
|
|
810
|
+
TASK_MESSAGE_KIND_UNSPECIFIED = 0;
|
|
811
|
+
TASK_MESSAGE_KIND_ARTIFACT_READY = 1;
|
|
812
|
+
TASK_MESSAGE_KIND_CLARIFICATION_REQUEST = 2;
|
|
813
|
+
TASK_MESSAGE_KIND_CLARIFICATION_RESPONSE = 3;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
message TaskMessage {
|
|
817
|
+
string version = 1;
|
|
818
|
+
string message_id = 2;
|
|
819
|
+
string run_id = 3;
|
|
820
|
+
string from_task_id = 4;
|
|
821
|
+
string to_task_id = 5;
|
|
822
|
+
TaskMessageKind kind = 6;
|
|
823
|
+
optional string subject = 7;
|
|
824
|
+
optional string body = 8;
|
|
825
|
+
repeated string artifact_refs = 9;
|
|
826
|
+
optional string reply_to = 10;
|
|
827
|
+
string created_at = 11;
|
|
828
|
+
bool requires_ack = 12;
|
|
829
|
+
google.protobuf.Struct extensions = 13;
|
|
830
|
+
Provenance provenance = 14;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
message TaskMessageAck {
|
|
834
|
+
string version = 1;
|
|
835
|
+
string message_id = 2;
|
|
836
|
+
string run_id = 3;
|
|
837
|
+
string task_id = 4;
|
|
838
|
+
string acked_at = 5;
|
|
839
|
+
string status = 6;
|
|
840
|
+
optional string note = 7;
|
|
841
|
+
google.protobuf.Struct extensions = 8;
|
|
163
842
|
}
|
|
164
843
|
|
|
165
844
|
message GateResult {
|
|
@@ -169,6 +848,7 @@ message GateResult {
|
|
|
169
848
|
optional string reason = 4;
|
|
170
849
|
google.protobuf.Struct evidence = 5;
|
|
171
850
|
google.protobuf.Struct extensions = 6;
|
|
851
|
+
FailureClass failure_class = 7;
|
|
172
852
|
}
|
|
173
853
|
|
|
174
854
|
message RunOutcome {
|
|
@@ -199,3 +879,512 @@ message RunContext {
|
|
|
199
879
|
repeated string labels = 6;
|
|
200
880
|
google.protobuf.Struct extensions = 7;
|
|
201
881
|
}
|
|
882
|
+
|
|
883
|
+
// RunnerCapabilities declares the stable machine-facing features a runner can
|
|
884
|
+
// advertise when joining the control plane.
|
|
885
|
+
message RunnerCapabilities {
|
|
886
|
+
string platform = 1;
|
|
887
|
+
string runtime = 2;
|
|
888
|
+
// Legacy enum-based supported roles. Prefer supported_role_ids for new
|
|
889
|
+
// producers and consumers.
|
|
890
|
+
repeated AgentRole supported_roles = 3;
|
|
891
|
+
repeated string supported_task_versions = 4;
|
|
892
|
+
repeated string labels = 5;
|
|
893
|
+
bool supports_interactive_pty = 6;
|
|
894
|
+
bool supports_resume = 7;
|
|
895
|
+
google.protobuf.Struct extensions = 8;
|
|
896
|
+
repeated string supported_role_ids = 9;
|
|
897
|
+
repeated string supported_models = 10;
|
|
898
|
+
repeated string supported_reasoning_efforts = 11;
|
|
899
|
+
repeated string supported_runner_capabilities = 12;
|
|
900
|
+
repeated string supported_providers = 13;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// LeaseRef is the canonical identity for a runner-owned execution lease. The
|
|
904
|
+
// fencing_token must change whenever orchestrator ownership changes.
|
|
905
|
+
message LeaseRef {
|
|
906
|
+
string lease_id = 1;
|
|
907
|
+
string fencing_token = 2;
|
|
908
|
+
string run_id = 3;
|
|
909
|
+
string plan_id = 4;
|
|
910
|
+
string step_id = 5;
|
|
911
|
+
string task_id = 6;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
enum LeaseLifecycleState {
|
|
915
|
+
LEASE_LIFECYCLE_STATE_UNSPECIFIED = 0;
|
|
916
|
+
LEASE_ISSUED = 1;
|
|
917
|
+
LEASE_ACTIVE = 2;
|
|
918
|
+
LEASE_RELEASED = 3;
|
|
919
|
+
LEASE_EXPIRED = 4;
|
|
920
|
+
LEASE_CANCELLED = 5;
|
|
921
|
+
LEASE_REJECTED = 6;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
enum RunLifecycleState {
|
|
925
|
+
RUN_LIFECYCLE_STATE_UNSPECIFIED = 0;
|
|
926
|
+
RUN_PENDING = 1;
|
|
927
|
+
RUN_EXECUTING = 2;
|
|
928
|
+
RUN_PAUSED = 3;
|
|
929
|
+
RUN_CANCELLING = 4;
|
|
930
|
+
RUN_CANCELLED = 5;
|
|
931
|
+
RUN_FAILED = 6;
|
|
932
|
+
RUN_COMPLETE = 7;
|
|
933
|
+
RUN_BLOCKED = 8;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
enum StepLifecycleState {
|
|
937
|
+
STEP_LIFECYCLE_STATE_UNSPECIFIED = 0;
|
|
938
|
+
STEP_PENDING = 1;
|
|
939
|
+
STEP_READY = 2;
|
|
940
|
+
STEP_LEASED = 3;
|
|
941
|
+
STEP_RUNNING = 4;
|
|
942
|
+
STEP_COMPLETE = 5;
|
|
943
|
+
STEP_FAILED = 6;
|
|
944
|
+
STEP_CANCELLED = 7;
|
|
945
|
+
STEP_BLOCKED = 8;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
enum LeaseRejectionReason {
|
|
949
|
+
LEASE_REJECTION_REASON_UNSPECIFIED = 0;
|
|
950
|
+
LEASE_REJECTION_STALE_FENCING_TOKEN = 1;
|
|
951
|
+
LEASE_REJECTION_EXPIRED = 2;
|
|
952
|
+
LEASE_REJECTION_SESSION_MISMATCH = 3;
|
|
953
|
+
LEASE_REJECTION_UNKNOWN_LEASE = 4;
|
|
954
|
+
LEASE_REJECTION_STEP_ALREADY_TERMINAL = 5;
|
|
955
|
+
LEASE_REJECTION_RUN_NOT_EXECUTABLE = 6;
|
|
956
|
+
LEASE_REJECTION_DEPENDENCY_BLOCKED = 7;
|
|
957
|
+
LEASE_REJECTION_LEASE_SUPERSEDED = 8;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
enum RecoveryEventKind {
|
|
961
|
+
RECOVERY_EVENT_KIND_UNSPECIFIED = 0;
|
|
962
|
+
RECOVERY_EVENT_ORCHESTRATOR_STARTED = 1;
|
|
963
|
+
RECOVERY_EVENT_STATE_RELOADED = 2;
|
|
964
|
+
RECOVERY_EVENT_LEASE_RESTORED = 3;
|
|
965
|
+
RECOVERY_EVENT_LEASE_REJECTED = 4;
|
|
966
|
+
RECOVERY_EVENT_STEP_REQUEUED = 5;
|
|
967
|
+
RECOVERY_EVENT_STEP_BLOCKED = 6;
|
|
968
|
+
RECOVERY_EVENT_RUN_RECOVERED = 7;
|
|
969
|
+
RECOVERY_EVENT_CANCELLATION_REQUESTED = 8;
|
|
970
|
+
RECOVERY_EVENT_CANCELLATION_ACKNOWLEDGED = 9;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
message FencingToken {
|
|
974
|
+
string token = 1;
|
|
975
|
+
uint64 issued_at_ms = 2;
|
|
976
|
+
string issuer = 3;
|
|
977
|
+
string scope = 4;
|
|
978
|
+
google.protobuf.Struct extensions = 5;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
message Lease {
|
|
982
|
+
string lease_id = 1;
|
|
983
|
+
string run_id = 2;
|
|
984
|
+
string plan_id = 3;
|
|
985
|
+
string step_id = 4;
|
|
986
|
+
string task_id = 5;
|
|
987
|
+
string runner_id = 6;
|
|
988
|
+
string session_id = 7;
|
|
989
|
+
FencingToken fencing_token = 8;
|
|
990
|
+
uint64 issued_at_ms = 9;
|
|
991
|
+
uint64 expires_at_ms = 10;
|
|
992
|
+
LeaseLifecycleState status = 11;
|
|
993
|
+
google.protobuf.Struct extensions = 12;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
message RecoveryEvent {
|
|
997
|
+
string event_id = 1;
|
|
998
|
+
string run_id = 2;
|
|
999
|
+
string plan_id = 3;
|
|
1000
|
+
optional string step_id = 4;
|
|
1001
|
+
RecoveryEventKind kind = 5;
|
|
1002
|
+
uint64 occurred_at_ms = 6;
|
|
1003
|
+
string actor = 7;
|
|
1004
|
+
google.protobuf.Struct details = 8;
|
|
1005
|
+
string contract_version = 9;
|
|
1006
|
+
optional RunLifecycleState run_state = 10;
|
|
1007
|
+
optional StepLifecycleState step_state = 11;
|
|
1008
|
+
optional LeaseRejectionReason lease_rejection_reason = 12;
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
message LeaseStatus {
|
|
1012
|
+
LeaseRef lease = 1;
|
|
1013
|
+
string state = 2;
|
|
1014
|
+
uint64 updated_at_ms = 3;
|
|
1015
|
+
optional FailureDetail failure = 4;
|
|
1016
|
+
google.protobuf.Struct extensions = 5;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
message CancellationIntent {
|
|
1020
|
+
LeaseRef lease = 1;
|
|
1021
|
+
string reason = 2;
|
|
1022
|
+
uint64 requested_at_ms = 3;
|
|
1023
|
+
bool force = 4;
|
|
1024
|
+
google.protobuf.Struct extensions = 5;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
message LeaseAssignment {
|
|
1028
|
+
LeaseRef lease = 1;
|
|
1029
|
+
Task task = 2;
|
|
1030
|
+
uint64 issued_at_ms = 3;
|
|
1031
|
+
uint64 lease_ttl_ms = 4;
|
|
1032
|
+
google.protobuf.Struct extensions = 5;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
message RegisterRunnerRequest {
|
|
1036
|
+
string contract_version = 1;
|
|
1037
|
+
string runner_id = 2;
|
|
1038
|
+
RunnerCapabilities capabilities = 3;
|
|
1039
|
+
uint32 max_parallel_leases = 4;
|
|
1040
|
+
google.protobuf.Struct extensions = 5;
|
|
1041
|
+
optional AuthContext auth_context = 6;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
message RegisterRunnerResponse {
|
|
1045
|
+
string contract_version = 1;
|
|
1046
|
+
string orchestrator_id = 2;
|
|
1047
|
+
string session_id = 3;
|
|
1048
|
+
uint64 heartbeat_interval_ms = 4;
|
|
1049
|
+
uint64 lease_poll_interval_ms = 5;
|
|
1050
|
+
google.protobuf.Struct extensions = 6;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
message HeartbeatRequest {
|
|
1054
|
+
string contract_version = 1;
|
|
1055
|
+
string runner_id = 2;
|
|
1056
|
+
string session_id = 3;
|
|
1057
|
+
repeated LeaseStatus active_leases = 4;
|
|
1058
|
+
google.protobuf.Struct extensions = 5;
|
|
1059
|
+
optional AuthContext auth_context = 6;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
message HeartbeatResponse {
|
|
1063
|
+
string contract_version = 1;
|
|
1064
|
+
string orchestrator_id = 2;
|
|
1065
|
+
uint64 next_heartbeat_ms = 3;
|
|
1066
|
+
repeated CancellationIntent cancellations = 4;
|
|
1067
|
+
google.protobuf.Struct extensions = 5;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
message AcquireLeaseRequest {
|
|
1071
|
+
string contract_version = 1;
|
|
1072
|
+
string runner_id = 2;
|
|
1073
|
+
string session_id = 3;
|
|
1074
|
+
uint32 available_slots = 4;
|
|
1075
|
+
repeated string active_lease_ids = 5;
|
|
1076
|
+
google.protobuf.Struct extensions = 6;
|
|
1077
|
+
optional AuthContext auth_context = 7;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
message AcquireLeaseResponse {
|
|
1081
|
+
string contract_version = 1;
|
|
1082
|
+
string orchestrator_id = 2;
|
|
1083
|
+
LeaseAssignment assignment = 3;
|
|
1084
|
+
uint64 retry_after_ms = 4;
|
|
1085
|
+
repeated CancellationIntent cancellations = 5;
|
|
1086
|
+
google.protobuf.Struct extensions = 6;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
message RenewLeaseRequest {
|
|
1090
|
+
string contract_version = 1;
|
|
1091
|
+
string runner_id = 2;
|
|
1092
|
+
string session_id = 3;
|
|
1093
|
+
LeaseRef lease = 4;
|
|
1094
|
+
google.protobuf.Struct extensions = 5;
|
|
1095
|
+
optional AuthContext auth_context = 6;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
message RenewLeaseResponse {
|
|
1099
|
+
string contract_version = 1;
|
|
1100
|
+
string orchestrator_id = 2;
|
|
1101
|
+
bool accepted = 3;
|
|
1102
|
+
uint64 lease_ttl_ms = 4;
|
|
1103
|
+
repeated CancellationIntent cancellations = 5;
|
|
1104
|
+
optional FailureDetail failure = 6;
|
|
1105
|
+
google.protobuf.Struct extensions = 7;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
message ResumeLeaseRequest {
|
|
1109
|
+
string contract_version = 1;
|
|
1110
|
+
string runner_id = 2;
|
|
1111
|
+
string session_id = 3;
|
|
1112
|
+
LeaseRef lease = 4;
|
|
1113
|
+
google.protobuf.Struct extensions = 5;
|
|
1114
|
+
optional AuthContext auth_context = 6;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
message ResumeLeaseResponse {
|
|
1118
|
+
string contract_version = 1;
|
|
1119
|
+
string orchestrator_id = 2;
|
|
1120
|
+
bool accepted = 3;
|
|
1121
|
+
Lease lease = 4;
|
|
1122
|
+
uint64 expires_at_ms = 5;
|
|
1123
|
+
string current_fencing_token = 6;
|
|
1124
|
+
LeaseRejectionReason reason = 7;
|
|
1125
|
+
string message = 8;
|
|
1126
|
+
google.protobuf.Struct extensions = 9;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
message ReportStepStartedRequest {
|
|
1130
|
+
string contract_version = 1;
|
|
1131
|
+
string runner_id = 2;
|
|
1132
|
+
string session_id = 3;
|
|
1133
|
+
LeaseRef lease = 4;
|
|
1134
|
+
string started_at = 5;
|
|
1135
|
+
google.protobuf.Struct extensions = 6;
|
|
1136
|
+
optional AuthContext auth_context = 7;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
message ReportStepStartedResponse {
|
|
1140
|
+
string contract_version = 1;
|
|
1141
|
+
string orchestrator_id = 2;
|
|
1142
|
+
bool accepted = 3;
|
|
1143
|
+
optional FailureDetail failure = 4;
|
|
1144
|
+
google.protobuf.Struct extensions = 5;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
message ReportStepProgressRequest {
|
|
1148
|
+
string contract_version = 1;
|
|
1149
|
+
string runner_id = 2;
|
|
1150
|
+
string session_id = 3;
|
|
1151
|
+
LeaseRef lease = 4;
|
|
1152
|
+
repeated Event events = 5;
|
|
1153
|
+
repeated Artifact artifacts = 6;
|
|
1154
|
+
google.protobuf.Struct extensions = 7;
|
|
1155
|
+
optional AuthContext auth_context = 8;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
message ReportStepProgressResponse {
|
|
1159
|
+
string contract_version = 1;
|
|
1160
|
+
string orchestrator_id = 2;
|
|
1161
|
+
bool accepted = 3;
|
|
1162
|
+
repeated CancellationIntent cancellations = 4;
|
|
1163
|
+
optional FailureDetail failure = 5;
|
|
1164
|
+
google.protobuf.Struct extensions = 6;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
message ReportStepOutcomeRequest {
|
|
1168
|
+
string contract_version = 1;
|
|
1169
|
+
string runner_id = 2;
|
|
1170
|
+
string session_id = 3;
|
|
1171
|
+
LeaseRef lease = 4;
|
|
1172
|
+
PlanStatus status = 5;
|
|
1173
|
+
repeated Event events = 6;
|
|
1174
|
+
repeated Artifact artifacts = 7;
|
|
1175
|
+
optional RunOutcome run_outcome = 8;
|
|
1176
|
+
optional FailureDetail failure = 9;
|
|
1177
|
+
string finished_at = 10;
|
|
1178
|
+
google.protobuf.Struct extensions = 11;
|
|
1179
|
+
optional AuthContext auth_context = 12;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
message ReportStepOutcomeResponse {
|
|
1183
|
+
string contract_version = 1;
|
|
1184
|
+
string orchestrator_id = 2;
|
|
1185
|
+
bool accepted = 3;
|
|
1186
|
+
optional FailureDetail failure = 4;
|
|
1187
|
+
google.protobuf.Struct extensions = 5;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
message AckCancellationRequest {
|
|
1191
|
+
string contract_version = 1;
|
|
1192
|
+
string runner_id = 2;
|
|
1193
|
+
string session_id = 3;
|
|
1194
|
+
LeaseRef lease = 4;
|
|
1195
|
+
string status = 5;
|
|
1196
|
+
optional string message = 6;
|
|
1197
|
+
google.protobuf.Struct extensions = 7;
|
|
1198
|
+
optional AuthContext auth_context = 8;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
message AckCancellationResponse {
|
|
1202
|
+
string contract_version = 1;
|
|
1203
|
+
string orchestrator_id = 2;
|
|
1204
|
+
bool accepted = 3;
|
|
1205
|
+
optional FailureDetail failure = 4;
|
|
1206
|
+
google.protobuf.Struct extensions = 5;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
enum ControlPlaneRunAction {
|
|
1210
|
+
CONTROL_PLANE_RUN_ACTION_UNSPECIFIED = 0;
|
|
1211
|
+
CONTROL_PLANE_RUN_ACTION_PAUSE = 1;
|
|
1212
|
+
CONTROL_PLANE_RUN_ACTION_RESUME = 2;
|
|
1213
|
+
CONTROL_PLANE_RUN_ACTION_INTERRUPT = 3;
|
|
1214
|
+
CONTROL_PLANE_RUN_ACTION_CANCEL = 4;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
message ControlPlaneScope {
|
|
1218
|
+
optional string organization = 1;
|
|
1219
|
+
optional string user = 2;
|
|
1220
|
+
optional string default_project = 3;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
message RunOperatorSignals {
|
|
1224
|
+
bool prompt_needed = 1;
|
|
1225
|
+
optional string prompt_summary = 2;
|
|
1226
|
+
bool pause_requested = 3;
|
|
1227
|
+
bool interrupt_requested = 4;
|
|
1228
|
+
bool cancel_requested = 5;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
message ControlPlaneRunSummary {
|
|
1232
|
+
string project_key = 1;
|
|
1233
|
+
string run_id = 2;
|
|
1234
|
+
optional string run_dir = 3;
|
|
1235
|
+
optional RunLifecycleState lifecycle_state = 4;
|
|
1236
|
+
string status = 5;
|
|
1237
|
+
optional string updated_label = 6;
|
|
1238
|
+
optional uint64 updated_epoch = 7;
|
|
1239
|
+
optional string meaningful_status = 8;
|
|
1240
|
+
optional double meaningful_score = 9;
|
|
1241
|
+
repeated string meaningful_reasons = 10;
|
|
1242
|
+
optional uint64 total_runs = 11;
|
|
1243
|
+
optional uint64 total_success = 12;
|
|
1244
|
+
optional uint64 total_failed = 13;
|
|
1245
|
+
optional uint64 message_count = 14;
|
|
1246
|
+
optional uint64 unresolved_required_ack_count = 15;
|
|
1247
|
+
bool alert_stale = 16;
|
|
1248
|
+
bool alert_low_score = 17;
|
|
1249
|
+
RunOperatorSignals operator_signals = 18;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
message ControlPlaneRunActivityCursor {
|
|
1253
|
+
optional uint64 after_sequence = 1;
|
|
1254
|
+
optional string resume_token = 2;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
message ListControlPlaneRunsRequest {
|
|
1258
|
+
string contract_version = 1;
|
|
1259
|
+
ControlPlaneScope scope = 2;
|
|
1260
|
+
optional string project_key = 3;
|
|
1261
|
+
optional uint32 limit = 4;
|
|
1262
|
+
google.protobuf.Struct extensions = 5;
|
|
1263
|
+
optional AuthContext auth_context = 6;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
message ListControlPlaneRunsResponse {
|
|
1267
|
+
string contract_version = 1;
|
|
1268
|
+
repeated ControlPlaneRunSummary runs = 2;
|
|
1269
|
+
google.protobuf.Struct extensions = 3;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
message GetControlPlaneRunRequest {
|
|
1273
|
+
string contract_version = 1;
|
|
1274
|
+
ControlPlaneScope scope = 2;
|
|
1275
|
+
optional string project_key = 3;
|
|
1276
|
+
string run_id = 4;
|
|
1277
|
+
google.protobuf.Struct extensions = 5;
|
|
1278
|
+
optional AuthContext auth_context = 6;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
message GetControlPlaneRunResponse {
|
|
1282
|
+
string contract_version = 1;
|
|
1283
|
+
ControlPlaneRunSummary run = 2;
|
|
1284
|
+
google.protobuf.Struct extensions = 3;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
message GetControlPlaneRunActivityPageRequest {
|
|
1288
|
+
string contract_version = 1;
|
|
1289
|
+
ControlPlaneScope scope = 2;
|
|
1290
|
+
optional string project_key = 3;
|
|
1291
|
+
string run_id = 4;
|
|
1292
|
+
optional uint32 limit = 5;
|
|
1293
|
+
ControlPlaneRunActivityCursor cursor = 6;
|
|
1294
|
+
google.protobuf.Struct extensions = 7;
|
|
1295
|
+
optional AuthContext auth_context = 8;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
message GetControlPlaneRunActivityPageResponse {
|
|
1299
|
+
string contract_version = 1;
|
|
1300
|
+
repeated RunEventRecord records = 2;
|
|
1301
|
+
ControlPlaneRunActivityCursor next_cursor = 3;
|
|
1302
|
+
google.protobuf.Struct extensions = 4;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
message ApplyControlPlaneRunActionRequest {
|
|
1306
|
+
string contract_version = 1;
|
|
1307
|
+
ControlPlaneScope scope = 2;
|
|
1308
|
+
string run_id = 3;
|
|
1309
|
+
ControlPlaneRunAction action = 4;
|
|
1310
|
+
optional string reason = 5;
|
|
1311
|
+
google.protobuf.Struct extensions = 6;
|
|
1312
|
+
optional AuthContext auth_context = 7;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
message ApplyControlPlaneRunActionResponse {
|
|
1316
|
+
string contract_version = 1;
|
|
1317
|
+
string run_id = 2;
|
|
1318
|
+
ControlPlaneRunAction action = 3;
|
|
1319
|
+
bool accepted = 4;
|
|
1320
|
+
optional RunLifecycleState lifecycle_state = 5;
|
|
1321
|
+
optional string message = 6;
|
|
1322
|
+
google.protobuf.Struct extensions = 7;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
message ApplyControlPlaneReviewDispositionRequest {
|
|
1326
|
+
string contract_version = 1;
|
|
1327
|
+
ControlPlaneScope scope = 2;
|
|
1328
|
+
string project_key = 3;
|
|
1329
|
+
optional string plan_id = 4;
|
|
1330
|
+
string actor = 5;
|
|
1331
|
+
ReviewDisposition decision = 6;
|
|
1332
|
+
string reason = 7;
|
|
1333
|
+
google.protobuf.Struct extensions = 8;
|
|
1334
|
+
optional AuthContext auth_context = 9;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
message ApplyControlPlaneReviewDispositionResponse {
|
|
1338
|
+
string contract_version = 1;
|
|
1339
|
+
string project_key = 2;
|
|
1340
|
+
optional string plan_id = 3;
|
|
1341
|
+
bool accepted = 4;
|
|
1342
|
+
optional ReviewDecision review_decision = 5;
|
|
1343
|
+
optional PrLifecycleState pr_lifecycle_state = 6;
|
|
1344
|
+
optional string message = 7;
|
|
1345
|
+
google.protobuf.Struct extensions = 8;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
message EnsureControlPlaneWorkerRequest {
|
|
1349
|
+
string contract_version = 1;
|
|
1350
|
+
ControlPlaneScope scope = 2;
|
|
1351
|
+
string project_key = 3;
|
|
1352
|
+
google.protobuf.Struct extensions = 4;
|
|
1353
|
+
optional AuthContext auth_context = 5;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
message EnsureControlPlaneWorkerResponse {
|
|
1357
|
+
string contract_version = 1;
|
|
1358
|
+
string project_key = 2;
|
|
1359
|
+
bool accepted = 3;
|
|
1360
|
+
optional string worker_id = 4;
|
|
1361
|
+
optional string message = 5;
|
|
1362
|
+
google.protobuf.Struct extensions = 6;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
// RunnerControlService is the canonical machine-to-machine control-plane
|
|
1366
|
+
// contract. It is transport-oriented and intentionally protobuf-only; JSON
|
|
1367
|
+
// schema support in this repository remains limited to portable object payloads.
|
|
1368
|
+
service RunnerControlService {
|
|
1369
|
+
rpc RegisterRunner(RegisterRunnerRequest) returns (RegisterRunnerResponse);
|
|
1370
|
+
rpc Heartbeat(HeartbeatRequest) returns (HeartbeatResponse);
|
|
1371
|
+
rpc AcquireLease(AcquireLeaseRequest) returns (AcquireLeaseResponse);
|
|
1372
|
+
rpc RenewLease(RenewLeaseRequest) returns (RenewLeaseResponse);
|
|
1373
|
+
rpc ResumeLease(ResumeLeaseRequest) returns (ResumeLeaseResponse);
|
|
1374
|
+
rpc ReportStepStarted(ReportStepStartedRequest) returns (ReportStepStartedResponse);
|
|
1375
|
+
rpc ReportStepProgress(ReportStepProgressRequest) returns (ReportStepProgressResponse);
|
|
1376
|
+
rpc ReportStepOutcome(ReportStepOutcomeRequest) returns (ReportStepOutcomeResponse);
|
|
1377
|
+
rpc AckCancellation(AckCancellationRequest) returns (AckCancellationResponse);
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
// ClientControlService is the canonical client-facing control-plane RPC
|
|
1381
|
+
// contract. It carries scoped run summaries, activity pages, and operator
|
|
1382
|
+
// control actions without encoding local workspace compatibility concerns.
|
|
1383
|
+
service ClientControlService {
|
|
1384
|
+
rpc ListRuns(ListControlPlaneRunsRequest) returns (ListControlPlaneRunsResponse);
|
|
1385
|
+
rpc GetRun(GetControlPlaneRunRequest) returns (GetControlPlaneRunResponse);
|
|
1386
|
+
rpc GetRunActivityPage(GetControlPlaneRunActivityPageRequest) returns (GetControlPlaneRunActivityPageResponse);
|
|
1387
|
+
rpc ApplyRunAction(ApplyControlPlaneRunActionRequest) returns (ApplyControlPlaneRunActionResponse);
|
|
1388
|
+
rpc ApplyReviewDisposition(ApplyControlPlaneReviewDispositionRequest) returns (ApplyControlPlaneReviewDispositionResponse);
|
|
1389
|
+
rpc EnsureWorker(EnsureControlPlaneWorkerRequest) returns (EnsureControlPlaneWorkerResponse);
|
|
1390
|
+
}
|