@cellaflow/sdk 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cellaflow/v1/common_pb.d.ts +119 -0
  2. package/dist/cellaflow/v1/common_pb.d.ts.map +1 -0
  3. package/dist/cellaflow/v1/common_pb.js +166 -0
  4. package/dist/cellaflow/v1/common_pb.js.map +1 -0
  5. package/dist/cellaflow/v1/idempotency_pb.d.ts +378 -0
  6. package/dist/cellaflow/v1/idempotency_pb.d.ts.map +1 -0
  7. package/dist/cellaflow/v1/idempotency_pb.js +513 -0
  8. package/dist/cellaflow/v1/idempotency_pb.js.map +1 -0
  9. package/dist/cellaflow/v1/internal_pb.d.ts +201 -0
  10. package/dist/cellaflow/v1/internal_pb.d.ts.map +1 -0
  11. package/dist/cellaflow/v1/internal_pb.js +254 -0
  12. package/dist/cellaflow/v1/internal_pb.js.map +1 -0
  13. package/dist/cellaflow/v1/service_connect.d.ts +84 -0
  14. package/dist/cellaflow/v1/service_connect.d.ts.map +1 -0
  15. package/dist/cellaflow/v1/service_connect.js +88 -0
  16. package/dist/cellaflow/v1/service_connect.js.map +1 -0
  17. package/dist/cellaflow/v1/service_pb.d.ts +172 -0
  18. package/dist/cellaflow/v1/service_pb.d.ts.map +1 -0
  19. package/dist/cellaflow/v1/service_pb.js +266 -0
  20. package/dist/cellaflow/v1/service_pb.js.map +1 -0
  21. package/dist/client.d.ts +88 -0
  22. package/dist/client.d.ts.map +1 -0
  23. package/dist/client.js +187 -0
  24. package/dist/client.js.map +1 -0
  25. package/dist/index.d.ts +5 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +8 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/serialization.d.ts +18 -0
  30. package/dist/serialization.d.ts.map +1 -0
  31. package/dist/serialization.js +41 -0
  32. package/dist/serialization.js.map +1 -0
  33. package/package.json +59 -0
  34. package/src/cellaflow/v1/common_pb.ts +195 -0
  35. package/src/cellaflow/v1/idempotency_pb.ts +591 -0
  36. package/src/cellaflow/v1/internal_pb.ts +308 -0
  37. package/src/cellaflow/v1/service_connect.ts +90 -0
  38. package/src/cellaflow/v1/service_pb.ts +323 -0
  39. package/src/client.ts +277 -0
  40. package/src/index.ts +7 -0
  41. package/src/serialization.ts +53 -0
@@ -0,0 +1,591 @@
1
+ // @generated by protoc-gen-es v1.10.1 with parameter "target=ts,import_extension=.js"
2
+ // @generated from file cellaflow/v1/idempotency.proto (package cellaflow.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ // @ts-nocheck
5
+
6
+ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7
+ import { Message, proto3, protoInt64 } from "@bufbuild/protobuf";
8
+ import { StepResult } from "./common_pb.js";
9
+
10
+ /**
11
+ * Key construction scope used by SDKs during key auto-derivation.
12
+ * The SDK uses this to prefix the opaque idempotency_key before sending it
13
+ * to the engine. The engine never parses this — it is purely an SDK concern.
14
+ *
15
+ * @generated from enum cellaflow.v1.IdempotencyScope
16
+ */
17
+ export enum IdempotencyScope {
18
+ /**
19
+ * @generated from enum value: SCOPE_UNSPECIFIED = 0;
20
+ */
21
+ SCOPE_UNSPECIFIED = 0,
22
+
23
+ /**
24
+ * Shared across all agents in the session (Default)
25
+ *
26
+ * @generated from enum value: SCOPE_SESSION_WIDE = 1;
27
+ */
28
+ SCOPE_SESSION_WIDE = 1,
29
+
30
+ /**
31
+ * Isolated to the executing agent
32
+ *
33
+ * @generated from enum value: SCOPE_AGENT_PRIVATE = 2;
34
+ */
35
+ SCOPE_AGENT_PRIVATE = 2,
36
+
37
+ /**
38
+ * Isolated to the specific superstep / node
39
+ *
40
+ * @generated from enum value: SCOPE_STEP_LOCAL = 3;
41
+ */
42
+ SCOPE_STEP_LOCAL = 3,
43
+ }
44
+ // Retrieve enum metadata with: proto3.getEnumType(IdempotencyScope)
45
+ proto3.util.setEnumType(IdempotencyScope, "cellaflow.v1.IdempotencyScope", [
46
+ { no: 0, name: "SCOPE_UNSPECIFIED" },
47
+ { no: 1, name: "SCOPE_SESSION_WIDE" },
48
+ { no: 2, name: "SCOPE_AGENT_PRIVATE" },
49
+ { no: 3, name: "SCOPE_STEP_LOCAL" },
50
+ ]);
51
+
52
+ /**
53
+ * @generated from enum cellaflow.v1.CacheStatus
54
+ */
55
+ export enum CacheStatus {
56
+ /**
57
+ * @generated from enum value: CACHE_STATUS_UNSPECIFIED = 0;
58
+ */
59
+ UNSPECIFIED = 0,
60
+
61
+ /**
62
+ * Found in cache (or completed by in-flight worker)
63
+ *
64
+ * @generated from enum value: CACHE_STATUS_HIT = 1;
65
+ */
66
+ HIT = 1,
67
+
68
+ /**
69
+ * Miss & lease granted: caller should execute tool
70
+ *
71
+ * @generated from enum value: CACHE_STATUS_ACQUIRED = 2;
72
+ */
73
+ ACQUIRED = 2,
74
+
75
+ /**
76
+ * Miss & currently running by another worker
77
+ *
78
+ * @generated from enum value: CACHE_STATUS_IN_PROGRESS = 3;
79
+ */
80
+ IN_PROGRESS = 3,
81
+ }
82
+ // Retrieve enum metadata with: proto3.getEnumType(CacheStatus)
83
+ proto3.util.setEnumType(CacheStatus, "cellaflow.v1.CacheStatus", [
84
+ { no: 0, name: "CACHE_STATUS_UNSPECIFIED" },
85
+ { no: 1, name: "CACHE_STATUS_HIT" },
86
+ { no: 2, name: "CACHE_STATUS_ACQUIRED" },
87
+ { no: 3, name: "CACHE_STATUS_IN_PROGRESS" },
88
+ ]);
89
+
90
+ /**
91
+ * @generated from enum cellaflow.v1.RenewFailureReason
92
+ */
93
+ export enum RenewFailureReason {
94
+ /**
95
+ * @generated from enum value: RENEW_FAILURE_REASON_UNSPECIFIED = 0;
96
+ */
97
+ UNSPECIFIED = 0,
98
+
99
+ /**
100
+ * Lease timed out before renewal arrived
101
+ *
102
+ * @generated from enum value: RENEW_FAILURE_REASON_EXPIRED = 1;
103
+ */
104
+ EXPIRED = 1,
105
+
106
+ /**
107
+ * A newer worker acquired a higher fencing token
108
+ *
109
+ * @generated from enum value: RENEW_FAILURE_REASON_SUPERSEDED = 2;
110
+ */
111
+ SUPERSEDED = 2,
112
+
113
+ /**
114
+ * Key does not exist or was deleted
115
+ *
116
+ * @generated from enum value: RENEW_FAILURE_REASON_NOT_FOUND = 3;
117
+ */
118
+ NOT_FOUND = 3,
119
+
120
+ /**
121
+ * Step was already committed by another worker
122
+ *
123
+ * @generated from enum value: RENEW_FAILURE_REASON_COMPLETED = 4;
124
+ */
125
+ COMPLETED = 4,
126
+
127
+ /**
128
+ * The lease hit its maximum total lifetime and was reclaimed.
129
+ *
130
+ * Distinct from EXPIRED: the holder kept renewing and is likely still running,
131
+ * so it must learn the engine took the lease back rather than that its own
132
+ * renewal lapsed.
133
+ *
134
+ * @generated from enum value: RENEW_FAILURE_REASON_MAX_LIFETIME_EXCEEDED = 5;
135
+ */
136
+ MAX_LIFETIME_EXCEEDED = 5,
137
+ }
138
+ // Retrieve enum metadata with: proto3.getEnumType(RenewFailureReason)
139
+ proto3.util.setEnumType(RenewFailureReason, "cellaflow.v1.RenewFailureReason", [
140
+ { no: 0, name: "RENEW_FAILURE_REASON_UNSPECIFIED" },
141
+ { no: 1, name: "RENEW_FAILURE_REASON_EXPIRED" },
142
+ { no: 2, name: "RENEW_FAILURE_REASON_SUPERSEDED" },
143
+ { no: 3, name: "RENEW_FAILURE_REASON_NOT_FOUND" },
144
+ { no: 4, name: "RENEW_FAILURE_REASON_COMPLETED" },
145
+ { no: 5, name: "RENEW_FAILURE_REASON_MAX_LIFETIME_EXCEEDED" },
146
+ ]);
147
+
148
+ /**
149
+ * @generated from enum cellaflow.v1.IdempotencyCommitStatus
150
+ */
151
+ export enum IdempotencyCommitStatus {
152
+ /**
153
+ * @generated from enum value: IDEMPOTENCY_COMMIT_UNSPECIFIED = 0;
154
+ */
155
+ IDEMPOTENCY_COMMIT_UNSPECIFIED = 0,
156
+
157
+ /**
158
+ * @generated from enum value: IDEMPOTENCY_COMMIT_COMMITTED = 1;
159
+ */
160
+ IDEMPOTENCY_COMMIT_COMMITTED = 1,
161
+
162
+ /**
163
+ * Idempotent retry of the commit call itself
164
+ *
165
+ * @generated from enum value: IDEMPOTENCY_COMMIT_ALREADY_COMMITTED = 2;
166
+ */
167
+ IDEMPOTENCY_COMMIT_ALREADY_COMMITTED = 2,
168
+
169
+ /**
170
+ * Fencing token invalid — caller was fenced out
171
+ *
172
+ * @generated from enum value: IDEMPOTENCY_COMMIT_STALE_LEASE_REJECTED = 3;
173
+ */
174
+ IDEMPOTENCY_COMMIT_STALE_LEASE_REJECTED = 3,
175
+ }
176
+ // Retrieve enum metadata with: proto3.getEnumType(IdempotencyCommitStatus)
177
+ proto3.util.setEnumType(IdempotencyCommitStatus, "cellaflow.v1.IdempotencyCommitStatus", [
178
+ { no: 0, name: "IDEMPOTENCY_COMMIT_UNSPECIFIED" },
179
+ { no: 1, name: "IDEMPOTENCY_COMMIT_COMMITTED" },
180
+ { no: 2, name: "IDEMPOTENCY_COMMIT_ALREADY_COMMITTED" },
181
+ { no: 3, name: "IDEMPOTENCY_COMMIT_STALE_LEASE_REJECTED" },
182
+ ]);
183
+
184
+ /**
185
+ * @generated from message cellaflow.v1.CheckCacheRequest
186
+ */
187
+ export class CheckCacheRequest extends Message<CheckCacheRequest> {
188
+ /**
189
+ * Opaque caller-supplied label, carried for logging and diagnostics.
190
+ *
191
+ * Not parsed into the idempotency key: key derivation is an SDK concern and the
192
+ * engine treats the key as opaque.
193
+ *
194
+ * @generated from field: string agent_id = 1;
195
+ */
196
+ agentId = "";
197
+
198
+ /**
199
+ * Fully formed, opaque composite key
200
+ *
201
+ * @generated from field: string idempotency_key = 2;
202
+ */
203
+ idempotencyKey = "";
204
+
205
+ /**
206
+ * @generated from field: optional uint64 wait_timeout_ms = 3;
207
+ */
208
+ waitTimeoutMs?: bigint;
209
+
210
+ /**
211
+ * Crash-detection window; defaults to engine config
212
+ *
213
+ * @generated from field: optional uint64 lease_ttl_ms = 4;
214
+ */
215
+ leaseTtlMs?: bigint;
216
+
217
+ /**
218
+ * The session this check is being made on behalf of.
219
+ *
220
+ * The idempotency key is opaque to the engine and deliberately stays that way,
221
+ * so the session cannot be recovered from it. Without this field the engine
222
+ * cannot tell the caller where its session currently sits, which is what a
223
+ * caller needs after a cache hit — see `current_sequence` on the response.
224
+ *
225
+ * Optional for wire compatibility: clients predating this field still work,
226
+ * they simply receive no `current_sequence` back.
227
+ *
228
+ * @generated from field: optional string session_id = 5;
229
+ */
230
+ sessionId?: string;
231
+
232
+ /**
233
+ * The graph position this caller intends to write to.
234
+ *
235
+ * The engine already knows which session is asking (field 5) and where that
236
+ * session has committed to (`latest_committed_sequence`). This supplies the
237
+ * one missing input: where the caller is going. With all three, a lease that
238
+ * would authorise a side effect at an already-committed position can be
239
+ * refused *before* the side effect happens, rather than rejected at commit
240
+ * time after the money has moved.
241
+ *
242
+ * Note this is the caller's *intended* position, not the response's
243
+ * `current_sequence`, which reports where the session already sits.
244
+ *
245
+ * Optional for wire compatibility: clients that omit it keep the previous
246
+ * behaviour and are still granted leases. Sending 0 is an error rather than
247
+ * a synonym for "unset" -- sequences are 1-based, so 0 is never a position a
248
+ * caller could legitimately intend to write.
249
+ *
250
+ * @generated from field: optional uint64 sequence = 6;
251
+ */
252
+ sequence?: bigint;
253
+
254
+ constructor(data?: PartialMessage<CheckCacheRequest>) {
255
+ super();
256
+ proto3.util.initPartial(data, this);
257
+ }
258
+
259
+ static readonly runtime: typeof proto3 = proto3;
260
+ static readonly typeName = "cellaflow.v1.CheckCacheRequest";
261
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
262
+ { no: 1, name: "agent_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
263
+ { no: 2, name: "idempotency_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
264
+ { no: 3, name: "wait_timeout_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
265
+ { no: 4, name: "lease_ttl_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
266
+ { no: 5, name: "session_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
267
+ { no: 6, name: "sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
268
+ ]);
269
+
270
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CheckCacheRequest {
271
+ return new CheckCacheRequest().fromBinary(bytes, options);
272
+ }
273
+
274
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CheckCacheRequest {
275
+ return new CheckCacheRequest().fromJson(jsonValue, options);
276
+ }
277
+
278
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckCacheRequest {
279
+ return new CheckCacheRequest().fromJsonString(jsonString, options);
280
+ }
281
+
282
+ static equals(a: CheckCacheRequest | PlainMessage<CheckCacheRequest> | undefined, b: CheckCacheRequest | PlainMessage<CheckCacheRequest> | undefined): boolean {
283
+ return proto3.util.equals(CheckCacheRequest, a, b);
284
+ }
285
+ }
286
+
287
+ /**
288
+ * @generated from message cellaflow.v1.CheckCacheResponse
289
+ */
290
+ export class CheckCacheResponse extends Message<CheckCacheResponse> {
291
+ /**
292
+ * @generated from field: cellaflow.v1.CacheStatus status = 1;
293
+ */
294
+ status = CacheStatus.UNSPECIFIED;
295
+
296
+ /**
297
+ * @generated from field: optional cellaflow.v1.StepResult cached_result = 2;
298
+ */
299
+ cachedResult?: StepResult;
300
+
301
+ /**
302
+ * Present iff ACQUIRED
303
+ *
304
+ * @generated from field: optional uint64 fencing_token = 3;
305
+ */
306
+ fencingToken?: bigint;
307
+
308
+ /**
309
+ * Present iff ACQUIRED or IN_PROGRESS
310
+ *
311
+ * @generated from field: optional uint64 lease_expires_at_ms = 4;
312
+ */
313
+ leaseExpiresAtMs?: bigint;
314
+
315
+ /**
316
+ * Present iff ACQUIRED — caller MUST renew
317
+ *
318
+ * @generated from field: optional uint64 heartbeat_interval_ms = 5;
319
+ */
320
+ heartbeatIntervalMs?: bigint;
321
+
322
+ /**
323
+ * Present iff IN_PROGRESS and wait exhausted
324
+ *
325
+ * @generated from field: optional uint64 retry_after_ms = 6;
326
+ */
327
+ retryAfterMs?: bigint;
328
+
329
+ /**
330
+ * Present iff IN_PROGRESS (for distributed tracing)
331
+ *
332
+ * @generated from field: optional string current_holder_id = 7;
333
+ */
334
+ currentHolderId?: string;
335
+
336
+ /**
337
+ * The requested session's highest committed sequence, or 0 if it has
338
+ * none. Present whenever `session_id` was supplied — on every status, not only
339
+ * on HIT.
340
+ *
341
+ * A caller that takes a HIT returns without committing, so its local counter
342
+ * advances while the session's does not, and its next commit fails the
343
+ * ordering check one step after the real cause. This lets it re-align.
344
+ *
345
+ * Returned on ACQUIRED and IN_PROGRESS too because it costs one seek on a call
346
+ * that already performs a storage transaction, and it lets a caller about to
347
+ * execute confirm it is where it thinks it is.
348
+ *
349
+ * @generated from field: optional uint64 current_sequence = 8;
350
+ */
351
+ currentSequence?: bigint;
352
+
353
+ constructor(data?: PartialMessage<CheckCacheResponse>) {
354
+ super();
355
+ proto3.util.initPartial(data, this);
356
+ }
357
+
358
+ static readonly runtime: typeof proto3 = proto3;
359
+ static readonly typeName = "cellaflow.v1.CheckCacheResponse";
360
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
361
+ { no: 1, name: "status", kind: "enum", T: proto3.getEnumType(CacheStatus) },
362
+ { no: 2, name: "cached_result", kind: "message", T: StepResult, opt: true },
363
+ { no: 3, name: "fencing_token", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
364
+ { no: 4, name: "lease_expires_at_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
365
+ { no: 5, name: "heartbeat_interval_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
366
+ { no: 6, name: "retry_after_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
367
+ { no: 7, name: "current_holder_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
368
+ { no: 8, name: "current_sequence", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
369
+ ]);
370
+
371
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): CheckCacheResponse {
372
+ return new CheckCacheResponse().fromBinary(bytes, options);
373
+ }
374
+
375
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): CheckCacheResponse {
376
+ return new CheckCacheResponse().fromJson(jsonValue, options);
377
+ }
378
+
379
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckCacheResponse {
380
+ return new CheckCacheResponse().fromJsonString(jsonString, options);
381
+ }
382
+
383
+ static equals(a: CheckCacheResponse | PlainMessage<CheckCacheResponse> | undefined, b: CheckCacheResponse | PlainMessage<CheckCacheResponse> | undefined): boolean {
384
+ return proto3.util.equals(CheckCacheResponse, a, b);
385
+ }
386
+ }
387
+
388
+ /**
389
+ * @generated from message cellaflow.v1.RenewLeaseRequest
390
+ */
391
+ export class RenewLeaseRequest extends Message<RenewLeaseRequest> {
392
+ /**
393
+ * @generated from field: string agent_id = 1;
394
+ */
395
+ agentId = "";
396
+
397
+ /**
398
+ * @generated from field: string idempotency_key = 2;
399
+ */
400
+ idempotencyKey = "";
401
+
402
+ /**
403
+ * @generated from field: uint64 fencing_token = 3;
404
+ */
405
+ fencingToken = protoInt64.zero;
406
+
407
+ /**
408
+ * @generated from field: uint64 extend_ms = 4;
409
+ */
410
+ extendMs = protoInt64.zero;
411
+
412
+ constructor(data?: PartialMessage<RenewLeaseRequest>) {
413
+ super();
414
+ proto3.util.initPartial(data, this);
415
+ }
416
+
417
+ static readonly runtime: typeof proto3 = proto3;
418
+ static readonly typeName = "cellaflow.v1.RenewLeaseRequest";
419
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
420
+ { no: 1, name: "agent_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
421
+ { no: 2, name: "idempotency_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
422
+ { no: 3, name: "fencing_token", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
423
+ { no: 4, name: "extend_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
424
+ ]);
425
+
426
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RenewLeaseRequest {
427
+ return new RenewLeaseRequest().fromBinary(bytes, options);
428
+ }
429
+
430
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RenewLeaseRequest {
431
+ return new RenewLeaseRequest().fromJson(jsonValue, options);
432
+ }
433
+
434
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RenewLeaseRequest {
435
+ return new RenewLeaseRequest().fromJsonString(jsonString, options);
436
+ }
437
+
438
+ static equals(a: RenewLeaseRequest | PlainMessage<RenewLeaseRequest> | undefined, b: RenewLeaseRequest | PlainMessage<RenewLeaseRequest> | undefined): boolean {
439
+ return proto3.util.equals(RenewLeaseRequest, a, b);
440
+ }
441
+ }
442
+
443
+ /**
444
+ * @generated from message cellaflow.v1.RenewLeaseResponse
445
+ */
446
+ export class RenewLeaseResponse extends Message<RenewLeaseResponse> {
447
+ /**
448
+ * False => lease was reclaimed/completed; stop execution
449
+ *
450
+ * @generated from field: bool renewed = 1;
451
+ */
452
+ renewed = false;
453
+
454
+ /**
455
+ * Present iff renewed = true
456
+ *
457
+ * @generated from field: optional uint64 new_expires_at_ms = 2;
458
+ */
459
+ newExpiresAtMs?: bigint;
460
+
461
+ /**
462
+ * Present iff renewed = false
463
+ *
464
+ * @generated from field: optional cellaflow.v1.RenewFailureReason failure_reason = 3;
465
+ */
466
+ failureReason?: RenewFailureReason;
467
+
468
+ constructor(data?: PartialMessage<RenewLeaseResponse>) {
469
+ super();
470
+ proto3.util.initPartial(data, this);
471
+ }
472
+
473
+ static readonly runtime: typeof proto3 = proto3;
474
+ static readonly typeName = "cellaflow.v1.RenewLeaseResponse";
475
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
476
+ { no: 1, name: "renewed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
477
+ { no: 2, name: "new_expires_at_ms", kind: "scalar", T: 4 /* ScalarType.UINT64 */, opt: true },
478
+ { no: 3, name: "failure_reason", kind: "enum", T: proto3.getEnumType(RenewFailureReason), opt: true },
479
+ ]);
480
+
481
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): RenewLeaseResponse {
482
+ return new RenewLeaseResponse().fromBinary(bytes, options);
483
+ }
484
+
485
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): RenewLeaseResponse {
486
+ return new RenewLeaseResponse().fromJson(jsonValue, options);
487
+ }
488
+
489
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): RenewLeaseResponse {
490
+ return new RenewLeaseResponse().fromJsonString(jsonString, options);
491
+ }
492
+
493
+ static equals(a: RenewLeaseResponse | PlainMessage<RenewLeaseResponse> | undefined, b: RenewLeaseResponse | PlainMessage<RenewLeaseResponse> | undefined): boolean {
494
+ return proto3.util.equals(RenewLeaseResponse, a, b);
495
+ }
496
+ }
497
+
498
+ /**
499
+ * @generated from message cellaflow.v1.ReleaseLeaseRequest
500
+ */
501
+ export class ReleaseLeaseRequest extends Message<ReleaseLeaseRequest> {
502
+ /**
503
+ * @generated from field: string agent_id = 1;
504
+ */
505
+ agentId = "";
506
+
507
+ /**
508
+ * @generated from field: string idempotency_key = 2;
509
+ */
510
+ idempotencyKey = "";
511
+
512
+ /**
513
+ * @generated from field: uint64 fencing_token = 3;
514
+ */
515
+ fencingToken = protoInt64.zero;
516
+
517
+ /**
518
+ * e.g. "RATE_LIMITED_429", "CANCELLED", "TOOL_ERROR"
519
+ *
520
+ * @generated from field: optional string reason = 4;
521
+ */
522
+ reason?: string;
523
+
524
+ constructor(data?: PartialMessage<ReleaseLeaseRequest>) {
525
+ super();
526
+ proto3.util.initPartial(data, this);
527
+ }
528
+
529
+ static readonly runtime: typeof proto3 = proto3;
530
+ static readonly typeName = "cellaflow.v1.ReleaseLeaseRequest";
531
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
532
+ { no: 1, name: "agent_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
533
+ { no: 2, name: "idempotency_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
534
+ { no: 3, name: "fencing_token", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
535
+ { no: 4, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
536
+ ]);
537
+
538
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReleaseLeaseRequest {
539
+ return new ReleaseLeaseRequest().fromBinary(bytes, options);
540
+ }
541
+
542
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReleaseLeaseRequest {
543
+ return new ReleaseLeaseRequest().fromJson(jsonValue, options);
544
+ }
545
+
546
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReleaseLeaseRequest {
547
+ return new ReleaseLeaseRequest().fromJsonString(jsonString, options);
548
+ }
549
+
550
+ static equals(a: ReleaseLeaseRequest | PlainMessage<ReleaseLeaseRequest> | undefined, b: ReleaseLeaseRequest | PlainMessage<ReleaseLeaseRequest> | undefined): boolean {
551
+ return proto3.util.equals(ReleaseLeaseRequest, a, b);
552
+ }
553
+ }
554
+
555
+ /**
556
+ * @generated from message cellaflow.v1.ReleaseLeaseResponse
557
+ */
558
+ export class ReleaseLeaseResponse extends Message<ReleaseLeaseResponse> {
559
+ /**
560
+ * @generated from field: bool released = 1;
561
+ */
562
+ released = false;
563
+
564
+ constructor(data?: PartialMessage<ReleaseLeaseResponse>) {
565
+ super();
566
+ proto3.util.initPartial(data, this);
567
+ }
568
+
569
+ static readonly runtime: typeof proto3 = proto3;
570
+ static readonly typeName = "cellaflow.v1.ReleaseLeaseResponse";
571
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
572
+ { no: 1, name: "released", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
573
+ ]);
574
+
575
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReleaseLeaseResponse {
576
+ return new ReleaseLeaseResponse().fromBinary(bytes, options);
577
+ }
578
+
579
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReleaseLeaseResponse {
580
+ return new ReleaseLeaseResponse().fromJson(jsonValue, options);
581
+ }
582
+
583
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReleaseLeaseResponse {
584
+ return new ReleaseLeaseResponse().fromJsonString(jsonString, options);
585
+ }
586
+
587
+ static equals(a: ReleaseLeaseResponse | PlainMessage<ReleaseLeaseResponse> | undefined, b: ReleaseLeaseResponse | PlainMessage<ReleaseLeaseResponse> | undefined): boolean {
588
+ return proto3.util.equals(ReleaseLeaseResponse, a, b);
589
+ }
590
+ }
591
+