@xeonr/pipelines-sdk 0.1.0 → 0.3.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 (106) hide show
  1. package/README.md +247 -24
  2. package/dist/client.d.ts +73 -3
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +48 -1
  5. package/dist/client.js.map +1 -1
  6. package/dist/errors.d.ts +42 -6
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +45 -2
  9. package/dist/errors.js.map +1 -1
  10. package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts +173 -12
  11. package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.d.ts.map +1 -1
  12. package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js +45 -28
  13. package/dist/gen/xeonr/pipelines/private/v1/attempt_pb.js.map +1 -1
  14. package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts +136 -17
  15. package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.d.ts.map +1 -1
  16. package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js +42 -35
  17. package/dist/gen/xeonr/pipelines/private/v1/step_local_pb.js.map +1 -1
  18. package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts +346 -15
  19. package/dist/gen/xeonr/pipelines/private/v1/worker_pb.d.ts.map +1 -1
  20. package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js +105 -10
  21. package/dist/gen/xeonr/pipelines/private/v1/worker_pb.js.map +1 -1
  22. package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts +38 -6
  23. package/dist/gen/xeonr/pipelines/v1/common_pb.d.ts.map +1 -1
  24. package/dist/gen/xeonr/pipelines/v1/common_pb.js +37 -5
  25. package/dist/gen/xeonr/pipelines/v1/common_pb.js.map +1 -1
  26. package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts +280 -5
  27. package/dist/gen/xeonr/pipelines/v1/definition_pb.d.ts.map +1 -1
  28. package/dist/gen/xeonr/pipelines/v1/definition_pb.js +100 -7
  29. package/dist/gen/xeonr/pipelines/v1/definition_pb.js.map +1 -1
  30. package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts +1100 -0
  31. package/dist/gen/xeonr/pipelines/v1/pipelines_pb.d.ts.map +1 -0
  32. package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js +298 -0
  33. package/dist/gen/xeonr/pipelines/v1/pipelines_pb.js.map +1 -0
  34. package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts +120 -1
  35. package/dist/gen/xeonr/pipelines/v1/pools_pb.d.ts.map +1 -1
  36. package/dist/gen/xeonr/pipelines/v1/pools_pb.js +36 -11
  37. package/dist/gen/xeonr/pipelines/v1/pools_pb.js.map +1 -1
  38. package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts +769 -0
  39. package/dist/gen/xeonr/pipelines/v1/queues_pb.d.ts.map +1 -0
  40. package/dist/gen/xeonr/pipelines/v1/queues_pb.js +190 -0
  41. package/dist/gen/xeonr/pipelines/v1/queues_pb.js.map +1 -0
  42. package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts +60 -0
  43. package/dist/gen/xeonr/pipelines/v1/registry_pb.d.ts.map +1 -1
  44. package/dist/gen/xeonr/pipelines/v1/registry_pb.js +21 -16
  45. package/dist/gen/xeonr/pipelines/v1/registry_pb.js.map +1 -1
  46. package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts +867 -4
  47. package/dist/gen/xeonr/pipelines/v1/runs_pb.d.ts.map +1 -1
  48. package/dist/gen/xeonr/pipelines/v1/runs_pb.js +243 -27
  49. package/dist/gen/xeonr/pipelines/v1/runs_pb.js.map +1 -1
  50. package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts +1110 -0
  51. package/dist/gen/xeonr/pipelines/v1/schedules_pb.d.ts.map +1 -0
  52. package/dist/gen/xeonr/pipelines/v1/schedules_pb.js +295 -0
  53. package/dist/gen/xeonr/pipelines/v1/schedules_pb.js.map +1 -0
  54. package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts +8 -3
  55. package/dist/gen/xeonr/pipelines/v1/secrets_pb.d.ts.map +1 -1
  56. package/dist/gen/xeonr/pipelines/v1/secrets_pb.js +1 -1
  57. package/dist/gen/xeonr/pipelines/v1/secrets_pb.js.map +1 -1
  58. package/dist/gen/xeonr/platform/v1/options_pb.d.ts +123 -1
  59. package/dist/gen/xeonr/platform/v1/options_pb.d.ts.map +1 -1
  60. package/dist/gen/xeonr/platform/v1/options_pb.js +90 -1
  61. package/dist/gen/xeonr/platform/v1/options_pb.js.map +1 -1
  62. package/dist/handler.d.ts +50 -0
  63. package/dist/handler.d.ts.map +1 -1
  64. package/dist/handler.js +27 -0
  65. package/dist/handler.js.map +1 -1
  66. package/dist/index.d.ts +13 -1
  67. package/dist/index.d.ts.map +1 -1
  68. package/dist/index.js +7 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/logship.d.ts +60 -10
  71. package/dist/logship.d.ts.map +1 -1
  72. package/dist/logship.js +171 -28
  73. package/dist/logship.js.map +1 -1
  74. package/dist/queues.d.ts +171 -0
  75. package/dist/queues.d.ts.map +1 -0
  76. package/dist/queues.js +135 -0
  77. package/dist/queues.js.map +1 -0
  78. package/dist/reporter.d.ts +120 -0
  79. package/dist/reporter.d.ts.map +1 -0
  80. package/dist/reporter.js +323 -0
  81. package/dist/reporter.js.map +1 -0
  82. package/dist/schedules.d.ts +201 -0
  83. package/dist/schedules.d.ts.map +1 -0
  84. package/dist/schedules.js +127 -0
  85. package/dist/schedules.js.map +1 -0
  86. package/dist/testing/cron.d.ts +33 -0
  87. package/dist/testing/cron.d.ts.map +1 -0
  88. package/dist/testing/cron.js +177 -0
  89. package/dist/testing/cron.js.map +1 -0
  90. package/dist/testing/index.d.ts +142 -4
  91. package/dist/testing/index.d.ts.map +1 -1
  92. package/dist/testing/index.js +843 -44
  93. package/dist/testing/index.js.map +1 -1
  94. package/dist/testing/queues.d.ts +46 -0
  95. package/dist/testing/queues.d.ts.map +1 -0
  96. package/dist/testing/queues.js +70 -0
  97. package/dist/testing/queues.js.map +1 -0
  98. package/dist/testing/schedules.d.ts +113 -0
  99. package/dist/testing/schedules.d.ts.map +1 -0
  100. package/dist/testing/schedules.js +419 -0
  101. package/dist/testing/schedules.js.map +1 -0
  102. package/dist/worker.d.ts +78 -8
  103. package/dist/worker.d.ts.map +1 -1
  104. package/dist/worker.js +163 -33
  105. package/dist/worker.js.map +1 -1
  106. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
2
  import type { Duration, Timestamp, Value } from "@bufbuild/protobuf/wkt";
3
3
  import type { AttemptState, FailureClass, NodeState, PackageRef, Resource, ResourceRef, RunState, Termination } from "./common_pb.js";
4
- import type { Definition } from "./definition_pb.js";
4
+ import type { Definition, Retry } from "./definition_pb.js";
5
5
  import type { JsonObject, Message } from "@bufbuild/protobuf";
6
6
  /**
7
7
  * Describes the file xeonr/pipelines/v1/runs.proto.
@@ -30,6 +30,82 @@ export type Exclusion = Message<"xeonr.pipelines.v1.Exclusion"> & {
30
30
  * Use `create(ExclusionSchema)` to create a new message.
31
31
  */
32
32
  export declare const ExclusionSchema: GenMessage<Exclusion>;
33
+ /**
34
+ * PipelineName names a stored pipeline within a tenant by its binding and
35
+ * its name.
36
+ *
37
+ * @generated from message xeonr.pipelines.v1.PipelineName
38
+ */
39
+ export type PipelineName = Message<"xeonr.pipelines.v1.PipelineName"> & {
40
+ /**
41
+ * Tenant is the owning team.
42
+ *
43
+ * @generated from field: string tenant = 1;
44
+ */
45
+ tenant: string;
46
+ /**
47
+ * Product is the Auth application the pipeline is bound to. Empty is the
48
+ * caller's own product.
49
+ *
50
+ * @generated from field: string product = 2;
51
+ */
52
+ product: string;
53
+ /**
54
+ * Scope is the resource the pipeline is bound to.
55
+ *
56
+ * @generated from field: xeonr.pipelines.v1.ResourceRef scope = 3;
57
+ */
58
+ scope?: ResourceRef | undefined;
59
+ /**
60
+ * @generated from field: string name = 4;
61
+ */
62
+ name: string;
63
+ };
64
+ /**
65
+ * Describes the message xeonr.pipelines.v1.PipelineName.
66
+ * Use `create(PipelineNameSchema)` to create a new message.
67
+ */
68
+ export declare const PipelineNameSchema: GenMessage<PipelineName>;
69
+ /**
70
+ * PipelineSource starts a run from a published version of a stored
71
+ * pipeline (PipelinesService). Milestone 4.
72
+ *
73
+ * @generated from message xeonr.pipelines.v1.PipelineSource
74
+ */
75
+ export type PipelineSource = Message<"xeonr.pipelines.v1.PipelineSource"> & {
76
+ /**
77
+ * Pipeline names the pipeline. It must belong to the run's tenant.
78
+ *
79
+ * @generated from oneof xeonr.pipelines.v1.PipelineSource.pipeline
80
+ */
81
+ pipeline: {
82
+ /**
83
+ * @generated from field: string pipeline_id = 1;
84
+ */
85
+ value: string;
86
+ case: "pipelineId";
87
+ } | {
88
+ /**
89
+ * @generated from field: xeonr.pipelines.v1.PipelineName by_name = 2;
90
+ */
91
+ value: PipelineName;
92
+ case: "byName";
93
+ } | {
94
+ case: undefined;
95
+ value?: undefined;
96
+ };
97
+ /**
98
+ * Version is the published version to run; zero runs the latest.
99
+ *
100
+ * @generated from field: uint32 version = 3;
101
+ */
102
+ version: number;
103
+ };
104
+ /**
105
+ * Describes the message xeonr.pipelines.v1.PipelineSource.
106
+ * Use `create(PipelineSourceSchema)` to create a new message.
107
+ */
108
+ export declare const PipelineSourceSchema: GenMessage<PipelineSource>;
33
109
  /**
34
110
  * Run is one execution of one snapshot for one resource.
35
111
  *
@@ -178,12 +254,386 @@ export type Run = Message<"xeonr.pipelines.v1.Run"> & {
178
254
  * @generated from field: google.protobuf.Timestamp updated_at = 25;
179
255
  */
180
256
  updatedAt?: Timestamp | undefined;
257
+ /**
258
+ * QueueID and Queue are the queue a job went through (QueuesService):
259
+ * its id and name. Empty for a run that is not a job. Milestone 2.
260
+ *
261
+ * @generated from field: string queue_id = 26;
262
+ */
263
+ queueId: string;
264
+ /**
265
+ * @generated from field: string queue = 27;
266
+ */
267
+ queue: string;
268
+ /**
269
+ * Origin is where the run's snapshot came from. Milestone 4 sets
270
+ * PUBLISHED; every earlier run is INLINE.
271
+ *
272
+ * @generated from field: xeonr.pipelines.v1.RunOrigin origin = 28;
273
+ */
274
+ origin: RunOrigin;
275
+ /**
276
+ * PipelineID and PipelineVersion are the stored pipeline and the
277
+ * version a PUBLISHED run executes. Milestone 4.
278
+ *
279
+ * @generated from field: string pipeline_id = 29;
280
+ */
281
+ pipelineId: string;
282
+ /**
283
+ * @generated from field: uint32 pipeline_version = 30;
284
+ */
285
+ pipelineVersion: number;
286
+ /**
287
+ * Trigger is what started the run. Runs from before it was recorded read
288
+ * API. Milestone 4.
289
+ *
290
+ * @generated from field: xeonr.pipelines.v1.RunTrigger trigger = 31;
291
+ */
292
+ trigger: RunTrigger;
293
+ /**
294
+ * ScheduleID, ScheduledFor and ScheduleTarget name the schedule
295
+ * occurrence a SCHEDULE run came from: the schedule, the occurrence's
296
+ * time, and the enumerated target's key (empty for a schedule with one
297
+ * target). Together they are unique: one occurrence makes at most one
298
+ * run. Milestone 4.
299
+ *
300
+ * @generated from field: string schedule_id = 32;
301
+ */
302
+ scheduleId: string;
303
+ /**
304
+ * @generated from field: google.protobuf.Timestamp scheduled_for = 33;
305
+ */
306
+ scheduledFor?: Timestamp | undefined;
307
+ /**
308
+ * @generated from field: string schedule_target = 34;
309
+ */
310
+ scheduleTarget: string;
311
+ /**
312
+ * IssueInfoCount, IssueWarningCount and IssueErrorCount count the run's
313
+ * issues by severity, so a listing can say "12 items had problems"
314
+ * without reading them; IssuesTruncated says the run reached its cap.
315
+ * Milestone 4.
316
+ *
317
+ * @generated from field: uint32 issue_info_count = 35;
318
+ */
319
+ issueInfoCount: number;
320
+ /**
321
+ * @generated from field: uint32 issue_warning_count = 36;
322
+ */
323
+ issueWarningCount: number;
324
+ /**
325
+ * @generated from field: uint32 issue_error_count = 37;
326
+ */
327
+ issueErrorCount: number;
328
+ /**
329
+ * @generated from field: bool issues_truncated = 38;
330
+ */
331
+ issuesTruncated: boolean;
181
332
  };
182
333
  /**
183
334
  * Describes the message xeonr.pipelines.v1.Run.
184
335
  * Use `create(RunSchema)` to create a new message.
185
336
  */
186
337
  export declare const RunSchema: GenMessage<Run>;
338
+ /**
339
+ * StageProgress is one stage of an attempt, as declared by the step's
340
+ * manifest (StageDecl) or added by the step at run time.
341
+ *
342
+ * @generated from message xeonr.pipelines.v1.StageProgress
343
+ */
344
+ export type StageProgress = Message<"xeonr.pipelines.v1.StageProgress"> & {
345
+ /**
346
+ * @generated from field: string key = 1;
347
+ */
348
+ key: string;
349
+ /**
350
+ * @generated from field: string name = 2;
351
+ */
352
+ name: string;
353
+ /**
354
+ * Weight is the declared weight; a stage the step added at run time has
355
+ * weight 0, so it cannot move the overall bar.
356
+ *
357
+ * @generated from field: uint32 weight = 3;
358
+ */
359
+ weight: number;
360
+ /**
361
+ * @generated from field: xeonr.pipelines.v1.StageState state = 4;
362
+ */
363
+ state: StageState;
364
+ /**
365
+ * Fraction is how far along the stage is, from 0 to 1.
366
+ *
367
+ * @generated from field: double fraction = 5;
368
+ */
369
+ fraction: number;
370
+ /**
371
+ * Message says what the stage is doing now.
372
+ *
373
+ * @generated from field: string message = 6;
374
+ */
375
+ message: string;
376
+ /**
377
+ * Processed, Total and Failed count items; a zero total is unknown.
378
+ *
379
+ * @generated from field: uint64 processed = 7;
380
+ */
381
+ processed: bigint;
382
+ /**
383
+ * @generated from field: uint64 total = 8;
384
+ */
385
+ total: bigint;
386
+ /**
387
+ * @generated from field: uint64 failed = 9;
388
+ */
389
+ failed: bigint;
390
+ /**
391
+ * @generated from field: google.protobuf.Timestamp started_at = 10;
392
+ */
393
+ startedAt?: Timestamp | undefined;
394
+ /**
395
+ * @generated from field: google.protobuf.Timestamp finished_at = 11;
396
+ */
397
+ finishedAt?: Timestamp | undefined;
398
+ };
399
+ /**
400
+ * Describes the message xeonr.pipelines.v1.StageProgress.
401
+ * Use `create(StageProgressSchema)` to create a new message.
402
+ */
403
+ export declare const StageProgressSchema: GenMessage<StageProgress>;
404
+ /**
405
+ * AttemptProgress is what an attempt reported of its progress (SetProgress),
406
+ * as the platform derived it.
407
+ *
408
+ * Every declared stage is present, PENDING, from the claim, so the whole
409
+ * sequence can be drawn before anything runs. Reporting a stage finishes the
410
+ * one before it. The overall `fraction` is
411
+ * (Σ weight of finished stages + current stage's fraction × its weight) /
412
+ * Σ weight, or the reported fraction for a step with no stages, and it never
413
+ * goes backwards: the platform keeps the greater of the last value and the
414
+ * new one.
415
+ *
416
+ * @generated from message xeonr.pipelines.v1.AttemptProgress
417
+ */
418
+ export type AttemptProgress = Message<"xeonr.pipelines.v1.AttemptProgress"> & {
419
+ /**
420
+ * @generated from field: double fraction = 1;
421
+ */
422
+ fraction: number;
423
+ /**
424
+ * Message is the latest thing the attempt said it was doing.
425
+ *
426
+ * @generated from field: string message = 2;
427
+ */
428
+ message: string;
429
+ /**
430
+ * @generated from field: uint64 processed = 3;
431
+ */
432
+ processed: bigint;
433
+ /**
434
+ * @generated from field: uint64 total = 4;
435
+ */
436
+ total: bigint;
437
+ /**
438
+ * @generated from field: uint64 failed = 5;
439
+ */
440
+ failed: bigint;
441
+ /**
442
+ * @generated from field: repeated xeonr.pipelines.v1.StageProgress stages = 6;
443
+ */
444
+ stages: StageProgress[];
445
+ /**
446
+ * EstimatedRemaining is the median-based estimate of the time left: the
447
+ * medians of the stages not started plus the rest of the current one,
448
+ * over recent successful attempts of the same package in the same
449
+ * pipeline. Unset when there are fewer than three to go on: no estimate
450
+ * is shown rather than a wrong one (XMB's eta). Computed when read, never
451
+ * stored. Provisional.
452
+ *
453
+ * @generated from field: google.protobuf.Duration estimated_remaining = 7;
454
+ */
455
+ estimatedRemaining?: Duration | undefined;
456
+ /**
457
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
458
+ */
459
+ updatedAt?: Timestamp | undefined;
460
+ };
461
+ /**
462
+ * Describes the message xeonr.pipelines.v1.AttemptProgress.
463
+ * Use `create(AttemptProgressSchema)` to create a new message.
464
+ */
465
+ export declare const AttemptProgressSchema: GenMessage<AttemptProgress>;
466
+ /**
467
+ * ForEachCounts are a for_each node's elements by outcome.
468
+ *
469
+ * @generated from message xeonr.pipelines.v1.ForEachCounts
470
+ */
471
+ export type ForEachCounts = Message<"xeonr.pipelines.v1.ForEachCounts"> & {
472
+ /**
473
+ * @generated from field: uint32 total = 1;
474
+ */
475
+ total: number;
476
+ /**
477
+ * @generated from field: uint32 succeeded = 2;
478
+ */
479
+ succeeded: number;
480
+ /**
481
+ * @generated from field: uint32 failed = 3;
482
+ */
483
+ failed: number;
484
+ /**
485
+ * @generated from field: uint32 running = 4;
486
+ */
487
+ running: number;
488
+ /**
489
+ * Pending counts elements not started yet (waiting for `max_parallel`, or
490
+ * never to start after FAIL_FAST).
491
+ *
492
+ * @generated from field: uint32 pending = 5;
493
+ */
494
+ pending: number;
495
+ };
496
+ /**
497
+ * Describes the message xeonr.pipelines.v1.ForEachCounts.
498
+ * Use `create(ForEachCountsSchema)` to create a new message.
499
+ */
500
+ export declare const ForEachCountsSchema: GenMessage<ForEachCounts>;
501
+ /**
502
+ * RunIssue is one issue a run's step reported.
503
+ *
504
+ * @generated from message xeonr.pipelines.v1.RunIssue
505
+ */
506
+ export type RunIssue = Message<"xeonr.pipelines.v1.RunIssue"> & {
507
+ /**
508
+ * @generated from field: string id = 1;
509
+ */
510
+ id: string;
511
+ /**
512
+ * @generated from field: string run_id = 2;
513
+ */
514
+ runId: string;
515
+ /**
516
+ * @generated from field: string node_id = 3;
517
+ */
518
+ nodeId: string;
519
+ /**
520
+ * @generated from field: string attempt_id = 4;
521
+ */
522
+ attemptId: string;
523
+ /**
524
+ * Stage is the stage the step was in, when it said.
525
+ *
526
+ * @generated from field: string stage = 5;
527
+ */
528
+ stage: string;
529
+ /**
530
+ * @generated from field: xeonr.pipelines.v1.IssueSeverity severity = 6;
531
+ */
532
+ severity: IssueSeverity;
533
+ /**
534
+ * Subject is the human-readable thing the issue is about, always set
535
+ * ("The Matrix (1999)/movie.mkv"); SubjectKind and SubjectID are the
536
+ * product's machine handle for it, for a deep link.
537
+ *
538
+ * @generated from field: string subject = 7;
539
+ */
540
+ subject: string;
541
+ /**
542
+ * @generated from field: string subject_kind = 8;
543
+ */
544
+ subjectKind: string;
545
+ /**
546
+ * @generated from field: string subject_id = 9;
547
+ */
548
+ subjectId: string;
549
+ /**
550
+ * Message is one sentence that stands on its own.
551
+ *
552
+ * @generated from field: string message = 10;
553
+ */
554
+ message: string;
555
+ /**
556
+ * @generated from field: google.protobuf.Struct detail = 11;
557
+ */
558
+ detail?: JsonObject | undefined;
559
+ /**
560
+ * @generated from field: google.protobuf.Timestamp created_at = 12;
561
+ */
562
+ createdAt?: Timestamp | undefined;
563
+ };
564
+ /**
565
+ * Describes the message xeonr.pipelines.v1.RunIssue.
566
+ * Use `create(RunIssueSchema)` to create a new message.
567
+ */
568
+ export declare const RunIssueSchema: GenMessage<RunIssue>;
569
+ /**
570
+ * TraceSpan is one span of a run's trace.
571
+ *
572
+ * @generated from message xeonr.pipelines.v1.TraceSpan
573
+ */
574
+ export type TraceSpan = Message<"xeonr.pipelines.v1.TraceSpan"> & {
575
+ /**
576
+ * @generated from field: string trace_id = 1;
577
+ */
578
+ traceId: string;
579
+ /**
580
+ * @generated from field: string span_id = 2;
581
+ */
582
+ spanId: string;
583
+ /**
584
+ * ParentSpanID is empty for the run's root span.
585
+ *
586
+ * @generated from field: string parent_span_id = 3;
587
+ */
588
+ parentSpanId: string;
589
+ /**
590
+ * @generated from field: string name = 4;
591
+ */
592
+ name: string;
593
+ /**
594
+ * @generated from field: xeonr.pipelines.v1.TraceSpanSource source = 5;
595
+ */
596
+ source: TraceSpanSource;
597
+ /**
598
+ * NodeID and AttemptID place the span; both empty for the run's span.
599
+ *
600
+ * @generated from field: string node_id = 6;
601
+ */
602
+ nodeId: string;
603
+ /**
604
+ * @generated from field: string attempt_id = 7;
605
+ */
606
+ attemptId: string;
607
+ /**
608
+ * @generated from field: google.protobuf.Timestamp started_at = 8;
609
+ */
610
+ startedAt?: Timestamp | undefined;
611
+ /**
612
+ * EndedAt is unset for a span still open (a running attempt).
613
+ *
614
+ * @generated from field: google.protobuf.Timestamp ended_at = 9;
615
+ */
616
+ endedAt?: Timestamp | undefined;
617
+ /**
618
+ * Status is `ok`, `error` or empty.
619
+ *
620
+ * @generated from field: string status = 10;
621
+ */
622
+ status: string;
623
+ /**
624
+ * @generated from field: string status_message = 11;
625
+ */
626
+ statusMessage: string;
627
+ /**
628
+ * @generated from field: google.protobuf.Struct attributes = 12;
629
+ */
630
+ attributes?: JsonObject | undefined;
631
+ };
632
+ /**
633
+ * Describes the message xeonr.pipelines.v1.TraceSpan.
634
+ * Use `create(TraceSpanSchema)` to create a new message.
635
+ */
636
+ export declare const TraceSpanSchema: GenMessage<TraceSpan>;
187
637
  /**
188
638
  * Attempt is one try at running a node. Attempts are numbered from 1 and
189
639
  * never reused; a node's result is exactly one attempt's, its settled one.
@@ -298,6 +748,53 @@ export type Attempt = Message<"xeonr.pipelines.v1.Attempt"> & {
298
748
  * @generated from field: bool log_truncated = 20;
299
749
  */
300
750
  logTruncated: boolean;
751
+ /**
752
+ * SettledAt is when this attempt settled its node: its result and outputs
753
+ * became the node's. Set on every attempt that did, the node's current
754
+ * settled attempt and any earlier one a RetryNode replaced; unset on an
755
+ * attempt that never settled its node (abandoned, cancelled, or failed and
756
+ * retried), whatever its state. Milestone 2.
757
+ *
758
+ * @generated from field: google.protobuf.Timestamp settled_at = 21;
759
+ */
760
+ settledAt?: Timestamp | undefined;
761
+ /**
762
+ * Blobs are the blob outputs this attempt committed: manifest blob slots
763
+ * and artifacts, each with its slot or artifact name, file name, size and
764
+ * digest. Filled only for an attempt with `settled_at`, so a console can
765
+ * list what an earlier settled attempt wrote and download it with
766
+ * GetBlobOutput's `attempt_id`; empty otherwise. For the current settled
767
+ * attempt they are the same blobs as `NodeRun.blobs`. Milestone 2.
768
+ *
769
+ * @generated from field: repeated xeonr.pipelines.v1.BlobOutput blobs = 22;
770
+ */
771
+ blobs: BlobOutput[];
772
+ /**
773
+ * ChildRunID is the child run this attempt of a sub-pipeline node
774
+ * started. Milestone 4.
775
+ *
776
+ * @generated from field: string child_run_id = 23;
777
+ */
778
+ childRunId: string;
779
+ /**
780
+ * ItemIndex and Item are the element of a for_each node this attempt
781
+ * ran; unset outside for_each. Item is at most 4 KiB encoded; a larger
782
+ * element is left out and only its index shown. Milestone 4.
783
+ *
784
+ * @generated from field: optional uint32 item_index = 24;
785
+ */
786
+ itemIndex?: number | undefined;
787
+ /**
788
+ * @generated from field: google.protobuf.Value item = 25;
789
+ */
790
+ item?: Value | undefined;
791
+ /**
792
+ * Progress is what the attempt reported of its progress; unset when it
793
+ * reported none. Milestone 4.
794
+ *
795
+ * @generated from field: xeonr.pipelines.v1.AttemptProgress progress = 26;
796
+ */
797
+ progress?: AttemptProgress | undefined;
301
798
  };
302
799
  /**
303
800
  * Describes the message xeonr.pipelines.v1.Attempt.
@@ -338,8 +835,8 @@ export type BlobOutput = Message<"xeonr.pipelines.v1.BlobOutput"> & {
338
835
  */
339
836
  mediaType: string;
340
837
  /**
341
- * ExpiresAt is when the platform deletes the blob; unset keeps it for the
342
- * platform's retention.
838
+ * ExpiresAt is meant to be when the platform deletes the blob. Not set
839
+ * yet: the server stores no expiry and keeps every blob output.
343
840
  *
344
841
  * @generated from field: google.protobuf.Timestamp expires_at = 6;
345
842
  */
@@ -432,7 +929,8 @@ export type NodeRun = Message<"xeonr.pipelines.v1.NodeRun"> & {
432
929
  */
433
930
  releasedBy: string;
434
931
  /**
435
- * DownstreamRunID is the run a trigger node started.
932
+ * DownstreamRunID is the run a trigger node started, or the latest child
933
+ * run of a sub-pipeline node (each attempt's is on the attempt).
436
934
  *
437
935
  * @generated from field: string downstream_run_id = 14;
438
936
  */
@@ -445,6 +943,13 @@ export type NodeRun = Message<"xeonr.pipelines.v1.NodeRun"> & {
445
943
  * @generated from field: google.protobuf.Timestamp finished_at = 16;
446
944
  */
447
945
  finishedAt?: Timestamp | undefined;
946
+ /**
947
+ * ForEach counts a for_each node's elements; unset for any other node.
948
+ * Milestone 4.
949
+ *
950
+ * @generated from field: xeonr.pipelines.v1.ForEachCounts for_each = 17;
951
+ */
952
+ forEach?: ForEachCounts | undefined;
448
953
  };
449
954
  /**
450
955
  * Describes the message xeonr.pipelines.v1.NodeRun.
@@ -484,6 +989,17 @@ export type CreateRunRequest = Message<"xeonr.pipelines.v1.CreateRunRequest"> &
484
989
  * steps read them as environment. They are never taken from the
485
990
  * definition. At most 64 KiB encoded.
486
991
  *
992
+ * A person is not a product. A run a person starts from a stored pipeline
993
+ * (`pipeline`) carries no attested facts, and a person's call that sends
994
+ * some with `pipeline` is refused with `invalid_argument`: its attempts
995
+ * get the tier the deployment's policy gives an attempt with no facts,
996
+ * which is the least trusted one unless a rule needs no facts, and
997
+ * receive only secrets whose policy sets `any_facts`. A product's service
998
+ * account starting the same pipeline attests facts as for an inline run.
999
+ * (Provisional, and applied only to `pipeline` here: the plan's security
1000
+ * model has a person attest nothing, but an inline run by a person still
1001
+ * accepts facts today.)
1002
+ *
487
1003
  * @generated from field: google.protobuf.Struct attested_facts = 4;
488
1004
  */
489
1005
  attestedFacts?: JsonObject | undefined;
@@ -510,6 +1026,22 @@ export type CreateRunRequest = Message<"xeonr.pipelines.v1.CreateRunRequest"> &
510
1026
  */
511
1027
  value: string;
512
1028
  case: "snapshotId";
1029
+ } | {
1030
+ /**
1031
+ * Pipeline runs a published version of a stored pipeline. The caller
1032
+ * must be allowed by its policy (the pipeline's own product, a product
1033
+ * in `allowed_products`, or a person when `allow_people`), the run's
1034
+ * resource must be the pipeline's scope or of one of its
1035
+ * `resource_kinds`, and `variables` are checked against its declared
1036
+ * variables, defaults filled. Refused with `failed_precondition` for an
1037
+ * archived pipeline or one never published. The policy's exclusion and
1038
+ * concurrency apply; an `exclusion` given here takes precedence.
1039
+ * Milestone 4.
1040
+ *
1041
+ * @generated from field: xeonr.pipelines.v1.PipelineSource pipeline = 9;
1042
+ */
1043
+ value: PipelineSource;
1044
+ case: "pipeline";
513
1045
  } | {
514
1046
  case: undefined;
515
1047
  value?: undefined;
@@ -1044,12 +1576,171 @@ export type CreateJobRequest = Message<"xeonr.pipelines.v1.CreateJobRequest"> &
1044
1576
  * @generated from field: xeonr.pipelines.v1.Resource resource = 6;
1045
1577
  */
1046
1578
  resource?: Resource | undefined;
1579
+ /**
1580
+ * Queue is the queue the job is admitted through, by name, resolved
1581
+ * among the calling product's queues: the job's tenant's own queue of
1582
+ * that name if there is one, else the product-wide one. Unset is the
1583
+ * product's `default` queue, which behaves as jobs did before queues.
1584
+ * An unknown name is refused with `not_found`; a job asking for more
1585
+ * retries or a longer timeout than the queue allows is refused with
1586
+ * `invalid_argument`. When `retry` or `timeout` is unset the queue's
1587
+ * default applies, then the platform's. Milestone 2.
1588
+ *
1589
+ * @generated from field: string queue = 10;
1590
+ */
1591
+ queue: string;
1592
+ /**
1593
+ * Retry is the job's retry policy, the same message and meaning as a
1594
+ * node's `retry`, applied to the job's one node. Unset is the platform
1595
+ * default: the transient classes only, with backoff, which does not
1596
+ * retry FAILURE_CLASS_HANDLER_ERROR unless the worker marked the failure
1597
+ * transient. To retry every handler error, list HANDLER_ERROR in `when`.
1598
+ * `max` is bounded here (10) and may be lowered by the platform's policy,
1599
+ * never raised. Milestone 2.
1600
+ *
1601
+ * @generated from field: xeonr.pipelines.v1.Retry retry = 7;
1602
+ */
1603
+ retry?: Retry | undefined;
1604
+ /**
1605
+ * Timeout bounds one attempt of the job from its start, as a node's
1606
+ * `timeout` does. Unset is the platform default; the upper bound is the
1607
+ * platform's policy, not this schema's. Milestone 2.
1608
+ *
1609
+ * @generated from field: google.protobuf.Duration timeout = 8;
1610
+ */
1611
+ timeout?: Duration | undefined;
1612
+ /**
1613
+ * Interruptible is the job's node's `interruptible`, with the same
1614
+ * meaning: an attempt its worker stops because the worker is shutting
1615
+ * down (FAILURE_CLASS_INTERRUPTED) is offered again without spending a
1616
+ * retry, up to the platform's bound. Unset, as for a node, every such
1617
+ * interruption counts against `retry.max`. Set it for a handler that is
1618
+ * safe to run again from the start. Milestone 2.
1619
+ *
1620
+ * validate:skip a bool has no bounds
1621
+ *
1622
+ * @generated from field: bool interruptible = 9;
1623
+ */
1624
+ interruptible: boolean;
1047
1625
  };
1048
1626
  /**
1049
1627
  * Describes the message xeonr.pipelines.v1.CreateJobRequest.
1050
1628
  * Use `create(CreateJobRequestSchema)` to create a new message.
1051
1629
  */
1052
1630
  export declare const CreateJobRequestSchema: GenMessage<CreateJobRequest>;
1631
+ /**
1632
+ * @generated from message xeonr.pipelines.v1.ListIssuesRequest
1633
+ */
1634
+ export type ListIssuesRequest = Message<"xeonr.pipelines.v1.ListIssuesRequest"> & {
1635
+ /**
1636
+ * @generated from field: string run_id = 1;
1637
+ */
1638
+ runId: string;
1639
+ /**
1640
+ * NodeID narrows to one node's issues.
1641
+ *
1642
+ * @generated from field: string node_id = 2;
1643
+ */
1644
+ nodeId: string;
1645
+ /**
1646
+ * AttemptID narrows to one attempt's issues.
1647
+ *
1648
+ * @generated from field: string attempt_id = 3;
1649
+ */
1650
+ attemptId: string;
1651
+ /**
1652
+ * MinSeverity leaves out issues below it. Unset lists all.
1653
+ *
1654
+ * @generated from field: xeonr.pipelines.v1.IssueSeverity min_severity = 4;
1655
+ */
1656
+ minSeverity: IssueSeverity;
1657
+ /**
1658
+ * Cursor is opaque, empty for the first page.
1659
+ *
1660
+ * @generated from field: string cursor = 5;
1661
+ */
1662
+ cursor: string;
1663
+ /**
1664
+ * Limit is capped at 500; zero means the default of 100.
1665
+ *
1666
+ * @generated from field: uint32 limit = 6;
1667
+ */
1668
+ limit: number;
1669
+ };
1670
+ /**
1671
+ * Describes the message xeonr.pipelines.v1.ListIssuesRequest.
1672
+ * Use `create(ListIssuesRequestSchema)` to create a new message.
1673
+ */
1674
+ export declare const ListIssuesRequestSchema: GenMessage<ListIssuesRequest>;
1675
+ /**
1676
+ * @generated from message xeonr.pipelines.v1.ListIssuesResponse
1677
+ */
1678
+ export type ListIssuesResponse = Message<"xeonr.pipelines.v1.ListIssuesResponse"> & {
1679
+ /**
1680
+ * @generated from field: repeated xeonr.pipelines.v1.RunIssue issues = 1;
1681
+ */
1682
+ issues: RunIssue[];
1683
+ /**
1684
+ * NextCursor is empty when there is no further page.
1685
+ *
1686
+ * @generated from field: string next_cursor = 2;
1687
+ */
1688
+ nextCursor: string;
1689
+ };
1690
+ /**
1691
+ * Describes the message xeonr.pipelines.v1.ListIssuesResponse.
1692
+ * Use `create(ListIssuesResponseSchema)` to create a new message.
1693
+ */
1694
+ export declare const ListIssuesResponseSchema: GenMessage<ListIssuesResponse>;
1695
+ /**
1696
+ * @generated from message xeonr.pipelines.v1.GetRunTraceRequest
1697
+ */
1698
+ export type GetRunTraceRequest = Message<"xeonr.pipelines.v1.GetRunTraceRequest"> & {
1699
+ /**
1700
+ * @generated from field: string run_id = 1;
1701
+ */
1702
+ runId: string;
1703
+ /**
1704
+ * NodeID narrows to one node's spans (and the run's root).
1705
+ *
1706
+ * @generated from field: string node_id = 2;
1707
+ */
1708
+ nodeId: string;
1709
+ /**
1710
+ * AttemptID narrows to one attempt's spans (and its node's and the
1711
+ * run's).
1712
+ *
1713
+ * @generated from field: string attempt_id = 3;
1714
+ */
1715
+ attemptId: string;
1716
+ };
1717
+ /**
1718
+ * Describes the message xeonr.pipelines.v1.GetRunTraceRequest.
1719
+ * Use `create(GetRunTraceRequestSchema)` to create a new message.
1720
+ */
1721
+ export declare const GetRunTraceRequestSchema: GenMessage<GetRunTraceRequest>;
1722
+ /**
1723
+ * @generated from message xeonr.pipelines.v1.GetRunTraceResponse
1724
+ */
1725
+ export type GetRunTraceResponse = Message<"xeonr.pipelines.v1.GetRunTraceResponse"> & {
1726
+ /**
1727
+ * Spans are ordered by start.
1728
+ *
1729
+ * @generated from field: repeated xeonr.pipelines.v1.TraceSpan spans = 1;
1730
+ */
1731
+ spans: TraceSpan[];
1732
+ /**
1733
+ * Truncated says step spans were dropped at the per-attempt cap.
1734
+ *
1735
+ * @generated from field: bool truncated = 2;
1736
+ */
1737
+ truncated: boolean;
1738
+ };
1739
+ /**
1740
+ * Describes the message xeonr.pipelines.v1.GetRunTraceResponse.
1741
+ * Use `create(GetRunTraceResponseSchema)` to create a new message.
1742
+ */
1743
+ export declare const GetRunTraceResponseSchema: GenMessage<GetRunTraceResponse>;
1053
1744
  /**
1054
1745
  * @generated from message xeonr.pipelines.v1.CreateJobResponse
1055
1746
  */
@@ -1101,6 +1792,162 @@ export declare enum ConflictPolicy {
1101
1792
  * Describes the enum xeonr.pipelines.v1.ConflictPolicy.
1102
1793
  */
1103
1794
  export declare const ConflictPolicySchema: GenEnum<ConflictPolicy>;
1795
+ /**
1796
+ * RunOrigin is where a run's snapshot came from: the CI-first plan's
1797
+ * snapshot `origin`.
1798
+ *
1799
+ * @generated from enum xeonr.pipelines.v1.RunOrigin
1800
+ */
1801
+ export declare enum RunOrigin {
1802
+ /**
1803
+ * @generated from enum value: RUN_ORIGIN_UNSPECIFIED = 0;
1804
+ */
1805
+ UNSPECIFIED = 0,
1806
+ /**
1807
+ * A definition given inline to CreateRun, or a job's one-node graph.
1808
+ *
1809
+ * @generated from enum value: RUN_ORIGIN_INLINE = 1;
1810
+ */
1811
+ INLINE = 1,
1812
+ /**
1813
+ * A published version of a stored pipeline (PipelinesService).
1814
+ *
1815
+ * @generated from enum value: RUN_ORIGIN_PUBLISHED = 2;
1816
+ */
1817
+ PUBLISHED = 2
1818
+ }
1819
+ /**
1820
+ * Describes the enum xeonr.pipelines.v1.RunOrigin.
1821
+ */
1822
+ export declare const RunOriginSchema: GenEnum<RunOrigin>;
1823
+ /**
1824
+ * RunTrigger is what started a run.
1825
+ *
1826
+ * @generated from enum xeonr.pipelines.v1.RunTrigger
1827
+ */
1828
+ export declare enum RunTrigger {
1829
+ /**
1830
+ * @generated from enum value: RUN_TRIGGER_UNSPECIFIED = 0;
1831
+ */
1832
+ UNSPECIFIED = 0,
1833
+ /**
1834
+ * A caller: CreateRun or CreateJob (platform-design §6.2's `api`).
1835
+ *
1836
+ * @generated from enum value: RUN_TRIGGER_API = 1;
1837
+ */
1838
+ API = 1,
1839
+ /**
1840
+ * A schedule's occurrence (SchedulesService); `schedule_id` and
1841
+ * `scheduled_for` say which.
1842
+ *
1843
+ * @generated from enum value: RUN_TRIGGER_SCHEDULE = 2;
1844
+ */
1845
+ SCHEDULE = 2,
1846
+ /**
1847
+ * Another run: a trigger node or a sub-pipeline node; `parent_run_id`
1848
+ * and `parent_node_id` say which.
1849
+ *
1850
+ * @generated from enum value: RUN_TRIGGER_PARENT = 3;
1851
+ */
1852
+ PARENT = 3
1853
+ }
1854
+ /**
1855
+ * Describes the enum xeonr.pipelines.v1.RunTrigger.
1856
+ */
1857
+ export declare const RunTriggerSchema: GenEnum<RunTrigger>;
1858
+ /**
1859
+ * StageState is where one declared stage of an attempt is.
1860
+ *
1861
+ * @generated from enum xeonr.pipelines.v1.StageState
1862
+ */
1863
+ export declare enum StageState {
1864
+ /**
1865
+ * @generated from enum value: STAGE_STATE_UNSPECIFIED = 0;
1866
+ */
1867
+ UNSPECIFIED = 0,
1868
+ /**
1869
+ * Declared, not reached yet.
1870
+ *
1871
+ * @generated from enum value: STAGE_STATE_PENDING = 1;
1872
+ */
1873
+ PENDING = 1,
1874
+ /**
1875
+ * @generated from enum value: STAGE_STATE_RUNNING = 2;
1876
+ */
1877
+ RUNNING = 2,
1878
+ /**
1879
+ * @generated from enum value: STAGE_STATE_SUCCEEDED = 3;
1880
+ */
1881
+ SUCCEEDED = 3,
1882
+ /**
1883
+ * @generated from enum value: STAGE_STATE_FAILED = 4;
1884
+ */
1885
+ FAILED = 4,
1886
+ /**
1887
+ * @generated from enum value: STAGE_STATE_SKIPPED = 5;
1888
+ */
1889
+ SKIPPED = 5
1890
+ }
1891
+ /**
1892
+ * Describes the enum xeonr.pipelines.v1.StageState.
1893
+ */
1894
+ export declare const StageStateSchema: GenEnum<StageState>;
1895
+ /**
1896
+ * IssueSeverity ranks an issue. The worker surface's
1897
+ * xeonr.pipelines.private.v1.IssueSeverity has the same values.
1898
+ *
1899
+ * @generated from enum xeonr.pipelines.v1.IssueSeverity
1900
+ */
1901
+ export declare enum IssueSeverity {
1902
+ /**
1903
+ * @generated from enum value: ISSUE_SEVERITY_UNSPECIFIED = 0;
1904
+ */
1905
+ UNSPECIFIED = 0,
1906
+ /**
1907
+ * @generated from enum value: ISSUE_SEVERITY_INFO = 1;
1908
+ */
1909
+ INFO = 1,
1910
+ /**
1911
+ * @generated from enum value: ISSUE_SEVERITY_WARNING = 2;
1912
+ */
1913
+ WARNING = 2,
1914
+ /**
1915
+ * @generated from enum value: ISSUE_SEVERITY_ERROR = 3;
1916
+ */
1917
+ ERROR = 3
1918
+ }
1919
+ /**
1920
+ * Describes the enum xeonr.pipelines.v1.IssueSeverity.
1921
+ */
1922
+ export declare const IssueSeveritySchema: GenEnum<IssueSeverity>;
1923
+ /**
1924
+ * TraceSpanSource is who recorded a span.
1925
+ *
1926
+ * @generated from enum xeonr.pipelines.v1.TraceSpanSource
1927
+ */
1928
+ export declare enum TraceSpanSource {
1929
+ /**
1930
+ * @generated from enum value: TRACE_SPAN_SOURCE_UNSPECIFIED = 0;
1931
+ */
1932
+ UNSPECIFIED = 0,
1933
+ /**
1934
+ * The platform, from the run's own record: the run, its nodes and their
1935
+ * attempts' lifecycle.
1936
+ *
1937
+ * @generated from enum value: TRACE_SPAN_SOURCE_PLATFORM = 1;
1938
+ */
1939
+ PLATFORM = 1,
1940
+ /**
1941
+ * A step or a worker handler, through ReportSpans.
1942
+ *
1943
+ * @generated from enum value: TRACE_SPAN_SOURCE_STEP = 2;
1944
+ */
1945
+ STEP = 2
1946
+ }
1947
+ /**
1948
+ * Describes the enum xeonr.pipelines.v1.TraceSpanSource.
1949
+ */
1950
+ export declare const TraceSpanSourceSchema: GenEnum<TraceSpanSource>;
1104
1951
  /**
1105
1952
  * RunsService creates runs and reads what became of them. It is the surface a
1106
1953
  * consuming product drives (the forge starts a run per push) and the one the
@@ -1205,6 +2052,22 @@ export declare const RunsService: GenService<{
1205
2052
  input: typeof ReleaseNodeRequestSchema;
1206
2053
  output: typeof ReleaseNodeResponseSchema;
1207
2054
  };
2055
+ /**
2056
+ * @generated from rpc xeonr.pipelines.v1.RunsService.ListIssues
2057
+ */
2058
+ listIssues: {
2059
+ methodKind: "unary";
2060
+ input: typeof ListIssuesRequestSchema;
2061
+ output: typeof ListIssuesResponseSchema;
2062
+ };
2063
+ /**
2064
+ * @generated from rpc xeonr.pipelines.v1.RunsService.GetRunTrace
2065
+ */
2066
+ getRunTrace: {
2067
+ methodKind: "unary";
2068
+ input: typeof GetRunTraceRequestSchema;
2069
+ output: typeof GetRunTraceResponseSchema;
2070
+ };
1208
2071
  /**
1209
2072
  * @generated from rpc xeonr.pipelines.v1.RunsService.CreateJob
1210
2073
  */