@rcpooley/concord 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.
Files changed (176) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +318 -0
  3. package/bin/concord.service +69 -0
  4. package/dist/age.d.ts +20 -0
  5. package/dist/age.d.ts.map +1 -0
  6. package/dist/age.js +58 -0
  7. package/dist/age.js.map +1 -0
  8. package/dist/cli/main.d.ts +3 -0
  9. package/dist/cli/main.d.ts.map +1 -0
  10. package/dist/cli/main.js +301 -0
  11. package/dist/cli/main.js.map +1 -0
  12. package/dist/daemon.d.ts +4 -0
  13. package/dist/daemon.d.ts.map +1 -0
  14. package/dist/daemon.js +394 -0
  15. package/dist/daemon.js.map +1 -0
  16. package/dist/eval-config.d.ts +2 -0
  17. package/dist/eval-config.d.ts.map +1 -0
  18. package/dist/eval-config.js +45 -0
  19. package/dist/eval-config.js.map +1 -0
  20. package/dist/exec.d.ts +168 -0
  21. package/dist/exec.d.ts.map +1 -0
  22. package/dist/exec.js +313 -0
  23. package/dist/exec.js.map +1 -0
  24. package/dist/git.d.ts +59 -0
  25. package/dist/git.d.ts.map +1 -0
  26. package/dist/git.js +265 -0
  27. package/dist/git.js.map +1 -0
  28. package/dist/hook.d.ts +37 -0
  29. package/dist/hook.d.ts.map +1 -0
  30. package/dist/hook.js +89 -0
  31. package/dist/hook.js.map +1 -0
  32. package/dist/index.d.ts +18 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +15 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/init.d.ts +76 -0
  37. package/dist/init.d.ts.map +1 -0
  38. package/dist/init.js +236 -0
  39. package/dist/init.js.map +1 -0
  40. package/dist/loader.d.ts +35 -0
  41. package/dist/loader.d.ts.map +1 -0
  42. package/dist/loader.js +230 -0
  43. package/dist/loader.js.map +1 -0
  44. package/dist/module.d.ts +116 -0
  45. package/dist/module.d.ts.map +1 -0
  46. package/dist/module.js +100 -0
  47. package/dist/module.js.map +1 -0
  48. package/dist/modules/apt/index.d.ts +45 -0
  49. package/dist/modules/apt/index.d.ts.map +1 -0
  50. package/dist/modules/apt/index.js +249 -0
  51. package/dist/modules/apt/index.js.map +1 -0
  52. package/dist/modules/apt/schema.d.ts +63 -0
  53. package/dist/modules/apt/schema.d.ts.map +1 -0
  54. package/dist/modules/apt/schema.js +75 -0
  55. package/dist/modules/apt/schema.js.map +1 -0
  56. package/dist/modules/checkout/index.d.ts +88 -0
  57. package/dist/modules/checkout/index.d.ts.map +1 -0
  58. package/dist/modules/checkout/index.js +382 -0
  59. package/dist/modules/checkout/index.js.map +1 -0
  60. package/dist/modules/checkout/schema.d.ts +52 -0
  61. package/dist/modules/checkout/schema.d.ts.map +1 -0
  62. package/dist/modules/checkout/schema.js +132 -0
  63. package/dist/modules/checkout/schema.js.map +1 -0
  64. package/dist/modules/cloudflare/api.d.ts +64 -0
  65. package/dist/modules/cloudflare/api.d.ts.map +1 -0
  66. package/dist/modules/cloudflare/api.js +98 -0
  67. package/dist/modules/cloudflare/api.js.map +1 -0
  68. package/dist/modules/cloudflare/index.d.ts +74 -0
  69. package/dist/modules/cloudflare/index.d.ts.map +1 -0
  70. package/dist/modules/cloudflare/index.js +374 -0
  71. package/dist/modules/cloudflare/index.js.map +1 -0
  72. package/dist/modules/cloudflare/schema.d.ts +62 -0
  73. package/dist/modules/cloudflare/schema.d.ts.map +1 -0
  74. package/dist/modules/cloudflare/schema.js +85 -0
  75. package/dist/modules/cloudflare/schema.js.map +1 -0
  76. package/dist/modules/docker/index.d.ts +83 -0
  77. package/dist/modules/docker/index.d.ts.map +1 -0
  78. package/dist/modules/docker/index.js +470 -0
  79. package/dist/modules/docker/index.js.map +1 -0
  80. package/dist/modules/docker/registry.d.ts +35 -0
  81. package/dist/modules/docker/registry.d.ts.map +1 -0
  82. package/dist/modules/docker/registry.js +95 -0
  83. package/dist/modules/docker/registry.js.map +1 -0
  84. package/dist/modules/docker/render.d.ts +45 -0
  85. package/dist/modules/docker/render.d.ts.map +1 -0
  86. package/dist/modules/docker/render.js +162 -0
  87. package/dist/modules/docker/render.js.map +1 -0
  88. package/dist/modules/docker/schema.d.ts +231 -0
  89. package/dist/modules/docker/schema.d.ts.map +1 -0
  90. package/dist/modules/docker/schema.js +335 -0
  91. package/dist/modules/docker/schema.js.map +1 -0
  92. package/dist/modules/docker/sweeper.d.ts +64 -0
  93. package/dist/modules/docker/sweeper.d.ts.map +1 -0
  94. package/dist/modules/docker/sweeper.js +94 -0
  95. package/dist/modules/docker/sweeper.js.map +1 -0
  96. package/dist/modules/file/index.d.ts +79 -0
  97. package/dist/modules/file/index.d.ts.map +1 -0
  98. package/dist/modules/file/index.js +305 -0
  99. package/dist/modules/file/index.js.map +1 -0
  100. package/dist/modules/file/schema.d.ts +45 -0
  101. package/dist/modules/file/schema.d.ts.map +1 -0
  102. package/dist/modules/file/schema.js +114 -0
  103. package/dist/modules/file/schema.js.map +1 -0
  104. package/dist/modules/index.d.ts +20 -0
  105. package/dist/modules/index.d.ts.map +1 -0
  106. package/dist/modules/index.js +11 -0
  107. package/dist/modules/index.js.map +1 -0
  108. package/dist/modules/porkbun/api.d.ts +36 -0
  109. package/dist/modules/porkbun/api.d.ts.map +1 -0
  110. package/dist/modules/porkbun/api.js +62 -0
  111. package/dist/modules/porkbun/api.js.map +1 -0
  112. package/dist/modules/porkbun/index.d.ts +50 -0
  113. package/dist/modules/porkbun/index.d.ts.map +1 -0
  114. package/dist/modules/porkbun/index.js +236 -0
  115. package/dist/modules/porkbun/index.js.map +1 -0
  116. package/dist/modules/porkbun/schema.d.ts +38 -0
  117. package/dist/modules/porkbun/schema.d.ts.map +1 -0
  118. package/dist/modules/porkbun/schema.js +39 -0
  119. package/dist/modules/porkbun/schema.js.map +1 -0
  120. package/dist/modules/script/index.d.ts +43 -0
  121. package/dist/modules/script/index.d.ts.map +1 -0
  122. package/dist/modules/script/index.js +116 -0
  123. package/dist/modules/script/index.js.map +1 -0
  124. package/dist/modules/script/schema.d.ts +25 -0
  125. package/dist/modules/script/schema.d.ts.map +1 -0
  126. package/dist/modules/script/schema.js +63 -0
  127. package/dist/modules/script/schema.js.map +1 -0
  128. package/dist/modules/systemd/index.d.ts +93 -0
  129. package/dist/modules/systemd/index.d.ts.map +1 -0
  130. package/dist/modules/systemd/index.js +394 -0
  131. package/dist/modules/systemd/index.js.map +1 -0
  132. package/dist/modules/systemd/render.d.ts +41 -0
  133. package/dist/modules/systemd/render.d.ts.map +1 -0
  134. package/dist/modules/systemd/render.js +252 -0
  135. package/dist/modules/systemd/render.js.map +1 -0
  136. package/dist/modules/systemd/schema.d.ts +293 -0
  137. package/dist/modules/systemd/schema.d.ts.map +1 -0
  138. package/dist/modules/systemd/schema.js +302 -0
  139. package/dist/modules/systemd/schema.js.map +1 -0
  140. package/dist/modules/systemd/sweeper.d.ts +31 -0
  141. package/dist/modules/systemd/sweeper.d.ts.map +1 -0
  142. package/dist/modules/systemd/sweeper.js +77 -0
  143. package/dist/modules/systemd/sweeper.js.map +1 -0
  144. package/dist/plans.d.ts +132 -0
  145. package/dist/plans.d.ts.map +1 -0
  146. package/dist/plans.js +315 -0
  147. package/dist/plans.js.map +1 -0
  148. package/dist/records.d.ts +37 -0
  149. package/dist/records.d.ts.map +1 -0
  150. package/dist/records.js +100 -0
  151. package/dist/records.js.map +1 -0
  152. package/dist/registry.d.ts +38 -0
  153. package/dist/registry.d.ts.map +1 -0
  154. package/dist/registry.js +31 -0
  155. package/dist/registry.js.map +1 -0
  156. package/dist/runner.d.ts +48 -0
  157. package/dist/runner.d.ts.map +1 -0
  158. package/dist/runner.js +150 -0
  159. package/dist/runner.js.map +1 -0
  160. package/dist/scheduler.d.ts +36 -0
  161. package/dist/scheduler.d.ts.map +1 -0
  162. package/dist/scheduler.js +77 -0
  163. package/dist/scheduler.js.map +1 -0
  164. package/dist/schema.d.ts +762 -0
  165. package/dist/schema.d.ts.map +1 -0
  166. package/dist/schema.js +185 -0
  167. package/dist/schema.js.map +1 -0
  168. package/dist/secret.d.ts +24 -0
  169. package/dist/secret.d.ts.map +1 -0
  170. package/dist/secret.js +3 -0
  171. package/dist/secret.js.map +1 -0
  172. package/dist/ui.d.ts +62 -0
  173. package/dist/ui.d.ts.map +1 -0
  174. package/dist/ui.js +288 -0
  175. package/dist/ui.js.map +1 -0
  176. package/package.json +57 -0
@@ -0,0 +1,762 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * A machine Concord manages.
4
+ *
5
+ * There is deliberately NO `localhost` concept — every host is an ordinary
6
+ * entry and one of them merely carries `transport: 'local'`. Moving the primary
7
+ * is then a one-word change rather than a config migration.
8
+ *
9
+ * `local` exists at all (rather than SSHing to self for uniformity) because if
10
+ * sshd on the primary broke, Concord could no longer repair the host it runs
11
+ * on. Local exec always works.
12
+ */
13
+ export declare const HostSchema: z.ZodObject<{
14
+ ip: z.ZodString;
15
+ user: z.ZodString;
16
+ port: z.ZodOptional<z.ZodNumber>;
17
+ transport: z.ZodDefault<z.ZodEnum<{
18
+ ssh: "ssh";
19
+ local: "local";
20
+ }>>;
21
+ key: z.ZodOptional<z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>;
22
+ skipIfUnreachable: z.ZodDefault<z.ZodBoolean>;
23
+ containerSweep: z.ZodDefault<z.ZodEnum<{
24
+ all: "all";
25
+ labelled: "labelled";
26
+ }>>;
27
+ }, z.core.$strict>;
28
+ /** Hosts by name. Module `host` fields are typed against these keys. */
29
+ export declare const HostRegistrySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
30
+ ip: z.ZodString;
31
+ user: z.ZodString;
32
+ port: z.ZodOptional<z.ZodNumber>;
33
+ transport: z.ZodDefault<z.ZodEnum<{
34
+ ssh: "ssh";
35
+ local: "local";
36
+ }>>;
37
+ key: z.ZodOptional<z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>;
38
+ skipIfUnreachable: z.ZodDefault<z.ZodBoolean>;
39
+ containerSweep: z.ZodDefault<z.ZodEnum<{
40
+ all: "all";
41
+ labelled: "labelled";
42
+ }>>;
43
+ }, z.core.$strict>>;
44
+ export type HostConfig = z.output<typeof HostSchema>;
45
+ export type HostRegistry = z.input<typeof HostRegistrySchema>;
46
+ /**
47
+ * Bumped on any BREAKING change to the config shape.
48
+ *
49
+ * The config repo declares this as a LITERAL, and `ConcordConfig` types it as a
50
+ * literal — so when this bumps, a config pinned to the new concord fails to
51
+ * typecheck until it is updated. The number is enforced by the type system
52
+ * rather than by anyone remembering to change it.
53
+ *
54
+ * The reconciler additionally checks it at load time, which catches the case
55
+ * types cannot: a config authored against a NEWER concord than the one running.
56
+ */
57
+ /**
58
+ * 8: the docker sweep joined the v7 lifecycle — `sweep`/`protected` are GONE
59
+ * from the docker schema, and the loader synthesizes one DockerSweeper per
60
+ * registry host exactly like systemd's. Behavior-preserving for a
61
+ * config that already declared a sweep for every host — the change moves
62
+ * "always-on" from a convention configs had to follow into the engine's
63
+ * contract. `protected` died unused; an
64
+ * escape hatch with zero consumers returns as data when a real one
65
+ * appears. What did NOT change: the docker sweeper still removes ANY
66
+ * undeclared container, labelled or not — unlike the
67
+ * systemd sweeper, which only ever removes what carries Concord's tag.
68
+ * 7: systemd units became HOST-TRUTH, the way containers did in 6 — but as a
69
+ * property of the module KIND, not of the config. Every rendered unit
70
+ * carries `X-Concord=1`; the loader synthesizes one sweeper per host that
71
+ * withdraws any tagged unit no module writes. Nothing to declare, so
72
+ * systemd's `absent` is GONE — hand-written cruft is hand-removed, and
73
+ * Concord's own cruft removes itself. `skipIfHostUnreachable` MOVED from
74
+ * the five host-scoped modules to the host registry (`skipIfUnreachable`),
75
+ * reversing the per-module decision: the flag described the machines (machines
76
+ * that sleep) from the day it landed, config stamped it uniformly per
77
+ * host anyway, and synthesized sweepers need an answer for hosts that
78
+ * declare no modules at all.
79
+ * 6: containers became HOST-TRUTH. `docker` gained `sweep` — one module per
80
+ * host may declare the host's container set exclusive, and any live
81
+ * container no module declares (minus `sweep.protected`) is removed, volumes
82
+ * never included. The loader computes each sweep's keep-set across all
83
+ * docker modules on the host. `absent`/`removeVolumes` are GONE: both described
84
+ * history
85
+ * ("what used to run here") rather than desired state — the sweep derives
86
+ * the same removals from what is declared, which also covers the case
87
+ * `absent` never did: deleting an app file entirely.
88
+ * 5: the `container` module became `docker`, and gained `networks` — a network
89
+ * is now a declared RESOURCE with a real read(), not a side effect of
90
+ * starting a container. `type: 'container'` / `containers: [...]` become
91
+ * `type: 'docker'` / `containers: [...]` (the field keeps its name; it still
92
+ * lists containers). The module still does not install Docker: the engine,
93
+ * daemon.json and the apt repo belong to apt/file/systemd, just as a module
94
+ * is always named for the interface it drives, not what it provisions.
95
+ * 4: the `app` module became `container` — `type: 'app'` / `apps: [...]` are now
96
+ * `type: 'container'` / `containers: [...]`. Naming only: the module drives a
97
+ * slice of Docker (build an image, run one container), while Docker's own
98
+ * installation and daemon config belong to apt/file/systemd. The three
99
+ * `dev.concord.*` labels and the compose service name are DELIBERATELY
100
+ * unchanged — they are the join to containers that already exist, and
101
+ * changing them would make every running container invisible to read().
102
+ */
103
+ export declare const SCHEMA_VERSION = 8;
104
+ /**
105
+ * Every module's config, discriminated by `type`.
106
+ *
107
+ * Each module declares its schema once; the TypeScript type is inferred from
108
+ * it (`z.infer`), so the author-time type and the runtime validator cannot
109
+ * drift. `.strict()` on each schema is what rejects unknown keys — a property
110
+ * of the schema, not a hand-maintained list of field names.
111
+ */
112
+ export declare const ModuleConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
113
+ type: z.ZodLiteral<"porkbun">;
114
+ id: z.ZodString;
115
+ apiKey: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
116
+ secretKey: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
117
+ zones: z.ZodRecord<z.ZodString, z.ZodObject<{
118
+ records: z.ZodArray<z.ZodObject<{
119
+ type: z.ZodString;
120
+ name: z.ZodString;
121
+ content: z.ZodString;
122
+ ttl: z.ZodOptional<z.ZodNumber>;
123
+ prio: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
124
+ }, z.core.$strict>>;
125
+ }, z.core.$strict>>;
126
+ }, z.core.$strict>, z.ZodObject<{
127
+ type: z.ZodLiteral<"cloudflare">;
128
+ id: z.ZodString;
129
+ apiToken: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
130
+ accountId: z.ZodOptional<z.ZodString>;
131
+ zones: z.ZodRecord<z.ZodString, z.ZodObject<{
132
+ records: z.ZodArray<z.ZodObject<{
133
+ type: z.ZodString;
134
+ name: z.ZodString;
135
+ content: z.ZodString;
136
+ ttl: z.ZodOptional<z.ZodNumber>;
137
+ priority: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
138
+ proxied: z.ZodOptional<z.ZodBoolean>;
139
+ note: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$strict>>;
141
+ }, z.core.$strict>>;
142
+ }, z.core.$strict>, z.ZodObject<{
143
+ type: z.ZodLiteral<"apt">;
144
+ id: z.ZodString;
145
+ host: z.ZodString;
146
+ repos: z.ZodOptional<z.ZodArray<z.ZodObject<{
147
+ name: z.ZodString;
148
+ uri: z.ZodString;
149
+ suites: z.ZodArray<z.ZodString>;
150
+ components: z.ZodArray<z.ZodString>;
151
+ architectures: z.ZodOptional<z.ZodArray<z.ZodString>>;
152
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
153
+ deb: "deb";
154
+ "deb-src": "deb-src";
155
+ }>>>;
156
+ key: z.ZodString;
157
+ }, z.core.$strict>>>;
158
+ packages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
159
+ name: z.ZodString;
160
+ version: z.ZodString;
161
+ }, z.core.$strict>]>>>;
162
+ absent: z.ZodOptional<z.ZodArray<z.ZodString>>;
163
+ }, z.core.$strict>, z.ZodObject<{
164
+ type: z.ZodLiteral<"file">;
165
+ id: z.ZodString;
166
+ host: z.ZodString;
167
+ directories: z.ZodOptional<z.ZodArray<z.ZodObject<{
168
+ path: z.ZodString;
169
+ owner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
170
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
171
+ mode: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
172
+ }, z.core.$strict>>>;
173
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
+ path: z.ZodString;
175
+ owner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
176
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
177
+ mode: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
178
+ content: z.ZodOptional<z.ZodString>;
179
+ source: z.ZodOptional<z.ZodString>;
180
+ url: z.ZodOptional<z.ZodString>;
181
+ sha256: z.ZodOptional<z.ZodString>;
182
+ substitutions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
183
+ }, z.core.$strict>>>;
184
+ absent: z.ZodOptional<z.ZodArray<z.ZodString>>;
185
+ }, z.core.$strict>, z.ZodObject<{
186
+ type: z.ZodLiteral<"systemd">;
187
+ id: z.ZodString;
188
+ host: z.ZodString;
189
+ units: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
+ name: z.ZodString;
191
+ enabled: z.ZodOptional<z.ZodBoolean>;
192
+ active: z.ZodOptional<z.ZodBoolean>;
193
+ unit: z.ZodOptional<z.ZodObject<{
194
+ service: z.ZodOptional<z.ZodObject<{
195
+ type: z.ZodOptional<z.ZodEnum<{
196
+ simple: "simple";
197
+ exec: "exec";
198
+ forking: "forking";
199
+ oneshot: "oneshot";
200
+ notify: "notify";
201
+ idle: "idle";
202
+ }>>;
203
+ execStart: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
204
+ execStartPre: z.ZodOptional<z.ZodArray<z.ZodString>>;
205
+ execStartPost: z.ZodOptional<z.ZodArray<z.ZodString>>;
206
+ execStop: z.ZodOptional<z.ZodString>;
207
+ execReload: z.ZodOptional<z.ZodString>;
208
+ user: z.ZodOptional<z.ZodString>;
209
+ group: z.ZodOptional<z.ZodString>;
210
+ workingDirectory: z.ZodOptional<z.ZodString>;
211
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
212
+ environmentFile: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
213
+ restart: z.ZodOptional<z.ZodEnum<{
214
+ no: "no";
215
+ always: "always";
216
+ "on-success": "on-success";
217
+ "on-failure": "on-failure";
218
+ "on-abnormal": "on-abnormal";
219
+ "on-abort": "on-abort";
220
+ "on-watchdog": "on-watchdog";
221
+ }>>;
222
+ restartSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
223
+ killMode: z.ZodOptional<z.ZodEnum<{
224
+ "control-group": "control-group";
225
+ mixed: "mixed";
226
+ process: "process";
227
+ none: "none";
228
+ }>>;
229
+ successExitStatus: z.ZodOptional<z.ZodString>;
230
+ remainAfterExit: z.ZodOptional<z.ZodBoolean>;
231
+ timeoutStartSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
232
+ timeoutStopSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
233
+ standardOutput: z.ZodOptional<z.ZodString>;
234
+ standardError: z.ZodOptional<z.ZodString>;
235
+ syslogIdentifier: z.ZodOptional<z.ZodString>;
236
+ oomScoreAdjust: z.ZodOptional<z.ZodNumber>;
237
+ }, z.core.$strict>>;
238
+ timer: z.ZodOptional<z.ZodObject<{
239
+ onCalendar: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
240
+ onBootSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
241
+ onStartupSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
242
+ onActiveSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
243
+ onUnitActiveSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
244
+ randomizedDelaySec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
245
+ persistent: z.ZodOptional<z.ZodBoolean>;
246
+ accuracySec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
247
+ unit: z.ZodOptional<z.ZodString>;
248
+ }, z.core.$strict>>;
249
+ path: z.ZodOptional<z.ZodObject<{
250
+ pathModified: z.ZodOptional<z.ZodArray<z.ZodString>>;
251
+ pathExists: z.ZodOptional<z.ZodArray<z.ZodString>>;
252
+ directoryNotEmpty: z.ZodOptional<z.ZodArray<z.ZodString>>;
253
+ unit: z.ZodOptional<z.ZodString>;
254
+ makeDirectory: z.ZodOptional<z.ZodBoolean>;
255
+ }, z.core.$strict>>;
256
+ wantedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
257
+ requiredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
258
+ description: z.ZodString;
259
+ documentation: z.ZodOptional<z.ZodArray<z.ZodString>>;
260
+ after: z.ZodOptional<z.ZodArray<z.ZodString>>;
261
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ wants: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
+ requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
264
+ bindsTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
265
+ partOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
266
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ conditionPathExists: z.ZodOptional<z.ZodString>;
268
+ startLimitIntervalSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
269
+ startLimitBurst: z.ZodOptional<z.ZodNumber>;
270
+ }, z.core.$strict>>;
271
+ watches: z.ZodOptional<z.ZodArray<z.ZodObject<{
272
+ paths: z.ZodArray<z.ZodString>;
273
+ onChange: z.ZodEnum<{
274
+ restart: "restart";
275
+ reload: "reload";
276
+ }>;
277
+ }, z.core.$strict>>>;
278
+ healthTimeout: z.ZodOptional<z.ZodNumber>;
279
+ }, z.core.$strict>>>;
280
+ masked: z.ZodOptional<z.ZodArray<z.ZodString>>;
281
+ }, z.core.$strict>, z.ZodObject<{
282
+ type: z.ZodLiteral<"script">;
283
+ id: z.ZodString;
284
+ host: z.ZodString;
285
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
286
+ name: z.ZodString;
287
+ unless: z.ZodString;
288
+ run: z.ZodString;
289
+ sudo: z.ZodOptional<z.ZodBoolean>;
290
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
291
+ timeout: z.ZodOptional<z.ZodNumber>;
292
+ }, z.core.$strict>>>;
293
+ }, z.core.$strict>, z.ZodObject<{
294
+ type: z.ZodLiteral<"docker">;
295
+ id: z.ZodString;
296
+ host: z.ZodString;
297
+ root: z.ZodDefault<z.ZodString>;
298
+ keepImages: z.ZodDefault<z.ZodNumber>;
299
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
300
+ name: z.ZodString;
301
+ driver: z.ZodDefault<z.ZodEnum<{
302
+ host: "host";
303
+ none: "none";
304
+ bridge: "bridge";
305
+ overlay: "overlay";
306
+ macvlan: "macvlan";
307
+ }>>;
308
+ }, z.core.$strict>>>;
309
+ containers: z.ZodOptional<z.ZodArray<z.ZodObject<{
310
+ name: z.ZodString;
311
+ source: z.ZodUnion<readonly [z.ZodObject<{
312
+ repo: z.ZodString;
313
+ track: z.ZodOptional<z.ZodObject<{
314
+ branch: z.ZodString;
315
+ }, z.core.$strict>>;
316
+ pin: z.ZodOptional<z.ZodObject<{
317
+ commit: z.ZodString;
318
+ }, z.core.$strict>>;
319
+ context: z.ZodDefault<z.ZodString>;
320
+ dockerfile: z.ZodDefault<z.ZodString>;
321
+ buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
322
+ buildTimeout: z.ZodDefault<z.ZodNumber>;
323
+ }, z.core.$strict>, z.ZodObject<{
324
+ image: z.ZodString;
325
+ track: z.ZodOptional<z.ZodObject<{
326
+ tag: z.ZodString;
327
+ }, z.core.$strict>>;
328
+ pin: z.ZodOptional<z.ZodObject<{
329
+ digest: z.ZodString;
330
+ }, z.core.$strict>>;
331
+ }, z.core.$strict>]>;
332
+ failureIsWarning: z.ZodDefault<z.ZodBoolean>;
333
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
334
+ secretEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
335
+ ports: z.ZodOptional<z.ZodArray<z.ZodObject<{
336
+ host: z.ZodNumber;
337
+ container: z.ZodNumber;
338
+ protocol: z.ZodDefault<z.ZodEnum<{
339
+ tcp: "tcp";
340
+ udp: "udp";
341
+ }>>;
342
+ bind: z.ZodOptional<z.ZodString>;
343
+ }, z.core.$strict>>>;
344
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
345
+ name: z.ZodString;
346
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
347
+ external: z.ZodDefault<z.ZodLiteral<true>>;
348
+ }, z.core.$strict>>>;
349
+ networkMode: z.ZodOptional<z.ZodLiteral<"host">>;
350
+ privileged: z.ZodOptional<z.ZodBoolean>;
351
+ containerName: z.ZodOptional<z.ZodString>;
352
+ volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
353
+ name: z.ZodOptional<z.ZodString>;
354
+ hostPath: z.ZodOptional<z.ZodString>;
355
+ mountPath: z.ZodString;
356
+ readOnly: z.ZodOptional<z.ZodBoolean>;
357
+ }, z.core.$strict>>>;
358
+ healthcheck: z.ZodOptional<z.ZodObject<{
359
+ test: z.ZodString;
360
+ interval: z.ZodDefault<z.ZodString>;
361
+ timeout: z.ZodDefault<z.ZodString>;
362
+ retries: z.ZodDefault<z.ZodNumber>;
363
+ startPeriod: z.ZodDefault<z.ZodString>;
364
+ }, z.core.$strict>>;
365
+ restart: z.ZodDefault<z.ZodEnum<{
366
+ no: "no";
367
+ always: "always";
368
+ "on-failure": "on-failure";
369
+ "unless-stopped": "unless-stopped";
370
+ }>>;
371
+ memory: z.ZodOptional<z.ZodString>;
372
+ cpus: z.ZodOptional<z.ZodString>;
373
+ user: z.ZodOptional<z.ZodString>;
374
+ command: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
375
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
376
+ }, z.core.$strict>>>;
377
+ }, z.core.$strict>, z.ZodObject<{
378
+ type: z.ZodLiteral<"checkout">;
379
+ id: z.ZodString;
380
+ host: z.ZodString;
381
+ stampDir: z.ZodDefault<z.ZodString>;
382
+ checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
383
+ name: z.ZodString;
384
+ repo: z.ZodString;
385
+ path: z.ZodString;
386
+ owner: z.ZodString;
387
+ track: z.ZodOptional<z.ZodObject<{
388
+ branch: z.ZodString;
389
+ }, z.core.$strict>>;
390
+ pin: z.ZodOptional<z.ZodObject<{
391
+ commit: z.ZodString;
392
+ }, z.core.$strict>>;
393
+ discardLocalChanges: z.ZodDefault<z.ZodBoolean>;
394
+ timeout: z.ZodDefault<z.ZodNumber>;
395
+ }, z.core.$strict>>>;
396
+ }, z.core.$strict>], "type">;
397
+ /**
398
+ * What the reconciler works with: POST-parse, so every `.default()` is filled in.
399
+ */
400
+ export type ModuleConfig = z.output<typeof ModuleConfigSchema>;
401
+ /**
402
+ * What a human WRITES: pre-parse, so defaulted fields are optional.
403
+ *
404
+ * These must stay distinct. Using the output type in `ConcordConfig` makes every
405
+ * defaulted field (e.g. an application's `branch`) required in the config repo —
406
+ * which defeats the entire point of having a default.
407
+ */
408
+ export type ModuleConfigInput = z.input<typeof ModuleConfigSchema>;
409
+ /**
410
+ * Fleet-wide settings.
411
+ *
412
+ * Distinct from `/etc/concord.env`, which holds what Concord needs to RUN. This
413
+ * holds what it needs to DEPLOY: Concord works fine without a git token unless
414
+ * the config declares an app from a private repo, which makes it a property of
415
+ * what is being deployed rather than of Concord itself.
416
+ */
417
+ export declare const SettingsSchema: z.ZodObject<{
418
+ git: z.ZodOptional<z.ZodObject<{
419
+ token: z.ZodOptional<z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>;
420
+ }, z.core.$strict>>;
421
+ }, z.core.$strict>;
422
+ export type Settings = z.output<typeof SettingsSchema>;
423
+ export declare const ConcordConfigSchema: z.ZodObject<{
424
+ schemaVersion: z.ZodLiteral<8>;
425
+ hosts: z.ZodRecord<z.ZodString, z.ZodObject<{
426
+ ip: z.ZodString;
427
+ user: z.ZodString;
428
+ port: z.ZodOptional<z.ZodNumber>;
429
+ transport: z.ZodDefault<z.ZodEnum<{
430
+ ssh: "ssh";
431
+ local: "local";
432
+ }>>;
433
+ key: z.ZodOptional<z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>;
434
+ skipIfUnreachable: z.ZodDefault<z.ZodBoolean>;
435
+ containerSweep: z.ZodDefault<z.ZodEnum<{
436
+ all: "all";
437
+ labelled: "labelled";
438
+ }>>;
439
+ }, z.core.$strict>>;
440
+ settings: z.ZodOptional<z.ZodObject<{
441
+ git: z.ZodOptional<z.ZodObject<{
442
+ token: z.ZodOptional<z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>;
443
+ }, z.core.$strict>>;
444
+ }, z.core.$strict>>;
445
+ modules: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ type: z.ZodLiteral<"porkbun">;
447
+ id: z.ZodString;
448
+ apiKey: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
449
+ secretKey: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
450
+ zones: z.ZodRecord<z.ZodString, z.ZodObject<{
451
+ records: z.ZodArray<z.ZodObject<{
452
+ type: z.ZodString;
453
+ name: z.ZodString;
454
+ content: z.ZodString;
455
+ ttl: z.ZodOptional<z.ZodNumber>;
456
+ prio: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
457
+ }, z.core.$strict>>;
458
+ }, z.core.$strict>>;
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ type: z.ZodLiteral<"cloudflare">;
461
+ id: z.ZodString;
462
+ apiToken: z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>;
463
+ accountId: z.ZodOptional<z.ZodString>;
464
+ zones: z.ZodRecord<z.ZodString, z.ZodObject<{
465
+ records: z.ZodArray<z.ZodObject<{
466
+ type: z.ZodString;
467
+ name: z.ZodString;
468
+ content: z.ZodString;
469
+ ttl: z.ZodOptional<z.ZodNumber>;
470
+ priority: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
471
+ proxied: z.ZodOptional<z.ZodBoolean>;
472
+ note: z.ZodOptional<z.ZodString>;
473
+ }, z.core.$strict>>;
474
+ }, z.core.$strict>>;
475
+ }, z.core.$strict>, z.ZodObject<{
476
+ type: z.ZodLiteral<"apt">;
477
+ id: z.ZodString;
478
+ host: z.ZodString;
479
+ repos: z.ZodOptional<z.ZodArray<z.ZodObject<{
480
+ name: z.ZodString;
481
+ uri: z.ZodString;
482
+ suites: z.ZodArray<z.ZodString>;
483
+ components: z.ZodArray<z.ZodString>;
484
+ architectures: z.ZodOptional<z.ZodArray<z.ZodString>>;
485
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
486
+ deb: "deb";
487
+ "deb-src": "deb-src";
488
+ }>>>;
489
+ key: z.ZodString;
490
+ }, z.core.$strict>>>;
491
+ packages: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
492
+ name: z.ZodString;
493
+ version: z.ZodString;
494
+ }, z.core.$strict>]>>>;
495
+ absent: z.ZodOptional<z.ZodArray<z.ZodString>>;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ type: z.ZodLiteral<"file">;
498
+ id: z.ZodString;
499
+ host: z.ZodString;
500
+ directories: z.ZodOptional<z.ZodArray<z.ZodObject<{
501
+ path: z.ZodString;
502
+ owner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
503
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
504
+ mode: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
505
+ }, z.core.$strict>>>;
506
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
507
+ path: z.ZodString;
508
+ owner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
509
+ group: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
510
+ mode: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
511
+ content: z.ZodOptional<z.ZodString>;
512
+ source: z.ZodOptional<z.ZodString>;
513
+ url: z.ZodOptional<z.ZodString>;
514
+ sha256: z.ZodOptional<z.ZodString>;
515
+ substitutions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
516
+ }, z.core.$strict>>>;
517
+ absent: z.ZodOptional<z.ZodArray<z.ZodString>>;
518
+ }, z.core.$strict>, z.ZodObject<{
519
+ type: z.ZodLiteral<"systemd">;
520
+ id: z.ZodString;
521
+ host: z.ZodString;
522
+ units: z.ZodOptional<z.ZodArray<z.ZodObject<{
523
+ name: z.ZodString;
524
+ enabled: z.ZodOptional<z.ZodBoolean>;
525
+ active: z.ZodOptional<z.ZodBoolean>;
526
+ unit: z.ZodOptional<z.ZodObject<{
527
+ service: z.ZodOptional<z.ZodObject<{
528
+ type: z.ZodOptional<z.ZodEnum<{
529
+ simple: "simple";
530
+ exec: "exec";
531
+ forking: "forking";
532
+ oneshot: "oneshot";
533
+ notify: "notify";
534
+ idle: "idle";
535
+ }>>;
536
+ execStart: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
537
+ execStartPre: z.ZodOptional<z.ZodArray<z.ZodString>>;
538
+ execStartPost: z.ZodOptional<z.ZodArray<z.ZodString>>;
539
+ execStop: z.ZodOptional<z.ZodString>;
540
+ execReload: z.ZodOptional<z.ZodString>;
541
+ user: z.ZodOptional<z.ZodString>;
542
+ group: z.ZodOptional<z.ZodString>;
543
+ workingDirectory: z.ZodOptional<z.ZodString>;
544
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
545
+ environmentFile: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
546
+ restart: z.ZodOptional<z.ZodEnum<{
547
+ no: "no";
548
+ always: "always";
549
+ "on-success": "on-success";
550
+ "on-failure": "on-failure";
551
+ "on-abnormal": "on-abnormal";
552
+ "on-abort": "on-abort";
553
+ "on-watchdog": "on-watchdog";
554
+ }>>;
555
+ restartSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
556
+ killMode: z.ZodOptional<z.ZodEnum<{
557
+ "control-group": "control-group";
558
+ mixed: "mixed";
559
+ process: "process";
560
+ none: "none";
561
+ }>>;
562
+ successExitStatus: z.ZodOptional<z.ZodString>;
563
+ remainAfterExit: z.ZodOptional<z.ZodBoolean>;
564
+ timeoutStartSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
565
+ timeoutStopSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
566
+ standardOutput: z.ZodOptional<z.ZodString>;
567
+ standardError: z.ZodOptional<z.ZodString>;
568
+ syslogIdentifier: z.ZodOptional<z.ZodString>;
569
+ oomScoreAdjust: z.ZodOptional<z.ZodNumber>;
570
+ }, z.core.$strict>>;
571
+ timer: z.ZodOptional<z.ZodObject<{
572
+ onCalendar: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
573
+ onBootSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
574
+ onStartupSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
575
+ onActiveSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
576
+ onUnitActiveSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
577
+ randomizedDelaySec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
578
+ persistent: z.ZodOptional<z.ZodBoolean>;
579
+ accuracySec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
580
+ unit: z.ZodOptional<z.ZodString>;
581
+ }, z.core.$strict>>;
582
+ path: z.ZodOptional<z.ZodObject<{
583
+ pathModified: z.ZodOptional<z.ZodArray<z.ZodString>>;
584
+ pathExists: z.ZodOptional<z.ZodArray<z.ZodString>>;
585
+ directoryNotEmpty: z.ZodOptional<z.ZodArray<z.ZodString>>;
586
+ unit: z.ZodOptional<z.ZodString>;
587
+ makeDirectory: z.ZodOptional<z.ZodBoolean>;
588
+ }, z.core.$strict>>;
589
+ wantedBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
590
+ requiredBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
591
+ description: z.ZodString;
592
+ documentation: z.ZodOptional<z.ZodArray<z.ZodString>>;
593
+ after: z.ZodOptional<z.ZodArray<z.ZodString>>;
594
+ before: z.ZodOptional<z.ZodArray<z.ZodString>>;
595
+ wants: z.ZodOptional<z.ZodArray<z.ZodString>>;
596
+ requires: z.ZodOptional<z.ZodArray<z.ZodString>>;
597
+ bindsTo: z.ZodOptional<z.ZodArray<z.ZodString>>;
598
+ partOf: z.ZodOptional<z.ZodArray<z.ZodString>>;
599
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodString>>;
600
+ conditionPathExists: z.ZodOptional<z.ZodString>;
601
+ startLimitIntervalSec: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
602
+ startLimitBurst: z.ZodOptional<z.ZodNumber>;
603
+ }, z.core.$strict>>;
604
+ watches: z.ZodOptional<z.ZodArray<z.ZodObject<{
605
+ paths: z.ZodArray<z.ZodString>;
606
+ onChange: z.ZodEnum<{
607
+ restart: "restart";
608
+ reload: "reload";
609
+ }>;
610
+ }, z.core.$strict>>>;
611
+ healthTimeout: z.ZodOptional<z.ZodNumber>;
612
+ }, z.core.$strict>>>;
613
+ masked: z.ZodOptional<z.ZodArray<z.ZodString>>;
614
+ }, z.core.$strict>, z.ZodObject<{
615
+ type: z.ZodLiteral<"script">;
616
+ id: z.ZodString;
617
+ host: z.ZodString;
618
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
619
+ name: z.ZodString;
620
+ unless: z.ZodString;
621
+ run: z.ZodString;
622
+ sudo: z.ZodOptional<z.ZodBoolean>;
623
+ secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
624
+ timeout: z.ZodOptional<z.ZodNumber>;
625
+ }, z.core.$strict>>>;
626
+ }, z.core.$strict>, z.ZodObject<{
627
+ type: z.ZodLiteral<"docker">;
628
+ id: z.ZodString;
629
+ host: z.ZodString;
630
+ root: z.ZodDefault<z.ZodString>;
631
+ keepImages: z.ZodDefault<z.ZodNumber>;
632
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
633
+ name: z.ZodString;
634
+ driver: z.ZodDefault<z.ZodEnum<{
635
+ host: "host";
636
+ none: "none";
637
+ bridge: "bridge";
638
+ overlay: "overlay";
639
+ macvlan: "macvlan";
640
+ }>>;
641
+ }, z.core.$strict>>>;
642
+ containers: z.ZodOptional<z.ZodArray<z.ZodObject<{
643
+ name: z.ZodString;
644
+ source: z.ZodUnion<readonly [z.ZodObject<{
645
+ repo: z.ZodString;
646
+ track: z.ZodOptional<z.ZodObject<{
647
+ branch: z.ZodString;
648
+ }, z.core.$strict>>;
649
+ pin: z.ZodOptional<z.ZodObject<{
650
+ commit: z.ZodString;
651
+ }, z.core.$strict>>;
652
+ context: z.ZodDefault<z.ZodString>;
653
+ dockerfile: z.ZodDefault<z.ZodString>;
654
+ buildArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
655
+ buildTimeout: z.ZodDefault<z.ZodNumber>;
656
+ }, z.core.$strict>, z.ZodObject<{
657
+ image: z.ZodString;
658
+ track: z.ZodOptional<z.ZodObject<{
659
+ tag: z.ZodString;
660
+ }, z.core.$strict>>;
661
+ pin: z.ZodOptional<z.ZodObject<{
662
+ digest: z.ZodString;
663
+ }, z.core.$strict>>;
664
+ }, z.core.$strict>]>;
665
+ failureIsWarning: z.ZodDefault<z.ZodBoolean>;
666
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
667
+ secretEnv: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("./secret.js").Secret, import("./secret.js").Secret>>>;
668
+ ports: z.ZodOptional<z.ZodArray<z.ZodObject<{
669
+ host: z.ZodNumber;
670
+ container: z.ZodNumber;
671
+ protocol: z.ZodDefault<z.ZodEnum<{
672
+ tcp: "tcp";
673
+ udp: "udp";
674
+ }>>;
675
+ bind: z.ZodOptional<z.ZodString>;
676
+ }, z.core.$strict>>>;
677
+ networks: z.ZodOptional<z.ZodArray<z.ZodObject<{
678
+ name: z.ZodString;
679
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
680
+ external: z.ZodDefault<z.ZodLiteral<true>>;
681
+ }, z.core.$strict>>>;
682
+ networkMode: z.ZodOptional<z.ZodLiteral<"host">>;
683
+ privileged: z.ZodOptional<z.ZodBoolean>;
684
+ containerName: z.ZodOptional<z.ZodString>;
685
+ volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
686
+ name: z.ZodOptional<z.ZodString>;
687
+ hostPath: z.ZodOptional<z.ZodString>;
688
+ mountPath: z.ZodString;
689
+ readOnly: z.ZodOptional<z.ZodBoolean>;
690
+ }, z.core.$strict>>>;
691
+ healthcheck: z.ZodOptional<z.ZodObject<{
692
+ test: z.ZodString;
693
+ interval: z.ZodDefault<z.ZodString>;
694
+ timeout: z.ZodDefault<z.ZodString>;
695
+ retries: z.ZodDefault<z.ZodNumber>;
696
+ startPeriod: z.ZodDefault<z.ZodString>;
697
+ }, z.core.$strict>>;
698
+ restart: z.ZodDefault<z.ZodEnum<{
699
+ no: "no";
700
+ always: "always";
701
+ "on-failure": "on-failure";
702
+ "unless-stopped": "unless-stopped";
703
+ }>>;
704
+ memory: z.ZodOptional<z.ZodString>;
705
+ cpus: z.ZodOptional<z.ZodString>;
706
+ user: z.ZodOptional<z.ZodString>;
707
+ command: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
708
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
709
+ }, z.core.$strict>>>;
710
+ }, z.core.$strict>, z.ZodObject<{
711
+ type: z.ZodLiteral<"checkout">;
712
+ id: z.ZodString;
713
+ host: z.ZodString;
714
+ stampDir: z.ZodDefault<z.ZodString>;
715
+ checkouts: z.ZodOptional<z.ZodArray<z.ZodObject<{
716
+ name: z.ZodString;
717
+ repo: z.ZodString;
718
+ path: z.ZodString;
719
+ owner: z.ZodString;
720
+ track: z.ZodOptional<z.ZodObject<{
721
+ branch: z.ZodString;
722
+ }, z.core.$strict>>;
723
+ pin: z.ZodOptional<z.ZodObject<{
724
+ commit: z.ZodString;
725
+ }, z.core.$strict>>;
726
+ discardLocalChanges: z.ZodDefault<z.ZodBoolean>;
727
+ timeout: z.ZodDefault<z.ZodNumber>;
728
+ }, z.core.$strict>>>;
729
+ }, z.core.$strict>], "type">>;
730
+ }, z.core.$strict>;
731
+ /**
732
+ * What the config repo's `concord.ts` default-exports.
733
+ *
734
+ * Import this as a TYPE ONLY:
735
+ *
736
+ * import type { ConcordConfig } from '@rcpooley/concord'
737
+ * export default { schemaVersion: 1, modules: [...] } satisfies ConcordConfig
738
+ *
739
+ * `import type` is erased at compile time, so the config repo has ZERO runtime
740
+ * dependency on this package. Nothing to resolve, nothing to symlink — the
741
+ * reconciler just reads inert data and builds its own module instances. That
742
+ * property is load-bearing: it is what makes the version check meaningful and
743
+ * what removed an entire class of bug.
744
+ */
745
+ /**
746
+ * Rewrites `host` across the module union to the registry's keys, so a typo is
747
+ * a compile error at the reference site rather than a runtime surprise.
748
+ * Distributes over the union because the checked type is a naked parameter.
749
+ */
750
+ type WithHost<T, H extends string> = T extends {
751
+ host: string;
752
+ } ? Omit<T, 'host'> & {
753
+ host: H;
754
+ } : T;
755
+ export type ConcordConfig<HR extends HostRegistry = HostRegistry> = {
756
+ schemaVersion: typeof SCHEMA_VERSION;
757
+ hosts: HR;
758
+ settings?: z.input<typeof SettingsSchema>;
759
+ modules: WithHost<ModuleConfigInput, Extract<keyof HR, string>>[];
760
+ };
761
+ export {};
762
+ //# sourceMappingURL=schema.d.ts.map