@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.
- package/README.md +151 -52
- package/dist/board/items.d.ts +9 -1
- package/dist/board/items.d.ts.map +1 -1
- package/dist/board/items.js +16 -4
- package/dist/board/items.js.map +1 -1
- package/dist/board/projection.d.ts +7 -1
- package/dist/board/projection.d.ts.map +1 -1
- package/dist/board/projection.js +53 -14
- package/dist/board/projection.js.map +1 -1
- package/dist/board/tasks.d.ts +14 -2
- package/dist/board/tasks.d.ts.map +1 -1
- package/dist/board/tasks.js +23 -8
- package/dist/board/tasks.js.map +1 -1
- package/dist/credentials.d.ts +5 -6
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +22 -15
- package/dist/credentials.js.map +1 -1
- package/dist/current-instance/changes.d.ts +87 -0
- package/dist/current-instance/changes.d.ts.map +1 -0
- package/dist/current-instance/changes.js +138 -0
- package/dist/current-instance/changes.js.map +1 -0
- package/dist/current-instance/current-instance.d.ts +89 -0
- package/dist/current-instance/current-instance.d.ts.map +1 -0
- package/dist/current-instance/current-instance.js +163 -0
- package/dist/current-instance/current-instance.js.map +1 -0
- package/dist/exe-dev.d.ts +6 -2
- package/dist/exe-dev.d.ts.map +1 -1
- package/dist/exe-dev.js +7 -8
- package/dist/exe-dev.js.map +1 -1
- package/dist/idle-triggers.d.ts +1 -1
- package/dist/idle-triggers.d.ts.map +1 -1
- package/dist/idle-triggers.js +1 -1
- package/dist/idle-triggers.js.map +1 -1
- package/dist/label-reconciler.d.ts +5 -2
- package/dist/label-reconciler.d.ts.map +1 -1
- package/dist/label-reconciler.js.map +1 -1
- package/dist/local.d.ts +4 -18
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +7 -45
- package/dist/local.js.map +1 -1
- package/dist/loop-matches.d.ts +28 -0
- package/dist/loop-matches.d.ts.map +1 -0
- package/dist/loop-matches.js +74 -0
- package/dist/loop-matches.js.map +1 -0
- package/dist/operator/attempt.d.ts +57 -10
- package/dist/operator/attempt.d.ts.map +1 -1
- package/dist/operator/attempt.js +49 -10
- package/dist/operator/attempt.js.map +1 -1
- package/dist/operator/board.d.ts +43 -16
- package/dist/operator/board.d.ts.map +1 -1
- package/dist/operator/board.js +43 -16
- package/dist/operator/board.js.map +1 -1
- package/dist/operator/configuration.d.ts +258 -0
- package/dist/operator/configuration.d.ts.map +1 -0
- package/dist/operator/configuration.js +410 -0
- package/dist/operator/configuration.js.map +1 -0
- package/dist/operator/desk.d.ts +181 -0
- package/dist/operator/desk.d.ts.map +1 -0
- package/dist/operator/desk.js +463 -0
- package/dist/operator/desk.js.map +1 -0
- package/dist/operator/github-changes.d.ts +88 -0
- package/dist/operator/github-changes.d.ts.map +1 -0
- package/dist/operator/github-changes.js +266 -0
- package/dist/operator/github-changes.js.map +1 -0
- package/dist/operator/http.d.ts +152 -57
- package/dist/operator/http.d.ts.map +1 -1
- package/dist/operator/http.js +140 -21
- package/dist/operator/http.js.map +1 -1
- package/dist/operator/need.d.ts +44 -11
- package/dist/operator/need.d.ts.map +1 -1
- package/dist/operator/need.js +46 -9
- package/dist/operator/need.js.map +1 -1
- package/dist/operator/operator.d.ts +109 -29
- package/dist/operator/operator.d.ts.map +1 -1
- package/dist/operator/operator.js +254 -52
- package/dist/operator/operator.js.map +1 -1
- package/dist/operator/overview.d.ts +7 -7
- package/dist/operator/overview.d.ts.map +1 -1
- package/dist/operator/overview.js +5 -5
- package/dist/operator/overview.js.map +1 -1
- package/dist/operator/projection.d.ts +54 -5
- package/dist/operator/projection.d.ts.map +1 -1
- package/dist/operator/projection.js +100 -9
- package/dist/operator/projection.js.map +1 -1
- package/dist/operator/run.d.ts +71 -6
- package/dist/operator/run.d.ts.map +1 -1
- package/dist/operator/run.js +69 -6
- package/dist/operator/run.js.map +1 -1
- package/dist/operator/task.d.ts +93 -0
- package/dist/operator/task.d.ts.map +1 -0
- package/dist/operator/task.js +204 -0
- package/dist/operator/task.js.map +1 -0
- package/dist/operator/transcript.d.ts +12 -12
- package/dist/operator/transcript.d.ts.map +1 -1
- package/dist/operator/transcript.js +11 -9
- package/dist/operator/transcript.js.map +1 -1
- package/dist/operator/usage.d.ts +111 -0
- package/dist/operator/usage.d.ts.map +1 -0
- package/dist/operator/usage.js +219 -0
- package/dist/operator/usage.js.map +1 -0
- package/dist/orchestrator.d.ts +8 -5
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +4 -2
- package/dist/orchestrator.js.map +1 -1
- package/dist/polling/cycle.d.ts +28 -10
- package/dist/polling/cycle.d.ts.map +1 -1
- package/dist/polling/cycle.js +20 -6
- package/dist/polling/cycle.js.map +1 -1
- package/dist/polling/evaluation-failures.d.ts +42 -0
- package/dist/polling/evaluation-failures.d.ts.map +1 -0
- package/dist/polling/evaluation-failures.js +103 -0
- package/dist/polling/evaluation-failures.js.map +1 -0
- package/dist/polling/hints.d.ts +2 -2
- package/dist/polling/hints.d.ts.map +1 -1
- package/dist/polling/hints.js +2 -2
- package/dist/polling/hints.js.map +1 -1
- package/dist/polling/loop-evaluation.d.ts +21 -11
- package/dist/polling/loop-evaluation.d.ts.map +1 -1
- package/dist/polling/loop-evaluation.js +70 -27
- package/dist/polling/loop-evaluation.js.map +1 -1
- package/dist/polling/open-issues.d.ts +23 -0
- package/dist/polling/open-issues.d.ts.map +1 -0
- package/dist/polling/open-issues.js +77 -0
- package/dist/polling/open-issues.js.map +1 -0
- package/dist/polling/polling.d.ts +20 -11
- package/dist/polling/polling.d.ts.map +1 -1
- package/dist/polling/polling.js +201 -51
- package/dist/polling/polling.js.map +1 -1
- package/dist/polling/repository-sync.d.ts +20 -14
- package/dist/polling/repository-sync.d.ts.map +1 -1
- package/dist/polling/repository-sync.js +34 -27
- package/dist/polling/repository-sync.js.map +1 -1
- package/dist/polling-triggers.d.ts +1 -1
- package/dist/polling-triggers.d.ts.map +1 -1
- package/dist/polling-triggers.js +1 -1
- package/dist/polling-triggers.js.map +1 -1
- package/dist/reloads.d.ts +14 -0
- package/dist/reloads.d.ts.map +1 -0
- package/dist/reloads.js +7 -0
- package/dist/reloads.js.map +1 -0
- package/dist/runtime.d.ts +24 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +58 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schedule-triggers.d.ts +14 -10
- package/dist/schedule-triggers.d.ts.map +1 -1
- package/dist/schedule-triggers.js +36 -31
- package/dist/schedule-triggers.js.map +1 -1
- package/dist/scheduler.d.ts +35 -4
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +327 -41
- package/dist/scheduler.js.map +1 -1
- package/dist/ssh.d.ts +39 -0
- package/dist/ssh.d.ts.map +1 -0
- package/dist/ssh.js +75 -0
- package/dist/ssh.js.map +1 -0
- package/dist/trigger-condition.d.ts +12 -0
- package/dist/trigger-condition.d.ts.map +1 -0
- package/dist/trigger-condition.js +88 -0
- package/dist/trigger-condition.js.map +1 -0
- package/dist/trigger-submission.d.ts +16 -13
- package/dist/trigger-submission.d.ts.map +1 -1
- package/dist/trigger-submission.js +19 -14
- package/dist/trigger-submission.js.map +1 -1
- package/dist/worker-engine.d.ts +10 -0
- package/dist/worker-engine.d.ts.map +1 -0
- package/dist/worker-engine.js +25 -0
- package/dist/worker-engine.js.map +1 -0
- package/dist/worker-status.d.ts +70 -0
- package/dist/worker-status.d.ts.map +1 -0
- package/dist/worker-status.js +55 -0
- package/dist/worker-status.js.map +1 -0
- package/package.json +31 -10
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { ConfigFileError } from "@usine/config/file";
|
|
2
|
+
import type { LoadedInstance } from "@usine/config/instance";
|
|
3
|
+
import type { EnginePersistenceError } from "@usine/engine/engine";
|
|
4
|
+
import { LoopControl } from "@usine/engine/loop-control";
|
|
5
|
+
import { RepositoryLabelProjectionReader } from "@usine/engine/repository-label-projection";
|
|
6
|
+
import { Context, Effect, Layer, Schema } from "effect";
|
|
7
|
+
import { LabelPreflightFinding } from "../label-reconciler.ts";
|
|
8
|
+
import { PollingTriggers } from "../polling-triggers.ts";
|
|
9
|
+
import { type PreflightCheck, WorkerStatus } from "../worker-status.ts";
|
|
10
|
+
declare const LoopSelectorView_base: Schema.Class<LoopSelectorView, Schema.Struct<{
|
|
11
|
+
readonly repos: Schema.NullOr<Schema.$Array<Schema.brand<Schema.String, "RepositoryName">>>;
|
|
12
|
+
readonly tags: Schema.NullOr<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
|
|
13
|
+
}>, {}>;
|
|
14
|
+
/** A Loop's selector as written: the repositories and registry tags. */
|
|
15
|
+
export declare class LoopSelectorView extends LoopSelectorView_base {
|
|
16
|
+
}
|
|
17
|
+
declare const LoopFileView_base: Schema.Class<LoopFileView, Schema.Struct<{
|
|
18
|
+
readonly name: Schema.brand<Schema.NonEmptyString, "LoopName">;
|
|
19
|
+
readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
|
|
20
|
+
/** The trigger's `on:` stream. */
|
|
21
|
+
readonly stream: Schema.Literals<readonly ["issue", "pr", "schedule"]>;
|
|
22
|
+
/** The trigger's `if:` expression as written. */
|
|
23
|
+
readonly condition: Schema.brand<Schema.String, "ExpressionSource">;
|
|
24
|
+
/** A schedule trigger's cron and time zone, or null for the other streams. */
|
|
25
|
+
readonly cron: Schema.NullOr<Schema.brand<Schema.String, "Cron">>;
|
|
26
|
+
readonly timeZone: Schema.NullOr<Schema.brand<Schema.String, "TimeZone">>;
|
|
27
|
+
/** Null if the file has no selector, so the Loop applies to every registered repository. */
|
|
28
|
+
readonly selector: Schema.NullOr<typeof LoopSelectorView>;
|
|
29
|
+
/** The registered repositories the selector selects, in `usine.yaml` order. */
|
|
30
|
+
readonly repositories: Schema.$Array<Schema.brand<Schema.String, "RepositoryName">>;
|
|
31
|
+
readonly approval: Schema.Literals<readonly ["none", "required"]>;
|
|
32
|
+
readonly maxCycles: Schema.brand<Schema.Int, "CycleLimit">;
|
|
33
|
+
readonly permissions: Schema.Literals<readonly ["write", "read"]>;
|
|
34
|
+
readonly step: Schema.brand<Schema.NonEmptyString, "StepName">;
|
|
35
|
+
readonly agent: Schema.brand<Schema.String, "AgentName">;
|
|
36
|
+
/** The Markdown prompt template, with its `{{ }}` expressions as written. */
|
|
37
|
+
readonly prompt: Schema.brand<Schema.String, "PromptTemplate">;
|
|
38
|
+
readonly paused: Schema.Boolean;
|
|
39
|
+
/** Labels the trigger compares against that `usine.yaml` doesn't declare in `labels`. */
|
|
40
|
+
readonly undeclaredLabels: Schema.$Array<Schema.brand<Schema.String, "GitHubLabelName">>;
|
|
41
|
+
}>, {}>;
|
|
42
|
+
/** A parsed Loop file with its runtime pause state. */
|
|
43
|
+
export declare class LoopFileView extends LoopFileView_base {
|
|
44
|
+
}
|
|
45
|
+
declare const QuarantinedLoopView_base: Schema.Class<QuarantinedLoopView, Schema.Struct<{
|
|
46
|
+
/** The file name without its folder and `.md` extension. */
|
|
47
|
+
readonly name: Schema.NonEmptyString;
|
|
48
|
+
readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
|
|
49
|
+
readonly error: typeof ConfigFileError;
|
|
50
|
+
}>, {}>;
|
|
51
|
+
/** A Loop file that failed to load and opens no Runs, with the failed stage and reason. */
|
|
52
|
+
export declare class QuarantinedLoopView extends QuarantinedLoopView_base {
|
|
53
|
+
}
|
|
54
|
+
declare const AgentFileView_base: Schema.Class<AgentFileView, Schema.Struct<{
|
|
55
|
+
readonly name: Schema.brand<Schema.String, "AgentName">;
|
|
56
|
+
readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
|
|
57
|
+
readonly harness: Schema.Literals<readonly ["claude", "codex", "pi"]>;
|
|
58
|
+
readonly model: Schema.brand<Schema.String, "ModelId">;
|
|
59
|
+
readonly effort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
60
|
+
/** The file's own parent model and effort, or null if it sets none. */
|
|
61
|
+
readonly parentModel: Schema.NullOr<Schema.brand<Schema.String, "ModelId">>;
|
|
62
|
+
readonly parentEffort: Schema.NullOr<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
63
|
+
/** The file's parent model, else `settings.parent_model`. If null, Pi chooses. */
|
|
64
|
+
readonly resolvedParentModel: Schema.NullOr<Schema.brand<Schema.String, "ModelId">>;
|
|
65
|
+
/** The file's parent effort, else `settings.parent_effort`, else `effort`. */
|
|
66
|
+
readonly resolvedParentEffort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
67
|
+
readonly persona: Schema.brand<Schema.String, "AgentPersona">;
|
|
68
|
+
/** The loaded Loops that use this Agent. */
|
|
69
|
+
readonly loops: Schema.$Array<Schema.brand<Schema.NonEmptyString, "LoopName">>;
|
|
70
|
+
}>, {}>;
|
|
71
|
+
/** A parsed rostered Agent file with the Loops that use it. */
|
|
72
|
+
export declare class AgentFileView extends AgentFileView_base {
|
|
73
|
+
}
|
|
74
|
+
declare const InvalidAgentView_base: Schema.Class<InvalidAgentView, Schema.Struct<{
|
|
75
|
+
/** The file name without its folder and `.md` extension. */
|
|
76
|
+
readonly name: Schema.NonEmptyString;
|
|
77
|
+
readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
|
|
78
|
+
readonly error: typeof ConfigFileError;
|
|
79
|
+
}>, {}>;
|
|
80
|
+
/**
|
|
81
|
+
* An Agent file that failed to load and is left out of the roster, with the failed stage and
|
|
82
|
+
* reason.
|
|
83
|
+
*/
|
|
84
|
+
export declare class InvalidAgentView extends InvalidAgentView_base {
|
|
85
|
+
}
|
|
86
|
+
declare const GatewayView_base: Schema.Class<GatewayView, Schema.Struct<{
|
|
87
|
+
readonly domain: Schema.brand<Schema.String, "GatewayDomain">;
|
|
88
|
+
readonly destination: Schema.brand<Schema.String, "SshDestination">;
|
|
89
|
+
readonly adminPort: Schema.brand<Schema.Int, "GatewayAdminPort">;
|
|
90
|
+
readonly adminTokenEnv: Schema.NonEmptyString;
|
|
91
|
+
readonly llmProviders: Schema.$Array<Schema.Literals<readonly ["anthropic"]>>;
|
|
92
|
+
}>, {}>;
|
|
93
|
+
/**
|
|
94
|
+
* The Gateway in front of an SSH Worker. Includes only the name of the environment variable with
|
|
95
|
+
* its admin token.
|
|
96
|
+
*/
|
|
97
|
+
export declare class GatewayView extends GatewayView_base {
|
|
98
|
+
}
|
|
99
|
+
declare const WorkerSlotsView_base: Schema.Class<WorkerSlotsView, Schema.Struct<{
|
|
100
|
+
/** The number of slots for Attempts: `max_concurrent_attempts` once a reload applied it. */
|
|
101
|
+
readonly capacity: Schema.Int;
|
|
102
|
+
readonly leased: Schema.Int;
|
|
103
|
+
}>, {}>;
|
|
104
|
+
/** The current slot usage of a Worker. */
|
|
105
|
+
export declare class WorkerSlotsView extends WorkerSlotsView_base {
|
|
106
|
+
}
|
|
107
|
+
declare const PassedCheckView_base: Schema.Class<PassedCheckView, Schema.TaggedStruct<"Passed", {
|
|
108
|
+
readonly checkedAt: Schema.String;
|
|
109
|
+
}>, {}>;
|
|
110
|
+
/** A passed preflight check, at an ISO instant. */
|
|
111
|
+
export declare class PassedCheckView extends PassedCheckView_base {
|
|
112
|
+
}
|
|
113
|
+
declare const FailedCheckView_base: Schema.Class<FailedCheckView, Schema.TaggedStruct<"Failed", {
|
|
114
|
+
readonly checkedAt: Schema.String;
|
|
115
|
+
/** Null when the check itself failed, such as a timed-out probe. */
|
|
116
|
+
readonly capability: Schema.NullOr<Schema.Literals<readonly ["machine", "toolchain", "memory", "harness-login", "credentials", "gateway"]>>;
|
|
117
|
+
readonly message: Schema.String;
|
|
118
|
+
}>, {}>;
|
|
119
|
+
/** A preflight check that found a missing prerequisite or couldn't run, at an ISO instant. */
|
|
120
|
+
export declare class FailedCheckView extends FailedCheckView_base {
|
|
121
|
+
}
|
|
122
|
+
export declare const PreflightCheckView: Schema.Union<readonly [typeof PassedCheckView, typeof FailedCheckView]>;
|
|
123
|
+
export type PreflightCheckView = typeof PreflightCheckView.Type;
|
|
124
|
+
declare const HarnessPreflightView_base: Schema.Class<HarnessPreflightView, Schema.Struct<{
|
|
125
|
+
readonly harness: Schema.Literals<readonly ["claude", "codex", "pi"]>;
|
|
126
|
+
readonly check: Schema.Union<readonly [typeof PassedCheckView, typeof FailedCheckView]>;
|
|
127
|
+
}>, {}>;
|
|
128
|
+
/** The last preflight of one harness on a Worker. */
|
|
129
|
+
export declare class HarnessPreflightView extends HarnessPreflightView_base {
|
|
130
|
+
}
|
|
131
|
+
declare const WorkerConfigurationView_base: Schema.Class<WorkerConfigurationView, Schema.Struct<{
|
|
132
|
+
readonly name: Schema.brand<Schema.String, "WorkerName">;
|
|
133
|
+
readonly kind: Schema.Literals<readonly ["local", "exe.dev", "ssh"]>;
|
|
134
|
+
readonly maxConcurrentAttempts: Schema.Int;
|
|
135
|
+
/** An SSH Worker's connection and root, or null for the other kinds. */
|
|
136
|
+
readonly destination: Schema.NullOr<Schema.brand<Schema.String, "SshDestination">>;
|
|
137
|
+
readonly port: Schema.NullOr<Schema.brand<Schema.Int, "SshPort">>;
|
|
138
|
+
readonly identityFile: Schema.NullOr<Schema.brand<Schema.String, "SshIdentityFile">>;
|
|
139
|
+
readonly root: Schema.NullOr<Schema.brand<Schema.String, "WorkerRoot">>;
|
|
140
|
+
readonly gateway: Schema.NullOr<typeof GatewayView>;
|
|
141
|
+
/** Null while the scheduler runs no Attempts, as in setup mode. */
|
|
142
|
+
readonly slots: Schema.NullOr<typeof WorkerSlotsView>;
|
|
143
|
+
/**
|
|
144
|
+
* The Worker's own prerequisites: machine, Git, memory, Gateway, and credentials. Null before any
|
|
145
|
+
* preflight.
|
|
146
|
+
*/
|
|
147
|
+
readonly prerequisites: Schema.NullOr<Schema.Union<readonly [typeof PassedCheckView, typeof FailedCheckView]>>;
|
|
148
|
+
/** In harness name order; empty before any harness check. */
|
|
149
|
+
readonly harnesses: Schema.$Array<typeof HarnessPreflightView>;
|
|
150
|
+
}>, {}>;
|
|
151
|
+
/** A Worker as declared in `usine.yaml`, with its slot usage and last preflight. */
|
|
152
|
+
export declare class WorkerConfigurationView extends WorkerConfigurationView_base {
|
|
153
|
+
}
|
|
154
|
+
declare const RemovedWorkerView_base: Schema.Class<RemovedWorkerView, Schema.Struct<{
|
|
155
|
+
readonly name: Schema.brand<Schema.String, "WorkerName">;
|
|
156
|
+
readonly running: Schema.Int;
|
|
157
|
+
}>, {}>;
|
|
158
|
+
/** A Worker removed by a reload that still runs Attempts. It's removed when the last one ends. */
|
|
159
|
+
export declare class RemovedWorkerView extends RemovedWorkerView_base {
|
|
160
|
+
}
|
|
161
|
+
declare const LabelStateView_base: Schema.Class<LabelStateView, Schema.Struct<{
|
|
162
|
+
readonly name: Schema.brand<Schema.String, "GitHubLabelName">;
|
|
163
|
+
/** Null until polling has read the repository's labels. */
|
|
164
|
+
readonly onGitHub: Schema.NullOr<Schema.Boolean>;
|
|
165
|
+
/** The repository's label color, else the color declared in `labels`, as six hex digits. */
|
|
166
|
+
readonly color: Schema.NullOr<Schema.String>;
|
|
167
|
+
readonly description: Schema.NullOr<Schema.String>;
|
|
168
|
+
/** Whether `labels` in `usine.yaml` declares the label, so usine creates it if missing. */
|
|
169
|
+
readonly declared: Schema.Boolean;
|
|
170
|
+
/** The reason usine couldn't create or confirm the label at the last poll. */
|
|
171
|
+
readonly failure: Schema.NullOr<typeof LabelPreflightFinding>;
|
|
172
|
+
}>, {}>;
|
|
173
|
+
/** A GitHub label in one repository, as of the last label poll. */
|
|
174
|
+
export declare class LabelStateView extends LabelStateView_base {
|
|
175
|
+
}
|
|
176
|
+
declare const LabelLaneSourceView_base: Schema.Class<LabelLaneSourceView, Schema.TaggedStruct<"Label", {
|
|
177
|
+
readonly label: typeof LabelStateView;
|
|
178
|
+
}>, {}>;
|
|
179
|
+
/** A lane source that routes Items by label. */
|
|
180
|
+
export declare class LabelLaneSourceView extends LabelLaneSourceView_base {
|
|
181
|
+
}
|
|
182
|
+
declare const StateLaneSourceView_base: Schema.Class<StateLaneSourceView, Schema.TaggedStruct<"State", {
|
|
183
|
+
readonly state: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
|
|
184
|
+
}>, {}>;
|
|
185
|
+
/** A lane source that routes Items by issue or pull request state. */
|
|
186
|
+
export declare class StateLaneSourceView extends StateLaneSourceView_base {
|
|
187
|
+
}
|
|
188
|
+
export declare const LaneSourceView: Schema.Union<readonly [typeof LabelLaneSourceView, typeof StateLaneSourceView]>;
|
|
189
|
+
export type LaneSourceView = typeof LaneSourceView.Type;
|
|
190
|
+
declare const LaneConfigurationView_base: Schema.Class<LaneConfigurationView, Schema.Struct<{
|
|
191
|
+
readonly name: Schema.brand<Schema.String, "LaneName">;
|
|
192
|
+
readonly sources: Schema.$Array<Schema.Union<readonly [typeof LabelLaneSourceView, typeof StateLaneSourceView]>>;
|
|
193
|
+
}>, {}>;
|
|
194
|
+
/** One lane declared in `repos[].lanes`, with its sources in file order. */
|
|
195
|
+
export declare class LaneConfigurationView extends LaneConfigurationView_base {
|
|
196
|
+
}
|
|
197
|
+
declare const RepositoryConfigurationView_base: Schema.Class<RepositoryConfigurationView, Schema.Struct<{
|
|
198
|
+
readonly name: Schema.brand<Schema.String, "RepositoryName">;
|
|
199
|
+
readonly tags: Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>;
|
|
200
|
+
/** Empty if `usine.yaml` declares no lanes, so the Board proposes lanes from the labels. */
|
|
201
|
+
readonly lanes: Schema.$Array<typeof LaneConfigurationView>;
|
|
202
|
+
/** The labels declared in `usine.yaml`, as this repository has them. */
|
|
203
|
+
readonly declaredLabels: Schema.$Array<typeof LabelStateView>;
|
|
204
|
+
/** The loaded Loops whose selector selects this repository. */
|
|
205
|
+
readonly loops: Schema.$Array<Schema.brand<Schema.NonEmptyString, "LoopName">>;
|
|
206
|
+
}>, {}>;
|
|
207
|
+
/** A registered repository with its lanes in Board order, declared labels, and Loops. */
|
|
208
|
+
export declare class RepositoryConfigurationView extends RepositoryConfigurationView_base {
|
|
209
|
+
}
|
|
210
|
+
declare const SettingsView_base: Schema.Class<SettingsView, Schema.Struct<{
|
|
211
|
+
readonly pollInterval: Schema.Int;
|
|
212
|
+
readonly maxChildren: Schema.Int;
|
|
213
|
+
readonly maxAttemptMinutes: Schema.NullOr<Schema.Int>;
|
|
214
|
+
readonly maxAttemptTokens: Schema.NullOr<Schema.Int>;
|
|
215
|
+
readonly parentModel: Schema.NullOr<Schema.brand<Schema.String, "ModelId">>;
|
|
216
|
+
readonly parentEffort: Schema.NullOr<Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>>;
|
|
217
|
+
readonly operator: Schema.NullOr<Schema.brand<Schema.String, "OperatorLogin">>;
|
|
218
|
+
readonly webhooks: Schema.Literals<readonly ["off", "deliveries", "endpoint"]>;
|
|
219
|
+
/** The public URL for `endpoint` webhooks, or null for the other modes. */
|
|
220
|
+
readonly webhooksPublicUrl: Schema.NullOr<Schema.String>;
|
|
221
|
+
}>, {}>;
|
|
222
|
+
/** The `settings`, `operator`, and webhooks mode of `usine.yaml`, with defaults applied. */
|
|
223
|
+
export declare class SettingsView extends SettingsView_base {
|
|
224
|
+
}
|
|
225
|
+
declare const ConfigurationView_base: Schema.Class<ConfigurationView, Schema.Struct<{
|
|
226
|
+
readonly loops: Schema.$Array<typeof LoopFileView>;
|
|
227
|
+
readonly quarantinedLoops: Schema.$Array<typeof QuarantinedLoopView>;
|
|
228
|
+
readonly agents: Schema.$Array<typeof AgentFileView>;
|
|
229
|
+
readonly invalidAgents: Schema.$Array<typeof InvalidAgentView>;
|
|
230
|
+
readonly workers: Schema.$Array<typeof WorkerConfigurationView>;
|
|
231
|
+
readonly removedWorkers: Schema.$Array<typeof RemovedWorkerView>;
|
|
232
|
+
readonly repositories: Schema.$Array<typeof RepositoryConfigurationView>;
|
|
233
|
+
readonly settings: typeof SettingsView;
|
|
234
|
+
}>, {}>;
|
|
235
|
+
/**
|
|
236
|
+
* The parsed instance folder (Loops, Agents, Workers, repositories, and settings), the files that
|
|
237
|
+
* failed to load, and the runtime state of each.
|
|
238
|
+
*/
|
|
239
|
+
export declare class ConfigurationView extends ConfigurationView_base {
|
|
240
|
+
}
|
|
241
|
+
/** Returns the operator API view of a preflight check. */
|
|
242
|
+
export declare const checkView: (check: PreflightCheck) => PreflightCheckView;
|
|
243
|
+
declare const OperatorConfiguration_base: Context.ServiceClass<OperatorConfiguration, "@usine/orchestrator/OperatorConfiguration", {
|
|
244
|
+
/**
|
|
245
|
+
* Returns the instance's configuration view with runtime state. Contains no secrets: a
|
|
246
|
+
* Gateway's admin token appears only as its environment variable name.
|
|
247
|
+
*/
|
|
248
|
+
readonly view: (instance: LoadedInstance) => Effect.Effect<ConfigurationView, EnginePersistenceError>;
|
|
249
|
+
}>;
|
|
250
|
+
/**
|
|
251
|
+
* The operator's view of the parsed instance folder and its runtime state. Reads only memory and
|
|
252
|
+
* the runtime store, never the files.
|
|
253
|
+
*/
|
|
254
|
+
export declare class OperatorConfiguration extends OperatorConfiguration_base {
|
|
255
|
+
static readonly layer: Layer.Layer<OperatorConfiguration, never, LoopControl | PollingTriggers | RepositoryLabelProjectionReader | WorkerStatus>;
|
|
256
|
+
}
|
|
257
|
+
export {};
|
|
258
|
+
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/operator/configuration.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,eAAe,EAAgB,MAAM,oBAAoB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAK7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2CAA2C,CAAC;AAG5F,OAAO,EAAE,OAAO,EAAY,MAAM,EAAE,KAAK,EAAiB,M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