spool-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.
@@ -0,0 +1,900 @@
1
+ // @generated by protoc-gen-es v2.17.0 with parameter "target=js+dts,import_extension=js"
2
+ // @generated from file spool/v1/workers.proto (package spool.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import type { JsonObject, Message } from "@bufbuild/protobuf";
7
+ import type { Value } from "@bufbuild/protobuf/wkt";
8
+
9
+ /**
10
+ * Describes the file spool/v1/workers.proto.
11
+ */
12
+ export declare const file_spool_v1_workers: GenFile;
13
+
14
+ /**
15
+ * @generated from message spool.v1.ConnectRequest
16
+ */
17
+ export declare type ConnectRequest = Message<"spool.v1.ConnectRequest"> & {
18
+ /**
19
+ * @generated from oneof spool.v1.ConnectRequest.kind
20
+ */
21
+ kind: {
22
+ /**
23
+ * Must be the first message, and only the first.
24
+ *
25
+ * @generated from field: spool.v1.Hello hello = 1;
26
+ */
27
+ value: Hello;
28
+ case: "hello";
29
+ } | {
30
+ /**
31
+ * @generated from field: spool.v1.Pull pull = 2;
32
+ */
33
+ value: Pull;
34
+ case: "pull";
35
+ } | {
36
+ /**
37
+ * @generated from field: spool.v1.StepReport step = 3;
38
+ */
39
+ value: StepReport;
40
+ case: "step";
41
+ } | {
42
+ /**
43
+ * @generated from field: spool.v1.Completion completion = 4;
44
+ */
45
+ value: Completion;
46
+ case: "completion";
47
+ } | {
48
+ /**
49
+ * @generated from field: spool.v1.Heartbeat heartbeat = 5;
50
+ */
51
+ value: Heartbeat;
52
+ case: "heartbeat";
53
+ } | {
54
+ /**
55
+ * @generated from field: spool.v1.StepFailure step_failure = 6;
56
+ */
57
+ value: StepFailure;
58
+ case: "stepFailure";
59
+ } | {
60
+ /**
61
+ * @generated from field: spool.v1.Sleep sleep = 7;
62
+ */
63
+ value: Sleep;
64
+ case: "sleep";
65
+ } | {
66
+ /**
67
+ * @generated from field: spool.v1.WaitForEvent wait_for_event = 8;
68
+ */
69
+ value: WaitForEvent;
70
+ case: "waitForEvent";
71
+ } | {
72
+ /**
73
+ * @generated from field: spool.v1.Throttle throttle = 9;
74
+ */
75
+ value: Throttle;
76
+ case: "throttle";
77
+ } | {
78
+ /**
79
+ * @generated from field: spool.v1.LlmTokens llm_tokens = 10;
80
+ */
81
+ value: LlmTokens;
82
+ case: "llmTokens";
83
+ } | { case: undefined; value?: undefined };
84
+ };
85
+
86
+ /**
87
+ * Describes the message spool.v1.ConnectRequest.
88
+ * Use `create(ConnectRequestSchema)` to create a new message.
89
+ */
90
+ export declare const ConnectRequestSchema: GenMessage<ConnectRequest>;
91
+
92
+ /**
93
+ * Text a model call (ctx.llm) produced so far, for anyone following the run live. Not
94
+ * answered and not recorded: the engine passes it to the run's event streams when someone
95
+ * is watching the run and drops it otherwise, and drops it when this stream does not hold
96
+ * the task's lease for `attempt`. The step's report still carries the stored result.
97
+ *
98
+ * @generated from message spool.v1.LlmTokens
99
+ */
100
+ export declare type LlmTokens = Message<"spool.v1.LlmTokens"> & {
101
+ /**
102
+ * @generated from field: int64 task_id = 1;
103
+ */
104
+ taskId: bigint;
105
+
106
+ /**
107
+ * @generated from field: int32 attempt = 2;
108
+ */
109
+ attempt: number;
110
+
111
+ /**
112
+ * The ctx.llm step producing the text.
113
+ *
114
+ * @generated from field: int32 seq = 3;
115
+ */
116
+ seq: number;
117
+
118
+ /**
119
+ * At most 64 KiB.
120
+ *
121
+ * @generated from field: string text = 4;
122
+ */
123
+ text: string;
124
+ };
125
+
126
+ /**
127
+ * Describes the message spool.v1.LlmTokens.
128
+ * Use `create(LlmTokensSchema)` to create a new message.
129
+ */
130
+ export declare const LlmTokensSchema: GenMessage<LlmTokens>;
131
+
132
+ /**
133
+ * @generated from message spool.v1.Hello
134
+ */
135
+ export declare type Hello = Message<"spool.v1.Hello"> & {
136
+ /**
137
+ * Identifies the lease holder. Stable across reconnects of one worker process.
138
+ *
139
+ * @generated from field: string worker_id = 1;
140
+ */
141
+ workerId: string;
142
+
143
+ /**
144
+ * Workflows this worker can run; at least one.
145
+ *
146
+ * @generated from field: repeated string workflows = 2;
147
+ */
148
+ workflows: string[];
149
+
150
+ /**
151
+ * Defaults to "default".
152
+ *
153
+ * @generated from field: optional string queue = 3;
154
+ */
155
+ queue?: string | undefined;
156
+
157
+ /**
158
+ * Initial free slots, as if followed by a Pull with this count. May be 0.
159
+ *
160
+ * @generated from field: int32 pull = 4;
161
+ */
162
+ pull: number;
163
+ };
164
+
165
+ /**
166
+ * Describes the message spool.v1.Hello.
167
+ * Use `create(HelloSchema)` to create a new message.
168
+ */
169
+ export declare const HelloSchema: GenMessage<Hello>;
170
+
171
+ /**
172
+ * Asks for up to `count` more tasks: the worker has that many more free slots.
173
+ *
174
+ * @generated from message spool.v1.Pull
175
+ */
176
+ export declare type Pull = Message<"spool.v1.Pull"> & {
177
+ /**
178
+ * @generated from field: int32 count = 1;
179
+ */
180
+ count: number;
181
+ };
182
+
183
+ /**
184
+ * Describes the message spool.v1.Pull.
185
+ * Use `create(PullSchema)` to create a new message.
186
+ */
187
+ export declare const PullSchema: GenMessage<Pull>;
188
+
189
+ /**
190
+ * Records one finished step. Answered with an Ack (recorded is false when the step was
191
+ * already recorded under the same name) or a Failure.
192
+ *
193
+ * @generated from message spool.v1.StepReport
194
+ */
195
+ export declare type StepReport = Message<"spool.v1.StepReport"> & {
196
+ /**
197
+ * @generated from field: uint64 request_id = 1;
198
+ */
199
+ requestId: bigint;
200
+
201
+ /**
202
+ * @generated from field: int64 task_id = 2;
203
+ */
204
+ taskId: bigint;
205
+
206
+ /**
207
+ * @generated from field: int32 attempt = 3;
208
+ */
209
+ attempt: number;
210
+
211
+ /**
212
+ * Position of the step in the run, from 0; must be the next one or a recorded one.
213
+ *
214
+ * @generated from field: int32 seq = 4;
215
+ */
216
+ seq: number;
217
+
218
+ /**
219
+ * Stable across replays; checked against the journal.
220
+ *
221
+ * @generated from field: string name = 5;
222
+ */
223
+ name: string;
224
+
225
+ /**
226
+ * Any JSON value, at most 256 KiB; required.
227
+ *
228
+ * @generated from field: google.protobuf.Value output = 6;
229
+ */
230
+ output?: Value | undefined;
231
+
232
+ /**
233
+ * How long the step ran; a duration, so worker clock skew cannot distort timelines.
234
+ *
235
+ * @generated from field: int32 duration_ms = 7;
236
+ */
237
+ durationMs: number;
238
+
239
+ /**
240
+ * Set for a model call (ctx.llm): the step is recorded as kind llm with its usage, and
241
+ * the engine prices it from its configured table.
242
+ *
243
+ * @generated from field: optional spool.v1.LlmUsage llm = 8;
244
+ */
245
+ llm?: LlmUsage | undefined;
246
+ };
247
+
248
+ /**
249
+ * Describes the message spool.v1.StepReport.
250
+ * Use `create(StepReportSchema)` to create a new message.
251
+ */
252
+ export declare const StepReportSchema: GenMessage<StepReport>;
253
+
254
+ /**
255
+ * @generated from message spool.v1.LlmUsage
256
+ */
257
+ export declare type LlmUsage = Message<"spool.v1.LlmUsage"> & {
258
+ /**
259
+ * As the provider names it, such as "claude-sonnet-5-5"; at most 128 characters.
260
+ *
261
+ * @generated from field: string model = 1;
262
+ */
263
+ model: string;
264
+
265
+ /**
266
+ * From 0 to 100,000,000 each.
267
+ *
268
+ * @generated from field: int32 input_tokens = 2;
269
+ */
270
+ inputTokens: number;
271
+
272
+ /**
273
+ * @generated from field: int32 output_tokens = 3;
274
+ */
275
+ outputTokens: number;
276
+ };
277
+
278
+ /**
279
+ * Describes the message spool.v1.LlmUsage.
280
+ * Use `create(LlmUsageSchema)` to create a new message.
281
+ */
282
+ export declare const LlmUsageSchema: GenMessage<LlmUsage>;
283
+
284
+ /**
285
+ * A step's function threw. Answered with an Ack once the failure is recorded and the task
286
+ * released: the engine runs the step again after a backoff, or fails the run when the error
287
+ * is not retryable or the step has used its attempts. Either way the worker stops the run.
288
+ *
289
+ * @generated from message spool.v1.StepFailure
290
+ */
291
+ export declare type StepFailure = Message<"spool.v1.StepFailure"> & {
292
+ /**
293
+ * @generated from field: uint64 request_id = 1;
294
+ */
295
+ requestId: bigint;
296
+
297
+ /**
298
+ * @generated from field: int64 task_id = 2;
299
+ */
300
+ taskId: bigint;
301
+
302
+ /**
303
+ * @generated from field: int32 attempt = 3;
304
+ */
305
+ attempt: number;
306
+
307
+ /**
308
+ * The step that failed: always the next one not yet recorded.
309
+ *
310
+ * @generated from field: int32 seq = 4;
311
+ */
312
+ seq: number;
313
+
314
+ /**
315
+ * @generated from field: string name = 5;
316
+ */
317
+ name: string;
318
+
319
+ /**
320
+ * @generated from field: spool.v1.StepError error = 6;
321
+ */
322
+ error?: StepError | undefined;
323
+
324
+ /**
325
+ * False fails the run at once.
326
+ *
327
+ * @generated from field: bool retryable = 7;
328
+ */
329
+ retryable: boolean;
330
+
331
+ /**
332
+ * How many times the step may run in all, from 1 to 100.
333
+ *
334
+ * @generated from field: int32 max_attempts = 8;
335
+ */
336
+ maxAttempts: number;
337
+
338
+ /**
339
+ * @generated from field: int32 duration_ms = 9;
340
+ */
341
+ durationMs: number;
342
+ };
343
+
344
+ /**
345
+ * Describes the message spool.v1.StepFailure.
346
+ * Use `create(StepFailureSchema)` to create a new message.
347
+ */
348
+ export declare const StepFailureSchema: GenMessage<StepFailure>;
349
+
350
+ /**
351
+ * Parks the run for a while (ctx.sleep). Records step `seq` as a sleep and gives the task
352
+ * up, so a sleeping run holds no worker, lease or connection. Answered with an Ack once
353
+ * the sleep is recorded; the worker then stops the run, and once `duration_ms` has passed
354
+ * on the database clock the engine queues it again for any worker, which replays the sleep
355
+ * from the journal and goes on. Fenced like a step report.
356
+ *
357
+ * @generated from message spool.v1.Sleep
358
+ */
359
+ export declare type Sleep = Message<"spool.v1.Sleep"> & {
360
+ /**
361
+ * @generated from field: uint64 request_id = 1;
362
+ */
363
+ requestId: bigint;
364
+
365
+ /**
366
+ * @generated from field: int64 task_id = 2;
367
+ */
368
+ taskId: bigint;
369
+
370
+ /**
371
+ * @generated from field: int32 attempt = 3;
372
+ */
373
+ attempt: number;
374
+
375
+ /**
376
+ * Must be the next step: a recorded sleep is replayed, never reported again.
377
+ *
378
+ * @generated from field: int32 seq = 4;
379
+ */
380
+ seq: number;
381
+
382
+ /**
383
+ * Stable across replays; checked against the journal.
384
+ *
385
+ * @generated from field: string name = 5;
386
+ */
387
+ name: string;
388
+
389
+ /**
390
+ * From 0 to 31,536,000,000 (365 days).
391
+ *
392
+ * @generated from field: int64 duration_ms = 6;
393
+ */
394
+ durationMs: bigint;
395
+ };
396
+
397
+ /**
398
+ * Describes the message spool.v1.Sleep.
399
+ * Use `create(SleepSchema)` to create a new message.
400
+ */
401
+ export declare const SleepSchema: GenMessage<Sleep>;
402
+
403
+ /**
404
+ * Parks the run until an event arrives (ctx.waitForEvent) or the timeout passes. If a
405
+ * matching event already arrived after the run started, and this run has not used it, the
406
+ * step is recorded with it at once and the run is queued again; otherwise the task is
407
+ * given up and the run waits, holding no worker or lease. Either way the answer is an Ack,
408
+ * the worker stops the run, and whoever runs it next replays step `seq` from the journal:
409
+ * its output is the event's payload, or null if the wait timed out. Fenced like a step
410
+ * report; not idempotent, like a Sleep.
411
+ *
412
+ * @generated from message spool.v1.WaitForEvent
413
+ */
414
+ export declare type WaitForEvent = Message<"spool.v1.WaitForEvent"> & {
415
+ /**
416
+ * @generated from field: uint64 request_id = 1;
417
+ */
418
+ requestId: bigint;
419
+
420
+ /**
421
+ * @generated from field: int64 task_id = 2;
422
+ */
423
+ taskId: bigint;
424
+
425
+ /**
426
+ * @generated from field: int32 attempt = 3;
427
+ */
428
+ attempt: number;
429
+
430
+ /**
431
+ * Must be the next step.
432
+ *
433
+ * @generated from field: int32 seq = 4;
434
+ */
435
+ seq: number;
436
+
437
+ /**
438
+ * Stable across replays; checked against the journal.
439
+ *
440
+ * @generated from field: string name = 5;
441
+ */
442
+ name: string;
443
+
444
+ /**
445
+ * @generated from field: string event_name = 6;
446
+ */
447
+ eventName: string;
448
+
449
+ /**
450
+ * A JSON object, at most 16 KiB: an event matches when its payload contains it.
451
+ *
452
+ * @generated from field: google.protobuf.Struct match = 7;
453
+ */
454
+ match?: JsonObject | undefined;
455
+
456
+ /**
457
+ * From 0 to 31,536,000,000 (365 days).
458
+ *
459
+ * @generated from field: int64 timeout_ms = 8;
460
+ */
461
+ timeoutMs: bigint;
462
+ };
463
+
464
+ /**
465
+ * Describes the message spool.v1.WaitForEvent.
466
+ * Use `create(WaitForEventSchema)` to create a new message.
467
+ */
468
+ export declare const WaitForEventSchema: GenMessage<WaitForEvent>;
469
+
470
+ /**
471
+ * Takes a token from a rate limit's bucket before a step (a step or model call with a
472
+ * rateLimit option), recorded as step `seq` in the same transaction, so a replay never
473
+ * takes it twice. Answered with an Ack whose wait_ms is 0 when the token is due now: the
474
+ * run goes on. Otherwise the run is parked like a Sleep until the token is due; the worker
475
+ * stops the run, and whoever runs it next replays this step and makes the call. A key with
476
+ * no limit set answers 0. Fenced like a step report.
477
+ *
478
+ * @generated from message spool.v1.Throttle
479
+ */
480
+ export declare type Throttle = Message<"spool.v1.Throttle"> & {
481
+ /**
482
+ * @generated from field: uint64 request_id = 1;
483
+ */
484
+ requestId: bigint;
485
+
486
+ /**
487
+ * @generated from field: int64 task_id = 2;
488
+ */
489
+ taskId: bigint;
490
+
491
+ /**
492
+ * @generated from field: int32 attempt = 3;
493
+ */
494
+ attempt: number;
495
+
496
+ /**
497
+ * Must be the next step, or this request again after a lost reply.
498
+ *
499
+ * @generated from field: int32 seq = 4;
500
+ */
501
+ seq: number;
502
+
503
+ /**
504
+ * Stable across replays; checked against the journal.
505
+ *
506
+ * @generated from field: string name = 5;
507
+ */
508
+ name: string;
509
+
510
+ /**
511
+ * The rate limit, set with LimitsService.SetRateLimit; at most 128 characters.
512
+ *
513
+ * @generated from field: string key = 6;
514
+ */
515
+ key: string;
516
+
517
+ /**
518
+ * Tokens to take, from 1 to 1,000,000: 1 for one request.
519
+ *
520
+ * @generated from field: int32 cost = 7;
521
+ */
522
+ cost: number;
523
+ };
524
+
525
+ /**
526
+ * Describes the message spool.v1.Throttle.
527
+ * Use `create(ThrottleSchema)` to create a new message.
528
+ */
529
+ export declare const ThrottleSchema: GenMessage<Throttle>;
530
+
531
+ /**
532
+ * @generated from message spool.v1.StepError
533
+ */
534
+ export declare type StepError = Message<"spool.v1.StepError"> & {
535
+ /**
536
+ * The error's class, such as "TypeError" or "RateLimitError".
537
+ *
538
+ * @generated from field: string type = 1;
539
+ */
540
+ type: string;
541
+
542
+ /**
543
+ * At most 4 KiB; never a stack trace or payload.
544
+ *
545
+ * @generated from field: string message = 2;
546
+ */
547
+ message: string;
548
+ };
549
+
550
+ /**
551
+ * Describes the message spool.v1.StepError.
552
+ * Use `create(StepErrorSchema)` to create a new message.
553
+ */
554
+ export declare const StepErrorSchema: GenMessage<StepError>;
555
+
556
+ /**
557
+ * Finishes a run with its output. Answered with an Ack or a Failure.
558
+ *
559
+ * @generated from message spool.v1.Completion
560
+ */
561
+ export declare type Completion = Message<"spool.v1.Completion"> & {
562
+ /**
563
+ * @generated from field: uint64 request_id = 1;
564
+ */
565
+ requestId: bigint;
566
+
567
+ /**
568
+ * @generated from field: int64 task_id = 2;
569
+ */
570
+ taskId: bigint;
571
+
572
+ /**
573
+ * @generated from field: int32 attempt = 3;
574
+ */
575
+ attempt: number;
576
+
577
+ /**
578
+ * Any JSON value, at most 256 KiB; required.
579
+ *
580
+ * @generated from field: google.protobuf.Value output = 4;
581
+ */
582
+ output?: Value | undefined;
583
+ };
584
+
585
+ /**
586
+ * Describes the message spool.v1.Completion.
587
+ * Use `create(CompletionSchema)` to create a new message.
588
+ */
589
+ export declare const CompletionSchema: GenMessage<Completion>;
590
+
591
+ /**
592
+ * Renews the listed leases, which may be none: an empty heartbeat keeps an idle stream
593
+ * open. Answered with a HeartbeatAck naming the leases that were lost.
594
+ *
595
+ * @generated from message spool.v1.Heartbeat
596
+ */
597
+ export declare type Heartbeat = Message<"spool.v1.Heartbeat"> & {
598
+ /**
599
+ * @generated from field: uint64 request_id = 1;
600
+ */
601
+ requestId: bigint;
602
+
603
+ /**
604
+ * @generated from field: repeated spool.v1.LeaseRef leases = 2;
605
+ */
606
+ leases: LeaseRef[];
607
+ };
608
+
609
+ /**
610
+ * Describes the message spool.v1.Heartbeat.
611
+ * Use `create(HeartbeatSchema)` to create a new message.
612
+ */
613
+ export declare const HeartbeatSchema: GenMessage<Heartbeat>;
614
+
615
+ /**
616
+ * @generated from message spool.v1.LeaseRef
617
+ */
618
+ export declare type LeaseRef = Message<"spool.v1.LeaseRef"> & {
619
+ /**
620
+ * @generated from field: int64 task_id = 1;
621
+ */
622
+ taskId: bigint;
623
+
624
+ /**
625
+ * @generated from field: int32 attempt = 2;
626
+ */
627
+ attempt: number;
628
+ };
629
+
630
+ /**
631
+ * Describes the message spool.v1.LeaseRef.
632
+ * Use `create(LeaseRefSchema)` to create a new message.
633
+ */
634
+ export declare const LeaseRefSchema: GenMessage<LeaseRef>;
635
+
636
+ /**
637
+ * @generated from message spool.v1.ConnectResponse
638
+ */
639
+ export declare type ConnectResponse = Message<"spool.v1.ConnectResponse"> & {
640
+ /**
641
+ * @generated from oneof spool.v1.ConnectResponse.kind
642
+ */
643
+ kind: {
644
+ /**
645
+ * Always the first message.
646
+ *
647
+ * @generated from field: spool.v1.Ready ready = 1;
648
+ */
649
+ value: Ready;
650
+ case: "ready";
651
+ } | {
652
+ /**
653
+ * @generated from field: spool.v1.ClaimedTask task = 2;
654
+ */
655
+ value: ClaimedTask;
656
+ case: "task";
657
+ } | {
658
+ /**
659
+ * @generated from field: spool.v1.Ack ack = 3;
660
+ */
661
+ value: Ack;
662
+ case: "ack";
663
+ } | {
664
+ /**
665
+ * @generated from field: spool.v1.Failure failure = 4;
666
+ */
667
+ value: Failure;
668
+ case: "failure";
669
+ } | {
670
+ /**
671
+ * @generated from field: spool.v1.HeartbeatAck heartbeat_ack = 5;
672
+ */
673
+ value: HeartbeatAck;
674
+ case: "heartbeatAck";
675
+ } | { case: undefined; value?: undefined };
676
+ };
677
+
678
+ /**
679
+ * Describes the message spool.v1.ConnectResponse.
680
+ * Use `create(ConnectResponseSchema)` to create a new message.
681
+ */
682
+ export declare const ConnectResponseSchema: GenMessage<ConnectResponse>;
683
+
684
+ /**
685
+ * @generated from message spool.v1.Ready
686
+ */
687
+ export declare type Ready = Message<"spool.v1.Ready"> & {
688
+ /**
689
+ * @generated from field: int32 lease_ms = 1;
690
+ */
691
+ leaseMs: number;
692
+
693
+ /**
694
+ * Send a Heartbeat at least this often, with or without leases: it renews them and keeps
695
+ * the stream alive, since the engine closes a connection that stays silent.
696
+ *
697
+ * @generated from field: int32 heartbeat_interval_ms = 2;
698
+ */
699
+ heartbeatIntervalMs: number;
700
+ };
701
+
702
+ /**
703
+ * Describes the message spool.v1.Ready.
704
+ * Use `create(ReadySchema)` to create a new message.
705
+ */
706
+ export declare const ReadySchema: GenMessage<Ready>;
707
+
708
+ /**
709
+ * @generated from message spool.v1.ClaimedTask
710
+ */
711
+ export declare type ClaimedTask = Message<"spool.v1.ClaimedTask"> & {
712
+ /**
713
+ * @generated from field: int64 task_id = 1;
714
+ */
715
+ taskId: bigint;
716
+
717
+ /**
718
+ * @generated from field: string run_id = 2;
719
+ */
720
+ runId: string;
721
+
722
+ /**
723
+ * @generated from field: string tenant_id = 3;
724
+ */
725
+ tenantId: string;
726
+
727
+ /**
728
+ * @generated from field: string workflow = 4;
729
+ */
730
+ workflow: string;
731
+
732
+ /**
733
+ * Fencing token: step reports and the completion must present it.
734
+ *
735
+ * @generated from field: int32 attempt = 5;
736
+ */
737
+ attempt: number;
738
+
739
+ /**
740
+ * @generated from field: google.protobuf.Value input = 6;
741
+ */
742
+ input?: Value | undefined;
743
+
744
+ /**
745
+ * Steps already recorded for this run, in seq order from 0. The worker replays these
746
+ * instead of running them again.
747
+ *
748
+ * @generated from field: repeated spool.v1.JournalEntry journal = 7;
749
+ */
750
+ journal: JournalEntry[];
751
+ };
752
+
753
+ /**
754
+ * Describes the message spool.v1.ClaimedTask.
755
+ * Use `create(ClaimedTaskSchema)` to create a new message.
756
+ */
757
+ export declare const ClaimedTaskSchema: GenMessage<ClaimedTask>;
758
+
759
+ /**
760
+ * @generated from message spool.v1.JournalEntry
761
+ */
762
+ export declare type JournalEntry = Message<"spool.v1.JournalEntry"> & {
763
+ /**
764
+ * @generated from field: int32 seq = 1;
765
+ */
766
+ seq: number;
767
+
768
+ /**
769
+ * @generated from field: string name = 2;
770
+ */
771
+ name: string;
772
+
773
+ /**
774
+ * @generated from field: google.protobuf.Value output = 3;
775
+ */
776
+ output?: Value | undefined;
777
+ };
778
+
779
+ /**
780
+ * Describes the message spool.v1.JournalEntry.
781
+ * Use `create(JournalEntrySchema)` to create a new message.
782
+ */
783
+ export declare const JournalEntrySchema: GenMessage<JournalEntry>;
784
+
785
+ /**
786
+ * @generated from message spool.v1.Ack
787
+ */
788
+ export declare type Ack = Message<"spool.v1.Ack"> & {
789
+ /**
790
+ * @generated from field: uint64 request_id = 1;
791
+ */
792
+ requestId: bigint;
793
+
794
+ /**
795
+ * False when a step report changed nothing because the step was already recorded.
796
+ *
797
+ * @generated from field: bool recorded = 2;
798
+ */
799
+ recorded: boolean;
800
+
801
+ /**
802
+ * For a Throttle: 0 when the run goes on now; otherwise how long until its token is due,
803
+ * during which the run is parked and the worker must stop it.
804
+ *
805
+ * @generated from field: int64 wait_ms = 3;
806
+ */
807
+ waitMs: bigint;
808
+ };
809
+
810
+ /**
811
+ * Describes the message spool.v1.Ack.
812
+ * Use `create(AckSchema)` to create a new message.
813
+ */
814
+ export declare const AckSchema: GenMessage<Ack>;
815
+
816
+ /**
817
+ * A request failed; the stream stays open.
818
+ *
819
+ * @generated from message spool.v1.Failure
820
+ */
821
+ export declare type Failure = Message<"spool.v1.Failure"> & {
822
+ /**
823
+ * @generated from field: uint64 request_id = 1;
824
+ */
825
+ requestId: bigint;
826
+
827
+ /**
828
+ * Stable code: LEASE_LOST (drop the task), STEP_MISMATCH (the workflow changed
829
+ * mid-run), INVALID_ARGUMENT, DATABASE_UNAVAILABLE (retry), INTERNAL.
830
+ *
831
+ * @generated from field: string code = 2;
832
+ */
833
+ code: string;
834
+
835
+ /**
836
+ * @generated from field: string message = 3;
837
+ */
838
+ message: string;
839
+
840
+ /**
841
+ * True when the same request may succeed if sent again.
842
+ *
843
+ * @generated from field: bool retryable = 4;
844
+ */
845
+ retryable: boolean;
846
+ };
847
+
848
+ /**
849
+ * Describes the message spool.v1.Failure.
850
+ * Use `create(FailureSchema)` to create a new message.
851
+ */
852
+ export declare const FailureSchema: GenMessage<Failure>;
853
+
854
+ /**
855
+ * @generated from message spool.v1.HeartbeatAck
856
+ */
857
+ export declare type HeartbeatAck = Message<"spool.v1.HeartbeatAck"> & {
858
+ /**
859
+ * @generated from field: uint64 request_id = 1;
860
+ */
861
+ requestId: bigint;
862
+
863
+ /**
864
+ * Leases that were not renewed because they expired, were reclaimed or finished. Stop
865
+ * working on these: any further report for them will be rejected.
866
+ *
867
+ * @generated from field: repeated spool.v1.LeaseRef lost = 2;
868
+ */
869
+ lost: LeaseRef[];
870
+ };
871
+
872
+ /**
873
+ * Describes the message spool.v1.HeartbeatAck.
874
+ * Use `create(HeartbeatAckSchema)` to create a new message.
875
+ */
876
+ export declare const HeartbeatAckSchema: GenMessage<HeartbeatAck>;
877
+
878
+ /**
879
+ * The worker protocol: one long-lived bidirectional stream per worker process.
880
+ *
881
+ * @generated from service spool.v1.WorkerService
882
+ */
883
+ export declare const WorkerService: GenService<{
884
+ /**
885
+ * The worker opens the stream with a Hello and pulls tasks as it frees slots; the
886
+ * engine pushes at most as many tasks as were pulled. Step reports, completions and
887
+ * heartbeats travel on the same stream and are answered by request_id. When the stream
888
+ * closes, the worker's leases are left to expire; the worker can reconnect to any engine
889
+ * and keep reporting, because every call is fenced by worker id and attempt, not by
890
+ * stream. Needs HTTP/2 (Connect or gRPC).
891
+ *
892
+ * @generated from rpc spool.v1.WorkerService.Connect
893
+ */
894
+ connect: {
895
+ methodKind: "bidi_streaming";
896
+ input: typeof ConnectRequestSchema;
897
+ output: typeof ConnectResponseSchema;
898
+ },
899
+ }>;
900
+