@xeonr/pipelines-sdk 0.0.0-stage → 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.
- package/README.md +334 -2
- package/dist/auth.d.ts +72 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +139 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +129 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +106 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +113 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +115 -0
- package/dist/errors.js.map +1 -0
- package/dist/gen/buf/validate/validate_pb.d.ts +4828 -0
- package/dist/gen/buf/validate/validate_pb.d.ts.map +1 -0
- package/dist/gen/buf/validate/validate_pb.js +357 -0
- package/dist/gen/buf/validate/validate_pb.js.map +1 -0
- package/dist/gen/gnostic/openapi/v3/annotations_pb.d.ts +24 -0
- package/dist/gen/gnostic/openapi/v3/annotations_pb.d.ts.map +1 -0
- package/dist/gen/gnostic/openapi/v3/annotations_pb.js +37 -0
- package/dist/gen/gnostic/openapi/v3/annotations_pb.js.map +1 -0
- package/dist/gen/gnostic/openapi/v3/openapiv3_pb.d.ts +2245 -0
- package/dist/gen/gnostic/openapi/v3/openapiv3_pb.d.ts.map +1 -0
- package/dist/gen/gnostic/openapi/v3/openapiv3_pb.js +410 -0
- package/dist/gen/gnostic/openapi/v3/openapiv3_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +1031 -0
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js +219 -0
- package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/runners_pb.d.ts +190 -0
- package/dist/gen/xeonr/pipelines/private/v1/runners_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/runners_pb.js +53 -0
- package/dist/gen/xeonr/pipelines/private/v1/runners_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts +1161 -0
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js +269 -0
- package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts +1061 -0
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +221 -0
- package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +580 -0
- package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/common_pb.js +483 -0
- package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +762 -0
- package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js +190 -0
- package/dist/gen/xeonr/pipelines/v1/definition_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts +919 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js +272 -0
- package/dist/gen/xeonr/pipelines/v1/pools_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +895 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js +277 -0
- package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +1237 -0
- package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js +204 -0
- package/dist/gen/xeonr/pipelines/v1/runs_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts +647 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js +181 -0
- package/dist/gen/xeonr/pipelines/v1/secrets_pb.js.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.d.ts +381 -0
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.js +145 -0
- package/dist/gen/xeonr/pipelines/v1/sinks_pb.js.map +1 -0
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts +313 -0
- package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -0
- package/dist/gen/xeonr/platform/v1/options_pb.js +235 -0
- package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -0
- package/dist/handler.d.ts +94 -0
- package/dist/handler.d.ts.map +1 -0
- package/dist/handler.js +18 -0
- package/dist/handler.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/time.d.ts +8 -0
- package/dist/internal/time.d.ts.map +1 -0
- package/dist/internal/time.js +25 -0
- package/dist/internal/time.js.map +1 -0
- package/dist/logship.d.ts +117 -0
- package/dist/logship.d.ts.map +1 -0
- package/dist/logship.js +319 -0
- package/dist/logship.js.map +1 -0
- package/dist/testing/index.d.ts +215 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +1015 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/transport.d.ts +43 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +44 -0
- package/dist/transport.js.map +1 -0
- package/dist/worker.d.ts +236 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +733 -0
- package/dist/worker.js.map +1 -0
- package/package.json +70 -3
|
@@ -0,0 +1,1061 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Duration, Timestamp, Value } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { AttemptState, PackageRef, Resource, SecretType, Termination } from "../../v1/common_pb.js";
|
|
4
|
+
import type { Artifact, Cache, RunsOn, SecretGrant, Service } from "../../v1/definition_pb.js";
|
|
5
|
+
import type { Manifest } from "../../v1/registry_pb.js";
|
|
6
|
+
import type { JsonObject, Message } from "@bufbuild/protobuf";
|
|
7
|
+
/**
|
|
8
|
+
* Describes the file xeonr/pipelines/private/v1/worker.proto.
|
|
9
|
+
*/
|
|
10
|
+
export declare const file_xeonr_pipelines_private_v1_worker: GenFile;
|
|
11
|
+
/**
|
|
12
|
+
* AttemptRef names an attempt as one worker holds it. Every worker-side call
|
|
13
|
+
* carries it, and the server matches its fields (with the caller's
|
|
14
|
+
* credential) before it writes.
|
|
15
|
+
*
|
|
16
|
+
* @generated from message xeonr.pipelines.private.v1.AttemptRef
|
|
17
|
+
*/
|
|
18
|
+
export type AttemptRef = Message<"xeonr.pipelines.private.v1.AttemptRef"> & {
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: string attempt_id = 1;
|
|
21
|
+
*/
|
|
22
|
+
attemptId: string;
|
|
23
|
+
/**
|
|
24
|
+
* ClaimEpoch is the epoch the claim returned. It grows each time the
|
|
25
|
+
* attempt is claimed, so a worker holding an older claim cannot write.
|
|
26
|
+
*
|
|
27
|
+
* @generated from field: uint64 claim_epoch = 2;
|
|
28
|
+
*/
|
|
29
|
+
claimEpoch: bigint;
|
|
30
|
+
/**
|
|
31
|
+
* WorkerID is the SDK worker process that holds the claim: the server
|
|
32
|
+
* sets it in ClaimedAttempt.ref to the `worker_id` of the HandlerSelector
|
|
33
|
+
* the attempt was claimed with, and the worker sends the ref back as it
|
|
34
|
+
* got it on every later call. For an attempt claimed by handler the
|
|
35
|
+
* server requires it and matches it against the worker recorded at the
|
|
36
|
+
* claim, together with the claim epoch and the owner's credential, so one
|
|
37
|
+
* replica of a product cannot write to another replica's attempt; empty
|
|
38
|
+
* or different answers `failed_precondition`, like any other miss. Empty
|
|
39
|
+
* for a runner agent's claim, whose runner its credential names; the
|
|
40
|
+
* server refuses a non-empty one there the same way. Milestone 2.
|
|
41
|
+
*
|
|
42
|
+
* @generated from field: string worker_id = 3;
|
|
43
|
+
*/
|
|
44
|
+
workerId: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Describes the message xeonr.pipelines.private.v1.AttemptRef.
|
|
48
|
+
* Use `create(AttemptRefSchema)` to create a new message.
|
|
49
|
+
*/
|
|
50
|
+
export declare const AttemptRefSchema: GenMessage<AttemptRef>;
|
|
51
|
+
/**
|
|
52
|
+
* PoolSelector claims for the runner's own pool. It is empty on purpose: the
|
|
53
|
+
* pool comes from the runner credential, never from the request.
|
|
54
|
+
*
|
|
55
|
+
* @generated from message xeonr.pipelines.private.v1.PoolSelector
|
|
56
|
+
*/
|
|
57
|
+
export type PoolSelector = Message<"xeonr.pipelines.private.v1.PoolSelector"> & {};
|
|
58
|
+
/**
|
|
59
|
+
* Describes the message xeonr.pipelines.private.v1.PoolSelector.
|
|
60
|
+
* Use `create(PoolSelectorSchema)` to create a new message.
|
|
61
|
+
*/
|
|
62
|
+
export declare const PoolSelectorSchema: GenMessage<PoolSelector>;
|
|
63
|
+
/**
|
|
64
|
+
* HandlerSelector claims worker handlers for an SDK worker.
|
|
65
|
+
*
|
|
66
|
+
* @generated from message xeonr.pipelines.private.v1.HandlerSelector
|
|
67
|
+
*/
|
|
68
|
+
export type HandlerSelector = Message<"xeonr.pipelines.private.v1.HandlerSelector"> & {
|
|
69
|
+
/**
|
|
70
|
+
* Handlers are the handlers this process runs, as `<namespace>/<name>`.
|
|
71
|
+
* The caller's owner must own each namespace.
|
|
72
|
+
*
|
|
73
|
+
* @generated from field: repeated string handlers = 1;
|
|
74
|
+
*/
|
|
75
|
+
handlers: string[];
|
|
76
|
+
/**
|
|
77
|
+
* WorkerID identifies this worker process for the length of its life (a
|
|
78
|
+
* UUID it makes at boot). It stands where a runner id does in every
|
|
79
|
+
* compare-and-swap.
|
|
80
|
+
*
|
|
81
|
+
* @generated from field: string worker_id = 2;
|
|
82
|
+
*/
|
|
83
|
+
workerId: string;
|
|
84
|
+
/**
|
|
85
|
+
* PoolID is the `sdk` pool the worker declared, whose capacity bounds what
|
|
86
|
+
* its instances run at once.
|
|
87
|
+
*
|
|
88
|
+
* @generated from field: string pool_id = 3;
|
|
89
|
+
*/
|
|
90
|
+
poolId: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Describes the message xeonr.pipelines.private.v1.HandlerSelector.
|
|
94
|
+
* Use `create(HandlerSelectorSchema)` to create a new message.
|
|
95
|
+
*/
|
|
96
|
+
export declare const HandlerSelectorSchema: GenMessage<HandlerSelector>;
|
|
97
|
+
/**
|
|
98
|
+
* BlobInput describes one blob staged for an input. It carries no URL: the
|
|
99
|
+
* sidecar asks AttemptService.GetBlobInput for one when it stages the file.
|
|
100
|
+
*
|
|
101
|
+
* @generated from message xeonr.pipelines.private.v1.BlobInput
|
|
102
|
+
*/
|
|
103
|
+
export type BlobInput = Message<"xeonr.pipelines.private.v1.BlobInput"> & {
|
|
104
|
+
/**
|
|
105
|
+
* Input is the manifest input the blob is for; or, with `from_artifact`,
|
|
106
|
+
* the artifact's name.
|
|
107
|
+
*
|
|
108
|
+
* @generated from field: string input = 1;
|
|
109
|
+
*/
|
|
110
|
+
input: string;
|
|
111
|
+
/**
|
|
112
|
+
* Index orders the blobs of an input that takes several.
|
|
113
|
+
*
|
|
114
|
+
* @generated from field: uint32 index = 2;
|
|
115
|
+
*/
|
|
116
|
+
index: number;
|
|
117
|
+
/**
|
|
118
|
+
* @generated from field: string filename = 3;
|
|
119
|
+
*/
|
|
120
|
+
filename: string;
|
|
121
|
+
/**
|
|
122
|
+
* @generated from field: uint64 size_bytes = 4;
|
|
123
|
+
*/
|
|
124
|
+
sizeBytes: bigint;
|
|
125
|
+
/**
|
|
126
|
+
* Sha256 is the content's digest, in hex; the sidecar verifies it.
|
|
127
|
+
*
|
|
128
|
+
* @generated from field: string sha256 = 5;
|
|
129
|
+
*/
|
|
130
|
+
sha256: string;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from field: string media_type = 6;
|
|
133
|
+
*/
|
|
134
|
+
mediaType: string;
|
|
135
|
+
/**
|
|
136
|
+
* FromArtifact says the blob is an upstream node's artifact staged into
|
|
137
|
+
* the work directory by a `needs` edge, not a declared input.
|
|
138
|
+
*
|
|
139
|
+
* @generated from field: bool from_artifact = 7;
|
|
140
|
+
*/
|
|
141
|
+
fromArtifact: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Node is the upstream node the artifact is from, with `from_artifact`.
|
|
144
|
+
*
|
|
145
|
+
* @generated from field: string node = 8;
|
|
146
|
+
*/
|
|
147
|
+
node: string;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Describes the message xeonr.pipelines.private.v1.BlobInput.
|
|
151
|
+
* Use `create(BlobInputSchema)` to create a new message.
|
|
152
|
+
*/
|
|
153
|
+
export declare const BlobInputSchema: GenMessage<BlobInput>;
|
|
154
|
+
/**
|
|
155
|
+
* PinnedService is a service container with its image pinned to a digest.
|
|
156
|
+
*
|
|
157
|
+
* @generated from message xeonr.pipelines.private.v1.PinnedService
|
|
158
|
+
*/
|
|
159
|
+
export type PinnedService = Message<"xeonr.pipelines.private.v1.PinnedService"> & {
|
|
160
|
+
/**
|
|
161
|
+
* @generated from field: xeonr.pipelines.v1.Service service = 1;
|
|
162
|
+
*/
|
|
163
|
+
service?: Service | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Image is the reference to pull: repository and digest.
|
|
166
|
+
*
|
|
167
|
+
* @generated from field: string image = 2;
|
|
168
|
+
*/
|
|
169
|
+
image: string;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Describes the message xeonr.pipelines.private.v1.PinnedService.
|
|
173
|
+
* Use `create(PinnedServiceSchema)` to create a new message.
|
|
174
|
+
*/
|
|
175
|
+
export declare const PinnedServiceSchema: GenMessage<PinnedService>;
|
|
176
|
+
/**
|
|
177
|
+
* ClaimedAttempt is one attempt as handed to the worker that claimed it:
|
|
178
|
+
* everything needed to run it, and nothing that is a secret.
|
|
179
|
+
*
|
|
180
|
+
* @generated from message xeonr.pipelines.private.v1.ClaimedAttempt
|
|
181
|
+
*/
|
|
182
|
+
export type ClaimedAttempt = Message<"xeonr.pipelines.private.v1.ClaimedAttempt"> & {
|
|
183
|
+
/**
|
|
184
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
185
|
+
*/
|
|
186
|
+
ref?: AttemptRef | undefined;
|
|
187
|
+
/**
|
|
188
|
+
* @generated from field: string run_id = 2;
|
|
189
|
+
*/
|
|
190
|
+
runId: string;
|
|
191
|
+
/**
|
|
192
|
+
* @generated from field: string node_id = 3;
|
|
193
|
+
*/
|
|
194
|
+
nodeId: string;
|
|
195
|
+
/**
|
|
196
|
+
* Number counts the node's attempts from 1.
|
|
197
|
+
*
|
|
198
|
+
* @generated from field: uint32 number = 4;
|
|
199
|
+
*/
|
|
200
|
+
number: number;
|
|
201
|
+
/**
|
|
202
|
+
* Tenant is the team the run belongs to.
|
|
203
|
+
*
|
|
204
|
+
* @generated from field: string tenant = 5;
|
|
205
|
+
*/
|
|
206
|
+
tenant: string;
|
|
207
|
+
/**
|
|
208
|
+
* Tier is the trust tier computed for the attempt.
|
|
209
|
+
*
|
|
210
|
+
* @generated from field: string tier = 6;
|
|
211
|
+
*/
|
|
212
|
+
tier: string;
|
|
213
|
+
/**
|
|
214
|
+
* LeaseExpiresAt is when the claim lapses unless renewed.
|
|
215
|
+
*
|
|
216
|
+
* @generated from field: google.protobuf.Timestamp lease_expires_at = 7;
|
|
217
|
+
*/
|
|
218
|
+
leaseExpiresAt?: Timestamp | undefined;
|
|
219
|
+
/**
|
|
220
|
+
* HeartbeatInterval is how often to renew.
|
|
221
|
+
*
|
|
222
|
+
* @generated from field: google.protobuf.Duration heartbeat_interval = 8;
|
|
223
|
+
*/
|
|
224
|
+
heartbeatInterval?: Duration | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* SealKeyIndex is the index, in the request's `seal_public_keys`, of the
|
|
227
|
+
* key this attempt's secrets are sealed to.
|
|
228
|
+
*
|
|
229
|
+
* @generated from field: uint32 seal_key_index = 9;
|
|
230
|
+
*/
|
|
231
|
+
sealKeyIndex: number;
|
|
232
|
+
/**
|
|
233
|
+
* HasSecrets says the node was granted secrets: the worker must obtain
|
|
234
|
+
* them with GetAttemptSecrets before StartAttempt.
|
|
235
|
+
*
|
|
236
|
+
* @generated from field: bool has_secrets = 10;
|
|
237
|
+
*/
|
|
238
|
+
hasSecrets: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Package is the step package version, and Manifest its contract, as
|
|
241
|
+
* frozen in the run's snapshot.
|
|
242
|
+
*
|
|
243
|
+
* @generated from field: xeonr.pipelines.v1.PackageRef package = 11;
|
|
244
|
+
*/
|
|
245
|
+
package?: PackageRef | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* @generated from field: xeonr.pipelines.v1.Manifest manifest = 12;
|
|
248
|
+
*/
|
|
249
|
+
manifest?: Manifest | undefined;
|
|
250
|
+
/**
|
|
251
|
+
* Image is the digest-pinned reference the step runs in. Empty for a
|
|
252
|
+
* worker handler and for a host-runtime step.
|
|
253
|
+
*
|
|
254
|
+
* @generated from field: string image = 13;
|
|
255
|
+
*/
|
|
256
|
+
image: string;
|
|
257
|
+
/**
|
|
258
|
+
* Inputs are the resolved kv inputs, by manifest input name. For a worker
|
|
259
|
+
* handler this is its payload. Never a secret, never a URL.
|
|
260
|
+
*
|
|
261
|
+
* @generated from field: google.protobuf.Struct inputs = 14;
|
|
262
|
+
*/
|
|
263
|
+
inputs?: JsonObject | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* BlobInputs are the blobs to stage.
|
|
266
|
+
*
|
|
267
|
+
* @generated from field: repeated xeonr.pipelines.private.v1.BlobInput blob_inputs = 15;
|
|
268
|
+
*/
|
|
269
|
+
blobInputs: BlobInput[];
|
|
270
|
+
/**
|
|
271
|
+
* Services, Caches and Artifacts are the node's, with service images
|
|
272
|
+
* pinned.
|
|
273
|
+
*
|
|
274
|
+
* @generated from field: repeated xeonr.pipelines.private.v1.PinnedService services = 16;
|
|
275
|
+
*/
|
|
276
|
+
services: PinnedService[];
|
|
277
|
+
/**
|
|
278
|
+
* @generated from field: repeated xeonr.pipelines.v1.Cache caches = 17;
|
|
279
|
+
*/
|
|
280
|
+
caches: Cache[];
|
|
281
|
+
/**
|
|
282
|
+
* @generated from field: repeated xeonr.pipelines.v1.Artifact artifacts = 18;
|
|
283
|
+
*/
|
|
284
|
+
artifacts: Artifact[];
|
|
285
|
+
/**
|
|
286
|
+
* SecretGrants are the names, types and targets of the node's granted
|
|
287
|
+
* secrets (no values), so the worker knows how to expose what it unseals.
|
|
288
|
+
*
|
|
289
|
+
* @generated from field: repeated xeonr.pipelines.v1.SecretGrant secret_grants = 19;
|
|
290
|
+
*/
|
|
291
|
+
secretGrants: SecretGrant[];
|
|
292
|
+
/**
|
|
293
|
+
* RunsOn is what the node asked of its pool.
|
|
294
|
+
*
|
|
295
|
+
* @generated from field: xeonr.pipelines.v1.RunsOn runs_on = 20;
|
|
296
|
+
*/
|
|
297
|
+
runsOn?: RunsOn | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* Capabilities are what the attempt is granted: the manifest's and the
|
|
300
|
+
* node's, all of which the pool offers.
|
|
301
|
+
*
|
|
302
|
+
* @generated from field: repeated string capabilities = 21;
|
|
303
|
+
*/
|
|
304
|
+
capabilities: string[];
|
|
305
|
+
/**
|
|
306
|
+
* Timeout bounds the attempt from StartAttempt, which returns the
|
|
307
|
+
* absolute deadline it produces.
|
|
308
|
+
*
|
|
309
|
+
* @generated from field: google.protobuf.Duration timeout = 22;
|
|
310
|
+
*/
|
|
311
|
+
timeout?: Duration | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* CancelGrace is how long the step gets to finish after a cancel.
|
|
314
|
+
*
|
|
315
|
+
* @generated from field: google.protobuf.Duration cancel_grace = 23;
|
|
316
|
+
*/
|
|
317
|
+
cancelGrace?: Duration | undefined;
|
|
318
|
+
/**
|
|
319
|
+
* IDTokenAudiences are the audiences the step may ask job identity tokens
|
|
320
|
+
* for.
|
|
321
|
+
*
|
|
322
|
+
* @generated from field: repeated string id_token_audiences = 24;
|
|
323
|
+
*/
|
|
324
|
+
idTokenAudiences: string[];
|
|
325
|
+
/**
|
|
326
|
+
* Resource, AttestedFacts and Variables are the run's. The worker exposes
|
|
327
|
+
* them to the step as context; it decides nothing from them.
|
|
328
|
+
*
|
|
329
|
+
* @generated from field: xeonr.pipelines.v1.Resource resource = 25;
|
|
330
|
+
*/
|
|
331
|
+
resource?: Resource | undefined;
|
|
332
|
+
/**
|
|
333
|
+
* @generated from field: google.protobuf.Struct attested_facts = 26;
|
|
334
|
+
*/
|
|
335
|
+
attestedFacts?: JsonObject | undefined;
|
|
336
|
+
/**
|
|
337
|
+
* @generated from field: google.protobuf.Struct variables = 27;
|
|
338
|
+
*/
|
|
339
|
+
variables?: JsonObject | undefined;
|
|
340
|
+
/**
|
|
341
|
+
* RunStartedAt is when the run started.
|
|
342
|
+
*
|
|
343
|
+
* @generated from field: google.protobuf.Timestamp run_started_at = 28;
|
|
344
|
+
*/
|
|
345
|
+
runStartedAt?: Timestamp | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* LogMaxBytes is the attempt's log cap. The worker stops sending at it and
|
|
348
|
+
* ends the log with a truncation marker.
|
|
349
|
+
*
|
|
350
|
+
* @generated from field: uint64 log_max_bytes = 29;
|
|
351
|
+
*/
|
|
352
|
+
logMaxBytes: bigint;
|
|
353
|
+
};
|
|
354
|
+
/**
|
|
355
|
+
* Describes the message xeonr.pipelines.private.v1.ClaimedAttempt.
|
|
356
|
+
* Use `create(ClaimedAttemptSchema)` to create a new message.
|
|
357
|
+
*/
|
|
358
|
+
export declare const ClaimedAttemptSchema: GenMessage<ClaimedAttempt>;
|
|
359
|
+
/**
|
|
360
|
+
* SecretValue is one secret as delivered to a worker.
|
|
361
|
+
*
|
|
362
|
+
* @generated from message xeonr.pipelines.private.v1.SecretValue
|
|
363
|
+
*/
|
|
364
|
+
export type SecretValue = Message<"xeonr.pipelines.private.v1.SecretValue"> & {
|
|
365
|
+
/**
|
|
366
|
+
* Name is the secret's name.
|
|
367
|
+
*
|
|
368
|
+
* @generated from field: string name = 1;
|
|
369
|
+
*/
|
|
370
|
+
name: string;
|
|
371
|
+
/**
|
|
372
|
+
* @generated from field: xeonr.pipelines.v1.SecretType type = 2;
|
|
373
|
+
*/
|
|
374
|
+
type: SecretType;
|
|
375
|
+
/**
|
|
376
|
+
* Target is the environment variable, or the file name, to expose it as.
|
|
377
|
+
*
|
|
378
|
+
* @generated from field: string target = 3;
|
|
379
|
+
*/
|
|
380
|
+
target: string;
|
|
381
|
+
/**
|
|
382
|
+
* @generated from field: bytes value = 4;
|
|
383
|
+
*/
|
|
384
|
+
value: Uint8Array;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Describes the message xeonr.pipelines.private.v1.SecretValue.
|
|
388
|
+
* Use `create(SecretValueSchema)` to create a new message.
|
|
389
|
+
*/
|
|
390
|
+
export declare const SecretValueSchema: GenMessage<SecretValue>;
|
|
391
|
+
/**
|
|
392
|
+
* SecretBundle is the plaintext of GetAttemptSecretsResponse.sealed_secrets
|
|
393
|
+
* once the worker opens it. It is never sent in the clear: it is defined
|
|
394
|
+
* here only so that both ends agree on the bytes inside the seal.
|
|
395
|
+
*
|
|
396
|
+
* @generated from message xeonr.pipelines.private.v1.SecretBundle
|
|
397
|
+
*/
|
|
398
|
+
export type SecretBundle = Message<"xeonr.pipelines.private.v1.SecretBundle"> & {
|
|
399
|
+
/**
|
|
400
|
+
* AttemptID and ClaimEpoch bind the bundle to one claim; a worker refuses
|
|
401
|
+
* a bundle that names another.
|
|
402
|
+
*
|
|
403
|
+
* @generated from field: string attempt_id = 1;
|
|
404
|
+
*/
|
|
405
|
+
attemptId: string;
|
|
406
|
+
/**
|
|
407
|
+
* @generated from field: uint64 claim_epoch = 2;
|
|
408
|
+
*/
|
|
409
|
+
claimEpoch: bigint;
|
|
410
|
+
/**
|
|
411
|
+
* @generated from field: repeated xeonr.pipelines.private.v1.SecretValue secrets = 3;
|
|
412
|
+
*/
|
|
413
|
+
secrets: SecretValue[];
|
|
414
|
+
};
|
|
415
|
+
/**
|
|
416
|
+
* Describes the message xeonr.pipelines.private.v1.SecretBundle.
|
|
417
|
+
* Use `create(SecretBundleSchema)` to create a new message.
|
|
418
|
+
*/
|
|
419
|
+
export declare const SecretBundleSchema: GenMessage<SecretBundle>;
|
|
420
|
+
/**
|
|
421
|
+
* Utilisation is what an attempt used, as its worker measured it.
|
|
422
|
+
*
|
|
423
|
+
* @generated from message xeonr.pipelines.private.v1.Utilisation
|
|
424
|
+
*/
|
|
425
|
+
export type Utilisation = Message<"xeonr.pipelines.private.v1.Utilisation"> & {
|
|
426
|
+
/**
|
|
427
|
+
* @generated from field: uint64 cpu_milliseconds = 1;
|
|
428
|
+
*/
|
|
429
|
+
cpuMilliseconds: bigint;
|
|
430
|
+
/**
|
|
431
|
+
* @generated from field: uint64 wall_time_milliseconds = 2;
|
|
432
|
+
*/
|
|
433
|
+
wallTimeMilliseconds: bigint;
|
|
434
|
+
/**
|
|
435
|
+
* @generated from field: uint64 peak_memory_bytes = 3;
|
|
436
|
+
*/
|
|
437
|
+
peakMemoryBytes: bigint;
|
|
438
|
+
/**
|
|
439
|
+
* @generated from field: uint64 blob_bytes_written = 4;
|
|
440
|
+
*/
|
|
441
|
+
blobBytesWritten: bigint;
|
|
442
|
+
};
|
|
443
|
+
/**
|
|
444
|
+
* Describes the message xeonr.pipelines.private.v1.Utilisation.
|
|
445
|
+
* Use `create(UtilisationSchema)` to create a new message.
|
|
446
|
+
*/
|
|
447
|
+
export declare const UtilisationSchema: GenMessage<Utilisation>;
|
|
448
|
+
/**
|
|
449
|
+
* @generated from message xeonr.pipelines.private.v1.ClaimAttemptsRequest
|
|
450
|
+
*/
|
|
451
|
+
export type ClaimAttemptsRequest = Message<"xeonr.pipelines.private.v1.ClaimAttemptsRequest"> & {
|
|
452
|
+
/**
|
|
453
|
+
* FreeSlots is how many attempts the worker can take now. The answer never
|
|
454
|
+
* holds more.
|
|
455
|
+
*
|
|
456
|
+
* @generated from field: uint32 free_slots = 1;
|
|
457
|
+
*/
|
|
458
|
+
freeSlots: number;
|
|
459
|
+
/**
|
|
460
|
+
* SealPublicKeys holds one fresh X25519 public key (32 bytes) per free
|
|
461
|
+
* slot. An attempt's secrets are sealed to the key at its
|
|
462
|
+
* `seal_key_index`; the worker keeps the private halves in memory only and
|
|
463
|
+
* drops each after use. A runner agent always sends them. An SDK worker
|
|
464
|
+
* sends none: the platform delivers no secrets to handlers.
|
|
465
|
+
*
|
|
466
|
+
* @generated from field: repeated bytes seal_public_keys = 2;
|
|
467
|
+
*/
|
|
468
|
+
sealPublicKeys: Uint8Array[];
|
|
469
|
+
/**
|
|
470
|
+
* Selector says what the worker claims for.
|
|
471
|
+
*
|
|
472
|
+
* @generated from oneof xeonr.pipelines.private.v1.ClaimAttemptsRequest.selector
|
|
473
|
+
*/
|
|
474
|
+
selector: {
|
|
475
|
+
/**
|
|
476
|
+
* Pool claims for the runner's pool, named by its credential.
|
|
477
|
+
*
|
|
478
|
+
* @generated from field: xeonr.pipelines.private.v1.PoolSelector pool = 3;
|
|
479
|
+
*/
|
|
480
|
+
value: PoolSelector;
|
|
481
|
+
case: "pool";
|
|
482
|
+
} | {
|
|
483
|
+
/**
|
|
484
|
+
* Handlers claims worker handlers. Milestone 2.
|
|
485
|
+
*
|
|
486
|
+
* @generated from field: xeonr.pipelines.private.v1.HandlerSelector handlers = 4;
|
|
487
|
+
*/
|
|
488
|
+
value: HandlerSelector;
|
|
489
|
+
case: "handlers";
|
|
490
|
+
} | {
|
|
491
|
+
case: undefined;
|
|
492
|
+
value?: undefined;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Wait is how long the server may hold the request. Unset means the most,
|
|
496
|
+
* 30 s.
|
|
497
|
+
*
|
|
498
|
+
* @generated from field: google.protobuf.Duration wait = 5;
|
|
499
|
+
*/
|
|
500
|
+
wait?: Duration | undefined;
|
|
501
|
+
};
|
|
502
|
+
/**
|
|
503
|
+
* Describes the message xeonr.pipelines.private.v1.ClaimAttemptsRequest.
|
|
504
|
+
* Use `create(ClaimAttemptsRequestSchema)` to create a new message.
|
|
505
|
+
*/
|
|
506
|
+
export declare const ClaimAttemptsRequestSchema: GenMessage<ClaimAttemptsRequest>;
|
|
507
|
+
/**
|
|
508
|
+
* @generated from message xeonr.pipelines.private.v1.ClaimAttemptsResponse
|
|
509
|
+
*/
|
|
510
|
+
export type ClaimAttemptsResponse = Message<"xeonr.pipelines.private.v1.ClaimAttemptsResponse"> & {
|
|
511
|
+
/**
|
|
512
|
+
* Attempts are the attempts claimed; empty when none became claimable.
|
|
513
|
+
*
|
|
514
|
+
* @generated from field: repeated xeonr.pipelines.private.v1.ClaimedAttempt attempts = 1;
|
|
515
|
+
*/
|
|
516
|
+
attempts: ClaimedAttempt[];
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* Describes the message xeonr.pipelines.private.v1.ClaimAttemptsResponse.
|
|
520
|
+
* Use `create(ClaimAttemptsResponseSchema)` to create a new message.
|
|
521
|
+
*/
|
|
522
|
+
export declare const ClaimAttemptsResponseSchema: GenMessage<ClaimAttemptsResponse>;
|
|
523
|
+
/**
|
|
524
|
+
* @generated from message xeonr.pipelines.private.v1.StartAttemptRequest
|
|
525
|
+
*/
|
|
526
|
+
export type StartAttemptRequest = Message<"xeonr.pipelines.private.v1.StartAttemptRequest"> & {
|
|
527
|
+
/**
|
|
528
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
529
|
+
*/
|
|
530
|
+
ref?: AttemptRef | undefined;
|
|
531
|
+
/**
|
|
532
|
+
* ImageDigest is the digest of the image the worker actually pulled, for
|
|
533
|
+
* the record. It must equal the claim's pinned digest when one was given.
|
|
534
|
+
*
|
|
535
|
+
* @generated from field: string image_digest = 2;
|
|
536
|
+
*/
|
|
537
|
+
imageDigest: string;
|
|
538
|
+
};
|
|
539
|
+
/**
|
|
540
|
+
* Describes the message xeonr.pipelines.private.v1.StartAttemptRequest.
|
|
541
|
+
* Use `create(StartAttemptRequestSchema)` to create a new message.
|
|
542
|
+
*/
|
|
543
|
+
export declare const StartAttemptRequestSchema: GenMessage<StartAttemptRequest>;
|
|
544
|
+
/**
|
|
545
|
+
* @generated from message xeonr.pipelines.private.v1.StartAttemptResponse
|
|
546
|
+
*/
|
|
547
|
+
export type StartAttemptResponse = Message<"xeonr.pipelines.private.v1.StartAttemptResponse"> & {
|
|
548
|
+
/**
|
|
549
|
+
* AttemptTokenSecret is the attempt token: an EdDSA JWT with audience
|
|
550
|
+
* `pipelines-api` whose claims name the attempt, run, node, tier, runner
|
|
551
|
+
* and claim epoch. It is shown here and nowhere else. The worker hands it
|
|
552
|
+
* to the sidecar and to nothing else; it must never reach the step.
|
|
553
|
+
*
|
|
554
|
+
* @generated from field: string attempt_token_secret = 1;
|
|
555
|
+
*/
|
|
556
|
+
attemptTokenSecret: string;
|
|
557
|
+
/**
|
|
558
|
+
* TokenExpiresAt is the deadline plus the cancel grace.
|
|
559
|
+
*
|
|
560
|
+
* @generated from field: google.protobuf.Timestamp token_expires_at = 2;
|
|
561
|
+
*/
|
|
562
|
+
tokenExpiresAt?: Timestamp | undefined;
|
|
563
|
+
/**
|
|
564
|
+
* Deadline is when the worker must stop the step.
|
|
565
|
+
*
|
|
566
|
+
* @generated from field: google.protobuf.Timestamp deadline = 3;
|
|
567
|
+
*/
|
|
568
|
+
deadline?: Timestamp | undefined;
|
|
569
|
+
};
|
|
570
|
+
/**
|
|
571
|
+
* Describes the message xeonr.pipelines.private.v1.StartAttemptResponse.
|
|
572
|
+
* Use `create(StartAttemptResponseSchema)` to create a new message.
|
|
573
|
+
*/
|
|
574
|
+
export declare const StartAttemptResponseSchema: GenMessage<StartAttemptResponse>;
|
|
575
|
+
/**
|
|
576
|
+
* @generated from message xeonr.pipelines.private.v1.HeartbeatRequest
|
|
577
|
+
*/
|
|
578
|
+
export type HeartbeatRequest = Message<"xeonr.pipelines.private.v1.HeartbeatRequest"> & {
|
|
579
|
+
/**
|
|
580
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
581
|
+
*/
|
|
582
|
+
ref?: AttemptRef | undefined;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* Describes the message xeonr.pipelines.private.v1.HeartbeatRequest.
|
|
586
|
+
* Use `create(HeartbeatRequestSchema)` to create a new message.
|
|
587
|
+
*/
|
|
588
|
+
export declare const HeartbeatRequestSchema: GenMessage<HeartbeatRequest>;
|
|
589
|
+
/**
|
|
590
|
+
* @generated from message xeonr.pipelines.private.v1.HeartbeatResponse
|
|
591
|
+
*/
|
|
592
|
+
export type HeartbeatResponse = Message<"xeonr.pipelines.private.v1.HeartbeatResponse"> & {
|
|
593
|
+
/**
|
|
594
|
+
* Cancel says the attempt's run was cancelled, or the attempt superseded:
|
|
595
|
+
* stop the step.
|
|
596
|
+
*
|
|
597
|
+
* @generated from field: bool cancel = 1;
|
|
598
|
+
*/
|
|
599
|
+
cancel: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* CancelReason is shown in the attempt's log.
|
|
602
|
+
*
|
|
603
|
+
* @generated from field: string cancel_reason = 2;
|
|
604
|
+
*/
|
|
605
|
+
cancelReason: string;
|
|
606
|
+
/**
|
|
607
|
+
* LeaseExpiresAt is the renewed lease.
|
|
608
|
+
*
|
|
609
|
+
* @generated from field: google.protobuf.Timestamp lease_expires_at = 3;
|
|
610
|
+
*/
|
|
611
|
+
leaseExpiresAt?: Timestamp | undefined;
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* Describes the message xeonr.pipelines.private.v1.HeartbeatResponse.
|
|
615
|
+
* Use `create(HeartbeatResponseSchema)` to create a new message.
|
|
616
|
+
*/
|
|
617
|
+
export declare const HeartbeatResponseSchema: GenMessage<HeartbeatResponse>;
|
|
618
|
+
/**
|
|
619
|
+
* @generated from message xeonr.pipelines.private.v1.AppendLogsRequest
|
|
620
|
+
*/
|
|
621
|
+
export type AppendLogsRequest = Message<"xeonr.pipelines.private.v1.AppendLogsRequest"> & {
|
|
622
|
+
/**
|
|
623
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
624
|
+
*/
|
|
625
|
+
ref?: AttemptRef | undefined;
|
|
626
|
+
/**
|
|
627
|
+
* Seq numbers the attempt's chunks from 0, without gaps.
|
|
628
|
+
*
|
|
629
|
+
* @generated from field: uint64 seq = 2;
|
|
630
|
+
*/
|
|
631
|
+
seq: bigint;
|
|
632
|
+
/**
|
|
633
|
+
* Data is the next bytes of the log, already masked.
|
|
634
|
+
*
|
|
635
|
+
* @generated from field: bytes data = 3;
|
|
636
|
+
*/
|
|
637
|
+
data: Uint8Array;
|
|
638
|
+
/**
|
|
639
|
+
* Final marks the last chunk: the worker will send no more.
|
|
640
|
+
*
|
|
641
|
+
* validate:skip a bool has no bounds
|
|
642
|
+
*
|
|
643
|
+
* @generated from field: bool final = 4;
|
|
644
|
+
*/
|
|
645
|
+
final: boolean;
|
|
646
|
+
};
|
|
647
|
+
/**
|
|
648
|
+
* Describes the message xeonr.pipelines.private.v1.AppendLogsRequest.
|
|
649
|
+
* Use `create(AppendLogsRequestSchema)` to create a new message.
|
|
650
|
+
*/
|
|
651
|
+
export declare const AppendLogsRequestSchema: GenMessage<AppendLogsRequest>;
|
|
652
|
+
/**
|
|
653
|
+
* @generated from message xeonr.pipelines.private.v1.AppendLogsResponse
|
|
654
|
+
*/
|
|
655
|
+
export type AppendLogsResponse = Message<"xeonr.pipelines.private.v1.AppendLogsResponse"> & {
|
|
656
|
+
/**
|
|
657
|
+
* NextSeq is the seq the server expects next.
|
|
658
|
+
*
|
|
659
|
+
* @generated from field: uint64 next_seq = 1;
|
|
660
|
+
*/
|
|
661
|
+
nextSeq: bigint;
|
|
662
|
+
/**
|
|
663
|
+
* Truncated says the log reached its cap: stop sending.
|
|
664
|
+
*
|
|
665
|
+
* @generated from field: bool truncated = 2;
|
|
666
|
+
*/
|
|
667
|
+
truncated: boolean;
|
|
668
|
+
};
|
|
669
|
+
/**
|
|
670
|
+
* Describes the message xeonr.pipelines.private.v1.AppendLogsResponse.
|
|
671
|
+
* Use `create(AppendLogsResponseSchema)` to create a new message.
|
|
672
|
+
*/
|
|
673
|
+
export declare const AppendLogsResponseSchema: GenMessage<AppendLogsResponse>;
|
|
674
|
+
/**
|
|
675
|
+
* @generated from message xeonr.pipelines.private.v1.CompleteAttemptRequest
|
|
676
|
+
*/
|
|
677
|
+
export type CompleteAttemptRequest = Message<"xeonr.pipelines.private.v1.CompleteAttemptRequest"> & {
|
|
678
|
+
/**
|
|
679
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
680
|
+
*/
|
|
681
|
+
ref?: AttemptRef | undefined;
|
|
682
|
+
/**
|
|
683
|
+
* Termination is how the attempt ended.
|
|
684
|
+
*
|
|
685
|
+
* @generated from field: xeonr.pipelines.v1.Termination termination = 2;
|
|
686
|
+
*/
|
|
687
|
+
termination: Termination;
|
|
688
|
+
/**
|
|
689
|
+
* ExitCode is the process's exit code, when one exited.
|
|
690
|
+
*
|
|
691
|
+
* @generated from field: optional int32 exit_code = 3;
|
|
692
|
+
*/
|
|
693
|
+
exitCode?: number | undefined;
|
|
694
|
+
/**
|
|
695
|
+
* KV are the attempt's kv outputs, by output slot. A sidecar that already
|
|
696
|
+
* wrote them through AttemptService.SetKVOutput sends none; a value given
|
|
697
|
+
* here replaces one written earlier for the same slot.
|
|
698
|
+
*
|
|
699
|
+
* @generated from field: map<string, google.protobuf.Value> kv = 4;
|
|
700
|
+
*/
|
|
701
|
+
kv: {
|
|
702
|
+
[key: string]: Value;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* Message is a short cause for a failure, shown with the attempt.
|
|
706
|
+
*
|
|
707
|
+
* @generated from field: string message = 5;
|
|
708
|
+
*/
|
|
709
|
+
message: string;
|
|
710
|
+
/**
|
|
711
|
+
* @generated from field: xeonr.pipelines.private.v1.Utilisation utilisation = 6;
|
|
712
|
+
*/
|
|
713
|
+
utilisation?: Utilisation | undefined;
|
|
714
|
+
/**
|
|
715
|
+
* HandlerFailureKind is the worker's word on whether a handler error can
|
|
716
|
+
* pass; only with TERMINATION_HANDLER_ERROR. The server stays the
|
|
717
|
+
* authority on whether a retry happens. Milestone 2.
|
|
718
|
+
*
|
|
719
|
+
* @generated from field: xeonr.pipelines.private.v1.HandlerFailureKind handler_failure_kind = 7;
|
|
720
|
+
*/
|
|
721
|
+
handlerFailureKind: HandlerFailureKind;
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Describes the message xeonr.pipelines.private.v1.CompleteAttemptRequest.
|
|
725
|
+
* Use `create(CompleteAttemptRequestSchema)` to create a new message.
|
|
726
|
+
*/
|
|
727
|
+
export declare const CompleteAttemptRequestSchema: GenMessage<CompleteAttemptRequest>;
|
|
728
|
+
/**
|
|
729
|
+
* @generated from message xeonr.pipelines.private.v1.CompleteAttemptResponse
|
|
730
|
+
*/
|
|
731
|
+
export type CompleteAttemptResponse = Message<"xeonr.pipelines.private.v1.CompleteAttemptResponse"> & {
|
|
732
|
+
/**
|
|
733
|
+
* State is the attempt's state after the completion.
|
|
734
|
+
*
|
|
735
|
+
* @generated from field: xeonr.pipelines.v1.AttemptState state = 1;
|
|
736
|
+
*/
|
|
737
|
+
state: AttemptState;
|
|
738
|
+
};
|
|
739
|
+
/**
|
|
740
|
+
* Describes the message xeonr.pipelines.private.v1.CompleteAttemptResponse.
|
|
741
|
+
* Use `create(CompleteAttemptResponseSchema)` to create a new message.
|
|
742
|
+
*/
|
|
743
|
+
export declare const CompleteAttemptResponseSchema: GenMessage<CompleteAttemptResponse>;
|
|
744
|
+
/**
|
|
745
|
+
* @generated from message xeonr.pipelines.private.v1.ReleaseAttemptRequest
|
|
746
|
+
*/
|
|
747
|
+
export type ReleaseAttemptRequest = Message<"xeonr.pipelines.private.v1.ReleaseAttemptRequest"> & {
|
|
748
|
+
/**
|
|
749
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
750
|
+
*/
|
|
751
|
+
ref?: AttemptRef | undefined;
|
|
752
|
+
/**
|
|
753
|
+
* Reason is a short cause, kept with the attempt's history (`worker
|
|
754
|
+
* shutting down`, `runner draining`).
|
|
755
|
+
*
|
|
756
|
+
* @generated from field: string reason = 2;
|
|
757
|
+
*/
|
|
758
|
+
reason: string;
|
|
759
|
+
};
|
|
760
|
+
/**
|
|
761
|
+
* Describes the message xeonr.pipelines.private.v1.ReleaseAttemptRequest.
|
|
762
|
+
* Use `create(ReleaseAttemptRequestSchema)` to create a new message.
|
|
763
|
+
*/
|
|
764
|
+
export declare const ReleaseAttemptRequestSchema: GenMessage<ReleaseAttemptRequest>;
|
|
765
|
+
/**
|
|
766
|
+
* @generated from message xeonr.pipelines.private.v1.ReleaseAttemptResponse
|
|
767
|
+
*/
|
|
768
|
+
export type ReleaseAttemptResponse = Message<"xeonr.pipelines.private.v1.ReleaseAttemptResponse"> & {
|
|
769
|
+
/**
|
|
770
|
+
* State is the attempt's state after the call: OFFERED when it was
|
|
771
|
+
* released, RUNNING when it had already started and was left alone.
|
|
772
|
+
*
|
|
773
|
+
* @generated from field: xeonr.pipelines.v1.AttemptState state = 1;
|
|
774
|
+
*/
|
|
775
|
+
state: AttemptState;
|
|
776
|
+
};
|
|
777
|
+
/**
|
|
778
|
+
* Describes the message xeonr.pipelines.private.v1.ReleaseAttemptResponse.
|
|
779
|
+
* Use `create(ReleaseAttemptResponseSchema)` to create a new message.
|
|
780
|
+
*/
|
|
781
|
+
export declare const ReleaseAttemptResponseSchema: GenMessage<ReleaseAttemptResponse>;
|
|
782
|
+
/**
|
|
783
|
+
* @generated from message xeonr.pipelines.private.v1.GetAttemptSecretsRequest
|
|
784
|
+
*/
|
|
785
|
+
export type GetAttemptSecretsRequest = Message<"xeonr.pipelines.private.v1.GetAttemptSecretsRequest"> & {
|
|
786
|
+
/**
|
|
787
|
+
* @generated from field: xeonr.pipelines.private.v1.AttemptRef ref = 1;
|
|
788
|
+
*/
|
|
789
|
+
ref?: AttemptRef | undefined;
|
|
790
|
+
/**
|
|
791
|
+
* Wait is how long the server may hold the request. Unset means the most,
|
|
792
|
+
* 30 s.
|
|
793
|
+
*
|
|
794
|
+
* @generated from field: google.protobuf.Duration wait = 2;
|
|
795
|
+
*/
|
|
796
|
+
wait?: Duration | undefined;
|
|
797
|
+
};
|
|
798
|
+
/**
|
|
799
|
+
* Describes the message xeonr.pipelines.private.v1.GetAttemptSecretsRequest.
|
|
800
|
+
* Use `create(GetAttemptSecretsRequestSchema)` to create a new message.
|
|
801
|
+
*/
|
|
802
|
+
export declare const GetAttemptSecretsRequestSchema: GenMessage<GetAttemptSecretsRequest>;
|
|
803
|
+
/**
|
|
804
|
+
* @generated from message xeonr.pipelines.private.v1.GetAttemptSecretsResponse
|
|
805
|
+
*/
|
|
806
|
+
export type GetAttemptSecretsResponse = Message<"xeonr.pipelines.private.v1.GetAttemptSecretsResponse"> & {
|
|
807
|
+
/**
|
|
808
|
+
* Ready says `sealed_secrets` is set. False means not sealed yet: ask
|
|
809
|
+
* again.
|
|
810
|
+
*
|
|
811
|
+
* @generated from field: bool ready = 1;
|
|
812
|
+
*/
|
|
813
|
+
ready: boolean;
|
|
814
|
+
/**
|
|
815
|
+
* SealedSecrets is a serialised SecretBundle in a libsodium sealed box
|
|
816
|
+
* (`crypto_box_seal`: X25519, XSalsa20-Poly1305) to the slot's public key.
|
|
817
|
+
* Only the worker holding that slot's private key can open it.
|
|
818
|
+
*
|
|
819
|
+
* @generated from field: bytes sealed_secrets = 2;
|
|
820
|
+
*/
|
|
821
|
+
sealedSecrets: Uint8Array;
|
|
822
|
+
};
|
|
823
|
+
/**
|
|
824
|
+
* Describes the message xeonr.pipelines.private.v1.GetAttemptSecretsResponse.
|
|
825
|
+
* Use `create(GetAttemptSecretsResponseSchema)` to create a new message.
|
|
826
|
+
*/
|
|
827
|
+
export declare const GetAttemptSecretsResponseSchema: GenMessage<GetAttemptSecretsResponse>;
|
|
828
|
+
/**
|
|
829
|
+
* HandlerFailureKind is what an SDK worker says of a handler's failure.
|
|
830
|
+
* The failure's class stays FAILURE_CLASS_HANDLER_ERROR either way: the
|
|
831
|
+
* platform classifies, and this only tells it whether the error can pass.
|
|
832
|
+
*
|
|
833
|
+
* @generated from enum xeonr.pipelines.private.v1.HandlerFailureKind
|
|
834
|
+
*/
|
|
835
|
+
export declare enum HandlerFailureKind {
|
|
836
|
+
/**
|
|
837
|
+
* The worker says nothing: the node's `Retry.when` alone decides, as for
|
|
838
|
+
* any class.
|
|
839
|
+
*
|
|
840
|
+
* @generated from enum value: HANDLER_FAILURE_KIND_UNSPECIFIED = 0;
|
|
841
|
+
*/
|
|
842
|
+
UNSPECIFIED = 0,
|
|
843
|
+
/**
|
|
844
|
+
* The error may pass on its own (a downstream timeout, a 503). The
|
|
845
|
+
* platform treats HANDLER_ERROR as transient for this attempt, so the
|
|
846
|
+
* default policy (an empty `Retry.when`) retries it. An explicit
|
|
847
|
+
* `Retry.when` applies as written, and `Retry.max` and backoff bound it
|
|
848
|
+
* as always.
|
|
849
|
+
*
|
|
850
|
+
* @generated from enum value: HANDLER_FAILURE_KIND_TRANSIENT = 1;
|
|
851
|
+
*/
|
|
852
|
+
TRANSIENT = 1,
|
|
853
|
+
/**
|
|
854
|
+
* The error will not pass (a payload that fails validation, a 4xx from a
|
|
855
|
+
* downstream service). The attempt is not retried, whatever `Retry.when`
|
|
856
|
+
* lists: a worker can narrow the policy, never widen it.
|
|
857
|
+
*
|
|
858
|
+
* @generated from enum value: HANDLER_FAILURE_KIND_PERMANENT = 2;
|
|
859
|
+
*/
|
|
860
|
+
PERMANENT = 2
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Describes the enum xeonr.pipelines.private.v1.HandlerFailureKind.
|
|
864
|
+
*/
|
|
865
|
+
export declare const HandlerFailureKindSchema: GenEnum<HandlerFailureKind>;
|
|
866
|
+
/**
|
|
867
|
+
* WorkerService is the claim protocol: how any worker takes attempts and
|
|
868
|
+
* drives each to a terminal state. Two kinds of worker speak it:
|
|
869
|
+
*
|
|
870
|
+
* - the runner agent, which runs `exec` steps in containers (or on the
|
|
871
|
+
* host). It authenticates with its runner credential and claims for its
|
|
872
|
+
* pool, which the credential names.
|
|
873
|
+
* - the SDK worker, which runs `worker` handlers inside a product's own
|
|
874
|
+
* process. It authenticates with its owner's Auth service-account token
|
|
875
|
+
* (`jwt-bearer`) and claims by handler name; it may claim only handlers
|
|
876
|
+
* whose namespace its owner owns.
|
|
877
|
+
*
|
|
878
|
+
* Because both present their bearer on the same RPCs, every RPC here is
|
|
879
|
+
* `no_authentication` and the handler accepts exactly one of: a valid runner
|
|
880
|
+
* credential, or an Auth service-account principal (which authn still
|
|
881
|
+
* verifies and places on the context) holding `pipelines:worker:edit`. That
|
|
882
|
+
* scope is checked in the handler, not by the interceptor, because the
|
|
883
|
+
* shared options cannot say "this scope, or a product-issued credential".
|
|
884
|
+
*
|
|
885
|
+
* Every call after the claim carries an AttemptRef. The server applies each
|
|
886
|
+
* as a compare-and-swap on (state, runner, claim epoch), where the runner is
|
|
887
|
+
* the runner agent its credential names or the SDK worker process the ref's
|
|
888
|
+
* `worker_id` names; a miss answers `failed_precondition`, which means the
|
|
889
|
+
* attempt is no longer this worker's (it was abandoned, re-offered, released
|
|
890
|
+
* or completed) and the worker must kill it and report nothing more. No
|
|
891
|
+
* other condition on this service answers `failed_precondition` for an
|
|
892
|
+
* attempt the worker still holds, except where an RPC says so.
|
|
893
|
+
*
|
|
894
|
+
* Shutdown. A worker that is stopping stops claiming, then for each attempt
|
|
895
|
+
* it holds: one CLAIMED and not started it hands back with ReleaseAttempt,
|
|
896
|
+
* which spends nothing; one RUNNING it lets finish if it can, and otherwise
|
|
897
|
+
* stops user code and completes with TERMINATION_INTERRUPTED, which spends
|
|
898
|
+
* no retry on an `interruptible` node and does on any other.
|
|
899
|
+
*
|
|
900
|
+
* Lease: 60 s, renewed by a heartbeat every 15 s, all on the database's
|
|
901
|
+
* clock. User code starts only after StartAttempt succeeds.
|
|
902
|
+
*
|
|
903
|
+
* Verbs outside api.rpc-naming's, each for a reason:
|
|
904
|
+
*
|
|
905
|
+
* - ClaimAttempts, StartAttempt, Heartbeat and CompleteAttempt are the
|
|
906
|
+
* lease protocol's own verbs: each is a compare-and-swap that carries a
|
|
907
|
+
* payload or returns a credential, which `Mark` does not describe.
|
|
908
|
+
* - AppendLogs appends to an ordered stream, idempotent on a sequence
|
|
909
|
+
* number.
|
|
910
|
+
* - ReleaseAttempt is the lease protocol's inverse of ClaimAttempts: it
|
|
911
|
+
* hands a claim back, and the state that results (OFFERED again, with
|
|
912
|
+
* a new claim epoch) is the claim's undoing rather than a state the
|
|
913
|
+
* caller names, which is what `Mark` would say.
|
|
914
|
+
*
|
|
915
|
+
* @generated from service xeonr.pipelines.private.v1.WorkerService
|
|
916
|
+
*/
|
|
917
|
+
export declare const WorkerService: GenService<{
|
|
918
|
+
/**
|
|
919
|
+
* Claim attempts
|
|
920
|
+
*
|
|
921
|
+
* Long-polls for up to `wait` (30 s at most) and returns as soon as at
|
|
922
|
+
* least one attempt is claimable, with no more than `free_slots` of them.
|
|
923
|
+
* An empty answer is normal: ask again. Each attempt returned moved
|
|
924
|
+
* OFFERED -> CLAIMED for this worker, with a fresh claim epoch and a lease.
|
|
925
|
+
* A claim reply that is lost costs nothing: the lease lapses, the attempt
|
|
926
|
+
* is offered again, and no retry is spent, because nothing ran.
|
|
927
|
+
*
|
|
928
|
+
* The response carries everything needed to run each attempt, so that the
|
|
929
|
+
* same messages could later be sent down a server stream for a product
|
|
930
|
+
* that wants one. Milestone 1 (pool selector); milestone 2 (handlers).
|
|
931
|
+
*
|
|
932
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.ClaimAttempts
|
|
933
|
+
*/
|
|
934
|
+
claimAttempts: {
|
|
935
|
+
methodKind: "unary";
|
|
936
|
+
input: typeof ClaimAttemptsRequestSchema;
|
|
937
|
+
output: typeof ClaimAttemptsResponseSchema;
|
|
938
|
+
};
|
|
939
|
+
/**
|
|
940
|
+
* Start an attempt
|
|
941
|
+
*
|
|
942
|
+
* CLAIMED -> RUNNING, as its own compare-and-swap. The worker calls it
|
|
943
|
+
* when everything is staged and user code is about to start, and starts
|
|
944
|
+
* user code only if it succeeds. Refused with `failed_precondition` once a
|
|
945
|
+
* cancel was requested, or when the claim is no longer this worker's.
|
|
946
|
+
* Returns the attempt token. Idempotent for the same epoch while RUNNING:
|
|
947
|
+
* a repeat returns a fresh token for the same attempt. Milestone 1.
|
|
948
|
+
*
|
|
949
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.StartAttempt
|
|
950
|
+
*/
|
|
951
|
+
startAttempt: {
|
|
952
|
+
methodKind: "unary";
|
|
953
|
+
input: typeof StartAttemptRequestSchema;
|
|
954
|
+
output: typeof StartAttemptResponseSchema;
|
|
955
|
+
};
|
|
956
|
+
/**
|
|
957
|
+
* Renew a lease
|
|
958
|
+
*
|
|
959
|
+
* Extends the attempt's lease and says whether to cancel. Called every
|
|
960
|
+
* `heartbeat_interval` from the claim until CompleteAttempt. On `cancel`
|
|
961
|
+
* the worker stops user code, allows it the cancel grace, and completes
|
|
962
|
+
* the attempt with TERMINATION_CANCELLED. Milestone 1.
|
|
963
|
+
*
|
|
964
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.Heartbeat
|
|
965
|
+
*/
|
|
966
|
+
heartbeat: {
|
|
967
|
+
methodKind: "unary";
|
|
968
|
+
input: typeof HeartbeatRequestSchema;
|
|
969
|
+
output: typeof HeartbeatResponseSchema;
|
|
970
|
+
};
|
|
971
|
+
/**
|
|
972
|
+
* Append to an attempt's log
|
|
973
|
+
*
|
|
974
|
+
* Idempotent on (attempt, seq): a chunk already stored is acknowledged
|
|
975
|
+
* again, with the next expected seq, and not stored twice, so a worker
|
|
976
|
+
* retries freely and buffers through an API outage. Chunks number from 0
|
|
977
|
+
* and are applied in seq order. A chunk ahead of the next expected seq
|
|
978
|
+
* waits briefly for the ones before it; if they do not arrive it is
|
|
979
|
+
* accepted and the missing range is recorded in the log as a gap (after
|
|
980
|
+
* the server lost chunks it had acknowledged, refusing would wedge the
|
|
981
|
+
* log). A server configured to refuse instead answers `out_of_range`,
|
|
982
|
+
* naming the expected seq, and the worker resends from there.
|
|
983
|
+
* `failed_precondition` means only that the attempt is no longer this
|
|
984
|
+
* worker's. The worker masks known secret values before sending.
|
|
985
|
+
* Milestone 1.
|
|
986
|
+
*
|
|
987
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.AppendLogs
|
|
988
|
+
*/
|
|
989
|
+
appendLogs: {
|
|
990
|
+
methodKind: "unary";
|
|
991
|
+
input: typeof AppendLogsRequestSchema;
|
|
992
|
+
output: typeof AppendLogsResponseSchema;
|
|
993
|
+
};
|
|
994
|
+
/**
|
|
995
|
+
* Complete an attempt
|
|
996
|
+
*
|
|
997
|
+
* RUNNING -> SUCCEEDED | FAILED | CANCELLED, by how the worker saw it end.
|
|
998
|
+
* Accepted while RUNNING even after a cancel was requested: the attempt
|
|
999
|
+
* records its real outcome. The kv outputs travel inline, so an SDK worker
|
|
1000
|
+
* needs no sidecar. The platform then checks required outputs and schemas
|
|
1001
|
+
* and decides the node's result and any retry. Idempotent: repeating a
|
|
1002
|
+
* completion that was applied answers success. A worker stopping user
|
|
1003
|
+
* code because it is itself shutting down reports TERMINATION_INTERRUPTED
|
|
1004
|
+
* (milestone 2), and an SDK worker may mark a handler error transient or
|
|
1005
|
+
* permanent with `handler_failure_kind` (milestone 2). Milestone 1.
|
|
1006
|
+
*
|
|
1007
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.CompleteAttempt
|
|
1008
|
+
*/
|
|
1009
|
+
completeAttempt: {
|
|
1010
|
+
methodKind: "unary";
|
|
1011
|
+
input: typeof CompleteAttemptRequestSchema;
|
|
1012
|
+
output: typeof CompleteAttemptResponseSchema;
|
|
1013
|
+
};
|
|
1014
|
+
/**
|
|
1015
|
+
* Release an attempt
|
|
1016
|
+
*
|
|
1017
|
+
* Hands back an attempt this worker claimed and has not started:
|
|
1018
|
+
* CLAIMED -> OFFERED at once, as a lapsed lease would do a lease later,
|
|
1019
|
+
* with the claim epoch bumped so the released claim can write nothing
|
|
1020
|
+
* more. Nothing ran, so no retry is spent and no backoff applies; the
|
|
1021
|
+
* attempt is claimable again immediately, by any worker that matches it.
|
|
1022
|
+
* For a worker that is shutting down or draining, so that a rolling
|
|
1023
|
+
* deploy does not hold its claims for up to a lease.
|
|
1024
|
+
*
|
|
1025
|
+
* An attempt this claim already started (RUNNING) is not released: the
|
|
1026
|
+
* answer says RUNNING and changes nothing, and the worker either lets it
|
|
1027
|
+
* finish or stops it and completes it with TERMINATION_INTERRUPTED. A
|
|
1028
|
+
* claim that is no longer this worker's, including one this RPC already
|
|
1029
|
+
* released, answers `failed_precondition`; a worker that is stopping
|
|
1030
|
+
* treats that as done. Milestone 2.
|
|
1031
|
+
*
|
|
1032
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.ReleaseAttempt
|
|
1033
|
+
*/
|
|
1034
|
+
releaseAttempt: {
|
|
1035
|
+
methodKind: "unary";
|
|
1036
|
+
input: typeof ReleaseAttemptRequestSchema;
|
|
1037
|
+
output: typeof ReleaseAttemptResponseSchema;
|
|
1038
|
+
};
|
|
1039
|
+
/**
|
|
1040
|
+
* Get an attempt's sealed secrets
|
|
1041
|
+
*
|
|
1042
|
+
* Long-polls until the coordinator has sealed the attempt's secrets to the
|
|
1043
|
+
* public key the worker sent for that slot, then returns the ciphertext.
|
|
1044
|
+
* pipelines-api only relays it: the plaintext exists in the coordinator and
|
|
1045
|
+
* in the worker, never in the API or its database. `ready` false after
|
|
1046
|
+
* `wait` means ask again. When sealing was refused (a secret's policy
|
|
1047
|
+
* denied the attempt, which it does by default for any dimension it
|
|
1048
|
+
* neither lists nor wildcards, or a secret could not be opened) the
|
|
1049
|
+
* attempt is failed by the platform and this answers
|
|
1050
|
+
* `failed_precondition`. Only for attempts whose claim said `has_secrets`.
|
|
1051
|
+
* Milestone 1.
|
|
1052
|
+
*
|
|
1053
|
+
* @generated from rpc xeonr.pipelines.private.v1.WorkerService.GetAttemptSecrets
|
|
1054
|
+
*/
|
|
1055
|
+
getAttemptSecrets: {
|
|
1056
|
+
methodKind: "unary";
|
|
1057
|
+
input: typeof GetAttemptSecretsRequestSchema;
|
|
1058
|
+
output: typeof GetAttemptSecretsResponseSchema;
|
|
1059
|
+
};
|
|
1060
|
+
}>;
|
|
1061
|
+
//# sourceMappingURL=worker_pb.d.ts.map
|