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