@usine/config 0.0.0 → 0.1.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Philippe L'ATTENTION
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1 +1,35 @@
1
- Name reservation for the usine blocks; real releases start at 0.0.1.
1
+ # @usine/config
2
+
3
+ Reads and edits the authored files in a [usine](https://github.com/basaltbytes/usine) instance folder:
4
+
5
+ - `usine.yaml` holds the schema version, managed-repo registry, settings, workers, webhook mode, and operator login.
6
+ - `loops/*.md` combines strict YAML frontmatter with a Markdown prompt. The parser type-checks the trigger and every `{{ CEL expression }}` against that trigger's payload.
7
+ - `agents/*.md` records a named agent's harness, model, effort, optional parent model, and persona.
8
+ - `updateYaml` and `updateFrontmatter` change one path through the YAML document tree while retaining comments, key order, and the Markdown body.
9
+
10
+ Authored keys are snake_case (`poll_interval`, `max_concurrent_attempts`); the decoded domain types expose camelCase fields (`pollInterval`, `maxConcurrentAttempts`). The rename is part of the schema, so edits encode back to the authored casing.
11
+
12
+ Each managed repository can define an exclusive Board lane map. A lane accepts one or more GitHub label or Item-state sources:
13
+
14
+ ```yaml
15
+ repos:
16
+ - name: acme/widget
17
+ lanes:
18
+ - name: Ready
19
+ sources:
20
+ - label: ready-for-agent
21
+ - name: In review
22
+ sources:
23
+ - label: ready-for-review
24
+ - state: pr-open
25
+ ```
26
+
27
+ Valid state sources are `issue-open`, `issue-closed`, `pr-open`, `pr-closed`, and `pr-merged`. Lane names and sources must be unique within the repository. Repositories without an authored map receive proposed lanes from the labels observed during GitHub polling.
28
+
29
+ `workers` must contain at least one uniquely named worker. If the key is absent, the parser supplies one local worker named `local` with a concurrency limit of one. Set `kind` to `local` or `exe.dev` to select its executor, and set `max_concurrent_attempts` to control how many Attempts it can run at once.
30
+
31
+ `InstanceFolder.load` takes an `Instance.Directory` (from `@usine/core`) and returns one atomic `LoadedInstance` snapshot. An invalid `usine.yaml` fails the load with a `FactoryConfigError`; an invalid loop enters `quarantinedLoops` with a `ConfigFileError` naming the file and stage, without blocking valid siblings. Invalid agents appear in `invalidAgents`, and loops that name them are quarantined. A `LoadedInstance` always satisfies its own reference rule: every loaded loop names a rostered agent and registered selector entries, enforced at construction. The `ConfigError` union covers both failure types.
32
+
33
+ The package exports Effect services and layers. Supply `FileSystem.FileSystem` and `Path.Path` implementations when composing `InstanceFolder.layer`; `ConfigParser.layer` requires `ExpressionEngine` from `@usine/expression`.
34
+
35
+ All APIs remain 0.x and can change between minor releases.
@@ -0,0 +1,10 @@
1
+ import { Effect } from "effect";
2
+ import { ConfigFileError, type InstancePath } from "./model.ts";
3
+ export interface MarkdownParts {
4
+ readonly yaml: string;
5
+ readonly body: string;
6
+ readonly newline: "\n" | "\r\n";
7
+ }
8
+ /** Split Markdown frontmatter without interpreting either half. */
9
+ export declare const splitMarkdown: (file: InstancePath, source: string) => Effect.Effect<MarkdownParts, ConfigFileError>;
10
+ //# sourceMappingURL=frontmatter.d.ts.map
@@ -0,0 +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,YAAY,CAAC;AAEhE,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,mEAAmE;AACnE,eAAO,MAAM,aAAa,SAClB,YAAY,UACV,MAAM,KACb,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,CAoC9C,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { Effect, Option } from "effect";
2
+ import { ConfigFileError } from "./model.js";
3
+ const closingDelimiterAt = (source, newline, from) => {
4
+ const delimiter = `${newline}---`;
5
+ let candidate = source.indexOf(delimiter, from);
6
+ while (candidate >= 0) {
7
+ const afterDelimiter = candidate + delimiter.length;
8
+ if (afterDelimiter === source.length || source.startsWith(newline, afterDelimiter)) {
9
+ return candidate;
10
+ }
11
+ candidate = source.indexOf(delimiter, afterDelimiter);
12
+ }
13
+ return -1;
14
+ };
15
+ /** Split Markdown frontmatter without interpreting either half. */
16
+ export const splitMarkdown = (file, source) => {
17
+ const newline = source.startsWith("---\r\n")
18
+ ? "\r\n"
19
+ : source.startsWith("---\n")
20
+ ? "\n"
21
+ : undefined;
22
+ if (newline === undefined) {
23
+ return new ConfigFileError({
24
+ file,
25
+ stage: "frontmatter",
26
+ expression: Option.none(),
27
+ message: "Expected the file to start with a YAML frontmatter delimiter (---)",
28
+ });
29
+ }
30
+ const yamlStart = 3 + newline.length;
31
+ const closingDelimiter = `${newline}---`;
32
+ const yamlEnd = closingDelimiterAt(source, newline, yamlStart);
33
+ if (yamlEnd < 0) {
34
+ return new ConfigFileError({
35
+ file,
36
+ stage: "frontmatter",
37
+ expression: Option.none(),
38
+ message: "Expected a closing YAML frontmatter delimiter (---)",
39
+ });
40
+ }
41
+ const afterDelimiter = yamlEnd + closingDelimiter.length;
42
+ const bodyStart = source.startsWith(newline, afterDelimiter)
43
+ ? afterDelimiter + newline.length
44
+ : afterDelimiter;
45
+ return Effect.succeed({
46
+ yaml: source.slice(yamlStart, yamlEnd),
47
+ body: source.slice(bodyStart),
48
+ newline,
49
+ });
50
+ };
51
+ //# sourceMappingURL=frontmatter.js.map
@@ -0,0 +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,YAAY,CAAC;AAQhE,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,SAAS,CAAC;QACnB,CAAC;QACD,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC;AAE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AK,CAAC,SAAS,CAAC;QAC7B,OAAO;KACR,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @usine/config — strict schemas, CEL-aware parsing, per-loop quarantine,
3
+ * instance-folder loading, payload descriptors, and surgical YAML edits.
4
+ */
5
+ export * from "./instance-folder.ts";
6
+ export * from "./model.ts";
7
+ export * from "./parser.ts";
8
+ export * from "./payload-slices.ts";
9
+ export * from "./selector.ts";
10
+ export * from "./yaml/writer.ts";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @usine/config — strict schemas, CEL-aware parsing, per-loop quarantine,
3
+ * instance-folder loading, payload descriptors, and surgical YAML edits.
4
+ */
5
+ export * from "./instance-folder.js";
6
+ export * from "./model.js";
7
+ export * from "./parser.js";
8
+ export * from "./payload-slices.js";
9
+ export * from "./selector.js";
10
+ export * from "./yaml/writer.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Instance } from "@usine/core";
2
+ import { Context, Effect, FileSystem, Layer, Path } from "effect";
3
+ import { FactoryConfigError, LoadedInstance } from "./model.ts";
4
+ import { ConfigParser } from "./parser.ts";
5
+ declare const InstanceFolder_base: Context.ServiceClass<InstanceFolder, "@usine/config/InstanceFolder", {
6
+ readonly load: (root: Instance.Directory) => Effect.Effect<LoadedInstance, FactoryConfigError>;
7
+ }>;
8
+ /** End-to-end instance-folder loader with factory failure and per-loop quarantine. */
9
+ export declare class InstanceFolder extends InstanceFolder_base {
10
+ static readonly layer: Layer.Layer<InstanceFolder, never, ConfigParser | FileSystem.FileSystem | Path.Path>;
11
+ }
12
+ export {};
13
+ //# sourceMappingURL=instance-folder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance-folder.d.ts","sourceRoot":"","sources":["../src/instance-folder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAU,IAAI,EAAU,MAAM,QAAQ,CAAC;AAClF,OAAO,EAGL,kBAAkB,EAGlB,cAAc,EAKf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;;mBAoBxB,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,KAAK,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC;;AAJlG,sFAAsF;AACtF,qBAAa,cAAe,SAAQ,mBAKD;IACjC,MAAM,CAAC,QAAQ,CAAC,KAAK,uFA6HnB;CACH"}
@@ -0,0 +1,81 @@
1
+ import { Instance } from "@usine/core";
2
+ import { Context, Effect, FileSystem, Layer, Option, Path, Result } from "effect";
3
+ import { ConfigFileError, FactoryConfigError, InstancePath, InvalidAgent, LoadedInstance, QuarantinedLoop, loopReferenceFailure, referenceIndex, } from "./model.js";
4
+ import { ConfigParser } from "./parser.js";
5
+ const FILE_CONCURRENCY = 16;
6
+ const factoryError = (error) => new FactoryConfigError({
7
+ file: error.file,
8
+ stage: error.stage,
9
+ message: error.message,
10
+ });
11
+ /** End-to-end instance-folder loader with factory failure and per-loop quarantine. */
12
+ export class InstanceFolder extends Context.Service()("@usine/config/InstanceFolder") {
13
+ static layer = Layer.effect(InstanceFolder, Effect.gen(function* () {
14
+ const fileSystem = yield* FileSystem.FileSystem;
15
+ const path = yield* Path.Path;
16
+ const parser = yield* ConfigParser;
17
+ const readFile = Effect.fn("InstanceFolder.readFile")((absolutePath, file) => fileSystem.readFileString(absolutePath).pipe(Effect.mapError((error) => new ConfigFileError({
18
+ file,
19
+ stage: "read",
20
+ expression: Option.none(),
21
+ message: error.message,
22
+ }))));
23
+ const markdownFiles = Effect.fn("InstanceFolder.markdownFiles")((root, directory) => fileSystem.readDirectory(path.join(root, directory)).pipe(Effect.map((files) => files.filter((file) => file.endsWith(".md")).sort()), Effect.mapError((error) => new FactoryConfigError({
24
+ file: InstancePath.make(directory),
25
+ stage: "read",
26
+ message: error.message,
27
+ }))));
28
+ const loadMarkdownFiles = (root, directory, parseFile) => Effect.gen(function* () {
29
+ const files = yield* markdownFiles(root, directory);
30
+ return yield* Effect.forEach(files, (name) => {
31
+ const file = InstancePath.make(`${directory}/${name}`);
32
+ return readFile(path.join(root, file), file).pipe(Effect.flatMap((source) => parseFile(file, source)), Effect.result, Effect.map((result) => ({ file, result })));
33
+ }, { concurrency: FILE_CONCURRENCY });
34
+ });
35
+ return {
36
+ load: Effect.fn("InstanceFolder.load")((root) => Effect.gen(function* () {
37
+ const configFile = InstancePath.make("usine.yaml");
38
+ const configSource = yield* readFile(path.join(root, configFile), configFile).pipe(Effect.mapError(factoryError));
39
+ const config = yield* parser
40
+ .parseUsineYaml(configFile, configSource)
41
+ .pipe(Effect.mapError(factoryError));
42
+ const parsed = yield* Effect.all({
43
+ agents: loadMarkdownFiles(root, "agents", parser.parseAgentFile),
44
+ loops: loadMarkdownFiles(root, "loops", parser.parseLoopFile),
45
+ }, { concurrency: 2 });
46
+ const agents = [];
47
+ const invalidAgents = [];
48
+ for (const entry of parsed.agents) {
49
+ if (Result.isSuccess(entry.result))
50
+ agents.push(entry.result.success);
51
+ else {
52
+ invalidAgents.push(new InvalidAgent({ file: entry.file, error: entry.result.failure }));
53
+ }
54
+ }
55
+ const references = referenceIndex(config, agents);
56
+ const loops = [];
57
+ const quarantinedLoops = [];
58
+ for (const entry of parsed.loops) {
59
+ if (Result.isFailure(entry.result)) {
60
+ quarantinedLoops.push(new QuarantinedLoop({ file: entry.file, error: entry.result.failure }));
61
+ continue;
62
+ }
63
+ const referenceFailure = loopReferenceFailure(entry.file, entry.result.success, references);
64
+ if (Option.isSome(referenceFailure)) {
65
+ quarantinedLoops.push(new QuarantinedLoop({ file: entry.file, error: referenceFailure.value }));
66
+ }
67
+ else
68
+ loops.push(entry.result.success);
69
+ }
70
+ return new LoadedInstance({
71
+ config,
72
+ agents,
73
+ invalidAgents,
74
+ loops,
75
+ quarantinedLoops,
76
+ });
77
+ })),
78
+ };
79
+ }));
80
+ }
81
+ //# sourceMappingURL=instance-folder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance-folder.js","sourceRoot":"","sources":["../src/instance-folder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAClF,OAAO,EAEL,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,cAAc,EAEd,eAAe,EACf,oBAAoB,EACpB,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAO5B,MAAM,YAAY,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAClE,IAAI,kBAAkB,CAAC;IACrB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,KAAK,EAAE,KAAK,CA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CAAC;gBAClC,MAAM,gBAAgB,GAA2B,EAAE,CAAC;gBACpD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;oBACjC,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;wBACnC,gBAAgB,CAAC,IAAI,CACnB,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CACvE,CAAC;wBACF,SAAS;oBACX,CAAC;oBACD,MAAM,gBAAgB,GAAG,oBAAoB,CAC3C,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,MAAM,CAAC,OAAO,EACpB,UAAU,CACX,CAAC;oBACF,IAAI,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;wBACpC,gBAAgB,CAAC,IAAI,CACnB,IAAI,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,gBAAgB,CAAC,KAAK,EAAE,CAAC,CACzE,CAAC;oBACJ,CAAC;;wBAAM,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBAC1C,CAAC;gBAED,OAAO,IAAI,cAAc,CAAC;oBACxB,MAAM;oBACN,MAAM;oBACN,aAAa;oBACb,KAAK;oBACL,gBAAgB;iBACjB,CAAC,CAAC;YACL,CAAC,CAAC,CACL;SACF,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;CACH"}
@@ -0,0 +1,257 @@
1
+ import { Agent as CoreAgent, Repository, Worker as CoreWorker } from "@usine/core";
2
+ import { Option, Schema } from "effect";
3
+ /** Instance-relative path of one authored file (`usine.yaml`, `loops/x.md`). */
4
+ export declare const InstancePath: Schema.brand<Schema.NonEmptyString, "InstancePath">;
5
+ export type InstancePath = typeof InstancePath.Type;
6
+ export declare const FileStage: Schema.Literals<readonly ["expression", "frontmatter", "read", "reference", "schema", "yaml"]>;
7
+ export type FileStage = typeof FileStage.Type;
8
+ declare const ConfigFileError_base: Schema.Class<ConfigFileError, Schema.TaggedStruct<"ConfigFileError", {
9
+ readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
10
+ readonly stage: Schema.Literals<readonly ["expression", "frontmatter", "read", "reference", "schema", "yaml"]>;
11
+ readonly expression: Schema.OptionFromOptionalKey<Schema.brand<Schema.String, "ExpressionSource">>;
12
+ readonly message: Schema.NonEmptyString;
13
+ }>, import("effect/Cause").YieldableError>;
14
+ /** One precise, file-owned config failure suitable for quarantine UI. */
15
+ export declare class ConfigFileError extends ConfigFileError_base {
16
+ }
17
+ declare const FactoryConfigError_base: Schema.Class<FactoryConfigError, Schema.TaggedStruct<"FactoryConfigError", {
18
+ readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
19
+ readonly stage: Schema.Literals<readonly ["expression", "frontmatter", "read", "reference", "schema", "yaml"]>;
20
+ readonly message: Schema.NonEmptyString;
21
+ }>, import("effect/Cause").YieldableError>;
22
+ /** A factory-level failure: the registry/settings boundary could not be loaded. */
23
+ export declare class FactoryConfigError extends FactoryConfigError_base {
24
+ }
25
+ /** Every failure mode this package's parsers and loaders can produce. */
26
+ export declare const ConfigError: Schema.Union<readonly [typeof ConfigFileError, typeof FactoryConfigError]>;
27
+ export type ConfigError = typeof ConfigError.Type;
28
+ export declare const AgentName: Schema.brand<Schema.String, "AgentName">;
29
+ export type AgentName = CoreAgent.Name;
30
+ export declare const LoopName: Schema.brand<Schema.NonEmptyString, "LoopName">;
31
+ export type LoopName = typeof LoopName.Type;
32
+ export declare const WorkerName: Schema.brand<Schema.String, "WorkerName">;
33
+ export type WorkerName = CoreWorker.Name;
34
+ export declare const RepoName: Schema.brand<Schema.String, "RepoName">;
35
+ export type RepoName = Repository.Name;
36
+ export declare const RegistryTag: Schema.brand<Schema.String, "RegistryTag">;
37
+ export type RegistryTag = typeof RegistryTag.Type;
38
+ export declare const LaneName: Schema.brand<Schema.String, "LaneName">;
39
+ export type LaneName = typeof LaneName.Type;
40
+ export declare const GitHubLabelName: Schema.brand<Schema.String, "GitHubLabelName">;
41
+ export type GitHubLabelName = typeof GitHubLabelName.Type;
42
+ export declare const LaneItemState: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
43
+ export type LaneItemState = typeof LaneItemState.Type;
44
+ declare const LabelLaneSource_base: Schema.Class<LabelLaneSource, Schema.Struct<{
45
+ readonly label: Schema.brand<Schema.String, "GitHubLabelName">;
46
+ }>, {}>;
47
+ export declare class LabelLaneSource extends LabelLaneSource_base {
48
+ }
49
+ declare const StateLaneSource_base: Schema.Class<StateLaneSource, Schema.Struct<{
50
+ readonly state: Schema.Literals<readonly ["issue-open", "issue-closed", "pr-open", "pr-closed", "pr-merged"]>;
51
+ }>, {}>;
52
+ export declare class StateLaneSource extends StateLaneSource_base {
53
+ }
54
+ export declare const LaneSource: Schema.Union<readonly [typeof LabelLaneSource, typeof StateLaneSource]>;
55
+ export type LaneSource = typeof LaneSource.Type;
56
+ declare const Lane_base: Schema.Class<Lane, Schema.Struct<{
57
+ readonly name: Schema.brand<Schema.String, "LaneName">;
58
+ readonly sources: Schema.$Array<Schema.Union<readonly [typeof LabelLaneSource, typeof StateLaneSource]>>;
59
+ }>, {}>;
60
+ export declare class Lane extends Lane_base {
61
+ }
62
+ export declare const ModelId: Schema.brand<Schema.String, "ModelId">;
63
+ export type ModelId = CoreAgent.ModelId;
64
+ export declare const OperatorLogin: Schema.brand<Schema.String, "OperatorLogin">;
65
+ export type OperatorLogin = typeof OperatorLogin.Type;
66
+ export declare const PromptTemplate: Schema.brand<Schema.String, "PromptTemplate">;
67
+ export type PromptTemplate = typeof PromptTemplate.Type;
68
+ export declare const Persona: Schema.brand<Schema.String, "AgentPersona">;
69
+ export type Persona = CoreAgent.Persona;
70
+ declare const ManagedRepo_base: Schema.Class<ManagedRepo, Schema.Struct<{
71
+ readonly name: Schema.brand<Schema.String, "RepoName">;
72
+ readonly tags: Schema.withDecodingDefaultKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>, never>;
73
+ readonly lanes: Schema.withDecodingDefaultKey<Schema.$Array<typeof Lane>, never>;
74
+ }>, {}>;
75
+ export declare class ManagedRepo extends ManagedRepo_base {
76
+ }
77
+ export declare const WorkerKind: Schema.Literals<readonly ["local", "exe.dev"]>;
78
+ export type WorkerKind = CoreWorker.Kind;
79
+ declare const Worker_base: Schema.Class<Worker, Schema.Struct<{
80
+ readonly name: Schema.brand<Schema.String, "WorkerName">;
81
+ readonly kind: Schema.Literals<readonly ["local", "exe.dev"]>;
82
+ readonly maxConcurrentAttempts: Schema.withDecodingDefaultKey<Schema.Int, never>;
83
+ }>, {}>;
84
+ export declare class Worker extends Worker_base {
85
+ }
86
+ declare const Settings_base: Schema.Class<Settings, Schema.Struct<{
87
+ readonly pollInterval: Schema.withDecodingDefaultKey<Schema.Int, never>;
88
+ readonly maxChildren: Schema.withDecodingDefaultKey<Schema.Int, never>;
89
+ readonly maxAttemptMinutes: Schema.withDecodingDefaultKey<Schema.Int, never>;
90
+ readonly maxAttemptTokens: Schema.withDecodingDefaultKey<Schema.Int, never>;
91
+ readonly parentModel: Schema.OptionFromOptionalKey<Schema.brand<Schema.String, "ModelId">>;
92
+ }>, {}>;
93
+ export declare class Settings extends Settings_base {
94
+ }
95
+ export declare const Webhooks: Schema.Union<readonly [Schema.Struct<{
96
+ readonly mode: Schema.Literal<"off">;
97
+ }>, Schema.Struct<{
98
+ readonly mode: Schema.Literal<"deliveries">;
99
+ }>, Schema.encodeKeys<Schema.Struct<{
100
+ readonly mode: Schema.Literal<"endpoint">;
101
+ readonly publicUrl: Schema.URLFromString;
102
+ }>, {
103
+ readonly publicUrl: "public_url";
104
+ }>]>;
105
+ export type Webhooks = typeof Webhooks.Type;
106
+ declare const UsineConfig_base: Schema.Class<UsineConfig, Schema.Struct<{
107
+ readonly version: Schema.Literal<1>;
108
+ readonly repos: Schema.$Array<typeof ManagedRepo>;
109
+ readonly settings: Schema.withDecodingDefaultKey<Schema.encodeKeys<typeof Settings, {
110
+ readonly pollInterval: "poll_interval";
111
+ readonly maxChildren: "max_children";
112
+ readonly maxAttemptMinutes: "max_attempt_minutes";
113
+ readonly maxAttemptTokens: "max_attempt_tokens";
114
+ readonly parentModel: "parent_model";
115
+ }>, never>;
116
+ readonly workers: Schema.withDecodingDefaultKey<Schema.$Array<Schema.encodeKeys<typeof Worker, {
117
+ readonly maxConcurrentAttempts: "max_concurrent_attempts";
118
+ }>>, never>;
119
+ readonly webhooks: Schema.withDecodingDefaultKey<Schema.Union<readonly [Schema.Struct<{
120
+ readonly mode: Schema.Literal<"off">;
121
+ }>, Schema.Struct<{
122
+ readonly mode: Schema.Literal<"deliveries">;
123
+ }>, Schema.encodeKeys<Schema.Struct<{
124
+ readonly mode: Schema.Literal<"endpoint">;
125
+ readonly publicUrl: Schema.URLFromString;
126
+ }>, {
127
+ readonly publicUrl: "public_url";
128
+ }>]>, never>;
129
+ readonly operator: Schema.OptionFromOptionalKey<Schema.brand<Schema.String, "OperatorLogin">>;
130
+ }>, {}>;
131
+ /** Strict, factory-wide authored config from usine.yaml. */
132
+ export declare class UsineConfig extends UsineConfig_base {
133
+ }
134
+ declare const Selector_base: Schema.Class<Selector, Schema.Struct<{
135
+ readonly repos: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>;
136
+ readonly tags: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
137
+ }>, {}>;
138
+ export declare class Selector extends Selector_base {
139
+ }
140
+ export declare const ValidSelector: Schema.decodeTo<Schema.declareConstructor<Selector, {
141
+ readonly repos?: readonly string[];
142
+ readonly tags?: readonly string[];
143
+ }, readonly [Schema.Struct<{
144
+ readonly repos: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>;
145
+ readonly tags: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
146
+ }>], {
147
+ readonly repos: Schema.OptionIso<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>>;
148
+ readonly tags: Schema.OptionIso<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>>;
149
+ }>, Schema.Struct<{
150
+ readonly repos: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>;
151
+ readonly tags: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
152
+ }>, never, never>;
153
+ export declare const Cron: Schema.brand<Schema.String, "Cron">;
154
+ export type Cron = typeof Cron.Type;
155
+ export declare const TimeZone: Schema.brand<Schema.String, "TimeZone">;
156
+ export type TimeZone = typeof TimeZone.Type;
157
+ declare const IssueTrigger_base: Schema.Class<IssueTrigger, Schema.Struct<{
158
+ readonly on: Schema.Literal<"issue">;
159
+ readonly if: Schema.brand<Schema.String, "ExpressionSource">;
160
+ }>, {}>;
161
+ export declare class IssueTrigger extends IssueTrigger_base {
162
+ }
163
+ declare const PullRequestTrigger_base: Schema.Class<PullRequestTrigger, Schema.Struct<{
164
+ readonly on: Schema.Literal<"pr">;
165
+ readonly if: Schema.brand<Schema.String, "ExpressionSource">;
166
+ }>, {}>;
167
+ export declare class PullRequestTrigger extends PullRequestTrigger_base {
168
+ }
169
+ declare const ScheduleTrigger_base: Schema.Class<ScheduleTrigger, Schema.Struct<{
170
+ readonly on: Schema.Literal<"schedule">;
171
+ readonly if: Schema.brand<Schema.String, "ExpressionSource">;
172
+ readonly cron: Schema.brand<Schema.String, "Cron">;
173
+ readonly tz: Schema.withDecodingDefaultKey<Schema.brand<Schema.String, "TimeZone">, never>;
174
+ }>, {}>;
175
+ export declare class ScheduleTrigger extends ScheduleTrigger_base {
176
+ }
177
+ export declare const Trigger: Schema.Union<readonly [typeof IssueTrigger, typeof PullRequestTrigger, typeof ScheduleTrigger]>;
178
+ export type Trigger = typeof Trigger.Type;
179
+ /** The watched streams, derived from the Trigger union so the set has one owner. */
180
+ export type Stream = Trigger["on"];
181
+ declare const LoopFile_base: Schema.Class<LoopFile, Schema.Struct<{
182
+ readonly name: Schema.brand<Schema.NonEmptyString, "LoopName">;
183
+ readonly trigger: Schema.Union<readonly [typeof IssueTrigger, typeof PullRequestTrigger, typeof ScheduleTrigger]>;
184
+ readonly selector: Schema.Option<Schema.decodeTo<Schema.declareConstructor<Selector, {
185
+ readonly repos?: readonly string[];
186
+ readonly tags?: readonly string[];
187
+ }, readonly [Schema.Struct<{
188
+ readonly repos: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>;
189
+ readonly tags: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
190
+ }>], {
191
+ readonly repos: Schema.OptionIso<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>>;
192
+ readonly tags: Schema.OptionIso<Schema.toType<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>>;
193
+ }>, Schema.Struct<{
194
+ readonly repos: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RepoName">>>;
195
+ readonly tags: Schema.OptionFromOptionalKey<Schema.$Array<Schema.brand<Schema.String, "RegistryTag">>>;
196
+ }>, never, never>>;
197
+ readonly approval: Schema.Literals<readonly ["none", "required"]>;
198
+ readonly step: Schema.brand<Schema.NonEmptyString, "StepName">;
199
+ readonly agent: Schema.brand<Schema.String, "AgentName">;
200
+ readonly body: Schema.brand<Schema.String, "PromptTemplate">;
201
+ }>, {}>;
202
+ export declare class LoopFile extends LoopFile_base {
203
+ }
204
+ export declare const Harness: Schema.Literals<readonly ["claude", "codex", "pi"]>;
205
+ export type Harness = CoreAgent.Harness;
206
+ export declare const Effort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
207
+ export type Effort = CoreAgent.Effort;
208
+ declare const AgentFile_base: Schema.Class<AgentFile, Schema.Struct<{
209
+ readonly name: Schema.brand<Schema.String, "AgentName">;
210
+ readonly harness: Schema.Literals<readonly ["claude", "codex", "pi"]>;
211
+ readonly model: Schema.brand<Schema.String, "ModelId">;
212
+ readonly effort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
213
+ readonly parentModel: Schema.Option<Schema.brand<Schema.String, "ModelId">>;
214
+ readonly persona: Schema.brand<Schema.String, "AgentPersona">;
215
+ }>, {}>;
216
+ export declare class AgentFile extends AgentFile_base {
217
+ }
218
+ declare const InvalidAgent_base: Schema.Class<InvalidAgent, Schema.Struct<{
219
+ readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
220
+ readonly error: typeof ConfigFileError;
221
+ }>, {}>;
222
+ export declare class InvalidAgent extends InvalidAgent_base {
223
+ }
224
+ declare const QuarantinedLoop_base: Schema.Class<QuarantinedLoop, Schema.Struct<{
225
+ readonly file: Schema.brand<Schema.NonEmptyString, "InstancePath">;
226
+ readonly error: typeof ConfigFileError;
227
+ }>, {}>;
228
+ export declare class QuarantinedLoop extends QuarantinedLoop_base {
229
+ }
230
+ /** The instance-relative path a loop's filename identity maps back to. */
231
+ export declare const loopPath: (name: LoopName) => InstancePath;
232
+ /** The names a loop may reference, drawn from one loaded roster and registry. */
233
+ export interface ReferenceIndex {
234
+ readonly agentNames: ReadonlySet<AgentName>;
235
+ readonly registryTags: ReadonlySet<RegistryTag>;
236
+ readonly repoNames: ReadonlySet<RepoName>;
237
+ }
238
+ export declare const referenceIndex: (config: UsineConfig, agents: ReadonlyArray<AgentFile>) => ReferenceIndex;
239
+ /**
240
+ * Pure deriver: the reference failure quarantining one loop against the
241
+ * loaded roster and registry, if any. The single owner of the reference rule
242
+ * — the folder loader reports it per file, LoadedInstance enforces it at
243
+ * construction.
244
+ */
245
+ export declare const loopReferenceFailure: (file: InstancePath, loop: LoopFile, references: ReferenceIndex) => Option.Option<ConfigFileError>;
246
+ declare const LoadedInstance_base: Schema.Class<LoadedInstance, Schema.Struct<{
247
+ readonly config: typeof UsineConfig;
248
+ readonly agents: Schema.$Array<typeof AgentFile>;
249
+ readonly invalidAgents: Schema.$Array<typeof InvalidAgent>;
250
+ readonly loops: Schema.$Array<typeof LoopFile>;
251
+ readonly quarantinedLoops: Schema.$Array<typeof QuarantinedLoop>;
252
+ }>, {}>;
253
+ /** One atomic snapshot of an instance folder. Loops with unresolved references are unconstructible. */
254
+ export declare class LoadedInstance extends LoadedInstance_base {
255
+ }
256
+ export {};
257
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,SAAS,EAElB,UAAU,EAEV,MAAM,IAAI,UAAU,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAwC,MAAM,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtF,gFAAgF;AAChF,eAAO,MAAM,YAAY,qDAA2D,CAAC;AACrF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AAEpD,eAAO,MAAM,SAAS,gGAOpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAC;;;;;;;AAE9C,yEAAyE;AACzE,qBAAa,eAAgB,SAAQ,oBAOnC;CAAG;;;;;;AAEL,mFAAmF;AACnF,qBAAa,kBAAmB,SAAQ,uBAMtC;CAAG;AAEL,yEAAyE;AACzE,eAAO,MAAM,WAAW,4EAAsD,CAAC;AAC/E,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AASlD,eAAO,MAAM,SAAS,0CAAiB,CAAC;AACxC,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;AAEvC,eAAO,MAAM,QAAQ,iDAAqC,CAAC;AAC3D,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ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