@usine/orchestrator 0.2.1 → 0.4.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 (222) hide show
  1. package/LICENSE +661 -21
  2. package/README.md +174 -52
  3. package/dist/board/items.d.ts +22 -3
  4. package/dist/board/items.d.ts.map +1 -1
  5. package/dist/board/items.js +44 -4
  6. package/dist/board/items.js.map +1 -1
  7. package/dist/board/projection.d.ts +8 -1
  8. package/dist/board/projection.d.ts.map +1 -1
  9. package/dist/board/projection.js +63 -14
  10. package/dist/board/projection.js.map +1 -1
  11. package/dist/board/tasks.d.ts +15 -3
  12. package/dist/board/tasks.d.ts.map +1 -1
  13. package/dist/board/tasks.js +28 -9
  14. package/dist/board/tasks.js.map +1 -1
  15. package/dist/cloudflare.d.ts +32 -0
  16. package/dist/cloudflare.d.ts.map +1 -0
  17. package/dist/cloudflare.js +68 -0
  18. package/dist/cloudflare.js.map +1 -0
  19. package/dist/credentials.d.ts +5 -6
  20. package/dist/credentials.d.ts.map +1 -1
  21. package/dist/credentials.js +22 -15
  22. package/dist/credentials.js.map +1 -1
  23. package/dist/current-instance/changes.d.ts +87 -0
  24. package/dist/current-instance/changes.d.ts.map +1 -0
  25. package/dist/current-instance/changes.js +141 -0
  26. package/dist/current-instance/changes.js.map +1 -0
  27. package/dist/current-instance/current-instance.d.ts +89 -0
  28. package/dist/current-instance/current-instance.d.ts.map +1 -0
  29. package/dist/current-instance/current-instance.js +163 -0
  30. package/dist/current-instance/current-instance.js.map +1 -0
  31. package/dist/exe-dev.d.ts +6 -2
  32. package/dist/exe-dev.d.ts.map +1 -1
  33. package/dist/exe-dev.js +10 -9
  34. package/dist/exe-dev.js.map +1 -1
  35. package/dist/http-client.d.ts +8 -0
  36. package/dist/http-client.d.ts.map +1 -0
  37. package/dist/http-client.js +8 -0
  38. package/dist/http-client.js.map +1 -0
  39. package/dist/idle-triggers.d.ts +1 -1
  40. package/dist/idle-triggers.d.ts.map +1 -1
  41. package/dist/idle-triggers.js +1 -1
  42. package/dist/idle-triggers.js.map +1 -1
  43. package/dist/label-reconciler.d.ts +5 -2
  44. package/dist/label-reconciler.d.ts.map +1 -1
  45. package/dist/label-reconciler.js.map +1 -1
  46. package/dist/lease-order.d.ts +60 -0
  47. package/dist/lease-order.d.ts.map +1 -0
  48. package/dist/lease-order.js +76 -0
  49. package/dist/lease-order.js.map +1 -0
  50. package/dist/local.d.ts +4 -18
  51. package/dist/local.d.ts.map +1 -1
  52. package/dist/local.js +9 -45
  53. package/dist/local.js.map +1 -1
  54. package/dist/loop-matches.d.ts +28 -0
  55. package/dist/loop-matches.d.ts.map +1 -0
  56. package/dist/loop-matches.js +74 -0
  57. package/dist/loop-matches.js.map +1 -0
  58. package/dist/operator/attempt.d.ts +76 -10
  59. package/dist/operator/attempt.d.ts.map +1 -1
  60. package/dist/operator/attempt.js +69 -11
  61. package/dist/operator/attempt.js.map +1 -1
  62. package/dist/operator/board.d.ts +48 -16
  63. package/dist/operator/board.d.ts.map +1 -1
  64. package/dist/operator/board.js +48 -17
  65. package/dist/operator/board.js.map +1 -1
  66. package/dist/operator/configuration.d.ts +314 -0
  67. package/dist/operator/configuration.d.ts.map +1 -0
  68. package/dist/operator/configuration.js +490 -0
  69. package/dist/operator/configuration.js.map +1 -0
  70. package/dist/operator/desk.d.ts +206 -0
  71. package/dist/operator/desk.d.ts.map +1 -0
  72. package/dist/operator/desk.js +525 -0
  73. package/dist/operator/desk.js.map +1 -0
  74. package/dist/operator/github-changes.d.ts +88 -0
  75. package/dist/operator/github-changes.d.ts.map +1 -0
  76. package/dist/operator/github-changes.js +266 -0
  77. package/dist/operator/github-changes.js.map +1 -0
  78. package/dist/operator/http.d.ts +135 -105
  79. package/dist/operator/http.d.ts.map +1 -1
  80. package/dist/operator/http.js +155 -30
  81. package/dist/operator/http.js.map +1 -1
  82. package/dist/operator/machines.d.ts +71 -0
  83. package/dist/operator/machines.d.ts.map +1 -0
  84. package/dist/operator/machines.js +103 -0
  85. package/dist/operator/machines.js.map +1 -0
  86. package/dist/operator/need.d.ts +58 -11
  87. package/dist/operator/need.d.ts.map +1 -1
  88. package/dist/operator/need.js +61 -9
  89. package/dist/operator/need.js.map +1 -1
  90. package/dist/operator/operator.d.ts +135 -29
  91. package/dist/operator/operator.d.ts.map +1 -1
  92. package/dist/operator/operator.js +370 -63
  93. package/dist/operator/operator.js.map +1 -1
  94. package/dist/operator/overview.d.ts +7 -7
  95. package/dist/operator/overview.d.ts.map +1 -1
  96. package/dist/operator/overview.js +5 -5
  97. package/dist/operator/overview.js.map +1 -1
  98. package/dist/operator/projection.d.ts +56 -5
  99. package/dist/operator/projection.d.ts.map +1 -1
  100. package/dist/operator/projection.js +108 -9
  101. package/dist/operator/projection.js.map +1 -1
  102. package/dist/operator/run.d.ts +101 -6
  103. package/dist/operator/run.d.ts.map +1 -1
  104. package/dist/operator/run.js +100 -7
  105. package/dist/operator/run.js.map +1 -1
  106. package/dist/operator/statistics/cache.d.ts +7 -0
  107. package/dist/operator/statistics/cache.d.ts.map +1 -0
  108. package/dist/operator/statistics/cache.js +40 -0
  109. package/dist/operator/statistics/cache.js.map +1 -0
  110. package/dist/operator/statistics/runs.d.ts +36 -0
  111. package/dist/operator/statistics/runs.d.ts.map +1 -0
  112. package/dist/operator/statistics/runs.js +284 -0
  113. package/dist/operator/statistics/runs.js.map +1 -0
  114. package/dist/operator/statistics/statistics.d.ts +20 -0
  115. package/dist/operator/statistics/statistics.d.ts.map +1 -0
  116. package/dist/operator/statistics/statistics.js +138 -0
  117. package/dist/operator/statistics/statistics.js.map +1 -0
  118. package/dist/operator/statistics/tasks.d.ts +30 -0
  119. package/dist/operator/statistics/tasks.d.ts.map +1 -0
  120. package/dist/operator/statistics/tasks.js +244 -0
  121. package/dist/operator/statistics/tasks.js.map +1 -0
  122. package/dist/operator/statistics/view.d.ts +302 -0
  123. package/dist/operator/statistics/view.d.ts.map +1 -0
  124. package/dist/operator/statistics/view.js +243 -0
  125. package/dist/operator/statistics/view.js.map +1 -0
  126. package/dist/operator/statistics/window.d.ts +24 -0
  127. package/dist/operator/statistics/window.d.ts.map +1 -0
  128. package/dist/operator/statistics/window.js +47 -0
  129. package/dist/operator/statistics/window.js.map +1 -0
  130. package/dist/operator/task.d.ts +94 -0
  131. package/dist/operator/task.d.ts.map +1 -0
  132. package/dist/operator/task.js +204 -0
  133. package/dist/operator/task.js.map +1 -0
  134. package/dist/operator/transcript.d.ts +12 -12
  135. package/dist/operator/transcript.d.ts.map +1 -1
  136. package/dist/operator/transcript.js +11 -9
  137. package/dist/operator/transcript.js.map +1 -1
  138. package/dist/operator/usage.d.ts +103 -0
  139. package/dist/operator/usage.d.ts.map +1 -0
  140. package/dist/operator/usage.js +234 -0
  141. package/dist/operator/usage.js.map +1 -0
  142. package/dist/orchestrator.d.ts +8 -5
  143. package/dist/orchestrator.d.ts.map +1 -1
  144. package/dist/orchestrator.js +4 -2
  145. package/dist/orchestrator.js.map +1 -1
  146. package/dist/polling/closed-item-asks.d.ts +8 -0
  147. package/dist/polling/closed-item-asks.d.ts.map +1 -0
  148. package/dist/polling/closed-item-asks.js +28 -0
  149. package/dist/polling/closed-item-asks.js.map +1 -0
  150. package/dist/polling/cycle.d.ts +28 -10
  151. package/dist/polling/cycle.d.ts.map +1 -1
  152. package/dist/polling/cycle.js +20 -6
  153. package/dist/polling/cycle.js.map +1 -1
  154. package/dist/polling/evaluation-failures.d.ts +42 -0
  155. package/dist/polling/evaluation-failures.d.ts.map +1 -0
  156. package/dist/polling/evaluation-failures.js +103 -0
  157. package/dist/polling/evaluation-failures.js.map +1 -0
  158. package/dist/polling/hints.d.ts +2 -2
  159. package/dist/polling/hints.d.ts.map +1 -1
  160. package/dist/polling/hints.js +2 -2
  161. package/dist/polling/hints.js.map +1 -1
  162. package/dist/polling/loop-evaluation.d.ts +21 -11
  163. package/dist/polling/loop-evaluation.d.ts.map +1 -1
  164. package/dist/polling/loop-evaluation.js +70 -27
  165. package/dist/polling/loop-evaluation.js.map +1 -1
  166. package/dist/polling/open-issues.d.ts +23 -0
  167. package/dist/polling/open-issues.d.ts.map +1 -0
  168. package/dist/polling/open-issues.js +77 -0
  169. package/dist/polling/open-issues.js.map +1 -0
  170. package/dist/polling/open-pull-requests.d.ts +28 -0
  171. package/dist/polling/open-pull-requests.d.ts.map +1 -0
  172. package/dist/polling/open-pull-requests.js +131 -0
  173. package/dist/polling/open-pull-requests.js.map +1 -0
  174. package/dist/polling/polling.d.ts +20 -11
  175. package/dist/polling/polling.d.ts.map +1 -1
  176. package/dist/polling/polling.js +215 -52
  177. package/dist/polling/polling.js.map +1 -1
  178. package/dist/polling/repository-sync.d.ts +21 -14
  179. package/dist/polling/repository-sync.d.ts.map +1 -1
  180. package/dist/polling/repository-sync.js +35 -28
  181. package/dist/polling/repository-sync.js.map +1 -1
  182. package/dist/polling-triggers.d.ts +1 -1
  183. package/dist/polling-triggers.d.ts.map +1 -1
  184. package/dist/polling-triggers.js +1 -1
  185. package/dist/polling-triggers.js.map +1 -1
  186. package/dist/reloads.d.ts +14 -0
  187. package/dist/reloads.d.ts.map +1 -0
  188. package/dist/reloads.js +7 -0
  189. package/dist/reloads.js.map +1 -0
  190. package/dist/runtime.d.ts +24 -0
  191. package/dist/runtime.d.ts.map +1 -0
  192. package/dist/runtime.js +58 -0
  193. package/dist/runtime.js.map +1 -0
  194. package/dist/schedule-triggers.d.ts +14 -10
  195. package/dist/schedule-triggers.d.ts.map +1 -1
  196. package/dist/schedule-triggers.js +36 -31
  197. package/dist/schedule-triggers.js.map +1 -1
  198. package/dist/scheduler.d.ts +45 -5
  199. package/dist/scheduler.d.ts.map +1 -1
  200. package/dist/scheduler.js +587 -44
  201. package/dist/scheduler.js.map +1 -1
  202. package/dist/ssh.d.ts +103 -0
  203. package/dist/ssh.d.ts.map +1 -0
  204. package/dist/ssh.js +144 -0
  205. package/dist/ssh.js.map +1 -0
  206. package/dist/trigger-condition.d.ts +12 -0
  207. package/dist/trigger-condition.d.ts.map +1 -0
  208. package/dist/trigger-condition.js +88 -0
  209. package/dist/trigger-condition.js.map +1 -0
  210. package/dist/trigger-submission.d.ts +16 -13
  211. package/dist/trigger-submission.d.ts.map +1 -1
  212. package/dist/trigger-submission.js +19 -14
  213. package/dist/trigger-submission.js.map +1 -1
  214. package/dist/worker-engine.d.ts +13 -0
  215. package/dist/worker-engine.d.ts.map +1 -0
  216. package/dist/worker-engine.js +56 -0
  217. package/dist/worker-engine.js.map +1 -0
  218. package/dist/worker-status.d.ts +140 -0
  219. package/dist/worker-status.d.ts.map +1 -0
  220. package/dist/worker-status.js +76 -0
  221. package/dist/worker-status.js.map +1 -0
  222. package/package.json +47 -22
@@ -0,0 +1,206 @@
1
+ import type { LoadedInstance } from "@usine/config/instance";
2
+ import { CycleBudgetAsk } from "@usine/core/cycle-budget";
3
+ import { CycleBudgets } from "@usine/engine/cycle-budget";
4
+ import { ItemProjectionReader } from "@usine/engine/item-projection";
5
+ import { LoopControl } from "@usine/engine/loop-control";
6
+ import { type RunStoreError, UnconfirmedStops } from "@usine/engine/engine";
7
+ import { RunReader } from "@usine/engine/run-reader";
8
+ import { Context, Effect, Layer, Schema } from "effect";
9
+ import { PollingTriggers } from "../polling-triggers.ts";
10
+ import { WorkerStatus } from "../worker-status.ts";
11
+ import { MachineView, ProvisioningPauseView } from "./machines.ts";
12
+ import { AttemptView } from "./attempt.ts";
13
+ import { BoardItemLink } from "./board.ts";
14
+ import { WorkerSlotsView } from "./configuration.ts";
15
+ import { RunView, UnconfirmedStopView } from "./run.ts";
16
+ declare const WorkerSilentView_base: Schema.Class<WorkerSilentView, Schema.TaggedStruct<"WorkerSilent", {
17
+ readonly worker: Schema.brand<Schema.String, "WorkerName">;
18
+ readonly lastAnsweredAt: Schema.String;
19
+ }>, {}>;
20
+ /** The Attempt's Worker hasn't answered the executor's probe since `lastAnsweredAt`. */
21
+ export declare class WorkerSilentView extends WorkerSilentView_base {
22
+ }
23
+ declare const ProviderRetryingView_base: Schema.Class<ProviderRetryingView, Schema.TaggedStruct<"ProviderRetrying", {
24
+ readonly agent: Schema.brand<Schema.String, "AgentName">;
25
+ readonly message: Schema.NonEmptyString;
26
+ readonly retries: Schema.brand<Schema.Int, "ProviderRetries">;
27
+ readonly since: Schema.String;
28
+ }>, {}>;
29
+ /**
30
+ * A session's harness is retrying its model provider: the retries in this turn, the latest report,
31
+ * and when the first unanswered retry was recorded.
32
+ */
33
+ export declare class ProviderRetryingView extends ProviderRetryingView_base {
34
+ }
35
+ /**
36
+ * An open connectivity problem in an Attempt's transcript. It's a warning and never stops the
37
+ * Attempt (ADR 0013).
38
+ */
39
+ export declare const ConnectivityWarningView: Schema.Union<readonly [typeof WorkerSilentView, typeof ProviderRetryingView]>;
40
+ export type ConnectivityWarningView = typeof ConnectivityWarningView.Type;
41
+ declare const RunningAttemptView_base: Schema.Class<RunningAttemptView, Schema.Struct<{
42
+ readonly run: typeof RunView;
43
+ readonly attempt: typeof AttemptView;
44
+ /**
45
+ * The Run's Item as its Board card links it, or null for a schedule Run or an Item the desk
46
+ * didn't read.
47
+ */
48
+ readonly item: Schema.NullOr<typeof BoardItemLink>;
49
+ /**
50
+ * When the Attempt's sessions last showed work, excluding Worker notices, pool meters, and
51
+ * provider retries. Null if the newest rows show none.
52
+ */
53
+ readonly lastActivityAt: Schema.NullOr<Schema.String>;
54
+ /** The connectivity problems still open after the newest rows. */
55
+ readonly warnings: Schema.$Array<Schema.Union<readonly [typeof WorkerSilentView, typeof ProviderRetryingView]>>;
56
+ }>, {}>;
57
+ /** A running Attempt with its Run, Item, and recent transcript activity. */
58
+ export declare class RunningAttemptView extends RunningAttemptView_base {
59
+ }
60
+ declare const SuppressedForOperatorView_base: Schema.Class<SuppressedForOperatorView, Schema.TaggedStruct<"SuppressedForOperator", {
61
+ readonly run: typeof RunView;
62
+ }>, {}>;
63
+ /**
64
+ * An Agent's question or blocker that suppresses the Item for the Loop until the operator answers
65
+ * or resolves `run`, or the Item changes (ADR 0017).
66
+ */
67
+ export declare class SuppressedForOperatorView extends SuppressedForOperatorView_base {
68
+ }
69
+ declare const ClosedUnchangedView_base: Schema.Class<ClosedUnchangedView, Schema.TaggedStruct<"ClosedUnchanged", {
70
+ readonly run: typeof RunView;
71
+ }>, {}>;
72
+ /**
73
+ * `run` succeeded or was canceled on the Item's current state, so the Loop opens no other Run until
74
+ * the state changes (ADR 0007).
75
+ */
76
+ export declare class ClosedUnchangedView extends ClosedUnchangedView_base {
77
+ }
78
+ declare const RunFailedView_base: Schema.Class<RunFailedView, Schema.TaggedStruct<"RunFailed", {
79
+ readonly run: typeof RunView;
80
+ }>, {}>;
81
+ /** `run` failed on the Item's current state and waits for the operator to retry it. */
82
+ export declare class RunFailedView extends RunFailedView_base {
83
+ }
84
+ declare const LoopPausedView_base: Schema.Class<LoopPausedView, Schema.TaggedStruct<"LoopPaused", {}>, {}>;
85
+ /** The Loop is paused, so its trigger opens no Run. */
86
+ export declare class LoopPausedView extends LoopPausedView_base {
87
+ }
88
+ declare const CycleBudgetUsedUpView_base: Schema.Class<CycleBudgetUsedUpView, Schema.TaggedStruct<"CycleBudgetUsedUp", {
89
+ readonly ask: typeof CycleBudgetAsk;
90
+ }>, {}>;
91
+ /** The Item used up its cycle budget; `ask` waits for the operator to reset it. */
92
+ export declare class CycleBudgetUsedUpView extends CycleBudgetUsedUpView_base {
93
+ }
94
+ declare const AwaitingApprovalView_base: Schema.Class<AwaitingApprovalView, Schema.TaggedStruct<"AwaitingApproval", {
95
+ readonly run: typeof RunView;
96
+ }>, {}>;
97
+ /** `run` waits for the operator's approval. */
98
+ export declare class AwaitingApprovalView extends AwaitingApprovalView_base {
99
+ }
100
+ declare const QueuedForWorkerView_base: Schema.Class<QueuedForWorkerView, Schema.TaggedStruct<"QueuedForWorker", {
101
+ readonly run: typeof RunView;
102
+ /**
103
+ * The fewest Runs that take a Worker slot before `run`, or null if the scheduler doesn't
104
+ * queue `run`: it hasn't asked for a slot yet, or this process runs no Attempts.
105
+ */
106
+ readonly ahead: Schema.NullOr<Schema.Int>;
107
+ /**
108
+ * The machine that a provisioned Worker creates for `run`'s next Attempt, or null if none is
109
+ * being created.
110
+ */
111
+ readonly creating: Schema.withConstructorDefault<Schema.NullOr<typeof MachineView>>;
112
+ }>, {}>;
113
+ /** `run` waits for a free Worker slot. */
114
+ export declare class QueuedForWorkerView extends QueuedForWorkerView_base {
115
+ }
116
+ declare const WaitingForStopView_base: Schema.Class<WaitingForStopView, Schema.TaggedStruct<"WaitingForStop", {
117
+ readonly run: typeof RunView;
118
+ readonly stop: typeof UnconfirmedStopView;
119
+ }>, {}>;
120
+ /**
121
+ * `run` starts no Attempt until the parent task of the Attempt in `stop`, on the same Loop and
122
+ * Item, is confirmed stopped (#523).
123
+ */
124
+ export declare class WaitingForStopView extends WaitingForStopView_base {
125
+ }
126
+ declare const AwaitingPollView_base: Schema.Class<AwaitingPollView, Schema.TaggedStruct<"AwaitingPoll", {}>, {}>;
127
+ /** No Event of the Loop has a Run for the Item's current state yet. The next poll acts on it. */
128
+ export declare class AwaitingPollView extends AwaitingPollView_base {
129
+ }
130
+ /** The reason a matched Item has no running Attempt. */
131
+ export declare const StallReasonView: Schema.Union<readonly [typeof AwaitingApprovalView, typeof SuppressedForOperatorView, typeof CycleBudgetUsedUpView, typeof RunFailedView, typeof ClosedUnchangedView, typeof LoopPausedView, typeof WaitingForStopView, typeof QueuedForWorkerView, typeof AwaitingPollView]>;
132
+ export type StallReasonView = typeof StallReasonView.Type;
133
+ declare const StalledItemView_base: Schema.Class<StalledItemView, Schema.Struct<{
134
+ readonly repository: Schema.brand<Schema.String, "RepositoryName">;
135
+ readonly loop: Schema.brand<Schema.NonEmptyString, "LoopName">;
136
+ readonly item: typeof BoardItemLink;
137
+ readonly reason: Schema.Union<readonly [typeof AwaitingApprovalView, typeof SuppressedForOperatorView, typeof CycleBudgetUsedUpView, typeof RunFailedView, typeof ClosedUnchangedView, typeof LoopPausedView, typeof WaitingForStopView, typeof QueuedForWorkerView, typeof AwaitingPollView]>;
138
+ }>, {}>;
139
+ /** An Item that a Loop's trigger matches with no running Attempt, and the reason. */
140
+ export declare class StalledItemView extends StalledItemView_base {
141
+ }
142
+ declare const ClosedRunView_base: Schema.Class<ClosedRunView, Schema.Struct<{
143
+ readonly run: typeof RunView;
144
+ /**
145
+ * The Run's Item as its Board card links it, or null for a schedule Run or an Item the desk
146
+ * didn't read.
147
+ */
148
+ readonly item: Schema.NullOr<typeof BoardItemLink>;
149
+ /** The Run's `closedAt`, set even for a Run canceled before any Attempt. */
150
+ readonly closedAt: Schema.String;
151
+ }>, {}>;
152
+ /** A closed Run with its Item and close time. */
153
+ export declare class ClosedRunView extends ClosedRunView_base {
154
+ }
155
+ declare const WorkerView_base: Schema.Class<WorkerView, Schema.Struct<{
156
+ readonly name: Schema.brand<Schema.String, "WorkerName">;
157
+ /**
158
+ * The slots as the scheduler leases them. If the scheduler runs no Attempts (as in setup mode),
159
+ * the declared `max_concurrent_attempts` with none leased.
160
+ */
161
+ readonly slots: typeof WorkerSlotsView;
162
+ /**
163
+ * The newest failed check among the Worker's prerequisites and harnesses, or else its degraded
164
+ * prerequisites, or else the newest passed or deferred check. Null before the first preflight.
165
+ */
166
+ readonly preflight: Schema.NullOr<Schema.Union<readonly [typeof import("./configuration.ts").PassedCheckView, typeof import("./configuration.ts").DegradedCheckView, typeof import("./configuration.ts").DeferredCheckView, typeof import("./configuration.ts").FailedCheckView]>>;
167
+ /** A provisioned Worker's machines in flight, oldest first. */
168
+ readonly machines: Schema.withConstructorDefault<Schema.$Array<typeof MachineView>>;
169
+ /** A provisioned Worker's last failed machine creation, or null after a success. */
170
+ readonly provisioning: Schema.withConstructorDefault<Schema.NullOr<typeof ProvisioningPauseView>>;
171
+ }>, {}>;
172
+ /** One Worker on the desk's Workers line, with its slots and last preflight. */
173
+ export declare class WorkerView extends WorkerView_base {
174
+ }
175
+ declare const RepositoryPollView_base: Schema.Class<RepositoryPollView, Schema.Struct<{
176
+ readonly repository: Schema.brand<Schema.String, "RepositoryName">;
177
+ readonly polledAt: Schema.NullOr<Schema.String>;
178
+ }>, {}>;
179
+ /**
180
+ * When the factory last finished polling a managed repository, or null before the first poll ends.
181
+ */
182
+ export declare class RepositoryPollView extends RepositoryPollView_base {
183
+ }
184
+ declare const DeskView_base: Schema.Class<DeskView, Schema.Struct<{
185
+ readonly running: Schema.$Array<typeof RunningAttemptView>;
186
+ readonly notMoving: Schema.$Array<typeof StalledItemView>;
187
+ readonly lastOutcomes: Schema.$Array<typeof ClosedRunView>;
188
+ readonly workers: Schema.$Array<typeof WorkerView>;
189
+ readonly polls: Schema.$Array<typeof RepositoryPollView>;
190
+ }>, {}>;
191
+ /**
192
+ * The operator's desk: running Attempts, stalled matched Items, recently closed Runs, Worker slots,
193
+ * and poll times. Needs you comes from the overview.
194
+ */
195
+ export declare class DeskView extends DeskView_base {
196
+ }
197
+ declare const OperatorDesk_base: Context.ServiceClass<OperatorDesk, "@usine/orchestrator/OperatorDesk", {
198
+ /** Returns the instance's desk, as described in `OperatorObservation.desk`. */
199
+ readonly desk: (instance: LoadedInstance) => Effect.Effect<DeskView, RunStoreError>;
200
+ }>;
201
+ /** Builds the operator's desk from the engine's stores, the Loop matches, and the scheduler's slots. */
202
+ export declare class OperatorDesk extends OperatorDesk_base {
203
+ static readonly layer: Layer.Layer<OperatorDesk, never, CycleBudgets | import("@usine/expression/expression-engine").ExpressionEngine | ItemProjectionReader | LoopControl | PollingTriggers | RunReader | UnconfirmedStops | WorkerStatus>;
204
+ }
205
+ export {};
206
+ //# sourceMappingURL=desk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../src/operator/desk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAM1D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAA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