@usine/orchestrator 0.2.1 → 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 (173) hide show
  1. package/README.md +151 -52
  2. package/dist/board/items.d.ts +9 -1
  3. package/dist/board/items.d.ts.map +1 -1
  4. package/dist/board/items.js +16 -4
  5. package/dist/board/items.js.map +1 -1
  6. package/dist/board/projection.d.ts +7 -1
  7. package/dist/board/projection.d.ts.map +1 -1
  8. package/dist/board/projection.js +53 -14
  9. package/dist/board/projection.js.map +1 -1
  10. package/dist/board/tasks.d.ts +14 -2
  11. package/dist/board/tasks.d.ts.map +1 -1
  12. package/dist/board/tasks.js +23 -8
  13. package/dist/board/tasks.js.map +1 -1
  14. package/dist/credentials.d.ts +5 -6
  15. package/dist/credentials.d.ts.map +1 -1
  16. package/dist/credentials.js +22 -15
  17. package/dist/credentials.js.map +1 -1
  18. package/dist/current-instance/changes.d.ts +87 -0
  19. package/dist/current-instance/changes.d.ts.map +1 -0
  20. package/dist/current-instance/changes.js +138 -0
  21. package/dist/current-instance/changes.js.map +1 -0
  22. package/dist/current-instance/current-instance.d.ts +89 -0
  23. package/dist/current-instance/current-instance.d.ts.map +1 -0
  24. package/dist/current-instance/current-instance.js +163 -0
  25. package/dist/current-instance/current-instance.js.map +1 -0
  26. package/dist/exe-dev.d.ts +6 -2
  27. package/dist/exe-dev.d.ts.map +1 -1
  28. package/dist/exe-dev.js +7 -8
  29. package/dist/exe-dev.js.map +1 -1
  30. package/dist/idle-triggers.d.ts +1 -1
  31. package/dist/idle-triggers.d.ts.map +1 -1
  32. package/dist/idle-triggers.js +1 -1
  33. package/dist/idle-triggers.js.map +1 -1
  34. package/dist/label-reconciler.d.ts +5 -2
  35. package/dist/label-reconciler.d.ts.map +1 -1
  36. package/dist/label-reconciler.js.map +1 -1
  37. package/dist/local.d.ts +4 -18
  38. package/dist/local.d.ts.map +1 -1
  39. package/dist/local.js +7 -45
  40. package/dist/local.js.map +1 -1
  41. package/dist/loop-matches.d.ts +28 -0
  42. package/dist/loop-matches.d.ts.map +1 -0
  43. package/dist/loop-matches.js +74 -0
  44. package/dist/loop-matches.js.map +1 -0
  45. package/dist/operator/attempt.d.ts +57 -10
  46. package/dist/operator/attempt.d.ts.map +1 -1
  47. package/dist/operator/attempt.js +49 -10
  48. package/dist/operator/attempt.js.map +1 -1
  49. package/dist/operator/board.d.ts +43 -16
  50. package/dist/operator/board.d.ts.map +1 -1
  51. package/dist/operator/board.js +43 -16
  52. package/dist/operator/board.js.map +1 -1
  53. package/dist/operator/configuration.d.ts +258 -0
  54. package/dist/operator/configuration.d.ts.map +1 -0
  55. package/dist/operator/configuration.js +410 -0
  56. package/dist/operator/configuration.js.map +1 -0
  57. package/dist/operator/desk.d.ts +181 -0
  58. package/dist/operator/desk.d.ts.map +1 -0
  59. package/dist/operator/desk.js +463 -0
  60. package/dist/operator/desk.js.map +1 -0
  61. package/dist/operator/github-changes.d.ts +88 -0
  62. package/dist/operator/github-changes.d.ts.map +1 -0
  63. package/dist/operator/github-changes.js +266 -0
  64. package/dist/operator/github-changes.js.map +1 -0
  65. package/dist/operator/http.d.ts +152 -57
  66. package/dist/operator/http.d.ts.map +1 -1
  67. package/dist/operator/http.js +140 -21
  68. package/dist/operator/http.js.map +1 -1
  69. package/dist/operator/need.d.ts +44 -11
  70. package/dist/operator/need.d.ts.map +1 -1
  71. package/dist/operator/need.js +46 -9
  72. package/dist/operator/need.js.map +1 -1
  73. package/dist/operator/operator.d.ts +109 -29
  74. package/dist/operator/operator.d.ts.map +1 -1
  75. package/dist/operator/operator.js +254 -52
  76. package/dist/operator/operator.js.map +1 -1
  77. package/dist/operator/overview.d.ts +7 -7
  78. package/dist/operator/overview.d.ts.map +1 -1
  79. package/dist/operator/overview.js +5 -5
  80. package/dist/operator/overview.js.map +1 -1
  81. package/dist/operator/projection.d.ts +54 -5
  82. package/dist/operator/projection.d.ts.map +1 -1
  83. package/dist/operator/projection.js +100 -9
  84. package/dist/operator/projection.js.map +1 -1
  85. package/dist/operator/run.d.ts +71 -6
  86. package/dist/operator/run.d.ts.map +1 -1
  87. package/dist/operator/run.js +69 -6
  88. package/dist/operator/run.js.map +1 -1
  89. package/dist/operator/task.d.ts +93 -0
  90. package/dist/operator/task.d.ts.map +1 -0
  91. package/dist/operator/task.js +204 -0
  92. package/dist/operator/task.js.map +1 -0
  93. package/dist/operator/transcript.d.ts +12 -12
  94. package/dist/operator/transcript.d.ts.map +1 -1
  95. package/dist/operator/transcript.js +11 -9
  96. package/dist/operator/transcript.js.map +1 -1
  97. package/dist/operator/usage.d.ts +111 -0
  98. package/dist/operator/usage.d.ts.map +1 -0
  99. package/dist/operator/usage.js +219 -0
  100. package/dist/operator/usage.js.map +1 -0
  101. package/dist/orchestrator.d.ts +8 -5
  102. package/dist/orchestrator.d.ts.map +1 -1
  103. package/dist/orchestrator.js +4 -2
  104. package/dist/orchestrator.js.map +1 -1
  105. package/dist/polling/cycle.d.ts +28 -10
  106. package/dist/polling/cycle.d.ts.map +1 -1
  107. package/dist/polling/cycle.js +20 -6
  108. package/dist/polling/cycle.js.map +1 -1
  109. package/dist/polling/evaluation-failures.d.ts +42 -0
  110. package/dist/polling/evaluation-failures.d.ts.map +1 -0
  111. package/dist/polling/evaluation-failures.js +103 -0
  112. package/dist/polling/evaluation-failures.js.map +1 -0
  113. package/dist/polling/hints.d.ts +2 -2
  114. package/dist/polling/hints.d.ts.map +1 -1
  115. package/dist/polling/hints.js +2 -2
  116. package/dist/polling/hints.js.map +1 -1
  117. package/dist/polling/loop-evaluation.d.ts +21 -11
  118. package/dist/polling/loop-evaluation.d.ts.map +1 -1
  119. package/dist/polling/loop-evaluation.js +70 -27
  120. package/dist/polling/loop-evaluation.js.map +1 -1
  121. package/dist/polling/open-issues.d.ts +23 -0
  122. package/dist/polling/open-issues.d.ts.map +1 -0
  123. package/dist/polling/open-issues.js +77 -0
  124. package/dist/polling/open-issues.js.map +1 -0
  125. package/dist/polling/polling.d.ts +20 -11
  126. package/dist/polling/polling.d.ts.map +1 -1
  127. package/dist/polling/polling.js +201 -51
  128. package/dist/polling/polling.js.map +1 -1
  129. package/dist/polling/repository-sync.d.ts +20 -14
  130. package/dist/polling/repository-sync.d.ts.map +1 -1
  131. package/dist/polling/repository-sync.js +34 -27
  132. package/dist/polling/repository-sync.js.map +1 -1
  133. package/dist/polling-triggers.d.ts +1 -1
  134. package/dist/polling-triggers.d.ts.map +1 -1
  135. package/dist/polling-triggers.js +1 -1
  136. package/dist/polling-triggers.js.map +1 -1
  137. package/dist/reloads.d.ts +14 -0
  138. package/dist/reloads.d.ts.map +1 -0
  139. package/dist/reloads.js +7 -0
  140. package/dist/reloads.js.map +1 -0
  141. package/dist/runtime.d.ts +24 -0
  142. package/dist/runtime.d.ts.map +1 -0
  143. package/dist/runtime.js +58 -0
  144. package/dist/runtime.js.map +1 -0
  145. package/dist/schedule-triggers.d.ts +14 -10
  146. package/dist/schedule-triggers.d.ts.map +1 -1
  147. package/dist/schedule-triggers.js +36 -31
  148. package/dist/schedule-triggers.js.map +1 -1
  149. package/dist/scheduler.d.ts +35 -4
  150. package/dist/scheduler.d.ts.map +1 -1
  151. package/dist/scheduler.js +327 -41
  152. package/dist/scheduler.js.map +1 -1
  153. package/dist/ssh.d.ts +39 -0
  154. package/dist/ssh.d.ts.map +1 -0
  155. package/dist/ssh.js +75 -0
  156. package/dist/ssh.js.map +1 -0
  157. package/dist/trigger-condition.d.ts +12 -0
  158. package/dist/trigger-condition.d.ts.map +1 -0
  159. package/dist/trigger-condition.js +88 -0
  160. package/dist/trigger-condition.js.map +1 -0
  161. package/dist/trigger-submission.d.ts +16 -13
  162. package/dist/trigger-submission.d.ts.map +1 -1
  163. package/dist/trigger-submission.js +19 -14
  164. package/dist/trigger-submission.js.map +1 -1
  165. package/dist/worker-engine.d.ts +10 -0
  166. package/dist/worker-engine.d.ts.map +1 -0
  167. package/dist/worker-engine.js +25 -0
  168. package/dist/worker-engine.js.map +1 -0
  169. package/dist/worker-status.d.ts +70 -0
  170. package/dist/worker-status.d.ts.map +1 -0
  171. package/dist/worker-status.js +55 -0
  172. package/dist/worker-status.js.map +1 -0
  173. package/package.json +31 -10
@@ -3,21 +3,39 @@ import { Schema } from "effect";
3
3
  declare const InfraFailureView_base: Schema.Class<InfraFailureView, Schema.TaggedStruct<"InfraFailure", {
4
4
  readonly message: Schema.String;
5
5
  }>, {}>;
6
- /** An infra failure as the operator sees it; the defect cause stays behind this boundary. */
6
+ /** An infra failure without its defect cause. */
7
7
  export declare class InfraFailureView extends InfraFailureView_base {
8
8
  }
9
9
  declare const DefectFailureView_base: Schema.Class<DefectFailureView, Schema.TaggedStruct<"DefectFailure", {
10
10
  readonly message: Schema.String;
11
11
  }>, {}>;
12
- /** A captured programmer defect requiring operator intervention; the original cause stays behind this boundary. */
12
+ /** A captured programmer defect that needs operator intervention, without the original cause. */
13
13
  export declare class DefectFailureView extends DefectFailureView_base {
14
14
  }
15
15
  declare const AgentFailureView_base: Schema.Class<AgentFailureView, Schema.TaggedStruct<"AgentFailure", {
16
16
  readonly message: Schema.String;
17
17
  }>, {}>;
18
- /** An agent failure message safe to display to the operator. */
18
+ /** An agent failure message that is safe to show to the operator. */
19
19
  export declare class AgentFailureView extends AgentFailureView_base {
20
20
  }
21
+ declare const BlockedFailureView_base: Schema.Class<BlockedFailureView, Schema.TaggedStruct<"BlockedFailure", {
22
+ readonly message: Schema.String;
23
+ }>, {}>;
24
+ /**
25
+ * The blocker an Agent reported when it stopped. The Item's next state opens no Run of the Loop
26
+ * (ADR 0017).
27
+ */
28
+ export declare class BlockedFailureView extends BlockedFailureView_base {
29
+ }
30
+ declare const QuestionFailureView_base: Schema.Class<QuestionFailureView, Schema.TaggedStruct<"QuestionFailure", {
31
+ readonly question: Schema.String;
32
+ }>, {}>;
33
+ /**
34
+ * The question an Agent asked the operator when it stopped. The Item's next state opens no Run of
35
+ * the Loop (ADR 0017).
36
+ */
37
+ export declare class QuestionFailureView extends QuestionFailureView_base {
38
+ }
21
39
  declare const RunawayFailureView_base: Schema.Class<RunawayFailureView, Schema.TaggedStruct<"RunawayFailure", {
22
40
  readonly ceiling: Schema.Literals<readonly ["wall-clock", "tokens"]>;
23
41
  }>, {}>;
@@ -31,38 +49,67 @@ declare const ChildSessionBudgetFailureView_base: Schema.Class<ChildSessionBudge
31
49
  /** The configured child-session budget and the spawn count that exceeded it. */
32
50
  export declare class ChildSessionBudgetFailureView extends ChildSessionBudgetFailureView_base {
33
51
  }
34
- /** An Attempt failure with only the details the operator can inspect. */
35
- export declare const FailureView: Schema.Union<readonly [typeof InfraFailureView, typeof DefectFailureView, typeof AgentFailureView, typeof RunawayFailureView, typeof ChildSessionBudgetFailureView]>;
52
+ /** An Attempt failure with only the details shown to the operator. */
53
+ export declare const FailureView: Schema.Union<readonly [typeof InfraFailureView, typeof DefectFailureView, typeof AgentFailureView, typeof BlockedFailureView, typeof QuestionFailureView, typeof RunawayFailureView, typeof ChildSessionBudgetFailureView]>;
36
54
  export type FailureView = typeof FailureView.Type;
37
55
  declare const SucceededAttemptView_base: Schema.Class<SucceededAttemptView, Schema.TaggedStruct<"Succeeded", {}>, {}>;
38
- /** An Attempt that completed successfully. */
56
+ /** An Attempt that succeeded. */
39
57
  export declare class SucceededAttemptView extends SucceededAttemptView_base {
40
58
  }
41
59
  declare const FailedAttemptView_base: Schema.Class<FailedAttemptView, Schema.TaggedStruct<"Failed", {
42
- readonly failure: Schema.Union<readonly [typeof InfraFailureView, typeof DefectFailureView, typeof AgentFailureView, typeof RunawayFailureView, typeof ChildSessionBudgetFailureView]>;
60
+ readonly failure: Schema.Union<readonly [typeof InfraFailureView, typeof DefectFailureView, typeof AgentFailureView, typeof BlockedFailureView, typeof QuestionFailureView, typeof RunawayFailureView, typeof ChildSessionBudgetFailureView]>;
43
61
  }>, {}>;
44
- /** An Attempt that ended with a failure the operator can inspect. */
62
+ /** An Attempt that failed. */
45
63
  export declare class FailedAttemptView extends FailedAttemptView_base {
46
64
  }
47
65
  declare const CanceledAttemptView_base: Schema.Class<CanceledAttemptView, Schema.TaggedStruct<"Canceled", {}>, {}>;
48
66
  /** An Attempt that ended after cancellation. */
49
67
  export declare class CanceledAttemptView extends CanceledAttemptView_base {
50
68
  }
51
- /** The terminal outcome displayed for an Attempt; a live Attempt has no outcome. */
69
+ /** The terminal outcome of an Attempt. A running Attempt has none. */
52
70
  export declare const AttemptOutcomeView: Schema.Union<readonly [typeof SucceededAttemptView, typeof FailedAttemptView, typeof CanceledAttemptView]>;
53
71
  export type AttemptOutcomeView = typeof AttemptOutcomeView.Type;
72
+ declare const LocalWorkerAccess_base: Schema.Class<LocalWorkerAccess, Schema.TaggedStruct<"Local", {}>, {}>;
73
+ /** A Worker on the orchestrator's machine, so its paths are local paths. */
74
+ export declare class LocalWorkerAccess extends LocalWorkerAccess_base {
75
+ }
76
+ declare const SshWorkerAccess_base: Schema.Class<SshWorkerAccess, Schema.TaggedStruct<"Ssh", {
77
+ readonly destination: Schema.brand<Schema.String, "SshDestination">;
78
+ readonly port: Schema.NullOr<Schema.brand<Schema.Int, "SshPort">>;
79
+ }>, {}>;
80
+ /**
81
+ * A Worker on another machine, accessed with `ssh` at `destination`. `port` is null if `usine.yaml`
82
+ * sets none, which uses the client's default.
83
+ */
84
+ export declare class SshWorkerAccess extends SshWorkerAccess_base {
85
+ }
86
+ /** How the operator accesses a Worker's machine, from its `usine.yaml` entry. */
87
+ export declare const WorkerAccess: Schema.Union<readonly [typeof LocalWorkerAccess, typeof SshWorkerAccess]>;
88
+ export type WorkerAccess = typeof WorkerAccess.Type;
54
89
  declare const AttemptView_base: Schema.Class<AttemptView, Schema.Struct<{
55
90
  readonly id: Schema.brand<Schema.NonEmptyString, "AttemptId">;
56
91
  readonly number: Schema.brand<Schema.Int, "AttemptNumber">;
57
92
  readonly worker: Schema.brand<Schema.String, "WorkerName">;
93
+ /** How the operator accesses `worker`, or null if `usine.yaml` no longer declares it. */
94
+ readonly workerAccess: Schema.NullOr<Schema.Union<readonly [typeof LocalWorkerAccess, typeof SshWorkerAccess]>>;
58
95
  readonly brain: typeof BrainSpec;
59
96
  readonly task: Schema.brand<Schema.String, "AttemptTask">;
60
97
  readonly agent: Schema.brand<Schema.String, "AgentName">;
61
98
  readonly operatorIntervened: Schema.Boolean;
62
99
  readonly startedAt: Schema.String;
63
100
  readonly outcome: Schema.NullOr<Schema.Union<readonly [typeof SucceededAttemptView, typeof FailedAttemptView, typeof CanceledAttemptView]>>;
101
+ /**
102
+ * When the outcome was recorded. Null while the Attempt runs and for Attempts closed before end
103
+ * times were recorded.
104
+ */
105
+ readonly endedAt: Schema.NullOr<Schema.String>;
106
+ readonly salvage: Schema.NullOr<Schema.Union<readonly [typeof import("@usine/core/attempt/salvage").SalvagePushed, typeof import("@usine/core/attempt/salvage").SalvageRetained]>>;
107
+ /** Why the Attempt began, or null for a later Attempt begun before this was recorded. */
108
+ readonly start: Schema.withConstructorDefault<Schema.NullOr<Schema.Union<readonly [typeof import("@usine/core/attempt/start").StartedByEvent, typeof import("@usine/core/attempt/start").StartedByRetry, typeof import("@usine/core/attempt/start").StartedByEditAndRetry, typeof import("@usine/core/attempt/start").StartedByInfraRetry, typeof import("@usine/core/attempt/start").StartedAfterRestart]>>>;
109
+ /** When an orchestrator restart last reattached the Attempt, or null if none did. */
110
+ readonly reattachedAt: Schema.withConstructorDefault<Schema.NullOr<Schema.String>>;
64
111
  }>, {}>;
65
- /** One Attempt's identity, Worker, effective brain, start time, and optional terminal outcome. */
112
+ /** One Attempt with its Worker, effective brain, start, end, outcome, and salvaged work. */
66
113
  export declare class AttemptView extends AttemptView_base {
67
114
  }
68
115
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"attempt.d.ts","sourceRoot":"","sources":["../../src/operator/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAMpD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;AAEhC,6FAA6F;AA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AQ,wBAEQ;CAAG;;;;AAEpD,+DAA+D;AAC/D,qBAAa,kBAAmB,SAAQ,uBAEQ;CAAG;;;;;AAEnD,gFAAgF;AAChF,qBAAa,6BAA8B,SAAQ,kCAKjD;CAAG;AAEL,sEAAsE;AACtE,eAAO,MAAM,WAAW,6NAQtB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;;AAElD,iCAAiC;AACjC,qBAAa,oBAAqB,SAAQ,yBAExB;CAAG;;;;AAErB,8BAA8B;AAC9B,qBAAa,iBAAkB,SAAQ,sBAEF;CAAG;;AAExC,gDAAgD;AAChD,qBAAa,mBAAoB,SAAQ,wBAExB;CAAG;AAEpB,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,4GAI7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;;AAEhE,4EAA4E;AAC5E,qBAAa,iBAAkB,SAAQ,sBAEzB;CAAG;;;;;AAEjB;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,oBAEkC;CAAG;AAE1E,iFAAiF;AACjF,eAAO,MAAM,YAAY,2EAAqD,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;;;;;IAOlD,yFAAyF;;;;;;;;IAQzF;;;OAGG;;;IAGH,yFAAyF;;IAEzF,qFAAqF;;;AArBvF,4FAA4F;AAC5F,qBAAa,WAAY,SAAQ,gBAwB/B;CAAG"}
@@ -3,17 +3,31 @@ import { ChildSessionBudget, ChildSessionCount } from "@usine/core/agent/session
3
3
  import { AttemptNumber, AttemptId, AttemptTask } from "@usine/core/attempt";
4
4
  import { AgentName } from "@usine/core/agent";
5
5
  import { RunawayCeiling } from "@usine/core/attempt/failure";
6
- import { WorkerName } from "@usine/core/worker";
7
- import { Schema } from "effect";
8
- /** An infra failure as the operator sees it; the defect cause stays behind this boundary. */
6
+ import { AttemptSalvage } from "@usine/core/attempt/salvage";
7
+ import { AttemptStart } from "@usine/core/attempt/start";
8
+ import { SshDestination, SshPort, WorkerName } from "@usine/core/worker";
9
+ import { Effect, Schema } from "effect";
10
+ /** An infra failure without its defect cause. */
9
11
  export class InfraFailureView extends Schema.TaggedClass("@usine/orchestrator/InfraFailureView")("InfraFailure", { message: Schema.String }) {
10
12
  }
11
- /** A captured programmer defect requiring operator intervention; the original cause stays behind this boundary. */
13
+ /** A captured programmer defect that needs operator intervention, without the original cause. */
12
14
  export class DefectFailureView extends Schema.TaggedClass("@usine/orchestrator/DefectFailureView")("DefectFailure", { message: Schema.String }) {
13
15
  }
14
- /** An agent failure message safe to display to the operator. */
16
+ /** An agent failure message that is safe to show to the operator. */
15
17
  export class AgentFailureView extends Schema.TaggedClass("@usine/orchestrator/AgentFailureView")("AgentFailure", { message: Schema.String }) {
16
18
  }
19
+ /**
20
+ * The blocker an Agent reported when it stopped. The Item's next state opens no Run of the Loop
21
+ * (ADR 0017).
22
+ */
23
+ export class BlockedFailureView extends Schema.TaggedClass("@usine/orchestrator/BlockedFailureView")("BlockedFailure", { message: Schema.String }) {
24
+ }
25
+ /**
26
+ * The question an Agent asked the operator when it stopped. The Item's next state opens no Run of
27
+ * the Loop (ADR 0017).
28
+ */
29
+ export class QuestionFailureView extends Schema.TaggedClass("@usine/orchestrator/QuestionFailureView")("QuestionFailure", { question: Schema.String }) {
30
+ }
17
31
  /** The wall-clock or token ceiling that stopped an Attempt. */
18
32
  export class RunawayFailureView extends Schema.TaggedClass("@usine/orchestrator/RunawayFailureView")("RunawayFailure", { ceiling: RunawayCeiling }) {
19
33
  }
@@ -23,40 +37,65 @@ export class ChildSessionBudgetFailureView extends Schema.TaggedClass("@usine/or
23
37
  attemptedChildren: ChildSessionCount,
24
38
  }) {
25
39
  }
26
- /** An Attempt failure with only the details the operator can inspect. */
40
+ /** An Attempt failure with only the details shown to the operator. */
27
41
  export const FailureView = Schema.Union([
28
42
  InfraFailureView,
29
43
  DefectFailureView,
30
44
  AgentFailureView,
45
+ BlockedFailureView,
46
+ QuestionFailureView,
31
47
  RunawayFailureView,
32
48
  ChildSessionBudgetFailureView,
33
49
  ]);
34
- /** An Attempt that completed successfully. */
50
+ /** An Attempt that succeeded. */
35
51
  export class SucceededAttemptView extends Schema.TaggedClass("@usine/orchestrator/SucceededAttemptView")("Succeeded", {}) {
36
52
  }
37
- /** An Attempt that ended with a failure the operator can inspect. */
53
+ /** An Attempt that failed. */
38
54
  export class FailedAttemptView extends Schema.TaggedClass("@usine/orchestrator/FailedAttemptView")("Failed", { failure: FailureView }) {
39
55
  }
40
56
  /** An Attempt that ended after cancellation. */
41
57
  export class CanceledAttemptView extends Schema.TaggedClass("@usine/orchestrator/CanceledAttemptView")("Canceled", {}) {
42
58
  }
43
- /** The terminal outcome displayed for an Attempt; a live Attempt has no outcome. */
59
+ /** The terminal outcome of an Attempt. A running Attempt has none. */
44
60
  export const AttemptOutcomeView = Schema.Union([
45
61
  SucceededAttemptView,
46
62
  FailedAttemptView,
47
63
  CanceledAttemptView,
48
64
  ]);
49
- /** One Attempt's identity, Worker, effective brain, start time, and optional terminal outcome. */
65
+ /** A Worker on the orchestrator's machine, so its paths are local paths. */
66
+ export class LocalWorkerAccess extends Schema.TaggedClass("@usine/orchestrator/LocalWorkerAccess")("Local", {}) {
67
+ }
68
+ /**
69
+ * A Worker on another machine, accessed with `ssh` at `destination`. `port` is null if `usine.yaml`
70
+ * sets none, which uses the client's default.
71
+ */
72
+ export class SshWorkerAccess extends Schema.TaggedClass("@usine/orchestrator/SshWorkerAccess")("Ssh", { destination: SshDestination, port: Schema.NullOr(SshPort) }) {
73
+ }
74
+ /** How the operator accesses a Worker's machine, from its `usine.yaml` entry. */
75
+ export const WorkerAccess = Schema.Union([LocalWorkerAccess, SshWorkerAccess]);
76
+ /** One Attempt with its Worker, effective brain, start, end, outcome, and salvaged work. */
50
77
  export class AttemptView extends Schema.Class("@usine/orchestrator/AttemptView")({
51
78
  id: AttemptId,
52
79
  number: AttemptNumber,
53
80
  worker: WorkerName,
81
+ /** How the operator accesses `worker`, or null if `usine.yaml` no longer declares it. */
82
+ workerAccess: Schema.NullOr(WorkerAccess),
54
83
  brain: BrainSpec,
55
84
  task: AttemptTask,
56
85
  agent: AgentName,
57
86
  operatorIntervened: Schema.Boolean,
58
87
  startedAt: Schema.String,
59
88
  outcome: Schema.NullOr(AttemptOutcomeView),
89
+ /**
90
+ * When the outcome was recorded. Null while the Attempt runs and for Attempts closed before end
91
+ * times were recorded.
92
+ */
93
+ endedAt: Schema.NullOr(Schema.String),
94
+ salvage: Schema.NullOr(AttemptSalvage),
95
+ /** Why the Attempt began, or null for a later Attempt begun before this was recorded. */
96
+ start: Schema.NullOr(AttemptStart).pipe(Schema.withConstructorDefault(Effect.succeed(null))),
97
+ /** When an orchestrator restart last reattached the Attempt, or null if none did. */
98
+ reattachedAt: Schema.NullOr(Schema.String).pipe(Schema.withConstructorDefault(Effect.succeed(null))),
60
99
  }) {
61
100
  }
62
101
  //# sourceMappingURL=attempt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attempt.js","sourceRoot":"","sources":["../../src/operator/attempt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,6FAA6F;AAC7F,MAAM,OAAO,gBAAiB,SAAQ,MAAM,CAAC,WAAW,CACtD,sCAAsC,CACvC,CAAC,cAAc,EAAE,EAAE,OA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AM,CAAC,YAAY,CAAC;IACzC,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,SAAS;IAChB,kBAAkB,EAAE,MAAM,CAAC,OAAO;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC;IAC1C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;IACtC,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAC7C,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CACpD;CACF,CAAC;CAAG"}
@@ -1,9 +1,10 @@
1
1
  import { Schema } from "effect";
2
2
  import { RunView } from "./run.ts";
3
- /** Identifies a lane within a Project's Board for operator moves. */
3
+ import { TaskUsageView } from "./usage.ts";
4
+ /** The ID of a lane on a Project's Board. */
4
5
  export declare const BoardLaneId: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
5
6
  export type BoardLaneId = typeof BoardLaneId.Type;
6
- /** Whether a lane came from authored settings, a proposal, or default grouping. */
7
+ /** The source of a lane: authored settings, a proposal, or default grouping. */
7
8
  export declare const BoardLaneOrigin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
8
9
  export type BoardLaneOrigin = typeof BoardLaneOrigin.Type;
9
10
  declare const BoardItemLink_base: Schema.Class<BoardItemLink, Schema.Struct<{
@@ -13,9 +14,17 @@ declare const BoardItemLink_base: Schema.Class<BoardItemLink, Schema.Struct<{
13
14
  readonly title: Schema.String;
14
15
  readonly url: Schema.NonEmptyString;
15
16
  }>, {}>;
16
- /** An Item linked to a Task, with its own title and external destination. */
17
+ /** An Item of a Task, with its own title and GitHub URL. */
17
18
  export declare class BoardItemLink extends BoardItemLink_base {
18
19
  }
20
+ declare const BoardPullRequestView_base: Schema.Class<BoardPullRequestView, Schema.Struct<{
21
+ readonly number: Schema.brand<Schema.Int, "ItemNumber">;
22
+ readonly url: Schema.NonEmptyString;
23
+ readonly state: Schema.Literals<readonly ["pr-open", "pr-merged"]>;
24
+ }>, {}>;
25
+ /** An open or merged pull request of a Task. Closed, unmerged pull requests are excluded. */
26
+ export declare class BoardPullRequestView extends BoardPullRequestView_base {
27
+ }
19
28
  declare const BoardTaskView_base: Schema.Class<BoardTaskView, Schema.Struct<{
20
29
  readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
21
30
  readonly kind: Schema.Literals<readonly ["issue", "pr"]>;
@@ -25,12 +34,30 @@ declare const BoardTaskView_base: Schema.Class<BoardTaskView, Schema.Struct<{
25
34
  readonly state: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
26
35
  readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
27
36
  readonly items: Schema.$Array<typeof BoardItemLink>;
28
- /** Every saved Run for the visible Items, ordered from earliest to latest. */
37
+ /**
38
+ * The highest-numbered open pull request, else the highest-numbered merged one, or null if
39
+ * there is neither.
40
+ */
41
+ readonly pullRequest: Schema.NullOr<typeof BoardPullRequestView>;
42
+ /** Every saved Run for the visible Items, earliest first. */
29
43
  readonly runs: Schema.$Array<typeof RunView>;
30
44
  readonly run: Schema.NullOr<typeof RunView>;
31
45
  readonly needsYou: Schema.Boolean;
46
+ /** Whether the current Item is an open pull request whose branch conflicts with its base. */
47
+ readonly conflicting: Schema.Boolean;
48
+ /**
49
+ * The Loops whose trigger currently matches one of the Task's Items, including paused Loops, in
50
+ * Item order and then Loop order.
51
+ */
52
+ readonly loops: Schema.$Array<Schema.brand<Schema.NonEmptyString, "LoopName">>;
53
+ /** The summed Attempt time, tokens, and cost of `runs`. */
54
+ readonly usage: typeof TaskUsageView;
32
55
  }>, {}>;
33
- /** A Task projected from linked Items. The current Item determines the key, lane, labels, and move destination; the first issue supplies the Task title. */
56
+ /**
57
+ * A Board card for a Task projected from linked Items and placed by its current Item. While the
58
+ * Task's newest open Run is running, the card stays in the lane that matched when the Run was
59
+ * triggered.
60
+ */
34
61
  export declare class BoardTaskView extends BoardTaskView_base {
35
62
  }
36
63
  declare const WritableBoardLaneView_base: Schema.Class<WritableBoardLaneView, Schema.TaggedStruct<"WritableBoardLane", {
@@ -41,7 +68,7 @@ declare const WritableBoardLaneView_base: Schema.Class<WritableBoardLaneView, Sc
41
68
  readonly origin: Schema.Literal<"authored">;
42
69
  readonly labels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
43
70
  }>, {}>;
44
- /** An authored lane the operator can move Items into by applying its configured GitHub labels. */
71
+ /** An authored lane that the operator can move Items into by applying its GitHub labels. */
45
72
  export declare class WritableBoardLaneView extends WritableBoardLaneView_base {
46
73
  }
47
74
  declare const ReadOnlyBoardLaneView_base: Schema.Class<ReadOnlyBoardLaneView, Schema.TaggedStruct<"ReadOnlyBoardLane", {
@@ -51,10 +78,10 @@ declare const ReadOnlyBoardLaneView_base: Schema.Class<ReadOnlyBoardLaneView, Sc
51
78
  readonly origin: Schema.Literals<readonly ["authored", "proposed", "fallback"]>;
52
79
  readonly items: Schema.$Array<typeof BoardTaskView>;
53
80
  }>, {}>;
54
- /** A lane that groups Items without accepting label-based moves. */
81
+ /** A lane that groups Items and doesn't accept moves. */
55
82
  export declare class ReadOnlyBoardLaneView extends ReadOnlyBoardLaneView_base {
56
83
  }
57
- /** A displayed lane whose variant determines whether operator moves are supported. */
84
+ /** A Board lane; only `WritableBoardLaneView` accepts operator moves. */
58
85
  export declare const BoardLaneView: Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>;
59
86
  export type BoardLaneView = typeof BoardLaneView.Type;
60
87
  declare const BoardProjectionError_base: Schema.Class<BoardProjectionError, Schema.TaggedStruct<"BoardProjectionError", {
@@ -62,14 +89,14 @@ declare const BoardProjectionError_base: Schema.Class<BoardProjectionError, Sche
62
89
  readonly itemKey: Schema.brand<Schema.NonEmptyString, "ItemKey">;
63
90
  readonly message: Schema.NonEmptyString;
64
91
  }>, import("effect/Cause").YieldableError>;
65
- /** An Item projection could not produce a Board card; other Items remain available. */
92
+ /** An Item that couldn't be projected as a Board card. Other Items are unaffected. */
66
93
  export declare class BoardProjectionError extends BoardProjectionError_base {
67
94
  }
68
95
  declare const BoardView_base: Schema.Class<BoardView, Schema.Struct<{
69
96
  readonly lanes: Schema.$Array<Schema.Union<readonly [typeof WritableBoardLaneView, typeof ReadOnlyBoardLaneView]>>;
70
97
  readonly failures: Schema.$Array<typeof BoardProjectionError>;
71
98
  }>, {}>;
72
- /** The Project's lanes and the Item failures encountered while constructing their cards. */
99
+ /** The Project's lanes and the Item failures from building their cards. */
73
100
  export declare class BoardView extends BoardView_base {
74
101
  }
75
102
  declare const LabelView_base: Schema.Class<LabelView, Schema.Struct<{
@@ -77,7 +104,7 @@ declare const LabelView_base: Schema.Class<LabelView, Schema.Struct<{
77
104
  readonly color: Schema.NullOr<Schema.String>;
78
105
  readonly description: Schema.NullOr<Schema.String>;
79
106
  }>, {}>;
80
- /** A repository label as GitHub shows it. Color is null for catalogs stored before colors were kept. */
107
+ /** A repository label. `color` is null for catalogs stored before colors were kept. */
81
108
  export declare class LabelView extends LabelView_base {
82
109
  }
83
110
  declare const BoardMove_base: Schema.Class<BoardMove, Schema.Struct<{
@@ -85,34 +112,34 @@ declare const BoardMove_base: Schema.Class<BoardMove, Schema.Struct<{
85
112
  readonly item: Schema.brand<Schema.Int, "ItemNumber">;
86
113
  readonly toLane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
87
114
  }>, {}>;
88
- /** An operator request to move one Project Item into a destination lane. */
115
+ /** An operator request to move one Project Item into a lane. */
89
116
  export declare class BoardMove extends BoardMove_base {
90
117
  }
91
118
  declare const BoardProjectNotFoundError_base: Schema.Class<BoardProjectNotFoundError, Schema.TaggedStruct<"BoardProjectNotFoundError", {
92
119
  readonly repository: Schema.brand<Schema.String, "RepositoryName">;
93
120
  }>, import("effect/Cause").YieldableError>;
94
- /** The requested Project is absent from the operator overview. */
121
+ /** The requested Project isn't in the operator overview. */
95
122
  export declare class BoardProjectNotFoundError extends BoardProjectNotFoundError_base {
96
123
  }
97
124
  declare const BoardItemNotFoundError_base: Schema.Class<BoardItemNotFoundError, Schema.TaggedStruct<"BoardItemNotFoundError", {
98
125
  readonly repository: Schema.brand<Schema.String, "RepositoryName">;
99
126
  readonly item: Schema.brand<Schema.Int, "ItemNumber">;
100
127
  }>, import("effect/Cause").YieldableError>;
101
- /** The requested Item is absent from the Project's Board. */
128
+ /** The requested Item isn't on the Project's Board. */
102
129
  export declare class BoardItemNotFoundError extends BoardItemNotFoundError_base {
103
130
  }
104
131
  declare const BoardLaneNotFoundError_base: Schema.Class<BoardLaneNotFoundError, Schema.TaggedStruct<"BoardLaneNotFoundError", {
105
132
  readonly repository: Schema.brand<Schema.String, "RepositoryName">;
106
133
  readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
107
134
  }>, import("effect/Cause").YieldableError>;
108
- /** The requested destination lane is absent from the Project's Board. */
135
+ /** The requested destination lane isn't on the Project's Board. */
109
136
  export declare class BoardLaneNotFoundError extends BoardLaneNotFoundError_base {
110
137
  }
111
138
  declare const BoardLaneReadOnlyError_base: Schema.Class<BoardLaneReadOnlyError, Schema.TaggedStruct<"BoardLaneReadOnlyError", {
112
139
  readonly repository: Schema.brand<Schema.String, "RepositoryName">;
113
140
  readonly lane: Schema.brand<Schema.NonEmptyString, "BoardLaneId">;
114
141
  }>, import("effect/Cause").YieldableError>;
115
- /** The requested destination lane does not accept label-based moves. */
142
+ /** The requested destination lane doesn't accept label-based moves. */
116
143
  export declare class BoardLaneReadOnlyError extends BoardLaneReadOnlyError_base {
117
144
  }
118
145
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/operator/board.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qEAAqE;AACrE,eAAO,MAAM,WAAW,oDAA0D,CAAC;AACnF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD,mFAAmF;AACnF,eAAO,MAAM,eAAe,gEAAwD,CAAC;AACrF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAC;;;;;;;;AAE1D,6EAA6E;AAC7E,qBAAa,aAAc,SAAQ,kBAQlC;CAAG;;;;;;;;;;IASA,8EAA8E;;;;;AAPlF,4JAA4J;AAC5J,qBAAa,aAAc,SAAQ,kBAWlC;CAAG;;;;;;;;;AAUJ,kGAAkG;AAClG,qBAAa,qBAAsB,SAAQ,0BAMzC;CAAG;;;;;;;;AAEL,oEAAoE;AACpE,qBAAa,qBAAsB,SAAQ,0BAEA;CAAG;AAE9C,sFAAsF;AACtF,eAAO,MAAM,aAAa,qFAA+D,CAAC;AAC1F,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAC;;;;;;AAEtD,uFAAuF;AACvF,qBAAa,oBAAqB,SAAQ,yBAMxC;CAAG;;;;;AAEL,4FAA4F;AAC5F,qBAAa,SAAU,SAAQ,cAG7B;CAAG;;;;;;AAEL,wGAAwG;AACxG,qBAAa,SAAU,SAAQ,cAI7B;CAAG;;;;;;AAEL,4EAA4E;AAC5E,qBAAa,SAAU,SAAQ,cAI7B;CAAG;;;;AAEL,kEAAkE;AAClE,qBAAa,yBAA0B,SAAQ,8BAI7C;CAAG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CAAG;;;;;AAEL,2EAA2E;AAC3E,qBAAa,SAAU,SAAQ,cAG7B;CAAG;;;;;;AAEL,uFAAuF;AACvF,qBAAa,SAAU,SAAQ,cAI7B;CAAG;;;;;;AAEL,gEAAgE;AAChE,qBAAa,SAAU,SAAQ,cAI7B;CAAG;;;;AAEL,4DAA4D;AAC5D,qBAAa,yBAA0B,SAAQ,8BAI7C;CAAG;;;;;AAEL,uDAAuD;AACvD,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG;;;;;AAEL,mEAAmE;AACnE,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG;;;;;AAEL,uEAAuE;AACvE,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG"}
@@ -1,14 +1,16 @@
1
1
  import { ItemKey, ItemNumber } from "@usine/core/item";
2
+ import { LoopName } from "@usine/core/loop";
2
3
  import { RepositoryName } from "@usine/core/repository";
3
4
  import { GitHubLabelName } from "@usine/config/label";
4
5
  import { LaneItemState, LaneName, LaneSource } from "@usine/config/board";
5
6
  import { Schema } from "effect";
6
7
  import { RunView } from "./run.js";
7
- /** Identifies a lane within a Project's Board for operator moves. */
8
+ import { TaskUsageView } from "./usage.js";
9
+ /** The ID of a lane on a Project's Board. */
8
10
  export const BoardLaneId = Schema.NonEmptyString.pipe(Schema.brand("BoardLaneId"));
9
- /** Whether a lane came from authored settings, a proposal, or default grouping. */
11
+ /** The source of a lane: authored settings, a proposal, or default grouping. */
10
12
  export const BoardLaneOrigin = Schema.Literals(["authored", "proposed", "fallback"]);
11
- /** An Item linked to a Task, with its own title and external destination. */
13
+ /** An Item of a Task, with its own title and GitHub URL. */
12
14
  export class BoardItemLink extends Schema.Class("@usine/orchestrator/BoardItemLink")({
13
15
  itemKey: ItemKey,
14
16
  kind: Schema.Literals(["issue", "pr"]),
@@ -17,16 +19,41 @@ export class BoardItemLink extends Schema.Class("@usine/orchestrator/BoardItemLi
17
19
  url: Schema.NonEmptyString,
18
20
  }) {
19
21
  }
20
- /** A Task projected from linked Items. The current Item determines the key, lane, labels, and move destination; the first issue supplies the Task title. */
22
+ /** An open or merged pull request of a Task. Closed, unmerged pull requests are excluded. */
23
+ export class BoardPullRequestView extends Schema.Class("@usine/orchestrator/BoardPullRequestView")({
24
+ number: ItemNumber,
25
+ url: Schema.NonEmptyString,
26
+ state: Schema.Literals(["pr-open", "pr-merged"]),
27
+ }) {
28
+ }
29
+ /**
30
+ * A Board card for a Task projected from linked Items and placed by its current Item. While the
31
+ * Task's newest open Run is running, the card stays in the lane that matched when the Run was
32
+ * triggered.
33
+ */
21
34
  export class BoardTaskView extends Schema.Class("@usine/orchestrator/BoardTaskView")({
22
35
  ...BoardItemLink.fields,
23
36
  state: LaneItemState,
24
37
  labels: Schema.Array(GitHubLabelName),
25
38
  items: Schema.Array(BoardItemLink).check(Schema.isNonEmpty()),
26
- /** Every saved Run for the visible Items, ordered from earliest to latest. */
39
+ /**
40
+ * The highest-numbered open pull request, else the highest-numbered merged one, or null if
41
+ * there is neither.
42
+ */
43
+ pullRequest: Schema.NullOr(BoardPullRequestView),
44
+ /** Every saved Run for the visible Items, earliest first. */
27
45
  runs: Schema.Array(RunView),
28
46
  run: Schema.NullOr(RunView),
29
47
  needsYou: Schema.Boolean,
48
+ /** Whether the current Item is an open pull request whose branch conflicts with its base. */
49
+ conflicting: Schema.Boolean,
50
+ /**
51
+ * The Loops whose trigger currently matches one of the Task's Items, including paused Loops, in
52
+ * Item order and then Loop order.
53
+ */
54
+ loops: Schema.Array(LoopName),
55
+ /** The summed Attempt time, tokens, and cost of `runs`. */
56
+ usage: TaskUsageView,
30
57
  }) {
31
58
  }
32
59
  const BoardLaneViewFields = {
@@ -36,63 +63,63 @@ const BoardLaneViewFields = {
36
63
  origin: BoardLaneOrigin,
37
64
  items: Schema.Array(BoardTaskView),
38
65
  };
39
- /** An authored lane the operator can move Items into by applying its configured GitHub labels. */
66
+ /** An authored lane that the operator can move Items into by applying its GitHub labels. */
40
67
  export class WritableBoardLaneView extends Schema.TaggedClass("@usine/orchestrator/WritableBoardLaneView")("WritableBoardLane", {
41
68
  ...BoardLaneViewFields,
42
69
  origin: Schema.Literal("authored"),
43
70
  labels: Schema.Array(GitHubLabelName).check(Schema.isNonEmpty()),
44
71
  }) {
45
72
  }
46
- /** A lane that groups Items without accepting label-based moves. */
73
+ /** A lane that groups Items and doesn't accept moves. */
47
74
  export class ReadOnlyBoardLaneView extends Schema.TaggedClass("@usine/orchestrator/ReadOnlyBoardLaneView")("ReadOnlyBoardLane", BoardLaneViewFields) {
48
75
  }
49
- /** A displayed lane whose variant determines whether operator moves are supported. */
76
+ /** A Board lane; only `WritableBoardLaneView` accepts operator moves. */
50
77
  export const BoardLaneView = Schema.Union([WritableBoardLaneView, ReadOnlyBoardLaneView]);
51
- /** An Item projection could not produce a Board card; other Items remain available. */
78
+ /** An Item that couldn't be projected as a Board card. Other Items are unaffected. */
52
79
  export class BoardProjectionError extends Schema.TaggedError("@usine/orchestrator/BoardProjectionError")("BoardProjectionError", {
53
80
  repository: RepositoryName,
54
81
  itemKey: ItemKey,
55
82
  message: Schema.NonEmptyString,
56
83
  }) {
57
84
  }
58
- /** The Project's lanes and the Item failures encountered while constructing their cards. */
85
+ /** The Project's lanes and the Item failures from building their cards. */
59
86
  export class BoardView extends Schema.Class("@usine/orchestrator/BoardView")({
60
87
  lanes: Schema.Array(BoardLaneView),
61
88
  failures: Schema.Array(BoardProjectionError),
62
89
  }) {
63
90
  }
64
- /** A repository label as GitHub shows it. Color is null for catalogs stored before colors were kept. */
91
+ /** A repository label. `color` is null for catalogs stored before colors were kept. */
65
92
  export class LabelView extends Schema.Class("@usine/orchestrator/LabelView")({
66
93
  name: GitHubLabelName,
67
94
  color: Schema.NullOr(Schema.String),
68
95
  description: Schema.NullOr(Schema.String),
69
96
  }) {
70
97
  }
71
- /** An operator request to move one Project Item into a destination lane. */
98
+ /** An operator request to move one Project Item into a lane. */
72
99
  export class BoardMove extends Schema.Class("@usine/orchestrator/BoardMove")({
73
100
  repository: RepositoryName,
74
101
  item: ItemNumber,
75
102
  toLane: BoardLaneId,
76
103
  }) {
77
104
  }
78
- /** The requested Project is absent from the operator overview. */
105
+ /** The requested Project isn't in the operator overview. */
79
106
  export class BoardProjectNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardProjectNotFoundError")("BoardProjectNotFoundError", {
80
107
  repository: RepositoryName,
81
108
  }) {
82
109
  }
83
- /** The requested Item is absent from the Project's Board. */
110
+ /** The requested Item isn't on the Project's Board. */
84
111
  export class BoardItemNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardItemNotFoundError")("BoardItemNotFoundError", {
85
112
  repository: RepositoryName,
86
113
  item: ItemNumber,
87
114
  }) {
88
115
  }
89
- /** The requested destination lane is absent from the Project's Board. */
116
+ /** The requested destination lane isn't on the Project's Board. */
90
117
  export class BoardLaneNotFoundError extends Schema.TaggedError("@usine/orchestrator/BoardLaneNotFoundError")("BoardLaneNotFoundError", {
91
118
  repository: RepositoryName,
92
119
  lane: BoardLaneId,
93
120
  }) {
94
121
  }
95
- /** The requested destination lane does not accept label-based moves. */
122
+ /** The requested destination lane doesn't accept label-based moves. */
96
123
  export class BoardLaneReadOnlyError extends Schema.TaggedError("@usine/orchestrator/BoardLaneReadOnlyError")("BoardLaneReadOnlyError", {
97
124
  repository: RepositoryName,
98
125
  lane: BoardLaneId,
@@ -1 +1 @@
1
- {"version":3,"file":"board.js","sourceRoot":"","sources":["../../src/operator/board.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE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