@cofy-x/axern-sdk 0.2.0-bootstrap.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.
Files changed (92) hide show
  1. package/README.md +169 -0
  2. package/dist/client/index.d.ts +63 -0
  3. package/dist/client/index.js +213 -0
  4. package/dist/config/index.d.ts +15 -0
  5. package/dist/config/index.js +65 -0
  6. package/dist/errors/index.d.ts +46 -0
  7. package/dist/errors/index.js +123 -0
  8. package/dist/generated/proto.d.ts +10 -0
  9. package/dist/generated/proto.js +80 -0
  10. package/dist/index.d.ts +19 -0
  11. package/dist/index.js +13 -0
  12. package/dist/node/archive.d.ts +9 -0
  13. package/dist/node/archive.js +41 -0
  14. package/dist/node/attached_process.d.ts +10 -0
  15. package/dist/node/attached_process.js +60 -0
  16. package/dist/node/capabilities.d.ts +8 -0
  17. package/dist/node/capabilities.js +51 -0
  18. package/dist/node/client.d.ts +44 -0
  19. package/dist/node/client.js +96 -0
  20. package/dist/node/computer_use.d.ts +12 -0
  21. package/dist/node/computer_use.js +81 -0
  22. package/dist/node/context.d.ts +22 -0
  23. package/dist/node/context.js +37 -0
  24. package/dist/node/exec.d.ts +12 -0
  25. package/dist/node/exec.js +93 -0
  26. package/dist/node/files.d.ts +18 -0
  27. package/dist/node/files.js +101 -0
  28. package/dist/node/process.d.ts +36 -0
  29. package/dist/node/process.js +144 -0
  30. package/dist/node/streams.d.ts +8 -0
  31. package/dist/node/streams.js +70 -0
  32. package/dist/proto/axern/common/file/v1/file.proto +31 -0
  33. package/dist/proto/axern/control/admin/v1/allocation_lifecycle.proto +91 -0
  34. package/dist/proto/axern/control/admin/v1/audit.proto +53 -0
  35. package/dist/proto/axern/control/admin/v1/node.proto +49 -0
  36. package/dist/proto/axern/control/admin/v1/reliability.proto +184 -0
  37. package/dist/proto/axern/control/admin/v1/service.proto +18 -0
  38. package/dist/proto/axern/control/admin/v1/storage.proto +81 -0
  39. package/dist/proto/axern/control/agentprofile/v1/agent_profile.proto +169 -0
  40. package/dist/proto/axern/control/catalog/v1/catalog.proto +127 -0
  41. package/dist/proto/axern/control/common/v1/common.proto +171 -0
  42. package/dist/proto/axern/control/environment/v1/environment.proto +94 -0
  43. package/dist/proto/axern/control/function/v1/function.proto +130 -0
  44. package/dist/proto/axern/control/function/v1/function_types.proto +233 -0
  45. package/dist/proto/axern/control/gateway/v1/gateway.proto +60 -0
  46. package/dist/proto/axern/control/namespace/v1/namespace.proto +52 -0
  47. package/dist/proto/axern/control/node/v1/node_control.proto +302 -0
  48. package/dist/proto/axern/control/quota/v1/quota.proto +113 -0
  49. package/dist/proto/axern/control/rollout/v1/rollout.proto +344 -0
  50. package/dist/proto/axern/control/run/v1/run.proto +88 -0
  51. package/dist/proto/axern/control/secret/v1/secret.proto +75 -0
  52. package/dist/proto/axern/control/service/v1/service.proto +96 -0
  53. package/dist/proto/axern/control/service/v1/service_event.proto +47 -0
  54. package/dist/proto/axern/control/service/v1/service_replica.proto +74 -0
  55. package/dist/proto/axern/control/service/v1/service_types.proto +155 -0
  56. package/dist/proto/axern/control/storage/v1/storage.proto +107 -0
  57. package/dist/proto/axern/control/storage/v1/storage_types.proto +125 -0
  58. package/dist/proto/axern/control/tunnel/v1/tunnel.proto +195 -0
  59. package/dist/proto/axern/data/artifact/v1/artifact.proto +19 -0
  60. package/dist/proto/axern/node/sandbox/v1/node.proto +652 -0
  61. package/dist/proto/axern/tunnel/v1/tunnel.proto +50 -0
  62. package/dist/resources.d.ts +13 -0
  63. package/dist/resources.js +107 -0
  64. package/dist/sandbox/archive.d.ts +8 -0
  65. package/dist/sandbox/archive.js +228 -0
  66. package/dist/sandbox/index.d.ts +86 -0
  67. package/dist/sandbox/index.js +204 -0
  68. package/dist/sandbox/lifecycle.d.ts +11 -0
  69. package/dist/sandbox/lifecycle.js +57 -0
  70. package/dist/tunnel/connector.d.ts +34 -0
  71. package/dist/tunnel/connector.js +141 -0
  72. package/dist/tunnel/control.d.ts +22 -0
  73. package/dist/tunnel/control.js +91 -0
  74. package/dist/tunnel/debug.d.ts +6 -0
  75. package/dist/tunnel/debug.js +19 -0
  76. package/dist/tunnel/relay.d.ts +17 -0
  77. package/dist/tunnel/relay.js +41 -0
  78. package/dist/tunnel/runtime.d.ts +34 -0
  79. package/dist/tunnel/runtime.js +118 -0
  80. package/dist/tunnel/session.d.ts +25 -0
  81. package/dist/tunnel/session.js +95 -0
  82. package/dist/tunnel/target.d.ts +7 -0
  83. package/dist/tunnel/target.js +28 -0
  84. package/dist/tunnel/types.d.ts +25 -0
  85. package/dist/tunnel/types.js +6 -0
  86. package/dist/types.d.ts +219 -0
  87. package/dist/types.js +8 -0
  88. package/dist/validation.d.ts +10 -0
  89. package/dist/validation.js +37 -0
  90. package/dist/version.d.ts +7 -0
  91. package/dist/version.js +9 -0
  92. package/package.json +57 -0
@@ -0,0 +1,344 @@
1
+ syntax = "proto3";
2
+
3
+ package axern.control.rollout.v1;
4
+
5
+ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/rollout/v1;rolloutv1";
6
+
7
+ import "google/protobuf/duration.proto";
8
+ import "google/protobuf/timestamp.proto";
9
+
10
+ enum RolloutStatus {
11
+ ROLLOUT_STATUS_UNSPECIFIED = 0;
12
+ ROLLOUT_STATUS_ACCEPTED = 1;
13
+ ROLLOUT_STATUS_PLANNING = 2;
14
+ ROLLOUT_STATUS_QUEUED = 3;
15
+ ROLLOUT_STATUS_RUNNING = 4;
16
+ ROLLOUT_STATUS_CANCELLING = 5;
17
+ ROLLOUT_STATUS_COMPLETED = 6;
18
+ ROLLOUT_STATUS_FAILED = 7;
19
+ ROLLOUT_STATUS_CANCELLED = 8;
20
+ ROLLOUT_STATUS_DELETING = 9;
21
+ ROLLOUT_STATUS_READY = 10;
22
+ }
23
+
24
+ enum RolloutStartPolicy {
25
+ ROLLOUT_START_POLICY_UNSPECIFIED = 0;
26
+ ROLLOUT_START_POLICY_MANUAL = 1;
27
+ ROLLOUT_START_POLICY_AUTO = 2;
28
+ }
29
+
30
+ enum EpisodeStatus {
31
+ EPISODE_STATUS_UNSPECIFIED = 0;
32
+ EPISODE_STATUS_PENDING = 1;
33
+ EPISODE_STATUS_LEASED = 2;
34
+ EPISODE_STATUS_STARTING = 3;
35
+ EPISODE_STATUS_AGENT_RUNNING = 4;
36
+ EPISODE_STATUS_VERIFYING = 5;
37
+ EPISODE_STATUS_COLLECTING = 6;
38
+ EPISODE_STATUS_COMPLETED = 7;
39
+ EPISODE_STATUS_FAILED = 8;
40
+ EPISODE_STATUS_CANCELLED = 9;
41
+ }
42
+
43
+ enum FailureClass {
44
+ FAILURE_CLASS_UNSPECIFIED = 0;
45
+ FAILURE_CLASS_AGENT = 1;
46
+ FAILURE_CLASS_VERIFIER = 2;
47
+ FAILURE_CLASS_INFRASTRUCTURE = 3;
48
+ FAILURE_CLASS_BUDGET = 4;
49
+ FAILURE_CLASS_METERING = 5;
50
+ }
51
+
52
+ enum ArtifactStatus {
53
+ ARTIFACT_STATUS_UNSPECIFIED = 0;
54
+ ARTIFACT_STATUS_PENDING = 1;
55
+ ARTIFACT_STATUS_PRESENT = 2;
56
+ ARTIFACT_STATUS_MISSING = 3;
57
+ ARTIFACT_STATUS_FAILED = 4;
58
+ ARTIFACT_STATUS_DELETED = 5;
59
+ }
60
+
61
+ message TaskSetSelection {
62
+ repeated string task_ids = 1;
63
+ int32 limit = 2;
64
+ int32 shard_index = 3;
65
+ int32 shard_count = 4;
66
+ }
67
+
68
+ message RolloutAgent {
69
+ string name = 1;
70
+ string image = 2;
71
+ string profile = 3;
72
+ string approval_policy = 4;
73
+ string command = 5;
74
+ }
75
+
76
+ enum PreflightCheckKind {
77
+ PREFLIGHT_CHECK_KIND_UNSPECIFIED = 0;
78
+ PREFLIGHT_CHECK_KIND_TASK_SET = 1;
79
+ PREFLIGHT_CHECK_KIND_SELECTION = 2;
80
+ PREFLIGHT_CHECK_KIND_PROFILE = 3;
81
+ PREFLIGHT_CHECK_KIND_PROVIDER = 4;
82
+ PREFLIGHT_CHECK_KIND_AGENT_BUNDLE = 5;
83
+ PREFLIGHT_CHECK_KIND_RUNTIME = 6;
84
+ PREFLIGHT_CHECK_KIND_WORKER_CAPABILITY = 7;
85
+ PREFLIGHT_CHECK_KIND_BUDGET = 8;
86
+ }
87
+
88
+ enum PreflightCheckStatus {
89
+ PREFLIGHT_CHECK_STATUS_UNSPECIFIED = 0;
90
+ PREFLIGHT_CHECK_STATUS_PASS = 1;
91
+ PREFLIGHT_CHECK_STATUS_WARN = 2;
92
+ PREFLIGHT_CHECK_STATUS_FAIL = 3;
93
+ }
94
+
95
+ message PreflightCheck {
96
+ PreflightCheckKind kind = 1;
97
+ PreflightCheckStatus status = 2;
98
+ string code = 3;
99
+ string message = 4;
100
+ bool retryable = 5;
101
+ int64 latency_ms = 6;
102
+ }
103
+
104
+ message PayloadVariant {
105
+ string format = 1;
106
+ string digest = 2;
107
+ string media_type = 3;
108
+ }
109
+
110
+ message PreflightUsage {
111
+ int64 input_tokens = 1;
112
+ int64 output_tokens = 2;
113
+ int64 cost_microusd = 3;
114
+ bool estimated = 4;
115
+ }
116
+
117
+ message PreflightReport {
118
+ string source_digest = 1;
119
+ string descriptor_digest = 2;
120
+ int32 task_count = 3;
121
+ int32 episode_count = 4;
122
+ string profile_id = 5;
123
+ string profile_name = 6;
124
+ int64 profile_version = 7;
125
+ int64 credential_version = 8;
126
+ string agent_bundle_digest = 9;
127
+ repeated PayloadVariant payload_variants = 10;
128
+ repeated PreflightCheck checks = 11;
129
+ repeated string warnings = 12;
130
+ PreflightUsage usage = 13;
131
+ }
132
+
133
+ message RolloutExecution {
134
+ string runtime_class = 1;
135
+ int32 concurrency = 2;
136
+ int32 attempts = 3;
137
+ }
138
+
139
+ message RolloutBudget {
140
+ google.protobuf.Duration max_wall_time = 1;
141
+ int32 max_episodes = 2;
142
+ int64 max_tokens = 3;
143
+ int64 max_cost_microusd = 4;
144
+ }
145
+
146
+ message RolloutSpec {
147
+ string task_set_ref = 1;
148
+ RolloutAgent agent = 2;
149
+ string model = 3;
150
+ RolloutExecution execution = 4;
151
+ TaskSetSelection selection = 5;
152
+ RolloutBudget budget = 6;
153
+ }
154
+
155
+ message RolloutSummary {
156
+ int32 task_count = 1;
157
+ int32 episode_count = 2;
158
+ int32 completed_episodes = 3;
159
+ int32 failed_episodes = 4;
160
+ int32 cancelled_episodes = 5;
161
+ int32 passed_episodes = 6;
162
+ int64 input_tokens = 7;
163
+ int64 cached_input_tokens = 8;
164
+ int64 output_tokens = 9;
165
+ int64 cost_microusd = 10;
166
+ int64 total_duration_ms = 11;
167
+ }
168
+
169
+ message Rollout {
170
+ string id = 1;
171
+ string namespace = 2;
172
+ RolloutSpec spec = 3;
173
+ RolloutStatus status = 4;
174
+ string source_digest = 5;
175
+ string descriptor_digest = 6;
176
+ string plan_artifact_id = 7;
177
+ RolloutSummary summary = 8;
178
+ string message = 9;
179
+ map<string, string> labels = 10;
180
+ int64 version = 11;
181
+ google.protobuf.Timestamp created_at = 12;
182
+ google.protobuf.Timestamp started_at = 13;
183
+ google.protobuf.Timestamp completed_at = 14;
184
+ google.protobuf.Timestamp deadline = 15;
185
+ RolloutStartPolicy start_policy = 16;
186
+ PreflightReport preflight = 17;
187
+ FailureClass failure_class = 18;
188
+ }
189
+
190
+ message ExecutionFacts {
191
+ string payload_format = 1;
192
+ string payload_digest = 2;
193
+ bool cache_hit = 3;
194
+ int64 image_resolve_ms = 4;
195
+ int64 image_pull_ms = 5;
196
+ int64 cow_prepare_ms = 6;
197
+ int64 verifier_materialize_ms = 7;
198
+ string allocation_id = 8;
199
+ string node_id = 9;
200
+ string runtime_class = 10;
201
+ string agent_bundle_digest = 11;
202
+ }
203
+
204
+ message Episode {
205
+ string id = 1;
206
+ string rollout_id = 2;
207
+ string task_id = 3;
208
+ string task_digest = 4;
209
+ int32 attempt_index = 5;
210
+ int64 execution_generation = 6;
211
+ EpisodeStatus status = 7;
212
+ FailureClass failure_class = 8;
213
+ bool passed = 9;
214
+ double reward = 10;
215
+ int64 input_tokens = 11;
216
+ int64 cached_input_tokens = 12;
217
+ int64 output_tokens = 13;
218
+ int64 cost_microusd = 14;
219
+ int64 duration_ms = 15;
220
+ ExecutionFacts execution_facts = 16;
221
+ string artifact_manifest_id = 17;
222
+ string message = 18;
223
+ google.protobuf.Timestamp created_at = 19;
224
+ google.protobuf.Timestamp started_at = 20;
225
+ google.protobuf.Timestamp completed_at = 21;
226
+ }
227
+
228
+ message RolloutEvent {
229
+ string rollout_id = 1;
230
+ int64 sequence = 2;
231
+ string episode_id = 3;
232
+ string type = 4;
233
+ string phase = 5;
234
+ string message = 6;
235
+ map<string, string> details = 7;
236
+ google.protobuf.Timestamp created_at = 8;
237
+ }
238
+
239
+ message Artifact {
240
+ string id = 1;
241
+ string rollout_id = 2;
242
+ string episode_id = 3;
243
+ int64 execution_generation = 4;
244
+ string kind = 5;
245
+ string name = 6;
246
+ string media_type = 7;
247
+ int64 size_bytes = 8;
248
+ string digest = 9;
249
+ ArtifactStatus status = 10;
250
+ string message = 11;
251
+ google.protobuf.Timestamp created_at = 12;
252
+ }
253
+
254
+ message RolloutListFilter {
255
+ string namespace = 1;
256
+ repeated RolloutStatus statuses = 2;
257
+ string task_set_digest = 3;
258
+ string agent = 4;
259
+ string model = 5;
260
+ map<string, string> labels = 6;
261
+ string cursor = 7;
262
+ int32 page_size = 8;
263
+ }
264
+
265
+ message CreateRolloutRequest {
266
+ string namespace = 1;
267
+ RolloutSpec spec = 2;
268
+ map<string, string> labels = 3;
269
+ string idempotency_key = 4;
270
+ RolloutStartPolicy start_policy = 5;
271
+ }
272
+
273
+ message CreateRolloutResponse { Rollout rollout = 1; }
274
+ message GetRolloutRequest { string rollout_id = 1; }
275
+ message GetRolloutResponse { Rollout rollout = 1; repeated Episode episodes = 2; }
276
+ message ListRolloutsRequest { RolloutListFilter filter = 1; }
277
+ message ListRolloutsResponse { repeated Rollout rollouts = 1; string next_cursor = 2; }
278
+ message WatchRolloutEventsRequest { string rollout_id = 1; int64 after_sequence = 2; }
279
+ message WatchRolloutEventsResponse { repeated RolloutEvent events = 1; int64 current_sequence = 2; bool terminal = 3; }
280
+ message CancelRolloutRequest { string rollout_id = 1; }
281
+ message CancelRolloutResponse { Rollout rollout = 1; }
282
+ message RetryRolloutRequest { string rollout_id = 1; }
283
+ message RetryRolloutResponse { Rollout rollout = 1; }
284
+ message StartRolloutRequest { string rollout_id = 1; string idempotency_key = 2; }
285
+ message StartRolloutResponse { Rollout rollout = 1; }
286
+
287
+ enum DiagnosisClass {
288
+ DIAGNOSIS_CLASS_UNSPECIFIED = 0;
289
+ DIAGNOSIS_CLASS_HEALTHY = 1;
290
+ DIAGNOSIS_CLASS_PLANNING_REJECTED = 2;
291
+ DIAGNOSIS_CLASS_QUEUE_WAITING = 3;
292
+ DIAGNOSIS_CLASS_WORKER_UNAVAILABLE = 4;
293
+ DIAGNOSIS_CLASS_PROFILE_PROVIDER_FAILURE = 5;
294
+ DIAGNOSIS_CLASS_CAPACITY_WAIT = 6;
295
+ DIAGNOSIS_CLASS_TASK_VERIFIER_FAILURE = 7;
296
+ DIAGNOSIS_CLASS_INFRASTRUCTURE_FAILURE = 8;
297
+ DIAGNOSIS_CLASS_BUDGET_EXHAUSTION = 9;
298
+ DIAGNOSIS_CLASS_CANCEL_PENDING = 10;
299
+ DIAGNOSIS_CLASS_INCOMPLETE_EVIDENCE = 11;
300
+ }
301
+
302
+ message DiagnoseRolloutRequest { string rollout_id = 1; }
303
+ message DiagnoseRolloutResponse {
304
+ Rollout rollout = 1;
305
+ DiagnosisClass diagnosis = 2;
306
+ string code = 3;
307
+ string summary = 4;
308
+ string recommended_action = 5;
309
+ repeated Artifact artifacts = 6;
310
+ }
311
+
312
+ message TaskComparison {
313
+ string task_id = 1;
314
+ string task_digest = 2;
315
+ map<string, double> rewards = 3;
316
+ map<string, bool> passed = 4;
317
+ map<string, int64> cost_microusd = 5;
318
+ bool comparable = 6;
319
+ string reason = 7;
320
+ }
321
+
322
+ message CompareRolloutsRequest { repeated string rollout_ids = 1; }
323
+ message CompareRolloutsResponse { repeated Rollout rollouts = 1; repeated TaskComparison tasks = 2; }
324
+ message ListArtifactsRequest { string rollout_id = 1; string episode_id = 2; }
325
+ message ListArtifactsResponse { repeated Artifact artifacts = 1; }
326
+ message PrepareArtifactDownloadRequest { string artifact_id = 1; }
327
+ message PrepareArtifactDownloadResponse { Artifact artifact = 1; string ticket = 2; google.protobuf.Timestamp expires_at = 3; }
328
+ message DeleteRolloutRequest { string rollout_id = 1; }
329
+ message DeleteRolloutResponse { Rollout rollout = 1; }
330
+
331
+ service RolloutControl {
332
+ rpc CreateRollout(CreateRolloutRequest) returns (CreateRolloutResponse) {}
333
+ rpc GetRollout(GetRolloutRequest) returns (GetRolloutResponse) {}
334
+ rpc ListRollouts(ListRolloutsRequest) returns (ListRolloutsResponse) {}
335
+ rpc WatchRolloutEvents(WatchRolloutEventsRequest) returns (stream WatchRolloutEventsResponse) {}
336
+ rpc StartRollout(StartRolloutRequest) returns (StartRolloutResponse) {}
337
+ rpc CancelRollout(CancelRolloutRequest) returns (CancelRolloutResponse) {}
338
+ rpc RetryRollout(RetryRolloutRequest) returns (RetryRolloutResponse) {}
339
+ rpc CompareRollouts(CompareRolloutsRequest) returns (CompareRolloutsResponse) {}
340
+ rpc DiagnoseRollout(DiagnoseRolloutRequest) returns (DiagnoseRolloutResponse) {}
341
+ rpc ListArtifacts(ListArtifactsRequest) returns (ListArtifactsResponse) {}
342
+ rpc PrepareArtifactDownload(PrepareArtifactDownloadRequest) returns (PrepareArtifactDownloadResponse) {}
343
+ rpc DeleteRollout(DeleteRolloutRequest) returns (DeleteRolloutResponse) {}
344
+ }
@@ -0,0 +1,88 @@
1
+ syntax = "proto3";
2
+
3
+ package axern.control.run.v1;
4
+
5
+ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/run/v1;runv1";
6
+
7
+ import "axern/control/common/v1/common.proto";
8
+ import "google/protobuf/timestamp.proto";
9
+
10
+ enum RunStatus {
11
+ RUN_STATUS_UNSPECIFIED = 0;
12
+ RUN_STATUS_QUEUED = 1;
13
+ RUN_STATUS_PLACED = 2;
14
+ RUN_STATUS_STARTING = 3;
15
+ RUN_STATUS_RUNNING = 4;
16
+ RUN_STATUS_SUCCEEDED = 5;
17
+ RUN_STATUS_FAILED = 6;
18
+ RUN_STATUS_CANCELLED = 7;
19
+ }
20
+
21
+ message Run {
22
+ string id = 1;
23
+ string namespace = 2;
24
+ string environment_id = 3;
25
+ string allocation_id = 4;
26
+ int64 attempt = 5;
27
+ RunStatus status = 6;
28
+ axern.control.common.v1.ExecutionConfig config = 7;
29
+ map<string, string> labels = 8;
30
+ int64 version = 9;
31
+ google.protobuf.Timestamp created_at = 10;
32
+ google.protobuf.Timestamp updated_at = 11;
33
+ int32 exit_code = 12;
34
+ bool exit_code_known = 13;
35
+ string message = 14;
36
+ axern.control.common.v1.WorkloadDiagnosticCode diagnostic_code = 15;
37
+ }
38
+
39
+ message RunListFilter {
40
+ string namespace = 1;
41
+ repeated RunStatus statuses = 2;
42
+ map<string, string> labels = 3;
43
+ string cursor = 4;
44
+ int32 page_size = 5;
45
+ }
46
+
47
+ message CreateRunRequest {
48
+ string namespace = 1;
49
+ string environment_id = 2;
50
+ axern.control.common.v1.ExecutionConfig config = 3;
51
+ map<string, string> labels = 4;
52
+ }
53
+
54
+ message CreateRunResponse {
55
+ Run run = 1;
56
+ }
57
+
58
+ message GetRunRequest {
59
+ string run_id = 1;
60
+ }
61
+
62
+ message GetRunResponse {
63
+ Run run = 1;
64
+ }
65
+
66
+ message ListRunsRequest {
67
+ RunListFilter filter = 1;
68
+ }
69
+
70
+ message ListRunsResponse {
71
+ repeated Run runs = 1;
72
+ string next_cursor = 2;
73
+ }
74
+
75
+ message CancelRunRequest {
76
+ string run_id = 1;
77
+ }
78
+
79
+ message CancelRunResponse {
80
+ Run run = 1;
81
+ }
82
+
83
+ service RunControl {
84
+ rpc CreateRun(CreateRunRequest) returns (CreateRunResponse) {}
85
+ rpc GetRun(GetRunRequest) returns (GetRunResponse) {}
86
+ rpc ListRuns(ListRunsRequest) returns (ListRunsResponse) {}
87
+ rpc CancelRun(CancelRunRequest) returns (CancelRunResponse) {}
88
+ }
@@ -0,0 +1,75 @@
1
+ syntax = "proto3";
2
+
3
+ package axern.control.secret.v1;
4
+
5
+ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/secret/v1;secretv1";
6
+
7
+ import "google/protobuf/timestamp.proto";
8
+
9
+ enum SecretType {
10
+ SECRET_TYPE_UNSPECIFIED = 0;
11
+ SECRET_TYPE_OPAQUE = 1;
12
+ SECRET_TYPE_DOCKER_CONFIG_JSON = 2;
13
+ }
14
+
15
+ message Secret {
16
+ string id = 1;
17
+ string namespace = 2;
18
+ SecretType type = 3;
19
+ repeated string data_keys = 4;
20
+ map<string, string> labels = 5;
21
+ int64 version = 6;
22
+ google.protobuf.Timestamp created_at = 7;
23
+ google.protobuf.Timestamp updated_at = 8;
24
+ }
25
+
26
+ message SecretListFilter {
27
+ string namespace = 1;
28
+ SecretType type = 2;
29
+ map<string, string> labels = 3;
30
+ string cursor = 4;
31
+ int32 page_size = 5;
32
+ }
33
+
34
+ message CreateSecretRequest {
35
+ string namespace = 1;
36
+ SecretType type = 2;
37
+ map<string, string> string_data = 3;
38
+ map<string, string> labels = 4;
39
+ }
40
+
41
+ message CreateSecretResponse {
42
+ Secret secret = 1;
43
+ }
44
+
45
+ message GetSecretRequest {
46
+ string secret_id = 1;
47
+ }
48
+
49
+ message GetSecretResponse {
50
+ Secret secret = 1;
51
+ }
52
+
53
+ message ListSecretsRequest {
54
+ SecretListFilter filter = 1;
55
+ }
56
+
57
+ message ListSecretsResponse {
58
+ repeated Secret secrets = 1;
59
+ string next_cursor = 2;
60
+ }
61
+
62
+ message DeleteSecretRequest {
63
+ string secret_id = 1;
64
+ }
65
+
66
+ message DeleteSecretResponse {
67
+ Secret secret = 1;
68
+ }
69
+
70
+ service SecretControl {
71
+ rpc CreateSecret(CreateSecretRequest) returns (CreateSecretResponse) {}
72
+ rpc GetSecret(GetSecretRequest) returns (GetSecretResponse) {}
73
+ rpc ListSecrets(ListSecretsRequest) returns (ListSecretsResponse) {}
74
+ rpc DeleteSecret(DeleteSecretRequest) returns (DeleteSecretResponse) {}
75
+ }
@@ -0,0 +1,96 @@
1
+ syntax = "proto3";
2
+
3
+ package axern.control.service.v1;
4
+
5
+ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/service/v1;servicev1";
6
+
7
+ import "axern/control/common/v1/common.proto";
8
+ import "axern/control/service/v1/service_event.proto";
9
+ import "axern/control/service/v1/service_replica.proto";
10
+ import "axern/control/service/v1/service_types.proto";
11
+ import "google/protobuf/field_mask.proto";
12
+
13
+ message CreateServiceRequest {
14
+ string namespace = 1;
15
+ string environment_id = 2;
16
+ int32 replicas = 3;
17
+ axern.control.common.v1.ExecutionConfig config = 4;
18
+ map<string, string> labels = 5;
19
+ ServiceRolloutPolicy rollout_policy = 6;
20
+ ServiceProbe readiness_probe = 7;
21
+ ServiceProbe liveness_probe = 8;
22
+ ServiceAutoscalingPolicy autoscaling_policy = 9;
23
+ }
24
+
25
+ message CreateServiceResponse {
26
+ Service service = 1;
27
+ }
28
+
29
+ message GetServiceRequest {
30
+ string service_id = 1;
31
+ }
32
+
33
+ message GetServiceResponse {
34
+ Service service = 1;
35
+ }
36
+
37
+ message WatchServiceRequest {
38
+ string service_id = 1;
39
+ // Last observed service version. Zero starts with the current snapshot.
40
+ int64 after_version = 2;
41
+ }
42
+
43
+ message WatchServiceResponse {
44
+ Service service = 1;
45
+ }
46
+
47
+ message ListServicesRequest {
48
+ ServiceListFilter filter = 1;
49
+ }
50
+
51
+ message ListServicesResponse {
52
+ repeated Service services = 1;
53
+ string next_cursor = 2;
54
+ }
55
+
56
+ message UpdateServiceRequest {
57
+ string service_id = 1;
58
+ int64 expected_version = 2;
59
+ optional int32 replicas = 3;
60
+ axern.control.common.v1.ExecutionConfig config = 4;
61
+ map<string, string> labels = 5;
62
+ google.protobuf.FieldMask update_mask = 6;
63
+ ServiceRolloutPolicy rollout_policy = 7;
64
+ optional string environment_id = 8;
65
+ ServiceProbe readiness_probe = 9;
66
+ ServiceProbe liveness_probe = 10;
67
+ ServiceAutoscalingPolicy autoscaling_policy = 11;
68
+ }
69
+
70
+ message UpdateServiceResponse {
71
+ Service service = 1;
72
+ }
73
+
74
+ message DeleteServiceRequest {
75
+ string service_id = 1;
76
+ int64 expected_version = 2;
77
+ bool require_suspended = 3;
78
+ ServiceVolumeDisposition volume_disposition = 4;
79
+ }
80
+
81
+ message DeleteServiceResponse {
82
+ Service service = 1;
83
+ }
84
+
85
+ service ServiceControl {
86
+ rpc CreateService(CreateServiceRequest) returns (CreateServiceResponse) {}
87
+ rpc GetService(GetServiceRequest) returns (GetServiceResponse) {}
88
+ // Streams monotonically newer authoritative snapshots. Intermediate versions may be coalesced.
89
+ rpc WatchService(WatchServiceRequest) returns (stream WatchServiceResponse) {}
90
+ rpc GetServiceReplica(GetServiceReplicaRequest) returns (GetServiceReplicaResponse) {}
91
+ rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {}
92
+ rpc ListServiceReplicas(ListServiceReplicasRequest) returns (ListServiceReplicasResponse) {}
93
+ rpc ListServiceEvents(ListServiceEventsRequest) returns (ListServiceEventsResponse) {}
94
+ rpc UpdateService(UpdateServiceRequest) returns (UpdateServiceResponse) {}
95
+ rpc DeleteService(DeleteServiceRequest) returns (DeleteServiceResponse) {}
96
+ }
@@ -0,0 +1,47 @@
1
+ syntax = "proto3";
2
+
3
+ package axern.control.service.v1;
4
+
5
+ option go_package = "github.com/cofy-x/axern/sdk/go/gen/axern/control/service/v1;servicev1";
6
+
7
+ import "axern/control/service/v1/service_types.proto";
8
+ import "axern/control/common/v1/common.proto";
9
+ import "google/protobuf/timestamp.proto";
10
+
11
+ enum ServiceEventType {
12
+ SERVICE_EVENT_TYPE_UNSPECIFIED = 0;
13
+ SERVICE_EVENT_TYPE_ROLLOUT_STARTED = 1;
14
+ SERVICE_EVENT_TYPE_REPLACEMENT_ADMITTED = 2;
15
+ SERVICE_EVENT_TYPE_REPLACEMENT_BLOCKED = 3;
16
+ SERVICE_EVENT_TYPE_REPLACEMENT_RUNNING = 4;
17
+ SERVICE_EVENT_TYPE_OUTDATED_DRAINED = 5;
18
+ SERVICE_EVENT_TYPE_SERVICE_DEGRADED = 6;
19
+ SERVICE_EVENT_TYPE_SERVICE_RECOVERED = 7;
20
+ SERVICE_EVENT_TYPE_REPLACEMENT_READY = 8;
21
+ SERVICE_EVENT_TYPE_LIVENESS_FAILED = 9;
22
+ SERVICE_EVENT_TYPE_AUTOSCALE_TARGET_CHANGED = 10;
23
+ SERVICE_EVENT_TYPE_DELETION_REQUESTED = 11;
24
+ SERVICE_EVENT_TYPE_VOLUME_RECLAIM_RETRY = 12;
25
+ SERVICE_EVENT_TYPE_VOLUME_RECLAIMED = 13;
26
+ SERVICE_EVENT_TYPE_DELETION_COMPLETED = 14;
27
+ }
28
+
29
+ message ServiceEvent {
30
+ string id = 1;
31
+ string service_id = 2;
32
+ string replica_id = 3;
33
+ ServiceEventType type = 4;
34
+ ServiceRolloutPhase phase = 5;
35
+ axern.control.common.v1.WorkloadDiagnosticCode diagnostic_code = 6;
36
+ string message = 7;
37
+ google.protobuf.Timestamp created_at = 8;
38
+ }
39
+
40
+ message ListServiceEventsRequest {
41
+ string service_id = 1;
42
+ int32 limit = 2;
43
+ }
44
+
45
+ message ListServiceEventsResponse {
46
+ repeated ServiceEvent events = 1;
47
+ }