@usine/config 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 (74) hide show
  1. package/LICENSE +661 -21
  2. package/README.md +32 -18
  3. package/dist/agent.d.ts +2 -3
  4. package/dist/agent.d.ts.map +1 -1
  5. package/dist/agent.js +2 -3
  6. package/dist/agent.js.map +1 -1
  7. package/dist/board.d.ts +11 -6
  8. package/dist/board.d.ts.map +1 -1
  9. package/dist/board.js +11 -6
  10. package/dist/board.js.map +1 -1
  11. package/dist/checks.d.ts +3 -0
  12. package/dist/checks.d.ts.map +1 -1
  13. package/dist/checks.js +3 -0
  14. package/dist/checks.js.map +1 -1
  15. package/dist/factory.d.ts +258 -22
  16. package/dist/factory.d.ts.map +1 -1
  17. package/dist/factory.js +270 -30
  18. package/dist/factory.js.map +1 -1
  19. package/dist/file.d.ts +3 -3
  20. package/dist/file.d.ts.map +1 -1
  21. package/dist/file.js +3 -3
  22. package/dist/file.js.map +1 -1
  23. package/dist/frontmatter.d.ts +1 -1
  24. package/dist/frontmatter.d.ts.map +1 -1
  25. package/dist/frontmatter.js +1 -1
  26. package/dist/frontmatter.js.map +1 -1
  27. package/dist/instance/diagnostics.d.ts +1 -1
  28. package/dist/instance/diagnostics.d.ts.map +1 -1
  29. package/dist/instance/diagnostics.js +1 -1
  30. package/dist/instance/diagnostics.js.map +1 -1
  31. package/dist/instance/instance.d.ts +1 -1
  32. package/dist/instance/instance.d.ts.map +1 -1
  33. package/dist/instance/instance.js +2 -2
  34. package/dist/instance/instance.js.map +1 -1
  35. package/dist/instance/references.d.ts +5 -6
  36. package/dist/instance/references.d.ts.map +1 -1
  37. package/dist/instance/references.js +9 -9
  38. package/dist/instance/references.js.map +1 -1
  39. package/dist/instance-folder.d.ts +1 -1
  40. package/dist/instance-folder.d.ts.map +1 -1
  41. package/dist/instance-folder.js +13 -1
  42. package/dist/instance-folder.js.map +1 -1
  43. package/dist/label.d.ts +5 -5
  44. package/dist/label.d.ts.map +1 -1
  45. package/dist/label.js +5 -5
  46. package/dist/label.js.map +1 -1
  47. package/dist/loop.d.ts +12 -3
  48. package/dist/loop.d.ts.map +1 -1
  49. package/dist/loop.js +14 -6
  50. package/dist/loop.js.map +1 -1
  51. package/dist/parser.d.ts +6 -6
  52. package/dist/parser.d.ts.map +1 -1
  53. package/dist/parser.js +30 -11
  54. package/dist/parser.js.map +1 -1
  55. package/dist/payload-slices.d.ts +4 -7
  56. package/dist/payload-slices.d.ts.map +1 -1
  57. package/dist/payload-slices.js +30 -25
  58. package/dist/payload-slices.js.map +1 -1
  59. package/dist/selector.d.ts +6 -3
  60. package/dist/selector.d.ts.map +1 -1
  61. package/dist/selector.js +10 -6
  62. package/dist/selector.js.map +1 -1
  63. package/dist/trigger.d.ts +4 -7
  64. package/dist/trigger.d.ts.map +1 -1
  65. package/dist/trigger.js +6 -9
  66. package/dist/trigger.js.map +1 -1
  67. package/dist/yaml/document.d.ts +2 -2
  68. package/dist/yaml/document.js +3 -3
  69. package/dist/yaml/document.js.map +1 -1
  70. package/dist/yaml/writer.d.ts +4 -4
  71. package/dist/yaml/writer.d.ts.map +1 -1
  72. package/dist/yaml/writer.js +5 -6
  73. package/dist/yaml/writer.js.map +1 -1
  74. package/package.json +12 -11
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAIA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAsB,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/D,0EAA0E;AAC1E,eAAO,MAAM,WAAW,4CAEvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD,oEAAoE;AACpE,eAAO,MAAM,aAAa,8CAIW,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG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essionBudget } from "@usine/core/agent/session";
3
+ import { OperatorLogin } from "@usine/core/operator";
3
4
  import { RepositoryName } from "@usine/core/repository";
4
- import { WorkerName, WorkerKind } from "@usine/core/worker";
5
- import { Effect, Schema } from "effect";
6
- import { nonBlankString } from "./checks.js";
5
+ import { BoatSize, CloudflareImageName, CloudflareInstanceType, CloudflareLlmProvider, ContainerCpus, ContainerImage, ContainerMemoryMib, ContainerPids, GatewayAdminPort, GatewayDomain, GatewayLlmProvider, HetznerImage, HetznerLabels, HetznerLocation, HetznerResourceName, HetznerServerType, SshDestination, SshIdentityFile, SshPort, SshUser, WorkerName, WorkerRoot, } from "@usine/core/worker";
6
+ import { Effect, Option, Schema } from "effect";
7
+ import { nonBlankString, uniqueRepositoryNames } from "./checks.js";
7
8
  import { LaneSource, Lane } from "./board.js";
8
9
  import { canonicalLabelName, DeclaredLabel } from "./label.js";
9
- /** A factory-defined repository grouping that Loops can select by tag. */
10
+ /** A repository tag that Loop selectors match. */
10
11
  export const RegistryTag = nonBlankString("Expected a non-blank registry tag").pipe(Schema.brand("RegistryTag"));
11
- /** GitHub login identifying the human operator for this factory. */
12
- export const OperatorLogin = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$/u, {
13
- message: "Expected a GitHub login",
14
- })).pipe(Schema.brand("OperatorLogin"));
15
12
  const PositiveInt = Schema.Int.check(Schema.isGreaterThanOrEqualTo(1));
16
13
  const uniqueNames = Schema.makeFilter((values) => new Set(values.map(({ name }) => name)).size === values.length, { message: "Expected unique names" });
17
- const laneSourceKey = (source) => "label" in source ? `label:${source.label}` : `state:${source.state}`;
14
+ const laneSourceKey = (source) => "label" in source ? `label:${canonicalLabelName(source.label)}` : `state:${source.state}`;
18
15
  const uniqueLaneSources = Schema.makeFilter((lanes) => {
19
16
  const keys = lanes.flatMap(({ sources }) => sources.map(laneSourceKey));
20
17
  return new Set(keys).size === keys.length;
21
- }, { message: "Expected every lane source to be mapped once" });
18
+ }, { message: "Expected each lane source in only one lane" });
22
19
  const Lanes = Schema.Array(Lane).check(uniqueNames, uniqueLaneSources);
23
20
  const uniqueLabelNames = Schema.makeFilter((values) => new Set(values.map(({ name }) => canonicalLabelName(name))).size === values.length, { message: "Expected unique GitHub label names" });
24
21
  const DeclaredLabels = Schema.Array(DeclaredLabel).check(uniqueLabelNames);
25
- /** A repository the factory manages, with its selector tags and configured Board lanes. */
26
22
  export class ManagedRepo extends Schema.Class("@usine/config/ManagedRepo")({
27
23
  name: RepositoryName,
28
24
  tags: Schema.Array(RegistryTag)
@@ -31,37 +27,265 @@ export class ManagedRepo extends Schema.Class("@usine/config/ManagedRepo")({
31
27
  lanes: Lanes.pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
32
28
  }) {
33
29
  }
34
- /** A named place to execute Attempts, with the number it may run at the same time. */
35
- export class Worker extends Schema.Class("@usine/config/Worker")({
30
+ const MaxConcurrentAttempts = PositiveInt.pipe(Schema.withDecodingDefaultKey(Effect.succeed(1)));
31
+ /** A Worker that runs Attempts on the orchestrator's machine. */
32
+ export class LocalWorker extends Schema.Class("@usine/config/LocalWorker")({
36
33
  name: WorkerName,
37
- kind: WorkerKind,
38
- maxConcurrentAttempts: PositiveInt.pipe(Schema.withDecodingDefaultKey(Effect.succeed(1))),
34
+ kind: Schema.Literal("local"),
35
+ maxConcurrentAttempts: MaxConcurrentAttempts,
39
36
  }) {
40
37
  }
41
- /** Factory-wide polling, Attempt limits, and defaults for the coordinating parent. */
38
+ /** A Worker on the exe.dev VM with the same name. */
39
+ export class ExeDevWorker extends Schema.Class("@usine/config/ExeDevWorker")({
40
+ name: WorkerName,
41
+ kind: Schema.Literal("exe.dev"),
42
+ maxConcurrentAttempts: MaxConcurrentAttempts,
43
+ }) {
44
+ }
45
+ const EnvironmentVariableName = Schema.String.check(Schema.isPattern(/^[A-Za-z_][A-Za-z0-9_]*$/u, {
46
+ message: "Expected an environment variable name",
47
+ })).pipe(Schema.brand("EnvironmentVariableName"));
48
+ /**
49
+ * The Gateway in front of an SSH Worker's machine on a private network (ADR 0027).
50
+ *
51
+ * - `domain`: the Gateway's private DNS domain.
52
+ * - `destination`: the Gateway's `ssh` destination, usually the Host alias in the Worker's
53
+ * `ProxyJump`. The executor forwards through it to the admin API at `adminPort` on the
54
+ * Gateway's loopback interface.
55
+ * - `adminTokenEnv`: the orchestrator environment variable with the admin token, read when
56
+ * `usine up` starts or a reload adds the Worker.
57
+ * - `llmProviders`: the providers whose credential the Gateway injects: `anthropic` for Claude
58
+ * Code, `openai` for Codex. Harnesses for other providers use the operator's login on the
59
+ * Worker through the forward proxy.
60
+ */
61
+ export class WorkerGateway extends Schema.Class("@usine/config/WorkerGateway")({
62
+ domain: GatewayDomain,
63
+ destination: SshDestination,
64
+ adminPort: GatewayAdminPort.pipe(Schema.withDecodingDefaultKey(Effect.succeed(7070))),
65
+ adminTokenEnv: EnvironmentVariableName,
66
+ llmProviders: Schema.Array(GatewayLlmProvider)
67
+ .check(Schema.isUnique())
68
+ .pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
69
+ }) {
70
+ }
71
+ /**
72
+ * The container that each Attempt on an SSH Worker runs in, if the machine has Docker.
73
+ *
74
+ * - `image`: the image to run. If `None`, the executor's image for the harness versions of this
75
+ * release.
76
+ * - `cpus`, `memoryMib`, and `pids`: the limits of each Attempt's container. If `None`, the
77
+ * executor derives the limit from the machine at preflight: the machine's total less a reserve
78
+ * for its own processes, divided by `maxConcurrentAttempts`.
79
+ */
80
+ export class WorkerContainer extends Schema.Class("@usine/config/WorkerContainer")({
81
+ image: Schema.OptionFromOptionalKey(ContainerImage),
82
+ cpus: Schema.OptionFromOptionalKey(ContainerCpus),
83
+ memoryMib: Schema.OptionFromOptionalKey(ContainerMemoryMib),
84
+ pids: Schema.OptionFromOptionalKey(ContainerPids),
85
+ }) {
86
+ }
87
+ /**
88
+ * The orchestrator environment variables with the LLM provider API keys that each Attempt on a
89
+ * provisioned Worker gets in its environment, read when `usine up` starts or a reload adds the
90
+ * Worker. `anthropic` becomes `ANTHROPIC_API_KEY` for Claude Code, and `openai` becomes
91
+ * `OPENAI_API_KEY` for Codex.
92
+ */
93
+ export class ProviderApiKeys extends Schema.Class("@usine/config/ProviderApiKeys")({
94
+ anthropic: Schema.OptionFromOptionalKey(EnvironmentVariableName),
95
+ openai: Schema.OptionFromOptionalKey(EnvironmentVariableName),
96
+ }) {
97
+ }
98
+ const ProviderApiKeysFromYaml = ProviderApiKeys.pipe(Schema.withDecodingDefaultKey(Effect.succeed({})));
99
+ /**
100
+ * Creates one Hetzner Cloud server per Attempt from a snapshot, and deletes it after the
101
+ * Attempt (#550).
102
+ *
103
+ * - `tokenEnv`: the orchestrator environment variable with a Hetzner Cloud API token with read
104
+ * and write access to the project.
105
+ * - `serverType` and `location`: each server's type and location.
106
+ * - `image`: the snapshot's ID or description, which `infra/hetzner/snapshot.sh` prints.
107
+ * - `network`: the private network to attach each server to. With a Gateway, it's the Gateway's
108
+ * network and the server gets no public address.
109
+ * - `firewall`: the project's firewall to apply to each server, such as one that admits SSH only
110
+ * from the orchestrator's address to a server with a public address.
111
+ * - `sshKey`: the name of the SSH key in the project that each server authorizes.
112
+ * - `sshUser`: the user the executor connects as.
113
+ * - `labels`: extra labels for each server.
114
+ * - `apiKeys`: provider API keys for each Attempt, for harnesses whose credential the Gateway
115
+ * doesn't have.
116
+ */
117
+ export class HetznerProvisioner extends Schema.Class("@usine/config/HetznerProvisioner")({
118
+ provider: Schema.Literal("hetzner"),
119
+ tokenEnv: EnvironmentVariableName,
120
+ serverType: HetznerServerType,
121
+ location: HetznerLocation,
122
+ image: HetznerImage,
123
+ network: Schema.OptionFromOptionalKey(HetznerResourceName),
124
+ firewall: Schema.OptionFromOptionalKey(HetznerResourceName),
125
+ sshKey: HetznerResourceName,
126
+ sshUser: SshUser.pipe(Schema.withDecodingDefaultKey(Effect.succeed("usine"))),
127
+ labels: HetznerLabels.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
128
+ apiKeys: ProviderApiKeysFromYaml,
129
+ }) {
130
+ }
131
+ /**
132
+ * Creates one Boat sandbox per Attempt and deletes it after the Attempt (#550). Boat has no
133
+ * network rules, so a Boat Worker has no Gateway, and each Attempt's GitHub token is on its
134
+ * machine (ADR 0026). Boat documents no region choice; its machines are in Germany, Finland, and
135
+ * France.
136
+ *
137
+ * - `tokenEnv`: the orchestrator environment variable with a Boat API key.
138
+ * - `size`: each sandbox's Boat machine type.
139
+ * - `apiKeys`: provider API keys for each Attempt. A harness without one can't authenticate,
140
+ * because a subscription login needs a Gateway.
141
+ */
142
+ export class BoatProvisioner extends Schema.Class("@usine/config/BoatProvisioner")({
143
+ provider: Schema.Literal("boat"),
144
+ tokenEnv: EnvironmentVariableName,
145
+ size: BoatSize.pipe(Schema.withDecodingDefaultKey(Effect.succeed("default"))),
146
+ apiKeys: ProviderApiKeysFromYaml,
147
+ }) {
148
+ }
149
+ /** The provider that creates one machine per Attempt for an SSH Worker; `provider` selects it. */
150
+ export const WorkerProvisioner = Schema.Union([HetznerProvisioner, BoatProvisioner]);
151
+ const WorkerProvisionerFromYaml = Schema.Union([
152
+ HetznerProvisioner.pipe(Schema.encodeKeys({
153
+ tokenEnv: "token_env",
154
+ serverType: "server_type",
155
+ sshKey: "ssh_key",
156
+ sshUser: "ssh_user",
157
+ apiKeys: "api_keys",
158
+ })),
159
+ BoatProvisioner.pipe(Schema.encodeKeys({ tokenEnv: "token_env", apiKeys: "api_keys" })),
160
+ ]);
161
+ /**
162
+ * A Linux machine reached with `ssh`, with Worker state under `<root>/workers/<name>`. If
163
+ * `gateway` is set, the machine stores no GitHub token; the executor sends each Attempt's token
164
+ * to the Gateway. A Worker sets either `destination`, for one long-lived machine, or
165
+ * `provisioner`, for one machine per Attempt; `maxConcurrentAttempts` then caps the machines in
166
+ * flight.
167
+ */
168
+ export class SshWorker extends Schema.Class("@usine/config/SshWorker")({
169
+ name: WorkerName,
170
+ kind: Schema.Literal("ssh"),
171
+ maxConcurrentAttempts: MaxConcurrentAttempts,
172
+ destination: Schema.OptionFromOptionalKey(SshDestination),
173
+ provisioner: Schema.OptionFromOptionalKey(WorkerProvisionerFromYaml),
174
+ identityFile: Schema.OptionFromOptionalKey(SshIdentityFile),
175
+ port: Schema.OptionFromOptionalKey(SshPort),
176
+ root: WorkerRoot,
177
+ gateway: Schema.OptionFromOptionalKey(WorkerGateway.pipe(Schema.encodeKeys({
178
+ adminPort: "admin_port",
179
+ adminTokenEnv: "admin_token_env",
180
+ llmProviders: "llm_providers",
181
+ }))),
182
+ container: WorkerContainer.pipe(Schema.encodeKeys({ memoryMib: "memory_mib" }), Schema.withDecodingDefaultKey(Effect.succeed({}))),
183
+ }) {
184
+ }
185
+ /** Returns the reason an SSH Worker's machine settings conflict, or `undefined` if they don't. */
186
+ const sshMachineConflict = (worker) => {
187
+ const provisioner = Option.getOrUndefined(worker.provisioner);
188
+ if (provisioner === undefined)
189
+ return Option.isNone(worker.destination)
190
+ ? `SSH worker "${worker.name}" needs a destination or a provisioner`
191
+ : undefined;
192
+ if (Option.isSome(worker.destination))
193
+ return `SSH worker "${worker.name}" sets both destination and provisioner; a provisioned worker creates its machines, so remove destination`;
194
+ if (Option.isSome(worker.port))
195
+ return `SSH worker "${worker.name}" sets port, which a provisioned worker takes from its provider`;
196
+ switch (provisioner.provider) {
197
+ case "hetzner":
198
+ return Option.isSome(worker.gateway) && Option.isNone(provisioner.network)
199
+ ? `SSH worker "${worker.name}" has a gateway, so its provisioner needs the gateway's private network in network`
200
+ : undefined;
201
+ case "boat":
202
+ if (Option.isSome(worker.gateway))
203
+ return `SSH worker "${worker.name}" has a Boat provisioner and a gateway; Boat has no network rules, so no gateway can be its machines' only way out. Remove gateway.`;
204
+ return Option.isNone(worker.identityFile)
205
+ ? `SSH worker "${worker.name}" has a Boat provisioner and needs identity_file, whose .pub file usine adds to each sandbox`
206
+ : undefined;
207
+ }
208
+ };
209
+ const HttpsUrl = Schema.URLFromString.check(Schema.makeFilter((url) => url.protocol === "https:", { message: "Expected an https URL" }), Schema.makeFilter((url) => url.username === "" &&
210
+ url.password === "" &&
211
+ url.search === "" &&
212
+ url.hash === "" &&
213
+ url.pathname === "/", { message: "Expected the Worker's origin, without a path, credentials, or query string" }));
214
+ /**
215
+ * An LLM provider whose API key the Cloudflare Worker's outbound handlers hold for each Attempt.
216
+ * `apiKeyEnv` is the orchestrator environment variable with the key, read when `usine up` starts.
217
+ */
218
+ export class CloudflareLlmProviderKey extends Schema.Class("@usine/config/CloudflareLlmProviderKey")({
219
+ provider: CloudflareLlmProvider,
220
+ apiKeyEnv: EnvironmentVariableName,
221
+ }) {
222
+ }
223
+ const uniqueProviders = Schema.makeFilter((values) => new Set(values.map(({ provider }) => provider)).size === values.length, { message: "Expected each provider once" });
224
+ /**
225
+ * A Worker that runs each Attempt in its own Cloudflare sandbox, through the Worker that the
226
+ * operator deploys from `@usine/cloudflare`.
227
+ *
228
+ * - `workerUrl`: the deployed Worker's origin.
229
+ * - `accessClientIdEnv` and `accessClientSecretEnv`: the orchestrator environment variables with
230
+ * the Cloudflare Access service token that the Worker accepts, read when `usine up` starts.
231
+ * - `image`: the name of the image in the Worker's `containers[].images`.
232
+ * - `instanceType`: the container instance type of each sandbox.
233
+ * - `llmProviders`: the providers whose API key the Worker's outbound handlers inject. Claude Code
234
+ * needs `anthropic` and Codex needs `openai`; a sandbox holds no harness login.
235
+ */
236
+ export class CloudflareWorker extends Schema.Class("@usine/config/CloudflareWorker")({
237
+ name: WorkerName,
238
+ kind: Schema.Literal("cloudflare"),
239
+ maxConcurrentAttempts: MaxConcurrentAttempts,
240
+ workerUrl: HttpsUrl,
241
+ accessClientIdEnv: EnvironmentVariableName,
242
+ accessClientSecretEnv: EnvironmentVariableName,
243
+ image: CloudflareImageName,
244
+ instanceType: CloudflareInstanceType.pipe(Schema.withDecodingDefaultKey(Effect.succeed("standard-4"))),
245
+ llmProviders: Schema.Array(CloudflareLlmProviderKey.pipe(Schema.encodeKeys({ apiKeyEnv: "api_key_env" })))
246
+ .check(uniqueProviders)
247
+ .pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
248
+ }) {
249
+ }
250
+ /** A configured Worker; `kind` selects the adapter. */
251
+ export const Worker = Schema.Union([LocalWorker, ExeDevWorker, SshWorker, CloudflareWorker]);
42
252
  export class Settings extends Schema.Class("@usine/config/Settings")({
43
- /** Seconds between routine GitHub polling cycles; defaults to 60. */
253
+ /** The interval between GitHub polling cycles, in seconds. */
44
254
  pollInterval: PositiveInt.pipe(Schema.withDecodingDefaultKey(Effect.succeed(60))),
45
- /** Total child sessions allowed over one Attempt's lifetime, including sequential spawns; defaults to four. */
255
+ /** The maximum number of child sessions per Attempt, counting sequential spawns. */
46
256
  maxChildren: ChildSessionBudget.pipe(Schema.withDecodingDefaultKey(Effect.succeed(4))),
47
- /** Configured Attempt duration ceiling in minutes; defaults to 60. */
48
- maxAttemptMinutes: PositiveInt.pipe(Schema.withDecodingDefaultKey(Effect.succeed(60))),
49
- /** Configured total-token ceiling per Attempt; defaults to 10,000,000. */
50
- maxAttemptTokens: PositiveInt.pipe(Schema.withDecodingDefaultKey(Effect.succeed(10_000_000))),
51
- /** Parent model used when the Agent has no override; an absent default leaves selection to Pi. */
257
+ /** The wall-clock limit per Attempt, in minutes, or `None` for no limit. */
258
+ maxAttemptMinutes: Schema.OptionFromOptionalKey(PositiveInt),
259
+ /** The token limit per Attempt, counting the parent and every child, or `None` for no limit. */
260
+ maxAttemptTokens: Schema.OptionFromOptionalKey(PositiveInt),
261
+ /** The parent model for Agents that set none, or `None` to let Pi select it. */
52
262
  parentModel: Schema.OptionFromOptionalKey(ModelId),
53
- /** Default parent reasoning effort; if neither Agent nor factory supplies one, the child's effort applies. */
263
+ /** The parent reasoning effort for Agents that set none, or `None` to use the child's effort. */
54
264
  parentEffort: Schema.OptionFromOptionalKey(Effort),
55
265
  }) {
56
266
  }
57
- /** How GitHub hints reach the factory to request earlier polling; routine polling remains the backstop. */
267
+ /** The source of GitHub webhook events that trigger an early poll; polling continues in every mode. */
58
268
  export const Webhooks = Schema.Union([
59
269
  Schema.Struct({ mode: Schema.Literal("off") }),
60
270
  Schema.Struct({ mode: Schema.Literal("deliveries") }),
61
271
  Schema.Struct({ mode: Schema.Literal("endpoint"), publicUrl: Schema.URLFromString }).pipe(Schema.encodeKeys({ publicUrl: "public_url" })),
62
272
  ]);
63
- // Authored YAML keys are snake_case and domain fields camelCase. The rename
64
- // happens once here and encodes back for edits.
273
+ const OtlpUrl = Schema.URLFromString.check(Schema.makeFilter((url) => url.protocol === "http:" || url.protocol === "https:", {
274
+ message: "Expected an http or https URL",
275
+ }), Schema.makeFilter((url) => url.username === "" && url.password === "" && url.search === "", {
276
+ message: "Expected a URL without a username, password, or query string; authenticate in a collector next to usine up",
277
+ }));
278
+ /** Span export over OTLP/HTTP (ADR 0028). */
279
+ export class Tracing extends Schema.Class("@usine/config/Tracing")({
280
+ /**
281
+ * The collector's OTLP/HTTP traces endpoint, used as given, such as
282
+ * `http://localhost:4318/v1/traces`. It has no credentials or query string.
283
+ */
284
+ otlpUrl: OtlpUrl,
285
+ /** The `service.name` resource attribute of every exported span. */
286
+ serviceName: nonBlankString("Expected a non-blank service name").pipe(Schema.withDecodingDefaultKey(Effect.succeed("usine"))),
287
+ }) {
288
+ }
65
289
  const SettingsFromYaml = Settings.pipe(Schema.encodeKeys({
66
290
  pollInterval: "poll_interval",
67
291
  maxChildren: "max_children",
@@ -70,10 +294,25 @@ const SettingsFromYaml = Settings.pipe(Schema.encodeKeys({
70
294
  parentModel: "parent_model",
71
295
  parentEffort: "parent_effort",
72
296
  }));
73
- const WorkerFromYaml = Worker.pipe(Schema.encodeKeys({ maxConcurrentAttempts: "max_concurrent_attempts" }));
74
- const ManagedRepos = Schema.Array(ManagedRepo).check(uniqueNames);
297
+ const WorkerFromYaml = Schema.Union([
298
+ LocalWorker.pipe(Schema.encodeKeys({ maxConcurrentAttempts: "max_concurrent_attempts" })),
299
+ ExeDevWorker.pipe(Schema.encodeKeys({ maxConcurrentAttempts: "max_concurrent_attempts" })),
300
+ SshWorker.pipe(Schema.encodeKeys({
301
+ maxConcurrentAttempts: "max_concurrent_attempts",
302
+ identityFile: "identity_file",
303
+ })).check(Schema.makeFilter((worker) => sshMachineConflict(worker) ?? true)),
304
+ CloudflareWorker.pipe(Schema.encodeKeys({
305
+ maxConcurrentAttempts: "max_concurrent_attempts",
306
+ workerUrl: "worker_url",
307
+ accessClientIdEnv: "access_client_id_env",
308
+ accessClientSecretEnv: "access_client_secret_env",
309
+ instanceType: "instance_type",
310
+ llmProviders: "llm_providers",
311
+ })),
312
+ ]);
313
+ const ManagedRepos = Schema.Array(ManagedRepo).check(uniqueRepositoryNames((repo) => repo.name));
75
314
  const Workers = Schema.Array(WorkerFromYaml).check(Schema.isNonEmpty(), uniqueNames);
76
- /** The factory's repository registry, Worker capacity, labels, and operating defaults from `usine.yaml`. */
315
+ /** The decoded `usine.yaml`. */
77
316
  export class UsineConfig extends Schema.Class("@usine/config/UsineConfig")({
78
317
  version: Schema.Literal(1),
79
318
  labels: DeclaredLabels.pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
@@ -82,6 +321,7 @@ export class UsineConfig extends Schema.Class("@usine/config/UsineConfig")({
82
321
  workers: Workers.pipe(Schema.withDecodingDefaultKey(Effect.succeed([{ name: "local", kind: "local" }]))),
83
322
  webhooks: Webhooks.pipe(Schema.withDecodingDefaultKey(Effect.succeed({ mode: "off" }))),
84
323
  operator: Schema.OptionFromOptionalKey(OperatorLogin),
324
+ tracing: Schema.OptionFromOptionalKey(Tracing.pipe(Schema.encodeKeys({ otlpUrl: "otlp_url", serviceName: "service_name" }))),
85
325
  }) {
86
326
  }
87
327
  //# sourceMappingURL=factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAC1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AE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACvF,QAAQ,EAAE,MAAM,CAAC,qBAAqB,CAAC,aAAa,CAAC;IACrD,OAAO,EAAE,MAAM,CAAC,qBAAqB,CACnC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC,CACtF;CACF,CAAC;CAAG"}
package/dist/file.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Schema } from "effect";
2
- /** Path of one authored file, relative to the instance folder. */
2
+ /** A file path relative to the instance folder. */
3
3
  export declare const InstancePath: Schema.brand<Schema.NonEmptyString, "InstancePath">;
4
4
  export type InstancePath = typeof InstancePath.Type;
5
5
  export declare const FileStage: Schema.Literals<readonly ["expression", "frontmatter", "read", "reference", "schema", "yaml"]>;
@@ -10,7 +10,7 @@ declare const ConfigFileError_base: Schema.Class<ConfigFileError, Schema.TaggedS
10
10
  readonly expression: Schema.OptionFromOptionalKey<Schema.brand<Schema.String, "ExpressionSource">>;
11
11
  readonly message: Schema.NonEmptyString;
12
12
  }>, import("effect/Cause").YieldableError>;
13
- /** A failure pinned to one authored file and one parse stage, so the UI can quarantine that file alone. */
13
+ /** An error in one file at one parse stage; only that file is quarantined. */
14
14
  export declare class ConfigFileError extends ConfigFileError_base {
15
15
  }
16
16
  declare const FactoryConfigError_base: Schema.Class<FactoryConfigError, Schema.TaggedStruct<"FactoryConfigError", {
@@ -18,7 +18,7 @@ declare const FactoryConfigError_base: Schema.Class<FactoryConfigError, Schema.T
18
18
  readonly stage: Schema.Literals<readonly ["expression", "frontmatter", "read", "reference", "schema", "yaml"]>;
19
19
  readonly message: Schema.NonEmptyString;
20
20
  }>, import("effect/Cause").YieldableError>;
21
- /** The registry or settings could not be loaded, which blocks the whole instance. */
21
+ /** An error loading the registry or settings, which fails the whole instance load. */
22
22
  export declare class FactoryConfigError extends FactoryConfigError_base {
23
23
  }
24
24
  export declare const ConfigError: Schema.Union<readonly [typeof ConfigFileError, typeof FactoryConfigError]>;
@@ -1 +1 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,kEAAkE;AAClE,eAAO,MAAM,YAAY,qDAA2D,CAAC;AAErF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,eAAO,MAAM,SAAS,gGAOpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;;;;;;;AAE9C,2GAA2G;AAC3G,qBAAa,eAAgB,SAAQ,oBAOnC;CAAG;;;;;;AAEL,qFAAqF;AACrF,qBAAa,kBAAmB,SAAQ,uBAMtC;CAAG;AAEL,eAAO,MAAM,WAAW,4EAAsD,CAAC;AAE/E,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,mDAAmD;AACnD,eAAO,MAAM,YAAY,qDAA2D,CAAC;AAErF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,eAAO,MAAM,SAAS,gGAOpB,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;;;;;;;AAE9C,8EAA8E;AAC9E,qBAAa,eAAgB,SAAQ,oBAOnC;CAAG;;;;;;AAEL,sFAAsF;AACtF,qBAAa,kBAAmB,SAAQ,uBAMtC;CAAG;AAEL,eAAO,MAAM,WAAW,4EAAsD,CAAC;AAE/E,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC"}
package/dist/file.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Source } from "@usine/expression/expression-engine";
2
2
  import { Schema } from "effect";
3
- /** Path of one authored file, relative to the instance folder. */
3
+ /** A file path relative to the instance folder. */
4
4
  export const InstancePath = Schema.NonEmptyString.pipe(Schema.brand("InstancePath"));
5
5
  export const FileStage = Schema.Literals([
6
6
  "expression",
@@ -10,7 +10,7 @@ export const FileStage = Schema.Literals([
10
10
  "schema",
11
11
  "yaml",
12
12
  ]);
13
- /** A failure pinned to one authored file and one parse stage, so the UI can quarantine that file alone. */
13
+ /** An error in one file at one parse stage; only that file is quarantined. */
14
14
  export class ConfigFileError extends Schema.TaggedError("@usine/config/ConfigFileError")("ConfigFileError", {
15
15
  file: InstancePath,
16
16
  stage: FileStage,
@@ -18,7 +18,7 @@ export class ConfigFileError extends Schema.TaggedError("@usine/config/ConfigFil
18
18
  message: Schema.NonEmptyString,
19
19
  }) {
20
20
  }
21
- /** The registry or settings could not be loaded, which blocks the whole instance. */
21
+ /** An error loading the registry or settings, which fails the whole instance load. */
22
22
  export class FactoryConfigError extends Schema.TaggedError("@usine/config/FactoryConfigError")("FactoryConfigError", {
23
23
  file: InstancePath,
24
24
  stage: FileStage,
package/dist/file.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,kEAAkE;AAClE,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC;AAIrF,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IACvC,YAAY;IACZ,aAAa;IACb,MAAM;IACN,WAAW;IACX,QAAQ;IACR,MAAM;CACP,CAAC,CAAC;AAIH,2GAA2G;AAC3G,MAAM,OAA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AM,CAAC,cAAc;CAC/B,CAAC;CAAG;AAEL,sFAAsF;AACtF,MAAM,OAAO,kBAAmB,SAAQ,MAAM,CAAC,WAAW,CACxD,kCAAkC,CACnC,CAAC,oBAAoB,EAAE;IACtB,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,MAAM,CAAC,cAAc;CAC/B,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC,CAAC"}
@@ -5,6 +5,6 @@ export interface MarkdownParts {
5
5
  readonly body: string;
6
6
  readonly newline: "\n" | "\r\n";
7
7
  }
8
- /** Splits a Markdown file into its YAML half and its body without parsing either. */
8
+ /** Splits a Markdown file into YAML frontmatter and body without parsing either. */
9
9
  export declare const splitMarkdown: (file: InstancePath, source: string) => Effect.Effect<MarkdownParts, ConfigFileError>;
10
10
  //# sourceMappingURL=frontmatter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,CAAC;CACjC;AAeD,qFAAqF;AACrF,eAAO,MAAM,aAAa,SAClB,YAAY,UACV,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,CAoC9C,CAAC"}
1
+ {"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,CAAC;CACjC;AAeD,oFAAoF;AACpF,eAAO,MAAM,aAAa,SAClB,YAAY,UACV,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,CAoC9C,CAAC"}
@@ -12,7 +12,7 @@ const closingDelimiterAt = (source, newline, from) => {
12
12
  }
13
13
  return -1;
14
14
  };
15
- /** Splits a Markdown file into its YAML half and its body without parsing either. */
15
+ /** Splits a Markdown file into YAML frontmatter and body without parsing either. */
16
16
  export const splitMarkdown = (file, source) => {
17
17
  const newline = source.startsWith("---\r\n")
18
18
  ? "\r\n"
@@ -1 +1 @@
1
- {"version":3,"file":"frontmatter.js","sourceRoot":"","sources":["../src/frontmatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,eAAe,EAAqB,MAAM,WAAW,CAAC;AAQ/D,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,OAAsB,EAAE,IAAY,EAAU,EAAE;IAC1F,MAAM,SAAS,GAAG,GAAG,OAAO,KAAK,CAAC;IAClC,IAAI,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAChD,OAAO,SAAS,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC;QACpD,IAAI,cAAc,KAAK,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,EAAE,CAAC;YACnF,OAAO,SAA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AC,IAAI;YACN,CAAC,CAAC,SAAS,CAAC;IAChB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,IAAI,eAAe,CAAC;YACzB,IAAI;YACJ,KAAK,EAAE,aAAa;YACpB,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE;YACzB,OAAO,EAAE,oEAAoE;SAC9E,CAAC,CAAC;IACL,CAAC;IAED,MAAM,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;IACrC,MAAM,gBAAgB,GAAG,GAAG,OAAO,KAAK,CAAC;IACzC,MAAM,OAAO,GAAG,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC/D,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO,IAAI,eAAe,CAAC;YACzB,IAAI;YACJ,KAAK,EAAE,aAAa;YACpB,UAAU,EAAE,MAAM,CAAC,IAAI,EAAE;YACzB,OAAO,EAAE,qDAAqD;SAC/D,CAAC,CAAC;IACL,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACzD,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC;QAC1D,CAAC,CAAC,cAAc,GAAG,OAAO,CAAC,MAAM;QACjC,CAAC,CAAC,cAAc,CAAC;IACnB,OAAO,MAAM,CAAC,OAAO,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC;QACtC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;QAC7B,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -12,7 +12,7 @@ declare const UndeclaredTriggerLabelWarning_base: Schema.Class<UndeclaredTrigger
12
12
  }>, {}>;
13
13
  export declare class UndeclaredTriggerLabelWarning extends UndeclaredTriggerLabelWarning_base {
14
14
  }
15
- /** Diagnostics that do not block a load. */
15
+ /** The diagnostics that don't block a load. */
16
16
  export declare const ConfigWarning: Schema.Union<readonly [typeof UndeclaredLaneLabelWarning, typeof UndeclaredTriggerLabelWarning]>;
17
17
  export type ConfigWarning = typeof ConfigWarning.Type;
18
18
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/instance/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;AAKhC,qBAAa,0BAA2B,SAAQ,+BAM9C;CAAG;;;;;AAEL,qBAAa,6BAA8B,SAAQ,kCAKjD;CAAG;AAEL,4CAA4C;AAC5C,eAAO,MAAM,aAAa,kGAGxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAC"}
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../src/instance/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;AAKhC,qBAAa,0BAA2B,SAAQ,+BAM9C;CAAG;;;;;AAEL,qBAAa,6BAA8B,SAAQ,kCAKjD;CAAG;AAEL,+CAA+C;AAC/C,eAAO,MAAM,aAAa,kGAGxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAC"}
@@ -14,7 +14,7 @@ export class UndeclaredTriggerLabelWarning extends Schema.TaggedClass("@usine/co
14
14
  label: GitHubLabelName,
15
15
  }) {
16
16
  }
17
- /** Diagnostics that do not block a load. */
17
+ /** The diagnostics that don't block a load. */
18
18
  export const ConfigWarning = Schema.Union([
19
19
  UndeclaredLaneLabelWarning,
20
20
  UndeclaredTriggerLabelWarning,
@@ -1 +1 @@
1
- {"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/instance/diagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC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AA8B,SAAQ,MAAM,CAAC,WAAW,CACnE,6CAA6C,CAC9C,CAAC,+BAA+B,EAAE;IACjC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI;IAC1B,KAAK,EAAE,eAAe;CACvB,CAAC;CAAG;AAEL,+CAA+C;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;IACxC,0BAA0B;IAC1B,6BAA6B;CAC9B,CAAC,CAAC"}
@@ -10,7 +10,7 @@ declare const LoadedInstance_base: Schema.Class<LoadedInstance, Schema.Struct<{
10
10
  readonly quarantinedLoops: Schema.$Array<typeof QuarantinedLoop>;
11
11
  readonly warnings: Schema.$Array<Schema.Union<readonly [typeof import("./diagnostics.ts").UndeclaredLaneLabelWarning, typeof import("./diagnostics.ts").UndeclaredTriggerLabelWarning]>>;
12
12
  }>, {}>;
13
- /** One consistent snapshot of an instance folder. Construction fails if a loop references a name the instance does not have. */
13
+ /** A snapshot of an instance folder. Construction fails if a loop references an unknown agent or selector entry. */
14
14
  export declare class LoadedInstance extends LoadedInstance_base {
15
15
  }
16
16
  export { UndeclaredLaneLabelWarning, UndeclaredTriggerLabelWarning, ConfigWarning, } from "./diagnostics.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/instance/instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAY,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;;;;;;;;;AAItD,gIAAgI;AAChI,qBAAa,cAAe,SAAQ,mBAmBnC;CAAG;AAEJ,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,aAAa,GACd,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"instance.d.ts","sourceRoot":"","sources":["../../src/instance/instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAY,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;;;;;;;;;AAItD,oHAAoH;AACpH,qBAAa,cAAe,SAAQ,mBAmBnC;CAAG;AAEJ,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,aAAa,GACd,MAAM,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@ import { LoopFile, QuarantinedLoop, loopPath } from "../loop.js";
4
4
  import { AgentFile, InvalidAgent } from "../agent.js";
5
5
  import { ConfigWarning } from "./diagnostics.js";
6
6
  import { referenceIndex, loopReferenceFailure } from "./references.js";
7
- /** One consistent snapshot of an instance folder. Construction fails if a loop references a name the instance does not have. */
7
+ /** A snapshot of an instance folder. Construction fails if a loop references an unknown agent or selector entry. */
8
8
  export class LoadedInstance extends Schema.Class("@usine/config/LoadedInstance")(Schema.Struct({
9
9
  config: UsineConfig,
10
10
  agents: Schema.Array(AgentFile),
@@ -15,7 +15,7 @@ export class LoadedInstance extends Schema.Class("@usine/config/LoadedInstance")
15
15
  }).check(Schema.makeFilter(({ agents, config, loops }) => {
16
16
  const references = referenceIndex(config, agents);
17
17
  return loops.every((loop) => Option.isNone(loopReferenceFailure(loopPath(loop.name), loop, references)));
18
- }, { message: "Expected every loop to reference the loaded roster and registry" }))) {
18
+ }, { message: "Expected every loop to reference only loaded agents and registry entries" }))) {
19
19
  }
20
20
  export { UndeclaredLaneLabelWarning, UndeclaredTriggerLabelWarning, ConfigWarning, } from "./diagnostics.js";
21
21
  //# sourceMappingURL=instance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instance.js","sourceRoot":"","sources":["../../src/instance/instance.ts"],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