@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.
- package/LICENSE +661 -21
- package/README.md +174 -52
- package/dist/board/items.d.ts +22 -3
- package/dist/board/items.d.ts.map +1 -1
- package/dist/board/items.js +44 -4
- package/dist/board/items.js.map +1 -1
- package/dist/board/projection.d.ts +8 -1
- package/dist/board/projection.d.ts.map +1 -1
- package/dist/board/projection.js +63 -14
- package/dist/board/projection.js.map +1 -1
- package/dist/board/tasks.d.ts +15 -3
- package/dist/board/tasks.d.ts.map +1 -1
- package/dist/board/tasks.js +28 -9
- package/dist/board/tasks.js.map +1 -1
- package/dist/cloudflare.d.ts +32 -0
- package/dist/cloudflare.d.ts.map +1 -0
- package/dist/cloudflare.js +68 -0
- package/dist/cloudflare.js.map +1 -0
- 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 +141 -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 +10 -9
- package/dist/exe-dev.js.map +1 -1
- package/dist/http-client.d.ts +8 -0
- package/dist/http-client.d.ts.map +1 -0
- package/dist/http-client.js +8 -0
- package/dist/http-client.js.map +1 -0
- 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/lease-order.d.ts +60 -0
- package/dist/lease-order.d.ts.map +1 -0
- package/dist/lease-order.js +76 -0
- package/dist/lease-order.js.map +1 -0
- package/dist/local.d.ts +4 -18
- package/dist/local.d.ts.map +1 -1
- package/dist/local.js +9 -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 +76 -10
- package/dist/operator/attempt.d.ts.map +1 -1
- package/dist/operator/attempt.js +69 -11
- package/dist/operator/attempt.js.map +1 -1
- package/dist/operator/board.d.ts +48 -16
- package/dist/operator/board.d.ts.map +1 -1
- package/dist/operator/board.js +48 -17
- package/dist/operator/board.js.map +1 -1
- package/dist/operator/configuration.d.ts +314 -0
- package/dist/operator/configuration.d.ts.map +1 -0
- package/dist/operator/configuration.js +490 -0
- package/dist/operator/configuration.js.map +1 -0
- package/dist/operator/desk.d.ts +206 -0
- package/dist/operator/desk.d.ts.map +1 -0
- package/dist/operator/desk.js +525 -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 +135 -105
- package/dist/operator/http.d.ts.map +1 -1
- package/dist/operator/http.js +155 -30
- package/dist/operator/http.js.map +1 -1
- package/dist/operator/machines.d.ts +71 -0
- package/dist/operator/machines.d.ts.map +1 -0
- package/dist/operator/machines.js +103 -0
- package/dist/operator/machines.js.map +1 -0
- package/dist/operator/need.d.ts +58 -11
- package/dist/operator/need.d.ts.map +1 -1
- package/dist/operator/need.js +61 -9
- package/dist/operator/need.js.map +1 -1
- package/dist/operator/operator.d.ts +135 -29
- package/dist/operator/operator.d.ts.map +1 -1
- package/dist/operator/operator.js +370 -63
- 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 +56 -5
- package/dist/operator/projection.d.ts.map +1 -1
- package/dist/operator/projection.js +108 -9
- package/dist/operator/projection.js.map +1 -1
- package/dist/operator/run.d.ts +101 -6
- package/dist/operator/run.d.ts.map +1 -1
- package/dist/operator/run.js +100 -7
- package/dist/operator/run.js.map +1 -1
- package/dist/operator/statistics/cache.d.ts +7 -0
- package/dist/operator/statistics/cache.d.ts.map +1 -0
- package/dist/operator/statistics/cache.js +40 -0
- package/dist/operator/statistics/cache.js.map +1 -0
- package/dist/operator/statistics/runs.d.ts +36 -0
- package/dist/operator/statistics/runs.d.ts.map +1 -0
- package/dist/operator/statistics/runs.js +284 -0
- package/dist/operator/statistics/runs.js.map +1 -0
- package/dist/operator/statistics/statistics.d.ts +20 -0
- package/dist/operator/statistics/statistics.d.ts.map +1 -0
- package/dist/operator/statistics/statistics.js +138 -0
- package/dist/operator/statistics/statistics.js.map +1 -0
- package/dist/operator/statistics/tasks.d.ts +30 -0
- package/dist/operator/statistics/tasks.d.ts.map +1 -0
- package/dist/operator/statistics/tasks.js +244 -0
- package/dist/operator/statistics/tasks.js.map +1 -0
- package/dist/operator/statistics/view.d.ts +302 -0
- package/dist/operator/statistics/view.d.ts.map +1 -0
- package/dist/operator/statistics/view.js +243 -0
- package/dist/operator/statistics/view.js.map +1 -0
- package/dist/operator/statistics/window.d.ts +24 -0
- package/dist/operator/statistics/window.d.ts.map +1 -0
- package/dist/operator/statistics/window.js +47 -0
- package/dist/operator/statistics/window.js.map +1 -0
- package/dist/operator/task.d.ts +94 -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 +103 -0
- package/dist/operator/usage.d.ts.map +1 -0
- package/dist/operator/usage.js +234 -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/closed-item-asks.d.ts +8 -0
- package/dist/polling/closed-item-asks.d.ts.map +1 -0
- package/dist/polling/closed-item-asks.js +28 -0
- package/dist/polling/closed-item-asks.js.map +1 -0
- 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/open-pull-requests.d.ts +28 -0
- package/dist/polling/open-pull-requests.d.ts.map +1 -0
- package/dist/polling/open-pull-requests.js +131 -0
- package/dist/polling/open-pull-requests.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 +215 -52
- package/dist/polling/polling.js.map +1 -1
- package/dist/polling/repository-sync.d.ts +21 -14
- package/dist/polling/repository-sync.d.ts.map +1 -1
- package/dist/polling/repository-sync.js +35 -28
- 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 +45 -5
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +587 -44
- package/dist/scheduler.js.map +1 -1
- package/dist/ssh.d.ts +103 -0
- package/dist/ssh.d.ts.map +1 -0
- package/dist/ssh.js +144 -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 +13 -0
- package/dist/worker-engine.d.ts.map +1 -0
- package/dist/worker-engine.js +56 -0
- package/dist/worker-engine.js.map +1 -0
- package/dist/worker-status.d.ts +140 -0
- package/dist/worker-status.d.ts.map +1 -0
- package/dist/worker-status.js +76 -0
- package/dist/worker-status.js.map +1 -0
- package/package.json +47 -22
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { AgentPersona, AgentName, resolveParentEffort, resolveParentModel, } from "@usine/core/agent";
|
|
2
|
+
import { Effort, Harness, ModelId } from "@usine/core/agent/brain";
|
|
3
|
+
import { CycleLimit } from "@usine/core/cycle-budget";
|
|
4
|
+
import { ApprovalRequirement, LoopName, LoopPermissions } from "@usine/core/loop";
|
|
5
|
+
import { OperatorLogin } from "@usine/core/operator";
|
|
6
|
+
import { RepositoryName } from "@usine/core/repository";
|
|
7
|
+
import { StepName } from "@usine/core/step";
|
|
8
|
+
import { ContainerCpus, ContainerImage, ContainerLimits, ContainerMemoryMib, ContainerPids, GatewayAdminPort, GatewayDomain, GatewayLlmProvider, SshDestination, SshIdentityFile, SshPort, WorkerKind, WorkerName, WorkerRoot, } from "@usine/core/worker";
|
|
9
|
+
import { LaneItemState, LaneName } from "@usine/config/board";
|
|
10
|
+
import { RegistryTag } from "@usine/config/factory";
|
|
11
|
+
import { ConfigFileError, InstancePath } from "@usine/config/file";
|
|
12
|
+
import { canonicalLabelName, GitHubLabelName } from "@usine/config/label";
|
|
13
|
+
import { LoopPriority, PromptTemplate } from "@usine/config/loop";
|
|
14
|
+
import { matchesSelector } from "@usine/config/selector";
|
|
15
|
+
import { Cron, TimeZone } from "@usine/config/trigger";
|
|
16
|
+
import { LoopControl } from "@usine/engine/loop-control";
|
|
17
|
+
import { RepositoryLabelProjectionReader } from "@usine/engine/repository-label-projection";
|
|
18
|
+
import { WorkerCapability } from "@usine/executor";
|
|
19
|
+
import { Source } from "@usine/expression/expression-engine";
|
|
20
|
+
import { Context, DateTime, Effect, Layer, Match, Option, Schema } from "effect";
|
|
21
|
+
import { LabelPreflightFinding } from "../label-reconciler.js";
|
|
22
|
+
import { PollingTriggers } from "../polling-triggers.js";
|
|
23
|
+
import { WorkerStatus } from "../worker-status.js";
|
|
24
|
+
import { MachineView, machineView, ProvisionerView, ProvisioningPauseView, provisioningPauseView, provisionerView, } from "./machines.js";
|
|
25
|
+
/** A Loop's selector as written: the repositories and registry tags. */
|
|
26
|
+
export class LoopSelectorView extends Schema.Class("@usine/orchestrator/LoopSelectorView")({
|
|
27
|
+
repos: Schema.NullOr(Schema.Array(RepositoryName)),
|
|
28
|
+
tags: Schema.NullOr(Schema.Array(RegistryTag)),
|
|
29
|
+
}) {
|
|
30
|
+
}
|
|
31
|
+
/** A parsed Loop file with its runtime pause state. */
|
|
32
|
+
export class LoopFileView extends Schema.Class("@usine/orchestrator/LoopFileView")({
|
|
33
|
+
name: LoopName,
|
|
34
|
+
file: InstancePath,
|
|
35
|
+
/** The trigger's `on:` stream. */
|
|
36
|
+
stream: Schema.Literals(["issue", "pr", "schedule"]),
|
|
37
|
+
/** The trigger's `if:` expression as written. */
|
|
38
|
+
condition: Source,
|
|
39
|
+
/** A schedule trigger's cron and time zone, or null for the other streams. */
|
|
40
|
+
cron: Schema.NullOr(Cron),
|
|
41
|
+
timeZone: Schema.NullOr(TimeZone),
|
|
42
|
+
/** Null if the file has no selector, so the Loop applies to every registered repository. */
|
|
43
|
+
selector: Schema.NullOr(LoopSelectorView),
|
|
44
|
+
/** The registered repositories the selector selects, in `usine.yaml` order. */
|
|
45
|
+
repositories: Schema.Array(RepositoryName),
|
|
46
|
+
approval: ApprovalRequirement,
|
|
47
|
+
maxCycles: CycleLimit,
|
|
48
|
+
permissions: LoopPermissions,
|
|
49
|
+
/** The Loop's queue priority, or null if its Runs wait in lane order. */
|
|
50
|
+
priority: Schema.NullOr(LoopPriority),
|
|
51
|
+
step: StepName,
|
|
52
|
+
agent: AgentName,
|
|
53
|
+
/** The Markdown prompt template, with its `{{ }}` expressions as written. */
|
|
54
|
+
prompt: PromptTemplate,
|
|
55
|
+
paused: Schema.Boolean,
|
|
56
|
+
/** Labels the trigger compares against that `usine.yaml` doesn't declare in `labels`. */
|
|
57
|
+
undeclaredLabels: Schema.Array(GitHubLabelName),
|
|
58
|
+
}) {
|
|
59
|
+
}
|
|
60
|
+
/** A Loop file that failed to load and opens no Runs, with the failed stage and reason. */
|
|
61
|
+
export class QuarantinedLoopView extends Schema.Class("@usine/orchestrator/QuarantinedLoopView")({
|
|
62
|
+
/** The file name without its folder and `.md` extension. */
|
|
63
|
+
name: Schema.NonEmptyString,
|
|
64
|
+
file: InstancePath,
|
|
65
|
+
error: ConfigFileError,
|
|
66
|
+
}) {
|
|
67
|
+
}
|
|
68
|
+
/** A parsed rostered Agent file with the Loops that use it. */
|
|
69
|
+
export class AgentFileView extends Schema.Class("@usine/orchestrator/AgentFileView")({
|
|
70
|
+
name: AgentName,
|
|
71
|
+
file: InstancePath,
|
|
72
|
+
harness: Harness,
|
|
73
|
+
model: ModelId,
|
|
74
|
+
effort: Effort,
|
|
75
|
+
/** The file's own parent model and effort, or null if it sets none. */
|
|
76
|
+
parentModel: Schema.NullOr(ModelId),
|
|
77
|
+
parentEffort: Schema.NullOr(Effort),
|
|
78
|
+
/** The file's parent model, else `settings.parent_model`. If null, Pi chooses. */
|
|
79
|
+
resolvedParentModel: Schema.NullOr(ModelId),
|
|
80
|
+
/** The file's parent effort, else `settings.parent_effort`, else `effort`. */
|
|
81
|
+
resolvedParentEffort: Effort,
|
|
82
|
+
persona: AgentPersona,
|
|
83
|
+
/** The loaded Loops that use this Agent. */
|
|
84
|
+
loops: Schema.Array(LoopName),
|
|
85
|
+
}) {
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* An Agent file that failed to load and is left out of the roster, with the failed stage and
|
|
89
|
+
* reason.
|
|
90
|
+
*/
|
|
91
|
+
export class InvalidAgentView extends Schema.Class("@usine/orchestrator/InvalidAgentView")({
|
|
92
|
+
/** The file name without its folder and `.md` extension. */
|
|
93
|
+
name: Schema.NonEmptyString,
|
|
94
|
+
file: InstancePath,
|
|
95
|
+
error: ConfigFileError,
|
|
96
|
+
}) {
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The Gateway in front of an SSH Worker. Includes only the name of the environment variable with
|
|
100
|
+
* its admin token.
|
|
101
|
+
*/
|
|
102
|
+
export class GatewayView extends Schema.Class("@usine/orchestrator/GatewayView")({
|
|
103
|
+
domain: GatewayDomain,
|
|
104
|
+
destination: SshDestination,
|
|
105
|
+
adminPort: GatewayAdminPort,
|
|
106
|
+
adminTokenEnv: Schema.NonEmptyString,
|
|
107
|
+
llmProviders: Schema.Array(GatewayLlmProvider),
|
|
108
|
+
}) {
|
|
109
|
+
}
|
|
110
|
+
/** The current slot usage of a Worker. */
|
|
111
|
+
export class WorkerSlotsView extends Schema.Class("@usine/orchestrator/WorkerSlotsView")({
|
|
112
|
+
/** The number of slots for Attempts: `max_concurrent_attempts` once a reload applied it. */
|
|
113
|
+
capacity: Schema.Int,
|
|
114
|
+
leased: Schema.Int,
|
|
115
|
+
}) {
|
|
116
|
+
}
|
|
117
|
+
/** A passed preflight check, at an ISO instant. */
|
|
118
|
+
export class PassedCheckView extends Schema.TaggedClass("@usine/orchestrator/PassedCheckView")("Passed", { checkedAt: Schema.String }) {
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A passed check of the Worker's own prerequisites, at an ISO instant, that found it running
|
|
122
|
+
* Attempts without a capability that keeps them apart, such as an SSH Worker without Docker.
|
|
123
|
+
*/
|
|
124
|
+
export class DegradedCheckView extends Schema.TaggedClass("@usine/orchestrator/DegradedCheckView")("Degraded", { checkedAt: Schema.String, message: Schema.String }) {
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A check that the preflight left for later, at an ISO instant, such as a provisioned Worker's
|
|
128
|
+
* harness checks, which run on its first machine each day.
|
|
129
|
+
*/
|
|
130
|
+
export class DeferredCheckView extends Schema.TaggedClass("@usine/orchestrator/DeferredCheckView")("Deferred", { checkedAt: Schema.String, message: Schema.String }) {
|
|
131
|
+
}
|
|
132
|
+
/** A preflight check that found a missing prerequisite or couldn't run, at an ISO instant. */
|
|
133
|
+
export class FailedCheckView extends Schema.TaggedClass("@usine/orchestrator/FailedCheckView")("Failed", {
|
|
134
|
+
checkedAt: Schema.String,
|
|
135
|
+
/** Null when the check itself failed, such as a timed-out probe. */
|
|
136
|
+
capability: Schema.NullOr(WorkerCapability),
|
|
137
|
+
message: Schema.String,
|
|
138
|
+
}) {
|
|
139
|
+
}
|
|
140
|
+
export const PreflightCheckView = Schema.Union([
|
|
141
|
+
PassedCheckView,
|
|
142
|
+
DegradedCheckView,
|
|
143
|
+
DeferredCheckView,
|
|
144
|
+
FailedCheckView,
|
|
145
|
+
]);
|
|
146
|
+
/** The last preflight of one harness on a Worker. */
|
|
147
|
+
export class HarnessPreflightView extends Schema.Class("@usine/orchestrator/HarnessPreflightView")({
|
|
148
|
+
harness: Harness,
|
|
149
|
+
check: PreflightCheckView,
|
|
150
|
+
}) {
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The container of each Attempt on an SSH Worker with Docker, from `usine.yaml`. Each limit is
|
|
154
|
+
* null if `usine.yaml` leaves it unset, so preflight derives it from the machine.
|
|
155
|
+
*/
|
|
156
|
+
export class ContainerView extends Schema.Class("@usine/orchestrator/ContainerView")({
|
|
157
|
+
/** Null for the default image of this usine release. */
|
|
158
|
+
image: Schema.NullOr(ContainerImage),
|
|
159
|
+
cpus: Schema.NullOr(ContainerCpus),
|
|
160
|
+
memoryMib: Schema.NullOr(ContainerMemoryMib),
|
|
161
|
+
pids: Schema.NullOr(ContainerPids),
|
|
162
|
+
}) {
|
|
163
|
+
}
|
|
164
|
+
/** A Worker as declared in `usine.yaml`, with its slot usage and last preflight. */
|
|
165
|
+
export class WorkerConfigurationView extends Schema.Class("@usine/orchestrator/WorkerConfigurationView")({
|
|
166
|
+
name: WorkerName,
|
|
167
|
+
kind: WorkerKind,
|
|
168
|
+
maxConcurrentAttempts: Schema.Int,
|
|
169
|
+
/** An SSH Worker's connection and root, or null for the other kinds. */
|
|
170
|
+
destination: Schema.NullOr(SshDestination),
|
|
171
|
+
port: Schema.NullOr(SshPort),
|
|
172
|
+
identityFile: Schema.NullOr(SshIdentityFile),
|
|
173
|
+
root: Schema.NullOr(WorkerRoot),
|
|
174
|
+
gateway: Schema.NullOr(GatewayView),
|
|
175
|
+
/** An SSH Worker's Attempt container, used if its machine has Docker; null for the other kinds. */
|
|
176
|
+
container: Schema.NullOr(ContainerView),
|
|
177
|
+
/**
|
|
178
|
+
* The limits of each Attempt container from the last passed preflight that checked the
|
|
179
|
+
* Worker's machine: the ones `usine.yaml` sets and the ones derived from the machine. Null
|
|
180
|
+
* before one, for a machine without Docker, and for the other kinds.
|
|
181
|
+
*/
|
|
182
|
+
containerLimits: Schema.NullOr(ContainerLimits).pipe(Schema.withConstructorDefault(Effect.succeed(null))),
|
|
183
|
+
/** A provisioned SSH Worker's provisioner, which creates one machine per Attempt, or null. */
|
|
184
|
+
provisioner: Schema.NullOr(ProvisionerView).pipe(Schema.withConstructorDefault(Effect.succeed(null))),
|
|
185
|
+
/** A provisioned Worker's machines in flight, oldest first. */
|
|
186
|
+
machines: Schema.Array(MachineView).pipe(Schema.withConstructorDefault(Effect.succeed([]))),
|
|
187
|
+
/** A provisioned Worker's last failed machine creation, or null after a success. */
|
|
188
|
+
provisioning: Schema.NullOr(ProvisioningPauseView).pipe(Schema.withConstructorDefault(Effect.succeed(null))),
|
|
189
|
+
/** Null while the scheduler runs no Attempts, as in setup mode. */
|
|
190
|
+
slots: Schema.NullOr(WorkerSlotsView),
|
|
191
|
+
/**
|
|
192
|
+
* The Worker's own prerequisites: machine, Git, memory, Gateway, credentials, and Docker. Null
|
|
193
|
+
* before any preflight. Degraded for an SSH Worker without Docker.
|
|
194
|
+
*/
|
|
195
|
+
prerequisites: Schema.NullOr(PreflightCheckView),
|
|
196
|
+
/** In harness name order; empty before any harness check. */
|
|
197
|
+
harnesses: Schema.Array(HarnessPreflightView),
|
|
198
|
+
}) {
|
|
199
|
+
}
|
|
200
|
+
/** A Worker removed by a reload that still runs Attempts. It's removed when the last one ends. */
|
|
201
|
+
export class RemovedWorkerView extends Schema.Class("@usine/orchestrator/RemovedWorkerView")({
|
|
202
|
+
name: WorkerName,
|
|
203
|
+
running: Schema.Int,
|
|
204
|
+
}) {
|
|
205
|
+
}
|
|
206
|
+
/** A GitHub label in one repository, as of the last label poll. */
|
|
207
|
+
export class LabelStateView extends Schema.Class("@usine/orchestrator/LabelStateView")({
|
|
208
|
+
name: GitHubLabelName,
|
|
209
|
+
/** Null until polling has read the repository's labels. */
|
|
210
|
+
onGitHub: Schema.NullOr(Schema.Boolean),
|
|
211
|
+
/** The repository's label color, else the color declared in `labels`, as six hex digits. */
|
|
212
|
+
color: Schema.NullOr(Schema.String),
|
|
213
|
+
description: Schema.NullOr(Schema.String),
|
|
214
|
+
/** Whether `labels` in `usine.yaml` declares the label, so usine creates it if missing. */
|
|
215
|
+
declared: Schema.Boolean,
|
|
216
|
+
/** The reason usine couldn't create or confirm the label at the last poll. */
|
|
217
|
+
failure: Schema.NullOr(LabelPreflightFinding),
|
|
218
|
+
}) {
|
|
219
|
+
}
|
|
220
|
+
/** A lane source that routes Items by label. */
|
|
221
|
+
export class LabelLaneSourceView extends Schema.TaggedClass("@usine/orchestrator/LabelLaneSourceView")("Label", { label: LabelStateView }) {
|
|
222
|
+
}
|
|
223
|
+
/** A lane source that routes Items by issue or pull request state. */
|
|
224
|
+
export class StateLaneSourceView extends Schema.TaggedClass("@usine/orchestrator/StateLaneSourceView")("State", { state: LaneItemState }) {
|
|
225
|
+
}
|
|
226
|
+
export const LaneSourceView = Schema.Union([LabelLaneSourceView, StateLaneSourceView]);
|
|
227
|
+
/** One lane declared in `repos[].lanes`, with its sources in file order. */
|
|
228
|
+
export class LaneConfigurationView extends Schema.Class("@usine/orchestrator/LaneConfigurationView")({
|
|
229
|
+
name: LaneName,
|
|
230
|
+
sources: Schema.Array(LaneSourceView),
|
|
231
|
+
}) {
|
|
232
|
+
}
|
|
233
|
+
/** A registered repository with its lanes in Board order, declared labels, and Loops. */
|
|
234
|
+
export class RepositoryConfigurationView extends Schema.Class("@usine/orchestrator/RepositoryConfigurationView")({
|
|
235
|
+
name: RepositoryName,
|
|
236
|
+
tags: Schema.Array(RegistryTag),
|
|
237
|
+
/** Empty if `usine.yaml` declares no lanes, so the Board proposes lanes from the labels. */
|
|
238
|
+
lanes: Schema.Array(LaneConfigurationView),
|
|
239
|
+
/** The labels declared in `usine.yaml`, as this repository has them. */
|
|
240
|
+
declaredLabels: Schema.Array(LabelStateView),
|
|
241
|
+
/** The loaded Loops whose selector selects this repository. */
|
|
242
|
+
loops: Schema.Array(LoopName),
|
|
243
|
+
}) {
|
|
244
|
+
}
|
|
245
|
+
/** The `settings`, `operator`, webhooks mode, and `tracing` of `usine.yaml`, with defaults applied. */
|
|
246
|
+
export class SettingsView extends Schema.Class("@usine/orchestrator/SettingsView")({
|
|
247
|
+
pollInterval: Schema.Int,
|
|
248
|
+
maxChildren: Schema.Int,
|
|
249
|
+
maxAttemptMinutes: Schema.NullOr(Schema.Int),
|
|
250
|
+
maxAttemptTokens: Schema.NullOr(Schema.Int),
|
|
251
|
+
parentModel: Schema.NullOr(ModelId),
|
|
252
|
+
parentEffort: Schema.NullOr(Effort),
|
|
253
|
+
operator: Schema.NullOr(OperatorLogin),
|
|
254
|
+
webhooks: Schema.Literals(["off", "deliveries", "endpoint"]),
|
|
255
|
+
/** The public URL for `endpoint` webhooks, or null for the other modes. */
|
|
256
|
+
webhooksPublicUrl: Schema.NullOr(Schema.String),
|
|
257
|
+
/** The span export settings, or null if `usine.yaml` has no `tracing` block. */
|
|
258
|
+
tracing: Schema.NullOr(Schema.Struct({ otlpUrl: Schema.String, serviceName: Schema.String })),
|
|
259
|
+
}) {
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* The parsed instance folder (Loops, Agents, Workers, repositories, and settings), the files that
|
|
263
|
+
* failed to load, and the runtime state of each.
|
|
264
|
+
*/
|
|
265
|
+
export class ConfigurationView extends Schema.Class("@usine/orchestrator/ConfigurationView")({
|
|
266
|
+
loops: Schema.Array(LoopFileView),
|
|
267
|
+
quarantinedLoops: Schema.Array(QuarantinedLoopView),
|
|
268
|
+
agents: Schema.Array(AgentFileView),
|
|
269
|
+
invalidAgents: Schema.Array(InvalidAgentView),
|
|
270
|
+
workers: Schema.Array(WorkerConfigurationView),
|
|
271
|
+
removedWorkers: Schema.Array(RemovedWorkerView),
|
|
272
|
+
repositories: Schema.Array(RepositoryConfigurationView),
|
|
273
|
+
settings: SettingsView,
|
|
274
|
+
}) {
|
|
275
|
+
}
|
|
276
|
+
const fileStem = (file) => {
|
|
277
|
+
const name = file.slice(file.lastIndexOf("/") + 1).replace(/\.md$/u, "");
|
|
278
|
+
return name === "" ? file : name;
|
|
279
|
+
};
|
|
280
|
+
/** Returns the operator API view of a preflight check. */
|
|
281
|
+
export const checkView = (check) => Match.valueTags(check, {
|
|
282
|
+
Passed: ({ checkedAt }) => new PassedCheckView({ checkedAt: DateTime.formatIso(checkedAt) }),
|
|
283
|
+
Degraded: ({ checkedAt, message }) => new DegradedCheckView({ checkedAt: DateTime.formatIso(checkedAt), message }),
|
|
284
|
+
Deferred: ({ checkedAt, message }) => new DeferredCheckView({ checkedAt: DateTime.formatIso(checkedAt), message }),
|
|
285
|
+
Failed: ({ checkedAt, capability, message }) => new FailedCheckView({
|
|
286
|
+
checkedAt: DateTime.formatIso(checkedAt),
|
|
287
|
+
capability: Option.getOrNull(capability),
|
|
288
|
+
message,
|
|
289
|
+
}),
|
|
290
|
+
});
|
|
291
|
+
const workerConnection = (worker) => worker.kind === "ssh"
|
|
292
|
+
? {
|
|
293
|
+
destination: Option.getOrNull(worker.destination),
|
|
294
|
+
provisioner: provisionerView(worker),
|
|
295
|
+
port: Option.getOrNull(worker.port),
|
|
296
|
+
identityFile: Option.getOrNull(worker.identityFile),
|
|
297
|
+
root: worker.root,
|
|
298
|
+
gateway: Option.match(worker.gateway, {
|
|
299
|
+
onNone: () => null,
|
|
300
|
+
onSome: (gateway) => new GatewayView({
|
|
301
|
+
domain: gateway.domain,
|
|
302
|
+
destination: gateway.destination,
|
|
303
|
+
adminPort: gateway.adminPort,
|
|
304
|
+
adminTokenEnv: gateway.adminTokenEnv,
|
|
305
|
+
llmProviders: gateway.llmProviders,
|
|
306
|
+
}),
|
|
307
|
+
}),
|
|
308
|
+
container: new ContainerView({
|
|
309
|
+
image: Option.getOrNull(worker.container.image),
|
|
310
|
+
cpus: Option.getOrNull(worker.container.cpus),
|
|
311
|
+
memoryMib: Option.getOrNull(worker.container.memoryMib),
|
|
312
|
+
pids: Option.getOrNull(worker.container.pids),
|
|
313
|
+
}),
|
|
314
|
+
}
|
|
315
|
+
: {
|
|
316
|
+
destination: null,
|
|
317
|
+
provisioner: null,
|
|
318
|
+
port: null,
|
|
319
|
+
identityFile: null,
|
|
320
|
+
root: null,
|
|
321
|
+
gateway: null,
|
|
322
|
+
container: null,
|
|
323
|
+
};
|
|
324
|
+
const makeOperatorConfiguration = Effect.gen(function* () {
|
|
325
|
+
const controls = yield* LoopControl;
|
|
326
|
+
const repositoryLabels = yield* RepositoryLabelProjectionReader;
|
|
327
|
+
const polling = yield* PollingTriggers;
|
|
328
|
+
const workerStatus = yield* WorkerStatus;
|
|
329
|
+
const repositoryView = Effect.fn("OperatorConfiguration.repository")(function* (instance, repository, findings) {
|
|
330
|
+
const projection = yield* repositoryLabels.get(repository.name);
|
|
331
|
+
const catalog = Option.map(projection, ({ labels }) => new Map(labels.map((label) => [canonicalLabelName(label.name), label])));
|
|
332
|
+
const declared = new Map(instance.config.labels.map((label) => [canonicalLabelName(label.name), label]));
|
|
333
|
+
const labelState = (name) => {
|
|
334
|
+
const key = canonicalLabelName(name);
|
|
335
|
+
const found = Option.flatMap(catalog, (labels) => Option.fromNullishOr(labels.get(key)));
|
|
336
|
+
const authored = declared.get(key);
|
|
337
|
+
return new LabelStateView({
|
|
338
|
+
name,
|
|
339
|
+
onGitHub: Option.match(catalog, { onNone: () => null, onSome: () => Option.isSome(found) }),
|
|
340
|
+
color: Option.getOrNull(Option.orElse(Option.flatMap(found, ({ color }) => color), () => Option.flatMap(Option.fromNullishOr(authored), ({ color }) => color))),
|
|
341
|
+
description: Option.getOrNull(Option.orElse(Option.flatMap(found, ({ description }) => description), () => Option.flatMap(Option.fromNullishOr(authored), ({ description }) => description))),
|
|
342
|
+
declared: authored !== undefined,
|
|
343
|
+
failure: findings.find((finding) => finding.repository === repository.name && canonicalLabelName(finding.label) === key) ?? null,
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
return new RepositoryConfigurationView({
|
|
347
|
+
name: repository.name,
|
|
348
|
+
tags: repository.tags,
|
|
349
|
+
lanes: repository.lanes.map((lane) => new LaneConfigurationView({
|
|
350
|
+
name: lane.name,
|
|
351
|
+
sources: lane.sources.map((source) => "label" in source
|
|
352
|
+
? new LabelLaneSourceView({ label: labelState(source.label) })
|
|
353
|
+
: new StateLaneSourceView({ state: source.state })),
|
|
354
|
+
})),
|
|
355
|
+
declaredLabels: instance.config.labels.map(({ name }) => labelState(name)),
|
|
356
|
+
loops: instance.loops
|
|
357
|
+
.filter((loop) => matchesSelector(loop.selector, repository))
|
|
358
|
+
.map(({ name }) => name),
|
|
359
|
+
});
|
|
360
|
+
});
|
|
361
|
+
const view = Effect.fn("OperatorConfiguration.view")(function* (instance) {
|
|
362
|
+
const { config } = instance;
|
|
363
|
+
const [states, latestPoll, slots, preflights, inFlight, pauses] = yield* Effect.all([
|
|
364
|
+
controls.states,
|
|
365
|
+
polling.latest,
|
|
366
|
+
workerStatus.slots,
|
|
367
|
+
workerStatus.preflights,
|
|
368
|
+
workerStatus.machines,
|
|
369
|
+
workerStatus.provisioning,
|
|
370
|
+
], { concurrency: "unbounded" });
|
|
371
|
+
const paused = new Set(states.filter((state) => state.paused).map((state) => state.loop));
|
|
372
|
+
const findings = Option.match(latestPoll, {
|
|
373
|
+
onNone: () => [],
|
|
374
|
+
onSome: ({ preflightFindings }) => preflightFindings,
|
|
375
|
+
});
|
|
376
|
+
const repositories = yield* Effect.forEach(config.repos, (repository) => repositoryView(instance, repository, findings), { concurrency: 4 });
|
|
377
|
+
const undeclared = (loop) => instance.warnings.flatMap((warning) => warning._tag === "UndeclaredTriggerLabelWarning" && warning.loop === loop
|
|
378
|
+
? [warning.label]
|
|
379
|
+
: []);
|
|
380
|
+
const loops = instance.loops.map((loop) => new LoopFileView({
|
|
381
|
+
name: loop.name,
|
|
382
|
+
file: InstancePath.make(`loops/${loop.name}.md`),
|
|
383
|
+
stream: loop.trigger.on,
|
|
384
|
+
condition: loop.trigger.if,
|
|
385
|
+
cron: loop.trigger.on === "schedule" ? loop.trigger.cron : null,
|
|
386
|
+
timeZone: loop.trigger.on === "schedule" ? loop.trigger.tz : null,
|
|
387
|
+
selector: Option.match(loop.selector, {
|
|
388
|
+
onNone: () => null,
|
|
389
|
+
onSome: ({ repos, tags }) => new LoopSelectorView({
|
|
390
|
+
repos: Option.getOrNull(repos),
|
|
391
|
+
tags: Option.getOrNull(tags),
|
|
392
|
+
}),
|
|
393
|
+
}),
|
|
394
|
+
repositories: config.repos
|
|
395
|
+
.filter((repository) => matchesSelector(loop.selector, repository))
|
|
396
|
+
.map(({ name }) => name),
|
|
397
|
+
approval: loop.approval,
|
|
398
|
+
maxCycles: loop.maxCycles,
|
|
399
|
+
permissions: loop.permissions,
|
|
400
|
+
priority: Option.getOrNull(loop.priority),
|
|
401
|
+
step: loop.step,
|
|
402
|
+
agent: loop.agent,
|
|
403
|
+
prompt: loop.body,
|
|
404
|
+
paused: paused.has(loop.name),
|
|
405
|
+
undeclaredLabels: undeclared(loop.name),
|
|
406
|
+
}));
|
|
407
|
+
const agents = instance.agents.map((file) => new AgentFileView({
|
|
408
|
+
name: file.name,
|
|
409
|
+
file: InstancePath.make(`agents/${file.name}.md`),
|
|
410
|
+
harness: file.harness,
|
|
411
|
+
model: file.model,
|
|
412
|
+
effort: file.effort,
|
|
413
|
+
parentModel: Option.getOrNull(file.parentModel),
|
|
414
|
+
parentEffort: Option.getOrNull(file.parentEffort),
|
|
415
|
+
resolvedParentModel: Option.getOrNull(resolveParentModel(file.agent, config.settings.parentModel)),
|
|
416
|
+
resolvedParentEffort: resolveParentEffort(file.agent, config.settings.parentEffort),
|
|
417
|
+
persona: file.persona,
|
|
418
|
+
loops: instance.loops.filter(({ agent }) => agent === file.name).map(({ name }) => name),
|
|
419
|
+
}));
|
|
420
|
+
const slotsBy = new Map(slots.map((slot) => [slot.worker, slot]));
|
|
421
|
+
const preflightBy = new Map(preflights.map((preflight) => [preflight.worker, preflight]));
|
|
422
|
+
const declaredWorkers = new Set(config.workers.map(({ name }) => name));
|
|
423
|
+
const workers = config.workers.map((worker) => {
|
|
424
|
+
const slot = slotsBy.get(worker.name);
|
|
425
|
+
const preflight = preflightBy.get(worker.name);
|
|
426
|
+
return new WorkerConfigurationView({
|
|
427
|
+
name: worker.name,
|
|
428
|
+
kind: worker.kind,
|
|
429
|
+
maxConcurrentAttempts: worker.maxConcurrentAttempts,
|
|
430
|
+
...workerConnection(worker),
|
|
431
|
+
slots: slot === undefined
|
|
432
|
+
? null
|
|
433
|
+
: new WorkerSlotsView({ capacity: slot.capacity, leased: slot.leased }),
|
|
434
|
+
prerequisites: preflight === undefined
|
|
435
|
+
? null
|
|
436
|
+
: Option.getOrNull(Option.map(preflight.prerequisites, checkView)),
|
|
437
|
+
harnesses: (preflight?.harnesses ?? []).map(({ harness, check }) => new HarnessPreflightView({ harness, check: checkView(check) })),
|
|
438
|
+
containerLimits: preflight === undefined ? null : Option.getOrNull(preflight.containerLimits),
|
|
439
|
+
machines: inFlight.filter((machine) => machine.worker === worker.name).map(machineView),
|
|
440
|
+
provisioning: Option.getOrNull(Option.map(Option.fromNullishOr(pauses.find((pause) => pause.worker === worker.name)), provisioningPauseView)),
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
const { settings, webhooks, tracing } = config;
|
|
444
|
+
const configuration = new ConfigurationView({
|
|
445
|
+
loops,
|
|
446
|
+
quarantinedLoops: instance.quarantinedLoops.map(({ file, error }) => new QuarantinedLoopView({ name: fileStem(file), file, error })),
|
|
447
|
+
agents,
|
|
448
|
+
invalidAgents: instance.invalidAgents.map(({ file, error }) => new InvalidAgentView({ name: fileStem(file), file, error })),
|
|
449
|
+
workers,
|
|
450
|
+
removedWorkers: slots
|
|
451
|
+
.filter(({ worker, leased }) => !declaredWorkers.has(worker) && leased > 0)
|
|
452
|
+
.map(({ worker, leased }) => new RemovedWorkerView({ name: worker, running: leased })),
|
|
453
|
+
repositories,
|
|
454
|
+
settings: new SettingsView({
|
|
455
|
+
pollInterval: settings.pollInterval,
|
|
456
|
+
maxChildren: settings.maxChildren,
|
|
457
|
+
maxAttemptMinutes: Option.getOrNull(settings.maxAttemptMinutes),
|
|
458
|
+
maxAttemptTokens: Option.getOrNull(settings.maxAttemptTokens),
|
|
459
|
+
parentModel: Option.getOrNull(settings.parentModel),
|
|
460
|
+
parentEffort: Option.getOrNull(settings.parentEffort),
|
|
461
|
+
operator: Option.getOrNull(config.operator),
|
|
462
|
+
webhooks: webhooks.mode,
|
|
463
|
+
webhooksPublicUrl: webhooks.mode === "endpoint" ? webhooks.publicUrl.href : null,
|
|
464
|
+
tracing: Option.match(tracing, {
|
|
465
|
+
onNone: () => null,
|
|
466
|
+
onSome: ({ otlpUrl, serviceName }) => ({ otlpUrl: otlpUrl.href, serviceName }),
|
|
467
|
+
}),
|
|
468
|
+
}),
|
|
469
|
+
});
|
|
470
|
+
yield* Effect.logDebug("Read the configuration view", {
|
|
471
|
+
loops: loops.length,
|
|
472
|
+
quarantinedLoops: configuration.quarantinedLoops.length,
|
|
473
|
+
agents: agents.length,
|
|
474
|
+
invalidAgents: configuration.invalidAgents.length,
|
|
475
|
+
workers: workers.length,
|
|
476
|
+
runningWorkers: slots.length,
|
|
477
|
+
repositories: repositories.length,
|
|
478
|
+
});
|
|
479
|
+
return configuration;
|
|
480
|
+
});
|
|
481
|
+
return { view };
|
|
482
|
+
});
|
|
483
|
+
/**
|
|
484
|
+
* The operator's view of the parsed instance folder and its runtime state. Reads only memory and
|
|
485
|
+
* the runtime store, never the files.
|
|
486
|
+
*/
|
|
487
|
+
export class OperatorConfiguration extends Context.Service()("@usine/orchestrator/OperatorConfiguration") {
|
|
488
|
+
static layer = Layer.effect(OperatorConfiguration, makeOperatorConfiguration);
|
|
489
|
+
}
|
|
490
|
+
//# sourceMappingURL=configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/operator/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,OAAO,EACP,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAiC,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OA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